UNPKG

@frontify/fondue

Version:
1 lines 2.86 MB
(function(a,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("@react-aria/accordion"),require("@react-aria/focus"),require("@react-aria/utils"),require("@react-stately/collections"),require("@react-stately/tree"),require("react"),require("framer-motion"),require("@react-aria/menu"),require("@react-aria/link"),require("react-popper"),require("@react-aria/button"),require("react-dom"),require("@react-aria/overlays"),require("@react-stately/menu"),require("@ctrl/tinycolor"),require("@react-aria/breadcrumbs"),require("@react-aria/checkbox"),require("@react-stately/toggle"),require("@react-stately/checkbox"),require("@react-aria/interactions"),require("@react-aria/radio"),require("@react-aria/visually-hidden"),require("@react-stately/radio"),require("react-colorful"),require("@react-aria/select"),require("@react-stately/select"),require("@react-aria/listbox"),require("@react-aria/aria-modal-polyfill"),require("@react-stately/overlays"),require("@react-aria/dialog"),require("@floating-ui/dom"),require("date-fns"),require("react-datepicker"),require("react-dnd"),require("react-dnd-html5-backend"),require("react-textarea-autosize"),require("@dnd-kit/core"),require("@dnd-kit/modifiers"),require("@dnd-kit/sortable"),require("immer"),require("lodash-es"),require("react-is"),require("react-fast-compare"),require("@dnd-kit/utilities"),require("@udecode/plate-core"),require("@udecode/plate-link"),require("@udecode/slate"),require("@radix-ui/react-toolbar"),require("@udecode/plate-floating"),require("@udecode/react-utils"),require("@udecode/plate-paragraph"),require("@udecode/plate-indent"),require("@udecode/plate-list"),require("@udecode/slate-react"),require("@radix-ui/react-tooltip"),require("@udecode/plate-combobox"),require("@udecode/plate-emoji"),require("@radix-ui/react-popover"),require("@udecode/slate-utils"),require("@udecode/plate-basic-marks"),require("@udecode/plate-break"),require("@udecode/plate-utils"),require("@udecode/plate-alignment"),require("@udecode/utils"),require("@udecode/plate-autoformat"),require("@udecode/plate-mention"),require("escape-html"),require("@udecode/plate-code-block"),require("remark-gfm"),require("remark-parse"),require("unified"),require("unist-util-visit"),require("@react-stately/table"),require("@udecode/zustood"),require("@udecode/plate-normalizers"),require("slate"),require("slate-react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@react-aria/accordion","@react-aria/focus","@react-aria/utils","@react-stately/collections","@react-stately/tree","react","framer-motion","@react-aria/menu","@react-aria/link","react-popper","@react-aria/button","react-dom","@react-aria/overlays","@react-stately/menu","@ctrl/tinycolor","@react-aria/breadcrumbs","@react-aria/checkbox","@react-stately/toggle","@react-stately/checkbox","@react-aria/interactions","@react-aria/radio","@react-aria/visually-hidden","@react-stately/radio","react-colorful","@react-aria/select","@react-stately/select","@react-aria/listbox","@react-aria/aria-modal-polyfill","@react-stately/overlays","@react-aria/dialog","@floating-ui/dom","date-fns","react-datepicker","react-dnd","react-dnd-html5-backend","react-textarea-autosize","@dnd-kit/core","@dnd-kit/modifiers","@dnd-kit/sortable","immer","lodash-es","react-is","react-fast-compare","@dnd-kit/utilities","@udecode/plate-core","@udecode/plate-link","@udecode/slate","@radix-ui/react-toolbar","@udecode/plate-floating","@udecode/react-utils","@udecode/plate-paragraph","@udecode/plate-indent","@udecode/plate-list","@udecode/slate-react","@radix-ui/react-tooltip","@udecode/plate-combobox","@udecode/plate-emoji","@radix-ui/react-popover","@udecode/slate-utils","@udecode/plate-basic-marks","@udecode/plate-break","@udecode/plate-utils","@udecode/plate-alignment","@udecode/utils","@udecode/plate-autoformat","@udecode/plate-mention","escape-html","@udecode/plate-code-block","remark-gfm","remark-parse","unified","unist-util-visit","@react-stately/table","@udecode/zustood","@udecode/plate-normalizers","slate","slate-react"],t):(a=typeof globalThis<"u"?globalThis:a||self,t(a.Fondue={},a["react/jsx-runtime"],a.accordion,a.focus,a.utils$1,a.collections,a.tree,a.React,a.framerMotion,a.menu,a.link,a.reactPopper,a.button,a.ReactDOM,a.overlays,a.menu$1,a.tinycolor,a.breadcrumbs,a.checkbox,a.toggle,a.checkbox$1,a.interactions,a.radio$1,a.visuallyHidden,a.radio,a.reactColorful,a.select$1,a.select,a.listbox,a.ariaModalPolyfill,a.overlays$1,a.dialog,a.dom,a.dateFns,a.ReactDatePicker,a.reactDnd,a.reactDndHtml5Backend,a.TextareaAutosize,a.core,a.modifiers,a.sortable,a.immer,a.lodashEs,a.reactIs,a.isEqual,a.utilities,a.plateCore,a.plateLink,a.slate,a.ToolbarPrimitive,a.plateFloating,a.reactUtils,a.plateParagraph,a.plateIndent,a.plateList,a.slateReact,a.TooltipPrimitive,a.plateCombobox,a.plateEmoji,a.Popover$1,a.slateUtils,a.plateBasicMarks,a.plateBreak,a.plateUtils,a.plateAlignment,a.utils,a.plateAutoformat,a.plateMention,a.escapeHtml,a.plateCodeBlock,a.remarkGfm,a.parse,a.unified,a.unistUtilVisit,a.table,a.zustood,a.plateNormalizers,a.slate$1,a.slateReact$1))})(this,function(a,t,I1,J,x0,X5,c4,o,U0,V2,WO,N1,G0,$1,H0,GO,i1,Y5,J5,KO,QO,XO,r4,E5,YO,JO,i4,EO,R5,RO,eZ,s4,d4,h4,w4,e3,tZ,L4,d0,lZ,s2,u4,s1,aZ,oZ,nZ,$,l0,Z,cZ,$0,t3,d1,rZ,E,P1,iZ,P0,t1,sZ,l1,i0,dZ,l3,F2,a3,a1,z1,$2,hZ,wZ,LZ,uZ,o3,j1,fZ,mZ,n3,vZ){"use strict";var xz0=Object.defineProperty;var Hz0=(a,t,I1)=>t in a?xz0(a,t,{enumerable:!0,configurable:!0,writable:!0,value:I1}):a[t]=I1;var e0=(a,t,I1)=>Hz0(a,typeof t!="symbol"?t+"":t,I1);function c3(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const r=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(l,c,r.get?r:{enumerable:!0,get:()=>e[c]})}}return l.default=e,Object.freeze(l)}const P2=c3(cZ),d2=c3(iZ),h1=c3(sZ),r3=({children:e,isOpen:l=!1,preventInitialAnimation:c=!1,animateOpacity:r=!0,"data-test-id":i="collapsible-wrap"})=>t.jsx(U0.AnimatePresence,{initial:c?!1:void 0,children:l&&e&&t.jsx(U0.motion.div,{initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{height:"auto",overflow:"hidden",opacity:1,transitionEnd:{overflow:"visible"}},collapsed:{height:0,overflow:"hidden",opacity:r?0:1}},transition:{type:"tween"},"data-test-id":i,children:e})});r3.displayName="FondueCollapsibleWrap";const v=e=>e.filter(Boolean).join(" "),f4=(...e)=>{const l=e.filter(Boolean);return l.length<=1?l[0]??null:function(r){for(const i of l)typeof i=="function"?i(r):i&&(i.current=r)}},L0="tw-ring-4 tw-ring-blue tw-ring-offset-2 dark:tw-ring-offset-black tw-outline-none",B1="tw-ring-4 tw-ring-blue dark:tw-ring-offset-black tw-outline-none",M0="focus-visible:tw-ring-4 focus-visible:tw-ring-blue focus-visible:tw-ring-offset-2 focus-visible:dark:tw-ring-offset-black focus-visible:tw-outline-none",i3=v([L0,"tw-ring-inset"]),m4=v([M0,"tw-ring-inset"]),gZ="focus-within:tw-ring-4 focus-within:tw-ring-blue focus-within:tw-ring-offset-2 focus-within:dark:tw-ring-offset-black focus-within:tw-outline-none";var n=(e=>(e.Size12="Size12",e.Size16="Size16",e.Size20="Size20",e.Size24="Size24",e.Size32="Size32",e))(n||{});const CZ={Size12:"!tw-h-3 !tw-w-3",Size16:"!tw-h-4 !tw-w-4",Size20:"!tw-h-5 !tw-w-5",Size24:"!tw-h-6 !tw-w-6",Size32:"!tw-h-8 !tw-w-8",16:"!tw-h-4 !tw-w-4",20:"!tw-h-5 !tw-w-5",24:"!tw-h-6 !tw-w-6"};function IZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:12,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCaretDown12","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.796 3.322a.5.5 0 0 1 0 .707L6.353 8.472l-.354.354-.353-.354L1.204 4.03a.5.5 0 0 1 .707-.707L6 7.412l4.09-4.09a.5.5 0 0 1 .707 0",clipRule:"evenodd"})})}const s3=o.memo(IZ);function NZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCaretDown16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.868 4.785a.5.5 0 0 1 0 .707l-5.515 5.516-.354.353-.353-.353-5.514-5.514a.5.5 0 0 1 .707-.707L8 9.947l5.162-5.162a.5.5 0 0 1 .707 0",clipRule:"evenodd"})})}const d3=o.memo(NZ);function zZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCaretDown20","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.804 6.192a.75.75 0 0 1 0 1.06l-6.245 6.246-.53.53-.531-.53-6.246-6.245a.75.75 0 0 1 1.06-1.061l5.716 5.715 5.716-5.715a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})})}const v4=o.memo(zZ);function MZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCaretDown24","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M19.78 7.69a.75.75 0 0 1 0 1.06L12.53 16l-.53.53-.53-.53-7.25-7.25a.75.75 0 0 1 1.06-1.06L12 14.41l6.72-6.72a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})})}const g4=o.memo(MZ);function SZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCaretDown32","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M25.784 10.558a1 1 0 0 1 0 1.414l-9.07 9.07-.707.707-.707-.707-9.084-9.084a1 1 0 1 1 1.414-1.415l8.377 8.378 8.363-8.363a1 1 0 0 1 1.414 0",clipRule:"evenodd"})})}const C4=o.memo(SZ),I4=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&!e.filled&&t.jsx(s3,{...e}),l===n.Size16&&!e.filled&&t.jsx(d3,{...e}),l===n.Size20&&!e.filled&&t.jsx(v4,{...e}),l===n.Size24&&!e.filled&&t.jsx(g4,{...e}),l===n.Size32&&!e.filled&&t.jsx(C4,{...e})]})};I4.displayName="FondueIconCaretDown";const D1=o.memo(I4),N4="fondue-accordion-header-icon",AZ={small:n.Size12,medium:n.Size16,large:n.Size20},h3=({size:e="medium",isOpen:l,"data-test-id":c=N4})=>t.jsx("span",{"data-test-id":`${c}-wrapper`,className:"tw-block",children:t.jsx("span",{"data-test-id":c,className:v(["tw-block tw-transition-transform",l&&"tw-rotate-180 tw-duration-300"]),children:t.jsx(D1,{size:AZ[e]})})});h3.displayName="FondueAccordionHeaderIcon";const z4="fondue-accordion-header",w3=({isOpen:e=!1,decorator:l,disabled:c=!1,children:r,"data-test-id":i=z4})=>{const[s,d]=o.useState(null),h=t.jsx(h3,{isOpen:e});return t.jsx("span",{"data-test-id":i,className:"tw-block tw-px-8 tw-py-6",children:t.jsxs("span",{"data-test-id":`${i}-container`,role:"navigation","aria-label":`${(s==null?void 0:s.innerText)||""}`,className:v(["tw-flex tw-items-center tw-gap-x-1.5 tw-w-full tw-flex-row",!c&&e&&"tw-text-text",!c&&!e&&"tw-text-text-weak hover:tw-text-text",c&&"tw-text-text-disabled"]),children:[o.isValidElement(l)&&t.jsx("span",{"data-test-id":`${i}-decorator`,className:"tw-shrink-0 tw-leading-4",children:o.cloneElement(l,{size:n.Size16})}),t.jsx("span",{ref:d,"data-test-id":`${i}-text`,className:"tw-text-left tw-text-m tw-font-normal",children:r}),h&&t.jsx("span",{"data-test-id":`${i}-icon-container`,className:"tw-ml-auto tw-shrink-0",children:h})]})})};w3.displayName="FondueAccordionHeader";const yZ="fondue-accordion",M4="fondue-accordion-item",bZ=({item:e,state:l,header:c,padding:r=!0,divider:i=!1,headerComponent:s=w3,"data-test-id":d=M4})=>{var N,M;const{active:h,...w}=c,L=o.useRef(null),{buttonProps:u,regionProps:f}=I1.useAccordionItem({item:e},l,L),m=l.expandedKeys.has(e.key),{isFocusVisible:g,focusProps:C}=J.useFocusRing();return t.jsxs("div",{className:v([g?`${B1} tw-relative tw-rounded`:"",i&&"tw-divide-y tw-divide-black-10"]),children:[t.jsx("button",{...x0.mergeProps(u,C),"data-test-id":d,ref:L,onClick:I=>{c.onClick&&c.onClick(),u.onClick&&u.onClick(I)},onKeyUp:I=>{c.onClick&&I.key==="Enter"&&c.onClick(),u.onKeyUp&&u.onKeyUp(I)},className:"tw-w-full focus-visible:tw-outline-none",children:t.jsx(s,{isOpen:m,...w})}),t.jsx(r3,{isOpen:m,preventInitialAnimation:h,children:t.jsx("div",{...f,className:v([r&&"tw-px-8 tw-pb-6","tw-mt-2"]),children:(M=(N=e.props).children)==null?void 0:M.call(N)})})]},e.key)},xZ=e=>{const l=o.Children.map(e,(r,i)=>{const{header:s,children:d}=r.props;return t.jsx(X5.Item,{textValue:s.children,children:d?()=>d:null},i)}),c=l.map(r=>r.key).filter((r,i)=>{var s,d;return r&&!!((d=(s=e[i])==null?void 0:s.props.header)!=null&&d.active)})||[];return{children:l,defaultExpandedKeys:c}},HZ=({children:e})=>o.Children.toArray(e).reduce((l,c)=>o.isValidElement(c)&&!c.props.header?(console.warn("Use `AccordionItem` as children of `Accordion` and set the `header` prop accordingly."),l):(o.isValidElement(c)&&l.push(c),l),[]),S4=({children:e})=>t.jsx(t.Fragment,{children:e});S4.displayName="FondueAccordionItem";const pZ=e=>{var c,r,i;const l=o.Children.toArray(e);return((i=(r=(c=l[l.length-1])==null?void 0:c.props)==null?void 0:r.header)==null?void 0:i.active)===!0},A4=e=>{const{divider:l=!0,border:c=!0,"data-test-id":r=yZ}=e,i=HZ(e),s=xZ(i),d=o.useRef(null),h=c4.useTreeState(s),w=o.useRef({firstRender:!0,childLength:o.Children.toArray(e.children).length}),L=o.Children.toArray(e.children).length;o.useEffect(()=>{pZ(e.children)&&!w.current.firstRender&&o.Children.toArray(e.children).length>w.current.childLength&&h.toggleKey(s.defaultExpandedKeys[s.defaultExpandedKeys.length-1]),w.current={firstRender:!1,childLength:o.Children.toArray(e.children).length}},[s.defaultExpandedKeys,L,e.children,h]);const{accordionProps:{onMouseDown:u,onKeyDown:f,...m}}=I1.useAccordion({...s,disallowTypeAhead:!0},h,d),C={...m,onKeyDown:N=>{const M=N.target.dataset.key,I=h.selectionManager.focusedKey===M;M&&I&&(f==null||f(N))}};return t.jsx("div",{...C,ref:d,"data-test-id":r,className:v([l&&"tw-divide-y tw-divide-black-10",c&&"tw-border-t tw-border-b tw-border-black-10"]),children:[...h.collection].map((N,M)=>{const{header:I,padding:S,headerComponent:A,divider:y,"data-test-id":H=M4}=i[M].props;return t.jsx(bZ,{item:N,state:h,divider:y,header:I,padding:S,headerComponent:A,"data-test-id":H},N.key)})})};A4.displayName="FondueAccordion";const L3=o.forwardRef(({ariaProps:e,children:l,scrollable:c=!1,border:r=!0},i)=>t.jsx("ul",{...e,ref:i,className:v(["tw-list-none tw-p-0 tw-m-0 tw-bg-base tw-z-20 focus-visible:tw-outline-none",r&&"tw-border tw-border-line tw-rounded",c&&"tw-overflow-y-auto"]),children:l}));L3.displayName="FondueAriaList";var K0=(e=>(e.Primary="Primary",e.Danger="Danger",e.Warning="Warning",e))(K0||{}),O1=(e=>(e.Check="Check",e.CaretRight="CaretRight",e.None="None",e))(O1||{}),p0=(e=>(e.XSmall="XSmall",e.Small="Small",e.Large="Large",e))(p0||{}),y4=(e=>(e.Primary="Primary",e.Danger="Danger",e))(y4||{});const b4={[p0.XSmall]:"tw-pr-1.5",[p0.Small]:"tw-pr-1.5",[p0.Large]:"tw-pr-2"},h2=({title:e,decorator:l,switchComponent:c,subtitle:r,ariaProps:i,size:s=p0.Small,children:d})=>t.jsxs("div",{...i,"data-test-id":"menu-item-content",className:"tw-flex tw-box-border tw-items-center tw-font-sans tw-text-s tw-flex-auto tw-min-w-0",children:[l&&t.jsx("span",{className:v(["tw-shrink-0",b4[s]]),"data-test-id":"menu-item-decorator",children:o.cloneElement(l,{size:s===p0.Large?n.Size24:n.Size16})}),t.jsxs("div",{className:"tw-flex-1 tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap",children:[t.jsx("div",{"data-test-id":"menu-item-title",className:"tw-select-none tw-text-ellipsis tw-overflow-hidden",title:typeof e=="string"?e:"",children:d||e}),r&&s===p0.Large&&t.jsx("div",{"data-test-id":"menu-item-subtitle",className:"tw-select-none tw-text-xxs",title:r,children:r})]}),c&&t.jsx("span",{className:v(["tw-shrink-0",b4[s]]),"data-test-id":"menu-item-decorator",children:c})]});h2.displayName="FondueMenuItemContent";function kZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:12,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCaretRight12","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.321 1.204a.5.5 0 0 1 .707 0l4.444 4.444.353.353-.353.354-4.442 4.442a.5.5 0 1 1-.707-.708L7.41 6.001l-4.09-4.09a.5.5 0 0 1 0-.707",clipRule:"evenodd"})})}const x4=o.memo(kZ);function TZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCaretRight16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.785 2.132a.5.5 0 0 1 .707 0l5.516 5.515.353.354-.353.353-5.514 5.514a.5.5 0 1 1-.707-.707L9.947 8 4.785 2.839a.5.5 0 0 1 0-.707",clipRule:"evenodd"})})}const H4=o.memo(TZ);function VZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCaretRight20","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.22 3.225a.75.75 0 0 1 1.06 0l6.246 6.245.53.53-.53.531-6.246 6.246a.75.75 0 1 1-1.06-1.06L11.935 10 6.22 4.285a.75.75 0 0 1 0-1.06",clipRule:"evenodd"})})}const p4=o.memo(VZ);function FZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCaretRight24","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.69 4.22a.75.75 0 0 1 1.06 0L16 11.47l.53.53-.53.53-7.25 7.25a.75.75 0 0 1-1.06-1.06L14.41 12 7.69 5.28a.75.75 0 0 1 0-1.06",clipRule:"evenodd"})})}const k4=o.memo(FZ);function $Z(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCaretRight32","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.558 6.223a1 1 0 0 1 1.414 0l9.07 9.07.707.707-.707.707-9.084 9.085a1 1 0 0 1-1.415-1.415L18.921 16l-8.363-8.363a1 1 0 0 1 0-1.414",clipRule:"evenodd"})})}const T4=o.memo($Z),V4=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&!e.filled&&t.jsx(x4,{...e}),l===n.Size16&&!e.filled&&t.jsx(H4,{...e}),l===n.Size20&&!e.filled&&t.jsx(p4,{...e}),l===n.Size24&&!e.filled&&t.jsx(k4,{...e}),l===n.Size32&&!e.filled&&t.jsx(T4,{...e})]})};V4.displayName="FondueIconCaretRight";const j2=o.memo(V4);function PZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:12,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCheckMark12","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.73 2.646a.5.5 0 0 1 0 .708L4.477 9.607l-.354.353-.353-.353-2.278-2.279a.5.5 0 0 1 .707-.707l1.924 1.925 5.9-5.9a.5.5 0 0 1 .707 0",clipRule:"evenodd"})})}const F4=o.memo(PZ);function jZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCheckMark16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.17 3.896a.5.5 0 0 1 0 .708l-7.253 7.253-.353.353-.354-.353-2.564-2.565a.5.5 0 1 1 .707-.707l2.21 2.21 6.9-6.899a.5.5 0 0 1 .708 0",clipRule:"evenodd"})})}const u3=o.memo(jZ);function BZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCheckMark20","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.845 5.034a.75.75 0 0 1 0 1.06l-8.96 8.96-.53.531-.53-.53L3.26 11.49a.75.75 0 1 1 1.06-1.061l3.034 3.034 8.43-8.43a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})})}const f3=o.memo(BZ);function DZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCheckMark24","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.395 5.833a.75.75 0 0 1 0 1.061l-10.96 10.96-.531.53-.53-.53L4.01 13.49a.75.75 0 0 1 1.06-1.06l3.834 3.833 10.43-10.43a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})})}const $4=o.memo(DZ);function OZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconCheckMark32","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M25.43 9.391a1 1 0 0 1 0 1.414L13.056 23.18l-.708.707-.707-.707-5.07-5.071a1 1 0 0 1 1.413-1.415l4.364 4.364L24.016 9.391a1 1 0 0 1 1.414 0",clipRule:"evenodd"})})}const P4=o.memo(OZ),j4=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&!e.filled&&t.jsx(F4,{...e}),l===n.Size16&&!e.filled&&t.jsx(u3,{...e}),l===n.Size20&&!e.filled&&t.jsx(f3,{...e}),l===n.Size24&&!e.filled&&t.jsx($4,{...e}),l===n.Size32&&!e.filled&&t.jsx(P4,{...e})]})};j4.displayName="FondueIconCheckMark";const M1=o.memo(j4),m3=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(':not([hidden]):not([tabindex="-1"]),'),B2=(e,l)=>e?"a":l?"button":"span",D2=e=>e?(e.querySelectorAll(m3)??[]).length>0:!1,B4={[p0.XSmall]:"tw-px-5 tw-py-2 tw-min-h-[36px]",[p0.Small]:"tw-px-5 tw-py-2.5 tw-min-h-[36px]",[p0.Large]:"tw-px-5 tw-py-3 tw-min-h-[60px]"};var w2=(e=>(e.Default="Default",e.Active="Active",e.Disabled="Disabled",e))(w2||{});const v3={[K0.Primary]:{Default:"tw-text-text-x-weak",Active:"tw-text-text",Disabled:"tw-text-text-disabled"},[K0.Danger]:{Default:"tw-text-red-60",Active:"tw-text-red-70",Disabled:"tw-text-text-disabled"},[K0.Warning]:{Default:"tw-text-text-warning",Active:"tw-text-yellow-90",Disabled:"tw-text-text-disabled"}},ZZ={[K0.Primary]:"hover:tw-text-text",[K0.Danger]:"hover:tw-text-text-negative",[K0.Warning]:"hover:tw-text-text-warning"},D4="tw-cursor-pointer tw-flex tw-items-center tw-justify-between tw-transition-colors tw-gap-2",g3=v(["tw-w-full tw-text-left tw-py-2 tw-px-5 tw-rounded","hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover"]),_Z="tw-bg-box-selected",L2=({title:e,decorator:l,switchComponent:c,subtitle:r,size:i=p0.Small,style:s=K0.Primary,disabled:d=!1,active:h=!1,checked:w=!1,selectionIndicator:L=O1.Check,children:u,link:f,onBlur:m,onClick:g,onFocus:C,onMouseEnter:N,onMouseOut:M,onMouseOver:I,onMouseLeave:S,"data-test-id":A="menu-item"})=>{const y=i===p0.XSmall?n.Size16:n.Size20,H={[O1.CaretRight]:t.jsx(j2,{"data-test-id":`${A}-caret`,size:y}),[O1.Check]:h&&t.jsx(M1,{"data-test-id":`${A}-active`,size:y}),[O1.None]:null}[L],{isFocusVisible:p,focusProps:x}=J.useFocusRing();let z="Default";d?z="Disabled":h&&(z="Active");const F=v3[s][z],k=B2(f,g);return t.jsxs(t.Fragment,{children:[u&&t.jsxs("li",{"data-test-id":A,role:"menuitem",className:v(["tw-text-sm tw-leading-4 tw-text-text-weak",D4,w?_Z:""]),children:[k==="a"&&t.jsx("a",{href:f,className:v([g3,p&&B1]),onBlur:m,onClick:g,onFocus:C,onMouseEnter:N,onMouseLeave:S,onMouseOut:M,onMouseOver:I,...x,children:u}),k==="button"&&t.jsx("button",{type:"button",disabled:d,className:v([g3,p&&B1]),onBlur:m,onClick:g,onFocus:C,onMouseEnter:N,onMouseLeave:S,onMouseOut:M,onMouseOver:I,...x,children:u}),k==="span"&&t.jsx("span",{className:g3,children:u})]}),!u&&t.jsxs("div",{className:v([D4,ZZ[s],B4[i],d&&"tw-bg-box-disabled tw-pointer-events-none",h&&"tw-font-medium",F]),children:[t.jsx(h2,{title:e,decorator:l,subtitle:i===p0.Large?r:void 0,size:i,switchComponent:c}),t.jsx("div",{className:"tw-flex-none",children:H})]})]})};L2.displayName="FondueMenuItem";var u2=(e=>(e.Medium="Medium",e.Full="Full",e))(u2||{}),t0=(e=>(e.Default="Default",e.Positive="Positive",e.Negative="Negative",e.Danger="Danger",e.Loud="Loud",e.Primary="Primary",e.Secondary="Secondary",e))(t0||{}),O4=(e=>(e.Default="Default",e.Positive="Positive",e.Negative="Negative",e.Danger="Danger",e.Loud="Loud",e))(O4||{}),h0=(e=>(e.Small="Small",e.Medium="Medium",e.Large="Large",e))(h0||{}),Z1=(e=>(e.Button="Button",e.Submit="Submit",e.Reset="Reset",e))(Z1||{}),u0=(e=>(e.Default="Default",e.Weak="Weak",e.Strong="Strong",e))(u0||{});const UZ={[h0.Small]:n.Size16,[h0.Medium]:n.Size20,[h0.Large]:n.Size24},qZ={[Z1.Button]:"button",[Z1.Submit]:"submit",[Z1.Reset]:"reset"};function O2(e){const l=o.useRef(null);return o.useEffect(()=>{e&&(typeof e=="function"?e(l.current):e.current=l.current)}),l}const WZ="tw-group tw-border tw-box-box tw-relative tw-flex tw-items-center tw-justify-center tw-cursor-pointer tw-outline-none tw-font-body tw-font-medium ",GZ="tw-not-allowed tw-pointer-events-none tw-border-transparent tw-text-box-disabled-inverse tw-bg-box-disabled ",KZ={[u2.Medium]:"tw-rounded",[u2.Full]:"tw-rounded-full"},Z4={[h0.Small]:{default:"tw-px-2 tw-h-6 tw-text-body-small ",iconOnly:"tw-h-6 tw-w-6 "},[h0.Medium]:{default:"tw-px-4 tw-h-9 tw-text-body-medium ",iconOnly:"tw-h-9 tw-w-9 "},[h0.Large]:{default:"tw-px-6 tw-h-12 tw-text-body-large ",iconOnly:"tw-h-12 tw-w-12 "}},QZ={[h0.Small]:"tw--ml-0.5 tw-mr-1 ",[h0.Medium]:"tw--ml-1 tw-mr-1.5 ",[h0.Large]:"tw--ml-1 tw-mr-2 "},XZ={[t0.Default]:{button:"tw-border-transparent hover:tw-bg-button-background-hover hover:tw-border-button-border active:tw-bg-button-background-pressed ",icon:"tw-text-button-icon group-hover:tw-text-button-icon-hover group-active:tw-text-button-icon-pressed tw-leading-none ",text:"tw-text-button-text group-hover:tw-text-button-text-hover group-active:tw-text-button-text-pressed "},[t0.Positive]:{button:"tw-border-transparent hover:tw-bg-button-positive-background-hover hover:tw-border-button-positive-border active:tw-bg-button-positive-background-pressed ",icon:"tw-text-button-strong-positive-icon group-hover:tw-text-button-strong-positive-icon-hovergroup-active:tw-text-button-strong-positive-icon-pressed tw-leading-none ",text:"tw-text-button-positive-text group-hover:tw-text-button-positive-text-hover group-active:tw-text-button-positive-text-pressed "},[t0.Negative]:{button:"tw-border-transparent hover:tw-bg-button-negative-background-hover hover:tw-border-button-negative-border active:tw-bg-button-negative-background-pressed ",icon:"tw-text-button-negative-icon group-hover:tw-text-button-negative-icon-hovergroup-active:tw-text-button-negative-icon-pressed tw-leading-none ",text:"tw-text-button-negative-text group-hover:tw-text-button-negative-text-hovergroup-active:tw-text-button-negative-text-pressed "},[t0.Danger]:{button:"tw-border-transparent hover:tw-bg-button-background-hover active:tw-bg-button-background-pressed ",icon:"tw-text-button-negative-icon group-hover:tw-text-button-negative-icon-hovergroup-active:tw-text-button-negative-icon-pressed tw-leading-none ",text:"tw-text-button-negative-icon group-hover:tw-text-button-negative-icon-hovergroup-active:tw-text-button-negative-icon-pressed "},[t0.Loud]:{button:"tw-border-transparent hover:tw-bg-box-selected-hover active:tw-bg-box-selected-pressed ",icon:"tw-text-box-selected-inverse group-hover:tw-text-box-selected-inverse-hovergroup-active:tw-text-box-selected-inverse-pressed tw-leading-none ",text:"tw-text-box-selected-inverse group-hover:tw-text-box-selected-inverse-hovergroup-active:tw-text-box-selected-inverse-pressed "}},YZ={[u0.Default]:{[t0.Default]:{button:"tw-bg-button-background tw-border-button-border hover:tw-bg-button-background-hover active:tw-bg-button-background-pressed ",icon:"tw-text-button-icon group-hover:tw-text-button-icon-hover group-active:tw-text-button-icon-pressed tw-leading-none ",text:"tw-text-button-text group-hover:tw-text-button-text-hover group-active:tw-text-button-text-pressed "},[t0.Positive]:{button:"tw-bg-button-positive-background tw-border-button-positive-border hover:tw-bg-button-positive-background-hover active:tw-bg-button-positive-background-pressed ",icon:"tw-text-button-positive-icon group-hover:tw-text-button-positive-icon-hover group-active:tw-text-button-positive-icon-pressed tw-leading-none ",text:"tw-text-button-positive-text group-hover:tw-text-button-positive-text-hover group-active:tw-text-button-positive-text-pressed "},[t0.Negative]:{button:"tw-bg-button-negative-background tw-border-button-negative-border hover:tw-bg-button-negative-background-hover active:tw-bg-button-negative-background-pressed ",icon:"tw-text-button-negative-icon group-hover:tw-text-button-negative-icon-hovergroup-active:tw-text-button-negative-icon-pressed tw-leading-none ",text:"tw-text-button-negative-text group-hover:tw-text-button-negative-text-hovergroup-active:tw-text-button-negative-text-pressed "},[t0.Danger]:{button:"tw-bg-button-background tw-border-button-border hover:tw-bg-button-background-hover active:tw-bg-button-background-pressed ",icon:"tw-text-button-negative-icon group-hover:tw-text-button-negative-icon-hovergroup-active:tw-text-button-negative-icon-pressed tw-leading-none ",text:"tw-text-button-negative-icon group-hover:tw-text-button-negative-icon-hovergroup-active:tw-text-button-negative-icon-pressed "},[t0.Loud]:{button:"tw-bg-box-selected tw-border-button-border hover:tw-bg-box-selected-hover active:tw-bg-box-selected-pressed ",icon:"tw-text-box-selected-inverse group-hover:tw-text-box-selected-inverse-hovergroup-active:tw-text-box-selected-inverse-pressed tw-leading-none ",text:"tw-text-box-selected-inverse group-hover:tw-text-box-selected-inverse-hovergroup-active:tw-text-box-selected-inverse-pressed "}},[u0.Strong]:{[t0.Default]:{button:"tw-bg-button-strong-background tw-border-button-strong-border hover:tw-bg-button-strong-background-hover active:tw-bg-button-strong-background-pressed ",icon:"tw-text-button-strong-icon group-hover:tw-text-button-strong-icon-hover group-active:tw-text-button-strong-icon-pressed tw-leading-none ",text:"tw-text-button-strong-icon group-hover:tw-text-button-strong-icon-hover group-active:tw-text-button-strong-text-pressed "},[t0.Positive]:{button:"tw-bg-button-strong-positive-background tw-border-button-strong-positive-border hover:tw-bg-button-strong-positive-background-hover active:tw-bg-button-strong-positive-background-pressed ",icon:"tw-text-button-strong-positive-icon group-hover:tw-text-button-strong-positive-icon-hover group-active:tw-text-button-strong-positive-icon-pressed tw-leading-none ",text:"tw-text-button-strong-positive-text group-hover:tw-text-button-strong-positive-text-hover group-active:tw-text-button-strong-positive-text-pressed "},[t0.Negative]:{button:"tw-bg-button-strong-negative-background tw-border-button-strong-negative-border hover:tw-bg-button-strong-negative-background-hover active:tw-bg-button-strong-negative-background-pressed ",icon:"tw-text-button-strong-negative-icon group-hover:tw-text-button-strong-negative-icon-hovergroup-active:tw-text-button-strong-negative-icon-pressed tw-leading-none ",text:"tw-text-button-strong-negative-text group-hover:tw-text-button-strong-negative-text-hovergroup-active:tw-text-button-strong-negative-text-pressed "},[t0.Danger]:{button:"tw-bg-button-danger-background tw-border-button-danger-border hover:tw-bg-button-danger-background-hover active:tw-bg-button-danger-background-pressed ",icon:"tw-text-button-danger-icon group-hover:tw-text-button-danger-icon-hovergroup-active:tw-text-button-danger-icon-pressed tw-leading-none ",text:"tw-text-button-danger-text group-hover:tw-text-button-danger-text-hovergroup-active:tw-text-button-danger-text-pressed "},[t0.Loud]:{button:"tw-bg-box-selected-strong tw-border-box-selected-strong hover:tw-bg-box-selected-strong-hover active:tw-bg-box-selected-strong-pressed ",icon:"tw-text-box-selected-strong-inverse group-hover:tw-text-box-selected-strong-inversegroup-active:tw-text-box-selected-strong-inverse tw-leading-none ",text:"tw-text-box-selected-strong-inverse group-hover:tw-text-box-selected-strong-inversegroup-active:tw-text-box-selected-strong-inverse "}},[u0.Weak]:XZ},JZ=({type:e=Z1.Button,title:l="",style:c=t0.Default,size:r=h0.Medium,rounding:i=u2.Medium,emphasis:s=u0.Strong,hideLabel:d=!1,disabled:h=!1,icon:w,children:L,onClick:u,hugWidth:f=!0,"aria-label":m,"aria-describedby":g,formId:C,solid:N,inverted:M,"data-test-id":I="button"},S)=>{c===t0.Primary?(c=t0.Default,s=u0.Strong):c===t0.Secondary&&(c=t0.Default,s=u0.Default),N===!1&&(s=u0.Weak);const A=O2(S),{buttonProps:y}=G0.useButton({onPress:()=>u&&u(),isDisabled:h,type:qZ[e]},A),{isFocusVisible:H,focusProps:p}=J.useFocusRing(),x=F=>h?GZ:`${YZ[s][c][F]}`,z=v([x("button"),WZ,KZ[i],w&&!L||d?Z4[r].iconOnly:Z4[r].default,!f&&"tw-w-full"]);return t.jsxs("button",{"data-test-id":I,"aria-label":m,"aria-disabled":h,"aria-describedby":g,ref:A,className:v([z,M&&"tw-dark",H&&M0]),disabled:h,form:C,title:l,...y,...p,children:[w&&t.jsx("span",{"data-test-id":`${I}-icon`,className:v([L&&!d?QZ[r]:"",x("icon")]),children:o.cloneElement(w,{size:UZ[r]})}),L&&t.jsx("span",{"data-test-id":`${I}-text`,className:v([x("text"),d&&"tw-sr-only"]),children:L})]})},S0=o.forwardRef(JZ);S0.displayName="FondueButton";const f2=({container:e=document.body,children:l})=>$1.createPortal(l,e);f2.displayName="FonduePortal";const S1=()=>`id-${window.crypto.getRandomValues(new Uint32Array(1))}`,I0=e=>o.useMemo(()=>e||S1(),[e]);function EZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:12,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconDocument12","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.917 1H2.5a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5V5.083H5.917zm3.958 3.083a1 1 0 0 0-.197-.25l-2.761-2.55v2.8zM2.5 12h7a1.5 1.5 0 0 0 1.5-1.5V4.568a2 2 0 0 0-.643-1.47L7.575.53A2 2 0 0 0 6.218 0H2.5A1.5 1.5 0 0 0 1 1.5v9A1.5 1.5 0 0 0 2.5 12",clipRule:"evenodd"})})}const _4=o.memo(EZ);function RZ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconDocument16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13 13a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h4v5h5zm-.02-7H9V2.175a1 1 0 0 1 .102.08l.668-.743-.668.744 3.566 3.2A1 1 0 0 1 12.98 6m.356-1.288-3.566-3.2A2 2 0 0 0 8.434 1H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V6.2a2 2 0 0 0-.664-1.488",clipRule:"evenodd"})})}const U4=o.memo(RZ);function e_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconDocument20","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.5 17.5h-9a1 1 0 0 1-1-1v-13a1 1 0 0 1 1-1h4.507v5.993H15.5V16.5a1 1 0 0 1-1 1m.826-10.507-3.82-3.778v3.778zM5.5 19h9a2.5 2.5 0 0 0 2.5-2.5V7.373a2 2 0 0 0-.594-1.422l-4.422-4.373A2 2 0 0 0 10.578 1H5.5A2.5 2.5 0 0 0 3 3.5v13A2.5 2.5 0 0 0 5.5 19",clipRule:"evenodd"})})}const q4=o.memo(e_);function t_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconDocument24","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M17 20.5H7A1.5 1.5 0 0 1 5.5 19V5A1.5 1.5 0 0 1 7 3.5h5.01v7h6.49V19a1.5 1.5 0 0 1-1.5 1.5M18.5 9a.5.5 0 0 0-.153-.355l-4.836-4.65V9zm.886-1.436-5.205-5.006A2 2 0 0 0 12.794 2H7a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3V9.005a2 2 0 0 0-.614-1.441",clipRule:"evenodd"})})}const W4=o.memo(t_);function l_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconDocument32","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 25a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h6v8h8zM18 5.828V11h5.172zM10 29h12a4 4 0 0 0 4-4V11.828a2 2 0 0 0-.586-1.414l-6.828-6.828A2 2 0 0 0 17.172 3H10a4 4 0 0 0-4 4v18a4 4 0 0 0 4 4",clipRule:"evenodd"})})}const G4=o.memo(l_),K4=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&!e.filled&&t.jsx(_4,{...e}),l===n.Size16&&!e.filled&&t.jsx(U4,{...e}),l===n.Size20&&!e.filled&&t.jsx(q4,{...e}),l===n.Size24&&!e.filled&&t.jsx(W4,{...e}),l===n.Size32&&!e.filled&&t.jsx(G4,{...e})]})};K4.displayName="FondueIconDocument";const Q4=o.memo(K4);function a_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:12,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkCircle12Filled","aria-hidden":"true",...e,children:t.jsxs("g",{fill:"none",children:[t.jsx("g",{clipPath:"url(#ExclamationMarkCircle12Filled)",children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12M6 2a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0v-4A.5.5 0 0 1 6 2m1 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"ExclamationMarkCircle12Filled",children:t.jsx("path",{fill:"#fff",d:"M0 0h12v12H0z"})})})]})})}const X4=o.memo(a_);function o_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:12,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkCircle12","aria-hidden":"true",...e,children:t.jsxs("g",{fill:"none",children:[t.jsx("g",{clipPath:"url(#ExclamationMarkCircle12)",children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11 6A5 5 0 1 1 1 6a5 5 0 0 1 10 0m1 0A6 6 0 1 1 0 6a6 6 0 0 1 12 0M6 2a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0v-4A.5.5 0 0 1 6 2m1 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"ExclamationMarkCircle12",children:t.jsx("path",{fill:"#fff",d:"M0 0h12v12H0z"})})})]})})}const Y4=o.memo(o_);function n_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkCircle16Filled","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 14.978a7 7 0 1 0 0-14 7 7 0 0 0 0 14M7.5 8.5v-4a.5.5 0 0 1 1 0v4a.5.5 0 0 1-1 0M9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})})}const J4=o.memo(n_);function c_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkCircle16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7.978a6 6 0 1 1-12 0 6 6 0 0 1 12 0m1 0a7 7 0 1 1-14 0 7 7 0 0 1 14 0M7.5 8.5v-4a.5.5 0 0 1 1 0v4a.5.5 0 0 1-1 0M9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})})}const E4=o.memo(c_);function r_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkCircle20Filled","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 19a9 9 0 1 0 0-18 9 9 0 0 0 0 18m-.75-8V5.5a.75.75 0 0 1 1.5 0V11a.75.75 0 0 1-1.5 0M11 14a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})})}const R4=o.memo(r_);function i_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkCircle20","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M17.5 10a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0m1.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0m-9.75 1V5.5a.75.75 0 0 1 1.5 0V11a.75.75 0 0 1-1.5 0M11 14a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})})}const e6=o.memo(i_);function s_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkCircle24Filled","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10m-.75-8.747v-6.5a.75.75 0 0 1 1.5 0v6.5a.75.75 0 0 1-1.5 0m2 3.497a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0",clipRule:"evenodd"})})}const t6=o.memo(s_);function d_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkCircle24","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.5 12a8.5 8.5 0 1 1-17 0 8.5 8.5 0 0 1 17 0m1.5 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10m-10.75 1.252v-6.5a.75.75 0 0 1 1.5 0v6.5a.75.75 0 0 1-1.5 0m2 3.498a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0",clipRule:"evenodd"})})}const l6=o.memo(d_);function h_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkCircle32Filled","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16 28c6.627 0 12-5.373 12-12S22.627 4 16 4 4 9.373 4 16s5.373 12 12 12m-1-10.5V10a1 1 0 1 1 2 0v7.5a1 1 0 1 1-2 0m2.5 4a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0",clipRule:"evenodd"})})}const a6=o.memo(h_);function w_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkCircle32","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M26 16c0 5.523-4.477 10-10 10S6 21.523 6 16 10.477 6 16 6s10 4.477 10 10m2 0c0 6.627-5.373 12-12 12S4 22.627 4 16 9.373 4 16 4s12 5.373 12 12m-13 1.5V10a1 1 0 1 1 2 0v7.5a1 1 0 1 1-2 0m2.5 4a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0",clipRule:"evenodd"})})}const o6=o.memo(w_),n6=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&e.filled&&t.jsx(X4,{...e}),l===n.Size12&&!e.filled&&t.jsx(Y4,{...e}),l===n.Size16&&e.filled&&t.jsx(J4,{...e}),l===n.Size16&&!e.filled&&t.jsx(E4,{...e}),l===n.Size20&&e.filled&&t.jsx(R4,{...e}),l===n.Size20&&!e.filled&&t.jsx(e6,{...e}),l===n.Size24&&e.filled&&t.jsx(t6,{...e}),l===n.Size24&&!e.filled&&t.jsx(l6,{...e}),l===n.Size32&&e.filled&&t.jsx(a6,{...e}),l===n.Size32&&!e.filled&&t.jsx(o6,{...e})]})};n6.displayName="FondueIconExclamationMarkCircle";const c6=o.memo(n6);function L_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:12,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkTriangle12","aria-hidden":"true",...e,children:t.jsxs("g",{fill:"none",children:[t.jsx("g",{clipPath:"url(#ExclamationMarkTriangle12)",children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.759 1.697C7.002.3 4.998.3 4.24 1.697L.26 9.047C-.462 10.38.503 12 2.018 12h7.964c1.515 0 2.48-1.62 1.758-2.953zm-2.638.476a1 1 0 0 1 1.758 0l3.982 7.35A1 1 0 0 1 9.98 11H2.019a1 1 0 0 1-.879-1.476zM6 3.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0V4a.5.5 0 0 1 .5-.5M6.75 9a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0",clipRule:"evenodd"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"ExclamationMarkTriangle12",children:t.jsx("path",{fill:"#fff",d:"M0 0h12v12H0z"})})})]})})}const r6=o.memo(L_);function u_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkTriangle16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.76 2.716c-.754-1.403-2.766-1.403-3.521 0L1.75 11.052C1.033 12.384 1.998 14 3.511 14h8.977c1.514 0 2.479-1.616 1.761-2.948zm-2.64.474a1 1 0 0 1 1.76 0l4.489 8.336a1 1 0 0 1-.88 1.474H3.51a1 1 0 0 1-.88-1.474zM7.5 9V6a.5.5 0 0 1 1 0v3a.5.5 0 1 1-1 0m1.25 2.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0",clipRule:"evenodd"})})}const C3=o.memo(u_);function f_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkTriangle20","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.964 2.227c-.859-1.536-3.07-1.536-3.928 0L1.092 14.652C.254 16.152 1.338 18 3.056 18h13.887c1.718 0 2.803-1.848 1.964-3.348zm-2.619.732a.75.75 0 0 1 1.31 0l6.943 12.425a.75.75 0 0 1-.655 1.116H3.056a.75.75 0 0 1-.654-1.116zm-.095 8.54V7a.75.75 0 1 1 1.5 0v4.5a.75.75 0 0 1-1.5 0m1.75 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})})}const i6=o.memo(f_);function m_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkTriangle24","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.404 5.033c-1.048-1.886-3.76-1.886-4.808 0L2.995 16.914C1.977 18.747 3.302 21 5.399 21h13.202c2.097 0 3.422-2.253 2.404-4.086zm-3.497.728a1.25 1.25 0 0 1 2.186 0l6.6 11.882a1.25 1.25 0 0 1-1.092 1.857H5.399a1.25 1.25 0 0 1-1.093-1.857zm.343 7.989v-4.5a.75.75 0 0 1 1.5 0v4.5a.75.75 0 1 1-1.5 0m2 3.497a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0",clipRule:"evenodd"})})}const s6=o.memo(m_);function v_(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconExclamationMarkTriangle32","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M18.638 5.77c-1.135-2.094-4.141-2.094-5.276 0L3.72 23.571C2.637 25.571 4.084 28 6.358 28h19.284c2.273 0 3.72-2.43 2.638-4.429zm-3.518.953a1 1 0 0 1 1.76 0l9.641 17.8a1 1 0 0 1-.88 1.477H6.359a1 1 0 0 1-.88-1.476zM15 18.5V12a1 1 0 0 1 2 0v6.5a1 1 0 1 1-2 0m2.5 4a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0",clipRule:"evenodd"})})}const d6=o.memo(v_),h6=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&!e.filled&&t.jsx(r6,{...e}),l===n.Size16&&!e.filled&&t.jsx(C3,{...e}),l===n.Size20&&!e.filled&&t.jsx(i6,{...e}),l===n.Size24&&!e.filled&&t.jsx(s6,{...e}),l===n.Size32&&!e.filled&&t.jsx(d6,{...e})]})};h6.displayName="FondueIconExclamationMarkTriangle";const m2=o.memo(h6);var w6=(e=>(e.Information="Information",e.Warning="Warning",e.Tip="Tip",e.Note="Note",e))(w6||{});const L6={Information:"tw-bg-box-selected-strong",Warning:"tw-bg-box-negative-strong-pressed",Tip:"tw-bg-box-positive-strong-pressed",Note:"tw-bg-box-warning-strong"},Z2={Information:"before:tw-bg-box-selected-strong",Warning:"before:tw-bg-box-negative-strong-pressed",Tip:"before:tw-bg-box-positive-strong-pressed",Note:"before:tw-bg-box-warning-strong"},g_={Information:t.jsx(c6,{}),Warning:t.jsx(m2,{}),Tip:t.jsx(M1,{}),Note:t.jsx(Q4,{})},I3=({headerStyle:e})=>t.jsx("div",{"data-test-id":"bright-header",className:v(["tw-h-9 tw-relative tw-z-[120000] tw-flex tw-justify-center tw-items-center tw-rounded-t-md tw-dark tw-text-text",L6[e]]),children:o.cloneElement(g_[e],{size:n.Size20})});I3.displayName="FondueBrightHeader";const u6={small:"tw-pt-2",large:"tw-pt-3"},f6={small:"tw-pb-2",large:"tw-pb-3"};var N3=(e=>(e.Top="Top",e.Right="Right",e.Bottom="Bottom",e.Left="Left",e))(N3||{}),z3=(e=>(e.Start="Start",e.Middle="Middle",e.End="End",e))(z3||{});const C_={"Top-Start":"top-start","Top-End":"top-end","Bottom-Start":"bottom-start","Bottom-End":"bottom-end","Left-Start":"left-start","Left-End":"left-end","Right-Start":"right-start","Right-End":"right-end","Top-Middle":"top","Right-Middle":"right","Bottom-Middle":"bottom","Left-Middle":"left"},I_=(e,l,c)=>{switch(!0){case e.toString().includes("Top".toLowerCase()):return"before:tw-border-t-0 before:tw-border-l-0 tw-bottom-[-6px] before:tw-dark before:tw-bg-base";case e.toString().includes("Right".toLowerCase()):return v(["before:tw-border-t-0 before:tw-border-r-0 tw-left-[-5px]",l&&c==="Start"&&e.toString().includes("Start".toLowerCase())?Z2[l]:"before:tw-dark before:tw-bg-base"]);case e.toString().includes("Bottom".toLowerCase()):return v(["before:tw-border-b-0 before:tw-border-r-0 tw-top-[-6px]",l?Z2[l]:"before:tw-dark before:tw-bg-base"]);case e.toString().includes("Left".toLowerCase()):return v(["before:tw-border-b-0 before:tw-border-l-0 tw-right-[-5px]",l&&c==="Start"&&e.toString().includes("Start".toLowerCase())?Z2[l]:"before:tw-dark before:tw-bg-base"]);default:return"before:tw-border-b-0 before:tw-border-r-0 tw-top-[-6px] before:tw-dark before:tw-bg-base"}},N_=({enablePortal:e=!1,children:l})=>e?t.jsx(f2,{children:l}):l,v2=({content:e,tooltipIcon:l,heading:c,headingIcon:r,linkUrl:i,linkLabel:s,brightHeader:d,buttons:h,children:w,position:L="Bottom",alignment:u="Middle",withStrongBorder:f=!1,withArrow:m,flip:g=!0,triggerElement:C,hoverDelay:N=200,enterDelay:M=0,open:I=!1,disabled:S=!1,enablePortal:A=!1,hidden:y=!1,"data-test-id":H="tooltip"})=>{var g1;const[p,x]=o.useState(null),[z,F]=o.useState(!1),k=o.useRef(null),b=y||S,{linkProps:B}=WO.useLink({isDisabled:b},k),P=o.useMemo(()=>i||h||c||r,[i,h,c,r]),G=C_[`${L}-${u}`],[V,K]=o.useState(null),[O,j]=o.useState(null),[a0,o0]=o.useState(null),U=I0(),W=m?10:5,D=N1.usePopper(p,V,{placement:G,strategy:"fixed",modifiers:[{name:"arrow",options:{element:a0}},{name:"eventListeners",options:{scroll:z,resize:z}},{name:"offset",options:{offset:[0,W]}},{name:"flip",enabled:g}]}),q=((g1=D.state)==null?void 0:g1.placement)??L,n0=I_(q,d,u),R=o.useRef(null),T=o.useCallback(()=>{R.current&&clearTimeout(R.current),R.current=setTimeout(()=>F(!1),N)},[N]),Y=o.useCallback(()=>{if(R.current&&clearTimeout(R.current),M){R.current=setTimeout(()=>F(!0),M);return}F(!0)},[M]),w0=o.useCallback(T0=>{var s0;const Q=(s0=T0.composedPath)==null?void 0:s0.call(T0);Q&&[p,O,V].some(C1=>C1&&Q.includes(C1))&&Y()},[Y,V,O,p]),g0=o.useCallback(T0=>{const{relatedTarget:Q}=T0;(!Q||![V,O].some(s0=>s0==null?void 0:s0.contains(Q)))&&F(!1)},[V,O]),_0=b?{}:{onMouseOver:T0=>w0(T