@foxford/ui 2.0.0-beta-e46656e-20220706 → 2.0.0-beta-5ae66b6-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.
- package/components/Modal/Modal.js +1 -1
- package/components/Modal/Modal.js.map +1 -1
- package/components/Text/Text.js +1 -1
- package/components/Text/Text.js.map +1 -1
- package/components/Tooltip/Tooltip.js +1 -1
- package/components/Tooltip/Tooltip.js.map +1 -1
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/package.json +6 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from'react-modal';import{ModalClose as
|
|
1
|
+
import e from'react-modal';import{ModalClose as o}from'./Close.js';import{Modal as l}from'./style.js';import{jsx as s}from'react/jsx-runtime';var a;function n(e){var{children:o,closeTimeoutMS:a,contentLabel:n,isOpen:t,onAfterOpen:r,onRequestClose:i,overlayClassName:d,role:m,shouldCloseOnOverlayClick:c,width:p,valign:C,className:u,style:y,zIndex:O}=e;return s(l,{closeTimeoutMS:a,contentLabel:n,isOpen:Boolean(t),onAfterOpen:r,onRequestClose:i,portalClassName:u,overlayClassName:d,bodyOpenClassName:"modal--open",role:m,zIndex:O,valign:C,width:p,shouldCloseOnOverlayClick:c,children:s("div",{style:y,children:o})})}'undefined'!=typeof window&&(a=document.body)&&a instanceof HTMLElement&&e.setAppElement(a),n.defaultProps={closeTimeoutMS:0,zIndex:9e3,contentLabel:'',isOpen:!1,role:'dialog',shouldCloseOnOverlayClick:!0,width:'m',valign:'center',className:'modal'},n.Close=o,n.displayName='Modal';export{n as Modal};
|
|
2
2
|
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import ReactModal, { Classes } from 'react-modal'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { BaseProps } from '../../shared/interfaces'\nimport { ModalClose } from './Close'\nimport * as Styled from './style'\n\nfunction setAppModalElement() {\n const appElement = document.body\n\n if (appElement && appElement instanceof HTMLElement) ReactModal.setAppElement(appElement)\n}\n\
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import ReactModal, { Classes } from 'react-modal'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { BaseProps } from '../../shared/interfaces'\nimport { ModalClose } from './Close'\nimport * as Styled from './style'\n\nfunction setAppModalElement() {\n const appElement = document.body\n\n if (appElement && appElement instanceof HTMLElement) ReactModal.setAppElement(appElement)\n}\n\n// eslint-disable-next-line prettier/prettier\nif (typeof window !== 'undefined') {\n setAppModalElement()\n}\n\nexport interface ModalProps extends BaseProps, ResponsiveProperty<'width'> {\n /**\n * Primary content.\n */\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Modal class name\n */\n className?: string\n /**\n * Number indicating the milliseconds to wait before closing the modal.\n */\n closeTimeoutMS?: number\n /**\n * String indicating how the content container should be announced to screenreaders\n */\n contentLabel?: string\n /**\n * Boolean describing if the modal should be shown or not.\n */\n isOpen?: boolean\n /**\n * Function that will be run after the modal has opened.\n */\n onAfterOpen?(): void\n /**\n * Function that will be run when the modal is requested to be closed, prior to actually closing.\n */\n onRequestClose?(): void\n /**\n * Custom overlay CSS class name\n */\n overlayClassName?: string | Classes\n /**\n * String indicating the role of the modal, allowing the 'dialog' role to be applied if desired.\n */\n role?: string\n /**\n * Boolean indicating if the overlay should close the modal\n */\n shouldCloseOnOverlayClick?: boolean\n /**\n * Vertical align\n */\n valign?: 'top' | 'center' | 'bottom'\n /**\n * z-index\n */\n zIndex?: number\n}\n\nModal.defaultProps = {\n closeTimeoutMS: 0,\n zIndex: 9000,\n contentLabel: '',\n isOpen: false,\n role: 'dialog',\n shouldCloseOnOverlayClick: true,\n width: 'm',\n valign: 'center',\n className: 'modal',\n}\n\nModal.Close = ModalClose\nModal.displayName = 'Modal'\n\n/**\n * Основан на [react-modal](https://github.com/reactjs/react-modal).\n *\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`ResponsiveProperty<'width'>`](#/Миксины)\n */\nexport function Modal(props: ModalProps) {\n const {\n children,\n closeTimeoutMS,\n contentLabel,\n isOpen,\n onAfterOpen,\n onRequestClose,\n overlayClassName,\n role,\n shouldCloseOnOverlayClick,\n width,\n valign,\n className,\n style,\n zIndex,\n } = props\n\n return (\n <Styled.Modal\n closeTimeoutMS={closeTimeoutMS}\n contentLabel={contentLabel}\n isOpen={Boolean(isOpen)}\n onAfterOpen={onAfterOpen}\n onRequestClose={onRequestClose}\n portalClassName={className}\n overlayClassName={overlayClassName}\n bodyOpenClassName='modal--open'\n role={role}\n zIndex={zIndex}\n valign={valign}\n width={width}\n shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}\n >\n <div style={style}>{children}</div>\n </Styled.Modal>\n )\n}\n"],"names":["appElement","Modal","props","children","closeTimeoutMS","contentLabel","isOpen","onAfterOpen","onRequestClose","overlayClassName","role","shouldCloseOnOverlayClick","width","valign","className","style","zIndex","_jsx","Styled.Modal","Boolean","portalClassName","bodyOpenClassName","window","document","body","HTMLElement","ReactModal","setAppElement","defaultProps","Close","ModalClose","displayName"],"mappings":"8IAMA,IACQA,EAsFD,SAASC,EAAMC,GACpB,IAAMC,SACJA,EADIC,eAEJA,EAFIC,aAGJA,EAHIC,OAIJA,EAJIC,YAKJA,EALIC,eAMJA,EANIC,iBAOJA,EAPIC,KAQJA,EARIC,0BASJA,EATIC,MAUJA,EAVIC,OAWJA,EAXIC,UAYJA,EAZIC,MAaJA,EAbIC,OAcJA,GACEd,EAEJ,OACEe,EAACC,EAAD,CACEd,eAAgBA,EAChBC,aAAcA,EACdC,OAAQa,QAAQb,GAChBC,YAAaA,EACbC,eAAgBA,EAChBY,gBAAiBN,EACjBL,iBAAkBA,EAClBY,kBAAkB,cAClBX,KAAMA,EACNM,OAAQA,EACRH,OAAQA,EACRD,MAAOA,EACPD,0BAA2BA,EAb7BR,SAeEc,EAAA,MAAA,CAAKF,MAAOA,EAAZZ,SAAoBA,MAlHJ,oBAAXmB,SANHtB,EAAauB,SAASC,OAEVxB,aAAsByB,aAAaC,EAAWC,cAAc3B,GA8DhFC,EAAM2B,aAAe,CACnBxB,eAAgB,EAChBY,OAAQ,IACRX,aAAc,GACdC,QAAAA,EACAI,KAAM,SACNC,2BAAAA,EACAC,MAAO,IACPC,OAAQ,SACRC,UAAW,SAGbb,EAAM4B,MAAQC,EACd7B,EAAM8B,YAAc"}
|
package/components/Text/Text.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useClassname as e}from'../../hooks/useClassname.js';import{TextHeading as s}from'../Text.Heading/Text.Heading.js';import{TextEllipse as i}from'../Text.Ellipse/Text.Ellipse.js';import{Root as t}from'./style.js';import{jsx as l}from'react/jsx-runtime';function n(s){var{as:i="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}=s;var j=e(n.displayName,d);return l(t,a?{as:i,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:i,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=s,n.Ellipse=i,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
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../../src/components/Text/Text.tsx"],"sourcesContent":["import { useClassname } from 'hooks/useClassname'\nimport { TextHeading } from '../../components/Text.Heading'\nimport { TextEllipse } from '../../components/Text.Ellipse'\nimport { Color } from '../../mixins/color'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { Display } from '../../mixins/display'\nimport { BaseProps } from '../../shared/interfaces'\nimport * as Styled from './style'\n\nexport interface TextProps extends BaseProps, Color, ResponsiveProperty<'size'>, Display {\n /**\n * An element type to render as (string).\n */\n as?: 'div' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'p'\n /**\n * Primary content\n */\n content?: string\n /**\n * Primary content\n */\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Text font weight\n */\n weight?: 'lighter' | 'normal' | 'bold' | 'bolder' | number\n /**\n * Text font style\n */\n fontStyle?: 'normal' | 'italic'\n /**\n * Add underline to inline links\n */\n underlineLinks?: boolean\n /**\n * Text align\n */\n textAlign?: 'left' | 'center' | 'right' | 'justify' | 'start' | 'end'\n /**\n * Line height\n */\n lineHeight?: 'l' | 'm' | 's' | 'xs' | number\n /**\n * Element title\n */\n title?: string\n}\n\nText.Heading = TextHeading\nText.Ellipse = TextEllipse\nText.displayName = 'Text'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n */\nexport function Text(props: TextProps) {\n const {\n as = 'div',\n children,\n weight = 'normal',\n content,\n textAlign,\n underlineLinks,\n className: 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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from'@babel/runtime/helpers/esm/objectSpread2';import e from'@babel/runtime/helpers/esm/objectWithoutProperties';import o from'react-floater';import l
|
|
1
|
+
import t from'@babel/runtime/helpers/esm/objectSpread2';import e from'@babel/runtime/helpers/esm/objectWithoutProperties';import o from'react-floater';import{mergeDeepRight as l}from'ramda';import{tooltipStyles as s,tooltipDisplayBlockStyles as i,tooltipStylesRounend as r}from'./tooltip-styles.js';import{jsx as p}from'react/jsx-runtime';var a=["children","styles"];function n(i){var{children:r,styles:n={}}=i,m=e(i,a);var c=l(s||{},n);return p(o,t(t({styles:c},m),{},{children:r}))}n.defaultProps={autoOpen:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:'click',eventDelay:.4,offset:15,placement:'bottom',showCloseButton:!1,styles:s,target:null,wrapperOptions:{position:!1},component:null},n.themes={tooltipStyles:s,tooltipDisplayBlockStyles:i,tooltipStylesRounend:r},n.displayName='Tooltip';export{n as Tooltip};
|
|
2
2
|
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import Floater from 'react-floater'\nimport mergeDeepRight from 'ramda
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import Floater from 'react-floater'\nimport { mergeDeepRight } from 'ramda'\nimport { tooltipStyles, tooltipStylesRounend, tooltipDisplayBlockStyles } from './tooltip-styles'\n\nTooltip.defaultProps = {\n autoOpen: false,\n disableAnimation: false,\n disableFlip: false,\n disableHoverToClick: false,\n event: 'click',\n eventDelay: 0.4,\n offset: 15,\n placement: 'bottom',\n showCloseButton: false,\n styles: tooltipStyles,\n target: null,\n wrapperOptions: {\n position: false,\n },\n component: null,\n}\n\nTooltip.themes = {\n tooltipStyles,\n tooltipDisplayBlockStyles,\n tooltipStylesRounend,\n}\n\nTooltip.displayName = 'Tooltip'\n\ntype FloaterProps = Parameters<typeof Floater>[0]\n\nexport type TooltipProps = FloaterProps\n\n/**\n * Основан на [react-floater](https://github.com/gilbarbara/react-floater).\n */\nexport function Tooltip({ children, styles = {}, ...props }: TooltipProps) {\n const tooltipStyle = mergeDeepRight(tooltipStyles || {}, styles) as TooltipProps['styles']\n\n return (\n <Floater styles={tooltipStyle} {...props}>\n {children}\n </Floater>\n )\n}\n"],"names":["Tooltip","_ref","children","styles","props","_objectWithoutProperties","_excluded","tooltipStyle","mergeDeepRight","tooltipStyles","_jsx","Floater","_objectSpread","defaultProps","autoOpen","disableAnimation","disableFlip","disableHoverToClick","event","eventDelay","offset","placement","showCloseButton","target","wrapperOptions","position","component","themes","tooltipDisplayBlockStyles","tooltipStylesRounend","displayName"],"mappings":"+WAqCO,SAASA,EAA2DC,GAAA,IAAnDC,SAAEA,EAAFC,OAAYA,EAAS,IAA8BF,EAAvBG,EAAuBC,EAAAJ,EAAAK,GACzE,IAAMC,EAAeC,EAAeC,GAAiB,GAAIN,GAEzD,OACEO,EAACC,EAADC,EAAAA,EAAA,CAAST,OAAQI,GAAkBH,GAAnC,GAAA,CAAAF,SACGA,KAtCPF,EAAQa,aAAe,CACrBC,UAAAA,EACAC,kBAAkB,EAClBC,eACAC,qBAAAA,EACAC,MAAO,QACPC,WAAY,GACZC,OAAQ,GACRC,UAAW,SACXC,mBACAnB,OAAQM,EACRc,OAAQ,KACRC,eAAgB,CACdC,UAAAA,GAEFC,UAAW,MAGb1B,EAAQ2B,OAAS,CACflB,cAAAA,EACAmB,0BAAAA,EACAC,qBAAAA,GAGF7B,EAAQ8B,YAAc"}
|