@epam/ai-dial-ui-kit 0.14.0-dev.50 → 0.14.0-dev.54
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/README.md +12 -3
- package/dist/CHANGELOG.md +1 -0
- package/dist/{DateCellRenderer-C9SdzDU4.cjs → DateCellRenderer-ssp7eaZY.cjs} +1 -1
- package/dist/components/New/Select/constants.js +29 -21
- package/dist/components-manifest.json +3 -7
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/grid.cjs +1 -1
- package/package.json +17 -5
package/README.md
CHANGED
|
@@ -292,11 +292,20 @@ Storybook provides:
|
|
|
292
292
|
<details>
|
|
293
293
|
<summary>Next.js Integration</summary>
|
|
294
294
|
|
|
295
|
-
1. Install the package
|
|
295
|
+
1. Install the package. React is the only peer you have to supply — everything
|
|
296
|
+
the kit renders with, it installs itself.
|
|
297
|
+
|
|
296
298
|
``` bash
|
|
297
299
|
npm install @epam/ai-dial-ui-kit
|
|
298
|
-
npm install react react-dom
|
|
299
|
-
|
|
300
|
+
npm install react react-dom
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Add the editor packages only if you use the `@epam/ai-dial-ui-kit/editors`
|
|
304
|
+
subpath. They are optional peers, so `npm install` stays quiet without them, and
|
|
305
|
+
the kit only reaches for them when a `Lazy*` editor actually mounts:
|
|
306
|
+
|
|
307
|
+
``` bash
|
|
308
|
+
npm install monaco-editor @monaco-editor/react @uiw/react-md-editor
|
|
300
309
|
```
|
|
301
310
|
|
|
302
311
|
2. Import style in the root layout of the project:
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -29,6 +29,7 @@ Versions match the git tags on the `development` branch.
|
|
|
29
29
|
|
|
30
30
|
### Changed
|
|
31
31
|
|
|
32
|
+
- **The kit installs what it renders with — `react` and `react-dom` are the only required peers** — `@floating-ui/react`, `classnames` and `@tabler/icons-react` were required peers, so every host had to add three packages it never imports to its own `package.json` just to satisfy the peer graph; all three are eagerly reachable from every entry point, so they are now `dependencies` of the kit. The editor packages go the other way: `@monaco-editor/react`, `monaco-editor` and `@uiw/react-md-editor` are reachable only behind the `Lazy*` wrappers the `./editors` subpath exports, so they become **optional** peers — `npm install` stays quiet without them, and you add them only if you mount an editor. `@uiw/react-markdown-preview` is dropped from the peer list entirely: nothing in the kit imports it, and `@uiw/react-md-editor` already depends on it. Nothing changes for a host that keeps its current `package.json`; the point is that it can now delete four to six entries from it. See [issue #8719](https://github.com/epam/ai-dial-chat/issues/8719) for the embedding-host report this came from.
|
|
32
33
|
- **The accent gradient is themed through `--bg-gradient-*` / `--stroke-gradient-*`** — the gradient stops were addressed by their position in one specific gradient (`--bg-control-accent-gradient-hover-from`), so the same colour had a different variable name in every gradient that used it. Each stop is now a numbered token (`--bg-gradient-1`, `--bg-gradient-2-hover`, `--stroke-gradient-1`, …). The `--bg-control-accent-gradient-*` names stay in the fallback chain; the `--stroke-control-accent-gradient-*` names behind the selected tab's underline do **not**, so a theme that sets those must rename them (see the migration guide).
|
|
33
34
|
- **Renamed control variables keep their old names as fallbacks** — every token renamed in this release resolves through its 0.13.0 variable before reaching the light default (e.g. `var(--text-control-disable-primary, var(--text-control-disable-alpha, #848E9C))`). Only the Tailwind class names are breaking; a host themed by the DIAL themes service needs no theme change to keep its colours.
|
|
34
35
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),S=require("./DateCellRenderer-BVM-Q8yx.cjs"),$=require("@tabler/icons-react"),o=require("react"),x=require("./merge-classes-Dipy1Ih1.cjs"),p=require("@floating-ui/react"),ge=require("./icon-DhjrDQ8I.cjs"),oe=require("./icon-CrGVkVpG.cjs"),C=require("./IconButton-DWqoaBWf.cjs"),dt=require("classnames");function mt(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=mt(o);var he=(e=>(e.Top="top",e.Right="right",e.Bottom="bottom",e.Left="left",e))(he||{});const ft=7,pt=2,Ct=500,gt="fill-control-inverted",ht="z-[55] 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",Ge=o.createContext(null),ze=()=>{const e=o.useContext(Ge);if(e==null)throw new Error("Tooltip components must be wrapped in <TooltipContainer />");return e},xt=({initialOpen:e=!1,placement:s=he.Bottom,isTriggerClickable:n=!1,open:r,onOpenChange:i}={})=>{const[u,a]=o.useState(e),d=o.useRef(null),m=r??u,g=i??a,b=p.useFloating({placement:s,open:m,onOpenChange:g,whileElementsMounted:p.autoUpdate,middleware:[p.offset(ft+pt),p.flip({fallbackAxisSideDirection:"start",padding:5}),p.shift({padding:5}),p.arrow({element:d})]}),f=p.useHover(b.context,{move:!1,enabled:r==null,mouseOnly:n,delay:{open:Ct,close:0}}),N=p.useFocus(b.context,{enabled:r==null}),I=p.useDismiss(b.context),w=p.useRole(b.context,{role:"tooltip"}),_=p.useInteractions([f,N,I,w]);return o.useEffect(()=>{if(!m)return;const y=b.refs.reference.current;if(!(y instanceof Element))return;const k=new IntersectionObserver(([H])=>{H.isIntersecting||g(!1)},{root:null,threshold:0});return k.observe(y),()=>k.disconnect()},[m,b.refs.reference,g]),o.useMemo(()=>({open:m,setOpen:g,arrowRef:d,..._,...b}),[m,g,_,b])},we=({children:e,...s})=>{const n=xt(s);return t.jsx(Ge.Provider,{value:n,children:e})},je=({style:e,...s})=>{const n=ze(),r=C.useHasHover(),i=S.useThemeScope(),u=o.useRef(null),a=p.useMergeRefs([n.refs.setFloating,u]);return!n.open||!r?null:t.jsx(p.FloatingPortal,{id:"tooltip-portal",children:t.jsxs("div",{ref:a,"data-placement":n.placement,style:{...n.floatingStyles,...e},...n.getFloatingProps(s),className:dt(ht,i,n.getFloatingProps(s).className),children:[s.children,t.jsx(p.FloatingArrow,{ref:n.arrowRef,context:n.context,className:gt})]})})},_e=({children:e,asChild:s=!1,...n})=>{const r=ze(),i=s&&o.isValidElement(e),u=i?e.props?.ref:null,a=p.useMergeRefs([r.refs.setReference,...u?[u]:[]]);if(i){const d=e.props;return o.cloneElement(e,r.getReferenceProps({...d,...n,className:x.mergeClasses(d.className,n.className)||void 0,ref:a}))}return t.jsx("span",{ref:a,...r.getReferenceProps(n),className:n.className??"text-start",children:e})},Ze=({hideTooltip:e=!1,tooltip:s,children:n,asChild:r=!1,triggerClassName:i,contentClassName:u,...a})=>{const d=!e&&!!s;return t.jsxs(we,{...a,children:[t.jsx(_e,{asChild:r,className:i,children:n}),d&&t.jsx(je,{className:u,children:s})]})},Be={[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]:{}},We=(e=C.ButtonVariant.Primary,s=C.ButtonAppearance.Solid)=>{const n=Be[e]?.[s];return n||(console.warn(`Could not find Button styles for variant: ${e} and appearance: ${s}. Using default primary solid button styles.`),Be[C.ButtonVariant.Primary][C.ButtonAppearance.Solid])},bt={[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:a="button",...d})=>{const m=x.mergeClasses("dial-kit-base-icon-button dial-kit-base-button",e&&We(e,s),bt[n],r),g=t.jsx("button",{...d,type:a,className:m,"aria-label":C.resolveAccessibleName(d["aria-label"],u?.tooltip),children:i});return u?t.jsx(Ze,{asChild:!0,...u,children:g}):g},Ue=({caption:e,onClick:s,"aria-label":n})=>{if(!e)return null;const r=x.mergeClasses("text-secondary hover:text-control-accent-hover active:text-control-accent-active","focus-visible:outline focus-visible:outline-focus");return t.jsx(xe,{"aria-label":n,className:r,icon:t.jsx($.IconInfoCircle,{size:oe.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),onClick:s,size:C.ElementSize.Small,tooltipProps:{tooltip:e}})},Ae=({label:e,required:s,className:n,containerClassName:r,caption:i,size:u=C.ElementSize.Small,...a})=>e?t.jsxs("span",{className:x.mergeClasses("flex items-center gap-0.5",r),children:[t.jsxs("label",{...a,className:x.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 L=(e=>(e.None="none",e.Check="check",e.Tint="tint",e.Checkbox="checkbox",e.Highlight="highlight",e))(L||{});const De=(e,s)=>({appearance:r,...i})=>t.jsx(xe,{...i,variant:e,appearance:r||s}),Ke=(e,s)=>({variant:r,...i})=>t.jsx(xe,{...i,variant:r||s,appearance:e}),St=De(C.ButtonVariant.Primary,C.ButtonAppearance.Solid),Nt=De(C.ButtonVariant.Neutral,C.ButtonAppearance.Solid),vt=De(C.ButtonVariant.Danger,C.ButtonAppearance.Ghost),$e=Ke(C.ButtonAppearance.Ghost,C.ButtonVariant.Primary),Et=Ke(C.ButtonAppearance.Solid,C.ButtonVariant.Static),qe=({ariaLabel:e="Close",className:s,size:n=C.ElementSize.Small,onClose:r,...i})=>t.jsx($e,{...i,size:n,"aria-label":e,className:s,onClick:r,icon:t.jsx($.IconX,{size:n===C.ElementSize.Small?oe.DIAL_ICON_SIZE.SM:oe.DIAL_ICON_SIZE.MD,stroke:ge.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})}),It=e=>{const s=o.useRef(null),[n,r]=o.useState(!1),[i,u]=o.useState(""),a=o.useRef(!1),d=o.useCallback(()=>{const g=s.current;g&&(a.current&&u(g.textContent??""),r(g.scrollWidth>g.clientWidth))},[]),m=o.useCallback(()=>S.scheduleMeasure(d),[d]);return o.useEffect(()=>{const g=s.current;if(g)return S.observeElementSize(g,d)},[d]),o.useEffect(()=>{a.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,...a})=>{const{ref:d,isTruncated:m,textContent:g,remeasure:b}=It(e),f=typeof e=="string"?e:g,N=o.useMemo(()=>r||!m?null:u??f,[u,f,r,m]);return t.jsxs(we,{...a,children:[t.jsx(_e,{asChild:!0,onMouseEnter:b,onFocusCapture:b,children:t.jsx("span",{id:i,ref:d,"aria-label":m&&f?f:void 0,className:x.mergeClasses("block min-w-0 max-w-full flex-1 truncate text-start",s),children:e})}),!!N&&t.jsx(je,{className:n,children:N})]})},yt=8,kt=400,Tt="z-[54] 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:a,onOpenChange:d,triggerClassName:m,contentClassName:g})=>{const b=S.useIsMobileScreen(),f=S.useThemeScope(),[N,I]=o.useState(u),w=a??N,_=D=>{d?.(D),a==null&&I(D)},y=p.useFloatingNodeId(),{refs:k,floatingStyles:H,context:O}=p.useFloating({nodeId:y,placement:s,open:w,onOpenChange:_,whileElementsMounted:p.autoUpdate,middleware:[p.offset(yt),p.flip({padding:5}),p.shift({padding:5})]}),q=p.useHover(O,{enabled:a==null,handleClose:p.safePolygon(),delay:{open:kt,close:0}}),R=p.useFocus(O,{enabled:a==null}),G=p.useDismiss(O),{getReferenceProps:z,getFloatingProps:E}=p.useInteractions([q,R,G]),ee=o.useRef(null),te=p.useMergeRefs(o.useMemo(()=>[k.setFloating,ee],[k.setFloating])),X=r&&o.isValidElement(n),M=X?n.props?.ref:null,j=p.useMergeRefs(o.useMemo(()=>[k.setReference,...M?[M]:[]],[k.setReference,M])),V=!i&&!b&&!!e,B=X?o.cloneElement(n,z({...n.props,ref:j,className:x.mergeClasses(n.props.className,m)||void 0})):t.jsx("span",{ref:j,...z(),className:m??"text-start",children:n});return t.jsxs(t.Fragment,{children:[B,w&&V&&t.jsx(p.FloatingPortal,{id:"interactive-tooltip-portal",children:t.jsx(p.FloatingFocusManager,{context:O,modal:!1,initialFocus:-1,returnFocus:!1,order:["reference","content"],children:t.jsx("div",{ref:te,"data-placement":O.placement,style:H,...E(),className:x.mergeClasses(Tt,f,g),children:e})})})]})},Xe="rounded-xl bg-layer-raised p-1 shadow-md",Ye=x.mergeClasses(Xe,"w-max"),Je=x.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"),Qe="bg-control-accent-alpha",Rt=x.mergeClasses(Qe,"text-accent"),wt=x.mergeClasses("cursor-not-allowed text-control-disable-primary","bg-transparent hover:bg-transparent"),et=4,jt=x.mergeClasses("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),_t=x.mergeClasses("z-[53] focus-visible:outline-none",Xe),At=Ye,Dt="my-1 border-t border-tertiary",Q=et,Lt=t.jsx($.IconChevronRight,{size:oe.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),Fe={size:14,stroke:3,"aria-hidden":!0},Le=({isSelected:e=!1,isIndeterminate:s=!1,invalid:n=!1,disabled:r=!1,htmlFor:i,className:u})=>{const a=s||e,d=!!i,m=x.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":x.mergeClasses(n&&a&&"border-transparent bg-control-error text-control-permanent",n&&!a&&"border-error bg-control-neutral",!n&&a&&"border-transparent bg-control-accent text-control-permanent hover:bg-control-accent-hover",!n&&!a&&"border-default bg-control-neutral hover:border-accent hover:bg-control-accent-alpha-hover"),r?"cursor-not-allowed":d&&"cursor-pointer",u),g=s?t.jsx($.IconMinus,{...Fe}):e&&t.jsx($.IconCheck,{...Fe});return d?t.jsx("label",{htmlFor:i,className:m,children:g}):t.jsx("span",{"aria-hidden":"true",className:m,children:g})},Ht=t.jsx($.IconCheck,{size:oe.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,className:"shrink-0","aria-hidden":!0}),pe=({label:e,icon:s,description:n,mark:r=L.None,selected:i=!1,danger:u=!1,trailing:a,rightControl:d,ellipsisLabel:m=!1,labelClassName:g,children:b,className:f,disabled:N=!1,type:I="button",...w})=>{const _=i&&r===L.Highlight,y=i&&(r===L.Checkbox||r===L.Tint),k=x.mergeClasses(u&&"text-error",N&&"text-control-disable-primary"),H=x.mergeClasses(Je,"aria-expanded:bg-control-accent-alpha-hover",_&&Rt,y&&Qe,N&&wt,u&&"text-error",f),O=t.jsxs("button",{type:I,disabled:N,"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":H,...w,children:[b??t.jsxs(t.Fragment,{children:[r===L.Checkbox&&t.jsx(Le,{isSelected:i,disabled:N}),s&&t.jsx(S.DialIcon,{icon:s,className:k}),m?t.jsx(be,{text:e,className:x.mergeClasses(k,g)}):t.jsx("span",{className:x.mergeClasses("min-w-0 flex-1 truncate text-start",k,g),children:e}),n&&t.jsx("span",{className:x.mergeClasses("shrink-0 text-secondary dial-small-text",N&&"text-control-disable-primary"),children:n}),i&&r===L.Check&&Ht]}),a&&t.jsx("span",{className:x.mergeClasses("ml-auto shrink-0",k),children:a})]});return d?t.jsxs("div",{role:"none",className:x.mergeClasses(H,"has-[[data-menu-item-row]:focus-visible]:outline","has-[[data-menu-item-row]:focus-visible]:outline-focus"),children:[O,d]}):O},Ce=e=>e.mark??(e.selectable?L.Checkbox:L.None),tt=e=>e.selectable?"menuitemcheckbox":Ce(e)===L.Check?"menuitemradio":"menuitem",Ot=({item:e,onRootClose:s})=>{const{isOpen:n,nodeId:r,refs:i,floatingStyles:u,context:a,getReferenceProps:d,getFloatingProps:m}=S.useSubMenuFloating(Q,"menu",!!e.disabled),g=o.useCallback(f=>N=>{f.disabled||(f.onClick?.({key:f.key,domEvent:N}),f.selectable||s())},[s]),b=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:Lt,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:b}):b,n&&t.jsx(S.SubMenuPanel,{refs:i,floatingStyles:u,context:a,getFloatingProps:m,role:"menu",surfaceClassName:At,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 N=tt(f),I=t.jsx(pe,{role:N,"aria-checked":N==="menuitem"?void 0:!!f.checked,"aria-current":Ce(f)===L.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:g(f),children:f.renderItem?.(f)});return t.jsx(o.Fragment,{children:f.interactiveTooltip?t.jsx(fe,{asChild:!0,placement:f.interactiveTooltip.placement,content:f.interactiveTooltip.content,contentClassName:f.interactiveTooltip.contentClassName,children:I}):I},f.key)}),e.menuFooter&&(typeof e.menuFooter=="function"?e.menuFooter():e.menuFooter)]})})]})},Mt='[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"]',Bt=e=>!e.hasAttribute("disabled")&&e.getAttribute("aria-disabled")!=="true",Ft=["ArrowDown","ArrowUp","Home","End"],Vt=(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},Pt=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,nt=({children:e,items:s,onItemClick:n,menuHeader:r,menuFooter:i,renderOverlay:u,trigger:a=[S.DropdownTrigger.Click],placement:d,disabled:m=!1,open:g,defaultOpen:b=!1,onOpenChange:f,closable:N=!1,onClose:I,className:w,overlayContentClassName:_,separatorClassName:y,listClassName:k,outsidePressIgnoreRef:H,outsideClosable:O=!0,allowedPlacements:q,anchorToMouse:R=!1,matchReferenceWidth:G=!0,maxDropdownHeight:z,initialFocus:E})=>{const ee=S.useThemeScope(),[te,X]=o.useState(b),M=g!==void 0,j=M?!!g:te,V=o.useRef(null),[B,D]=o.useState(!0),T=o.useCallback((l,v,c)=>{l&&D(c!=="hover"&&c!=="safe-polygon"),M||X(l),f?.(l)},[M,f]),ne=o.useId(),Se=d===void 0,ae=p.useFloatingNodeId(),{refs:Z,floatingStyles:W,context:F}=p.useFloating({nodeId:ae,placement:d,open:j,onOpenChange:T,whileElementsMounted:p.autoUpdate,middleware:[p.offset({mainAxis:Q,crossAxis:0}),Se?p.autoPlacement({alignment:"start",crossAxis:!0,padding:Q,allowedPlacements:q}):p.flip({padding:Q}),p.shift({padding:Q}),p.size({padding:Q,apply({availableWidth:l,availableHeight:v,elements:c}){const h=c.floating,A=Pt(c.reference);h.style.setProperty("--fui-available-height",`${Math.floor(v)}px`),h.style.setProperty("--reference-width",G?`${Math.round(A)}px`:"0px"),G?h.style.minWidth=`${Math.round(A)}px`:h.style.removeProperty("min-width"),h.style.maxWidth=`${Math.floor(l)}px`;const U=Math.floor(v);h.style.maxHeight=`${z?Math.min(U,z):U}px`}})]}),se=p.useClick(F,{enabled:a.includes(S.DropdownTrigger.Click)&&!m}),Y=p.useHover(F,{enabled:a.includes(S.DropdownTrigger.Hover)&&!m,move:!1,restMs:40,handleClose:p.safePolygon(),delay:{open:80,close:80}}),Ne=p.useDismiss(F,{bubbles:!0,referencePress:!1,outsidePress:l=>{if(!O)return!1;const v=l.target;return!(H?.current&&v instanceof Node&&H.current.contains(v))}}),re=p.useRole(F,{role:"menu"}),{getReferenceProps:le,getFloatingProps:ve}=p.useInteractions([se,Y,Ne,re]),K=o.useCallback((l,v)=>{Z.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:l,y:v,top:v,left:l,right:l,bottom:v})})},[Z]),J=o.useCallback(l=>{!a.includes(S.DropdownTrigger.ContextMenu)||m||(l.preventDefault(),R&&(K(l.clientX,l.clientY),V.current=document.elementFromPoint(l.clientX,l.clientY)),T(!0))},[R,m,T,K,a]),Ee=o.useCallback(l=>{!R||m||(a.includes(S.DropdownTrigger.ContextMenu)&&j&&T(!1),K(l.clientX,l.clientY),V.current=document.elementFromPoint(l.clientX,l.clientY))},[R,m,K,j,a,T]);o.useEffect(()=>{m&&j&&T(!1)},[m,j,T]);const Ie=o.useCallback(l=>{if(l.defaultPrevented||!Ft.includes(l.key))return;const v=Array.from(l.currentTarget.querySelectorAll(Mt)).filter(Bt);if(v.length===0)return;l.preventDefault();const c=l.currentTarget.ownerDocument.activeElement,h=v.findIndex(A=>A===c);v[Vt(l.key,h,v.length)]?.focus()},[]),ce=o.useCallback(l=>v=>{l.disabled||(l.onClick?.({key:l.key,domEvent:v}),n?.({key:l.key,domEvent:v}),l.selectable||T(!1))},[n,T]),ye=o.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:x.mergeClasses("py-1",_),"aria-label":"dropdown",children:s.map(l=>{if(l.type===S.DropdownItemType.Divider)return t.jsx("div",{role:"separator",className:x.mergeClasses(Dt,y)},l.key);if(l.type===S.DropdownItemType.PlainText)return t.jsx("div",{className:x.mergeClasses("px-3 py-2 text-secondary dial-caption-text",l.className),children:l.label},l.key);if(l.children?.length)return t.jsx(Ot,{item:l,onRootClose:()=>T(!1)},l.key);const v=Ce(l),c=tt(l),h=t.jsx(pe,{role:c,"aria-checked":c==="menuitem"?void 0:!!l.checked,"aria-current":v===L.Highlight&&l.checked?!0:void 0,"aria-disabled":!!l.disabled,disabled:l.disabled,mark:v,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(o.Fragment,{children:l.interactiveTooltip?t.jsx(fe,{asChild:!0,placement:l.interactiveTooltip.placement,content:l.interactiveTooltip.content,contentClassName:l.interactiveTooltip.contentClassName,children:h}):h},l.key)})}),i&&t.jsx(t.Fragment,{children:typeof i=="function"?i():i})]}):null,[ce,s,i,r,u,T,_,y]),ie=le({onContextMenu:J,onMouseDown:Ee});return o.useEffect(()=>{if(!j)return;const l=Z.reference.current;let v=null;if(l instanceof Element?v=l:V.current instanceof Element&&(v=V.current),!v)return;const c=new IntersectionObserver(([h])=>{h.isIntersecting||T(!1)},{root:null,threshold:0});return c.observe(v),()=>c.disconnect()},[j,Z.reference,T]),t.jsx(p.FloatingTree,{children:t.jsxs(p.FloatingNode,{id:ae,children:[t.jsx("span",{ref:Z.setReference,className:x.mergeClasses(jt,m&&"!cursor-not-allowed opacity-75",w),"aria-haspopup":"menu","aria-expanded":j,"aria-controls":ne,...ie,children:e}),j&&t.jsx(p.FloatingPortal,{children:t.jsx(p.FloatingFocusManager,{context:F,modal:!1,initialFocus:E!==void 0?E:B?0:-1,returnFocus:!0,children:t.jsxs("div",{id:ne,ref:Z.setFloating,style:W,className:x.mergeClasses(_t,!G&&"w-max","overflow-auto",ee,k),...ve({onKeyDown:Ie}),children:[N&&t.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:t.jsx(qe,{ariaLabel:"Close dropdown",onClose:l=>{I?.(l),T(!1)}})}),ye]})})})]})})},He=({id:e,labelProps:s,isSelected:n=!1,isIndeterminate:r=!1,invalid:i=!1,disabled:u,onChange:a,caption:d,className:m,boxClassName:g,...b})=>{const f=o.useId(),N=e??f,I=d?`${N}-caption`:void 0,w=o.useCallback(y=>{a?.(y.target.checked)},[a]),_=o.useCallback(y=>{y&&(y.indeterminate=r)},[r]);return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:x.mergeClasses("flex items-center gap-2",m),children:[t.jsx("input",{...b,ref:_,type:"checkbox",id:N,checked:n,disabled:u,onChange:w,"aria-checked":r?"mixed":n,"aria-invalid":i||void 0,"aria-label":C.resolveAccessibleName(typeof s?.label!="string"?b["aria-label"]:void 0),"aria-describedby":I,className:"peer sr-only"}),t.jsx(Le,{htmlFor:N,isSelected:n,isIndeterminate:r,invalid:i,disabled:u,className:g}),s&&t.jsx(Ae,{size:C.ElementSize.Standard,...s,htmlFor:N,className:x.mergeClasses("py-[1px]",u?"cursor-not-allowed text-control-disable-primary":"cursor-pointer text-primary",s.className)})]}),d&&t.jsx("span",{id:I,className:"dial-tiny-text text-secondary ml-[28px]",children:d})]})},st=({id:e,name:s,value:n,labelProps:r,isSelected:i=!1,disabled:u,onChange:a,caption:d,className:m,...g})=>{const b=o.useId(),f=e??b,N=d?`${f}-caption`:void 0,I=o.useCallback(w=>{w.target.checked&&a?.(n)},[a,n]);return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:x.mergeClasses("flex items-center gap-2 ",m),children:[t.jsx("input",{...g,type:"radio",id:f,name:s,value:n,checked:i,disabled:u,onChange:I,"aria-label":C.resolveAccessibleName(typeof r?.label!="string"?g["aria-label"]:void 0),"aria-describedby":N,className:"peer sr-only"}),t.jsx("label",{htmlFor:f,className:x.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":x.mergeClasses("cursor-pointer",i?"border border-accent bg-control-neutral":"border-default bg-control-neutral")),children:i&&t.jsx("span",{className:x.mergeClasses("size-3 rounded-full",u?"bg-control-disable-secondary":"bg-control-accent")})}),r&&t.jsx(Ae,{size:C.ElementSize.Standard,...r,htmlFor:f,className:x.mergeClasses("py-[1px]",u?"cursor-not-allowed text-control-disable-primary":"cursor-pointer text-primary",r.className)})]}),d&&t.jsx("span",{id:N,className:"dial-tiny-text text-secondary ml-[26px]",children:d})]})},Gt=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"})),Ve=32,rt=({title:e,description:s,icon:n,live:r=!1,className:i,titleClassName:u,descriptionClassName:a})=>t.jsxs("div",{role:r?"status":void 0,className:x.mergeClasses("flex size-full flex-col items-center justify-center gap-2 text-tertiary",i),children:[n??t.jsx(Gt,{width:Ve,height:Ve,"aria-hidden":"true"}),t.jsx("span",{className:x.mergeClasses("dial-tiny-text text-secondary",u),children:e}),s&&t.jsx("span",{className:x.mergeClasses("dial-tiny-text text-secondary",a),children:s})]}),ot="dial-kit-grid",zt="dial-kit-grid-with-selection",Zt="dial-kit-grid-without-header-borders",Wt="dial-kit-grid-row-select",Ut="dial-kit-grid-header-select",Kt="dial-kit-grid-selection-visible",$t="dial-kit-grid-align-right",Re=40,ke="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:ke,headerRowBorder:ke,headerColumnBorder:ke,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 P=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(P||{});const qt=({params:e,mode:s,label:n,radioName:r,rowId:i,disabled:u})=>{const a=e.node,[d,m]=o.useState(()=>!!a.isSelected());o.useEffect(()=>{const b=()=>m(!!a.isSelected());return b(),a.addEventListener("rowSelected",b),()=>a.removeEventListener("rowSelected",b)},[a]);const g=b=>{u||a.setSelected(b,s===S.GridSelectionMode.SINGLE,P.CHECKBOX_SELECTED)};return s===S.GridSelectionMode.SINGLE?t.jsx(st,{name:r,value:i,isSelected:d,disabled:u,"aria-label":n,onChange:()=>g(!0)}):t.jsx(He,{isSelected:d,disabled:u,"aria-label":n,onChange:g})},Pe=e=>{let s=0,n=0;return e.forEachNodeAfterFilter(r=>{r.selectable!==!1&&(n++,r.isSelected()&&s++)}),{selected:s,selectable:n}},Xt=({api:e,label:s})=>{const[{selected:n,selectable:r},i]=o.useState(()=>Pe(e));o.useEffect(()=>{const a=()=>i(Pe(e));return a(),e.addEventListener("selectionChanged",a),e.addEventListener("modelUpdated",a),()=>{e.isDestroyed()||(e.removeEventListener("selectionChanged",a),e.removeEventListener("modelUpdated",a))}},[e]);const u=o.useCallback(a=>{if(a){e.selectAll("filtered",P.CHECKBOX_SELECTED);return}e.deselectAll("filtered",P.CHECKBOX_SELECTED)},[e]);return t.jsx(He,{isSelected:r>0&&n===r,isIndeterminate:n>0&&n<r,disabled:r===0,"aria-label":s,onChange:u})},at="en-US",lt={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},Te=40,Yt={minWidth:Te,width:Te,maxWidth:Te,resizable:!1,sortable:!1,filter:!1,floatingFilter:!1,suppressMovable:!0,suppressHeaderMenuButton:!0,suppressAutoSize:!0,suppressSizeToFit:!0},ct="dial-kit-grid-selection",Jt=150,Qt=100,en=({columnDefs:e,rowData:s,additionalGridOptions:n,getContextMenuItems:r,className:i,ariaLabel:u="Data grid",wrapCustomCellRenderers:a=!0,disabledRowIds:d,selectedRowIds:m,onSelectionChange:g,onGridApiChange:b,getRowId:f,alternateOddRowColors:N=!1,filterPlaceholder:I="Enter value",emptyStateIcon:w,emptyStateTitle:_="No results found",emptyStateDescription:y="Sorry, we couldn't find any results for your search.",loading:k=!1,wrapperBorder:H=!0,withoutHeaderBorders:O=!1,allowDisabledContextMenu:q=!1,selectionMode:R,selectRowLabel:G,selectAllLabel:z="Select all rows"})=>{S.registerAgGridModulesOnce();const[E,ee]=o.useState(),te=S.useIsMobileScreen(),X=S.useIsTabletScreen(),M=o.useRef(new Set),j=o.useRef(void 0),V=`dial-kit-grid-selection-${o.useId()}`,B=o.useRef({getRowId:f,getContextMenuItems:r,onSelectionChange:g,selectRowLabel:G,wrapCustomCellRenderers:a});B.current={getRowId:f,getContextMenuItems:r,onSelectionChange:g,selectRowLabel:G,wrapCustomCellRenderers:a};const D=o.useCallback(c=>{const h=B.current.getRowId;return h?h(c):String(c.id??JSON.stringify(c))},[]),T=!!r,ne=!!a,Se=o.useMemo(()=>S.themeBalham.withPart(S.colorSchemeLight).withParams({...me,oddRowBackgroundColor:N?me.oddRowBackgroundColor:me.backgroundColor,wrapperBorder:H}),[N,H]),ae=o.useCallback(c=>{c.api.sizeColumnsToFit()},[]),Z=te||X||(m?.size??0)>0,W=o.useCallback(c=>!!c&&!!d?.has(D(c)),[d,D]),F=o.useCallback((c,h,A)=>T?t.jsx(nt,{trigger:[S.DropdownTrigger.ContextMenu],items:c.data?B.current.getContextMenuItems?.(c.data)??[]:[],anchorToMouse:!0,matchReferenceWidth:!0,className:x.mergeClasses("size-full",A&&"cursor-not-allowed opacity-75"),disabled:A&&!q,children:t.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:h})}):h,[T,q]),se=o.useCallback(c=>{if(!c.data)return null;const h=W(c.data);return F(c,t.jsx(be,{text:c.value==null?"":String(c.value),className:"max-w-full dial-small-text text-primary",hideTooltip:h}),h)},[W,F]),Y=o.useCallback(c=>c===P.API||c===P.ROW_DATA_CHANGED,[]),Ne=o.useMemo(()=>S.debounceFn(c=>{const A=(c.selectedNodes??[]).map(Oe=>Oe.data),U=new Set(A.map(D));M.current=U,j.current=c.source,!Y(c.source)&&B.current.onSelectionChange?.(U,A)},Qt),[Y,D]),re=o.useMemo(()=>{if(R)return{...Yt,colId:ct,headerName:"",headerClass:Ut,cellClass:Wt,headerComponent:R===S.GridSelectionMode.MULTIPLE?Xt:void 0,headerComponentParams:{label:z},cellRenderer:c=>{if(!c.data)return null;const h=D(c.data);return t.jsx(qt,{params:c,mode:R,rowId:h,radioName:V,label:B.current.selectRowLabel?.(c.data)??"Select row",disabled:d?.has(h)})}}},[R,z,D,d,V]),le=o.useCallback(c=>{if(!c.cellRenderer)return{...c,cellRenderer:se};const h=B.current.wrapCustomCellRenderers;if(!(typeof h=="function"?h(c):!!h))return c;const U=c.cellRenderer;return{...c,cellRenderer:ue=>{const it=W(ue.data),Me=typeof U=="function"?U:void 0,ut=Me?t.jsx(Me,{...ue}):se(ue);return F(ue,ut,it)}}},[W,se,F]),ve=o.useMemo(()=>{const c=ne?(e??[]).map(le):e??[];return re?[re,...c]:c},[e,ne,le,re]),{defaultColDef:K,rowSelection:J,...Ee}=n??{},Ie=o.useMemo(()=>({minWidth:Jt,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:I,buttons:["reset"]},comparator:S.baseColumnComparator,...S.omitUndefined(K)}),[I,K]),ce=c=>{c.api.sizeColumnsToFit(),ee(c.api),n?.onGridReady?.(c),b?.(c.api)};o.useEffect(()=>{E&&s&&E.setGridOption("rowData",s)},[E,s]);const ye=o.useCallback(()=>t.jsx(rt,{live:!0,title:_,description:y,icon:w??t.jsx($.IconZoomCancel,{size:100,stroke:.5,"aria-hidden":"true"})}),[_,y,w]),ie=typeof J=="object"?J:void 0,l=o.useMemo(()=>R?{isRowSelectable:c=>!W(c.data),...ie,mode:R===S.GridSelectionMode.SINGLE?"singleRow":"multiRow",checkboxes:!1,headerCheckbox:!1}:J,[J,ie,W,R]);o.useEffect(()=>{E&&s&&M.current.size&&M.current.forEach(c=>{const h=E.getRowNode(c);h&&!h.isSelected()&&h.setSelected(!0,!1,P.API)})},[E,s]),o.useEffect(()=>{E&&m&&(E.deselectAll("all",P.API),m.forEach(c=>{const h=E.getRowNode(c);h&&!h.isSelected()&&h.setSelected(!0,!1,P.API)}))},[E,m]);const v=o.useCallback(c=>c.data?D(c.data):"",[D]);return o.useEffect(()=>{const c=Y(j.current);if(E&&m?.size&&c){const h=Array.from(m)[0];if(h){const A=E.getRowNode(h);A&&E.ensureNodeVisible(A)}}},[E,Y,m]),t.jsx("div",{className:x.mergeClasses(ot,"size-full",R&&zt,R&&Z&&Kt,O&&Zt,i),role:"region","aria-label":u,"aria-busy":k,children:t.jsx("div",{className:"h-full overflow-x-auto",children:t.jsx(S.AgGridReact,{rowModelType:"clientSide",headerHeight:Re,rowHeight:Re,cellSelection:!1,theme:Se,autoSizeStrategy:{type:"fitGridWidth"},columnDefs:ve,defaultColDef:Ie,onGridSizeChanged:ae,onGridReady:ce,loading:k,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:ye,rowData:s,rowSelection:l,onSelectionChanged:Ne,getRowId:v,...Ee})})})},tn=({value:e,locale:s=at,options:n=lt,emptyPlaceholder:r,className:i,hideTooltip:u=!1})=>{const a=S.convertToDate(e),d=o.useMemo(()=>a?new Intl.DateTimeFormat(s,n).format(a):r,[a,r,s,n]),m=a?a.toISOString():void 0;return t.jsx(be,{text:m?t.jsx("time",{dateTime:m,children:d}):t.jsx("span",{children:d}),className:x.mergeClasses("dial-small-text text-primary",i),hideTooltip:u})};exports.Checkbox=He;exports.CheckboxBox=Le;exports.CloseButton=qe;exports.DEFAULT_DATE_FORMAT_OPTIONS=lt;exports.DEFAULT_LOCALE=at;exports.DangerIconButton=vt;exports.DateCellRenderer=tn;exports.Dropdown=nt;exports.EllipsisTooltip=be;exports.GRID_ALIGN_RIGHT_CLASS=$t;exports.GRID_ROOT_CLASS=ot;exports.GRID_SELECTION_COLUMN_ID=ct;exports.GRID_THEME_PARAMS=me;exports.GhostIconButton=$e;exports.Grid=en;exports.IconButton=xe;exports.InfoButton=Ue;exports.InteractiveTooltip=fe;exports.Label=Ae;exports.MenuItem=pe;exports.MenuItemMark=L;exports.NeutralIconButton=Nt;exports.NoDataContent=rt;exports.PrimaryIconButton=St;exports.ROW_HEIGHT=Re;exports.Radio=st;exports.StaticIconButton=Et;exports.Tooltip=Ze;exports.TooltipContainer=we;exports.TooltipContent=je;exports.TooltipPlacement=he;exports.TooltipTrigger=_e;exports.getButtonClassNames=We;exports.overlayGap=et;exports.overlayItemClassName=Je;exports.overlaySubMenuClassName=Ye;
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),S=require("./DateCellRenderer-BVM-Q8yx.cjs"),$=require("@tabler/icons-react"),o=require("react"),x=require("./merge-classes-Dipy1Ih1.cjs"),p=require("@floating-ui/react"),ge=require("./icon-DhjrDQ8I.cjs"),oe=require("./icon-CrGVkVpG.cjs"),C=require("./IconButton-DWqoaBWf.cjs"),mt=require("classnames");function ft(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=ft(o);var he=(e=>(e.Top="top",e.Right="right",e.Bottom="bottom",e.Left="left",e))(he||{});const pt=7,Ct=2,gt=500,ht="fill-control-inverted",xt="z-[55] 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",Ge=o.createContext(null),ze=()=>{const e=o.useContext(Ge);if(e==null)throw new Error("Tooltip components must be wrapped in <TooltipContainer />");return e},bt=({initialOpen:e=!1,placement:s=he.Bottom,isTriggerClickable:n=!1,open:r,onOpenChange:i}={})=>{const[u,a]=o.useState(e),d=o.useRef(null),m=r??u,g=i??a,b=p.useFloating({placement:s,open:m,onOpenChange:g,whileElementsMounted:p.autoUpdate,middleware:[p.offset(pt+Ct),p.flip({fallbackAxisSideDirection:"start",padding:5}),p.shift({padding:5}),p.arrow({element:d})]}),f=p.useHover(b.context,{move:!1,enabled:r==null,mouseOnly:n,delay:{open:gt,close:0}}),N=p.useFocus(b.context,{enabled:r==null}),I=p.useDismiss(b.context),w=p.useRole(b.context,{role:"tooltip"}),_=p.useInteractions([f,N,I,w]);return o.useEffect(()=>{if(!m)return;const y=b.refs.reference.current;if(!(y instanceof Element))return;const k=new IntersectionObserver(([H])=>{H.isIntersecting||g(!1)},{root:null,threshold:0});return k.observe(y),()=>k.disconnect()},[m,b.refs.reference,g]),o.useMemo(()=>({open:m,setOpen:g,arrowRef:d,..._,...b}),[m,g,_,b])},we=({children:e,...s})=>{const n=bt(s);return t.jsx(Ge.Provider,{value:n,children:e})},je=({style:e,...s})=>{const n=ze(),r=C.useHasHover(),i=S.useThemeScope(),u=o.useRef(null),a=p.useMergeRefs([n.refs.setFloating,u]);return!n.open||!r?null:t.jsx(p.FloatingPortal,{id:"tooltip-portal",children:t.jsxs("div",{ref:a,"data-placement":n.placement,style:{...n.floatingStyles,...e},...n.getFloatingProps(s),className:mt(xt,i,n.getFloatingProps(s).className),children:[s.children,t.jsx(p.FloatingArrow,{ref:n.arrowRef,context:n.context,className:ht})]})})},_e=({children:e,asChild:s=!1,...n})=>{const r=ze(),i=s&&o.isValidElement(e),u=i?e.props?.ref:null,a=p.useMergeRefs([r.refs.setReference,...u?[u]:[]]);if(i){const d=e.props;return o.cloneElement(e,r.getReferenceProps({...d,...n,className:x.mergeClasses(d.className,n.className)||void 0,ref:a}))}return t.jsx("span",{ref:a,...r.getReferenceProps(n),className:n.className??"text-start",children:e})},Ze=({hideTooltip:e=!1,tooltip:s,children:n,asChild:r=!1,triggerClassName:i,contentClassName:u,...a})=>{const d=!e&&!!s;return t.jsxs(we,{...a,children:[t.jsx(_e,{asChild:r,className:i,children:n}),d&&t.jsx(je,{className:u,children:s})]})},Be={[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]:{}},We=(e=C.ButtonVariant.Primary,s=C.ButtonAppearance.Solid)=>{const n=Be[e]?.[s];return n||(console.warn(`Could not find Button styles for variant: ${e} and appearance: ${s}. Using default primary solid button styles.`),Be[C.ButtonVariant.Primary][C.ButtonAppearance.Solid])},St={[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:a="button",...d})=>{const m=x.mergeClasses("dial-kit-base-icon-button dial-kit-base-button",e&&We(e,s),St[n],r),g=t.jsx("button",{...d,type:a,className:m,"aria-label":C.resolveAccessibleName(d["aria-label"],u?.tooltip),children:i});return u?t.jsx(Ze,{asChild:!0,...u,children:g}):g},Ue=({caption:e,onClick:s,"aria-label":n})=>{if(!e)return null;const r=x.mergeClasses("text-secondary hover:text-control-accent-hover active:text-control-accent-active","focus-visible:outline focus-visible:outline-focus");return t.jsx(xe,{"aria-label":n,className:r,icon:t.jsx($.IconInfoCircle,{size:oe.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),onClick:s,size:C.ElementSize.Small,tooltipProps:{tooltip:e}})},Ae=({label:e,required:s,className:n,containerClassName:r,caption:i,size:u=C.ElementSize.Small,...a})=>e?t.jsxs("span",{className:x.mergeClasses("flex items-center gap-0.5",r),children:[t.jsxs("label",{...a,className:x.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 L=(e=>(e.None="none",e.Check="check",e.Tint="tint",e.Checkbox="checkbox",e.Highlight="highlight",e))(L||{});const De=(e,s)=>({appearance:r,...i})=>t.jsx(xe,{...i,variant:e,appearance:r||s}),Ke=(e,s)=>({variant:r,...i})=>t.jsx(xe,{...i,variant:r||s,appearance:e}),Nt=De(C.ButtonVariant.Primary,C.ButtonAppearance.Solid),vt=De(C.ButtonVariant.Neutral,C.ButtonAppearance.Solid),Et=De(C.ButtonVariant.Danger,C.ButtonAppearance.Ghost),$e=Ke(C.ButtonAppearance.Ghost,C.ButtonVariant.Primary),It=Ke(C.ButtonAppearance.Solid,C.ButtonVariant.Static),qe=({ariaLabel:e="Close",className:s,size:n=C.ElementSize.Small,onClose:r,...i})=>t.jsx($e,{...i,size:n,"aria-label":e,className:s,onClick:r,icon:t.jsx($.IconX,{size:n===C.ElementSize.Small?oe.DIAL_ICON_SIZE.SM:oe.DIAL_ICON_SIZE.MD,stroke:ge.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})}),yt=e=>{const s=o.useRef(null),[n,r]=o.useState(!1),[i,u]=o.useState(""),a=o.useRef(!1),d=o.useCallback(()=>{const g=s.current;g&&(a.current&&u(g.textContent??""),r(g.scrollWidth>g.clientWidth))},[]),m=o.useCallback(()=>S.scheduleMeasure(d),[d]);return o.useEffect(()=>{const g=s.current;if(g)return S.observeElementSize(g,d)},[d]),o.useEffect(()=>{a.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,...a})=>{const{ref:d,isTruncated:m,textContent:g,remeasure:b}=yt(e),f=typeof e=="string"?e:g,N=o.useMemo(()=>r||!m?null:u??f,[u,f,r,m]);return t.jsxs(we,{...a,children:[t.jsx(_e,{asChild:!0,onMouseEnter:b,onFocusCapture:b,children:t.jsx("span",{id:i,ref:d,"aria-label":m&&f?f:void 0,className:x.mergeClasses("block min-w-0 max-w-full flex-1 truncate text-start",s),children:e})}),!!N&&t.jsx(je,{className:n,children:N})]})},kt=8,Tt=400,Rt="z-[54] 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:a,onOpenChange:d,triggerClassName:m,contentClassName:g})=>{const b=S.useIsMobileScreen(),f=S.useThemeScope(),[N,I]=o.useState(u),w=a??N,_=D=>{d?.(D),a==null&&I(D)},y=p.useFloatingNodeId(),{refs:k,floatingStyles:H,context:O}=p.useFloating({nodeId:y,placement:s,open:w,onOpenChange:_,whileElementsMounted:p.autoUpdate,middleware:[p.offset(kt),p.flip({padding:5}),p.shift({padding:5})]}),q=p.useHover(O,{enabled:a==null,handleClose:p.safePolygon(),delay:{open:Tt,close:0}}),R=p.useFocus(O,{enabled:a==null}),G=p.useDismiss(O),{getReferenceProps:z,getFloatingProps:E}=p.useInteractions([q,R,G]),ee=o.useRef(null),te=p.useMergeRefs(o.useMemo(()=>[k.setFloating,ee],[k.setFloating])),X=r&&o.isValidElement(n),M=X?n.props?.ref:null,j=p.useMergeRefs(o.useMemo(()=>[k.setReference,...M?[M]:[]],[k.setReference,M])),V=!i&&!b&&!!e,B=X?o.cloneElement(n,z({...n.props,ref:j,className:x.mergeClasses(n.props.className,m)||void 0})):t.jsx("span",{ref:j,...z(),className:m??"text-start",children:n});return t.jsxs(t.Fragment,{children:[B,w&&V&&t.jsx(p.FloatingPortal,{id:"interactive-tooltip-portal",children:t.jsx(p.FloatingFocusManager,{context:O,modal:!1,initialFocus:-1,returnFocus:!1,order:["reference","content"],children:t.jsx("div",{ref:te,"data-placement":O.placement,style:H,...E(),className:x.mergeClasses(Rt,f,g),children:e})})})]})},Xe="rounded-xl bg-layer-raised p-1 shadow-md",Ye=x.mergeClasses(Xe,"w-max"),Je=x.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"),Qe="bg-control-accent-alpha",wt=x.mergeClasses(Qe,"text-accent"),jt=x.mergeClasses("cursor-not-allowed text-control-disable-primary","bg-transparent hover:bg-transparent"),et=4,_t=x.mergeClasses("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),At=x.mergeClasses("z-[53] focus-visible:outline-none",Xe),Dt=Ye,Lt="my-1 border-t border-tertiary",Q=et,Ht=t.jsx($.IconChevronRight,{size:oe.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),Fe={size:14,stroke:3,"aria-hidden":!0},Le=({isSelected:e=!1,isIndeterminate:s=!1,invalid:n=!1,disabled:r=!1,htmlFor:i,className:u})=>{const a=s||e,d=!!i,m=x.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":x.mergeClasses(n&&a&&"border-transparent bg-control-error text-control-permanent",n&&!a&&"border-error bg-control-neutral",!n&&a&&"border-transparent bg-control-accent text-control-permanent hover:bg-control-accent-hover",!n&&!a&&"border-default bg-control-neutral hover:border-accent hover:bg-control-accent-alpha-hover"),r?"cursor-not-allowed":d&&"cursor-pointer",u),g=s?t.jsx($.IconMinus,{...Fe}):e&&t.jsx($.IconCheck,{...Fe});return d?t.jsx("label",{htmlFor:i,className:m,children:g}):t.jsx("span",{"aria-hidden":"true",className:m,children:g})},Ot=t.jsx($.IconCheck,{size:oe.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,className:"shrink-0","aria-hidden":!0}),pe=({label:e,icon:s,description:n,mark:r=L.None,selected:i=!1,danger:u=!1,trailing:a,rightControl:d,ellipsisLabel:m=!1,labelClassName:g,children:b,className:f,disabled:N=!1,type:I="button",...w})=>{const _=i&&r===L.Highlight,y=i&&(r===L.Checkbox||r===L.Tint),k=x.mergeClasses(u&&"text-error",N&&"text-control-disable-primary"),H=x.mergeClasses(Je,"aria-expanded:bg-control-accent-alpha-hover",_&&wt,y&&Qe,N&&jt,u&&"text-error",f),O=t.jsxs("button",{type:I,disabled:N,"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":H,...w,children:[b??t.jsxs(t.Fragment,{children:[r===L.Checkbox&&t.jsx(Le,{isSelected:i,disabled:N}),s&&t.jsx(S.DialIcon,{icon:s,className:k}),m?t.jsx(be,{text:e,className:x.mergeClasses(k,g)}):t.jsx("span",{className:x.mergeClasses("min-w-0 flex-1 truncate text-start",k,g),children:e}),n&&t.jsx("span",{className:x.mergeClasses("shrink-0 text-secondary dial-small-text",N&&"text-control-disable-primary"),children:n}),i&&r===L.Check&&Ot]}),a&&t.jsx("span",{className:x.mergeClasses("ml-auto shrink-0",k),children:a})]});return d?t.jsxs("div",{role:"none",className:x.mergeClasses(H,"has-[[data-menu-item-row]:focus-visible]:outline","has-[[data-menu-item-row]:focus-visible]:outline-focus"),children:[O,d]}):O},Ce=e=>e.mark??(e.selectable?L.Checkbox:L.None),tt=e=>e.selectable?"menuitemcheckbox":Ce(e)===L.Check?"menuitemradio":"menuitem",Mt=({item:e,onRootClose:s})=>{const{isOpen:n,nodeId:r,refs:i,floatingStyles:u,context:a,getReferenceProps:d,getFloatingProps:m}=S.useSubMenuFloating(Q,"menu",!!e.disabled),g=o.useCallback(f=>N=>{f.disabled||(f.onClick?.({key:f.key,domEvent:N}),f.selectable||s())},[s]),b=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:Ht,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:b}):b,n&&t.jsx(S.SubMenuPanel,{refs:i,floatingStyles:u,context:a,getFloatingProps:m,role:"menu",surfaceClassName:Dt,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 N=tt(f),I=t.jsx(pe,{role:N,"aria-checked":N==="menuitem"?void 0:!!f.checked,"aria-current":Ce(f)===L.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:g(f),children:f.renderItem?.(f)});return t.jsx(o.Fragment,{children:f.interactiveTooltip?t.jsx(fe,{asChild:!0,placement:f.interactiveTooltip.placement,content:f.interactiveTooltip.content,contentClassName:f.interactiveTooltip.contentClassName,children:I}):I},f.key)}),e.menuFooter&&(typeof e.menuFooter=="function"?e.menuFooter():e.menuFooter)]})})]})},Bt='[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"]',Ft=e=>!e.hasAttribute("disabled")&&e.getAttribute("aria-disabled")!=="true",Vt=["ArrowDown","ArrowUp","Home","End"],Pt=(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},Gt=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,nt=({children:e,items:s,onItemClick:n,menuHeader:r,menuFooter:i,renderOverlay:u,trigger:a=[S.DropdownTrigger.Click],placement:d,disabled:m=!1,open:g,defaultOpen:b=!1,onOpenChange:f,closable:N=!1,onClose:I,className:w,overlayContentClassName:_,separatorClassName:y,listClassName:k,outsidePressIgnoreRef:H,outsideClosable:O=!0,allowedPlacements:q,anchorToMouse:R=!1,matchReferenceWidth:G=!0,maxDropdownHeight:z,initialFocus:E})=>{const ee=S.useThemeScope(),[te,X]=o.useState(b),M=g!==void 0,j=M?!!g:te,V=o.useRef(null),[B,D]=o.useState(!0),T=o.useCallback((l,v,c)=>{l&&D(c!=="hover"&&c!=="safe-polygon"),M||X(l),f?.(l)},[M,f]),ne=o.useId(),Se=d===void 0,ae=p.useFloatingNodeId(),{refs:Z,floatingStyles:W,context:F}=p.useFloating({nodeId:ae,placement:d,open:j,onOpenChange:T,whileElementsMounted:p.autoUpdate,middleware:[p.offset({mainAxis:Q,crossAxis:0}),Se?p.autoPlacement({alignment:"start",crossAxis:!0,padding:Q,allowedPlacements:q}):p.flip({padding:Q}),p.shift({padding:Q}),p.size({padding:Q,apply({availableWidth:l,availableHeight:v,elements:c}){const h=c.floating,A=Gt(c.reference);h.style.setProperty("--fui-available-height",`${Math.floor(v)}px`),h.style.setProperty("--reference-width",G?`${Math.round(A)}px`:"0px"),G?h.style.minWidth=`${Math.round(A)}px`:h.style.removeProperty("min-width"),h.style.maxWidth=`${Math.floor(l)}px`;const U=Math.floor(v);h.style.maxHeight=`${z?Math.min(U,z):U}px`}})]}),se=p.useClick(F,{enabled:a.includes(S.DropdownTrigger.Click)&&!m}),Y=p.useHover(F,{enabled:a.includes(S.DropdownTrigger.Hover)&&!m,move:!1,restMs:40,handleClose:p.safePolygon(),delay:{open:80,close:80}}),Ne=p.useDismiss(F,{bubbles:!0,referencePress:!1,outsidePress:l=>{if(!O)return!1;const v=l.target;return!(H?.current&&v instanceof Node&&H.current.contains(v))}}),re=p.useRole(F,{role:"menu"}),{getReferenceProps:le,getFloatingProps:ve}=p.useInteractions([se,Y,Ne,re]),K=o.useCallback((l,v)=>{Z.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:l,y:v,top:v,left:l,right:l,bottom:v})})},[Z]),J=o.useCallback(l=>{!a.includes(S.DropdownTrigger.ContextMenu)||m||(l.preventDefault(),R&&(K(l.clientX,l.clientY),V.current=document.elementFromPoint(l.clientX,l.clientY)),T(!0))},[R,m,T,K,a]),Ee=o.useCallback(l=>{!R||m||(a.includes(S.DropdownTrigger.ContextMenu)&&j&&T(!1),K(l.clientX,l.clientY),V.current=document.elementFromPoint(l.clientX,l.clientY))},[R,m,K,j,a,T]);o.useEffect(()=>{m&&j&&T(!1)},[m,j,T]);const Ie=o.useCallback(l=>{if(l.defaultPrevented||!Vt.includes(l.key))return;const v=Array.from(l.currentTarget.querySelectorAll(Bt)).filter(Ft);if(v.length===0)return;l.preventDefault();const c=l.currentTarget.ownerDocument.activeElement,h=v.findIndex(A=>A===c);v[Pt(l.key,h,v.length)]?.focus()},[]),ce=o.useCallback(l=>v=>{l.disabled||(l.onClick?.({key:l.key,domEvent:v}),n?.({key:l.key,domEvent:v}),l.selectable||T(!1))},[n,T]),ye=o.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:x.mergeClasses("py-1",_),"aria-label":"dropdown",children:s.map(l=>{if(l.type===S.DropdownItemType.Divider)return t.jsx("div",{role:"separator",className:x.mergeClasses(Lt,y)},l.key);if(l.type===S.DropdownItemType.PlainText)return t.jsx("div",{className:x.mergeClasses("px-3 py-2 text-secondary dial-caption-text",l.className),children:l.label},l.key);if(l.children?.length)return t.jsx(Mt,{item:l,onRootClose:()=>T(!1)},l.key);const v=Ce(l),c=tt(l),h=t.jsx(pe,{role:c,"aria-checked":c==="menuitem"?void 0:!!l.checked,"aria-current":v===L.Highlight&&l.checked?!0:void 0,"aria-disabled":!!l.disabled,disabled:l.disabled,mark:v,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(o.Fragment,{children:l.interactiveTooltip?t.jsx(fe,{asChild:!0,placement:l.interactiveTooltip.placement,content:l.interactiveTooltip.content,contentClassName:l.interactiveTooltip.contentClassName,children:h}):h},l.key)})}),i&&t.jsx(t.Fragment,{children:typeof i=="function"?i():i})]}):null,[ce,s,i,r,u,T,_,y]),ie=le({onContextMenu:J,onMouseDown:Ee});return o.useEffect(()=>{if(!j)return;const l=Z.reference.current;let v=null;if(l instanceof Element?v=l:V.current instanceof Element&&(v=V.current),!v)return;const c=new IntersectionObserver(([h])=>{h.isIntersecting||T(!1)},{root:null,threshold:0});return c.observe(v),()=>c.disconnect()},[j,Z.reference,T]),t.jsx(p.FloatingTree,{children:t.jsxs(p.FloatingNode,{id:ae,children:[t.jsx("span",{ref:Z.setReference,className:x.mergeClasses(_t,m&&"!cursor-not-allowed opacity-75",w),"aria-haspopup":"menu","aria-expanded":j,"aria-controls":ne,...ie,children:e}),j&&t.jsx(p.FloatingPortal,{children:t.jsx(p.FloatingFocusManager,{context:F,modal:!1,initialFocus:E!==void 0?E:B?0:-1,returnFocus:!0,children:t.jsxs("div",{id:ne,ref:Z.setFloating,style:W,className:x.mergeClasses(At,!G&&"w-max","overflow-auto",ee,k),...ve({onKeyDown:Ie}),children:[N&&t.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:t.jsx(qe,{ariaLabel:"Close dropdown",onClose:l=>{I?.(l),T(!1)}})}),ye]})})})]})})},He=({id:e,labelProps:s,isSelected:n=!1,isIndeterminate:r=!1,invalid:i=!1,disabled:u,onChange:a,caption:d,className:m,boxClassName:g,...b})=>{const f=o.useId(),N=e??f,I=d?`${N}-caption`:void 0,w=o.useCallback(y=>{a?.(y.target.checked)},[a]),_=o.useCallback(y=>{y&&(y.indeterminate=r)},[r]);return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:x.mergeClasses("flex items-center gap-2",m),children:[t.jsx("input",{...b,ref:_,type:"checkbox",id:N,checked:n,disabled:u,onChange:w,"aria-checked":r?"mixed":n,"aria-invalid":i||void 0,"aria-label":C.resolveAccessibleName(typeof s?.label!="string"?b["aria-label"]:void 0),"aria-describedby":I,className:"peer sr-only"}),t.jsx(Le,{htmlFor:N,isSelected:n,isIndeterminate:r,invalid:i,disabled:u,className:g}),s&&t.jsx(Ae,{size:C.ElementSize.Standard,...s,htmlFor:N,className:x.mergeClasses("py-[1px]",u?"cursor-not-allowed text-control-disable-primary":"cursor-pointer text-primary",s.className)})]}),d&&t.jsx("span",{id:I,className:"dial-tiny-text text-secondary ml-[28px]",children:d})]})},st=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"})),rt=({id:e,name:s,value:n,labelProps:r,isSelected:i=!1,disabled:u,onChange:a,caption:d,className:m,...g})=>{const b=o.useId(),f=e??b,N=d?`${f}-caption`:void 0,I=o.useCallback(w=>{w.target.checked&&a?.(n)},[a,n]);return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:x.mergeClasses("flex items-center gap-2 ",m),children:[t.jsx("input",{...g,type:"radio",id:f,name:s,value:n,checked:i,disabled:u,onChange:I,"aria-label":C.resolveAccessibleName(typeof r?.label!="string"?g["aria-label"]:void 0),"aria-describedby":N,className:"peer sr-only"}),t.jsx("label",{htmlFor:f,className:x.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":x.mergeClasses("cursor-pointer",i?"border border-accent bg-control-neutral":"border-default bg-control-neutral")),children:i&&t.jsx("span",{className:x.mergeClasses("size-3 rounded-full",u?"bg-control-disable-secondary":"bg-control-accent")})}),r&&t.jsx(Ae,{size:C.ElementSize.Standard,...r,htmlFor:f,className:x.mergeClasses("py-[1px]",u?"cursor-not-allowed text-control-disable-primary":"cursor-pointer text-primary",r.className)})]}),d&&t.jsx("span",{id:N,className:"dial-tiny-text text-secondary ml-[26px]",children:d})]})},Ve=32,ot=({title:e,description:s,icon:n,live:r=!1,className:i,titleClassName:u,descriptionClassName:a})=>t.jsxs("div",{role:r?"status":void 0,className:x.mergeClasses("flex size-full flex-col items-center justify-center gap-2 text-tertiary",i),children:[n??t.jsx(st,{width:Ve,height:Ve,"aria-hidden":"true"}),t.jsx("span",{className:x.mergeClasses("dial-tiny-text text-secondary",u),children:e}),s&&t.jsx("span",{className:x.mergeClasses("dial-tiny-text text-secondary",a),children:s})]}),at="dial-kit-grid",zt="dial-kit-grid-with-selection",Zt="dial-kit-grid-without-header-borders",Wt="dial-kit-grid-row-select",Ut="dial-kit-grid-header-select",Kt="dial-kit-grid-selection-visible",$t="dial-kit-grid-align-right",Re=40,ke="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:ke,headerRowBorder:ke,headerColumnBorder:ke,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 P=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(P||{});const qt=({params:e,mode:s,label:n,radioName:r,rowId:i,disabled:u})=>{const a=e.node,[d,m]=o.useState(()=>!!a.isSelected());o.useEffect(()=>{const b=()=>m(!!a.isSelected());return b(),a.addEventListener("rowSelected",b),()=>a.removeEventListener("rowSelected",b)},[a]);const g=b=>{u||a.setSelected(b,s===S.GridSelectionMode.SINGLE,P.CHECKBOX_SELECTED)};return s===S.GridSelectionMode.SINGLE?t.jsx(rt,{name:r,value:i,isSelected:d,disabled:u,"aria-label":n,onChange:()=>g(!0)}):t.jsx(He,{isSelected:d,disabled:u,"aria-label":n,onChange:g})},Pe=e=>{let s=0,n=0;return e.forEachNodeAfterFilter(r=>{r.selectable!==!1&&(n++,r.isSelected()&&s++)}),{selected:s,selectable:n}},Xt=({api:e,label:s})=>{const[{selected:n,selectable:r},i]=o.useState(()=>Pe(e));o.useEffect(()=>{const a=()=>i(Pe(e));return a(),e.addEventListener("selectionChanged",a),e.addEventListener("modelUpdated",a),()=>{e.isDestroyed()||(e.removeEventListener("selectionChanged",a),e.removeEventListener("modelUpdated",a))}},[e]);const u=o.useCallback(a=>{if(a){e.selectAll("filtered",P.CHECKBOX_SELECTED);return}e.deselectAll("filtered",P.CHECKBOX_SELECTED)},[e]);return t.jsx(He,{isSelected:r>0&&n===r,isIndeterminate:n>0&&n<r,disabled:r===0,"aria-label":s,onChange:u})},lt="en-US",ct={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},Te=40,Yt={minWidth:Te,width:Te,maxWidth:Te,resizable:!1,sortable:!1,filter:!1,floatingFilter:!1,suppressMovable:!0,suppressHeaderMenuButton:!0,suppressAutoSize:!0,suppressSizeToFit:!0},it="dial-kit-grid-selection",Jt=150,Qt=100,en=({columnDefs:e,rowData:s,additionalGridOptions:n,getContextMenuItems:r,className:i,ariaLabel:u="Data grid",wrapCustomCellRenderers:a=!0,disabledRowIds:d,selectedRowIds:m,onSelectionChange:g,onGridApiChange:b,getRowId:f,alternateOddRowColors:N=!1,filterPlaceholder:I="Enter value",emptyStateIcon:w,emptyStateTitle:_="No results found",emptyStateDescription:y="Sorry, we couldn't find any results for your search.",loading:k=!1,wrapperBorder:H=!0,withoutHeaderBorders:O=!1,allowDisabledContextMenu:q=!1,selectionMode:R,selectRowLabel:G,selectAllLabel:z="Select all rows"})=>{S.registerAgGridModulesOnce();const[E,ee]=o.useState(),te=S.useIsMobileScreen(),X=S.useIsTabletScreen(),M=o.useRef(new Set),j=o.useRef(void 0),V=`dial-kit-grid-selection-${o.useId()}`,B=o.useRef({getRowId:f,getContextMenuItems:r,onSelectionChange:g,selectRowLabel:G,wrapCustomCellRenderers:a});B.current={getRowId:f,getContextMenuItems:r,onSelectionChange:g,selectRowLabel:G,wrapCustomCellRenderers:a};const D=o.useCallback(c=>{const h=B.current.getRowId;return h?h(c):String(c.id??JSON.stringify(c))},[]),T=!!r,ne=!!a,Se=o.useMemo(()=>S.themeBalham.withPart(S.colorSchemeLight).withParams({...me,oddRowBackgroundColor:N?me.oddRowBackgroundColor:me.backgroundColor,wrapperBorder:H}),[N,H]),ae=o.useCallback(c=>{c.api.sizeColumnsToFit()},[]),Z=te||X||(m?.size??0)>0,W=o.useCallback(c=>!!c&&!!d?.has(D(c)),[d,D]),F=o.useCallback((c,h,A)=>T?t.jsx(nt,{trigger:[S.DropdownTrigger.ContextMenu],items:c.data?B.current.getContextMenuItems?.(c.data)??[]:[],anchorToMouse:!0,matchReferenceWidth:!0,className:x.mergeClasses("size-full",A&&"cursor-not-allowed opacity-75"),disabled:A&&!q,children:t.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:h})}):h,[T,q]),se=o.useCallback(c=>{if(!c.data)return null;const h=W(c.data);return F(c,t.jsx(be,{text:c.value==null?"":String(c.value),className:"max-w-full dial-small-text text-primary",hideTooltip:h}),h)},[W,F]),Y=o.useCallback(c=>c===P.API||c===P.ROW_DATA_CHANGED,[]),Ne=o.useMemo(()=>S.debounceFn(c=>{const A=(c.selectedNodes??[]).map(Oe=>Oe.data),U=new Set(A.map(D));M.current=U,j.current=c.source,!Y(c.source)&&B.current.onSelectionChange?.(U,A)},Qt),[Y,D]),re=o.useMemo(()=>{if(R)return{...Yt,colId:it,headerName:"",headerClass:Ut,cellClass:Wt,headerComponent:R===S.GridSelectionMode.MULTIPLE?Xt:void 0,headerComponentParams:{label:z},cellRenderer:c=>{if(!c.data)return null;const h=D(c.data);return t.jsx(qt,{params:c,mode:R,rowId:h,radioName:V,label:B.current.selectRowLabel?.(c.data)??"Select row",disabled:d?.has(h)})}}},[R,z,D,d,V]),le=o.useCallback(c=>{if(!c.cellRenderer)return{...c,cellRenderer:se};const h=B.current.wrapCustomCellRenderers;if(!(typeof h=="function"?h(c):!!h))return c;const U=c.cellRenderer;return{...c,cellRenderer:ue=>{const ut=W(ue.data),Me=typeof U=="function"?U:void 0,dt=Me?t.jsx(Me,{...ue}):se(ue);return F(ue,dt,ut)}}},[W,se,F]),ve=o.useMemo(()=>{const c=ne?(e??[]).map(le):e??[];return re?[re,...c]:c},[e,ne,le,re]),{defaultColDef:K,rowSelection:J,...Ee}=n??{},Ie=o.useMemo(()=>({minWidth:Jt,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:I,buttons:["reset"]},comparator:S.baseColumnComparator,...S.omitUndefined(K)}),[I,K]),ce=c=>{c.api.sizeColumnsToFit(),ee(c.api),n?.onGridReady?.(c),b?.(c.api)};o.useEffect(()=>{E&&s&&E.setGridOption("rowData",s)},[E,s]);const ye=o.useCallback(()=>t.jsx(ot,{live:!0,title:_,description:y,icon:w??t.jsx($.IconZoomCancel,{size:100,stroke:.5,"aria-hidden":"true"})}),[_,y,w]),ie=typeof J=="object"?J:void 0,l=o.useMemo(()=>R?{isRowSelectable:c=>!W(c.data),...ie,mode:R===S.GridSelectionMode.SINGLE?"singleRow":"multiRow",checkboxes:!1,headerCheckbox:!1}:J,[J,ie,W,R]);o.useEffect(()=>{E&&s&&M.current.size&&M.current.forEach(c=>{const h=E.getRowNode(c);h&&!h.isSelected()&&h.setSelected(!0,!1,P.API)})},[E,s]),o.useEffect(()=>{E&&m&&(E.deselectAll("all",P.API),m.forEach(c=>{const h=E.getRowNode(c);h&&!h.isSelected()&&h.setSelected(!0,!1,P.API)}))},[E,m]);const v=o.useCallback(c=>c.data?D(c.data):"",[D]);return o.useEffect(()=>{const c=Y(j.current);if(E&&m?.size&&c){const h=Array.from(m)[0];if(h){const A=E.getRowNode(h);A&&E.ensureNodeVisible(A)}}},[E,Y,m]),t.jsx("div",{className:x.mergeClasses(at,"size-full",R&&zt,R&&Z&&Kt,O&&Zt,i),role:"region","aria-label":u,"aria-busy":k,children:t.jsx("div",{className:"h-full overflow-x-auto",children:t.jsx(S.AgGridReact,{rowModelType:"clientSide",headerHeight:Re,rowHeight:Re,cellSelection:!1,theme:Se,autoSizeStrategy:{type:"fitGridWidth"},columnDefs:ve,defaultColDef:Ie,onGridSizeChanged:ae,onGridReady:ce,loading:k,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:ye,rowData:s,rowSelection:l,onSelectionChanged:Ne,getRowId:v,...Ee})})})},tn=({value:e,locale:s=lt,options:n=ct,emptyPlaceholder:r,className:i,hideTooltip:u=!1})=>{const a=S.convertToDate(e),d=o.useMemo(()=>a?new Intl.DateTimeFormat(s,n).format(a):r,[a,r,s,n]),m=a?a.toISOString():void 0;return t.jsx(be,{text:m?t.jsx("time",{dateTime:m,children:d}):t.jsx("span",{children:d}),className:x.mergeClasses("dial-small-text text-primary",i),hideTooltip:u})};exports.Checkbox=He;exports.CheckboxBox=Le;exports.CloseButton=qe;exports.DEFAULT_DATE_FORMAT_OPTIONS=ct;exports.DEFAULT_LOCALE=lt;exports.DangerIconButton=Et;exports.DateCellRenderer=tn;exports.Dropdown=nt;exports.EllipsisTooltip=be;exports.GRID_ALIGN_RIGHT_CLASS=$t;exports.GRID_ROOT_CLASS=at;exports.GRID_SELECTION_COLUMN_ID=it;exports.GRID_THEME_PARAMS=me;exports.GhostIconButton=$e;exports.Grid=en;exports.IconButton=xe;exports.InfoButton=Ue;exports.InteractiveTooltip=fe;exports.Label=Ae;exports.MenuItem=pe;exports.MenuItemMark=L;exports.NeutralIconButton=vt;exports.NoDataContent=ot;exports.PrimaryIconButton=Nt;exports.ROW_HEIGHT=Re;exports.Radio=rt;exports.StaticIconButton=It;exports.SvgNoData=st;exports.Tooltip=Ze;exports.TooltipContainer=we;exports.TooltipContent=je;exports.TooltipPlacement=he;exports.TooltipTrigger=_e;exports.getButtonClassNames=We;exports.overlayGap=et;exports.overlayItemClassName=Je;exports.overlaySubMenuClassName=Ye;
|
|
@@ -1,42 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { IconSearch as o, IconX as a,
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { IconSearch as o, IconX as a, IconChevronRight as r } from "@tabler/icons-react";
|
|
3
|
+
import c from "../../../assets/icons/no-data.svg.js";
|
|
3
4
|
import { overlayItemClassName as l, overlayGap as n, overlaySubMenuClassName as i } from "../constants/overlay.js";
|
|
4
5
|
import { DIAL_KIT_ICON_STROKE as t } from "../constants/icon.js";
|
|
5
|
-
import { DIAL_ICON_SIZE as
|
|
6
|
+
import { DIAL_ICON_SIZE as e } from "../../../constants/icon.js";
|
|
6
7
|
import { mergeClasses as m } from "../../../utils/merge-classes.js";
|
|
7
|
-
const
|
|
8
|
-
|
|
8
|
+
const f = m("w-full flex flex-col"), N = l, v = "!max-w-[var(--reference-width)]", x = "max-h-[344px] overflow-y-auto", y = n, M = i, O = /* @__PURE__ */ s(
|
|
9
|
+
r,
|
|
9
10
|
{
|
|
10
|
-
size:
|
|
11
|
+
size: e.SM,
|
|
11
12
|
stroke: t,
|
|
12
13
|
"aria-hidden": "true"
|
|
13
14
|
}
|
|
14
|
-
),
|
|
15
|
+
), w = "text-secondary transition-transform", L = 8, _ = /* @__PURE__ */ s(
|
|
15
16
|
o,
|
|
16
17
|
{
|
|
17
|
-
size:
|
|
18
|
+
size: e.MD,
|
|
18
19
|
stroke: t,
|
|
19
20
|
"aria-hidden": "true"
|
|
20
21
|
}
|
|
21
|
-
),
|
|
22
|
+
), b = /* @__PURE__ */ s(
|
|
22
23
|
a,
|
|
23
24
|
{
|
|
24
|
-
size:
|
|
25
|
+
size: e.SM,
|
|
25
26
|
stroke: t,
|
|
26
27
|
"aria-hidden": "true"
|
|
27
28
|
}
|
|
28
|
-
),
|
|
29
|
+
), g = /* @__PURE__ */ s(
|
|
30
|
+
c,
|
|
31
|
+
{
|
|
32
|
+
width: e.LG,
|
|
33
|
+
height: e.LG,
|
|
34
|
+
"aria-hidden": "true"
|
|
35
|
+
}
|
|
36
|
+
);
|
|
29
37
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
b as selectCloseIcon,
|
|
39
|
+
g as selectEmptyStateIcon,
|
|
40
|
+
w as selectFieldIconClassName,
|
|
41
|
+
v as selectListWidthClassName,
|
|
42
|
+
N as selectOptionBaseClassName,
|
|
35
43
|
x as selectOptionsScrollClassName,
|
|
36
|
-
|
|
44
|
+
f as selectOverlayBaseClassName,
|
|
37
45
|
_ as selectSearchIcon,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
L as selectSearchThreshold,
|
|
47
|
+
O as selectSubMenuCaretIcon,
|
|
48
|
+
M as selectSubMenuClassName,
|
|
49
|
+
y as selectSubMenuGap
|
|
42
50
|
};
|
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.14.0-dev.
|
|
3
|
-
"generatedAt": "2026-09-
|
|
2
|
+
"version": "0.14.0-dev.54",
|
|
3
|
+
"generatedAt": "2026-09-14T15:13:11.663Z",
|
|
4
4
|
"kit": {
|
|
5
5
|
"name": "@epam/ai-dial-ui-kit",
|
|
6
6
|
"description": "A modern UI kit for building AI DIAL interfaces with React",
|
|
7
7
|
"installation": "npm install @epam/ai-dial-ui-kit",
|
|
8
8
|
"cssImport": "import '@epam/ai-dial-ui-kit/styles.css'",
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"@floating-ui/react": "^0.27.19",
|
|
11
10
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
12
11
|
"@monaco-editor/react": "^4.7.0",
|
|
13
|
-
"@tabler/icons-react": "^3.41.1",
|
|
14
|
-
"@uiw/react-markdown-preview": "^5.2.0",
|
|
15
12
|
"@uiw/react-md-editor": "^4.1.0",
|
|
16
|
-
"classnames": "^2.5.1",
|
|
17
13
|
"monaco-editor": "^0.55.1",
|
|
18
14
|
"react": "^19.2.5",
|
|
19
15
|
"react-dom": "^19.2.5"
|
|
20
16
|
},
|
|
21
|
-
"setupNotes": "## Next.js Integration\n1. Install the package
|
|
17
|
+
"setupNotes": "## Next.js Integration\n1. Install the package. React is the only peer you have to supply — everything\n the kit renders with, it installs itself.\n\n``` bash\nnpm install @epam/ai-dial-ui-kit\nnpm install react react-dom\n```\n\nAdd the editor packages only if you use the `@epam/ai-dial-ui-kit/editors`\nsubpath. They are optional peers, so `npm install` stays quiet without them, and\nthe kit only reaches for them when a `Lazy*` editor actually mounts:\n\n``` bash\nnpm install monaco-editor @monaco-editor/react @uiw/react-md-editor\n```\n\n2. Import style in the root layout of the project:\n\n```tsx\n// app/layout.tsx\nimport \"@epam/ai-dial-ui-kit/styles.css\";\n```\n\n3. Usage example\n\n```tsx\n// app/page.tsx\n\"use client\";\nimport { DialPrimaryButton } from \"@epam/ai-dial-ui-kit\";\n\nexport default function Home() {\n return (\n <div className=\"w-full h-full flex flex-col gap-3 items-center justify-center\">\n <h1>Test library</h1>\n <DialPrimaryButton onClick={() => alert('Hello AI DIAL!')} />\n </div>\n );\n}\n```\nSee \"🎨 Theming & Customization\" section in README."
|
|
22
18
|
},
|
|
23
19
|
"styles": "# Typography CSS Utility Classes\n\n## Design-system-compliant classes (`dial-*-text`)\n\nUse these by default. They follow the design system type scale.\n\n| Class | Design name | Weight | Size / Line-height |\n| --------------------------------- | --------------------------- | -------- | ----------------------------------- |\n| `.dial-display1-text` | Display 1 | semibold | 32px / 48px |\n| `.dial-display2-text` | Display 2 | semibold | 28px / 40px |\n| `.dial-display3-text` | Display 3 | semibold | 22px / 32px |\n| `.dial-h1-text` | Heading 1 | semibold | 20px / 28px |\n| `.dial-h2-text` | Heading 2 | semibold | 18px / 26px |\n| `.dial-h3-text` | Heading 3 | semibold | 16px / 24px |\n| `.dial-body-text` | Body Text | normal | 16px / 24px |\n| `.dial-body-semi-text` | Body Text (Semi Bold) | semibold | 16px / 24px |\n| `.dial-body-paragraph-text` | Body Paragraph | normal | 16px / 26px |\n| `.dial-body-paragraph-semi-text` | Body Paragraph (Semi Bold) | semibold | 16px / 26px |\n| `.dial-small-text` | Small Text | normal | 14px / 20px |\n| `.dial-small-semi-text` | Small Text (Semi Bold) | semibold | 14px / 20px |\n| `.dial-small-paragraph-text` | Small Paragraph | normal | 14px / 24px |\n| `.dial-small-paragraph-semi-text` | Small Paragraph (Semi Bold) | semibold | 14px / 24px |\n| `.dial-tiny-text` | Tiny Text | normal | 12px / 16px |\n| `.dial-tiny-lead-text` | Tiny Text Lead | normal | 12px / 16px (+0.03em, uppercase) |\n| `.dial-tiny-semi-text` | Tiny Text (Semi Bold) | semibold | 12px / 16px |\n| `.dial-tiny-lead-semi-text` | Tiny Text Lead (Semi Bold) | semibold | 12px / 16px (+0.03em, uppercase) |\n| `.dial-caption-text` | Caption | normal | 10px / 12px |\n| `.dial-caption-lead-semi-text` | Caption Lead (Semi Bold) | semibold | 10px / 12px (+0.06em, uppercase) |\n| `.dial-code-text` | Code | normal | 14px / 20px (Fira Code / monospace) |\n| `.dial-italic-text` | Italic | normal | 18px / 22px (serif, italic) |\n| `.dial-small-italic-text` | Small Italic | normal | 14px / 20px (serif, italic) |\n| `.dial-tiny-italic-text` | Tiny Italic | normal | 12px / 16px (serif, italic) |\n| `.dial-caption-italic-text` | Caption Italic | normal | 10px / 12px (serif, italic) |\n\nThe three `*-lead-*` classes apply `text-transform: uppercase` themselves — pass them the sentence-case string, not a pre-uppercased one, so the accessible name stays readable.\n\n`.dial-code-text` resolves its family through `var(--theme-font-mono, var(--font-fira-code, 'Fira Code'))` before falling back to the system monospace stack. The kit ships no font file; the host provides the face.\n\nThe `*-italic-text` classes use a serif italic face and are intended for mathematical and formula symbols. Their line-heights follow the corresponding typography size; the default 18px variant uses a fixed 22px line-height to keep standalone symbols vertically aligned without changing their container's height.\n\n## Legacy classes (avoid in new code)\n\nClasses like `dial-h1`, `dial-h2`, `dial-body`, `dial-small*`, `dial-tiny*`, `dial-caption` are legacy. They can be used in legacy projects if user explicidly specify they need legacy typography.\n\n## Raw SCSS source\n",
|
|
24
20
|
"theming": "# Theming & CSS Variable Tokens\n\nAI DIAL UI Kit uses CSS custom properties (variables) for theming.\nDark and light themes are switched by setting different values for these variables on `:root` or a theme wrapper element.\n\n## Usage in Tailwind\n\nThe Tailwind config maps CSS variables to utility classes.\nUse these classes in your components:\n\n```tsx\n// Backgrounds\n<div className=\"bg-layer-0\" /> // darkest background\n<div className=\"bg-layer-1\" /> // main content area\n<div className=\"bg-layer-2\" /> // elevated panels\n\n// Text\n<span className=\"text-primary\" /> // main text color\n<span className=\"text-secondary\" /> // muted text\n<span className=\"text-error\" /> // error state\n\n// Borders\n<div className=\"border border-primary\" /> // standard border\n<div className=\"border border-error\" /> // error border\n```\n\n## Override CSS Variables\n\n```css\n:root {\n --bg-layer-0: #000000;\n --bg-layer-1: #0c101d;\n --bg-layer-2: #161b2d;\n --bg-layer-3: #1d2439;\n --text-primary: #eef1f7;\n --text-secondary: #9fa6bd;\n --text-error: #f76464;\n --stroke-primary: #696e7c;\n --controls-bg-accent-primary: #3664e2;\n /* ... see tailwind.config.js for full list */\n}\n```\n\n## Token Reference\n\n\n### backgroundsColors\n| Tailwind class suffix | CSS variable | Default value |\n|---|---|---|\n| `layer-sunken` | `var(--bg-layer-sunken)` | `#EEF1F7` |\n| `layer-base` | `var(--bg-layer-base)` | `#F5F7FA` |\n| `layer-raised` | `var(--bg-layer-raised)` | `#FCFCFC` |\n| `gradient-1` | `var(--bg-gradient-1)` | `#1D4ED8` |\n| `gradient-1-hover` | `var(--bg-gradient-1-hover)` | `#6785FB` |\n| `gradient-1-active` | `var(--bg-gradient-1-active)` | `#1D4ED8` |\n| `gradient-2` | `var(--bg-gradient-2)` | `#885DF2` |\n| `gradient-2-hover` | `var(--bg-gradient-2-hover)` | `#885DF2` |\n| `gradient-2-active` | `var(--bg-gradient-2-active)` | `#7C3AED` |\n| `control-accent-alpha` | `var(--bg-control-accent-alpha)` | `#2764D90F` |\n| `control-accent-alpha-hover` | `var(--bg-control-accent-alpha-hover)` | `#2764D924` |\n| `control-accent-alpha-active` | `var(--bg-control-accent-alpha-active)` | `#2764D933` |\n| `control-accent` | `var(--bg-control-accent)` | `#1D4ED8` |\n| `control-accent-hover` | `var(--bg-control-accent-hover)` | `#5976E9` |\n| `control-neutral` | `var(--bg-control-neutral)` | `#FCFCFC` |\n| `control-neutral-hover-strong` | `var(--bg-control-neutral-hover-strong)` | `#848E9C` |\n| `control-neutral-active` | `var(--bg-control-neutral-active)` | `#D1DBEA` |\n| `control-neutral-default` | `var(--bg-control-neutral-default)` | `#ACB3C3` |\n| `control-inverted` | `var(--bg-control-inverted)` | `#57647A` |\n| `control-error` | `var(--bg-control-error)` | `#AE2F2F` |\n| `control-error-hover` | `var(--bg-control-error-hover)` | `#BF3939` |\n| `control-error-active` | `var(--bg-control-error-active)` | `#CC4545` |\n| `control-error-alpha-hover` | `var(--bg-control-error-alpha-hover)` | `#F764641A` |\n| `control-error-alpha-active` | `var(--bg-control-error-alpha-active)` | `#F7646433` |\n| `control-disable-primary` | `var(--bg-control-disable-primary)` | `#DCE0E8` |\n| `control-disable-secondary` | `var(--bg-control-disable-secondary)` | `#ACB3C3` |\n| `green-1` | `var(--bg-visual-green-1)` | `#CDE8E5` |\n| `green-2` | `var(--bg-visual-green-2)` | `#D1F0DC` |\n| `violet-1` | `var(--bg-visual-violet-1)` | `#DDE3F9` |\n| `violet-2` | `var(--bg-visual-violet-2)` | `#F1E9FF` |\n\n### shadowColors\n| Tailwind class suffix | CSS variable | Default value |\n|---|---|---|\n| `xs-1` | `var(--shadow-xs-1)` | `#2764D933` |\n| `xs-2` | `var(--shadow-xs-2)` | `#161B2D08` |\n\n### borderColors\n| Tailwind class suffix | CSS variable | Default value |\n|---|---|---|\n| `accent-alpha` | `var(--stroke-accent-alpha)` | `#2764D933` |\n| `gradient-1` | `var(--stroke-gradient-1)` | `#5976E9` |\n| `gradient-2` | `var(--stroke-gradient-2)` | `#885DF2` |\n| `accent-focus` | `var(--stroke-accent-focus)` | `#6785FB` |\n| `error-alpha` | `var(--stroke-error-alpha)` | `#AE2F2F73` |\n| `control-disable-primary` | `var(--stroke-control-disable-primary)` | `#848E9C` |\n\n### textColors\n| Tailwind class suffix | CSS variable | Default value |\n|---|---|---|\n| `warning-icon` | `var(--text-warning-icon)` | `#EEC840` |\n| `green-1` | `var(--text-visual-green-1)` | `#059669` |\n| `green-2` | `var(--text-visual-green-2)` | `#0D6E72` |\n| `green-3` | `var(--text-visual-green-3)` | `#065F46` |\n| `brown-1` | `var(--text-visual-brown-1)` | `#D36817` |\n| `brown-2` | `var(--text-visual-brown-2)` | `#B45309` |\n| `violet-1` | `var(--text-visual-violet-1)` | `#7C3AED` |\n| `violet-2` | `var(--text-visual-violet-2)` | `#3730B7` |\n| `control-permanent` | `var(--text-control-permanent)` | `#FCFCFC` |\n| `control-inverted` | `var(--text-control-inverted)` | `#FCFCFC` |\n| `control-disable-primary` | `var(--text-control-disable-primary)` | `#848E9C` |\n| `control-disable-secondary` | `var(--text-control-disable-secondary)` | `#DCE0E8` |\n| `control-accent-hover` | `var(--text-control-accent-hover)` | `#5976E9` |\n| `control-accent-active` | `var(--text-control-accent-active)` | `#6785FB` |\n\n### backgroundsColorsToRemove\n| Tailwind class suffix | CSS variable | Default value |\n|---|---|---|\n| `layer-0` | `var(--bg-layer-0)` | `#FCFCFC` |\n| `layer-1` | `var(--bg-layer-1)` | `#E0E6F0` |\n| `layer-2` | `var(--bg-layer-2)` | `#EEF1F7` |\n| `layer-3` | `var(--bg-layer-3)` | `#FCFCFC` |\n| `layer-4` | `var(--bg-layer-4)` | `#D1DBEA` |\n| `accent-primary-alpha` | `var(--bg-accent-primary-alpha)` | `#7DA4FF26` |\n| `accent-secondary-alpha` | `var(--bg-accent-secondary-alpha)` | `#37BABC2E` |\n| `accent-tertiary-alpha` | `var(--bg-accent-tertiary-alpha)` | `#A972FF2E` |\n| `accent-primary` | `var(--bg-accent-primary)` | `#5C8DEA` |\n| `accent-secondary` | `var(--bg-accent-secondary)` | `#37BABC` |\n| `red-400` | `var(--bg-red-400)` | `#F76464` |\n| `controls-accent-primary` | `var(--controls-bg-accent-primary)` | `#124ACE` |\n| `controls-accent-primary-hover` | `var(--controls-bg-accent-primary-hover)` | `#2656D9` |\n| `controls-accent-primary-active` | `var(--controls-bg-accent-primary-active)` | `#3664E2` |\n| `controls-accent-primary-alpha-active` | `var(--controls-bg-accent-primary-alpha-active)` | `#7DA4FF5C` |\n| `controls-accent-secondary-alpha-active` | `var(--controls-bg-accent-secondary-alpha-active)` | `#37BABC5C` |\n| `controls-accent-tertiary-alpha-active` | `var(--controls-bg-accent-tertiary-alpha-active)` | `#A972FF5C` |\n| `controls-error` | `var(--controls-bg-error)` | `#AE2F2F` |\n| `controls-error-hover` | `var(--controls-bg-error-hover)` | `#BF3939` |\n| `controls-error-active` | `var(--controls-bg-error-active)` | `#CC4545` |\n| `controls-error-alpha-active` | `var(--controls-bg-error-alpha-active)` | `#F764645C` |\n| `controls-disable-accent` | `var(--controls-bg-disable-accent)` | `#7C8293` |\n| `controls-disable` | `var(--controls-bg-disable)` | `#D1DBEA` |\n| `controls-neutral-hover` | `var(--controls-bg-neutral-hover)` | `#D1DBEA` |\n| `controls-neutral-active` | `var(--controls-bg-neutral-active)` | `#9FA6BD` |\n| `controls-accent-success-alpha-hover` | `var(--controls-bg-accent-success-alpha-hover)` | `#37BABC2E` |\n| `controls-accent-success-alpha-active` | `var(--controls-bg-accent-success-alpha-active)` | `#37BABC5C` |\n| `controls-enable-primary` | `var(--controls-enable-primary)` | `#FCFCFC` |\n\n### borderColorsToRemove\n| Tailwind class suffix | CSS variable | Default value |\n|---|---|---|\n| `accent-primary` | `var(--stroke-accent-primary)` | `#124ACE` |\n| `accent-secondary` | `var(--stroke-accent-secondary)` | `#007274` |\n| `controls-accent` | `var(--controls-bg-accent)` | `#5C8DEA` |\n| `red-900` | `var(--red-900)` | `#402027` |\n\n### textColorsToRemove\n| Tailwind class suffix | CSS variable | Default value |\n|---|---|---|\n| `accent-primary` | `var(--text-accent-primary)` | `#7DA4FF` |\n| `accent-secondary` | `var(--text-accent-secondary)` | `#37BABC` |\n| `accent-tertiary` | `var(--text-accent-tertiary)` | `#A972FF` |\n| `controls-permanent` | `var(--controls-text-permanent)` | `#FCFCFC` |\n| `controls-accent-disable` | `var(--controls-text-accent-disable)` | `#D1DBEA` |\n| `controls-primary-disable` | `var(--controls-text-primary-disable)` | `#696E7C` |\n| `controls-secondary-disable` | `var(--controls-text-secondary-disable)` | `#9FA6BD` |\n| `controls-neutral` | `var(--controls-text-neutral)` | `#161B2D` |\n| `controls-accent-primary-hover` | `var(--controls-text-accent-primary-hover)` | `#3664E2` |\n| `controls-accent-primary-active` | `var(--controls-text-accent-primary-active)` | `#7DA4FF` |",
|