@contentful/f36-navbar 5.0.0-alpha.0 → 5.0.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -1,16 +1,216 @@
1
1
  import { MenuDivider, MenuSectionTitle, Menu } from '@contentful/f36-menu';
2
- import { Box, Flex } from '@contentful/f36-core';
3
- import v from 'react';
4
- import { cx, css } from 'emotion';
5
- import d from '@contentful/f36-tokens';
6
- import { hexToRGBA } from '@contentful/f36-utils';
2
+ import { Box, Flex, Stack } from '@contentful/f36-core';
3
+ import u, { forwardRef } from 'react';
4
+ import { cx, css, keyframes } from 'emotion';
5
+ import o from '@contentful/f36-tokens';
6
+ import { generateIconComponent } from '@contentful/f36-icon';
7
+ import { useDensity, hexToRGBA } from '@contentful/f36-utils';
8
+ import { Avatar } from '@contentful/f36-avatar';
7
9
  import { SkeletonContainer, SkeletonImage, SkeletonText, SkeletonBodyText, SkeletonDisplayText } from '@contentful/f36-skeleton';
8
- import { generateIcon } from '@contentful/f36-icon';
9
- import { ExternalLinkIcon, MenuIcon, EnvironmentAliasIcon, EnvironmentIcon } from '@contentful/f36-icons';
10
- import { IconButton, Button } from '@contentful/f36-button';
10
+ import { ArrowSquareOutIcon, EnvironmentAliasIcon, EnvironmentIcon } from '@contentful/f36-icons';
11
11
 
12
- var Qe=Object.defineProperty,Je=Object.defineProperties;var Ke=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable;var ce=(e,t,o)=>t in e?Qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,i=(e,t)=>{for(var o in t||(t={}))le.call(t,o)&&ce(e,o,t[o]);if(X)for(var o of X(t))de.call(t,o)&&ce(e,o,t[o]);return e},s=(e,t)=>Je(e,Ke(t));var l=(e,t)=>{var o={};for(var r in e)le.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&X)for(var r of X(e))t.indexOf(r)<0&&de.call(e,r)&&(o[r]=e[r]);return o};var I={medium:"@media (min-width: 480px)",large:"@media (min-width: 768px)",xlarge:"@media (min-width: 1920px)"},u=(e=d.glowPrimary)=>({"&:focus":{boxShadow:e},"&:focus:not(:focus-visible)":{boxShadow:"unset"},"&:focus-visible":{boxShadow:e}});var fe=e=>({containerTop:css({justifyContent:"center",backgroundColor:d.gray100}),containerBottom:css({justifyContent:"center",backgroundColor:d.gray100}),containerTopContent:css({width:"100%",maxWidth:e,padding:d.spacingXs,minHeight:d.spacingL,[I.medium]:{padding:`${d.spacingXs} 20px`}}),containerBottomContent:css({width:"100%",maxWidth:e,padding:0,paddingTop:d.spacing2Xs,minHeight:"2.5rem",overflow:"auto",[I.medium]:{padding:`${d.spacing2Xs} ${d.spacingXs}`}})});function ot(e,t){let F=e,{children:o,account:r,search:a,switcher:n,help:p,badge:c,bottomRightItems:m,topRightItems:g,contentMaxWidth:h="100%",testId:N="cf-ui-navbar"}=F,L=l(F,["children","account","search","switcher","help","badge","bottomRightItems","topRightItems","contentMaxWidth","testId"]),y=fe(h);return v.createElement(Box,s(i({},L),{ref:t,testId:N}),v.createElement(Flex,{className:y.containerTop},v.createElement(Flex,{className:y.containerTopContent,justifyContent:"space-between"},v.createElement(Flex,null,n),v.createElement(Flex,{alignItems:"center",gap:"spacingXs"},g,c,a,p,r))),v.createElement(Flex,{className:y.containerBottom},v.createElement(Flex,{className:y.containerBottomContent,justifyContent:"space-between"},v.createElement(Flex,{as:"nav","aria-label":"Main Navigation"},o),m&&v.createElement(Flex,null,m))))}var be=v.forwardRef(ot);var ge=()=>({navbarAccount:css({margin:0,padding:0,border:0,cursor:"pointer",background:"none",position:"relative",outline:"none",overflow:"visible",borderRadius:"50%","&:before":css({content:'""',display:"block",position:"absolute",height:"24px",width:"24px",backgroundColor:"transparent",borderRadius:"50%"}),"&:hover:before":css({backgroundColor:hexToRGBA(d.gray300,.15)})},u()),avatar:css({borderRadius:"50%",display:"block",height:"24px",width:"24px"}),notificationIcon:e=>css({position:"absolute",top:0,right:0,height:d.spacingS,width:d.spacingS,borderRadius:"50%",border:`2px solid ${d.gray100}`,backgroundColor:e==="negative"?d.colorNegative:d.colorWarning,transform:"translate(30%, -30%)"})});var ue=()=>({menuList:css({minWidth:"250px"})});var T=e=>{let{trigger:t,children:o,testId:r="cf-ui-navbar-menu-list",onOpen:a,onClose:n}=e,p=ue();return v.createElement(Menu,{onOpen:a,onClose:n},v.createElement(Menu.Trigger,null,t),v.createElement(Menu.List,{className:p.menuList,testId:r},o))};function st(e,t){let N=e,{children:o,className:r,testId:a="cf-ui-navbar-account-trigger",avatar:n,username:p,hasNotification:c,notificationVariant:m="warning"}=N,g=l(N,["children","className","testId","avatar","username","hasNotification","notificationVariant"]),h=ge();return v.createElement(T,{trigger:v.createElement(Flex,s(i({as:"button"},g),{ref:t,className:cx(h.navbarAccount,r),testId:a,alignItems:"center"}),v.createElement("img",{src:n,alt:`Avatar for user ${p}`,className:h.avatar}),c?v.createElement("span",{className:h.notificationIcon(m)}):null)},o)}var K=v.forwardRef(st);function ee({ariaLabel:e}){return v.createElement(SkeletonContainer,{svgWidth:24,svgHeight:24,ariaLabel:e,backgroundColor:d.gray300,foregroundColor:d.gray200},v.createElement(SkeletonImage,{width:24,height:24,radiusX:12,radiusY:12}))}var Ne=()=>css({"&::after":{content:'""',position:"absolute",width:`calc(100% - ${d.spacingM})`,height:"2px",bottom:`-${d.spacing2Xs}`,left:0,right:0,margin:"auto",backgroundColor:d.blue600,zIndex:0}}),ye={display:"flex",justifyContent:"center",padding:`${d.spacing2Xs} ${d.spacingS}`,alignItems:"center",background:"none"},Ie=()=>({navbarItem:css(ye,{alignItems:"center",background:"none",border:0,margin:0,outline:"none",fontSize:d.fontSizeM,lineHeight:d.lineHeightS,fontWeight:d.fontWeightMedium,position:"relative",textAlign:"left",whiteSpace:"nowrap",cursor:"pointer",hyphens:"auto",textDecoration:"none",color:d.gray700,boxSizing:"border-box",transition:`color ${d.transitionDurationShort} ${d.transitionEasingCubicBezier}`,borderRadius:d.borderRadiusMedium,"&:hover":{backgroundColor:hexToRGBA(d.gray900,.05)},"&:hover::before":{opacity:1,scale:"1"},"&:active::before":{backgroundColor:"rgba(255, 255, 255, 0.1)"},"&:disabled":{cursor:"auto"},"& svg":{transition:`fill ${d.transitionDurationShort} ${d.transitionEasingCubicBezier}`},"& > svg, & > span":{zIndex:d.zIndexDefault}},u(`inset ${d.glowPrimary}`)),navbarItemMenuTrigger:css({paddingRight:d.spacingXs}),isActive:Ne()}),xe=()=>({itemSkeleton:css(ye)});var Pe=()=>({navbarItemIcon:css({fill:d.gray700,"&:first-child":{marginRight:d.spacing2Xs},"&:last-child":{marginLeft:d.spacing2Xs},"img&":{borderRadius:d.borderRadiusSmall,maxWidth:d.spacingM,maxHeight:d.spacingM}})});var z=e=>{var a,n;let{icon:t,variant:o}=e,r=Pe();return v.cloneElement(t,{className:cx(t.props.className,r.navbarItemIcon),size:(a=t.props.size)!=null?a:"tiny",variant:(n=t.props.variant)!=null?n:o})};var Se=generateIcon({name:"CircleIcon",viewBox:"0 0 24 24",path:v.createElement("path",{d:"M11.994 6.526A5.47 5.47 0 0 0 6.526 12a5.47 5.47 0 0 0 5.468 5.473A5.476 5.476 0 0 0 17.473 12a5.477 5.477 0 0 0-5.479-5.474ZM12 15.447a3.448 3.448 0 1 1 0-6.896 3.448 3.448 0 0 1 0 6.896Z",fill:"currentFill"})});var Me=generateIcon({name:"ArrowDownIcon",viewBox:"0 0 12 20",path:v.createElement("path",{d:"M3.03076 8C2.20109 8 1.73228 8.95209 2.23814 9.60971L5.20727 13.4696C5.60757 13.99 6.39223 13.99 6.79252 13.4696L9.76166 9.60971C10.2675 8.95209 9.79871 8 8.96904 8L3.03076 8Z",fill:"#9FA8B2"})});var Ce=generateIcon({name:"HelpIcon",viewBox:"0 0 24 24",path:v.createElement(v.Fragment,null,v.createElement("g",{clipPath:"url(#HelpIcon_svg__a)"},v.createElement("path",{d:"M12 2.25A9.75 9.75 0 1 0 21.75 12 9.769 9.769 0 0 0 12 2.25ZM12 18a1.125 1.125 0 1 1 0-2.25A1.125 1.125 0 0 1 12 18Zm.75-4.584v.084a.75.75 0 1 1-1.5 0v-.75A.75.75 0 0 1 12 12a1.875 1.875 0 1 0-1.875-1.875.75.75 0 1 1-1.5 0 3.375 3.375 0 1 1 4.125 3.29Z",fill:"currentFill"})),v.createElement("defs",null,v.createElement("clipPath",{id:"HelpIcon_svg__a"},v.createElement("path",{fill:"currentFill",d:"M0 0h24v24H0z"}))))});var we=generateIcon({name:"SearchIcon",viewBox:"0 0 24 24",path:v.createElement(v.Fragment,null,v.createElement("g",{clipPath:"url(#SearchIcon_svg__a)"},v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 11.125a5.125 5.125 0 1 1 10.25 0 5.125 5.125 0 0 1-10.25 0ZM11.125 4a7.125 7.125 0 1 0 4.282 12.82l2.886 2.887a1 1 0 0 0 1.414-1.414l-2.886-2.887A7.125 7.125 0 0 0 11.125 4Z",fill:"currentFill"})),v.createElement("defs",null,v.createElement("clipPath",{id:"SearchIcon_svg__a"},v.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"}))))});var Ae=generateIcon({name:"ContentfulLogoIcon",viewBox:"0 0 18 18",path:v.createElement(v.Fragment,null,v.createElement("path",{d:"M6.6 12.525C5.7 11.625 5.1 10.35 5.1 9C5.1 7.65 5.625 6.375 6.525 5.475C7.275 4.725 7.275 3.45 6.525 2.625C5.775 1.875 4.575 1.875 3.825 2.625C2.325 4.275 1.35 6.525 1.35 9C1.35 11.475 2.325 13.725 3.9 15.375C4.65 16.125 5.85 16.125 6.6 15.375C7.275 14.55 7.275 13.35 6.6 12.525Z",fill:"#FAE501"}),v.createElement("path",{d:"M6.6 5.475C7.5 4.5 8.7 3.975 10.05 3.975C11.4 3.975 12.6 4.575 13.5 5.4C14.25 6.225 15.45 6.225 16.2 5.4C16.95 4.65 16.95 3.375 16.2 2.55C14.55 1.05 12.375 0 9.975 0C7.575 0 5.4 1.05 3.825 2.625C3.075 3.375 3.075 4.65 3.825 5.475C4.575 6.15 5.775 6.15 6.6 5.475Z",fill:"#4FB5E1"}),v.createElement("path",{d:"M13.425 12.525C12.525 13.5 11.325 14.025 9.975 14.025C8.625 14.025 7.425 13.425 6.525 12.525C5.775 11.7 4.575 11.7 3.825 12.525C3.075 13.275 3.075 14.55 3.825 15.375C5.4 16.95 7.575 18 9.975 18C12.375 18 14.55 16.95 16.125 15.375C16.875 14.625 16.875 13.35 16.125 12.525C15.375 11.775 14.175 11.775 13.425 12.525Z",fill:"#F05751"}),v.createElement("path",{d:"M5.175 5.99998C6.21054 5.99998 7.05 5.12693 7.05 4.04998C7.05 2.97302 6.21054 2.09998 5.175 2.09998C4.13947 2.09998 3.3 2.97302 3.3 4.04998C3.3 5.12693 4.13947 5.99998 5.175 5.99998Z",fill:"#0681B6"}),v.createElement("path",{d:"M5.175 15.9C6.21054 15.9 7.05 15.027 7.05 13.95C7.05 12.873 6.21054 12 5.175 12C4.13947 12 3.3 12.873 3.3 13.95C3.3 15.027 4.13947 15.9 5.175 15.9Z",fill:"#CD4739"}))});var xt="button";function Pt(e,t){let me=e,{as:o=xt,icon:r,title:a,children:n,className:p,isActive:c,testId:m="cf-ui-navbar-item",onOpen:g,onClose:h}=me,N=l(me,["as","icon","title","children","className","isActive","testId","onOpen","onClose"]),L=Ie(),y=St(e),F=v.createElement(o,s(i({},N),{ref:t,"data-test-id":m,className:cx(L.navbarItem,y&&L.navbarItemMenuTrigger,c&&L.isActive,p)}),r&&v.createElement(z,{icon:r,variant:"secondary"}),v.createElement("span",null,a),y&&v.createElement(Me,null));return y?v.createElement(T,{trigger:F,testId:m,onOpen:g,onClose:h},n):F}var St=e=>!!e.children,te=v.forwardRef(Pt);var oe=({estimatedWidth:e})=>{let t=xe();return v.createElement(SkeletonContainer,{className:t.itemSkeleton,svgWidth:e,svgHeight:32,backgroundColor:d.gray300,foregroundColor:d.gray200},v.createElement(SkeletonText,{lineHeight:6,numberOfLines:1,offsetTop:7,radiusX:d.borderRadiusSmall,radiusY:d.borderRadiusSmall}))};var Te=()=>({navbarMenuItem:css({display:"flex",justifyContent:"flex-start",alignItems:"center"})});var kt="button";function Rt(e,t){let g=e,{as:o=kt,icon:r,title:a,className:n}=g,p=l(g,["as","icon","title","className"]),c=Te(),m=Bt(e);return v.createElement(Menu.Item,s(i({},p),{ref:t,as:o,className:cx(c.navbarMenuItem,n)}),r?v.createElement(z,{icon:r,variant:"secondary"}):m&&ke,v.createElement("span",null,a),r&&m?ke:null)}var ke=v.createElement(z,{icon:v.createElement(ExternalLinkIcon,null),variant:"muted"}),Bt=e=>e.as==="a"&&e.target==="_blank",re=v.forwardRef(Rt);var ne=({ariaLabel:e})=>v.createElement(Menu.Item,null,v.createElement(Flex,{alignItems:"center",gap:d.spacingXs},v.createElement(SkeletonContainer,{svgHeight:16,svgWidth:18},v.createElement(SkeletonImage,{width:16,height:16})),v.createElement(SkeletonContainer,{svgHeight:16,svgWidth:190,ariaLabel:e},v.createElement(SkeletonBodyText,{numberOfLines:1}))));var Be=()=>({navbarSwitcher:css({margin:0,padding:0,background:"none",border:"none",height:"max-content",color:d.gray700,cursor:"pointer",fontSize:d.fontSizeS,fontWeight:d.fontWeightMedium,position:"relative",outline:"none",borderRadius:d.borderRadiusMedium,"&:after":{content:'""',border:"1px solid #353A41",boxSizing:"border-box",height:"16px",right:"-1px",position:"absolute",width:0},"&:last-child:after":{display:"none"},"&:hover li":{backgroundColor:"#f2f4f6"}},u()),switcherMenuIcon:css({height:d.spacingM,width:d.spacingM,fill:d.gray700}),switcherBreadcrumbs:css({listStyleType:"none",margin:0,padding:0,position:"relative"})});function Dt(e,t){let m=e,{children:o,className:r,logo:a,testId:n="cf-ui-navbar-switcher"}=m,p=l(m,["children","className","logo","testId"]),c=Be();return v.createElement(Flex,s(i({},p),{as:"button",ref:t,className:cx(c.navbarSwitcher,r),testId:n,alignItems:"center",fullHeight:!0,gap:"spacingXs"}),a||v.createElement(Ae,null),v.createElement(MenuIcon,{size:"small",className:c.switcherMenuIcon}),v.createElement(Flex,{as:"ul",alignItems:"center",className:c.switcherBreadcrumbs},o))}var ie=v.forwardRef(Dt);var se=({estimatedWidth:e})=>v.createElement(SkeletonContainer,{svgWidth:e,svgHeight:24,backgroundColor:d.gray300,foregroundColor:d.gray200},v.createElement(SkeletonDisplayText,{lineHeight:24,numberOfLines:1,radiusX:12,radiusY:12}));var Fe=()=>({navbarSearch:css({minWidth:"24px",width:"24px",minHeight:"24px",height:"24px",svg:{fill:d.gray700}},u())});function jt(e,t){let p=e,{className:o,testId:r="cf-ui-navbar-search"}=p,a=l(p,["className","testId"]),n=Fe();return v.createElement(IconButton,s(i({"aria-label":"Quick Search"},a),{variant:"transparent",ref:t,size:"small",className:cx(n.navbarSearch,o),testId:r,icon:v.createElement(we,{size:"medium"})}))}var Oe=v.forwardRef(jt);var We={display:"none","&:first-child":{display:"block"},[I.medium]:{display:"block","&:first-child":{display:"none"}}},ze=()=>({breadcrumbsItem:css({position:"relative",alignItems:"center",justifyContent:"center",border:`solid 1px ${d.gray300}`,borderLeft:"none",display:"inline-flex",margin:0,minWidth:0,padding:`0 ${d.spacingXs}`,height:d.spacingL,borderRadius:"3rem",zIndex:2,whiteSpace:"nowrap","&:first-child":{minWidth:"24px"},"&:nth-child(2)":{zIndex:1,left:"-13px",paddingLeft:d.spacingM,borderRadius:"0 3rem 3rem 0",span:{maxWidth:"80px",textOverflow:"ellipsis",overflow:"hidden",[I.large]:{maxWidth:"100%"}}},"&:nth-child(3)":{left:"-25px",paddingLeft:d.spacingM,borderRadius:"0 3rem 3rem 0",fontFamily:d.fontStackMonospace,fontSize:d.fontSizeS,fontWeight:d.fontWeightMedium,zIndex:0,span:{maxWidth:"40px",textOverflow:"ellipsis",overflow:"hidden",[I.large]:{maxWidth:"100%"}},"> div":{[I.medium]:{gap:d.spacing2Xs}}}}),breadcrumbsItemCircle:css({border:`solid 1px ${d.gray300}`,borderRadius:"50%",color:d.gray400,padding:0,display:"flex",justifyContent:"center",fontSize:"11px",width:d.spacingL,height:d.spacingL}),breadcrumbsItemEnvMaster:css({color:d.green600," svg":s(i({},We),{fill:d.green600})}),breadcrumbsItemEnvNonMaster:css({color:d.orange500,svg:s(i({},We),{fill:d.orange500})})});function De({isAlias:e}){return v.createElement(v.Fragment,null,v.createElement(Se,{key:"mobile-icon",size:"tiny"}),e?v.createElement(EnvironmentAliasIcon,{key:"full-icon",size:"tiny"}):v.createElement(EnvironmentIcon,{key:"full-icon",size:"tiny"}))}function Kt(e,t){let N=e,{children:o,isCircle:r,className:a,envVariant:n,isAlias:p,testId:c="cf-ui-navbar-switcher-item"}=N,m=l(N,["children","isCircle","className","envVariant","isAlias","testId"]),g=ze(),h=cx(g.breadcrumbsItem,a,{[g.breadcrumbsItemCircle]:r,[g.breadcrumbsItemEnvMaster]:n==="master",[g.breadcrumbsItemEnvNonMaster]:n==="non-master"});return v.createElement("li",s(i({},m),{ref:t,className:h,"data-test-id":c}),v.createElement(Flex,{fullHeight:!0,justifyContent:"center",alignItems:"center"},n&&v.createElement(De,{isAlias:p}),v.createElement("span",null,o)))}var Ge=v.forwardRef(Kt);var Ve=()=>({navbarHelp:css({fontSize:d.fontSizeS,padding:`0 ${d.spacing2Xs}`,width:"max-content",minHeight:"24px",height:"24px",color:d.gray700,svg:{fill:d.gray700}},u())});function ro(e,t){let c=e,{children:o,className:r,testId:a="cf-ui-navbar-help-trigger"}=c,n=l(c,["children","className","testId"]),p=Ve();return v.createElement(T,{testId:"cf-ui-navbar-help-menu",trigger:v.createElement(Button,s(i({"aria-label":"Help Menu"},n),{as:"button",ref:t,className:cx(p.navbarHelp,r),testId:a,variant:"transparent",size:"small",startIcon:v.createElement(Ce,{size:"medium"})}),"Help")},o)}var Xe=v.forwardRef(ro);var $e=()=>({navbarBadge:css({display:"flex",justifyContent:"center",alignItems:"center",background:"none",border:`1px solid ${d.purple600}`,margin:0,outline:"none",fontSize:d.fontSizeS,lineHeight:d.lineHeightS,fontWeight:d.fontWeightMedium,textAlign:"center",padding:`0 ${d.spacingXs}`,textDecoration:"none",color:`${d.purple600}!important`,borderRadius:"1.75rem"})});var io="div";function so(e,t){let m=e,{as:o=io,children:r,className:a,testId:n="cf-ui-navbar-badge"}=m,p=l(m,["as","children","className","testId"]),c=$e();return v.createElement(o,s(i({},p),{ref:t,className:cx(c.navbarBadge,a),"data-test-id":n}),r)}var Ze=v.forwardRef(so);var je=()=>({navbarTopItem:css({margin:0,background:"none",border:"1px solid",borderColor:"transparent",cursor:"pointer",display:"flex",gap:d.spacing2Xs,alignItems:"center",lineHeight:d.lineHeightDefault,color:d.gray700,padding:`0 ${d.spacing2Xs}`,minHeight:"24px",fontSize:d.fontSizeS,fontWeight:d.fontWeightMedium,outline:"none",borderRadius:d.borderRadiusMedium,"&:hover":{backgroundColor:hexToRGBA(d.gray900,.05)},svg:{fill:"currentColor"}},u())});var lo="button";function fo(e,t){let m=e,{as:o=lo,children:r,className:a,testId:n="cf-ui-navbar-topbar-item"}=m,p=l(m,["as","children","className","testId"]),c=je();return v.createElement(o,s(i({},p),{ref:t,className:cx(c.navbarTopItem,a),"data-test-id":n}),r)}var Ye=v.forwardRef(fo);var b=be;b.Item=te;b.ItemSkeleton=oe;b.MenuItem=re;b.MenuItemSkeleton=ne;b.MenuDivider=MenuDivider;b.MenuSectionTitle=MenuSectionTitle;b.Switcher=ie;b.SwitcherSkeleton=se;b.SwitcherItem=Ge;b.Search=Oe;b.Help=Xe;b.Account=K;b.AccountSkeleton=ee;b.Badge=Ze;b.TopbarItem=Ye;
12
+ var Or=Object.defineProperty,Dr=Object.defineProperties;var _r=Object.getOwnPropertyDescriptors;var oe=Object.getOwnPropertySymbols;var He=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable;var Le=(e,r,t)=>r in e?Or(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,m=(e,r)=>{for(var t in r||(r={}))He.call(r,t)&&Le(e,t,r[t]);if(oe)for(var t of oe(r))Oe.call(r,t)&&Le(e,t,r[t]);return e},d=(e,r)=>Dr(e,_r(r));var f=(e,r)=>{var t={};for(var a in e)He.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&oe)for(var a of oe(e))r.indexOf(a)<0&&Oe.call(e,a)&&(t[a]=e[a]);return t};var E={medium:"@media (min-width: 480px)",large:"@media (min-width: 768px)",xlarge:"@media (min-width: 1920px)"},I=(e=o.glowPrimary)=>({"&:focus":{boxShadow:e},"&:focus:not(:focus-visible)":{boxShadow:"unset"},"&:focus-visible":{boxShadow:e}});var De=(e,r)=>({containerTop:css({justifyContent:"center",backgroundColor:o.gray100}),containerBottom:css({justifyContent:"center",backgroundColor:o.gray100}),containerTopContent:css({width:"100%",maxWidth:r==="wide"?"1524px":e,padding:o.spacingXs,minHeight:o.spacingL,[E.medium]:{padding:`${o.spacingXs} 20px`}}),containerBottomContent:css({width:"100%",maxWidth:r==="wide"?"1524px":e,padding:0,paddingTop:o.spacing2Xs,minHeight:"2.5rem",overflow:"auto",[E.medium]:{padding:`${o.spacing2Xs} ${o.spacingXs}`}}),logo:css({height:"28px",width:"28px"})});var _e=generateIconComponent({name:"CircleIcon",viewBox:"0 0 24 24",path:u.createElement("path",{d:"M11.994 6.526A5.47 5.47 0 0 0 6.526 12a5.47 5.47 0 0 0 5.468 5.473A5.476 5.476 0 0 0 17.473 12a5.477 5.477 0 0 0-5.479-5.474ZM12 15.447a3.448 3.448 0 1 1 0-6.896 3.448 3.448 0 0 1 0 6.896Z",fill:"currentFill"})});var We=generateIconComponent({name:"ArrowDownIcon",viewBox:"0 0 12 20",path:u.createElement("path",{d:"M3.03076 8C2.20109 8 1.73228 8.95209 2.23814 9.60971L5.20727 13.4696C5.60757 13.99 6.39223 13.99 6.79252 13.4696L9.76166 9.60971C10.2675 8.95209 9.79871 8 8.96904 8L3.03076 8Z",fill:"#9FA8B2"})});var Fe=generateIconComponent({name:"HelpIcon",viewBox:"0 0 24 24",path:u.createElement(u.Fragment,null,u.createElement("g",{clipPath:"url(#HelpIcon_svg__a)"},u.createElement("path",{d:"M12 2.25A9.75 9.75 0 1 0 21.75 12 9.769 9.769 0 0 0 12 2.25ZM12 18a1.125 1.125 0 1 1 0-2.25A1.125 1.125 0 0 1 12 18Zm.75-4.584v.084a.75.75 0 1 1-1.5 0v-.75A.75.75 0 0 1 12 12a1.875 1.875 0 1 0-1.875-1.875.75.75 0 1 1-1.5 0 3.375 3.375 0 1 1 4.125 3.29Z",fill:"currentFill"})),u.createElement("defs",null,u.createElement("clipPath",{id:"HelpIcon_svg__a"},u.createElement("path",{fill:"currentFill",d:"M0 0h24v24H0z"}))))});var $e=generateIconComponent({name:"SearchIcon",viewBox:"0 0 24 24",path:u.createElement(u.Fragment,null,u.createElement("g",{clipPath:"url(#SearchIcon_svg__a)"},u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 11.125a5.125 5.125 0 1 1 10.25 0 5.125 5.125 0 0 1-10.25 0ZM11.125 4a7.125 7.125 0 1 0 4.282 12.82l2.886 2.887a1 1 0 0 0 1.414-1.414l-2.886-2.887A7.125 7.125 0 0 0 11.125 4Z",fill:"currentFill"})),u.createElement("defs",null,u.createElement("clipPath",{id:"SearchIcon_svg__a"},u.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"}))))});var Xe=generateIconComponent({name:"ContentfulLogoIcon",viewBox:"0 0 28 28",path:u.createElement(u.Fragment,null,u.createElement("path",{fill:"#1773EB",d:"M10.713 5.001c.845.843 1.167 2.079.845 3.228A6.663 6.663 0 0 1 15 7.276h.026a6.7 6.7 0 0 1 4.743 1.988 2.64 2.64 0 1 0 3.746-3.715A11.96 11.96 0 0 0 15.042 2h-.046a11.933 11.933 0 0 0-6.691 2.036h.074a3.287 3.287 0 0 1 2.334.967V5Z"}),u.createElement("path",{fill:"#E44F20",d:"M21.594 17.999a2.64 2.64 0 0 0-1.858.766 6.703 6.703 0 0 1-4.732 1.951h-.025a6.65 6.65 0 0 1-3.447-.968A3.3 3.3 0 0 1 8.35 23.93h-.086A11.926 11.926 0 0 0 14.96 26h.046a11.94 11.94 0 0 0 8.449-3.484 2.64 2.64 0 0 0-1.859-4.514V18h-.002Z"}),u.createElement("path",{fill:"#FFDA00",d:"M6.013 18.295a3.27 3.27 0 0 1 2.334-.967c.302 0 .603.04.894.122a6.7 6.7 0 0 1 .013-6.928A3.3 3.3 0 0 1 5.08 7.335v-.09a11.999 11.999 0 0 0-.032 13.453v-.07a3.27 3.27 0 0 1 .966-2.333Z"}),u.createElement("path",{fill:"#1773EB",d:"M8.379 4.62c-.75 0-1.276.312-1.913.949-.607.605-.798 1.135-.8 1.766A2.712 2.712 0 1 0 8.38 4.62Z"}),u.createElement("path",{fill:"#E44F20",d:"M5.628 20.631c0 .75.31 1.276.946 1.912.607.606 1.136.799 1.766.8a2.703 2.703 0 1 0-.017-5.407 2.703 2.703 0 0 0-2.695 2.704v-.009Z"}))});function qr(e,r){let Z=e,{account:t,badge:a,bottomRightItems:i,children:n,className:s,contentMaxWidth:c="100%",help:l,logo:p,search:v,switcher:x,testId:N="cf-ui-navbar",topRightItems:w,variant:M="wide"}=Z,D=f(Z,["account","badge","bottomRightItems","children","className","contentMaxWidth","help","logo","search","switcher","testId","topRightItems","variant"]),R=De(c,M);return u.createElement(Box,d(m({},D),{ref:r,testId:N,className:s}),u.createElement(Flex,{className:R.containerTop},u.createElement(Flex,{className:R.containerTopContent,justifyContent:"space-between"},u.createElement(Flex,{alignItems:"center",gap:"spacingL"},p||u.createElement(Xe,{className:R.logo}),x),u.createElement(Flex,{alignItems:"center",gap:"spacingXs"},w,a,v,l,t))),u.createElement(Flex,{className:R.containerBottom},u.createElement(Flex,{className:R.containerBottomContent,justifyContent:"space-between"},u.createElement(Flex,{as:"nav","aria-label":"Main Navigation"},n),i&&u.createElement(Flex,null,i))))}var Ge=u.forwardRef(qr);var Jr={warning:o.colorWarning,negative:o.colorNegative,info:o.blue500},Ve=()=>({navbarAccount:css({margin:0,padding:0,border:0,cursor:"pointer",background:"none",position:"relative",outline:"none",overflow:"visible",borderRadius:"50%","&:before":css({content:'""',display:"block",position:"absolute",height:"24px",width:"24px",backgroundColor:"transparent",borderRadius:"50%"}),"&:hover:before":css({backgroundColor:hexToRGBA(o.gray300,.15)})},I()),avatar:css({borderRadius:"50%",display:"block",height:"24px",width:"24px"}),notificationIcon:e=>css({position:"absolute",top:0,right:0,height:o.spacingS,width:o.spacingS,borderRadius:"50%",border:`2px solid ${o.gray100}`,backgroundColor:Jr[e],transform:"translate(30%, -30%)"})});var je=()=>({menuList:css({minWidth:"250px"})});var _=e=>{let{trigger:r,children:t,testId:a="cf-ui-navbar-menu-list",onOpen:i,onClose:n}=e,s=je();return u.createElement(Menu,{onOpen:i,onClose:n},u.createElement(Menu.Trigger,null,r),u.createElement(Menu.List,{className:s.menuList,testId:a},t))};function tt(e,r){let N=e,{children:t,className:a,testId:i="cf-ui-navbar-account-trigger",avatar:n,initials:s,username:c,hasNotification:l,notificationVariant:p="warning"}=N,v=f(N,["children","className","testId","avatar","initials","username","hasNotification","notificationVariant"]),x=Ve();return u.createElement(_,{trigger:u.createElement(Flex,d(m({as:"button"},v),{ref:r,className:cx(x.navbarAccount,a),testId:i,alignItems:"center"}),u.createElement(Avatar,{src:n,initials:s,size:"small",variant:"user"}),l?u.createElement("span",{className:x.notificationIcon(p)}):null)},t)}var ue=u.forwardRef(tt);function ge({ariaLabel:e}){return u.createElement(SkeletonContainer,{svgWidth:24,svgHeight:24,ariaLabel:e,backgroundColor:o.gray300,foregroundColor:o.gray200},u.createElement(SkeletonImage,{width:24,height:24,radiusX:12,radiusY:12}))}var qe=()=>css({"&::after":{content:'""',position:"absolute",width:`calc(100% - ${o.spacingM})`,height:"2px",bottom:`-${o.spacing2Xs}`,left:0,right:0,margin:"auto",backgroundColor:o.blue600,zIndex:0}}),Ye={display:"flex",justifyContent:"center",padding:`${o.spacing2Xs} ${o.spacingS}`,alignItems:"center",background:"none"},Je=()=>({navbarItem:css(Ye,{alignItems:"center",background:"none",border:0,margin:0,outline:"none",fontSize:o.fontSizeM,lineHeight:o.lineHeightS,fontWeight:o.fontWeightMedium,position:"relative",textAlign:"left",whiteSpace:"nowrap",cursor:"pointer",hyphens:"auto",textDecoration:"none",color:o.gray700,boxSizing:"border-box",transition:`color ${o.transitionDurationShort} ${o.transitionEasingCubicBezier}`,borderRadius:o.borderRadiusMedium,"&:hover":{backgroundColor:hexToRGBA(o.gray900,.05)},"&:hover::before":{opacity:1,scale:"1"},"&:active::before":{backgroundColor:"rgba(255, 255, 255, 0.1)"},"&:disabled":{cursor:"auto"},"& svg":{transition:`fill ${o.transitionDurationShort} ${o.transitionEasingCubicBezier}`},"& > svg, & > span":{zIndex:o.zIndexDefault}},I(`inset ${o.glowPrimary}`)),navbarItemMenuTrigger:css({paddingRight:o.spacingXs}),isActive:qe()}),Ke=()=>({itemSkeleton:css(Ye)});var Qe=()=>({navbarItemIcon:css({fill:o.gray700,"&:first-child":{marginRight:o.spacing2Xs},"&:last-child":{marginLeft:o.spacing2Xs},"img&":{borderRadius:o.borderRadiusSmall,maxWidth:o.spacingM,maxHeight:o.spacingM}})});var Q=e=>{var i,n;let{icon:r,variant:t}=e,a=Qe();return u.cloneElement(r,{className:cx(r.props.className,a.navbarItemIcon),size:(i=r.props.size)!=null?i:"tiny",variant:(n=r.props.variant)!=null?n:t})};var ct="button";function mt(e,r){let D=e,{as:t=ct,icon:a,title:i,children:n,className:s,isActive:c,testId:l="cf-ui-navbar-item",onOpen:p,onClose:v}=D,x=f(D,["as","icon","title","children","className","isActive","testId","onOpen","onClose"]),N=Je(),w=dt(e),M=u.createElement(t,d(m({},x),{ref:r,"data-test-id":l,className:cx(N.navbarItem,w&&N.navbarItemMenuTrigger,c&&N.isActive,s)}),a&&u.createElement(Q,{icon:a,variant:"secondary"}),u.createElement("span",null,i),w&&u.createElement(We,null));return w?u.createElement(_,{trigger:M,testId:l,onOpen:p,onClose:v},n):M}var dt=e=>!!e.children,be=u.forwardRef(mt);var ve=({estimatedWidth:e})=>{let r=Ke();return u.createElement(SkeletonContainer,{className:r.itemSkeleton,svgWidth:e,svgHeight:32,backgroundColor:o.gray300,foregroundColor:o.gray200},u.createElement(SkeletonText,{lineHeight:6,numberOfLines:1,offsetTop:10,radiusX:o.borderRadiusSmall,radiusY:o.borderRadiusSmall}))};var rr=()=>({navbarMenuItem:css({display:"flex",justifyContent:"flex-start",alignItems:"center"})});var xt="button";function yt(e,r){let p=e,{as:t=xt,icon:a,title:i,className:n}=p,s=f(p,["as","icon","title","className"]),c=rr(),l=Nt(e);return u.createElement(Menu.Item,d(m({},s),{ref:r,as:t,className:cx(c.navbarMenuItem,n)}),a?u.createElement(Q,{icon:a,variant:"secondary"}):l&&tr,u.createElement("span",null,i),a&&l?tr:null)}var tr=u.createElement(Q,{icon:u.createElement(ArrowSquareOutIcon,null),variant:"muted"}),Nt=e=>e.as==="a"&&e.target==="_blank",he=u.forwardRef(yt);var xe=({ariaLabel:e})=>u.createElement(Menu.Item,null,u.createElement(Flex,{alignItems:"center",gap:o.spacingXs},u.createElement(SkeletonContainer,{svgHeight:16,svgWidth:18},u.createElement(SkeletonImage,{width:16,height:16})),u.createElement(SkeletonContainer,{svgHeight:16,svgWidth:190,ariaLabel:e},u.createElement(SkeletonBodyText,{numberOfLines:1}))));var ar=()=>({navbarSwitcher:css({margin:0,padding:0,background:"none",border:"none",height:"max-content",color:o.gray700,cursor:"pointer",fontSize:o.fontSizeS,fontWeight:o.fontWeightMedium,position:"relative",outline:"none",borderRadius:"3rem","&:after":{content:'""',border:"1px solid #353A41",boxSizing:"border-box",height:"16px",right:"-1px",position:"absolute",width:0},"&:last-child:after":{display:"none"},"&:hover li":{backgroundColor:"#f2f4f6"}},I()),switcherMenuIcon:css({height:o.spacingM,width:o.spacingM,fill:o.gray700}),switcherBreadcrumbs:css({listStyleType:"none",margin:0,padding:0,position:"relative"})});function Ct(e,r){let c=e,{children:t,className:a,testId:i="cf-ui-navbar-switcher"}=c,n=f(c,["children","className","testId"]),s=ar();return u.createElement(Flex,d(m({},n),{as:"button",ref:r,className:cx(s.navbarSwitcher,a),testId:i,alignItems:"center",fullHeight:!0,gap:"spacingXs"}),u.createElement(Flex,{as:"ul",alignItems:"center",className:s.switcherBreadcrumbs},t))}var Ie=u.forwardRef(Ct);var Se=({estimatedWidth:e})=>u.createElement(SkeletonContainer,{svgWidth:e,svgHeight:24,backgroundColor:o.gray300,foregroundColor:o.gray200},u.createElement(SkeletonDisplayText,{lineHeight:24,numberOfLines:1,radiusX:12,radiusY:12}));var zt=Object.defineProperty,Lt=Object.defineProperties,Ht=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,cr=Object.prototype.propertyIsEnumerable,lr=(e,r,t)=>r in e?zt(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Ot=(e,r)=>{for(var t in r||(r={}))pr.call(r,t)&&lr(e,t,r[t]);if(ie)for(var t of ie(r))cr.call(r,t)&&lr(e,t,r[t]);return e},Dt=(e,r)=>Lt(e,Ht(r)),_t=(e,r)=>{var t={};for(var a in e)pr.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&ie)for(var a of ie(e))r.indexOf(a)<0&&cr.call(e,a)&&(t[a]=e[a]);return t},Wt={large:"36px",medium:"20px",small:"14px"},Ft=()=>{let e={scale1:keyframes`
13
+ 0% {
14
+ transform: scale(1, 1);
15
+ }
16
+ 6.666667% {
17
+ transform: scale(1.5, 0.5);
18
+ }
19
+ 13.333333% {
20
+ transform: scale(1, 1);
21
+ }
22
+ 26.666667% {
23
+ transform: scale(1, 1);
24
+ }
25
+ 33.333333% {
26
+ transform: scale(1, 1);
27
+ }
28
+ 40% {
29
+ transform: scale(1, 1);
30
+ }
31
+ 53.333333% {
32
+ transform: scale(1, 1);
33
+ }
34
+ 60% {
35
+ transform: scale(1.5, 0.5);
36
+ }
37
+ 66.666667% {
38
+ transform: scale(1, 1);
39
+ }
40
+ 100% {
41
+ transform: scale(1, 1);
42
+ }
43
+ `,scale2:keyframes`
44
+ 0% {
45
+ transform: scale(1, 1);
46
+ }
47
+ 13.333333% {
48
+ transform: scale(1, 1);
49
+ }
50
+ 20% {
51
+ transform: scale(1.5, 0.5);
52
+ }
53
+ 26.666667% {
54
+ transform: scale(1, 1);
55
+ }
56
+ 40% {
57
+ transform: scale(1, 1);
58
+ }
59
+ 46.666667% {
60
+ transform: scale(1, 1);
61
+ }
62
+ 53.333333% {
63
+ transform: scale(1, 1);
64
+ }
65
+ 66.666667% {
66
+ transform: scale(1, 1);
67
+ }
68
+ 73.333333% {
69
+ transform: scale(1.5, 0.5);
70
+ }
71
+ 80% {
72
+ transform: scale(1, 1);
73
+ }
74
+ 100% {
75
+ transform: scale(1, 1);
76
+ }
77
+ `,scale3:keyframes`
78
+ 0% {
79
+ transform: scale(1, 1);
80
+ }
81
+ 26.666667% {
82
+ transform: scale(1, 1);
83
+ }
84
+ 33.333333% {
85
+ transform: scale(1.5, 0.5);
86
+ }
87
+ 40% {
88
+ transform: scale(1, 1);
89
+ }
90
+ 53.333333% {
91
+ transform: scale(1, 1);
92
+ }
93
+ 60% {
94
+ transform: scale(1, 1);
95
+ }
96
+ 66.666667% {
97
+ transform: scale(1, 1);
98
+ }
99
+ 80% {
100
+ transform: scale(1, 1);
101
+ }
102
+ 86.666667% {
103
+ transform: scale(1.5, 0.5);
104
+ }
105
+ 93.333333% {
106
+ transform: scale(1, 1);
107
+ }
108
+ 100% {
109
+ transform: scale(1, 1);
110
+ }
111
+ `,translate1:keyframes`
112
+ 0% {
113
+ transform: translate(10px, 33.528168px);
114
+ }
115
+ 6.666667% {
116
+ transform: translate(10px, 41.764084px);
117
+ }
118
+ 13.333333% {
119
+ transform: translate(10px, 33.528168px);
120
+ }
121
+ 26.666667% {
122
+ transform: translate(10px, -2.651608px);
123
+ }
124
+ 33.333333% {
125
+ transform: translate(10px, -4.471832px);
126
+ }
127
+ 40% {
128
+ transform: translate(10px, -2.651608px);
129
+ }
130
+ 53.333333% {
131
+ transform: translate(10px, 33.528168px);
132
+ }
133
+ 60% {
134
+ transform: translate(10px, 41.764084px);
135
+ }
136
+ 66.666667% {
137
+ transform: translate(10px, 33.528168px);
138
+ }
139
+ 100% {
140
+ transform: translate(10px, 33.528168px);
141
+ }
142
+ `,translate2:keyframes`
143
+ 0% {
144
+ transform: translate(30px, 33.528168px);
145
+ }
146
+ 13.333333% {
147
+ transform: translate(30px, 33.528168px);
148
+ }
149
+ 20% {
150
+ transform: translate(30px, 41.764084px);
151
+ }
152
+ 26.666667% {
153
+ transform: translate(30px, 33.528168px);
154
+ }
155
+ 40% {
156
+ transform: translate(30px, -2.651608px);
157
+ }
158
+ 46.666667% {
159
+ transform: translate(30px, -4.471832px);
160
+ }
161
+ 53.333333% {
162
+ transform: translate(30px, -2.651608px);
163
+ }
164
+ 66.666667% {
165
+ transform: translate(30px, 33.528168px);
166
+ }
167
+ 73.333333% {
168
+ transform: translate(30px, 41.764084px);
169
+ }
170
+ 80% {
171
+ transform: translate(30px, 33.528168px);
172
+ }
173
+ 100% {
174
+ transform: translate(30px, 33.528168px);
175
+ }
176
+ `,translate3:keyframes`
177
+ 0% {
178
+ transform: translate(50px, 33.528168px);
179
+ }
180
+ 26.666667% {
181
+ transform: translate(50px, 33.528168px);
182
+ }
183
+ 33.333333% {
184
+ transform: translate(50px, 41.764084px);
185
+ }
186
+ 40% {
187
+ transform: translate(50px, 33.528168px);
188
+ }
189
+ 53.333333% {
190
+ transform: translate(50px, -2.651608px);
191
+ }
192
+ 60% {
193
+ transform: translate(50px, -4.471832px);
194
+ }
195
+ 66.666667% {
196
+ transform: translate(50px, -2.651608px);
197
+ }
198
+ 80% {
199
+ transform: translate(50px, 33.528168px);
200
+ }
201
+ 86.666667% {
202
+ transform: translate(50px, 41.764084px);
203
+ }
204
+ 93.333333% {
205
+ transform: translate(50px, 33.528168px);
206
+ }
207
+ 100% {
208
+ transform: translate(50px, 33.528168px);
209
+ }
210
+ `};return {root:r=>css({height:r.customSize?`${r.customSize}px`:void 0,verticalAlign:"middle",width:r.customSize?`${r.customSize}px`:Wt[r.size]}),circle1Scale:css({animation:`${e.scale1} 1s linear infinite normal forwards;`}),circle2Scale:css({animation:`${e.scale2} 1s linear infinite normal forwards;`}),circle3Scale:css({animation:`${e.scale3} 1s linear infinite normal forwards;`}),circle1Translate:css({animation:`${e.translate1} 1s linear infinite normal forwards;`}),circle2Translate:css({animation:`${e.translate2} 1s linear infinite normal forwards;`}),circle3Translate:css({animation:`${e.translate3} 1s linear infinite normal forwards;`})}},$t="div",Xt={default:o.gray700,primary:o.blue500,white:o.colorWhite},we=forwardRef((e,r)=>{var t=e,{className:a,customSize:i,size:n="medium",variant:s="default",testId:c="cf-ui-spinner"}=t,l=_t(t,["className","customSize","size","variant","testId"]);let p=Ft();return u.createElement(Box,Dt(Ot({as:$t,display:"inline-block"},l),{className:cx(p.root({size:n,customSize:i}),a),ref:r,testId:c}),u.createElement("svg",{className:css({display:"block",fill:Xt[s]}),viewBox:"0 0 60 51",xmlns:"http://www.w3.org/2000/svg"},u.createElement("title",null,"Loading\u2026"),u.createElement("g",{className:p.circle1Translate,transform:"translate(10,33.528168)"},u.createElement("g",{className:p.circle1Scale},u.createElement("circle",{r:"6",transform:"translate(0,10.471832)"}))),u.createElement("g",{className:p.circle2Translate,transform:"translate(30,33.528168)"},u.createElement("g",{className:p.circle2Scale},u.createElement("circle",{r:"6",transform:"translate(0,10.471832)"}))),u.createElement("g",{className:p.circle3Translate,transform:"translate(50,33.528168)"},u.createElement("g",{className:p.circle3Scale},u.createElement("circle",{r:"6",transform:"translate(0,10.471832)"})))))});we.displayName="Spinner";var jt=Object.defineProperty,Ut=Object.defineProperties,Zt=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,fr=Object.prototype.hasOwnProperty,ur=Object.prototype.propertyIsEnumerable,mr=(e,r,t)=>r in e?jt(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,y=(e,r)=>{for(var t in r||(r={}))fr.call(r,t)&&mr(e,t,r[t]);if(se)for(var t of se(r))ur.call(r,t)&&mr(e,t,r[t]);return e},Ee=(e,r)=>Ut(e,Zt(r)),Ae=(e,r)=>{var t={};for(var a in e)fr.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&se)for(var a of se(e))r.indexOf(a)<0&&ur.call(e,a)&&(t[a]=e[a]);return t},qt=({withDivider:e})=>{let r=Yt(e);return {buttonGroup:css({display:"inline-flex",position:"relative"}),groupContent:css(y({borderRadius:"0 !important",marginRight:"-1px","&:first-child":{borderBottomLeftRadius:`${o.borderRadiusMedium} !important`,borderTopLeftRadius:`${o.borderRadiusMedium} !important`},"&:last-child":{borderBottomRightRadius:`${o.borderRadiusMedium} !important`,borderTopRightRadius:`${o.borderRadiusMedium} !important`,marginRight:0},"&:focus":{zIndex:o.zIndexDefault}},r))}},Yt=e=>{if(!e)return {};let r=`1px solid ${hexToRGBA(o.colorWhite,.2)}`;return {borderTop:"none",borderBottom:"none","&:not(:first-child,:focus-visible)":{borderLeft:r},"&:not(:last-child,:focus-visible)":{borderRight:r}}};function gr(e,r){let{variant:t="merged",withDivider:a,testId:i="cf-ui-button-group",children:n,className:s,spacing:c}=e,l=qt({withDivider:a});return t==="spaced"?u.createElement(Stack,{className:s,isInline:!0,flexDirection:"row",testId:i,ref:r,spacing:c},n):u.createElement(Box,{testId:i,ref:r,className:cx(l.buttonGroup,s)},u.Children.map(n,(p,v)=>p?u.cloneElement(p,{key:v,className:cx(l.groupContent,p.props.className)}):null))}gr.displayName="ButtonGroup";u.forwardRef(gr);var j=e=>{switch(e){case"primary":return {backgroundColor:o.blue700};case"secondary":return {backgroundColor:o.gray200};case"positive":return {backgroundColor:o.green700};case"negative":return {backgroundColor:o.gray200};case"transparent":return {backgroundColor:hexToRGBA(o.gray900,.1)};default:return {}}},Jt=e=>{switch(e){case"primary":return {color:o.colorWhite,backgroundColor:o.blue500,borderColor:"transparent","&:hover":{backgroundColor:o.blue600,color:o.colorWhite},"&:active":j(e),"&:focus-visible":{boxShadow:o.glowPrimary}};case"secondary":return {color:o.gray900,backgroundColor:o.colorWhite,borderColor:o.gray300,"&:hover":{backgroundColor:o.gray100,color:o.gray900},"&:active":j(e),"&:focus":{boxShadow:o.glowPrimary},"&:focus:not(:focus-visible)":{boxShadow:"unset"},"&:focus-visible":{boxShadow:o.glowPrimary}};case"positive":return {color:o.colorWhite,backgroundColor:o.green500,borderColor:"transparent","&:hover":{backgroundColor:o.green600,color:o.colorWhite},"&:active":j(e),"&:focus-visible":{boxShadow:o.glowPositive}};case"negative":return {color:o.red600,backgroundColor:o.colorWhite,borderColor:o.gray300,"&:hover":{backgroundColor:o.gray100,color:o.red600},"&:active":j(e),"&:focus-visible":{boxShadow:o.glowNegative}};case"transparent":return {color:o.gray900,background:"none",borderColor:"transparent",boxShadow:"none","&:hover":{backgroundColor:hexToRGBA(o.gray900,.05)},"&:active":j(e),"&:focus":{boxShadow:o.glowPrimary},"&:focus:not(:focus-visible)":{boxShadow:"unset"},"&:focus-visible":{boxShadow:o.glowPrimary}};default:return {}}},Kt=(e,r)=>{let t=r==="high";switch(e){case"small":return {fontSize:t?o.fontSizeS:o.fontSizeM,lineHeight:o.lineHeightCondensed,padding:t?`${o.spacing2Xs} ${o.spacingXs}`:`${o.spacing2Xs} ${o.spacingS}`,minHeight:t?o.spacingL:o.spacingXl};case"medium":return {fontSize:t?o.fontSizeS:o.fontSizeM,lineHeight:o.lineHeightCondensed,padding:t?`${o.spacingXs} ${o.spacingS}`:`${o.spacingXs} ${o.spacingM}`,minHeight:t?o.spacingXl:"40px"};case"large":return {fontSize:o.fontSizeXl,lineHeight:o.lineHeightXl,padding:`${o.spacingXs} ${o.spacingM}`,minHeight:"48px"};default:return {}}},Qt=({hasChildren:e,variant:r})=>{let t={"&:first-child":{marginRight:o.spacing2Xs},"&:last-child":{marginLeft:o.spacing2Xs}};return css([e?t:{},r!=="transparent"&&e&&{"& svg":{fill:"currentColor"}}])},eo=()=>({button:({variant:e,size:r,density:t,isActive:a,isDisabled:i,isFullWidth:n})=>css(y(y(y({boxSizing:"border-box",border:"1px solid",boxShadow:"0px 1px 0px rgb(25, 37, 50, 0.08)",borderRadius:t==="high"?o.borderRadiusSmall:o.borderRadiusMedium,cursor:i?"not-allowed":"pointer",fontFamily:o.fontStackPrimary,opacity:i?.5:1,display:n?"flex":"inline-flex",minWidth:n?"100%":"auto",maxWidth:n?"100%":"240px",overflow:"hidden",flexShrink:0,justifyContent:"center",alignItems:"center",fontWeight:o.fontWeightMedium,outline:"none",textDecoration:"none",margin:0,transition:`background ${o.transitionDurationShort} ${o.transitionEasingDefault},
211
+ opacity ${o.transitionDurationDefault} ${o.transitionEasingDefault},
212
+ border-color ${o.transitionDurationDefault} ${o.transitionEasingDefault}`},Jt(e)),Kt(r,t)),a?{transition:"none","&, &:focus":j(e)}:{})),buttonIcon:Qt,buttonContent:css({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})}),ro="button";function br(e,r){let t=eo(),a=e,{as:i=ro,children:n,className:s,testId:c="cf-ui-button",variant:l="secondary",size:p="medium",startIcon:v,endIcon:x,isActive:N,isDisabled:w,isLoading:M,isFullWidth:D,style:R}=a,Z=Ae(a,["as","children","className","testId","variant","size","startIcon","endIcon","isActive","isDisabled","isLoading","isFullWidth","style"]),zr=useDensity(),Lr=cx(t.button({variant:l,size:p,density:zr,isActive:N,isDisabled:w,isFullWidth:D}),s),Te=q=>{var ze;let Hr={primary:"white",secondary:"secondary",positive:"white",negative:"negative",transparent:"secondary"};return !M&&u.createElement(Flex,{as:"span",className:t.buttonIcon({hasChildren:!!n,variant:l})},u.cloneElement(q,{size:(ze=q.props.size)!=null?ze:`${p==="large"?"medium":"small"}`,color:l==="transparent"&&q.props.variant===void 0&&q.props.color||"currentColor",variant:l==="transparent"&&q.props.variant||Hr[l]}))},Re=u.createElement(u.Fragment,null,v&&Te(v),n&&u.createElement(Box,{as:"span",display:"block",className:t.buttonContent},n),x&&Te(x),M&&u.createElement(Box,{as:"span",marginLeft:n||!M?"spacingXs":"none"},u.createElement(we,{customSize:18,variant:l==="secondary"||l==="negative"||l==="transparent"?"default":"white"}))),Be={"data-test-id":c,className:Lr,ref:r,style:R};return i==="a"?u.createElement("a",Ee(y(y({},Z),Be),{disabled:w}),Re):u.createElement("button",Ee(y(y({type:"button"},Z),Be),{disabled:w}),Re)}br.displayName="Button";var le=u.forwardRef(br),to=({isActive:e,isDisabled:r})=>{let t={background:o.blue100,borderColor:o.blue600,"&":{zIndex:o.zIndexDefault+1},"&:hover":{background:o.blue100}},a={"&:focus":{boxShadow:o.glowPrimary},"&:focus-visible:not([disabled])":{zIndex:o.zIndexDefault+2},"&:active, &:active:hover":r?{background:o.colorWhite,borderColor:o.gray300}:{background:o.blue100,borderColor:o.blue600}};return e?y(y({},a),t):a},oo=({isActive:e,isDisabled:r})=>({toggleButton:css(to({isActive:e,isDisabled:r}))});function vr(e,r){let t=e,{testId:a="cf-ui-toggle-button",children:i,className:n,isDisabled:s=!1,isActive:c=!1,icon:l,onToggle:p,size:v="medium"}=t,x=Ae(t,["testId","children","className","isDisabled","isActive","icon","onToggle","size"]),N=oo({isActive:c,isDisabled:s});return u.createElement(le,y({testId:a,type:"button",ref:r,size:v,onClick:()=>{!s&&p&&p();},className:cx(N.toggleButton,n),startIcon:l,isDisabled:s,"aria-pressed":c,"data-state":c?"on":"off"},x),i)}vr.displayName="ToggleButton";u.forwardRef(vr);function ao(e,r){let t=r==="high";switch(e){case"small":return {padding:t?`${o.spacing2Xs}`:o.spacing2Xs,minHeight:t?o.spacingL:o.spacingXl,minWidth:t?o.spacingL:o.spacingXl};case"medium":return {padding:o.spacingXs,minHeight:t?o.spacingXl:"40px",minWidth:t?o.spacingXl:"40px"};default:return {}}}function no({size:e,density:r}){return {iconButton:css(y({},ao(e,r)))}}function hr(e,r){let t=e,{testId:a="cf-ui-icon-button",variant:i="transparent",icon:n,className:s,size:c="medium"}=t,l=Ae(t,["testId","variant","icon","className","size"]),p=useDensity(),v=no({size:c,density:p});return u.createElement(le,Ee(y({testId:a,ref:r,variant:i,className:cx(v.iconButton,s),size:c},l),{startIcon:n}))}hr.displayName="IconButton";var xr=u.forwardRef(hr);var yr=()=>({navbarSearch:css({minWidth:"24px",width:"24px",minHeight:"24px",height:"24px",svg:{fill:o.gray700}},I())});function po(e,r){let s=e,{className:t,testId:a="cf-ui-navbar-search"}=s,i=f(s,["className","testId"]),n=yr();return u.createElement(xr,d(m({"aria-label":"Quick Search"},i),{variant:"transparent",ref:r,size:"small",className:cx(n.navbarSearch,t),testId:a,icon:u.createElement($e,{size:"medium"})}))}var Nr=u.forwardRef(po);var Ir={display:"none","&:first-child":{display:"block"},[E.medium]:{display:"block","&:first-child":{display:"none"}}},Sr=()=>({breadcrumbsItem:css({position:"relative",alignItems:"center",justifyContent:"center",border:`solid 1px ${o.gray300}`,borderLeft:"none",display:"inline-flex",margin:0,minWidth:0,padding:`0 ${o.spacingXs}`,height:o.spacingL,borderRadius:"3rem",zIndex:2,whiteSpace:"nowrap","&:first-child":{minWidth:"24px"},"&:nth-child(2)":{zIndex:1,marginLeft:"-10px",paddingLeft:o.spacingM,borderRadius:"0 3rem 3rem 0",span:{maxWidth:"80px",textOverflow:"ellipsis",overflow:"hidden",[E.large]:{maxWidth:"100%"}}},"&:nth-child(3)":{marginLeft:"-10px",paddingLeft:o.spacingM,borderRadius:"0 3rem 3rem 0",fontFamily:o.fontStackMonospace,fontSize:o.fontSizeS,fontWeight:o.fontWeightMedium,zIndex:0,span:{maxWidth:"40px",textOverflow:"ellipsis",overflow:"hidden",[E.large]:{maxWidth:"100%"}},"> div":{[E.medium]:{gap:o.spacing2Xs}}}}),breadcrumbsItemCircle:css({border:`solid 1px ${o.gray300}`,borderRadius:"50%",color:o.gray400,padding:0,display:"flex",justifyContent:"center",fontSize:"11px",width:o.spacingL,height:o.spacingL}),breadcrumbsItemEnvMaster:css({color:o.green600," svg":d(m({},Ir),{fill:o.green600})}),breadcrumbsItemEnvNonMaster:css({color:o.orange500,svg:d(m({},Ir),{fill:o.orange500})})});function Pr({isAlias:e}){return u.createElement(u.Fragment,null,u.createElement(_e,{key:"mobile-icon",size:"tiny"}),e?u.createElement(EnvironmentAliasIcon,{key:"full-icon",size:"tiny"}):u.createElement(EnvironmentIcon,{key:"full-icon",size:"tiny"}))}function go(e,r){let x=e,{children:t,isCircle:a,className:i,envVariant:n,isAlias:s,testId:c="cf-ui-navbar-switcher-item"}=x,l=f(x,["children","isCircle","className","envVariant","isAlias","testId"]),p=Sr(),v=cx(p.breadcrumbsItem,i,{[p.breadcrumbsItemCircle]:a,[p.breadcrumbsItemEnvMaster]:n==="master",[p.breadcrumbsItemEnvNonMaster]:n==="non-master"});return u.createElement("li",d(m({},l),{ref:r,className:v,"data-test-id":c}),u.createElement(Flex,{fullHeight:!0,justifyContent:"center",alignItems:"center"},n&&u.createElement(Pr,{isAlias:s}),u.createElement("span",null,t)))}var wr=u.forwardRef(go);var Mr=()=>({navbarHelp:css({fontSize:o.fontSizeS,padding:`0 ${o.spacing2Xs}`,width:"max-content",minHeight:"24px",height:"24px",color:o.gray700,svg:{fill:o.gray700}},I())});function ho(e,r){let c=e,{children:t,className:a,testId:i="cf-ui-navbar-help-trigger"}=c,n=f(c,["children","className","testId"]),s=Mr();return u.createElement(_,{testId:"cf-ui-navbar-help-menu",trigger:u.createElement(le,d(m({"aria-label":"Help Menu"},n),{as:"button",ref:r,className:cx(s.navbarHelp,a),testId:i,variant:"transparent",size:"small",startIcon:u.createElement(Fe,{size:"medium"})}),"Help")},t)}var Er=u.forwardRef(ho);var Cr=()=>({navbarBadge:css({display:"flex",justifyContent:"center",alignItems:"center",background:"none",border:`1px solid ${o.purple600}`,margin:0,outline:"none",fontSize:o.fontSizeS,lineHeight:o.lineHeightS,fontWeight:o.fontWeightMedium,textAlign:"center",padding:`0 ${o.spacingXs}`,textDecoration:"none",color:`${o.purple600}!important`,borderRadius:"1.75rem"})});var No="div";function Io(e,r){let l=e,{as:t=No,children:a,className:i,testId:n="cf-ui-navbar-badge"}=l,s=f(l,["as","children","className","testId"]),c=Cr();return u.createElement(t,d(m({},s),{ref:r,className:cx(c.navbarBadge,i),"data-test-id":n}),a)}var kr=u.forwardRef(Io);var Tr=()=>({navbarTopItem:css({margin:0,background:"none",border:"1px solid",borderColor:"transparent",cursor:"pointer",display:"flex",gap:o.spacing2Xs,alignItems:"center",lineHeight:o.lineHeightDefault,color:o.gray700,padding:`0 ${o.spacing2Xs}`,minHeight:"24px",fontSize:o.fontSizeS,fontWeight:o.fontWeightMedium,outline:"none",borderRadius:o.borderRadiusMedium,"&:hover":{backgroundColor:hexToRGBA(o.gray900,.05)},svg:{fill:"currentColor"}},I())});var Mo="button";function Eo(e,r){let l=e,{as:t=Mo,children:a,className:i,testId:n="cf-ui-navbar-topbar-item"}=l,s=f(l,["as","children","className","testId"]),c=Tr();return u.createElement(t,d(m({},s),{ref:r,className:cx(c.navbarTopItem,i),"data-test-id":n}),a)}var Br=u.forwardRef(Eo);var h=Ge;h.Item=be;h.ItemSkeleton=ve;h.MenuItem=he;h.MenuItemSkeleton=xe;h.MenuDivider=MenuDivider;h.MenuSectionTitle=MenuSectionTitle;h.Switcher=Ie;h.SwitcherSkeleton=Se;h.SwitcherItem=wr;h.Search=Nr;h.Help=Er;h.Account=ue;h.AccountSkeleton=ge;h.Badge=kr;h.TopbarItem=Br;
13
213
 
14
- export { b as Navbar, Ne as getNavbarItemActiveStyles };
214
+ export { h as Navbar, qe as getNavbarItemActiveStyles };
15
215
  //# sourceMappingURL=out.js.map
16
216
  //# sourceMappingURL=index.js.map