@epam/ai-dial-ui-kit 0.15.0-dev.5 → 0.15.0-dev.7
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 +139 -0
- package/dist/CHANGELOG.md +10 -0
- package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-4iMidqal.cjs} +26 -26
- package/dist/DateCellRenderer-CTTAnQjB.cjs +1 -0
- package/dist/components/Dropdown/Dropdown.js +70 -65
- package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
- package/dist/components/Dropdown/constants.js +14 -12
- package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
- package/dist/components/New/Accordion/Accordion.js +39 -37
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +7 -6
- package/dist/components/New/Calendar/Calendar.js +253 -222
- package/dist/components/New/CaptionText/CaptionText.js +18 -15
- package/dist/components/New/CardShell/CardShell.js +4 -2
- package/dist/components/New/Checkbox/Checkbox.js +67 -56
- package/dist/components/New/Checkbox/CheckboxBox.js +4 -2
- package/dist/components/New/CloseButton/CloseButton.js +18 -16
- package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +44 -39
- package/dist/components/New/Dropdown/Dropdown.js +101 -95
- package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +19 -17
- package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
- package/dist/components/New/FolderPath/FolderPath.js +29 -28
- package/dist/components/New/Highlight/Highlight.js +23 -30
- package/dist/components/New/InfoButton/InfoButton.js +12 -10
- package/dist/components/New/InlineSelect/InlineSelect.js +43 -41
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +40 -38
- package/dist/components/New/Label/Label.js +13 -8
- package/dist/components/New/MenuItem/MenuItem.js +29 -27
- package/dist/components/New/MenuItem/constants.js +9 -8
- package/dist/components/New/NoDataContent/NoDataContent.js +20 -18
- package/dist/components/New/Notification/Notification.js +28 -26
- package/dist/components/New/NumberInput/NumberInput.js +42 -33
- package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
- package/dist/components/New/Popup/Popup.js +45 -43
- package/dist/components/New/Radio/Radio.js +75 -64
- package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
- package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
- package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
- package/dist/components/New/Search/Search.js +28 -26
- package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
- package/dist/components/New/Select/Select.js +120 -109
- package/dist/components/New/Switch/Switch.js +69 -58
- package/dist/components/New/Tabs/Tabs.js +28 -22
- package/dist/components/New/Tag/Tag.js +42 -40
- package/dist/components/New/TagInput/TagInput.js +44 -42
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +25 -23
- package/dist/components/New/Tooltip/TooltipContent.js +10 -8
- package/dist/components/ProgressBar/ProgressBar.js +45 -33
- package/dist/components/Skeleton/Skeleton.js +25 -19
- package/dist/components/Spinner/Spinner.js +6 -4
- package/dist/components-manifest.json +7 -2
- package/dist/constants/public-class-names.js +152 -0
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +203 -201
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/src/constants/public-class-names.d.ts +143 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/use-file-manager-tabs-DKmWaOlC.cjs +3 -0
- package/package.json +1 -1
- package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
- package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),g=require("./DateCellRenderer-4iMidqal.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,h=i??a,S=p.useFloating({placement:s,open:m,onOpenChange:h,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(S.context,{move:!1,enabled:r==null,mouseOnly:n,delay:{open:gt,close:0}}),I=p.useFocus(S.context,{enabled:r==null}),E=p.useDismiss(S.context),k=p.useRole(S.context,{role:"tooltip"}),R=p.useInteractions([f,I,E,k]);return o.useEffect(()=>{if(!m)return;const y=S.refs.reference.current;if(!(y instanceof Element))return;const T=new IntersectionObserver(([H])=>{H.isIntersecting||h(!1)},{root:null,threshold:0});return T.observe(y),()=>T.disconnect()},[m,S.refs.reference,h]),o.useMemo(()=>({open:m,setOpen:h,arrowRef:d,...R,...S}),[m,h,R,S])},ke=({children:e,...s})=>{const n=bt(s);return t.jsx(Ge.Provider,{value:n,children:e})},Le=({style:e,...s})=>{const n=ze(),r=C.useHasHover(),i=g.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(g.DIAL_KIT_CLASS.tooltip,xt,i,n.getFloatingProps(s).className),children:[s.children,t.jsx(p.FloatingArrow,{ref:n.arrowRef,context:n.context,className:ht})]})})},Re=({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(ke,{...a,children:[t.jsx(Re,{asChild:r,className:i,children:n}),d&&t.jsx(Le,{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),h=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:h}):h},Ke=({caption:e,onClick:s,"aria-label":n})=>{if(!e)return null;const r=x.mergeClasses(g.DIAL_KIT_CLASS.infoButton,"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}})},we=({label:e,required:s,className:n,containerClassName:r,caption:i,size:u=C.ElementSize.Small,...a})=>e?t.jsxs("span",{className:x.mergeClasses(g.DIAL_KIT_CLASS.label,"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(Ke,{caption:i})]}):null;var j=(e=>(e.None="none",e.Check="check",e.Tint="tint",e.Checkbox="checkbox",e.Highlight="highlight",e))(j||{});const De=(e,s)=>({appearance:r,...i})=>t.jsx(xe,{...i,variant:e,appearance:r||s}),Ue=(e,s)=>({variant:r,...i})=>t.jsx(xe,{...i,variant:r||s,appearance:e}),It=De(C.ButtonVariant.Primary,C.ButtonAppearance.Solid),Nt=De(C.ButtonVariant.Neutral,C.ButtonAppearance.Solid),vt=De(C.ButtonVariant.Danger,C.ButtonAppearance.Ghost),$e=Ue(C.ButtonAppearance.Ghost,C.ButtonVariant.Primary),Et=Ue(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:x.mergeClasses(g.DIAL_KIT_CLASS.closeButton,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 h=s.current;h&&(a.current&&u(h.textContent??""),r(h.scrollWidth>h.clientWidth))},[]),m=o.useCallback(()=>g.scheduleMeasure(d),[d]);return o.useEffect(()=>{const h=s.current;if(h)return g.observeElementSize(h,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:h,remeasure:S}=yt(e),f=typeof e=="string"?e:h,I=o.useMemo(()=>r||!m?null:u??f,[u,f,r,m]);return t.jsxs(ke,{...a,children:[t.jsx(Re,{asChild:!0,onMouseEnter:S,onFocusCapture:S,children:t.jsx("span",{id:i,ref:d,"aria-label":m&&f?f:void 0,className:x.mergeClasses(g.DIAL_KIT_CLASS.ellipsisTooltip,"block min-w-0 max-w-full flex-1 truncate text-start",s),children:e})}),!!I&&t.jsx(Le,{className:n,children:I})]})},Tt=8,_t=400,At="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:h})=>{const S=g.useIsMobileScreen(),f=g.useThemeScope(),[I,E]=o.useState(u),k=a??I,R=D=>{d?.(D),a==null&&E(D)},y=p.useFloatingNodeId(),{refs:T,floatingStyles:H,context:O}=p.useFloating({nodeId:y,placement:s,open:k,onOpenChange:R,whileElementsMounted:p.autoUpdate,middleware:[p.offset(Tt),p.flip({padding:5}),p.shift({padding:5})]}),q=p.useHover(O,{enabled:a==null,handleClose:p.safePolygon(),delay:{open:_t,close:0}}),A=p.useFocus(O,{enabled:a==null}),G=p.useDismiss(O),{getReferenceProps:z,getFloatingProps:v}=p.useInteractions([q,A,G]),ee=o.useRef(null),te=p.useMergeRefs(o.useMemo(()=>[T.setFloating,ee],[T.setFloating])),X=r&&o.isValidElement(n),M=X?n.props?.ref:null,L=p.useMergeRefs(o.useMemo(()=>[T.setReference,...M?[M]:[]],[T.setReference,M])),V=!i&&!S&&!!e,B=X?o.cloneElement(n,z({...n.props,ref:L,className:x.mergeClasses(n.props.className,m)||void 0})):t.jsx("span",{ref:L,...z(),className:m??"text-start",children:n});return t.jsxs(t.Fragment,{children:[B,k&&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,...v(),className:x.mergeClasses(g.DIAL_KIT_CLASS.interactiveTooltip,At,f,h),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",kt=x.mergeClasses(Qe,"text-accent"),Lt=x.mergeClasses("cursor-not-allowed text-control-disable-primary","bg-transparent hover:bg-transparent"),et=4,Rt=x.mergeClasses("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),wt=x.mergeClasses("z-[53] focus-visible:outline-none",Xe),Dt=Ye,jt="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},je=({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(g.DIAL_KIT_CLASS.checkboxBox,"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),h=s?t.jsx($.IconMinus,{...Fe}):e&&t.jsx($.IconCheck,{...Fe});return d?t.jsx("label",{htmlFor:i,className:m,children:h}):t.jsx("span",{"aria-hidden":"true",className:m,children:h})},Ot=t.jsx($.IconCheck,{size:oe.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,className:`${g.DIAL_KIT_CLASS.menuItemCheck} shrink-0`,"aria-hidden":!0}),pe=({label:e,icon:s,description:n,mark:r=j.None,selected:i=!1,danger:u=!1,trailing:a,rightControl:d,ellipsisLabel:m=!1,labelClassName:h,children:S,className:f,disabled:I=!1,type:E="button",...k})=>{const R=i&&r===j.Highlight,y=i&&(r===j.Checkbox||r===j.Tint),T=x.mergeClasses(u&&"text-error",I&&"text-control-disable-primary"),H=x.mergeClasses(g.DIAL_KIT_CLASS.menuItem,Je,"aria-expanded:bg-control-accent-alpha-hover",R&&kt,y&&Qe,I&&Lt,u&&"text-error",f),O=t.jsxs("button",{type:E,disabled:I,"data-menu-item-row":d?"":void 0,className:d?"flex h-full min-w-0 flex-1 items-center gap-2 truncate text-start focus-visible:outline-none":H,...k,children:[S??t.jsxs(t.Fragment,{children:[r===j.Checkbox&&t.jsx(je,{isSelected:i,disabled:I}),s&&t.jsx(g.DialIcon,{icon:s,className:T}),m?t.jsx(be,{text:e,className:x.mergeClasses(T,h)}):t.jsx("span",{className:x.mergeClasses("min-w-0 flex-1 truncate text-start",T,h),children:e}),n&&t.jsx("span",{className:x.mergeClasses("shrink-0 text-secondary dial-small-text",I&&"text-control-disable-primary"),children:n}),i&&r===j.Check&&Ot]}),a&&t.jsx("span",{className:x.mergeClasses("ml-auto shrink-0",T),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?j.Checkbox:j.None),tt=e=>e.selectable?"menuitemcheckbox":Ce(e)===j.Check?"menuitemradio":"menuitem",Mt=({item:e,onRootClose:s})=>{const{isOpen:n,nodeId:r,refs:i,floatingStyles:u,context:a,getReferenceProps:d,getFloatingProps:m}=g.useSubMenuFloating(Q,"menu",!!e.disabled),h=o.useCallback(f=>I=>{f.disabled||(f.onClick?.({key:f.key,domEvent:I}),f.selectable||s())},[s]),S=t.jsx(pe,{ref:i.setReference,role:"menuitem","aria-haspopup":"menu","aria-expanded":n,"aria-disabled":!!e.disabled,disabled:e.disabled,icon:e.icon,label:e.label,trailing: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:S}):S,n&&t.jsx(g.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 I=tt(f),E=t.jsx(pe,{role:I,"aria-checked":I==="menuitem"?void 0:!!f.checked,"aria-current":Ce(f)===j.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:h(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:E}):E},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=[g.DropdownTrigger.Click],placement:d,disabled:m=!1,open:h,defaultOpen:S=!1,onOpenChange:f,closable:I=!1,onClose:E,className:k,overlayContentClassName:R,separatorClassName:y,listClassName:T,outsidePressIgnoreRef:H,outsideClosable:O=!0,allowedPlacements:q,anchorToMouse:A=!1,matchReferenceWidth:G=!0,maxDropdownHeight:z,initialFocus:v})=>{const ee=g.useThemeScope(),[te,X]=o.useState(S),M=h!==void 0,L=M?!!h:te,V=o.useRef(null),[B,D]=o.useState(!0),_=o.useCallback((l,N,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:L,onOpenChange:_,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:N,elements:c}){const b=c.floating,w=Gt(c.reference);b.style.setProperty("--fui-available-height",`${Math.floor(N)}px`),b.style.setProperty("--reference-width",G?`${Math.round(w)}px`:"0px"),G?b.style.minWidth=`${Math.round(w)}px`:b.style.removeProperty("min-width"),b.style.maxWidth=`${Math.floor(l)}px`;const K=Math.floor(N);b.style.maxHeight=`${z?Math.min(K,z):K}px`}})]}),se=p.useClick(F,{enabled:a.includes(g.DropdownTrigger.Click)&&!m}),Y=p.useHover(F,{enabled:a.includes(g.DropdownTrigger.Hover)&&!m,move:!1,restMs:40,handleClose:p.safePolygon(),delay:{open:80,close:80}}),Ie=p.useDismiss(F,{bubbles:!0,referencePress:!1,outsidePress:l=>{if(!O)return!1;const N=l.target;return!(H?.current&&N instanceof Node&&H.current.contains(N))}}),re=p.useRole(F,{role:"menu"}),{getReferenceProps:le,getFloatingProps:Ne}=p.useInteractions([se,Y,Ie,re]),U=o.useCallback((l,N)=>{Z.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:l,y:N,top:N,left:l,right:l,bottom:N})})},[Z]),J=o.useCallback(l=>{!a.includes(g.DropdownTrigger.ContextMenu)||m||(l.preventDefault(),A&&(U(l.clientX,l.clientY),V.current=document.elementFromPoint(l.clientX,l.clientY)),_(!0))},[A,m,_,U,a]),ve=o.useCallback(l=>{!A||m||(a.includes(g.DropdownTrigger.ContextMenu)&&L&&_(!1),U(l.clientX,l.clientY),V.current=document.elementFromPoint(l.clientX,l.clientY))},[A,m,U,L,a,_]);o.useEffect(()=>{m&&L&&_(!1)},[m,L,_]);const Ee=o.useCallback(l=>{if(l.defaultPrevented||!Vt.includes(l.key))return;const N=Array.from(l.currentTarget.querySelectorAll(Bt)).filter(Ft);if(N.length===0)return;l.preventDefault();const c=l.currentTarget.ownerDocument.activeElement,b=N.findIndex(w=>w===c);N[Pt(l.key,b,N.length)]?.focus()},[]),ce=o.useCallback(l=>N=>{l.disabled||(l.onClick?.({key:l.key,domEvent:N}),n?.({key:l.key,domEvent:N}),l.selectable||_(!1))},[n,_]),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(g.DIAL_KIT_CLASS.dropdownList,"py-1",R),"aria-label":"dropdown",children:s.map(l=>{if(l.type===g.DropdownItemType.Divider)return t.jsx("div",{role:"separator",className:x.mergeClasses(jt,y)},l.key);if(l.type===g.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:()=>_(!1)},l.key);const N=Ce(l),c=tt(l),b=t.jsx(pe,{role:c,"aria-checked":c==="menuitem"?void 0:!!l.checked,"aria-current":N===j.Highlight&&l.checked?!0:void 0,"aria-disabled":!!l.disabled,disabled:l.disabled,mark:N,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:b}):b},l.key)})}),i&&t.jsx(t.Fragment,{children:typeof i=="function"?i():i})]}):null,[ce,s,i,r,u,_,R,y]),ie=le({onContextMenu:J,onMouseDown:ve});return o.useEffect(()=>{if(!L)return;const l=Z.reference.current;let N=null;if(l instanceof Element?N=l:V.current instanceof Element&&(N=V.current),!N)return;const c=new IntersectionObserver(([b])=>{b.isIntersecting||_(!1)},{root:null,threshold:0});return c.observe(N),()=>c.disconnect()},[L,Z.reference,_]),t.jsx(p.FloatingTree,{children:t.jsxs(p.FloatingNode,{id:ae,children:[t.jsx("span",{ref:Z.setReference,className:x.mergeClasses(g.DIAL_KIT_CLASS.dropdown,Rt,m&&"!cursor-not-allowed opacity-75",k),"aria-haspopup":"menu","aria-expanded":L,"aria-controls":ne,...ie,children:e}),L&&t.jsx(p.FloatingPortal,{children:t.jsx(p.FloatingFocusManager,{context:F,modal:!1,initialFocus:v!==void 0?v:B?0:-1,returnFocus:!0,children:t.jsxs("div",{id:ne,ref:Z.setFloating,style:W,className:x.mergeClasses(wt,!G&&"w-max","overflow-auto",ee,T),...Ne({onKeyDown:Ee}),children:[I&&t.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:t.jsx(qe,{ariaLabel:"Close dropdown",onClose:l=>{E?.(l),_(!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:h,...S})=>{const f=o.useId(),I=e??f,E=d?`${I}-caption`:void 0,k=o.useCallback(y=>{a?.(y.target.checked)},[a]),R=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(g.DIAL_KIT_CLASS.checkbox,"flex items-center gap-2",m),children:[t.jsx("input",{...S,ref:R,type:"checkbox",id:I,checked:n,disabled:u,onChange:k,"aria-checked":r?"mixed":n,"aria-invalid":i||void 0,"aria-label":C.resolveAccessibleName(typeof s?.label!="string"?S["aria-label"]:void 0),"aria-describedby":E,className:"peer sr-only"}),t.jsx(je,{htmlFor:I,isSelected:n,isIndeterminate:r,invalid:i,disabled:u,className:h}),s&&t.jsx(we,{size:C.ElementSize.Standard,...s,htmlFor:I,className:x.mergeClasses("py-[1px]",u?"cursor-not-allowed text-control-disable-primary":"cursor-pointer text-primary",s.className)})]}),d&&t.jsx("span",{id:E,className:"dial-tiny-text text-secondary ml-[28px]",children:d})]})},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,...h})=>{const S=o.useId(),f=e??S,I=d?`${f}-caption`:void 0,E=o.useCallback(k=>{k.target.checked&&a?.(n)},[a,n]);return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:x.mergeClasses(g.DIAL_KIT_CLASS.radio,"flex items-center gap-2 ",m),children:[t.jsx("input",{...h,type:"radio",id:f,name:s,value:n,checked:i,disabled:u,onChange:E,"aria-label":C.resolveAccessibleName(typeof r?.label!="string"?h["aria-label"]:void 0),"aria-describedby":I,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(we,{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:I,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(g.DIAL_KIT_CLASS.noDataContent,"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",Kt="dial-kit-grid-header-select",Ut="dial-kit-grid-selection-visible",$t="dial-kit-grid-align-right",Ae=40,Te="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:Te,headerRowBorder:Te,headerColumnBorder:Te,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 S=()=>m(!!a.isSelected());return S(),a.addEventListener("rowSelected",S),()=>a.removeEventListener("rowSelected",S)},[a]);const h=S=>{u||a.setSelected(S,s===g.GridSelectionMode.SINGLE,P.CHECKBOX_SELECTED)};return s===g.GridSelectionMode.SINGLE?t.jsx(rt,{name:r,value:i,isSelected:d,disabled:u,"aria-label":n,onChange:()=>h(!0)}):t.jsx(He,{isSelected:d,disabled:u,"aria-label":n,onChange:h})},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"},_e=40,Yt={minWidth:_e,width:_e,maxWidth:_e,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:h,onGridApiChange:S,getRowId:f,alternateOddRowColors:I=!1,filterPlaceholder:E="Enter value",emptyStateIcon:k,emptyStateTitle:R="No results found",emptyStateDescription:y="Sorry, we couldn't find any results for your search.",loading:T=!1,wrapperBorder:H=!0,withoutHeaderBorders:O=!1,allowDisabledContextMenu:q=!1,selectionMode:A,selectRowLabel:G,selectAllLabel:z="Select all rows"})=>{g.registerAgGridModulesOnce();const[v,ee]=o.useState(),te=g.useIsMobileScreen(),X=g.useIsTabletScreen(),M=o.useRef(new Set),L=o.useRef(void 0),V=`dial-kit-grid-selection-${o.useId()}`,B=o.useRef({getRowId:f,getContextMenuItems:r,onSelectionChange:h,selectRowLabel:G,wrapCustomCellRenderers:a});B.current={getRowId:f,getContextMenuItems:r,onSelectionChange:h,selectRowLabel:G,wrapCustomCellRenderers:a};const D=o.useCallback(c=>{const b=B.current.getRowId;return b?b(c):String(c.id??JSON.stringify(c))},[]),_=!!r,ne=!!a,Se=o.useMemo(()=>g.themeBalham.withPart(g.colorSchemeLight).withParams({...me,oddRowBackgroundColor:I?me.oddRowBackgroundColor:me.backgroundColor,wrapperBorder:H}),[I,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,b,w)=>_?t.jsx(nt,{trigger:[g.DropdownTrigger.ContextMenu],items:c.data?B.current.getContextMenuItems?.(c.data)??[]:[],anchorToMouse:!0,matchReferenceWidth:!0,className:x.mergeClasses("size-full",w&&"cursor-not-allowed opacity-75"),disabled:w&&!q,children:t.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:b})}):b,[_,q]),se=o.useCallback(c=>{if(!c.data)return null;const b=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:b}),b)},[W,F]),Y=o.useCallback(c=>c===P.API||c===P.ROW_DATA_CHANGED,[]),Ie=o.useMemo(()=>g.debounceFn(c=>{const w=(c.selectedNodes??[]).map(Oe=>Oe.data),K=new Set(w.map(D));M.current=K,L.current=c.source,!Y(c.source)&&B.current.onSelectionChange?.(K,w)},Qt),[Y,D]),re=o.useMemo(()=>{if(A)return{...Yt,colId:it,headerName:"",headerClass:Kt,cellClass:Wt,headerComponent:A===g.GridSelectionMode.MULTIPLE?Xt:void 0,headerComponentParams:{label:z},cellRenderer:c=>{if(!c.data)return null;const b=D(c.data);return t.jsx(qt,{params:c,mode:A,rowId:b,radioName:V,label:B.current.selectRowLabel?.(c.data)??"Select row",disabled:d?.has(b)})}}},[A,z,D,d,V]),le=o.useCallback(c=>{if(!c.cellRenderer)return{...c,cellRenderer:se};const b=B.current.wrapCustomCellRenderers;if(!(typeof b=="function"?b(c):!!b))return c;const K=c.cellRenderer;return{...c,cellRenderer:ue=>{const ut=W(ue.data),Me=typeof K=="function"?K:void 0,dt=Me?t.jsx(Me,{...ue}):se(ue);return F(ue,dt,ut)}}},[W,se,F]),Ne=o.useMemo(()=>{const c=ne?(e??[]).map(le):e??[];return re?[re,...c]:c},[e,ne,le,re]),{defaultColDef:U,rowSelection:J,...ve}=n??{},Ee=o.useMemo(()=>({minWidth:Jt,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:E,buttons:["reset"]},comparator:g.baseColumnComparator,...g.omitUndefined(U)}),[E,U]),ce=c=>{c.api.sizeColumnsToFit(),ee(c.api),n?.onGridReady?.(c),S?.(c.api)};o.useEffect(()=>{v&&s&&v.setGridOption("rowData",s)},[v,s]);const ye=o.useCallback(()=>t.jsx(ot,{live:!0,title:R,description:y,icon:k??t.jsx($.IconZoomCancel,{size:100,stroke:.5,"aria-hidden":"true"})}),[R,y,k]),ie=typeof J=="object"?J:void 0,l=o.useMemo(()=>A?{isRowSelectable:c=>!W(c.data),...ie,mode:A===g.GridSelectionMode.SINGLE?"singleRow":"multiRow",checkboxes:!1,headerCheckbox:!1}:J,[J,ie,W,A]);o.useEffect(()=>{v&&s&&M.current.size&&M.current.forEach(c=>{const b=v.getRowNode(c);b&&!b.isSelected()&&b.setSelected(!0,!1,P.API)})},[v,s]),o.useEffect(()=>{v&&m&&(v.deselectAll("all",P.API),m.forEach(c=>{const b=v.getRowNode(c);b&&!b.isSelected()&&b.setSelected(!0,!1,P.API)}))},[v,m]);const N=o.useCallback(c=>c.data?D(c.data):"",[D]);return o.useEffect(()=>{const c=Y(L.current);if(v&&m?.size&&c){const b=Array.from(m)[0];if(b){const w=v.getRowNode(b);w&&v.ensureNodeVisible(w)}}},[v,Y,m]),t.jsx("div",{className:x.mergeClasses(at,"size-full",A&&zt,A&&Z&&Ut,O&&Zt,i),role:"region","aria-label":u,"aria-busy":T,children:t.jsx("div",{className:"h-full overflow-x-auto",children:t.jsx(g.AgGridReact,{rowModelType:"clientSide",headerHeight:Ae,rowHeight:Ae,cellSelection:!1,theme:Se,autoSizeStrategy:{type:"fitGridWidth"},columnDefs:Ne,defaultColDef:Ee,onGridSizeChanged:ae,onGridReady:ce,loading:T,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:ye,rowData:s,rowSelection:l,onSelectionChanged:Ie,getRowId:N,...ve})})})},tn=({value:e,locale:s=lt,options:n=ct,emptyPlaceholder:r,className:i,hideTooltip:u=!1})=>{const a=g.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=je;exports.CloseButton=qe;exports.DEFAULT_DATE_FORMAT_OPTIONS=ct;exports.DEFAULT_LOCALE=lt;exports.DangerIconButton=vt;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=Ke;exports.InteractiveTooltip=fe;exports.Label=we;exports.MenuItem=pe;exports.MenuItemMark=j;exports.NeutralIconButton=Nt;exports.NoDataContent=ot;exports.PrimaryIconButton=It;exports.ROW_HEIGHT=Ae;exports.Radio=rt;exports.StaticIconButton=Et;exports.SvgNoData=st;exports.Tooltip=Ze;exports.TooltipContainer=ke;exports.TooltipContent=Le;exports.TooltipPlacement=he;exports.TooltipTrigger=Re;exports.getButtonClassNames=We;exports.overlayGap=et;exports.overlayItemClassName=Je;exports.overlaySubMenuClassName=Ye;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsxs as v, Fragment as N, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useFloating as ce, autoUpdate as de, offset as fe, autoPlacement as ue, flip as pe, shift as me, size as he, useClick as ye, useHover as xe, useDismiss as ge, useRole as we, useInteractions as
|
|
2
|
+
import { useFloating as ce, autoUpdate as de, offset as fe, autoPlacement as ue, flip as pe, shift as me, size as he, useClick as ye, useHover as xe, useDismiss as ge, useRole as we, useInteractions as Ce, FloatingPortal as be, FloatingFocusManager as ve } from "@floating-ui/react";
|
|
3
3
|
import m from "classnames";
|
|
4
4
|
import { useState as Ne, useRef as Pe, useCallback as h, useId as ke, useEffect as U, useMemo as De } from "react";
|
|
5
|
-
import { DialIcon as
|
|
5
|
+
import { DialIcon as Ie } from "../Icon/Icon.js";
|
|
6
|
+
import { DIAL_KIT_CLASS as Me } from "../../constants/public-class-names.js";
|
|
6
7
|
import { DropdownTrigger as y, DropdownItemType as X } from "../../types/dropdown.js";
|
|
7
|
-
import { dropdownGap as x, dropdownDividerClassName as
|
|
8
|
-
import { DialCloseButton as
|
|
9
|
-
import { mergeClasses as
|
|
10
|
-
import { DropdownSubMenuItem as
|
|
11
|
-
const
|
|
8
|
+
import { dropdownGap as x, dropdownDividerClassName as Ee, dropdownItemBaseClassName as Fe, dropdownItemDisabledClassName as Re, dropdownItemDangerClassName as Ae, dropdownBaseClassName as Be, dropdownListBaseClassName as Le } from "./constants.js";
|
|
9
|
+
import { DialCloseButton as Se } from "../CloseButton/CloseButton.js";
|
|
10
|
+
import { mergeClasses as I } from "../../utils/merge-classes.js";
|
|
11
|
+
import { DropdownSubMenuItem as $e } from "./DropdownSubMenuItem.js";
|
|
12
|
+
const We = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.()?.width ?? 0, Je = ({
|
|
12
13
|
children: c,
|
|
13
14
|
items: g,
|
|
14
|
-
onItemClick:
|
|
15
|
+
onItemClick: M,
|
|
15
16
|
menuHeader: d,
|
|
16
17
|
menuFooter: f,
|
|
17
18
|
renderOverlay: P,
|
|
@@ -21,51 +22,51 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
|
|
|
21
22
|
open: F,
|
|
22
23
|
defaultOpen: Y = !1,
|
|
23
24
|
onOpenChange: R,
|
|
24
|
-
closable:
|
|
25
|
-
onClose:
|
|
26
|
-
className:
|
|
27
|
-
overlayContentClassName:
|
|
28
|
-
separatorClassName:
|
|
29
|
-
listClassName:
|
|
30
|
-
outsidePressIgnoreRef:
|
|
31
|
-
outsideClosable:
|
|
32
|
-
allowedPlacements:
|
|
25
|
+
closable: _ = !1,
|
|
26
|
+
onClose: z,
|
|
27
|
+
className: G,
|
|
28
|
+
overlayContentClassName: A,
|
|
29
|
+
separatorClassName: B,
|
|
30
|
+
listClassName: K,
|
|
31
|
+
outsidePressIgnoreRef: L,
|
|
32
|
+
outsideClosable: T = !0,
|
|
33
|
+
allowedPlacements: q,
|
|
33
34
|
anchorToMouse: w = !1,
|
|
34
35
|
matchReferenceWidth: k = !0,
|
|
35
|
-
maxDropdownHeight:
|
|
36
|
+
maxDropdownHeight: S
|
|
36
37
|
}) => {
|
|
37
|
-
const [
|
|
38
|
+
const [J, Q] = Ne(Y), D = F !== void 0, s = D ? !!F : J, C = Pe(null), n = h(
|
|
38
39
|
(e) => {
|
|
39
|
-
D ||
|
|
40
|
+
D || Q(e), R?.(e);
|
|
40
41
|
},
|
|
41
42
|
[D, R]
|
|
42
|
-
),
|
|
43
|
+
), $ = ke(), V = E === void 0, { refs: a, floatingStyles: Z, context: u } = ce({
|
|
43
44
|
placement: E,
|
|
44
45
|
open: s,
|
|
45
46
|
onOpenChange: n,
|
|
46
47
|
whileElementsMounted: de,
|
|
47
48
|
middleware: [
|
|
48
49
|
fe({ mainAxis: x, crossAxis: 0 }),
|
|
49
|
-
|
|
50
|
+
V ? ue({
|
|
50
51
|
alignment: "start",
|
|
51
52
|
crossAxis: !0,
|
|
52
53
|
padding: x,
|
|
53
|
-
allowedPlacements:
|
|
54
|
+
allowedPlacements: q
|
|
54
55
|
}) : pe({ padding: x }),
|
|
55
56
|
me({ padding: x }),
|
|
56
57
|
he({
|
|
57
58
|
padding: x,
|
|
58
59
|
apply({ availableWidth: e, availableHeight: t, elements: p }) {
|
|
59
|
-
const l = p.floating,
|
|
60
|
+
const l = p.floating, j = We(p.reference);
|
|
60
61
|
l.style.setProperty(
|
|
61
62
|
"--fui-available-height",
|
|
62
63
|
`${Math.floor(t)}px`
|
|
63
64
|
), l.style.setProperty(
|
|
64
65
|
"--reference-width",
|
|
65
|
-
k ? `${Math.round(
|
|
66
|
-
), k ? l.style.minWidth = `${Math.round(
|
|
67
|
-
const
|
|
68
|
-
l.style.maxHeight = `${
|
|
66
|
+
k ? `${Math.round(j)}px` : "0px"
|
|
67
|
+
), k ? l.style.minWidth = `${Math.round(j)}px` : l.style.removeProperty("min-width"), l.style.maxWidth = `${Math.floor(e)}px`;
|
|
68
|
+
const O = Math.floor(t);
|
|
69
|
+
l.style.maxHeight = `${S ? Math.min(O, S) : O}px`;
|
|
69
70
|
}
|
|
70
71
|
})
|
|
71
72
|
]
|
|
@@ -80,16 +81,16 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
|
|
|
80
81
|
bubbles: !0,
|
|
81
82
|
referencePress: !1,
|
|
82
83
|
outsidePress: (e) => {
|
|
83
|
-
if (!
|
|
84
|
+
if (!T) return !1;
|
|
84
85
|
const t = e.target;
|
|
85
|
-
return !(
|
|
86
|
+
return !(L?.current && t instanceof Node && L.current.contains(t));
|
|
86
87
|
}
|
|
87
|
-
}), ne = we(u, { role: "menu" }), { getReferenceProps: oe, getFloatingProps: re } =
|
|
88
|
+
}), ne = we(u, { role: "menu" }), { getReferenceProps: oe, getFloatingProps: re } = Ce([
|
|
88
89
|
H,
|
|
89
90
|
ee,
|
|
90
91
|
te,
|
|
91
92
|
ne
|
|
92
|
-
]),
|
|
93
|
+
]), b = h(
|
|
93
94
|
(e, t) => {
|
|
94
95
|
a.setPositionReference({
|
|
95
96
|
getBoundingClientRect: () => ({
|
|
@@ -107,51 +108,55 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
|
|
|
107
108
|
[a]
|
|
108
109
|
), se = h(
|
|
109
110
|
(e) => {
|
|
110
|
-
!i.includes(y.ContextMenu) || r || (e.preventDefault(), w && (
|
|
111
|
+
!i.includes(y.ContextMenu) || r || (e.preventDefault(), w && (b(e.clientX, e.clientY), C.current = document.elementFromPoint(
|
|
111
112
|
e.clientX,
|
|
112
113
|
e.clientY
|
|
113
114
|
)), n(!0));
|
|
114
115
|
},
|
|
115
|
-
[w, r, n,
|
|
116
|
+
[w, r, n, b, i]
|
|
116
117
|
), le = h(
|
|
117
118
|
(e) => {
|
|
118
|
-
!w || r || (i.includes(y.ContextMenu) && s && n(!1),
|
|
119
|
+
!w || r || (i.includes(y.ContextMenu) && s && n(!1), b(e.clientX, e.clientY), C.current = document.elementFromPoint(
|
|
119
120
|
e.clientX,
|
|
120
121
|
e.clientY
|
|
121
122
|
));
|
|
122
123
|
},
|
|
123
|
-
[w, r,
|
|
124
|
+
[w, r, b, s, i, n]
|
|
124
125
|
);
|
|
125
126
|
U(() => {
|
|
126
127
|
r && s && n(!1);
|
|
127
128
|
}, [r, s, n]);
|
|
128
|
-
const
|
|
129
|
+
const W = h(
|
|
129
130
|
(e) => (t) => {
|
|
130
|
-
e.disabled || (e.onClick?.({ key: e.key, domEvent: t }),
|
|
131
|
+
e.disabled || (e.onClick?.({ key: e.key, domEvent: t }), M?.({ key: e.key, domEvent: t }), n(!1));
|
|
131
132
|
},
|
|
132
|
-
[
|
|
133
|
+
[M, n]
|
|
133
134
|
), ie = De(() => P ? P() : g ? /* @__PURE__ */ v(N, { children: [
|
|
134
135
|
d && /* @__PURE__ */ o(N, { children: typeof d == "function" ? d() : d }),
|
|
135
136
|
/* @__PURE__ */ o(
|
|
136
137
|
"div",
|
|
137
138
|
{
|
|
138
139
|
role: "none",
|
|
139
|
-
className:
|
|
140
|
+
className: I(
|
|
141
|
+
Me.dropdownList,
|
|
142
|
+
"py-1",
|
|
143
|
+
A
|
|
144
|
+
),
|
|
140
145
|
"aria-label": "dropdown",
|
|
141
146
|
children: g.map((e) => e.type === X.Divider ? /* @__PURE__ */ o(
|
|
142
147
|
"div",
|
|
143
148
|
{
|
|
144
149
|
role: "separator",
|
|
145
|
-
className:
|
|
146
|
-
|
|
147
|
-
|
|
150
|
+
className: I(
|
|
151
|
+
Ee,
|
|
152
|
+
B
|
|
148
153
|
)
|
|
149
154
|
},
|
|
150
155
|
e.key
|
|
151
156
|
) : e.type === X.PlainText ? /* @__PURE__ */ o(
|
|
152
157
|
"div",
|
|
153
158
|
{
|
|
154
|
-
className:
|
|
159
|
+
className: I(
|
|
155
160
|
"px-3 py-2 text-secondary dial-caption-text",
|
|
156
161
|
e.className
|
|
157
162
|
),
|
|
@@ -159,7 +164,7 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
|
|
|
159
164
|
},
|
|
160
165
|
e.key
|
|
161
166
|
) : e.children?.length ? /* @__PURE__ */ o(
|
|
162
|
-
|
|
167
|
+
$e,
|
|
163
168
|
{
|
|
164
169
|
item: e,
|
|
165
170
|
onRootClose: () => n(!1)
|
|
@@ -172,13 +177,13 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
|
|
|
172
177
|
type: "button",
|
|
173
178
|
"aria-disabled": !!e.disabled,
|
|
174
179
|
className: m(
|
|
175
|
-
|
|
176
|
-
e.disabled &&
|
|
177
|
-
e.danger &&
|
|
180
|
+
Fe,
|
|
181
|
+
e.disabled && Re,
|
|
182
|
+
e.danger && Ae,
|
|
178
183
|
e.className
|
|
179
184
|
),
|
|
180
185
|
disabled: e.disabled,
|
|
181
|
-
onClick:
|
|
186
|
+
onClick: W(e),
|
|
182
187
|
children: [
|
|
183
188
|
e.icon && /* @__PURE__ */ o(
|
|
184
189
|
"span",
|
|
@@ -187,7 +192,7 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
|
|
|
187
192
|
e.danger && "text-error",
|
|
188
193
|
e.disabled && "text-secondary"
|
|
189
194
|
),
|
|
190
|
-
children: /* @__PURE__ */ o(
|
|
195
|
+
children: /* @__PURE__ */ o(Ie, { icon: e.icon })
|
|
191
196
|
}
|
|
192
197
|
),
|
|
193
198
|
/* @__PURE__ */ o(
|
|
@@ -210,14 +215,14 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
|
|
|
210
215
|
),
|
|
211
216
|
f && /* @__PURE__ */ o(N, { children: typeof f == "function" ? f() : f })
|
|
212
217
|
] }) : null, [
|
|
213
|
-
|
|
218
|
+
W,
|
|
214
219
|
g,
|
|
215
220
|
f,
|
|
216
221
|
d,
|
|
217
222
|
P,
|
|
218
223
|
n,
|
|
219
|
-
|
|
220
|
-
|
|
224
|
+
A,
|
|
225
|
+
B
|
|
221
226
|
]), ae = oe({
|
|
222
227
|
onContextMenu: se,
|
|
223
228
|
onMouseDown: le
|
|
@@ -226,7 +231,7 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
|
|
|
226
231
|
if (!s) return;
|
|
227
232
|
const e = a.reference.current;
|
|
228
233
|
let t = null;
|
|
229
|
-
if (e instanceof Element ? t = e :
|
|
234
|
+
if (e instanceof Element ? t = e : C.current instanceof Element && (t = C.current), !t) return;
|
|
230
235
|
const p = new IntersectionObserver(
|
|
231
236
|
([l]) => {
|
|
232
237
|
l.isIntersecting || n(!1);
|
|
@@ -242,16 +247,16 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
|
|
|
242
247
|
className: m(
|
|
243
248
|
Be,
|
|
244
249
|
r && "!cursor-not-allowed opacity-75",
|
|
245
|
-
|
|
250
|
+
G
|
|
246
251
|
),
|
|
247
252
|
"aria-haspopup": "menu",
|
|
248
253
|
"aria-expanded": s,
|
|
249
|
-
"aria-controls":
|
|
254
|
+
"aria-controls": $,
|
|
250
255
|
...ae,
|
|
251
256
|
children: c
|
|
252
257
|
}
|
|
253
258
|
),
|
|
254
|
-
s && /* @__PURE__ */ o(
|
|
259
|
+
s && /* @__PURE__ */ o(be, { children: /* @__PURE__ */ o(
|
|
255
260
|
ve,
|
|
256
261
|
{
|
|
257
262
|
context: u,
|
|
@@ -261,22 +266,22 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
|
|
|
261
266
|
children: /* @__PURE__ */ v(
|
|
262
267
|
"div",
|
|
263
268
|
{
|
|
264
|
-
id:
|
|
269
|
+
id: $,
|
|
265
270
|
ref: a.setFloating,
|
|
266
|
-
style:
|
|
271
|
+
style: Z,
|
|
267
272
|
className: m(
|
|
268
|
-
|
|
273
|
+
Le,
|
|
269
274
|
!k && "w-max",
|
|
270
|
-
|
|
275
|
+
K
|
|
271
276
|
),
|
|
272
277
|
...re(),
|
|
273
278
|
children: [
|
|
274
|
-
|
|
275
|
-
|
|
279
|
+
_ && /* @__PURE__ */ o("div", { className: "flex items-center justify-between px-2 pt-2", children: /* @__PURE__ */ o(
|
|
280
|
+
Se,
|
|
276
281
|
{
|
|
277
282
|
ariaLabel: "Close dropdown",
|
|
278
283
|
onClose: (e) => {
|
|
279
|
-
|
|
284
|
+
z?.(e), n(!1);
|
|
280
285
|
}
|
|
281
286
|
}
|
|
282
287
|
) }),
|
|
@@ -289,5 +294,5 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
|
|
|
289
294
|
] });
|
|
290
295
|
};
|
|
291
296
|
export {
|
|
292
|
-
|
|
297
|
+
Je as DialDropdown
|
|
293
298
|
};
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { jsxs as r, Fragment as
|
|
1
|
+
import { jsxs as r, Fragment as N, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import n from "classnames";
|
|
3
3
|
import { useCallback as y } from "react";
|
|
4
4
|
import { DialIcon as l } from "../Icon/Icon.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import { DIAL_KIT_CLASS as g } from "../../constants/public-class-names.js";
|
|
6
|
+
import { useSubMenuFloating as C, SubMenuPanel as k } from "../../utils/sub-menu-floating.js";
|
|
7
|
+
import { dropdownGap as I, submenuCaretIcon as w, dropdownItemBaseClassName as i, dropdownItemDisabledClassName as m, dropdownItemDangerClassName as S } from "./constants.js";
|
|
8
|
+
const A = ({
|
|
8
9
|
item: a,
|
|
9
10
|
onRootClose: o
|
|
10
11
|
}) => {
|
|
11
12
|
const {
|
|
12
13
|
isOpen: t,
|
|
13
14
|
refs: d,
|
|
14
|
-
floatingStyles:
|
|
15
|
-
context:
|
|
16
|
-
getReferenceProps:
|
|
15
|
+
floatingStyles: c,
|
|
16
|
+
context: p,
|
|
17
|
+
getReferenceProps: b,
|
|
17
18
|
getFloatingProps: u
|
|
18
|
-
} =
|
|
19
|
-
(e) => (
|
|
20
|
-
e.disabled || (e.onClick?.({ key: e.key, domEvent:
|
|
19
|
+
} = C(I, "menu", !!a.disabled), x = y(
|
|
20
|
+
(e) => (f) => {
|
|
21
|
+
e.disabled || (e.onClick?.({ key: e.key, domEvent: f }), o());
|
|
21
22
|
},
|
|
22
23
|
[o]
|
|
23
24
|
);
|
|
24
|
-
return /* @__PURE__ */ r(
|
|
25
|
+
return /* @__PURE__ */ r(N, { children: [
|
|
25
26
|
/* @__PURE__ */ r(
|
|
26
27
|
"button",
|
|
27
28
|
{
|
|
@@ -33,11 +34,11 @@ const v = ({
|
|
|
33
34
|
"aria-disabled": !!a.disabled,
|
|
34
35
|
disabled: a.disabled,
|
|
35
36
|
className: n(
|
|
36
|
-
|
|
37
|
-
a.disabled &&
|
|
37
|
+
i,
|
|
38
|
+
a.disabled && m,
|
|
38
39
|
a.className
|
|
39
40
|
),
|
|
40
|
-
...
|
|
41
|
+
...b(),
|
|
41
42
|
children: [
|
|
42
43
|
a.icon && /* @__PURE__ */ s("span", { className: n(a.disabled && "text-secondary"), children: /* @__PURE__ */ s(l, { icon: a.icon }) }),
|
|
43
44
|
/* @__PURE__ */ s(
|
|
@@ -67,55 +68,62 @@ const v = ({
|
|
|
67
68
|
k,
|
|
68
69
|
{
|
|
69
70
|
refs: d,
|
|
70
|
-
floatingStyles:
|
|
71
|
-
context:
|
|
71
|
+
floatingStyles: c,
|
|
72
|
+
context: p,
|
|
72
73
|
getFloatingProps: u,
|
|
73
74
|
role: "menu",
|
|
74
75
|
className: "w-max",
|
|
75
|
-
children: /* @__PURE__ */ s(
|
|
76
|
-
"
|
|
76
|
+
children: /* @__PURE__ */ s(
|
|
77
|
+
"div",
|
|
77
78
|
{
|
|
78
|
-
role: "
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
79
|
+
role: "none",
|
|
80
|
+
className: n(g.dropdownList, "py-1"),
|
|
81
|
+
children: a.children.map((e) => /* @__PURE__ */ r(
|
|
82
|
+
"button",
|
|
83
|
+
{
|
|
84
|
+
role: "menuitem",
|
|
85
|
+
type: "button",
|
|
86
|
+
"aria-disabled": !!e.disabled,
|
|
87
|
+
disabled: e.disabled,
|
|
88
|
+
className: n(
|
|
89
|
+
i,
|
|
90
|
+
e.disabled && m,
|
|
91
|
+
e.danger && S,
|
|
92
|
+
e.className
|
|
93
|
+
),
|
|
94
|
+
onClick: x(e),
|
|
95
|
+
children: [
|
|
96
|
+
e.icon && /* @__PURE__ */ s(
|
|
97
|
+
"span",
|
|
98
|
+
{
|
|
99
|
+
className: n(
|
|
100
|
+
e.danger && "text-error",
|
|
101
|
+
e.disabled && "text-secondary"
|
|
102
|
+
),
|
|
103
|
+
children: /* @__PURE__ */ s(l, { icon: e.icon })
|
|
104
|
+
}
|
|
96
105
|
),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
)) })
|
|
106
|
+
/* @__PURE__ */ s(
|
|
107
|
+
"span",
|
|
108
|
+
{
|
|
109
|
+
className: n(
|
|
110
|
+
"flex-1 truncate text-start",
|
|
111
|
+
e.danger && "text-error",
|
|
112
|
+
e.disabled && "text-secondary"
|
|
113
|
+
),
|
|
114
|
+
children: e.label
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
e.key
|
|
120
|
+
))
|
|
121
|
+
}
|
|
122
|
+
)
|
|
115
123
|
}
|
|
116
124
|
)
|
|
117
125
|
] });
|
|
118
126
|
};
|
|
119
127
|
export {
|
|
120
|
-
|
|
128
|
+
A as DropdownSubMenuItem
|
|
121
129
|
};
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import o from "classnames";
|
|
3
3
|
import { IconChevronRight as r } from "@tabler/icons-react";
|
|
4
|
-
|
|
4
|
+
import { DIAL_KIT_CLASS as s } from "../../constants/public-class-names.js";
|
|
5
|
+
const m = o(
|
|
5
6
|
"flex items-center gap-2 align-middle",
|
|
6
7
|
"h-auto px-0 bg-transparent border-0"
|
|
7
|
-
), d = o(
|
|
8
|
-
"z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none"
|
|
9
8
|
), i = o(
|
|
9
|
+
"z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none"
|
|
10
|
+
), l = o(
|
|
11
|
+
s.menuItem,
|
|
10
12
|
"flex w-full cursor-pointer items-center gap-3",
|
|
11
13
|
"focus-visible:border-none focus-visible:outline-none",
|
|
12
14
|
"hover:bg-accent-primary-alpha px-3",
|
|
13
15
|
"dial-small-text h-[34px] rounded text-primary"
|
|
14
|
-
),
|
|
16
|
+
), p = "opacity-75 !cursor-not-allowed", c = "text-error", u = "my-1 border-t border-hover border-secondary", b = 4, f = /* @__PURE__ */ e(r, { size: 14 });
|
|
15
17
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
m as dropdownBaseClassName,
|
|
19
|
+
u as dropdownDividerClassName,
|
|
20
|
+
b as dropdownGap,
|
|
21
|
+
l as dropdownItemBaseClassName,
|
|
22
|
+
c as dropdownItemDangerClassName,
|
|
23
|
+
p as dropdownItemDisabledClassName,
|
|
24
|
+
i as dropdownListBaseClassName,
|
|
25
|
+
f as submenuCaretIcon
|
|
24
26
|
};
|