"use strict";(self.webpackChunk_grafana_ui=self.webpackChunk_grafana_ui||[]).push([[1148],{"./src/components/Button/Button.story.tsx":function(F,D,f){f.r(D),f.d(D,{Basic:function(){return j},Examples:function(){return v},default:function(){return L}});var l=f("../../node_modules/react/index.js"),i=f("./src/components/Card/Card.tsx"),x=f("./src/components/Layout/Layout.tsx"),t=f("./src/components/Button/Button.tsx"),a=f("../../node_modules/react/jsx-runtime.js"),A=f("../../node_modules/@mdx-js/react/lib/index.js"),R=f("../../node_modules/@storybook/blocks/dist/index.mjs"),Y=f("./src/components/Alert/Alert.tsx");function W(_){const p=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",code:"code",ol:"ol",li:"li"},(0,A.RP)(),_.components);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(R.W8,{title:"MDX|Button",component:t.$n}),`
`,(0,a.jsx)(p.h1,{id:"button",children:"Button"}),`
`,(0,a.jsx)(Y.F,{severity:"warning",title:"Please note:",children:(0,a.jsx)(p.p,{children:"After reviewing this component we are asking you to use the IconButton when you require a button with only an icon."})}),`
`,(0,a.jsxs)(p.p,{children:["When using a button please always follow a11y rules (e.g. W3C Recommendation ",(0,a.jsx)(p.a,{href:"https://www.w3.org/TR/WCAG21/#labels-or-instructions",target:"_blank",rel:"nofollow noopener noreferrer",children:"3.3.2 Labels or instructions"}),") and make sure the context in which the button is located is also communicated by screen readers."]}),`
`,(0,a.jsx)(p.h2,{id:"primary",children:"Primary"}),`
`,(0,a.jsxs)(p.p,{children:['Used for "call to action", i.e. triggering the main action. There should never be more than one on a page. If you need multiple buttons for different actions, decide which action is the most important and make that the primary ',(0,a.jsx)(p.code,{children:"Button"}),". All other ",(0,a.jsx)(p.code,{children:"Button"})," components should be secondary."]}),`
`,(0,a.jsxs)(p.p,{children:["If there is no primary action, all ",(0,a.jsx)(p.code,{children:"Button"})," components should be secondary."]}),`
`,(0,a.jsx)(R.lN,{children:(0,a.jsxs)("div",{children:[(0,a.jsx)(t.$n,{variant:"primary",size:"sm",style:{margin:"5px"},children:"Small"}),(0,a.jsx)(t.$n,{variant:"primary",size:"md",style:{margin:"5px"},children:"Medium"}),(0,a.jsx)(t.$n,{variant:"primary",size:"lg",style:{margin:"5px"},children:"Large"})]})}),`
`,(0,a.jsx)(p.h2,{id:"secondary",children:"Secondary"}),`
`,(0,a.jsxs)(p.p,{children:["The secondary ",(0,a.jsx)(p.code,{children:"Button"})," is the default button style and can trigger various actions. How it is used depends on its surroundings:"]}),`
`,(0,a.jsxs)(p.ol,{children:[`
`,(0,a.jsxs)(p.li,{children:["When next to the primary ",(0,a.jsx)(p.code,{children:"Button"}),', the Secondary style can for example be used for "Cancel" or "Abort" actions.']}),`
`,(0,a.jsxs)(p.li,{children:["When there is no main important action on a given page, all ",(0,a.jsx)(p.code,{children:"Button"})," components should use the secondary style."]}),`
`]}),`
`,(0,a.jsx)(R.lN,{children:(0,a.jsxs)("div",{children:[(0,a.jsx)(t.$n,{variant:"secondary",size:"sm",style:{margin:"5px"},children:"Small"}),(0,a.jsx)(t.$n,{variant:"secondary",size:"md",style:{margin:"5px"},children:"Medium"}),(0,a.jsx)(t.$n,{variant:"secondary",size:"lg",style:{margin:"5px"},children:"Large"})]})}),`
`,(0,a.jsx)(p.h2,{id:"destructive",children:"Destructive"}),`
`,(0,a.jsxs)(p.p,{children:["Used for triggering a removing or deleting action. Because of its dominant coloring, it should be used sparingly. If you need multiple Destructive ",(0,a.jsx)(p.code,{children:"Button"})," components in one view, we recommend using a secondary ",(0,a.jsx)(p.code,{children:"Button"})," or Link variant instead and only use the Destructive variant to double confirm."]}),`
`,(0,a.jsx)(R.lN,{children:(0,a.jsxs)("div",{children:[(0,a.jsx)(t.$n,{variant:"destructive",size:"sm",style:{margin:"5px"},children:"Small"}),(0,a.jsx)(t.$n,{variant:"destructive",size:"md",style:{margin:"5px"},children:"Medium"}),(0,a.jsx)(t.$n,{variant:"destructive",size:"lg",style:{margin:"5px"},children:"Large"})]})}),`
`,(0,a.jsx)(p.h2,{id:"text",children:"Text"}),`
`,(0,a.jsx)(R.lN,{children:(0,a.jsxs)("div",{children:[(0,a.jsx)(t.$n,{fill:"text",size:"sm",style:{margin:"5px"},children:"Small"}),(0,a.jsx)(t.$n,{fill:"text",size:"md",style:{margin:"5px"},children:"Medium"}),(0,a.jsx)(t.$n,{fill:"text",size:"lg",style:{margin:"5px"},children:"Large"})]})}),`
`,(0,a.jsx)(R.ov,{of:t.$n}),`
`,(0,a.jsx)(p.h2,{id:"links",children:"Links"}),`
`,(0,a.jsxs)(p.p,{children:["To add an anchor that looks like a button use the ",(0,a.jsx)(p.code,{children:"<LinkButton>"})," component and pass a href prop."]}),`
`,(0,a.jsx)(R.lN,{children:(0,a.jsxs)("div",{children:[(0,a.jsx)(t.z9,{href:"/",size:"sm",style:{margin:"5px"},children:"Small"}),(0,a.jsx)(t.z9,{href:"/",size:"md",style:{margin:"5px"},children:"Medium"}),(0,a.jsx)(t.z9,{href:"/",size:"lg",style:{margin:"5px"},children:"Large"})]})})]})}function z(_={}){const{wrapper:p}=Object.assign({},(0,A.RP)(),_.components);return p?(0,a.jsx)(p,Object.assign({},_,{children:(0,a.jsx)(W,_)})):W(_)}var V=z,w=f("./src/components/Button/ButtonGroup.tsx"),C=Object.defineProperty,b=Object.defineProperties,E=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,o=(_,p,P)=>p in _?C(_,p,{enumerable:!0,configurable:!0,writable:!0,value:P}):_[p]=P,r=(_,p)=>{for(var P in p||(p={}))y.call(p,P)&&o(_,P,p[P]);if(n)for(var P of n(p))S.call(p,P)&&o(_,P,p[P]);return _},s=(_,p)=>b(_,E(p)),d,g,O,T,B,N;const I=["lg","md","sm"];var L={title:"Buttons/Button",component:t.$n,parameters:{docs:{page:V}},argTypes:{size:{options:I},tooltip:{control:"text"},className:{table:{disable:!0}}}};const v=()=>l.createElement(x.gW,null,t.GB.map(_=>l.createElement(x.gW,{key:_},l.createElement(x.Gy,{spacing:"lg"},t.s4.map(p=>l.createElement(x.gW,{spacing:"lg",key:`${_}-${p}`},I.map(P=>l.createElement(t.$n,{variant:p,fill:_,size:P,key:P},p," ",P)),l.createElement(t.$n,{variant:p,fill:_,disabled:!0},p," disabled")))),l.createElement("div",{style:{padding:"20px 0",width:"100%"}}))),l.createElement(x.Gy,{spacing:"lg"},l.createElement("div",null,"With icon and text"),l.createElement(t.$n,{icon:"cloud",size:"sm"},"Configure"),l.createElement(t.$n,{icon:"cloud"},"Configure"),l.createElement(t.$n,{icon:"cloud",size:"lg"},"Configure")),l.createElement("div",null),l.createElement("div",null),l.createElement(t.$n,{icon:"plus",fullWidth:!0},"Button with fullWidth"),l.createElement("div",null),l.createElement(x.Gy,{spacing:"lg"},l.createElement("div",null,"Inside ButtonGroup"),l.createElement(w.e,null,l.createElement(t.$n,{icon:"sync"},"Run query"),l.createElement(t.$n,{icon:"angle-down"}))),l.createElement(i.Z,null,l.createElement(i.Z.Heading,null,"Button inside card"),l.createElement(i.Z.Actions,null,t.s4.map(_=>l.createElement(t.$n,{variant:_,key:_},_)),l.createElement(t.$n,{variant:"primary",disabled:!0},"Disabled")))),j=_=>l.createElement(t.$n,r({},_));j.args={children:"Example button",size:"md",variant:"primary",fill:"solid",type:"button"},v.parameters=s(r({},v.parameters),{docs:s(r({},(d=v.parameters)==null?void 0:d.docs),{source:r({originalSource:`() => {
  return <VerticalGroup>
      {allButtonFills.map(buttonFill => <VerticalGroup key={buttonFill}>
          <HorizontalGroup spacing="lg">
            {allButtonVariants.map(variant => <VerticalGroup spacing="lg" key={\`\${buttonFill}-\${variant}\`}>
                {sizes.map(size => <Button variant={variant} fill={buttonFill} size={size} key={size}>
                    {variant} {size}
                  </Button>)}
                <Button variant={variant} fill={buttonFill} disabled>
                  {variant} disabled
                </Button>
              </VerticalGroup>)}
          </HorizontalGroup>
          <div style={{
        padding: '20px 0',
        width: '100%'
      }} />
        </VerticalGroup>)}
      <HorizontalGroup spacing="lg">
        <div>With icon and text</div>
        <Button icon="cloud" size="sm">
          Configure
        </Button>
        <Button icon="cloud">Configure</Button>
        <Button icon="cloud" size="lg">
          Configure
        </Button>
      </HorizontalGroup>
      <div />
      <div />
      <Button icon="plus" fullWidth>
        Button with fullWidth
      </Button>
      <div />
      <HorizontalGroup spacing="lg">
        <div>Inside ButtonGroup</div>
        <ButtonGroup>
          <Button icon="sync">Run query</Button>
          <Button icon="angle-down" />
        </ButtonGroup>
      </HorizontalGroup>
      <Card>
        <Card.Heading>Button inside card</Card.Heading>
        <Card.Actions>
          {allButtonVariants.map(variant => <Button variant={variant} key={variant}>
              {variant}
            </Button>)}
          <Button variant="primary" disabled>
            Disabled
          </Button>
        </Card.Actions>
      </Card>
    </VerticalGroup>;
}`},(O=(g=v.parameters)==null?void 0:g.docs)==null?void 0:O.source)})}),j.parameters=s(r({},j.parameters),{docs:s(r({},(T=j.parameters)==null?void 0:T.docs),{source:r({originalSource:"(args: ButtonProps) => <Button {...args} />"},(N=(B=j.parameters)==null?void 0:B.docs)==null?void 0:N.source)})})},"./src/components/Alert/Alert.tsx":function(F,D,f){f.d(D,{F:function(){return n}});var l=f("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=f("../../node_modules/react/index.js"),x=f("../grafana-e2e-selectors/src/selectors/index.ts"),t=f("./src/themes/ThemeContext.tsx"),a=f("./src/components/Button/Button.tsx"),A=f("./src/components/Icon/Icon.tsx"),R=f("./src/components/Layout/Box/Box.tsx"),Y=f("./src/components/Text/Text.tsx"),W=Object.defineProperty,z=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,C=(o,r,s)=>r in o?W(o,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[r]=s,b=(o,r)=>{for(var s in r||(r={}))V.call(r,s)&&C(o,s,r[s]);if(z)for(var s of z(r))w.call(r,s)&&C(o,s,r[s]);return o},E=(o,r)=>{var s={};for(var d in o)V.call(o,d)&&r.indexOf(d)<0&&(s[d]=o[d]);if(o!=null&&z)for(var d of z(o))r.indexOf(d)<0&&w.call(o,d)&&(s[d]=o[d]);return s};const n=i.forwardRef((o,r)=>{var s=o,{title:d,onRemove:g,children:O,buttonContent:T,elevated:B,bottomSpacing:N,topSpacing:I,className:L,severity:v="error"}=s,j=E(s,["title","onRemove","children","buttonContent","elevated","bottomSpacing","topSpacing","className","severity"]);const _=(0,t.$j)(),P=S(_,v,!!d,B,N,I),G={error:"alert",warning:"alert",info:"status",success:"status"},U=j.role||G[v],K=j["aria-label"]||d;return i.createElement("div",b({ref:r,className:(0,l.cx)(P.wrapper,L),role:U,"aria-label":K},j),i.createElement(R.a,{"data-testid":x.Tp.components.Alert.alertV2(v),display:"flex",backgroundColor:v,borderRadius:"default",paddingY:1,paddingX:2,borderStyle:"solid",borderColor:v,alignItems:"stretch",boxShadow:B?"z3":void 0},i.createElement(R.a,{paddingTop:1,paddingRight:2},i.createElement("div",{className:P.icon},i.createElement(A.I,{size:"xl",name:y(v)}))),i.createElement(R.a,{paddingY:1,grow:1},i.createElement(Y.E,{color:"primary",weight:"medium"},d),O&&i.createElement("div",{className:P.content},O)),g&&!T&&i.createElement("div",{className:P.close},i.createElement(a.$n,{"aria-label":"Close alert",icon:"times",onClick:g,type:"button",fill:"text",variant:"secondary"})),g&&T&&i.createElement(R.a,{marginLeft:1,display:"flex",alignItems:"center"},i.createElement(a.$n,{"aria-label":"Close alert",variant:"secondary",onClick:g,type:"button"},T))))});n.displayName="Alert";const y=o=>{switch(o){case"error":return"exclamation-circle";case"warning":return"exclamation-triangle";case"info":return"info-circle";case"success":return"check"}},S=(o,r,s,d,g,O)=>{const T=o.colors[r];return{wrapper:(0,l.AH)({flexGrow:1,marginBottom:o.spacing(g??2),marginTop:o.spacing(O??0),position:"relative","&:before":{content:'""',position:"absolute",top:0,left:0,bottom:0,right:0,background:o.colors.background.primary,zIndex:-1}}),icon:(0,l.AH)({color:T.text}),content:(0,l.AH)({color:o.colors.text.primary,paddingTop:s?o.spacing(.5):0,maxHeight:"50vh",overflowY:"auto"}),close:(0,l.AH)({position:"relative",color:o.colors.text.secondary,background:"none",display:"flex",top:"-6px",right:"-14px"})}};try{n.displayName="Alert",n.__docgenInfo={description:"",displayName:"Alert",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},onRemove:{defaultValue:null,description:"On click handler for alert button, mostly used for dismissing the alert",name:"onRemove",required:!1,type:{name:"((event: MouseEvent<Element, MouseEvent>) => void)"}},severity:{defaultValue:{value:"error"},description:"",name:"severity",required:!1,type:{name:"enum",value:[{value:'"info"'},{value:'"success"'},{value:'"error"'},{value:'"warning"'}]}},elevated:{defaultValue:null,description:"",name:"elevated",required:!1,type:{name:"boolean"}},buttonContent:{defaultValue:null,description:"",name:"buttonContent",required:!1,type:{name:"ReactNode"}},bottomSpacing:{defaultValue:null,description:"",name:"bottomSpacing",required:!1,type:{name:"number"}},topSpacing:{defaultValue:null,description:"",name:"topSpacing",required:!1,type:{name:"number"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Alert/Alert.tsx#Alert"]={docgenInfo:n.__docgenInfo,name:"Alert",path:"src/components/Alert/Alert.tsx#Alert"})}catch{}},"./src/components/Button/ButtonGroup.tsx":function(F,D,f){f.d(D,{e:function(){return V}});var l=f("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=f("../../node_modules/react/index.js"),x=f("./src/themes/ThemeContext.tsx"),t=Object.defineProperty,a=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,Y=(C,b,E)=>b in C?t(C,b,{enumerable:!0,configurable:!0,writable:!0,value:E}):C[b]=E,W=(C,b)=>{for(var E in b||(b={}))A.call(b,E)&&Y(C,E,b[E]);if(a)for(var E of a(b))R.call(b,E)&&Y(C,E,b[E]);return C},z=(C,b)=>{var E={};for(var n in C)A.call(C,n)&&b.indexOf(n)<0&&(E[n]=C[n]);if(C!=null&&a)for(var n of a(C))b.indexOf(n)<0&&R.call(C,n)&&(E[n]=C[n]);return E};const V=(0,i.forwardRef)((C,b)=>{var E=C,{className:n,children:y}=E,S=z(E,["className","children"]);const o=(0,x.of)(w);return i.createElement("div",W({ref:b,className:(0,l.cx)("button-group",o.wrapper,n)},S),y)});V.displayName="ButtonGroup";const w=C=>({wrapper:(0,l.AH)({display:"flex","> .button-group:not(:first-child) > button, > button:not(:first-child)":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"> .button-group:not(:last-child) > button, > button:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0,borderRightWidth:0}})});try{V.displayName="ButtonGroup",V.__docgenInfo={description:"",displayName:"ButtonGroup",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Button/ButtonGroup.tsx#ButtonGroup"]={docgenInfo:V.__docgenInfo,name:"ButtonGroup",path:"src/components/Button/ButtonGroup.tsx#ButtonGroup"})}catch{}},"./src/components/Card/Card.tsx":function(F,D,f){f.d(D,{Z:function(){return v}});var l=f("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=f("../../node_modules/react/index.js"),x=f("./src/themes/ThemeContext.tsx"),t=f("./src/themes/mixins.ts"),a=Object.defineProperty,A=Object.defineProperties,R=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,V=(e,u,m)=>u in e?a(e,u,{enumerable:!0,configurable:!0,writable:!0,value:m}):e[u]=m,w=(e,u)=>{for(var m in u||(u={}))W.call(u,m)&&V(e,m,u[m]);if(Y)for(var m of Y(u))z.call(u,m)&&V(e,m,u[m]);return e},C=(e,u)=>A(e,R(u)),b=(e,u)=>{var m={};for(var h in e)W.call(e,h)&&u.indexOf(h)<0&&(m[h]=e[h]);if(e!=null&&Y)for(var h of Y(e))u.indexOf(h)<0&&z.call(e,h)&&(m[h]=e[h]);return m};const E=({children:e,href:u})=>{const{inner:m}=(0,x.of)(n);return u?i.createElement("a",{className:m,href:u},e):i.createElement(i.Fragment,null,e)},n=e=>({inner:(0,l.AH)({display:"flex",width:"100%",padding:e.spacing(2)})}),y=e=>{var u=e,{children:m,disableEvents:h,disableHover:H,isSelected:M,className:q,href:k}=u,$=b(u,["children","disableEvents","disableHover","isSelected","className","href"]);const{oldContainer:te}=(0,x.of)(S,h,H,M);return i.createElement("div",C(w({},$),{className:(0,l.cx)(te,q)}),i.createElement(E,{href:k},m))},S=(e,u=!1,m=!1,h,H)=>{const M=h!==void 0;return{container:(0,l.AH)(w(w(w({display:"grid",position:"relative",gridTemplateColumns:"auto 1fr auto",gridTemplateRows:"1fr auto auto auto",gridAutoColumns:"1fr",gridAutoFlow:"row",gridTemplateAreas:`
        "Figure Heading Tags"
        "Figure Meta Tags"
        "Figure Description Tags"
        "Figure Actions Secondary"`,width:"100%",padding:e.spacing(H?1:2),background:e.colors.background.secondary,borderRadius:e.shape.radius.default,marginBottom:"8px",pointerEvents:u?"none":"auto",transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short})},!m&&{"&:hover":{background:e.colors.emphasize(e.colors.background.secondary,.03),cursor:"pointer",zIndex:1},"&:focus":t.Hi(e)}),M&&{cursor:"pointer"}),h&&{outline:`solid 2px ${e.colors.primary.border}`})),oldContainer:(0,l.AH)(w({display:"flex",width:"100%",background:e.colors.background.secondary,borderRadius:e.shape.radius.default,position:"relative",pointerEvents:u?"none":"auto",marginBottom:e.spacing(1),transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short})},!m&&{"&:hover":{background:e.colors.emphasize(e.colors.background.secondary,.03),cursor:"pointer",zIndex:1},"&:focus":t.Hi(e)}))}};try{y.displayName="CardContainer",y.__docgenInfo={description:"",displayName:"CardContainer",props:{disableEvents:{defaultValue:null,description:"Disable pointer events for the Card, e.g. click events",name:"disableEvents",required:!1,type:{name:"boolean"}},disableHover:{defaultValue:null,description:"No style change on hover",name:"disableHover",required:!1,type:{name:"boolean"}},isSelected:{defaultValue:null,description:'Makes the card selectable, set to "true" to apply selected styles',name:"isSelected",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"Custom container styles",name:"className",required:!1,type:{name:"string"}},href:{defaultValue:null,description:"",name:"href",required:!1,type:{name:"string"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Card/CardContainer.tsx#CardContainer"]={docgenInfo:y.__docgenInfo,name:"CardContainer",path:"src/components/Card/CardContainer.tsx#CardContainer"})}catch{}var o=Object.defineProperty,r=Object.defineProperties,s=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,T=(e,u,m)=>u in e?o(e,u,{enumerable:!0,configurable:!0,writable:!0,value:m}):e[u]=m,B=(e,u)=>{for(var m in u||(u={}))g.call(u,m)&&T(e,m,u[m]);if(d)for(var m of d(u))O.call(u,m)&&T(e,m,u[m]);return e},N=(e,u)=>r(e,s(u)),I=(e,u)=>{var m={};for(var h in e)g.call(e,h)&&u.indexOf(h)<0&&(m[h]=e[h]);if(e!=null&&d)for(var h of d(e))u.indexOf(h)<0&&O.call(e,h)&&(m[h]=e[h]);return m};const L=i.createContext(null),v=e=>{var u=e,{disabled:m,href:h,onClick:H,children:M,isSelected:q,isCompact:k,className:$}=u,te=I(u,["disabled","href","onClick","children","isSelected","isCompact","className"]);const ie=(0,i.useMemo)(()=>i.Children.toArray(M).some(oe=>i.isValidElement(oe)&&oe.type===j),[M]),re=m||!H&&!h,se=H&&!m?H:void 0,le=(0,x.of)(S,m,re,q,k);return i.createElement(y,B({disableEvents:m,disableHover:re,isSelected:q,className:(0,l.cx)(le.container,$)},te),i.createElement(L.Provider,{value:{href:h,onClick:se,disabled:m,isSelected:q}},!ie&&i.createElement(j,null),M))},j=({children:e,className:u,"aria-label":m})=>{const h=(0,i.useContext)(L),H=(0,x.of)(_),{href:M,onClick:q,isSelected:k}=h??{href:void 0,onClick:void 0,isSelected:void 0};return i.createElement("h2",{className:(0,l.cx)(H.heading,u)},M?i.createElement("a",{href:M,className:H.linkHack,"aria-label":m,onClick:q},e):q?i.createElement("button",{onClick:q,className:H.linkHack,"aria-label":m,type:"button"},e):i.createElement(i.Fragment,null,e),k!==void 0&&i.createElement("input",{"aria-label":"option",type:"radio",checked:k,readOnly:!0}))};j.displayName="Heading";const _=e=>({heading:(0,l.AH)({gridArea:"Heading",justifySelf:"start",display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",marginBottom:0,fontSize:e.typography.size.md,letterSpacing:"inherit",lineHeight:e.typography.body.lineHeight,color:e.colors.text.primary,fontWeight:e.typography.fontWeightMedium,"& input[readonly]":{cursor:"inherit"}}),linkHack:(0,l.AH)({all:"unset","&::after":{position:"absolute",content:'""',top:0,bottom:0,left:0,right:0,borderRadius:e.shape.radius.default},"&:focus-visible":{outline:"none",outlineOffset:0,boxShadow:"none","&::after":N(B({},(0,t.Hi)(e)),{zIndex:1})}})}),p=({children:e,className:u})=>{const m=(0,x.of)(P);return i.createElement("div",{className:(0,l.cx)(m.tagList,u)},e)};p.displayName="Tags";const P=e=>({tagList:(0,l.AH)({position:"relative",gridArea:"Tags",alignSelf:"center"})}),G=({children:e,className:u})=>{const m=(0,x.of)(U);return i.createElement("p",{className:(0,l.cx)(m.description,u)},e)};G.displayName="Description";const U=e=>({description:(0,l.AH)({width:"100%",gridArea:"Description",margin:e.spacing(1,0,0),color:e.colors.text.secondary,lineHeight:e.typography.body.lineHeight})}),K=({children:e,align:u="start",className:m})=>{const h=(0,x.of)(J);return i.createElement("div",{className:(0,l.cx)(h.media,m,(0,l.AH)({alignSelf:u}))},e)};K.displayName="Figure";const J=e=>({media:(0,l.AH)({position:"relative",gridArea:"Figure",marginRight:e.spacing(2),width:"40px","> img":{width:"100%"},"&:empty":{display:"none"}})}),X=(0,i.memo)(({children:e,className:u,separator:m="|"})=>{const h=(0,x.of)(Q);let H=e;const M=i.Children.toArray(e).filter(Boolean);return M.length?(H=M.map((q,k)=>i.createElement("div",{key:`element_${k}`,className:h.metadataItem},q)),M.length>1&&m&&(H=M.reduce((q,k,$)=>[q,i.createElement("span",{key:`separator_${$}`,className:h.separator},m),k])),i.createElement("div",{className:(0,l.cx)(h.metadata,u)},H)):null});X.displayName="Meta";const Q=e=>({metadata:(0,l.AH)({gridArea:"Meta",display:"flex",alignItems:"center",width:"100%",fontSize:e.typography.size.sm,color:e.colors.text.secondary,margin:e.spacing(.5,0,0),lineHeight:e.typography.bodySmall.lineHeight,overflowWrap:"anywhere"}),metadataItem:(0,l.AH)({zIndex:0}),separator:(0,l.AH)({margin:`0 ${e.spacing(1)}`})}),ee=({children:e,disabled:u,variant:m,className:h})=>{const H=(0,x.of)(ne),M=(0,i.useContext)(L),q=M?.disabled||u,k=m==="primary"?H.actions:H.secondaryActions;return i.createElement("div",{className:(0,l.cx)(k,h)},i.Children.map(e,$=>i.isValidElement($)?(0,i.cloneElement)($,B({disabled:q},$.props)):null))},ne=e=>({actions:(0,l.AH)({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:e.spacing(1),gridArea:"Actions",marginTop:e.spacing(2)}),secondaryActions:(0,l.AH)({alignSelf:"center",color:e.colors.text.secondary,display:"flex",flexDirection:"row",flexWrap:"wrap",gap:e.spacing(1),gridArea:"Secondary",marginTop:e.spacing(2)})}),Z=({children:e,disabled:u,className:m})=>i.createElement(ee,{variant:"primary",disabled:u,className:m},e);Z.displayName="Actions";const c=({children:e,disabled:u,className:m})=>i.createElement(ee,{variant:"secondary",disabled:u,className:m},e);c.displayName="SecondaryActions";const ae=e=>B(B(B(B(B(B({inner:css({display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",flexWrap:"wrap"})},_(e)),Q(e)),U(e)),J(e)),ne(e)),P(e));v.Heading=j,v.Tags=p,v.Figure=K,v.Meta=X,v.Actions=Z,v.SecondaryActions=c,v.Description=G;try{v.displayName="Heading",v.__docgenInfo={description:"Generic card component",displayName:"Heading",props:{disabled:{defaultValue:null,description:"Indicates if the card and all its actions can be interacted with",name:"disabled",required:!1,type:{name:"boolean"}},href:{defaultValue:null,description:"Link to redirect to on card click. If provided, the Card inner content will be rendered inside `a`",name:"href",required:!1,type:{name:"string"}},onClick:{defaultValue:null,description:"On click handler for the Card",name:"onClick",required:!1,type:{name:"((e: MouseEvent<HTMLElement, MouseEvent>) => void)"}},heading:{defaultValue:null,description:"@deprecated Use `Card.Heading` instead",name:"heading",required:!1,type:{name:"ReactNode"}},description:{defaultValue:null,description:"@deprecated Use `Card.Description` instead",name:"description",required:!1,type:{name:"string"}},isSelected:{defaultValue:null,description:'Makes the card selectable, set to "true" to apply selected styles',name:"isSelected",required:!1,type:{name:"boolean"}},isCompact:{defaultValue:null,description:"If true, the padding of the Card will be smaller",name:"isCompact",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"Custom container styles",name:"className",required:!1,type:{name:"string"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Card/Card.tsx#Heading"]={docgenInfo:j.__docgenInfo,name:"Heading",path:"src/components/Card/Card.tsx#Heading"})}catch{}try{j.displayName="Card.Heading",j.__docgenInfo={description:"Main heading for the card",displayName:"Card.Heading",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},"aria-label":{defaultValue:null,description:"",name:"aria-label",required:!1,type:{name:"string"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Card/Card.tsx#Card.Heading"]={docgenInfo:v.Heading.__docgenInfo,name:"Card.Heading",path:"src/components/Card/Card.tsx#Card.Heading"})}catch{}try{p.displayName="Card.Tags",p.__docgenInfo={description:"",displayName:"Card.Tags",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Card/Card.tsx#Card.Tags"]={docgenInfo:v.Tags.__docgenInfo,name:"Card.Tags",path:"src/components/Card/Card.tsx#Card.Tags"})}catch{}try{K.displayName="Card.Figure",K.__docgenInfo={description:"",displayName:"Card.Figure",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},align:{defaultValue:{value:"start"},description:"",name:"align",required:!1,type:{name:"enum",value:[{value:'"start"'},{value:'"center"'}]}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Card/Card.tsx#Card.Figure"]={docgenInfo:v.Figure.__docgenInfo,name:"Card.Figure",path:"src/components/Card/Card.tsx#Card.Figure"})}catch{}try{X.displayName="Card.Meta",X.__docgenInfo={description:"",displayName:"Card.Meta",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},separator:{defaultValue:null,description:"",name:"separator",required:!1,type:{name:"string"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Card/Card.tsx#Card.Meta"]={docgenInfo:v.Meta.__docgenInfo,name:"Card.Meta",path:"src/components/Card/Card.tsx#Card.Meta"})}catch{}try{Z.displayName="Card.Actions",Z.__docgenInfo={description:"",displayName:"Card.Actions",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Card/Card.tsx#Card.Actions"]={docgenInfo:v.Actions.__docgenInfo,name:"Card.Actions",path:"src/components/Card/Card.tsx#Card.Actions"})}catch{}try{c.displayName="Card.SecondaryActions",c.__docgenInfo={description:"",displayName:"Card.SecondaryActions",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Card/Card.tsx#Card.SecondaryActions"]={docgenInfo:v.SecondaryActions.__docgenInfo,name:"Card.SecondaryActions",path:"src/components/Card/Card.tsx#Card.SecondaryActions"})}catch{}try{G.displayName="Card.Description",G.__docgenInfo={description:"Card description text",displayName:"Card.Description",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Card/Card.tsx#Card.Description"]={docgenInfo:v.Description.__docgenInfo,name:"Card.Description",path:"src/components/Card/Card.tsx#Card.Description"})}catch{}},"./src/components/Layout/Box/Box.tsx":function(F,D,f){f.d(D,{a:function(){return w}});var l=f("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=f("../../node_modules/react/index.js"),x=f("./src/themes/ThemeContext.tsx"),t=f("./src/components/Layout/utils/responsiveness.tsx"),a=Object.defineProperty,A=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,W=(n,y,S)=>y in n?a(n,y,{enumerable:!0,configurable:!0,writable:!0,value:S}):n[y]=S,z=(n,y)=>{for(var S in y||(y={}))R.call(y,S)&&W(n,S,y[S]);if(A)for(var S of A(y))Y.call(y,S)&&W(n,S,y[S]);return n},V=(n,y)=>{var S={};for(var o in n)R.call(n,o)&&y.indexOf(o)<0&&(S[o]=n[o]);if(n!=null&&A)for(var o of A(n))y.indexOf(o)<0&&Y.call(n,o)&&(S[o]=n[o]);return S};const w=(0,i.forwardRef)((n,y)=>{const S=n,{children:o,margin:r,marginX:s,marginY:d,marginTop:g,marginBottom:O,marginLeft:T,marginRight:B,padding:N,paddingX:I,paddingY:L,paddingTop:v,paddingBottom:j,paddingLeft:_,paddingRight:p,display:P,backgroundColor:G,grow:U,shrink:K,basis:J,flex:X,borderColor:Q,borderStyle:ee,borderRadius:ne,justifyContent:Z,alignItems:c,boxShadow:ae,element:e,gap:u}=S,m=V(S,["children","margin","marginX","marginY","marginTop","marginBottom","marginLeft","marginRight","padding","paddingX","paddingY","paddingTop","paddingBottom","paddingLeft","paddingRight","display","backgroundColor","grow","shrink","basis","flex","borderColor","borderStyle","borderRadius","justifyContent","alignItems","boxShadow","element","gap"]),h=(0,x.of)(E,r,s,d,g,O,T,B,N,I,L,v,j,_,p,P,G,U,K,J,X,Q,ee,ne,Z,c,ae,u),H=e??"div";return i.createElement(H,z({ref:y,className:h.root},m),o)});w.displayName="Box";const C=(n,y)=>{switch(n){case"error":case"success":case"info":case"warning":return y.colors[n].borderTransparent;default:return n?y.colors.border[n]:void 0}},b=(n,y)=>{switch(n){case"error":case"success":case"info":case"warning":return y.colors[n].transparent;default:return n?y.colors.background[n]:void 0}},E=(n,y,S,o,r,s,d,g,O,T,B,N,I,L,v,j,_,p,P,G,U,K,J,X,Q,ee,ne,Z)=>({root:(0,l.AH)([(0,t.Y)(n,y,c=>({margin:n.spacing(c)})),(0,t.Y)(n,S,c=>({marginLeft:n.spacing(c),marginRight:n.spacing(c)})),(0,t.Y)(n,o,c=>({marginTop:n.spacing(c),marginBottom:n.spacing(c)})),(0,t.Y)(n,r,c=>({marginTop:n.spacing(c)})),(0,t.Y)(n,s,c=>({marginBottom:n.spacing(c)})),(0,t.Y)(n,d,c=>({marginLeft:n.spacing(c)})),(0,t.Y)(n,g,c=>({marginRight:n.spacing(c)})),(0,t.Y)(n,O,c=>({padding:n.spacing(c)})),(0,t.Y)(n,T,c=>({paddingLeft:n.spacing(c),paddingRight:n.spacing(c)})),(0,t.Y)(n,B,c=>({paddingTop:n.spacing(c),paddingBottom:n.spacing(c)})),(0,t.Y)(n,N,c=>({paddingTop:n.spacing(c)})),(0,t.Y)(n,I,c=>({paddingBottom:n.spacing(c)})),(0,t.Y)(n,L,c=>({paddingLeft:n.spacing(c)})),(0,t.Y)(n,v,c=>({paddingRight:n.spacing(c)})),(0,t.Y)(n,j,c=>({display:c})),(0,t.Y)(n,_,c=>({backgroundColor:b(c,n)})),(0,t.Y)(n,p,c=>({flexGrow:c})),(0,t.Y)(n,P,c=>({flexShrink:c})),(0,t.Y)(n,G,c=>({flexBasis:c})),(0,t.Y)(n,U,c=>({flex:c})),(0,t.Y)(n,J,c=>({borderStyle:c})),(0,t.Y)(n,K,c=>({borderColor:C(c,n)})),(J||K)&&{borderWidth:"1px"},(0,t.Y)(n,Q,c=>({justifyContent:c})),(0,t.Y)(n,ee,c=>({alignItems:c})),(0,t.Y)(n,X,c=>({borderRadius:n.shape.radius[c]})),(0,t.Y)(n,ne,c=>({boxShadow:n.shadows[c]})),(0,t.Y)(n,Z,c=>({gap:n.spacing(c)}))])});try{w.displayName="Box",w.__docgenInfo={description:"",displayName:"Box",props:{margin:{defaultValue:null,description:"Sets the property `margin`",name:"margin",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},marginX:{defaultValue:null,description:"Sets the properties `margin-top` and `margin-bottom`. Higher priority than margin.",name:"marginX",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},marginY:{defaultValue:null,description:"Sets the properties `margin-left` and `margin-right`. Higher priority than margin.",name:"marginY",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},marginTop:{defaultValue:null,description:"Sets the property `margin-top`. Higher priority than margin and marginY.",name:"marginTop",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},marginBottom:{defaultValue:null,description:"Sets the property `margin-bottom`. Higher priority than margin and marginXY",name:"marginBottom",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},marginLeft:{defaultValue:null,description:"Sets the property `margin-left`. Higher priority than margin and marginX.",name:"marginLeft",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},marginRight:{defaultValue:null,description:"Sets the property `margin-right`. Higher priority than margin and marginX.",name:"marginRight",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},padding:{defaultValue:null,description:"Sets the property `padding`",name:"padding",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},paddingX:{defaultValue:null,description:"Sets the properties `padding-top` and `padding-bottom`. Higher priority than padding.",name:"paddingX",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},paddingY:{defaultValue:null,description:"Sets the properties `padding-left` and `padding-right`. Higher priority than padding.",name:"paddingY",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},paddingTop:{defaultValue:null,description:"Sets the property `padding-top`. Higher priority than padding and paddingY.",name:"paddingTop",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},paddingBottom:{defaultValue:null,description:"Sets the property `padding-bottom`. Higher priority than padding and paddingY.",name:"paddingBottom",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},paddingLeft:{defaultValue:null,description:"Sets the property `padding-left`. Higher priority than padding and paddingX.",name:"paddingLeft",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},paddingRight:{defaultValue:null,description:"Sets the property `padding-right`. Higher priority than padding and paddingX.",name:"paddingRight",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},borderStyle:{defaultValue:null,description:"",name:"borderStyle",required:!1,type:{name:"ResponsiveProp<BorderStyle>"}},borderColor:{defaultValue:null,description:"",name:"borderColor",required:!1,type:{name:"ResponsiveProp<BorderColor>"}},borderRadius:{defaultValue:null,description:"",name:"borderRadius",required:!1,type:{name:"ResponsiveProp<keyof Radii>"}},alignItems:{defaultValue:null,description:"",name:"alignItems",required:!1,type:{name:"ResponsiveProp<AlignItems>"}},justifyContent:{defaultValue:null,description:"",name:"justifyContent",required:!1,type:{name:"ResponsiveProp<JustifyContent>"}},gap:{defaultValue:null,description:"",name:"gap",required:!1,type:{name:"ResponsiveProp<ThemeSpacingTokens>"}},backgroundColor:{defaultValue:null,description:"",name:"backgroundColor",required:!1,type:{name:"ResponsiveProp<BackgroundColor>"}},display:{defaultValue:null,description:"",name:"display",required:!1,type:{name:"ResponsiveProp<Display>"}},boxShadow:{defaultValue:null,description:"",name:"boxShadow",required:!1,type:{name:"ResponsiveProp<keyof ThemeShadows>"}},element:{defaultValue:null,description:"Sets the HTML element that will be rendered as a Box. Defaults to 'div'",name:"element",required:!1,type:{name:"ElementType"}},grow:{defaultValue:null,description:"Sets the property `flex-grow`",name:"grow",required:!1,type:{name:"ResponsiveProp<number>"}},shrink:{defaultValue:null,description:"Sets the property `flex-shrink`",name:"shrink",required:!1,type:{name:"ResponsiveProp<number>"}},basis:{defaultValue:null,description:"Sets the property `flex-basis`",name:"basis",required:!1,type:{name:"ResponsiveProp<FlexBasis>"}},flex:{defaultValue:null,description:"Sets the property `flex`",name:"flex",required:!1,type:{name:"ResponsiveProp<Flex>"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Layout/Box/Box.tsx#Box"]={docgenInfo:w.__docgenInfo,name:"Box",path:"src/components/Layout/Box/Box.tsx#Box"})}catch{}},"./src/components/Layout/Layout.tsx":function(F,D,f){f.d(D,{Gy:function(){return C},PE:function(){return w},gW:function(){return b}});var l=f("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=f("../../node_modules/react/index.js"),x=f("./src/themes/ThemeContext.tsx"),t=Object.defineProperty,a=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,Y=(o,r,s)=>r in o?t(o,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[r]=s,W=(o,r)=>{for(var s in r||(r={}))A.call(r,s)&&Y(o,s,r[s]);if(a)for(var s of a(r))R.call(r,s)&&Y(o,s,r[s]);return o},z=(o,r)=>{var s={};for(var d in o)A.call(o,d)&&r.indexOf(d)<0&&(s[d]=o[d]);if(o!=null&&a)for(var d of a(o))r.indexOf(d)<0&&R.call(o,d)&&(s[d]=o[d]);return s},V=(o=>(o[o.Horizontal=0]="Horizontal",o[o.Vertical=1]="Vertical",o))(V||{});const w=o=>{var r=o,{children:s,orientation:d=0,spacing:g="sm",justify:O="flex-start",align:T="normal",wrap:B=!1,width:N="100%",height:I="100%"}=r,L=z(r,["children","orientation","spacing","justify","align","wrap","width","height"]);const v=(0,x.of)(n,d,g,O,T,B);return i.createElement("div",W({className:v.layout,style:{width:N,height:I}},L),i.Children.toArray(s).filter(Boolean).map((j,_)=>i.createElement("div",{className:v.childWrapper,key:_},j)))},C=({children:o,spacing:r,justify:s,align:d="center",wrap:g,width:O,height:T})=>i.createElement(w,{spacing:r,justify:s,orientation:0,align:d,width:O,height:T,wrap:g},o),b=({children:o,spacing:r,justify:s,align:d,width:g,height:O})=>i.createElement(w,{spacing:r,justify:s,orientation:1,align:d,width:g,height:O},o),E=({children:o,padding:r,margin:s,grow:d,shrink:g})=>{const O=useStyles2(S,r,s);return React.createElement("div",{className:cx(O.wrapper,d!==void 0&&css({flexGrow:d}),g!==void 0&&css({flexShrink:g}))},o)},n=(o,r,s,d,g,O)=>{const T=s!=="none"?o.spacing(y[s]):0,B=r===0&&!O||r===1?0:`-${T}`,N=r===1?"vertical-group":"horizontal-group";return{layout:(0,l.AH)({label:N,display:"flex",flexDirection:r===1?"column":"row",flexWrap:O?"wrap":"nowrap",justifyContent:d,alignItems:g,height:"100%",maxWidth:"100%",marginBottom:B}),childWrapper:(0,l.AH)({label:"layoutChildrenWrapper",marginBottom:r===0&&!O?0:T,marginRight:r===0?T:0,display:"flex",alignItems:g,"&:last-child":{marginBottom:r===1?0:void 0,marginRight:r===0?0:void 0}})}},y={none:0,xs:.5,sm:1,md:2,lg:3},S=(o,r,s)=>{const d=r&&r!=="none"&&o.spacing(y[r])||0,g=s&&s!=="none"&&o.spacing(y[s])||0;return{wrapper:css({label:"container",margin:g,padding:d})}};try{w.displayName="Layout",w.__docgenInfo={description:"",displayName:"Layout",props:{orientation:{defaultValue:{value:"Orientation.Horizontal"},description:"",name:"orientation",required:!1,type:{name:"enum",value:[{value:"0"},{value:"1"}]}},spacing:{defaultValue:{value:"sm"},description:"",name:"spacing",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"sm"'},{value:'"md"'},{value:'"lg"'},{value:'"none"'}]}},justify:{defaultValue:{value:"flex-start"},description:"",name:"justify",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"flex-start"'},{value:'"flex-end"'},{value:'"space-between"'}]}},align:{defaultValue:{value:"center"},description:"",name:"align",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"flex-start"'},{value:'"flex-end"'},{value:'"normal"'}]}},width:{defaultValue:{value:"100%"},description:"",name:"width",required:!1,type:{name:"string"}},wrap:{defaultValue:{value:"false"},description:"",name:"wrap",required:!1,type:{name:"boolean"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Layout/Layout.tsx#Layout"]={docgenInfo:w.__docgenInfo,name:"Layout",path:"src/components/Layout/Layout.tsx#Layout"})}catch{}try{C.displayName="HorizontalGroup",C.__docgenInfo={description:"",displayName:"HorizontalGroup",props:{width:{defaultValue:{value:"100%"},description:"",name:"width",required:!1,type:{name:"string"}},wrap:{defaultValue:{value:"false"},description:"",name:"wrap",required:!1,type:{name:"boolean"}},align:{defaultValue:{value:"center"},description:"",name:"align",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"flex-start"'},{value:'"flex-end"'},{value:'"normal"'}]}},spacing:{defaultValue:{value:"sm"},description:"",name:"spacing",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"sm"'},{value:'"md"'},{value:'"lg"'},{value:'"none"'}]}},justify:{defaultValue:{value:"flex-start"},description:"",name:"justify",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"flex-start"'},{value:'"flex-end"'},{value:'"space-between"'}]}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Layout/Layout.tsx#HorizontalGroup"]={docgenInfo:C.__docgenInfo,name:"HorizontalGroup",path:"src/components/Layout/Layout.tsx#HorizontalGroup"})}catch{}try{b.displayName="VerticalGroup",b.__docgenInfo={description:"",displayName:"VerticalGroup",props:{width:{defaultValue:{value:"100%"},description:"",name:"width",required:!1,type:{name:"string"}},align:{defaultValue:{value:"center"},description:"",name:"align",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"flex-start"'},{value:'"flex-end"'},{value:'"normal"'}]}},spacing:{defaultValue:{value:"sm"},description:"",name:"spacing",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"sm"'},{value:'"md"'},{value:'"lg"'},{value:'"none"'}]}},justify:{defaultValue:{value:"flex-start"},description:"",name:"justify",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"flex-start"'},{value:'"flex-end"'},{value:'"space-between"'}]}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Layout/Layout.tsx#VerticalGroup"]={docgenInfo:b.__docgenInfo,name:"VerticalGroup",path:"src/components/Layout/Layout.tsx#VerticalGroup"})}catch{}try{E.displayName="Container",E.__docgenInfo={description:"",displayName:"Container",props:{padding:{defaultValue:null,description:"",name:"padding",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"sm"'},{value:'"md"'},{value:'"lg"'},{value:'"none"'}]}},margin:{defaultValue:null,description:"",name:"margin",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"sm"'},{value:'"md"'},{value:'"lg"'},{value:'"none"'}]}},grow:{defaultValue:null,description:"",name:"grow",required:!1,type:{name:"number"}},shrink:{defaultValue:null,description:"",name:"shrink",required:!1,type:{name:"number"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Layout/Layout.tsx#Container"]={docgenInfo:E.__docgenInfo,name:"Container",path:"src/components/Layout/Layout.tsx#Container"})}catch{}},"./src/components/Layout/utils/responsiveness.tsx":function(F,D,f){f.d(D,{Y:function(){return i}});function l(x,t,a,A){const R=t[A];if(R!=null)return{[x.breakpoints.up(A)]:a(R)}}function i(x,t,a){return t==null?null:typeof t!="object"||!("xs"in t)?a(t):[l(x,t,a,"xs"),l(x,t,a,"sm"),l(x,t,a,"md"),l(x,t,a,"lg"),l(x,t,a,"xl"),l(x,t,a,"xxl")]}try{i.displayName="getResponsiveStyle",i.__docgenInfo={description:"Function that converts a ResponsiveProp object into CSS",displayName:"getResponsiveStyle",props:{}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Layout/utils/responsiveness.tsx#getResponsiveStyle"]={docgenInfo:i.__docgenInfo,name:"getResponsiveStyle",path:"src/components/Layout/utils/responsiveness.tsx#getResponsiveStyle"})}catch{}},"./src/components/Text/Text.tsx":function(F,D,f){f.d(D,{E:function(){return S}});var l=f("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=f("../../node_modules/react/index.js"),x=f("./src/themes/ThemeContext.tsx"),t=f("../../node_modules/react-dom/server.browser.js"),a=f("./src/components/Tooltip/Tooltip.tsx");const A=i.forwardRef(({childElement:r,children:s},d)=>{const[g,O]=(0,i.useState)(!1),T=(0,i.useRef)(null);(0,i.useImperativeHandle)(d,()=>T.current);const B=(0,i.useMemo)(()=>new ResizeObserver(I=>{for(const L of I)L.target.clientWidth&&L.target.scrollWidth&&(L.target.scrollWidth>L.target.clientWidth&&O(!0),L.target.scrollWidth<=L.target.clientWidth&&O(!1))}),[]);(0,i.useEffect)(()=>{const{current:I}=T;return I&&B.observe(I),()=>{B.disconnect()}},[O,B]);const N=I=>typeof I=="string"?I:t.renderToStaticMarkup(i.createElement(i.Fragment,null,I)).replace(/(<([^>]+)>)/gi,"");return g?i.createElement(a.m,{ref:T,content:N(s)},r(void 0)):r(T)});A.displayName="TruncatedText";try{A.displayName="TruncatedText",A.__docgenInfo={description:"",displayName:"TruncatedText",props:{childElement:{defaultValue:null,description:"",name:"childElement",required:!0,type:{name:"(ref: ForwardedRef<HTMLElement> | undefined) => ReactElement<any, string | JSXElementConstructor<any>>"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Text/TruncatedText.tsx#TruncatedText"]={docgenInfo:A.__docgenInfo,name:"TruncatedText",path:"src/components/Text/TruncatedText.tsx#TruncatedText"})}catch{}var R=f("./src/components/Text/utils.ts"),Y=Object.defineProperty,W=Object.defineProperties,z=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,b=(r,s,d)=>s in r?Y(r,s,{enumerable:!0,configurable:!0,writable:!0,value:d}):r[s]=d,E=(r,s)=>{for(var d in s||(s={}))w.call(s,d)&&b(r,d,s[d]);if(V)for(var d of V(s))C.call(s,d)&&b(r,d,s[d]);return r},n=(r,s)=>W(r,z(s)),y=(r,s)=>{var d={};for(var g in r)w.call(r,g)&&s.indexOf(g)<0&&(d[g]=r[g]);if(r!=null&&V)for(var g of V(r))s.indexOf(g)<0&&C.call(r,g)&&(d[g]=r[g]);return d};const S=i.forwardRef((r,s)=>{var d=r,{element:g="span",variant:O,weight:T,color:B,truncate:N,italic:I,textAlignment:L,children:v}=d,j=y(d,["element","variant","weight","color","truncate","italic","textAlignment","children"]);const _=(0,x.of)(o,g,O,B,T,N,I,L),p=P=>(0,i.createElement)(g,n(E({},j),{style:void 0,className:_,ref:P}),v);return!N||g==="span"?p(void 0):i.createElement(A,{childElement:p,children:v,ref:s})});S.displayName="Text";const o=(r,s,d,g,O,T,B,N)=>(0,l.AH)([E({margin:0,padding:0},(0,R.d$)(r,s,d)),d&&E({},r.typography[d]),g&&{color:(0,R.vT)(g,r)},O&&{fontWeight:(0,R.iV)(O,r)},T&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},B&&{fontStyle:"italic"},N&&{textAlign:N}]);try{S.displayName="Text",S.__docgenInfo={description:"",displayName:"Text",props:{element:{defaultValue:{value:"span"},description:'Defines what HTML element is defined underneath. "span" by default',name:"element",required:!1,type:{name:"enum",value:[{value:'"h1"'},{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'},{value:'"h6"'},{value:'"p"'},{value:'"span"'}]}},variant:{defaultValue:null,description:"What typograpy variant should be used for the component. Only use if default variant for the defined element is not what is needed",name:"variant",required:!1,type:{name:"enum",value:[{value:'"body"'},{value:'"h1"'},{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'},{value:'"h6"'},{value:'"bodySmall"'}]}},weight:{defaultValue:null,description:"Override the default weight for the used variant",name:"weight",required:!1,type:{name:"enum",value:[{value:'"medium"'},{value:'"light"'},{value:'"regular"'},{value:'"bold"'}]}},color:{defaultValue:null,description:"Color to use for text",name:"color",required:!1,type:{name:"enum",value:[{value:'"info"'},{value:'"link"'},{value:'"primary"'},{value:'"secondary"'},{value:'"success"'},{value:'"error"'},{value:'"disabled"'},{value:'"warning"'},{value:'"maxContrast"'}]}},truncate:{defaultValue:null,description:"Use to cut the text off with ellipsis if there isn't space to show all of it. On hover shows the rest of the text",name:"truncate",required:!1,type:{name:"boolean"}},italic:{defaultValue:null,description:"If true, show the text as italic. False by default",name:"italic",required:!1,type:{name:"boolean"}},textAlignment:{defaultValue:null,description:"Whether to align the text to left, center or right",name:"textAlignment",required:!1,type:{name:"enum",value:[{value:'"right"'},{value:'"left"'},{value:'"start"'},{value:'"end"'},{value:'"center"'},{value:'"inherit"'},{value:'"justify"'},{value:'"initial"'},{value:'"-moz-initial"'},{value:'"revert"'},{value:'"revert-layer"'},{value:'"unset"'},{value:'"-webkit-match-parent"'},{value:'"match-parent"'}]}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Text/Text.tsx#Text"]={docgenInfo:S.__docgenInfo,name:"Text",path:"src/components/Text/Text.tsx#Text"})}catch{}},"./src/components/Text/utils.ts":function(F,D,f){f.d(D,{d$:function(){return x},iV:function(){return l},vT:function(){return i}});const l=(t,a)=>{switch(t){case"bold":return a.typography.fontWeightBold;case"medium":return a.typography.fontWeightMedium;case"light":return a.typography.fontWeightLight;case"regular":case void 0:return a.typography.fontWeightRegular}},i=(t,a)=>{switch(t){case"error":return a.colors.error.text;case"success":return a.colors.success.text;case"info":return a.colors.info.text;case"warning":return a.colors.warning.text;default:return t?a.colors.text[t]:void 0}},x=(t,a,A)=>{if(A)return t.typography[A];switch(a){case"span":return;case"h1":return t.typography.h1;case"h2":return t.typography.h2;case"h3":return t.typography.h3;case"h4":return t.typography.h4;case"h5":return t.typography.h5;case"h6":return t.typography.h6;default:return t.typography.body}}}}]);
