@epam/ai-dial-ui-kit 0.15.0-dev.17 → 0.15.0-dev.19

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.
Files changed (33) hide show
  1. package/README.md +4 -0
  2. package/dist/CHANGELOG.md +2 -0
  3. package/dist/{DateCellRenderer-Cm09x2e4.cjs → DateCellRenderer-BZR0gzAZ.cjs} +22 -22
  4. package/dist/DateCellRenderer-Cm8zyHcC.cjs +1 -0
  5. package/dist/components/New/Dropdown/Dropdown.js +10 -10
  6. package/dist/components/New/FileIcon/FileIcon.js +55 -0
  7. package/dist/components/New/FileIcon/constants.js +134 -0
  8. package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
  9. package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
  10. package/dist/components/New/FileName/FileName.js +78 -0
  11. package/dist/components/New/FolderName/FolderName.js +16 -0
  12. package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
  13. package/dist/components-manifest.json +263 -7
  14. package/dist/constants/public-class-names.js +14 -0
  15. package/dist/dial-ui-kit.cjs +2 -2
  16. package/dist/dial-ui-kit.js +122 -114
  17. package/dist/file-manager.cjs +1 -1
  18. package/dist/grid.cjs +1 -1
  19. package/dist/index.css +1 -1
  20. package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
  21. package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
  22. package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
  23. package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
  24. package/dist/src/components/New/FileName/FileName.d.ts +79 -0
  25. package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
  26. package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
  27. package/dist/src/constants/public-class-names.d.ts +14 -0
  28. package/dist/src/index.d.ts +8 -0
  29. package/dist/src/utils/sub-menu-floating.d.ts +7 -4
  30. package/dist/{use-file-manager-tabs-DgIKWJoV.cjs → use-file-manager-tabs-wwM2gh2N.cjs} +1 -1
  31. package/dist/utils/sub-menu-floating.js +100 -56
  32. package/package.json +1 -1
  33. package/dist/DateCellRenderer-DX4hHj2a.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const t=require("react/jsx-runtime"),g=require("./DateCellRenderer-BZR0gzAZ.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-CVttu-k-.cjs"),pt=require("classnames");function Ct(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=Ct(a);var he=(e=>(e.Top="top",e.Right="right",e.Bottom="bottom",e.Left="left",e))(he||{});const gt=7,ht=2,xt=500,bt="fill-control-inverted",St="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},It=({initialOpen:e=!1,placement:s=he.Bottom,isTriggerClickable:n=!1,open:r,onOpenChange:i}={})=>{const[u,c]=a.useState(e),d=a.useRef(null),m=r??u,x=i??c,S=p.useFloating({placement:s,open:m,onOpenChange:x,whileElementsMounted:p.autoUpdate,middleware:[p.offset(gt+ht),p.flip({fallbackAxisSideDirection:"start",padding:5}),p.shift({padding:5}),p.arrow({element:d})]}),f=p.useHover(S.context,{move:!1,enabled:r==null,mouseOnly:n,delay:{open:xt,close:0}}),I=p.useFocus(S.context,{enabled:r==null}),E=p.useDismiss(S.context),A=p.useRole(S.context,{role:"tooltip"}),L=p.useInteractions([f,I,E,A]);return a.useEffect(()=>{if(!m)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()},[m,S.refs.reference,x]),a.useMemo(()=>({open:m,setOpen:x,arrowRef:d,...L,...S}),[m,x,L,S])},ke=({children:e,...s})=>{const n=It(s);return t.jsx(ze.Provider,{value:n,children:e})},Re=({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:pt(St,i,n.getFloatingProps(s).className,g.DIAL_KIT_CLASS.tooltip),children:[s.children,t.jsx(p.FloatingArrow,{ref:n.arrowRef,context:n.context,className:bt})]})})},we=({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 d=e.props;return a.cloneElement(e,r.getReferenceProps({...d,...n,className:h.mergeClasses(d.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 d=!e&&!!s;return t.jsxs(ke,{...c,children:[t.jsx(we,{asChild:r,className:i,children:n}),d&&t.jsx(Re,{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.Success]:{},[C.ButtonVariant.Secondary]:{},[C.ButtonVariant.Tertiary]:{}},Ke=(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])},Nt={[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",...d})=>{const m=h.mergeClasses("dial-kit-base-icon-button dial-kit-base-button",e&&Ke(e,s),Nt[n],r),x=t.jsx("button",{...d,type:c,className:m,"aria-label":C.resolveAccessibleName(d["aria-label"],u?.tooltip),children:i});return u?t.jsx(We,{asChild:!0,...u,children:x}):x},Ue=({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(Ue,{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}),$e=(e,s)=>({variant:r,...i})=>t.jsx(xe,{...i,variant:r||s,appearance:e}),vt=je(C.ButtonVariant.Primary,C.ButtonAppearance.Solid),Et=je(C.ButtonVariant.Neutral,C.ButtonAppearance.Solid),yt=je(C.ButtonVariant.Danger,C.ButtonAppearance.Ghost),qe=$e(C.ButtonAppearance.Ghost,C.ButtonVariant.Primary),Tt=$e(C.ButtonAppearance.Solid,C.ButtonVariant.Static),Xe=({ariaLabel:e="Close",className:s,size:n=C.ElementSize.Small,onClose:r,...i})=>t.jsx(qe,{...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"})}),_t=e=>{const s=a.useRef(null),[n,r]=a.useState(!1),[i,u]=a.useState(""),c=a.useRef(!1),d=a.useCallback(()=>{const x=s.current;x&&(c.current&&u(x.textContent??""),r(x.scrollWidth>x.clientWidth))},[]),m=a.useCallback(()=>g.scheduleMeasure(d),[d]);return a.useEffect(()=>{const x=s.current;if(x)return g.observeElementSize(x,d)},[d]),a.useEffect(()=>{c.current=typeof e!="string",m()},[e,m]),{ref:s,isTruncated:n,textContent:i,remeasure:m}},be=({text:e,className:s,contentClassName:n,hideTooltip:r=!1,id:i,customTooltipContent:u,...c})=>{const{ref:d,isTruncated:m,textContent:x,remeasure:S}=_t(e),f=typeof e=="string"?e:x,I=a.useMemo(()=>r||!m?null:u??f,[u,f,r,m]);return t.jsxs(ke,{...c,children:[t.jsx(we,{asChild:!0,onMouseEnter:S,onFocusCapture:S,children:t.jsx("span",{id:i,ref:d,"aria-label":m&&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(Re,{className:n,children:I})]})},At=8,Lt=400,kt="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:d,triggerClassName:m,contentClassName:x})=>{const S=g.useIsMobileScreen(),f=g.useThemeScope(),[I,E]=a.useState(u),A=c??I,L=j=>{d?.(j),c==null&&E(j)},y=p.useFloatingNodeId(),{refs:T,floatingStyles:O,context:R}=p.useFloating({nodeId:y,placement:s,open:A,onOpenChange:L,whileElementsMounted:p.autoUpdate,middleware:[p.offset(At),p.flip({padding:5}),p.shift({padding:5})]}),$=p.useHover(R,{enabled:c==null,handleClose:p.safePolygon(),delay:{open:Lt,close:0}}),w=p.useFocus(R,{enabled:c==null}),F=p.useDismiss(R),{getReferenceProps:V,getFloatingProps:v}=p.useInteractions([$,w,F]),q=a.useRef(null),Q=p.useMergeRefs(a.useMemo(()=>[T.setFloating,q],[T.setFloating])),X=r&&a.isValidElement(n),P=X?n.props?.ref:null,G=p.useMergeRefs(a.useMemo(()=>[T.setReference,...P?[P]:[]],[T.setReference,P])),k=!i&&!S&&!!e,D=X?a.cloneElement(n,V({...n.props,ref:G,className:h.mergeClasses(n.props.className,m)||void 0})):t.jsx("span",{ref:G,...V(),className:m??"text-start",children:n});return t.jsxs(t.Fragment,{children:[D,A&&k&&t.jsx(p.FloatingPortal,{id:"interactive-tooltip-portal",children:t.jsx(p.FloatingFocusManager,{context:R,modal:!1,initialFocus:-1,returnFocus:!1,order:["reference","content"],children:t.jsx("div",{ref:Q,"data-placement":R.placement,style:O,...v(),className:h.mergeClasses(kt,f,x,g.DIAL_KIT_CLASS.interactiveTooltip),children:e})})})]})},Ye="rounded-xl bg-layer-raised p-1 shadow-md",Me="flex flex-col gap-0.5",Je=h.mergeClasses(Ye,"w-max"),Qe=h.mergeClasses(Je,Me,"py-2"),et=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"),tt="bg-control-accent-alpha",Rt=h.mergeClasses(tt,"text-accent"),wt=h.mergeClasses("cursor-not-allowed text-control-disable-primary","bg-transparent hover:bg-transparent"),nt=4,Dt=h.mergeClasses("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),jt=h.mergeClasses("z-floating focus-visible:outline-none",Ye),Mt=Je,Ht=Qe,Ot=h.mergeClasses(Me,"py-1"),Bt="my-1 border-t border-tertiary",J=nt,Ft=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,d=!!i,m=h.mergeClasses("grid size-[20px] shrink-0 place-items-center rounded border transition-colors duration-200",d&&"dial-kit-minimum-target",d&&"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":d&&"cursor-pointer",u,g.DIAL_KIT_CLASS.checkboxBox),x=s?t.jsx(U.IconMinus,{...Ve}):e&&t.jsx(U.IconCheck,{...Ve});return d?t.jsx("label",{htmlFor:i,className:m,children:x}):t.jsx("span",{"aria-hidden":"true",className:m,children:x})},Vt=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:d,ellipsisLabel:m=!1,labelClassName:x,children:S,className:f,disabled:I=!1,type:E="button",...A})=>{const L=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(et,"aria-expanded:bg-control-accent-alpha-hover",L&&Rt,y&&tt,I&&wt,u&&"text-error",f,g.DIAL_KIT_CLASS.menuItem),R=t.jsxs("button",{type:E,disabled:I,"data-menu-item-row":d?"":void 0,className:d?"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}),m?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&&Vt]}),c&&t.jsx("span",{className:h.mergeClasses("ml-auto shrink-0",T),children:c})]});return d?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:[R,d]}):R},Ce=e=>e.mark??(e.selectable?H.Checkbox:H.None),st=e=>e.selectable?"menuitemcheckbox":Ce(e)===H.Check?"menuitemradio":"menuitem",Pt=({item:e,onRootClose:s})=>{const{isOpen:n,nodeId:r,refs:i,floatingStyles:u,context:c,getReferenceProps:d,getFloatingProps:m}=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:Ft,className:e.className,...d(),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:m,role:"menu",surfaceClassName:e.renderSubMenu?Mt:Ht,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=st(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)]})})]})},Gt='[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"]',zt=e=>!e.hasAttribute("disabled")&&e.getAttribute("aria-disabled")!=="true",Zt=["ArrowDown","ArrowUp","Home","End"],Wt=(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},Kt=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,rt=({children:e,items:s,onItemClick:n,menuHeader:r,menuFooter:i,renderOverlay:u,trigger:c=[g.DropdownTrigger.Click],placement:d,disabled:m=!1,open:x,defaultOpen:S=!1,onOpenChange:f,closable:I=!1,onClose:E,className:A,overlayContentClassName:L,separatorClassName:y,listClassName:T,listStyle:O,outsidePressIgnoreRef:R,outsideClosable:$=!0,allowedPlacements:w,anchorToMouse:F=!1,matchReferenceWidth:V=!0,maxDropdownHeight:v,initialFocus:q})=>{const Q=g.useThemeScope(),[X,P]=a.useState(S),G=x!==void 0,k=G?!!x:X,D=a.useRef(null),[j,se]=a.useState(!0),_=a.useCallback((l,o,b)=>{l&&se(b!=="hover"&&b!=="safe-polygon"),G||P(l),f?.(l)},[G,f]),re=a.useId(),Se=d===void 0,oe=p.useFloatingNodeId(),{refs:M,floatingStyles:K,context:z}=p.useFloating({nodeId:oe,placement:d,open:k,onOpenChange:_,whileElementsMounted:p.autoUpdate,middleware:[p.offset({mainAxis:J,crossAxis:0}),Se?p.autoPlacement({alignment:"start",crossAxis:!0,padding:J,allowedPlacements:w}):p.flip({padding:J}),p.shift({padding:J}),p.size({padding:J,apply({availableWidth:l,availableHeight:o,elements:b}){const N=b.floating,B=Kt(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)&&!m}),Ie=p.useHover(z,{enabled:c.includes(g.DropdownTrigger.Hover)&&!m,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!(R?.current&&o instanceof Node&&R.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)||m||(l.preventDefault(),F&&(Z(l.clientX,l.clientY),D.current=document.elementFromPoint(l.clientX,l.clientY)),_(!0))},[F,m,_,Z,c]),Ee=a.useCallback(l=>{!F||m||(c.includes(g.DropdownTrigger.ContextMenu)&&k&&_(!1),Z(l.clientX,l.clientY),D.current=document.elementFromPoint(l.clientX,l.clientY))},[F,m,Z,k,c,_]);a.useEffect(()=>{m&&k&&_(!1)},[m,k,_]);const ye=a.useCallback(l=>{if(l.defaultPrevented||!Zt.includes(l.key)||!l.currentTarget.contains(l.target))return;const o=Array.from(l.currentTarget.querySelectorAll(Gt)).filter(zt);if(o.length===0)return;l.preventDefault();const b=l.currentTarget.ownerDocument.activeElement,N=o.findIndex(B=>B===b);o[Wt(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(Ot,L,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(Bt,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(Pt,{item:l,onRootClose:()=>_(!1)},l.key);const o=Ce(l),b=st(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,_,L,y]),Te=Ne({onContextMenu:ve,onMouseDown:Ee});return a.useEffect(()=>{if(!k)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()},[k,M.reference,_]),t.jsx(p.FloatingTree,{children:t.jsxs(p.FloatingNode,{id:oe,children:[t.jsx("span",{ref:M.setReference,className:h.mergeClasses(Dt,m&&"!cursor-not-allowed opacity-75",A,g.DIAL_KIT_CLASS.dropdown),"aria-haspopup":"menu","aria-expanded":k,"aria-controls":re,...Te,children:e}),k&&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(jt,!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(Xe,{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:d,className:m,boxClassName:x,...S})=>{const f=a.useId(),I=e??f,E=d?`${I}-caption`:void 0,A=a.useCallback(y=>{c?.(y.target.checked)},[c]),L=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",m,g.DIAL_KIT_CLASS.checkbox),children:[t.jsx("input",{...S,ref:L,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)})]}),d&&t.jsx("span",{id:E,className:"dial-tiny-text text-secondary ml-[28px]",children:d})]})},ot=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"})),at=({id:e,name:s,value:n,labelProps:r,isSelected:i=!1,disabled:u,onChange:c,caption:d,className:m,...x})=>{const S=a.useId(),f=e??S,I=d?`${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 ",m,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)})]}),d&&t.jsx("span",{id:I,className:"dial-tiny-text text-secondary ml-[26px]",children:d})]})},Pe=32,lt=({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(ot,{width:Pe,height:Pe,"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})]}),ct="dial-kit-grid",Ut="dial-kit-grid-with-selection",$t="dial-kit-grid-without-header-borders",qt="dial-kit-grid-row-select",Xt="dial-kit-grid-header-select",Yt="dial-kit-grid-selection-visible",Jt="dial-kit-grid-align-right",Le=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 Qt=({params:e,mode:s,label:n,radioName:r,rowId:i,disabled:u})=>{const c=e.node,[d,m]=a.useState(()=>!!c.isSelected());a.useEffect(()=>{const S=()=>m(!!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(at,{name:r,value:i,isSelected:d,disabled:u,"aria-label":n,onChange:()=>x(!0)}):t.jsx(Oe,{isSelected:d,disabled:u,"aria-label":n,onChange:x})},Ge=e=>{let s=0,n=0;return e.forEachNodeAfterFilter(r=>{r.selectable!==!1&&(n++,r.isSelected()&&s++)}),{selected:s,selectable:n}},en=({api:e,label:s})=>{const[{selected:n,selectable:r},i]=a.useState(()=>Ge(e));a.useEffect(()=>{const c=()=>i(Ge(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})},it="en-US",ut={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},Ae=40,tn={minWidth:Ae,width:Ae,maxWidth:Ae,resizable:!1,sortable:!1,filter:!1,floatingFilter:!1,suppressMovable:!0,suppressHeaderMenuButton:!0,suppressAutoSize:!0,suppressSizeToFit:!0},dt="dial-kit-grid-selection",nn=150,sn=100,rn=({columnDefs:e,rowData:s,additionalGridOptions:n,getContextMenuItems:r,className:i,ariaLabel:u="Data grid",wrapCustomCellRenderers:c=!0,disabledRowIds:d,selectedRowIds:m,onSelectionChange:x,onGridApiChange:S,getRowId:f,alternateOddRowColors:I=!1,filterPlaceholder:E="Enter value",emptyStateIcon:A,emptyStateTitle:L="No results found",emptyStateDescription:y="Sorry, we couldn't find any results for your search.",loading:T=!1,wrapperBorder:O=!0,withoutHeaderBorders:R=!1,allowDisabledContextMenu:$=!1,selectionMode:w,selectRowLabel:F,selectAllLabel:V="Select all rows"})=>{g.registerAgGridModulesOnce();const[v,q]=a.useState(),Q=g.useIsMobileScreen(),X=g.useIsTabletScreen(),P=a.useRef(new Set),G=a.useRef(void 0),k=`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||(m?.size??0)>0,M=a.useCallback(o=>!!o&&!!d?.has(j(o)),[d,j]),K=a.useCallback((o,b,N)=>se?t.jsx(rt,{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));P.current=B,G.current=o.source,!Y(o.source)&&D.current.onSelectionChange?.(B,N)},sn),[Y,j]),ee=a.useMemo(()=>{if(w)return{...tn,colId:dt,headerName:"",headerClass:Xt,cellClass:qt,headerComponent:w===g.GridSelectionMode.MULTIPLE?en:void 0,headerComponentParams:{label:V},cellRenderer:o=>{if(!o.data)return null;const b=j(o.data);return t.jsx(Qt,{params:o,mode:w,rowId:b,radioName:k,label:D.current.selectRowLabel?.(o.data)??"Select row",disabled:d?.has(b)})}}},[w,V,j,d,k]),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 mt=M(ue.data),Be=typeof B=="function"?B:void 0,ft=Be?t.jsx(Be,{...ue}):z(ue);return K(ue,ft,mt)}}},[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:nn,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(lt,{live:!0,title:L,description:y,icon:A??t.jsx(U.IconZoomCancel,{size:100,stroke:.5,"aria-hidden":"true"})}),[L,y,A]),ie=typeof Z=="object"?Z:void 0,Te=a.useMemo(()=>w?{isRowSelectable:o=>!M(o.data),...ie,mode:w===g.GridSelectionMode.SINGLE?"singleRow":"multiRow",checkboxes:!1,headerCheckbox:!1}:Z,[Z,ie,M,w]);a.useEffect(()=>{v&&s&&P.current.size&&P.current.forEach(o=>{const b=v.getRowNode(o);b&&!b.isSelected()&&b.setSelected(!0,!1,W.API)})},[v,s]),a.useEffect(()=>{v&&m&&(v.deselectAll("all",W.API),m.forEach(o=>{const b=v.getRowNode(o);b&&!b.isSelected()&&b.setSelected(!0,!1,W.API)}))},[v,m]);const l=a.useCallback(o=>o.data?j(o.data):"",[j]);return a.useEffect(()=>{const o=Y(G.current);if(v&&m?.size&&o){const b=Array.from(m)[0];if(b){const N=v.getRowNode(b);N&&v.ensureNodeVisible(N)}}},[v,Y,m]),t.jsx("div",{className:h.mergeClasses(ct,"size-full",w&&Ut,w&&oe&&Yt,R&&$t,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:Le,rowHeight:Le,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})})})},on=({value:e,locale:s=it,options:n=ut,emptyPlaceholder:r,className:i,hideTooltip:u=!1})=>{const c=g.convertToDate(e),d=a.useMemo(()=>c?new Intl.DateTimeFormat(s,n).format(c):r,[c,r,s,n]),m=c?c.toISOString():void 0;return t.jsx(be,{text:m?t.jsx("time",{dateTime:m,children:d}):t.jsx("span",{children:d}),className:h.mergeClasses("dial-small-text text-primary",i),hideTooltip:u})};exports.Checkbox=Oe;exports.CheckboxBox=He;exports.CloseButton=Xe;exports.DEFAULT_DATE_FORMAT_OPTIONS=ut;exports.DEFAULT_LOCALE=it;exports.DangerIconButton=yt;exports.DateCellRenderer=on;exports.Dropdown=rt;exports.EllipsisTooltip=be;exports.GRID_ALIGN_RIGHT_CLASS=Jt;exports.GRID_ROOT_CLASS=ct;exports.GRID_SELECTION_COLUMN_ID=dt;exports.GRID_THEME_PARAMS=me;exports.GhostIconButton=qe;exports.Grid=rn;exports.IconButton=xe;exports.InfoButton=Ue;exports.InteractiveTooltip=fe;exports.Label=De;exports.MenuItem=pe;exports.MenuItemMark=H;exports.NeutralIconButton=Et;exports.NoDataContent=lt;exports.PrimaryIconButton=vt;exports.ROW_HEIGHT=Le;exports.Radio=at;exports.StaticIconButton=Tt;exports.SvgNoData=ot;exports.Tooltip=We;exports.TooltipContainer=ke;exports.TooltipContent=Re;exports.TooltipPlacement=he;exports.TooltipTrigger=we;exports.getButtonClassNames=Ke;exports.overlayGap=nt;exports.overlayItemClassName=et;exports.overlayListClassName=Me;exports.overlaySubMenuListClassName=Qe;
@@ -1,5 +1,5 @@
1
1
  import { jsxs as N, Fragment as A, jsx as n } from "react/jsx-runtime";
2
- import { useFloatingNodeId as ye, useFloating as we, autoUpdate as ve, offset as xe, autoPlacement as Ce, flip as ke, shift as be, size as Ie, useClick as Pe, useHover as Ee, safePolygon as Ne, useDismiss as Ae, useRole as De, useInteractions as Me, FloatingTree as Fe, FloatingNode as Oe, FloatingPortal as Te, FloatingFocusManager as Re } from "@floating-ui/react";
2
+ import { useFloatingNodeId as ye, useFloating as we, autoUpdate as ve, offset as xe, autoPlacement as Ce, flip as ke, shift as be, size as Ie, useClick as Pe, useHover as Ee, safePolygon as Ne, useDismiss as Ae, useRole as De, useInteractions as Me, FloatingTree as Fe, FloatingNode as Te, FloatingPortal as Oe, FloatingFocusManager as Re } from "@floating-ui/react";
3
3
  import { useState as j, useRef as Le, useCallback as m, useId as Se, useEffect as U, useMemo as _e, Fragment as $e } from "react";
4
4
  import { InteractiveTooltip as Be } from "../InteractiveTooltip/InteractiveTooltip.js";
5
5
  import { DIAL_KIT_CLASS as V } from "../../../constants/public-class-names.js";
@@ -33,8 +33,8 @@ const Je = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
33
33
  closable: z = !1,
34
34
  onClose: G,
35
35
  className: H,
36
- overlayContentClassName: O,
37
- separatorClassName: T,
36
+ overlayContentClassName: T,
37
+ separatorClassName: O,
38
38
  listClassName: J,
39
39
  listStyle: R,
40
40
  outsidePressIgnoreRef: L,
@@ -140,7 +140,7 @@ const Je = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
140
140
  }, [i, c, o]);
141
141
  const me = m(
142
142
  (e) => {
143
- if (e.defaultPrevented || !Ze.includes(e.key)) return;
143
+ if (e.defaultPrevented || !Ze.includes(e.key) || !e.currentTarget.contains(e.target)) return;
144
144
  const t = Array.from(
145
145
  e.currentTarget.querySelectorAll(
146
146
  Je
@@ -165,7 +165,7 @@ const Je = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
165
165
  role: "none",
166
166
  className: v(
167
167
  We,
168
- O,
168
+ T,
169
169
  V.dropdownList
170
170
  ),
171
171
  "aria-label": "dropdown",
@@ -177,7 +177,7 @@ const Je = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
177
177
  role: "separator",
178
178
  className: v(
179
179
  Ke,
180
- T
180
+ O
181
181
  )
182
182
  },
183
183
  e.key
@@ -243,8 +243,8 @@ const Je = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
243
243
  a,
244
244
  I,
245
245
  o,
246
- O,
247
- T
246
+ T,
247
+ O
248
248
  ]), ge = de({
249
249
  onContextMenu: fe,
250
250
  onMouseDown: pe
@@ -261,7 +261,7 @@ const Je = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
261
261
  { root: null, threshold: 0 }
262
262
  );
263
263
  return r.observe(t), () => r.disconnect();
264
- }, [c, p.reference, o]), /* @__PURE__ */ n(Fe, { children: /* @__PURE__ */ N(Oe, { id: B, children: [
264
+ }, [c, p.reference, o]), /* @__PURE__ */ n(Fe, { children: /* @__PURE__ */ N(Te, { id: B, children: [
265
265
  /* @__PURE__ */ n(
266
266
  "span",
267
267
  {
@@ -279,7 +279,7 @@ const Je = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
279
279
  children: l
280
280
  }
281
281
  ),
282
- c && /* @__PURE__ */ n(Te, { children: /* @__PURE__ */ n(
282
+ c && /* @__PURE__ */ n(Oe, { children: /* @__PURE__ */ n(
283
283
  Re,
284
284
  {
285
285
  context: g,
@@ -0,0 +1,55 @@
1
+ import { jsxs as b, jsx as l } from "react/jsx-runtime";
2
+ import { SharedEntityIndicator as x } from "../SharedEntityIndicator/SharedEntityIndicator.js";
3
+ import { Spinner as g } from "../../Spinner/Spinner.js";
4
+ import { DIAL_ICON_SIZE as y } from "../../../constants/icon.js";
5
+ import { DIAL_KIT_CLASS as C } from "../../../constants/public-class-names.js";
6
+ import { DialItemType as t } from "../../../types/item.js";
7
+ import { mergeClasses as f } from "../../../utils/merge-classes.js";
8
+ import { getFileGlyphKind as D } from "./constants.js";
9
+ import { FileGlyph as S } from "./icons/FileGlyph.js";
10
+ import { FolderGlyph as G } from "./icons/FolderGlyph.js";
11
+ const N = (e, r) => (r ?? (e.includes(".") ? e.split(".").pop() : "") ?? "").trim().replace(/^\./, "").toLowerCase(), _ = (e, r) => e === t.Folder ? "Folder" : r ? `${r.toUpperCase()} file` : "File", j = (e, r, o) => e === t.Folder ? /* @__PURE__ */ l(G, { size: o }) : /* @__PURE__ */ l(S, { size: o, kind: D(r) }), P = ({
12
+ type: e,
13
+ name: r,
14
+ fileExtension: o,
15
+ shared: i = !1,
16
+ loading: n = !1,
17
+ size: a = y.MD,
18
+ className: c,
19
+ decorative: p = !1,
20
+ label: d,
21
+ loadingLabel: u = "Loading",
22
+ sharedIndicatorClassName: F,
23
+ sharedIndicatorTooltip: I
24
+ }) => {
25
+ if (e !== t.File && e !== t.Folder)
26
+ return null;
27
+ const s = e === t.File ? N(r, o) : "", m = _(e, s), h = d ?? (i ? `${m}, shared` : m), L = p ? { "aria-hidden": !0 } : n ? {} : { role: "img", "aria-label": h };
28
+ return /* @__PURE__ */ b(
29
+ "span",
30
+ {
31
+ className: f(
32
+ "relative inline-flex shrink-0 items-center justify-center text-secondary",
33
+ c,
34
+ C.fileIcon
35
+ ),
36
+ ...L,
37
+ children: [
38
+ n ? /* @__PURE__ */ l(g, { size: a, ariaLabel: u }) : j(e, s, a),
39
+ i && /* @__PURE__ */ l(
40
+ x,
41
+ {
42
+ tooltip: I,
43
+ className: f(
44
+ "absolute -bottom-0.5 -left-0.5",
45
+ F
46
+ )
47
+ }
48
+ )
49
+ ]
50
+ }
51
+ );
52
+ };
53
+ export {
54
+ P as FileIcon
55
+ };
@@ -0,0 +1,134 @@
1
+ var a = /* @__PURE__ */ ((s) => (s.Images = "images", s.Video = "video", s.Audio = "audio", s.Code = "code", s.Text = "text", s.Pdf = "pdf", s.Spreadsheet = "spreadsheet", s.Presentation = "presentation", s.Archive = "archive", s.Dial = "dial", s.Other = "other", s))(a || {});
2
+ const o = {
3
+ images: [
4
+ "apng",
5
+ "avif",
6
+ "bmp",
7
+ "gif",
8
+ "heic",
9
+ "heif",
10
+ "ico",
11
+ "jpeg",
12
+ "jpg",
13
+ "png",
14
+ "svg",
15
+ "tif",
16
+ "tiff",
17
+ "webp"
18
+ ],
19
+ video: [
20
+ "avi",
21
+ "flv",
22
+ "m4v",
23
+ "mkv",
24
+ "mov",
25
+ "mp4",
26
+ "mpeg",
27
+ "mpg",
28
+ "ogv",
29
+ "webm",
30
+ "wmv"
31
+ ],
32
+ audio: [
33
+ "aac",
34
+ "aiff",
35
+ "flac",
36
+ "m4a",
37
+ "mid",
38
+ "midi",
39
+ "mp3",
40
+ "oga",
41
+ "ogg",
42
+ "opus",
43
+ "wav",
44
+ "wma"
45
+ ],
46
+ // Source files, markup, stylesheets, scripts and structured config.
47
+ code: [
48
+ "bash",
49
+ "c",
50
+ "cjs",
51
+ "cpp",
52
+ "cs",
53
+ "css",
54
+ "go",
55
+ "h",
56
+ "hpp",
57
+ "htm",
58
+ "html",
59
+ "ini",
60
+ "ipynb",
61
+ "java",
62
+ "js",
63
+ "json",
64
+ "jsx",
65
+ "kt",
66
+ "less",
67
+ "lua",
68
+ "mjs",
69
+ "php",
70
+ "ps1",
71
+ "py",
72
+ "r",
73
+ "rb",
74
+ "rs",
75
+ "sass",
76
+ "scala",
77
+ "scss",
78
+ "sh",
79
+ "sql",
80
+ "svelte",
81
+ "swift",
82
+ "toml",
83
+ "ts",
84
+ "tsx",
85
+ "vue",
86
+ "xml",
87
+ "yaml",
88
+ "yml",
89
+ "zsh"
90
+ ],
91
+ // Prose and documents.
92
+ text: [
93
+ "doc",
94
+ "docx",
95
+ "log",
96
+ "markdown",
97
+ "md",
98
+ "odt",
99
+ "rtf",
100
+ "text",
101
+ "txt"
102
+ ],
103
+ pdf: ["pdf"],
104
+ spreadsheet: [
105
+ "csv",
106
+ "numbers",
107
+ "ods",
108
+ "tsv",
109
+ "xls",
110
+ "xlsm",
111
+ "xlsx"
112
+ ],
113
+ presentation: ["key", "odp", "pps", "ppsx", "ppt", "pptx"],
114
+ archive: [
115
+ "7z",
116
+ "bz2",
117
+ "gz",
118
+ "rar",
119
+ "tar",
120
+ "tgz",
121
+ "xz",
122
+ "zip"
123
+ ],
124
+ // TODO: confirm with design which DIAL entities draw this glyph.
125
+ dial: ["dial"]
126
+ }, p = new Map(
127
+ Object.entries(o).flatMap(
128
+ ([s, t]) => t.map((e) => [e, s])
129
+ )
130
+ ), m = (s) => p.get(s) ?? "other";
131
+ export {
132
+ a as FileGlyphKind,
133
+ m as getFileGlyphKind
134
+ };
@@ -0,0 +1,150 @@
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { useId as h } from "react";
3
+ import { FileGlyphKind as C } from "../constants.js";
4
+ const n = "var(--text-control-permanent, #FCFCFC)", r = {
5
+ x1: "20.4167",
6
+ y1: "-3.33333",
7
+ x2: "2.5",
8
+ y2: "20",
9
+ from: "var(--bg-visual-blue, #D6EDF9)",
10
+ to: "var(--stroke-gradient-1, #5976E9)"
11
+ }, l = "#1B212D", d = {
12
+ [C.Images]: {
13
+ path: "M11.0002 8.66667H11.0036M7.00024 11.3333L8.66691 9.66667C8.97624 9.369 9.35758 9.369 9.66691 9.66667L11.3336 11.3333M10.6669 10.6667L11.0002 10.3333C11.3096 10.0357 11.6909 10.0357 12.0002 10.3333L13.0002 11.3333M7.00024 8C7.00024 7.73478 7.1056 7.48043 7.29314 7.29289C7.48067 7.10536 7.73503 7 8.00024 7H12.0002C12.2655 7 12.5198 7.10536 12.7074 7.29289C12.8949 7.48043 13.0002 7.73478 13.0002 8V12C13.0002 12.2652 12.8949 12.5196 12.7074 12.7071C12.5198 12.8946 12.2655 13 12.0002 13H8.00024C7.73503 13 7.48067 12.8946 7.29314 12.7071C7.1056 12.5196 7.00024 12.2652 7.00024 12V8Z",
14
+ sheet: r
15
+ },
16
+ [C.Code]: {
17
+ path: "M8.33358 8.66665L7.00024 9.99998L8.33358 11.3333M11.6669 8.66665L13.0002 9.99998L11.6669 11.3333M10.6669 7.33331L9.33358 12.6666",
18
+ sheet: {
19
+ x1: "16.6667",
20
+ y1: "0",
21
+ x2: "2.08333",
22
+ y2: "20.4167",
23
+ from: "var(--bg-control-inverted, #57647A)",
24
+ to: l
25
+ }
26
+ },
27
+ [C.Text]: {
28
+ path: "M7.3335 8H12.6668M7.3335 10H12.6668M7.3335 12H11.3335",
29
+ sheet: {
30
+ x1: "25.8333",
31
+ y1: "-11.6667",
32
+ x2: "2.5",
33
+ y2: "20",
34
+ from: "var(--bg-visual-violet-1, #DDE3F9)",
35
+ to: "var(--bg-gradient-1, #1D4ED8)"
36
+ }
37
+ },
38
+ [C.Spreadsheet]: {
39
+ path: "M7.33325 10.1667H12.6666M9.99992 7.5V12.8333M7.33325 8.16667C7.33325 7.98986 7.40349 7.82029 7.52851 7.69526C7.65354 7.57024 7.82311 7.5 7.99992 7.5H11.9999C12.1767 7.5 12.3463 7.57024 12.4713 7.69526C12.5963 7.82029 12.6666 7.98986 12.6666 8.16667V12.1667C12.6666 12.3435 12.5963 12.513 12.4713 12.6381C12.3463 12.7631 12.1767 12.8333 11.9999 12.8333H7.99992C7.82311 12.8333 7.65354 12.7631 7.52851 12.6381C7.40349 12.513 7.33325 12.3435 7.33325 12.1667V8.16667Z",
40
+ sheet: {
41
+ x1: "20.4167",
42
+ y1: "-3.75",
43
+ x2: "2.91667",
44
+ y2: "20.4167",
45
+ from: "var(--bg-visual-green-1, #CDE8E5)",
46
+ to: "var(--text-visual-green-1, #059669)"
47
+ }
48
+ },
49
+ [C.Pdf]: {
50
+ fillPath: "M12.5373 10.3151C12.0382 10.3151 11.4137 10.4021 11.2094 10.4328C10.3637 9.54967 10.1231 9.04771 10.069 8.91388C10.1423 8.72544 10.3975 8.0096 10.4338 7.09022C10.4517 6.62991 10.3544 6.28596 10.1447 6.06792C9.93533 5.85024 9.68191 5.83331 9.60924 5.83331C9.35443 5.83331 8.92697 5.96216 8.92697 6.82503C8.92697 7.5737 9.27603 8.36813 9.37252 8.57339C8.86416 10.0536 8.31837 11.0669 8.20248 11.2753C6.15974 12.0444 6 12.788 6 12.9988C6 13.3775 6.26973 13.6036 6.72152 13.6036C7.8192 13.6036 8.8209 11.7607 8.98653 11.4407C9.76614 11.1301 10.8096 10.9377 11.0749 10.8918C11.8357 11.6166 12.7157 11.81 13.0811 11.81C13.3561 11.81 14 11.81 14 11.148C14 10.5332 13.2121 10.3151 12.5373 10.3151ZM12.4844 10.7497C13.0773 10.7497 13.234 10.9458 13.234 11.0494C13.234 11.1145 13.2093 11.3268 12.8915 11.3268C12.6065 11.3268 12.1145 11.1621 11.6303 10.8047C11.8322 10.7782 12.131 10.7497 12.4844 10.7497ZM9.57812 6.25458C9.63218 6.25458 9.66777 6.27195 9.69711 6.31264C9.86764 6.54926 9.73014 7.32242 9.56279 7.92745C9.40124 7.40867 9.28 6.61264 9.45058 6.33259C9.48392 6.27793 9.52204 6.25458 9.57812 6.25458ZM9.29017 10.8856C9.50483 10.452 9.74542 9.81997 9.87646 9.46253C10.1387 9.90147 10.4914 10.309 10.6954 10.53C10.0603 10.6639 9.57969 10.7976 9.29017 10.8856ZM6.4264 13.0566C6.41226 13.0399 6.41017 13.0045 6.42083 12.9621C6.44317 12.8731 6.61396 12.4322 7.84924 11.8796C7.67236 12.1582 7.39585 12.5563 7.09208 12.8537C6.87825 13.0538 6.71174 13.1553 6.59719 13.1553C6.55621 13.1553 6.49974 13.1442 6.4264 13.0566Z",
51
+ sheet: {
52
+ x1: "26.25",
53
+ y1: "-11.6667",
54
+ x2: "2.5",
55
+ y2: "20",
56
+ from: "var(--bg-visual-red, #FCE7F3)",
57
+ to: "var(--bg-control-error-active, #CC4545)"
58
+ }
59
+ },
60
+ [C.Audio]: {
61
+ path: "M9 11.5C9 11.7652 8.89464 12.0195 8.70711 12.2071C8.51957 12.3946 8.26522 12.5 8 12.5C7.73478 12.5 7.48043 12.3946 7.29289 12.2071C7.10536 12.0195 7 11.7652 7 11.5C7 11.2347 7.10536 10.9804 7.29289 10.7929C7.48043 10.6053 7.73478 10.5 8 10.5C8.26522 10.5 8.51957 10.6053 8.70711 10.7929C8.89464 10.9804 9 11.2347 9 11.5ZM9 11.5V7.16663H12.3333V11.5M12.3333 11.5C12.3333 11.7652 12.228 12.0195 12.0404 12.2071C11.8529 12.3946 11.5985 12.5 11.3333 12.5C11.0681 12.5 10.8138 12.3946 10.6262 12.2071C10.4387 12.0195 10.3333 11.7652 10.3333 11.5C10.3333 11.2347 10.4387 10.9804 10.6262 10.7929C10.8138 10.6053 11.0681 10.5 11.3333 10.5C11.5985 10.5 11.8529 10.6053 12.0404 10.7929C12.228 10.9804 12.3333 11.2347 12.3333 11.5ZM9 8.49996H12.3333",
62
+ sheet: r
63
+ },
64
+ [C.Video]: {
65
+ path: "M9.99996 13.1667C11.8409 13.1667 13.3333 11.6743 13.3333 9.83333C13.3333 7.99238 11.8409 6.5 9.99996 6.5C8.15901 6.5 6.66663 7.99238 6.66663 9.83333C6.66663 11.6743 8.15901 13.1667 9.99996 13.1667ZM9.33337 8.5L11.3334 9.83333L9.33337 11.1667V8.5Z",
66
+ sheet: r
67
+ },
68
+ [C.Presentation]: {
69
+ path: "M7 7.33331H13M7.33333 7.33331V10.6666C7.33333 10.8435 7.40357 11.013 7.5286 11.1381C7.65362 11.2631 7.82319 11.3333 8 11.3333H12C12.1768 11.3333 12.3464 11.2631 12.4714 11.1381C12.5964 11.013 12.6667 10.8435 12.6667 10.6666V7.33331M10 11.3333V12.6666M9 12.6666H11M8.66667 9.99998L9.66667 8.99998L10.3333 9.66665L11.3333 8.66665",
70
+ sheet: {
71
+ x1: "24.5",
72
+ y1: "-9.5",
73
+ x2: "2.5",
74
+ y2: "20",
75
+ from: "var(--bg-visual-brown, #FDE8D8)",
76
+ to: "var(--text-visual-brown-2, #B45309)"
77
+ }
78
+ },
79
+ [C.Archive]: {
80
+ path: "M10.0001 6.66669H9.58341M10.8334 7.451H10.4167M10.0001 8.23531H9.58341M10.8334 9.01963H10.4167M10.0001 9.80394H9.58341M10.8334 10.5883H10.4167M10.0001 11.3726C10.2211 11.3726 10.4331 11.4552 10.5893 11.6023C10.7456 11.7494 10.8334 11.9489 10.8334 12.1569V12.9412C10.8334 13.0452 10.7895 13.1449 10.7114 13.2185C10.6332 13.292 10.5273 13.3334 10.4167 13.3334H9.58341C9.47291 13.3334 9.36693 13.292 9.28879 13.2185C9.21065 13.1449 9.16675 13.0452 9.16675 12.9412V12.1569C9.16675 11.9489 9.25455 11.7494 9.41083 11.6023C9.56711 11.4552 9.77907 11.3726 10.0001 11.3726Z",
81
+ sheet: {
82
+ x1: "24.5",
83
+ y1: "-9.5",
84
+ x2: "2.5",
85
+ y2: "20",
86
+ from: "var(--bg-visual-green-1, #CDE8E5)",
87
+ to: "var(--text-visual-green-3, #065F46)"
88
+ }
89
+ },
90
+ [C.Dial]: {
91
+ path: "M8.26392 7.44049C8.80816 7.44049 9.28449 7.50578 9.69653 7.63092L9.69849 7.6319C10.1079 7.75343 10.4556 7.938 10.7463 8.1817L10.7483 8.18365C11.0312 8.41601 11.2537 8.72491 11.4104 9.12115V9.12213C11.5666 9.51456 11.6496 9.98403 11.6497 10.5381C11.6497 11.5957 11.3539 12.3492 10.8108 12.8565C10.2602 13.3708 9.47204 13.6504 8.39868 13.6505H6.71313V7.44049H8.26392Z",
92
+ fillPath: "M12.7167 12.1008L12.9558 12.3564L12.9558 12.3564L12.7167 12.1008ZM11.4504 6.20825L11.3486 6.54311L11.3507 6.54375L11.4504 6.20825ZM12.637 6.833L12.4119 7.10109L12.4147 7.10334L12.637 6.833ZM13.4108 7.9263L13.0853 8.05488L13.0856 8.05566L13.4108 7.9263ZM11.1666 12.8853L11.0909 12.5436V12.5436L11.1666 12.8853ZM10.4391 12.6553C10.2487 12.689 10.1217 12.8706 10.1553 13.0609C10.189 13.2513 10.3706 13.3783 10.5609 13.3447L10.5 13L10.4391 12.6553ZM13.6781 9.49291H13.3281C13.3281 10.5655 13.0283 11.33 12.4776 11.8451L12.7167 12.1008L12.9558 12.3564C13.687 11.6724 14.0281 10.6984 14.0281 9.49291H13.6781ZM7.9751 6.12805H8.3251C8.3251 6.24476 8.23053 6.35 8.1009 6.35V6V5.65C7.83231 5.65 7.6251 5.86989 7.6251 6.12805H7.9751ZM8.1009 6V6.35H9.89799V6V5.65H8.1009V6ZM9.89799 6V6.35C10.449 6.35 10.9312 6.41618 11.3486 6.54311L11.4504 6.20825L11.5522 5.87339C11.0566 5.72265 10.5039 5.65 9.89799 5.65V6ZM11.4504 6.20825L11.3507 6.54375C11.7654 6.66701 12.1173 6.85376 12.4119 7.10107L12.637 6.833L12.862 6.56492C12.4875 6.2506 12.0484 6.02084 11.5501 5.87275L11.4504 6.20825ZM12.637 6.833L12.4147 7.10334C12.7016 7.33926 12.9264 7.65273 13.0853 8.05488L13.4108 7.9263L13.7363 7.79772C13.5387 7.29746 13.2477 6.88206 12.8593 6.56265L12.637 6.833ZM13.4108 7.9263L13.0856 8.05566C13.2441 8.45409 13.3281 8.93071 13.3281 9.49291H13.6781H14.0281C14.0281 8.86239 13.934 8.29465 13.736 7.79694L13.4108 7.9263ZM7.9751 7.21882H8.3251V6.12805H7.9751H7.6251V7.21882H7.9751ZM12.7167 12.1008L12.4776 11.8451C12.117 12.1824 11.6591 12.4177 11.0909 12.5436L11.1666 12.8853L11.2423 13.227C11.9168 13.0776 12.4923 12.7898 12.9558 12.3564L12.7167 12.1008ZM11.1666 12.8853L11.0909 12.5436C11.091 12.5435 11.0826 12.5452 11.0606 12.5493C11.041 12.5528 11.0155 12.5573 10.9857 12.5625C10.926 12.5729 10.8511 12.5857 10.7756 12.5984C10.6269 12.6236 10.472 12.6495 10.4391 12.6553L10.5 13L10.5609 13.3447C10.6064 13.3366 11.1725 13.2425 11.2423 13.227L11.1666 12.8853Z",
93
+ sheet: "var(--bg-gradient-2, #885DF2)"
94
+ },
95
+ [C.Other]: {
96
+ path: "M6.80005 8H13.2M6.80005 10.2222H13.2M6.80005 12.4444H13.2",
97
+ sheet: r
98
+ }
99
+ }, V = ({ size: o, kind: H }) => {
100
+ const a = `dial-kit-file-gradient-${h().replace(/[^\w-]/g, "")}`, { path: L, fillPath: M, sheet: t } = d[H], i = typeof t == "string";
101
+ return /* @__PURE__ */ s(
102
+ "svg",
103
+ {
104
+ width: o,
105
+ height: o,
106
+ viewBox: "0 0 20 20",
107
+ fill: "none",
108
+ xmlns: "http://www.w3.org/2000/svg",
109
+ "aria-hidden": "true",
110
+ children: [
111
+ /* @__PURE__ */ e(
112
+ "path",
113
+ {
114
+ d: "M17.4999 3.97859V16C17.4999 18.2091 15.709 20 13.4999 20H6.5C4.29086 20 2.5 18.2091 2.5 16V4C2.5 1.79086 4.29086 0 6.5 0H13.1683H13.5213C15.7186 0 17.4999 1.78128 17.4999 3.97859Z",
115
+ fill: i ? t : `url(#${a})`
116
+ }
117
+ ),
118
+ L && /* @__PURE__ */ e(
119
+ "path",
120
+ {
121
+ d: L,
122
+ stroke: n,
123
+ strokeWidth: "0.7",
124
+ strokeLinecap: "round",
125
+ strokeLinejoin: "round"
126
+ }
127
+ ),
128
+ M && /* @__PURE__ */ e("path", { d: M, fill: n }),
129
+ !i && /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ s(
130
+ "linearGradient",
131
+ {
132
+ id: a,
133
+ x1: t.x1,
134
+ y1: t.y1,
135
+ x2: t.x2,
136
+ y2: t.y2,
137
+ gradientUnits: "userSpaceOnUse",
138
+ children: [
139
+ /* @__PURE__ */ e("stop", { stopColor: t.from }),
140
+ /* @__PURE__ */ e("stop", { offset: "1", stopColor: t.to })
141
+ ]
142
+ }
143
+ ) })
144
+ ]
145
+ }
146
+ );
147
+ };
148
+ export {
149
+ V as FileGlyph
150
+ };
@@ -0,0 +1,50 @@
1
+ import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
+ import { useId as i } from "react";
3
+ const n = ({ size: e }) => {
4
+ const t = `dial-kit-folder-gradient-${i().replace(/[^\w-]/g, "")}`;
5
+ return /* @__PURE__ */ o(
6
+ "svg",
7
+ {
8
+ width: e,
9
+ height: e,
10
+ viewBox: "0 0 20 20",
11
+ fill: "none",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ "aria-hidden": "true",
14
+ children: [
15
+ /* @__PURE__ */ r(
16
+ "path",
17
+ {
18
+ d: "M6.38992 3.75H4.66663C3.00977 3.75 1.66663 5.09315 1.66663 6.75V7.91667H7.16339L10.8333 5.79247L7.85075 4.1297C7.40412 3.8807 6.90127 3.75 6.38992 3.75Z",
19
+ fill: "var(--stroke-gradient-1, #5976E9)"
20
+ }
21
+ ),
22
+ /* @__PURE__ */ r(
23
+ "path",
24
+ {
25
+ d: "M14.3333 5.41669C16.5424 5.41669 18.3333 7.20755 18.3333 9.41669V12.25C18.3333 14.4592 16.5424 16.25 14.3333 16.25H5.66663C3.45749 16.25 1.66663 14.4592 1.66663 12.25V7.6708C1.66663 7.11851 2.11434 6.6708 2.66663 6.6708H6.89447C7.43998 6.6708 7.97973 6.55922 8.48053 6.34291L9.86582 5.74458C10.3666 5.52827 10.9064 5.41669 11.4519 5.41669H14.3333Z",
26
+ fill: `url(#${t})`
27
+ }
28
+ ),
29
+ /* @__PURE__ */ r("defs", { children: /* @__PURE__ */ o(
30
+ "linearGradient",
31
+ {
32
+ id: t,
33
+ x1: "17.0833",
34
+ y1: "5.83335",
35
+ x2: "9.38489",
36
+ y2: "19.6653",
37
+ gradientUnits: "userSpaceOnUse",
38
+ children: [
39
+ /* @__PURE__ */ r("stop", { stopColor: "var(--stroke-secondary, #D1DBEA)" }),
40
+ /* @__PURE__ */ r("stop", { offset: "0.91", stopColor: "var(--stroke-gradient-1, #5976E9)" })
41
+ ]
42
+ }
43
+ ) })
44
+ ]
45
+ }
46
+ );
47
+ };
48
+ export {
49
+ n as FolderGlyph
50
+ };
@@ -0,0 +1,78 @@
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { EllipsisTooltip as T } from "../EllipsisTooltip/EllipsisTooltip.js";
3
+ import { FileIcon as g } from "../FileIcon/FileIcon.js";
4
+ import { DIAL_KIT_CLASS as v } from "../../../constants/public-class-names.js";
5
+ import { DialItemType as w } from "../../../types/item.js";
6
+ import { mergeClasses as l } from "../../../utils/merge-classes.js";
7
+ const D = ({
8
+ name: s,
9
+ type: o = w.File,
10
+ fileExtension: t,
11
+ shared: i = !1,
12
+ loading: m = !1,
13
+ loadingLabel: p,
14
+ iconSize: f,
15
+ details: r,
16
+ isInvalidName: c = !1,
17
+ className: n,
18
+ nameClassName: x,
19
+ sharedIndicatorClassName: d,
20
+ sharedIndicatorTooltip: N,
21
+ sharedLabel: h = "Shared",
22
+ hideTooltip: y = !1,
23
+ tooltipContent: I
24
+ }) => /* @__PURE__ */ a(
25
+ "div",
26
+ {
27
+ className: l(
28
+ "flex w-full min-w-0 items-center gap-2",
29
+ n,
30
+ v.fileName
31
+ ),
32
+ children: [
33
+ /* @__PURE__ */ e(
34
+ g,
35
+ {
36
+ name: s,
37
+ type: o,
38
+ fileExtension: t,
39
+ shared: i,
40
+ loading: m,
41
+ loadingLabel: p,
42
+ size: f,
43
+ sharedIndicatorClassName: d,
44
+ sharedIndicatorTooltip: N,
45
+ decorative: !m
46
+ }
47
+ ),
48
+ /* @__PURE__ */ a(
49
+ "div",
50
+ {
51
+ className: l("flex min-w-0 flex-1", {
52
+ "flex-col gap-1": !!r
53
+ }),
54
+ children: [
55
+ /* @__PURE__ */ e(
56
+ T,
57
+ {
58
+ className: l(
59
+ "dial-small-paragraph-text",
60
+ c ? "text-secondary" : "text-primary",
61
+ x
62
+ ),
63
+ text: s,
64
+ hideTooltip: y,
65
+ customTooltipContent: I
66
+ }
67
+ ),
68
+ i && /* @__PURE__ */ e("span", { className: "sr-only", children: h }),
69
+ r
70
+ ]
71
+ }
72
+ )
73
+ ]
74
+ }
75
+ );
76
+ export {
77
+ D as FileName
78
+ };
@@ -0,0 +1,16 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { FileName as r } from "../FileName/FileName.js";
3
+ import { DIAL_KIT_CLASS as t } from "../../../constants/public-class-names.js";
4
+ import { DialItemType as p } from "../../../types/item.js";
5
+ import { mergeClasses as a } from "../../../utils/merge-classes.js";
6
+ const d = ({ className: m, ...e }) => /* @__PURE__ */ o(
7
+ r,
8
+ {
9
+ ...e,
10
+ type: p.Folder,
11
+ className: a(m, t.folderName)
12
+ }
13
+ );
14
+ export {
15
+ d as FolderName
16
+ };