@foxford/ui 2.0.0-beta-5ae66b6-20220706 → 2.0.0-beta-d2ba84e-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/Amount/Amount.js +1 -1
- package/components/Amount/Amount.js.map +1 -1
- package/components/Anchor/Anchor.js +1 -1
- package/components/Anchor/Anchor.js.map +1 -1
- package/components/Arrow/Arrow.js +1 -1
- package/components/Arrow/Arrow.js.map +1 -1
- package/components/Avatar/Avatar.js +1 -1
- package/components/Avatar/Avatar.js.map +1 -1
- package/components/Badge/Badge.js +1 -1
- package/components/Badge/Badge.js.map +1 -1
- package/components/Button/Button.js +1 -1
- package/components/Button/Button.js.map +1 -1
- package/components/Checkbox/Checkbox.js +1 -1
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/Group.js +1 -1
- package/components/Checkbox/Group.js.map +1 -1
- package/components/Checkbox/style.js +1 -1
- package/components/Checkbox/style.js.map +1 -1
- package/components/Container/Container.js +1 -1
- package/components/Container/Container.js.map +1 -1
- package/components/Container/style.js +1 -1
- package/components/Container/style.js.map +1 -1
- package/components/ContextMenu/ContextMenu.js +1 -1
- package/components/ContextMenu/ContextMenu.js.map +1 -1
- package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.js +1 -1
- package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.js.map +1 -1
- package/components/Input/Input.js +1 -1
- package/components/Input/Input.js.map +1 -1
- package/components/Input.Phone/Input.Phone.js +1 -1
- package/components/Input.Phone/Input.Phone.js.map +1 -1
- package/components/Modal/adapter.js +1 -1
- package/components/Modal/adapter.js.map +1 -1
- package/components/Paper/Paper.js +1 -1
- package/components/Paper/Paper.js.map +1 -1
- package/components/Radio/Group.js +1 -1
- package/components/Radio/Group.js.map +1 -1
- package/components/Radio/Radio.js +1 -1
- package/components/Radio/Radio.js.map +1 -1
- package/components/Radio/style.js +1 -1
- package/components/Radio/style.js.map +1 -1
- package/components/Scrollable/Scrollable.js +1 -1
- package/components/Scrollable/Scrollable.js.map +1 -1
- package/components/Section/Section.js +1 -1
- package/components/Section/Section.js.map +1 -1
- package/components/Select/Select.js +1 -1
- package/components/Select/Select.js.map +1 -1
- package/components/Separator/Separator.js +1 -1
- package/components/Separator/Separator.js.map +1 -1
- package/components/Separator/SeparatorText.js +1 -1
- package/components/Separator/SeparatorText.js.map +1 -1
- package/components/Spacer/Spacer.js +1 -1
- package/components/Spacer/Spacer.js.map +1 -1
- package/components/Spinner/Spinner.js +1 -1
- package/components/Spinner/Spinner.js.map +1 -1
- package/components/Switcher/Switcher.js +1 -1
- package/components/Switcher/Switcher.js.map +1 -1
- package/components/Tabs/Tab.js +1 -1
- package/components/Tabs/Tab.js.map +1 -1
- package/components/Tag/Tag.js +1 -1
- package/components/Tag/Tag.js.map +1 -1
- package/components/Text.Ellipse/Text.Ellipse.js +1 -1
- package/components/Text.Ellipse/Text.Ellipse.js.map +1 -1
- package/components/Text.Heading/Text.Heading.js +1 -1
- package/components/Text.Heading/Text.Heading.js.map +1 -1
- package/components/Textarea/Textarea.js +1 -1
- package/components/Textarea/Textarea.js.map +1 -1
- package/components/Tooltip/Tooltip.js +1 -1
- package/components/Tooltip/Tooltip.js.map +1 -1
- package/components/Tooltip/tooltip-styles.js +1 -1
- package/components/Tooltip/tooltip-styles.js.map +1 -1
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/mixins/shared.js +1 -1
- package/mixins/shared.js.map +1 -1
- package/package.json +1 -1
- package/theme/index.js +1 -1
- package/theme/index.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.Ellipse.js","sources":["../../../../src/components/Text.Ellipse/Text.Ellipse.tsx"],"sourcesContent":["import { Component } from 'react'\nimport { Spacer } from '../Spacer/Spacer'\nimport { Anchor } from '../Anchor/Anchor'\nimport { Text, TextProps } from '../Text'\nimport * as Styled from './style'\n\nexport interface TextEllipseProps extends Omit<TextProps, 'content'> {\n /** Toggle text for folded state */\n moreText?: string\n /** Toggle text for unfolded state */\n lessText?: string\n /** Classname */\n className?: string\n /** Html content */\n content: string | string[]\n /** Characters quantity for ellipsed text */\n chars?: number\n /** Wrap text in quotes */\n quoted?: boolean\n /** Flag to show toggler */\n showToggler?: boolean\n}\n\ninterface TextEllipseState {\n isUnFolded: boolean\n isEllipsed: boolean\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n */\nexport class TextEllipse extends Component<TextEllipseProps, TextEllipseState> {\n static displayName = 'Text.Ellipse'\n\n constructor(props: TextEllipseProps) {\n super(props)\n\n this.state = {\n isUnFolded: false,\n isEllipsed: false,\n }\n }\n\n // componentDidUpdate({ content }: Props) {\n // if (content !== this.props.content && this.state.isUnFolded) {\n // this.toggle()\n // }\n // }\n\n getContent = (props: Omit<TextEllipseProps, 'className' | 'moreText' | 'lessText' | 'showToggler'>) => {\n const { content, chars = 0 } = this.props\n\n if (!content) return ''\n\n let { isEllipsed } = this.state\n let text: string | string[] = typeof content === 'string' ? '' : []\n\n if (!this.state.isUnFolded) {\n if (typeof text === 'string') {\n isEllipsed = content.length > chars\n\n text = isEllipsed ? `${content.slice(0, chars)}...` : content\n } else {\n let leftChars = chars\n\n for (let index = 0; index < content.length; index++) {\n if (leftChars - content[index].length > 0) {\n leftChars -= content[index].length\n\n text[index] = content[index]\n } else {\n isEllipsed = true\n text[index] = `${content[index].slice(0, leftChars)}...`\n\n break\n }\n }\n }\n } else {\n text = content\n }\n\n if (this.state.isEllipsed !== isEllipsed) setTimeout(() => this.setState({ isEllipsed }))\n\n return typeof text === 'string' ? (\n <Text {...props} content={this.getQuted(text)} />\n ) : (\n <Styled.Ul>\n {text.map((item, index) => (\n <Styled.Li key={index}>\n <Text {...props} display='inline' content={item} />\n </Styled.Li>\n ))}\n </Styled.Ul>\n )\n }\n\n getQuted = (content: string) => (this.props.quoted ? `«${content}»` : content)\n\n toggle = () => {\n console.log(this.state)\n this.setState({ isUnFolded: !this.state.isUnFolded })\n }\n\n render() {\n const {\n className = '',\n style,\n moreText = 'Читать полностью',\n lessText = 'Свернуть',\n showToggler = true,\n ...restProps\n } = this.props\n const { isUnFolded, isEllipsed } = this.state\n\n return (\n <div className={className} style={style}>\n {this.getContent(restProps)}\n {showToggler && isEllipsed && (\n <Spacer marginTop={16} marginBottom={1}>\n <Anchor pseudo onClick={this.toggle}>\n {isUnFolded ? lessText : moreText}\n </Anchor>\n </Spacer>\n )}\n </div>\n )\n }\n}\n"],"names":["TextEllipse","Component","constructor","props","super","this","getContent","content","chars","isEllipsed","state","text","isUnFolded","length","slice","leftChars","index","concat","setTimeout","setState","_jsx","Text","getQuted","Styled.Ul","children","map","item","Styled.Li","_objectSpread","display","quoted","toggle","console","log","render","_this$props","className","style","moreText","lessText","showToggler","restProps","_objectWithoutProperties","_excluded","_jsxs","Spacer","marginTop","marginBottom","Anchor","pseudo","onClick","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.Ellipse.js","sources":["../../../../src/components/Text.Ellipse/Text.Ellipse.tsx"],"sourcesContent":["import { Component } from 'react'\nimport { Spacer } from '../Spacer/Spacer'\nimport { Anchor } from '../Anchor/Anchor'\nimport { Text, TextProps } from '../Text'\nimport * as Styled from './style'\n\nexport interface TextEllipseProps extends Omit<TextProps, 'content'> {\n /** Toggle text for folded state */\n moreText?: string\n /** Toggle text for unfolded state */\n lessText?: string\n /** Classname */\n className?: string\n /** Html content */\n content: string | string[]\n /** Characters quantity for ellipsed text */\n chars?: number\n /** Wrap text in quotes */\n quoted?: boolean\n /** Flag to show toggler */\n showToggler?: boolean\n}\n\ninterface TextEllipseState {\n isUnFolded: boolean\n isEllipsed: boolean\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n */\nexport class TextEllipse extends Component<TextEllipseProps, TextEllipseState> {\n static displayName = 'Text.Ellipse'\n\n constructor(props: TextEllipseProps) {\n super(props)\n\n this.state = {\n isUnFolded: false,\n isEllipsed: false,\n }\n }\n\n // componentDidUpdate({ content }: Props) {\n // if (content !== this.props.content && this.state.isUnFolded) {\n // this.toggle()\n // }\n // }\n\n getContent = (props: Omit<TextEllipseProps, 'className' | 'moreText' | 'lessText' | 'showToggler'>) => {\n const { content, chars = 0 } = this.props\n\n if (!content) return ''\n\n let { isEllipsed } = this.state\n let text: string | string[] = typeof content === 'string' ? '' : []\n\n if (!this.state.isUnFolded) {\n if (typeof text === 'string') {\n isEllipsed = content.length > chars\n\n text = isEllipsed ? `${content.slice(0, chars)}...` : content\n } else {\n let leftChars = chars\n\n for (let index = 0; index < content.length; index++) {\n if (leftChars - content[index].length > 0) {\n leftChars -= content[index].length\n\n text[index] = content[index]\n } else {\n isEllipsed = true\n text[index] = `${content[index].slice(0, leftChars)}...`\n\n break\n }\n }\n }\n } else {\n text = content\n }\n\n if (this.state.isEllipsed !== isEllipsed) setTimeout(() => this.setState({ isEllipsed }))\n\n return typeof text === 'string' ? (\n <Text {...props} content={this.getQuted(text)} />\n ) : (\n <Styled.Ul>\n {text.map((item, index) => (\n <Styled.Li key={index}>\n <Text {...props} display='inline' content={item} />\n </Styled.Li>\n ))}\n </Styled.Ul>\n )\n }\n\n getQuted = (content: string) => (this.props.quoted ? `«${content}»` : content)\n\n toggle = () => {\n console.log(this.state)\n this.setState({ isUnFolded: !this.state.isUnFolded })\n }\n\n render() {\n const {\n className = '',\n style,\n moreText = 'Читать полностью',\n lessText = 'Свернуть',\n showToggler = true,\n ...restProps\n } = this.props\n const { isUnFolded, isEllipsed } = this.state\n\n return (\n <div className={className} style={style}>\n {this.getContent(restProps)}\n {showToggler && isEllipsed && (\n <Spacer marginTop={16} marginBottom={1}>\n <Anchor pseudo onClick={this.toggle}>\n {isUnFolded ? lessText : moreText}\n </Anchor>\n </Spacer>\n )}\n </div>\n )\n }\n}\n"],"names":["TextEllipse","Component","constructor","props","super","this","getContent","content","chars","isEllipsed","state","text","isUnFolded","length","slice","leftChars","index","concat","setTimeout","setState","_jsx","Text","getQuted","Styled.Ul","children","map","item","Styled.Li","_objectSpread","display","quoted","toggle","console","log","render","_this$props","className","style","moreText","lessText","showToggler","restProps","_objectWithoutProperties","_excluded","_jsxs","Spacer","marginTop","marginBottom","Anchor","pseudo","onClick","displayName"],"mappings":"+aAmCO,MAAMA,UAAoBC,EAG/BC,YAAYC,GACVC,MAAMD,GAD6BE,KAerCC,WAAcH,IACZ,IAAMI,QAAEA,EAAFC,MAAWA,EAAQ,GAAMH,KAAKF,MAEpC,IAAKI,EAAS,MAAO,GAErB,IAAIE,WAAEA,GAAeJ,KAAKK,MAC1B,IAAIC,EAA6C,iBAAZJ,EAAuB,GAAK,GAEjE,GAAKF,KAAKK,MAAME,WAsBdD,EAAOJ,OArBP,GAAoB,iBAATI,EAGTA,GAFAF,EAAaF,EAAQM,OAASL,GAEPD,GAAAA,OAAAA,EAAQO,MAAM,EAAGN,GAAvB,OAAqCD,MACjD,CACL,IAAIQ,EAAYP,EAEhB,IAAK,IAAIQ,EAAQ,EAAGA,EAAQT,EAAQM,OAAQG,IAAS,CACnD,KAAID,EAAYR,EAAQS,GAAOH,OAAS,GAIjC,CACLJ,GAAAA,EACAE,EAAKK,GAAL,GAAAC,OAAiBV,EAAQS,GAAOF,MAAM,EAAGC,GAAzC,OAEA,MAPAA,GAAaR,EAAQS,GAAOH,OAE5BF,EAAKK,GAAST,EAAQS,IAe9B,OAFIX,KAAKK,MAAMD,aAAeA,GAAYS,YAAAA,IAAiBb,KAAKc,SAAS,CAAEV,WAAAA,MAEpD,iBAATE,EACZS,EAACC,SAASlB,GAAV,GAAA,CAAiBI,QAASF,KAAKiB,SAASX,MAExCS,EAACG,EAAD,CAAAC,SACGb,EAAKc,KAAAA,CAAKC,EAAMV,IACfI,EAACO,EAAD,CAAAH,SACEJ,EAACC,EAADO,EAAAA,EAAA,GAAUzB,GAAV,GAAA,CAAiB0B,QAAQ,SAAStB,QAASmB,MAD7BV,QAvDaX,KA+DrCiB,SAAYf,GAAqBF,KAAKF,MAAM2B,OAAX,IAAAb,OAAwBV,EAAxB,KAAqCA,EA/DjCF,KAiErC0B,OAAS,KACPC,QAAQC,IAAI5B,KAAKK,OACjBL,KAAKc,SAAS,CAAEP,YAAaP,KAAKK,MAAME,cAhExCP,KAAKK,MAAQ,CACXE,YAAAA,EACAH,YAAY,GAiEhByB,SACE,IAAAC,EAOI9B,KAAKF,OAPHiC,UACJA,EAAY,GADRC,MAEJA,EAFIC,SAGJA,EAAW,mBAHPC,SAIJA,EAAW,WAJPC,YAKJA,GAAc,GALhBL,EAMKM,EANLC,EAAAP,EAAAQ,GAQA,IAAM/B,WAAEA,EAAFH,WAAcA,GAAeJ,KAAKK,MAExC,OACEkC,EAAA,MAAA,CAAKR,UAAWA,EAAWC,MAAOA,EAAlCb,SACG,CAAAnB,KAAKC,WAAWmC,GAChBD,GAAe/B,GACdW,EAACyB,EAAD,CAAQC,UAAW,GAAIC,aAAc,EAArCvB,SACEJ,EAAC4B,EAAD,CAAQC,QAAAA,EAAOC,QAAS7C,KAAK0B,OAA7BP,SACGZ,EAAa2B,EAAWD,UA1F1BtC,EACJmD,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from'@babel/runtime/helpers/
|
|
1
|
+
import e from'@babel/runtime/helpers/objectSpread2';import i from'@babel/runtime/helpers/objectWithoutProperties';import{Text as t}from'../Text/Text.js';import{jsx as h}from'react/jsx-runtime';var r=["h"];var s;(e=>{e[e.h1=0]="h1",e[e.h2=1]="h2",e[e.h3=2]="h3",e[e.h4=3]="h4"})(s||(s={}));var o={h1:{size:44,sizeM:32,lineHeight:'s',weight:'bold'},h2:{size:32,sizeM:28,lineHeight:'s',weight:'bold'},h3:{size:28,lineHeight:'s',weight:'bold'},h4:{size:24,lineHeight:'s',weight:'bold'}};function a(s){var{h:a="h1"}=s,l=i(s,r);return h(t,e(e({as:a},o[a]),l))}a.displayName='Text.Heading';export{a as TextHeading};
|
|
2
2
|
//# sourceMappingURL=Text.Heading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.Heading.js","sources":["../../../../src/components/Text.Heading/Text.Heading.tsx"],"sourcesContent":["import { Text, TextProps } from '../Text'\n\n/* eslint-disable no-unused-vars */\nenum H {\n h1,\n h2,\n h3,\n h4,\n}\n/* eslint-enable no-unused-vars */\n\nconst PARAMS: Record<keyof typeof H, Partial<TextProps>> = {\n h1: {\n size: 44,\n sizeM: 32,\n lineHeight: 's',\n weight: 'bold',\n },\n h2: {\n size: 32,\n sizeM: 28,\n lineHeight: 's',\n weight: 'bold',\n },\n h3: {\n size: 28,\n lineHeight: 's',\n weight: 'bold',\n },\n h4: {\n size: 24,\n lineHeight: 's',\n weight: 'bold',\n },\n}\n\nexport interface TextHeadingProps extends Omit<TextProps, 'content' | 'as'> {\n h?: keyof typeof H\n /**\n * Children react node\n */\n children?: React.ReactNode\n}\n\nTextHeading.displayName = 'Text.Heading'\n\nexport function TextHeading({ h = 'h1', ...props }: TextHeadingProps) {\n const predefinedParams = PARAMS[h]\n\n return <Text as={h} {...predefinedParams} {...props} />\n}\n"],"names":["H","PARAMS","h1","size","sizeM","lineHeight","weight","h2","h3","h4","TextHeading","_ref","h","props","_objectWithoutProperties","_excluded","_jsx","Text","_objectSpread","as","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.Heading.js","sources":["../../../../src/components/Text.Heading/Text.Heading.tsx"],"sourcesContent":["import { Text, TextProps } from '../Text'\n\n/* eslint-disable no-unused-vars */\nenum H {\n h1,\n h2,\n h3,\n h4,\n}\n/* eslint-enable no-unused-vars */\n\nconst PARAMS: Record<keyof typeof H, Partial<TextProps>> = {\n h1: {\n size: 44,\n sizeM: 32,\n lineHeight: 's',\n weight: 'bold',\n },\n h2: {\n size: 32,\n sizeM: 28,\n lineHeight: 's',\n weight: 'bold',\n },\n h3: {\n size: 28,\n lineHeight: 's',\n weight: 'bold',\n },\n h4: {\n size: 24,\n lineHeight: 's',\n weight: 'bold',\n },\n}\n\nexport interface TextHeadingProps extends Omit<TextProps, 'content' | 'as'> {\n h?: keyof typeof H\n /**\n * Children react node\n */\n children?: React.ReactNode\n}\n\nTextHeading.displayName = 'Text.Heading'\n\nexport function TextHeading({ h = 'h1', ...props }: TextHeadingProps) {\n const predefinedParams = PARAMS[h]\n\n return <Text as={h} {...predefinedParams} {...props} />\n}\n"],"names":["H","PARAMS","h1","size","sizeM","lineHeight","weight","h2","h3","h4","TextHeading","_ref","h","props","_objectWithoutProperties","_excluded","_jsx","Text","_objectSpread","as","displayName"],"mappings":"iNAGKA,GAAAA,IAAAA,EAAAA,aAAAA,EAAAA,aAAAA,EAAAA,aAAAA,EAAAA,eAAAA,IAAAA,OAQL,IAAMC,EAAqD,CACzDC,GAAI,CACFC,KAAM,GACNC,MAAO,GACPC,WAAY,IACZC,OAAQ,QAEVC,GAAI,CACFJ,KAAM,GACNC,MAAO,GACPC,WAAY,IACZC,OAAQ,QAEVE,GAAI,CACFL,KAAM,GACNE,WAAY,IACZC,OAAQ,QAEVG,GAAI,CACFN,KAAM,GACNE,WAAY,IACZC,OAAQ,SAcL,SAASI,EAAsDC,GAAA,IAA1CC,EAAEA,EAAI,MAAoCD,EAA3BE,EAA2BC,EAAAH,EAAAI,GAGpE,OAAOC,EAACC,EAADC,EAAAA,EAAA,CAAMC,GAAIP,GAFQX,EAAOW,IAEcC,IALhDH,EAAYU,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from'@babel/runtime/helpers/
|
|
1
|
+
import e from'@babel/runtime/helpers/objectSpread2';import r from'@babel/runtime/helpers/objectWithoutProperties';import{useState as o,useCallback as a}from'react';import{Root as l}from'./style.js';import{jsx as t}from'react/jsx-runtime';var s=["cols","disabled","error","fluid","name","onChange","maxLength","placeholder","required","rounded","rows","tabIndex","value","className","style","children","autosize","maxRows","color","placeholderColor"];function n(n){var{cols:d,disabled:i,error:c,fluid:u,name:m,onChange:h,maxLength:p,placeholder:f,required:x,rounded:g,rows:b,tabIndex:v,value:C,className:w,style:y,children:j,autosize:R,maxRows:L,color:N,placeholderColor:T}=n,q=r(n,s);var[z,I]=o(b);var S=a((e=>{var{target:r}=e;if(r instanceof HTMLTextAreaElement&&R){var o=r.getBoundingClientRect();r.scrollHeight>o.height&&z<L?I(z+1):r.value&&''!==r.value||I(b)}'function'==typeof h&&h(e)}),[h,z,L,R]);return t(l,e(e({className:w,style:y,onChange:S,cols:d,disabled:i,maxLength:p,name:m,placeholder:f,required:x,rows:z,tabIndex:v,value:C,color:N,rounded:g,placeholderColor:T,fluid:u,error:c},q),{},{children:j}))}n.defaultProps={onChange:e=>console.log(e,e.target.value),rounded:!0,width:'l',color:'mineShaft',placeholderColor:'silver',cols:20,maxRows:30,rows:2,autosize:!0},n.displayName='Textarea';export{n as Textarea};
|
|
2
2
|
//# sourceMappingURL=Textarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","sources":["../../../../src/components/Textarea/Textarea.tsx"],"sourcesContent":["import { useCallback, useState } from 'react'\nimport { BaseProps, InputField } from '../../shared/interfaces'\nimport * as Styled from './style'\n\ntype TextAreaHTMLAttributes = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'cols' | 'rows' | 'color'>\n\nexport interface TextareaProps extends BaseProps, InputField, TextAreaHTMLAttributes {\n /**\n * Specifies the visible width of a text area\n */\n cols?: number\n /**\n * Specifies the visible number of lines in a text area\n */\n rows?: number\n /**\n * Specifies the visible max number of lines in a text area\n */\n maxRows?: number\n /**\n * Specifies the maximum number of characters allowed in the text area\n */\n maxLength?: number\n /**\n * On change handler\n */\n onChange?(_event: React.ChangeEvent<HTMLTextAreaElement>): void\n /**\n * Value\n */\n value?: string\n /**\n * Autosize for textarea\n */\n autosize?: boolean\n}\n\nTextarea.defaultProps = {\n onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => console.log(e, e.target.value), // eslint-disable-line no-console\n rounded: true,\n width: 'l',\n color: 'mineShaft',\n placeholderColor: 'silver',\n cols: 20,\n maxRows: 30,\n rows: 2,\n autosize: true,\n}\n\nTextarea.displayName = 'Textarea'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`InputField`](#/Миксины)\n * - `React.TextareaHTMLAttributes<HTMLTextAreaElement>`\n */\nexport function Textarea({\n cols,\n disabled,\n error,\n fluid,\n name,\n onChange,\n maxLength,\n placeholder,\n required,\n rounded,\n rows,\n tabIndex,\n value,\n className,\n style,\n children,\n autosize,\n maxRows,\n color,\n placeholderColor,\n ...props\n}: typeof Textarea.defaultProps & TextareaProps) {\n const [tRows, setRows] = useState(rows)\n\n const onChangeHandler: React.ChangeEventHandler<HTMLTextAreaElement> = useCallback(\n (event) => {\n const { target } = event\n\n if (target instanceof HTMLTextAreaElement && autosize) {\n const rect = target.getBoundingClientRect()\n\n if (target.scrollHeight > rect.height && tRows < maxRows) {\n setRows(tRows + 1)\n } else if (!target.value || target.value === '') {\n setRows(rows)\n }\n }\n\n if (typeof onChange === 'function') {\n onChange(event)\n }\n },\n [onChange, tRows, maxRows, autosize]\n )\n\n return (\n <Styled.Root\n className={className}\n style={style}\n onChange={onChangeHandler}\n cols={cols}\n disabled={disabled}\n maxLength={maxLength}\n name={name}\n placeholder={placeholder}\n required={required}\n rows={tRows}\n tabIndex={tabIndex}\n value={value}\n color={color}\n rounded={rounded}\n placeholderColor={placeholderColor}\n fluid={fluid}\n error={error}\n {...props}\n >\n {children}\n </Styled.Root>\n )\n}\n"],"names":["Textarea","_ref","cols","disabled","error","fluid","name","onChange","maxLength","placeholder","required","rounded","rows","tabIndex","value","className","style","children","autosize","maxRows","color","placeholderColor","props","_objectWithoutProperties","_excluded","tRows","setRows","useState","onChangeHandler","useCallback","event","target","HTMLTextAreaElement","rect","getBoundingClientRect","scrollHeight","height","_jsx","Styled.Root","_objectSpread","defaultProps","e","console","log","width","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Textarea.js","sources":["../../../../src/components/Textarea/Textarea.tsx"],"sourcesContent":["import { useCallback, useState } from 'react'\nimport { BaseProps, InputField } from '../../shared/interfaces'\nimport * as Styled from './style'\n\ntype TextAreaHTMLAttributes = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'cols' | 'rows' | 'color'>\n\nexport interface TextareaProps extends BaseProps, InputField, TextAreaHTMLAttributes {\n /**\n * Specifies the visible width of a text area\n */\n cols?: number\n /**\n * Specifies the visible number of lines in a text area\n */\n rows?: number\n /**\n * Specifies the visible max number of lines in a text area\n */\n maxRows?: number\n /**\n * Specifies the maximum number of characters allowed in the text area\n */\n maxLength?: number\n /**\n * On change handler\n */\n onChange?(_event: React.ChangeEvent<HTMLTextAreaElement>): void\n /**\n * Value\n */\n value?: string\n /**\n * Autosize for textarea\n */\n autosize?: boolean\n}\n\nTextarea.defaultProps = {\n onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => console.log(e, e.target.value), // eslint-disable-line no-console\n rounded: true,\n width: 'l',\n color: 'mineShaft',\n placeholderColor: 'silver',\n cols: 20,\n maxRows: 30,\n rows: 2,\n autosize: true,\n}\n\nTextarea.displayName = 'Textarea'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`InputField`](#/Миксины)\n * - `React.TextareaHTMLAttributes<HTMLTextAreaElement>`\n */\nexport function Textarea({\n cols,\n disabled,\n error,\n fluid,\n name,\n onChange,\n maxLength,\n placeholder,\n required,\n rounded,\n rows,\n tabIndex,\n value,\n className,\n style,\n children,\n autosize,\n maxRows,\n color,\n placeholderColor,\n ...props\n}: typeof Textarea.defaultProps & TextareaProps) {\n const [tRows, setRows] = useState(rows)\n\n const onChangeHandler: React.ChangeEventHandler<HTMLTextAreaElement> = useCallback(\n (event) => {\n const { target } = event\n\n if (target instanceof HTMLTextAreaElement && autosize) {\n const rect = target.getBoundingClientRect()\n\n if (target.scrollHeight > rect.height && tRows < maxRows) {\n setRows(tRows + 1)\n } else if (!target.value || target.value === '') {\n setRows(rows)\n }\n }\n\n if (typeof onChange === 'function') {\n onChange(event)\n }\n },\n [onChange, tRows, maxRows, autosize]\n )\n\n return (\n <Styled.Root\n className={className}\n style={style}\n onChange={onChangeHandler}\n cols={cols}\n disabled={disabled}\n maxLength={maxLength}\n name={name}\n placeholder={placeholder}\n required={required}\n rows={tRows}\n tabIndex={tabIndex}\n value={value}\n color={color}\n rounded={rounded}\n placeholderColor={placeholderColor}\n fluid={fluid}\n error={error}\n {...props}\n >\n {children}\n </Styled.Root>\n )\n}\n"],"names":["Textarea","_ref","cols","disabled","error","fluid","name","onChange","maxLength","placeholder","required","rounded","rows","tabIndex","value","className","style","children","autosize","maxRows","color","placeholderColor","props","_objectWithoutProperties","_excluded","tRows","setRows","useState","onChangeHandler","useCallback","event","target","HTMLTextAreaElement","rect","getBoundingClientRect","scrollHeight","height","_jsx","Styled.Root","_objectSpread","defaultProps","e","console","log","width","displayName"],"mappings":"kcAyDO,SAASA,EAsBiCC,GAAA,IAtBxBC,KACvBA,EADuBC,SAEvBA,EAFuBC,MAGvBA,EAHuBC,MAIvBA,EAJuBC,KAKvBA,EALuBC,SAMvBA,EANuBC,UAOvBA,EAPuBC,YAQvBA,EARuBC,SASvBA,EATuBC,QAUvBA,EAVuBC,KAWvBA,EAXuBC,SAYvBA,EAZuBC,MAavBA,EAbuBC,UAcvBA,EAduBC,MAevBA,EAfuBC,SAgBvBA,EAhBuBC,SAiBvBA,EAjBuBC,QAkBvBA,EAlBuBC,MAmBvBA,EAnBuBC,iBAoBvBA,GAE+CpB,EAD5CqB,EAC4CC,EAAAtB,EAAAuB,GAC/C,IAAOC,EAAOC,GAAWC,EAASf,GAElC,IAAMgB,EAAiEC,GACpEC,IACC,IAAMC,OAAEA,GAAWD,EAEnB,GAAIC,aAAkBC,qBAAuBd,EAAU,CACrD,IAAMe,EAAOF,EAAOG,wBAEhBH,EAAOI,aAAeF,EAAKG,QAAUX,EAAQN,EAC/CO,EAAQD,EAAQ,GACNM,EAAOjB,OAA0B,KAAjBiB,EAAOjB,OACjCY,EAAQd,GAIY,mBAAbL,GACTA,EAASuB,KAGb,CAACvB,EAAUkB,EAAON,EAASD,IAG7B,OACEmB,EAACC,EAADC,EAAAA,EAAA,CACExB,UAAWA,EACXC,MAAOA,EACPT,SAAUqB,EACV1B,KAAMA,EACNC,SAAUA,EACVK,UAAWA,EACXF,KAAMA,EACNG,YAAaA,EACbC,SAAUA,EACVE,KAAMa,EACNZ,SAAUA,EACVC,MAAOA,EACPM,MAAOA,EACPT,QAASA,EACTU,iBAAkBA,EAClBhB,MAAOA,EACPD,MAAOA,GACHkB,GAlBN,GAAA,CAAAL,SAoBGA,KAvFPjB,EAASwC,aAAe,CACtBjC,SAAWkC,GAA8CC,QAAQC,IAAIF,EAAGA,EAAEV,OAAOjB,OACjFH,WACAiC,MAAO,IACPxB,MAAO,YACPC,iBAAkB,SAClBnB,KAAM,GACNiB,QAAS,GACTP,KAAM,EACNM,UAAU,GAGZlB,EAAS6C,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from'@babel/runtime/helpers/
|
|
1
|
+
import t from'@babel/runtime/helpers/objectSpread2';import e from'@babel/runtime/helpers/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'\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":"
|
|
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":"uWAqCO,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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import i from'@babel/runtime/helpers/
|
|
1
|
+
import i from'@babel/runtime/helpers/objectSpread2';var o={wrapper:{display:'inline-flex',flexDirection:'column',zIndex:100},wrapperPosition:{left:-1e3,position:'absolute',top:-1e3,visibility:'hidden'},floater:{display:'inline-block',filter:'drop-shadow(0 6px 6px rgba(0, 0, 0, 0.2))',WebkitFilter:'drop-shadow(0 6px 6px rgba(0, 0, 0, 0.2))',maxWidth:300,opacity:0,position:'relative',transition:'opacity 0.2s',visibility:'hidden',zIndex:100},floaterOpening:{opacity:1,visibility:'visible'},floaterWithAnimation:{opacity:1,transition:'opacity 0.2s, transform 0.2s',visibility:'visible'},floaterClosing:{opacity:0,visibility:'visible'},floaterCentered:{left:'50%',position:'fixed',top:'50%',transform:'translate(-50%, -50%)'},container:{boxSizing:'border-box',borderRadius:3,backgroundColor:'#fff',color:'var(--mineShaft)',minHeight:32,minWidth:180,padding:'16px',position:'relative',display:'flex',flexDirection:'column',justifyContent:'center'},title:{borderBottom:'1px solid var(--mineShaft)',color:'var(--mineShaft)',fontWeight:'bold',fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:12,lineHeight:'16px'},close:{backgroundColor:'transparent',border:0,borderRadius:0,color:'var(--mineShaft)',fontSize:14,height:10,lineHeight:'16px',outline:'none',padding:0,position:'absolute',right:'4px',textAlign:'center',top:'4px',WebkitAppearance:'none',width:10},footer:{borderTop:'1px solid var(--mineShaft)',fontSize:13,marginTop:10,paddingTop:5},arrow:{color:'#fff',display:'inline-flex',length:6,position:'absolute',spread:12},options:{zIndex:100}};var t={wrapper:{cursor:'pointer',display:'inline-flex',flexDirection:'column',zIndex:100},wrapperPosition:{left:-1e3,position:'absolute',top:-1e3,visibility:'hidden'},floater:{display:'inline-block',filter:'drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.08))',WebkitFilter:'drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.08))',maxWidth:300,opacity:0,position:'relative',transition:'opacity 0.2s',visibility:'hidden',zIndex:100},floaterOpening:{opacity:1,visibility:'visible'},floaterWithAnimation:{opacity:1,transition:'opacity 0.2s, transform 0.2s',visibility:'visible'},floaterClosing:{opacity:0,visibility:'visible'},floaterCentered:{left:'50%',position:'fixed',top:'50%',transform:'translate(-50%, -50%)'},container:{boxSizing:'border-box',borderRadius:10,backgroundColor:'#fff',color:'var(--mineShaft)',minHeight:20,minWidth:58,padding:'2px 6px 1px',position:'relative',display:'flex',textAlign:'center',flexDirection:'column',justifyContent:'center'},title:{display:'block',color:'var(--mineShaft)',fontWeight:'bold',fontSize:'12px',lineHeight:'17px',marginBottom:0,paddingBottom:0,paddingRight:0,borderBottom:'none'},content:{fontSize:'12px',lineHeight:'17px',textDecoration:'none'},close:{backgroundColor:'transparent',border:0,borderRadius:0,color:'var(--mineShaft)',fontSize:14,height:10,lineHeight:'16px',outline:'none',padding:0,position:'absolute',right:'4px',textAlign:'center',top:'4px',WebkitAppearance:'none',width:10},footer:{borderTop:'1px solid var(--mineShaft)',fontSize:13,marginTop:10,paddingTop:5},arrow:{display:'none',length:0,position:'absolute',spread:0},options:{zIndex:100}};var e=i(i({},o),{},{wrapper:i(i({},o.wrapper),{},{display:'block'})});export{e as tooltipDisplayBlockStyles,o as tooltipStyles,t as tooltipStylesRounend};
|
|
2
2
|
//# sourceMappingURL=tooltip-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-styles.js","sources":["../../../../src/components/Tooltip/tooltip-styles.ts"],"sourcesContent":["import { TooltipProps } from './Tooltip'\n\nconst zIndex = 100\n\nexport const tooltipStyles: TooltipProps['styles'] = {\n wrapper: {\n display: 'inline-flex',\n flexDirection: 'column',\n zIndex,\n },\n wrapperPosition: {\n left: -1000,\n position: 'absolute',\n top: -1000,\n visibility: 'hidden',\n },\n floater: {\n display: 'inline-block',\n filter: 'drop-shadow(0 6px 6px rgba(0, 0, 0, 0.2))',\n WebkitFilter: 'drop-shadow(0 6px 6px rgba(0, 0, 0, 0.2))',\n maxWidth: 300,\n opacity: 0,\n position: 'relative',\n transition: 'opacity 0.2s',\n visibility: 'hidden',\n zIndex: 100,\n },\n floaterOpening: {\n opacity: 1,\n visibility: 'visible',\n },\n floaterWithAnimation: {\n opacity: 1,\n transition: 'opacity 0.2s, transform 0.2s',\n visibility: 'visible',\n },\n floaterClosing: {\n opacity: 0,\n visibility: 'visible',\n },\n floaterCentered: {\n left: '50%',\n position: 'fixed',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n },\n container: {\n boxSizing: 'border-box',\n borderRadius: 3,\n backgroundColor: '#fff',\n color: 'var(--mineShaft)',\n minHeight: 32,\n minWidth: 180,\n padding: '16px',\n position: 'relative',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n },\n title: {\n borderBottom: '1px solid var(--mineShaft)',\n color: 'var(--mineShaft)',\n fontWeight: 'bold',\n fontSize: 18,\n marginBottom: 5,\n paddingBottom: 6,\n paddingRight: 18,\n },\n content: {\n fontSize: 12,\n lineHeight: '16px',\n },\n close: {\n backgroundColor: 'transparent',\n border: 0,\n borderRadius: 0,\n color: 'var(--mineShaft)',\n fontSize: 14,\n height: 10,\n lineHeight: '16px',\n outline: 'none',\n padding: 0,\n position: 'absolute',\n right: '4px',\n textAlign: 'center',\n top: '4px',\n WebkitAppearance: 'none',\n width: 10,\n },\n footer: {\n borderTop: '1px solid var(--mineShaft)',\n fontSize: 13,\n marginTop: 10,\n paddingTop: 5,\n },\n arrow: {\n color: '#fff',\n display: 'inline-flex',\n length: 6,\n position: 'absolute',\n spread: 12,\n },\n options: {\n zIndex,\n },\n}\n\nexport const tooltipStylesRounend: TooltipProps['styles'] = {\n wrapper: {\n cursor: 'pointer',\n display: 'inline-flex',\n flexDirection: 'column',\n zIndex,\n },\n wrapperPosition: {\n left: -1000,\n position: 'absolute',\n top: -1000,\n visibility: 'hidden',\n },\n floater: {\n display: 'inline-block',\n filter: 'drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.08))',\n WebkitFilter: 'drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.08))',\n maxWidth: 300,\n opacity: 0,\n position: 'relative',\n transition: 'opacity 0.2s',\n visibility: 'hidden',\n zIndex: 100,\n },\n floaterOpening: {\n opacity: 1,\n visibility: 'visible',\n },\n floaterWithAnimation: {\n opacity: 1,\n transition: 'opacity 0.2s, transform 0.2s',\n visibility: 'visible',\n },\n floaterClosing: {\n opacity: 0,\n visibility: 'visible',\n },\n floaterCentered: {\n left: '50%',\n position: 'fixed',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n },\n container: {\n boxSizing: 'border-box',\n borderRadius: 10,\n backgroundColor: '#fff',\n color: 'var(--mineShaft)',\n minHeight: 20,\n minWidth: 58,\n padding: '2px 6px 1px',\n position: 'relative',\n display: 'flex',\n textAlign: 'center',\n flexDirection: 'column',\n justifyContent: 'center',\n },\n title: {\n display: 'block',\n color: 'var(--mineShaft)',\n fontWeight: 'bold',\n fontSize: '12px',\n lineHeight: '17px',\n marginBottom: 0,\n paddingBottom: 0,\n paddingRight: 0,\n borderBottom: 'none',\n },\n content: {\n fontSize: '12px',\n lineHeight: '17px',\n textDecoration: 'none',\n },\n close: {\n backgroundColor: 'transparent',\n border: 0,\n borderRadius: 0,\n color: 'var(--mineShaft)',\n fontSize: 14,\n height: 10,\n lineHeight: '16px',\n outline: 'none',\n padding: 0,\n position: 'absolute',\n right: '4px',\n textAlign: 'center',\n top: '4px',\n WebkitAppearance: 'none',\n width: 10,\n },\n footer: {\n borderTop: '1px solid var(--mineShaft)',\n fontSize: 13,\n marginTop: 10,\n paddingTop: 5,\n },\n arrow: {\n display: 'none',\n length: 0,\n position: 'absolute',\n spread: 0,\n },\n options: {\n zIndex,\n },\n}\n\nexport const tooltipDisplayBlockStyles: TooltipProps['styles'] = {\n ...tooltipStyles,\n wrapper: {\n ...tooltipStyles.wrapper,\n display: 'block',\n },\n}\n"],"names":["tooltipStyles","wrapper","display","flexDirection","zIndex","wrapperPosition","left","position","top","visibility","floater","filter","WebkitFilter","maxWidth","opacity","transition","floaterOpening","floaterWithAnimation","floaterClosing","floaterCentered","transform","container","boxSizing","borderRadius","backgroundColor","color","minHeight","minWidth","padding","justifyContent","title","borderBottom","fontWeight","fontSize","marginBottom","paddingBottom","paddingRight","content","lineHeight","close","border","height","outline","right","textAlign","WebkitAppearance","width","footer","borderTop","marginTop","paddingTop","arrow","length","spread","options","tooltipStylesRounend","cursor","textDecoration","tooltipDisplayBlockStyles","_objectSpread"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip-styles.js","sources":["../../../../src/components/Tooltip/tooltip-styles.ts"],"sourcesContent":["import { TooltipProps } from './Tooltip'\n\nconst zIndex = 100\n\nexport const tooltipStyles: TooltipProps['styles'] = {\n wrapper: {\n display: 'inline-flex',\n flexDirection: 'column',\n zIndex,\n },\n wrapperPosition: {\n left: -1000,\n position: 'absolute',\n top: -1000,\n visibility: 'hidden',\n },\n floater: {\n display: 'inline-block',\n filter: 'drop-shadow(0 6px 6px rgba(0, 0, 0, 0.2))',\n WebkitFilter: 'drop-shadow(0 6px 6px rgba(0, 0, 0, 0.2))',\n maxWidth: 300,\n opacity: 0,\n position: 'relative',\n transition: 'opacity 0.2s',\n visibility: 'hidden',\n zIndex: 100,\n },\n floaterOpening: {\n opacity: 1,\n visibility: 'visible',\n },\n floaterWithAnimation: {\n opacity: 1,\n transition: 'opacity 0.2s, transform 0.2s',\n visibility: 'visible',\n },\n floaterClosing: {\n opacity: 0,\n visibility: 'visible',\n },\n floaterCentered: {\n left: '50%',\n position: 'fixed',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n },\n container: {\n boxSizing: 'border-box',\n borderRadius: 3,\n backgroundColor: '#fff',\n color: 'var(--mineShaft)',\n minHeight: 32,\n minWidth: 180,\n padding: '16px',\n position: 'relative',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n },\n title: {\n borderBottom: '1px solid var(--mineShaft)',\n color: 'var(--mineShaft)',\n fontWeight: 'bold',\n fontSize: 18,\n marginBottom: 5,\n paddingBottom: 6,\n paddingRight: 18,\n },\n content: {\n fontSize: 12,\n lineHeight: '16px',\n },\n close: {\n backgroundColor: 'transparent',\n border: 0,\n borderRadius: 0,\n color: 'var(--mineShaft)',\n fontSize: 14,\n height: 10,\n lineHeight: '16px',\n outline: 'none',\n padding: 0,\n position: 'absolute',\n right: '4px',\n textAlign: 'center',\n top: '4px',\n WebkitAppearance: 'none',\n width: 10,\n },\n footer: {\n borderTop: '1px solid var(--mineShaft)',\n fontSize: 13,\n marginTop: 10,\n paddingTop: 5,\n },\n arrow: {\n color: '#fff',\n display: 'inline-flex',\n length: 6,\n position: 'absolute',\n spread: 12,\n },\n options: {\n zIndex,\n },\n}\n\nexport const tooltipStylesRounend: TooltipProps['styles'] = {\n wrapper: {\n cursor: 'pointer',\n display: 'inline-flex',\n flexDirection: 'column',\n zIndex,\n },\n wrapperPosition: {\n left: -1000,\n position: 'absolute',\n top: -1000,\n visibility: 'hidden',\n },\n floater: {\n display: 'inline-block',\n filter: 'drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.08))',\n WebkitFilter: 'drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.08))',\n maxWidth: 300,\n opacity: 0,\n position: 'relative',\n transition: 'opacity 0.2s',\n visibility: 'hidden',\n zIndex: 100,\n },\n floaterOpening: {\n opacity: 1,\n visibility: 'visible',\n },\n floaterWithAnimation: {\n opacity: 1,\n transition: 'opacity 0.2s, transform 0.2s',\n visibility: 'visible',\n },\n floaterClosing: {\n opacity: 0,\n visibility: 'visible',\n },\n floaterCentered: {\n left: '50%',\n position: 'fixed',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n },\n container: {\n boxSizing: 'border-box',\n borderRadius: 10,\n backgroundColor: '#fff',\n color: 'var(--mineShaft)',\n minHeight: 20,\n minWidth: 58,\n padding: '2px 6px 1px',\n position: 'relative',\n display: 'flex',\n textAlign: 'center',\n flexDirection: 'column',\n justifyContent: 'center',\n },\n title: {\n display: 'block',\n color: 'var(--mineShaft)',\n fontWeight: 'bold',\n fontSize: '12px',\n lineHeight: '17px',\n marginBottom: 0,\n paddingBottom: 0,\n paddingRight: 0,\n borderBottom: 'none',\n },\n content: {\n fontSize: '12px',\n lineHeight: '17px',\n textDecoration: 'none',\n },\n close: {\n backgroundColor: 'transparent',\n border: 0,\n borderRadius: 0,\n color: 'var(--mineShaft)',\n fontSize: 14,\n height: 10,\n lineHeight: '16px',\n outline: 'none',\n padding: 0,\n position: 'absolute',\n right: '4px',\n textAlign: 'center',\n top: '4px',\n WebkitAppearance: 'none',\n width: 10,\n },\n footer: {\n borderTop: '1px solid var(--mineShaft)',\n fontSize: 13,\n marginTop: 10,\n paddingTop: 5,\n },\n arrow: {\n display: 'none',\n length: 0,\n position: 'absolute',\n spread: 0,\n },\n options: {\n zIndex,\n },\n}\n\nexport const tooltipDisplayBlockStyles: TooltipProps['styles'] = {\n ...tooltipStyles,\n wrapper: {\n ...tooltipStyles.wrapper,\n display: 'block',\n },\n}\n"],"names":["tooltipStyles","wrapper","display","flexDirection","zIndex","wrapperPosition","left","position","top","visibility","floater","filter","WebkitFilter","maxWidth","opacity","transition","floaterOpening","floaterWithAnimation","floaterClosing","floaterCentered","transform","container","boxSizing","borderRadius","backgroundColor","color","minHeight","minWidth","padding","justifyContent","title","borderBottom","fontWeight","fontSize","marginBottom","paddingBottom","paddingRight","content","lineHeight","close","border","height","outline","right","textAlign","WebkitAppearance","width","footer","borderTop","marginTop","paddingTop","arrow","length","spread","options","tooltipStylesRounend","cursor","textDecoration","tooltipDisplayBlockStyles","_objectSpread"],"mappings":"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"}
|