@storybook/components 6.5.6 → 6.5.8-alpha.0
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/dist/cjs/{Color-90d9da2c.js → Color-d3116a31.js} +1 -1
- package/dist/cjs/{OverlayScrollbars-82979310.js → OverlayScrollbars-b655a091.js} +1 -1
- package/dist/cjs/{WithTooltip-60d59c62.js → WithTooltip-aa7ec521.js} +1 -1
- package/dist/cjs/{formatter-adb74648.js → formatter-42139f42.js} +1 -1
- package/dist/cjs/{index-97a2a5a9.js → index-82acc4b4.js} +9 -9
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{syntaxhighlighter-bc65a250.js → syntaxhighlighter-3f6db113.js} +1 -1
- package/dist/esm/{Color-01c31ae2.js → Color-e9687cd5.js} +1 -1
- package/dist/esm/{OverlayScrollbars-9b821cbe.js → OverlayScrollbars-d54f9566.js} +1 -1
- package/dist/esm/{WithTooltip-2fc4c925.js → WithTooltip-5d9955be.js} +1 -1
- package/dist/esm/{formatter-9bb0ae57.js → formatter-c2d2643c.js} +1 -1
- package/dist/esm/{index-3ae04fda.js → index-f6d446d8.js} +11 -11
- package/dist/esm/index.js +1 -1
- package/dist/esm/{syntaxhighlighter-b09267a2.js → syntaxhighlighter-75381027.js} +1 -1
- package/dist/modern/{Color-adcd690c.js → Color-31c3091f.js} +1 -1
- package/dist/modern/{OverlayScrollbars-2dbee1e7.js → OverlayScrollbars-0d0d9ac6.js} +1 -1
- package/dist/modern/{WithTooltip-e676f2b3.js → WithTooltip-c478b6c7.js} +1 -1
- package/dist/modern/{formatter-409edac5.js → formatter-781ca345.js} +1 -1
- package/dist/modern/{index-377367fa.js → index-4e034b71.js} +10 -10
- package/dist/modern/index.js +1 -1
- package/dist/modern/{syntaxhighlighter-a425409f.js → syntaxhighlighter-848db87b.js} +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';require("core-js/modules/es.typed-array.set.js");var index=require('./index-
|
|
1
|
+
'use strict';require("core-js/modules/es.typed-array.set.js");var index=require('./index-82acc4b4.js');require('react');require('@storybook/theming');require('@storybook/csf');require('qs');require('@storybook/client-logger');var parserHtml={exports:{}};(function(module,exports){!function(e,t){module.exports=t();}(index.commonjsGlobal,function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof index.commonjsGlobal?index.commonjsGlobal:"undefined"!=typeof self?self:{};function t(e){var t={exports:{}};return e(t,t.exports),t.exports;}var r=t(function(e,t){function r(e){return t.$0<=e&&e<=t.$9;}/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright Google Inc. All Rights Reserved.
|
|
4
4
|
*
|
|
@@ -294,8 +294,8 @@ var curriedOpacify=/*#__PURE__*/curry/* ::<number | string, string, string> */(o
|
|
|
294
294
|
* background: "rgba(255,0,0,0.3)";
|
|
295
295
|
* }
|
|
296
296
|
*/function transparentize(amount,color){if(color==='transparent')return color;var parsedColor=parseToRgb(color);var alpha=typeof parsedColor.alpha==='number'?parsedColor.alpha:1;var colorWithAlpha=_extends$1({},parsedColor,{alpha:guard(0,1,+(alpha*100-parseFloat(amount)*100).toFixed(2)/100)});return rgba(colorWithAlpha);}// prettier-ignore
|
|
297
|
-
var curriedTransparentize=/*#__PURE__*/curry/* ::<number | string, string, string> */(transparentize);var curriedTransparentize$1=curriedTransparentize;const headerCommon=({theme})=>({margin:'20px 0 8px',padding:0,cursor:'text',position:'relative',color:theme.color.defaultText,'&:first-of-type':{marginTop:0,paddingTop:0},'&:hover a.anchor':{textDecoration:'none'},'& tt, & code':{fontSize:'inherit'}});const codeCommon=({theme})=>({lineHeight:1,margin:'0 2px',padding:'3px 5px',whiteSpace:'nowrap',borderRadius:3,fontSize:theme.typography.size.s2-1,border:theme.base==='light'?`1px solid ${theme.color.mediumlight}`:`1px solid ${theme.color.darker}`,color:theme.base==='light'?curriedTransparentize$1(0.1,theme.color.defaultText):curriedTransparentize$1(0.3,theme.color.defaultText),backgroundColor:theme.base==='light'?theme.color.lighter:theme.color.border});const withReset=({theme})=>({fontFamily:theme.typography.fonts.base,fontSize:theme.typography.size.s3,margin:0,WebkitFontSmoothing:'antialiased',MozOsxFontSmoothing:'grayscale',WebkitTapHighlightColor:'rgba(0, 0, 0, 0)',WebkitOverflowScrolling:'touch'});const withMargin={margin:'16px 0'};const Link$1=_a=>{var{href:input,children}=_a,props=__rest(_a,["href","children"]);const isStorybookPath=/^\//.test(input);const isAnchorUrl=/^#.*/.test(input);const href=isStorybookPath?`?path=${input}`:input;const target=isAnchorUrl?'_self':'_top';return React__default["default"].createElement("a",Object.assign({href:href,target:target},props),children);};const A$2=theming.styled(Link$1)(withReset,({theme})=>({fontSize:'inherit',lineHeight:'24px',color:theme.color.secondary,textDecoration:'none','&.absent':{color:'#cc0000'},'&.anchor':{display:'block',paddingLeft:30,marginLeft:-30,cursor:'pointer',position:'absolute',top:0,left:0,bottom:0}}));const Blockquote=theming.styled.blockquote(withReset,withMargin,({theme})=>({borderLeft:`4px solid ${theme.color.medium}`,padding:'0 15px',color:theme.color.dark,'& > :first-of-type':{marginTop:0},'& > :last-child':{marginBottom:0}}));const Wrapper$8=theming.styled.div(withReset,({theme})=>({backgroundColor:theme.base==='light'?'rgba(0,0,0,.01)':'rgba(255,255,255,.01)',borderRadius:theme.appBorderRadius,border:`1px dashed ${theme.appBorderColor}`,display:'flex',alignItems:'center',justifyContent:'center',padding:20,margin:'25px 0 40px',color:curriedTransparentize$1(0.3,theme.color.defaultText),fontSize:theme.typography.size.s2}));const EmptyBlock=props=>React__default["default"].createElement(Wrapper$8,Object.assign({},props,{className:"docblock-emptyblock"}));const LazySyntaxHighlighter=React.lazy(()=>Promise.resolve().then(function(){return require('./syntaxhighlighter-
|
|
298
|
-
fontSize:`${theme.typography.size.s2-1}px`,lineHeight:'19px',margin:'25px 0 40px',borderRadius:theme.appBorderRadius,boxShadow:theme.base==='light'?'rgba(0, 0, 0, 0.10) 0 1px 3px 0':'rgba(0, 0, 0, 0.20) 0 2px 5px 0','pre.prismjs':{padding:20,background:'inherit'}}));exports.SourceError=void 0;(function(SourceError){SourceError["NO_STORY"]="There\u2019s no story here.";SourceError["SOURCE_UNAVAILABLE"]="Oh no! The source is not available.";})(exports.SourceError||(exports.SourceError={}));const SourceSkeletonWrapper=theming.styled.div(({theme})=>({background:theme.background.content,borderRadius:theme.appBorderRadius,border:`1px solid ${theme.appBorderColor}`,boxShadow:theme.base==='light'?'rgba(0, 0, 0, 0.10) 0 1px 3px 0':'rgba(0, 0, 0, 0.20) 0 2px 5px 0',margin:'25px 0 40px',padding:'20px 20px 20px 22px'}));const SourceSkeletonPlaceholder=theming.styled.div(({theme})=>({animation:`${theme.animation.glow} 1.5s ease-in-out infinite`,background:theme.appBorderColor,height:17,marginTop:1,width:'60%',[`&:first-child
|
|
297
|
+
var curriedTransparentize=/*#__PURE__*/curry/* ::<number | string, string, string> */(transparentize);var curriedTransparentize$1=curriedTransparentize;const headerCommon=({theme})=>({margin:'20px 0 8px',padding:0,cursor:'text',position:'relative',color:theme.color.defaultText,'&:first-of-type':{marginTop:0,paddingTop:0},'&:hover a.anchor':{textDecoration:'none'},'& tt, & code':{fontSize:'inherit'}});const codeCommon=({theme})=>({lineHeight:1,margin:'0 2px',padding:'3px 5px',whiteSpace:'nowrap',borderRadius:3,fontSize:theme.typography.size.s2-1,border:theme.base==='light'?`1px solid ${theme.color.mediumlight}`:`1px solid ${theme.color.darker}`,color:theme.base==='light'?curriedTransparentize$1(0.1,theme.color.defaultText):curriedTransparentize$1(0.3,theme.color.defaultText),backgroundColor:theme.base==='light'?theme.color.lighter:theme.color.border});const withReset=({theme})=>({fontFamily:theme.typography.fonts.base,fontSize:theme.typography.size.s3,margin:0,WebkitFontSmoothing:'antialiased',MozOsxFontSmoothing:'grayscale',WebkitTapHighlightColor:'rgba(0, 0, 0, 0)',WebkitOverflowScrolling:'touch'});const withMargin={margin:'16px 0'};const Link$1=_a=>{var{href:input,children}=_a,props=__rest(_a,["href","children"]);const isStorybookPath=/^\//.test(input);const isAnchorUrl=/^#.*/.test(input);const href=isStorybookPath?`?path=${input}`:input;const target=isAnchorUrl?'_self':'_top';return React__default["default"].createElement("a",Object.assign({href:href,target:target},props),children);};const A$2=theming.styled(Link$1)(withReset,({theme})=>({fontSize:'inherit',lineHeight:'24px',color:theme.color.secondary,textDecoration:'none','&.absent':{color:'#cc0000'},'&.anchor':{display:'block',paddingLeft:30,marginLeft:-30,cursor:'pointer',position:'absolute',top:0,left:0,bottom:0}}));const Blockquote=theming.styled.blockquote(withReset,withMargin,({theme})=>({borderLeft:`4px solid ${theme.color.medium}`,padding:'0 15px',color:theme.color.dark,'& > :first-of-type':{marginTop:0},'& > :last-child':{marginBottom:0}}));const Wrapper$8=theming.styled.div(withReset,({theme})=>({backgroundColor:theme.base==='light'?'rgba(0,0,0,.01)':'rgba(255,255,255,.01)',borderRadius:theme.appBorderRadius,border:`1px dashed ${theme.appBorderColor}`,display:'flex',alignItems:'center',justifyContent:'center',padding:20,margin:'25px 0 40px',color:curriedTransparentize$1(0.3,theme.color.defaultText),fontSize:theme.typography.size.s2}));const EmptyBlock=props=>React__default["default"].createElement(Wrapper$8,Object.assign({},props,{className:"docblock-emptyblock"}));const LazySyntaxHighlighter=React.lazy(()=>Promise.resolve().then(function(){return require('./syntaxhighlighter-3f6db113.js');}));const LazySyntaxHighlighterWithFormatter=React.lazy(()=>__awaiter(void 0,void 0,void 0,function*(){const[{SyntaxHighlighter},{formatter}]=yield Promise.all([Promise.resolve().then(function(){return require('./syntaxhighlighter-3f6db113.js');}),Promise.resolve().then(function(){return require('./formatter-42139f42.js');})]);return{default:props=>React__default["default"].createElement(SyntaxHighlighter,Object.assign({},props,{formatter:formatter}))};}));const SyntaxHighlighter=props=>React__default["default"].createElement(React.Suspense,{fallback:React__default["default"].createElement("div",null)},props.format!==false?React__default["default"].createElement(LazySyntaxHighlighterWithFormatter,Object.assign({},props)):React__default["default"].createElement(LazySyntaxHighlighter,Object.assign({},props)));const StyledSyntaxHighlighter=theming.styled(SyntaxHighlighter)(({theme})=>({// DocBlocks-specific styling and overrides
|
|
298
|
+
fontSize:`${theme.typography.size.s2-1}px`,lineHeight:'19px',margin:'25px 0 40px',borderRadius:theme.appBorderRadius,boxShadow:theme.base==='light'?'rgba(0, 0, 0, 0.10) 0 1px 3px 0':'rgba(0, 0, 0, 0.20) 0 2px 5px 0','pre.prismjs':{padding:20,background:'inherit'}}));exports.SourceError=void 0;(function(SourceError){SourceError["NO_STORY"]="There\u2019s no story here.";SourceError["SOURCE_UNAVAILABLE"]="Oh no! The source is not available.";})(exports.SourceError||(exports.SourceError={}));const SourceSkeletonWrapper=theming.styled.div(({theme})=>({background:theme.background.content,borderRadius:theme.appBorderRadius,border:`1px solid ${theme.appBorderColor}`,boxShadow:theme.base==='light'?'rgba(0, 0, 0, 0.10) 0 1px 3px 0':'rgba(0, 0, 0, 0.20) 0 2px 5px 0',margin:'25px 0 40px',padding:'20px 20px 20px 22px'}));const SourceSkeletonPlaceholder=theming.styled.div(({theme})=>({animation:`${theme.animation.glow} 1.5s ease-in-out infinite`,background:theme.appBorderColor,height:17,marginTop:1,width:'60%',[`&:first-child`]:{margin:0}}));const SourceSkeleton=()=>React__default["default"].createElement(SourceSkeletonWrapper,null,React__default["default"].createElement(SourceSkeletonPlaceholder,null),React__default["default"].createElement(SourceSkeletonPlaceholder,{style:{width:'80%'}}),React__default["default"].createElement(SourceSkeletonPlaceholder,{style:{width:'30%'}}),React__default["default"].createElement(SourceSkeletonPlaceholder,{style:{width:'80%'}}));/**
|
|
299
299
|
* Syntax-highlighted source code for a component (or anything!)
|
|
300
300
|
*/const Source=props=>{const{isLoading,error}=props;if(isLoading){return React__default["default"].createElement(SourceSkeleton,null);}if(error){return React__default["default"].createElement(EmptyBlock,null,error);}const _a=props,{language,code,dark,format}=_a,rest=__rest(_a,["language","code","dark","format"]);const syntaxHighlighter=React__default["default"].createElement(StyledSyntaxHighlighter,Object.assign({bordered:true,copyable:true,format:format,language:language,className:"docblock-source"},rest),code);if(typeof dark==='undefined'){return syntaxHighlighter;}const overrideTheme=dark?theming.themes.dark:theming.themes.light;return React__default["default"].createElement(theming.ThemeProvider,{theme:theming.convert(overrideTheme)},syntaxHighlighter);};Source.defaultProps={format:false};const isReactChildString=child=>typeof child==='string';const isInlineCodeRegex=/[\n\r]/g;const DefaultCodeBlock=theming.styled.code(({theme})=>({// from reset
|
|
301
301
|
fontFamily:theme.typography.fonts.mono,WebkitFontSmoothing:'antialiased',MozOsxFontSmoothing:'grayscale',display:'inline-block',paddingLeft:2,paddingRight:2,verticalAlign:'baseline',color:'inherit'}),codeCommon);const Code=_a=>{var _b;var{className,children}=_a,props=__rest(_a,["className","children"]);const language=(className||'').match(/lang-(\S+)/);const childrenArray=React.Children.toArray(children);const isInlineCode=!childrenArray.filter(isReactChildString).some(child=>child.match(isInlineCodeRegex));if(isInlineCode){return React__default["default"].createElement(DefaultCodeBlock,Object.assign({},props,{className:className}),childrenArray);}return React__default["default"].createElement(StyledSyntaxHighlighter,Object.assign({bordered:true,copyable:true,language:(_b=language===null||language===void 0?void 0:language[1])!==null&&_b!==void 0?_b:'plaintext',format:false},props),children);};const Div=theming.styled.div(withReset);const DL=theming.styled.dl(withReset,Object.assign(Object.assign({},withMargin),{padding:0,'& dt':{fontSize:'14px',fontWeight:'bold',fontStyle:'italic',padding:0,margin:'16px 0 4px'},'& dt:first-of-type':{padding:0},'& dt > :first-of-type':{marginTop:0},'& dt > :last-child':{marginBottom:0},'& dd':{margin:'0 0 16px',padding:'0 15px'},'& dd > :first-of-type':{marginTop:0},'& dd > :last-child':{marginBottom:0}}));const H1=theming.styled.h1(withReset,headerCommon,({theme})=>({fontSize:`${theme.typography.size.l1}px`,fontWeight:theme.typography.weight.black}));const H2=theming.styled.h2(withReset,headerCommon,({theme})=>({fontSize:`${theme.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${theme.appBorderColor}`}));const H3=theming.styled.h3(withReset,headerCommon,({theme})=>({fontSize:`${theme.typography.size.m1}px`}));const H4=theming.styled.h4(withReset,headerCommon,({theme})=>({fontSize:`${theme.typography.size.s3}px`}));const H5=theming.styled.h5(withReset,headerCommon,({theme})=>({fontSize:`${theme.typography.size.s2}px`}));const H6=theming.styled.h6(withReset,headerCommon,({theme})=>({fontSize:`${theme.typography.size.s2}px`,color:theme.color.dark}));const HR=theming.styled.hr(({theme})=>({border:'0 none',borderTop:`1px solid ${theme.appBorderColor}`,height:4,padding:0}));const Img=theming.styled.img({maxWidth:'100%'});const LI=theming.styled.li(withReset,({theme})=>({fontSize:theme.typography.size.s2,color:theme.color.defaultText,lineHeight:'24px','& + li':{marginTop:'.25em'},'& ul, & ol':{marginTop:'.25em',marginBottom:0},'& code':codeCommon({theme})}));const listCommon$1={paddingLeft:30,'& :first-of-type':{marginTop:0},'& :last-child':{marginBottom:0}};const OL=theming.styled.ol(withReset,withMargin,Object.assign(Object.assign({},listCommon$1),{listStyle:'decimal'}));const P$1=theming.styled.p(withReset,withMargin,({theme})=>({fontSize:theme.typography.size.s2,lineHeight:'24px',color:theme.color.defaultText,'& code':codeCommon({theme})}));const Pre=theming.styled.pre(withReset,withMargin,({theme})=>({// reset
|
|
@@ -310,7 +310,7 @@ const icons={mobile:'M648 64h-272c-66.274 0-120 53.726-120 120v656c0 66.274 53.7
|
|
|
310
310
|
shapeRendering:'inherit',transform:'translate3d(0,0,0)'},({inline})=>inline?{display:'inline-block'}:{display:'block'});Svg.displayName='Svg';const Path=theming.styled.path({fill:'currentColor'});// TODO: if we can resize the 1024 to 20, we can remove the size attributes
|
|
311
311
|
const Icons=React.memo(_a=>{var{icon,symbol}=_a,props=__rest(_a,["icon","symbol"]);return React__default["default"].createElement(Svg,Object.assign({viewBox:"0 0 1024 1024"},props),symbol?React__default["default"].createElement("use",{xlinkHref:`#icon--${symbol}`}):React__default["default"].createElement(Path,{d:icons[icon]}));});const Symbols=React.memo(({icons:keys=Object.keys(icons)})=>React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:{position:'absolute',width:0,height:0},"data-chromatic":"ignore"},keys.map(key=>React__default["default"].createElement("symbol",{id:`icon--${key}`,key:key},React__default["default"].createElement(Path,{d:icons[key]})))));// Cmd/Ctrl/Shift/Alt + Click should trigger default browser behavior. Same applies to non-left clicks
|
|
312
312
|
const LEFT_BUTTON=0;const isPlainLeftClick=e=>e.button===LEFT_BUTTON&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey;const cancelled=(e,cb)=>{if(isPlainLeftClick(e)){e.preventDefault();cb(e);}};const LinkInner=theming.styled.span(({withArrow})=>withArrow?{'> svg:last-of-type':{height:'0.7em',width:'0.7em',marginRight:0,marginLeft:'0.25em',bottom:'auto',verticalAlign:'inherit'}}:{},({containsIcon})=>containsIcon?{svg:{height:'1em',width:'1em',verticalAlign:'middle',position:'relative',bottom:0,marginRight:0}}:{});const A$1=theming.styled.a(({theme})=>({display:'inline-block',transition:'all 150ms ease-out',textDecoration:'none',color:theme.color.secondary,'&:hover, &:focus':{cursor:'pointer',color:curriedDarken$1(0.07,theme.color.secondary),'svg path':{fill:curriedDarken$1(0.07,theme.color.secondary)}},'&:active':{color:curriedDarken$1(0.1,theme.color.secondary),'svg path':{fill:curriedDarken$1(0.1,theme.color.secondary)}},svg:{display:'inline-block',height:'1em',width:'1em',verticalAlign:'text-top',position:'relative',bottom:'-0.125em',marginRight:'0.4em','& path':{fill:theme.color.secondary}}}),({theme,secondary,tertiary})=>{let colors;if(secondary){colors=[theme.color.mediumdark,theme.color.dark,theme.color.darker];}if(tertiary){colors=[theme.color.dark,theme.color.darkest,theme.color.mediumdark];}return colors?{color:colors[0],'svg path':{fill:colors[0]},'&:hover':{color:colors[1],'svg path':{fill:colors[1]}},'&:active':{color:colors[2],'svg path':{fill:colors[2]}}}:{};},({nochrome})=>nochrome?{color:'inherit','&:hover, &:active':{color:'inherit',textDecoration:'underline'}}:{},({theme,inverse})=>inverse?{color:theme.color.lightest,'svg path':{fill:theme.color.lightest},'&:hover':{color:theme.color.lighter,'svg path':{fill:theme.color.lighter}},'&:active':{color:theme.color.light,'svg path':{fill:theme.color.light}}}:{},({isButton})=>isButton?{border:0,borderRadius:0,background:'none',padding:0,fontSize:'inherit'}:{});const Link=_a=>{var{cancel,children,onClick,withArrow,containsIcon,className}=_a,rest=__rest(_a,["cancel","children","onClick","withArrow","containsIcon","className"]);return React__default["default"].createElement(A$1,Object.assign({},rest,{onClick:onClick&&cancel?e=>cancelled(e,onClick):onClick,className:className}),React__default["default"].createElement(LinkInner,{withArrow:withArrow,containsIcon:containsIcon},children,withArrow&&React__default["default"].createElement(Icons,{icon:"arrowright"})));};Link.defaultProps={cancel:true,className:undefined,style:undefined,onClick:undefined,withArrow:false,containsIcon:false};const DocumentWrapper=theming.styled.div(({theme})=>({fontSize:`${theme.typography.size.s2}px`,lineHeight:'1.6',h1:{fontSize:`${theme.typography.size.l1}px`,fontWeight:theme.typography.weight.black},h2:{fontSize:`${theme.typography.size.m2}px`,borderBottom:`1px solid ${theme.appBorderColor}`},h3:{fontSize:`${theme.typography.size.m1}px`},h4:{fontSize:`${theme.typography.size.s3}px`},h5:{fontSize:`${theme.typography.size.s2}px`},h6:{fontSize:`${theme.typography.size.s2}px`,color:theme.color.dark},'pre:not(.prismjs)':{background:'transparent',border:'none',borderRadius:0,padding:0,margin:0},'pre pre, pre.prismjs':{padding:15,margin:0,whiteSpace:'pre-wrap',color:'inherit',fontSize:'13px',lineHeight:'19px'},'pre pre code, pre.prismjs code':{color:'inherit',fontSize:'inherit'},'pre code':{margin:0,padding:0,whiteSpace:'pre',border:'none',background:'transparent'},'pre code, pre tt':{backgroundColor:'transparent',border:'none'},/* GitHub inspired Markdown styles loosely from https://gist.github.com/tuzz/3331384 */'body > *:first-of-type':{marginTop:'0 !important'},'body > *:last-child':{marginBottom:'0 !important'},a:{color:theme.color.secondary,textDecoration:'none'},'a.absent':{color:'#cc0000'},'a.anchor':{display:'block',paddingLeft:30,marginLeft:-30,cursor:'pointer',position:'absolute',top:0,left:0,bottom:0},'h1, h2, h3, h4, h5, h6':{margin:'20px 0 10px',padding:0,cursor:'text',position:'relative','&:first-of-type':{marginTop:0,paddingTop:0},'&:hover a.anchor':{textDecoration:'none'},'& tt, & code':{fontSize:'inherit'}},'h1:first-of-type + h2':{marginTop:0,paddingTop:0},'p, blockquote, ul, ol, dl, li, table, pre':{margin:'15px 0'},hr:{border:'0 none',borderTop:`1px solid ${theme.appBorderColor}`,height:4,padding:0},'body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type':{marginTop:0,paddingTop:0},'body > h1:first-of-type + h2':{marginTop:0,paddingTop:0},'a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6':{marginTop:0,paddingTop:0},'h1 p, h2 p, h3 p, h4 p, h5 p, h6 p':{marginTop:0},'li p.first':{display:'inline-block'},'ul, ol':{paddingLeft:30,'& :first-of-type':{marginTop:0},'& :last-child':{marginBottom:0}},dl:{padding:0},'dl dt':{fontSize:'14px',fontWeight:'bold',fontStyle:'italic',margin:'0 0 15px',padding:'0 15px','&:first-of-type':{padding:0},'& > :first-of-type':{marginTop:0},'& > :last-child':{marginBottom:0}},blockquote:{borderLeft:`4px solid ${theme.color.medium}`,padding:'0 15px',color:theme.color.dark,'& > :first-of-type':{marginTop:0},'& > :last-child':{marginBottom:0}},table:{padding:0,borderCollapse:'collapse','& tr':{borderTop:`1px solid ${theme.appBorderColor}`,backgroundColor:'white',margin:0,padding:0,'& th':{fontWeight:'bold',border:`1px solid ${theme.appBorderColor}`,textAlign:'left',margin:0,padding:'6px 13px'},'& td':{border:`1px solid ${theme.appBorderColor}`,textAlign:'left',margin:0,padding:'6px 13px'},'&:nth-of-type(2n)':{backgroundColor:theme.color.lighter},'& th :first-of-type, & td :first-of-type':{marginTop:0},'& th :last-child, & td :last-child':{marginBottom:0}}},img:{maxWidth:'100%'},'span.frame':{display:'block',overflow:'hidden','& > span':{border:`1px solid ${theme.color.medium}`,display:'block',float:'left',overflow:'hidden',margin:'13px 0 0',padding:7,width:'auto'},'& span img':{display:'block',float:'left'},'& span span':{clear:'both',color:theme.color.darkest,display:'block',padding:'5px 0 0'}},'span.align-center':{display:'block',overflow:'hidden',clear:'both','& > span':{display:'block',overflow:'hidden',margin:'13px auto 0',textAlign:'center'},'& span img':{margin:'0 auto',textAlign:'center'}},'span.align-right':{display:'block',overflow:'hidden',clear:'both','& > span':{display:'block',overflow:'hidden',margin:'13px 0 0',textAlign:'right'},'& span img':{margin:0,textAlign:'right'}},'span.float-left':{display:'block',marginRight:13,overflow:'hidden',float:'left','& span':{margin:'13px 0 0'}},'span.float-right':{display:'block',marginLeft:13,overflow:'hidden',float:'right','& > span':{display:'block',overflow:'hidden',margin:'13px auto 0',textAlign:'right'}},'code, tt':{margin:'0 2px',padding:'0 5px',whiteSpace:'nowrap',border:`1px solid ${theme.color.mediumlight}`,backgroundColor:theme.color.lighter,borderRadius:3,color:theme.base==='dark'&&theme.color.darkest}}));const Container$1=theming.styled.div(({theme})=>({position:'absolute',bottom:0,right:0,maxWidth:'100%',display:'flex',background:theme.background.content,zIndex:1}));const ActionButton=theming.styled.button(({theme})=>({margin:0,border:'0 none',padding:'4px 10px',cursor:'pointer',display:'flex',alignItems:'center',color:theme.color.defaultText,background:theme.background.content,fontSize:12,lineHeight:'16px',fontFamily:theme.typography.fonts.base,fontWeight:theme.typography.weight.bold,borderTop:`1px solid ${theme.appBorderColor}`,borderLeft:`1px solid ${theme.appBorderColor}`,marginLeft:-1,borderRadius:`4px 0 0 0`,'&:not(:last-child)':{borderRight:`1px solid ${theme.appBorderColor}`},'& + *':{borderLeft:`1px solid ${theme.appBorderColor}`,borderRadius:0},'&:focus':{boxShadow:`${theme.color.secondary} 0 -3px 0 0 inset`,outline:'0 none'}}),({disabled})=>disabled&&{cursor:'not-allowed',opacity:0.5});ActionButton.displayName='ActionButton';const ActionBar=_a=>{var{actionItems}=_a,props=__rest(_a,["actionItems"]);return React__default["default"].createElement(Container$1,Object.assign({},props),actionItems.map(({title,className,onClick,disabled},index)=>// eslint-disable-next-line react/no-array-index-key
|
|
313
|
-
React__default["default"].createElement(ActionButton,{key:index,className:className,onClick:onClick,disabled:disabled},title)));};const toNumber=input=>typeof input==='number'?input:Number(input);const Container=theming.styled.div(({theme,col,row=1})=>col?{display:'inline-block',verticalAlign:'inherit','& > *':{marginLeft:col*theme.layoutMargin,verticalAlign:'inherit'},[`& > *:first-child
|
|
313
|
+
React__default["default"].createElement(ActionButton,{key:index,className:className,onClick:onClick,disabled:disabled},title)));};const toNumber=input=>typeof input==='number'?input:Number(input);const Container=theming.styled.div(({theme,col,row=1})=>col?{display:'inline-block',verticalAlign:'inherit','& > *':{marginLeft:col*theme.layoutMargin,verticalAlign:'inherit'},[`& > *:first-child`]:{marginLeft:0}}:{'& > *':{marginTop:row*theme.layoutMargin},[`& > *:first-child`]:{marginTop:0}},({theme,outer,col,row})=>{switch(true){case!!(outer&&col):{return{marginLeft:outer*theme.layoutMargin,marginRight:outer*theme.layoutMargin};}case!!(outer&&row):{return{marginTop:outer*theme.layoutMargin,marginBottom:outer*theme.layoutMargin};}default:{return{};}}});const Spaced=_a=>{var{col,row,outer,children}=_a,rest=__rest(_a,["col","row","outer","children"]);const outerAmount=toNumber(typeof outer==='number'||!outer?outer:col||row);return React__default["default"].createElement(Container,Object.assign({col:col,row:row,outer:outerAmount},rest),children);};const Title$3=theming.styled.div(({theme})=>({fontWeight:theme.typography.weight.bold}));const Desc$1=theming.styled.div();const Message$1=theming.styled.div(({theme})=>({padding:30,textAlign:'center',color:theme.color.defaultText,fontSize:theme.typography.size.s2-1}));const Placeholder=_a=>{var{children}=_a,props=__rest(_a,["children"]);const[title,desc]=React.Children.toArray(children);return React__default["default"].createElement(Message$1,Object.assign({},props),React__default["default"].createElement(Title$3,null,title),desc&&React__default["default"].createElement(Desc$1,null,desc));};const GlobalScrollAreaStyles=React.lazy(()=>Promise.resolve().then(function(){return require('./GlobalScrollAreaStyles-ff4bd929.js');}));const OverlayScrollbars=React.lazy(()=>Promise.resolve().then(function(){return require('./OverlayScrollbars-b655a091.js');}));const Scroller=_a=>{var props=__rest(_a,["horizontal","vertical"]);return React__default["default"].createElement(React.Suspense,{fallback:React__default["default"].createElement("div",Object.assign({},props))},React__default["default"].createElement(GlobalScrollAreaStyles,null),React__default["default"].createElement(OverlayScrollbars,Object.assign({options:{scrollbars:{autoHide:'leave'}}},props)));};const ScrollArea=theming.styled(Scroller)(({vertical})=>!vertical?{overflowY:'hidden'}:{overflowY:'auto',height:'100%'},({horizontal})=>!horizontal?{overflowX:'hidden'}:{overflowX:'auto',width:'100%'});ScrollArea.defaultProps={horizontal:false,vertical:false};var commonjsGlobal=typeof globalThis!=='undefined'?globalThis:typeof window!=='undefined'?window:typeof global!=='undefined'?global:typeof self!=='undefined'?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,'default')?x['default']:x;}var win;if(typeof window!=="undefined"){win=window;}else if(typeof commonjsGlobal!=="undefined"){win=commonjsGlobal;}else if(typeof self!=="undefined"){win=self;}else{win={};}var window_1=win;const{window:globalWindow$2}=window_1;function browserSupportsCssZoom(){try{return globalWindow$2.document.implementation.createHTMLDocument('').body.style.zoom!==undefined;}catch(error){return false;}}const ZoomElementWrapper=theming.styled.div(({scale=1,height})=>browserSupportsCssZoom()?{'> *':{zoom:1/scale}}:{height:height+50,transformOrigin:'top left',transform:`scale(${1/scale})`});function ZoomElement({scale,children}){const componentWrapperRef=React.useRef(null);const[height,setHeight]=React.useState(0);React.useEffect(()=>{if(componentWrapperRef.current){setHeight(componentWrapperRef.current.getBoundingClientRect().height);}},[scale,componentWrapperRef.current]);return React__default["default"].createElement(ZoomElementWrapper,{scale:scale,height:height},React__default["default"].createElement("div",{ref:componentWrapperRef,className:"innerZoomElementWrapper"},children));}class ZoomIFrame extends React.Component{constructor(){super(...arguments);this.iframe=null;}componentDidMount(){const{iFrameRef}=this.props;this.iframe=iFrameRef.current;}shouldComponentUpdate(nextProps){const{scale,active}=this.props;if(scale!==nextProps.scale){this.setIframeInnerZoom(nextProps.scale);}if(active!==nextProps.active){this.iframe.setAttribute('data-is-storybook',nextProps.active?'true':'false');}// this component renders an iframe, which gets updates via post-messages
|
|
314
314
|
// never update this component, it will cause the iframe to refresh
|
|
315
315
|
// the only exception is when the url changes, which happens when the version changes
|
|
316
316
|
return nextProps.children.props.src!==this.props.children.props.src;}setIframeInnerZoom(scale){try{if(browserSupportsCssZoom()){Object.assign(this.iframe.contentDocument.body.style,{zoom:1/scale});}else{Object.assign(this.iframe.contentDocument.body.style,{width:`${scale*100}%`,height:`${scale*100}%`,transform:`scale(${1/scale})`,transformOrigin:'top left'});}}catch(e){this.setIframeZoom(scale);}}setIframeZoom(scale){Object.assign(this.iframe.style,{width:`${scale*100}%`,height:`${scale*100}%`,transform:`scale(${1/scale})`,transformOrigin:'top left'});}render(){const{children}=this.props;return children;}}const Zoom$1={Element:ZoomElement,IFrame:ZoomIFrame};const ButtonWrapper=theming.styled.button(({small,theme})=>({border:0,borderRadius:'3em',cursor:'pointer',display:'inline-block',overflow:'hidden',padding:small?'8px 16px':'13px 20px',position:'relative',textAlign:'center',textDecoration:'none',transition:'all 150ms ease-out',transform:'translate3d(0,0,0)',verticalAlign:'top',whiteSpace:'nowrap',userSelect:'none',opacity:1,margin:0,background:'transparent',fontSize:`${small?theme.typography.size.s1:theme.typography.size.s2-1}px`,fontWeight:theme.typography.weight.bold,lineHeight:'1',svg:{display:'inline-block',height:small?14:16,width:small?14:16,verticalAlign:'top',marginRight:small?4:6,marginTop:small?-1:-2,marginBottom:small?-1:-2,/* Necessary for js mouse events to not glitch out when hovering on svgs */pointerEvents:'none',path:{fill:'currentColor'}}}),({disabled})=>disabled?{cursor:'not-allowed !important',opacity:0.5,'&:hover':{transform:'none'}}:{},({containsIcon,small})=>containsIcon?Object.assign({svg:{display:'block',margin:0}},small?{padding:9}:{padding:12}):{},({theme,primary,secondary,gray})=>{let color;if(gray){color=theme.color.medium;}else if(secondary){color=theme.color.secondary;}else if(primary){color=theme.color.primary;}return color?{background:color,color:gray?theme.color.darkest:theme.color.lightest,'&:hover':{background:curriedDarken$1(0.05,color)},'&:active':{boxShadow:'rgba(0, 0, 0, 0.1) 0 0 0 3em inset'},'&:focus':{boxShadow:`${rgba(color,1)} 0 1px 9px 2px`,outline:'none'},'&:focus:hover':{boxShadow:`${rgba(color,0.2)} 0 8px 18px 0px`}}:{};},({theme,tertiary,inForm,small})=>tertiary?Object.assign(Object.assign({background:theme.base==='light'?curriedDarken$1(0.02,theme.input.background):curriedLighten$1(0.02,theme.input.background),color:theme.input.color,boxShadow:`${theme.input.border} 0 0 0 1px inset`,borderRadius:theme.input.borderRadius},inForm&&small?{padding:'10px 16px'}:{}),{'&:hover':Object.assign({background:theme.base==='light'?curriedDarken$1(0.05,theme.input.background):curriedLighten$1(0.05,theme.input.background)},inForm?{}:{boxShadow:'rgba(0,0,0,.2) 0 2px 6px 0, rgba(0,0,0,.1) 0 0 0 1px inset'}),'&:active':{background:theme.input.background},'&:focus':{boxShadow:`${rgba(theme.color.secondary,1)} 0 0 0 1px inset`,outline:'none'}}):{},({theme,outline})=>outline?{boxShadow:`${curriedTransparentize$1(0.8,theme.color.defaultText)} 0 0 0 1px inset`,color:curriedTransparentize$1(0.3,theme.color.defaultText),background:'transparent','&:hover, &:focus':{boxShadow:`${curriedTransparentize$1(0.5,theme.color.defaultText)} 0 0 0 1px inset`,outline:'none'},'&:active':{boxShadow:`${curriedTransparentize$1(0.5,theme.color.defaultText)} 0 0 0 2px inset`,color:curriedTransparentize$1(0,theme.color.defaultText)}}:{},({theme,outline,primary})=>{const color=theme.color.primary;return outline&&primary?{boxShadow:`${color} 0 0 0 1px inset`,color,'svg path':{fill:color},'&:hover':{boxShadow:`${color} 0 0 0 1px inset`,background:'transparent'},'&:active':{background:color,boxShadow:`${color} 0 0 0 1px inset`,color:theme.color.tertiary},'&:focus':{boxShadow:`${color} 0 0 0 1px inset, ${rgba(color,0.4)} 0 1px 9px 2px`,outline:'none'},'&:focus:hover':{boxShadow:`${color} 0 0 0 1px inset, ${rgba(color,0.2)} 0 8px 18px 0px`}}:{};},({theme,outline,primary,secondary})=>{let color;if(secondary){color=theme.color.secondary;}else if(primary){color=theme.color.primary;}return outline&&color?{boxShadow:`${color} 0 0 0 1px inset`,color,'svg path':{fill:color},'&:hover':{boxShadow:`${color} 0 0 0 1px inset`,background:'transparent'},'&:active':{background:color,boxShadow:`${color} 0 0 0 1px inset`,color:theme.color.tertiary},'&:focus':{boxShadow:`${color} 0 0 0 1px inset, ${rgba(color,0.4)} 0 1px 9px 2px`,outline:'none'},'&:focus:hover':{boxShadow:`${color} 0 0 0 1px inset, ${rgba(color,0.2)} 0 8px 18px 0px`}}:{};});const ButtonLink=ButtonWrapper.withComponent('a');const Button$2=Object.assign(React.forwardRef((_a,ref)=>{var{isLink,children}=_a,props=__rest(_a,["isLink","children"]);if(isLink){return React__default["default"].createElement(ButtonLink,Object.assign({},props,{ref:ref}),children);}return React__default["default"].createElement(ButtonWrapper,Object.assign({},props,{ref:ref}),children);}),{defaultProps:{isLink:false}});const Wrapper$7=theming.styled.label(({theme})=>({display:'flex',borderBottom:`1px solid ${theme.appBorderColor}`,margin:'0 15px',padding:'8px 0','&:last-child':{marginBottom:'3rem'}}));const Label$4=theming.styled.span(({theme})=>({minWidth:100,fontWeight:theme.typography.weight.bold,marginRight:15,display:'flex',justifyContent:'flex-start',alignItems:'center',lineHeight:'16px'}));const Field=_a=>{var{label,children}=_a,props=__rest(_a,["label","children"]);return React__default["default"].createElement(Wrapper$7,Object.assign({},props),label?React__default["default"].createElement(Label$4,null,React__default["default"].createElement("span",null,label)):null,children);};Field.defaultProps={label:undefined};function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}var index$1=typeof document!=='undefined'?React.useLayoutEffect:React.useEffect;var useLatest=function useLatest(value){var ref=React.useRef(value);index$1(function(){ref.current=value;});return ref;};var updateRef=function updateRef(ref,value){if(typeof ref==='function'){ref(value);return;}ref.current=value;};var useComposedRef=function useComposedRef(libRef,userRef){var prevUserRef=React.useRef();return React.useCallback(function(instance){libRef.current=instance;if(prevUserRef.current){updateRef(prevUserRef.current,null);}prevUserRef.current=userRef;if(!userRef){return;}updateRef(userRef,instance);},[userRef]);};var HIDDEN_TEXTAREA_STYLE={'min-height':'0','max-height':'none',height:'0',visibility:'hidden',overflow:'hidden',position:'absolute','z-index':'-1000',top:'0',right:'0'};var forceHiddenStyles=function forceHiddenStyles(node){Object.keys(HIDDEN_TEXTAREA_STYLE).forEach(function(key){node.style.setProperty(key,HIDDEN_TEXTAREA_STYLE[key],'important');});};// export type CalculatedNodeHeights = [height: number, rowHeight: number];
|
|
@@ -326,7 +326,7 @@ if(boxSizing===''){return null;}// IE (Edge has already correct behaviour) retur
|
|
|
326
326
|
if(isIE&&boxSizing==='border-box'){sizingStyle.width=parseFloat(sizingStyle.width)+parseFloat(sizingStyle.borderRightWidth)+parseFloat(sizingStyle.borderLeftWidth)+parseFloat(sizingStyle.paddingRight)+parseFloat(sizingStyle.paddingLeft)+'px';}var paddingSize=parseFloat(sizingStyle.paddingBottom)+parseFloat(sizingStyle.paddingTop);var borderSize=parseFloat(sizingStyle.borderBottomWidth)+parseFloat(sizingStyle.borderTopWidth);return{sizingStyle:sizingStyle,paddingSize:paddingSize,borderSize:borderSize};};var useWindowResizeListener=function useWindowResizeListener(listener){var latestListener=useLatest(listener);React.useLayoutEffect(function(){var handler=function handler(event){latestListener.current(event);};window.addEventListener('resize',handler);return function(){window.removeEventListener('resize',handler);};},[]);};var TextareaAutosize=function TextareaAutosize(_ref,userRef){var cacheMeasurements=_ref.cacheMeasurements,maxRows=_ref.maxRows,minRows=_ref.minRows,_ref$onChange=_ref.onChange,onChange=_ref$onChange===void 0?noop$2:_ref$onChange,_ref$onHeightChange=_ref.onHeightChange,onHeightChange=_ref$onHeightChange===void 0?noop$2:_ref$onHeightChange,props=_objectWithoutPropertiesLoose(_ref,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]);if(process.env.NODE_ENV!=='production'&&props.style){if('maxHeight'in props.style){throw new Error('Using `style.maxHeight` for <TextareaAutosize/> is not supported. Please use `maxRows`.');}if('minHeight'in props.style){throw new Error('Using `style.minHeight` for <TextareaAutosize/> is not supported. Please use `minRows`.');}}var isControlled=props.value!==undefined;var libRef=React.useRef(null);var ref=useComposedRef(libRef,userRef);var heightRef=React.useRef(0);var measurementsCacheRef=React.useRef();var resizeTextarea=function resizeTextarea(){var node=libRef.current;var nodeSizingData=cacheMeasurements&&measurementsCacheRef.current?measurementsCacheRef.current:getSizingData(node);if(!nodeSizingData){return;}measurementsCacheRef.current=nodeSizingData;var _calculateNodeHeight=calculateNodeHeight(nodeSizingData,node.value||node.placeholder||'x',minRows,maxRows),height=_calculateNodeHeight[0],rowHeight=_calculateNodeHeight[1];if(heightRef.current!==height){heightRef.current=height;node.style.setProperty('height',height+"px",'important');onHeightChange(height,{rowHeight:rowHeight});}};var handleChange=function handleChange(event){if(!isControlled){resizeTextarea();}onChange(event);};if(typeof document!=='undefined'){React.useLayoutEffect(resizeTextarea);useWindowResizeListener(resizeTextarea);}return/*#__PURE__*/React.createElement("textarea",_extends({},props,{onChange:handleChange,ref:ref}));};var index=/* #__PURE__ */React.forwardRef(TextareaAutosize);var TextareaAutoResize=index;const styleResets$1={// resets
|
|
327
327
|
appearance:'none',border:'0 none',boxSizing:'inherit',display:' block',margin:' 0',background:'transparent',padding:0,fontSize:'inherit',position:'relative'};const styles=({theme})=>Object.assign(Object.assign({},styleResets$1),{transition:'box-shadow 200ms ease-out, opacity 200ms ease-out',color:theme.input.color||'inherit',background:theme.input.background,boxShadow:`${theme.input.border} 0 0 0 1px inset`,borderRadius:theme.input.borderRadius,fontSize:theme.typography.size.s2-1,lineHeight:'20px',padding:'6px 10px','&:focus':{boxShadow:`${theme.color.secondary} 0 0 0 1px inset`,outline:'none'},'&[disabled]':{cursor:'not-allowed',opacity:0.5},'&:-webkit-autofill':{WebkitBoxShadow:`0 0 0 3em ${theme.color.lightest} inset`},'::placeholder':{color:theme.color.mediumdark}});const sizes=({size})=>{switch(size){case'100%':{return{width:'100%'};}case'flex':{return{flex:1};}case'auto':default:{return{display:'inline'};}}};const alignment=({align})=>{switch(align){case'end':{return{textAlign:'right'};}case'center':{return{textAlign:'center'};}case'start':default:{return{textAlign:'left'};}}};const validation=({valid,theme})=>{switch(valid){case'valid':{return{boxShadow:`${theme.color.positive} 0 0 0 1px inset !important`};}case'error':{return{boxShadow:`${theme.color.negative} 0 0 0 1px inset !important`};}case'warn':{return{boxShadow:`${theme.color.warning} 0 0 0 1px inset`};}case undefined:case null:default:{return{};}}};const Input$1=Object.assign(theming.styled(React.forwardRef((_a,ref)=>{var props=__rest(_a,["size","valid","align"]);return React__default["default"].createElement("input",Object.assign({},props,{ref:ref}));}))(styles,sizes,alignment,validation,{minHeight:32}),{displayName:'Input'});const Select=Object.assign(theming.styled(React.forwardRef((_a,ref)=>{var props=__rest(_a,["size","valid","align"]);return React__default["default"].createElement("select",Object.assign({},props,{ref:ref}));}))(styles,sizes,validation,{height:32,userSelect:'none',paddingRight:20,appearance:'menulist'}),{displayName:'Select'});const Textarea=Object.assign(theming.styled(React.forwardRef((_a,ref)=>{var props=__rest(_a,["size","valid","align"]);return React__default["default"].createElement(TextareaAutoResize,Object.assign({},props,{ref:ref}));}))(styles,sizes,alignment,validation,({height=400})=>({overflow:'visible',maxHeight:height})),{displayName:'Textarea'});const ButtonStyled=theming.styled(React.forwardRef((_a,ref)=>{var props=__rest(_a,["size","valid","align"]);return React__default["default"].createElement(Button$2,Object.assign({},props,{ref:ref}));}))(sizes,validation,{// Custom styling for color widget nested in buttons
|
|
328
328
|
userSelect:'none',overflow:'visible',zIndex:2,// overrides the default hover from Button
|
|
329
|
-
'&:hover':{transform:'none'}});const Button$1=Object.assign(React.forwardRef((props,ref)=>React__default["default"].createElement(ButtonStyled,Object.assign({},props,{tertiary:true,small:true,inForm:true},{ref:ref}))),{displayName:'Button'});const Form=Object.assign(theming.styled.form({boxSizing:'border-box',width:'100%'}),{Field,Input:Input$1,Select,Textarea,Button:Button$1});const LazyWithTooltip=React.lazy(()=>Promise.resolve().then(function(){return require('./WithTooltip-
|
|
329
|
+
'&:hover':{transform:'none'}});const Button$1=Object.assign(React.forwardRef((props,ref)=>React__default["default"].createElement(ButtonStyled,Object.assign({},props,{tertiary:true,small:true,inForm:true},{ref:ref}))),{displayName:'Button'});const Form=Object.assign(theming.styled.form({boxSizing:'border-box',width:'100%'}),{Field,Input:Input$1,Select,Textarea,Button:Button$1});const LazyWithTooltip=React.lazy(()=>Promise.resolve().then(function(){return require('./WithTooltip-aa7ec521.js');}).then(mod=>({default:mod.WithTooltip})));const WithTooltip=props=>React__default["default"].createElement(React.Suspense,{fallback:React__default["default"].createElement("div",null)},React__default["default"].createElement(LazyWithTooltip,Object.assign({},props)));const LazyWithTooltipPure=React.lazy(()=>Promise.resolve().then(function(){return require('./WithTooltip-aa7ec521.js');}).then(mod=>({default:mod.WithTooltipPure})));const WithTooltipPure=props=>React__default["default"].createElement(React.Suspense,{fallback:React__default["default"].createElement("div",null)},React__default["default"].createElement(LazyWithTooltipPure,Object.assign({},props)));const Title$2=theming.styled.div(({theme})=>({fontWeight:theme.typography.weight.black}));const Desc=theming.styled.span();const Links=theming.styled.div(({theme})=>({marginTop:8,textAlign:'center','> *':{margin:'0 8px',fontWeight:theme.typography.weight.black}}));const Message=theming.styled.div(({theme})=>({color:theme.textColor,lineHeight:'18px'}));const MessageWrapper=theming.styled.div({padding:15,width:280,boxSizing:'border-box'});const TooltipMessage=({title,desc,links})=>{return React__default["default"].createElement(MessageWrapper,null,React__default["default"].createElement(Message,null,title&&React__default["default"].createElement(Title$2,null,title),desc&&React__default["default"].createElement(Desc,null,desc)),links&&React__default["default"].createElement(Links,null,links.map(_a=>{var{title:linkTitle}=_a,other=__rest(_a,["title"]);return React__default["default"].createElement(Link,Object.assign({},other,{key:linkTitle}),linkTitle);})));};TooltipMessage.defaultProps={title:null,desc:null,links:null};const Note=theming.styled.div(({theme})=>({padding:'2px 6px',lineHeight:'16px',fontSize:10,fontWeight:theme.typography.weight.bold,color:theme.color.lightest,boxShadow:'0 0 5px 0 rgba(0, 0, 0, 0.3)',borderRadius:4,whiteSpace:'nowrap',pointerEvents:'none',zIndex:-1,background:theme.base==='light'?'rgba(60, 60, 60, 0.9)':'rgba(20, 20, 20, 0.85)',margin:6}));const TooltipNote=_a=>{var{note}=_a,props=__rest(_a,["note"]);return React__default["default"].createElement(Note,Object.assign({},props),note);};function Similar(){this.list=[];this.lastItem=undefined;this.size=0;return this;}Similar.prototype.get=function(key){var index;if(this.lastItem&&this.isEqual(this.lastItem.key,key)){return this.lastItem.val;}index=this.indexOf(key);if(index>=0){this.lastItem=this.list[index];return this.list[index].val;}return undefined;};Similar.prototype.set=function(key,val){var index;if(this.lastItem&&this.isEqual(this.lastItem.key,key)){this.lastItem.val=val;return this;}index=this.indexOf(key);if(index>=0){this.lastItem=this.list[index];this.list[index].val=val;return this;}this.lastItem={key:key,val:val};this.list.push(this.lastItem);this.size++;return this;};Similar.prototype.delete=function(key){var index;if(this.lastItem&&this.isEqual(this.lastItem.key,key)){this.lastItem=undefined;}index=this.indexOf(key);if(index>=0){this.size--;return this.list.splice(index,1)[0];}return undefined;};// important that has() doesn't use get() in case an existing key has a falsy value, in which case has() would return false
|
|
330
330
|
Similar.prototype.has=function(key){var index;if(this.lastItem&&this.isEqual(this.lastItem.key,key)){return true;}index=this.indexOf(key);if(index>=0){this.lastItem=this.list[index];return true;}return false;};Similar.prototype.forEach=function(callback,thisArg){var i;for(i=0;i<this.size;i++){callback.call(thisArg||this,this.list[i].val,this.list[i].key,this);}};Similar.prototype.indexOf=function(key){var i;for(i=0;i<this.size;i++){if(this.isEqual(this.list[i].key,key)){return i;}}return-1;};// check if the numbers are equal, or whether they are both precisely NaN (isNaN returns true for all non-numbers)
|
|
331
331
|
Similar.prototype.isEqual=function(val1,val2){return val1===val2||val1!==val1&&val2!==val2;};var similar=Similar;var mapOrSimilar=function(forceSimilar){if(typeof Map!=='function'||forceSimilar){var Similar=similar;return new Similar();}else{return new Map();}};var MapOrSimilar=mapOrSimilar;var memoizerific=function(limit){var cache=new MapOrSimilar(process.env.FORCE_SIMILAR_INSTEAD_OF_MAP==='true'),lru=[];return function(fn){var memoizerific=function(){var currentCache=cache,newMap,fnResult,argsLengthMinusOne=arguments.length-1,lruPath=Array(argsLengthMinusOne+1),isMemoized=true,i;if((memoizerific.numArgs||memoizerific.numArgs===0)&&memoizerific.numArgs!==argsLengthMinusOne+1){throw new Error('Memoizerific functions should always be called with the same number of arguments');}// loop through each argument to traverse the map tree
|
|
332
332
|
for(i=0;i<argsLengthMinusOne;i++){lruPath[i]={cacheItem:currentCache,arg:arguments[i]};// climb through the hierarchical map tree until the second-last argument has been found, or an argument is missing.
|
|
@@ -343,7 +343,7 @@ function isEqual(val1,val2){return val1===val2||val1!==val1&&val2!==val2;}const
|
|
|
343
343
|
fontWeight:theme.typography.weight.regular}),({active,theme})=>active?{color:theme.color.primary,fontWeight:theme.typography.weight.bold}:{},({loading,theme})=>loading?Object.assign({display:'inline-block',flex:'none'},theme.animation.inlineGlow):{},({disabled,theme})=>disabled?{color:curriedTransparentize$1(0.7,theme.color.defaultText)}:{});const Right=theming.styled.span({'& svg':{transition:'all 200ms ease-out',opacity:0,height:12,width:12,margin:'3px 0',verticalAlign:'top'},'& path':{fill:'inherit'}},({active,theme})=>active?{'& svg':{opacity:1},'& path':{fill:theme.color.primary}}:{});const Center=theming.styled.span({flex:1,textAlign:'left',display:'inline-flex','& > * + *':{paddingLeft:10}});const CenterText=theming.styled.span({flex:1,textAlign:'center'},({active,theme})=>active?{color:theme.color.primary}:{},({theme,disabled})=>disabled?{color:theme.color.mediumdark}:{});const Left=theming.styled.span(({active,theme})=>active?{'& svg':{opacity:1},'& path':{fill:theme.color.primary}}:{});const Item$3=theming.styled.a(({theme})=>({fontSize:theme.typography.size.s1,transition:'all 150ms ease-out',color:curriedTransparentize$1(0.5,theme.color.defaultText),textDecoration:'none',cursor:'pointer',justifyContent:'space-between',lineHeight:'18px',padding:'7px 15px',display:'flex',alignItems:'center','& > * + *':{paddingLeft:10},'&:hover':{background:theme.background.hoverable},'&:hover svg':{opacity:1}}),({disabled})=>disabled?{cursor:'not-allowed'}:{});const getItemProps=memoizerific(100)((onClick,href,LinkWrapper)=>{const result={};if(onClick){Object.assign(result,{onClick});}if(href){Object.assign(result,{href});}if(LinkWrapper&&href){Object.assign(result,{to:href,as:LinkWrapper});}return result;});const ListItem=_a=>{var{loading,left,title,center,right,active,disabled,href,onClick,LinkWrapper}=_a,rest=__rest(_a,["loading","left","title","center","right","active","disabled","href","onClick","LinkWrapper"]);const itemProps=getItemProps(onClick,href,LinkWrapper);const commonProps={active,disabled};return React__default["default"].createElement(Item$3,Object.assign({},commonProps,rest,itemProps),left&&React__default["default"].createElement(Left,Object.assign({},commonProps),left),title||center?React__default["default"].createElement(Center,null,title&&React__default["default"].createElement(Title$1,Object.assign({},commonProps,{loading:loading}),title),center&&React__default["default"].createElement(CenterText,Object.assign({},commonProps),center)):null,right&&React__default["default"].createElement(Right,Object.assign({},commonProps),right));};ListItem.defaultProps={loading:false,left:null,title:React__default["default"].createElement("span",null,"Loading state"),center:null,right:null,active:false,disabled:false,href:null,LinkWrapper:null,onClick:null};const List$2=theming.styled.div({minWidth:180,overflow:'hidden',overflowY:'auto',maxHeight:13.5*32},({theme})=>({borderRadius:theme.appBorderRadius*2}));const Item$2=props=>{const{LinkWrapper,onClick:onClickFromProps}=props,rest=__rest(props,["LinkWrapper","onClick"]);const{title,href,active}=rest;const onClick=React.useCallback(event=>{onClickFromProps(event,rest);},[onClickFromProps]);const hasOnClick=!!onClickFromProps;return React__default["default"].createElement(ListItem,Object.assign({title:title,active:active,href:href,LinkWrapper:LinkWrapper},rest,hasOnClick?{onClick}:{}));};const TooltipLinkList=({links,LinkWrapper})=>React__default["default"].createElement(List$2,null,links.map(_a=>{var{isGatsby}=_a,p=__rest(_a,["isGatsby"]);return React__default["default"].createElement(Item$2,Object.assign({key:p.id,LinkWrapper:isGatsby?LinkWrapper:null},p));}));TooltipLinkList.defaultProps={LinkWrapper:ListItem.defaultProps.LinkWrapper};const Side=theming.styled.div({display:'flex',whiteSpace:'nowrap',flexBasis:'auto',flexShrink:0,marginLeft:3,marginRight:3},({left})=>left?{'& > *':{marginLeft:4}}:{},({right})=>right?{marginLeft:30,'& > *':{marginRight:4}}:{});Side.displayName='Side';const Bar$1=theming.styled(({children,className})=>React__default["default"].createElement(ScrollArea,{horizontal:true,vertical:false,className:className},children))(({theme})=>({color:theme.barTextColor,width:'100%',height:40,flexShrink:0,overflow:'auto',overflowY:'hidden'}),({theme,border})=>border?{boxShadow:`${theme.appBorderColor} 0 -1px 0 0 inset`,background:theme.barBg}:{});Bar$1.displayName='Bar';const BarInner=theming.styled.div(({bgColor})=>({display:'flex',justifyContent:'space-between',position:'relative',flexWrap:'nowrap',flexShrink:0,height:40,backgroundColor:bgColor||''}));const FlexBar=_a=>{var{children,backgroundColor}=_a,rest=__rest(_a,["children","backgroundColor"]);const[left,right]=React.Children.toArray(children);return React__default["default"].createElement(Bar$1,Object.assign({},rest),React__default["default"].createElement(BarInner,{bgColor:backgroundColor},React__default["default"].createElement(Side,{left:true},left),right?React__default["default"].createElement(Side,{right:true},right):null));};FlexBar.displayName='FlexBar';var top='top';var bottom='bottom';var right='right';var left='left';var auto='auto';var basePlacements=[top,bottom,right,left];var start='start';var end='end';var clippingParents='clippingParents';var viewport='viewport';var popper='popper';var reference='reference';var variationPlacements=/*#__PURE__*/basePlacements.reduce(function(acc,placement){return acc.concat([placement+"-"+start,placement+"-"+end]);},[]);var placements=/*#__PURE__*/[].concat(basePlacements,[auto]).reduce(function(acc,placement){return acc.concat([placement,placement+"-"+start,placement+"-"+end]);},[]);// modifiers that need to read the DOM
|
|
344
344
|
var beforeRead='beforeRead';var read='read';var afterRead='afterRead';// pure-logic modifiers
|
|
345
345
|
var beforeMain='beforeMain';var main='main';var afterMain='afterMain';// modifier with the purpose to write to the DOM (or write into a framework state)
|
|
346
|
-
var beforeWrite='beforeWrite';var write='write';var afterWrite='afterWrite';var modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];const ButtonOrLink=_a=>{var{children}=_a,restProps=__rest(_a,["children"]);return restProps.href!=null?React__default["default"].createElement("a",Object.assign({},restProps),children):React__default["default"].createElement("button",Object.assign({type:"button"},restProps),children);};const TabButton=theming.styled(ButtonOrLink,{shouldForwardProp:theming.isPropValid})({whiteSpace:'normal',display:'inline-flex',overflow:'hidden',verticalAlign:'top',justifyContent:'center',alignItems:'center',textAlign:'center',textDecoration:'none','&:empty':{display:'none'}},({theme})=>({padding:'0 15px',transition:'color 0.2s linear, border-bottom-color 0.2s linear',height:40,lineHeight:'12px',cursor:'pointer',background:'transparent',border:'0 solid transparent',borderTop:'3px solid transparent',borderBottom:'3px solid transparent',fontWeight:'bold',fontSize:13,'&:focus':{outline:'0 none',borderBottomColor:theme.color.secondary}}),({active,textColor,theme})=>active?{color:textColor||theme.barSelectedColor,borderBottomColor:theme.barSelectedColor}:{color:textColor||theme.barTextColor,borderBottomColor:'transparent'});TabButton.displayName='TabButton';const IconButton=theming.styled(ButtonOrLink,{shouldForwardProp:theming.isPropValid})(()=>({alignItems:'center',background:'transparent',border:'none',borderRadius:4,color:'inherit',cursor:'pointer',display:'inline-flex',fontSize:13,fontWeight:'bold',height:28,justifyContent:'center',marginTop:6,padding:'8px 7px','& > svg':{width:14}}),({active,theme})=>active?{backgroundColor:theme.background.hoverable,color:theme.color.secondary}:{},({disabled,theme})=>disabled?{opacity:0.5,cursor:'not-allowed'}:{'&:hover, &:focus-visible':{background:curriedTransparentize$1(0.88,theme.color.secondary),color:theme.color.secondary},'&:focus-visible':{outline:auto},'&:focus:not(:focus-visible)':{outline:'none'}});IconButton.displayName='IconButton';const IconPlaceholder=theming.styled.div(({theme})=>({width:14,height:14,backgroundColor:theme.appBorderColor,animation:`${theme.animation.glow} 1.5s ease-in-out infinite`}));const IconButtonSkeletonWrapper=theming.styled.div(()=>({marginTop:6,padding:7,height:28}));const IconButtonSkeleton=()=>React__default["default"].createElement(IconButtonSkeletonWrapper,null,React__default["default"].createElement(IconPlaceholder,null));const
|
|
346
|
+
var beforeWrite='beforeWrite';var write='write';var afterWrite='afterWrite';var modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];const ButtonOrLink=_a=>{var{children}=_a,restProps=__rest(_a,["children"]);return restProps.href!=null?React__default["default"].createElement("a",Object.assign({},restProps),children):React__default["default"].createElement("button",Object.assign({type:"button"},restProps),children);};const TabButton=theming.styled(ButtonOrLink,{shouldForwardProp:theming.isPropValid})({whiteSpace:'normal',display:'inline-flex',overflow:'hidden',verticalAlign:'top',justifyContent:'center',alignItems:'center',textAlign:'center',textDecoration:'none','&:empty':{display:'none'}},({theme})=>({padding:'0 15px',transition:'color 0.2s linear, border-bottom-color 0.2s linear',height:40,lineHeight:'12px',cursor:'pointer',background:'transparent',border:'0 solid transparent',borderTop:'3px solid transparent',borderBottom:'3px solid transparent',fontWeight:'bold',fontSize:13,'&:focus':{outline:'0 none',borderBottomColor:theme.color.secondary}}),({active,textColor,theme})=>active?{color:textColor||theme.barSelectedColor,borderBottomColor:theme.barSelectedColor}:{color:textColor||theme.barTextColor,borderBottomColor:'transparent'});TabButton.displayName='TabButton';const IconButton=theming.styled(ButtonOrLink,{shouldForwardProp:theming.isPropValid})(()=>({alignItems:'center',background:'transparent',border:'none',borderRadius:4,color:'inherit',cursor:'pointer',display:'inline-flex',fontSize:13,fontWeight:'bold',height:28,justifyContent:'center',marginTop:6,padding:'8px 7px','& > svg':{width:14}}),({active,theme})=>active?{backgroundColor:theme.background.hoverable,color:theme.color.secondary}:{},({disabled,theme})=>disabled?{opacity:0.5,cursor:'not-allowed'}:{'&:hover, &:focus-visible':{background:curriedTransparentize$1(0.88,theme.color.secondary),color:theme.color.secondary},'&:focus-visible':{outline:auto},'&:focus:not(:focus-visible)':{outline:'none'}});IconButton.displayName='IconButton';const IconPlaceholder=theming.styled.div(({theme})=>({width:14,height:14,backgroundColor:theme.appBorderColor,animation:`${theme.animation.glow} 1.5s ease-in-out infinite`}));const IconButtonSkeletonWrapper=theming.styled.div(()=>({marginTop:6,padding:7,height:28}));const IconButtonSkeleton=()=>React__default["default"].createElement(IconButtonSkeletonWrapper,null,React__default["default"].createElement(IconPlaceholder,null));const Wrapper$6=theming.styled.div(({theme,bordered})=>bordered?{backgroundClip:'padding-box',border:`1px solid ${theme.appBorderColor}`,borderRadius:theme.appBorderRadius,overflow:'hidden',boxSizing:'border-box'}:{},({absolute})=>absolute?{width:'100%',height:'100%',boxSizing:'border-box',display:'flex',flexDirection:'column'}:{display:'block'});const TabBar=theming.styled.div({overflow:'hidden','&:first-of-type':{marginLeft:-3}});const Content=theming.styled.div({display:'block',position:'relative'},({theme})=>({fontSize:theme.typography.size.s2-1,background:theme.background.content}),({bordered,theme})=>bordered?{borderRadius:`0 0 ${theme.appBorderRadius-1}px ${theme.appBorderRadius-1}px`}:{},({absolute,bordered})=>absolute?{height:`calc(100% - ${bordered?42:40}px)`,position:'absolute',left:0+(bordered?1:0),right:0+(bordered?1:0),bottom:0+(bordered?1:0),top:40+(bordered?1:0),overflow:'auto',[`& > *:first-child`]:{position:'absolute',left:0+(bordered?1:0),right:0+(bordered?1:0),bottom:0+(bordered?1:0),top:0+(bordered?1:0),height:`calc(100% - ${bordered?2:0}px)`,overflow:'auto'}}:{});const VisuallyHidden=theming.styled.div(({active})=>active?{display:'block'}:{display:'none'});const TabWrapper=({active,render,children})=>React__default["default"].createElement(VisuallyHidden,{active:active},render?render():children);const childrenToList=(children,selected)=>React.Children.toArray(children).map(({props:{title,id,color,children:childrenOfChild}},index)=>{const content=Array.isArray(childrenOfChild)?childrenOfChild[0]:childrenOfChild;return{active:selected?id===selected:index===0,title,id,color,render:typeof content==='function'?content:({active,key})=>React__default["default"].createElement(VisuallyHidden,{key:key,active:active,role:"tabpanel"},content)};});const Tabs=React.memo(({children,selected,actions,absolute,bordered,tools,backgroundColor,id:htmlId})=>{const list=childrenToList(children,selected);return list.length?React__default["default"].createElement(Wrapper$6,{absolute:absolute,bordered:bordered,id:htmlId},React__default["default"].createElement(FlexBar,{border:true,backgroundColor:backgroundColor},React__default["default"].createElement(TabBar,{role:"tablist"},list.map(({title,id,active,color})=>{const tabTitle=typeof title==='function'?title():title;return React__default["default"].createElement(TabButton,{id:`tabbutton-${csf.sanitize(tabTitle)}`,className:`tabbutton ${active?'tabbutton-active':''}`,type:"button",key:id,active:active,textColor:color,onClick:e=>{e.preventDefault();actions.onSelect(id);},role:"tab"},tabTitle);})),tools?React__default["default"].createElement(React.Fragment,null,tools):null),React__default["default"].createElement(Content,{id:"panel-tab-content",bordered:bordered,absolute:absolute},list.map(({id,active,render})=>render({key:id,active})))):React__default["default"].createElement(Placeholder,null,React__default["default"].createElement(React.Fragment,{key:"title"},"Nothing found"));});Tabs.displayName='Tabs';Tabs.defaultProps={id:null,children:null,tools:null,selected:null,absolute:false,bordered:false};class TabsState extends React.Component{constructor(props){super(props);this.handlers={onSelect:id=>this.setState({selected:id})};this.state={selected:props.initial};}render(){const{bordered=false,absolute=false,children,backgroundColor}=this.props;const{selected}=this.state;return React__default["default"].createElement(Tabs,{bordered:bordered,absolute:absolute,selected:selected,backgroundColor:backgroundColor,actions:this.handlers},children);}}TabsState.defaultProps={children:[],initial:null,absolute:false,bordered:false,backgroundColor:''};const Separator=theming.styled.span(({theme})=>({width:1,height:20,background:theme.appBorderColor,marginTop:10,marginLeft:6,marginRight:2}),({force})=>force?{}:{'& + &':{display:'none'}});Separator.displayName='Separator';const interleaveSeparators=list=>list.reduce((acc,item,index)=>item?React__default["default"].createElement(React.Fragment,{key:item.id||item.key||`f-${index}`},acc,index>0?React__default["default"].createElement(Separator,{key:`s-${index}`}):null,item.render()||item):acc,null);const usePrevious=value=>{const ref=React.useRef();React.useEffect(()=>{// happens after return
|
|
347
347
|
ref.current=value;},[value]);return ref.current;};const useUpdate=(update,value)=>{const previousValue=usePrevious(value);return update?value:previousValue;};const AddonPanel=({active,children})=>{return(// the transform is to prevent a bug where the content would be invisible
|
|
348
348
|
// the hidden attribute is an valid html element that's both accessible and works to visually hide content
|
|
349
349
|
React__default["default"].createElement("div",{hidden:!active,style:{transform:'translateX(0px)'}},useUpdate(active,children)));};const StorybookLogo=_a=>{var{alt}=_a,props=__rest(_a,["alt"]);return React__default["default"].createElement("svg",Object.assign({width:"200px",height:"40px",viewBox:"0 0 200 40"},props,{role:"img"}),alt?React__default["default"].createElement("title",null,alt):null,React__default["default"].createElement("defs",null,React__default["default"].createElement("path",{d:"M1.2 36.9L0 3.9c0-1.1.8-2 1.9-2.1l28-1.8a2 2 0 0 1 2.2 1.9 2 2 0 0 1 0 .1v36a2 2 0 0 1-2 2 2 2 0 0 1-.1 0L3.2 38.8a2 2 0 0 1-2-2z",id:"a"})),React__default["default"].createElement("g",{fill:"none",fillRule:"evenodd"},React__default["default"].createElement("path",{d:"M53.3 31.7c-1.7 0-3.4-.3-5-.7-1.5-.5-2.8-1.1-3.9-2l1.6-3.5c2.2 1.5 4.6 2.3 7.3 2.3 1.5 0 2.5-.2 3.3-.7.7-.5 1.1-1 1.1-1.9 0-.7-.3-1.3-1-1.7s-2-.8-3.7-1.2c-2-.4-3.6-.9-4.8-1.5-1.1-.5-2-1.2-2.6-2-.5-1-.8-2-.8-3.2 0-1.4.4-2.6 1.2-3.6.7-1.1 1.8-2 3.2-2.6 1.3-.6 2.9-.9 4.7-.9 1.6 0 3.1.3 4.6.7 1.5.5 2.7 1.1 3.5 2l-1.6 3.5c-2-1.5-4.2-2.3-6.5-2.3-1.3 0-2.3.2-3 .8-.8.5-1.2 1.1-1.2 2 0 .5.2 1 .5 1.3.2.3.7.6 1.4.9l2.9.8c2.9.6 5 1.4 6.2 2.4a5 5 0 0 1 2 4.2 6 6 0 0 1-2.5 5c-1.7 1.2-4 1.9-7 1.9zm21-3.6l1.4-.1-.2 3.5-1.9.1c-2.4 0-4.1-.5-5.2-1.5-1.1-1-1.6-2.7-1.6-4.8v-6h-3v-3.6h3V11h4.8v4.6h4v3.6h-4v6c0 1.8.9 2.8 2.6 2.8zm11.1 3.5c-1.6 0-3-.3-4.3-1a7 7 0 0 1-3-2.8c-.6-1.3-1-2.7-1-4.4 0-1.6.4-3 1-4.3a7 7 0 0 1 3-2.8c1.2-.7 2.7-1 4.3-1 1.7 0 3.2.3 4.4 1a7 7 0 0 1 3 2.8c.6 1.2 1 2.7 1 4.3 0 1.7-.4 3.1-1 4.4a7 7 0 0 1-3 2.8c-1.2.7-2.7 1-4.4 1zm0-3.6c2.4 0 3.6-1.6 3.6-4.6 0-1.5-.3-2.6-1-3.4a3.2 3.2 0 0 0-2.6-1c-2.3 0-3.5 1.4-3.5 4.4 0 3 1.2 4.6 3.5 4.6zm21.7-8.8l-2.7.3c-1.3.2-2.3.5-2.8 1.2-.6.6-.9 1.4-.9 2.5v8.2H96V15.7h4.6v2.6c.8-1.8 2.5-2.8 5-3h1.3l.3 4zm14-3.5h4.8L116.4 37h-4.9l3-6.6-6.4-14.8h5l4 10 4-10zm16-.4c1.4 0 2.6.3 3.6 1 1 .6 1.9 1.6 2.5 2.8.6 1.2.9 2.7.9 4.3 0 1.6-.3 3-1 4.3a6.9 6.9 0 0 1-2.4 2.9c-1 .7-2.2 1-3.6 1-1 0-2-.2-3-.7-.8-.4-1.5-1-2-1.9v2.4h-4.7V8.8h4.8v9c.5-.8 1.2-1.4 2-1.9.9-.4 1.8-.6 3-.6zM135.7 28c1.1 0 2-.4 2.6-1.2.6-.8 1-2 1-3.4 0-1.5-.4-2.5-1-3.3s-1.5-1.1-2.6-1.1-2 .3-2.6 1.1c-.6.8-1 2-1 3.3 0 1.5.4 2.6 1 3.4.6.8 1.5 1.2 2.6 1.2zm18.9 3.6c-1.7 0-3.2-.3-4.4-1a7 7 0 0 1-3-2.8c-.6-1.3-1-2.7-1-4.4 0-1.6.4-3 1-4.3a7 7 0 0 1 3-2.8c1.2-.7 2.7-1 4.4-1 1.6 0 3 .3 4.3 1a7 7 0 0 1 3 2.8c.6 1.2 1 2.7 1 4.3 0 1.7-.4 3.1-1 4.4a7 7 0 0 1-3 2.8c-1.2.7-2.7 1-4.3 1zm0-3.6c2.3 0 3.5-1.6 3.5-4.6 0-1.5-.3-2.6-1-3.4a3.2 3.2 0 0 0-2.5-1c-2.4 0-3.6 1.4-3.6 4.4 0 3 1.2 4.6 3.6 4.6zm18 3.6c-1.7 0-3.2-.3-4.4-1a7 7 0 0 1-3-2.8c-.6-1.3-1-2.7-1-4.4 0-1.6.4-3 1-4.3a7 7 0 0 1 3-2.8c1.2-.7 2.7-1 4.4-1 1.6 0 3 .3 4.4 1a7 7 0 0 1 2.9 2.8c.6 1.2 1 2.7 1 4.3 0 1.7-.4 3.1-1 4.4a7 7 0 0 1-3 2.8c-1.2.7-2.7 1-4.3 1zm0-3.6c2.3 0 3.5-1.6 3.5-4.6 0-1.5-.3-2.6-1-3.4a3.2 3.2 0 0 0-2.5-1c-2.4 0-3.6 1.4-3.6 4.4 0 3 1.2 4.6 3.6 4.6zm27.4 3.4h-6l-6-7v7h-4.8V8.8h4.9v13.6l5.8-6.7h5.7l-6.6 7.5 7 8.2z",fill:"currentColor"}),React__default["default"].createElement("mask",{id:"b",fill:"#fff"},React__default["default"].createElement("use",{xlinkHref:"#a"})),React__default["default"].createElement("use",{fill:"#FF4785",fillRule:"nonzero",xlinkHref:"#a"}),React__default["default"].createElement("path",{d:"M23.7 5L24 .2l3.9-.3.1 4.8a.3.3 0 0 1-.5.2L26 3.8l-1.7 1.4a.3.3 0 0 1-.5-.3zm-5 10c0 .9 5.3.5 6 0 0-5.4-2.8-8.2-8-8.2-5.3 0-8.2 2.8-8.2 7.1 0 7.4 10 7.6 10 11.6 0 1.2-.5 1.9-1.8 1.9-1.6 0-2.2-.9-2.1-3.6 0-.6-6.1-.8-6.3 0-.5 6.7 3.7 8.6 8.5 8.6 4.6 0 8.3-2.5 8.3-7 0-7.9-10.2-7.7-10.2-11.6 0-1.6 1.2-1.8 2-1.8.6 0 2 0 1.9 3z",fill:"#FFF",fillRule:"nonzero",mask:"url(#b)"})));};const StorybookIcon=_a=>{var props=__rest(_a,[]);return React__default["default"].createElement("svg",Object.assign({viewBox:"0 0 64 64"},props),React__default["default"].createElement("title",null,"Storybook icon"),React__default["default"].createElement("g",{id:"Artboard",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},React__default["default"].createElement("path",{d:"M8.04798541,58.7875918 L6.07908839,6.32540407 C6.01406344,4.5927838 7.34257463,3.12440831 9.07303814,3.01625434 L53.6958037,0.227331489 C55.457209,0.117243658 56.974354,1.45590096 57.0844418,3.21730626 C57.0885895,3.28366922 57.0906648,3.35014546 57.0906648,3.41663791 L57.0906648,60.5834697 C57.0906648,62.3483119 55.6599776,63.7789992 53.8951354,63.7789992 C53.847325,63.7789992 53.7995207,63.7779262 53.7517585,63.775781 L11.0978899,61.8600599 C9.43669044,61.7854501 8.11034889,60.4492961 8.04798541,58.7875918 Z",id:"path-1",fill:"#FF4785",fillRule:"nonzero"}),React__default["default"].createElement("path",{d:"M35.9095005,24.1768792 C35.9095005,25.420127 44.2838488,24.8242707 45.4080313,23.9509748 C45.4080313,15.4847538 40.8652557,11.0358878 32.5466666,11.0358878 C24.2280775,11.0358878 19.5673077,15.553972 19.5673077,22.3311017 C19.5673077,34.1346028 35.4965208,34.3605071 35.4965208,40.7987804 C35.4965208,42.606015 34.6115646,43.6790606 32.6646607,43.6790606 C30.127786,43.6790606 29.1248356,42.3834613 29.2428298,37.9783269 C29.2428298,37.0226907 19.5673077,36.7247626 19.2723223,37.9783269 C18.5211693,48.6535354 25.1720308,51.7326752 32.7826549,51.7326752 C40.1572906,51.7326752 45.939005,47.8018145 45.939005,40.6858282 C45.939005,28.035186 29.7738035,28.3740425 29.7738035,22.1051974 C29.7738035,19.5637737 31.6617103,19.2249173 32.7826549,19.2249173 C33.9625966,19.2249173 36.0864917,19.4328883 35.9095005,24.1768792 Z",id:"path9_fill-path",fill:"#FFFFFF",fillRule:"nonzero"}),React__default["default"].createElement("path",{d:"M44.0461638,0.830433986 L50.1874092,0.446606143 L50.443532,7.7810017 C50.4527198,8.04410717 50.2468789,8.26484453 49.9837734,8.27403237 C49.871115,8.27796649 49.7607078,8.24184808 49.6721567,8.17209069 L47.3089847,6.3104681 L44.5110468,8.43287463 C44.3012992,8.591981 44.0022839,8.55092814 43.8431776,8.34118051 C43.7762017,8.25288717 43.742082,8.14401677 43.7466857,8.03329059 L44.0461638,0.830433986 Z",id:"Path",fill:"#FFFFFF"})));};function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);}return t;}).apply(this,arguments);}var n=/[\'\"]/;const r=["children","options"],o=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","className","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((t,e)=>(t[e.toLowerCase()]=e,t),{for:"htmlFor"}),c={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},a=["style","script"],u=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,i=/mailto:/i,l=/\n{2,}$/,s=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,_=/^ *> ?/gm,f=/^ {2,}\n/,d=/^(?:( *[-*_]) *){3,}(?:\n *)+\n/,p=/^\s*(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n *)+\n?/,g=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,m=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,y=/^(?:\n *)*\n/,h=/\r\n?/g,k=/^\[\^([^\]]+)](:.*)\n/,x=/^\[\^([^\]]+)]/,v=/\f/g,b=/^\s*?\[(x|\s)\]/,S=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,$=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,w=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,z=/&([a-z]+);/g,E=/^<!--[\s\S]*?(?:-->)/,A=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,R=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,I=/^\{.*\}$/,M=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,O=/^<([^ >]+@[^ >]+)>/,B=/^<([^ >]+:\/[^ >]+)>/,L=/ *\n+$/,T=/(?:^|\n)( *)$/,j=/-([a-z])?/gi,C=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,D=/^\[([^\]]*)\]:\s*(\S+)\s*("([^"]*)")?/,N=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Z=/^\[([^\]]*)\] ?\[([^\]]*)\]/,F=/(\[|\])/g,P=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,G=/\t/g,H=/^ *\| */,q=/(^ *\||\| *$)/g,U=/ *$/,V=/^ *:-+: *$/,W=/^ *:-+ *$/,Q=/^ *-+: *$/,X=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,J=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,K=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,Y=/^\\([^0-9A-Za-z\s])/,tt=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,et=/^\n+/,nt=/^([ \t]*)/,rt=/\\([^0-9A-Z\s])/gi,ot=new RegExp("^( *)((?:[*+-]|\\d+\\.)) +"),ct=new RegExp("^( *)((?:[*+-]|\\d+\\.)) +[^\\n]*(?:\\n(?!\\1(?:[*+-]|\\d+\\.) )[^\\n]*)*(\\n|$)","gm"),at=new RegExp("^( *)((?:[*+-]|\\d+\\.)) [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1(?:[*+-]|\\d+\\.) (?!(?:[*+-]|\\d+\\.) ))\\n*|\\s*\\n*$)"),ut="(?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*",it=new RegExp("^\\[("+ut+")\\]\\(\\s*<?((?:[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),lt=new RegExp("^!\\[("+ut+")\\]\\(\\s*<?((?:[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),st=[s,g,p,S,$,E,ct,at,C],_t=[...st,/^[^\n]+(?: \n|\n{2,})/,w,R];function ft(t){return t.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase();}function dt(t){return Q.test(t)?"right":V.test(t)?"center":W.test(t)?"left":null;}function pt(t,e,n){const r=n.t;n.t=!0;const o=e(t.trim(),n);n.t=r;let c=[[]];return o.forEach(function(t,e){"tableSeparator"===t.type?0!==e&&e!==o.length-1&&c.push([]):("text"!==t.type||null!=o[e+1]&&"tableSeparator"!==o[e+1].type||(t.content=t.content.replace(U,"")),c[c.length-1].push(t));}),c;}function gt(t,e,n){n.o=!0;const r=pt(t[1],e,n),o=t[2].replace(q,"").split("|").map(dt),c=function(t,e,n){return t.trim().split("\n").map(function(t){return pt(t,e,n);});}(t[3],e,n);return n.o=!1,{align:o,cells:c,header:r,type:"table"};}function mt(t,e){return null==t.align[e]?{}:{textAlign:t.align[e]};}function yt(t){return function(e,n){return n.o?t.exec(e):null;};}function ht(t){return function(e,n){return n.o||n.u?t.exec(e):null;};}function kt(t){return function(e,n){return n.o||n.u?null:t.exec(e);};}function xt(t){return function(e){return t.exec(e);};}function vt(t,e,n){if(e.o||e.u)return null;if(n&&!n.endsWith("\n"))return null;let r="";t.split("\n").every(t=>!st.some(e=>e.test(t))&&(r+=t+"\n",t.trim()));const o=r.trimEnd();return""==o?null:[r,o];}function bt(t){try{if(decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data):/i))return null;}catch(t){return null;}return t;}function St(t){return t.replace(rt,"$1");}function $t(t,e,n){const r=n.o||!1,o=n.u||!1;n.o=!0,n.u=!0;const c=t(e,n);return n.o=r,n.u=o,c;}function wt(t,e,n){const r=n.o||!1,o=n.u||!1;n.o=!1,n.u=!0;const c=t(e,n);return n.o=r,n.u=o,c;}function zt(t,e,n){return n.o=!1,t(e+"\n\n",n);}const Et=(t,e,n)=>({content:$t(e,t[1],n)});function At(){return{};}function Rt(){return null;}function It(...t){return t.filter(Boolean).join(" ");}function Mt(t,e,n){let r=t;const o=e.split(".");for(;o.length&&(r=r[o[0]],void 0!==r);)o.shift();return r||n;}var Ot;function Bt(r,q={}){q.overrides=q.overrides||{},q.slugify=q.slugify||ft,q.namedCodesToUnicode=q.namedCodesToUnicode?e({},c,q.namedCodesToUnicode):c;const U=q.createElement||React__default["default"].createElement;function V(t,n,...r){const o=Mt(q.overrides,`${t}.props`,{});return U(function(t,e){const n=Mt(e,t);return n?"function"==typeof n||"object"==typeof n&&"render"in n?n:Mt(e,`${t}.component`,t):t;}(t,q.overrides),e({},n,o,{className:It(null==n?void 0:n.className,o.className)||void 0}),...r);}function W(e){let n=!1;q.forceInline?n=!0:q.forceBlock||(n=!1===P.test(e));const r=pt(dt(n?e:`${e.trimEnd().replace(et,"")}\n\n`,{o:n}));for(;"string"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===q.wrapper)return r;const o=q.wrapper||(n?"span":"div");let c;if(r.length>1||q.forceWrapper)c=r;else{if(1===r.length)return c=r[0],"string"==typeof c?V("span",{key:"outer"},c):c;c=null;}return React__default["default"].createElement(o,{key:"outer"},c);}function Q(e){const r=e.match(u);return r?r.reduce(function(e,r,c){const a=r.indexOf("=");if(-1!==a){const u=function(t){return-1!==t.indexOf("-")&&null===t.match(A)&&(t=t.replace(j,function(t,e){return e.toUpperCase();})),t;}(r.slice(0,a)).trim(),i=function(t){return t?(n.test(t.charAt(0))&&(t=t.substr(1)),n.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):"";}(r.slice(a+1).trim()),l=o[u]||u,s=e[l]=function(t,e){return"style"===t?e.split(/;\s?/).reduce(function(t,e){const n=e.slice(0,e.indexOf(":"));return t[n.replace(/(-[a-z])/g,t=>t[1].toUpperCase())]=e.slice(n.length+1).trim(),t;},{}):"href"===t?bt(e):(e.match(I)&&(e=e.slice(1,e.length-1)),"true"===e||"false"!==e&&e);}(u,i);"string"==typeof s&&(w.test(s)||R.test(s))&&(e[l]=React__default["default"].cloneElement(W(s.trim()),{key:c}));}else"style"!==r&&(e[o[r]||r]=!0);return e;},{}):void 0;}const rt=[],ut={},st={blockQuote:{i:kt(s),l:Ot.HIGH,_:(t,e,n)=>({content:e(t[0].replace(_,""),n)}),p:(t,e,n)=>V("blockquote",{key:n.g},e(t.content,n))},breakLine:{i:xt(f),l:Ot.HIGH,_:At,p:(t,e,n)=>V("br",{key:n.g})},breakThematic:{i:kt(d),l:Ot.HIGH,_:At,p:(t,e,n)=>V("hr",{key:n.g})},codeBlock:{i:kt(g),l:Ot.MAX,_:t=>({content:t[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),lang:void 0}),p:(t,e,n)=>V("pre",{key:n.g},V("code",{className:t.lang?`lang-${t.lang}`:""},t.content))},codeFenced:{i:kt(p),l:Ot.MAX,_:t=>({content:t[3],lang:t[2]||void 0,type:"codeBlock"})},codeInline:{i:ht(m),l:Ot.LOW,_:t=>({content:t[2]}),p:(t,e,n)=>V("code",{key:n.g},t.content)},footnote:{i:kt(k),l:Ot.MAX,_:t=>(rt.push({footnote:t[2],identifier:t[1]}),{}),p:Rt},footnoteReference:{i:yt(x),l:Ot.HIGH,_:t=>({content:t[1],target:`#${q.slugify(t[1])}`}),p:(t,e,n)=>V("a",{key:n.g,href:bt(t.target)},V("sup",{key:n.g},t.content))},gfmTask:{i:yt(b),l:Ot.HIGH,_:t=>({completed:"x"===t[1].toLowerCase()}),p:(t,e,n)=>V("input",{checked:t.completed,key:n.g,readOnly:!0,type:"checkbox"})},heading:{i:kt(S),l:Ot.HIGH,_:(t,e,n)=>({content:$t(e,t[2],n),id:q.slugify(t[2]),level:t[1].length}),p:(t,e,n)=>(t.tag=`h${t.level}`,V(t.tag,{id:t.id,key:n.g},e(t.content,n)))},headingSetext:{i:kt($),l:Ot.MAX,_:(t,e,n)=>({content:$t(e,t[1],n),level:"="===t[2]?1:2,type:"heading"})},htmlComment:{i:xt(E),l:Ot.HIGH,_:()=>({}),p:Rt},image:{i:ht(lt),l:Ot.HIGH,_:t=>({alt:t[1],target:St(t[2]),title:t[3]}),p:(t,e,n)=>V("img",{key:n.g,alt:t.alt||void 0,title:t.title||void 0,src:bt(t.target)})},link:{i:yt(it),l:Ot.LOW,_:(t,e,n)=>({content:wt(e,t[1],n),target:St(t[2]),title:t[3]}),p:(t,e,n)=>V("a",{key:n.g,href:bt(t.target),title:t.title},e(t.content,n))},linkAngleBraceStyleDetector:{i:yt(B),l:Ot.MAX,_:t=>({content:[{content:t[1],type:"text"}],target:t[1],type:"link"})},linkBareUrlDetector:{i:(t,e)=>e.m?null:yt(M)(t,e),l:Ot.MAX,_:t=>({content:[{content:t[1],type:"text"}],target:t[1],title:void 0,type:"link"})},linkMailtoDetector:{i:yt(O),l:Ot.MAX,_(t){let e=t[1],n=t[1];return i.test(n)||(n="mailto:"+n),{content:[{content:e.replace("mailto:",""),type:"text"}],target:n,type:"link"};}},list:{i(t,e,n){const r=T.exec(n);return!r||!e.h&&e.o?null:at.exec(t=r[1]+t);},l:Ot.HIGH,_(t,e,n){const r=t[2],o=r.length>1,c=o?+r:void 0,a=t[0].replace(l,"\n").match(ct);let u=!1;return{items:a.map(function(t,r){const o=ot.exec(t)[0].length,c=new RegExp("^ {1,"+o+"}","gm"),i=t.replace(c,"").replace(ot,""),l=r===a.length-1,s=-1!==i.indexOf("\n\n")||l&&u;u=s;const _=n.o,f=n.h;let d;n.h=!0,s?(n.o=!1,d=i.replace(L,"\n\n")):(n.o=!0,d=i.replace(L,""));const p=e(d,n);return n.o=_,n.h=f,p;}),ordered:o,start:c};},p:(t,e,n)=>V(t.ordered?"ol":"ul",{key:n.g,start:t.start},t.items.map(function(t,r){return V("li",{key:r},e(t,n));}))},newlineCoalescer:{i:kt(y),l:Ot.LOW,_:At,p:()=>"\n"},paragraph:{i:vt,l:Ot.LOW,_:Et,p:(t,e,n)=>V("p",{key:n.g},e(t.content,n))},ref:{i:yt(D),l:Ot.MAX,_:t=>(ut[t[1]]={target:t[2],title:t[4]},{}),p:Rt},refImage:{i:ht(N),l:Ot.MAX,_:t=>({alt:t[1]||void 0,ref:t[2]}),p:(t,e,n)=>V("img",{key:n.g,alt:t.alt,src:bt(ut[t.ref].target),title:ut[t.ref].title})},refLink:{i:yt(Z),l:Ot.MAX,_:(t,e,n)=>({content:e(t[1],n),fallbackContent:e(t[0].replace(F,"\\$1"),n),ref:t[2]}),p:(t,e,n)=>ut[t.ref]?V("a",{key:n.g,href:bt(ut[t.ref].target),title:ut[t.ref].title},e(t.content,n)):V("span",{key:n.g},e(t.fallbackContent,n))},table:{i:kt(C),l:Ot.HIGH,_:gt,p:(t,e,n)=>V("table",{key:n.g},V("thead",null,V("tr",null,t.header.map(function(r,o){return V("th",{key:o,style:mt(t,o)},e(r,n));}))),V("tbody",null,t.cells.map(function(r,o){return V("tr",{key:o},r.map(function(r,o){return V("td",{key:o,style:mt(t,o)},e(r,n));}));})))},tableSeparator:{i:function(t,e){return e.t?H.exec(t):null;},l:Ot.HIGH,_:function(){return{type:"tableSeparator"};},p:()=>" | "},text:{i:xt(tt),l:Ot.MIN,_:t=>({content:t[0].replace(z,(t,e)=>q.namedCodesToUnicode[e]?q.namedCodesToUnicode[e]:t)}),p:t=>t.content},textBolded:{i:ht(X),l:Ot.MED,_:(t,e,n)=>({content:e(t[2],n)}),p:(t,e,n)=>V("strong",{key:n.g},e(t.content,n))},textEmphasized:{i:ht(J),l:Ot.LOW,_:(t,e,n)=>({content:e(t[2],n)}),p:(t,e,n)=>V("em",{key:n.g},e(t.content,n))},textEscaped:{i:ht(Y),l:Ot.HIGH,_:t=>({content:t[1],type:"text"})},textStrikethroughed:{i:ht(K),l:Ot.LOW,_:Et,p:(t,e,n)=>V("del",{key:n.g},e(t.content,n))}};!0!==q.disableParsingRawHTML&&(st.htmlBlock={i:xt(w),l:Ot.HIGH,_(t,e,n){const[,r]=t[3].match(nt),o=new RegExp(`^${r}`,"gm"),c=t[3].replace(o,""),u=(i=c,_t.some(t=>t.test(i))?zt:$t);var i;const l=t[1].toLowerCase(),s=-1!==a.indexOf(l);n.m=n.m||"a"===l;const _=s?t[3]:u(e,c,n);return n.m=!1,{attrs:Q(t[2]),content:_,noInnerParse:s,tag:s?l:t[1]};},p:(t,n,r)=>V(t.tag,e({key:r.g},t.attrs),t.noInnerParse?t.content:n(t.content,r))},st.htmlSelfClosing={i:xt(R),l:Ot.HIGH,_:t=>({attrs:Q(t[2]||""),tag:t[1]}),p:(t,n,r)=>V(t.tag,e({},t.attrs,{key:r.g}))});const dt=function(t){let e=Object.keys(t);function n(r,o){let c=[],a="";for(;r;){let u=0;for(;u<e.length;){const i=e[u],l=t[i],s=l.i(r,o,a);if(s){const t=s[0];r=r.substring(t.length);const e=l._(s,n,o);null==e.type&&(e.type=i),c.push(e),a=t;break;}u++;}}return c;}return e.sort(function(e,n){let r=t[e].l,o=t[n].l;return r!==o?r-o:e<n?-1:1;}),function(t,e){return n(function(t){return t.replace(h,"\n").replace(v,"").replace(G," ");}(t),e);};}(st),pt=(Bt=function(t){return function(e,n,r){return t[e.type].p(e,n,r);};}(st),function t(e,n={}){if(Array.isArray(e)){const r=n.g,o=[];let c=!1;for(let r=0;r<e.length;r++){n.g=r;const a=t(e[r],n),u="string"==typeof a;u&&c?o[o.length-1]+=a:null!==a&&o.push(a),c=u;}return n.g=r,o;}return Bt(e,t,n);});var Bt;const Lt=W(r);return rt.length?V("div",null,Lt,V("footer",{key:"footer"},rt.map(function(t){return V("div",{id:q.slugify(t.identifier),key:t.identifier},t.identifier,pt(dt(t.footnote,{o:!0})));}))):Lt;}!function(t){t[t.MAX=0]="MAX",t[t.HIGH=1]="HIGH",t[t.MED=2]="MED",t[t.LOW=3]="LOW",t[t.MIN=4]="MIN";}(Ot||(Ot={}));var Markdown=e=>{let{children:n,options:o}=e,c=function(t,e){if(null==t)return{};var n,r,o={},c=Object.keys(t);for(r=0;r<c.length;r++)e.indexOf(n=c[r])>=0||(o[n]=t[n]);return o;}(e,r);return React__default["default"].cloneElement(Bt(n,o),c);};/**
|
|
@@ -376,7 +376,7 @@ if(CONFIG_TYPE!=='DEVELOPMENT'||!EventSource)return undefined;const eventSource=
|
|
|
376
376
|
* items. The preview also shows the source for the component
|
|
377
377
|
* as a drop-down.
|
|
378
378
|
*/const Preview=_a=>{var{isLoading,isColumn,columns,children,withSource,withToolbar=false,isExpanded=false,additionalActions,className}=_a,props=__rest(_a,["isLoading","isColumn","columns","children","withSource","withToolbar","isExpanded","additionalActions","className"]);const[expanded,setExpanded]=React.useState(isExpanded);const{source,actionItem}=getSource(withSource,expanded,setExpanded);const[scale,setScale]=React.useState(1);const previewClasses=[className].concat(['sbdocs','sbdocs-preview']);const defaultActionItems=withSource?[actionItem]:[];const[additionalActionItems,setAdditionalActionItems]=React.useState(additionalActions?[...additionalActions]:[]);const actionItems=[...defaultActionItems,...additionalActionItems];// @ts-ignore
|
|
379
|
-
const layout=getLayout(React.Children.count(children)===1?[children]:children);const{window:globalWindow}=window_1;const copyToClipboard=React.useCallback(text=>__awaiter(void 0,void 0,void 0,function*(){const{createCopyToClipboardFunction}=yield Promise.resolve().then(function(){return require('./syntaxhighlighter-
|
|
379
|
+
const layout=getLayout(React.Children.count(children)===1?[children]:children);const{window:globalWindow}=window_1;const copyToClipboard=React.useCallback(text=>__awaiter(void 0,void 0,void 0,function*(){const{createCopyToClipboardFunction}=yield Promise.resolve().then(function(){return require('./syntaxhighlighter-3f6db113.js');});createCopyToClipboardFunction();}),[]);const onCopyCapture=e=>{e.preventDefault();if(additionalActionItems.filter(item=>item.title==='Copied').length===0){copyToClipboard(source.props.code).then(()=>{setAdditionalActionItems([...additionalActionItems,{title:'Copied',onClick:()=>{}}]);globalWindow.setTimeout(()=>setAdditionalActionItems(additionalActionItems.filter(item=>item.title!=='Copied')),1500);});}};return React__default["default"].createElement(PreviewContainer,Object.assign({},{withSource,withToolbar},props,{className:previewClasses.join(' ')}),withToolbar&&React__default["default"].createElement(PositionedToolbar,{isLoading:isLoading,border:true,zoom:z=>setScale(scale*z),resetZoom:()=>setScale(1),storyId:getStoryId(children),baseUrl:"./iframe.html"}),React__default["default"].createElement(ZoomContext.Provider,{value:{scale}},React__default["default"].createElement(Relative,{className:"docs-story",onCopyCapture:withSource&&onCopyCapture},React__default["default"].createElement(ChildrenContainer,{isColumn:isColumn||!Array.isArray(children),columns:columns,layout:layout},React__default["default"].createElement(Zoom$1.Element,{scale:scale},Array.isArray(children)?// eslint-disable-next-line react/no-array-index-key
|
|
380
380
|
children.map((child,i)=>React__default["default"].createElement("div",{key:i},child)):React__default["default"].createElement("div",null,children))),React__default["default"].createElement(ActionBar,{actionItems:actionItems}))),withSource&&expanded&&source);};const StyledPreview=theming.styled(Preview)(()=>({'.docs-story':{paddingTop:32,paddingBottom:40}}));const PreviewSkeleton=()=>React__default["default"].createElement(StyledPreview,{isLoading:true,withToolbar:true},React__default["default"].createElement(StorySkeleton,null));/**
|
|
381
381
|
* A specialized version of `_.map` for arrays without support for iteratee
|
|
382
382
|
* shorthands.
|
|
@@ -2010,7 +2010,7 @@ JsonTree.defaultProps={rootName:'root',isCollapsed:(keyPath,deep)=>deep!==-1,get
|
|
|
2010
2010
|
${curriedLighten$1(0.02,theme.input.background)} ${(value-min)/(max-min)*100}%,
|
|
2011
2011
|
${curriedLighten$1(0.02,theme.input.background)} 100%)`,boxShadow:`${theme.appBorderColor} 0 0 0 1px inset`,color:'transparent',width:'100%',height:'6px',cursor:'pointer'},'&::-ms-fill-lower':{borderRadius:6},'&::-ms-fill-upper':{borderRadius:6},'&::-ms-thumb':{width:16,height:16,background:`${theme.input.background}`,border:`1px solid ${rgba(theme.appBorderColor,0.2)}`,borderRadius:50,cursor:'grab',marginTop:0},'@supports (-ms-ime-align:auto)':{'input[type=range]':{margin:'0'}}}));const RangeLabel=theming.styled.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:'nowrap',fontFeatureSettings:'tnum',fontVariantNumeric:'tabular-nums'});const RangeWrapper=theming.styled.div({display:'flex',alignItems:'center',width:'100%'});function getNumberOfDecimalPlaces(number){const match=number.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return!match?0:Math.max(0,// Number of digits right of decimal point.
|
|
2012
2012
|
(match[1]?match[1].length:0)-(// Adjust for scientific notation.
|
|
2013
|
-
match[2]?+match[2]:0));}const RangeControl=({name,value,onChange,min=0,max=100,step=1,onBlur,onFocus})=>{const handleChange=event=>{onChange(parse$1(event.target.value));};const hasValue=value!==undefined;const numberOFDecimalsPlaces=React.useMemo(()=>getNumberOfDecimalPlaces(step),[step]);return React__default["default"].createElement(RangeWrapper,null,React__default["default"].createElement(RangeLabel,null,min),React__default["default"].createElement(RangeInput,Object.assign({id:getControlId(name),type:"range",onChange:handleChange},{name,value,min,max,step,onFocus,onBlur})),React__default["default"].createElement(RangeLabel,null,`${hasValue?value.toFixed(numberOFDecimalsPlaces):'--'}`," / ",max));};const Wrapper$1=theming.styled.label({display:'flex'});const TextControl=({name,value,onChange,onFocus,onBlur})=>{const handleChange=event=>{onChange(event.target.value);};const[forceVisible,setForceVisible]=React.useState(false);const onForceVisible=React.useCallback(()=>{onChange('');setForceVisible(true);},[setForceVisible]);if(value===undefined){return React__default["default"].createElement(Form.Button,{id:getControlSetterButtonId(name),onClick:onForceVisible},"Set string");}const isValid=typeof value==='string';return React__default["default"].createElement(Wrapper$1,null,React__default["default"].createElement(Form.Textarea,Object.assign({id:getControlId(name),onChange:handleChange,size:"flex",placeholder:"Edit string...",autoFocus:forceVisible,valid:isValid?null:'error'},{name,value:isValid?value:'',onFocus,onBlur})));};const FileInput=theming.styled(Form.Input)({padding:10});function revokeOldUrls(urls){urls.forEach(url=>{if(url.startsWith('blob:')){URL.revokeObjectURL(url);}});}const FilesControl=({onChange,name,accept='image/*',value})=>{function handleFileChange(e){if(!e.target.files){return;}const fileUrls=Array.from(e.target.files).map(file=>URL.createObjectURL(file));onChange(fileUrls);revokeOldUrls(value);}return React__default["default"].createElement(FileInput,{id:getControlId(name),type:"file",name:name,multiple:true,onChange:handleFileChange,accept:accept,size:"flex"});};const LazyColorControl=React.lazy(()=>Promise.resolve().then(function(){return require('./Color-
|
|
2013
|
+
match[2]?+match[2]:0));}const RangeControl=({name,value,onChange,min=0,max=100,step=1,onBlur,onFocus})=>{const handleChange=event=>{onChange(parse$1(event.target.value));};const hasValue=value!==undefined;const numberOFDecimalsPlaces=React.useMemo(()=>getNumberOfDecimalPlaces(step),[step]);return React__default["default"].createElement(RangeWrapper,null,React__default["default"].createElement(RangeLabel,null,min),React__default["default"].createElement(RangeInput,Object.assign({id:getControlId(name),type:"range",onChange:handleChange},{name,value,min,max,step,onFocus,onBlur})),React__default["default"].createElement(RangeLabel,null,`${hasValue?value.toFixed(numberOFDecimalsPlaces):'--'}`," / ",max));};const Wrapper$1=theming.styled.label({display:'flex'});const TextControl=({name,value,onChange,onFocus,onBlur})=>{const handleChange=event=>{onChange(event.target.value);};const[forceVisible,setForceVisible]=React.useState(false);const onForceVisible=React.useCallback(()=>{onChange('');setForceVisible(true);},[setForceVisible]);if(value===undefined){return React__default["default"].createElement(Form.Button,{id:getControlSetterButtonId(name),onClick:onForceVisible},"Set string");}const isValid=typeof value==='string';return React__default["default"].createElement(Wrapper$1,null,React__default["default"].createElement(Form.Textarea,Object.assign({id:getControlId(name),onChange:handleChange,size:"flex",placeholder:"Edit string...",autoFocus:forceVisible,valid:isValid?null:'error'},{name,value:isValid?value:'',onFocus,onBlur})));};const FileInput=theming.styled(Form.Input)({padding:10});function revokeOldUrls(urls){urls.forEach(url=>{if(url.startsWith('blob:')){URL.revokeObjectURL(url);}});}const FilesControl=({onChange,name,accept='image/*',value})=>{function handleFileChange(e){if(!e.target.files){return;}const fileUrls=Array.from(e.target.files).map(file=>URL.createObjectURL(file));onChange(fileUrls);revokeOldUrls(value);}return React__default["default"].createElement(FileInput,{id:getControlId(name),type:"file",name:name,multiple:true,onChange:handleFileChange,accept:accept,size:"flex"});};const LazyColorControl=React.lazy(()=>Promise.resolve().then(function(){return require('./Color-d3116a31.js');}));const ColorControl=props=>React__default["default"].createElement(React.Suspense,{fallback:React__default["default"].createElement("div",null)},React__default["default"].createElement(LazyColorControl,Object.assign({},props)));const Controls={array:ObjectControl,object:ObjectControl,boolean:BooleanControl,color:ColorControl,date:DateControl,number:NumberControl,check:OptionsControl,'inline-check':OptionsControl,radio:OptionsControl,'inline-radio':OptionsControl,select:OptionsControl,'multi-select':OptionsControl,range:RangeControl,text:TextControl,file:FilesControl};const NoControl=()=>React__default["default"].createElement(React__default["default"].Fragment,null,"-");const ArgControl=({row,arg,updateArgs})=>{const{key,control}=row;const[isFocused,setFocused]=React.useState(false);// box because arg can be a fn (e.g. actions) and useState calls fn's
|
|
2014
2014
|
const[boxedValue,setBoxedValue]=React.useState({value:arg});React.useEffect(()=>{if(!isFocused)setBoxedValue({value:arg});},[isFocused,arg]);const onChange=React.useCallback(argVal=>{setBoxedValue({value:argVal});updateArgs({[key]:argVal});return argVal;},[updateArgs,key]);const onBlur=React.useCallback(()=>setFocused(false),[]);const onFocus=React.useCallback(()=>setFocused(true),[]);if(!control||control.disable)return React__default["default"].createElement(NoControl,null);// row.name is a display name and not a suitable DOM input id or name - i might contain whitespace etc.
|
|
2015
2015
|
// row.key is a hash key and therefore a much safer choice
|
|
2016
2016
|
const props={name:key,argType:row,value:boxedValue.value,onChange,onBlur,onFocus};const Control=Controls[control.type]||NoControl;return React__default["default"].createElement(Control,Object.assign({},props,control,{controlType:control.type}));};const Name=theming.styled.span({fontWeight:'bold'});const Required=theming.styled.span(({theme})=>({color:theme.color.negative,fontFamily:theme.typography.fonts.mono,cursor:'help'}));const Description=theming.styled.div(({theme})=>({'&&':{p:{margin:'0 0 10px 0'},a:{color:theme.color.secondary}},code:Object.assign(Object.assign({},codeCommon({theme})),{fontSize:12,fontFamily:theme.typography.fonts.mono}),'& code':{margin:0,display:'inline-block'},'& pre > code':{whiteSpace:'pre-wrap'}}));const Type=theming.styled.div(({theme,hasDescription})=>({color:theme.base==='light'?curriedTransparentize$1(0.1,theme.color.defaultText):curriedTransparentize$1(0.2,theme.color.defaultText),marginTop:hasDescription?4:0}));const TypeWithJsDoc=theming.styled.div(({theme,hasDescription})=>({color:theme.base==='light'?curriedTransparentize$1(0.1,theme.color.defaultText):curriedTransparentize$1(0.2,theme.color.defaultText),marginTop:hasDescription?12:0,marginBottom:12}));const StyledTd$1=theming.styled.td(({theme,expandable})=>({paddingLeft:expandable?'40px !important':'20px !important'}));const ArgRow=props=>{var _a;const{row,updateArgs,compact,expandable,initialExpandedArgs}=props;const{name,description}=row;const table=row.table||{};const type=table.type||row.type;const defaultValue=table.defaultValue||row.defaultValue;const required=(_a=row.type)===null||_a===void 0?void 0:_a.required;const hasDescription=description!=null&&description!=='';return React__default["default"].createElement("tr",null,React__default["default"].createElement(StyledTd$1,{expandable:expandable},React__default["default"].createElement(Name,null,name),required?React__default["default"].createElement(Required,{title:"Required"},"*"):null),compact?null:React__default["default"].createElement("td",null,hasDescription&&React__default["default"].createElement(Description,null,React__default["default"].createElement(Markdown,null,description)),table.jsDocTags!=null?React__default["default"].createElement(React__default["default"].Fragment,null,React__default["default"].createElement(TypeWithJsDoc,{hasDescription:hasDescription},React__default["default"].createElement(ArgValue,{value:type,initialExpandedArgs:initialExpandedArgs})),React__default["default"].createElement(ArgJsDoc,{tags:table.jsDocTags})):React__default["default"].createElement(Type,{hasDescription:hasDescription},React__default["default"].createElement(ArgValue,{value:type,initialExpandedArgs:initialExpandedArgs}))),compact?null:React__default["default"].createElement("td",null,React__default["default"].createElement(ArgValue,{value:defaultValue,initialExpandedArgs:initialExpandedArgs})),updateArgs?React__default["default"].createElement("td",null,React__default["default"].createElement(ArgControl,Object.assign({},props))):null);};const ExpanderIcon=theming.styled(Icons)(({theme})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:theme.base==='light'?curriedTransparentize$1(0.25,theme.color.defaultText):curriedTransparentize$1(0.3,theme.color.defaultText),border:'none',display:'inline-block'}));const FlexWrapper=theming.styled.span(({theme})=>({display:'flex',lineHeight:'20px',alignItems:'center'}));const Section=theming.styled.td(({theme})=>({position:'relative',letterSpacing:'0.35em',textTransform:'uppercase',fontWeight:theme.typography.weight.black,fontSize:theme.typography.size.s1-1,color:theme.base==='light'?curriedTransparentize$1(0.4,theme.color.defaultText):curriedTransparentize$1(0.6,theme.color.defaultText),background:`${theme.background.app} !important`,'& ~ td':{background:`${theme.background.app} !important`}}));const Subsection=theming.styled.td(({theme})=>({position:'relative',fontWeight:theme.typography.weight.bold,fontSize:theme.typography.size.s2-1,background:theme.background.content}));const StyledTd=theming.styled.td(({theme})=>({position:'relative'}));const StyledTr=theming.styled.tr(({theme})=>({'&:hover > td':{backgroundColor:`${theme.background.hoverable} !important`,boxShadow:`${theme.color.mediumlight} 0 - 1px 0 0 inset`,cursor:'row-resize'}}));const ClickIntercept=theming.styled.button(()=>({// reset button style
|
|
@@ -2027,12 +2027,12 @@ width:'25%'}),th:{color:theme.base==='light'?curriedTransparentize$1(0.25,theme.
|
|
|
2027
2027
|
// Emphasize tbody's background and set borderRadius
|
|
2028
2028
|
// Calling out because styling tables is finicky
|
|
2029
2029
|
// Makes border alignment consistent w/other DocBlocks
|
|
2030
|
-
marginLeft:inAddonPanel?0:1,marginRight:inAddonPanel?0:1,[`tr:first-child
|
|
2030
|
+
marginLeft:inAddonPanel?0:1,marginRight:inAddonPanel?0:1,[`tr:first-child`]:{[`td:first-child, th:first-child`]:{borderTopLeftRadius:inAddonPanel?0:theme.appBorderRadius},[`td:last-child, th:last-child`]:{borderTopRightRadius:inAddonPanel?0:theme.appBorderRadius}},[`tr:last-child`]:{[`td:first-child, th:first-child`]:{borderBottomLeftRadius:inAddonPanel?0:theme.appBorderRadius},[`td:last-child, th:last-child`]:{borderBottomRightRadius:inAddonPanel?0:theme.appBorderRadius}},tbody:{// slightly different than the other DocBlock shadows to account for table styling gymnastics
|
|
2031
2031
|
boxShadow:!inAddonPanel&&(theme.base==='light'?`rgba(0, 0, 0, 0.10) 0 1px 3px 1px,
|
|
2032
2032
|
${curriedTransparentize$1(0.035,theme.appBorderColor)} 0 0 0 1px`:`rgba(0, 0, 0, 0.20) 0 2px 5px 1px,
|
|
2033
2033
|
${curriedOpacify$1(0.05,theme.appBorderColor)} 0 0 0 1px`),borderRadius:theme.appBorderRadius,// for safari only
|
|
2034
2034
|
// CSS hack courtesy of https://stackoverflow.com/questions/16348489/is-there-a-css-hack-for-safari-only-not-chrome
|
|
2035
|
-
'@media not all and (min-resolution:.001dpcm)':{'@supports (-webkit-appearance:none)':Object.assign(Object.assign({borderWidth:1,borderStyle:'solid'},inAddonPanel&&{borderColor:'transparent'}),!inAddonPanel&&{borderColor:theme.base==='light'?curriedTransparentize$1(0.035,theme.appBorderColor):curriedOpacify$1(0.05,theme.appBorderColor)})},tr:Object.assign({background:'transparent',overflow:'hidden'},inAddonPanel?{borderTopWidth:1,borderTopStyle:'solid',borderTopColor:theme.base==='light'?curriedDarken$1(0.1,theme.background.content):curriedLighten$1(0.05,theme.background.content)}:{[`&:not(:first-child
|
|
2035
|
+
'@media not all and (min-resolution:.001dpcm)':{'@supports (-webkit-appearance:none)':Object.assign(Object.assign({borderWidth:1,borderStyle:'solid'},inAddonPanel&&{borderColor:'transparent'}),!inAddonPanel&&{borderColor:theme.base==='light'?curriedTransparentize$1(0.035,theme.appBorderColor):curriedOpacify$1(0.05,theme.appBorderColor)})},tr:Object.assign({background:'transparent',overflow:'hidden'},inAddonPanel?{borderTopWidth:1,borderTopStyle:'solid',borderTopColor:theme.base==='light'?curriedDarken$1(0.1,theme.background.content):curriedLighten$1(0.05,theme.background.content)}:{[`&:not(:first-child)`]:{borderTopWidth:1,borderTopStyle:'solid',borderTopColor:theme.base==='light'?curriedDarken$1(0.1,theme.background.content):curriedLighten$1(0.05,theme.background.content)}}),td:{background:theme.background.content}}}}),({isLoading,theme})=>isLoading?{'th span, td span, td button':{display:'inline',backgroundColor:theme.appBorderColor,animation:`${theme.animation.glow} 1.5s ease-in-out infinite`,color:'transparent',boxShadow:'none',borderRadius:0}}:{});const ResetButton=theming.styled.button(({theme})=>({border:0,borderRadius:'3em',cursor:'pointer',display:'inline-block',overflow:'hidden',padding:'3px 8px',transition:'all 150ms ease-out',verticalAlign:'top',userSelect:'none',margin:0,backgroundColor:theme.base==='light'?'#EAF3FC':theme.color.border,boxShadow:theme.base==='light'?`${theme.color.border} 0 0 0 1px inset`:`${theme.color.darker} 0 0 0 1px inset`,color:theme.color.secondary,'&:hover':{background:theme.base==='light'?curriedDarken$1(0.03,'#EAF3FC'):curriedOpacify$1(0.1,theme.color.border)},'&:focus':{boxShadow:`${theme.color.secondary} 0 0 0 1px inset`,outline:'none'},svg:{display:'block',height:14,width:14}}));const ControlHeadingWrapper=theming.styled.span({display:'flex',justifyContent:'space-between'});exports.ArgsTableError=void 0;(function(ArgsTableError){ArgsTableError["NO_COMPONENT"]="No component found.";ArgsTableError["ARGS_UNSUPPORTED"]="Args unsupported. See Args documentation for your framework.";})(exports.ArgsTableError||(exports.ArgsTableError={}));const sortFns={alpha:(a,b)=>a.name.localeCompare(b.name),requiredFirst:(a,b)=>{var _a,_b;return Number(!!((_a=b.type)===null||_a===void 0?void 0:_a.required))-Number(!!((_b=a.type)===null||_b===void 0?void 0:_b.required))||a.name.localeCompare(b.name);},none:undefined};const rowLoadingData=key=>({key,name:'propertyName',description:'This is a short description',control:{type:'text'},table:{type:{summary:'summary'},defaultValue:{summary:'defaultValue'}}});const argsTableLoadingData={rows:{row1:rowLoadingData('row1'),row2:rowLoadingData('row2'),row3:rowLoadingData('row3')}};const groupRows=(rows,sort)=>{const sections={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!rows)return sections;Object.entries(rows).forEach(([key,row])=>{const{category,subcategory}=(row===null||row===void 0?void 0:row.table)||{};if(category){const section=sections.sections[category]||{ungrouped:[],subsections:{}};if(!subcategory){section.ungrouped.push(Object.assign({key},row));}else{const subsection=section.subsections[subcategory]||[];subsection.push(Object.assign({key},row));section.subsections[subcategory]=subsection;}sections.sections[category]=section;}else if(subcategory){const subsection=sections.ungroupedSubsections[subcategory]||[];subsection.push(Object.assign({key},row));sections.ungroupedSubsections[subcategory]=subsection;}else{sections.ungrouped.push(Object.assign({key},row));}});// apply sort
|
|
2036
2036
|
const sortFn=sortFns[sort];const sortSubsection=record=>{if(!sortFn)return record;return Object.keys(record).reduce((acc,cur)=>Object.assign(Object.assign({},acc),{[cur]:record[cur].sort(sortFn)}),{});};const sorted={ungrouped:sections.ungrouped.sort(sortFn),ungroupedSubsections:sortSubsection(sections.ungroupedSubsections),sections:Object.keys(sections.sections).reduce((acc,cur)=>Object.assign(Object.assign({},acc),{[cur]:{ungrouped:sections.sections[cur].ungrouped.sort(sortFn),subsections:sortSubsection(sections.sections[cur].subsections)}}),{})};return sorted;};/**
|
|
2037
2037
|
* Wrap CSF's `includeConditionalArg` in a try catch so that invalid
|
|
2038
2038
|
* conditionals don't break the entire UI. We can safely swallow the
|
package/dist/cjs/index.js
CHANGED
|
@@ -42,7 +42,7 @@ import "core-js/modules/es.symbol.js";
|
|
|
42
42
|
import "core-js/modules/es.symbol.description.js";
|
|
43
43
|
import "core-js/modules/es.symbol.iterator.js";
|
|
44
44
|
import "core-js/modules/es.array.from.js";
|
|
45
|
-
import { x as _root, y as isObject_1, z as isSymbol_1, W as WithTooltip, T as TooltipNote, F as Form, I as Icons, B as getControlId, a as __rest } from './index-
|
|
45
|
+
import { x as _root, y as isObject_1, z as isSymbol_1, W as WithTooltip, T as TooltipNote, F as Form, I as Icons, B as getControlId, a as __rest } from './index-f6d446d8.js';
|
|
46
46
|
import React__default, { useRef, useMemo, useEffect, useState, useCallback, useLayoutEffect } from 'react';
|
|
47
47
|
import { styled } from '@storybook/theming';
|
|
48
48
|
import '@storybook/csf';
|
|
@@ -22,7 +22,7 @@ import "core-js/modules/es.symbol.iterator.js";
|
|
|
22
22
|
import "core-js/modules/es.array.iterator.js";
|
|
23
23
|
import "core-js/modules/es.string.iterator.js";
|
|
24
24
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
25
|
-
import { c as commonjsGlobal, a as __rest } from './index-
|
|
25
|
+
import { c as commonjsGlobal, a as __rest } from './index-f6d446d8.js';
|
|
26
26
|
import React__default, { useRef, useEffect } from 'react';
|
|
27
27
|
import '@storybook/theming';
|
|
28
28
|
import '@storybook/csf';
|
|
@@ -51,7 +51,7 @@ import "core-js/modules/es.array.includes.js";
|
|
|
51
51
|
import "core-js/modules/es.string.includes.js";
|
|
52
52
|
import "core-js/modules/es.string.starts-with.js";
|
|
53
53
|
import "core-js/modules/es.array.from.js";
|
|
54
|
-
import { b as basePlacements, t as top, l as left, e as bottom, r as right, f as end, v as viewport, s as start, p as popper, h as clippingParents, i as reference, j as variationPlacements, k as placements, n as auto, o as modifierPhases, q as _extends, u as _objectWithoutPropertiesLoose, m as memoizerific, a as __rest, w as window_1 } from './index-
|
|
54
|
+
import { b as basePlacements, t as top, l as left, e as bottom, r as right, f as end, v as viewport, s as start, p as popper, h as clippingParents, i as reference, j as variationPlacements, k as placements, n as auto, o as modifierPhases, q as _extends, u as _objectWithoutPropertiesLoose, m as memoizerific, a as __rest, w as window_1 } from './index-f6d446d8.js';
|
|
55
55
|
import * as React from 'react';
|
|
56
56
|
import React__default, { Component, useState, useCallback, useEffect } from 'react';
|
|
57
57
|
import { styled, lighten, darken } from '@storybook/theming';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"regenerator-runtime/runtime.js";function _wrapNativeSuper(Class){var _cache=typeof Map==="function"?new Map():undefined;_wrapNativeSuper=function _wrapNativeSuper(Class){if(Class===null||!_isNativeFunction(Class))return Class;if(typeof Class!=="function"){throw new TypeError("Super expression must either be null or a function");}if(typeof _cache!=="undefined"){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper);}function Wrapper(){return _construct(Class,arguments,_getPrototypeOf(this).constructor);}Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,Class);};return _wrapNativeSuper(Class);}function _construct(Parent,args,Class){if(_isNativeReflectConstruct()){_construct=Reflect.construct;}else{_construct=function _construct(Parent,args,Class){var a=[null];a.push.apply(a,args);var Constructor=Function.bind.apply(Parent,a);var instance=new Constructor();if(Class)_setPrototypeOf(instance,Class.prototype);return instance;};}return _construct.apply(null,arguments);}function _isNativeFunction(fn){return Function.toString.call(fn).indexOf("[native code]")!==-1;}function _toArray(arr){return _arrayWithHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableRest();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get;}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e217){throw _e217;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o);},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e218){didErr=true;err=_e218;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj;}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;},_typeof(obj);}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}import"core-js/modules/esnext.global-this.js";import"core-js/modules/es.function.name.js";import"core-js/modules/es.array.iterator.js";import"core-js/modules/es.map.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.string.iterator.js";import"core-js/modules/web.dom-collections.iterator.js";import"core-js/modules/es.array.join.js";import"core-js/modules/es.array.concat.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.string.replace.js";import"core-js/modules/es.string.trim.js";import"core-js/modules/es.array.slice.js";import"core-js/modules/es.object.get-prototype-of.js";import"core-js/modules/es.array.map.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.promise.js";import"core-js/modules/es.regexp.to-string.js";import"core-js/modules/es.string.split.js";import"core-js/modules/es.string.match.js";import"core-js/modules/es.set.js";import"core-js/modules/es.regexp.constructor.js";import"core-js/modules/es.number.is-nan.js";import"core-js/modules/es.number.constructor.js";import"core-js/modules/es.string.code-point-at.js";import"core-js/modules/es.object.freeze.js";import"core-js/modules/es.number.max-safe-integer.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.weak-map.js";import"core-js/modules/es.array.sort.js";import"core-js/modules/es.object.entries.js";import"core-js/modules/es.object.assign.js";import"core-js/modules/es.array.find.js";import"core-js/modules/es.array.includes.js";import"core-js/modules/es.string.includes.js";import"core-js/modules/es.string.starts-with.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.symbol.description.js";import"core-js/modules/es.string.ends-with.js";import"core-js/modules/es.string.from-code-point.js";import"core-js/modules/es.array.splice.js";import"core-js/modules/es.symbol.iterator.js";import"core-js/modules/web.url.to-json.js";import"core-js/modules/es.array.from.js";import"core-js/modules/es.array.fill.js";import"core-js/modules/es.string.repeat.js";import"core-js/modules/es.typed-array.uint8-array.js";import"core-js/modules/es.typed-array.copy-within.js";import"core-js/modules/es.typed-array.every.js";import"core-js/modules/es.typed-array.fill.js";import"core-js/modules/es.typed-array.filter.js";import"core-js/modules/es.typed-array.find.js";import"core-js/modules/es.typed-array.find-index.js";import"core-js/modules/es.typed-array.for-each.js";import"core-js/modules/es.typed-array.includes.js";import"core-js/modules/es.typed-array.index-of.js";import"core-js/modules/es.typed-array.iterator.js";import"core-js/modules/es.typed-array.join.js";import"core-js/modules/es.typed-array.last-index-of.js";import"core-js/modules/es.typed-array.map.js";import"core-js/modules/es.typed-array.reduce.js";import"core-js/modules/es.typed-array.reduce-right.js";import"core-js/modules/es.typed-array.reverse.js";import"core-js/modules/es.typed-array.set.js";import"core-js/modules/es.typed-array.slice.js";import"core-js/modules/es.typed-array.some.js";import"core-js/modules/es.typed-array.sort.js";import"core-js/modules/es.typed-array.subarray.js";import"core-js/modules/es.typed-array.to-locale-string.js";import"core-js/modules/es.typed-array.to-string.js";import"core-js/modules/es.array-buffer.constructor.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/es.symbol.async-iterator.js";import"core-js/modules/es.typed-array.uint16-array.js";import"core-js/modules/es.number.is-integer.js";import"core-js/modules/es.regexp.flags.js";import"core-js/modules/es.string.bold.js";import"core-js/modules/es.object.get-own-property-names.js";import"core-js/modules/es.typed-array.float32-array.js";import"core-js/modules/es.typed-array.float64-array.js";import"core-js/modules/es.string.search.js";import"core-js/modules/es.string.trim-end.js";import"core-js/modules/es.object.values.js";import"core-js/modules/es.string.trim-start.js";import"core-js/modules/es.array.find-index.js";import"core-js/modules/es.string.anchor.js";import"core-js/modules/es.reflect.construct.js";import"core-js/modules/es.reflect.get.js";import{c as commonjsGlobal,g as getDefaultExportFromCjs,m as memoizerific,d as dedent}from'./index-3ae04fda.js';import'react';import'@storybook/theming';import'@storybook/csf';import'qs';import'@storybook/client-logger';var parserHtml={exports:{}};(function(module,exports){!function(e,t){module.exports=t();}(commonjsGlobal,function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{};function t(e){var t={exports:{}};return e(t,t.exports),t.exports;}var r=t(function(e,t){function r(e){return t.$0<=e&&e<=t.$9;}/**
|
|
1
|
+
import"regenerator-runtime/runtime.js";function _wrapNativeSuper(Class){var _cache=typeof Map==="function"?new Map():undefined;_wrapNativeSuper=function _wrapNativeSuper(Class){if(Class===null||!_isNativeFunction(Class))return Class;if(typeof Class!=="function"){throw new TypeError("Super expression must either be null or a function");}if(typeof _cache!=="undefined"){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper);}function Wrapper(){return _construct(Class,arguments,_getPrototypeOf(this).constructor);}Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,Class);};return _wrapNativeSuper(Class);}function _construct(Parent,args,Class){if(_isNativeReflectConstruct()){_construct=Reflect.construct;}else{_construct=function _construct(Parent,args,Class){var a=[null];a.push.apply(a,args);var Constructor=Function.bind.apply(Parent,a);var instance=new Constructor();if(Class)_setPrototypeOf(instance,Class.prototype);return instance;};}return _construct.apply(null,arguments);}function _isNativeFunction(fn){return Function.toString.call(fn).indexOf("[native code]")!==-1;}function _toArray(arr){return _arrayWithHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableRest();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get;}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e217){throw _e217;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o);},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e218){didErr=true;err=_e218;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj;}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;},_typeof(obj);}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}import"core-js/modules/esnext.global-this.js";import"core-js/modules/es.function.name.js";import"core-js/modules/es.array.iterator.js";import"core-js/modules/es.map.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.string.iterator.js";import"core-js/modules/web.dom-collections.iterator.js";import"core-js/modules/es.array.join.js";import"core-js/modules/es.array.concat.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.string.replace.js";import"core-js/modules/es.string.trim.js";import"core-js/modules/es.array.slice.js";import"core-js/modules/es.object.get-prototype-of.js";import"core-js/modules/es.array.map.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.promise.js";import"core-js/modules/es.regexp.to-string.js";import"core-js/modules/es.string.split.js";import"core-js/modules/es.string.match.js";import"core-js/modules/es.set.js";import"core-js/modules/es.regexp.constructor.js";import"core-js/modules/es.number.is-nan.js";import"core-js/modules/es.number.constructor.js";import"core-js/modules/es.string.code-point-at.js";import"core-js/modules/es.object.freeze.js";import"core-js/modules/es.number.max-safe-integer.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.weak-map.js";import"core-js/modules/es.array.sort.js";import"core-js/modules/es.object.entries.js";import"core-js/modules/es.object.assign.js";import"core-js/modules/es.array.find.js";import"core-js/modules/es.array.includes.js";import"core-js/modules/es.string.includes.js";import"core-js/modules/es.string.starts-with.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.symbol.description.js";import"core-js/modules/es.string.ends-with.js";import"core-js/modules/es.string.from-code-point.js";import"core-js/modules/es.array.splice.js";import"core-js/modules/es.symbol.iterator.js";import"core-js/modules/web.url.to-json.js";import"core-js/modules/es.array.from.js";import"core-js/modules/es.array.fill.js";import"core-js/modules/es.string.repeat.js";import"core-js/modules/es.typed-array.uint8-array.js";import"core-js/modules/es.typed-array.copy-within.js";import"core-js/modules/es.typed-array.every.js";import"core-js/modules/es.typed-array.fill.js";import"core-js/modules/es.typed-array.filter.js";import"core-js/modules/es.typed-array.find.js";import"core-js/modules/es.typed-array.find-index.js";import"core-js/modules/es.typed-array.for-each.js";import"core-js/modules/es.typed-array.includes.js";import"core-js/modules/es.typed-array.index-of.js";import"core-js/modules/es.typed-array.iterator.js";import"core-js/modules/es.typed-array.join.js";import"core-js/modules/es.typed-array.last-index-of.js";import"core-js/modules/es.typed-array.map.js";import"core-js/modules/es.typed-array.reduce.js";import"core-js/modules/es.typed-array.reduce-right.js";import"core-js/modules/es.typed-array.reverse.js";import"core-js/modules/es.typed-array.set.js";import"core-js/modules/es.typed-array.slice.js";import"core-js/modules/es.typed-array.some.js";import"core-js/modules/es.typed-array.sort.js";import"core-js/modules/es.typed-array.subarray.js";import"core-js/modules/es.typed-array.to-locale-string.js";import"core-js/modules/es.typed-array.to-string.js";import"core-js/modules/es.array-buffer.constructor.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/es.symbol.async-iterator.js";import"core-js/modules/es.typed-array.uint16-array.js";import"core-js/modules/es.number.is-integer.js";import"core-js/modules/es.regexp.flags.js";import"core-js/modules/es.string.bold.js";import"core-js/modules/es.object.get-own-property-names.js";import"core-js/modules/es.typed-array.float32-array.js";import"core-js/modules/es.typed-array.float64-array.js";import"core-js/modules/es.string.search.js";import"core-js/modules/es.string.trim-end.js";import"core-js/modules/es.object.values.js";import"core-js/modules/es.string.trim-start.js";import"core-js/modules/es.array.find-index.js";import"core-js/modules/es.string.anchor.js";import"core-js/modules/es.reflect.construct.js";import"core-js/modules/es.reflect.get.js";import{c as commonjsGlobal,g as getDefaultExportFromCjs,m as memoizerific,d as dedent}from'./index-f6d446d8.js';import'react';import'@storybook/theming';import'@storybook/csf';import'qs';import'@storybook/client-logger';var parserHtml={exports:{}};(function(module,exports){!function(e,t){module.exports=t();}(commonjsGlobal,function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{};function t(e){var t={exports:{}};return e(t,t.exports),t.exports;}var r=t(function(e,t){function r(e){return t.$0<=e&&e<=t.$9;}/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright Google Inc. All Rights Reserved.
|
|
4
4
|
*
|