"use strict";(self.webpackChunk_grafana_ui=self.webpackChunk_grafana_ui||[]).push([[6478],{"./src/components/Forms/InlineFieldRow.story.tsx":function(M,y,t){t.r(y),t.d(y,{default:function(){return R},single:function(){return v}});var a=t("../../node_modules/react/index.js"),i=t("./src/components/Input/Input.tsx"),b=t("./src/components/Forms/InlineField.tsx"),d=t("./src/components/Forms/InlineFieldRow.tsx"),n=t("../../node_modules/react/jsx-runtime.js"),p=t("../../node_modules/@mdx-js/react/lib/index.js");function c(P){const I=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre"},(0,p.RP)(),P.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(I.h1,{id:"inlinefieldrow",children:"InlineFieldRow"}),`
`,(0,n.jsxs)(I.p,{children:["Used to align multiple ",(0,n.jsx)(I.code,{children:"InlineField"})," components in one row. The row will wrap if the width of the children exceeds its own. Equivalent to the div with ",(0,n.jsx)(I.code,{children:"gf-form-inline"}),` class name.
Multiple `,(0,n.jsx)(I.code,{children:"InlineFieldRow"}),"s vertically stack on each other."]}),`
`,(0,n.jsx)(I.h3,{id:"usage",children:"Usage"}),`
`,(0,n.jsx)(I.pre,{children:(0,n.jsx)(I.code,{className:"language-jsx",children:`<InlineFieldRow>
  <InlineField label="Label Row 1">
    <Input placeholder="Label" />
  </InlineField>
  <InlineField label="Label Row 1">
    <Input placeholder="Label" />
  </InlineField>
</InlineFieldRow>
`})})]})}function h(P={}){const{wrapper:I}=Object.assign({},(0,p.RP)(),P.components);return I?(0,n.jsx)(I,Object.assign({},P,{children:(0,n.jsx)(c,P)})):c(P)}var f=h,x=Object.defineProperty,E=Object.defineProperties,w=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,r=(P,I,S)=>I in P?x(P,I,{enumerable:!0,configurable:!0,writable:!0,value:S}):P[I]=S,o=(P,I)=>{for(var S in I||(I={}))g.call(I,S)&&r(P,S,I[S]);if(m)for(var S of m(I))l.call(I,S)&&r(P,S,I[S]);return P},e=(P,I)=>E(P,w(I)),u,s,_;const O={title:"Forms/InlineFieldRow",component:d.C,parameters:{docs:{page:f}}},v=()=>a.createElement("div",{style:{width:"100%"}},a.createElement(d.C,null,a.createElement(b.I,{label:"Label Row 1"},a.createElement(i.p,{placeholder:"Label"})),a.createElement(b.I,{label:"Label Row 1"},a.createElement(i.p,{placeholder:"Label"}))),a.createElement(d.C,null,a.createElement(b.I,{label:"Label Row 2"},a.createElement(i.p,{placeholder:"Label"})),a.createElement(b.I,{label:"Label Row 2"},a.createElement(i.p,{placeholder:"Label"})),a.createElement(b.I,{label:"Label Row 2 Grow",grow:!0},a.createElement(i.p,{placeholder:"Label"}))));var R=O;v.parameters=e(o({},v.parameters),{docs:e(o({},(u=v.parameters)==null?void 0:u.docs),{source:o({originalSource:`() => {
  return <div style={{
    width: '100%'
  }}>
      <InlineFieldRow>
        <InlineField label="Label Row 1">
          <Input placeholder="Label" />
        </InlineField>
        <InlineField label="Label Row 1">
          <Input placeholder="Label" />
        </InlineField>
      </InlineFieldRow>
      <InlineFieldRow>
        <InlineField label="Label Row 2">
          <Input placeholder="Label" />
        </InlineField>
        <InlineField label="Label Row 2">
          <Input placeholder="Label" />
        </InlineField>
        <InlineField label="Label Row 2 Grow" grow>
          <Input placeholder="Label" />
        </InlineField>
      </InlineFieldRow>
    </div>;
}`},(_=(s=v.parameters)==null?void 0:s.docs)==null?void 0:_.source)})})},"../grafana-data/src/types/dataFrame.ts":function(M,y,t){t.d(y,{Bc:function(){return i},LE:function(){return b},PU:function(){return a}});var a=(n=>(n.time="time",n.number="number",n.string="string",n.boolean="boolean",n.trace="trace",n.geo="geo",n.enum="enum",n.other="other",n.frame="frame",n.nestedFrames="nestedFrames",n))(a||{});const i="Value",b="Time",d="Metric"},"../grafana-data/src/types/icon.ts":function(M,y,t){t.d(y,{Uo:function(){return b},az:function(){return a},n6:function(){return i}});const a={google:!0,microsoft:!0,github:!0,gitlab:!0,okta:!0,discord:!0,hipchat:!0,amazon:!0,"google-hangouts-alt":!0,pagerduty:!0,line:!0,anchor:!0,"adjust-circle":!0,"angle-double-down":!0,"angle-double-right":!0,"angle-double-up":!0,"angle-down":!0,"angle-left":!0,"angle-right":!0,"angle-up":!0,"align-left":!0,"align-right":!0,"application-observability":!0,apps:!0,"archive-alt":!0,arrow:!0,"arrow-down":!0,"arrow-from-right":!0,"arrow-left":!0,"arrow-random":!0,"arrow-right":!0,"arrow-to-right":!0,"arrow-up":!0,"arrows-h":!0,"arrows-v":!0,asserts:!0,"expand-arrows":!0,at:!0,ai:!0,backward:!0,bars:!0,bell:!0,"bell-slash":!0,bolt:!0,book:!0,bookmark:!0,"book-open":!0,"brackets-curly":!0,bug:!0,building:!0,"calculator-alt":!0,"calendar-alt":!0,"calendar-slash":!0,camera:!0,capture:!0,"channel-add":!0,"chart-line":!0,check:!0,"check-circle":!0,"check-square":!0,circle:!0,"circle-mono":!0,"clipboard-alt":!0,"clock-nine":!0,cloud:!0,"cloud-download":!0,"cloud-upload":!0,"code-branch":!0,cog:!0,columns:!0,"comment-alt":!0,"comment-alt-message":!0,"comment-alt-share":!0,"comments-alt":!0,compass:!0,copy:!0,"corner-down-right-alt":!0,"create-dashboard":!0,"credit-card":!0,crosshair:!0,cube:!0,dashboard:!0,database:!0,"dice-three":!0,docker:!0,"document-info":!0,"download-alt":!0,draggabledots:!0,edit:!0,"ellipsis-v":!0,envelope:!0,"exchange-alt":!0,"exclamation-triangle":!0,"exclamation-circle":!0,"external-link-alt":!0,eye:!0,"eye-slash":!0,"ellipsis-h":!0,"fa fa-spinner":!0,favorite:!0,"file-alt":!0,"file-blank":!0,"file-copy-alt":!0,"file-download":!0,"file-edit-alt":!0,"file-landscape-alt":!0,filter:!0,flip:!0,folder:!0,font:!0,fire:!0,"folder-open":!0,"folder-plus":!0,"folder-upload":!0,forward:!0,"frontend-observability":!0,"gf-bar-alignment-after":!0,"gf-bar-alignment-before":!0,"gf-bar-alignment-center":!0,"gf-glue":!0,"gf-grid":!0,"gf-interpolation-linear":!0,"gf-interpolation-smooth":!0,"gf-interpolation-step-after":!0,"gf-interpolation-step-before":!0,"gf-landscape":!0,"gf-layout-simple":!0,"gf-logs":!0,"gf-ml":!0,"gf-movepane-left":!0,"gf-movepane-right":!0,"gf-portrait":!0,"gf-service-account":!0,"gf-show-context":!0,"gf-pin":!0,"gf-prometheus":!0,"gf-traces":!0,globe:!0,grafana:!0,"graph-bar":!0,heart:!0,"heart-rate":!0,"heart-break":!0,history:!0,"history-alt":!0,home:!0,"home-alt":!0,"horizontal-align-center":!0,"horizontal-align-left":!0,"horizontal-align-right":!0,hourglass:!0,import:!0,info:!0,"info-circle":!0,k6:!0,"key-skeleton-alt":!0,keyboard:!0,"layer-group":!0,"layers-alt":!0,"library-panel":!0,"line-alt":!0,link:!0,"list-ui-alt":!0,"list-ul":!0,"list-ol":!0,lock:!0,"map-marker":!0,"map-marker-plus":!0,"map-marker-minus":!0,message:!0,minus:!0,"minus-circle":!0,"mobile-android":!0,monitor:!0,palette:!0,"panel-add":!0,"pathfinder-unite":!0,pause:!0,pen:!0,percentage:!0,play:!0,plug:!0,plus:!0,"plus-circle":!0,"plus-square":!0,power:!0,"presentation-play":!0,process:!0,"question-circle":!0,"record-audio":!0,repeat:!0,rocket:!0,"ruler-combined":!0,save:!0,search:!0,"search-minus":!0,"search-plus":!0,"share-alt":!0,shield:!0,"shield-exclamation":!0,signal:!0,signin:!0,signout:!0,sitemap:!0,slack:!0,"sliders-v-alt":!0,spinner:!0,"sort-amount-down":!0,"sort-amount-up":!0,"square-shape":!0,star:!0,"step-backward":!0,stopwatch:!0,"stopwatch-slash":!0,sync:!0,"sync-slash":!0,table:!0,"tag-alt":!0,"telegram-alt":!0,"text-fields":!0,"thumbs-up":!0,times:!0,"times-circle":!0,"toggle-on":!0,"toggle-off":!0,"trash-alt":!0,unarchive:!0,unlock:!0,upload:!0,user:!0,"users-alt":!0,"user-arrows":!0,"vertical-align-bottom":!0,"vertical-align-center":!0,"vertical-align-top":!0,"web-section-alt":!0,"wrap-text":!0,rss:!0,x:!0};function i(d){return!d||typeof d!="string"?!1:d in a}function b(d){if(i(d))return d}},"./src/components/Forms/FieldValidationMessage.tsx":function(M,y,t){t.d(y,{P:function(){return n}});var a=t("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=t("../../node_modules/react/index.js"),b=t("./src/themes/ThemeContext.tsx"),d=t("./src/components/Icon/Icon.tsx");const n=({children:c,horizontal:h,className:f})=>{const x=(0,b.of)(p),E=(0,a.cx)(h?x.horizontal:x.vertical,f);return i.createElement("div",{role:"alert",className:E},i.createElement(d.I,{className:x.fieldValidationMessageIcon,name:"exclamation-triangle"}),c)},p=c=>{const h=`
      font-size: ${c.typography.size.sm};
      font-weight: ${c.typography.fontWeightMedium};
      padding: ${c.spacing(.5,1)};
      color: ${c.colors.error.contrastText};
      background: ${c.colors.error.main};
      border-radius: ${c.shape.radius.default};
      position: relative;
      display: inline-block;
      align-self: flex-start;

      a {
        color: ${c.colors.error.contrastText};
        text-decoration: underline;
      }

      a:hover {
        text-decoration: none;
      }
    `;return{vertical:(0,a.AH)(h,{margin:c.spacing(.5,0,0,0),"&:before":{content:'""',position:"absolute",left:"9px",top:"-5px",width:0,height:0,borderWidth:"0 4px 5px 4px",borderColor:`transparent transparent ${c.colors.error.main} transparent`,borderStyle:"solid"}}),horizontal:(0,a.AH)(h,{marginLeft:"10px","&:before":{content:'""',position:"absolute",left:"-5px",top:"9px",width:0,height:0,borderWidth:"4px 5px 4px 0",borderColor:"transparent #e02f44 transparent transparent",borderStyle:"solid"}}),fieldValidationMessageIcon:(0,a.AH)({marginRight:c.spacing()})}};try{n.displayName="FieldValidationMessage",n.__docgenInfo={description:"",displayName:"FieldValidationMessage",props:{className:{defaultValue:null,description:"Override component style",name:"className",required:!1,type:{name:"string"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Forms/FieldValidationMessage.tsx#FieldValidationMessage"]={docgenInfo:n.__docgenInfo,name:"FieldValidationMessage",path:"src/components/Forms/FieldValidationMessage.tsx#FieldValidationMessage"})}catch{}try{p.displayName="getFieldValidationMessageStyles",p.__docgenInfo={description:"",displayName:"getFieldValidationMessageStyles",props:{name:{defaultValue:null,description:"",name:"name",required:!0,type:{name:"string"}},isDark:{defaultValue:null,description:"",name:"isDark",required:!0,type:{name:"boolean"}},isLight:{defaultValue:null,description:"",name:"isLight",required:!0,type:{name:"boolean"}},colors:{defaultValue:null,description:"",name:"colors",required:!0,type:{name:"ThemeColors"}},breakpoints:{defaultValue:null,description:"",name:"breakpoints",required:!0,type:{name:"ThemeBreakpoints"}},spacing:{defaultValue:null,description:"",name:"spacing",required:!0,type:{name:"ThemeSpacing"}},shape:{defaultValue:null,description:"",name:"shape",required:!0,type:{name:"ThemeShape"}},components:{defaultValue:null,description:"",name:"components",required:!0,type:{name:"ThemeComponents"}},typography:{defaultValue:null,description:"",name:"typography",required:!0,type:{name:"ThemeTypography"}},zIndex:{defaultValue:null,description:"",name:"zIndex",required:!0,type:{name:"{ activePanel: number; navbarFixed: number; sidemenu: number; dropdown: number; typeahead: number; tooltip: number; modalBackdrop: number; modal: number; portal: number; }"}},shadows:{defaultValue:null,description:"",name:"shadows",required:!0,type:{name:"ThemeShadows"}},visualization:{defaultValue:null,description:"",name:"visualization",required:!0,type:{name:"ThemeVisualizationColors"}},transitions:{defaultValue:null,description:"",name:"transitions",required:!0,type:{name:"ThemeTransitions"}},v1:{defaultValue:null,description:"@deprecated Will be removed in a future version",name:"v1",required:!0,type:{name:"GrafanaTheme"}},flags:{defaultValue:null,description:"feature flags that might impact component looks",name:"flags",required:!0,type:{name:"{}"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Forms/FieldValidationMessage.tsx#getFieldValidationMessageStyles"]={docgenInfo:p.__docgenInfo,name:"getFieldValidationMessageStyles",path:"src/components/Forms/FieldValidationMessage.tsx#getFieldValidationMessageStyles"})}catch{}},"./src/components/Forms/InlineField.tsx":function(M,y,t){t.d(y,{I:function(){return g}});var a=t("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=t("../../node_modules/react/index.js"),b=t("./src/themes/ThemeContext.tsx"),d=t("./src/utils/reactUtils.ts"),n=t("./src/components/Forms/FieldValidationMessage.tsx"),p=t("./src/components/Forms/InlineLabel.tsx"),c=Object.defineProperty,h=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,E=(r,o,e)=>o in r?c(r,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[o]=e,w=(r,o)=>{for(var e in o||(o={}))f.call(o,e)&&E(r,e,o[e]);if(h)for(var e of h(o))x.call(o,e)&&E(r,e,o[e]);return r},m=(r,o)=>{var e={};for(var u in r)f.call(r,u)&&o.indexOf(u)<0&&(e[u]=r[u]);if(r!=null&&h)for(var u of h(r))o.indexOf(u)<0&&x.call(r,u)&&(e[u]=r[u]);return e};const g=r=>{var o=r,{children:e,label:u,tooltip:s,labelWidth:_="auto",invalid:O,loading:v,disabled:R,required:P,className:I,htmlFor:S,grow:L,shrink:A,error:T,transparent:D,interactive:B}=o,F=m(o,["children","label","tooltip","labelWidth","invalid","loading","disabled","required","className","htmlFor","grow","shrink","error","transparent","interactive"]);const V=(0,b.$j)(),N=l(V,L,A),W=S??(0,d.e)(e),C=typeof u=="string"?i.createElement(p.c,{interactive:B,width:_,tooltip:s,htmlFor:W,transparent:D},`${u}${P?" *":""}`):u;return i.createElement("div",w({className:(0,a.cx)(N.container,I)},F),C,i.createElement("div",{className:N.childContainer},i.cloneElement(e,{invalid:O,disabled:R,loading:v}),O&&T&&i.createElement("div",{className:(0,a.cx)(N.fieldValidationWrapper)},i.createElement(n.P,null,T))))};g.displayName="InlineField";const l=(r,o,e)=>({container:(0,a.AH)({display:"flex",flexDirection:"row",alignItems:"flex-start",textAlign:"left",position:"relative",flex:`${o?1:0} ${e?1:0} auto`,margin:`0 ${r.spacing(.5)} ${r.spacing(.5)} 0`}),childContainer:(0,a.AH)({flex:`${o?1:0} ${e?1:0} auto`}),fieldValidationWrapper:(0,a.AH)({marginTop:r.spacing(.5)})});try{g.displayName="InlineField",g.__docgenInfo={description:"",displayName:"InlineField",props:{tooltip:{defaultValue:null,description:"Content for the label's tooltip",name:"tooltip",required:!1,type:{name:"PopoverContent"}},labelWidth:{defaultValue:{value:"auto"},description:"Custom width for the label as a multiple of 8px",name:"labelWidth",required:!1,type:{name:'number | "auto"'}},grow:{defaultValue:null,description:"Make the field's child to fill the width of the row. Equivalent to setting `flex-grow:1` on the field",name:"grow",required:!1,type:{name:"boolean"}},shrink:{defaultValue:null,description:"Make the field's child shrink with width of the row. Equivalent to setting `flex-shrink:1` on the field",name:"shrink",required:!1,type:{name:"boolean"}},transparent:{defaultValue:null,description:"Make field's background transparent",name:"transparent",required:!1,type:{name:"boolean"}},error:{defaultValue:null,description:"Error message to display",name:"error",required:!1,type:{name:"string | null"}},htmlFor:{defaultValue:null,description:"A unique id that associates the label of the Field component with the control with the unique id.\nIf the `htmlFor` property is missing the `htmlFor` will be inferred from the `id` or `inputId` property of the first child.\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Element/label#attr-for",name:"htmlFor",required:!1,type:{name:"string"}},interactive:{defaultValue:null,description:"Make tooltip interactive",name:"interactive",required:!1,type:{name:"boolean"}},label:{defaultValue:null,description:"Label for the field",name:"label",required:!1,type:{name:"ReactNode"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},children:{defaultValue:null,description:"Form input element, i.e Input or Switch",name:"children",required:!0,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},disabled:{defaultValue:null,description:"Indicates if field is disabled",name:"disabled",required:!1,type:{name:"boolean"}},invalid:{defaultValue:null,description:"Indicates if field is in invalid state",name:"invalid",required:!1,type:{name:"boolean"}},required:{defaultValue:null,description:"Indicates if field is required",name:"required",required:!1,type:{name:"boolean"}},loading:{defaultValue:null,description:"Indicates if field is in loading state",name:"loading",required:!1,type:{name:"boolean"}},validationMessageHorizontalOverflow:{defaultValue:null,description:"make validation message overflow horizontally. Prevents pushing out adjacent inline components",name:"validationMessageHorizontalOverflow",required:!1,type:{name:"boolean"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Forms/InlineField.tsx#InlineField"]={docgenInfo:g.__docgenInfo,name:"InlineField",path:"src/components/Forms/InlineField.tsx#InlineField"})}catch{}},"./src/components/Forms/InlineFieldRow.tsx":function(M,y,t){t.d(y,{C:function(){return E}});var a=t("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=t("../../node_modules/react/index.js"),b=t("./src/themes/ThemeContext.tsx"),d=Object.defineProperty,n=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,h=(m,g,l)=>g in m?d(m,g,{enumerable:!0,configurable:!0,writable:!0,value:l}):m[g]=l,f=(m,g)=>{for(var l in g||(g={}))p.call(g,l)&&h(m,l,g[l]);if(n)for(var l of n(g))c.call(g,l)&&h(m,l,g[l]);return m},x=(m,g)=>{var l={};for(var r in m)p.call(m,r)&&g.indexOf(r)<0&&(l[r]=m[r]);if(m!=null&&n)for(var r of n(m))g.indexOf(r)<0&&c.call(m,r)&&(l[r]=m[r]);return l};const E=m=>{var g=m,{children:l,className:r}=g,o=x(g,["children","className"]);const e=(0,b.of)(w);return i.createElement("div",f({className:(0,a.cx)(e.container,r)},o),l)},w=m=>({container:(0,a.AH)({label:"InlineFieldRow",display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-start",rowGap:m.spacing(.5)})});try{E.displayName="InlineFieldRow",E.__docgenInfo={description:"",displayName:"InlineFieldRow",props:{}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Forms/InlineFieldRow.tsx#InlineFieldRow"]={docgenInfo:E.__docgenInfo,name:"InlineFieldRow",path:"src/components/Forms/InlineFieldRow.tsx#InlineFieldRow"})}catch{}},"./src/components/Forms/InlineLabel.tsx":function(M,y,t){t.d(y,{c:function(){return m}});var a=t("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=t("../../node_modules/react/index.js"),b=t("./src/themes/ThemeContext.tsx"),d=t("./src/components/Icon/Icon.tsx"),n=t("./src/components/Tooltip/Tooltip.tsx"),p=Object.defineProperty,c=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,x=(l,r,o)=>r in l?p(l,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):l[r]=o,E=(l,r)=>{for(var o in r||(r={}))h.call(r,o)&&x(l,o,r[o]);if(c)for(var o of c(r))f.call(r,o)&&x(l,o,r[o]);return l},w=(l,r)=>{var o={};for(var e in l)h.call(l,e)&&r.indexOf(e)<0&&(o[e]=l[e]);if(l!=null&&c)for(var e of c(l))r.indexOf(e)<0&&f.call(l,e)&&(o[e]=l[e]);return o};const m=l=>{var r=l,{children:o,className:e,tooltip:u,width:s,transparent:_,interactive:O,as:v="label"}=r,R=w(r,["children","className","tooltip","width","transparent","interactive","as"]);const P=(0,b.of)(g,_,s);return i.createElement(v,E({className:(0,a.cx)(P.label,e)},R),o,u&&i.createElement(n.m,{interactive:O,placement:"top",content:u,theme:"info"},i.createElement(d.I,{tabIndex:0,name:"info-circle",size:"sm",className:P.icon})))},g=(l,r=!1,o)=>({label:(0,a.AH)({display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0,padding:l.spacing(0,1),fontWeight:l.typography.fontWeightMedium,fontSize:l.typography.size.sm,backgroundColor:r?"transparent":l.colors.background.secondary,height:l.spacing(l.components.height.md),lineHeight:l.spacing(l.components.height.md),marginRight:l.spacing(.5),borderRadius:l.shape.radius.default,border:"none",width:o?o!=="auto"?`${8*o}px`:o:"100%",color:l.colors.text.primary}),icon:(0,a.AH)({color:l.colors.text.secondary,marginLeft:"10px",":hover":{color:l.colors.text.primary}})});try{m.displayName="InlineLabel",m.__docgenInfo={description:"",displayName:"InlineLabel",props:{tooltip:{defaultValue:null,description:`Content for the labels tooltip. If provided, an info icon with the tooltip content
will be displayed`,name:"tooltip",required:!1,type:{name:"PopoverContent"}},width:{defaultValue:null,description:"Custom width for the label",name:"width",required:!1,type:{name:'number | "auto"'}},transparent:{defaultValue:null,description:"Make labels's background transparent",name:"transparent",required:!1,type:{name:"boolean"}},interactive:{defaultValue:null,description:"Make tooltip interactive",name:"interactive",required:!1,type:{name:"boolean"}},as:{defaultValue:null,description:"Controls which element the InlineLabel should be rendered into",name:"as",required:!1,type:{name:"ElementType<any, keyof IntrinsicElements>"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Forms/InlineLabel.tsx#InlineLabel"]={docgenInfo:m.__docgenInfo,name:"InlineLabel",path:"src/components/Forms/InlineLabel.tsx#InlineLabel"})}catch{}},"./src/components/Forms/commonStyles.ts":function(M,y,t){t.d(y,{SM:function(){return h},Xb:function(){return d},g$:function(){return n},gm:function(){return b},lH:function(){return p}});var a=t("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=t("./src/themes/mixins.ts");const b=f=>(0,a.AH)({"&:focus":(0,i.Hi)(f)}),d=(f,x=!1)=>{const E=x?f.colors.error.border:f.components.input.borderColor,w=x?f.colors.error.shade:f.components.input.borderHover,m=f.components.input.background,g=f.components.input.text,l=f.isDark?"#2e2f35":"#bab4ca";return(0,a.cx)(n(f),(0,a.AH)({background:m,lineHeight:f.typography.body.lineHeight,fontSize:f.typography.size.md,color:g,border:`1px solid ${E}`,"&:-webkit-autofill, &:-webkit-autofill:hover":{boxShadow:`inset 0 0 0 1px rgba(255, 255, 255, 0), inset 0 0 0 100px ${m}!important`,WebkitTextFillColor:`${g} !important`,borderColor:l},"&:-webkit-autofill:focus":{boxShadow:`0 0 0 2px ${f.colors.background.primary}, 0 0 0px 4px ${f.colors.primary.main}, inset 0 0 0 1px rgba(255, 255, 255, 0), inset 0 0 0 100px ${m}!important`,WebkitTextFillColor:`${g} !important`},"&:hover":{borderColor:w},"&:focus":{outline:"none"},"&:disabled":{backgroundColor:f.colors.action.disabledBackground,color:f.colors.action.disabledText,border:`1px solid ${f.colors.action.disabledBackground}`,"&:hover":{borderColor:E}},"&::placeholder":{color:f.colors.text.disabled,opacity:1}}))},n=f=>(0,a.AH)({padding:f.spacing(0,1,0,1)}),p=()=>({sm:(0,a.AH)({width:c("sm")}),md:(0,a.AH)({width:c("md")}),lg:(0,a.AH)({width:c("lg")}),auto:(0,a.AH)({width:c("auto")})}),c=f=>{switch(f){case"sm":return"200px";case"md":return"320px";case"lg":return"580px";case"auto":default:return"auto"}};function h(f,x){switch(f){case"sm":return{padding:1,fontSize:x.typography.size.sm,height:x.components.height.sm};case"lg":return{padding:3,fontSize:x.typography.size.lg,height:x.components.height.lg};case"md":default:return{padding:2,fontSize:x.typography.size.md,height:x.components.height.md}}}},"./src/components/Icon/Icon.tsx":function(M,y,t){t.d(y,{I:function(){return l}});var a=t("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=t("../../node_modules/react/index.js"),b=t("../../node_modules/react-inlinesvg/esm/index.js"),d=t("../grafana-data/src/types/icon.ts"),n=t("./src/themes/ThemeContext.tsx"),p=t("./src/components/Icon/utils.ts"),c=Object.defineProperty,h=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,E=(r,o,e)=>o in r?c(r,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[o]=e,w=(r,o)=>{for(var e in o||(o={}))f.call(o,e)&&E(r,e,o[e]);if(h)for(var e of h(o))x.call(o,e)&&E(r,e,o[e]);return r},m=(r,o)=>{var e={};for(var u in r)f.call(r,u)&&o.indexOf(u)<0&&(e[u]=r[u]);if(r!=null&&h)for(var u of h(r))o.indexOf(u)<0&&x.call(r,u)&&(e[u]=r[u]);return e};const g=r=>({icon:(0,a.AH)({display:"inline-block",fill:"currentColor",flexShrink:0,label:"Icon",lineHeight:0,verticalAlign:"middle"}),orange:(0,a.AH)({fill:r.v1.palette.orange})}),l=i.forwardRef((r,o)=>{var e=r,{size:u="md",type:s="default",name:_,className:O,style:v,title:R=""}=e,P=m(e,["size","type","name","className","style","title"]);const I=(0,n.of)(g);(0,d.n6)(_)||console.warn("Icon component passed an invalid icon name",_);const S=_==="fa fa-spinner"?"spinner":_,L=(0,p.Wj)(),A=(0,p.cs)(u),T=A,D=_.startsWith("gf-bar-align")?16:_.startsWith("gf-interp")?30:A,B=(0,p.Xi)(S,s),F=`${L}${B}/${S}.svg`,V=(0,a.cx)(I.icon,O,s==="mono"?{[I.orange]:_==="favorite"}:"",S==="spinner"&&"fa-spin");return i.createElement(b.A,w({innerRef:o,src:F,width:D,height:T,title:R,className:V,style:v},P))});l.displayName="Icon";try{l.displayName="Icon",l.__docgenInfo={description:"",displayName:"Icon",props:{name:{defaultValue:null,description:"",name:"name",required:!0,type:{name:"enum",value:[{value:'"play"'},{value:'"google"'},{value:'"microsoft"'},{value:'"github"'},{value:'"gitlab"'},{value:'"okta"'},{value:'"discord"'},{value:'"hipchat"'},{value:'"amazon"'},{value:'"google-hangouts-alt"'},{value:'"pagerduty"'},{value:'"line"'},{value:'"anchor"'},{value:'"adjust-circle"'},{value:'"angle-double-down"'},{value:'"angle-double-right"'},{value:'"angle-double-up"'},{value:'"angle-down"'},{value:'"angle-left"'},{value:'"angle-right"'},{value:'"angle-up"'},{value:'"align-left"'},{value:'"align-right"'},{value:'"application-observability"'},{value:'"apps"'},{value:'"archive-alt"'},{value:'"arrow"'},{value:'"arrow-down"'},{value:'"arrow-from-right"'},{value:'"arrow-left"'},{value:'"arrow-random"'},{value:'"arrow-right"'},{value:'"arrow-to-right"'},{value:'"arrow-up"'},{value:'"arrows-h"'},{value:'"arrows-v"'},{value:'"asserts"'},{value:'"expand-arrows"'},{value:'"at"'},{value:'"ai"'},{value:'"backward"'},{value:'"bars"'},{value:'"bell"'},{value:'"bell-slash"'},{value:'"bolt"'},{value:'"book"'},{value:'"bookmark"'},{value:'"book-open"'},{value:'"brackets-curly"'},{value:'"bug"'},{value:'"building"'},{value:'"calculator-alt"'},{value:'"calendar-alt"'},{value:'"calendar-slash"'},{value:'"camera"'},{value:'"capture"'},{value:'"channel-add"'},{value:'"chart-line"'},{value:'"check"'},{value:'"check-circle"'},{value:'"check-square"'},{value:'"circle"'},{value:'"circle-mono"'},{value:'"clipboard-alt"'},{value:'"clock-nine"'},{value:'"cloud"'},{value:'"cloud-download"'},{value:'"cloud-upload"'},{value:'"code-branch"'},{value:'"cog"'},{value:'"columns"'},{value:'"comment-alt"'},{value:'"comment-alt-message"'},{value:'"comment-alt-share"'},{value:'"comments-alt"'},{value:'"compass"'},{value:'"copy"'},{value:'"corner-down-right-alt"'},{value:'"create-dashboard"'},{value:'"credit-card"'},{value:'"crosshair"'},{value:'"cube"'},{value:'"dashboard"'},{value:'"database"'},{value:'"dice-three"'},{value:'"docker"'},{value:'"document-info"'},{value:'"download-alt"'},{value:'"draggabledots"'},{value:'"edit"'},{value:'"ellipsis-v"'},{value:'"envelope"'},{value:'"exchange-alt"'},{value:'"exclamation-triangle"'},{value:'"exclamation-circle"'},{value:'"external-link-alt"'},{value:'"eye"'},{value:'"eye-slash"'},{value:'"ellipsis-h"'},{value:'"fa fa-spinner"'},{value:'"favorite"'},{value:'"file-alt"'},{value:'"file-blank"'},{value:'"file-copy-alt"'},{value:'"file-download"'},{value:'"file-edit-alt"'},{value:'"file-landscape-alt"'},{value:'"filter"'},{value:'"flip"'},{value:'"folder"'},{value:'"font"'},{value:'"fire"'},{value:'"folder-open"'},{value:'"folder-plus"'},{value:'"folder-upload"'},{value:'"forward"'},{value:'"frontend-observability"'},{value:'"gf-bar-alignment-after"'},{value:'"gf-bar-alignment-before"'},{value:'"gf-bar-alignment-center"'},{value:'"gf-glue"'},{value:'"gf-grid"'},{value:'"gf-interpolation-linear"'},{value:'"gf-interpolation-smooth"'},{value:'"gf-interpolation-step-after"'},{value:'"gf-interpolation-step-before"'},{value:'"gf-landscape"'},{value:'"gf-layout-simple"'},{value:'"gf-logs"'},{value:'"gf-ml"'},{value:'"gf-movepane-left"'},{value:'"gf-movepane-right"'},{value:'"gf-portrait"'},{value:'"gf-service-account"'},{value:'"gf-show-context"'},{value:'"gf-pin"'},{value:'"gf-prometheus"'},{value:'"gf-traces"'},{value:'"globe"'},{value:'"grafana"'},{value:'"graph-bar"'},{value:'"heart"'},{value:'"heart-rate"'},{value:'"heart-break"'},{value:'"history"'},{value:'"history-alt"'},{value:'"home"'},{value:'"home-alt"'},{value:'"horizontal-align-center"'},{value:'"horizontal-align-left"'},{value:'"horizontal-align-right"'},{value:'"hourglass"'},{value:'"import"'},{value:'"info"'},{value:'"info-circle"'},{value:'"k6"'},{value:'"key-skeleton-alt"'},{value:'"keyboard"'},{value:'"layer-group"'},{value:'"layers-alt"'},{value:'"library-panel"'},{value:'"line-alt"'},{value:'"link"'},{value:'"list-ui-alt"'},{value:'"list-ul"'},{value:'"list-ol"'},{value:'"lock"'},{value:'"map-marker"'},{value:'"map-marker-plus"'},{value:'"map-marker-minus"'},{value:'"message"'},{value:'"minus"'},{value:'"minus-circle"'},{value:'"mobile-android"'},{value:'"monitor"'},{value:'"palette"'},{value:'"panel-add"'},{value:'"pathfinder-unite"'},{value:'"pause"'},{value:'"pen"'},{value:'"percentage"'},{value:'"plug"'},{value:'"plus"'},{value:'"plus-circle"'},{value:'"plus-square"'},{value:'"power"'},{value:'"presentation-play"'},{value:'"process"'},{value:'"question-circle"'},{value:'"record-audio"'},{value:'"repeat"'},{value:'"rocket"'},{value:'"ruler-combined"'},{value:'"save"'},{value:'"search"'},{value:'"search-minus"'},{value:'"search-plus"'},{value:'"share-alt"'},{value:'"shield"'},{value:'"shield-exclamation"'},{value:'"signal"'},{value:'"signin"'},{value:'"signout"'},{value:'"sitemap"'},{value:'"slack"'},{value:'"sliders-v-alt"'},{value:'"spinner"'},{value:'"sort-amount-down"'},{value:'"sort-amount-up"'},{value:'"square-shape"'},{value:'"star"'},{value:'"step-backward"'},{value:'"stopwatch"'},{value:'"stopwatch-slash"'},{value:'"sync"'},{value:'"sync-slash"'},{value:'"table"'},{value:'"tag-alt"'},{value:'"telegram-alt"'},{value:'"text-fields"'},{value:'"thumbs-up"'},{value:'"times"'},{value:'"times-circle"'},{value:'"toggle-on"'},{value:'"toggle-off"'},{value:'"trash-alt"'},{value:'"unarchive"'},{value:'"unlock"'},{value:'"upload"'},{value:'"user"'},{value:'"users-alt"'},{value:'"user-arrows"'},{value:'"vertical-align-bottom"'},{value:'"vertical-align-center"'},{value:'"vertical-align-top"'},{value:'"web-section-alt"'},{value:'"wrap-text"'},{value:'"rss"'},{value:'"x"'}]}},size:{defaultValue:{value:"md"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"sm"'},{value:'"md"'},{value:'"lg"'},{value:'"xl"'},{value:'"xxl"'},{value:'"xxxl"'}]}},type:{defaultValue:{value:"default"},description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"solid"'},{value:'"default"'},{value:'"mono"'}]}},title:{defaultValue:{value:""},description:"",name:"title",required:!1,type:{name:"string"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Icon/Icon.tsx#Icon"]={docgenInfo:l.__docgenInfo,name:"Icon",path:"src/components/Icon/Icon.tsx#Icon"})}catch{}},"./src/components/Icon/utils.ts":function(M,y,t){t.d(y,{Wj:function(){return n},Xi:function(){return i},cs:function(){return b}});const a=["grafana","favorite","heart-break","heart","panel-add","library-panel","circle-mono"];function i(p,c){return p?.startsWith("gf-")?"custom":a.includes(p)?"mono":c==="default"?"unicons":c==="solid"?"solid":"mono"}function b(p){switch(p){case"xs":return 12;case"sm":return 14;case"md":return 16;case"lg":return 18;case"xl":return 24;case"xxl":return 36;case"xxxl":return 48}}let d;function n(){if(d)return d;const p=typeof window<"u"&&window.__grafana_public_path__;return p?d=p+"img/icons/":d="public/img/icons/",d}},"./src/components/Input/Input.tsx":function(M,y,t){t.d(y,{n:function(){return u},p:function(){return e}});var a=t("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=t("../../node_modules/react/index.js"),b=t("../../node_modules/react-use/lib/useMeasure.js"),d=t("./src/themes/ThemeContext.tsx"),n=t("./src/themes/stylesFactory.ts"),p=t("./src/components/Forms/commonStyles.ts"),c=t("./src/components/Spinner/Spinner.tsx"),h=Object.defineProperty,f=Object.defineProperties,x=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,g=(s,_,O)=>_ in s?h(s,_,{enumerable:!0,configurable:!0,writable:!0,value:O}):s[_]=O,l=(s,_)=>{for(var O in _||(_={}))w.call(_,O)&&g(s,O,_[O]);if(E)for(var O of E(_))m.call(_,O)&&g(s,O,_[O]);return s},r=(s,_)=>f(s,x(_)),o=(s,_)=>{var O={};for(var v in s)w.call(s,v)&&_.indexOf(v)<0&&(O[v]=s[v]);if(s!=null&&E)for(var v of E(s))_.indexOf(v)<0&&m.call(s,v)&&(O[v]=s[v]);return O};const e=i.forwardRef((s,_)=>{const O=s,{className:v,addonAfter:R,addonBefore:P,prefix:I,suffix:S,invalid:L,loading:A,width:T=0}=O,D=o(O,["className","addonAfter","addonBefore","prefix","suffix","invalid","loading","width"]),[B,F]=(0,b.A)(),[V,N]=(0,b.A)(),W=(0,d.$j)(),C=u({theme:W,invalid:!!L,width:T});return i.createElement("div",{className:(0,a.cx)(C.wrapper,v),"data-testid":"input-wrapper"},!!P&&i.createElement("div",{className:C.addon},P),i.createElement("div",{className:C.inputWrapper},I&&i.createElement("div",{className:C.prefix,ref:B},I),i.createElement("input",r(l({ref:_,className:C.input},D),{style:{paddingLeft:I?F.width+12:void 0,paddingRight:S||A?N.width+12:void 0}})),(S||A)&&i.createElement("div",{className:C.suffix,ref:V},A&&i.createElement(c.y,{className:C.loadingIndicator,inline:!0}),S)),!!R&&i.createElement("div",{className:C.addon},R))});e.displayName="Input";const u=(0,n.N)(({theme:s,invalid:_=!1,width:O})=>{const v="28px",R=(0,a.AH)({position:"absolute",top:0,zIndex:1,display:"flex",alignItems:"center",justifyContent:"center",flexGrow:0,flexShrink:0,fontSize:s.typography.size.md,height:"100%",minWidth:v,color:s.colors.text.secondary});return{wrapper:(0,a.cx)((0,a.AH)({label:"input-wrapper",display:"flex",width:O?s.spacing(O):"100%",height:s.spacing(s.components.height.md),borderRadius:s.shape.radius.default,"&:hover":{"> .prefix, .suffix, .input":{borderColor:_?s.colors.error.border:s.colors.primary.border},"input[type='number']":{appearance:"textfield"},"input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button":{WebkitAppearance:"inner-spin-button !important",opacity:1}}})),inputWrapper:(0,a.AH)({label:"input-inputWrapper",position:"relative",flexGrow:1,zIndex:1,"&:not(:first-child):last-child":{"> input":{borderLeft:"none",borderTopLeftRadius:0,borderBottomLeftRadius:0}},"&:first-child:not(:last-child)":{"> input":{borderRight:"none",borderTopRightRadius:0,borderBottomRightRadius:0}},"&:not(:first-child):not(:last-child)":{"> input":{borderRight:"none",borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0}},input:{"&:not(:first-child)":{paddingLeft:v},"&:not(:last-child)":{paddingRight:v},"&[readonly]":{cursor:"default"}}}),input:(0,a.cx)((0,p.gm)(s),(0,p.Xb)(s,_),(0,a.AH)({label:"input-input",position:"relative",zIndex:0,flexGrow:1,borderRadius:s.shape.radius.default,height:"100%",width:"100%"})),inputDisabled:(0,a.AH)({backgroundColor:s.colors.action.disabledBackground,color:s.colors.action.disabledText,border:`1px solid ${s.colors.action.disabledBackground}`,"&:focus":{boxShadow:"none"}}),addon:(0,a.AH)({label:"input-addon",display:"flex",justifyContent:"center",alignItems:"center",flexGrow:0,flexShrink:0,position:"relative","&:first-child":{borderTopRightRadius:0,borderBottomRightRadius:0,"> :last-child":{borderTopRightRadius:0,borderBottomRightRadius:0}},"&:last-child":{borderTopLeftRadius:0,borderBottomLeftRadius:0,"> :first-child":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},"> *:focus":{zIndex:2}}),prefix:(0,a.cx)(R,(0,a.AH)({label:"input-prefix",paddingLeft:s.spacing(1),paddingRight:s.spacing(.5),borderRight:"none",borderTopRightRadius:0,borderBottomRightRadius:0})),suffix:(0,a.cx)(R,(0,a.AH)({label:"input-suffix",paddingLeft:s.spacing(1),paddingRight:s.spacing(1),marginBottom:"-2px",borderLeft:"none",borderTopLeftRadius:0,borderBottomLeftRadius:0,right:0})),loadingIndicator:(0,a.AH)({"& + *":{marginLeft:s.spacing(.5)}})}});try{e.displayName="Input",e.__docgenInfo={description:"",displayName:"Input",props:{width:{defaultValue:null,description:"Sets the width to a multiple of 8px. Should only be used with inline forms. Setting width of the container is preferred in other cases.",name:"width",required:!1,type:{name:"number"}},prefix:{defaultValue:null,description:"Show an icon as a prefix in the input",name:"prefix",required:!1,type:{name:"ReactNode"}},invalid:{defaultValue:null,description:"Show an invalid state around the input",name:"invalid",required:!1,type:{name:"boolean"}},suffix:{defaultValue:null,description:"Show an icon as a suffix in the input",name:"suffix",required:!1,type:{name:"ReactNode"}},loading:{defaultValue:null,description:"Show a loading indicator as a suffix in the input",name:"loading",required:!1,type:{name:"boolean"}},addonBefore:{defaultValue:null,description:"Add a component as an addon before the input",name:"addonBefore",required:!1,type:{name:"ReactNode"}},addonAfter:{defaultValue:null,description:"Add a component as an addon after the input",name:"addonAfter",required:!1,type:{name:"ReactNode"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Input/Input.tsx#Input"]={docgenInfo:e.__docgenInfo,name:"Input",path:"src/components/Input/Input.tsx#Input"})}catch{}},"./src/components/Portal/Portal.tsx":function(M,y,t){t.d(y,{ZL:function(){return m},gF:function(){return g}});var a=t("../../node_modules/react/index.js"),i=t("../../node_modules/react-dom/index.js"),b=t("./src/themes/ThemeContext.tsx"),d=Object.defineProperty,n=Object.defineProperties,p=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,x=(o,e,u)=>e in o?d(o,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[e]=u,E=(o,e)=>{for(var u in e||(e={}))h.call(e,u)&&x(o,u,e[u]);if(c)for(var u of c(e))f.call(e,u)&&x(o,u,e[u]);return o},w=(o,e)=>n(o,p(e));function m(o){const{children:e,className:u,root:s,forwardedRef:_}=o,O=(0,b.$j)(),v=(0,a.useRef)(null),R=s??g();return v.current||(v.current=document.createElement("div"),u&&(v.current.className=u),v.current.style.position="relative",v.current.style.zIndex=`${O.zIndex.portal}`),(0,a.useLayoutEffect)(()=>(v.current&&R.appendChild(v.current),()=>{v.current&&R.removeChild(v.current)}),[R]),i.createPortal(a.createElement("div",{ref:_},e),v.current)}function g(){var o;return(o=window.document.getElementById("grafana-portal-container"))!=null?o:document.body}function l(){return React.createElement("div",{id:"grafana-portal-container"})}const r=a.forwardRef((o,e)=>a.createElement(m,w(E({},o),{forwardedRef:e})));r.displayName="RefForwardingPortal";try{m.displayName="RefForwardingPortal",m.__docgenInfo={description:"",displayName:"RefForwardingPortal",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},root:{defaultValue:null,description:"",name:"root",required:!1,type:{name:"HTMLElement"}},forwardedRef:{defaultValue:null,description:"",name:"forwardedRef",required:!1,type:{name:"ForwardedRef<HTMLDivElement>"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Portal/Portal.tsx#RefForwardingPortal"]={docgenInfo:r.__docgenInfo,name:"RefForwardingPortal",path:"src/components/Portal/Portal.tsx#RefForwardingPortal"})}catch{}},"./src/components/Spinner/Spinner.tsx":function(M,y,t){t.d(y,{y:function(){return h}});var a=t("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=t("../../node_modules/react/index.js"),b=t("../../node_modules/react-inlinesvg/esm/index.js"),d=t("./src/themes/ThemeContext.tsx"),n=t("./src/types/icon.ts"),p=t("./src/components/Icon/Icon.tsx"),c=t("./src/components/Icon/utils.ts");const h=({className:E,inline:w=!1,iconClassName:m,style:g,size:l="md"})=>{const r=(0,d.of)(f),o=(0,d.of)(x,l);if(typeof l!="string"||!(0,n.rJ)(l)){const e=(0,c.Wj)(),u="spinner",s=(0,c.Xi)(u,"default"),_=`${e}${s}/${u}.svg`;return i.createElement("div",{"data-testid":"Spinner",style:g,className:(0,a.cx)({[r.inline]:w},o.wrapper,E)},i.createElement(b.A,{src:_,width:l,height:l,className:(0,a.cx)("fa-spin",o.icon,E),style:g}))}return i.createElement("div",{"data-testid":"Spinner",style:g,className:(0,a.cx)({[r.inline]:w},E)},i.createElement(p.I,{className:(0,a.cx)("fa-spin",m),name:"spinner",size:l,"aria-label":"loading spinner"}))},f=E=>({inline:(0,a.AH)({display:"inline-block"})}),x=(E,w)=>({wrapper:(0,a.AH)({fontSize:typeof w=="string"?w:`${w}px`}),icon:(0,a.AH)({display:"inline-block",fill:"currentColor",flexShrink:0,label:"Icon",lineHeight:0,verticalAlign:"middle"})});try{h.displayName="Spinner",h.__docgenInfo={description:"",displayName:"Spinner",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"",name:"style",required:!1,type:{name:"CSSProperties"}},iconClassName:{defaultValue:null,description:"",name:"iconClassName",required:!1,type:{name:"string"}},inline:{defaultValue:{value:"false"},description:"",name:"inline",required:!1,type:{name:"boolean"}},size:{defaultValue:{value:"md"},description:"",name:"size",required:!1,type:{name:"string | number"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Spinner/Spinner.tsx#Spinner"]={docgenInfo:h.__docgenInfo,name:"Spinner",path:"src/components/Spinner/Spinner.tsx#Spinner"})}catch{}},"./src/components/Tooltip/Tooltip.tsx":function(M,y,t){t.d(y,{m:function(){return r}});var a=t("../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs"),i=t("../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),b=t("../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"),d=t("../../node_modules/@floating-ui/react/dist/floating-ui.react.mjs"),n=t("../../node_modules/react/index.js"),p=t("../grafana-e2e-selectors/src/selectors/index.ts"),c=t("./src/themes/ThemeContext.tsx"),h=t("./src/utils/tooltipUtils.ts"),f=t("./src/components/Portal/Portal.tsx"),x=Object.defineProperty,E=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,g=(e,u,s)=>u in e?x(e,u,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[u]=s,l=(e,u)=>{for(var s in u||(u={}))w.call(u,s)&&g(e,s,u[s]);if(E)for(var s of E(u))m.call(u,s)&&g(e,s,u[s]);return e};const r=n.forwardRef(({children:e,theme:u,interactive:s,show:_,placement:O,content:v},R)=>{const P=(0,n.useRef)(null),[I,S]=(0,n.useState)(_),L=_??I,A=[(0,a.cY)(8),(0,i.UU)({fallbackAxisSideDirection:"end",crossAxis:!1,boundary:document.body}),(0,i.BN)(),(0,b.UE)({element:P})],{context:T,refs:D,floatingStyles:B}=(0,d.we)({open:L,placement:(0,h.O)(O),onOpenChange:S,middleware:A,whileElementsMounted:i.ll}),F=(0,n.useId)(),V=(0,d.Mk)(T,{delay:{close:s?100:0},move:!1}),N=(0,d.iQ)(T),W=(0,d.s9)(T),{getReferenceProps:C,getFloatingProps:K}=(0,d.bv)([W,V,N]),k=typeof v=="function",U=(0,c.of)(o)[u??"info"],z=(0,n.useCallback)(j=>{D.setReference(j),typeof R=="function"?R(j):R&&(R.current=j)},[R,D]),H="aria-label"in e.props&&e.props["aria-label"]===v;return n.createElement(n.Fragment,null,n.cloneElement(e,l({ref:z,tabIndex:0,"aria-describedby":!H&&L?F:void 0},C())),L&&n.createElement(f.ZL,null,n.createElement("div",l({ref:D.setFloating,style:B},K()),n.createElement(d.ie,{className:U.arrow,ref:P,context:T}),n.createElement("div",{"data-testid":p.Tp.components.Tooltip.container,id:F,role:"tooltip",className:U.container},typeof v=="string"&&v,n.isValidElement(v)&&n.cloneElement(v),k&&v({})))))});r.displayName="Tooltip";const o=e=>{const u=(0,h.f)(e,e.components.tooltip.background,e.components.tooltip.background,e.components.tooltip.text,{topBottom:.5,rightLeft:1}),s=(0,h.f)(e,e.colors.error.main,e.colors.error.main,e.colors.error.contrastText,{topBottom:.5,rightLeft:1});return{info:u,["info-alt"]:u,error:s}};try{r.displayName="Tooltip",r.__docgenInfo={description:"",displayName:"Tooltip",props:{theme:{defaultValue:null,description:"",name:"theme",required:!1,type:{name:"enum",value:[{value:'"info"'},{value:'"error"'},{value:'"info-alt"'}]}},show:{defaultValue:null,description:"",name:"show",required:!1,type:{name:"boolean"}},placement:{defaultValue:null,description:"",name:"placement",required:!1,type:{name:"enum",value:[{value:'"auto"'},{value:'"bottom"'},{value:'"top"'},{value:'"right"'},{value:'"left"'},{value:'"bottom-start"'},{value:'"bottom-end"'},{value:'"top-start"'},{value:'"top-end"'},{value:'"right-start"'},{value:'"right-end"'},{value:'"left-start"'},{value:'"left-end"'},{value:'"auto-start"'},{value:'"auto-end"'}]}},content:{defaultValue:null,description:"",name:"content",required:!0,type:{name:"PopoverContent"}},interactive:{defaultValue:null,description:"Set to true if you want the tooltip to stay long enough so the user can move mouse over content to select text or click a link",name:"interactive",required:!1,type:{name:"boolean"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/Tooltip/Tooltip.tsx#Tooltip"]={docgenInfo:r.__docgenInfo,name:"Tooltip",path:"src/components/Tooltip/Tooltip.tsx#Tooltip"})}catch{}},"./src/themes/stylesFactory.ts":function(M,y,t){t.d(y,{N:function(){return b}});var a=t("../../node_modules/micro-memoize/dist/micro-memoize.js"),i=t.n(a);function b(d){return i()(d)}},"./src/types/icon.ts":function(M,y,t){t.d(y,{GO:function(){return d},SS:function(){return n},rJ:function(){return b}});var a=t("../grafana-data/src/types/icon.ts"),i=t("../grafana-data/src/types/dataFrame.ts");const b=c=>["xs","sm","md","lg","xl","xxl","xxxl"].includes(c),d=()=>Object.keys(a.az);function n(c){return p(c?.type)}function p(c){if(c)switch(c){case i.PU.time:return"clock-nine";case i.PU.string:return"font";case i.PU.number:return"calculator-alt";case i.PU.boolean:return"toggle-on";case i.PU.trace:return"info-circle";case i.PU.enum:return"list-ol";case i.PU.geo:return"map-marker";case i.PU.other:return"brackets-curly"}return"question-circle"}},"./src/utils/reactUtils.ts":function(M,y,t){t.d(y,{b:function(){return b},e:function(){return i}});var a=t("../../node_modules/react/index.js");function i(d){let n;const p=a.Children.only(d);return"id"in p?.props?n=p.props.id:"inputId"in p.props&&(n=p?.props.inputId),typeof n=="string"?n:void 0}function b(d,n){if(a.isValidElement(d)||typeof d=="string"||typeof d=="number")return d;if(typeof d=="function"&&n)return d(n);throw new Error(`${d} is not a React element nor a function that returns React element`)}},"./src/utils/tooltipUtils.ts":function(M,y,t){t.d(y,{O:function(){return b},f:function(){return d}});var a=t("../../node_modules/@emotion/css/dist/emotion-css.esm.js"),i=t("../grafana-data/src/themes/colorManipulator.ts");function b(n){switch(n){case"auto":return"bottom";case"auto-start":return"bottom-start";case"auto-end":return"bottom-end";default:return n??"bottom"}}function d(n,p,c,h,f){return{arrow:(0,a.AH)({fill:p}),container:(0,a.AH)({backgroundColor:p,borderRadius:n.shape.radius.default,border:`1px solid ${c}`,boxShadow:n.shadows.z2,color:h,fontSize:n.typography.bodySmall.fontSize,padding:n.spacing(f.topBottom,f.rightLeft),transition:"opacity 0.3s",zIndex:n.zIndex.tooltip,maxWidth:"400px",overflowWrap:"break-word","&[data-popper-interactive='false']":{pointerEvents:"none"},code:{border:"none",display:"inline",background:i.e$(p,.1),color:h,whiteSpace:"normal"},pre:{background:i.e$(p,.1),color:h},a:{color:h,textDecoration:"underline"},"a:hover":{textDecoration:"none"}}),headerClose:(0,a.AH)({color:n.colors.text.secondary,position:"absolute",right:n.spacing(1),top:n.spacing(1.5),backgroundColor:"transparent",border:0}),header:(0,a.AH)({paddingTop:n.spacing(1),paddingBottom:n.spacing(2)}),body:(0,a.AH)({paddingTop:n.spacing(1),paddingBottom:n.spacing(1)}),footer:(0,a.AH)({paddingTop:n.spacing(2),paddingBottom:n.spacing(1)})}}}}]);
