@foxford/ui 2.43.1 → 2.44.0-beta-9000685-20240911
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/Button/Button.js +1 -1
- package/components/Button/Button.js.map +1 -1
- package/components/Button/Button.mjs +1 -1
- package/components/Button/Button.mjs.map +1 -1
- package/components/Notification/Notification.js +2 -0
- package/components/Notification/Notification.js.map +1 -0
- package/components/Notification/Notification.mjs +2 -0
- package/components/Notification/Notification.mjs.map +1 -0
- package/components/Notification/constants.js +2 -0
- package/components/Notification/constants.js.map +1 -0
- package/components/Notification/constants.mjs +2 -0
- package/components/Notification/constants.mjs.map +1 -0
- package/components/Notification/style.js +2 -0
- package/components/Notification/style.js.map +1 -0
- package/components/Notification/style.mjs +2 -0
- package/components/Notification/style.mjs.map +1 -0
- package/dts/index.d.ts +59 -3
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +2 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var React=require('react');var styled=require('styled-components');var reactRouterDom=require('react-router-dom');var useClassname=require('../../hooks/useClassname.js');var withMergedProps=require('../../hocs/withMergedProps.js');var hooks=require('./hooks.js');var constants=require('./constants.js');var defaultConstants=require('./default-constants.js');var style=require('./style.js');var require$$0=require('react/jsx-runtime');var Icon=require('../Icon/Icon.js');var Text=require('../Text/Text.js');const Button=withMergedProps.withMergedProps(React.forwardRef(((e,
|
|
1
|
+
'use strict';var React=require('react');var styled=require('styled-components');var reactRouterDom=require('react-router-dom');var useClassname=require('../../hooks/useClassname.js');var withMergedProps=require('../../hocs/withMergedProps.js');var hooks=require('./hooks.js');var constants=require('./constants.js');var defaultConstants=require('./default-constants.js');var style=require('./style.js');var require$$0=require('react/jsx-runtime');var Icon=require('../Icon/Icon.js');var Text=require('../Text/Text.js');const Button=withMergedProps.withMergedProps(React.forwardRef(((e,s)=>{let{size:r="m",inline:t=!0,rounded:o=!0,color:n="accent",fontColor:a="white",textProps:i={},iconProps:c={},as:u,className:l,children:d,content:p,fontWeight:m,icon:h,innerRef:f,...q}=e;const x=styled.useTheme();q.preset!=='default'||typeof r!='string'||q.round||(q={...defaultConstants.PROPS_BY_SIZE[r]??{},...q}),q.href&&(u='a'),q.to&&(u=reactRouterDom.Link),q.primary&&(n='primary'),q.secondary&&(n='atlantis');const y=useClassname.useClassname("Button",l);const v=useClassname.useClassname("Button");const S=hooks.useComputedRel(x,q);const g=hooks.useComputedLinkProps(u,q);let[I,$]=Array.isArray(h)?h:[h];q.success&&(I='checkFill',$=null),q.preset==='brand'&&q.loading&&(I=require$$0.jsx(style.LoaderIcon,{}),$=null);const j={as:'span',size:'inherit',color:'inherit',weight:m??(q.preset==='brand'?800:600),lineHeight:q.preset==='brand'?1.2:1,marginLeft:I?'0.25em':void 0,marginRight:$?'0.25em':void 0};const C={as:'span',color:'inherit'};return require$$0.jsx(style.Root,{...q,...g,size:r,inline:t,color:n,fontColor:a,rounded:o,rel:S,as:u,className:y,ref:s??f,children:typeof d=='function'?d({baseTextProps:j,textProps:i,iconBaseProps:C,iconProps:c,icon:[I,$]}):require$$0.jsxs(require$$0.Fragment,{children:[I&&require$$0.jsx(Icon.Icon,{className:"icon",name:typeof I=='string'?I:void 0,icon:typeof I!='string'?I:void 0,...C,...c}),(d||p)&&require$$0.jsx(Text.Text,{className:`${v}__content`,...j,...i,children:d||p}),$&&require$$0.jsx(Icon.Icon,{className:"icon",name:typeof $=='string'?$:void 0,icon:typeof $!='string'?$:void 0,...C,...c})]})})})),{displayName:"Button",sizes:e=>{let s=e.preset==='brand'?constants.SIZES:defaultConstants.SIZES_DEFAULT;return e.round&&(s=e.preset==='brand'?constants.SIZES_ROUND:defaultConstants.SIZES_ROUND_DEFAULT),s}});exports.SIZES=constants.SIZES,exports.SIZES_ROUND=constants.SIZES_ROUND,exports.Button=Button,exports.COMPONENT_NAME="Button";
|
|
2
2
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { Link } from 'react-router-dom'\nimport { useClassname } from 'hooks/useClassname'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { Text } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport type { TextProps } from 'components/Text'\nimport { useComputedRel, useComputedLinkProps } from './hooks'\nimport { SIZES, SIZES_ROUND } from './constants'\nimport { SIZES_DEFAULT, SIZES_ROUND_DEFAULT, PROPS_BY_SIZE } from './default-constants'\nimport type { ButtonProps } from './types'\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Button'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ButtonProps](https://github.com/foxford/ui/blob/master/src/components/Button/types.ts)\n */\nconst Button: React.ForwardRefExoticComponent<ButtonProps> = withMergedProps<ButtonProps, HTMLButtonElement>(\n forwardRef((props, ref) => {\n let {\n size = 'm',\n inline = true,\n rounded = true,\n color = 'accent',\n fontColor = 'white',\n textProps = {},\n iconProps = {},\n as: _as,\n className,\n children,\n content,\n fontWeight,\n icon,\n innerRef,\n ...restProps\n } = props\n\n const theme = useTheme()\n\n if (restProps.preset === 'default' && typeof size === 'string' && !restProps.round) {\n const propsBySize = PROPS_BY_SIZE[size] ?? {}\n restProps = { ...propsBySize, ...restProps }\n }\n\n if (restProps.href) _as = 'a'\n if (restProps.to) _as = Link\n\n if (restProps.primary) color = 'primary'\n if (restProps.secondary) color = 'atlantis'\n\n const rootClassName = useClassname(COMPONENT_NAME, className)\n const textClassName = useClassname(COMPONENT_NAME)\n const rel = useComputedRel(theme, restProps)\n const linkProps = useComputedLinkProps(_as, restProps)\n\n let [before, after] = Array.isArray(icon) ? icon : [icon]\n\n if (restProps.success) {\n before = 'checkFill'\n after = null\n }\n\n if (restProps.preset === 'brand' && restProps.loading) {\n before = <Styled.LoaderIcon />\n after = null\n }\n\n const baseTextProps: TextProps = {\n as: 'span',\n size: 'inherit',\n color: 'inherit',\n weight: fontWeight ?? (restProps.preset === 'brand' ? 800 : 600),\n lineHeight: restProps.preset === 'brand' ? 1.2 : 1,\n marginLeft: before ? '0.25em' : undefined,\n marginRight: after ? '0.25em' : undefined,\n }\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root\n {...restProps}\n {...linkProps}\n size={size}\n inline={inline}\n color={color}\n fontColor={fontColor}\n rounded={rounded}\n rel={rel}\n as={_as}\n className={rootClassName}\n ref={ref ?? innerRef}\n >\n {typeof children === 'function' ? (\n children({\n baseTextProps,\n textProps,\n iconBaseProps,\n iconProps,\n icon: [before, after],\n })\n ) : (\n <>\n {before && (\n <Icon\n className='icon'\n name={typeof before === 'string' ? before : undefined}\n icon={typeof before !== 'string' ? before : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n )}\n {(children || content) && (\n <Text className={`${textClassName}__content`} {...baseTextProps} {...textProps}>\n {children || content}\n </Text>\n )}\n {after && (\n <Icon\n className='icon'\n name={typeof after === 'string' ? after : undefined}\n icon={typeof after !== 'string' ? after : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n )}\n </>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => {\n let sizes = props.preset === 'brand' ? SIZES : SIZES_DEFAULT\n if (props.round) sizes = props.preset === 'brand' ? SIZES_ROUND : SIZES_ROUND_DEFAULT\n\n return sizes\n },\n }\n)\n\nexport { Button, COMPONENT_NAME }\n\nexport type { ButtonProps }\n"],"names":["Button","withMergedProps","forwardRef","props","ref","size","inline","rounded","color","fontColor","textProps","iconProps","as","_as","className","children","content","fontWeight","icon","innerRef","restProps","theme","useTheme","preset","round","PROPS_BY_SIZE","href","to","Link","primary","secondary","rootClassName","useClassname","textClassName","rel","useComputedRel","linkProps","useComputedLinkProps","before","after","Array","isArray","success","loading","_jsx","jsx","Styled","baseTextProps","weight","lineHeight","marginLeft","undefined","marginRight","iconBaseProps","_jsxs","jsxs","_Fragment","Icon","name","Text","displayName","sizes","SIZES","SIZES_DEFAULT","SIZES_ROUND","SIZES_ROUND_DEFAULT"],"mappings":"ugBA2BMA,MAAAA,OAAuDC,gBAAAA,gBAC3DC,MAAAA,YAAW,CAACC,EAAOC,KACjB,IAAIC,KACFA,EAAO,IAAGC,OACVA,GAAS,EAAIC,QACbA,GAAU,EAAIC,MACdA,EAAQ,SAAQC,UAChBA,EAAY,QAAOC,UACnBA,EAAY,CAAE,EAAAC,UACdA,EAAY,CAAE,EACdC,GAAIC,EAAGC,UACPA,EAASC,SACTA,EAAQC,QACRA,EAAOC,WACPA,EAAUC,KACVA,EAAIC,SACJA,KACGC,GACDjB,EAEJ,MAAMkB,EAAQC,OAAAA,WAEVF,EAAUG,SAAW,kBAAoBlB,GAAS,UAAae,EAAUI,QAE3EJ,EAAY,IADQK,iBAAAA,cAAcpB,IAAS,CAAA,KACVe,IAG/BA,EAAUM,OAAMb,EAAM,KACtBO,EAAUO,KAAId,EAAMe,qBAEpBR,EAAUS,UAASrB,EAAQ,WAC3BY,EAAUU,YAAWtB,EAAQ,YAEjC,MAAMuB,EAAgBC,aAAAA,aA7CH,SA6CgClB,GACnD,MAAMmB,EAAgBD,0BA9CH,UA+CnB,MAAME,EAAMC,MAAAA,eAAed,EAAOD,GAClC,MAAMgB,EAAYC,MAAAA,qBAAqBxB,EAAKO,GAE5C,IAAKkB,EAAQC,GAASC,MAAMC,QAAQvB,GAAQA,EAAO,CAACA,GAEhDE,EAAUsB,UACZJ,EAAS,YACTC,EAAQ,MAGNnB,EAAUG,SAAW,SAAWH,EAAUuB,UAC5CL,EAASM,WAAAC,IAACC,qBACVP,EAAQ,MAGV,MAAMQ,EAA2B,CAC/BnC,GAAI,OACJP,KAAM,UACNG,MAAO,UACPwC,OAAQ/B,IAAeG,EAAUG,SAAW,QAAU,IAAM,KAC5D0B,WAAY7B,EAAUG,SAAW,QAAU,IAAM,EACjD2B,WAAYZ,EAAS,cAAWa,EAChCC,YAAab,EAAQ,cAAWY,GAGlC,MAAME,EAA2B,CAAEzC,GAAI,OAAQJ,MAAO,WAEtD,OACEoC,WAAAA,IAACE,MAAAA,KAAW,IACN1B,KACAgB,EACJ/B,KAAMA,EACNC,OAAQA,EACRE,MAAOA,EACPC,UAAWA,EACXF,QAASA,EACT2B,IAAKA,EACLtB,GAAIC,EACJC,UAAWiB,EACX3B,IAAKA,GAAOe,EAASJ,gBAEbA,GAAa,WACnBA,EAAS,CACPgC,gBACArC,YACA2C,gBACA1C,YACAO,KAAM,CAACoB,EAAQC,KAGjBe,WAAAC,KAAAC,oBAAA,CAAAzC,SACGuB,CAAAA,GACCM,WAAAC,IAACY,UAAI,CACH3C,UAAU,OACV4C,YAAapB,GAAW,SAAWA,OAASa,EAC5CjC,YAAaoB,GAAW,SAAWA,OAASa,KACxCE,KACA1C,KAGNI,GAAYC,IACZ4B,WAAAA,IAACe,KAAAA,KAAI,CAAC7C,UAAW,GAAGmB,gBAA8Bc,KAAmBrC,EAASK,SAC3EA,GAAYC,IAGhBuB,GACCK,WAAAC,IAACY,UAAI,CACH3C,UAAU,OACV4C,YAAanB,GAAU,SAAWA,OAAQY,EAC1CjC,YAAaqB,GAAU,SAAWA,OAAQY,KACtCE,KACA1C,QAKA,IAGlB,CACEiD,YA/HmB,SAgInBC,MAAQ1D,IACN,IAAI0D,EAAQ1D,EAAMoB,SAAW,QAAUuC,UAAAA,MAAQC,iBAAAA,cAG/C,OAFI5D,EAAMqB,QAAOqC,EAAQ1D,EAAMoB,SAAW,QAAUyC,UAAWA,YAAGC,sCAE3DJ,CAAK,
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { Link } from 'react-router-dom'\nimport { useClassname } from 'hooks/useClassname'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { Text } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport type { TextProps } from 'components/Text'\nimport { useComputedRel, useComputedLinkProps } from './hooks'\nimport { SIZES, SIZES_ROUND } from './constants'\nimport { SIZES_DEFAULT, SIZES_ROUND_DEFAULT, PROPS_BY_SIZE } from './default-constants'\nimport type { ButtonProps } from './types'\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Button'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ButtonProps](https://github.com/foxford/ui/blob/master/src/components/Button/types.ts)\n */\nconst Button: React.ForwardRefExoticComponent<ButtonProps> = withMergedProps<ButtonProps, HTMLButtonElement>(\n forwardRef((props, ref) => {\n let {\n size = 'm',\n inline = true,\n rounded = true,\n color = 'accent',\n fontColor = 'white',\n textProps = {},\n iconProps = {},\n as: _as,\n className,\n children,\n content,\n fontWeight,\n icon,\n innerRef,\n ...restProps\n } = props\n\n const theme = useTheme()\n\n if (restProps.preset === 'default' && typeof size === 'string' && !restProps.round) {\n const propsBySize = PROPS_BY_SIZE[size] ?? {}\n restProps = { ...propsBySize, ...restProps }\n }\n\n if (restProps.href) _as = 'a'\n if (restProps.to) _as = Link\n\n if (restProps.primary) color = 'primary'\n if (restProps.secondary) color = 'atlantis'\n\n const rootClassName = useClassname(COMPONENT_NAME, className)\n const textClassName = useClassname(COMPONENT_NAME)\n const rel = useComputedRel(theme, restProps)\n const linkProps = useComputedLinkProps(_as, restProps)\n\n let [before, after] = Array.isArray(icon) ? icon : [icon]\n\n if (restProps.success) {\n before = 'checkFill'\n after = null\n }\n\n if (restProps.preset === 'brand' && restProps.loading) {\n before = <Styled.LoaderIcon />\n after = null\n }\n\n const baseTextProps: TextProps = {\n as: 'span',\n size: 'inherit',\n color: 'inherit',\n weight: fontWeight ?? (restProps.preset === 'brand' ? 800 : 600),\n lineHeight: restProps.preset === 'brand' ? 1.2 : 1,\n marginLeft: before ? '0.25em' : undefined,\n marginRight: after ? '0.25em' : undefined,\n }\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root\n {...restProps}\n {...linkProps}\n size={size}\n inline={inline}\n color={color}\n fontColor={fontColor}\n rounded={rounded}\n rel={rel}\n as={_as}\n className={rootClassName}\n ref={ref ?? innerRef}\n >\n {typeof children === 'function' ? (\n children({\n baseTextProps,\n textProps,\n iconBaseProps,\n iconProps,\n icon: [before, after],\n })\n ) : (\n <>\n {before && (\n <Icon\n className='icon'\n name={typeof before === 'string' ? before : undefined}\n icon={typeof before !== 'string' ? before : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n )}\n {(children || content) && (\n <Text className={`${textClassName}__content`} {...baseTextProps} {...textProps}>\n {children || content}\n </Text>\n )}\n {after && (\n <Icon\n className='icon'\n name={typeof after === 'string' ? after : undefined}\n icon={typeof after !== 'string' ? after : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n )}\n </>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => {\n let sizes = props.preset === 'brand' ? SIZES : SIZES_DEFAULT\n if (props.round) sizes = props.preset === 'brand' ? SIZES_ROUND : SIZES_ROUND_DEFAULT\n\n return sizes\n },\n }\n)\n\nexport { Button, COMPONENT_NAME, SIZES, SIZES_ROUND }\n\nexport type { ButtonProps }\n"],"names":["Button","withMergedProps","forwardRef","props","ref","size","inline","rounded","color","fontColor","textProps","iconProps","as","_as","className","children","content","fontWeight","icon","innerRef","restProps","theme","useTheme","preset","round","PROPS_BY_SIZE","href","to","Link","primary","secondary","rootClassName","useClassname","textClassName","rel","useComputedRel","linkProps","useComputedLinkProps","before","after","Array","isArray","success","loading","_jsx","jsx","Styled","baseTextProps","weight","lineHeight","marginLeft","undefined","marginRight","iconBaseProps","_jsxs","jsxs","_Fragment","Icon","name","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GlC,MAAME,EAA2B,CAAEzC,GAAI,OAAQJ,MAAO,WAEtD,OACEoC,WAAAA,IAACE,MAAAA,KAAW,IACN1B,KACAgB,EACJ/B,KAAMA,EACNC,OAAQA,EACRE,MAAOA,EACPC,UAAWA,EACXF,QAASA,EACT2B,IAAKA,EACLtB,GAAIC,EACJC,UAAWiB,EACX3B,IAAKA,GAAOe,EAASJ,gBAEbA,GAAa,WACnBA,EAAS,CACPgC,gBACArC,YACA2C,gBACA1C,YACAO,KAAM,CAACoB,EAAQC,KAGjBe,WAAAC,KAAAC,oBAAA,CAAAzC,SACGuB,CAAAA,GACCM,WAAAC,IAACY,UAAI,CACH3C,UAAU,OACV4C,YAAapB,GAAW,SAAWA,OAASa,EAC5CjC,YAAaoB,GAAW,SAAWA,OAASa,KACxCE,KACA1C,KAGNI,GAAYC,IACZ4B,WAAAA,IAACe,KAAAA,KAAI,CAAC7C,UAAW,GAAGmB,gBAA8Bc,KAAmBrC,EAASK,SAC3EA,GAAYC,IAGhBuB,GACCK,WAAAC,IAACY,UAAI,CACH3C,UAAU,OACV4C,YAAanB,GAAU,SAAWA,OAAQY,EAC1CjC,YAAaqB,GAAU,SAAWA,OAAQY,KACtCE,KACA1C,QAKA,IAGlB,CACEiD,YA/HmB,SAgInBC,MAAQ1D,IACN,IAAI0D,EAAQ1D,EAAMoB,SAAW,QAAUuC,UAAAA,MAAQC,iBAAAA,cAG/C,OAFI5D,EAAMqB,QAAOqC,EAAQ1D,EAAMoB,SAAW,QAAUyC,UAAWA,YAAGC,sCAE3DJ,CAAK,yHApIK"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{forwardRef}from'react';import{useTheme}from'styled-components';import{Link}from'react-router-dom';import{useClassname}from'../../hooks/useClassname.mjs';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{useComputedRel,useComputedLinkProps}from'./hooks.mjs';import{SIZES,SIZES_ROUND}from'./constants.mjs';import{SIZES_DEFAULT,SIZES_ROUND_DEFAULT,PROPS_BY_SIZE}from'./default-constants.mjs';import{Root,LoaderIcon}from'./style.mjs';import{jsx,jsxs,Fragment}from'react/jsx-runtime';import{Icon}from'../Icon/Icon.mjs';import{Text}from'../Text/Text.mjs';const COMPONENT_NAME='Button';const Button=withMergedProps(forwardRef(((o,e)=>{let{size:t="m",inline:s=!0,rounded:r=!0,color:n="accent",fontColor:i="white",textProps:m={},iconProps:a={},as:c,className:p,children:l,content:d,fontWeight:u,icon:f,innerRef:h
|
|
1
|
+
import{forwardRef}from'react';import{useTheme}from'styled-components';import{Link}from'react-router-dom';import{useClassname}from'../../hooks/useClassname.mjs';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{useComputedRel,useComputedLinkProps}from'./hooks.mjs';import{SIZES,SIZES_ROUND}from'./constants.mjs';import{SIZES_DEFAULT,SIZES_ROUND_DEFAULT,PROPS_BY_SIZE}from'./default-constants.mjs';import{Root,LoaderIcon}from'./style.mjs';import{jsx,jsxs,Fragment}from'react/jsx-runtime';import{Icon}from'../Icon/Icon.mjs';import{Text}from'../Text/Text.mjs';const COMPONENT_NAME='Button';const Button=withMergedProps(forwardRef(((o,e)=>{let{size:t="m",inline:s=!0,rounded:r=!0,color:n="accent",fontColor:i="white",textProps:m={},iconProps:a={},as:c,className:p,children:l,content:d,fontWeight:u,icon:f,innerRef:S,...h}=o;const E=useTheme();h.preset!=='default'||typeof t!='string'||h.round||(h={...PROPS_BY_SIZE[t]??{},...h}),h.href&&(c='a'),h.to&&(c=Link),h.primary&&(n='primary'),h.secondary&&(n='atlantis');const I=useClassname("Button",p);const g=useClassname("Button");const j=useComputedRel(E,h);const x=useComputedLinkProps(c,h);let[N,P]=Array.isArray(f)?f:[f];h.success&&(N='checkFill',P=null),h.preset==='brand'&&h.loading&&(N=jsx(LoaderIcon,{}),P=null);const _={as:'span',size:'inherit',color:'inherit',weight:u??(h.preset==='brand'?800:600),lineHeight:h.preset==='brand'?1.2:1,marginLeft:N?'0.25em':void 0,marginRight:P?'0.25em':void 0};const R={as:'span',color:'inherit'};return jsx(Root,{...h,...x,size:t,inline:s,color:n,fontColor:i,rounded:r,rel:j,as:c,className:I,ref:e??S,children:typeof l=='function'?l({baseTextProps:_,textProps:m,iconBaseProps:R,iconProps:a,icon:[N,P]}):jsxs(Fragment,{children:[N&&jsx(Icon,{className:"icon",name:typeof N=='string'?N:void 0,icon:typeof N!='string'?N:void 0,...R,...a}),(l||d)&&jsx(Text,{className:`${g}__content`,..._,...m,children:l||d}),P&&jsx(Icon,{className:"icon",name:typeof P=='string'?P:void 0,icon:typeof P!='string'?P:void 0,...R,...a})]})})})),{displayName:"Button",sizes:o=>{let e=o.preset==='brand'?SIZES:SIZES_DEFAULT;return o.round&&(e=o.preset==='brand'?SIZES_ROUND:SIZES_ROUND_DEFAULT),e}});export{Button,COMPONENT_NAME,SIZES,SIZES_ROUND};
|
|
2
2
|
//# sourceMappingURL=Button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.mjs","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { Link } from 'react-router-dom'\nimport { useClassname } from 'hooks/useClassname'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { Text } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport type { TextProps } from 'components/Text'\nimport { useComputedRel, useComputedLinkProps } from './hooks'\nimport { SIZES, SIZES_ROUND } from './constants'\nimport { SIZES_DEFAULT, SIZES_ROUND_DEFAULT, PROPS_BY_SIZE } from './default-constants'\nimport type { ButtonProps } from './types'\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Button'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ButtonProps](https://github.com/foxford/ui/blob/master/src/components/Button/types.ts)\n */\nconst Button: React.ForwardRefExoticComponent<ButtonProps> = withMergedProps<ButtonProps, HTMLButtonElement>(\n forwardRef((props, ref) => {\n let {\n size = 'm',\n inline = true,\n rounded = true,\n color = 'accent',\n fontColor = 'white',\n textProps = {},\n iconProps = {},\n as: _as,\n className,\n children,\n content,\n fontWeight,\n icon,\n innerRef,\n ...restProps\n } = props\n\n const theme = useTheme()\n\n if (restProps.preset === 'default' && typeof size === 'string' && !restProps.round) {\n const propsBySize = PROPS_BY_SIZE[size] ?? {}\n restProps = { ...propsBySize, ...restProps }\n }\n\n if (restProps.href) _as = 'a'\n if (restProps.to) _as = Link\n\n if (restProps.primary) color = 'primary'\n if (restProps.secondary) color = 'atlantis'\n\n const rootClassName = useClassname(COMPONENT_NAME, className)\n const textClassName = useClassname(COMPONENT_NAME)\n const rel = useComputedRel(theme, restProps)\n const linkProps = useComputedLinkProps(_as, restProps)\n\n let [before, after] = Array.isArray(icon) ? icon : [icon]\n\n if (restProps.success) {\n before = 'checkFill'\n after = null\n }\n\n if (restProps.preset === 'brand' && restProps.loading) {\n before = <Styled.LoaderIcon />\n after = null\n }\n\n const baseTextProps: TextProps = {\n as: 'span',\n size: 'inherit',\n color: 'inherit',\n weight: fontWeight ?? (restProps.preset === 'brand' ? 800 : 600),\n lineHeight: restProps.preset === 'brand' ? 1.2 : 1,\n marginLeft: before ? '0.25em' : undefined,\n marginRight: after ? '0.25em' : undefined,\n }\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root\n {...restProps}\n {...linkProps}\n size={size}\n inline={inline}\n color={color}\n fontColor={fontColor}\n rounded={rounded}\n rel={rel}\n as={_as}\n className={rootClassName}\n ref={ref ?? innerRef}\n >\n {typeof children === 'function' ? (\n children({\n baseTextProps,\n textProps,\n iconBaseProps,\n iconProps,\n icon: [before, after],\n })\n ) : (\n <>\n {before && (\n <Icon\n className='icon'\n name={typeof before === 'string' ? before : undefined}\n icon={typeof before !== 'string' ? before : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n )}\n {(children || content) && (\n <Text className={`${textClassName}__content`} {...baseTextProps} {...textProps}>\n {children || content}\n </Text>\n )}\n {after && (\n <Icon\n className='icon'\n name={typeof after === 'string' ? after : undefined}\n icon={typeof after !== 'string' ? after : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n )}\n </>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => {\n let sizes = props.preset === 'brand' ? SIZES : SIZES_DEFAULT\n if (props.round) sizes = props.preset === 'brand' ? SIZES_ROUND : SIZES_ROUND_DEFAULT\n\n return sizes\n },\n }\n)\n\nexport { Button, COMPONENT_NAME }\n\nexport type { ButtonProps }\n"],"names":["COMPONENT_NAME","Button","withMergedProps","forwardRef","props","ref","size","inline","rounded","color","fontColor","textProps","iconProps","as","_as","className","children","content","fontWeight","icon","innerRef","restProps","theme","useTheme","preset","round","PROPS_BY_SIZE","href","to","Link","primary","secondary","rootClassName","useClassname","textClassName","rel","useComputedRel","linkProps","useComputedLinkProps","before","after","Array","isArray","success","loading","_jsx","Styled","baseTextProps","weight","lineHeight","marginLeft","undefined","marginRight","iconBaseProps","_jsxs","_Fragment","Icon","name","Text","displayName","sizes","SIZES","SIZES_DEFAULT","SIZES_ROUND","SIZES_ROUND_DEFAULT"],"mappings":"6jBAeMA,MAAAA,eAAiB,SAYjBC,MAAAA,OAAuDC,gBAC3DC,YAAW,CAACC,EAAOC,KACjB,IAAIC,KACFA,EAAO,IAAGC,OACVA,GAAS,EAAIC,QACbA,GAAU,EAAIC,MACdA,EAAQ,SAAQC,UAChBA,EAAY,QAAOC,UACnBA,EAAY,CAAE,EAAAC,UACdA,EAAY,CAAE,EACdC,GAAIC,EAAGC,UACPA,EAASC,SACTA,EAAQC,QACRA,EAAOC,WACPA,EAAUC,KACVA,EAAIC,SACJA,KACGC,GACDjB,EAEJ,MAAMkB,EAAQC,WAEVF,EAAUG,SAAW,kBAAoBlB,GAAS,UAAae,EAAUI,QAE3EJ,EAAY,IADQK,cAAcpB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AC3EA,GAAYC,IAGhBuB,GACCK,IAACW,KAAI,CACHzC,UAAU,OACV0C,YAAajB,GAAU,SAAWA,OAAQW,EAC1ChC,YAAaqB,GAAU,SAAWA,OAAQW,KACtCE,KACAzC,QAKA,IAGlB,CACE+C,YA/HmB,SAgInBC,MAAQxD,IACN,IAAIwD,EAAQxD,EAAMoB,SAAW,QAAUqC,MAAQC,cAG/C,OAFI1D,EAAMqB,QAAOmC,EAAQxD,EAAMoB,SAAW,QAAUuC,YAAcC,qBAE3DJ,CAAK"}
|
|
1
|
+
{"version":3,"file":"Button.mjs","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { Link } from 'react-router-dom'\nimport { useClassname } from 'hooks/useClassname'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { Text } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport type { TextProps } from 'components/Text'\nimport { useComputedRel, useComputedLinkProps } from './hooks'\nimport { SIZES, SIZES_ROUND } from './constants'\nimport { SIZES_DEFAULT, SIZES_ROUND_DEFAULT, PROPS_BY_SIZE } from './default-constants'\nimport type { ButtonProps } from './types'\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Button'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ButtonProps](https://github.com/foxford/ui/blob/master/src/components/Button/types.ts)\n */\nconst Button: React.ForwardRefExoticComponent<ButtonProps> = withMergedProps<ButtonProps, HTMLButtonElement>(\n forwardRef((props, ref) => {\n let {\n size = 'm',\n inline = true,\n rounded = true,\n color = 'accent',\n fontColor = 'white',\n textProps = {},\n iconProps = {},\n as: _as,\n className,\n children,\n content,\n fontWeight,\n icon,\n innerRef,\n ...restProps\n } = props\n\n const theme = useTheme()\n\n if (restProps.preset === 'default' && typeof size === 'string' && !restProps.round) {\n const propsBySize = PROPS_BY_SIZE[size] ?? {}\n restProps = { ...propsBySize, ...restProps }\n }\n\n if (restProps.href) _as = 'a'\n if (restProps.to) _as = Link\n\n if (restProps.primary) color = 'primary'\n if (restProps.secondary) color = 'atlantis'\n\n const rootClassName = useClassname(COMPONENT_NAME, className)\n const textClassName = useClassname(COMPONENT_NAME)\n const rel = useComputedRel(theme, restProps)\n const linkProps = useComputedLinkProps(_as, restProps)\n\n let [before, after] = Array.isArray(icon) ? icon : [icon]\n\n if (restProps.success) {\n before = 'checkFill'\n after = null\n }\n\n if (restProps.preset === 'brand' && restProps.loading) {\n before = <Styled.LoaderIcon />\n after = null\n }\n\n const baseTextProps: TextProps = {\n as: 'span',\n size: 'inherit',\n color: 'inherit',\n weight: fontWeight ?? (restProps.preset === 'brand' ? 800 : 600),\n lineHeight: restProps.preset === 'brand' ? 1.2 : 1,\n marginLeft: before ? '0.25em' : undefined,\n marginRight: after ? '0.25em' : undefined,\n }\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root\n {...restProps}\n {...linkProps}\n size={size}\n inline={inline}\n color={color}\n fontColor={fontColor}\n rounded={rounded}\n rel={rel}\n as={_as}\n className={rootClassName}\n ref={ref ?? innerRef}\n >\n {typeof children === 'function' ? (\n children({\n baseTextProps,\n textProps,\n iconBaseProps,\n iconProps,\n icon: [before, after],\n })\n ) : (\n <>\n {before && (\n <Icon\n className='icon'\n name={typeof before === 'string' ? before : undefined}\n icon={typeof before !== 'string' ? before : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n )}\n {(children || content) && (\n <Text className={`${textClassName}__content`} {...baseTextProps} {...textProps}>\n {children || content}\n </Text>\n )}\n {after && (\n <Icon\n className='icon'\n name={typeof after === 'string' ? after : undefined}\n icon={typeof after !== 'string' ? after : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n )}\n </>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => {\n let sizes = props.preset === 'brand' ? SIZES : SIZES_DEFAULT\n if (props.round) sizes = props.preset === 'brand' ? SIZES_ROUND : SIZES_ROUND_DEFAULT\n\n return sizes\n },\n }\n)\n\nexport { Button, COMPONENT_NAME, SIZES, SIZES_ROUND }\n\nexport type { ButtonProps }\n"],"names":["COMPONENT_NAME","Button","withMergedProps","forwardRef","props","ref","size","inline","rounded","color","fontColor","textProps","iconProps","as","_as","className","children","content","fontWeight","icon","innerRef","restProps","theme","useTheme","preset","round","PROPS_BY_SIZE","href","to","Link","primary","secondary","rootClassName","useClassname","textClassName","rel","useComputedRel","linkProps","useComputedLinkProps","before","after","Array","isArray","success","loading","_jsx","Styled","baseTextProps","weight","lineHeight","marginLeft","undefined","marginRight","iconBaseProps","_jsxs","_Fragment","Icon","name","Text","displayName","sizes","SIZES","SIZES_DEFAULT","SIZES_ROUND","SIZES_ROUND_DEFAULT"],"mappings":"6jBAeMA,MAAAA,eAAiB,SAYjBC,MAAAA,OAAuDC,gBAC3DC,YAAW,CAACC,EAAOC,KACjB,IAAIC,KACFA,EAAO,IAAGC,OACVA,GAAS,EAAIC,QACbA,GAAU,EAAIC,MACdA,EAAQ,SAAQC,UAChBA,EAAY,QAAOC,UACnBA,EAAY,CAAE,EAAAC,UACdA,EAAY,CAAE,EACdC,GAAIC,EAAGC,UACPA,EAASC,SACTA,EAAQC,QACRA,EAAOC,WACPA,EAAUC,KACVA,EAAIC,SACJA,KACGC,GACDjB,EAEJ,MAAMkB,EAAQC,WAEVF,EAAUG,SAAW,kBAAoBlB,GAAS,UAAae,EAAUI,QAE3EJ,EAAY,IADQK,cAAcpB,IAAS,CAAA,KACVe,IAG/BA,EAAUM,OAAMb,EAAM,KACtBO,EAAUO,KAAId,EAAMe,MAEpBR,EAAUS,UAASrB,EAAQ,WAC3BY,EAAUU,YAAWtB,EAAQ,YAEjC,MAAMuB,EAAgBC,aA7CH,SA6CgClB,GACnD,MAAMmB,EAAgBD,aA9CH,UA+CnB,MAAME,EAAMC,eAAed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AAQC,cAG/C,OAFI1D,EAAMqB,QAAOmC,EAAQxD,EAAMoB,SAAW,QAAUuC,YAAcC,qBAE3DJ,CAAK"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var React=require('react');var withMergedProps=require('../../hocs/withMergedProps.js');var constants=require('./constants.js');var style=require('./style.js');var require$$0=require('react/jsx-runtime');var Icon=require('../Icon/Icon.js');var Text=require('../Text/Text.js');var Button=require('../Button/Button.js');var Anchor=require('../Anchor/Anchor.js');var IconButton=require('../IconButton/IconButton.js');const Notification=withMergedProps.withMergedProps(React.forwardRef(((e,r)=>{const{size:t="m",status:s="system",iconProps:o={},discardButtonProps:n={},titleProps:i={},textProps:a={},actionButtonProps:c={},anchorProps:u={},title:d,text:l,hideIcon:p,sizeXXS:$,sizeXS:q,sizeS:x,sizeM:h,sizeL:j,sizeXL:z,...I}=e;const S={size:t,sizeXXS:$,sizeXS:q,sizeS:x,sizeM:h,sizeL:j,sizeXL:z};return require$$0.jsxs(style.Root,{...I,...S,status:s,ref:r,children:[!p&&require$$0.jsx(style.Spacer,{children:require$$0.jsx(Icon.Icon,{preset:"brand",name:constants.ICON_NAMES[s],sizes:constants.SIZES_ICON,...S,...o})}),require$$0.jsxs(style.Container,{children:[require$$0.jsxs(style.Content,{children:[d&&require$$0.jsx(Text.Text,{as:"p",appearance:"body",weight:700,wordBreak:"break-word",color:"content-onmain-primary",...S,...i,children:d}),l&&require$$0.jsx(Text.Text,{as:"p",appearance:"body",wordBreak:"break-word",color:"content-onmain-primary",marginTop:d?'0.2em':void 0,sizes:constants.SIZES_TEXT,...S,...a,children:l})]}),(c.onClick||u.href||u.to)&&require$$0.jsxs(style.Controls,{children:[c.onClick&&require$$0.jsx(Button.Button,{preset:"brand",black:!0,sizes:constants.SIZES_ACTION,...S,...c}),(u.href||u.to)&&require$$0.jsx(Anchor.Anchor,{preset:"brand",underline:!0,palette:{color:'content-onmain-primary'},textProps:{appearance:'body',wordBreak:'break-word'},marginLeft:c.onClick?'0.6em':void 0,...S,...u})]})]}),n.onClick&&require$$0.jsx(style.Spacer,{children:require$$0.jsx(IconButton.IconButton,{icon:"close",square:!0,...S,...n})})]})})),{displayName:'Notification',sizes:constants.SIZES});exports.Notification=Notification;
|
|
2
|
+
//# sourceMappingURL=Notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Notification.js","sources":["../../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { IconButton } from 'components/IconButton'\nimport { Button } from 'components/Button'\nimport { Anchor } from 'components/Anchor'\nimport { Text } from 'components/Text'\nimport { SIZES, SIZES_ICON, SIZES_TEXT, ICON_NAMES, SIZES_ACTION } from './constants'\nimport * as Styled from './style'\nimport type { NotificationProps } from './types'\n\nconst COMPONENT_NAME = 'Notification'\n\n/**\n *\n * Компонент поддерживает все атрибуты \\<div\\> элемента.\n *\n * Можно передать \"ref\", который будет ассоциирован с рутовым элементом.\n *\n * Поддерживаются пропсы определения размеров и внешних отступов в зависимости от ширины вьюпорта.\n *\n * Полный интерфейс можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/Notification/types.ts).\n */\nconst Notification: React.ForwardRefExoticComponent<NotificationProps> = withMergedProps<\n NotificationProps,\n HTMLDivElement\n>(\n forwardRef((props, ref) => {\n const {\n size = 'm',\n status = 'system',\n iconProps = {},\n discardButtonProps = {},\n titleProps = {},\n textProps = {},\n actionButtonProps = {},\n anchorProps = {},\n title,\n text,\n hideIcon,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n ...restProps\n } = props\n\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n return (\n <Styled.Root {...restProps} {...sizeProps} status={status} ref={ref}>\n {!hideIcon && (\n <Styled.Spacer>\n <Icon preset='brand' name={ICON_NAMES[status]} sizes={SIZES_ICON} {...sizeProps} {...iconProps} />\n </Styled.Spacer>\n )}\n <Styled.Container>\n <Styled.Content>\n {title && (\n <Text\n as='p'\n appearance='body'\n weight={700}\n wordBreak='break-word'\n color='content-onmain-primary'\n {...sizeProps}\n {...titleProps}\n >\n {title}\n </Text>\n )}\n {text && (\n <Text\n as='p'\n appearance='body'\n wordBreak='break-word'\n color='content-onmain-primary'\n marginTop={title ? '0.2em' : undefined}\n sizes={SIZES_TEXT}\n {...sizeProps}\n {...textProps}\n >\n {text}\n </Text>\n )}\n </Styled.Content>\n {(actionButtonProps.onClick || anchorProps.href || anchorProps.to) && (\n <Styled.Controls>\n {actionButtonProps.onClick && (\n <Button preset='brand' black sizes={SIZES_ACTION} {...sizeProps} {...actionButtonProps} />\n )}\n {(anchorProps.href || anchorProps.to) && (\n <Anchor\n preset='brand'\n underline\n palette={{\n color: 'content-onmain-primary',\n }}\n textProps={{\n appearance: 'body',\n wordBreak: 'break-word',\n }}\n marginLeft={actionButtonProps.onClick ? '0.6em' : undefined}\n {...sizeProps}\n {...anchorProps}\n />\n )}\n </Styled.Controls>\n )}\n </Styled.Container>\n {discardButtonProps.onClick && (\n <Styled.Spacer>\n <IconButton icon='close' square {...sizeProps} {...discardButtonProps} />\n </Styled.Spacer>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { Notification }\n"],"names":["Notification","withMergedProps","forwardRef","props","ref","size","status","iconProps","discardButtonProps","titleProps","textProps","actionButtonProps","anchorProps","title","text","hideIcon","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","restProps","sizeProps","_jsxs","Styled","children","_jsx","jsx","Icon","preset","name","ICON_NAMES","sizes","SIZES_ICON","jsxs","Text","as","appearance","weight","wordBreak","color","marginTop","undefined","SIZES_TEXT","onClick","href","to","Button","black","SIZES_ACTION","Anchor","underline","palette","marginLeft","IconButton","icon","square","displayName","SIZES"],"mappings":"2a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CAAClB,OAAO,QAAQmB,OAAK,EAAChB,MAAOiB,UAAaA,gBAAK3B,KAAeZ,KAErEC,EAAYkC,MAAQlC,EAAYmC,KAChCpB,WAAAC,IAACuB,cAAM,CACLrB,OAAO,QACPsB,WAAS,EACTC,QAAS,CACPZ,MAAO,0BAET/B,UAAW,CACT4B,WAAY,OACZE,UAAW,cAEbc,WAAY3C,EAAkBkC,QAAU,aAAUF,KAC9CpB,KACAX,UAMbJ,EAAmBqC,SAClBlB,WAAAA,IAACF,MAAAA,OAAa,CAAAC,SACZC,WAAAC,IAAC2B,sBAAU,CAACC,KAAK,QAAQC,QAAM,KAAKlC,KAAef,QAG3C,IAGlB,CACEkD,YAtHmB,eAuHnBzB,MAAO0B,UAAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{forwardRef}from'react';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{SIZES,ICON_NAMES,SIZES_ICON,SIZES_TEXT,SIZES_ACTION}from'./constants.mjs';import{Root,Spacer,Container,Content,Controls}from'./style.mjs';import{jsxs,jsx}from'react/jsx-runtime';import{Icon}from'../Icon/Icon.mjs';import{Text}from'../Text/Text.mjs';import{Button}from'../Button/Button.mjs';import{Anchor}from'../Anchor/Anchor.mjs';import{IconButton}from'../IconButton/IconButton.mjs';const Notification=withMergedProps(forwardRef(((o,r)=>{const{size:t="m",status:e="system",iconProps:s={},discardButtonProps:n={},titleProps:i={},textProps:c={},actionButtonProps:a={},anchorProps:m={},title:p,text:d,hideIcon:S,sizeXXS:l,sizeXS:x,sizeS:j,sizeM:I,sizeL:f,sizeXL:h,...z}=o;const u={size:t,sizeXXS:l,sizeXS:x,sizeS:j,sizeM:I,sizeL:f,sizeXL:h};return jsxs(Root,{...z,...u,status:e,ref:r,children:[!S&&jsx(Spacer,{children:jsx(Icon,{preset:"brand",name:ICON_NAMES[e],sizes:SIZES_ICON,...u,...s})}),jsxs(Container,{children:[jsxs(Content,{children:[p&&jsx(Text,{as:"p",appearance:"body",weight:700,wordBreak:"break-word",color:"content-onmain-primary",...u,...i,children:p}),d&&jsx(Text,{as:"p",appearance:"body",wordBreak:"break-word",color:"content-onmain-primary",marginTop:p?'0.2em':void 0,sizes:SIZES_TEXT,...u,...c,children:d})]}),(a.onClick||m.href||m.to)&&jsxs(Controls,{children:[a.onClick&&jsx(Button,{preset:"brand",black:!0,sizes:SIZES_ACTION,...u,...a}),(m.href||m.to)&&jsx(Anchor,{preset:"brand",underline:!0,palette:{color:'content-onmain-primary'},textProps:{appearance:'body',wordBreak:'break-word'},marginLeft:a.onClick?'0.6em':void 0,...u,...m})]})]}),n.onClick&&jsx(Spacer,{children:jsx(IconButton,{icon:"close",square:!0,...u,...n})})]})})),{displayName:'Notification',sizes:SIZES});export{Notification};
|
|
2
|
+
//# sourceMappingURL=Notification.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Notification.mjs","sources":["../../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { IconButton } from 'components/IconButton'\nimport { Button } from 'components/Button'\nimport { Anchor } from 'components/Anchor'\nimport { Text } from 'components/Text'\nimport { SIZES, SIZES_ICON, SIZES_TEXT, ICON_NAMES, SIZES_ACTION } from './constants'\nimport * as Styled from './style'\nimport type { NotificationProps } from './types'\n\nconst COMPONENT_NAME = 'Notification'\n\n/**\n *\n * Компонент поддерживает все атрибуты \\<div\\> элемента.\n *\n * Можно передать \"ref\", который будет ассоциирован с рутовым элементом.\n *\n * Поддерживаются пропсы определения размеров и внешних отступов в зависимости от ширины вьюпорта.\n *\n * Полный интерфейс можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/Notification/types.ts).\n */\nconst Notification: React.ForwardRefExoticComponent<NotificationProps> = withMergedProps<\n NotificationProps,\n HTMLDivElement\n>(\n forwardRef((props, ref) => {\n const {\n size = 'm',\n status = 'system',\n iconProps = {},\n discardButtonProps = {},\n titleProps = {},\n textProps = {},\n actionButtonProps = {},\n anchorProps = {},\n title,\n text,\n hideIcon,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n ...restProps\n } = props\n\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n return (\n <Styled.Root {...restProps} {...sizeProps} status={status} ref={ref}>\n {!hideIcon && (\n <Styled.Spacer>\n <Icon preset='brand' name={ICON_NAMES[status]} sizes={SIZES_ICON} {...sizeProps} {...iconProps} />\n </Styled.Spacer>\n )}\n <Styled.Container>\n <Styled.Content>\n {title && (\n <Text\n as='p'\n appearance='body'\n weight={700}\n wordBreak='break-word'\n color='content-onmain-primary'\n {...sizeProps}\n {...titleProps}\n >\n {title}\n </Text>\n )}\n {text && (\n <Text\n as='p'\n appearance='body'\n wordBreak='break-word'\n color='content-onmain-primary'\n marginTop={title ? '0.2em' : undefined}\n sizes={SIZES_TEXT}\n {...sizeProps}\n {...textProps}\n >\n {text}\n </Text>\n )}\n </Styled.Content>\n {(actionButtonProps.onClick || anchorProps.href || anchorProps.to) && (\n <Styled.Controls>\n {actionButtonProps.onClick && (\n <Button preset='brand' black sizes={SIZES_ACTION} {...sizeProps} {...actionButtonProps} />\n )}\n {(anchorProps.href || anchorProps.to) && (\n <Anchor\n preset='brand'\n underline\n palette={{\n color: 'content-onmain-primary',\n }}\n textProps={{\n appearance: 'body',\n wordBreak: 'break-word',\n }}\n marginLeft={actionButtonProps.onClick ? '0.6em' : undefined}\n {...sizeProps}\n {...anchorProps}\n />\n )}\n </Styled.Controls>\n )}\n </Styled.Container>\n {discardButtonProps.onClick && (\n <Styled.Spacer>\n <IconButton icon='close' square {...sizeProps} {...discardButtonProps} />\n </Styled.Spacer>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { Notification }\n"],"names":["Notification","withMergedProps","forwardRef","props","ref","size","status","iconProps","discardButtonProps","titleProps","textProps","actionButtonProps","anchorProps","title","text","hideIcon","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","restProps","sizeProps","_jsxs","Styled","children","_jsx","Icon","preset","name","ICON_NAMES","sizes","SIZES_ICON","Text","as","appearance","weight","wordBreak","color","marginTop","undefined","SIZES_TEXT","onClick","href","to","Button","black","SIZES_ACTION","Anchor","underline","palette","marginLeft","IconButton","icon","square","displayName","SIZES"],"mappings":"geAuBMA,MAAAA,aAAmEC,gBAIvEC,YAAW,CAACC,EAAOC,KACjB,MAAMC,KACJA,EAAO,IAAGC,OACVA,EAAS,SAAQC,UACjBA,EAAY,CAAE,EAAAC,mBACdA,EAAqB,CAAE,EAAAC,WACvBA,EAAa,CAAE,EAAAC,UACfA,EAAY,CAAE,EAAAC,kBACdA,EAAoB,CAAE,EAAAC,YACtBA,EAAc,CAAE,EAAAC,MAChBA,EAAKC,KACLA,EAAIC,SACJA,EAAQC,QACRA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,KACGC,GACDnB,EAEJ,MAAMoB,EAAY,CAChBlB,OACAW,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,OACEG,KAACC,KAAW,IAAKH,KAAeC,EAAWjB,OAAQA,EAAQF,IAAKA,EAAIsB,SAAA,EAChEX,GACAY,IAACF,OAAa,CAAAC,SACZC,IAACC,KAAI,CAACC,OAAO,QAAQC,KAAMC,WAAWzB,GAAS0B,MAAOC,cAAgBV,KAAehB,MAGzFiB,KAACC,UAAgB,CAAAC,SACfF,CAAAA,KAACC,QAAc,CAAAC,SACZb,CAAAA,GACCc,IAACO,KAAI,CACHC,GAAG,IACHC,WAAW,OACXC,OAAQ,IACRC,UAAU,aACVC,MAAM,4BACFhB,KACAd,EAAUiB,SAEbb,IAGJC,GACCa,IAACO,KAAI,CACHC,GAAG,IACHC,WAAW,OACXE,UAAU,aACVC,MAAM,yBACNC,UAAW3B,EAAQ,aAAU4B,EAC7BT,MAAOU,cACHnB,KACAb,EAASgB,SAEZZ,QAILH,EAAkBgC,SAAW/B,EAAYgC,MAAQhC,EAAYiC,KAC7DrB,KAACC,SAAe,CAAAC,UACbf,EAAkBgC,SACjBhB,IAACmB,OAAM,CAACjB,OAAO,QAAQkB,OAAK,EAACf,MAAOgB,gBAAkBzB,KAAeZ,KAErEC,EAAYgC,MAAQhC,EAAYiC,KAChClB,IAACsB,OAAM,CACLpB,OAAO,QACPqB,WAAS,EACTC,QAAS,CACPZ,MAAO,0BAET7B,UAAW,CACT0B,WAAY,OACZE,UAAW,cAEbc,WAAYzC,EAAkBgC,QAAU,aAAUF,KAC9ClB,KACAX,UAMbJ,EAAmBmC,SAClBhB,IAACF,OAAa,CAAAC,SACZC,IAAC0B,WAAU,CAACC,KAAK,QAAQC,QAAM,KAAKhC,KAAef,QAG3C,IAGlB,CACEgD,YAtHmB,eAuHnBxB,MAAOyB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var constants=require('../Button/constants.js');require('../Button/Button.js');const SIZES_ACTION={l:constants.SIZES.l,m:constants.SIZES.s,s:constants.SIZES.s};exports.ICON_NAMES={system:'infoCircle',info:'infoCircle',error:'closeCirlce',success:'checkCircle',warning:'warningTriangle'},exports.SIZES={l:{fontSize:20,padding:'0.8em 1em',borderRadius:12},m:{fontSize:16,padding:'0.8em 1em',borderRadius:10},s:{fontSize:12,padding:'0.8em 1em',borderRadius:8}},exports.SIZES_ACTION=SIZES_ACTION,exports.SIZES_ICON={l:{fontSize:28},m:{fontSize:24},s:{fontSize:20}},exports.SIZES_TEXT={l:{fontSize:18},m:{fontSize:16},s:{fontSize:14}};
|
|
2
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/components/Notification/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { IconName } from 'components/Icon'\nimport { SIZES as SIZES_BUTTON } from 'components/Button'\nimport type { NotificationSize, NotificationStatus } from './types'\n\nexport const SIZES: Record<NotificationSize, CSSProperties> = {\n l: {\n fontSize: 20,\n padding: '0.8em 1em',\n borderRadius: 12,\n },\n m: {\n fontSize: 16,\n padding: '0.8em 1em',\n borderRadius: 10,\n },\n s: {\n fontSize: 12,\n padding: '0.8em 1em',\n borderRadius: 8,\n },\n}\n\nexport const SIZES_ICON: Record<NotificationSize, CSSProperties> = {\n l: { fontSize: 28 },\n m: { fontSize: 24 },\n s: { fontSize: 20 },\n}\n\nexport const ICON_NAMES: Record<NotificationStatus, IconName> = {\n system: 'infoCircle',\n info: 'infoCircle',\n error: 'closeCirlce',\n success: 'checkCircle',\n warning: 'warningTriangle',\n}\n\nexport const SIZES_TEXT: Record<NotificationSize, CSSProperties> = {\n l: { fontSize: 18 },\n m: { fontSize: 16 },\n s: { fontSize: 14 },\n}\n\nexport const SIZES_ACTION: Record<NotificationSize, CSSProperties> = {\n l: SIZES_BUTTON.l,\n m: SIZES_BUTTON.s,\n s: SIZES_BUTTON.s,\n}\n"],"names":["SIZES_ACTION","l","SIZES_BUTTON","SIZES","m","s","system","info","error","success","warning","fontSize","padding","borderRadius"],"mappings":"4FA2CO,MAAMA,aAAwD,CACnEC,EAAGC,UAAYC,MAACF,EAChBG,EAAGF,UAAYC,MAACE,EAChBA,EAAGH,UAAYC,MAACE,sBAjB8C,CAC9DC,OAAQ,aACRC,KAAM,aACNC,MAAO,cACPC,QAAS,cACTC,QAAS,iCA7BmD,CAC5DT,EAAG,CACDU,SAAU,GACVC,QAAS,YACTC,aAAc,IAEhBT,EAAG,CACDO,SAAU,GACVC,QAAS,YACTC,aAAc,IAEhBR,EAAG,CACDM,SAAU,GACVC,QAAS,YACTC,aAAc,yDAIiD,CACjEZ,EAAG,CAAEU,SAAU,IACfP,EAAG,CAAEO,SAAU,IACfN,EAAG,CAAEM,SAAU,wBAWkD,CACjEV,EAAG,CAAEU,SAAU,IACfP,EAAG,CAAEO,SAAU,IACfN,EAAG,CAAEM,SAAU"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{SIZES as SIZES$1}from'../Button/constants.mjs';import'../Button/Button.mjs';const SIZES={l:{fontSize:20,padding:'0.8em 1em',borderRadius:12},m:{fontSize:16,padding:'0.8em 1em',borderRadius:10},s:{fontSize:12,padding:'0.8em 1em',borderRadius:8}};const SIZES_ICON={l:{fontSize:28},m:{fontSize:24},s:{fontSize:20}};const ICON_NAMES={system:'infoCircle',info:'infoCircle',error:'closeCirlce',success:'checkCircle',warning:'warningTriangle'};const SIZES_TEXT={l:{fontSize:18},m:{fontSize:16},s:{fontSize:14}};const SIZES_ACTION={l:SIZES$1.l,m:SIZES$1.s,s:SIZES$1.s};export{ICON_NAMES,SIZES,SIZES_ACTION,SIZES_ICON,SIZES_TEXT};
|
|
2
|
+
//# sourceMappingURL=constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Notification/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { IconName } from 'components/Icon'\nimport { SIZES as SIZES_BUTTON } from 'components/Button'\nimport type { NotificationSize, NotificationStatus } from './types'\n\nexport const SIZES: Record<NotificationSize, CSSProperties> = {\n l: {\n fontSize: 20,\n padding: '0.8em 1em',\n borderRadius: 12,\n },\n m: {\n fontSize: 16,\n padding: '0.8em 1em',\n borderRadius: 10,\n },\n s: {\n fontSize: 12,\n padding: '0.8em 1em',\n borderRadius: 8,\n },\n}\n\nexport const SIZES_ICON: Record<NotificationSize, CSSProperties> = {\n l: { fontSize: 28 },\n m: { fontSize: 24 },\n s: { fontSize: 20 },\n}\n\nexport const ICON_NAMES: Record<NotificationStatus, IconName> = {\n system: 'infoCircle',\n info: 'infoCircle',\n error: 'closeCirlce',\n success: 'checkCircle',\n warning: 'warningTriangle',\n}\n\nexport const SIZES_TEXT: Record<NotificationSize, CSSProperties> = {\n l: { fontSize: 18 },\n m: { fontSize: 16 },\n s: { fontSize: 14 },\n}\n\nexport const SIZES_ACTION: Record<NotificationSize, CSSProperties> = {\n l: SIZES_BUTTON.l,\n m: SIZES_BUTTON.s,\n s: SIZES_BUTTON.s,\n}\n"],"names":["SIZES","l","fontSize","padding","borderRadius","m","s","SIZES_ICON","ICON_NAMES","system","info","error","success","warning","SIZES_TEXT","SIZES_ACTION","SIZES_BUTTON"],"mappings":"mFAKO,MAAMA,MAAiD,CAC5DC,EAAG,CACDC,SAAU,GACVC,QAAS,YACTC,aAAc,IAEhBC,EAAG,CACDH,SAAU,GACVC,QAAS,YACTC,aAAc,IAEhBE,EAAG,CACDJ,SAAU,GACVC,QAAS,YACTC,aAAc,IAIX,MAAMG,WAAsD,CACjEN,EAAG,CAAEC,SAAU,IACfG,EAAG,CAAEH,SAAU,IACfI,EAAG,CAAEJ,SAAU,KAGV,MAAMM,WAAmD,CAC9DC,OAAQ,aACRC,KAAM,aACNC,MAAO,cACPC,QAAS,cACTC,QAAS,mBAGJ,MAAMC,WAAsD,CACjEb,EAAG,CAAEC,SAAU,IACfG,EAAG,CAAEH,SAAU,IACfI,EAAG,CAAEJ,SAAU,KAGV,MAAMa,aAAwD,CACnEd,EAAGe,QAAaf,EAChBI,EAAGW,QAAaV,EAChBA,EAAGU,QAAaV"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var styled=require('styled-components');var style=require('../../shared/utils/style.js');var responsiveSize=require('../../mixins/responsive-size.js');var responsiveMargin=require('../../mixins/responsive-margin.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var styled__default=_interopDefault(styled);const shouldForwardNotificationProp=style.createShouldForwardProp((e=>!['status','contentDirectionColumn'].includes(e)));const template=e=>`\n color: ${e.color};\n background-color: ${e.backgroundColor};\n`;const COLOR_SCHEMA={system:styled.css(["",""],(e=>template({color:e.theme.colors['content-onmain-primary'],backgroundColor:e.theme.colors['bg-onmain-secondary'],...e.palette}))),info:styled.css(["",""],(e=>template({color:e.theme.colors['alert-info'],backgroundColor:e.theme.colors['alert-bg-info-100'],...e.palette}))),success:styled.css(["",""],(e=>template({color:e.theme.colors['alert-success'],backgroundColor:e.theme.colors['alert-bg-success-100'],...e.palette}))),error:styled.css(["",""],(e=>template({color:e.theme.colors['alert-error'],backgroundColor:e.theme.colors['alert-bg-error-100'],...e.palette}))),warning:styled.css(["",""],(e=>template({color:e.theme.colors['alert-warning'],backgroundColor:e.theme.colors['alert-bg-warning-100'],...e.palette})))};const Container=styled__default.default.div.withConfig({displayName:"Notification__Container",componentId:"ui__sc-19hb9p3-0"})(["box-sizing:border-box;display:flex;flex-grow:1;"]);const Controls=styled__default.default.div.withConfig({displayName:"Notification__Controls",componentId:"ui__sc-19hb9p3-1"})(["box-sizing:border-box;display:flex;align-items:center;margin:0.2em 0.6em 0.2em 0;& > *{flex-shrink:1;}"]);const Root=styled__default.default.div.withConfig({shouldForwardProp:shouldForwardNotificationProp}).withConfig({displayName:"Notification__Root",componentId:"ui__sc-19hb9p3-2"})(["box-sizing:border-box;display:flex;min-width:min-content;"," "," "," ",""],(e=>COLOR_SCHEMA[e.status]),(e=>`\n ${Container} {\n flex-direction: ${e.contentDirectionColumn?'column':'row'};\n flex-wrap: ${e.contentDirectionColumn?'nowrap':'wrap'};\n }\n ${Controls} {\n justify-content: ${e.contentDirectionColumn?'flex-start':'flex-end'};\n }\n `),responsiveSize.responsiveSize,responsiveMargin.responsiveMargin);const Spacer=styled__default.default.div.withConfig({displayName:"Notification__Spacer",componentId:"ui__sc-19hb9p3-3"})(["box-sizing:border-box;display:flex;flex-shrink:0;margin:0.1em 0;&:first-child{margin-right:0.6em;}"]);const Content=styled__default.default.div.withConfig({displayName:"Notification__Content",componentId:"ui__sc-19hb9p3-4"})(["box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;flex-basis:60%;flex-grow:1;margin:0.2em 0.6em 0.2em 0;"]);exports.Container=Container,exports.Content=Content,exports.Controls=Controls,exports.Root=Root,exports.Spacer=Spacer;
|
|
2
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../../src/components/Notification/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport type { FlattenInterpolation, ThemedStyledProps, DefaultTheme } from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport type { StyledNotificationProps, NotificationPalette, NotificationStatus } from './types'\n\nconst shouldForwardNotificationProp = createShouldForwardProp(\n (propKey) => !['status', 'contentDirectionColumn'].includes(propKey)\n)\n\nconst template = (palette: NotificationPalette) => `\n color: ${palette.color};\n background-color: ${palette.backgroundColor};\n`\n\nconst COLOR_SCHEMA: Record<\n NotificationStatus,\n FlattenInterpolation<ThemedStyledProps<StyledNotificationProps, DefaultTheme>>\n> = {\n system: css<StyledNotificationProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n ...props.palette,\n })}\n `,\n info: css<StyledNotificationProps>`\n ${(props) =>\n template({\n color: props.theme.colors['alert-info'],\n backgroundColor: props.theme.colors['alert-bg-info-100'],\n ...props.palette,\n })}\n `,\n success: css<StyledNotificationProps>`\n ${(props) =>\n template({\n color: props.theme.colors['alert-success'],\n backgroundColor: props.theme.colors['alert-bg-success-100'],\n ...props.palette,\n })}\n `,\n error: css<StyledNotificationProps>`\n ${(props) =>\n template({\n color: props.theme.colors['alert-error'],\n backgroundColor: props.theme.colors['alert-bg-error-100'],\n ...props.palette,\n })}\n `,\n warning: css<StyledNotificationProps>`\n ${(props) =>\n template({\n color: props.theme.colors['alert-warning'],\n backgroundColor: props.theme.colors['alert-bg-warning-100'],\n ...props.palette,\n })}\n `,\n}\n\nexport const Container = styled.div`\n box-sizing: border-box;\n display: flex;\n flex-grow: 1;\n`\n\nexport const Controls = styled.div`\n box-sizing: border-box;\n display: flex;\n align-items: center;\n margin: 0.2em 0.6em 0.2em 0;\n\n & > * {\n flex-shrink: 1;\n }\n`\n\nexport const Root = styled.div.withConfig<StyledNotificationProps>({\n shouldForwardProp: shouldForwardNotificationProp,\n})`\n box-sizing: border-box;\n display: flex;\n min-width: min-content;\n\n ${(props) => COLOR_SCHEMA[props.status]}\n\n ${(props) => `\n ${Container} {\n flex-direction: ${props.contentDirectionColumn ? 'column' : 'row'};\n flex-wrap: ${props.contentDirectionColumn ? 'nowrap' : 'wrap'};\n }\n ${Controls} {\n justify-content: ${props.contentDirectionColumn ? 'flex-start' : 'flex-end'};\n }\n `}\n\n ${responsiveSize}\n ${responsiveMargin}\n`\n\nexport const Spacer = styled.div`\n box-sizing: border-box;\n display: flex;\n flex-shrink: 0;\n margin: 0.1em 0;\n &:first-child {\n margin-right: 0.6em;\n }\n`\n\nexport const Content = styled.div`\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n flex-basis: 60%;\n flex-grow: 1;\n margin: 0.2em 0.6em 0.2em 0;\n`\n"],"names":["shouldForwardNotificationProp","createShouldForwardProp","propKey","includes","template","palette","color","backgroundColor","COLOR_SCHEMA","system","css","props","theme","colors","info","success","error","warning","Container","styled","div","withConfig","displayName","componentId","Controls","Root","shouldForwardProp","status","contentDirectionColumn","responsiveSize","responsiveMargin","Spacer","Content"],"mappings":"mVAOA,MAAMA,8BAAgCC,MAAAA,yBACnCC,IAAa,CAAC,SAAU,0BAA0BC,SAASD,KAG9D,MAAME,SAAYC,GAAiC,cACxCA,EAAQC,+BACGD,EAAQE,qBAG9B,MAAMC,aAGF,CACFC,OAAQC,OAAGA,IAAA,CAAA,GAAA,KACNC,GACDP,SAAS,CACPE,MAAOK,EAAMC,MAAMC,OAAO,0BAC1BN,gBAAiBI,EAAMC,MAAMC,OAAO,0BACjCF,EAAMN,YAGfS,KAAMJ,OAAGA,IAAA,CAAA,GAAA,KACJC,GACDP,SAAS,CACPE,MAAOK,E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AA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import styled,{css}from'styled-components';import{createShouldForwardProp}from'../../shared/utils/style.mjs';import{responsiveSize}from'../../mixins/responsive-size.mjs';import{responsiveMargin}from'../../mixins/responsive-margin.mjs';const shouldForwardNotificationProp=createShouldForwardProp((o=>!['status','contentDirectionColumn'].includes(o)));const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n`;const COLOR_SCHEMA={system:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-secondary'],...o.palette}))),info:css(["",""],(o=>template({color:o.theme.colors['alert-info'],backgroundColor:o.theme.colors['alert-bg-info-100'],...o.palette}))),success:css(["",""],(o=>template({color:o.theme.colors['alert-success'],backgroundColor:o.theme.colors['alert-bg-success-100'],...o.palette}))),error:css(["",""],(o=>template({color:o.theme.colors['alert-error'],backgroundColor:o.theme.colors['alert-bg-error-100'],...o.palette}))),warning:css(["",""],(o=>template({color:o.theme.colors['alert-warning'],backgroundColor:o.theme.colors['alert-bg-warning-100'],...o.palette})))};const Container=styled.div.withConfig({displayName:"Notification__Container",componentId:"ui__sc-19hb9p3-0"})(["box-sizing:border-box;display:flex;flex-grow:1;"]);const Controls=styled.div.withConfig({displayName:"Notification__Controls",componentId:"ui__sc-19hb9p3-1"})(["box-sizing:border-box;display:flex;align-items:center;margin:0.2em 0.6em 0.2em 0;& > *{flex-shrink:1;}"]);const Root=styled.div.withConfig({shouldForwardProp:shouldForwardNotificationProp}).withConfig({displayName:"Notification__Root",componentId:"ui__sc-19hb9p3-2"})(["box-sizing:border-box;display:flex;min-width:min-content;"," "," "," ",""],(o=>COLOR_SCHEMA[o.status]),(o=>`\n ${Container} {\n flex-direction: ${o.contentDirectionColumn?'column':'row'};\n flex-wrap: ${o.contentDirectionColumn?'nowrap':'wrap'};\n }\n ${Controls} {\n justify-content: ${o.contentDirectionColumn?'flex-start':'flex-end'};\n }\n `),responsiveSize,responsiveMargin);const Spacer=styled.div.withConfig({displayName:"Notification__Spacer",componentId:"ui__sc-19hb9p3-3"})(["box-sizing:border-box;display:flex;flex-shrink:0;margin:0.1em 0;&:first-child{margin-right:0.6em;}"]);const Content=styled.div.withConfig({displayName:"Notification__Content",componentId:"ui__sc-19hb9p3-4"})(["box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;flex-basis:60%;flex-grow:1;margin:0.2em 0.6em 0.2em 0;"]);export{Container,Content,Controls,Root,Spacer};
|
|
2
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","sources":["../../../../src/components/Notification/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport type { FlattenInterpolation, ThemedStyledProps, DefaultTheme } from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport type { StyledNotificationProps, NotificationPalette, NotificationStatus } from './types'\n\nconst shouldForwardNotificationProp = createShouldForwardProp(\n (propKey) => !['status', 'contentDirectionColumn'].includes(propKey)\n)\n\nconst template = (palette: NotificationPalette) => `\n color: ${palette.color};\n background-color: ${palette.backgroundColor};\n`\n\nconst COLOR_SCHEMA: Record<\n NotificationStatus,\n FlattenInterpolation<ThemedStyledProps<StyledNotificationProps, DefaultTheme>>\n> = {\n system: css<StyledNotificationProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n ...props.palette,\n })}\n `,\n info: css<StyledNotificationProps>`\n ${(props) =>\n template({\n color: props.theme.colors['alert-info'],\n backgroundColor: props.theme.colors['alert-bg-info-100'],\n ...props.palette,\n })}\n `,\n success: css<StyledNotificationProps>`\n ${(props) =>\n template({\n color: props.theme.colors['alert-success'],\n backgroundColor: props.theme.colors['alert-bg-success-100'],\n ...props.palette,\n })}\n `,\n error: css<StyledNotificationProps>`\n ${(props) =>\n template({\n color: props.theme.colors['alert-error'],\n backgroundColor: props.theme.colors['alert-bg-error-100'],\n ...props.palette,\n })}\n `,\n warning: css<StyledNotificationProps>`\n ${(props) =>\n template({\n color: props.theme.colors['alert-warning'],\n backgroundColor: props.theme.colors['alert-bg-warning-100'],\n ...props.palette,\n })}\n `,\n}\n\nexport const Container = styled.div`\n box-sizing: border-box;\n display: flex;\n flex-grow: 1;\n`\n\nexport const Controls = styled.div`\n box-sizing: border-box;\n display: flex;\n align-items: center;\n margin: 0.2em 0.6em 0.2em 0;\n\n & > * {\n flex-shrink: 1;\n }\n`\n\nexport const Root = styled.div.withConfig<StyledNotificationProps>({\n shouldForwardProp: shouldForwardNotificationProp,\n})`\n box-sizing: border-box;\n display: flex;\n min-width: min-content;\n\n ${(props) => COLOR_SCHEMA[props.status]}\n\n ${(props) => `\n ${Container} {\n flex-direction: ${props.contentDirectionColumn ? 'column' : 'row'};\n flex-wrap: ${props.contentDirectionColumn ? 'nowrap' : 'wrap'};\n }\n ${Controls} {\n justify-content: ${props.contentDirectionColumn ? 'flex-start' : 'flex-end'};\n }\n `}\n\n ${responsiveSize}\n ${responsiveMargin}\n`\n\nexport const Spacer = styled.div`\n box-sizing: border-box;\n display: flex;\n flex-shrink: 0;\n margin: 0.1em 0;\n &:first-child {\n margin-right: 0.6em;\n }\n`\n\nexport const Content = styled.div`\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n flex-basis: 60%;\n flex-grow: 1;\n margin: 0.2em 0.6em 0.2em 0;\n`\n"],"names":["shouldForwardNotificationProp","createShouldForwardProp","propKey","includes","template","palette","color","backgroundColor","COLOR_SCHEMA","system","css","props","theme","colors","info","success","error","warning","Container","styled","div","withConfig","displayName","componentId","Controls","Root","shouldForwardProp","status","contentDirectionColumn","responsiveSize","responsiveMargin","Spacer","Content"],"mappings":"2OAOA,MAAMA,8BAAgCC,yBACnCC,IAAa,CAAC,SAAU,0BAA0BC,SAASD,KAG9D,MAAME,SAAY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yB,aAAe,0BAInEC,eACAC,wBAGSC,OAASZ,OAAOC,IAAGC,WAAA,CAAAC,YAAA,uBAAAC,YAAA,oBAAVJ,CAQrB,CAAA,6GAEYa,QAAUb,OAAOC,IAAGC,WAAA,CAAAC,YAAA,wBAAAC,YAAA,oBAAVJ,CAQtB,CAAA"}
|
package/dts/index.d.ts
CHANGED
|
@@ -6187,6 +6187,61 @@ declare const Dialog: React.ForwardRefExoticComponent<DialogProps> & {
|
|
|
6187
6187
|
Component: typeof DialogComponent;
|
|
6188
6188
|
};
|
|
6189
6189
|
|
|
6190
|
+
declare type NotificationSize = 'l' | 'm' | 's';
|
|
6191
|
+
declare type NotificationStatus = 'system' | 'info' | 'success' | 'error' | 'warning';
|
|
6192
|
+
declare type NotificationPalette = {
|
|
6193
|
+
color: CSSColor;
|
|
6194
|
+
backgroundColor: CSSColor;
|
|
6195
|
+
};
|
|
6196
|
+
interface NotificationProps extends ResponsiveSizeProps<NotificationSize>, ResponsiveMarginProps, Omit<React.ComponentPropsWithRef<'div'>, 'title'> {
|
|
6197
|
+
/**
|
|
6198
|
+
* Пропсы для кнопки действия.
|
|
6199
|
+
* Для рендера нужно передать "onClick"
|
|
6200
|
+
*/
|
|
6201
|
+
actionButtonProps?: ButtonProps;
|
|
6202
|
+
/**
|
|
6203
|
+
* Пропсы для компонента ссылки.
|
|
6204
|
+
* Для рендера нужно передать "to" (будет использован Link из "react-router-dom")
|
|
6205
|
+
* или "href" (будет использован нативный \<a\> элемент)
|
|
6206
|
+
*/
|
|
6207
|
+
anchorProps?: AnchorProps;
|
|
6208
|
+
/** Контент будет отображаться колонкой */
|
|
6209
|
+
contentDirectionColumn?: boolean;
|
|
6210
|
+
/**
|
|
6211
|
+
* Пропсы для кнопки с иконкой "close".
|
|
6212
|
+
* Для рендера нужно передать "onClick"
|
|
6213
|
+
*/
|
|
6214
|
+
discardButtonProps?: IconButtonProps;
|
|
6215
|
+
/** Пропсы для иконки слева */
|
|
6216
|
+
iconProps?: IconProps;
|
|
6217
|
+
/** Не показывать иконку слева */
|
|
6218
|
+
hideIcon?: boolean;
|
|
6219
|
+
/** Кастомные цвета */
|
|
6220
|
+
palette?: Partial<Record<keyof NotificationPalette, Color>>;
|
|
6221
|
+
/** Цветовая схема */
|
|
6222
|
+
status?: NotificationStatus;
|
|
6223
|
+
/** Основной контент */
|
|
6224
|
+
text?: React.ReactNode;
|
|
6225
|
+
/** Пропсы типографики для основного текста */
|
|
6226
|
+
textProps?: TextProps;
|
|
6227
|
+
/** Контент заголовка */
|
|
6228
|
+
title?: React.ReactNode;
|
|
6229
|
+
/** Пропсы типографики для заголовка */
|
|
6230
|
+
titleProps?: TextProps;
|
|
6231
|
+
}
|
|
6232
|
+
|
|
6233
|
+
/**
|
|
6234
|
+
*
|
|
6235
|
+
* Компонент поддерживает все атрибуты \<div\> элемента.
|
|
6236
|
+
*
|
|
6237
|
+
* Можно передать "ref", который будет ассоциирован с рутовым элементом.
|
|
6238
|
+
*
|
|
6239
|
+
* Поддерживаются пропсы определения размеров и внешних отступов в зависимости от ширины вьюпорта.
|
|
6240
|
+
*
|
|
6241
|
+
* Полный интерфейс можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/Notification/types.ts).
|
|
6242
|
+
*/
|
|
6243
|
+
declare const Notification: React.ForwardRefExoticComponent<NotificationProps>;
|
|
6244
|
+
|
|
6190
6245
|
interface Theme {
|
|
6191
6246
|
breakpoints: Readonly<Record<Lowercase<Breakpoint>, number>>;
|
|
6192
6247
|
assetHost?: string;
|
|
@@ -6231,9 +6286,10 @@ interface Theme {
|
|
|
6231
6286
|
Tooltip?: Partial<TooltipProps>;
|
|
6232
6287
|
TooltipComponent?: Partial<TooltipComponentProps>;
|
|
6233
6288
|
Menu?: Partial<MenuProps>;
|
|
6234
|
-
|
|
6289
|
+
MenuComponent?: Partial<MenuComponentProps>;
|
|
6235
6290
|
Dialog?: Partial<DialogProps>;
|
|
6236
|
-
|
|
6291
|
+
DialogComponent?: Partial<DialogComponentProps>;
|
|
6292
|
+
Notification?: Partial<NotificationProps>;
|
|
6237
6293
|
};
|
|
6238
6294
|
}
|
|
6239
6295
|
|
|
@@ -7950,4 +8006,4 @@ interface DropdownProps extends ResponsiveSizeProps<DropdownSize>, ResponsiveMar
|
|
|
7950
8006
|
*/
|
|
7951
8007
|
declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps>;
|
|
7952
8008
|
|
|
7953
|
-
export { ActionBtn, Alert, Amount, Anchor, Arrow, ArrowBadge, Avatar, Badge, type BaseProps, type Breakpoint, Button, COUNTRY_DATA, type CSSBorderStyle, type CSSColor, type CSSFontWeight, type CSSGlobalValue, type CSSUnit, type CSSVerticalAlign, CURRENCY_MAP, Checkbox, Chip, type Color, ColorNames, type ColorPaletteKey, Container, ContextMenu, CurrencyCodes, DEFAULT_MASK, Dialog, Dropdown, FormLabel, type HEX, INITIAL_MASK, Icon, IconButton, Indicator, Input, type KeysOfUnion, ListItem, Menu, Modal, type Nullable, Paper, Popover, Progress, type RGB, type RGBA, Radio, type ResponsivePositionProps, type ResponsivePropKey, type ResponsiveProps, type ResponsiveSizeInterpolationProps, type ResponsiveSizeProps, withThemeScrollable as Scrollable, Section, Select, Separator, type Size, type SizeValue, Skeleton, Spacer, Spinner, Switcher, Tab, Tabs, Tag, Text$1 as Text, Textarea, type Theme, type ThemeMode, type ThemeName, type ThemePreset, ThemeProvider, Tooltip, type WithThemePreset, adultDarkTheme, adultLightTheme, babyDarkTheme, babyLightTheme, baseInputStyle, buildMediaQuery, color, desktopFirst, hexToRgbA, isHex, mobileFirst, motherDarkTheme, motherLightTheme, property, responsiveNamedProperty, responsiveProperty, screenL, screenM, screenMaxL, screenMaxM, screenMaxS, screenMaxXl, screenMaxXs, screenMaxXxs, screenMinL, screenMinM, screenMinS, screenMinXl, screenMinXs, screenRetina, screenS, screenXl, screenXs, teenDarkTheme, teenLightTheme, defaultTheme as theme, vAlign };
|
|
8009
|
+
export { ActionBtn, Alert, Amount, Anchor, Arrow, ArrowBadge, Avatar, Badge, type BaseProps, type Breakpoint, Button, COUNTRY_DATA, type CSSBorderStyle, type CSSColor, type CSSFontWeight, type CSSGlobalValue, type CSSUnit, type CSSVerticalAlign, CURRENCY_MAP, Checkbox, Chip, type Color, ColorNames, type ColorPaletteKey, Container, ContextMenu, CurrencyCodes, DEFAULT_MASK, Dialog, Dropdown, FormLabel, type HEX, INITIAL_MASK, Icon, IconButton, Indicator, Input, type KeysOfUnion, ListItem, Menu, Modal, Notification, type Nullable, Paper, Popover, Progress, type RGB, type RGBA, Radio, type ResponsivePositionProps, type ResponsivePropKey, type ResponsiveProps, type ResponsiveSizeInterpolationProps, type ResponsiveSizeProps, withThemeScrollable as Scrollable, Section, Select, Separator, type Size, type SizeValue, Skeleton, Spacer, Spinner, Switcher, Tab, Tabs, Tag, Text$1 as Text, Textarea, type Theme, type ThemeMode, type ThemeName, type ThemePreset, ThemeProvider, Tooltip, type WithThemePreset, adultDarkTheme, adultLightTheme, babyDarkTheme, babyLightTheme, baseInputStyle, buildMediaQuery, color, desktopFirst, hexToRgbA, isHex, mobileFirst, motherDarkTheme, motherLightTheme, property, responsiveNamedProperty, responsiveProperty, screenL, screenM, screenMaxL, screenMaxM, screenMaxS, screenMaxXl, screenMaxXs, screenMaxXxs, screenMinL, screenMinM, screenMinS, screenMinXl, screenMinXs, screenRetina, screenS, screenXl, screenXs, teenDarkTheme, teenLightTheme, defaultTheme as theme, vAlign };
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var colors$1=require('./shared/utils/colors.js');var colors=require('./theme/colors.js');var screen=require('./mixins/screen.js');var responsiveProperty=require('./mixins/responsive-property.js');var color=require('./mixins/color.js');var vAlign=require('./mixins/vAlign.js');var shared=require('./mixins/shared.js');var constants=require('./components/Input.Phone/constants.js');var themeProvider=require('./theme/theme-provider.js');var themes=require('./theme/themes.js');var ActionBtn=require('./components/ActionBtn/ActionBtn.js');var Alert=require('./components/Alert/Alert.js');var Amount=require('./components/Amount/Amount.js');var index=require('./components/Amount/data/index.js');var Anchor=require('./components/Anchor/Anchor.js');var Arrow=require('./components/Arrow/Arrow.js');var ArrowBadge=require('./components/ArrowBadge/ArrowBadge.js');var Avatar=require('./components/Avatar/Avatar.js');var Badge=require('./components/Badge/Badge.js');var Button=require('./components/Button/Button.js');var Container=require('./components/Container/Container.js');var Icon=require('./components/Icon/Icon.js');var Modal=require('./components/Modal/Modal.js');var Paper=require('./components/Paper/Paper.js');var Progress=require('./components/Progress/Progress.js');var Scrollable=require('./components/Scrollable/Scrollable.js');var Section=require('./components/Section/Section.js');var Separator=require('./components/Separator/Separator.js');var Spacer=require('./components/Spacer/Spacer.js');var Spinner=require('./components/Spinner/Spinner.js');var Switcher=require('./components/Switcher/Switcher.js');var Tab=require('./components/Tab/Tab.js');var Tabs=require('./components/Tabs/Tabs.js');var Text=require('./components/Text/Text.js');var Tooltip=require('./components/Tooltip/Tooltip.js');var Tag=require('./components/Tag/Tag.js');var ContextMenu=require('./components/ContextMenu/ContextMenu.js');var Textarea=require('./components/Textarea/Textarea.js');var Input=require('./components/Input/Input.js');var style=require('./components/Input/style.js');var Radio=require('./components/Radio/Radio.js');var Checkbox=require('./components/Checkbox/Checkbox.js');var Select=require('./components/Select/Select.js');var FormLabel=require('./components/FormLabel/FormLabel.js');var Skeleton=require('./components/Skeleton/Skeleton.js');var Popover=require('./components/Popover/Popover.js');var ListItem=require('./components/ListItem/ListItem.js');var Indicator=require('./components/Indicator/Indicator.js');var IconButton=require('./components/IconButton/IconButton.js');var Chip=require('./components/Chip/Chip.js');var Menu=require('./components/Menu/Menu.js');var Dropdown=require('./components/Dropdown/Dropdown.js');var Dialog=require('./components/Dialog/Dialog.js');exports.hexToRgbA=colors$1.hexToRgbA,exports.isHex=colors$1.isHex,exports.ColorNames=colors.ColorNames,exports.screenL=screen.screenL,exports.screenM=screen.screenM,exports.screenMaxL=screen.screenMaxL,exports.screenMaxM=screen.screenMaxM,exports.screenMaxS=screen.screenMaxS,exports.screenMaxXl=screen.screenMaxXl,exports.screenMaxXs=screen.screenMaxXs,exports.screenMaxXxs=screen.screenMaxXxs,exports.screenMinL=screen.screenMinL,exports.screenMinM=screen.screenMinM,exports.screenMinS=screen.screenMinS,exports.screenMinXl=screen.screenMinXl,exports.screenMinXs=screen.screenMinXs,exports.screenRetina=screen.screenRetina,exports.screenS=screen.screenS,exports.screenXl=screen.screenXl,exports.screenXs=screen.screenXs,exports.property=responsiveProperty.property,exports.responsiveNamedProperty=responsiveProperty.responsiveNamedProperty,exports.responsiveProperty=responsiveProperty.responsiveProperty,exports.color=color.color,exports.vAlign=vAlign.vAlign,exports.buildMediaQuery=shared.buildMediaQuery,exports.desktopFirst=shared.desktopFirst,exports.mobileFirst=shared.mobileFirst,exports.COUNTRY_DATA=constants.COUNTRY_DATA,exports.DEFAULT_MASK=constants.DEFAULT_MASK,exports.INITIAL_MASK=constants.INITIAL_MASK,exports.ThemeProvider=themeProvider.ThemeProvider,exports.adultDarkTheme=themes.adultDarkTheme,exports.adultLightTheme=themes.adultLightTheme,exports.babyDarkTheme=themes.babyDarkTheme,exports.babyLightTheme=themes.babyLightTheme,exports.motherDarkTheme=themes.motherDarkTheme,exports.motherLightTheme=themes.motherLightTheme,exports.teenDarkTheme=themes.teenDarkTheme,exports.teenLightTheme=themes.teenLightTheme,exports.theme=themes.defaultTheme,exports.ActionBtn=ActionBtn.ActionBtn,exports.Alert=Alert.Alert,exports.Amount=Amount.Amount,exports.CURRENCY_MAP=index.CURRENCY_MAP,exports.CurrencyCodes=index.CurrencyCodes,exports.Anchor=Anchor.Anchor,exports.Arrow=Arrow.Arrow,exports.ArrowBadge=ArrowBadge.ArrowBadge,exports.Avatar=Avatar.Avatar,exports.Badge=Badge.Badge,exports.Button=Button.Button,exports.Container=Container.Container,exports.Icon=Icon.Icon,exports.Modal=Modal.Modal,exports.Paper=Paper.Paper,exports.Progress=Progress.Progress,exports.Scrollable=Scrollable.Scrollable,exports.Section=Section.Section,exports.Separator=Separator.Separator,exports.Spacer=Spacer.Spacer,exports.Spinner=Spinner.Spinner,exports.Switcher=Switcher.Switcher,exports.Tab=Tab.Tab,exports.Tabs=Tabs.Tabs,exports.Text=Text.Text,exports.Tooltip=Tooltip.Tooltip,exports.Tag=Tag.Tag,exports.ContextMenu=ContextMenu.ContextMenu,exports.Textarea=Textarea.Textarea,exports.Input=Input.Input,exports.baseInputStyle=style.baseInputStyle,exports.Radio=Radio.Radio,exports.Checkbox=Checkbox.Checkbox,exports.Select=Select.Select,exports.FormLabel=FormLabel.FormLabel,exports.Skeleton=Skeleton.Skeleton,exports.Popover=Popover.Popover,exports.ListItem=ListItem.ListItem,exports.Indicator=Indicator.Indicator,exports.IconButton=IconButton.IconButton,exports.Chip=Chip.Chip,exports.Menu=Menu.Menu,exports.Dropdown=Dropdown.Dropdown,exports.Dialog=Dialog.Dialog;
|
|
1
|
+
'use strict';var colors$1=require('./shared/utils/colors.js');var colors=require('./theme/colors.js');var screen=require('./mixins/screen.js');var responsiveProperty=require('./mixins/responsive-property.js');var color=require('./mixins/color.js');var vAlign=require('./mixins/vAlign.js');var shared=require('./mixins/shared.js');var constants=require('./components/Input.Phone/constants.js');var themeProvider=require('./theme/theme-provider.js');var themes=require('./theme/themes.js');var ActionBtn=require('./components/ActionBtn/ActionBtn.js');var Alert=require('./components/Alert/Alert.js');var Amount=require('./components/Amount/Amount.js');var index=require('./components/Amount/data/index.js');var Anchor=require('./components/Anchor/Anchor.js');var Arrow=require('./components/Arrow/Arrow.js');var ArrowBadge=require('./components/ArrowBadge/ArrowBadge.js');var Avatar=require('./components/Avatar/Avatar.js');var Badge=require('./components/Badge/Badge.js');var Button=require('./components/Button/Button.js');var Container=require('./components/Container/Container.js');var Icon=require('./components/Icon/Icon.js');var Modal=require('./components/Modal/Modal.js');var Paper=require('./components/Paper/Paper.js');var Progress=require('./components/Progress/Progress.js');var Scrollable=require('./components/Scrollable/Scrollable.js');var Section=require('./components/Section/Section.js');var Separator=require('./components/Separator/Separator.js');var Spacer=require('./components/Spacer/Spacer.js');var Spinner=require('./components/Spinner/Spinner.js');var Switcher=require('./components/Switcher/Switcher.js');var Tab=require('./components/Tab/Tab.js');var Tabs=require('./components/Tabs/Tabs.js');var Text=require('./components/Text/Text.js');var Tooltip=require('./components/Tooltip/Tooltip.js');var Tag=require('./components/Tag/Tag.js');var ContextMenu=require('./components/ContextMenu/ContextMenu.js');var Textarea=require('./components/Textarea/Textarea.js');var Input=require('./components/Input/Input.js');var style=require('./components/Input/style.js');var Radio=require('./components/Radio/Radio.js');var Checkbox=require('./components/Checkbox/Checkbox.js');var Select=require('./components/Select/Select.js');var FormLabel=require('./components/FormLabel/FormLabel.js');var Skeleton=require('./components/Skeleton/Skeleton.js');var Popover=require('./components/Popover/Popover.js');var ListItem=require('./components/ListItem/ListItem.js');var Indicator=require('./components/Indicator/Indicator.js');var IconButton=require('./components/IconButton/IconButton.js');var Chip=require('./components/Chip/Chip.js');var Menu=require('./components/Menu/Menu.js');var Dropdown=require('./components/Dropdown/Dropdown.js');var Dialog=require('./components/Dialog/Dialog.js');var Notification=require('./components/Notification/Notification.js');exports.hexToRgbA=colors$1.hexToRgbA,exports.isHex=colors$1.isHex,exports.ColorNames=colors.ColorNames,exports.screenL=screen.screenL,exports.screenM=screen.screenM,exports.screenMaxL=screen.screenMaxL,exports.screenMaxM=screen.screenMaxM,exports.screenMaxS=screen.screenMaxS,exports.screenMaxXl=screen.screenMaxXl,exports.screenMaxXs=screen.screenMaxXs,exports.screenMaxXxs=screen.screenMaxXxs,exports.screenMinL=screen.screenMinL,exports.screenMinM=screen.screenMinM,exports.screenMinS=screen.screenMinS,exports.screenMinXl=screen.screenMinXl,exports.screenMinXs=screen.screenMinXs,exports.screenRetina=screen.screenRetina,exports.screenS=screen.screenS,exports.screenXl=screen.screenXl,exports.screenXs=screen.screenXs,exports.property=responsiveProperty.property,exports.responsiveNamedProperty=responsiveProperty.responsiveNamedProperty,exports.responsiveProperty=responsiveProperty.responsiveProperty,exports.color=color.color,exports.vAlign=vAlign.vAlign,exports.buildMediaQuery=shared.buildMediaQuery,exports.desktopFirst=shared.desktopFirst,exports.mobileFirst=shared.mobileFirst,exports.COUNTRY_DATA=constants.COUNTRY_DATA,exports.DEFAULT_MASK=constants.DEFAULT_MASK,exports.INITIAL_MASK=constants.INITIAL_MASK,exports.ThemeProvider=themeProvider.ThemeProvider,exports.adultDarkTheme=themes.adultDarkTheme,exports.adultLightTheme=themes.adultLightTheme,exports.babyDarkTheme=themes.babyDarkTheme,exports.babyLightTheme=themes.babyLightTheme,exports.motherDarkTheme=themes.motherDarkTheme,exports.motherLightTheme=themes.motherLightTheme,exports.teenDarkTheme=themes.teenDarkTheme,exports.teenLightTheme=themes.teenLightTheme,exports.theme=themes.defaultTheme,exports.ActionBtn=ActionBtn.ActionBtn,exports.Alert=Alert.Alert,exports.Amount=Amount.Amount,exports.CURRENCY_MAP=index.CURRENCY_MAP,exports.CurrencyCodes=index.CurrencyCodes,exports.Anchor=Anchor.Anchor,exports.Arrow=Arrow.Arrow,exports.ArrowBadge=ArrowBadge.ArrowBadge,exports.Avatar=Avatar.Avatar,exports.Badge=Badge.Badge,exports.Button=Button.Button,exports.Container=Container.Container,exports.Icon=Icon.Icon,exports.Modal=Modal.Modal,exports.Paper=Paper.Paper,exports.Progress=Progress.Progress,exports.Scrollable=Scrollable.Scrollable,exports.Section=Section.Section,exports.Separator=Separator.Separator,exports.Spacer=Spacer.Spacer,exports.Spinner=Spinner.Spinner,exports.Switcher=Switcher.Switcher,exports.Tab=Tab.Tab,exports.Tabs=Tabs.Tabs,exports.Text=Text.Text,exports.Tooltip=Tooltip.Tooltip,exports.Tag=Tag.Tag,exports.ContextMenu=ContextMenu.ContextMenu,exports.Textarea=Textarea.Textarea,exports.Input=Input.Input,exports.baseInputStyle=style.baseInputStyle,exports.Radio=Radio.Radio,exports.Checkbox=Checkbox.Checkbox,exports.Select=Select.Select,exports.FormLabel=FormLabel.FormLabel,exports.Skeleton=Skeleton.Skeleton,exports.Popover=Popover.Popover,exports.ListItem=ListItem.ListItem,exports.Indicator=Indicator.Indicator,exports.IconButton=IconButton.IconButton,exports.Chip=Chip.Chip,exports.Menu=Menu.Menu,exports.Dropdown=Dropdown.Dropdown,exports.Dialog=Dialog.Dialog,exports.Notification=Notification.Notification;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{hexToRgbA,isHex}from'./shared/utils/colors.mjs';export{ColorNames}from'./theme/colors.mjs';export{screenL,screenM,screenMaxL,screenMaxM,screenMaxS,screenMaxXl,screenMaxXs,screenMaxXxs,screenMinL,screenMinM,screenMinS,screenMinXl,screenMinXs,screenRetina,screenS,screenXl,screenXs}from'./mixins/screen.mjs';export{property,responsiveNamedProperty,responsiveProperty}from'./mixins/responsive-property.mjs';export{color}from'./mixins/color.mjs';export{vAlign}from'./mixins/vAlign.mjs';export{buildMediaQuery,desktopFirst,mobileFirst}from'./mixins/shared.mjs';export{COUNTRY_DATA,DEFAULT_MASK,INITIAL_MASK}from'./components/Input.Phone/constants.mjs';export{ThemeProvider}from'./theme/theme-provider.mjs';export{adultDarkTheme,adultLightTheme,babyDarkTheme,babyLightTheme,motherDarkTheme,motherLightTheme,teenDarkTheme,teenLightTheme,defaultTheme as theme}from'./theme/themes.mjs';export{ActionBtn}from'./components/ActionBtn/ActionBtn.mjs';export{Alert}from'./components/Alert/Alert.mjs';export{Amount}from'./components/Amount/Amount.mjs';export{CURRENCY_MAP,CurrencyCodes}from'./components/Amount/data/index.mjs';export{Anchor}from'./components/Anchor/Anchor.mjs';export{Arrow}from'./components/Arrow/Arrow.mjs';export{ArrowBadge}from'./components/ArrowBadge/ArrowBadge.mjs';export{Avatar}from'./components/Avatar/Avatar.mjs';export{Badge}from'./components/Badge/Badge.mjs';export{Button}from'./components/Button/Button.mjs';export{Container}from'./components/Container/Container.mjs';export{Icon}from'./components/Icon/Icon.mjs';export{Modal}from'./components/Modal/Modal.mjs';export{Paper}from'./components/Paper/Paper.mjs';export{Progress}from'./components/Progress/Progress.mjs';export{Scrollable}from'./components/Scrollable/Scrollable.mjs';export{Section}from'./components/Section/Section.mjs';export{Separator}from'./components/Separator/Separator.mjs';export{Spacer}from'./components/Spacer/Spacer.mjs';export{Spinner}from'./components/Spinner/Spinner.mjs';export{Switcher}from'./components/Switcher/Switcher.mjs';export{Tab}from'./components/Tab/Tab.mjs';export{Tabs}from'./components/Tabs/Tabs.mjs';export{Text}from'./components/Text/Text.mjs';export{Tooltip}from'./components/Tooltip/Tooltip.mjs';export{Tag}from'./components/Tag/Tag.mjs';export{ContextMenu}from'./components/ContextMenu/ContextMenu.mjs';export{Textarea}from'./components/Textarea/Textarea.mjs';export{Input}from'./components/Input/Input.mjs';export{baseInputStyle}from'./components/Input/style.mjs';export{Radio}from'./components/Radio/Radio.mjs';export{Checkbox}from'./components/Checkbox/Checkbox.mjs';export{Select}from'./components/Select/Select.mjs';export{FormLabel}from'./components/FormLabel/FormLabel.mjs';export{Skeleton}from'./components/Skeleton/Skeleton.mjs';export{Popover}from'./components/Popover/Popover.mjs';export{ListItem}from'./components/ListItem/ListItem.mjs';export{Indicator}from'./components/Indicator/Indicator.mjs';export{IconButton}from'./components/IconButton/IconButton.mjs';export{Chip}from'./components/Chip/Chip.mjs';export{Menu}from'./components/Menu/Menu.mjs';export{Dropdown}from'./components/Dropdown/Dropdown.mjs';export{Dialog}from'./components/Dialog/Dialog.mjs';
|
|
1
|
+
export{hexToRgbA,isHex}from'./shared/utils/colors.mjs';export{ColorNames}from'./theme/colors.mjs';export{screenL,screenM,screenMaxL,screenMaxM,screenMaxS,screenMaxXl,screenMaxXs,screenMaxXxs,screenMinL,screenMinM,screenMinS,screenMinXl,screenMinXs,screenRetina,screenS,screenXl,screenXs}from'./mixins/screen.mjs';export{property,responsiveNamedProperty,responsiveProperty}from'./mixins/responsive-property.mjs';export{color}from'./mixins/color.mjs';export{vAlign}from'./mixins/vAlign.mjs';export{buildMediaQuery,desktopFirst,mobileFirst}from'./mixins/shared.mjs';export{COUNTRY_DATA,DEFAULT_MASK,INITIAL_MASK}from'./components/Input.Phone/constants.mjs';export{ThemeProvider}from'./theme/theme-provider.mjs';export{adultDarkTheme,adultLightTheme,babyDarkTheme,babyLightTheme,motherDarkTheme,motherLightTheme,teenDarkTheme,teenLightTheme,defaultTheme as theme}from'./theme/themes.mjs';export{ActionBtn}from'./components/ActionBtn/ActionBtn.mjs';export{Alert}from'./components/Alert/Alert.mjs';export{Amount}from'./components/Amount/Amount.mjs';export{CURRENCY_MAP,CurrencyCodes}from'./components/Amount/data/index.mjs';export{Anchor}from'./components/Anchor/Anchor.mjs';export{Arrow}from'./components/Arrow/Arrow.mjs';export{ArrowBadge}from'./components/ArrowBadge/ArrowBadge.mjs';export{Avatar}from'./components/Avatar/Avatar.mjs';export{Badge}from'./components/Badge/Badge.mjs';export{Button}from'./components/Button/Button.mjs';export{Container}from'./components/Container/Container.mjs';export{Icon}from'./components/Icon/Icon.mjs';export{Modal}from'./components/Modal/Modal.mjs';export{Paper}from'./components/Paper/Paper.mjs';export{Progress}from'./components/Progress/Progress.mjs';export{Scrollable}from'./components/Scrollable/Scrollable.mjs';export{Section}from'./components/Section/Section.mjs';export{Separator}from'./components/Separator/Separator.mjs';export{Spacer}from'./components/Spacer/Spacer.mjs';export{Spinner}from'./components/Spinner/Spinner.mjs';export{Switcher}from'./components/Switcher/Switcher.mjs';export{Tab}from'./components/Tab/Tab.mjs';export{Tabs}from'./components/Tabs/Tabs.mjs';export{Text}from'./components/Text/Text.mjs';export{Tooltip}from'./components/Tooltip/Tooltip.mjs';export{Tag}from'./components/Tag/Tag.mjs';export{ContextMenu}from'./components/ContextMenu/ContextMenu.mjs';export{Textarea}from'./components/Textarea/Textarea.mjs';export{Input}from'./components/Input/Input.mjs';export{baseInputStyle}from'./components/Input/style.mjs';export{Radio}from'./components/Radio/Radio.mjs';export{Checkbox}from'./components/Checkbox/Checkbox.mjs';export{Select}from'./components/Select/Select.mjs';export{FormLabel}from'./components/FormLabel/FormLabel.mjs';export{Skeleton}from'./components/Skeleton/Skeleton.mjs';export{Popover}from'./components/Popover/Popover.mjs';export{ListItem}from'./components/ListItem/ListItem.mjs';export{Indicator}from'./components/Indicator/Indicator.mjs';export{IconButton}from'./components/IconButton/IconButton.mjs';export{Chip}from'./components/Chip/Chip.mjs';export{Menu}from'./components/Menu/Menu.mjs';export{Dropdown}from'./components/Dropdown/Dropdown.mjs';export{Dialog}from'./components/Dialog/Dialog.mjs';export{Notification}from'./components/Notification/Notification.mjs';
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED