UNPKG

@frontify/fondue

Version:
1 lines 2.88 MB
"use strict";var oO=Object.defineProperty;var iO=(e,l,s)=>l in e?oO(e,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[l]=s;var E=(e,l,s)=>iO(e,typeof l!="symbol"?l+"":l,s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n4=require("@react-aria/accordion"),Y=require("@react-aria/focus"),b0=require("@react-aria/utils"),ee=require("@react-stately/collections"),s4=require("@react-stately/tree"),a=require("react"),U0=require("framer-motion"),m5=require("@react-aria/menu"),rO=require("@react-aria/link"),A1=require("react-popper"),Y0=require("@react-aria/button"),Z1=require("react-dom"),R0=require("@react-aria/overlays"),cO=require("@react-stately/menu"),L1=require("@ctrl/tinycolor"),ge=require("@react-aria/breadcrumbs"),Ce=require("@react-aria/checkbox"),dO=require("@react-stately/toggle"),uO=require("@react-stately/checkbox"),hO=require("@react-aria/interactions"),o4=require("@react-aria/radio"),je=require("@react-aria/visually-hidden"),mO=require("@react-stately/radio"),wO=require("react-colorful"),M7=require("@react-aria/select"),LO=require("@react-stately/select"),Ie=require("@react-aria/listbox"),fO=require("@react-aria/aria-modal-polyfill"),xO=require("@react-stately/overlays"),i4=require("@react-aria/dialog"),p7=require("@floating-ui/dom"),S7=require("date-fns"),A7=require("react-datepicker"),Ne=require("react-dnd"),vO=require("react-dnd-html5-backend"),r4=require("react-textarea-autosize"),d0=require("@dnd-kit/core"),gO=require("@dnd-kit/modifiers"),d2=require("@dnd-kit/sortable"),c4=require("immer"),m1=require("lodash-es"),CO=require("react-is"),jO=require("react-fast-compare"),IO=require("@dnd-kit/utilities"),T=require("@udecode/plate-core"),a0=require("@udecode/plate-link"),O=require("@udecode/slate"),NO=require("@radix-ui/react-toolbar"),T0=require("@udecode/plate-floating"),te=require("@udecode/react-utils"),f1=require("@udecode/plate-paragraph"),zO=require("@udecode/plate-indent"),X=require("@udecode/plate-list"),Y1=require("@udecode/slate-react"),MO=require("@radix-ui/react-tooltip"),$0=require("@udecode/plate-combobox"),s1=require("@udecode/plate-emoji"),pO=require("@radix-ui/react-popover"),o1=require("@udecode/slate-utils"),r0=require("@udecode/plate-basic-marks"),SO=require("@udecode/plate-break"),le=require("@udecode/plate-utils"),P2=require("@udecode/plate-alignment"),ze=require("@udecode/utils"),t1=require("@udecode/plate-autoformat"),z1=require("@udecode/plate-mention"),q2=require("escape-html"),AO=require("@udecode/plate-code-block"),RO=require("remark-gfm"),yO=require("remark-parse"),bO=require("unified"),Me=require("unist-util-visit"),$1=require("@react-stately/table"),HO=require("@udecode/zustood"),kO=require("@udecode/plate-normalizers"),pe=require("slate"),TO=require("slate-react");function Se(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(l,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return l.default=e,Object.freeze(l)}const B2=Se(NO),x2=Se(MO),c1=Se(pO),Ae=({children:e,isOpen:l=!1,preventInitialAnimation:s=!1,animateOpacity:o=!0,"data-test-id":i="collapsible-wrap"})=>t.jsx(U0.AnimatePresence,{initial:s?!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:o?0:1}},transition:{type:"tween"},"data-test-id":i,children:e})});Ae.displayName="FondueCollapsibleWrap";const f=e=>e.filter(Boolean).join(" "),d4=(...e)=>{const l=e.filter(Boolean);return l.length<=1?l[0]??null:function(o){for(const i of l)typeof i=="function"?i(o):i&&(i.current=o)}},h0="tw-ring-4 tw-ring-blue tw-ring-offset-2 dark:tw-ring-offset-black tw-outline-none",_1="tw-ring-4 tw-ring-blue dark:tw-ring-offset-black tw-outline-none",z0="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",Re=f([h0,"tw-ring-inset"]),u4=f([z0,"tw-ring-inset"]),VO="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 FO={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 $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:"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 ye=a.memo($O);function PO(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 be=a.memo(PO);function BO(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 h4=a.memo(BO);function DO(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 m4=a.memo(DO);function OO(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 w4=a.memo(OO),L4=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&!e.filled&&t.jsx(ye,{...e}),l===n.Size16&&!e.filled&&t.jsx(be,{...e}),l===n.Size20&&!e.filled&&t.jsx(h4,{...e}),l===n.Size24&&!e.filled&&t.jsx(m4,{...e}),l===n.Size32&&!e.filled&&t.jsx(w4,{...e})]})};L4.displayName="FondueIconCaretDown";const J1=a.memo(L4),f4="fondue-accordion-header-icon",ZO={small:n.Size12,medium:n.Size16,large:n.Size20},He=({size:e="medium",isOpen:l,"data-test-id":s=f4})=>t.jsx("span",{"data-test-id":`${s}-wrapper`,className:"tw-block",children:t.jsx("span",{"data-test-id":s,className:f(["tw-block tw-transition-transform",l&&"tw-rotate-180 tw-duration-300"]),children:t.jsx(J1,{size:ZO[e]})})});He.displayName="FondueAccordionHeaderIcon";const x4="fondue-accordion-header",ke=({isOpen:e=!1,decorator:l,disabled:s=!1,children:o,"data-test-id":i=x4})=>{const[r,c]=a.useState(null),d=t.jsx(He,{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":`${(r==null?void 0:r.innerText)||""}`,className:f(["tw-flex tw-items-center tw-gap-x-1.5 tw-w-full tw-flex-row",!s&&e&&"tw-text-text",!s&&!e&&"tw-text-text-weak hover:tw-text-text",s&&"tw-text-text-disabled"]),children:[a.isValidElement(l)&&t.jsx("span",{"data-test-id":`${i}-decorator`,className:"tw-shrink-0 tw-leading-4",children:a.cloneElement(l,{size:n.Size16})}),t.jsx("span",{ref:c,"data-test-id":`${i}-text`,className:"tw-text-left tw-text-m tw-font-normal",children:o}),d&&t.jsx("span",{"data-test-id":`${i}-icon-container`,className:"tw-ml-auto tw-shrink-0",children:d})]})})};ke.displayName="FondueAccordionHeader";const _O="fondue-accordion",v4="fondue-accordion-item",UO=({item:e,state:l,header:s,padding:o=!0,divider:i=!1,headerComponent:r=ke,"data-test-id":c=v4})=>{var C,I;const{active:d,...u}=s,h=a.useRef(null),{buttonProps:m,regionProps:w}=n4.useAccordionItem({item:e},l,h),L=l.expandedKeys.has(e.key),{isFocusVisible:x,focusProps:v}=Y.useFocusRing();return t.jsxs("div",{className:f([x?`${_1} tw-relative tw-rounded`:"",i&&"tw-divide-y tw-divide-black-10"]),children:[t.jsx("button",{...b0.mergeProps(m,v),"data-test-id":c,ref:h,onClick:g=>{s.onClick&&s.onClick(),m.onClick&&m.onClick(g)},onKeyUp:g=>{s.onClick&&g.key==="Enter"&&s.onClick(),m.onKeyUp&&m.onKeyUp(g)},className:"tw-w-full focus-visible:tw-outline-none",children:t.jsx(r,{isOpen:L,...u})}),t.jsx(Ae,{isOpen:L,preventInitialAnimation:d,children:t.jsx("div",{...w,className:f([o&&"tw-px-8 tw-pb-6","tw-mt-2"]),children:(I=(C=e.props).children)==null?void 0:I.call(C)})})]},e.key)},qO=e=>{const l=a.Children.map(e,(o,i)=>{const{header:r,children:c}=o.props;return t.jsx(ee.Item,{textValue:r.children,children:c?()=>c:null},i)}),s=l.map(o=>o.key).filter((o,i)=>{var r,c;return o&&!!((c=(r=e[i])==null?void 0:r.props.header)!=null&&c.active)})||[];return{children:l,defaultExpandedKeys:s}},WO=({children:e})=>a.Children.toArray(e).reduce((l,s)=>a.isValidElement(s)&&!s.props.header?(console.warn("Use `AccordionItem` as children of `Accordion` and set the `header` prop accordingly."),l):(a.isValidElement(s)&&l.push(s),l),[]),g4=({children:e})=>t.jsx(t.Fragment,{children:e});g4.displayName="FondueAccordionItem";const GO=e=>{var s,o,i;const l=a.Children.toArray(e);return((i=(o=(s=l[l.length-1])==null?void 0:s.props)==null?void 0:o.header)==null?void 0:i.active)===!0},C4=e=>{const{divider:l=!0,border:s=!0,"data-test-id":o=_O}=e,i=WO(e),r=qO(i),c=a.useRef(null),d=s4.useTreeState(r),u=a.useRef({firstRender:!0,childLength:a.Children.toArray(e.children).length}),h=a.Children.toArray(e.children).length;a.useEffect(()=>{GO(e.children)&&!u.current.firstRender&&a.Children.toArray(e.children).length>u.current.childLength&&d.toggleKey(r.defaultExpandedKeys[r.defaultExpandedKeys.length-1]),u.current={firstRender:!1,childLength:a.Children.toArray(e.children).length}},[r.defaultExpandedKeys,h,e.children,d]);const{accordionProps:{onMouseDown:m,onKeyDown:w,...L}}=n4.useAccordion({...r,disallowTypeAhead:!0},d,c),v={...L,onKeyDown:C=>{const I=C.target.dataset.key,g=d.selectionManager.focusedKey===I;I&&g&&(w==null||w(C))}};return t.jsx("div",{...v,ref:c,"data-test-id":o,className:f([l&&"tw-divide-y tw-divide-black-10",s&&"tw-border-t tw-border-b tw-border-black-10"]),children:[...d.collection].map((C,I)=>{const{header:g,padding:N,headerComponent:z,divider:M,"data-test-id":A=v4}=i[I].props;return t.jsx(UO,{item:C,state:d,divider:M,header:g,padding:N,headerComponent:z,"data-test-id":A},C.key)})})};C4.displayName="FondueAccordion";const Te=a.forwardRef(({ariaProps:e,children:l,scrollable:s=!1,border:o=!0},i)=>t.jsx("ul",{...e,ref:i,className:f(["tw-list-none tw-p-0 tw-m-0 tw-bg-base tw-z-20 focus-visible:tw-outline-none",o&&"tw-border tw-border-line tw-rounded",s&&"tw-overflow-y-auto"]),children:l}));Te.displayName="FondueAriaList";var K0=(e=>(e.Primary="Primary",e.Danger="Danger",e.Warning="Warning",e))(K0||{}),P1=(e=>(e.Check="Check",e.CaretRight="CaretRight",e.None="None",e))(P1||{}),y0=(e=>(e.XSmall="XSmall",e.Small="Small",e.Large="Large",e))(y0||{}),j4=(e=>(e.Primary="Primary",e.Danger="Danger",e))(j4||{});const R7={[y0.XSmall]:"tw-pr-1.5",[y0.Small]:"tw-pr-1.5",[y0.Large]:"tw-pr-2"},v2=({title:e,decorator:l,switchComponent:s,subtitle:o,ariaProps:i,size:r=y0.Small,children:c})=>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:f(["tw-shrink-0",R7[r]]),"data-test-id":"menu-item-decorator",children:a.cloneElement(l,{size:r===y0.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:c||e}),o&&r===y0.Large&&t.jsx("div",{"data-test-id":"menu-item-subtitle",className:"tw-select-none tw-text-xxs",title:o,children:o})]}),s&&t.jsx("span",{className:f(["tw-shrink-0",R7[r]]),"data-test-id":"menu-item-decorator",children:s})]});v2.displayName="FondueMenuItemContent";function KO(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 I4=a.memo(KO);function QO(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 N4=a.memo(QO);function XO(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 z4=a.memo(XO);function YO(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 M4=a.memo(YO);function JO(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 p4=a.memo(JO),S4=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&!e.filled&&t.jsx(I4,{...e}),l===n.Size16&&!e.filled&&t.jsx(N4,{...e}),l===n.Size20&&!e.filled&&t.jsx(z4,{...e}),l===n.Size24&&!e.filled&&t.jsx(M4,{...e}),l===n.Size32&&!e.filled&&t.jsx(p4,{...e})]})};S4.displayName="FondueIconCaretRight";const w5=a.memo(S4);function EO(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 A4=a.memo(EO);function eZ(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 Ve=a.memo(eZ);function tZ(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 Fe=a.memo(tZ);function lZ(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 R4=a.memo(lZ);function aZ(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 y4=a.memo(aZ),b4=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&!e.filled&&t.jsx(A4,{...e}),l===n.Size16&&!e.filled&&t.jsx(Ve,{...e}),l===n.Size20&&!e.filled&&t.jsx(Fe,{...e}),l===n.Size24&&!e.filled&&t.jsx(R4,{...e}),l===n.Size32&&!e.filled&&t.jsx(y4,{...e})]})};b4.displayName="FondueIconCheckMark";const R1=a.memo(b4),$e=["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"]),'),L5=(e,l)=>e?"a":l?"button":"span",f5=e=>e?(e.querySelectorAll($e)??[]).length>0:!1,H4={[y0.XSmall]:"tw-px-5 tw-py-2 tw-min-h-[36px]",[y0.Small]:"tw-px-5 tw-py-2.5 tw-min-h-[36px]",[y0.Large]:"tw-px-5 tw-py-3 tw-min-h-[60px]"};var r2=(e=>(e.Default="Default",e.Active="Active",e.Disabled="Disabled",e))(r2||{});const Pe={[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"}},nZ={[K0.Primary]:"hover:tw-text-text",[K0.Danger]:"hover:tw-text-text-negative",[K0.Warning]:"hover:tw-text-text-warning"},y7="tw-cursor-pointer tw-flex tw-items-center tw-justify-between tw-transition-colors tw-gap-2",sZ="hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover",Q5=f(["tw-w-full tw-text-left tw-py-2 tw-px-5 tw-rounded",sZ]),oZ="tw-bg-box-selected",g2=({title:e,decorator:l,switchComponent:s,subtitle:o,size:i=y0.Small,style:r=K0.Primary,disabled:c=!1,active:d=!1,checked:u=!1,selectionIndicator:h=P1.Check,children:m,link:w,onBlur:L,onClick:x,onFocus:v,onMouseEnter:C,onMouseOut:I,onMouseOver:g,onMouseLeave:N,"data-test-id":z="menu-item"})=>{const M=i===y0.XSmall?n.Size16:n.Size20,A={[P1.CaretRight]:t.jsx(w5,{"data-test-id":`${z}-caret`,size:M}),[P1.Check]:d&&t.jsx(R1,{"data-test-id":`${z}-active`,size:M}),[P1.None]:null}[h],{isFocusVisible:R,focusProps:S}=Y.useFocusRing();let j="Default";c?j="Disabled":d&&(j="Active");const k=Pe[r][j],y=L5(w,x);return t.jsxs(t.Fragment,{children:[m&&t.jsxs("li",{"data-test-id":z,role:"menuitem",className:f(["tw-text-sm tw-leading-4 tw-text-text-weak",y7,u?oZ:""]),children:[y==="a"&&t.jsx("a",{href:w,className:f([Q5,R&&_1]),onBlur:L,onClick:x,onFocus:v,onMouseEnter:C,onMouseLeave:N,onMouseOut:I,onMouseOver:g,...S,children:m}),y==="button"&&t.jsx("button",{type:"button",disabled:c,className:f([Q5,R&&_1]),onBlur:L,onClick:x,onFocus:v,onMouseEnter:C,onMouseLeave:N,onMouseOut:I,onMouseOver:g,...S,children:m}),y==="span"&&t.jsx("span",{className:Q5,children:m})]}),!m&&t.jsxs("div",{className:f([y7,nZ[r],H4[i],c&&"tw-bg-box-disabled tw-pointer-events-none",d&&"tw-font-medium",k]),children:[t.jsx(v2,{title:e,decorator:l,subtitle:i===y0.Large?o:void 0,size:i,switchComponent:s}),t.jsx("div",{className:"tw-flex-none",children:A})]})]})};g2.displayName="FondueMenuItem";var u2=(e=>(e.Medium="Medium",e.Full="Full",e))(u2||{}),e0=(e=>(e.Default="Default",e.Positive="Positive",e.Negative="Negative",e.Danger="Danger",e.Loud="Loud",e.Primary="Primary",e.Secondary="Secondary",e))(e0||{}),k4=(e=>(e.Default="Default",e.Positive="Positive",e.Negative="Negative",e.Danger="Danger",e.Loud="Loud",e))(k4||{}),u0=(e=>(e.Small="Small",e.Medium="Medium",e.Large="Large",e))(u0||{}),D1=(e=>(e.Button="Button",e.Submit="Submit",e.Reset="Reset",e))(D1||{}),L0=(e=>(e.Default="Default",e.Weak="Weak",e.Strong="Strong",e))(L0||{});const iZ={[u0.Small]:n.Size16,[u0.Medium]:n.Size20,[u0.Large]:n.Size24},rZ={[D1.Button]:"button",[D1.Submit]:"submit",[D1.Reset]:"reset"};function x5(e){const l=a.useRef(null);return a.useEffect(()=>{e&&(typeof e=="function"?e(l.current):e.current=l.current)}),l}const cZ="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 ",dZ="tw-not-allowed tw-pointer-events-none tw-border-transparent tw-text-box-disabled-inverse tw-bg-box-disabled ",uZ={[u2.Medium]:"tw-rounded",[u2.Full]:"tw-rounded-full"},b7={[u0.Small]:{default:"tw-px-2 tw-h-6 tw-text-body-small ",iconOnly:"tw-h-6 tw-w-6 "},[u0.Medium]:{default:"tw-px-4 tw-h-9 tw-text-body-medium ",iconOnly:"tw-h-9 tw-w-9 "},[u0.Large]:{default:"tw-px-6 tw-h-12 tw-text-body-large ",iconOnly:"tw-h-12 tw-w-12 "}},hZ={[u0.Small]:"tw--ml-0.5 tw-mr-1 ",[u0.Medium]:"tw--ml-1 tw-mr-1.5 ",[u0.Large]:"tw--ml-1 tw-mr-2 "},mZ={[e0.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 "},[e0.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 "},[e0.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 "},[e0.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 "},[e0.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 "}},wZ={[L0.Default]:{[e0.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 "},[e0.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 "},[e0.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 "},[e0.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 "},[e0.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 "}},[L0.Strong]:{[e0.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 "},[e0.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 "},[e0.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 "},[e0.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 "},[e0.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 "}},[L0.Weak]:mZ},LZ=({type:e=D1.Button,title:l="",style:s=e0.Default,size:o=u0.Medium,rounding:i=u2.Medium,emphasis:r=L0.Strong,hideLabel:c=!1,disabled:d=!1,icon:u,children:h,onClick:m,hugWidth:w=!0,"aria-label":L,"aria-describedby":x,formId:v,solid:C,inverted:I,"data-test-id":g="button"},N)=>{s===e0.Primary?(s=e0.Default,r=L0.Strong):s===e0.Secondary&&(s=e0.Default,r=L0.Default),C===!1&&(r=L0.Weak);const z=x5(N),{buttonProps:M}=Y0.useButton({onPress:()=>m&&m(),isDisabled:d,type:rZ[e]},z),{isFocusVisible:A,focusProps:R}=Y.useFocusRing(),S=k=>d?dZ:`${wZ[r][s][k]}`,j=f([S("button"),cZ,uZ[i],u&&!h||c?b7[o].iconOnly:b7[o].default,!w&&"tw-w-full"]);return t.jsxs("button",{"data-test-id":g,"aria-label":L,"aria-disabled":d,"aria-describedby":x,ref:z,className:f([j,I&&"tw-dark",A&&z0]),disabled:d,form:v,title:l,...M,...R,children:[u&&t.jsx("span",{"data-test-id":`${g}-icon`,className:f([h&&!c?hZ[o]:"",S("icon")]),children:a.cloneElement(u,{size:iZ[o]})}),h&&t.jsx("span",{"data-test-id":`${g}-text`,className:f([S("text"),c&&"tw-sr-only"]),children:h})]})},N0=a.forwardRef(LZ);N0.displayName="FondueButton";const C2=({container:e=document.body,children:l})=>Z1.createPortal(l,e);C2.displayName="FonduePortal";const M1=()=>`id-${window.crypto.getRandomValues(new Uint32Array(1))}`,g0=e=>a.useMemo(()=>e||M1(),[e]);function fZ(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 T4=a.memo(fZ);function xZ(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 V4=a.memo(xZ);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:"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 F4=a.memo(vZ);function gZ(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 $4=a.memo(gZ);function CZ(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 P4=a.memo(CZ),B4=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&!e.filled&&t.jsx(T4,{...e}),l===n.Size16&&!e.filled&&t.jsx(V4,{...e}),l===n.Size20&&!e.filled&&t.jsx(F4,{...e}),l===n.Size24&&!e.filled&&t.jsx($4,{...e}),l===n.Size32&&!e.filled&&t.jsx(P4,{...e})]})};B4.displayName="FondueIconDocument";const D4=a.memo(B4);function jZ(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 O4=a.memo(jZ);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:"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 Z4=a.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:"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 _4=a.memo(NZ);function zZ(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 U4=a.memo(zZ);function MZ(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 q4=a.memo(MZ);function pZ(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 W4=a.memo(pZ);function SZ(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 G4=a.memo(SZ);function AZ(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 K4=a.memo(AZ);function RZ(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 Q4=a.memo(RZ);function yZ(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 X4=a.memo(yZ),Y4=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&e.filled&&t.jsx(O4,{...e}),l===n.Size12&&!e.filled&&t.jsx(Z4,{...e}),l===n.Size16&&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.Size20&&!e.filled&&t.jsx(W4,{...e}),l===n.Size24&&e.filled&&t.jsx(G4,{...e}),l===n.Size24&&!e.filled&&t.jsx(K4,{...e}),l===n.Size32&&e.filled&&t.jsx(Q4,{...e}),l===n.Size32&&!e.filled&&t.jsx(X4,{...e})]})};Y4.displayName="FondueIconExclamationMarkCircle";const J4=a.memo(Y4);function bZ(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 E4=a.memo(bZ);function HZ(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 Be=a.memo(HZ);function kZ(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 e6=a.memo(kZ);function TZ(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 t6=a.memo(TZ);function VZ(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 l6=a.memo(VZ),a6=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&!e.filled&&t.jsx(E4,{...e}),l===n.Size16&&!e.filled&&t.jsx(Be,{...e}),l===n.Size20&&!e.filled&&t.jsx(e6,{...e}),l===n.Size24&&!e.filled&&t.jsx(t6,{...e}),l===n.Size32&&!e.filled&&t.jsx(l6,{...e})]})};a6.displayName="FondueIconExclamationMarkTriangle";const j2=a.memo(a6);var n6=(e=>(e.Information="Information",e.Warning="Warning",e.Tip="Tip",e.Note="Note",e))(n6||{});const s6={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"},D2={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"},FZ={Information:t.jsx(J4,{}),Warning:t.jsx(j2,{}),Tip:t.jsx(R1,{}),Note:t.jsx(D4,{})},De=({headerStyle:e})=>t.jsx("div",{"data-test-id":"bright-header",className:f(["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",s6[e]]),children:a.cloneElement(FZ[e],{size:n.Size20})});De.displayName="FondueBrightHeader";const H7={small:"tw-pt-2",large:"tw-pt-3"},k7={small:"tw-pb-2",large:"tw-pb-3"};var Oe=(e=>(e.Top="Top",e.Right="Right",e.Bottom="Bottom",e.Left="Left",e))(Oe||{}),Ze=(e=>(e.Start="Start",e.Middle="Middle",e.End="End",e))(Ze||{});const $Z={"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"},PZ=(e,l,s)=>{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 f(["before:tw-border-t-0 before:tw-border-r-0 tw-left-[-5px]",l&&s==="Start"&&e.toString().includes("Start".toLowerCase())?D2[l]:"before:tw-dark before:tw-bg-base"]);case e.toString().includes("Bottom".toLowerCase()):return f(["before:tw-border-b-0 before:tw-border-r-0 tw-top-[-6px]",l?D2[l]:"before:tw-dark before:tw-bg-base"]);case e.toString().includes("Left".toLowerCase()):return f(["before:tw-border-b-0 before:tw-border-l-0 tw-right-[-5px]",l&&s==="Start"&&e.toString().includes("Start".toLowerCase())?D2[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"}},BZ=({enablePortal:e=!1,children:l})=>e?t.jsx(C2,{children:l}):l,I2=({content:e,tooltipIcon:l,heading:s,headingIcon:o,linkUrl:i,linkLabel:r,brightHeader:c,buttons:d,children:u,position:h="Bottom",alignment:m="Middle",withStrongBorder:w=!1,withArrow:L,flip:x=!0,triggerElement:v,hoverDelay:C=200,enterDelay:I=0,open:g=!1,disabled:N=!1,enablePortal:z=!1,hidden:M=!1,"data-test-id":A="tooltip"})=>{var i1;const[R,S]=a.useState(null),[j,k]=a.useState(!1),y=a.useRef(null),p=M||N,{linkProps:$}=rO.useLink({isDisabled:p},y),V=a.useMemo(()=>i||d||s||o,[i,d,s,o]),q=$Z[`${h}-${m}`],[H,W]=a.useState(null),[B,F]=a.useState(null),[t0,l0]=a.useState(null),Z=g0(),U=L?10:5,P=A1.usePopper(R,H,{placement:q,strategy:"fixed",modifiers:[{name:"arrow",options:{element:t0}},{name:"eventListeners",options:{scroll:j,resize:j}},{name:"offset",options:{offset:[0,U]}},{name:"flip",enabled:x}]}),_=((i1=P.state)==null?void 0:i1.placement)??h,n0=PZ(_,c,m),J=a.useRef(null),b=a.useCallback(()=>{J.current&&clearTimeout(J.current),J.current=setTimeout(()=>k(!1),C)},[C]),K=a.useCallback(()=>{if(J.current&&clearTimeout(J.current),I){J.current=setTimeout(()=>k(!0),I);return}k(!0)},[I]),c0=a.useCallback(S0=>{var i0;const G=(i0=S0.composedPath)==null?void 0:i0.call(S0);G&&[R,B,H].some(r1=>r1&&G.includes(r1))&&K()},[K,H,B,R]),f0=a.useCallback(S0=>{const{relatedTarget:G}=S0;(!G||![H,B].some(i0=>i0==null?void 0:i0.contains(G)))&&k(!1)},[H,B]),V0=p?{}:{onMouseOver:S0=>c0(S0.nativeEvent),onMouseLeave:b,onFocus:()=>k(!0),onBlur:f0};a.useEffect(()=>{J.current&&clearTimeout(J.current),k(p?!1:g)},[g,p]);const H0=a.useCallback(S0=>{j&&S0.key==="Escape"&&k(!1)},[j]);return a.useLayoutEffect(()=>{typeof P.update=="function"&&j&&P.update()},[j]),a.useEffect(()=>(j?window.addEventListener("keydown",H0):window.removeEventListener("keydown",H0),()=>{window.removeEventListener("keydown",H0)}),[H0,j]),t.jsxs(t.Fragment,{children:[t.jsx("div",{...V0,ref:F,children:t.jsx("div",{ref:S,"aria-describedby":Z,role:"tooltip",children:v})}),t.jsx(BZ,{enablePortal:z,children:t.jsxs("div",{ref:W,"aria-hidden":p,className:f(["tw-popper-container tw-inline-block tw-max-w-[200px] tw-dark tw-bg-base tw-rounded-md tw-shadow-mid tw-text-text tw-z-[120000]",!j&&"tw-opacity-0 tw-h-0 tw-w-0 tw-overflow-hidden",w&&"tw-border tw-border-line-strong"]),"data-test-id":A,role:"tooltip",id:Z,style:P.styles.popper,...P.attributes.popper,...V0,children:[c&&t.jsx(De,{headerStyle:c}),t.jsxs("div",{className:f(["tw-px-3 tw-dark tw-bg-base tw-rounded-md tw-relative tw-z-[120000]",V?H7.large:H7.small,i?k7.large:k7.small]),children:[s&&t.jsxs("h4",{className:"tw-flex tw-text-m tw-font-bold tw-mb-1",children:[o&&t.jsx("span",{className:"tw-mr-1.5",children:a.cloneElement(o,{size:n.Size20})}),s]}),t.jsxs("div",{className:"tw-flex",children:[l&&t.jsx("span",{className:"tw-shrink-0 tw-mr-1 tw-leading-4",children:a.cloneElement(l,{size:n.Size16})}),t.jsx("span",{className:"tw-text-s tw-min-w-0 tw-break-words",children:e})]}),i&&t.jsx("a",{...$,"data-test-id":`${A}-link`,ref:y,href:i,target:"_blank",rel:"noopener noreferrer",className:f(["tw-text-xs tw-text-black-40 tw-underline tw-mt-1",z0]),children:r??"Click here to learn more."}),d&&t.jsxs("div",{className:"tw-flex tw-flex-row-reverse tw-gap-x-1 tw-mt-4",children:[d.length>0&&t.jsx(N0,{style:e0.Default,emphasis:L0.Strong,size:u0.Small,onClick:d[0].action,disabled:p,children:d[0].label}),d.length===2&&t.jsx(N0,{style:e0.Default,emphasis:L0.Default,size:u0.Small,onClick:d[1].action,disabled:p,children:d[1].label})]})]}),t.jsx("div",{"aria-hidden":"true",children:t.jsx("div",{"data-test-id":"popover-arrow","data-popper-arrow":L,ref:l0,style:P.styles.arrow,className:f([L&&"tw-popper-arrow tw-z-[110000] tw-absolute tw-w-3 tw-h-3 tw-pointer-events-none before:tw-absolute before:tw-w-3 before:tw-h-3 before:tw-rotate-45 before:tw-border",L&&n0,w?"before:tw-border-line-strong":L&&"before:tw-border-line"])})}),u]})})]})};I2.displayName="FondueLegacyTooltip";function DZ(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:"IconQuestionMarkCircle12","aria-hidden":"true",...e,children:t.js