@epam/ai-dial-ui-kit 0.15.0-dev.27 → 0.15.0-dev.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +2 -0
- package/dist/{DateCellRenderer-ZLb4GAUV.cjs → DateCellRenderer-BFEh4rXZ.cjs} +1 -1
- package/dist/DateCellRenderer-J1V3xwF7.cjs +1 -0
- package/dist/IconButton-DHOFapLo.cjs +1 -0
- package/dist/JsonEditor-BDe6elKO.cjs +1 -0
- package/dist/{MarkdownEditor-NYMcKLJy.cjs → MarkdownEditor-C7BONfsl.cjs} +1 -1
- package/dist/{MarkdownEditor-CPzMv3lE.cjs → MarkdownEditor-FVzYMdkC.cjs} +1 -1
- package/dist/MarkdownEditorContainer-GvlxX6kx.cjs +1 -0
- package/dist/{Switch-CfxMs3AZ.cjs → Switch-DE6MrcqJ.cjs} +1 -1
- package/dist/components/Button/constants.js +9 -8
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +16 -18
- package/dist/components/New/Button/ButtonWrappers.js +93 -37
- package/dist/components/New/Button/constants.js +3 -0
- package/dist/components/New/InlineSelect/InlineSelect.js +81 -77
- package/dist/components-manifest.json +27 -2
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +171 -170
- package/dist/editors.cjs +1 -1
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +2 -2
- package/dist/lazy-BEsZqouS.cjs +1 -0
- package/dist/src/components/New/Button/ButtonWrappers.d.ts +20 -0
- package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +8 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/types/button.d.ts +1 -0
- package/dist/types/button.js +3 -3
- package/dist/{use-file-manager-tabs-LWyTVrbO.cjs → use-file-manager-tabs-C0h1Sq5T.cjs} +1 -1
- package/package.json +3 -3
- package/dist/DateCellRenderer-BZ8vGglE.cjs +0 -1
- package/dist/IconButton-CVttu-k-.cjs +0 -1
- package/dist/JsonEditor-CpSpVa0v.cjs +0 -1
- package/dist/MarkdownEditorContainer-DSL5-_hG.cjs +0 -1
- package/dist/editor-Bc9xzKuR.cjs +0 -1
- package/dist/lazy-Cy9WobJf.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),g=require("./DateCellRenderer-BFEh4rXZ.cjs"),U=require("@tabler/icons-react"),a=require("react"),h=require("./merge-classes-BEJXjzkx.cjs"),p=require("@floating-ui/react"),ge=require("./icon-DhjrDQ8I.cjs"),ne=require("./icon-CrGVkVpG.cjs"),C=require("./IconButton-DHOFapLo.cjs"),Ct=require("classnames");function gt(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(s,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return s.default=e,Object.freeze(s)}const de=gt(a);var he=(e=>(e.Top="top",e.Right="right",e.Bottom="bottom",e.Left="left",e))(he||{});const ht=7,xt=2,bt=500,St="fill-control-inverted",It="z-tooltip max-w-[376px] whitespace-pre-wrap break-words rounded-lg bg-control-inverted px-3 py-2 dial-small-text text-control-inverted shadow-xs",ze=a.createContext(null),Ze=()=>{const e=a.useContext(ze);if(e==null)throw new Error("Tooltip components must be wrapped in <TooltipContainer />");return e},Nt=({initialOpen:e=!1,placement:s=he.Bottom,isTriggerClickable:n=!1,open:r,onOpenChange:i}={})=>{const[u,c]=a.useState(e),m=a.useRef(null),d=r??u,x=i??c,S=p.useFloating({placement:s,open:d,onOpenChange:x,whileElementsMounted:p.autoUpdate,middleware:[p.offset(ht+xt),p.flip({fallbackAxisSideDirection:"start",padding:5}),p.shift({padding:5}),p.arrow({element:m})]}),f=p.useHover(S.context,{move:!1,enabled:r==null,mouseOnly:n,delay:{open:bt,close:0}}),I=p.useFocus(S.context,{enabled:r==null}),E=p.useDismiss(S.context),A=p.useRole(S.context,{role:"tooltip"}),k=p.useInteractions([f,I,E,A]);return a.useEffect(()=>{if(!d)return;const y=S.refs.reference.current;if(!(y instanceof Element))return;const T=new IntersectionObserver(([O])=>{O.isIntersecting||x(!1)},{root:null,threshold:0});return T.observe(y),()=>T.disconnect()},[d,S.refs.reference,x]),a.useMemo(()=>({open:d,setOpen:x,arrowRef:m,...k,...S}),[d,x,k,S])},Le=({children:e,...s})=>{const n=Nt(s);return t.jsx(ze.Provider,{value:n,children:e})},we=({style:e,...s})=>{const n=Ze(),r=C.useHasHover(),i=g.useThemeScope(),u=a.useRef(null),c=p.useMergeRefs([n.refs.setFloating,u]);return!n.open||!r?null:t.jsx(p.FloatingPortal,{id:"tooltip-portal",children:t.jsxs("div",{ref:c,"data-placement":n.placement,style:{...n.floatingStyles,...e},...n.getFloatingProps(s),className:Ct(It,i,n.getFloatingProps(s).className,g.DIAL_KIT_CLASS.tooltip),children:[s.children,t.jsx(p.FloatingArrow,{ref:n.arrowRef,context:n.context,className:St})]})})},Re=({children:e,asChild:s=!1,...n})=>{const r=Ze(),i=s&&a.isValidElement(e),u=i?e.props?.ref:null,c=p.useMergeRefs([r.refs.setReference,...u?[u]:[]]);if(i){const m=e.props;return a.cloneElement(e,r.getReferenceProps({...m,...n,className:h.mergeClasses(m.className,n.className)||void 0,ref:c}))}return t.jsx("span",{ref:c,...r.getReferenceProps(n),className:n.className??"text-start",children:e})},We=({hideTooltip:e=!1,tooltip:s,children:n,asChild:r=!1,triggerClassName:i,contentClassName:u,...c})=>{const m=!e&&!!s;return t.jsxs(Le,{...c,children:[t.jsx(Re,{asChild:r,className:i,children:n}),m&&t.jsx(we,{className:u,children:s})]})},Fe={[C.ButtonVariant.Primary]:{[C.ButtonAppearance.Solid]:"dial-kit-primary-solid-button",[C.ButtonAppearance.Ghost]:"dial-kit-primary-ghost-button",[C.ButtonAppearance.Link]:"dial-kit-primary-link-button"},[C.ButtonVariant.Neutral]:{[C.ButtonAppearance.Solid]:"dial-kit-neutral-solid-button",[C.ButtonAppearance.Outlined]:"dial-kit-neutral-outlined-button"},[C.ButtonVariant.Danger]:{[C.ButtonAppearance.Solid]:"dial-kit-danger-solid-button",[C.ButtonAppearance.Ghost]:"dial-kit-danger-ghost-button",[C.ButtonAppearance.Outlined]:"dial-kit-danger-outlined-button"},[C.ButtonVariant.Static]:{[C.ButtonAppearance.Solid]:"dial-kit-static-solid-button"},[C.ButtonVariant.Starter]:{[C.ButtonAppearance.Outlined]:"dial-kit-starter-outlined-button"},[C.ButtonVariant.Success]:{},[C.ButtonVariant.Secondary]:{},[C.ButtonVariant.Tertiary]:{}},vt=e=>{e.preventDefault()},Ke=(e,s,n)=>{const r=s!=null&&!s.hideTooltip&&s.tooltip!=null&&s.tooltip!=="";return e&&r?{disabled:void 0,"aria-disabled":!0,onClick:vt}:{disabled:e,onClick:n}},Ue=(e=C.ButtonVariant.Primary,s=C.ButtonAppearance.Solid)=>{const n=Fe[e]?.[s];return n||(console.warn(`Could not find Button styles for variant: ${e} and appearance: ${s}. Using default primary solid button styles.`),Fe[C.ButtonVariant.Primary][C.ButtonAppearance.Solid])},Et={[C.ElementSize.Small]:"size-[24px]",[C.ElementSize.Standard]:"size-[40px] dial-kit-enhanced-target",[C.ElementSize.Large]:"size-[48px] dial-kit-enhanced-target"},xe=({variant:e,appearance:s=C.ButtonAppearance.Solid,size:n=C.ElementSize.Standard,className:r,icon:i,tooltipProps:u,type:c="button",disabled:m,...d})=>{const x=h.mergeClasses("dial-kit-base-icon-button dial-kit-base-button",e&&Ue(e,s),Et[n],r),S=t.jsx("button",{...d,...Ke(m,u,d.onClick),type:c,className:x,"aria-label":C.resolveAccessibleName(d["aria-label"],u?.tooltip),children:i});return u?t.jsx(We,{asChild:!0,...u,children:S}):S},$e=({caption:e,onClick:s,"aria-label":n})=>{if(!e)return null;const r=h.mergeClasses("text-secondary hover:text-control-accent-hover active:text-control-accent-active","focus-visible:outline focus-visible:outline-focus",g.DIAL_KIT_CLASS.infoButton);return t.jsx(xe,{"aria-label":n,className:r,icon:t.jsx(U.IconInfoCircle,{size:ne.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),onClick:s,size:C.ElementSize.Small,tooltipProps:{tooltip:e}})},De=({label:e,required:s,className:n,containerClassName:r,caption:i,size:u=C.ElementSize.Small,...c})=>e?t.jsxs("span",{className:h.mergeClasses("flex items-center gap-0.5",r,g.DIAL_KIT_CLASS.label),children:[t.jsxs("label",{...c,className:h.mergeClasses("text-secondary flex items-center gap-0.5",u===C.ElementSize.Small?"dial-tiny-semi-text":"dial-small-text",n),children:[typeof e=="string"?t.jsx("span",{className:"min-h-4",children:e}):e,s&&t.jsxs(t.Fragment,{children:[t.jsx("span",{"aria-hidden":"true",className:"text-error dial-tiny-text",children:"*"}),t.jsx("span",{className:"sr-only",children:"(required)"})]})]}),t.jsx($e,{caption:i})]}):null;var H=(e=>(e.None="none",e.Check="check",e.Tint="tint",e.Checkbox="checkbox",e.Highlight="highlight",e))(H||{});const je=(e,s)=>({appearance:r,...i})=>t.jsx(xe,{...i,variant:e,appearance:r||s}),qe=(e,s)=>({variant:r,...i})=>t.jsx(xe,{...i,variant:r||s,appearance:e}),yt=je(C.ButtonVariant.Primary,C.ButtonAppearance.Solid),Tt=je(C.ButtonVariant.Neutral,C.ButtonAppearance.Solid),_t=je(C.ButtonVariant.Danger,C.ButtonAppearance.Ghost),Xe=qe(C.ButtonAppearance.Ghost,C.ButtonVariant.Primary),At=qe(C.ButtonAppearance.Solid,C.ButtonVariant.Static),Ye=({ariaLabel:e="Close",className:s,size:n=C.ElementSize.Small,onClose:r,...i})=>t.jsx(Xe,{...i,size:n,"aria-label":e,className:h.mergeClasses(s,g.DIAL_KIT_CLASS.closeButton),onClick:r,icon:t.jsx(U.IconX,{size:n===C.ElementSize.Small?ne.DIAL_ICON_SIZE.SM:ne.DIAL_ICON_SIZE.MD,stroke:ge.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})}),kt=e=>{const s=a.useRef(null),[n,r]=a.useState(!1),[i,u]=a.useState(""),c=a.useRef(!1),m=a.useCallback(()=>{const x=s.current;x&&(c.current&&u(x.textContent??""),r(x.scrollWidth>x.clientWidth))},[]),d=a.useCallback(()=>g.scheduleMeasure(m),[m]);return a.useEffect(()=>{const x=s.current;if(x)return g.observeElementSize(x,m)},[m]),a.useEffect(()=>{c.current=typeof e!="string",d()},[e,d]),{ref:s,isTruncated:n,textContent:i,remeasure:d}},be=({text:e,className:s,contentClassName:n,hideTooltip:r=!1,id:i,customTooltipContent:u,...c})=>{const{ref:m,isTruncated:d,textContent:x,remeasure:S}=kt(e),f=typeof e=="string"?e:x,I=a.useMemo(()=>r||!d?null:u??f,[u,f,r,d]);return t.jsxs(Le,{...c,children:[t.jsx(Re,{asChild:!0,onMouseEnter:S,onFocusCapture:S,children:t.jsx("span",{id:i,ref:m,"aria-label":d&&f?f:void 0,className:h.mergeClasses("block min-w-0 max-w-full flex-1 truncate text-start",s,g.DIAL_KIT_CLASS.ellipsisTooltip),children:e})}),!!I&&t.jsx(we,{className:n,children:I})]})},Lt=8,wt=400,Rt="z-interactive-tooltip max-w-[320px] rounded-xl bg-layer-0 p-4 dial-small-text text-primary shadow-md",fe=({content:e,placement:s=he.Right,children:n,asChild:r=!1,hideTooltip:i=!1,initialOpen:u=!1,open:c,onOpenChange:m,triggerClassName:d,contentClassName:x})=>{const S=g.useIsMobileScreen(),f=g.useThemeScope(),[I,E]=a.useState(u),A=c??I,k=j=>{m?.(j),c==null&&E(j)},y=p.useFloatingNodeId(),{refs:T,floatingStyles:O,context:w}=p.useFloating({nodeId:y,placement:s,open:A,onOpenChange:k,whileElementsMounted:p.autoUpdate,middleware:[p.offset(Lt),p.flip({padding:5}),p.shift({padding:5})]}),$=p.useHover(w,{enabled:c==null,handleClose:p.safePolygon(),delay:{open:wt,close:0}}),R=p.useFocus(w,{enabled:c==null}),F=p.useDismiss(w),{getReferenceProps:V,getFloatingProps:v}=p.useInteractions([$,R,F]),q=a.useRef(null),Q=p.useMergeRefs(a.useMemo(()=>[T.setFloating,q],[T.setFloating])),X=r&&a.isValidElement(n),G=X?n.props?.ref:null,P=p.useMergeRefs(a.useMemo(()=>[T.setReference,...G?[G]:[]],[T.setReference,G])),L=!i&&!S&&!!e,D=X?a.cloneElement(n,V({...n.props,ref:P,className:h.mergeClasses(n.props.className,d)||void 0})):t.jsx("span",{ref:P,...V(),className:d??"text-start",children:n});return t.jsxs(t.Fragment,{children:[D,A&&L&&t.jsx(p.FloatingPortal,{id:"interactive-tooltip-portal",children:t.jsx(p.FloatingFocusManager,{context:w,modal:!1,initialFocus:-1,returnFocus:!1,order:["reference","content"],children:t.jsx("div",{ref:Q,"data-placement":w.placement,style:O,...v(),className:h.mergeClasses(Rt,f,x,g.DIAL_KIT_CLASS.interactiveTooltip),children:e})})})]})},Je="rounded-xl bg-layer-raised p-1 shadow-md",Me="flex flex-col gap-0.5",Qe=h.mergeClasses(Je,"w-max"),et=h.mergeClasses(Qe,Me,"py-2"),tt=h.mergeClasses("flex w-full cursor-pointer items-center gap-2 px-3 h-[40px] rounded-lg","dial-small-text text-primary truncate","hover:bg-control-accent-alpha-hover","focus-visible:outline focus-visible:outline-focus"),nt="bg-control-accent-alpha",Dt=h.mergeClasses(nt,"text-accent"),jt=h.mergeClasses("cursor-not-allowed text-control-disable-primary","bg-transparent hover:bg-transparent"),st=4,Mt=h.mergeClasses("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),Ht=h.mergeClasses("z-floating focus-visible:outline-none",Je),Ot=Qe,Bt=et,Ft=h.mergeClasses(Me,"py-1"),Vt="my-1 border-t border-tertiary",J=st,Gt=t.jsx(U.IconChevronRight,{size:ne.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),Ve={size:14,stroke:3,"aria-hidden":!0},He=({isSelected:e=!1,isIndeterminate:s=!1,invalid:n=!1,disabled:r=!1,htmlFor:i,className:u})=>{const c=s||e,m=!!i,d=h.mergeClasses("grid size-[20px] shrink-0 place-items-center rounded border transition-colors duration-200",m&&"dial-kit-minimum-target",m&&"peer-focus-visible:outline peer-focus-visible:outline-focus",r?"border-transparent bg-control-disable-primary text-control-disable-primary":h.mergeClasses(n&&c&&"border-transparent bg-control-error text-control-permanent",n&&!c&&"border-error bg-control-neutral",!n&&c&&"border-transparent bg-control-accent text-control-permanent hover:bg-control-accent-hover",!n&&!c&&"border-default bg-control-neutral hover:border-accent hover:bg-control-accent-alpha-hover"),r?"cursor-not-allowed":m&&"cursor-pointer",u,g.DIAL_KIT_CLASS.checkboxBox),x=s?t.jsx(U.IconMinus,{...Ve}):e&&t.jsx(U.IconCheck,{...Ve});return m?t.jsx("label",{htmlFor:i,className:d,children:x}):t.jsx("span",{"aria-hidden":"true",className:d,children:x})},Pt=t.jsx(U.IconCheck,{size:ne.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,className:`shrink-0 ${g.DIAL_KIT_CLASS.menuItemCheck}`,"aria-hidden":!0}),pe=({label:e,icon:s,description:n,mark:r=H.None,selected:i=!1,danger:u=!1,trailing:c,rightControl:m,ellipsisLabel:d=!1,labelClassName:x,children:S,className:f,disabled:I=!1,type:E="button",...A})=>{const k=i&&r===H.Highlight,y=i&&(r===H.Checkbox||r===H.Tint),T=h.mergeClasses(u&&"text-error",I&&"text-control-disable-primary"),O=h.mergeClasses(tt,"aria-expanded:bg-control-accent-alpha-hover",k&&Dt,y&&nt,I&&jt,u&&"text-error",f,g.DIAL_KIT_CLASS.menuItem),w=t.jsxs("button",{type:E,disabled:I,"data-menu-item-row":m?"":void 0,className:m?"flex h-full min-w-0 flex-1 items-center gap-2 truncate text-start focus-visible:outline-none":O,...A,children:[S??t.jsxs(t.Fragment,{children:[r===H.Checkbox&&t.jsx(He,{isSelected:i,disabled:I}),s&&t.jsx(g.DialIcon,{icon:s,className:T}),d?t.jsx(be,{text:e,className:h.mergeClasses(T,x)}):t.jsx("span",{className:h.mergeClasses("min-w-0 flex-1 truncate text-start",T,x),children:e}),n&&t.jsx("span",{className:h.mergeClasses("shrink-0 text-secondary dial-small-text",I&&"text-control-disable-primary"),children:n}),i&&r===H.Check&&Pt]}),c&&t.jsx("span",{className:h.mergeClasses("ml-auto shrink-0",T),children:c})]});return m?t.jsxs("div",{role:"none",className:h.mergeClasses(O,"has-[[data-menu-item-row]:focus-visible]:outline","has-[[data-menu-item-row]:focus-visible]:outline-focus"),children:[w,m]}):w},Ce=e=>e.mark??(e.selectable?H.Checkbox:H.None),rt=e=>e.selectable?"menuitemcheckbox":Ce(e)===H.Check?"menuitemradio":"menuitem",zt=({item:e,onRootClose:s})=>{const{isOpen:n,nodeId:r,refs:i,floatingStyles:u,context:c,getReferenceProps:m,getFloatingProps:d}=g.useSubMenuFloating(J,"menu",!!e.disabled),x=a.useCallback(f=>I=>{f.disabled||(f.onClick?.({key:f.key,domEvent:I}),f.selectable||s())},[s]),S=t.jsx(pe,{ref:i.setReference,role:"menuitem","aria-haspopup":"menu","aria-expanded":n,"aria-disabled":!!e.disabled,disabled:e.disabled,icon:e.icon,label:e.label,trailing:Gt,className:e.className,...m(),children:e.renderItem?.(e)});return t.jsxs(p.FloatingNode,{id:r,children:[e.interactiveTooltip?t.jsx(fe,{asChild:!0,placement:e.interactiveTooltip.placement,content:e.interactiveTooltip.content,contentClassName:e.interactiveTooltip.contentClassName,children:S}):S,n&&t.jsx(g.SubMenuPanel,{refs:i,floatingStyles:u,context:c,getFloatingProps:d,role:"menu",surfaceClassName:e.renderSubMenu?Ot:Bt,children:e.renderSubMenu?e.renderSubMenu():t.jsxs(t.Fragment,{children:[e.menuHeader&&(typeof e.menuHeader=="function"?e.menuHeader():e.menuHeader),e.children.map(f=>{const I=rt(f),E=t.jsx(pe,{role:I,"aria-checked":I==="menuitem"?void 0:!!f.checked,"aria-current":Ce(f)===H.Highlight&&f.checked?!0:void 0,"aria-disabled":!!f.disabled,disabled:f.disabled,mark:Ce(f),selected:!!f.checked,danger:f.danger,icon:f.icon,label:f.label,className:f.className,rightControl:f.rightControl,onClick:x(f),children:f.renderItem?.(f)});return t.jsx(a.Fragment,{children:f.interactiveTooltip?t.jsx(fe,{asChild:!0,placement:f.interactiveTooltip.placement,content:f.interactiveTooltip.content,contentClassName:f.interactiveTooltip.contentClassName,children:E}):E},f.key)}),e.menuFooter&&(typeof e.menuFooter=="function"?e.menuFooter():e.menuFooter)]})})]})},Zt='[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"]',Wt=e=>!e.hasAttribute("disabled")&&e.getAttribute("aria-disabled")!=="true",Kt=["ArrowDown","ArrowUp","Home","End"],Ut=(e,s,n)=>{if(e==="Home")return 0;if(e==="End")return n-1;const r=e==="ArrowDown"?1:-1;return s===-1?r===1?0:n-1:(s+r+n)%n},$t=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,ot=({children:e,items:s,onItemClick:n,menuHeader:r,menuFooter:i,renderOverlay:u,trigger:c=[g.DropdownTrigger.Click],placement:m,disabled:d=!1,open:x,defaultOpen:S=!1,onOpenChange:f,closable:I=!1,onClose:E,className:A,overlayContentClassName:k,separatorClassName:y,listClassName:T,listStyle:O,outsidePressIgnoreRef:w,outsideClosable:$=!0,allowedPlacements:R,anchorToMouse:F=!1,matchReferenceWidth:V=!0,maxDropdownHeight:v,initialFocus:q})=>{const Q=g.useThemeScope(),[X,G]=a.useState(S),P=x!==void 0,L=P?!!x:X,D=a.useRef(null),[j,se]=a.useState(!0),_=a.useCallback((l,o,b)=>{l&&se(b!=="hover"&&b!=="safe-polygon"),P||G(l),f?.(l)},[P,f]),re=a.useId(),Se=m===void 0,oe=p.useFloatingNodeId(),{refs:M,floatingStyles:K,context:z}=p.useFloating({nodeId:oe,placement:m,open:L,onOpenChange:_,whileElementsMounted:p.autoUpdate,middleware:[p.offset({mainAxis:J,crossAxis:0}),Se?p.autoPlacement({alignment:"start",crossAxis:!0,padding:J,allowedPlacements:R}):p.flip({padding:J}),p.shift({padding:J}),p.size({padding:J,apply({availableWidth:l,availableHeight:o,elements:b}){const N=b.floating,B=$t(b.reference);N.style.setProperty("--fui-available-height",`${Math.floor(o)}px`),N.style.setProperty("--reference-width",V?`${Math.round(B)}px`:"0px"),V?N.style.minWidth=`${Math.round(B)}px`:N.style.removeProperty("min-width"),N.style.maxWidth=`${Math.floor(l)}px`;const te=Math.floor(o);N.style.maxHeight=`${v?Math.min(te,v):te}px`}})]}),Y=p.useClick(z,{enabled:c.includes(g.DropdownTrigger.Click)&&!d}),Ie=p.useHover(z,{enabled:c.includes(g.DropdownTrigger.Hover)&&!d,move:!1,restMs:40,handleClose:p.safePolygon(),delay:{open:80,close:80}}),ee=p.useDismiss(z,{bubbles:!0,referencePress:!1,outsidePress:l=>{if(!$)return!1;const o=l.target;return!(w?.current&&o instanceof Node&&w.current.contains(o))}}),ae=p.useRole(z,{role:"menu"}),{getReferenceProps:Ne,getFloatingProps:le}=p.useInteractions([Y,Ie,ee,ae]),Z=a.useCallback((l,o)=>{M.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:l,y:o,top:o,left:l,right:l,bottom:o})})},[M]),ve=a.useCallback(l=>{!c.includes(g.DropdownTrigger.ContextMenu)||d||(l.preventDefault(),F&&(Z(l.clientX,l.clientY),D.current=document.elementFromPoint(l.clientX,l.clientY)),_(!0))},[F,d,_,Z,c]),Ee=a.useCallback(l=>{!F||d||(c.includes(g.DropdownTrigger.ContextMenu)&&L&&_(!1),Z(l.clientX,l.clientY),D.current=document.elementFromPoint(l.clientX,l.clientY))},[F,d,Z,L,c,_]);a.useEffect(()=>{d&&L&&_(!1)},[d,L,_]);const ye=a.useCallback(l=>{if(l.defaultPrevented||!Kt.includes(l.key)||!l.currentTarget.contains(l.target))return;const o=Array.from(l.currentTarget.querySelectorAll(Zt)).filter(Wt);if(o.length===0)return;l.preventDefault();const b=l.currentTarget.ownerDocument.activeElement,N=o.findIndex(B=>B===b);o[Ut(l.key,N,o.length)]?.focus()},[]),ce=a.useCallback(l=>o=>{l.disabled||(l.onClick?.({key:l.key,domEvent:o}),n?.({key:l.key,domEvent:o}),l.selectable||_(!1))},[n,_]),ie=a.useMemo(()=>u?u():s?t.jsxs(t.Fragment,{children:[r&&t.jsx(t.Fragment,{children:typeof r=="function"?r():r}),t.jsx("div",{role:"none",className:h.mergeClasses(Ft,k,g.DIAL_KIT_CLASS.dropdownList),"aria-label":"dropdown",children:s.map(l=>{if(l.type===g.DropdownItemType.Divider)return t.jsx("div",{role:"separator",className:h.mergeClasses(Vt,y)},l.key);if(l.type===g.DropdownItemType.PlainText)return t.jsx("div",{className:h.mergeClasses("px-3 py-2 text-secondary dial-caption-text",l.className),children:l.label},l.key);if(l.children?.length)return t.jsx(zt,{item:l,onRootClose:()=>_(!1)},l.key);const o=Ce(l),b=rt(l),N=t.jsx(pe,{role:b,"aria-checked":b==="menuitem"?void 0:!!l.checked,"aria-current":o===H.Highlight&&l.checked?!0:void 0,"aria-disabled":!!l.disabled,disabled:l.disabled,mark:o,selected:!!l.checked,danger:l.danger,icon:l.icon,label:l.label,className:l.className,rightControl:l.rightControl,onClick:ce(l),children:l.renderItem?.(l)});return t.jsx(a.Fragment,{children:l.interactiveTooltip?t.jsx(fe,{asChild:!0,placement:l.interactiveTooltip.placement,content:l.interactiveTooltip.content,contentClassName:l.interactiveTooltip.contentClassName,children:N}):N},l.key)})}),i&&t.jsx(t.Fragment,{children:typeof i=="function"?i():i})]}):null,[ce,s,i,r,u,_,k,y]),Te=Ne({onContextMenu:ve,onMouseDown:Ee});return a.useEffect(()=>{if(!L)return;const l=M.reference.current;let o=null;if(l instanceof Element?o=l:D.current instanceof Element&&(o=D.current),!o)return;const b=new IntersectionObserver(([N])=>{N.isIntersecting||_(!1)},{root:null,threshold:0});return b.observe(o),()=>b.disconnect()},[L,M.reference,_]),t.jsx(p.FloatingTree,{children:t.jsxs(p.FloatingNode,{id:oe,children:[t.jsx("span",{ref:M.setReference,className:h.mergeClasses(Mt,d&&"!cursor-not-allowed opacity-75",A,g.DIAL_KIT_CLASS.dropdown),"aria-haspopup":"menu","aria-expanded":L,"aria-controls":re,...Te,children:e}),L&&t.jsx(p.FloatingPortal,{children:t.jsx(p.FloatingFocusManager,{context:z,modal:!1,initialFocus:q!==void 0?q:j?0:-1,returnFocus:!0,children:t.jsxs("div",{id:re,ref:M.setFloating,style:O?{...O,...K}:K,className:h.mergeClasses(Ht,!V&&"w-max","overflow-auto",Q,T),...le({onKeyDown:ye}),children:[I&&t.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:t.jsx(Ye,{ariaLabel:"Close dropdown",onClose:l=>{E?.(l),_(!1)}})}),ie]})})})]})})},Oe=({id:e,labelProps:s,isSelected:n=!1,isIndeterminate:r=!1,invalid:i=!1,disabled:u,onChange:c,caption:m,className:d,boxClassName:x,...S})=>{const f=a.useId(),I=e??f,E=m?`${I}-caption`:void 0,A=a.useCallback(y=>{c?.(y.target.checked)},[c]),k=a.useCallback(y=>{y&&(y.indeterminate=r)},[r]);return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:h.mergeClasses("flex items-center gap-2",d,g.DIAL_KIT_CLASS.checkbox),children:[t.jsx("input",{...S,ref:k,type:"checkbox",id:I,checked:n,disabled:u,onChange:A,"aria-checked":r?"mixed":n,"aria-invalid":i||void 0,"aria-label":C.resolveAccessibleName(typeof s?.label!="string"?S["aria-label"]:void 0),"aria-describedby":E,className:"peer sr-only"}),t.jsx(He,{htmlFor:I,isSelected:n,isIndeterminate:r,invalid:i,disabled:u,className:x}),s&&t.jsx(De,{size:C.ElementSize.Standard,...s,htmlFor:I,className:h.mergeClasses("py-[1px]",u?"cursor-not-allowed text-control-disable-primary":"cursor-pointer text-primary",s.className)})]}),m&&t.jsx("span",{id:E,className:"dial-tiny-text text-secondary ml-[28px]",children:m})]})},at=e=>de.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},de.createElement("path",{d:"M20.2954 16.7035C20.2954 17.088 20.6029 17.4069 20.9737 17.4069C21.3445 17.4069 21.6519 17.088 21.6519 16.7035C21.6519 16.3189 21.3445 16 20.9737 16C20.6029 16 20.2954 16.3189 20.2954 16.7035Z",fill:"currentColor"}),de.createElement("path",{d:"M11.7041 16.7035C11.7041 17.088 11.3966 17.4069 11.0258 17.4069C10.655 17.4069 10.3476 17.088 10.3476 16.7035C10.3476 16.3189 10.655 16 11.0258 16C11.3966 16 11.7041 16.3189 11.7041 16.7035Z",fill:"currentColor"}),de.createElement("path",{d:"M19.0221 2.40002L19.5525 1.86969C19.4118 1.72904 19.221 1.65002 19.0221 1.65002V2.40002ZM26.5777 9.95558H27.3277C27.3277 9.75667 27.2487 9.5659 27.108 9.42525L26.5777 9.95558ZM5.42212 29.6H4.67212C4.67212 30.0142 5.00791 30.35 5.42212 30.35V29.6ZM8.44434 2.40002V1.65002V2.40002ZM13.8932 19.5173C13.8932 19.9315 14.229 20.2673 14.6432 20.2673C15.0574 20.2673 15.3932 19.9315 15.3932 19.5173H14.6432H13.8932ZM16.6063 19.5173C16.6063 19.9315 16.9421 20.2673 17.3563 20.2673C17.7705 20.2673 18.1063 19.9315 18.1063 19.5173H17.3563H16.6063ZM19.0221 2.40002H18.2721V8.44447H19.0221H19.7721V2.40002H19.0221ZM19.0221 8.44447H18.2721C18.2721 9.04415 18.5103 9.61927 18.9344 10.0433L19.4647 9.51299L19.995 8.98266C19.8523 8.83992 19.7721 8.64633 19.7721 8.44447H19.0221ZM19.4647 9.51299L18.9344 10.0433C19.3584 10.4674 19.9335 10.7056 20.5332 10.7056V9.95558V9.20558C20.3314 9.20558 20.1378 9.12539 19.995 8.98266L19.4647 9.51299ZM20.5332 9.95558V10.7056H26.5777V9.95558V9.20558H20.5332V9.95558ZM5.42212 29.6H6.17212V5.42225H5.42212H4.67212V29.6H5.42212ZM5.42212 5.42225H6.17212C6.17212 4.81962 6.41151 4.24167 6.83764 3.81554L6.30731 3.28521L5.77698 2.75488C5.06955 3.46231 4.67212 4.42179 4.67212 5.42225H5.42212ZM6.30731 3.28521L6.83764 3.81554C7.26376 3.38942 7.84171 3.15002 8.44434 3.15002V2.40002V1.65002C7.44389 1.65002 6.48441 2.04745 5.77698 2.75488L6.30731 3.28521ZM8.44434 2.40002V3.15002H19.0221V2.40002V1.65002H8.44434V2.40002ZM19.0221 2.40002L18.4918 2.93035L26.0473 10.4859L26.5777 9.95558L27.108 9.42525L19.5525 1.86969L19.0221 2.40002ZM26.5777 9.95558H25.8277V26.5778H26.5777H27.3277V9.95558H26.5777ZM26.5777 26.5778H25.8277C25.8277 27.1804 25.5883 27.7584 25.1622 28.1845L25.6925 28.7148L26.2228 29.2452C26.9302 28.5377 27.3277 27.5783 27.3277 26.5778H26.5777ZM25.6925 28.7148L25.1622 28.1845C24.736 28.6106 24.1581 28.85 23.5555 28.85V29.6V30.35C24.5559 30.35 25.5154 29.9526 26.2228 29.2452L25.6925 28.7148ZM23.5555 29.6V28.85H5.42212V29.6V30.35H23.5555V29.6ZM20.9737 16V16.75C20.9388 16.75 20.9181 16.7345 20.9119 16.7281C20.906 16.722 20.9019 16.7133 20.9019 16.7035H21.6519H22.4019C22.4019 15.9307 21.7842 15.25 20.9737 15.25V16ZM21.6519 16.7035H20.9019C20.9019 16.6936 20.906 16.685 20.9119 16.6788C20.9181 16.6724 20.9388 16.6569 20.9737 16.6569V17.4069V18.1569C21.7842 18.1569 22.4019 17.4762 22.4019 16.7035H21.6519ZM20.9737 17.4069V16.6569C21.0086 16.6569 21.0292 16.6724 21.0354 16.6788C21.0414 16.685 21.0454 16.6936 21.0454 16.7035H20.2954H19.5454C19.5454 17.4762 20.1631 18.1569 20.9737 18.1569V17.4069ZM20.2954 16.7035H21.0454C21.0454 16.7133 21.0414 16.722 21.0354 16.7281C21.0292 16.7345 21.0086 16.75 20.9737 16.75V16V15.25C20.1631 15.25 19.5454 15.9307 19.5454 16.7035H20.2954ZM11.0258 16V16.75C10.9909 16.75 10.9703 16.7345 10.9641 16.7281C10.9582 16.722 10.9541 16.7133 10.9541 16.7035H11.7041H12.4541C12.4541 15.9307 11.8364 15.25 11.0258 15.25V16ZM11.7041 16.7035H10.9541C10.9541 16.6936 10.9582 16.685 10.9641 16.6788C10.9703 16.6724 10.9909 16.6569 11.0258 16.6569V17.4069V18.1569C11.8364 18.1569 12.4541 17.4762 12.4541 16.7035H11.7041ZM11.0258 17.4069V16.6569C11.0607 16.6569 11.0814 16.6724 11.0876 16.6788C11.0935 16.685 11.0976 16.6936 11.0976 16.7035H10.3476H9.59757C9.59757 17.4762 10.2153 18.1569 11.0258 18.1569V17.4069ZM10.3476 16.7035H11.0976C11.0976 16.7133 11.0935 16.722 11.0876 16.7281C11.0814 16.7345 11.0607 16.75 11.0258 16.75V16V15.25C10.2153 15.25 9.59757 15.9307 9.59757 16.7035H10.3476ZM14.6432 19.5173H15.3932C15.3932 19.127 15.6889 18.8604 15.9998 18.8604V18.1104V17.3604C14.8094 17.3604 13.8932 18.3506 13.8932 19.5173H14.6432ZM15.9998 18.1104V18.8604C16.3106 18.8604 16.6063 19.127 16.6063 19.5173H17.3563H18.1063C18.1063 18.3506 17.1901 17.3604 15.9998 17.3604V18.1104Z",fill:"currentColor"})),lt=({id:e,name:s,value:n,labelProps:r,isSelected:i=!1,disabled:u,onChange:c,caption:m,className:d,...x})=>{const S=a.useId(),f=e??S,I=m?`${f}-caption`:void 0,E=a.useCallback(A=>{A.target.checked&&c?.(n)},[c,n]);return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:h.mergeClasses("flex items-center gap-2 ",d,g.DIAL_KIT_CLASS.radio),children:[t.jsx("input",{...x,type:"radio",id:f,name:s,value:n,checked:i,disabled:u,onChange:E,"aria-label":C.resolveAccessibleName(typeof r?.label!="string"?x["aria-label"]:void 0),"aria-describedby":I,className:"peer sr-only"}),t.jsx("label",{htmlFor:f,className:h.mergeClasses("group grid size-[20px] shrink-0 place-items-center rounded-full border transition-colors duration-200 hover:bg-control-accent-alpha-hover","dial-kit-minimum-target","peer-focus-visible:outline peer-focus-visible:outline-focus",u?"cursor-not-allowed border-default bg-control-disable-primary":h.mergeClasses("cursor-pointer",i?"border border-accent bg-control-neutral":"border-default bg-control-neutral")),children:i&&t.jsx("span",{className:h.mergeClasses("size-3 rounded-full",u?"bg-control-disable-secondary":"bg-control-accent")})}),r&&t.jsx(De,{size:C.ElementSize.Standard,...r,htmlFor:f,className:h.mergeClasses("py-[1px]",u?"cursor-not-allowed text-control-disable-primary":"cursor-pointer text-primary",r.className)})]}),m&&t.jsx("span",{id:I,className:"dial-tiny-text text-secondary ml-[26px]",children:m})]})},Ge=32,ct=({title:e,description:s,icon:n,live:r=!1,className:i,titleClassName:u,descriptionClassName:c})=>t.jsxs("div",{role:r?"status":void 0,className:h.mergeClasses("flex size-full flex-col items-center justify-center gap-2 text-tertiary",i,g.DIAL_KIT_CLASS.noDataContent),children:[n??t.jsx(at,{width:Ge,height:Ge,"aria-hidden":"true"}),t.jsx("span",{className:h.mergeClasses("dial-tiny-text text-secondary",u),children:e}),s&&t.jsx("span",{className:h.mergeClasses("dial-tiny-text text-secondary",c),children:s})]}),it="dial-kit-grid",qt="dial-kit-grid-with-selection",Xt="dial-kit-grid-without-header-borders",Yt="dial-kit-grid-row-select",Jt="dial-kit-grid-header-select",Qt="dial-kit-grid-selection-visible",en="dial-kit-grid-align-right",ke=40,_e="0.5px solid var(--stroke-tertiary, #E0E6F0)",me={accentColor:"var(--bg-control-accent, #1D4ED8)",backgroundColor:"var(--bg-layer-raised, #FCFCFC)",oddRowBackgroundColor:"var(--bg-layer-sunken, #EEF1F7)",selectedRowBackgroundColor:"var(--bg-control-accent-alpha, #2764D90F)",rowHoverColor:"var(--bg-control-accent-alpha-hover, #2764D924)",borderColor:"var(--stroke-tertiary, #E0E6F0)",rowBorder:_e,headerRowBorder:_e,headerColumnBorder:_e,chromeBackgroundColor:"var(--bg-layer-base, #F5F7FA)",foregroundColor:"var(--text-primary, #161B2D)",headerTextColor:"var(--text-secondary, #57647A)",browserColorScheme:"light",headerFontSize:14,headerFontWeight:600,fontSize:14,fontFamily:"var(--theme-font, var(--font-inter))",spacing:4,borderRadius:4,wrapperBorderRadius:8};var W=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(W||{});const tn=({params:e,mode:s,label:n,radioName:r,rowId:i,disabled:u})=>{const c=e.node,[m,d]=a.useState(()=>!!c.isSelected());a.useEffect(()=>{const S=()=>d(!!c.isSelected());return S(),c.addEventListener("rowSelected",S),()=>c.removeEventListener("rowSelected",S)},[c]);const x=S=>{u||c.setSelected(S,s===g.GridSelectionMode.SINGLE,W.CHECKBOX_SELECTED)};return s===g.GridSelectionMode.SINGLE?t.jsx(lt,{name:r,value:i,isSelected:m,disabled:u,"aria-label":n,onChange:()=>x(!0)}):t.jsx(Oe,{isSelected:m,disabled:u,"aria-label":n,onChange:x})},Pe=e=>{let s=0,n=0;return e.forEachNodeAfterFilter(r=>{r.selectable!==!1&&(n++,r.isSelected()&&s++)}),{selected:s,selectable:n}},nn=({api:e,label:s})=>{const[{selected:n,selectable:r},i]=a.useState(()=>Pe(e));a.useEffect(()=>{const c=()=>i(Pe(e));return c(),e.addEventListener("selectionChanged",c),e.addEventListener("modelUpdated",c),()=>{e.isDestroyed()||(e.removeEventListener("selectionChanged",c),e.removeEventListener("modelUpdated",c))}},[e]);const u=a.useCallback(c=>{if(c){e.selectAll("filtered",W.CHECKBOX_SELECTED);return}e.deselectAll("filtered",W.CHECKBOX_SELECTED)},[e]);return t.jsx(Oe,{isSelected:r>0&&n===r,isIndeterminate:n>0&&n<r,disabled:r===0,"aria-label":s,onChange:u})},ut="en-US",dt={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},Ae=40,sn={minWidth:Ae,width:Ae,maxWidth:Ae,resizable:!1,sortable:!1,filter:!1,floatingFilter:!1,suppressMovable:!0,suppressHeaderMenuButton:!0,suppressAutoSize:!0,suppressSizeToFit:!0},mt="dial-kit-grid-selection",rn=150,on=100,an=({columnDefs:e,rowData:s,additionalGridOptions:n,getContextMenuItems:r,className:i,ariaLabel:u="Data grid",wrapCustomCellRenderers:c=!0,disabledRowIds:m,selectedRowIds:d,onSelectionChange:x,onGridApiChange:S,getRowId:f,alternateOddRowColors:I=!1,filterPlaceholder:E="Enter value",emptyStateIcon:A,emptyStateTitle:k="No results found",emptyStateDescription:y="Sorry, we couldn't find any results for your search.",loading:T=!1,wrapperBorder:O=!0,withoutHeaderBorders:w=!1,allowDisabledContextMenu:$=!1,selectionMode:R,selectRowLabel:F,selectAllLabel:V="Select all rows"})=>{g.registerAgGridModulesOnce();const[v,q]=a.useState(),Q=g.useIsMobileScreen(),X=g.useIsTabletScreen(),G=a.useRef(new Set),P=a.useRef(void 0),L=`dial-kit-grid-selection-${a.useId()}`,D=a.useRef({getRowId:f,getContextMenuItems:r,onSelectionChange:x,selectRowLabel:F,wrapCustomCellRenderers:c});D.current={getRowId:f,getContextMenuItems:r,onSelectionChange:x,selectRowLabel:F,wrapCustomCellRenderers:c};const j=a.useCallback(o=>{const b=D.current.getRowId;return b?b(o):String(o.id??JSON.stringify(o))},[]),se=!!r,_=!!c,re=a.useMemo(()=>g.themeBalham.withPart(g.colorSchemeLight).withParams({...me,oddRowBackgroundColor:I?me.oddRowBackgroundColor:me.backgroundColor,wrapperBorder:O}),[I,O]),Se=a.useCallback(o=>{o.api.sizeColumnsToFit()},[]),oe=Q||X||(d?.size??0)>0,M=a.useCallback(o=>!!o&&!!m?.has(j(o)),[m,j]),K=a.useCallback((o,b,N)=>se?t.jsx(ot,{trigger:[g.DropdownTrigger.ContextMenu],items:o.data?D.current.getContextMenuItems?.(o.data)??[]:[],anchorToMouse:!0,matchReferenceWidth:!0,className:h.mergeClasses("size-full",N&&"cursor-not-allowed opacity-75"),disabled:N&&!$,children:t.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:b})}):b,[se,$]),z=a.useCallback(o=>{if(!o.data)return null;const b=M(o.data);return K(o,t.jsx(be,{text:o.value==null?"":String(o.value),className:"max-w-full dial-small-text text-primary",hideTooltip:b}),b)},[M,K]),Y=a.useCallback(o=>o===W.API||o===W.ROW_DATA_CHANGED,[]),Ie=a.useMemo(()=>g.debounceFn(o=>{const N=(o.selectedNodes??[]).map(te=>te.data),B=new Set(N.map(j));G.current=B,P.current=o.source,!Y(o.source)&&D.current.onSelectionChange?.(B,N)},on),[Y,j]),ee=a.useMemo(()=>{if(R)return{...sn,colId:mt,headerName:"",headerClass:Jt,cellClass:Yt,headerComponent:R===g.GridSelectionMode.MULTIPLE?nn:void 0,headerComponentParams:{label:V},cellRenderer:o=>{if(!o.data)return null;const b=j(o.data);return t.jsx(tn,{params:o,mode:R,rowId:b,radioName:L,label:D.current.selectRowLabel?.(o.data)??"Select row",disabled:m?.has(b)})}}},[R,V,j,m,L]),ae=a.useCallback(o=>{if(!o.cellRenderer)return{...o,cellRenderer:z};const b=D.current.wrapCustomCellRenderers;if(!(typeof b=="function"?b(o):!!b))return o;const B=o.cellRenderer;return{...o,cellRenderer:ue=>{const ft=M(ue.data),Be=typeof B=="function"?B:void 0,pt=Be?t.jsx(Be,{...ue}):z(ue);return K(ue,pt,ft)}}},[M,z,K]),Ne=a.useMemo(()=>{const o=_?(e??[]).map(ae):e??[];return ee?[ee,...o]:o},[e,_,ae,ee]),{defaultColDef:le,rowSelection:Z,...ve}=n??{},Ee=a.useMemo(()=>({minWidth:rn,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:E,buttons:["reset"]},comparator:g.baseColumnComparator,...g.omitUndefined(le)}),[E,le]),ye=o=>{o.api.sizeColumnsToFit(),q(o.api),n?.onGridReady?.(o),S?.(o.api)};a.useEffect(()=>{v&&s&&v.setGridOption("rowData",s)},[v,s]);const ce=a.useCallback(()=>t.jsx(ct,{live:!0,title:k,description:y,icon:A??t.jsx(U.IconZoomCancel,{size:100,stroke:.5,"aria-hidden":"true"})}),[k,y,A]),ie=typeof Z=="object"?Z:void 0,Te=a.useMemo(()=>R?{isRowSelectable:o=>!M(o.data),...ie,mode:R===g.GridSelectionMode.SINGLE?"singleRow":"multiRow",checkboxes:!1,headerCheckbox:!1}:Z,[Z,ie,M,R]);a.useEffect(()=>{v&&s&&G.current.size&&G.current.forEach(o=>{const b=v.getRowNode(o);b&&!b.isSelected()&&b.setSelected(!0,!1,W.API)})},[v,s]),a.useEffect(()=>{v&&d&&(v.deselectAll("all",W.API),d.forEach(o=>{const b=v.getRowNode(o);b&&!b.isSelected()&&b.setSelected(!0,!1,W.API)}))},[v,d]);const l=a.useCallback(o=>o.data?j(o.data):"",[j]);return a.useEffect(()=>{const o=Y(P.current);if(v&&d?.size&&o){const b=Array.from(d)[0];if(b){const N=v.getRowNode(b);N&&v.ensureNodeVisible(N)}}},[v,Y,d]),t.jsx("div",{className:h.mergeClasses(it,"size-full",R&&qt,R&&oe&&Qt,w&&Xt,i),role:"region","aria-label":u,"aria-busy":T,children:t.jsx("div",{className:"h-full overflow-x-auto",children:t.jsx(g.AgGridReact,{rowModelType:"clientSide",headerHeight:ke,rowHeight:ke,cellSelection:!1,theme:re,autoSizeStrategy:{type:"fitGridWidth"},columnDefs:Ne,defaultColDef:Ee,onGridSizeChanged:Se,onGridReady:ye,loading:T,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:ce,rowData:s,rowSelection:Te,onSelectionChanged:Ie,getRowId:l,...ve})})})},ln=({value:e,locale:s=ut,options:n=dt,emptyPlaceholder:r,className:i,hideTooltip:u=!1})=>{const c=g.convertToDate(e),m=a.useMemo(()=>c?new Intl.DateTimeFormat(s,n).format(c):r,[c,r,s,n]),d=c?c.toISOString():void 0;return t.jsx(be,{text:d?t.jsx("time",{dateTime:d,children:m}):t.jsx("span",{children:m}),className:h.mergeClasses("dial-small-text text-primary",i),hideTooltip:u})};exports.Checkbox=Oe;exports.CheckboxBox=He;exports.CloseButton=Ye;exports.DEFAULT_DATE_FORMAT_OPTIONS=dt;exports.DEFAULT_LOCALE=ut;exports.DangerIconButton=_t;exports.DateCellRenderer=ln;exports.Dropdown=ot;exports.EllipsisTooltip=be;exports.GRID_ALIGN_RIGHT_CLASS=en;exports.GRID_ROOT_CLASS=it;exports.GRID_SELECTION_COLUMN_ID=mt;exports.GRID_THEME_PARAMS=me;exports.GhostIconButton=Xe;exports.Grid=an;exports.IconButton=xe;exports.InfoButton=$e;exports.InteractiveTooltip=fe;exports.Label=De;exports.MenuItem=pe;exports.MenuItemMark=H;exports.NeutralIconButton=Tt;exports.NoDataContent=ct;exports.PrimaryIconButton=yt;exports.ROW_HEIGHT=ke;exports.Radio=lt;exports.StaticIconButton=At;exports.SvgNoData=at;exports.Tooltip=We;exports.TooltipContainer=Le;exports.TooltipContent=we;exports.TooltipPlacement=he;exports.TooltipTrigger=Re;exports.getButtonClassNames=Ue;exports.getDisabledButtonProps=Ke;exports.overlayGap=st;exports.overlayItemClassName=tt;exports.overlayListClassName=Me;exports.overlaySubMenuListClassName=et;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("react/jsx-runtime"),n=require("@floating-ui/react"),c=require("react"),x=require("classnames"),F=require("./merge-classes-BEJXjzkx.cjs");var l=(e=>(e.Primary="primary",e.Neutral="neutral",e.Danger="danger",e.Static="static",e.Starter="starter",e.Success="success",e.Secondary="secondary",e.Tertiary="tertiary",e))(l||{}),r=(e=>(e.Solid="solid",e.Outlined="outlined",e.Ghost="ghost",e.Link="link",e))(r||{});const v={[l.Primary]:{[r.Solid]:"dial-primary-solid-button",[r.Ghost]:"dial-primary-ghost-button",[r.Link]:"dial-primary-link-button"},[l.Neutral]:{[r.Outlined]:"dial-neutral-outlined-button"},[l.Danger]:{[r.Solid]:"dial-danger-solid-button",[r.Ghost]:"dial-danger-ghost-button",[r.Outlined]:"dial-danger-outlined-button"},[l.Success]:{[r.Ghost]:"dial-success-ghost-button"},[l.Secondary]:{[r.Ghost]:"dial-secondary-ghost-button"},[l.Tertiary]:{[r.Ghost]:"dial-tertiary-ghost-button"},[l.Static]:{},[l.Starter]:{}},S=(e=l.Primary,o=r.Solid)=>{const t=v[e]?.[o];return t||(console.warn(`Could not find Button styles for variant: ${e} and appearance: ${o}. Using default primary solid button styles.`),v[l.Primary][r.Solid])};var h=(e=>(e.Small="small",e.Standard="standard",e.Large="large",e))(h||{});const I=7,A=2,C=c.createContext(null),N=()=>{const e=c.useContext(C);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},q=({initialOpen:e=!1,placement:o="bottom",isTriggerClickable:t=!1,open:s,onOpenChange:a}={})=>{const[i,p]=c.useState(e),g=c.useRef(null),m=s??i,d=a??p,f=n.useFloating({placement:o,open:m,onOpenChange:d,whileElementsMounted:n.autoUpdate,middleware:[n.offset(I+A),n.flip({crossAxis:o.includes("-"),fallbackAxisSideDirection:"start",padding:5}),n.shift({padding:5}),n.arrow({element:g})]}),M=n.useHover(f.context,{move:!1,enabled:s==null,mouseOnly:t,delay:{open:500,close:0}}),k=n.useFocus(f.context,{enabled:s==null}),P=n.useDismiss(f.context),G=n.useRole(f.context,{role:"tooltip"}),b=n.useInteractions([M,k,P,G]);return c.useEffect(()=>{if(!m)return;const y=f.refs.reference.current;if(!(y instanceof Element))return;const w=new IntersectionObserver(([L])=>{L.isIntersecting||d(!1)},{root:null,threshold:0});return w.observe(y),()=>w.disconnect()},[m,f.refs.reference,d]),c.useMemo(()=>({open:m,setOpen:d,arrowRef:g,...b,...f}),[m,d,b,f])},R=({children:e,...o})=>{const t=q(o);return u.jsx(C.Provider,{value:t,children:e})},T="(hover: none)",_=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(T).matches,D=()=>{const[e,o]=c.useState(()=>!_());return c.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const t=window.matchMedia(T);if(o(!t.matches),typeof t.addEventListener!="function")return;const s=a=>o(!a.matches);return t.addEventListener("change",s),()=>t.removeEventListener("change",s)},[]),e},E=({style:e,...o})=>{const t=N(),s=D(),a=c.useRef(null),i=n.useMergeRefs([t.refs.setFloating,a]);return!t.open||!s?null:u.jsx(n.FloatingPortal,{id:"tooltip-portal",children:u.jsxs("div",{ref:i,style:{...t.floatingStyles,...e},...t.getFloatingProps(o),className:x("z-tooltip whitespace-pre-wrap break-words rounded border border-primary bg-layer-0 px-2 py-1 dial-tiny-text shadow max-w-[300px]",t.getFloatingProps(o).className),children:[o.children,u.jsx(n.FloatingArrow,{ref:t.arrowRef,context:t.context,fill:"currentColor",strokeWidth:1,className:"stroke-primary text-[var(--bg-layer-0,_#000000)]"})]})})},H=({children:e,asChild:o=!1,...t})=>{const s=N(),a=o&&c.isValidElement(e),i=a?e.props?.ref:null,p=n.useMergeRefs([s.refs.setReference,...i?[i]:[]]);return a?c.cloneElement(e,s.getReferenceProps({...e.props,...t,ref:p})):u.jsx("span",{ref:p,...s.getReferenceProps(t),className:t.className??"dial-tooltip-trigger text-start",children:e})},j=({hideTooltip:e,tooltip:o,children:t,triggerClassName:s,contentClassName:a,...i})=>u.jsxs(R,{...i,children:[u.jsx(H,{className:x(s,"truncate"),children:t}),u.jsx(E,{className:x("text-primary",a,"max-w-[300px]",(e||!o)&&"hidden"),children:o})]}),O=(...e)=>e.find(o=>typeof o=="string"&&o.length>0),U=({variant:e,appearance:o=r.Solid,size:t=h.Standard,className:s,icon:a,tooltipProps:i,type:p="button",...g})=>{const m=F.mergeClasses(e&&S(e,o),t===h.Small?"h-[24px] w-[24px]":"h-[40px] w-[40px] dial-kit-enhanced-target","dial-icon-button disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-focus outline-offset-0 disabled:text-controls-secondary-disable",s),d=u.jsx("button",{...g,type:p,className:m,"aria-label":O(g["aria-label"],i?.tooltip),children:a});return i?u.jsx(j,{...i,children:d}):d};exports.ButtonAppearance=r;exports.ButtonVariant=l;exports.DialIconButton=U;exports.DialTooltip=j;exports.DialTooltipContainer=R;exports.DialTooltipContent=E;exports.DialTooltipTrigger=H;exports.ElementSize=h;exports.getButtonClassNames=S;exports.resolveAccessibleName=O;exports.useHasHover=D;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),a=require("./lazy-BEsZqouS.cjs"),c=require("@monaco-editor/react");function g(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const f=g(c),b={[a.EditorThemes.dark]:{base:"vs-dark",inherit:!1,rules:[{token:"string.key.json",foreground:"#37BABC"},{token:"string.value.json",foreground:"#5C8DEA"},{token:"number",foreground:"#D97C27"},{token:"keyword.json",foreground:"#F4CE46"},{token:"delimiter",foreground:"#EEF1F7"},{token:"delimiter.bracket.json",foreground:"#A972FF"},{token:"delimiter.parenthesis",foreground:"#A972FF"}],colors:{"editor.foreground":"#F76464","editor.background":"#161B2D","editorCursor.foreground":"#EEF1F7","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}},[a.EditorThemes.light]:{base:"vs",inherit:!1,rules:[{token:"string.key.json",foreground:"#009D9F"},{token:"string.value.json",foreground:"#2764D9"},{token:"number",foreground:"#B25500"},{token:"keyword.json",foreground:"#3F3D25"},{token:"delimiter",foreground:"#161B2D"},{token:"delimiter.bracket.json",foreground:"#7E39EC"},{token:"delimiter.parenthesis",foreground:"#7E39EC"}],colors:{"editor.foreground":"#AE2F2F","editor.background":"#EEF1F7","editorCursor.foreground":"#161B2D","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}}},k=({value:e,onChange:o,onValidateJSON:r,options:t,currentTheme:n,themesConfig:s=b})=>{function d(i){i?.editor?.defineTheme(n,s[n]),i.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,schemas:[{uri:"http://custom-schema/object-required.json",fileMatch:["*"],schema:{type:"object",description:"Top-level value must be an object",additionalProperties:!0}}]})}const{Editor:l}=f;return u.jsx(l,{beforeMount:d,height:"100%",defaultLanguage:"json",value:e,onChange:o,theme:n,onValidate:r,options:{minimap:{enabled:!1},formatOnType:!0,formatOnPaste:!0,selectOnLineNumbers:!1,automaticLayout:!0,scrollBeyondLastLine:!1,wordWrap:"on",smoothScrolling:!0,overviewRulerLanes:0,scrollbar:{horizontal:"hidden",verticalScrollbarSize:4,verticalSliderSize:4},...t??{}}})};exports.DialJsonEditor=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-BEsZqouS.cjs"),k=require("./merge-classes-BEJXjzkx.cjs"),o=require("@tabler/icons-react"),p=require("./icon-DhjrDQ8I.cjs"),f=require("./icon-CrGVkVpG.cjs");function E(n){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(i,r,c.get?c:{enumerable:!0,get:()=>n[r]})}}return i.default=n,Object.freeze(i)}const b=E(O),L=f.DIAL_ICON_SIZE.SM,t={size:L,stroke:p.DIAL_KIT_ICON_STROKE},s=(n,i)=>({...n,icon:i}),M=()=>{const{bold:n,code:i,divider:r,group:c,heading1:a,heading2:d,heading3:u,italic:l,link:m,orderedListCommand:I,quote:x,strikethrough:g,table:h,unorderedListCommand:C}=b;return[s(n,e.jsx(o.IconBold,{...t})),s(l,e.jsx(o.IconItalic,{...t})),s(g,e.jsx(o.IconStrikethrough,{...t})),r,c([a,d,u],{name:"heading",groupName:"heading",icon:e.jsx(o.IconTextSize,{...t}),buttonProps:{"aria-label":"Text style",title:"Text style"}}),r,s(C,e.jsx(o.IconList,{...t})),s(I,e.jsx(o.IconListNumbers,{...t})),r,s(x,e.jsx(o.IconQuote,{...t})),s(m,e.jsx(o.IconLink,{...t})),s(i,e.jsx(o.IconCode,{...t})),r,s(h,e.jsx(o.IconTable,{...t}))]},S=()=>{const{codeEdit:n,codeLive:i,codePreview:r,divider:c,fullscreen:a}=b;return[s(n,e.jsx(o.IconPencil,{...t})),s(i,e.jsx(o.IconLayoutColumns,{...t})),s(r,e.jsx(o.IconEye,{...t})),c,s(a,e.jsx(o.IconMaximize,{...t}))]},T=({value:n,onChange:i,height:r=300,theme:c=_.EditorThemes.light,className:a,placeholder:d,defaultPreview:u="edit",id:l,ariaLabel:m})=>{const I=j.useMemo(()=>M(),[]),x=j.useMemo(()=>S(),[]);return e.jsx("div",{"data-color-mode":c,className:k.mergeClasses("dial-kit-markdown-editor",a),children:e.jsx(O,{value:n,onChange:g=>i?.(g||""),height:r,preview:u,commands:I,extraCommands:x,textareaProps:{placeholder:d,id:l,"aria-label":m}})})};exports.MarkdownEditor=T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@uiw/react-md-editor"),m=require("./lazy-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@uiw/react-md-editor"),m=require("./lazy-BEsZqouS.cjs"),u=require("./merge-classes-BEJXjzkx.cjs"),x=({value:t,onChange:s,height:o=300,preview:i="edit",theme:a=m.EditorThemes.dark,className:n,placeholder:r})=>{const d=r!==void 0&&!t;return e.jsxs("div",{"data-color-mode":a,className:u.mergeClasses("relative",n),children:[e.jsx(c,{value:t,onChange:l=>s?.(l||""),height:o,preview:i}),d&&e.jsx("div",{className:"pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40",children:r})]})};exports.DialMarkdownEditor=x;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),m=require("./Switch-DE6MrcqJ.cjs"),E=require("./lazy-BEsZqouS.cjs"),N=require("./MarkdownEditor-FVzYMdkC.cjs"),b=({value:r,onChangeValue:l,label:i,headerContent:a,switcherLabel:d,height:c=300,theme:u=E.EditorThemes.dark,onValidateJSON:x,preview:j="edit"})=>{const w=n.useId(),[t,C]=n.useState(!1),[f,p]=n.useState(null);n.useEffect(()=>{t&&typeof window<"u"&&Promise.resolve().then(()=>require("./JsonEditor-BDe6elKO.cjs")).then(s=>{p(()=>s.DialJsonEditor)})},[t]);const h=n.useCallback(s=>{l?.(s)},[l]),S=n.useCallback(s=>{x?.(s)},[x]),o=!!d;return e.jsx("div",{className:"size-full flex flex-col",children:e.jsx("div",{className:"flex flex-col gap-8",children:e.jsxs("div",{children:[(i||a||o)&&e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[i&&e.jsx(m.DialLabel,{label:i}),e.jsxs("div",{className:"flex items-center gap-2 flex-1 justify-end",children:[a,o&&e.jsx("label",{className:"flex items-center gap-2 cursor-pointer",children:e.jsx(m.DialSwitch,{isOn:t,label:d,switchId:w,onChange:s=>C(s)})})]})]}),o&&t?e.jsx("div",{className:"border border-primary rounded",style:{height:`${c}px`},children:f&&e.jsx(f,{value:r,onChange:h,onValidateJSON:S,currentTheme:u})}):e.jsx(N.DialMarkdownEditor,{value:r,onChange:h,height:c,preview:j,theme:u})]})})})};exports.DialMarkdownEditorContainer=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),p=require("./merge-classes-BEJXjzkx.cjs"),d=require("@tabler/icons-react"),i=require("./IconButton-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),p=require("./merge-classes-BEJXjzkx.cjs"),d=require("@tabler/icons-react"),i=require("./IconButton-DHOFapLo.cjs"),f=require("./icon-CrGVkVpG.cjs"),l=require("classnames"),h=require("react"),y="w-[24px] h-[24px] border border-solid rounded-[6px] border-transparent flex items-center justify-center text-secondary hover:text-controls-accent-primary-hover active:text-controls-accent-primary-active",o=({caption:t,onClick:a})=>{if(!t)return null;const s=e.jsx(i.DialIconButton,{"aria-label":t,className:y,icon:e.jsx(d.IconInfoCircle,{size:f.DIAL_ICON_SIZE.SM}),onClick:a});return t?e.jsx(i.DialTooltip,{tooltip:t,triggerClassName:"flex justify-center items-center",children:s}):s},j=({label:t,required:a,className:s,caption:r,...n})=>t?e.jsxs("label",{...n,className:p.mergeClasses("dial-tiny-text text-secondary flex items-center gap-1",s),children:[typeof t=="string"?e.jsx("span",{className:"min-h-4",children:t}):t,a&&e.jsx("span",{className:"text-accent-primary",children:"*"}),e.jsx(o,{caption:r})]}):null,N=({label:t,switchId:a,isOn:s=!1,disabled:r,onChange:n,caption:c})=>{const x=l("flex shrink-0 w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",s?"flex-row-reverse":"flex-row",r?"pointer-events-none":"",r?s?"bg-controls-disable":"bg-layer-4":s?"bg-accent-primary":"bg-layer-4"),m=h.useCallback(u=>{u.stopPropagation(),n?.(!s)},[n,s]);return e.jsxs("div",{className:"flex flex-row items-start",role:"switch",children:[e.jsx("input",{type:"checkbox",onChange:m,id:a,disabled:r,className:"invisible size-0",checked:s}),e.jsx("label",{htmlFor:a,className:x,"aria-describedby":c&&"caption",children:e.jsx("span",{className:l("size-3 rounded-full",r?"bg-controls-disable-accent":"bg-controls-enable-primary")})}),(t||c)&&e.jsxs("div",{className:"flex flex-col gap-1 ml-2",children:[t&&e.jsx("span",{className:l("dial-small-text py-[1px]",r?"text-secondary":"text-primary"),"aria-label":"switch-title",children:t}),c&&e.jsx("span",{id:"caption",className:"dial-tiny-text text-secondary",children:c})]})]})};exports.DialInfoButton=o;exports.DialLabel=j;exports.DialSwitch=N;
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { ButtonVariant as
|
|
1
|
+
import { ButtonVariant as a, ButtonAppearance as t } from "../../types/button.js";
|
|
2
2
|
const i = {
|
|
3
|
-
[
|
|
3
|
+
[a.Primary]: {
|
|
4
4
|
[t.Solid]: "dial-primary-solid-button",
|
|
5
5
|
[t.Ghost]: "dial-primary-ghost-button",
|
|
6
6
|
[t.Link]: "dial-primary-link-button"
|
|
7
7
|
},
|
|
8
|
-
[
|
|
8
|
+
[a.Neutral]: {
|
|
9
9
|
[t.Outlined]: "dial-neutral-outlined-button"
|
|
10
10
|
},
|
|
11
|
-
[
|
|
11
|
+
[a.Danger]: {
|
|
12
12
|
[t.Solid]: "dial-danger-solid-button",
|
|
13
13
|
[t.Ghost]: "dial-danger-ghost-button",
|
|
14
14
|
[t.Outlined]: "dial-danger-outlined-button"
|
|
15
15
|
},
|
|
16
|
-
[
|
|
16
|
+
[a.Success]: {
|
|
17
17
|
[t.Ghost]: "dial-success-ghost-button"
|
|
18
18
|
},
|
|
19
|
-
[
|
|
19
|
+
[a.Secondary]: {
|
|
20
20
|
[t.Ghost]: "dial-secondary-ghost-button"
|
|
21
21
|
},
|
|
22
|
-
[
|
|
22
|
+
[a.Tertiary]: {
|
|
23
23
|
[t.Ghost]: "dial-tertiary-ghost-button"
|
|
24
24
|
},
|
|
25
|
-
[
|
|
25
|
+
[a.Static]: {},
|
|
26
|
+
[a.Starter]: {}
|
|
26
27
|
};
|
|
27
28
|
export {
|
|
28
29
|
i as variantClassMap
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { useId as g, useState as x, useEffect as J, useCallback as u } from "react";
|
|
3
|
-
import "
|
|
4
|
-
import { EditorThemes as
|
|
5
|
-
import "@monaco-editor/react";
|
|
6
|
-
import { DialSwitch as b } from "../Switch/Switch.js";
|
|
3
|
+
import { DialSwitch as S } from "../Switch/Switch.js";
|
|
4
|
+
import { EditorThemes as b } from "../../types/editor.js";
|
|
7
5
|
import { DialMarkdownEditor as v } from "./MarkdownEditor.js";
|
|
8
6
|
import { DialLabel as y } from "../Label/Label.js";
|
|
9
|
-
const
|
|
7
|
+
const z = ({
|
|
10
8
|
value: s,
|
|
11
9
|
onChangeValue: l,
|
|
12
|
-
label:
|
|
10
|
+
label: i,
|
|
13
11
|
headerContent: d,
|
|
14
12
|
switcherLabel: a,
|
|
15
13
|
height: c = 300,
|
|
16
|
-
theme: m =
|
|
14
|
+
theme: m = b.dark,
|
|
17
15
|
onValidateJSON: f,
|
|
18
16
|
preview: C = "edit"
|
|
19
17
|
}) => {
|
|
20
|
-
const N = g(), [
|
|
18
|
+
const N = g(), [n, w] = x(!1), [p, D] = x(null);
|
|
21
19
|
J(() => {
|
|
22
|
-
|
|
20
|
+
n && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
|
|
23
21
|
D(() => o.DialJsonEditor);
|
|
24
22
|
});
|
|
25
|
-
}, [
|
|
23
|
+
}, [n]);
|
|
26
24
|
const h = u(
|
|
27
25
|
(o) => {
|
|
28
26
|
l?.(o);
|
|
@@ -33,16 +31,16 @@ const $ = ({
|
|
|
33
31
|
f?.(o);
|
|
34
32
|
},
|
|
35
33
|
[f]
|
|
36
|
-
),
|
|
34
|
+
), t = !!a;
|
|
37
35
|
return /* @__PURE__ */ e("div", { className: "size-full flex flex-col", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-8", children: /* @__PURE__ */ r("div", { children: [
|
|
38
|
-
(
|
|
39
|
-
|
|
36
|
+
(i || d || t) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
|
|
37
|
+
i && /* @__PURE__ */ e(y, { label: i }),
|
|
40
38
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [
|
|
41
39
|
d,
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
t && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
|
|
41
|
+
S,
|
|
44
42
|
{
|
|
45
|
-
isOn:
|
|
43
|
+
isOn: n,
|
|
46
44
|
label: a,
|
|
47
45
|
switchId: N,
|
|
48
46
|
onChange: (o) => w(o)
|
|
@@ -50,7 +48,7 @@ const $ = ({
|
|
|
50
48
|
) })
|
|
51
49
|
] })
|
|
52
50
|
] }),
|
|
53
|
-
|
|
51
|
+
t && n ? /* @__PURE__ */ e(
|
|
54
52
|
"div",
|
|
55
53
|
{
|
|
56
54
|
className: "border border-primary rounded",
|
|
@@ -78,5 +76,5 @@ const $ = ({
|
|
|
78
76
|
] }) }) });
|
|
79
77
|
};
|
|
80
78
|
export {
|
|
81
|
-
|
|
79
|
+
z as DialMarkdownEditorContainer
|
|
82
80
|
};
|
|
@@ -1,44 +1,100 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as r, jsxs as B, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { useId as h } from "react";
|
|
3
|
+
import { ButtonAppearance as n, ButtonVariant as o } from "../../../types/button.js";
|
|
4
|
+
import { Button as d } from "./Button.js";
|
|
5
|
+
const l = (a, t) => ({ appearance: s, ...u }) => /* @__PURE__ */ r(
|
|
6
|
+
d,
|
|
6
7
|
{
|
|
7
|
-
...
|
|
8
|
-
variant:
|
|
9
|
-
appearance:
|
|
8
|
+
...u,
|
|
9
|
+
variant: a,
|
|
10
|
+
appearance: s || t
|
|
10
11
|
}
|
|
11
|
-
), p = (
|
|
12
|
-
|
|
12
|
+
), p = (a, t) => ({ variant: s, ...u }) => /* @__PURE__ */ r(
|
|
13
|
+
d,
|
|
13
14
|
{
|
|
14
|
-
...
|
|
15
|
-
variant:
|
|
16
|
-
appearance:
|
|
15
|
+
...u,
|
|
16
|
+
variant: s || t,
|
|
17
|
+
appearance: a
|
|
17
18
|
}
|
|
18
|
-
),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
), N = l(
|
|
20
|
+
o.Primary,
|
|
21
|
+
n.Solid
|
|
22
|
+
), C = l(
|
|
23
|
+
o.Neutral,
|
|
24
|
+
n.Solid
|
|
25
|
+
), G = l(
|
|
26
|
+
o.Danger,
|
|
27
|
+
n.Solid
|
|
28
|
+
), e = {
|
|
29
|
+
x1: "-5.06",
|
|
30
|
+
y1: "2.26",
|
|
31
|
+
x2: "30.62",
|
|
32
|
+
y2: "22.63",
|
|
33
|
+
from: "var(--stroke-gradient-1, #5976E9)",
|
|
34
|
+
to: "var(--stroke-gradient-2, #885DF2)"
|
|
35
|
+
}, O = ({
|
|
36
|
+
appearance: a = n.Outlined,
|
|
37
|
+
iconBefore: t,
|
|
38
|
+
iconAfter: i,
|
|
39
|
+
style: s,
|
|
40
|
+
...u
|
|
41
|
+
}) => {
|
|
42
|
+
const c = `dial-kit-starter-gradient-${h().replace(/[^\w-]/g, "")}`, g = /* @__PURE__ */ r(
|
|
43
|
+
"svg",
|
|
44
|
+
{
|
|
45
|
+
className: "pointer-events-none absolute size-0 overflow-hidden",
|
|
46
|
+
"aria-hidden": "true",
|
|
47
|
+
focusable: "false",
|
|
48
|
+
children: /* @__PURE__ */ r("defs", { children: /* @__PURE__ */ B(
|
|
49
|
+
"linearGradient",
|
|
50
|
+
{
|
|
51
|
+
id: c,
|
|
52
|
+
x1: e.x1,
|
|
53
|
+
y1: e.y1,
|
|
54
|
+
x2: e.x2,
|
|
55
|
+
y2: e.y2,
|
|
56
|
+
gradientUnits: "userSpaceOnUse",
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ r("stop", { stopColor: e.from }),
|
|
59
|
+
/* @__PURE__ */ r("stop", { offset: "1", stopColor: e.to })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
) })
|
|
63
|
+
}
|
|
64
|
+
), m = (y) => /* @__PURE__ */ B(f, { children: [
|
|
65
|
+
g,
|
|
66
|
+
y
|
|
67
|
+
] });
|
|
68
|
+
return /* @__PURE__ */ r(
|
|
69
|
+
d,
|
|
70
|
+
{
|
|
71
|
+
...u,
|
|
72
|
+
variant: o.Starter,
|
|
73
|
+
appearance: a,
|
|
74
|
+
iconBefore: t ? m(t) : void 0,
|
|
75
|
+
iconAfter: i && !t ? m(i) : i,
|
|
76
|
+
style: {
|
|
77
|
+
"--dial-kit-starter-icon-stroke": `url(#${c})`,
|
|
78
|
+
...s
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}, D = p(
|
|
83
|
+
n.Link,
|
|
84
|
+
o.Primary
|
|
85
|
+
), I = p(
|
|
86
|
+
n.Ghost,
|
|
87
|
+
o.Primary
|
|
88
|
+
), P = p(
|
|
89
|
+
n.Outlined,
|
|
90
|
+
o.Neutral
|
|
36
91
|
);
|
|
37
92
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
93
|
+
G as DangerButton,
|
|
94
|
+
I as GhostButton,
|
|
95
|
+
D as LinkButton,
|
|
96
|
+
C as NeutralButton,
|
|
97
|
+
P as OutlinedButton,
|
|
98
|
+
N as PrimaryButton,
|
|
99
|
+
O as StarterButton
|
|
44
100
|
};
|
|
@@ -17,6 +17,9 @@ const o = {
|
|
|
17
17
|
[i.Static]: {
|
|
18
18
|
[t.Solid]: "dial-kit-static-solid-button"
|
|
19
19
|
},
|
|
20
|
+
[i.Starter]: {
|
|
21
|
+
[t.Outlined]: "dial-kit-starter-outlined-button"
|
|
22
|
+
},
|
|
20
23
|
// TODO: remove these once we have a design for the icon button variants
|
|
21
24
|
[i.Success]: {},
|
|
22
25
|
[i.Secondary]: {},
|
|
@@ -1,110 +1,114 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { IconChevronDown as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Dropdown as
|
|
5
|
-
import { DIAL_KIT_ICON_STROKE as
|
|
6
|
-
import { DIAL_ICON_SIZE as
|
|
7
|
-
import { mergeClasses as
|
|
8
|
-
import { ElementSize as
|
|
9
|
-
import { DIAL_KIT_CLASS as
|
|
10
|
-
const
|
|
1
|
+
import { jsx as s, jsxs as E } from "react/jsx-runtime";
|
|
2
|
+
import { IconChevronDown as j } from "@tabler/icons-react";
|
|
3
|
+
import { useState as b, useCallback as v, useMemo as w } from "react";
|
|
4
|
+
import { Dropdown as z } from "../Dropdown/Dropdown.js";
|
|
5
|
+
import { DIAL_KIT_ICON_STROKE as M } from "../constants/icon.js";
|
|
6
|
+
import { DIAL_ICON_SIZE as U } from "../../../constants/icon.js";
|
|
7
|
+
import { mergeClasses as I } from "../../../utils/merge-classes.js";
|
|
8
|
+
import { ElementSize as $ } from "../../../types/size.js";
|
|
9
|
+
import { DIAL_KIT_CLASS as R } from "../../../constants/public-class-names.js";
|
|
10
|
+
const Z = ({
|
|
11
11
|
label: e,
|
|
12
|
-
size:
|
|
13
|
-
isOpen:
|
|
14
|
-
labelClassName:
|
|
15
|
-
className:
|
|
16
|
-
"aria-label":
|
|
17
|
-
...
|
|
12
|
+
size: l,
|
|
13
|
+
isOpen: n = !1,
|
|
14
|
+
labelClassName: a,
|
|
15
|
+
className: c,
|
|
16
|
+
"aria-label": t,
|
|
17
|
+
...m
|
|
18
18
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
return /* @__PURE__ */
|
|
19
|
+
const d = l === $.Small ? "h-[32px]" : "h-[40px] dial-kit-enhanced-target";
|
|
20
|
+
return /* @__PURE__ */ E(
|
|
21
21
|
"button",
|
|
22
22
|
{
|
|
23
23
|
type: "button",
|
|
24
|
-
...
|
|
24
|
+
...m,
|
|
25
25
|
"aria-haspopup": "menu",
|
|
26
|
-
"aria-expanded":
|
|
27
|
-
"aria-label":
|
|
28
|
-
className:
|
|
26
|
+
"aria-expanded": n,
|
|
27
|
+
"aria-label": t ? `${t} ${e}` : void 0,
|
|
28
|
+
className: I(
|
|
29
29
|
"dial-small-paragraph-text px-3 focus-visible:outline focus-visible:outline-focus",
|
|
30
30
|
"flex items-center gap-1 rounded-full text-primary disabled:text-control-disable-primary",
|
|
31
31
|
"hover:bg-control-accent-alpha-hover focus-visible:outline-offset-2 active:bg-control-accent-alpha-active",
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
d,
|
|
33
|
+
c,
|
|
34
|
+
R.inlineSelect
|
|
35
35
|
),
|
|
36
36
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
37
|
+
/* @__PURE__ */ s("span", { className: a, children: e }),
|
|
38
|
+
/* @__PURE__ */ s(
|
|
39
|
+
j,
|
|
40
40
|
{
|
|
41
|
-
size:
|
|
42
|
-
stroke:
|
|
41
|
+
size: U.MD,
|
|
42
|
+
stroke: M,
|
|
43
43
|
"aria-hidden": !0,
|
|
44
|
-
className:
|
|
44
|
+
className: I("transition-transform", n && "rotate-180")
|
|
45
45
|
}
|
|
46
46
|
)
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
|
-
},
|
|
50
|
+
}, W = ({
|
|
51
51
|
items: e,
|
|
52
|
-
selectedKey:
|
|
53
|
-
defaultSelectedKey:
|
|
54
|
-
onSelect:
|
|
55
|
-
size:
|
|
56
|
-
disabled:
|
|
57
|
-
placement:
|
|
58
|
-
matchReferenceWidth:
|
|
59
|
-
listClassName:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
selectedKey: l,
|
|
53
|
+
defaultSelectedKey: n,
|
|
54
|
+
onSelect: a,
|
|
55
|
+
size: c,
|
|
56
|
+
disabled: t,
|
|
57
|
+
placement: m = "bottom-end",
|
|
58
|
+
matchReferenceWidth: d = !1,
|
|
59
|
+
listClassName: C,
|
|
60
|
+
listStyle: S,
|
|
61
|
+
ariaLabel: g,
|
|
62
|
+
triggerClassName: x,
|
|
63
|
+
triggerLabelClassName: N,
|
|
64
|
+
open: p,
|
|
65
|
+
onOpenChange: u
|
|
64
66
|
}) => {
|
|
65
|
-
const [
|
|
66
|
-
(
|
|
67
|
-
|
|
67
|
+
const [k, y] = b(!1), r = p !== void 0, O = r ? p : k, _ = v(
|
|
68
|
+
(o) => {
|
|
69
|
+
r || y(o), u?.(o);
|
|
68
70
|
},
|
|
69
|
-
[
|
|
70
|
-
), [
|
|
71
|
-
|
|
72
|
-
),
|
|
73
|
-
const
|
|
74
|
-
return
|
|
75
|
-
}, [e,
|
|
76
|
-
({ key:
|
|
77
|
-
const
|
|
78
|
-
|
|
71
|
+
[r, u]
|
|
72
|
+
), [D, K] = b(
|
|
73
|
+
n ?? e[0]?.key
|
|
74
|
+
), f = l !== void 0, h = f ? l : D, A = w(() => {
|
|
75
|
+
const o = e.find((i) => i.key === h);
|
|
76
|
+
return o?.label ? String(o.label) : "";
|
|
77
|
+
}, [e, h]), L = v(
|
|
78
|
+
({ key: o }) => {
|
|
79
|
+
const i = e.find((T) => T.key === o);
|
|
80
|
+
i && (f || K(o), a?.(i));
|
|
79
81
|
},
|
|
80
|
-
[e,
|
|
82
|
+
[e, f, a]
|
|
81
83
|
);
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
|
|
84
|
+
return /* @__PURE__ */ s(
|
|
85
|
+
z,
|
|
84
86
|
{
|
|
85
87
|
items: e,
|
|
86
|
-
placement:
|
|
87
|
-
matchReferenceWidth:
|
|
88
|
-
listClassName:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
placement: m,
|
|
89
|
+
matchReferenceWidth: d,
|
|
90
|
+
listClassName: C,
|
|
91
|
+
listStyle: S,
|
|
92
|
+
disabled: t,
|
|
93
|
+
open: r ? p : void 0,
|
|
94
|
+
onOpenChange: _,
|
|
95
|
+
onItemClick: L,
|
|
96
|
+
children: /* @__PURE__ */ s(
|
|
97
|
+
Z,
|
|
94
98
|
{
|
|
95
|
-
label:
|
|
96
|
-
size:
|
|
97
|
-
isOpen:
|
|
98
|
-
disabled:
|
|
99
|
-
"aria-label":
|
|
100
|
-
className:
|
|
101
|
-
labelClassName:
|
|
99
|
+
label: A,
|
|
100
|
+
size: c,
|
|
101
|
+
isOpen: O,
|
|
102
|
+
disabled: t,
|
|
103
|
+
"aria-label": g,
|
|
104
|
+
className: x,
|
|
105
|
+
labelClassName: N
|
|
102
106
|
}
|
|
103
107
|
)
|
|
104
108
|
}
|
|
105
109
|
);
|
|
106
110
|
};
|
|
107
111
|
export {
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
W as InlineSelect,
|
|
113
|
+
Z as InlineSelectTrigger
|
|
110
114
|
};
|