@maxio-com/react-ui-components 9.18.0 → 9.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import a,{useRef as t,useEffect as l,useState as n,forwardRef as i,cloneElement as o,isValidElement as r,createContext as s,useId as c,useContext as m,Children as d,useMemo as u,useLayoutEffect as p,useCallback as x,useImperativeHandle as v}from"react";import g from"classnames";import{useId as b,useLink as h,useButton as f,usePress as E,useFocusRing as _,mergeProps as N,useCheckboxGroupItem as w,useCheckbox as y,useCheckboxGroup as k,useRadio as C,useRadioGroup as I,useTextField as S,useProgressBar as P,useToggleButton as $}from"react-aria";import{useObjectRef as D,useResizeObserver as T}from"@react-aria/utils";import{flexRender as z,useReactTable as O,getSortedRowModel as R,getExpandedRowModel as M,getCoreRowModel as B}from"@tanstack/react-table";export{createColumnHelper}from"@tanstack/react-table";import{useToggleState as A}from"@react-stately/toggle";import{useCheckboxGroupState as W}from"@react-stately/checkbox";import{ModalOverlay as L,Modal as H,Dialog as V,ListBox as F,ListBoxItem as j,composeRenderProps as K,ListBoxSection as q,Header as U,Popover as G,OverlayArrow as Z,ComboBox as Y,Label as X,Input as Q,Button as J,Text as ee,FieldError as ae,TextField as te,TextArea as le,ToggleButtonGroup as ne,ToggleButton as ie,SelectionIndicator as oe,Tab as re,Tabs as se,TabPanel as ce,TabPanels as me,TabListStateContext as de,TabList as ue,MenuTrigger as pe,Menu as xe,MenuItem as ve}from"react-aria-components";export{DialogTrigger,Pressable}from"react-aria-components";import{AnimatePresence as ge,motion as be}from"framer-motion";import{useDismiss as he,useFocus as fe,useHover as Ee,useClick as _e,useFloating as Ne,offset as we,useInteractions as ye,useRole as ke,FloatingPortal as Ce}from"@floating-ui/react-dom-interactions";import{useRadioGroupState as Ie}from"@react-stately/radio";import{useToastState as Se,useToastQueue as Pe,ToastQueue as $e}from"@react-stately/toast";import{useToast as De,useToastRegion as Te}from"@react-aria/toast";const ze=["address-card","arrow-down","arrow-down-left","arrow-down-left-long","arrow-down-long","arrow-down-right","arrow-down-right-long","arrow-down-up","arrow-left","arrow-left-long","arrow-left-right","arrow-right","arrow-right-long","arrow-turn-down-right","arrow-up","arrow-up-left","arrow-up-left-long","arrow-up-long","arrow-up-right","arrow-up-right-long","bank","bar-chart","briefcase","building","business-intelligence","calendar","caret-down","caret-left","caret-right","caret-up","chat","check","check-box","check-box-checked","check-box-checked-fill","check-box-indeterminate-fill","check-circle","check-circle-fill","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle","circle-half-stroke-small","circle-small-dash","circle-small-fill","circle-small-stroke","clipboard","cog","copy-file","credit-card","cross","cross-circle","cross-circle-fill","dashboard","diamond-small-fill","document","document-blank","dollar","dot-circle-fill","dot-fill","error","error-fill","error-small-fill","graph","home","info-circle","info-circle-fill","line-vertical","list","login","logout","megaphone","menu","menu-chevron-left","menu-chevron-right","notification","notification-unread","pen","plus","plus-circle","plus-circle-fill","question-circle","question-circle-fill","recently-viewed","search","square-small-fill","trash","triangle-small-fill","user","warning-circle","warning-circle-fill"],Oe=["anrok","dropbox","hubspot","numeral","oracle","quotapath","sage","sphere","taxjar"],Re=["avalara","pipedrive","quickbooks","salesforce","xero"],Me=({variant:e,color:t,className:l,size:n})=>{const i=(e,a)=>a.includes(e),o=i(e,ze)||i(e,Oe),r=i(e,Re),s=g({"fa-kit":o,"fa-kit-duotone":r,"fa-sharp fa-regular":!o&&!r,[`fa-${e}`]:!0,[`fa-${n}`]:n,[`maxio-icon--${t}`]:t&&!i(e,Oe)&&!i(e,Re)},l);return a.createElement("i",{className:s})},Be=({item:e,isSelected:n,truncateLabel:i=!1,role:o="option",small:r=!1})=>{const s=t(null),c=t(!1),m=b();if(l(()=>{var e;n&&c.current&&(null===(e=s.current)||void 0===e||e.focus())},[n]),l(()=>{c.current=!0},[]),"divider"===e.type)return a.createElement("div",{className:"maxio-action-list__divider",role:"separator","aria-hidden":"true"});const{leadingIconName:d,leadingIconClassName:u,trailingIconName:p,label:x,description:v,link:h}=e,f=g("maxio-action-list__label",{"maxio-truncate":i});return a.createElement("a",{"aria-labelledby":m,...h,className:g("maxio-action-list__content",h.className,{"maxio-action-list__content--size-small":r}),tabIndex:n?0:-1,ref:s,role:o},d&&a.createElement(Me,{variant:d,className:g("maxio-action-list__leading-icon",u)}),a.createElement("span",{className:f,id:m},x),v&&a.createElement("span",{className:"maxio-action-list__description"},v),p&&a.createElement(Me,{variant:p,className:"maxio-action-list__trailing-icon"}))},Ae=(e,a,t)=>0===e?e:1===e&&"divider"===a[e-1].type?t||e:"divider"===a[e-1].type?Ae(e-1,a,t||e):e-1,We=({items:e,isShadowed:t=!0,itemProps:l={},className:i,truncateLabels:o=!1,small:r=!1,...s})=>{const c=g("maxio-action-list",i,{"maxio-action-list--shadow":t}),[m,d]=n(()=>e.findIndex(e=>"divider"!==e.type));return 0===e.length?null:a.createElement("div",{className:c,onKeyDown:a=>{if("Space"===a.code||"Enter"===a.code){const a=e[m];a&&"divider"!==a.type&&window.open(a.link.href,a.link.target||"_self")}"ArrowUp"===a.code&&(a.preventDefault(),d(a=>Ae(a,e))),"ArrowDown"===a.code&&(a.preventDefault(),d(a=>((e,a)=>{const t=a.findIndex((a,t)=>"divider"!==a.type&&t>e);return-1===t?e:t})(a,e)))},role:"listbox",...s},e.map((e,t)=>a.createElement(Be,{item:e,truncateLabel:o,key:`listbox-${e.id}`,isSelected:t===m,small:r,...l})))},Le=({className:e,children:t,disabled:l,external:n,icon:i,size:o="sm",underline:r,variant:s,...c})=>{const m=g("maxio-link",{[`maxio-link--${o}`]:o,"maxio-link--disabled":l,[`maxio-link--${s}`]:s,"maxio-link--underline":r},e),d=n?"_blank":"_self";return a.createElement("a",{className:m,target:d,...c},t,i&&a.createElement(Me,{variant:i,className:"maxio-link__icon"}))},He=({size:e="md",white:t=!1,className:l})=>{const n=g("maxio-loading-spinner",l,`maxio-loading-spinner--${e}`,{"maxio-loading-spinner--white":t});return a.createElement("div",{className:n,role:"status","aria-label":"loading"})},Ve=i(({fullWidth:e=!1,leadingElement:t,trailingElement:l,icon:n,variant:i="primary",size:s,...c},m)=>{const d=D(m),{linkProps:u}=h({...c},d),p=g("maxio-button",c.className,{[`maxio-button--${s}`]:s,[`maxio-button--${i}`]:i,"maxio-button--full-width":e});return a.createElement("a",{...u,ref:d,className:p,href:c.href},t&&o(t,{...r(t)&&{className:"maxio-button__leading-element"}}),c.children,(l||n)&&o(l||n,{...r(l||n)&&{className:"maxio-button__trailing-element"}}))}),Fe=i(({disabled:e,loading:t=!1,fullWidth:l=!1,leadingElement:n,trailingElement:i,icon:s,variant:c="primary",size:m,...d},u)=>{const p=D(u),{buttonProps:x}=f({...d,isDisabled:e,formAction:"string"==typeof d.formAction?d.formAction:void 0},p),v=["primary","danger"].includes(c),b=g("maxio-button",d.className,{[`maxio-button--${m}`]:m,[`maxio-button--${c}`]:c,"maxio-button--loading":t,"maxio-button--full-width":l});return a.createElement("button",{...x,className:b,ref:p},n&&o(n,{...r(n)&&{className:"maxio-button__leading-element"}}),d.children,!t&&(i||s)&&o(i||s,{...r(i||s)&&{className:"maxio-button__trailing-element"}}),t&&a.createElement(He,{className:"maxio-button__trailing-element",size:"md",white:v}))}),je=i((e,t)=>(e=>"href"in e)(e)?a.createElement(Ve,{...e,ref:t}):a.createElement(Fe,{...e,ref:t})),Ke=({"aria-label":e,className:t,...l})=>a.createElement(je,{"aria-label":e,className:g("maxio-button--icon",t),...l},null),qe=({children:e,title:t,linkText:l,linkExternal:n,href:i,display:o="inline",sentiment:r="info",onDismiss:s,className:c})=>{if(!e&&!t)return console.warn("Alert component requires either children or title prop to be rendered"),null;const m=g("maxio-alert",{[`maxio-alert--${r}`]:"info"!==r&&r},c),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[r],u=g("maxio-alert__content",{"maxio-alert__content--block":"block"===o});return a.createElement("div",{className:m},a.createElement(Me,{variant:d,className:"maxio-alert__icon","aria-hidden":"true"}),a.createElement("section",{className:"maxio-alert__container"},a.createElement("div",{className:u},t&&a.createElement("span",{className:"maxio-alert__title"},t),e&&a.createElement("span",{className:"maxio-alert__message"},e),l&&i&&a.createElement(Le,{className:"maxio-alert__link",href:i,variant:"high-contrast",underline:!0,...n?{external:!0}:{}},l))),s&&a.createElement(Ke,{icon:a.createElement(Me,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-alert__dismiss"}))},Ue=s({}),Ge=({children:e})=>{const[t,l]=n(!1),i=c(),o=c();return a.createElement(Ue.Provider,{value:{controlsId:i,buttonId:o,isOpen:t,onClose:()=>l(!1),onOpen:()=>l(!0),onToggle:()=>l(e=>!e)}},e)};function Ze(){const e=m(Ue);if(!e||"object"==typeof e&&0===Object.keys(e).length)throw new Error("useMenu hook must be used within a MenuProvider");return e}const Ye=({children:e})=>{const{isOpen:t,onToggle:l,onClose:n}=Ze();return a.createElement("details",{open:t,onToggle:l,className:"maxio-action-menu"},"function"==typeof e?e({isOpen:t,onClose:n}):e)},Xe=({children:e})=>a.createElement(Ge,null,a.createElement(Ye,null,e)),Qe=({items:e,alignItemsEnd:t=!1})=>{const l=g("maxio-action-menu__content",{"maxio-action-menu__content--align-end":t}),{controlsId:n,buttonId:i}=Ze();return a.createElement("div",{className:l,role:"presentation"},a.createElement(We,{role:"menu",itemProps:{role:"menuitem"},id:n,"aria-labelledby":i,items:e}))},Je=({children:e,iconName:t="chevron-down","aria-label":l,size:n="md",variant:i="secondary"})=>{const o=g({"maxio-action-menu__chevron":"chevron-down"===t}),r=g("maxio-button",`maxio-button--${i}`,`maxio-button--${n}`,{"maxio-button--icon":t&&!e}),{isOpen:s,buttonId:c,controlsId:m}=Ze();return a.createElement("summary",{className:r,"aria-haspopup":"true","aria-label":l,"aria-expanded":s,"aria-controls":m,id:c},e&&a.createElement("span",null,e),t&&a.createElement(Me,{variant:t,className:`${o} maxio-button__trailing-element`}))},ea=({className:e,src:t,alt:l="avatar"})=>a.createElement("img",{className:g("maxio-avatar",e),alt:l,src:t}),aa=({children:e,title:t,linkText:l,linkExternal:n,href:i,display:o="inline",sentiment:r="info",onDismiss:s,className:c})=>{if(!e&&!t)return console.warn("Banner component requires either children or title prop to be rendered"),null;const m=g("maxio-banner",{[`maxio-banner--${r}`]:"info"!==r&&r,className:c}),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[r],u=g("maxio-banner__content",{"maxio-banner__content--block":"block"===o});return a.createElement("div",{className:m,"aria-live":"assertive"},a.createElement(Me,{variant:d,className:"maxio-banner__icon","aria-hidden":"true"}),a.createElement("section",{className:"maxio-banner__container"},a.createElement("div",{className:u},t&&a.createElement("span",{className:"maxio-banner__title"},t),e&&a.createElement("span",{className:"maxio-banner__message"},e),l&&i&&a.createElement(Le,{href:i,..."warning"!==r&&{variant:"inverse"},underline:!0,...n?{external:!0}:{}},l))),s&&a.createElement(Ke,{icon:a.createElement(Me,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-banner__dismiss"}))},ta=({children:e,className:t,href:l,...n})=>{const i=l?a.createElement(Le,{size:"sm",href:l},e):e;return a.createElement("li",{className:g("maxio-breadcrumbs__item",t),...n},i)},la="Breadcrumbs requires at least one BreadcrumbsItem as children",na='Last BreadcrumbsItem should not have "href" prop. It is the current page.',ia="Breadcrumbs only accepts BreadcrumbsItem as children",oa=({className:e,children:t,...l})=>{const n=d.count(t);if(0===n)throw new Error(la);const i=d.map(t,(e,a)=>{if(r(e)&&e.type===ta){if(a===n-1&&e.props.href)throw new Error(na);return o(e,{"aria-current":a===n-1?"page":void 0})}throw new Error(ia)});return a.createElement("nav",{"aria-label":"Breadcrumb",...l},a.createElement("ol",{className:g("maxio-breadcrumbs",e)},i))},ra="row-controls",sa="row-actions",ca=({children:e,pattern:t,size:l,isExpandable:i,isUsingCustomRow:o})=>{const[r,s]=n(!1),[c,m]=n(!1),d=t&&o&&i,u=g("maxio-data-table",{"maxio-data-table--pattern":t&&!d,"maxio-data-table--expanded-child-pattern":d,"maxio-data-table--with-custom-row":o,[`maxio-data-table--${l}`]:l,"maxio-data-table--with-pinned-left-border":r,"maxio-data-table--with-pinned-right-border":c});return a.createElement("div",{className:"maxio-data-table-wrapper",onScroll:e=>{const a=e.target;s(a.scrollLeft>0),m(a.scrollWidth-a.clientWidth-a.scrollLeft>0)}},a.createElement("table",{className:u},e))},ma=({children:e})=>a.createElement("thead",null,e),da=({children:e})=>a.createElement("tbody",null,e),ua=({children:e,table:t,header:l,className:n,enableExpanding:i,...o})=>{var r,s,c,m,d,u,p,x,v,b,h;const f=null==l?void 0:l.column,E=null===(r=null==f?void 0:f.getCanSort)||void 0===r?void 0:r.call(f),_=null===(s=null==f?void 0:f.getToggleSortingHandler)||void 0===s?void 0:s.call(f),N=null==l?void 0:l.isPlaceholder,w=null===(m=null===(c=null==f?void 0:f.columnDef)||void 0===c?void 0:c.meta)||void 0===m?void 0:m.align,y=null===(u=null===(d=null==f?void 0:f.columnDef)||void 0===d?void 0:d.meta)||void 0===u?void 0:u.width,k=null===(x=null===(p=null==f?void 0:f.columnDef)||void 0===p?void 0:p.meta)||void 0===x?void 0:x.controls,C=null===(b=null===(v=null==f?void 0:f.columnDef)||void 0===v?void 0:v.meta)||void 0===b?void 0:b.actions,I=null==f?void 0:f.getIsPinned(),S=null==f?void 0:f.getIsSorted(),P="asc"===S,$=g("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${I}`]:I,"maxio-data-table__cell--sortable":E,"maxio-data-table__cell--active":S,[`maxio-data-table__cell--${w}`]:w,"maxio-data-table__cell--controls":k,"maxio-data-table__cell--actions":C}),D={...y?{width:y}:{},..."left"===I?{left:null==f?void 0:f.getStart("left")}:"right"===I?{right:null==f?void 0:f.getAfter("right")}:{}},T=((e,a)=>e&&a?"arrow-up":e&&!a?"arrow-down":"arrow-down-up")(!!S,P),z=null==t?void 0:t.getToggleAllRowsExpandedHandler(),O=null===(h=null==t?void 0:t.getIsAllRowsExpanded)||void 0===h?void 0:h.call(t),R=(null==l?void 0:l.headerGroup.headers[0].id)===ra?1:0,M=i&&(null==l?void 0:l.index)===R;return N?null:a.createElement("th",{scope:"col",role:"columnheader","aria-sort":S?P?"ascending":"descending":"none",className:$,onClick:_,colSpan:null==l?void 0:l.colSpan,style:D,...o},a.createElement("div",{className:"maxio-data-table__cell-flex"},!0===i&&M&&a.createElement(Ke,{size:"sm",variant:"ghost",icon:a.createElement(Me,{size:"xs",variant:O?"chevron-down":"chevron-right"}),onClick:z,"aria-label":O?"Collapse all rows":"Expand all rows","data-open":O,className:"maxio-data-table__expand-button"}),e,E&&a.createElement(Me,{variant:T,className:"maxio-data-table__sort-icon"})))},pa=({children:e,row:t,isChild:l,isHeader:n,className:i,onRowAction:o,...r})=>{var s,c,m;const d=null===(s=null==t?void 0:t.getIsSelected)||void 0===s?void 0:s.call(t),u=(null===(c=null==t?void 0:t.getCanExpand)||void 0===c?void 0:c.call(t))&&(null===(m=null==t?void 0:t.getIsExpanded)||void 0===m?void 0:m.call(t)),p=Boolean(t&&o&&!n&&!l),x=a.useRef(null),v=e=>{x.current=e.target},{pressProps:b}=E({isDisabled:!p,onPress:e=>{var a;const l=null!==(a=x.current)&&void 0!==a?a:e.target;x.current=null,t&&o&&!(e=>e instanceof Element&&Boolean(e.closest("a,button,input,select,textarea,label,.maxio-data-table__cell--controls,.maxio-data-table__cell--actions")))(l)&&o(t)}}),{focusProps:h,isFocused:f}=_(),w=g({"maxio-data-table__row":!n,"maxio-data-table__header-row":n,"maxio-data-table__row--active":d||f,"maxio-data-table__row--expanded":u,"maxio-data-table__row--expanded-child":l,"maxio-data-table__row--actionable":p},i),y=p?N({onClickCapture:v,onKeyDownCapture:v,tabIndex:0},b,h,r):r;return a.createElement("tr",{...y,className:w,tabIndex:p?y.tabIndex:r.tabIndex},e)},xa=s({}),va=i(({checked:e,disabled:t,invalid:l,indeterminate:n,className:i,inputProps:o,error:r,label:s},c)=>{const m=g("maxio-checkbox",{"maxio-checkbox--checked":e,"maxio-checkbox--disabled":t,"maxio-checkbox--error":l,"maxio-checkbox--indeterminate":n},i);return a.createElement("label",{className:m},a.createElement("input",{type:"checkbox",role:"checkbox",className:"maxio-checkbox__input",ref:c,...o}),a.createElement("span",{className:"maxio-checkbox__control"},r&&a.createElement("span",{className:"maxio-checkbox__control-error"})),s&&a.createElement("span",{className:"maxio-checkbox__label"},s))});va.displayName="InnerCheckbox";const ga=({label:e,error:l=!1,className:n,indeterminate:i,value:o="",disabled:r,readOnly:s,defaultChecked:c,checked:d,...u})=>{const p=t(null),x=m(xa),{inputProps:v,isDisabled:g,isInvalid:b,isSelected:h}=x&&Object.keys(x).length>0?w({value:o,"aria-label":null!=e?e:u["aria-label"],isDisabled:r,isInvalid:l,isIndeterminate:i,isReadOnly:s,...u},x,p):y({"aria-label":null!=e?e:u["aria-label"],isDisabled:r,isInvalid:l,isIndeterminate:i,isReadOnly:s,value:o,...u},A({...u,isSelected:d,defaultSelected:c}),p);return a.createElement(va,{inputProps:v,checked:h,disabled:g,invalid:b,indeterminate:i,className:n,error:l,label:e,ref:p,...u})},ba=({children:e,className:t,...l})=>a.createElement("div",{className:g("maxio-form-helper-text",t),...l},e),ha=({children:e,className:t,...l})=>a.createElement("div",{className:g("maxio-form-error",t),...l},a.createElement(Me,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},e)),fa=({helperText:e,className:t,errorMessage:l,children:n,disabled:i,label:o,defaultValue:r,name:s,...c})=>{var m;const d=W({defaultValue:r,name:s,errorMessage:l,description:e,label:o,isDisabled:i,isInvalid:!!l,...c}),{groupProps:u,labelProps:p,descriptionProps:x,errorMessageProps:v,isInvalid:b}=k({"aria-label":null===(m=null!=o?o:c["aria-label"])||void 0===m?void 0:m.toString(),isDisabled:i,isInvalid:!!l,...c},d),h=g("maxio-checkbox-group",{"maxio-checkbox-group--disabled":i},t),f=e&&!l;return a.createElement("div",{className:h,...u},o&&a.createElement("label",{className:"maxio-checkbox-group__label",...p},o),a.createElement(xa.Provider,{value:d},n),f&&a.createElement(ba,{...x},e),l&&b&&a.createElement(ha,{...v},l))},Ea=({table:e})=>{var t,l,n,i;const o=null===(t=null==e?void 0:e.getToggleAllPageRowsSelectedHandler)||void 0===t?void 0:t.call(e),r=(null===(l=null==e?void 0:e.getIsAllPageRowsSelected)||void 0===l?void 0:l.call(e))||(null===(n=null==e?void 0:e.getIsAllRowsSelected)||void 0===n?void 0:n.call(e)),s=null===(i=null==e?void 0:e.getIsSomePageRowsSelected)||void 0===i?void 0:i.call(e);return a.createElement(ga,{"aria-label":"Select all rows",onChange:e=>{o("boolean"==typeof e?{target:{checked:e}}:e)},checked:r,indeterminate:!r&&s})},_a=({row:e})=>{var t,l,n,i;const o=null===(t=null==e?void 0:e.getToggleSelectedHandler)||void 0===t?void 0:t.call(e),r=(null===(l=null==e?void 0:e.getIsSelected)||void 0===l?void 0:l.call(e))||(null===(n=null==e?void 0:e.getIsAllSubRowsSelected)||void 0===n?void 0:n.call(e)),s=null===(i=null==e?void 0:e.getIsSomeSelected)||void 0===i?void 0:i.call(e),c=e.id||e.index;return a.createElement(ga,{"aria-label":`Select row ${c}`,onChange:o,checked:r,indeterminate:s})},Na=({children:e})=>a.createElement("div",{className:"maxio-data-table__cell-flex"},e),wa=({row:e,cell:t,children:l,className:n,...i})=>{var o,r,s,c,m,d;const u=null==t?void 0:t.column,p=null===(r=null===(o=null==u?void 0:u.columnDef)||void 0===o?void 0:o.meta)||void 0===r?void 0:r.align,x=null===(c=null===(s=null==u?void 0:u.columnDef)||void 0===s?void 0:s.meta)||void 0===c?void 0:c.controls,v=null===(d=null===(m=null==u?void 0:u.columnDef)||void 0===m?void 0:m.meta)||void 0===d?void 0:d.actions,b=null==u?void 0:u.getIsPinned(),h=g("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${b}`]:b,[`maxio-data-table__cell--${p}`]:p,"maxio-data-table__cell--controls":x,"maxio-data-table__cell--actions":v}),f="left"===b?{left:null==u?void 0:u.getStart("left")}:"right"===b?{right:null==u?void 0:u.getAfter("right")}:{};return a.createElement("td",{className:h,style:f,...i},l)},ya=({row:e,SubRowComponent:t,pattern:l,enableExpanding:n,onRowAction:i})=>{var o,r,s,c,m;const d=t&&e.getParentRow()&&e.getParentRow().getIsExpanded(),u=d&&e.getVisibleCells()[0].column.columnDef.id===ra,p=d&&e.getVisibleCells()[e.getVisibleCells().length-1].column.columnDef.id===sa,x=[p,u].filter(Boolean).length,v=e.getVisibleCells().length-x,g=null!==(r=null===(o=e.getParentRow())||void 0===o?void 0:o.index)&&void 0!==r?r:e.index,b=l&&t&&g%2==1?"maxio-data-table__row--with-pattern":void 0,h=null===(s=e.getCanExpand)||void 0===s?void 0:s.call(e),f=null===(c=null==e?void 0:e.getToggleExpandedHandler)||void 0===c?void 0:c.call(e),E=null===(m=null==e?void 0:e.getIsExpanded)||void 0===m?void 0:m.call(e),_=h&&n?0:1.75,N=e.getVisibleCells()[0].column.columnDef.id===ra?1:0,w=e.getVisibleCells().find(({column:e})=>{var a;const{actions:t,controls:l}=null!==(a=e.columnDef.meta)&&void 0!==a?a:{};return!t&&!l}),y=i&&w?w.id:void 0;return a.createElement(a.Fragment,{key:e.id},d?a.createElement(pa,{key:`${e.id}-sub`,row:e,isChild:!0,className:b},u&&a.createElement(wa,{className:"maxio-data-table__cell--pinned-left"}),a.createElement(wa,{colSpan:v},t(e)),p&&a.createElement(wa,{className:"maxio-data-table__cell--pinned-right"})):a.createElement(pa,{key:`${e.id}-parent`,row:e,className:b,onRowAction:i,"aria-labelledby":y},e.getVisibleCells().map(t=>{const l=n&&t.column.getIndex()===N;return a.createElement(wa,{key:t.id,row:e,cell:t,id:t.id},a.createElement("div",{className:"maxio-data-table__cell-flex",style:n&&l?{paddingLeft:`${(null==e?void 0:e.depth)+_}rem`}:void 0},n&&h&&l&&a.createElement(Ke,{size:"sm",variant:"ghost",icon:a.createElement(Me,{size:"xs",variant:E?"chevron-down":"chevron-right"}),onClick:f,"aria-label":E?"Collapse row":"Expand row","data-open":E,className:"maxio-data-table__expand-button"}),z(t.column.columnDef.cell,t.getContext())))})))},ka=(e=[])=>e.filter(e=>e!==ra&&e!==sa),Ca=({pattern:e,size:t="md",SubRowComponent:n,onExpand:i,onSelect:o,onSort:r,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:m,columns:d,actions:p,actionsColumnSize:x,onRowAction:v,state:g,...b})=>{var h,f;const E=(({columns:e,HeaderControls:t,RowControls:l,RowActions:n,actions:i,actionsColumnSize:o,enableExpanding:r,enableRowSelection:s})=>u(()=>{const c={id:ra,size:40,header:e=>a.createElement(t,{...e,enableExpanding:r,enableRowSelection:s}),cell:e=>a.createElement(l,{...e,enableExpanding:r}),meta:{controls:!0}},m=i&&n?{id:sa,size:null!=o?o:40,header:"",cell:e=>a.createElement(n,null,i(e.row,e.table)),meta:{actions:!0}}:null;let d=[...e];return s&&(d=[c,...d]),m&&(d=[...d,m]),d},[i,o,n,r,s,e,t,l]))({columns:d,HeaderControls:Ea,RowControls:_a,RowActions:Na,actions:p,actionsColumnSize:x,enableRowSelection:c,enableExpanding:Boolean(m)}),_=O({state:{...g,columnPinning:{left:[...c?[ra]:[],...ka(null===(h=null==g?void 0:g.columnPinning)||void 0===h?void 0:h.left)],right:[...ka(null===(f=null==g?void 0:g.columnPinning)||void 0===f?void 0:f.right),...p?[sa]:[]]}},getSubRows:e=>e.subRows,getCoreRowModel:B(),enableRowSelection:c,enableExpanding:Boolean(m),...!b.manualExpanding&&{getExpandedRowModel:M()},enableSorting:s,...!b.manualSorting&&{getSortedRowModel:R()},columns:E,...b}),N=_.getCanSomeRowsExpand(),w=_.getState();return l(()=>{null==i||i(w.expanded)},[i,w.expanded]),l(()=>{null==o||o(w.rowSelection)},[o,w.rowSelection]),l(()=>{null==r||r(w.sorting)},[r,w.sorting]),a.createElement(ca,{pattern:e,size:t,isExpandable:N,isUsingCustomRow:!!n},a.createElement(ma,null,_.getHeaderGroups().map(e=>a.createElement(pa,{key:e.id,table:_,isHeader:!0},e.headers.map(e=>a.createElement(ua,{key:e.id,table:_,header:e,enableExpanding:m},z(e.column.columnDef.header,e.getContext())))))),a.createElement(da,null,_.getRowModel().rows.map(t=>a.createElement(ya,{key:t.id,row:t,pattern:e,SubRowComponent:n,enableExpanding:m,onRowAction:v}))))},Ia={sm:"h3",md:"h2",lg:"h1"},Sa=({children:e,size:t="sm",className:l,...n})=>{const i=Ia[t],o=g(`maxio-heading-${t}`,l);return a.createElement(i,{className:o,...n},e)},Pa=({open:e,onOpenChange:t,placement:l="right",backdrop:n="dim",size:i="md",className:o,title:r,description:s,children:c,footer:m})=>{const d=a.useId(),u={"data-placement":l,"data-size":i};return a.createElement(L,{isOpen:e,onOpenChange:t,isDismissable:!0,className:g("maxio-drawer__backdrop",{"maxio-drawer__backdrop--dim":"dim"===n})},a.createElement(H,{className:g("maxio-drawer",o),...u},a.createElement(V,{className:"maxio-drawer__dialog","aria-labelledby":d},({close:e})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-drawer__header"},a.createElement("div",{className:"maxio-drawer__title-group"},a.createElement(Sa,{id:d,size:"md",className:"maxio-drawer__title"},r),s&&a.createElement("p",{className:"maxio-drawer__description"},s)),a.createElement(Ke,{"aria-label":"Close",onClick:e,icon:a.createElement(Me,{variant:"cross"}),variant:"ghost",size:"sm",className:"maxio-drawer__close"})),a.createElement("div",{className:"maxio-drawer__body"},c),null!=m&&a.createElement("div",{className:"maxio-drawer__footer"},m)))))},$a={click:_e,hover:e=>Ee(e,{delay:100}),focus:fe,dismiss:he},Da=(e,a)=>a.map(a=>$a[a](e)),Ta=({placement:e="top",isActive:a=!1,interactions:n=["hover"],floatingElementOffset:i=0,onOverlayUpdate:o,autoHideMs:r})=>{const s=t(null),{strategy:c,x:m,y:d,context:u,floating:p,reference:x}=Ne({placement:e,open:a,onOpenChange:e=>o(e),middleware:[we(i)]}),{getReferenceProps:v,getFloatingProps:g}=ye([...Da(u,n),ke(u,{role:"tooltip"})]);l(()=>{s.current&&clearTimeout(s.current),a&&r&&(s.current=window.setTimeout(()=>o(!1),r))},[a,r]);return{isActive:a,refs:{floating:p,reference:x},floatingElementCSSPosition:{position:c,top:null!=d?d:0,left:null!=m?m:0},getReferenceProps:v,getFloatingProps:g}};function za(e,a=0){const i=t((new Date).getTime()),o=t((new Date).getTime()),[r,s]=n(!1);return l(()=>{const t=()=>{i.current=(new Date).getTime(),s(!0)},l=()=>{o.current=(new Date).getTime(),window.setTimeout(()=>{i.current-o.current<=0&&s(!1)},a)},n=e&&e.current;return n&&(n.addEventListener("mouseenter",t),n.addEventListener("mouseleave",l)),()=>{n&&(n.removeEventListener("mouseenter",t),n.removeEventListener("mouseleave",l))}},[e]),r}function Oa(e=500){const[a,i]=n(()=>{if("undefined"==typeof window)return{windowWitdh:0,windowHeight:0};const{innerWidth:e,innerHeight:a}=window;return{windowWitdh:e,windowHeight:a}}),o=t(null);return l(()=>{if("undefined"==typeof window)return;const a=()=>{var a;const{innerWidth:t,innerHeight:l}=window;window.clearTimeout(null!==(a=o.current)&&void 0!==a?a:void 0),o.current=window.setTimeout(()=>{i({windowWitdh:t,windowHeight:l})},e)};return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[e]),a}function Ra(e){const[a,t]=n(()=>{var a,t;return null!==(t=null===(a=e.current)||void 0===a?void 0:a.clientWidth)&&void 0!==t?t:0}),l=()=>{var a,l;const n=null!==(l=null===(a=e.current)||void 0===a?void 0:a.clientWidth)&&void 0!==l?l:0;t(e=>0===n&&e>0?e:n)};return p(l,[e]),T({ref:e,onResize:l}),a}const Ma=({children:e,usePortal:t=!1,isActive:l=!1,placement:n="top",interactions:i=["hover"],role:o="tooltip",renderOverlay:r,floatingElementOffset:s,motionSettings:c={},autoHideMs:m,onOverlayUpdate:d,className:u})=>{const{getReferenceProps:p,getFloatingProps:x,refs:{floating:v,reference:b},floatingElementCSSPosition:h}=Ta({isActive:l,onOverlayUpdate:d,autoHideMs:m,floatingElementOffset:s,interactions:i,placement:n}),f=a.createElement(ge,null,l&&a.createElement(be.div,{ref:v,style:h,...c,...x()},r()));return a.createElement(a.Fragment,null,a.createElement("div",{ref:b,className:g("maxio-inline-flex",u),...p(),"data-testid":"overlay-trigger"},e),t?a.createElement(Ce,{id:"maxio-ui-portal"},f):f)},Ba=({children:e,arrowPosition:t,size:l="regular",maxWidth:n=160})=>a.createElement("div",{"data-testid":"tooltip",className:g("maxio-tooltip",`maxio-tooltip--${l}`,{[`maxio-tooltip--arrow-${t}`]:t})},a.createElement("div",{className:"maxio-tooltip__content",style:{maxWidth:n}},e)),Aa={top:"bottom",right:"left",bottom:"top",left:"right","top-start":"bottom-left","top-end":"bottom-right","right-start":"left-top","right-end":"left-bottom","bottom-start":"top-left","bottom-end":"top-right","left-start":"right-top","left-end":"right-bottom"},Wa=({children:e,interactions:i=["hover"],placement:o="right",maxWidth:r=160,size:s="regular",renderContent:c,autoHideMs:m,isVisible:d,usePortal:p,className:v,onVisibilityUpdate:g,floatingElementOffset:b=5})=>{const[h,f]=n(!1),E=void 0!==d,_=t(null),N=x(e=>{_.current&&clearTimeout(_.current),_.current=window.setTimeout(()=>{E||f(e),g&&g(e)},50)},[E,g]),w=u(()=>(e=>{const a=e.startsWith("top")||e.startsWith("bottom")?"Y":"X",t=`translate${a}(${e.startsWith("bottom")||e.startsWith("right")?"-":""}10px)`;return{initial:{opacity:0,visibility:"hidden",transform:t},animate:{opacity:1,visibility:"visible",transform:`translate${a}(0px)`},exit:{opacity:0,visibility:"hidden",transform:t},transition:{ease:[.4,0,.5,1],duration:.2}}})(o),[o]);return l(()=>()=>{_.current&&clearTimeout(_.current)},[]),a.createElement(Ma,{role:"tooltip",className:v,floatingElementOffset:b,motionSettings:w,isActive:E?d:h,onOverlayUpdate:N,autoHideMs:m,usePortal:p,placement:o,interactions:i,renderOverlay:()=>a.createElement(Ba,{size:s,arrowPosition:Aa[o],maxWidth:r},c())},e)},La=({as:e="div",children:t,compact:l=!1,size:n="md",className:i,...o})=>{const r=e,s=g({[`maxio-body-${n}`]:!l,[`maxio-body-${n}-compact`]:l},i);return a.createElement(r,{className:s,...o},t)},Ha=({className:e,...t})=>a.createElement(F,{...t,className:g("maxio-listbox",e)});Ha.displayName="ListBox";const Va=({className:e,...t})=>{const l=t.textValue||("string"==typeof t.children?t.children:void 0);return a.createElement(j,{...t,textValue:l,className:g("maxio-listbox__item",e)},K(t.children,(e,{isSelected:t})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-listbox__content"},"string"==typeof e?a.createElement(La,{size:"sm"},e):e),t&&a.createElement(Me,{variant:"check"}))))};Va.displayName="ListBox.Item";const Fa=({className:e,...t})=>a.createElement(q,{...t,className:g("maxio-listbox__section",e)});Fa.displayName="ListBox.Section";const ja=({className:e,...t})=>a.createElement(U,{...t,className:g("maxio-listbox__header",e)});ja.displayName="ListBox.Header";const Ka=Object.assign(Ha,{Item:Va,Section:Fa,Header:ja}),qa=({className:e,hideArrow:t=!1,children:l,offset:n=4,...i})=>a.createElement(G,{...i,className:g("maxio-popover",e),offset:n},a.createElement(a.Fragment,null,!t&&a.createElement(Z,{className:"maxio-popover__arrow"},a.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12","aria-hidden":!0},a.createElement("path",{d:"M0 0 L6 6 L12 0"}))),l)),Ua=({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:o,errorMessage:r,leadingElement:s=null,fullWidth:c,className:m,placeholder:d,renderEmptyState:u,selectionMode:p,children:x,...v})=>{const b=a.useRef(null),h=a.useRef(null),[f,E]=a.useState(),[_,N]=a.useState(0),w=!!r,y=t||w,k=x,C=a.useCallback(()=>{const e=b.current;if(!e)return;const a=h.current,t=a?a.getBoundingClientRect().left-e.getBoundingClientRect().left:0;N(e=>e===-t?e:-t),E(a=>{const t=`${e.offsetWidth}px`;return(null==a?void 0:a["--trigger-width"])===t?a:{"--trigger-width":t}})},[]);a.useEffect(()=>{const e=b.current;if(!e)return;if(C(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(C);return a.observe(e),()=>a.disconnect()},[C]);const I=g("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":y,"maxio-text-field--readonly":l,"maxio-text-field--full-width":c},m);return a.createElement(Y,{...v,isDisabled:e,isInvalid:y,isReadOnly:l,selectionMode:p,className:I},i&&a.createElement(X,{className:"maxio-text-field__label"},i),a.createElement("div",{ref:b,className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(Q,{ref:h,className:"maxio-text-field__input",placeholder:d}),a.createElement("div",{className:"maxio-text-field__trailing-element"},a.createElement(J,{className:g("maxio-button","maxio-button--ghost","maxio-button--icon","maxio-button--sm")},a.createElement(Me,{variant:"chevron-up-down"})))),o&&!w&&a.createElement(ee,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},o),r&&a.createElement(ae,{className:"maxio-form-error"},e=>a.createElement(a.Fragment,null,a.createElement(Me,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},"function"==typeof r?r(e):r))),a.createElement(qa,{hideArrow:!0,className:"maxio-combobox__popover",crossOffset:_,style:f},a.createElement(Ka,{renderEmptyState:u},k)))};Ua.displayName="ComboBox";const Ga=e=>a.createElement(Ka.Item,{...e});Ga.displayName="ComboBox.Item";const Za=e=>a.createElement(Ka.Section,{...e});Za.displayName="ComboBox.Section";const Ya=e=>a.createElement(Ka.Header,{...e});Ya.displayName="ComboBox.Header";const Xa=Object.assign(Ua,{Item:Ga,Section:Za,Header:Ya}),Qa=s({}),Ja=({indent:e=!1,disabled:l=!1,invalid:n=!1,label:i,...o})=>{const r=t(null),s=m(Qa),{inputProps:c,isDisabled:d}=C({...o,value:(o.value||"").toString(),"aria-label":o["aria-label"]||i,isDisabled:l},s,r),u=g("maxio-radio",{"maxio-radio--indent":e,"maxio-radio--disabled":d||s.isDisabled,"maxio-radio--error":n||s.isInvalid});return a.createElement("label",{className:u},a.createElement("input",{ref:r,role:"radio",type:"radio",className:"maxio-radio__input",...c,name:s.name||c.name}),a.createElement("span",{className:"maxio-radio__control"}),a.createElement("span",{className:"maxio-radio__label"},i))},et=({children:e,label:t,errorMessage:l,helperText:n,disabled:i=!1,invalid:o=!1,name:r,defaultValue:s,...c})=>{const m=Ie({isDisabled:i,isInvalid:o,description:n,name:r,label:t,errorMessage:l,defaultValue:s,...c}),{radioGroupProps:d,labelProps:u,descriptionProps:p,errorMessageProps:x}=I({"aria-label":c["aria-label"]||t,...c},m);return a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-radio-group",...d},t&&a.createElement("label",{className:"maxio-radio-group__label",...u},t),a.createElement(Qa.Provider,{value:m},e),o&&l&&a.createElement(ha,{...x},l),n&&!o&&a.createElement(ba,{...p},n)))},at=i(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:o,errorMessage:r,leadingElement:s=null,trailingElement:c=null,fullWidth:m,className:d,...u},p)=>{const x=g("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":t,"maxio-text-field--readonly":l,"maxio-text-field--full-width":m},d);return a.createElement(te,{...u,isDisabled:e,isReadOnly:l,isInvalid:t,className:x},i&&a.createElement(X,{className:"maxio-text-field__label"},i),a.createElement("div",{className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(Q,{ref:p,className:"maxio-text-field__input"}),c&&a.createElement("div",{className:"maxio-text-field__trailing-element"},c)),o&&!(t&&r)&&a.createElement(ee,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},o),r&&a.createElement(ae,{className:"maxio-form-error"},a.createElement(Me,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},r)))});at.displayName="TextField";const tt=i(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:o,errorMessage:r,fullWidth:s,className:c,...m},d)=>{const u=g("maxio-text-area",`maxio-text-area--${n}`,{"maxio-text-area--disabled":e,"maxio-text-area--error":t,"maxio-text-area--readonly":l,"maxio-text-area--full-width":s},c);return a.createElement(te,{...m,isDisabled:e,isReadOnly:l,isInvalid:t,className:u},i&&a.createElement(X,{className:"maxio-form-label"},i),a.createElement(le,{ref:d,className:"maxio-text-area__input"}),o&&!(t&&r)&&a.createElement(ee,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},o),r&&a.createElement(ae,{className:"maxio-form-error"},a.createElement(Me,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},r)))});tt.displayName="TextArea";const lt=i(({disabled:e=!1,invalid:n=!1,readOnly:i=!1,size:o="md",label:r,helperText:s,showErrorMessage:c=!0,errorMessage:m,leadingElement:d=null,trailingElement:u=null,fullWidth:p,className:x,...b},h)=>{var f,E;const _=t(null);v(h,()=>_.current),l(()=>{console.warn("TextInput is deprecated. Please use TextField instead.")},[]);const{spellCheck:N,...w}=b,y={...w,label:r,description:s,errorMessage:m,defaultValue:null===(f=b.defaultValue)||void 0===f?void 0:f.toString(),value:null===(E=b.value)||void 0===E?void 0:E.toString(),isDisabled:e,isReadOnly:i,isInvalid:n},{labelProps:k,inputProps:C,descriptionProps:I,errorMessageProps:P}=S(y,_),$=g("maxio-text-field",`maxio-text-field--${o}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":n,"maxio-text-field--readonly":i,"maxio-text-field--full-width":p},x),D=n&&m&&c;return a.createElement("div",{className:$},r&&a.createElement("label",{className:"maxio-text-field__label",...k},r),a.createElement("div",{className:"maxio-text-field__items"},d&&a.createElement("div",{className:"maxio-text-field__leading-element"},d),a.createElement("input",{ref:_,type:"text",className:"maxio-text-field__input",...C,spellCheck:N}),u&&a.createElement("div",{className:"maxio-text-field__trailing-element"},u)),s&&!D&&a.createElement("div",{className:"maxio-form-helper-text",...I},s),D&&a.createElement(ha,{...P},m))});lt.displayName="TextInput";const nt=({options:e,label:t,size:l="md",inline:n=!1,disabled:i=!1,helperText:o,errorMessage:r,fullWidth:s=!1,...c})=>{const m=g("maxio-select",`maxio-select--${l}`,{"maxio-select--disabled":i,"maxio-select--inline":n,"maxio-select--error":!!r,"maxio-select--full-width":s}),d=b();return a.createElement("div",{className:m},t&&a.createElement("label",{htmlFor:d,className:"maxio-select__label"},t),a.createElement("div",{className:"maxio-select__input-container"},a.createElement("select",{id:d,className:"maxio-select__input",disabled:i,...c},e.map(e=>a.createElement("option",{key:`option-${e.value}`,value:e.value,disabled:e.disabled},e.label))),a.createElement(Me,{variant:"chevron-up-down"})),!!r&&a.createElement(ha,null,r),o&&!r&&a.createElement("div",{className:"maxio-form-helper-text"},o))},it=({size:e="md",onChange:t,totalItems:i=0,itemsPerPage:o=30,currentPage:r=1,pageSizeOptions:s,manualPageInput:c=!1})=>{const[m,d]=n(r),[u,p]=n(o),[x,v]=n(r.toString());l(()=>{v(m.toString())},[m]);const g=Math.ceil(i/u),b=m<g,h=m>1,f=u*(m-1)+1,E=Math.min(u*m,i),_=s.map(e=>({label:e.toString(),value:e.toString()})),N=Array.from({length:g},(e,a)=>a+1).map(e=>({label:e.toString(),value:e.toString()})),w=e=>{d(e),null==t||t({currentPage:e,itemsPerPage:u})},y=e=>{const a=parseInt(e,10);if(isNaN(a))return void v(m.toString());const t=Math.max(1,Math.min(a,g));v(t.toString()),w(t)};return a.createElement("div",{className:"maxio-pagination"},a.createElement("div",{className:"maxio-pagination__items-per-page"},a.createElement("label",{htmlFor:"items-per-page-large",className:"maxio-pagination__label"},"Items per page"),a.createElement(nt,{inline:!0,size:e,options:_,onChange:e=>{return a=Number(e.target.value),p(a),d(1),void(null==t||t({currentPage:1,itemsPerPage:a}));var a},value:u,id:"items-per-page-large"})),a.createElement("div",{className:"maxio-pagination__total-items"},a.createElement("span",null,f,"–",E," of ",i," items")),a.createElement("div",{className:"maxio-pagination__current-page"},c?a.createElement(lt,{className:"maxio-pagination__page-input",value:x,min:1,max:g,onChange:e=>(e=>{v(e)})(e),onBlur:e=>{y(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(y(e.currentTarget.value),e.currentTarget.blur())},"aria-label":"Page number",size:e,type:"number",onWheel:e=>e.preventDefault()}):a.createElement(nt,{inline:!0,size:e,"aria-label":"Select page",onChange:e=>w(Number(e.target.value)),value:m,options:N,id:"page-index-large"}),a.createElement("div",{className:"maxio-pagination__label"},"of ",g," pages")),a.createElement("div",{className:"maxio-pagination__controls"},a.createElement(Wa,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},a.createElement(Ke,{icon:a.createElement(Me,{variant:"chevron-left"}),size:e,variant:"ghost",onClick:()=>w(m-1),"aria-label":"Previous",disabled:!h})),a.createElement(Wa,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},a.createElement(Ke,{icon:a.createElement(Me,{variant:"chevron-right"}),size:e,variant:"ghost",onClick:()=>w(m+1),"aria-label":"Next",disabled:!b}))))},ot=({label:e,helperText:t,size:l="md",variant:n="default",status:i,value:o,maxValue:r=100})=>{const s=b(),c=b(),m=i&&!!e&&!!o&&!("inline"===n),d=t&&!("inline"===n),u=t&&"inline"===n,{progressBarProps:p,labelProps:x}=P({maxValue:r,value:o,label:e}),v=g("maxio-progress-bar",{"maxio-progress-bar--lg":"lg"===l,"maxio-progress-bar--success":o&&!("inline"===n)&&"success"===i,"maxio-progress-bar--error":o&&!("inline"===n)&&"error"===i,"maxio-progress-bar--indent":"indent"===n,"maxio-progress-bar--inline":"inline"===n,"maxio-progress-bar--indeterminate":void 0===o});return a.createElement("div",{className:v,...p},a.createElement("div",{id:s,className:"maxio-progress-bar__label",...x},e),u&&a.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t),a.createElement("div",{className:"maxio-progress-bar__track"},a.createElement("div",{className:"maxio-progress-bar__progress",style:{"--tw-scale-x":`${o}%`}})),m&&a.createElement("div",{className:`maxio-progress-bar__${i}-icon`}),d&&a.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t))},rt=({className:e,size:t="md",fullWidth:l=!1,selectionMode:n="single",orientation:i="horizontal",disallowEmptySelection:o=!0,...r})=>a.createElement(ne,{...r,selectionMode:n,orientation:i,disallowEmptySelection:o,className:K(e,e=>g("maxio-segmented-control",`maxio-segmented-control--${t}`,{"maxio-segmented-control--full-width":l},e))});rt.displayName="SegmentedControl";const st=({className:e,children:t,...l})=>a.createElement(ie,{...l,className:K(e,e=>g("maxio-segmented-control__item",e))},K(t,e=>a.createElement(a.Fragment,null,a.createElement(oe,{className:"maxio-segmented-control__selection-indicator","data-selected":!0}),e)));st.displayName="SegmentedControl.Item";const ct=Object.assign(rt,{Item:st}),mt=({leadingIcon:e,trailingIcon:t,type:l="menu",children:n,leadingIconClassName:i,isTooltipVisible:o=!1})=>a.createElement(a.Fragment,null,e&&a.createElement(Wa,{usePortal:!0,isVisible:o,renderContent:()=>n,floatingElementOffset:12},a.createElement("span",{className:"maxio-side-nav__icon"},a.createElement(Me,{variant:e,className:i}))),a.createElement("span",{className:`maxio-side-nav__${l}-title`,"data-testid":"maxio-sidebar-section-name"},n),t&&a.createElement("span",{className:"maxio-side-nav__menu-chevron"},a.createElement(Me,{variant:t}))),dt=e=>"heading"!==e.type,ut=e=>{const a=(e=>e.flat().filter(dt).map(e=>e.items).flat().find(e=>null==e?void 0:e.isCurrent))(e);return a?e.map(e=>e.map(e=>{var t;return dt(e)&&(null===(t=e.items)||void 0===t?void 0:t.includes(a))?{...e,isOpen:!0}:e})):e},pt=s({}),xt=()=>m(pt),vt=({children:e,isOpen:i,onChange:o,withIcons:r=!0,sections:s,shouldToggleSidebar:c=!0,topDropdownItems:m,collapseBreakpoint:d=800})=>{const u=t(!1),[p,x]=n(()=>!c||("boolean"==typeof i?i:"undefined"==typeof window||window.innerWidth>d)),[v,g]=n(()=>ut(s)),{windowWitdh:b}=Oa(200);l(()=>{u.current&&(null==o||o(p))},[p,o]),l(()=>{u.current=!0},[]),l(()=>{!function(e){if(!c)return;e<d&&p&&h()}(b)},[b]),l(()=>{"boolean"==typeof i&&x(i)},[i]);const h=()=>{x(!1)};return a.createElement(pt.Provider,{value:{sections:v,topDropdownItems:m,onSectionOpen:e=>{g(a=>a.map(a=>a.map(a=>dt(a)?{...a,isOpen:(null==a?void 0:a.name)===e&&!a.isOpen}:a)))},isOpen:p,onOpen:()=>{x(!0)},onClose:h,withIcons:r,shouldToggleSidebar:c}},e)},gt=()=>{const{onOpen:e,topDropdownItems:l,isOpen:n}=xt(),{mainItem:i,otherItems:o,actions:r}=l,s=t(null),c=za(s),m=({id:e,title:a,icon:t,iconClass:l,url:n,...i})=>({id:e,label:a,leadingIconName:t,leadingIconClassName:l,link:{href:n,...i}}),{items:d,itemsCount:p}=u(()=>({itemsCount:o.length+r.length,items:[...o.map(m),(null==o?void 0:o.length)>0&&(null==r?void 0:r.length)>0?{type:"divider",id:"item-divider"}:null,...r.map(m)].filter(e=>null!=e)}),[r,o]);return a.createElement(a.Fragment,null,0===p?a.createElement("a",{className:"maxio-side-nav__menu-button maxio-side-nav__menu-button--large",href:i.url,onClick:e},a.createElement("span",{className:"maxio-side-nav__menu-title"},i.title)):a.createElement("details",{className:"maxio-action-menu maxio-side-nav--action-menu"},a.createElement("summary",{onClick:e,className:"maxio-side-nav__menu-button","aria-haspopup":"true",ref:s},i.url?a.createElement(a.Fragment,null,a.createElement(mt,{type:"menu",isTooltipVisible:!n&&c,leadingIcon:i.icon,trailingIcon:"chevron-up-down",leadingIconClassName:i.iconClass},i.title)):a.createElement(mt,{type:"menu",trailingIcon:"chevron-up-down"},i.title)),a.createElement(We,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:d,small:!0})))},bt=({section:e})=>{const{isOpen:l,withIcons:n}=xt(),i=t(null),o=za(i);return a.createElement("li",{className:"maxio-side-nav__item","data-key":e.key,"data-testid":"maxio-sidebar-section"},a.createElement("a",{className:"maxio-side-nav__link","aria-current":e.isCurrent?"page":void 0,role:"button",href:e.href,ref:i},a.createElement(mt,{isTooltipVisible:o&&!l,type:"menu",leadingIcon:n?e.icon:void 0},e.name)))},ht=({section:e})=>{var l,n;const{onOpen:i,onSectionOpen:o,isOpen:r,withIcons:s}=xt(),c=t(null),m=za(c);if(!dt(e))return a.createElement("li",{className:"maxio-side-nav__item-header"},e.title);return e.Component?a.createElement(e.Component,{section:e}):e.href?a.createElement(bt,{section:e}):a.createElement("li",{className:g("maxio-side-nav__item",{"maxio-side-nav__item--icon":s}),"data-testid":"maxio-sidebar-section"},a.createElement("button",{className:"maxio-side-nav__menu-button",ref:c,"aria-expanded":e.isOpen?"true":"false",type:"button",onClick:()=>{o(e.name),i()}},a.createElement(mt,{type:"menu",isTooltipVisible:!r&&m,leadingIcon:s?e.icon:void 0,trailingIcon:(null===(l=e.items)||void 0===l?void 0:l.length)?"chevron-down":void 0},e.name)),a.createElement("ul",{className:"maxio-side-nav__menu"},null===(n=e.items)||void 0===n?void 0:n.map(e=>a.createElement("li",{key:`section-sub-item-${e.name}`,className:"maxio-side-nav__item","data-testid":"maxio-section-item"},a.createElement("a",{className:"maxio-side-nav__link",href:e.href,"aria-current":e.isCurrent?"page":void 0},a.createElement("span",{className:"maxio-side-nav__link-title"},e.name))))))},ft=()=>{const{sections:e}=xt();return a.createElement(a.Fragment,null,e.map((e,t)=>a.createElement("ul",{role:"list",className:"maxio-side-nav__items",key:`section-list-${t}`},e.map((e,l)=>a.createElement(ht,{key:`section-list-item-${e.type}-${t}-${l}`,section:e})))))},Et=()=>{const{onClose:e,shouldToggleSidebar:t}=xt();return a.createElement("div",{className:"maxio-side-nav__logo-container"},a.createElement("a",{className:"maxio-side-nav__brand",href:"/","aria-label":"Maxio"}),t&&a.createElement("button",{className:"maxio-side-nav__menu-toggle","aria-label":"toggle sidebar",onClick:e},a.createElement(Me,{variant:"sidebar"})))},_t=()=>{const{isOpen:e}=xt();return a.createElement("nav",{className:g("maxio-side-nav",{"maxio-side-nav--collapsed":!e})},a.createElement(Et,null),a.createElement(gt,null),a.createElement("div",{className:"maxio-side-nav__items-container"},a.createElement(ft,null)))},Nt=({withIcons:e=!0,shouldToggleSidebar:t=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:o,onChange:r})=>a.createElement(vt,{isOpen:o,onChange:r,collapseBreakpoint:i,withIcons:e,shouldToggleSidebar:t,topDropdownItems:l,sections:n},a.createElement(_t,null)),wt=({disabled:e=!1,value:t=0,className:l,id:n,isCurrent:i,...o})=>{const r="icon"===o.type,s=({isSelected:a})=>g("maxio-tabs__tab",l,{"maxio-tabs__tab--active":a,"maxio-tabs__tab--disabled":e,"maxio-tabs__tab--icon":r});if("icon"===o.type){const{icon:l,...n}=o;return a.createElement(re,{id:t,isDisabled:e,...n,className:s},a.createElement("div",{className:"maxio-tabs__tab__content"},l))}const{children:c,rightIcon:m,...d}=o;return a.createElement(re,{id:t,isDisabled:e,...d,className:s},a.createElement("div",{className:"maxio-tabs__tab__content"},c,m||null))},yt=s({variant:"line",withDivider:!1}),kt=({children:e,variant:t="line",withDivider:l=!1})=>a.createElement(yt.Provider,{value:{variant:t,withDivider:l}},e),Ct=({children:e,variant:t="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:o})=>a.createElement(se,{className:"maxio-tabs-container",selectedKey:i,defaultSelectedKey:n,onSelectionChange:e=>null==o?void 0:o(Number(e))},a.createElement(kt,{variant:t,withDivider:l},e)),It=({children:e,value:t,className:l,id:n,...i})=>a.createElement(ce,{id:t,className:g("maxio-tabs__panel",l),...i},e),St=({children:e})=>{const t=d.map(e,(e,a)=>{if(!r(e)||e.type!==It)throw new Error("You can only pass <TabPanel /> component as children");return o(e,{key:a,value:a})});return a.createElement(me,{className:"maxio-tabs__panels"},t)},Pt=({children:e,className:l,ariaLabel:i,overflow:s="none",moreLabel:u="More",...x})=>{const{variant:v,withDivider:b}=m(yt),h=m(de),f=c(),[E,_]=n(!1),N=g("maxio-tabs",l,{"maxio-tabs--contained":"contained"===v,"maxio-tabs--divider":b}),w=d.map(e,e=>e);(null!=w?w:[]).forEach(e=>{if(!r(e)||e.type!==wt)throw new Error("You can only pass <Tab /> component as children")});const y="auto"===s&&!!(null==w?void 0:w.length),{ref:k,moreButtonRef:C,overflowIndexes:I,handleKeyDownCapture:S}=(({overflowEnabled:e,childrenArray:a})=>{const l=t(null),i=t(null),o=t(null),[r,s]=n(null),c=Ra(l),d=m(de),u=null!=(null==d?void 0:d.selectedKey)?Number(d.selectedKey):null,[x,v]=n([]);p(()=>{var t;if(!e||!r)return void v((null!=a?a:[]).map((e,a)=>a));const{visibleIndexes:l}=((e,a,t,l)=>{const n=e.map((e,a)=>a);if(e.reduce((e,a)=>e+a,0)<=a)return{visibleIndexes:n,overflowIndexes:[]};const i=[];let o=t;for(const t of n){if(o+e[t]>a)break;o+=e[t],i.push(t)}if(null!==l&&!i.includes(l)){for(o+=e[l];o>a&&i.length>0;)o-=e[i.pop()];i.push(l)}i.sort((e,a)=>e-a);const r=n.filter(e=>!i.includes(e));return{visibleIndexes:i,overflowIndexes:r}})(r.tabWidths,c,r.moreButtonWidth,null!==(t=o.current)&&void 0!==t?t:u);l.length===(null!=a?a:[]).length&&(o.current=null),v(l)},[e,r,c]),p(()=>{e&&r&&null!==u&&v(e=>(e.includes(u)||(o.current=u),((e,a,t,l,n)=>{if(e.includes(n))return e;const i=[...e,n].sort((e,a)=>e-a);let o=l+i.reduce((e,t)=>e+a[t],0);for(;o>t&&i.length>1;){const e=i.length-1,t=i[e]===n?e-1:e,[l]=i.splice(t,1);o-=a[l]}return i})(e,r.tabWidths,c,r.moreButtonWidth,u)))},[u]);const g=e?(null!=a?a:[]).map((e,a)=>a).filter(e=>!x.includes(e)):[],b=((e,a)=>e.filter(e=>{var t;return!(null===(t=null==a?void 0:a[e])||void 0===t?void 0:t.props.disabled)}))(x,a);p(()=>{var t,n;if(!e||!l.current)return void s(e=>null===e?e:null);const o=Array.from(l.current.querySelectorAll('[role="tab"]')),r=null!==(n=null===(t=i.current)||void 0===t?void 0:t.getBoundingClientRect().width)&&void 0!==n?n:0;s(e=>{var t;const l=(null!=a?a:[]).map((a,t)=>{var l,n,i;const r=null!==(n=null===(l=o[t])||void 0===l?void 0:l.getBoundingClientRect().width)&&void 0!==n?n:0;return r>0?r:null!==(i=null==e?void 0:e.tabWidths[t])&&void 0!==i?i:0}),n=r>0?r:null!==(t=null==e?void 0:e.moreButtonWidth)&&void 0!==t?t:0,i=(null==e?void 0:e.tabWidths.length)===l.length&&e.tabWidths.every((e,a)=>e===l[a]);return e&&i&&e.moreButtonWidth===n?e:{tabWidths:l,moreButtonWidth:n}})},[a,e]);const h=e=>{var a,t;void 0!==e&&(null==d||d.selectionManager.setFocused(!0),null==d||d.selectionManager.setFocusedKey(e),null==d||d.setSelectedKey(e),null===(t=null===(a=l.current)||void 0===a?void 0:a.querySelector(`[role="tab"][data-key="${e}"]`))||void 0===t||t.focus())};return{ref:l,moreButtonRef:i,visibleIndexes:x,overflowIndexes:g,handleKeyDownCapture:e=>{var a;if(0===g.length)return;const t=document.activeElement===i.current,l=null==d?void 0:d.selectionManager.focusedKey,n=t?-1:b.indexOf(Number(l));if(t||-1!==n)switch(e.key){case"ArrowRight":if(t)return;return e.preventDefault(),e.stopPropagation(),void(n<b.length-1?h(b[n+1]):null===(a=i.current)||void 0===a||a.focus());case"ArrowLeft":return e.preventDefault(),e.stopPropagation(),void(t?h(b[b.length-1]):n>0&&h(b[n-1]));case"Home":if(t)return;return e.preventDefault(),e.stopPropagation(),void h(b[0]);case"End":if(t)return;return e.preventDefault(),e.stopPropagation(),void h(b[b.length-1])}}}})({overflowEnabled:y,childrenArray:w}),P=a.createElement("span",{className:"maxio-tabs__tab__content"},u,a.createElement(Me,{variant:"chevron-down",className:"maxio-tabs__more__chevron"})),$=I.map(e=>{return`#${a=f,"undefined"!=typeof CSS&&"function"==typeof CSS.escape?CSS.escape(a):a.replace(/[^a-zA-Z0-9_-]/g,"\\$&")} [role="tablist"] > .maxio-tabs__tab:nth-child(${e+1})`;var a});return a.createElement("div",{id:f,className:N,ref:k,onKeyDownCapture:S},$.length>0&&a.createElement("style",null,`${$.join(", ")} { display: none; }`),a.createElement(ue,{"aria-label":i,className:"maxio-contents",...x},(null!=w?w:[]).map((e,a)=>o(e,{key:a,value:a}))),y&&I.length>0&&a.createElement(pe,{isOpen:E,onOpenChange:_},a.createElement(J,{ref:C,className:"maxio-tabs__tab maxio-tabs__more__trigger","aria-label":u},P),E&&a.createElement(qa,{hideArrow:!0,placement:"bottom end",className:"maxio-tabs__more__menu"},a.createElement(xe,{"aria-label":`${u} tabs`,onAction:e=>{null==h||h.setSelectedKey(e),requestAnimationFrame(()=>{var a,t;null===(t=null===(a=k.current)||void 0===a?void 0:a.querySelector(`[role="tab"][data-key="${e}"]`))||void 0===t||t.focus()})}},I.map(e=>{const t=w[e],{disabled:l,type:n,"aria-label":i,"aria-labelledby":o}=t.props,r="icon"===n?t.props.icon:t.props.children;return a.createElement(ve,{key:e,id:e,isDisabled:!!l,"aria-label":i,"aria-labelledby":o,className:"maxio-tabs__more__item"},r)})))))},$t=({children:e,size:t,sentiment:l,kind:n="primary",leadingIcon:i,trailingIcon:o})=>{const r=g("maxio-tag",`maxio-tag--${n}`,!!l&&`maxio-tag--${l}`,!!t&&`maxio-tag--${t}`);return a.createElement("div",{className:r},i&&a.createElement(Me,{variant:i,className:"maxio-tag__icon"}),a.createElement("span",{className:"maxio-tag__label"},e),o&&a.createElement(Me,{variant:o,className:"maxio-tag__icon"}))},Dt=({children:e,className:t,...l})=>a.createElement("div",{className:g("maxio-card__header",t),...l},e);Dt.displayName="Card.Header";const Tt=({children:e,className:t,...l})=>a.createElement("div",{className:g("maxio-card__body",t),...l},e);Tt.displayName="Card.Body";const zt=({children:e,className:t,...l})=>a.createElement("div",{className:g("maxio-card__footer",t),...l},e);zt.displayName="Card.Footer";const Ot=({children:e,className:t,variant:l="primary",...n})=>a.createElement("div",{className:g("maxio-card",`maxio-card--${l}`,t),...n},e);Ot.displayName="Card";const Rt=Object.assign(Ot,{Header:Dt,Body:Tt,Footer:zt}),Mt=({children:e,className:t,href:l,onClick:n,target:i,disabled:o})=>{const r=l||n;if(!r)return a.createElement("div",{className:"maxio-tile"},e);const s=g("maxio-tile",t,{"maxio-tile--clickable":r,"maxio-tile--disabled":o});return a.createElement("a",{className:s,href:l,target:i,onClick:e=>{o&&l&&e.preventDefault(),!o&&n&&n()}},e)};var Bt,At,Wt,Lt;function Ht(){return Ht=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},Ht.apply(null,arguments)}const Vt=a=>e.createElement("svg",Ht({xmlns:"http://www.w3.org/2000/svg","data-name":"Maxio Logo SVG",viewBox:"0 0 1036 240"},a),Bt||(Bt=e.createElement("path",{d:"M59.32 11.3 70.64 0l40.74 40.35v70.99H40.89L0 70.52l11.15-11.14 36.2 36.15h30.07l3.07-3.39-50.91-51.15 10.99-10.97 51.24 50.83 3.72-3.38V47.13zM180.68 11.3 169.36 0l-40.73 40.35v70.99h70.48L240 70.51l-11.15-11.14-36.2 36.15h-30.06l-3.07-3.39 50.91-51.15-10.99-10.97-51.24 50.83-3.72-3.38V47.12l36.2-35.83ZM59.32 228.7l11.31 11.29 40.74-40.35v-70.99H40.89L0 169.48l11.15 11.14 36.2-36.15h30.07l3.07 3.39-50.92 51.15 10.99 10.97 51.24-50.83 3.72 3.38v30.34zM180.68 228.7l-11.32 11.29-40.73-40.35v-70.99h70.48L240 169.48l-11.15 11.14-36.2-36.15h-30.06l-3.07 3.39 50.91 51.15-10.99 10.97-51.24-50.83-3.72 3.38v30.34zM1015.27 139.55c0-29.94-23.74-53.46-52.11-53.46s-52.11 23.52-52.11 53.46 23.74 53.46 52.11 53.46 52.11-23.52 52.11-53.46m20.32.95c-.5 40.27-32.73 72.76-72.43 72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71 72.44-73.71h.94c39.57.52 71.5 33.32 71.5 73.71v.95Z"})),At||(At=e.createElement("path",{fillRule:"evenodd",d:"M870.39 24h-20.33v20.33h20.33zm0 40.67h-20.33v148.59h20.33z"})),Wt||(Wt=e.createElement("path",{fillRule:"evenodd",d:"M850.05 24h20.33v20.33h-20.33zM695.01 82.85l50.83 56.28v6.53l-50.28 55.67 15.23 13.2 49.22-54.49h4.71l49.22 54.49 15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15 55.52h-3.96l-50.15-55.52L695 82.85ZM660.49 78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13 0-52.44 18.93-58.09 44.86l-.28 1.27 19.33 3.72.31-1.14c2.39-8.91 6.66-16.54 13.04-21.94 6.36-5.39 14.91-8.63 26.02-8.63s19.12 3.25 24.76 8.96c5.64 5.72 8.73 14.06 8.73 24.53v6.11L616.62 130l-3.26.68c-16.14 3.47-29.79 7.84-39.59 14.45-10.54 7.11-16.64 16.83-16.64 30.62 0 12.51 4.51 22.62 12.5 29.59 7.96 6.95 19.25 10.67 32.63 10.67 22.27 0 41.87-12.03 51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58Zm-40.09 68.13c-12.86 2.77-23.05 5.42-30.03 9.63-3.46 2.09-6.08 4.54-7.84 7.54s-2.71 6.62-2.71 11.15c0 6.38 2.1 12.12 6.32 16.27 4.22 4.14 10.7 6.82 19.7 6.82 26.85 0 47.46-20.48 47.46-51.36v-7.2l-32.9 7.14Z"})),Lt||(Lt=e.createElement("path",{d:"M434.8 188.74h4.54l61.73-164.33.15-.41h35.57v189.35H515.9V55.37h-4.33l-59.7 157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98H336V24h35.57z"}))),Ft=e=>{const{size:t="sm",className:l,variant:n="lockup",alt:i="maxio logo"}=e,o="mark"===n,r="number"==typeof t;return a.createElement(Vt,{role:"img",viewBox:o?"0 0 240 240":"0 0 1036 240","aria-label":i,height:r?t:void 0,className:g("maxio-logo",!r&&`maxio-logo--${t}`,o&&"maxio-logo--mark",l)})},jt=({state:e,...l})=>{var n,i;const o=t(null),{toastProps:r,contentProps:s,titleProps:c,closeButtonProps:m}=De(l,e,o),{closable:d=!0,underline:u=!0,external:p=!1}=l.toast.content,x=g("maxio-toast",{[`maxio-toast--${l.toast.content.sentiment}`]:l.toast.content.sentiment}),v={default:"info-circle-fill",success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[l.toast.content.sentiment||"default"];return a.createElement("div",{className:x,"data-maxio-mode":"dark",...r,ref:o},a.createElement(Me,{variant:v,className:"maxio-toast__icon"}),a.createElement("div",{className:"maxio-toast__container",...s},a.createElement("div",{className:"maxio-toast__content",...c},l.toast.content.title&&a.createElement("span",{className:"maxio-toast__title"},l.toast.content.title),l.toast.content.message&&a.createElement("span",{className:"maxio-toast__message"},l.toast.content.message),(null===(n=l.toast.content.link)||void 0===n?void 0:n.text)&&(null===(i=l.toast.content.link)||void 0===i?void 0:i.href)&&a.createElement(Le,{href:l.toast.content.link.href,underline:u,external:p},l.toast.content.link.text))),d&&a.createElement(Ke,{variant:"ghost",icon:a.createElement(Me,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss",...m}))},Kt=({state:e,...t})=>{const l=a.useRef(null),{regionProps:n}=Te(t,e,l);return a.createElement("div",{...n,ref:l,className:t.className,style:{display:"flex",flexDirection:"column",gap:"10px"}},e.visibleToasts.map(t=>a.createElement(jt,{key:t.key,toast:t,state:e})))},qt=({children:e,...t})=>{const{maxVisibleToasts:l=5,...n}=t,i=Se({maxVisibleToasts:l,...n});return a.useEffect(()=>{console.warn("ToastProvider is deprecated. Please use the global toast API instead.")},[]),a.createElement(a.Fragment,null,e(i),i.visibleToasts.length>0&&a.createElement(Kt,{...t,state:i}))},Ut=s(null),Gt=({children:e,toastQueue:t,...l})=>{const n=Pe(t),i=x(()=>{n.visibleToasts.forEach(e=>{t.close(e.key)})},[n.visibleToasts,t]),o=u(()=>({addToast:t.add.bind(t),removeToast:t.clear.bind(t),removeAllToasts:i,state:n}),[t,i,n]);return a.createElement(Ut.Provider,{value:o},e,n.visibleToasts.length>0&&a.createElement(Kt,{...l,state:n}))},Zt=()=>{const e=m(Ut);if(!e)throw new Error("useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.");return e};class Yt extends $e{}const Xt=({defaultChecked:e,checked:t,onChange:l,disabled:n,valueDescription:i,valueDescriptionPosition:o,className:r,name:s,id:m,...d})=>{const u=c(),p="boolean"==typeof e,v=m||u,b="left"===o?"row":"row-reverse",h=i&&o,f=x(e=>{if("Enter"===e.code||"Space"===e.code){e.preventDefault();const a=e.currentTarget.checked;p&&(e.currentTarget.checked=!a),l&&l(!a,e)}},[p,l]),E=d["aria-label"]||(h?void 0:i);return a.createElement("div",{className:g("maxio-toggle",r,{"maxio-toggle--disabled":n}),style:{display:"inline-flex",flexDirection:b},"data-testid":"toggle-container"},h?a.createElement("label",{className:"maxio-toggle__label",htmlFor:v},i):null,a.createElement("div",{className:"maxio-toggle__container"},a.createElement("input",{type:"checkbox",defaultChecked:e,checked:t,onChange:e=>{l&&l(e.target.checked,e)},onKeyDown:f,disabled:n,className:"maxio-toggle__checkbox",id:v,name:s,"aria-label":E}),a.createElement("div",{className:"maxio-toggle__track",role:"switch","aria-checked":t,"aria-hidden":"true"},a.createElement("div",{className:"maxio-toggle__handle"}),a.createElement("span",{className:"maxio-toggle__icon"},a.createElement("i",{className:"maxio-toggle__icon-on"})),a.createElement("span",{className:"maxio-toggle__icon"},a.createElement("i",{className:"maxio-toggle__icon-off"})))))},Qt=({basis:e,flex:t,flexDirection:l,wrap:n,grow:i,shrink:o,gap:r,gapX:s,gapY:c,className:m,children:d,alignItems:u,justifyContent:p,...x})=>{const v=g("maxio-flex",{[`maxio-flex-${t}`]:t,[`maxio-basis-${e}`]:void 0!==e,[`maxio-flex-${l}`]:l,[`maxio-flex-${n}`]:n,"maxio-grow":i,"maxio-grow-0":!1===i,"maxio-shrink":o,"maxio-shrink-0":!1===o,[`maxio-gap-${r}`]:void 0!==r,[`maxio-gap-x-${s}`]:void 0!==s,[`maxio-gap-y-${c}`]:void 0!==c,[`maxio-items-${u}`]:u,[`maxio-justify-${p}`]:p},m);return a.createElement("div",{className:v,...x},d)},Jt=({children:e,actions:t,sideNavIsClosed:l,openSideNav:n})=>a.createElement("nav",{className:"maxio-top-bar"},l&&a.createElement(Ke,{"aria-label":"Open Side Navigation",variant:"ghost",icon:a.createElement(Me,{variant:"sidebar"}),onClick:n}),a.createElement(Qt,{grow:!0,justifyContent:"end"},e),t),el=({as:e="div",children:t,size:l="md",className:n,...i})=>{const o=e,r=g(`maxio-display-${l}`,n);return a.createElement(o,{className:r,...i},t)},al=({as:e="div",children:t,className:l,...n})=>{const i=e,o=g("maxio-code",l);return a.createElement(i,{className:o,...n},t)},tl=({as:e="div",children:t,size:l="sm",className:n,...i})=>{const o=e,r=g(`maxio-label-${l}`,n);return a.createElement(o,{className:r,...i},t)},ll=({...e})=>{const l=t(null),{buttonProps:n}=f(e,l);return a.createElement("button",{...n,className:"maxio-chip__dismiss-button"},a.createElement(Me,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},nl=({label:e,onDismiss:l,dismissLabel:n,leadingIcon:i,trailingIcon:o,title:r,...s})=>{const c=t(null),m=A(s),{buttonProps:d}=$(s,m,c),u=g("maxio-chip",{"maxio-chip--selected":null==m?void 0:m.isSelected}),p=g("maxio-chip__button",{"maxio-chip--dismissible":l});return a.createElement("div",{className:u},a.createElement("button",{className:p,ref:c,...d,title:r},i&&a.createElement(Me,{variant:i,className:"maxio-chip__icon"}),a.createElement("span",{className:"maxio-chip__label"},e),o&&!l&&a.createElement(Me,{variant:o,className:"maxio-chip__icon"})),l&&a.createElement(ll,{onPress:l,"aria-label":n}))},il=({children:e,templateColumns:t,templateRows:l,autoColumns:n,autoRows:i,inline:o,column:r,columnStart:s,columnEnd:c,row:m,rowStart:d,rowEnd:u,gap:p,gapX:x,gapY:v,className:b,justifyContent:h,alignItems:f,...E})=>{const _=g(b,{"maxio-grid":!o,"maxio-inline-grid":o,[`maxio-grid-cols-${t}`]:t,[`maxio-grid-rows-${l}`]:l,[`maxio-auto-cols-${n}`]:n,[`maxio-auto-rows-${i}`]:i,["maxio-col-"+("auto"===r?"auto":`span-${r}`)]:r,[`maxio-col-start-${s}`]:s,[`maxio-col-end-${c}`]:c,["maxio-row-"+("auto"===m?"auto":`span-${m}`)]:m,[`maxio-row-start-${d}`]:d,[`maxio-row-end-${u}`]:u,[`maxio-gap-${p}`]:void 0!==p,[`maxio-gap-x-${x}`]:void 0!==x,[`maxio-gap-y-${v}`]:void 0!==v,[`maxio-justify-${h}`]:h,[`maxio-items-${f}`]:f});return a.createElement("div",{className:_||void 0,...E},e)},ol={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"},rl=({children:e,heading:t,description:l,sentiment:n="success",leadingElement:i=null,alert:o,topAddon:r=null,footer:s})=>a.createElement("div",{className:"maxio-auth-layout"},a.createElement(Qt,{alignItems:"center",justifyContent:"between"},a.createElement(Ft,{size:"md"}),r),o&&a.createElement(qe,{display:"block",title:o.title,sentiment:o.sentiment},o.children),a.createElement(Rt,{variant:"secondary"},a.createElement(Rt.Body,null,a.createElement(Qt,{flexDirection:"col",gap:6},a.createElement(Qt,{flexDirection:"col",gap:2},a.createElement(Qt,{alignItems:"center",gap:2},i,a.createElement(Sa,{size:"lg",className:g("maxio-auth-layout__heading",ol[n])},t)),l&&a.createElement(Qt,{style:{color:"var(--maxio-color-text-tertiary)"}},a.createElement(La,{size:"sm",className:"maxio-auth-layout__description"},l))),e)),s&&a.createElement(Rt.Footer,null,s)));export{We as ActionList,qe as Alert,rl as AuthLayout,ea as Avatar,aa as Banner,La as Body,oa as Breadcrumbs,ta as BreadcrumbsItem,je as Button,Rt as Card,ga as Checkbox,fa as CheckboxGroup,nl as Chip,al as Code,Xa as ComboBox,Ca as DataTable,el as Display,Pa as Drawer,Qt as Flex,ha as FormErrorMessage,ba as FormHelperText,Gt as GlobalToastProvider,il as Grid,Sa as Heading,Me as Icon,Ke as IconButton,tl as Label,Le as Link,Ka as ListBox,He as LoadingSpinner,Ft as Logo,Xe as Menu,Je as MenuButton,Qe as MenuList,Ma as OverlayTrigger,it as Pagination,qa as Popover,ot as ProgressBar,Ja as Radio,et as RadioGroup,ct as SegmentedControl,nt as Select,Nt as SideNav,wt as Tab,Pt as TabList,It as TabPanel,St as TabPanels,Ct as Tabs,$t as Tag,tt as TextArea,at as TextField,lt as TextInput,Mt as Tile,qt as ToastProvider,Yt as ToastQueue,Xt as Toggle,Ba as Tooltip,Wa as TooltipTrigger,Jt as TopBar,Ra as useElementResizeObserver,za as useHover,Ta as useOverlayTrigger,Zt as useToast,Oa as useWindowSize};
|
|
1
|
+
import*as e from"react";import a,{useRef as t,useEffect as l,useState as n,forwardRef as i,cloneElement as o,isValidElement as r,createContext as s,useId as c,useContext as m,Children as d,useMemo as u,useCallback as p,useLayoutEffect as v,useImperativeHandle as g}from"react";import x from"classnames";import{useId as b,useLink as h,useButton as f,usePress as E,useFocusRing as _,mergeProps as w,useCheckboxGroupItem as N,useCheckbox as y,useCheckboxGroup as I,useRadio as k,useRadioGroup as R,useTextField as C,useProgressBar as S,useToggleButton as P}from"react-aria";import{useObjectRef as $,useResizeObserver as D}from"@react-aria/utils";import{flexRender as T,useReactTable as M,getSortedRowModel as O,getExpandedRowModel as z,getCoreRowModel as B}from"@tanstack/react-table";export{createColumnHelper}from"@tanstack/react-table";import{dropTargetForElements as A,draggable as L,monitorForElements as W}from"@atlaskit/pragmatic-drag-and-drop/element/adapter";import{attachInstruction as F,extractInstruction as H}from"@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";import{useToggleState as V}from"@react-stately/toggle";import{useCheckboxGroupState as j}from"@react-stately/checkbox";import{Popover as K,OverlayArrow as q,Button as U,TooltipTrigger as G,Tooltip as Z,MenuTrigger as Y,Menu as X,MenuItem as Q,ModalOverlay as J,Modal as ee,Dialog as ae,ListBox as te,ListBoxItem as le,composeRenderProps as ne,ListBoxSection as ie,Header as oe,ComboBox as re,Label as se,Input as ce,Text as me,FieldError as de,TextField as ue,TextArea as pe,ToggleButtonGroup as ve,ToggleButton as ge,SelectionIndicator as xe,Tab as be,Tabs as he,TabPanel as fe,TabPanels as Ee,TabListStateContext as _e,TabList as we}from"react-aria-components";export{DialogTrigger,Pressable}from"react-aria-components";import{AnimatePresence as Ne,motion as ye}from"framer-motion";import{useDismiss as Ie,useFocus as ke,useHover as Re,useClick as Ce,useFloating as Se,offset as Pe,useInteractions as $e,useRole as De,FloatingPortal as Te}from"@floating-ui/react-dom-interactions";import{useRadioGroupState as Me}from"@react-stately/radio";import{useToastState as Oe,useToastQueue as ze,ToastQueue as Be}from"@react-stately/toast";import{useToast as Ae,useToastRegion as Le}from"@react-aria/toast";const We=["address-card","arrow-down","arrow-down-left","arrow-down-left-long","arrow-down-long","arrow-down-right","arrow-down-right-long","arrow-down-up","arrow-left","arrow-left-long","arrow-left-right","arrow-right","arrow-right-long","arrow-turn-down-right","arrow-up","arrow-up-left","arrow-up-left-long","arrow-up-long","arrow-up-right","arrow-up-right-long","bank","bar-chart","briefcase","building","business-intelligence","calendar","caret-down","caret-left","caret-right","caret-up","chat","check","check-box","check-box-checked","check-box-checked-fill","check-box-indeterminate-fill","check-circle","check-circle-fill","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle","circle-half-stroke-small","circle-small-dash","circle-small-fill","circle-small-stroke","clipboard","cog","copy-file","credit-card","cross","cross-circle","cross-circle-fill","dashboard","diamond-small-fill","document","document-blank","dollar","dot-circle-fill","dot-fill","error","error-fill","error-small-fill","graph","home","info-circle","info-circle-fill","line-vertical","list","login","logout","megaphone","menu","menu-chevron-left","menu-chevron-right","notification","notification-unread","pen","plus","plus-circle","plus-circle-fill","question-circle","question-circle-fill","recently-viewed","search","square-small-fill","trash","triangle-small-fill","user","warning-circle","warning-circle-fill"],Fe=["anrok","dropbox","hubspot","numeral","oracle","quotapath","sage","sphere","taxjar"],He=["avalara","pipedrive","quickbooks","salesforce","xero"],Ve=({variant:e,color:t,className:l,size:n})=>{const i=(e,a)=>a.includes(e),o=i(e,We)||i(e,Fe),r=i(e,He),s=x({"fa-kit":o,"fa-kit-duotone":r,"fa-sharp fa-regular":!o&&!r,[`fa-${e}`]:!0,[`fa-${n}`]:n,[`maxio-icon--${t}`]:t&&!i(e,Fe)&&!i(e,He)},l);return a.createElement("i",{className:s})},je=({item:e,isSelected:n,truncateLabel:i=!1,role:o="option",small:r=!1})=>{const s=t(null),c=t(!1),m=b();if(l(()=>{var e;n&&c.current&&(null===(e=s.current)||void 0===e||e.focus())},[n]),l(()=>{c.current=!0},[]),"divider"===e.type)return a.createElement("div",{className:"maxio-action-list__divider",role:"separator","aria-hidden":"true"});const{leadingIconName:d,leadingIconClassName:u,trailingIconName:p,label:v,description:g,link:h}=e,f=x("maxio-action-list__label",{"maxio-truncate":i});return a.createElement("a",{"aria-labelledby":m,...h,className:x("maxio-action-list__content",h.className,{"maxio-action-list__content--size-small":r}),tabIndex:n?0:-1,ref:s,role:o},d&&a.createElement(Ve,{variant:d,className:x("maxio-action-list__leading-icon",u)}),a.createElement("span",{className:f,id:m},v),g&&a.createElement("span",{className:"maxio-action-list__description"},g),p&&a.createElement(Ve,{variant:p,className:"maxio-action-list__trailing-icon"}))},Ke=(e,a,t)=>0===e?e:1===e&&"divider"===a[e-1].type?t||e:"divider"===a[e-1].type?Ke(e-1,a,t||e):e-1,qe=({items:e,isShadowed:t=!0,itemProps:l={},className:i,truncateLabels:o=!1,small:r=!1,...s})=>{const c=x("maxio-action-list",i,{"maxio-action-list--shadow":t}),[m,d]=n(()=>e.findIndex(e=>"divider"!==e.type));return 0===e.length?null:a.createElement("div",{className:c,onKeyDown:a=>{if("Space"===a.code||"Enter"===a.code){const a=e[m];a&&"divider"!==a.type&&window.open(a.link.href,a.link.target||"_self")}"ArrowUp"===a.code&&(a.preventDefault(),d(a=>Ke(a,e))),"ArrowDown"===a.code&&(a.preventDefault(),d(a=>((e,a)=>{const t=a.findIndex((a,t)=>"divider"!==a.type&&t>e);return-1===t?e:t})(a,e)))},role:"listbox",...s},e.map((e,t)=>a.createElement(je,{item:e,truncateLabel:o,key:`listbox-${e.id}`,isSelected:t===m,small:r,...l})))},Ue=({className:e,children:t,disabled:l,external:n,icon:i,size:o="sm",underline:r,variant:s,...c})=>{const m=x("maxio-link",{[`maxio-link--${o}`]:o,"maxio-link--disabled":l,[`maxio-link--${s}`]:s,"maxio-link--underline":r},e),d=n?"_blank":"_self";return a.createElement("a",{className:m,target:d,...c},t,i&&a.createElement(Ve,{variant:i,className:"maxio-link__icon"}))},Ge=({size:e="md",white:t=!1,className:l})=>{const n=x("maxio-loading-spinner",l,`maxio-loading-spinner--${e}`,{"maxio-loading-spinner--white":t});return a.createElement("div",{className:n,role:"status","aria-label":"loading"})},Ze=i(({fullWidth:e=!1,leadingElement:t,trailingElement:l,icon:n,variant:i="primary",size:s,...c},m)=>{const d=$(m),{linkProps:u}=h({...c},d),p=x("maxio-button",c.className,{[`maxio-button--${s}`]:s,[`maxio-button--${i}`]:i,"maxio-button--full-width":e});return a.createElement("a",{...u,ref:d,className:p,href:c.href},t&&o(t,{...r(t)&&{className:"maxio-button__leading-element"}}),c.children,(l||n)&&o(l||n,{...r(l||n)&&{className:"maxio-button__trailing-element"}}))}),Ye=i(({disabled:e,loading:t=!1,fullWidth:l=!1,leadingElement:n,trailingElement:i,icon:s,variant:c="primary",size:m,...d},u)=>{const p=$(u),{buttonProps:v}=f({...d,isDisabled:e,formAction:"string"==typeof d.formAction?d.formAction:void 0},p),g=["primary","danger"].includes(c),b=x("maxio-button",d.className,{[`maxio-button--${m}`]:m,[`maxio-button--${c}`]:c,"maxio-button--loading":t,"maxio-button--full-width":l});return a.createElement("button",{...v,className:b,ref:p},n&&o(n,{...r(n)&&{className:"maxio-button__leading-element"}}),d.children,!t&&(i||s)&&o(i||s,{...r(i||s)&&{className:"maxio-button__trailing-element"}}),t&&a.createElement(Ge,{className:"maxio-button__trailing-element",size:"md",white:g}))}),Xe=i((e,t)=>(e=>"href"in e)(e)?a.createElement(Ze,{...e,ref:t}):a.createElement(Ye,{...e,ref:t})),Qe=({"aria-label":e,className:t,...l})=>a.createElement(Xe,{"aria-label":e,className:x("maxio-button--icon",t),...l},null),Je=({children:e,title:t,linkText:l,linkExternal:n,href:i,display:o="inline",sentiment:r="info",onDismiss:s,className:c})=>{if(!e&&!t)return console.warn("Alert component requires either children or title prop to be rendered"),null;const m=x("maxio-alert",{[`maxio-alert--${r}`]:"info"!==r&&r},c),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[r],u=x("maxio-alert__content",{"maxio-alert__content--block":"block"===o});return a.createElement("div",{className:m},a.createElement(Ve,{variant:d,className:"maxio-alert__icon","aria-hidden":"true"}),a.createElement("section",{className:"maxio-alert__container"},a.createElement("div",{className:u},t&&a.createElement("span",{className:"maxio-alert__title"},t),e&&a.createElement("span",{className:"maxio-alert__message"},e),l&&i&&a.createElement(Ue,{className:"maxio-alert__link",href:i,variant:"high-contrast",underline:!0,...n?{external:!0}:{}},l))),s&&a.createElement(Qe,{icon:a.createElement(Ve,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-alert__dismiss"}))},ea=s({}),aa=({children:e})=>{const[t,l]=n(!1),i=c(),o=c();return a.createElement(ea.Provider,{value:{controlsId:i,buttonId:o,isOpen:t,onClose:()=>l(!1),onOpen:()=>l(!0),onToggle:()=>l(e=>!e)}},e)};function ta(){const e=m(ea);if(!e||"object"==typeof e&&0===Object.keys(e).length)throw new Error("useMenu hook must be used within a MenuProvider");return e}const la=({children:e})=>{const{isOpen:t,onToggle:l,onClose:n}=ta();return a.createElement("details",{open:t,onToggle:l,className:"maxio-action-menu"},"function"==typeof e?e({isOpen:t,onClose:n}):e)},na=({children:e})=>a.createElement(aa,null,a.createElement(la,null,e)),ia=({items:e,alignItemsEnd:t=!1})=>{const l=x("maxio-action-menu__content",{"maxio-action-menu__content--align-end":t}),{controlsId:n,buttonId:i}=ta();return a.createElement("div",{className:l,role:"presentation"},a.createElement(qe,{role:"menu",itemProps:{role:"menuitem"},id:n,"aria-labelledby":i,items:e}))},oa=({children:e,iconName:t="chevron-down","aria-label":l,size:n="md",variant:i="secondary"})=>{const o=x({"maxio-action-menu__chevron":"chevron-down"===t}),r=x("maxio-button",`maxio-button--${i}`,`maxio-button--${n}`,{"maxio-button--icon":t&&!e}),{isOpen:s,buttonId:c,controlsId:m}=ta();return a.createElement("summary",{className:r,"aria-haspopup":"true","aria-label":l,"aria-expanded":s,"aria-controls":m,id:c},e&&a.createElement("span",null,e),t&&a.createElement(Ve,{variant:t,className:`${o} maxio-button__trailing-element`}))},ra=({className:e,src:t,alt:l="avatar"})=>a.createElement("img",{className:x("maxio-avatar",e),alt:l,src:t}),sa=({children:e,title:t,linkText:l,linkExternal:n,href:i,display:o="inline",sentiment:r="info",onDismiss:s,className:c})=>{if(!e&&!t)return console.warn("Banner component requires either children or title prop to be rendered"),null;const m=x("maxio-banner",{[`maxio-banner--${r}`]:"info"!==r&&r,className:c}),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[r],u=x("maxio-banner__content",{"maxio-banner__content--block":"block"===o});return a.createElement("div",{className:m,"aria-live":"assertive"},a.createElement(Ve,{variant:d,className:"maxio-banner__icon","aria-hidden":"true"}),a.createElement("section",{className:"maxio-banner__container"},a.createElement("div",{className:u},t&&a.createElement("span",{className:"maxio-banner__title"},t),e&&a.createElement("span",{className:"maxio-banner__message"},e),l&&i&&a.createElement(Ue,{href:i,..."warning"!==r&&{variant:"inverse"},underline:!0,...n?{external:!0}:{}},l))),s&&a.createElement(Qe,{icon:a.createElement(Ve,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-banner__dismiss"}))},ca=({children:e,className:t,href:l,...n})=>{const i=l?a.createElement(Ue,{size:"sm",href:l},e):e;return a.createElement("li",{className:x("maxio-breadcrumbs__item",t),...n},i)},ma="Breadcrumbs requires at least one BreadcrumbsItem as children",da='Last BreadcrumbsItem should not have "href" prop. It is the current page.',ua="Breadcrumbs only accepts BreadcrumbsItem as children",pa=({className:e,children:t,...l})=>{const n=d.count(t);if(0===n)throw new Error(ma);const i=d.map(t,(e,a)=>{if(r(e)&&e.type===ca){if(a===n-1&&e.props.href)throw new Error(da);return o(e,{"aria-current":a===n-1?"page":void 0})}throw new Error(ua)});return a.createElement("nav",{"aria-label":"Breadcrumb",...l},a.createElement("ol",{className:x("maxio-breadcrumbs",e)},i))},va="row-controls",ga="row-actions",xa=({children:e,pattern:t,size:l,isExpandable:i,isUsingCustomRow:o})=>{const[r,s]=n(!1),[c,m]=n(!1),d=t&&o&&i,u=x("maxio-data-table",{"maxio-data-table--pattern":t&&!d,"maxio-data-table--expanded-child-pattern":d,"maxio-data-table--with-custom-row":o,[`maxio-data-table--${l}`]:l,"maxio-data-table--with-pinned-left-border":r,"maxio-data-table--with-pinned-right-border":c});return a.createElement("div",{className:"maxio-data-table-wrapper",onScroll:e=>{const a=e.target;s(a.scrollLeft>0),m(a.scrollWidth-a.clientWidth-a.scrollLeft>0)}},a.createElement("table",{className:u},e))},ba=({children:e})=>a.createElement("thead",null,e),ha=({children:e})=>a.createElement("tbody",null,e),fa=({children:e,table:t,header:l,className:n,enableExpanding:i,...o})=>{var r,s,c,m,d,u,p,v,g,b,h;const f=null==l?void 0:l.column,E=null===(r=null==f?void 0:f.getCanSort)||void 0===r?void 0:r.call(f),_=null===(s=null==f?void 0:f.getToggleSortingHandler)||void 0===s?void 0:s.call(f),w=null==l?void 0:l.isPlaceholder,N=null===(m=null===(c=null==f?void 0:f.columnDef)||void 0===c?void 0:c.meta)||void 0===m?void 0:m.align,y=null===(u=null===(d=null==f?void 0:f.columnDef)||void 0===d?void 0:d.meta)||void 0===u?void 0:u.width,I=null===(v=null===(p=null==f?void 0:f.columnDef)||void 0===p?void 0:p.meta)||void 0===v?void 0:v.controls,k=null===(b=null===(g=null==f?void 0:f.columnDef)||void 0===g?void 0:g.meta)||void 0===b?void 0:b.actions,R=null==f?void 0:f.getIsPinned(),C=null==f?void 0:f.getIsSorted(),S="asc"===C,P=x("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${R}`]:R,"maxio-data-table__cell--sortable":E,"maxio-data-table__cell--active":C,[`maxio-data-table__cell--${N}`]:N,"maxio-data-table__cell--controls":I,"maxio-data-table__cell--actions":k}),$={...y?{width:y}:{},..."left"===R?{left:null==f?void 0:f.getStart("left")}:"right"===R?{right:null==f?void 0:f.getAfter("right")}:{}},D=((e,a)=>e&&a?"arrow-up":e&&!a?"arrow-down":"arrow-down-up")(!!C,S),T=null==t?void 0:t.getToggleAllRowsExpandedHandler(),M=null===(h=null==t?void 0:t.getIsAllRowsExpanded)||void 0===h?void 0:h.call(t),O=(null==l?void 0:l.headerGroup.headers[0].id)===va?1:0,z=i&&(null==l?void 0:l.index)===O;return w?null:a.createElement("th",{scope:"col",role:"columnheader","aria-sort":C?S?"ascending":"descending":"none",className:P,onClick:_,colSpan:null==l?void 0:l.colSpan,style:$,...o},a.createElement("div",{className:"maxio-data-table__cell-flex"},!0===i&&z&&a.createElement(Qe,{size:"sm",variant:"ghost",icon:a.createElement(Ve,{size:"xs",variant:M?"chevron-down":"chevron-right"}),onClick:T,"aria-label":M?"Collapse all rows":"Expand all rows","data-open":M,className:"maxio-data-table__expand-button"}),e,E&&a.createElement(Ve,{variant:D,className:"maxio-data-table__sort-icon"})))},Ea=e=>{var a;return null!==(a=e.subRows)&&void 0!==a?a:[]},_a=(e,a)=>Object.assign({},e,{subRows:a}),wa=(e,a,t=[])=>{for(let l=0;l<e.length;l+=1){const n=e[l],i=[...t,l];if(n===a)return i;const o=wa(Ea(n),a,i);if(o)return o}return null},Na=(e,a)=>{const[t,...l]=a,n=e[t];if(!n)return null;const i=[...e];if(0===l.length)return i.splice(t,1),{data:i,item:n};const o=Na(Ea(n),l);return o?(i[t]=_a(n,o.data),{data:i,item:o.item}):null},ya=(e,a,t,l)=>{const n=[...e];if(0===a.length)return n.splice(t,0,l),n;const[i,...o]=a,r=e[i];if(!r)return null;const s=ya(Ea(r),o,t,l);return s?(n[i]=_a(r,s),n):null},Ia=(e,a)=>{let t,l=e;for(const e of a){if(t=l[e],!t)return;l=Ea(t)}return t},ka="maxio-data-table-row",Ra=s(null),Ca=()=>m(Ra),Sa=e=>e.type===ka&&"string"==typeof e.instanceId&&"string"==typeof e.rowId,Pa=e=>{const a=(e=>{const a=H(e);return a&&"instruction-blocked"!==a.type?"reorder-above"===a.type?"before":"reorder-below"===a.type?"after":"make-child"===a.type?"inside":null:null})(e);return"string"==typeof e.rowId&&a?{rowId:e.rowId,position:a}:null},$a=({availability:e,children:i,data:o,enableExpanding:r,getRowReorderLabel:s,onRowReorder:m,rowReorderMode:d,table:v})=>{const g=`maxio-data-table-${c()}`,[x,b]=n(""),[h,f]=n(null),[E,_]=n(null),w=t(null),N=p(e=>v.getCoreRowModel().rowsById[e],[v]),y=p(e=>{var a;return null!==(a=null==s?void 0:s(e))&&void 0!==a?a:e.id},[s]),I=p((e,a)=>{const t=N(e),l=N(a.rowId);if(!t||!l)return null;const n=((e,a,t,l,n)=>{var i,o;if(a.id===t.id||!((e,a,t,l)=>{var n,i;return"all"===l||("siblings"===l?"inside"!==t&&(null!==(n=e.parentId)&&void 0!==n?n:null)===(null!==(i=a.parentId)&&void 0!==i?i:null):"inside"===t?e.depth===a.depth+1:e.depth===a.depth)})(a,t,l,n))return null;const r=wa(e,a.original),s=wa(e,t.original);if(!r||!s||(m=s,(c=r).length<m.length&&c.every((e,a)=>m[a]===e)))return null;var c,m;const d=Na(e,r);if(!d)return null;const u=((e,a)=>{const t=[...e],l=a.length-1;return l>=0&&e.length>l&&a.slice(0,l).every((a,t)=>e[t]===a)&&a[l]<e[l]&&(t[l]-=1),t})(s,r),p=u[u.length-1];if(void 0===p)return null;const v="inside"===l?u:u.slice(0,-1),g=Ia(d.data,u);if(!g)return null;const x="inside"===l?Ea(g).length:p+("after"===l?1:0),b={parentRowId:"inside"===l?t.id:null!==(i=t.parentId)&&void 0!==i?i:null,index:x},h={parentRowId:null!==(o=a.parentId)&&void 0!==o?o:null,index:a.index};if(h.parentRowId===b.parentRowId&&h.index===b.index)return null;const f=ya(d.data,v,x,d.item);return f?{data:f,source:h,destination:b}:null})(o,t,l,a.position,d);return n&&!r&&null!==n.destination.parentRowId&&n.destination.parentRowId!==n.source.parentRowId?null:n},[o,r,N,d]),k=p(e=>{w.current=e,f(e)},[]),R=p((e,a)=>{const t=N(e),l=N(a.rowId),n=I(e,a);return t&&l&&n?(m({...n,row:t,rowId:t.id,targetRow:l,targetRowId:l.id,position:a.position}),b(`${y(t)} moved ${i=y(l),o=a.position,"inside"===o?`inside ${i}`:`${o} ${i}`}.`),!0):(b("That row cannot be moved to this position."),!1);var i,o},[y,I,N,m]),C=p((e,{input:a,element:t,source:l})=>{const n={rowId:e.id,instanceId:g},i=F(n,{element:t,input:a,currentLevel:e.depth,indentPerLevel:24,mode:"standard"}),o=Pa(i),r=Sa(l.data)&&l.data.instanceId===g&&Boolean(o&&I(l.data.rowId,o));return{...i,isValid:r}},[I,g]),S=p((a,t)=>{if(!e.available)return()=>{};const l=e=>{const a=e.isValid?Pa(e):null;k(a)};return A({element:t,canDrop:({source:e})=>Sa(e.data)&&e.data.instanceId===g&&e.data.rowId!==a.id&&!a.getParentRows().some(a=>a.id===e.data.rowId),getData:e=>C(a,e),onDragEnter:({self:e})=>l(e.data),onDrag:({self:e})=>l(e.data),onDragLeave:()=>{var e;(null===(e=w.current)||void 0===e?void 0:e.rowId)===a.id&&k(null)}})},[e,C,g,k]),P=p((a,t)=>{const l=t.closest("tr");return e.available&&l instanceof HTMLElement?L({element:l,dragHandle:t,getInitialData:()=>({type:ka,instanceId:g,rowId:a.id})}):()=>{}},[e,g]);l(()=>{if(e.available)return W({canMonitor:({source:e})=>Sa(e.data)&&e.data.instanceId===g,onDragStart:({source:e})=>{if(!Sa(e.data))return;const a=N(e.data.rowId);_(e.data.rowId),a&&b(`${y(a)} grabbed. Choose a destination.`)},onDrop:({source:e,location:a})=>{var t;if(Sa(e.data)){const l=null===(t=a.current.dropTargets[0])||void 0===t?void 0:t.data,n=!0===(null==l?void 0:l.isValid)?Pa(l):null;n?R(e.data.rowId,n):b("Row move cancelled.")}_(null),k(null)}})},[R,e,y,N,g,k]),l(()=>{if("inside"!==(null==h?void 0:h.position))return;const e=N(h.rowId);if(!(null==e?void 0:e.getCanExpand())||e.getIsExpanded())return;const a=window.setTimeout(()=>e.toggleExpanded(!0),500);return()=>window.clearTimeout(a)},[h,N]);const $=p(a=>{var t;if(!e.available)return[];const l=a.parentId?N(a.parentId):null,n=null!==(t=null==l?void 0:l.subRows)&&void 0!==t?t:v.getCoreRowModel().rows,i=n.findIndex(e=>e.id===a.id);if(-1===i)return[];const o=n[i-1],r=n[i+1],s=n[0],c=n[n.length-1],m=[];if(i>1&&s&&m.push({id:"top",label:"Move to top",target:{rowId:s.id,position:"before"}}),o&&m.push({id:"up",label:"Move up",target:{rowId:o.id,position:"before"}}),r&&m.push({id:"down",label:"Move down",target:{rowId:r.id,position:"after"}}),i<n.length-2&&c&&m.push({id:"bottom",label:"Move to bottom",target:{rowId:c.id,position:"after"}}),l){let e=l;for(;e.parentId;){const a=N(e.parentId);if(!a)break;e=a}m.push({id:"move-to-root",label:"Move to root",target:{rowId:e.id,position:"after"}})}return v.getCoreRowModel().flatRows.forEach(e=>{e.id!==a.parentId&&m.push({id:`move-to:${e.id}`,label:`Move to ${y(e)}`,target:{rowId:e.id,position:"inside"}})}),m.filter(e=>Boolean(I(a.id,e.target)))},[e,y,I,N,v]),D=p(a=>{var t;if(!e.available)return!1;const l=a.parentId?N(a.parentId):null;return(null!==(t=null==l?void 0:l.subRows)&&void 0!==t?t:v.getCoreRowModel().rows).length>1||"siblings"!==d&&("all"===d?Boolean(l):!(!r||0===a.depth)&&v.getCoreRowModel().flatRows.some(e=>e.depth===a.depth-1&&e.id!==a.parentId))},[e,r,N,d,v]),T=u(()=>({activeTarget:h,availability:e,draggingRowId:E,getActions:$,getLabel:y,hasActions:D,moveRow:R,registerHandle:P,registerRow:S}),[h,e,R,E,$,y,D,P,S]);return a.createElement(Ra.Provider,{value:T},i,a.createElement("span",{className:"maxio-data-table__live-region",role:"status","aria-live":"polite","aria-atomic":"true"},x))},Da=({children:e,row:t,isChild:l,isHeader:n,className:i,onRowAction:o,...r})=>{var s,c,m,d,u;const p=null===(s=null==t?void 0:t.getIsSelected)||void 0===s?void 0:s.call(t),v=(null===(c=null==t?void 0:t.getCanExpand)||void 0===c?void 0:c.call(t))&&(null===(m=null==t?void 0:t.getIsExpanded)||void 0===m?void 0:m.call(t)),g=Boolean(t&&o&&!n&&!l),b=a.useRef(null),h=Ca(),f=null==h?void 0:h.registerRow,N=a.useRef(null),y=e=>{N.current=e.target},{pressProps:I}=E({isDisabled:!g,onPress:e=>{var a;const l=null!==(a=N.current)&&void 0!==a?a:e.target;N.current=null,t&&o&&!(e=>e instanceof Element&&Boolean(e.closest("a,button,input,select,textarea,label,.maxio-data-table__cell--controls,.maxio-data-table__cell--actions")))(l)&&o(t)}}),{focusProps:k,isFocused:R}=_(),C=x({"maxio-data-table__row":!n,"maxio-data-table__header-row":n,"maxio-data-table__row--active":p||R,"maxio-data-table__row--expanded":v,"maxio-data-table__row--expanded-child":l,"maxio-data-table__row--actionable":g,"maxio-data-table__row--dragging":Boolean(t)&&(null==h?void 0:h.draggingRowId)===(null==t?void 0:t.id),[`maxio-data-table__row--drop-${null===(d=null==h?void 0:h.activeTarget)||void 0===d?void 0:d.position}`]:Boolean(t)&&(null===(u=null==h?void 0:h.activeTarget)||void 0===u?void 0:u.rowId)===(null==t?void 0:t.id)},i);a.useEffect(()=>{if(t&&f&&b.current&&!n&&!l)return f(t,b.current)},[l,n,f,t]);const S=g?w({onClickCapture:y,onKeyDownCapture:y,tabIndex:0},I,k,r):r;return a.createElement("tr",{...S,ref:b,className:C,tabIndex:g?S.tabIndex:r.tabIndex},e)},Ta=s({}),Ma=i(({checked:e,disabled:t,invalid:l,indeterminate:n,className:i,inputProps:o,error:r,label:s},c)=>{const m=x("maxio-checkbox",{"maxio-checkbox--checked":e,"maxio-checkbox--disabled":t,"maxio-checkbox--error":l,"maxio-checkbox--indeterminate":n},i);return a.createElement("label",{className:m},a.createElement("input",{type:"checkbox",role:"checkbox",className:"maxio-checkbox__input",ref:c,...o}),a.createElement("span",{className:"maxio-checkbox__control"},r&&a.createElement("span",{className:"maxio-checkbox__control-error"})),s&&a.createElement("span",{className:"maxio-checkbox__label"},s))});Ma.displayName="InnerCheckbox";const Oa=({label:e,error:l=!1,className:n,indeterminate:i,value:o="",disabled:r,readOnly:s,defaultChecked:c,checked:d,...u})=>{const p=t(null),v=m(Ta),{inputProps:g,isDisabled:x,isInvalid:b,isSelected:h}=v&&Object.keys(v).length>0?N({value:o,"aria-label":null!=e?e:u["aria-label"],isDisabled:r,isInvalid:l,isIndeterminate:i,isReadOnly:s,...u},v,p):y({"aria-label":null!=e?e:u["aria-label"],isDisabled:r,isInvalid:l,isIndeterminate:i,isReadOnly:s,value:o,...u},V({...u,isSelected:d,defaultSelected:c}),p);return a.createElement(Ma,{inputProps:g,checked:h,disabled:x,invalid:b,indeterminate:i,className:n,error:l,label:e,ref:p,...u})},za=({children:e,className:t,...l})=>a.createElement("div",{className:x("maxio-form-helper-text",t),...l},e),Ba=({children:e,className:t,...l})=>a.createElement("div",{className:x("maxio-form-error",t),...l},a.createElement(Ve,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},e)),Aa=({helperText:e,className:t,errorMessage:l,children:n,disabled:i,label:o,defaultValue:r,name:s,...c})=>{var m;const d=j({defaultValue:r,name:s,errorMessage:l,description:e,label:o,isDisabled:i,isInvalid:!!l,...c}),{groupProps:u,labelProps:p,descriptionProps:v,errorMessageProps:g,isInvalid:b}=I({"aria-label":null===(m=null!=o?o:c["aria-label"])||void 0===m?void 0:m.toString(),isDisabled:i,isInvalid:!!l,...c},d),h=x("maxio-checkbox-group",{"maxio-checkbox-group--disabled":i},t),f=e&&!l;return a.createElement("div",{className:h,...u},o&&a.createElement("label",{className:"maxio-checkbox-group__label",...p},o),a.createElement(Ta.Provider,{value:d},n),f&&a.createElement(za,{...v},e),l&&b&&a.createElement(Ba,{...g},l))},La=({table:e,enableRowSelection:t,enableRowReordering:l})=>{var n,i,o,r;const s=null===(n=null==e?void 0:e.getToggleAllPageRowsSelectedHandler)||void 0===n?void 0:n.call(e),c=(null===(i=null==e?void 0:e.getIsAllPageRowsSelected)||void 0===i?void 0:i.call(e))||(null===(o=null==e?void 0:e.getIsAllRowsSelected)||void 0===o?void 0:o.call(e)),m=null===(r=null==e?void 0:e.getIsSomePageRowsSelected)||void 0===r?void 0:r.call(e);return t?a.createElement(a.Fragment,null,l&&a.createElement("span",{className:"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon","aria-hidden":"true",style:{visibility:"hidden"}}),a.createElement(Oa,{"aria-label":"Select all rows",onChange:e=>{s("boolean"==typeof e?{target:{checked:e}}:e)},checked:c,indeterminate:!c&&m})):null},Wa=({className:e,hideArrow:t=!1,children:l,offset:n=4,...i})=>a.createElement(K,{...i,className:x("maxio-popover",e),offset:n},a.createElement(a.Fragment,null,!t&&a.createElement(q,{className:"maxio-popover__arrow"},a.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12","aria-hidden":!0},a.createElement("path",{d:"M0 0 L6 6 L12 0"}))),l)),Fa=({row:e})=>{var t,l;const n=Ca(),i=null==n?void 0:n.registerHandle,o=null==n?void 0:n.getActions,r=null==n?void 0:n.hasActions,s=a.useRef(null),[c,m]=a.useState(!1),d=(null==n?void 0:n.draggingRowId)===e.id,u=null!==(t=null==n?void 0:n.getLabel(e))&&void 0!==t?t:e.id,p=a.useMemo(()=>{var a;return null!==(a=null==r?void 0:r(e))&&void 0!==a&&a},[r,e]),v=a.useMemo(()=>{var a;return c&&null!==(a=null==o?void 0:o(e))&&void 0!==a?a:[]},[o,c,e]),g=null!==(l=n&&!n.availability.available?n.availability.message:void 0)&&void 0!==l?l:p?void 0:`No moves are available for ${u}.`;a.useEffect(()=>{if(i&&s.current&&!g)return i(e,s.current)},[i,e,g]),a.useEffect(()=>{g&&m(!1)},[g]);const x=a.createElement(U,{ref:s,type:"button",className:"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon maxio-data-table__drag-handle","aria-label":`Reorder ${u}`,"aria-pressed":d,"aria-disabled":!!g||void 0,onPress:()=>{g||m(!0)}},a.createElement("i",{className:"fa-sharp fa-solid fa-grip-dots-vertical "+(g?"maxio-icon--disabled":"maxio-icon--secondary")}));return g?a.createElement(G,{delay:0,closeDelay:0},x,a.createElement(Z,{placement:"bottom start",offset:8,className:"maxio-tooltip maxio-tooltip--arrow-top-left"},a.createElement("div",{className:"maxio-tooltip__content"},g))):a.createElement(Y,{trigger:"longPress",isOpen:c,onOpenChange:m},x,a.createElement(Wa,{placement:"bottom start",hideArrow:!0},a.createElement(X,{autoFocus:"first",className:"maxio-data-table__reorder-menu",items:v,onAction:a=>{const t=v.find(e=>e.id===a);t&&(null==n||n.moveRow(e.id,t.target),requestAnimationFrame(()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.focus()}))}},e=>a.createElement(Q,{id:e.id,textValue:e.label,className:"maxio-data-table__reorder-menu-item"},e.label))))},Ha=({row:e,enableRowSelection:t,enableRowReordering:l})=>{var n,i,o,r;const s=null===(n=null==e?void 0:e.getToggleSelectedHandler)||void 0===n?void 0:n.call(e),c=(null===(i=null==e?void 0:e.getIsSelected)||void 0===i?void 0:i.call(e))||(null===(o=null==e?void 0:e.getIsAllSubRowsSelected)||void 0===o?void 0:o.call(e)),m=null===(r=null==e?void 0:e.getIsSomeSelected)||void 0===r?void 0:r.call(e),d=e.id||e.index;return a.createElement(a.Fragment,null,l&&a.createElement(Fa,{row:e}),t&&a.createElement(Oa,{"aria-label":`Select row ${d}`,onChange:s,checked:c,indeterminate:m}))},Va=({children:e})=>a.createElement("div",{className:"maxio-data-table__cell-flex"},e),ja=({row:e,cell:t,children:l,className:n,...i})=>{var o,r,s,c,m,d;const u=null==t?void 0:t.column,p=null===(r=null===(o=null==u?void 0:u.columnDef)||void 0===o?void 0:o.meta)||void 0===r?void 0:r.align,v=null===(c=null===(s=null==u?void 0:u.columnDef)||void 0===s?void 0:s.meta)||void 0===c?void 0:c.controls,g=null===(d=null===(m=null==u?void 0:u.columnDef)||void 0===m?void 0:m.meta)||void 0===d?void 0:d.actions,b=null==u?void 0:u.getIsPinned(),h=x("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${b}`]:b,[`maxio-data-table__cell--${p}`]:p,"maxio-data-table__cell--controls":v,"maxio-data-table__cell--actions":g}),f="left"===b?{left:null==u?void 0:u.getStart("left")}:"right"===b?{right:null==u?void 0:u.getAfter("right")}:{};return a.createElement("td",{className:h,style:f,...i},l)},Ka=({row:e,SubRowComponent:t,pattern:l,enableExpanding:n,onRowAction:i})=>{var o,r,s,c,m;const d=t&&e.getParentRow()&&e.getParentRow().getIsExpanded(),u=d&&e.getVisibleCells()[0].column.columnDef.id===va,p=d&&e.getVisibleCells()[e.getVisibleCells().length-1].column.columnDef.id===ga,v=[p,u].filter(Boolean).length,g=e.getVisibleCells().length-v,x=null!==(r=null===(o=e.getParentRow())||void 0===o?void 0:o.index)&&void 0!==r?r:e.index,b=l&&t&&x%2==1?"maxio-data-table__row--with-pattern":void 0,h=null===(s=e.getCanExpand)||void 0===s?void 0:s.call(e),f=null===(c=null==e?void 0:e.getToggleExpandedHandler)||void 0===c?void 0:c.call(e),E=null===(m=null==e?void 0:e.getIsExpanded)||void 0===m?void 0:m.call(e),_=h&&n?0:1.75,w=e.getVisibleCells()[0].column.columnDef.id===va?1:0,N=e.getVisibleCells().find(({column:e})=>{var a;const{actions:t,controls:l}=null!==(a=e.columnDef.meta)&&void 0!==a?a:{};return!t&&!l}),y=i&&N?N.id:void 0;return a.createElement(a.Fragment,{key:e.id},d?a.createElement(Da,{key:`${e.id}-sub`,row:e,isChild:!0,className:b},u&&a.createElement(ja,{className:"maxio-data-table__cell--pinned-left"}),a.createElement(ja,{colSpan:g},t(e)),p&&a.createElement(ja,{className:"maxio-data-table__cell--pinned-right"})):a.createElement(Da,{key:`${e.id}-parent`,row:e,className:b,onRowAction:i,"aria-labelledby":y},e.getVisibleCells().map(t=>{const l=n&&t.column.getIndex()===w;return a.createElement(ja,{key:t.id,row:e,cell:t,id:t.id},a.createElement("div",{className:"maxio-data-table__cell-flex",style:n&&l?{paddingLeft:`${(null==e?void 0:e.depth)+_}rem`}:void 0},n&&h&&l&&a.createElement(Qe,{size:"sm",variant:"ghost",icon:a.createElement(Ve,{size:"xs",variant:E?"chevron-down":"chevron-right"}),onClick:f,"aria-label":E?"Collapse row":"Expand row","data-open":E,className:"maxio-data-table__expand-button"}),T(t.column.columnDef.cell,t.getContext())))})))},qa={available:!0},Ua={available:!1,reason:"filtering",message:"Reordering is unavailable while the table is filtered."},Ga={available:!1,reason:"grouping",message:"Reordering is unavailable while the table is grouped."},Za={available:!1,reason:"pagination",message:"Reordering is unavailable while the table is paginated."},Ya=(e=[])=>e.filter(e=>e!==va&&e!==ga),Xa=[],Qa=e=>e.subRows,Ja=({pattern:e,size:t="md",SubRowComponent:n,onExpand:i,onSelect:o,onSort:r,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:m,columns:d,actions:p,actionsColumnSize:v,onRowAction:g,enableRowReordering:x=!1,getRowReorderLabel:b,onRowReorder:h,rowReorderMode:f="siblings",getRowId:E,getSubRows:_,state:w,...N})=>{var y,I;const k=x?void 0:n,R=!x&&s,C=(({columns:e,HeaderControls:t,RowControls:l,RowActions:n,actions:i,actionsColumnSize:o,enableExpanding:r,enableRowSelection:s,enableRowReordering:c})=>u(()=>{const m={id:va,size:s&&c?72:40,header:e=>a.createElement(t,{...e,enableExpanding:r,enableRowSelection:s,enableRowReordering:c}),cell:e=>a.createElement(l,{...e,enableExpanding:r,enableRowSelection:s,enableRowReordering:c}),meta:{controls:!0,width:(s&&c?72:40)+"px"}},d=i&&n?{id:ga,size:null!=o?o:40,header:"",cell:e=>a.createElement(n,null,i(e.row,e.table)),meta:{actions:!0}}:null;let u=[...e];return(s||c)&&(u=[m,...u]),d&&(u=[...u,d]),u},[i,o,n,r,s,c,e,t,l]))({columns:d,HeaderControls:La,RowControls:Ha,RowActions:Va,actions:p,actionsColumnSize:v,enableRowSelection:c,enableRowReordering:x,enableExpanding:Boolean(m)}),S=M({state:{...w,...x&&{sorting:Xa},columnPinning:{left:[...c||x?[va]:[],...Ya(null===(y=null==w?void 0:w.columnPinning)||void 0===y?void 0:y.left)],right:[...Ya(null===(I=null==w?void 0:w.columnPinning)||void 0===I?void 0:I.right),...p?[ga]:[]]}},getCoreRowModel:B(),enableRowSelection:c,enableExpanding:Boolean(m),...!N.manualExpanding&&{getExpandedRowModel:z()},...!N.manualSorting&&!x&&{getSortedRowModel:O()},columns:C,getRowId:E,...N,getSubRows:x?Qa:null!=_?_:Qa,enableSorting:R,...x&&{getSortedRowModel:void 0}}),P=S.getCanSomeRowsExpand(),$=S.getState(),D=(({columnFilters:e,globalFilter:a,grouping:t,hasPagination:l})=>e.length>0||null!=a&&""!==a?Ua:t.length>0?Ga:l?Za:qa)({columnFilters:$.columnFilters,globalFilter:$.globalFilter,grouping:$.grouping,hasPagination:Boolean(N.getPaginationRowModel||N.manualPagination)});l(()=>{null==i||i($.expanded)},[i,$.expanded]),l(()=>{null==o||o($.rowSelection)},[o,$.rowSelection]),l(()=>{x||null==r||r($.sorting)},[x,r,$.sorting]);const A=a.createElement(xa,{pattern:e,size:t,isExpandable:P,isUsingCustomRow:Boolean(k)},a.createElement(ba,null,S.getHeaderGroups().map(e=>a.createElement(Da,{key:e.id,table:S,isHeader:!0},e.headers.map(e=>a.createElement(fa,{key:e.id,table:S,header:e,enableExpanding:m},T(e.column.columnDef.header,e.getContext())))))),a.createElement(ha,null,S.getRowModel().rows.map(t=>a.createElement(Ka,{key:t.id,row:t,pattern:e,SubRowComponent:k,enableExpanding:m,onRowAction:g}))));return x&&E&&h?a.createElement($a,{availability:D,data:N.data,enableExpanding:Boolean(m),getRowReorderLabel:b,onRowReorder:h,rowReorderMode:f,table:S},A):A},et={sm:"h3",md:"h2",lg:"h1"},at=({children:e,size:t="sm",className:l,...n})=>{const i=et[t],o=x(`maxio-heading-${t}`,l);return a.createElement(i,{className:o,...n},e)},tt=({open:e,onOpenChange:t,placement:l="right",backdrop:n="dim",size:i="md",className:o,title:r,description:s,children:c,footer:m})=>{const d=a.useId(),u={"data-placement":l,"data-size":i};return a.createElement(J,{isOpen:e,onOpenChange:t,isDismissable:!0,className:x("maxio-drawer__backdrop",{"maxio-drawer__backdrop--dim":"dim"===n})},a.createElement(ee,{className:x("maxio-drawer",o),...u},a.createElement(ae,{className:"maxio-drawer__dialog","aria-labelledby":d},({close:e})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-drawer__header"},a.createElement("div",{className:"maxio-drawer__title-group"},a.createElement(at,{id:d,size:"md",className:"maxio-drawer__title"},r),s&&a.createElement("p",{className:"maxio-drawer__description"},s)),a.createElement(Qe,{"aria-label":"Close",onClick:e,icon:a.createElement(Ve,{variant:"cross"}),variant:"ghost",size:"sm",className:"maxio-drawer__close"})),a.createElement("div",{className:"maxio-drawer__body"},c),null!=m&&a.createElement("div",{className:"maxio-drawer__footer"},m)))))},lt={click:Ce,hover:e=>Re(e,{delay:100}),focus:ke,dismiss:Ie},nt=(e,a)=>a.map(a=>lt[a](e)),it=({placement:e="top",isActive:a=!1,interactions:n=["hover"],floatingElementOffset:i=0,onOverlayUpdate:o,autoHideMs:r})=>{const s=t(null),{strategy:c,x:m,y:d,context:u,floating:p,reference:v}=Se({placement:e,open:a,onOpenChange:e=>o(e),middleware:[Pe(i)]}),{getReferenceProps:g,getFloatingProps:x}=$e([...nt(u,n),De(u,{role:"tooltip"})]);l(()=>{s.current&&clearTimeout(s.current),a&&r&&(s.current=window.setTimeout(()=>o(!1),r))},[a,r]);return{isActive:a,refs:{floating:p,reference:v},floatingElementCSSPosition:{position:c,top:null!=d?d:0,left:null!=m?m:0},getReferenceProps:g,getFloatingProps:x}};function ot(e,a=0){const i=t((new Date).getTime()),o=t((new Date).getTime()),[r,s]=n(!1);return l(()=>{const t=()=>{i.current=(new Date).getTime(),s(!0)},l=()=>{o.current=(new Date).getTime(),window.setTimeout(()=>{i.current-o.current<=0&&s(!1)},a)},n=e&&e.current;return n&&(n.addEventListener("mouseenter",t),n.addEventListener("mouseleave",l)),()=>{n&&(n.removeEventListener("mouseenter",t),n.removeEventListener("mouseleave",l))}},[e]),r}function rt(e=500){const[a,i]=n(()=>{if("undefined"==typeof window)return{windowWitdh:0,windowHeight:0};const{innerWidth:e,innerHeight:a}=window;return{windowWitdh:e,windowHeight:a}}),o=t(null);return l(()=>{if("undefined"==typeof window)return;const a=()=>{var a;const{innerWidth:t,innerHeight:l}=window;window.clearTimeout(null!==(a=o.current)&&void 0!==a?a:void 0),o.current=window.setTimeout(()=>{i({windowWitdh:t,windowHeight:l})},e)};return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[e]),a}function st(e){const[a,t]=n(()=>{var a,t;return null!==(t=null===(a=e.current)||void 0===a?void 0:a.clientWidth)&&void 0!==t?t:0}),l=()=>{var a,l;const n=null!==(l=null===(a=e.current)||void 0===a?void 0:a.clientWidth)&&void 0!==l?l:0;t(e=>0===n&&e>0?e:n)};return v(l,[e]),D({ref:e,onResize:l}),a}const ct=({children:e,usePortal:t=!1,isActive:l=!1,placement:n="top",interactions:i=["hover"],role:o="tooltip",renderOverlay:r,floatingElementOffset:s,motionSettings:c={},autoHideMs:m,onOverlayUpdate:d,className:u})=>{const{getReferenceProps:p,getFloatingProps:v,refs:{floating:g,reference:b},floatingElementCSSPosition:h}=it({isActive:l,onOverlayUpdate:d,autoHideMs:m,floatingElementOffset:s,interactions:i,placement:n}),f=a.createElement(Ne,null,l&&a.createElement(ye.div,{ref:g,style:h,...c,...v()},r()));return a.createElement(a.Fragment,null,a.createElement("div",{ref:b,className:x("maxio-inline-flex",u),...p(),"data-testid":"overlay-trigger"},e),t?a.createElement(Te,{id:"maxio-ui-portal"},f):f)},mt=({children:e,arrowPosition:t,size:l="regular",maxWidth:n=160})=>a.createElement("div",{"data-testid":"tooltip",className:x("maxio-tooltip",`maxio-tooltip--${l}`,{[`maxio-tooltip--arrow-${t}`]:t})},a.createElement("div",{className:"maxio-tooltip__content",style:{maxWidth:n}},e)),dt={top:"bottom",right:"left",bottom:"top",left:"right","top-start":"bottom-left","top-end":"bottom-right","right-start":"left-top","right-end":"left-bottom","bottom-start":"top-left","bottom-end":"top-right","left-start":"right-top","left-end":"right-bottom"},ut=({children:e,interactions:i=["hover"],placement:o="right",maxWidth:r=160,size:s="regular",renderContent:c,autoHideMs:m,isVisible:d,usePortal:v,className:g,onVisibilityUpdate:x,floatingElementOffset:b=5})=>{const[h,f]=n(!1),E=void 0!==d,_=t(null),w=p(e=>{_.current&&clearTimeout(_.current),_.current=window.setTimeout(()=>{E||f(e),x&&x(e)},50)},[E,x]),N=u(()=>(e=>{const a=e.startsWith("top")||e.startsWith("bottom")?"Y":"X",t=`translate${a}(${e.startsWith("bottom")||e.startsWith("right")?"-":""}10px)`;return{initial:{opacity:0,visibility:"hidden",transform:t},animate:{opacity:1,visibility:"visible",transform:`translate${a}(0px)`},exit:{opacity:0,visibility:"hidden",transform:t},transition:{ease:[.4,0,.5,1],duration:.2}}})(o),[o]);return l(()=>()=>{_.current&&clearTimeout(_.current)},[]),a.createElement(ct,{role:"tooltip",className:g,floatingElementOffset:b,motionSettings:N,isActive:E?d:h,onOverlayUpdate:w,autoHideMs:m,usePortal:v,placement:o,interactions:i,renderOverlay:()=>a.createElement(mt,{size:s,arrowPosition:dt[o],maxWidth:r},c())},e)},pt=({as:e="div",children:t,compact:l=!1,size:n="md",className:i,...o})=>{const r=e,s=x({[`maxio-body-${n}`]:!l,[`maxio-body-${n}-compact`]:l},i);return a.createElement(r,{className:s,...o},t)},vt=({className:e,...t})=>a.createElement(te,{...t,className:x("maxio-listbox",e)});vt.displayName="ListBox";const gt=({className:e,...t})=>{const l=t.textValue||("string"==typeof t.children?t.children:void 0);return a.createElement(le,{...t,textValue:l,className:x("maxio-listbox__item",e)},ne(t.children,(e,{isSelected:t})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-listbox__content"},"string"==typeof e?a.createElement(pt,{size:"sm"},e):e),t&&a.createElement(Ve,{variant:"check"}))))};gt.displayName="ListBox.Item";const xt=({className:e,...t})=>a.createElement(ie,{...t,className:x("maxio-listbox__section",e)});xt.displayName="ListBox.Section";const bt=({className:e,...t})=>a.createElement(oe,{...t,className:x("maxio-listbox__header",e)});bt.displayName="ListBox.Header";const ht=Object.assign(vt,{Item:gt,Section:xt,Header:bt}),ft=({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:o,errorMessage:r,leadingElement:s=null,fullWidth:c,className:m,placeholder:d,renderEmptyState:u,selectionMode:p,children:v,...g})=>{const b=a.useRef(null),h=a.useRef(null),[f,E]=a.useState(),[_,w]=a.useState(0),N=!!r,y=t||N,I=v,k=a.useCallback(()=>{const e=b.current;if(!e)return;const a=h.current,t=a?a.getBoundingClientRect().left-e.getBoundingClientRect().left:0;w(e=>e===-t?e:-t),E(a=>{const t=`${e.offsetWidth}px`;return(null==a?void 0:a["--trigger-width"])===t?a:{"--trigger-width":t}})},[]);a.useEffect(()=>{const e=b.current;if(!e)return;if(k(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(k);return a.observe(e),()=>a.disconnect()},[k]);const R=x("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":y,"maxio-text-field--readonly":l,"maxio-text-field--full-width":c},m);return a.createElement(re,{...g,isDisabled:e,isInvalid:y,isReadOnly:l,selectionMode:p,className:R},i&&a.createElement(se,{className:"maxio-text-field__label"},i),a.createElement("div",{ref:b,className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(ce,{ref:h,className:"maxio-text-field__input",placeholder:d}),a.createElement("div",{className:"maxio-text-field__trailing-element"},a.createElement(U,{className:x("maxio-button","maxio-button--ghost","maxio-button--icon","maxio-button--sm")},a.createElement(Ve,{variant:"chevron-up-down"})))),o&&!N&&a.createElement(me,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},o),r&&a.createElement(de,{className:"maxio-form-error"},e=>a.createElement(a.Fragment,null,a.createElement(Ve,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},"function"==typeof r?r(e):r))),a.createElement(Wa,{hideArrow:!0,className:"maxio-combobox__popover",crossOffset:_,style:f},a.createElement(ht,{renderEmptyState:u},I)))};ft.displayName="ComboBox";const Et=e=>a.createElement(ht.Item,{...e});Et.displayName="ComboBox.Item";const _t=e=>a.createElement(ht.Section,{...e});_t.displayName="ComboBox.Section";const wt=e=>a.createElement(ht.Header,{...e});wt.displayName="ComboBox.Header";const Nt=Object.assign(ft,{Item:Et,Section:_t,Header:wt}),yt=s({}),It=({indent:e=!1,disabled:l=!1,invalid:n=!1,label:i,...o})=>{const r=t(null),s=m(yt),{inputProps:c,isDisabled:d}=k({...o,value:(o.value||"").toString(),"aria-label":o["aria-label"]||i,isDisabled:l},s,r),u=x("maxio-radio",{"maxio-radio--indent":e,"maxio-radio--disabled":d||s.isDisabled,"maxio-radio--error":n||s.isInvalid});return a.createElement("label",{className:u},a.createElement("input",{ref:r,role:"radio",type:"radio",className:"maxio-radio__input",...c,name:s.name||c.name}),a.createElement("span",{className:"maxio-radio__control"}),a.createElement("span",{className:"maxio-radio__label"},i))},kt=({children:e,label:t,errorMessage:l,helperText:n,disabled:i=!1,invalid:o=!1,name:r,defaultValue:s,...c})=>{const m=Me({isDisabled:i,isInvalid:o,description:n,name:r,label:t,errorMessage:l,defaultValue:s,...c}),{radioGroupProps:d,labelProps:u,descriptionProps:p,errorMessageProps:v}=R({"aria-label":c["aria-label"]||t,...c},m);return a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-radio-group",...d},t&&a.createElement("label",{className:"maxio-radio-group__label",...u},t),a.createElement(yt.Provider,{value:m},e),o&&l&&a.createElement(Ba,{...v},l),n&&!o&&a.createElement(za,{...p},n)))},Rt=i(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:o,errorMessage:r,leadingElement:s=null,trailingElement:c=null,fullWidth:m,className:d,...u},p)=>{const v=x("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":t,"maxio-text-field--readonly":l,"maxio-text-field--full-width":m},d);return a.createElement(ue,{...u,isDisabled:e,isReadOnly:l,isInvalid:t,className:v},i&&a.createElement(se,{className:"maxio-text-field__label"},i),a.createElement("div",{className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(ce,{ref:p,className:"maxio-text-field__input"}),c&&a.createElement("div",{className:"maxio-text-field__trailing-element"},c)),o&&!(t&&r)&&a.createElement(me,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},o),r&&a.createElement(de,{className:"maxio-form-error"},a.createElement(Ve,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},r)))});Rt.displayName="TextField";const Ct=i(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:o,errorMessage:r,fullWidth:s,className:c,...m},d)=>{const u=x("maxio-text-area",`maxio-text-area--${n}`,{"maxio-text-area--disabled":e,"maxio-text-area--error":t,"maxio-text-area--readonly":l,"maxio-text-area--full-width":s},c);return a.createElement(ue,{...m,isDisabled:e,isReadOnly:l,isInvalid:t,className:u},i&&a.createElement(se,{className:"maxio-form-label"},i),a.createElement(pe,{ref:d,className:"maxio-text-area__input"}),o&&!(t&&r)&&a.createElement(me,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},o),r&&a.createElement(de,{className:"maxio-form-error"},a.createElement(Ve,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},r)))});Ct.displayName="TextArea";const St=i(({disabled:e=!1,invalid:n=!1,readOnly:i=!1,size:o="md",label:r,helperText:s,showErrorMessage:c=!0,errorMessage:m,leadingElement:d=null,trailingElement:u=null,fullWidth:p,className:v,...b},h)=>{var f,E;const _=t(null);g(h,()=>_.current),l(()=>{console.warn("TextInput is deprecated. Please use TextField instead.")},[]);const{spellCheck:w,...N}=b,y={...N,label:r,description:s,errorMessage:m,defaultValue:null===(f=b.defaultValue)||void 0===f?void 0:f.toString(),value:null===(E=b.value)||void 0===E?void 0:E.toString(),isDisabled:e,isReadOnly:i,isInvalid:n},{labelProps:I,inputProps:k,descriptionProps:R,errorMessageProps:S}=C(y,_),P=x("maxio-text-field",`maxio-text-field--${o}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":n,"maxio-text-field--readonly":i,"maxio-text-field--full-width":p},v),$=n&&m&&c;return a.createElement("div",{className:P},r&&a.createElement("label",{className:"maxio-text-field__label",...I},r),a.createElement("div",{className:"maxio-text-field__items"},d&&a.createElement("div",{className:"maxio-text-field__leading-element"},d),a.createElement("input",{ref:_,type:"text",className:"maxio-text-field__input",...k,spellCheck:w}),u&&a.createElement("div",{className:"maxio-text-field__trailing-element"},u)),s&&!$&&a.createElement("div",{className:"maxio-form-helper-text",...R},s),$&&a.createElement(Ba,{...S},m))});St.displayName="TextInput";const Pt=({options:e,label:t,size:l="md",inline:n=!1,disabled:i=!1,helperText:o,errorMessage:r,fullWidth:s=!1,...c})=>{const m=x("maxio-select",`maxio-select--${l}`,{"maxio-select--disabled":i,"maxio-select--inline":n,"maxio-select--error":!!r,"maxio-select--full-width":s}),d=b();return a.createElement("div",{className:m},t&&a.createElement("label",{htmlFor:d,className:"maxio-select__label"},t),a.createElement("div",{className:"maxio-select__input-container"},a.createElement("select",{id:d,className:"maxio-select__input",disabled:i,...c},e.map(e=>a.createElement("option",{key:`option-${e.value}`,value:e.value,disabled:e.disabled},e.label))),a.createElement(Ve,{variant:"chevron-up-down"})),!!r&&a.createElement(Ba,null,r),o&&!r&&a.createElement("div",{className:"maxio-form-helper-text"},o))},$t=({size:e="md",onChange:t,totalItems:i=0,itemsPerPage:o=30,currentPage:r=1,pageSizeOptions:s,manualPageInput:c=!1})=>{const[m,d]=n(r),[u,p]=n(o),[v,g]=n(r.toString());l(()=>{g(m.toString())},[m]);const x=Math.ceil(i/u),b=m<x,h=m>1,f=u*(m-1)+1,E=Math.min(u*m,i),_=s.map(e=>({label:e.toString(),value:e.toString()})),w=Array.from({length:x},(e,a)=>a+1).map(e=>({label:e.toString(),value:e.toString()})),N=e=>{d(e),null==t||t({currentPage:e,itemsPerPage:u})},y=e=>{const a=parseInt(e,10);if(isNaN(a))return void g(m.toString());const t=Math.max(1,Math.min(a,x));g(t.toString()),N(t)};return a.createElement("div",{className:"maxio-pagination"},a.createElement("div",{className:"maxio-pagination__items-per-page"},a.createElement("label",{htmlFor:"items-per-page-large",className:"maxio-pagination__label"},"Items per page"),a.createElement(Pt,{inline:!0,size:e,options:_,onChange:e=>{return a=Number(e.target.value),p(a),d(1),void(null==t||t({currentPage:1,itemsPerPage:a}));var a},value:u,id:"items-per-page-large"})),a.createElement("div",{className:"maxio-pagination__total-items"},a.createElement("span",null,f,"–",E," of ",i," items")),a.createElement("div",{className:"maxio-pagination__current-page"},c?a.createElement(St,{className:"maxio-pagination__page-input",value:v,min:1,max:x,onChange:e=>(e=>{g(e)})(e),onBlur:e=>{y(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(y(e.currentTarget.value),e.currentTarget.blur())},"aria-label":"Page number",size:e,type:"number",onWheel:e=>e.preventDefault()}):a.createElement(Pt,{inline:!0,size:e,"aria-label":"Select page",onChange:e=>N(Number(e.target.value)),value:m,options:w,id:"page-index-large"}),a.createElement("div",{className:"maxio-pagination__label"},"of ",x," pages")),a.createElement("div",{className:"maxio-pagination__controls"},a.createElement(ut,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},a.createElement(Qe,{icon:a.createElement(Ve,{variant:"chevron-left"}),size:e,variant:"ghost",onClick:()=>N(m-1),"aria-label":"Previous",disabled:!h})),a.createElement(ut,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},a.createElement(Qe,{icon:a.createElement(Ve,{variant:"chevron-right"}),size:e,variant:"ghost",onClick:()=>N(m+1),"aria-label":"Next",disabled:!b}))))},Dt=({label:e,helperText:t,size:l="md",variant:n="default",status:i,value:o,maxValue:r=100})=>{const s=b(),c=b(),m=i&&!!e&&!!o&&!("inline"===n),d=t&&!("inline"===n),u=t&&"inline"===n,{progressBarProps:p,labelProps:v}=S({maxValue:r,value:o,label:e}),g=x("maxio-progress-bar",{"maxio-progress-bar--lg":"lg"===l,"maxio-progress-bar--success":o&&!("inline"===n)&&"success"===i,"maxio-progress-bar--error":o&&!("inline"===n)&&"error"===i,"maxio-progress-bar--indent":"indent"===n,"maxio-progress-bar--inline":"inline"===n,"maxio-progress-bar--indeterminate":void 0===o});return a.createElement("div",{className:g,...p},a.createElement("div",{id:s,className:"maxio-progress-bar__label",...v},e),u&&a.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t),a.createElement("div",{className:"maxio-progress-bar__track"},a.createElement("div",{className:"maxio-progress-bar__progress",style:{"--tw-scale-x":`${o}%`}})),m&&a.createElement("div",{className:`maxio-progress-bar__${i}-icon`}),d&&a.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t))},Tt=({className:e,size:t="md",fullWidth:l=!1,selectionMode:n="single",orientation:i="horizontal",disallowEmptySelection:o=!0,...r})=>a.createElement(ve,{...r,selectionMode:n,orientation:i,disallowEmptySelection:o,className:ne(e,e=>x("maxio-segmented-control",`maxio-segmented-control--${t}`,{"maxio-segmented-control--full-width":l},e))});Tt.displayName="SegmentedControl";const Mt=({className:e,children:t,...l})=>a.createElement(ge,{...l,className:ne(e,e=>x("maxio-segmented-control__item",e))},ne(t,e=>a.createElement(a.Fragment,null,a.createElement(xe,{className:"maxio-segmented-control__selection-indicator","data-selected":!0}),e)));Mt.displayName="SegmentedControl.Item";const Ot=Object.assign(Tt,{Item:Mt}),zt=({leadingIcon:e,trailingIcon:t,type:l="menu",children:n,leadingIconClassName:i,isTooltipVisible:o=!1})=>a.createElement(a.Fragment,null,e&&a.createElement(ut,{usePortal:!0,isVisible:o,renderContent:()=>n,floatingElementOffset:12},a.createElement("span",{className:"maxio-side-nav__icon"},a.createElement(Ve,{variant:e,className:i}))),a.createElement("span",{className:`maxio-side-nav__${l}-title`,"data-testid":"maxio-sidebar-section-name"},n),t&&a.createElement("span",{className:"maxio-side-nav__menu-chevron"},a.createElement(Ve,{variant:t}))),Bt=e=>"heading"!==e.type,At=e=>{const a=(e=>e.flat().filter(Bt).map(e=>e.items).flat().find(e=>null==e?void 0:e.isCurrent))(e);return a?e.map(e=>e.map(e=>{var t;return Bt(e)&&(null===(t=e.items)||void 0===t?void 0:t.includes(a))?{...e,isOpen:!0}:e})):e},Lt=s({}),Wt=()=>m(Lt),Ft=({children:e,isOpen:i,onChange:o,withIcons:r=!0,sections:s,shouldToggleSidebar:c=!0,topDropdownItems:m,collapseBreakpoint:d=800})=>{const u=t(!1),[p,v]=n(()=>!c||("boolean"==typeof i?i:"undefined"==typeof window||window.innerWidth>d)),[g,x]=n(()=>At(s)),{windowWitdh:b}=rt(200);l(()=>{u.current&&(null==o||o(p))},[p,o]),l(()=>{u.current=!0},[]),l(()=>{!function(e){if(!c)return;e<d&&p&&h()}(b)},[b]),l(()=>{"boolean"==typeof i&&v(i)},[i]);const h=()=>{v(!1)};return a.createElement(Lt.Provider,{value:{sections:g,topDropdownItems:m,onSectionOpen:e=>{x(a=>a.map(a=>a.map(a=>Bt(a)?{...a,isOpen:(null==a?void 0:a.name)===e&&!a.isOpen}:a)))},isOpen:p,onOpen:()=>{v(!0)},onClose:h,withIcons:r,shouldToggleSidebar:c}},e)},Ht=()=>{const{onOpen:e,topDropdownItems:l,isOpen:n}=Wt(),{mainItem:i,otherItems:o,actions:r}=l,s=t(null),c=ot(s),m=({id:e,title:a,icon:t,iconClass:l,url:n,...i})=>({id:e,label:a,leadingIconName:t,leadingIconClassName:l,link:{href:n,...i}}),{items:d,itemsCount:p}=u(()=>({itemsCount:o.length+r.length,items:[...o.map(m),(null==o?void 0:o.length)>0&&(null==r?void 0:r.length)>0?{type:"divider",id:"item-divider"}:null,...r.map(m)].filter(e=>null!=e)}),[r,o]);return a.createElement(a.Fragment,null,0===p?a.createElement("a",{className:"maxio-side-nav__menu-button maxio-side-nav__menu-button--large",href:i.url,onClick:e},a.createElement("span",{className:"maxio-side-nav__menu-title"},i.title)):a.createElement("details",{className:"maxio-action-menu maxio-side-nav--action-menu"},a.createElement("summary",{onClick:e,className:"maxio-side-nav__menu-button","aria-haspopup":"true",ref:s},i.url?a.createElement(a.Fragment,null,a.createElement(zt,{type:"menu",isTooltipVisible:!n&&c,leadingIcon:i.icon,trailingIcon:"chevron-up-down",leadingIconClassName:i.iconClass},i.title)):a.createElement(zt,{type:"menu",trailingIcon:"chevron-up-down"},i.title)),a.createElement(qe,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:d,small:!0})))},Vt=({section:e})=>{const{isOpen:l,withIcons:n}=Wt(),i=t(null),o=ot(i);return a.createElement("li",{className:"maxio-side-nav__item","data-key":e.key,"data-testid":"maxio-sidebar-section"},a.createElement("a",{className:"maxio-side-nav__link","aria-current":e.isCurrent?"page":void 0,role:"button",href:e.href,ref:i},a.createElement(zt,{isTooltipVisible:o&&!l,type:"menu",leadingIcon:n?e.icon:void 0},e.name)))},jt=({section:e})=>{var l,n;const{onOpen:i,onSectionOpen:o,isOpen:r,withIcons:s}=Wt(),c=t(null),m=ot(c);if(!Bt(e))return a.createElement("li",{className:"maxio-side-nav__item-header"},e.title);return e.Component?a.createElement(e.Component,{section:e}):e.href?a.createElement(Vt,{section:e}):a.createElement("li",{className:x("maxio-side-nav__item",{"maxio-side-nav__item--icon":s}),"data-testid":"maxio-sidebar-section"},a.createElement("button",{className:"maxio-side-nav__menu-button",ref:c,"aria-expanded":e.isOpen?"true":"false",type:"button",onClick:()=>{o(e.name),i()}},a.createElement(zt,{type:"menu",isTooltipVisible:!r&&m,leadingIcon:s?e.icon:void 0,trailingIcon:(null===(l=e.items)||void 0===l?void 0:l.length)?"chevron-down":void 0},e.name)),a.createElement("ul",{className:"maxio-side-nav__menu"},null===(n=e.items)||void 0===n?void 0:n.map(e=>a.createElement("li",{key:`section-sub-item-${e.name}`,className:"maxio-side-nav__item","data-testid":"maxio-section-item"},a.createElement("a",{className:"maxio-side-nav__link",href:e.href,"aria-current":e.isCurrent?"page":void 0},a.createElement("span",{className:"maxio-side-nav__link-title"},e.name))))))},Kt=()=>{const{sections:e}=Wt();return a.createElement(a.Fragment,null,e.map((e,t)=>a.createElement("ul",{role:"list",className:"maxio-side-nav__items",key:`section-list-${t}`},e.map((e,l)=>a.createElement(jt,{key:`section-list-item-${e.type}-${t}-${l}`,section:e})))))},qt=()=>{const{onClose:e,shouldToggleSidebar:t}=Wt();return a.createElement("div",{className:"maxio-side-nav__logo-container"},a.createElement("a",{className:"maxio-side-nav__brand",href:"/","aria-label":"Maxio"}),t&&a.createElement("button",{className:"maxio-side-nav__menu-toggle","aria-label":"toggle sidebar",onClick:e},a.createElement(Ve,{variant:"sidebar"})))},Ut=()=>{const{isOpen:e}=Wt();return a.createElement("nav",{className:x("maxio-side-nav",{"maxio-side-nav--collapsed":!e})},a.createElement(qt,null),a.createElement(Ht,null),a.createElement("div",{className:"maxio-side-nav__items-container"},a.createElement(Kt,null)))},Gt=({withIcons:e=!0,shouldToggleSidebar:t=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:o,onChange:r})=>a.createElement(Ft,{isOpen:o,onChange:r,collapseBreakpoint:i,withIcons:e,shouldToggleSidebar:t,topDropdownItems:l,sections:n},a.createElement(Ut,null)),Zt=({disabled:e=!1,value:t=0,className:l,id:n,isCurrent:i,...o})=>{const r="icon"===o.type,s=({isSelected:a})=>x("maxio-tabs__tab",l,{"maxio-tabs__tab--active":a,"maxio-tabs__tab--disabled":e,"maxio-tabs__tab--icon":r});if("icon"===o.type){const{icon:l,...n}=o;return a.createElement(be,{id:t,isDisabled:e,...n,className:s},a.createElement("div",{className:"maxio-tabs__tab__content"},l))}const{children:c,rightIcon:m,...d}=o;return a.createElement(be,{id:t,isDisabled:e,...d,className:s},a.createElement("div",{className:"maxio-tabs__tab__content"},c,m||null))},Yt=s({variant:"line",withDivider:!1}),Xt=({children:e,variant:t="line",withDivider:l=!1})=>a.createElement(Yt.Provider,{value:{variant:t,withDivider:l}},e),Qt=({children:e,variant:t="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:o})=>a.createElement(he,{className:"maxio-tabs-container",selectedKey:i,defaultSelectedKey:n,onSelectionChange:e=>null==o?void 0:o(Number(e))},a.createElement(Xt,{variant:t,withDivider:l},e)),Jt=({children:e,value:t,className:l,id:n,...i})=>a.createElement(fe,{id:t,className:x("maxio-tabs__panel",l),...i},e),el=({children:e})=>{const t=d.map(e,(e,a)=>{if(!r(e)||e.type!==Jt)throw new Error("You can only pass <TabPanel /> component as children");return o(e,{key:a,value:a})});return a.createElement(Ee,{className:"maxio-tabs__panels"},t)},al=({children:e,className:l,ariaLabel:i,overflow:s="none",moreLabel:u="More",...p})=>{const{variant:g,withDivider:b}=m(Yt),h=m(_e),f=c(),[E,_]=n(!1),w=x("maxio-tabs",l,{"maxio-tabs--contained":"contained"===g,"maxio-tabs--divider":b}),N=d.map(e,e=>e);(null!=N?N:[]).forEach(e=>{if(!r(e)||e.type!==Zt)throw new Error("You can only pass <Tab /> component as children")});const y="auto"===s&&!!(null==N?void 0:N.length),{ref:I,moreButtonRef:k,overflowIndexes:R,handleKeyDownCapture:C}=(({overflowEnabled:e,childrenArray:a})=>{const l=t(null),i=t(null),o=t(null),[r,s]=n(null),c=st(l),d=m(_e),u=null!=(null==d?void 0:d.selectedKey)?Number(d.selectedKey):null,[p,g]=n([]);v(()=>{var t;if(!e||!r)return void g((null!=a?a:[]).map((e,a)=>a));const{visibleIndexes:l}=((e,a,t,l)=>{const n=e.map((e,a)=>a);if(e.reduce((e,a)=>e+a,0)<=a)return{visibleIndexes:n,overflowIndexes:[]};const i=[];let o=t;for(const t of n){if(o+e[t]>a)break;o+=e[t],i.push(t)}if(null!==l&&!i.includes(l)){for(o+=e[l];o>a&&i.length>0;)o-=e[i.pop()];i.push(l)}i.sort((e,a)=>e-a);const r=n.filter(e=>!i.includes(e));return{visibleIndexes:i,overflowIndexes:r}})(r.tabWidths,c,r.moreButtonWidth,null!==(t=o.current)&&void 0!==t?t:u);l.length===(null!=a?a:[]).length&&(o.current=null),g(l)},[e,r,c]),v(()=>{e&&r&&null!==u&&g(e=>(e.includes(u)||(o.current=u),((e,a,t,l,n)=>{if(e.includes(n))return e;const i=[...e,n].sort((e,a)=>e-a);let o=l+i.reduce((e,t)=>e+a[t],0);for(;o>t&&i.length>1;){const e=i.length-1,t=i[e]===n?e-1:e,[l]=i.splice(t,1);o-=a[l]}return i})(e,r.tabWidths,c,r.moreButtonWidth,u)))},[u]);const x=e?(null!=a?a:[]).map((e,a)=>a).filter(e=>!p.includes(e)):[],b=((e,a)=>e.filter(e=>{var t;return!(null===(t=null==a?void 0:a[e])||void 0===t?void 0:t.props.disabled)}))(p,a);v(()=>{var t,n;if(!e||!l.current)return void s(e=>null===e?e:null);const o=Array.from(l.current.querySelectorAll('[role="tab"]')),r=null!==(n=null===(t=i.current)||void 0===t?void 0:t.getBoundingClientRect().width)&&void 0!==n?n:0;s(e=>{var t;const l=(null!=a?a:[]).map((a,t)=>{var l,n,i;const r=null!==(n=null===(l=o[t])||void 0===l?void 0:l.getBoundingClientRect().width)&&void 0!==n?n:0;return r>0?r:null!==(i=null==e?void 0:e.tabWidths[t])&&void 0!==i?i:0}),n=r>0?r:null!==(t=null==e?void 0:e.moreButtonWidth)&&void 0!==t?t:0,i=(null==e?void 0:e.tabWidths.length)===l.length&&e.tabWidths.every((e,a)=>e===l[a]);return e&&i&&e.moreButtonWidth===n?e:{tabWidths:l,moreButtonWidth:n}})},[a,e]);const h=e=>{var a,t;void 0!==e&&(null==d||d.selectionManager.setFocused(!0),null==d||d.selectionManager.setFocusedKey(e),null==d||d.setSelectedKey(e),null===(t=null===(a=l.current)||void 0===a?void 0:a.querySelector(`[role="tab"][data-key="${e}"]`))||void 0===t||t.focus())};return{ref:l,moreButtonRef:i,visibleIndexes:p,overflowIndexes:x,handleKeyDownCapture:e=>{var a;if(0===x.length)return;const t=document.activeElement===i.current,l=null==d?void 0:d.selectionManager.focusedKey,n=t?-1:b.indexOf(Number(l));if(t||-1!==n)switch(e.key){case"ArrowRight":if(t)return;return e.preventDefault(),e.stopPropagation(),void(n<b.length-1?h(b[n+1]):null===(a=i.current)||void 0===a||a.focus());case"ArrowLeft":return e.preventDefault(),e.stopPropagation(),void(t?h(b[b.length-1]):n>0&&h(b[n-1]));case"Home":if(t)return;return e.preventDefault(),e.stopPropagation(),void h(b[0]);case"End":if(t)return;return e.preventDefault(),e.stopPropagation(),void h(b[b.length-1])}}}})({overflowEnabled:y,childrenArray:N}),S=a.createElement("span",{className:"maxio-tabs__tab__content"},u,a.createElement(Ve,{variant:"chevron-down",className:"maxio-tabs__more__chevron"})),P=R.map(e=>{return`#${a=f,"undefined"!=typeof CSS&&"function"==typeof CSS.escape?CSS.escape(a):a.replace(/[^a-zA-Z0-9_-]/g,"\\$&")} [role="tablist"] > .maxio-tabs__tab:nth-child(${e+1})`;var a});return a.createElement("div",{id:f,className:w,ref:I,onKeyDownCapture:C},P.length>0&&a.createElement("style",null,`${P.join(", ")} { display: none; }`),a.createElement(we,{"aria-label":i,className:"maxio-contents",...p},(null!=N?N:[]).map((e,a)=>o(e,{key:a,value:a}))),y&&R.length>0&&a.createElement(Y,{isOpen:E,onOpenChange:_},a.createElement(U,{ref:k,className:"maxio-tabs__tab maxio-tabs__more__trigger","aria-label":u},S),E&&a.createElement(Wa,{hideArrow:!0,placement:"bottom end",className:"maxio-tabs__more__menu"},a.createElement(X,{"aria-label":`${u} tabs`,onAction:e=>{null==h||h.setSelectedKey(e),requestAnimationFrame(()=>{var a,t;null===(t=null===(a=I.current)||void 0===a?void 0:a.querySelector(`[role="tab"][data-key="${e}"]`))||void 0===t||t.focus()})}},R.map(e=>{const t=N[e],{disabled:l,type:n,"aria-label":i,"aria-labelledby":o}=t.props,r="icon"===n?t.props.icon:t.props.children;return a.createElement(Q,{key:e,id:e,isDisabled:!!l,"aria-label":i,"aria-labelledby":o,className:"maxio-tabs__more__item"},r)})))))},tl=({children:e,size:t,sentiment:l,kind:n="primary",leadingIcon:i,trailingIcon:o})=>{const r=x("maxio-tag",`maxio-tag--${n}`,!!l&&`maxio-tag--${l}`,!!t&&`maxio-tag--${t}`);return a.createElement("div",{className:r},i&&a.createElement(Ve,{variant:i,className:"maxio-tag__icon"}),a.createElement("span",{className:"maxio-tag__label"},e),o&&a.createElement(Ve,{variant:o,className:"maxio-tag__icon"}))},ll=({children:e,className:t,...l})=>a.createElement("div",{className:x("maxio-card__header",t),...l},e);ll.displayName="Card.Header";const nl=({children:e,className:t,...l})=>a.createElement("div",{className:x("maxio-card__body",t),...l},e);nl.displayName="Card.Body";const il=({children:e,className:t,...l})=>a.createElement("div",{className:x("maxio-card__footer",t),...l},e);il.displayName="Card.Footer";const ol=({children:e,className:t,variant:l="primary",...n})=>a.createElement("div",{className:x("maxio-card",`maxio-card--${l}`,t),...n},e);ol.displayName="Card";const rl=Object.assign(ol,{Header:ll,Body:nl,Footer:il}),sl=({children:e,className:t,href:l,onClick:n,target:i,disabled:o})=>{const r=l||n;if(!r)return a.createElement("div",{className:"maxio-tile"},e);const s=x("maxio-tile",t,{"maxio-tile--clickable":r,"maxio-tile--disabled":o});return a.createElement("a",{className:s,href:l,target:i,onClick:e=>{o&&l&&e.preventDefault(),!o&&n&&n()}},e)};var cl,ml,dl,ul;function pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},pl.apply(null,arguments)}const vl=a=>e.createElement("svg",pl({xmlns:"http://www.w3.org/2000/svg","data-name":"Maxio Logo SVG",viewBox:"0 0 1036 240"},a),cl||(cl=e.createElement("path",{d:"M59.32 11.3 70.64 0l40.74 40.35v70.99H40.89L0 70.52l11.15-11.14 36.2 36.15h30.07l3.07-3.39-50.91-51.15 10.99-10.97 51.24 50.83 3.72-3.38V47.13zM180.68 11.3 169.36 0l-40.73 40.35v70.99h70.48L240 70.51l-11.15-11.14-36.2 36.15h-30.06l-3.07-3.39 50.91-51.15-10.99-10.97-51.24 50.83-3.72-3.38V47.12l36.2-35.83ZM59.32 228.7l11.31 11.29 40.74-40.35v-70.99H40.89L0 169.48l11.15 11.14 36.2-36.15h30.07l3.07 3.39-50.92 51.15 10.99 10.97 51.24-50.83 3.72 3.38v30.34zM180.68 228.7l-11.32 11.29-40.73-40.35v-70.99h70.48L240 169.48l-11.15 11.14-36.2-36.15h-30.06l-3.07 3.39 50.91 51.15-10.99 10.97-51.24-50.83-3.72 3.38v30.34zM1015.27 139.55c0-29.94-23.74-53.46-52.11-53.46s-52.11 23.52-52.11 53.46 23.74 53.46 52.11 53.46 52.11-23.52 52.11-53.46m20.32.95c-.5 40.27-32.73 72.76-72.43 72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71 72.44-73.71h.94c39.57.52 71.5 33.32 71.5 73.71v.95Z"})),ml||(ml=e.createElement("path",{fillRule:"evenodd",d:"M870.39 24h-20.33v20.33h20.33zm0 40.67h-20.33v148.59h20.33z"})),dl||(dl=e.createElement("path",{fillRule:"evenodd",d:"M850.05 24h20.33v20.33h-20.33zM695.01 82.85l50.83 56.28v6.53l-50.28 55.67 15.23 13.2 49.22-54.49h4.71l49.22 54.49 15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15 55.52h-3.96l-50.15-55.52L695 82.85ZM660.49 78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13 0-52.44 18.93-58.09 44.86l-.28 1.27 19.33 3.72.31-1.14c2.39-8.91 6.66-16.54 13.04-21.94 6.36-5.39 14.91-8.63 26.02-8.63s19.12 3.25 24.76 8.96c5.64 5.72 8.73 14.06 8.73 24.53v6.11L616.62 130l-3.26.68c-16.14 3.47-29.79 7.84-39.59 14.45-10.54 7.11-16.64 16.83-16.64 30.62 0 12.51 4.51 22.62 12.5 29.59 7.96 6.95 19.25 10.67 32.63 10.67 22.27 0 41.87-12.03 51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58Zm-40.09 68.13c-12.86 2.77-23.05 5.42-30.03 9.63-3.46 2.09-6.08 4.54-7.84 7.54s-2.71 6.62-2.71 11.15c0 6.38 2.1 12.12 6.32 16.27 4.22 4.14 10.7 6.82 19.7 6.82 26.85 0 47.46-20.48 47.46-51.36v-7.2l-32.9 7.14Z"})),ul||(ul=e.createElement("path",{d:"M434.8 188.74h4.54l61.73-164.33.15-.41h35.57v189.35H515.9V55.37h-4.33l-59.7 157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98H336V24h35.57z"}))),gl=e=>{const{size:t="sm",className:l,variant:n="lockup",alt:i="maxio logo"}=e,o="mark"===n,r="number"==typeof t;return a.createElement(vl,{role:"img",viewBox:o?"0 0 240 240":"0 0 1036 240","aria-label":i,height:r?t:void 0,className:x("maxio-logo",!r&&`maxio-logo--${t}`,o&&"maxio-logo--mark",l)})},xl=({state:e,...l})=>{var n,i;const o=t(null),{toastProps:r,contentProps:s,titleProps:c,closeButtonProps:m}=Ae(l,e,o),{closable:d=!0,underline:u=!0,external:p=!1}=l.toast.content,v=x("maxio-toast",{[`maxio-toast--${l.toast.content.sentiment}`]:l.toast.content.sentiment}),g={default:"info-circle-fill",success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[l.toast.content.sentiment||"default"];return a.createElement("div",{className:v,"data-maxio-mode":"dark",...r,ref:o},a.createElement(Ve,{variant:g,className:"maxio-toast__icon"}),a.createElement("div",{className:"maxio-toast__container",...s},a.createElement("div",{className:"maxio-toast__content",...c},l.toast.content.title&&a.createElement("span",{className:"maxio-toast__title"},l.toast.content.title),l.toast.content.message&&a.createElement("span",{className:"maxio-toast__message"},l.toast.content.message),(null===(n=l.toast.content.link)||void 0===n?void 0:n.text)&&(null===(i=l.toast.content.link)||void 0===i?void 0:i.href)&&a.createElement(Ue,{href:l.toast.content.link.href,underline:u,external:p},l.toast.content.link.text))),d&&a.createElement(Qe,{variant:"ghost",icon:a.createElement(Ve,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss",...m}))},bl=({state:e,...t})=>{const l=a.useRef(null),{regionProps:n}=Le(t,e,l);return a.createElement("div",{...n,ref:l,className:t.className,style:{display:"flex",flexDirection:"column",gap:"10px"}},e.visibleToasts.map(t=>a.createElement(xl,{key:t.key,toast:t,state:e})))},hl=({children:e,...t})=>{const{maxVisibleToasts:l=5,...n}=t,i=Oe({maxVisibleToasts:l,...n});return a.useEffect(()=>{console.warn("ToastProvider is deprecated. Please use the global toast API instead.")},[]),a.createElement(a.Fragment,null,e(i),i.visibleToasts.length>0&&a.createElement(bl,{...t,state:i}))},fl=s(null),El=({children:e,toastQueue:t,...l})=>{const n=ze(t),i=p(()=>{n.visibleToasts.forEach(e=>{t.close(e.key)})},[n.visibleToasts,t]),o=u(()=>({addToast:t.add.bind(t),removeToast:t.clear.bind(t),removeAllToasts:i,state:n}),[t,i,n]);return a.createElement(fl.Provider,{value:o},e,n.visibleToasts.length>0&&a.createElement(bl,{...l,state:n}))},_l=()=>{const e=m(fl);if(!e)throw new Error("useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.");return e};class wl extends Be{}const Nl=({defaultChecked:e,checked:t,onChange:l,disabled:n,valueDescription:i,valueDescriptionPosition:o,className:r,name:s,id:m,...d})=>{const u=c(),v="boolean"==typeof e,g=m||u,b="left"===o?"row":"row-reverse",h=i&&o,f=p(e=>{if("Enter"===e.code||"Space"===e.code){e.preventDefault();const a=e.currentTarget.checked;v&&(e.currentTarget.checked=!a),l&&l(!a,e)}},[v,l]),E=d["aria-label"]||(h?void 0:i);return a.createElement("div",{className:x("maxio-toggle",r,{"maxio-toggle--disabled":n}),style:{display:"inline-flex",flexDirection:b},"data-testid":"toggle-container"},h?a.createElement("label",{className:"maxio-toggle__label",htmlFor:g},i):null,a.createElement("div",{className:"maxio-toggle__container"},a.createElement("input",{type:"checkbox",defaultChecked:e,checked:t,onChange:e=>{l&&l(e.target.checked,e)},onKeyDown:f,disabled:n,className:"maxio-toggle__checkbox",id:g,name:s,"aria-label":E}),a.createElement("div",{className:"maxio-toggle__track",role:"switch","aria-checked":t,"aria-hidden":"true"},a.createElement("div",{className:"maxio-toggle__handle"}),a.createElement("span",{className:"maxio-toggle__icon"},a.createElement("i",{className:"maxio-toggle__icon-on"})),a.createElement("span",{className:"maxio-toggle__icon"},a.createElement("i",{className:"maxio-toggle__icon-off"})))))},yl=({basis:e,flex:t,flexDirection:l,wrap:n,grow:i,shrink:o,gap:r,gapX:s,gapY:c,className:m,children:d,alignItems:u,justifyContent:p,...v})=>{const g=x("maxio-flex",{[`maxio-flex-${t}`]:t,[`maxio-basis-${e}`]:void 0!==e,[`maxio-flex-${l}`]:l,[`maxio-flex-${n}`]:n,"maxio-grow":i,"maxio-grow-0":!1===i,"maxio-shrink":o,"maxio-shrink-0":!1===o,[`maxio-gap-${r}`]:void 0!==r,[`maxio-gap-x-${s}`]:void 0!==s,[`maxio-gap-y-${c}`]:void 0!==c,[`maxio-items-${u}`]:u,[`maxio-justify-${p}`]:p},m);return a.createElement("div",{className:g,...v},d)},Il=({children:e,actions:t,sideNavIsClosed:l,openSideNav:n})=>a.createElement("nav",{className:"maxio-top-bar"},l&&a.createElement(Qe,{"aria-label":"Open Side Navigation",variant:"ghost",icon:a.createElement(Ve,{variant:"sidebar"}),onClick:n}),a.createElement(yl,{grow:!0,justifyContent:"end"},e),t),kl=({as:e="div",children:t,size:l="md",className:n,...i})=>{const o=e,r=x(`maxio-display-${l}`,n);return a.createElement(o,{className:r,...i},t)},Rl=({as:e="div",children:t,className:l,...n})=>{const i=e,o=x("maxio-code",l);return a.createElement(i,{className:o,...n},t)},Cl=({as:e="div",children:t,size:l="sm",className:n,...i})=>{const o=e,r=x(`maxio-label-${l}`,n);return a.createElement(o,{className:r,...i},t)},Sl=({...e})=>{const l=t(null),{buttonProps:n}=f(e,l);return a.createElement("button",{...n,className:"maxio-chip__dismiss-button"},a.createElement(Ve,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},Pl=({label:e,onDismiss:l,dismissLabel:n,leadingIcon:i,trailingIcon:o,title:r,...s})=>{const c=t(null),m=V(s),{buttonProps:d}=P(s,m,c),u=x("maxio-chip",{"maxio-chip--selected":null==m?void 0:m.isSelected}),p=x("maxio-chip__button",{"maxio-chip--dismissible":l});return a.createElement("div",{className:u},a.createElement("button",{className:p,ref:c,...d,title:r},i&&a.createElement(Ve,{variant:i,className:"maxio-chip__icon"}),a.createElement("span",{className:"maxio-chip__label"},e),o&&!l&&a.createElement(Ve,{variant:o,className:"maxio-chip__icon"})),l&&a.createElement(Sl,{onPress:l,"aria-label":n}))},$l=({children:e,templateColumns:t,templateRows:l,autoColumns:n,autoRows:i,inline:o,column:r,columnStart:s,columnEnd:c,row:m,rowStart:d,rowEnd:u,gap:p,gapX:v,gapY:g,className:b,justifyContent:h,alignItems:f,...E})=>{const _=x(b,{"maxio-grid":!o,"maxio-inline-grid":o,[`maxio-grid-cols-${t}`]:t,[`maxio-grid-rows-${l}`]:l,[`maxio-auto-cols-${n}`]:n,[`maxio-auto-rows-${i}`]:i,["maxio-col-"+("auto"===r?"auto":`span-${r}`)]:r,[`maxio-col-start-${s}`]:s,[`maxio-col-end-${c}`]:c,["maxio-row-"+("auto"===m?"auto":`span-${m}`)]:m,[`maxio-row-start-${d}`]:d,[`maxio-row-end-${u}`]:u,[`maxio-gap-${p}`]:void 0!==p,[`maxio-gap-x-${v}`]:void 0!==v,[`maxio-gap-y-${g}`]:void 0!==g,[`maxio-justify-${h}`]:h,[`maxio-items-${f}`]:f});return a.createElement("div",{className:_||void 0,...E},e)},Dl={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"},Tl=({children:e,heading:t,description:l,sentiment:n="success",leadingElement:i=null,alert:o,topAddon:r=null,footer:s})=>a.createElement("div",{className:"maxio-auth-layout"},a.createElement(yl,{alignItems:"center",justifyContent:"between"},a.createElement(gl,{size:"md"}),r),o&&a.createElement(Je,{display:"block",title:o.title,sentiment:o.sentiment},o.children),a.createElement(rl,{variant:"secondary"},a.createElement(rl.Body,null,a.createElement(yl,{flexDirection:"col",gap:6},a.createElement(yl,{flexDirection:"col",gap:2},a.createElement(yl,{alignItems:"center",gap:2},i,a.createElement(at,{size:"lg",className:x("maxio-auth-layout__heading",Dl[n])},t)),l&&a.createElement(yl,{style:{color:"var(--maxio-color-text-tertiary)"}},a.createElement(pt,{size:"sm",className:"maxio-auth-layout__description"},l))),e)),s&&a.createElement(rl.Footer,null,s)));export{qe as ActionList,Je as Alert,Tl as AuthLayout,ra as Avatar,sa as Banner,pt as Body,pa as Breadcrumbs,ca as BreadcrumbsItem,Xe as Button,rl as Card,Oa as Checkbox,Aa as CheckboxGroup,Pl as Chip,Rl as Code,Nt as ComboBox,Ja as DataTable,kl as Display,tt as Drawer,yl as Flex,Ba as FormErrorMessage,za as FormHelperText,El as GlobalToastProvider,$l as Grid,at as Heading,Ve as Icon,Qe as IconButton,Cl as Label,Ue as Link,ht as ListBox,Ge as LoadingSpinner,gl as Logo,na as Menu,oa as MenuButton,ia as MenuList,ct as OverlayTrigger,$t as Pagination,Wa as Popover,Dt as ProgressBar,It as Radio,kt as RadioGroup,Ot as SegmentedControl,Pt as Select,Gt as SideNav,Zt as Tab,al as TabList,Jt as TabPanel,el as TabPanels,Qt as Tabs,tl as Tag,Ct as TextArea,Rt as TextField,St as TextInput,sl as Tile,hl as ToastProvider,wl as ToastQueue,Nl as Toggle,mt as Tooltip,ut as TooltipTrigger,Il as TopBar,st as useElementResizeObserver,ot as useHover,it as useOverlayTrigger,_l as useToast,rt as useWindowSize};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=require("classnames"),a=require("react-aria"),l=require("@react-aria/utils"),n=require("@tanstack/react-table"),i=require("@react-stately/toggle"),o=require("@react-stately/checkbox"),r=require("react-aria-components"),s=require("framer-motion"),c=require("@floating-ui/react-dom-interactions"),m=require("@react-stately/radio"),d=require("@react-stately/toast"),u=require("@react-aria/toast");function p(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}var x=p(e);const v=["address-card","arrow-down","arrow-down-left","arrow-down-left-long","arrow-down-long","arrow-down-right","arrow-down-right-long","arrow-down-up","arrow-left","arrow-left-long","arrow-left-right","arrow-right","arrow-right-long","arrow-turn-down-right","arrow-up","arrow-up-left","arrow-up-left-long","arrow-up-long","arrow-up-right","arrow-up-right-long","bank","bar-chart","briefcase","building","business-intelligence","calendar","caret-down","caret-left","caret-right","caret-up","chat","check","check-box","check-box-checked","check-box-checked-fill","check-box-indeterminate-fill","check-circle","check-circle-fill","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle","circle-half-stroke-small","circle-small-dash","circle-small-fill","circle-small-stroke","clipboard","cog","copy-file","credit-card","cross","cross-circle","cross-circle-fill","dashboard","diamond-small-fill","document","document-blank","dollar","dot-circle-fill","dot-fill","error","error-fill","error-small-fill","graph","home","info-circle","info-circle-fill","line-vertical","list","login","logout","megaphone","menu","menu-chevron-left","menu-chevron-right","notification","notification-unread","pen","plus","plus-circle","plus-circle-fill","question-circle","question-circle-fill","recently-viewed","search","square-small-fill","trash","triangle-small-fill","user","warning-circle","warning-circle-fill"],g=["anrok","dropbox","hubspot","numeral","oracle","quotapath","sage","sphere","taxjar"],b=["avalara","pipedrive","quickbooks","salesforce","xero"],f=({variant:a,color:l,className:n,size:i})=>{const o=(e,t)=>t.includes(e),r=o(a,v)||o(a,g),s=o(a,b),c=t({"fa-kit":r,"fa-kit-duotone":s,"fa-sharp fa-regular":!r&&!s,[`fa-${a}`]:!0,[`fa-${i}`]:i,[`maxio-icon--${l}`]:l&&!o(a,g)&&!o(a,b)},n);return e.createElement("i",{className:c})},h=({item:l,isSelected:n,truncateLabel:i=!1,role:o="option",small:r=!1})=>{const s=e.useRef(null),c=e.useRef(!1),m=a.useId();if(e.useEffect(()=>{var e;n&&c.current&&(null===(e=s.current)||void 0===e||e.focus())},[n]),e.useEffect(()=>{c.current=!0},[]),"divider"===l.type)return e.createElement("div",{className:"maxio-action-list__divider",role:"separator","aria-hidden":"true"});const{leadingIconName:d,leadingIconClassName:u,trailingIconName:p,label:x,description:v,link:g}=l,b=t("maxio-action-list__label",{"maxio-truncate":i});return e.createElement("a",{"aria-labelledby":m,...g,className:t("maxio-action-list__content",g.className,{"maxio-action-list__content--size-small":r}),tabIndex:n?0:-1,ref:s,role:o},d&&e.createElement(f,{variant:d,className:t("maxio-action-list__leading-icon",u)}),e.createElement("span",{className:b,id:m},x),v&&e.createElement("span",{className:"maxio-action-list__description"},v),p&&e.createElement(f,{variant:p,className:"maxio-action-list__trailing-icon"}))},E=(e,t,a)=>0===e?e:1===e&&"divider"===t[e-1].type?a||e:"divider"===t[e-1].type?E(e-1,t,a||e):e-1,_=({items:a,isShadowed:l=!0,itemProps:n={},className:i,truncateLabels:o=!1,small:r=!1,...s})=>{const c=t("maxio-action-list",i,{"maxio-action-list--shadow":l}),[m,d]=e.useState(()=>a.findIndex(e=>"divider"!==e.type));return 0===a.length?null:e.createElement("div",{className:c,onKeyDown:e=>{if("Space"===e.code||"Enter"===e.code){const e=a[m];e&&"divider"!==e.type&&window.open(e.link.href,e.link.target||"_self")}"ArrowUp"===e.code&&(e.preventDefault(),d(e=>E(e,a))),"ArrowDown"===e.code&&(e.preventDefault(),d(e=>((e,t)=>{const a=t.findIndex((t,a)=>"divider"!==t.type&&a>e);return-1===a?e:a})(e,a)))},role:"listbox",...s},a.map((t,a)=>e.createElement(h,{item:t,truncateLabel:o,key:`listbox-${t.id}`,isSelected:a===m,small:r,...n})))},N=({className:a,children:l,disabled:n,external:i,icon:o,size:r="sm",underline:s,variant:c,...m})=>{const d=t("maxio-link",{[`maxio-link--${r}`]:r,"maxio-link--disabled":n,[`maxio-link--${c}`]:c,"maxio-link--underline":s},a),u=i?"_blank":"_self";return e.createElement("a",{className:d,target:u,...m},l,o&&e.createElement(f,{variant:o,className:"maxio-link__icon"}))},w=({size:a="md",white:l=!1,className:n})=>{const i=t("maxio-loading-spinner",n,`maxio-loading-spinner--${a}`,{"maxio-loading-spinner--white":l});return e.createElement("div",{className:i,role:"status","aria-label":"loading"})},y=e.forwardRef(({fullWidth:n=!1,leadingElement:i,trailingElement:o,icon:r,variant:s="primary",size:c,...m},d)=>{const u=l.useObjectRef(d),{linkProps:p}=a.useLink({...m},u),x=t("maxio-button",m.className,{[`maxio-button--${c}`]:c,[`maxio-button--${s}`]:s,"maxio-button--full-width":n});return e.createElement("a",{...p,ref:u,className:x,href:m.href},i&&e.cloneElement(i,{...e.isValidElement(i)&&{className:"maxio-button__leading-element"}}),m.children,(o||r)&&e.cloneElement(o||r,{...e.isValidElement(o||r)&&{className:"maxio-button__trailing-element"}}))}),k=e.forwardRef(({disabled:n,loading:i=!1,fullWidth:o=!1,leadingElement:r,trailingElement:s,icon:c,variant:m="primary",size:d,...u},p)=>{const x=l.useObjectRef(p),{buttonProps:v}=a.useButton({...u,isDisabled:n,formAction:"string"==typeof u.formAction?u.formAction:void 0},x),g=["primary","danger"].includes(m),b=t("maxio-button",u.className,{[`maxio-button--${d}`]:d,[`maxio-button--${m}`]:m,"maxio-button--loading":i,"maxio-button--full-width":o});return e.createElement("button",{...v,className:b,ref:x},r&&e.cloneElement(r,{...e.isValidElement(r)&&{className:"maxio-button__leading-element"}}),u.children,!i&&(s||c)&&e.cloneElement(s||c,{...e.isValidElement(s||c)&&{className:"maxio-button__trailing-element"}}),i&&e.createElement(w,{className:"maxio-button__trailing-element",size:"md",white:g}))}),C=e.forwardRef((t,a)=>(e=>"href"in e)(t)?e.createElement(y,{...t,ref:a}):e.createElement(k,{...t,ref:a})),S=({"aria-label":a,className:l,...n})=>e.createElement(C,{"aria-label":a,className:t("maxio-button--icon",l),...n},null),I=({children:a,title:l,linkText:n,linkExternal:i,href:o,display:r="inline",sentiment:s="info",onDismiss:c,className:m})=>{if(!a&&!l)return console.warn("Alert component requires either children or title prop to be rendered"),null;const d=t("maxio-alert",{[`maxio-alert--${s}`]:"info"!==s&&s},m),u={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[s],p=t("maxio-alert__content",{"maxio-alert__content--block":"block"===r});return e.createElement("div",{className:d},e.createElement(f,{variant:u,className:"maxio-alert__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-alert__container"},e.createElement("div",{className:p},l&&e.createElement("span",{className:"maxio-alert__title"},l),a&&e.createElement("span",{className:"maxio-alert__message"},a),n&&o&&e.createElement(N,{className:"maxio-alert__link",href:o,variant:"high-contrast",underline:!0,...i?{external:!0}:{}},n))),c&&e.createElement(S,{icon:e.createElement(f,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:c,className:"maxio-alert__dismiss"}))},P=e.createContext({}),T=({children:t})=>{const[a,l]=e.useState(!1),n=e.useId(),i=e.useId();return e.createElement(P.Provider,{value:{controlsId:n,buttonId:i,isOpen:a,onClose:()=>l(!1),onOpen:()=>l(!0),onToggle:()=>l(e=>!e)}},t)};function R(){const t=e.useContext(P);if(!t||"object"==typeof t&&0===Object.keys(t).length)throw new Error("useMenu hook must be used within a MenuProvider");return t}const D=({children:t})=>{const{isOpen:a,onToggle:l,onClose:n}=R();return e.createElement("details",{open:a,onToggle:l,className:"maxio-action-menu"},"function"==typeof t?t({isOpen:a,onClose:n}):t)},$=({children:a,className:l,href:n,...i})=>{const o=n?e.createElement(N,{size:"sm",href:n},a):a;return e.createElement("li",{className:t("maxio-breadcrumbs__item",l),...i},o)},O="Breadcrumbs requires at least one BreadcrumbsItem as children",z='Last BreadcrumbsItem should not have "href" prop. It is the current page.',B="Breadcrumbs only accepts BreadcrumbsItem as children",M="row-controls",L="row-actions",A=({children:a,pattern:l,size:n,isExpandable:i,isUsingCustomRow:o})=>{const[r,s]=e.useState(!1),[c,m]=e.useState(!1),d=l&&o&&i,u=t("maxio-data-table",{"maxio-data-table--pattern":l&&!d,"maxio-data-table--expanded-child-pattern":d,"maxio-data-table--with-custom-row":o,[`maxio-data-table--${n}`]:n,"maxio-data-table--with-pinned-left-border":r,"maxio-data-table--with-pinned-right-border":c});return e.createElement("div",{className:"maxio-data-table-wrapper",onScroll:e=>{const t=e.target;s(t.scrollLeft>0),m(t.scrollWidth-t.clientWidth-t.scrollLeft>0)}},e.createElement("table",{className:u},a))},F=({children:t})=>e.createElement("thead",null,t),W=({children:t})=>e.createElement("tbody",null,t),H=({children:a,table:l,header:n,className:i,enableExpanding:o,...r})=>{var s,c,m,d,u,p,x,v,g,b,h;const E=null==n?void 0:n.column,_=null===(s=null==E?void 0:E.getCanSort)||void 0===s?void 0:s.call(E),N=null===(c=null==E?void 0:E.getToggleSortingHandler)||void 0===c?void 0:c.call(E),w=null==n?void 0:n.isPlaceholder,y=null===(d=null===(m=null==E?void 0:E.columnDef)||void 0===m?void 0:m.meta)||void 0===d?void 0:d.align,k=null===(p=null===(u=null==E?void 0:E.columnDef)||void 0===u?void 0:u.meta)||void 0===p?void 0:p.width,C=null===(v=null===(x=null==E?void 0:E.columnDef)||void 0===x?void 0:x.meta)||void 0===v?void 0:v.controls,I=null===(b=null===(g=null==E?void 0:E.columnDef)||void 0===g?void 0:g.meta)||void 0===b?void 0:b.actions,P=null==E?void 0:E.getIsPinned(),T=null==E?void 0:E.getIsSorted(),R="asc"===T,D=t("maxio-data-table__cell",i,{[`maxio-data-table__cell--pinned-${P}`]:P,"maxio-data-table__cell--sortable":_,"maxio-data-table__cell--active":T,[`maxio-data-table__cell--${y}`]:y,"maxio-data-table__cell--controls":C,"maxio-data-table__cell--actions":I}),$={...k?{width:k}:{},..."left"===P?{left:null==E?void 0:E.getStart("left")}:"right"===P?{right:null==E?void 0:E.getAfter("right")}:{}},O=((e,t)=>e&&t?"arrow-up":e&&!t?"arrow-down":"arrow-down-up")(!!T,R),z=null==l?void 0:l.getToggleAllRowsExpandedHandler(),B=null===(h=null==l?void 0:l.getIsAllRowsExpanded)||void 0===h?void 0:h.call(l),L=(null==n?void 0:n.headerGroup.headers[0].id)===M?1:0,A=o&&(null==n?void 0:n.index)===L;return w?null:e.createElement("th",{scope:"col",role:"columnheader","aria-sort":T?R?"ascending":"descending":"none",className:D,onClick:N,colSpan:null==n?void 0:n.colSpan,style:$,...r},e.createElement("div",{className:"maxio-data-table__cell-flex"},!0===o&&A&&e.createElement(S,{size:"sm",variant:"ghost",icon:e.createElement(f,{size:"xs",variant:B?"chevron-down":"chevron-right"}),onClick:z,"aria-label":B?"Collapse all rows":"Expand all rows","data-open":B,className:"maxio-data-table__expand-button"}),a,_&&e.createElement(f,{variant:O,className:"maxio-data-table__sort-icon"})))},V=({children:l,row:n,isChild:i,isHeader:o,className:r,onRowAction:s,...c})=>{var m,d,u;const p=null===(m=null==n?void 0:n.getIsSelected)||void 0===m?void 0:m.call(n),x=(null===(d=null==n?void 0:n.getCanExpand)||void 0===d?void 0:d.call(n))&&(null===(u=null==n?void 0:n.getIsExpanded)||void 0===u?void 0:u.call(n)),v=Boolean(n&&s&&!o&&!i),g=e.useRef(null),b=e=>{g.current=e.target},{pressProps:f}=a.usePress({isDisabled:!v,onPress:e=>{var t;const a=null!==(t=g.current)&&void 0!==t?t:e.target;g.current=null,n&&s&&!(e=>e instanceof Element&&Boolean(e.closest("a,button,input,select,textarea,label,.maxio-data-table__cell--controls,.maxio-data-table__cell--actions")))(a)&&s(n)}}),{focusProps:h,isFocused:E}=a.useFocusRing(),_=t({"maxio-data-table__row":!o,"maxio-data-table__header-row":o,"maxio-data-table__row--active":p||E,"maxio-data-table__row--expanded":x,"maxio-data-table__row--expanded-child":i,"maxio-data-table__row--actionable":v},r),N=v?a.mergeProps({onClickCapture:b,onKeyDownCapture:b,tabIndex:0},f,h,c):c;return e.createElement("tr",{...N,className:_,tabIndex:v?N.tabIndex:c.tabIndex},l)},j=e.createContext({}),q=e.forwardRef(({checked:a,disabled:l,invalid:n,indeterminate:i,className:o,inputProps:r,error:s,label:c},m)=>{const d=t("maxio-checkbox",{"maxio-checkbox--checked":a,"maxio-checkbox--disabled":l,"maxio-checkbox--error":n,"maxio-checkbox--indeterminate":i},o);return e.createElement("label",{className:d},e.createElement("input",{type:"checkbox",role:"checkbox",className:"maxio-checkbox__input",ref:m,...r}),e.createElement("span",{className:"maxio-checkbox__control"},s&&e.createElement("span",{className:"maxio-checkbox__control-error"})),c&&e.createElement("span",{className:"maxio-checkbox__label"},c))});q.displayName="InnerCheckbox";const G=({label:t,error:l=!1,className:n,indeterminate:o,value:r="",disabled:s,readOnly:c,defaultChecked:m,checked:d,...u})=>{const p=e.useRef(null),x=e.useContext(j),{inputProps:v,isDisabled:g,isInvalid:b,isSelected:f}=x&&Object.keys(x).length>0?a.useCheckboxGroupItem({value:r,"aria-label":null!=t?t:u["aria-label"],isDisabled:s,isInvalid:l,isIndeterminate:o,isReadOnly:c,...u},x,p):a.useCheckbox({"aria-label":null!=t?t:u["aria-label"],isDisabled:s,isInvalid:l,isIndeterminate:o,isReadOnly:c,value:r,...u},i.useToggleState({...u,isSelected:d,defaultSelected:m}),p);return e.createElement(q,{inputProps:v,checked:f,disabled:g,invalid:b,indeterminate:o,className:n,error:l,label:t,ref:p,...u})},K=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-form-helper-text",l),...n},a),U=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-form-error",l),...n},e.createElement(f,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},a)),Z=({table:t})=>{var a,l,n,i;const o=null===(a=null==t?void 0:t.getToggleAllPageRowsSelectedHandler)||void 0===a?void 0:a.call(t),r=(null===(l=null==t?void 0:t.getIsAllPageRowsSelected)||void 0===l?void 0:l.call(t))||(null===(n=null==t?void 0:t.getIsAllRowsSelected)||void 0===n?void 0:n.call(t)),s=null===(i=null==t?void 0:t.getIsSomePageRowsSelected)||void 0===i?void 0:i.call(t);return e.createElement(G,{"aria-label":"Select all rows",onChange:e=>{o("boolean"==typeof e?{target:{checked:e}}:e)},checked:r,indeterminate:!r&&s})},Y=({row:t})=>{var a,l,n,i;const o=null===(a=null==t?void 0:t.getToggleSelectedHandler)||void 0===a?void 0:a.call(t),r=(null===(l=null==t?void 0:t.getIsSelected)||void 0===l?void 0:l.call(t))||(null===(n=null==t?void 0:t.getIsAllSubRowsSelected)||void 0===n?void 0:n.call(t)),s=null===(i=null==t?void 0:t.getIsSomeSelected)||void 0===i?void 0:i.call(t),c=t.id||t.index;return e.createElement(G,{"aria-label":`Select row ${c}`,onChange:o,checked:r,indeterminate:s})},Q=({children:t})=>e.createElement("div",{className:"maxio-data-table__cell-flex"},t),X=({row:a,cell:l,children:n,className:i,...o})=>{var r,s,c,m,d,u;const p=null==l?void 0:l.column,x=null===(s=null===(r=null==p?void 0:p.columnDef)||void 0===r?void 0:r.meta)||void 0===s?void 0:s.align,v=null===(m=null===(c=null==p?void 0:p.columnDef)||void 0===c?void 0:c.meta)||void 0===m?void 0:m.controls,g=null===(u=null===(d=null==p?void 0:p.columnDef)||void 0===d?void 0:d.meta)||void 0===u?void 0:u.actions,b=null==p?void 0:p.getIsPinned(),f=t("maxio-data-table__cell",i,{[`maxio-data-table__cell--pinned-${b}`]:b,[`maxio-data-table__cell--${x}`]:x,"maxio-data-table__cell--controls":v,"maxio-data-table__cell--actions":g}),h="left"===b?{left:null==p?void 0:p.getStart("left")}:"right"===b?{right:null==p?void 0:p.getAfter("right")}:{};return e.createElement("td",{className:f,style:h,...o},n)},J=({row:t,SubRowComponent:a,pattern:l,enableExpanding:i,onRowAction:o})=>{var r,s,c,m,d;const u=a&&t.getParentRow()&&t.getParentRow().getIsExpanded(),p=u&&t.getVisibleCells()[0].column.columnDef.id===M,x=u&&t.getVisibleCells()[t.getVisibleCells().length-1].column.columnDef.id===L,v=[x,p].filter(Boolean).length,g=t.getVisibleCells().length-v,b=null!==(s=null===(r=t.getParentRow())||void 0===r?void 0:r.index)&&void 0!==s?s:t.index,h=l&&a&&b%2==1?"maxio-data-table__row--with-pattern":void 0,E=null===(c=t.getCanExpand)||void 0===c?void 0:c.call(t),_=null===(m=null==t?void 0:t.getToggleExpandedHandler)||void 0===m?void 0:m.call(t),N=null===(d=null==t?void 0:t.getIsExpanded)||void 0===d?void 0:d.call(t),w=E&&i?0:1.75,y=t.getVisibleCells()[0].column.columnDef.id===M?1:0,k=t.getVisibleCells().find(({column:e})=>{var t;const{actions:a,controls:l}=null!==(t=e.columnDef.meta)&&void 0!==t?t:{};return!a&&!l}),C=o&&k?k.id:void 0;return e.createElement(e.Fragment,{key:t.id},u?e.createElement(V,{key:`${t.id}-sub`,row:t,isChild:!0,className:h},p&&e.createElement(X,{className:"maxio-data-table__cell--pinned-left"}),e.createElement(X,{colSpan:g},a(t)),x&&e.createElement(X,{className:"maxio-data-table__cell--pinned-right"})):e.createElement(V,{key:`${t.id}-parent`,row:t,className:h,onRowAction:o,"aria-labelledby":C},t.getVisibleCells().map(a=>{const l=i&&a.column.getIndex()===y;return e.createElement(X,{key:a.id,row:t,cell:a,id:a.id},e.createElement("div",{className:"maxio-data-table__cell-flex",style:i&&l?{paddingLeft:`${(null==t?void 0:t.depth)+w}rem`}:void 0},i&&E&&l&&e.createElement(S,{size:"sm",variant:"ghost",icon:e.createElement(f,{size:"xs",variant:N?"chevron-down":"chevron-right"}),onClick:_,"aria-label":N?"Collapse row":"Expand row","data-open":N,className:"maxio-data-table__expand-button"}),n.flexRender(a.column.columnDef.cell,a.getContext())))})))},ee=(e=[])=>e.filter(e=>e!==M&&e!==L),te={sm:"h3",md:"h2",lg:"h1"},ae=({children:a,size:l="sm",className:n,...i})=>{const o=te[l],r=t(`maxio-heading-${l}`,n);return e.createElement(o,{className:r,...i},a)},le={click:c.useClick,hover:e=>c.useHover(e,{delay:100}),focus:c.useFocus,dismiss:c.useDismiss},ne=(e,t)=>t.map(t=>le[t](e)),ie=({placement:t="top",isActive:a=!1,interactions:l=["hover"],floatingElementOffset:n=0,onOverlayUpdate:i,autoHideMs:o})=>{const r=e.useRef(null),{strategy:s,x:m,y:d,context:u,floating:p,reference:x}=c.useFloating({placement:t,open:a,onOpenChange:e=>i(e),middleware:[c.offset(n)]}),{getReferenceProps:v,getFloatingProps:g}=c.useInteractions([...ne(u,l),c.useRole(u,{role:"tooltip"})]);e.useEffect(()=>{r.current&&clearTimeout(r.current),a&&o&&(r.current=window.setTimeout(()=>i(!1),o))},[a,o]);return{isActive:a,refs:{floating:p,reference:x},floatingElementCSSPosition:{position:s,top:null!=d?d:0,left:null!=m?m:0},getReferenceProps:v,getFloatingProps:g}};function oe(t,a=0){const l=e.useRef((new Date).getTime()),n=e.useRef((new Date).getTime()),[i,o]=e.useState(!1);return e.useEffect(()=>{const e=()=>{l.current=(new Date).getTime(),o(!0)},i=()=>{n.current=(new Date).getTime(),window.setTimeout(()=>{l.current-n.current<=0&&o(!1)},a)},r=t&&t.current;return r&&(r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",i)),()=>{r&&(r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",i))}},[t]),i}function re(t=500){const[a,l]=e.useState(()=>{if("undefined"==typeof window)return{windowWitdh:0,windowHeight:0};const{innerWidth:e,innerHeight:t}=window;return{windowWitdh:e,windowHeight:t}}),n=e.useRef(null);return e.useEffect(()=>{if("undefined"==typeof window)return;const e=()=>{var e;const{innerWidth:a,innerHeight:i}=window;window.clearTimeout(null!==(e=n.current)&&void 0!==e?e:void 0),n.current=window.setTimeout(()=>{l({windowWitdh:a,windowHeight:i})},t)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[t]),a}function se(t){const[a,n]=e.useState(()=>{var e,a;return null!==(a=null===(e=t.current)||void 0===e?void 0:e.clientWidth)&&void 0!==a?a:0}),i=()=>{var e,a;const l=null!==(a=null===(e=t.current)||void 0===e?void 0:e.clientWidth)&&void 0!==a?a:0;n(e=>0===l&&e>0?e:l)};return e.useLayoutEffect(i,[t]),l.useResizeObserver({ref:t,onResize:i}),a}const ce=({children:a,usePortal:l=!1,isActive:n=!1,placement:i="top",interactions:o=["hover"],role:r="tooltip",renderOverlay:m,floatingElementOffset:d,motionSettings:u={},autoHideMs:p,onOverlayUpdate:x,className:v})=>{const{getReferenceProps:g,getFloatingProps:b,refs:{floating:f,reference:h},floatingElementCSSPosition:E}=ie({isActive:n,onOverlayUpdate:x,autoHideMs:p,floatingElementOffset:d,interactions:o,placement:i}),_=e.createElement(s.AnimatePresence,null,n&&e.createElement(s.motion.div,{ref:f,style:E,...u,...b()},m()));return e.createElement(e.Fragment,null,e.createElement("div",{ref:h,className:t("maxio-inline-flex",v),...g(),"data-testid":"overlay-trigger"},a),l?e.createElement(c.FloatingPortal,{id:"maxio-ui-portal"},_):_)},me=({children:a,arrowPosition:l,size:n="regular",maxWidth:i=160})=>e.createElement("div",{"data-testid":"tooltip",className:t("maxio-tooltip",`maxio-tooltip--${n}`,{[`maxio-tooltip--arrow-${l}`]:l})},e.createElement("div",{className:"maxio-tooltip__content",style:{maxWidth:i}},a)),de={top:"bottom",right:"left",bottom:"top",left:"right","top-start":"bottom-left","top-end":"bottom-right","right-start":"left-top","right-end":"left-bottom","bottom-start":"top-left","bottom-end":"top-right","left-start":"right-top","left-end":"right-bottom"},ue=({children:t,interactions:a=["hover"],placement:l="right",maxWidth:n=160,size:i="regular",renderContent:o,autoHideMs:r,isVisible:s,usePortal:c,className:m,onVisibilityUpdate:d,floatingElementOffset:u=5})=>{const[p,x]=e.useState(!1),v=void 0!==s,g=e.useRef(null),b=e.useCallback(e=>{g.current&&clearTimeout(g.current),g.current=window.setTimeout(()=>{v||x(e),d&&d(e)},50)},[v,d]),f=e.useMemo(()=>(e=>{const t=e.startsWith("top")||e.startsWith("bottom")?"Y":"X",a=`translate${t}(${e.startsWith("bottom")||e.startsWith("right")?"-":""}10px)`;return{initial:{opacity:0,visibility:"hidden",transform:a},animate:{opacity:1,visibility:"visible",transform:`translate${t}(0px)`},exit:{opacity:0,visibility:"hidden",transform:a},transition:{ease:[.4,0,.5,1],duration:.2}}})(l),[l]);return e.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),e.createElement(ce,{role:"tooltip",className:m,floatingElementOffset:u,motionSettings:f,isActive:v?s:p,onOverlayUpdate:b,autoHideMs:r,usePortal:c,placement:l,interactions:a,renderOverlay:()=>e.createElement(me,{size:i,arrowPosition:de[l],maxWidth:n},o())},t)},pe=({as:a="div",children:l,compact:n=!1,size:i="md",className:o,...r})=>{const s=a,c=t({[`maxio-body-${i}`]:!n,[`maxio-body-${i}-compact`]:n},o);return e.createElement(s,{className:c,...r},l)},xe=({className:a,...l})=>e.createElement(r.ListBox,{...l,className:t("maxio-listbox",a)});xe.displayName="ListBox";const ve=({className:a,...l})=>{const n=l.textValue||("string"==typeof l.children?l.children:void 0);return e.createElement(r.ListBoxItem,{...l,textValue:n,className:t("maxio-listbox__item",a)},r.composeRenderProps(l.children,(t,{isSelected:a})=>e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-listbox__content"},"string"==typeof t?e.createElement(pe,{size:"sm"},t):t),a&&e.createElement(f,{variant:"check"}))))};ve.displayName="ListBox.Item";const ge=({className:a,...l})=>e.createElement(r.ListBoxSection,{...l,className:t("maxio-listbox__section",a)});ge.displayName="ListBox.Section";const be=({className:a,...l})=>e.createElement(r.Header,{...l,className:t("maxio-listbox__header",a)});be.displayName="ListBox.Header";const fe=Object.assign(xe,{Item:ve,Section:ge,Header:be}),he=({className:a,hideArrow:l=!1,children:n,offset:i=4,...o})=>e.createElement(r.Popover,{...o,className:t("maxio-popover",a),offset:i},e.createElement(e.Fragment,null,!l&&e.createElement(r.OverlayArrow,{className:"maxio-popover__arrow"},e.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12","aria-hidden":!0},e.createElement("path",{d:"M0 0 L6 6 L12 0"}))),n)),Ee=({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:o,description:s,errorMessage:c,leadingElement:m=null,fullWidth:d,className:u,placeholder:p,renderEmptyState:x,selectionMode:v,children:g,...b})=>{const h=e.useRef(null),E=e.useRef(null),[_,N]=e.useState(),[w,y]=e.useState(0),k=!!c,C=l||k,S=g,I=e.useCallback(()=>{const e=h.current;if(!e)return;const t=E.current,a=t?t.getBoundingClientRect().left-e.getBoundingClientRect().left:0;y(e=>e===-a?e:-a),N(t=>{const a=`${e.offsetWidth}px`;return(null==t?void 0:t["--trigger-width"])===a?t:{"--trigger-width":a}})},[]);e.useEffect(()=>{const e=h.current;if(!e)return;if(I(),"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(I);return t.observe(e),()=>t.disconnect()},[I]);const P=t("maxio-text-field",`maxio-text-field--${i}`,{"maxio-text-field--disabled":a,"maxio-text-field--error":C,"maxio-text-field--readonly":n,"maxio-text-field--full-width":d},u);return e.createElement(r.ComboBox,{...b,isDisabled:a,isInvalid:C,isReadOnly:n,selectionMode:v,className:P},o&&e.createElement(r.Label,{className:"maxio-text-field__label"},o),e.createElement("div",{ref:h,className:"maxio-text-field__items"},m&&e.createElement("div",{className:"maxio-text-field__leading-element"},m),e.createElement(r.Input,{ref:E,className:"maxio-text-field__input",placeholder:p}),e.createElement("div",{className:"maxio-text-field__trailing-element"},e.createElement(r.Button,{className:t("maxio-button","maxio-button--ghost","maxio-button--icon","maxio-button--sm")},e.createElement(f,{variant:"chevron-up-down"})))),s&&!k&&e.createElement(r.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},s),c&&e.createElement(r.FieldError,{className:"maxio-form-error"},t=>e.createElement(e.Fragment,null,e.createElement(f,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},"function"==typeof c?c(t):c))),e.createElement(he,{hideArrow:!0,className:"maxio-combobox__popover",crossOffset:w,style:_},e.createElement(fe,{renderEmptyState:x},S)))};Ee.displayName="ComboBox";const _e=t=>e.createElement(fe.Item,{...t});_e.displayName="ComboBox.Item";const Ne=t=>e.createElement(fe.Section,{...t});Ne.displayName="ComboBox.Section";const we=t=>e.createElement(fe.Header,{...t});we.displayName="ComboBox.Header";const ye=Object.assign(Ee,{Item:_e,Section:Ne,Header:we}),ke=e.createContext({}),Ce=e.forwardRef(({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:o,description:s,errorMessage:c,leadingElement:m=null,trailingElement:d=null,fullWidth:u,className:p,...x},v)=>{const g=t("maxio-text-field",`maxio-text-field--${i}`,{"maxio-text-field--disabled":a,"maxio-text-field--error":l,"maxio-text-field--readonly":n,"maxio-text-field--full-width":u},p);return e.createElement(r.TextField,{...x,isDisabled:a,isReadOnly:n,isInvalid:l,className:g},o&&e.createElement(r.Label,{className:"maxio-text-field__label"},o),e.createElement("div",{className:"maxio-text-field__items"},m&&e.createElement("div",{className:"maxio-text-field__leading-element"},m),e.createElement(r.Input,{ref:v,className:"maxio-text-field__input"}),d&&e.createElement("div",{className:"maxio-text-field__trailing-element"},d)),s&&!(l&&c)&&e.createElement(r.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},s),c&&e.createElement(r.FieldError,{className:"maxio-form-error"},e.createElement(f,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},c)))});Ce.displayName="TextField";const Se=e.forwardRef(({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:o,description:s,errorMessage:c,fullWidth:m,className:d,...u},p)=>{const x=t("maxio-text-area",`maxio-text-area--${i}`,{"maxio-text-area--disabled":a,"maxio-text-area--error":l,"maxio-text-area--readonly":n,"maxio-text-area--full-width":m},d);return e.createElement(r.TextField,{...u,isDisabled:a,isReadOnly:n,isInvalid:l,className:x},o&&e.createElement(r.Label,{className:"maxio-form-label"},o),e.createElement(r.TextArea,{ref:p,className:"maxio-text-area__input"}),s&&!(l&&c)&&e.createElement(r.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},s),c&&e.createElement(r.FieldError,{className:"maxio-form-error"},e.createElement(f,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},c)))});Se.displayName="TextArea";const Ie=e.forwardRef(({disabled:l=!1,invalid:n=!1,readOnly:i=!1,size:o="md",label:r,helperText:s,showErrorMessage:c=!0,errorMessage:m,leadingElement:d=null,trailingElement:u=null,fullWidth:p,className:x,...v},g)=>{var b,f;const h=e.useRef(null);e.useImperativeHandle(g,()=>h.current),e.useEffect(()=>{console.warn("TextInput is deprecated. Please use TextField instead.")},[]);const{spellCheck:E,..._}=v,N={..._,label:r,description:s,errorMessage:m,defaultValue:null===(b=v.defaultValue)||void 0===b?void 0:b.toString(),value:null===(f=v.value)||void 0===f?void 0:f.toString(),isDisabled:l,isReadOnly:i,isInvalid:n},{labelProps:w,inputProps:y,descriptionProps:k,errorMessageProps:C}=a.useTextField(N,h),S=t("maxio-text-field",`maxio-text-field--${o}`,{"maxio-text-field--disabled":l,"maxio-text-field--error":n,"maxio-text-field--readonly":i,"maxio-text-field--full-width":p},x),I=n&&m&&c;return e.createElement("div",{className:S},r&&e.createElement("label",{className:"maxio-text-field__label",...w},r),e.createElement("div",{className:"maxio-text-field__items"},d&&e.createElement("div",{className:"maxio-text-field__leading-element"},d),e.createElement("input",{ref:h,type:"text",className:"maxio-text-field__input",...y,spellCheck:E}),u&&e.createElement("div",{className:"maxio-text-field__trailing-element"},u)),s&&!I&&e.createElement("div",{className:"maxio-form-helper-text",...k},s),I&&e.createElement(U,{...C},m))});Ie.displayName="TextInput";const Pe=({options:l,label:n,size:i="md",inline:o=!1,disabled:r=!1,helperText:s,errorMessage:c,fullWidth:m=!1,...d})=>{const u=t("maxio-select",`maxio-select--${i}`,{"maxio-select--disabled":r,"maxio-select--inline":o,"maxio-select--error":!!c,"maxio-select--full-width":m}),p=a.useId();return e.createElement("div",{className:u},n&&e.createElement("label",{htmlFor:p,className:"maxio-select__label"},n),e.createElement("div",{className:"maxio-select__input-container"},e.createElement("select",{id:p,className:"maxio-select__input",disabled:r,...d},l.map(t=>e.createElement("option",{key:`option-${t.value}`,value:t.value,disabled:t.disabled},t.label))),e.createElement(f,{variant:"chevron-up-down"})),!!c&&e.createElement(U,null,c),s&&!c&&e.createElement("div",{className:"maxio-form-helper-text"},s))},Te=({className:a,size:l="md",fullWidth:n=!1,selectionMode:i="single",orientation:o="horizontal",disallowEmptySelection:s=!0,...c})=>e.createElement(r.ToggleButtonGroup,{...c,selectionMode:i,orientation:o,disallowEmptySelection:s,className:r.composeRenderProps(a,e=>t("maxio-segmented-control",`maxio-segmented-control--${l}`,{"maxio-segmented-control--full-width":n},e))});Te.displayName="SegmentedControl";const Re=({className:a,children:l,...n})=>e.createElement(r.ToggleButton,{...n,className:r.composeRenderProps(a,e=>t("maxio-segmented-control__item",e))},r.composeRenderProps(l,t=>e.createElement(e.Fragment,null,e.createElement(r.SelectionIndicator,{className:"maxio-segmented-control__selection-indicator","data-selected":!0}),t)));Re.displayName="SegmentedControl.Item";const De=Object.assign(Te,{Item:Re}),$e=({leadingIcon:t,trailingIcon:a,type:l="menu",children:n,leadingIconClassName:i,isTooltipVisible:o=!1})=>e.createElement(e.Fragment,null,t&&e.createElement(ue,{usePortal:!0,isVisible:o,renderContent:()=>n,floatingElementOffset:12},e.createElement("span",{className:"maxio-side-nav__icon"},e.createElement(f,{variant:t,className:i}))),e.createElement("span",{className:`maxio-side-nav__${l}-title`,"data-testid":"maxio-sidebar-section-name"},n),a&&e.createElement("span",{className:"maxio-side-nav__menu-chevron"},e.createElement(f,{variant:a}))),Oe=e=>"heading"!==e.type,ze=e=>{const t=(e=>e.flat().filter(Oe).map(e=>e.items).flat().find(e=>null==e?void 0:e.isCurrent))(e);return t?e.map(e=>e.map(e=>{var a;return Oe(e)&&(null===(a=e.items)||void 0===a?void 0:a.includes(t))?{...e,isOpen:!0}:e})):e},Be=e.createContext({}),Me=()=>e.useContext(Be),Le=({children:t,isOpen:a,onChange:l,withIcons:n=!0,sections:i,shouldToggleSidebar:o=!0,topDropdownItems:r,collapseBreakpoint:s=800})=>{const c=e.useRef(!1),[m,d]=e.useState(()=>!o||("boolean"==typeof a?a:"undefined"==typeof window||window.innerWidth>s)),[u,p]=e.useState(()=>ze(i)),{windowWitdh:x}=re(200);e.useEffect(()=>{c.current&&(null==l||l(m))},[m,l]),e.useEffect(()=>{c.current=!0},[]),e.useEffect(()=>{!function(e){if(!o)return;e<s&&m&&v()}(x)},[x]),e.useEffect(()=>{"boolean"==typeof a&&d(a)},[a]);const v=()=>{d(!1)};return e.createElement(Be.Provider,{value:{sections:u,topDropdownItems:r,onSectionOpen:e=>{p(t=>t.map(t=>t.map(t=>Oe(t)?{...t,isOpen:(null==t?void 0:t.name)===e&&!t.isOpen}:t)))},isOpen:m,onOpen:()=>{d(!0)},onClose:v,withIcons:n,shouldToggleSidebar:o}},t)},Ae=()=>{const{onOpen:t,topDropdownItems:a,isOpen:l}=Me(),{mainItem:n,otherItems:i,actions:o}=a,r=e.useRef(null),s=oe(r),c=({id:e,title:t,icon:a,iconClass:l,url:n,...i})=>({id:e,label:t,leadingIconName:a,leadingIconClassName:l,link:{href:n,...i}}),{items:m,itemsCount:d}=e.useMemo(()=>({itemsCount:i.length+o.length,items:[...i.map(c),(null==i?void 0:i.length)>0&&(null==o?void 0:o.length)>0?{type:"divider",id:"item-divider"}:null,...o.map(c)].filter(e=>null!=e)}),[o,i]);return e.createElement(e.Fragment,null,0===d?e.createElement("a",{className:"maxio-side-nav__menu-button maxio-side-nav__menu-button--large",href:n.url,onClick:t},e.createElement("span",{className:"maxio-side-nav__menu-title"},n.title)):e.createElement("details",{className:"maxio-action-menu maxio-side-nav--action-menu"},e.createElement("summary",{onClick:t,className:"maxio-side-nav__menu-button","aria-haspopup":"true",ref:r},n.url?e.createElement(e.Fragment,null,e.createElement($e,{type:"menu",isTooltipVisible:!l&&s,leadingIcon:n.icon,trailingIcon:"chevron-up-down",leadingIconClassName:n.iconClass},n.title)):e.createElement($e,{type:"menu",trailingIcon:"chevron-up-down"},n.title)),e.createElement(_,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:m,small:!0})))},Fe=({section:t})=>{const{isOpen:a,withIcons:l}=Me(),n=e.useRef(null),i=oe(n);return e.createElement("li",{className:"maxio-side-nav__item","data-key":t.key,"data-testid":"maxio-sidebar-section"},e.createElement("a",{className:"maxio-side-nav__link","aria-current":t.isCurrent?"page":void 0,role:"button",href:t.href,ref:n},e.createElement($e,{isTooltipVisible:i&&!a,type:"menu",leadingIcon:l?t.icon:void 0},t.name)))},We=({section:a})=>{var l,n;const{onOpen:i,onSectionOpen:o,isOpen:r,withIcons:s}=Me(),c=e.useRef(null),m=oe(c);if(!Oe(a))return e.createElement("li",{className:"maxio-side-nav__item-header"},a.title);return a.Component?e.createElement(a.Component,{section:a}):a.href?e.createElement(Fe,{section:a}):e.createElement("li",{className:t("maxio-side-nav__item",{"maxio-side-nav__item--icon":s}),"data-testid":"maxio-sidebar-section"},e.createElement("button",{className:"maxio-side-nav__menu-button",ref:c,"aria-expanded":a.isOpen?"true":"false",type:"button",onClick:()=>{o(a.name),i()}},e.createElement($e,{type:"menu",isTooltipVisible:!r&&m,leadingIcon:s?a.icon:void 0,trailingIcon:(null===(l=a.items)||void 0===l?void 0:l.length)?"chevron-down":void 0},a.name)),e.createElement("ul",{className:"maxio-side-nav__menu"},null===(n=a.items)||void 0===n?void 0:n.map(t=>e.createElement("li",{key:`section-sub-item-${t.name}`,className:"maxio-side-nav__item","data-testid":"maxio-section-item"},e.createElement("a",{className:"maxio-side-nav__link",href:t.href,"aria-current":t.isCurrent?"page":void 0},e.createElement("span",{className:"maxio-side-nav__link-title"},t.name))))))},He=()=>{const{sections:t}=Me();return e.createElement(e.Fragment,null,t.map((t,a)=>e.createElement("ul",{role:"list",className:"maxio-side-nav__items",key:`section-list-${a}`},t.map((t,l)=>e.createElement(We,{key:`section-list-item-${t.type}-${a}-${l}`,section:t})))))},Ve=()=>{const{onClose:t,shouldToggleSidebar:a}=Me();return e.createElement("div",{className:"maxio-side-nav__logo-container"},e.createElement("a",{className:"maxio-side-nav__brand",href:"/","aria-label":"Maxio"}),a&&e.createElement("button",{className:"maxio-side-nav__menu-toggle","aria-label":"toggle sidebar",onClick:t},e.createElement(f,{variant:"sidebar"})))},je=()=>{const{isOpen:a}=Me();return e.createElement("nav",{className:t("maxio-side-nav",{"maxio-side-nav--collapsed":!a})},e.createElement(Ve,null),e.createElement(Ae,null),e.createElement("div",{className:"maxio-side-nav__items-container"},e.createElement(He,null)))},qe=({disabled:a=!1,value:l=0,className:n,id:i,isCurrent:o,...s})=>{const c="icon"===s.type,m=({isSelected:e})=>t("maxio-tabs__tab",n,{"maxio-tabs__tab--active":e,"maxio-tabs__tab--disabled":a,"maxio-tabs__tab--icon":c});if("icon"===s.type){const{icon:t,...n}=s;return e.createElement(r.Tab,{id:l,isDisabled:a,...n,className:m},e.createElement("div",{className:"maxio-tabs__tab__content"},t))}const{children:d,rightIcon:u,...p}=s;return e.createElement(r.Tab,{id:l,isDisabled:a,...p,className:m},e.createElement("div",{className:"maxio-tabs__tab__content"},d,u||null))},Ge=e.createContext({variant:"line",withDivider:!1}),Ke=({children:t,variant:a="line",withDivider:l=!1})=>e.createElement(Ge.Provider,{value:{variant:a,withDivider:l}},t),Ue=({children:a,value:l,className:n,id:i,...o})=>e.createElement(r.TabPanel,{id:l,className:t("maxio-tabs__panel",n),...o},a),Ze=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__header",l),...n},a);Ze.displayName="Card.Header";const Ye=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__body",l),...n},a);Ye.displayName="Card.Body";const Qe=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__footer",l),...n},a);Qe.displayName="Card.Footer";const Xe=({children:a,className:l,variant:n="primary",...i})=>e.createElement("div",{className:t("maxio-card",`maxio-card--${n}`,l),...i},a);Xe.displayName="Card";const Je=Object.assign(Xe,{Header:Ze,Body:Ye,Footer:Qe});var et,tt,at,lt;function nt(){return nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},nt.apply(null,arguments)}const it=e=>x.createElement("svg",nt({xmlns:"http://www.w3.org/2000/svg","data-name":"Maxio Logo SVG",viewBox:"0 0 1036 240"},e),et||(et=x.createElement("path",{d:"M59.32 11.3 70.64 0l40.74 40.35v70.99H40.89L0 70.52l11.15-11.14 36.2 36.15h30.07l3.07-3.39-50.91-51.15 10.99-10.97 51.24 50.83 3.72-3.38V47.13zM180.68 11.3 169.36 0l-40.73 40.35v70.99h70.48L240 70.51l-11.15-11.14-36.2 36.15h-30.06l-3.07-3.39 50.91-51.15-10.99-10.97-51.24 50.83-3.72-3.38V47.12l36.2-35.83ZM59.32 228.7l11.31 11.29 40.74-40.35v-70.99H40.89L0 169.48l11.15 11.14 36.2-36.15h30.07l3.07 3.39-50.92 51.15 10.99 10.97 51.24-50.83 3.72 3.38v30.34zM180.68 228.7l-11.32 11.29-40.73-40.35v-70.99h70.48L240 169.48l-11.15 11.14-36.2-36.15h-30.06l-3.07 3.39 50.91 51.15-10.99 10.97-51.24-50.83-3.72 3.38v30.34zM1015.27 139.55c0-29.94-23.74-53.46-52.11-53.46s-52.11 23.52-52.11 53.46 23.74 53.46 52.11 53.46 52.11-23.52 52.11-53.46m20.32.95c-.5 40.27-32.73 72.76-72.43 72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71 72.44-73.71h.94c39.57.52 71.5 33.32 71.5 73.71v.95Z"})),tt||(tt=x.createElement("path",{fillRule:"evenodd",d:"M870.39 24h-20.33v20.33h20.33zm0 40.67h-20.33v148.59h20.33z"})),at||(at=x.createElement("path",{fillRule:"evenodd",d:"M850.05 24h20.33v20.33h-20.33zM695.01 82.85l50.83 56.28v6.53l-50.28 55.67 15.23 13.2 49.22-54.49h4.71l49.22 54.49 15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15 55.52h-3.96l-50.15-55.52L695 82.85ZM660.49 78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13 0-52.44 18.93-58.09 44.86l-.28 1.27 19.33 3.72.31-1.14c2.39-8.91 6.66-16.54 13.04-21.94 6.36-5.39 14.91-8.63 26.02-8.63s19.12 3.25 24.76 8.96c5.64 5.72 8.73 14.06 8.73 24.53v6.11L616.62 130l-3.26.68c-16.14 3.47-29.79 7.84-39.59 14.45-10.54 7.11-16.64 16.83-16.64 30.62 0 12.51 4.51 22.62 12.5 29.59 7.96 6.95 19.25 10.67 32.63 10.67 22.27 0 41.87-12.03 51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58Zm-40.09 68.13c-12.86 2.77-23.05 5.42-30.03 9.63-3.46 2.09-6.08 4.54-7.84 7.54s-2.71 6.62-2.71 11.15c0 6.38 2.1 12.12 6.32 16.27 4.22 4.14 10.7 6.82 19.7 6.82 26.85 0 47.46-20.48 47.46-51.36v-7.2l-32.9 7.14Z"})),lt||(lt=x.createElement("path",{d:"M434.8 188.74h4.54l61.73-164.33.15-.41h35.57v189.35H515.9V55.37h-4.33l-59.7 157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98H336V24h35.57z"}))),ot=a=>{const{size:l="sm",className:n,variant:i="lockup",alt:o="maxio logo"}=a,r="mark"===i,s="number"==typeof l;return e.createElement(it,{role:"img",viewBox:r?"0 0 240 240":"0 0 1036 240","aria-label":o,height:s?l:void 0,className:t("maxio-logo",!s&&`maxio-logo--${l}`,r&&"maxio-logo--mark",n)})},rt=({state:a,...l})=>{var n,i;const o=e.useRef(null),{toastProps:r,contentProps:s,titleProps:c,closeButtonProps:m}=u.useToast(l,a,o),{closable:d=!0,underline:p=!0,external:x=!1}=l.toast.content,v=t("maxio-toast",{[`maxio-toast--${l.toast.content.sentiment}`]:l.toast.content.sentiment}),g={default:"info-circle-fill",success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[l.toast.content.sentiment||"default"];return e.createElement("div",{className:v,"data-maxio-mode":"dark",...r,ref:o},e.createElement(f,{variant:g,className:"maxio-toast__icon"}),e.createElement("div",{className:"maxio-toast__container",...s},e.createElement("div",{className:"maxio-toast__content",...c},l.toast.content.title&&e.createElement("span",{className:"maxio-toast__title"},l.toast.content.title),l.toast.content.message&&e.createElement("span",{className:"maxio-toast__message"},l.toast.content.message),(null===(n=l.toast.content.link)||void 0===n?void 0:n.text)&&(null===(i=l.toast.content.link)||void 0===i?void 0:i.href)&&e.createElement(N,{href:l.toast.content.link.href,underline:p,external:x},l.toast.content.link.text))),d&&e.createElement(S,{variant:"ghost",icon:e.createElement(f,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss",...m}))},st=({state:t,...a})=>{const l=e.useRef(null),{regionProps:n}=u.useToastRegion(a,t,l);return e.createElement("div",{...n,ref:l,className:a.className,style:{display:"flex",flexDirection:"column",gap:"10px"}},t.visibleToasts.map(a=>e.createElement(rt,{key:a.key,toast:a,state:t})))},ct=e.createContext(null);class mt extends d.ToastQueue{}const dt=({basis:a,flex:l,flexDirection:n,wrap:i,grow:o,shrink:r,gap:s,gapX:c,gapY:m,className:d,children:u,alignItems:p,justifyContent:x,...v})=>{const g=t("maxio-flex",{[`maxio-flex-${l}`]:l,[`maxio-basis-${a}`]:void 0!==a,[`maxio-flex-${n}`]:n,[`maxio-flex-${i}`]:i,"maxio-grow":o,"maxio-grow-0":!1===o,"maxio-shrink":r,"maxio-shrink-0":!1===r,[`maxio-gap-${s}`]:void 0!==s,[`maxio-gap-x-${c}`]:void 0!==c,[`maxio-gap-y-${m}`]:void 0!==m,[`maxio-items-${p}`]:p,[`maxio-justify-${x}`]:x},d);return e.createElement("div",{className:g,...v},u)},ut=({...t})=>{const l=e.useRef(null),{buttonProps:n}=a.useButton(t,l);return e.createElement("button",{...n,className:"maxio-chip__dismiss-button"},e.createElement(f,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},pt={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"};Object.defineProperty(exports,"createColumnHelper",{enumerable:!0,get:function(){return n.createColumnHelper}}),Object.defineProperty(exports,"DialogTrigger",{enumerable:!0,get:function(){return r.DialogTrigger}}),Object.defineProperty(exports,"Pressable",{enumerable:!0,get:function(){return r.Pressable}}),exports.ActionList=_,exports.Alert=I,exports.AuthLayout=({children:a,heading:l,description:n,sentiment:i="success",leadingElement:o=null,alert:r,topAddon:s=null,footer:c})=>e.createElement("div",{className:"maxio-auth-layout"},e.createElement(dt,{alignItems:"center",justifyContent:"between"},e.createElement(ot,{size:"md"}),s),r&&e.createElement(I,{display:"block",title:r.title,sentiment:r.sentiment},r.children),e.createElement(Je,{variant:"secondary"},e.createElement(Je.Body,null,e.createElement(dt,{flexDirection:"col",gap:6},e.createElement(dt,{flexDirection:"col",gap:2},e.createElement(dt,{alignItems:"center",gap:2},o,e.createElement(ae,{size:"lg",className:t("maxio-auth-layout__heading",pt[i])},l)),n&&e.createElement(dt,{style:{color:"var(--maxio-color-text-tertiary)"}},e.createElement(pe,{size:"sm",className:"maxio-auth-layout__description"},n))),a)),c&&e.createElement(Je.Footer,null,c))),exports.Avatar=({className:a,src:l,alt:n="avatar"})=>e.createElement("img",{className:t("maxio-avatar",a),alt:n,src:l}),exports.Banner=({children:a,title:l,linkText:n,linkExternal:i,href:o,display:r="inline",sentiment:s="info",onDismiss:c,className:m})=>{if(!a&&!l)return console.warn("Banner component requires either children or title prop to be rendered"),null;const d=t("maxio-banner",{[`maxio-banner--${s}`]:"info"!==s&&s,className:m}),u={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[s],p=t("maxio-banner__content",{"maxio-banner__content--block":"block"===r});return e.createElement("div",{className:d,"aria-live":"assertive"},e.createElement(f,{variant:u,className:"maxio-banner__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-banner__container"},e.createElement("div",{className:p},l&&e.createElement("span",{className:"maxio-banner__title"},l),a&&e.createElement("span",{className:"maxio-banner__message"},a),n&&o&&e.createElement(N,{href:o,..."warning"!==s&&{variant:"inverse"},underline:!0,...i?{external:!0}:{}},n))),c&&e.createElement(S,{icon:e.createElement(f,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:c,className:"maxio-banner__dismiss"}))},exports.Body=pe,exports.Breadcrumbs=({className:a,children:l,...n})=>{const i=e.Children.count(l);if(0===i)throw new Error(O);const o=e.Children.map(l,(t,a)=>{if(e.isValidElement(t)&&t.type===$){if(a===i-1&&t.props.href)throw new Error(z);return e.cloneElement(t,{"aria-current":a===i-1?"page":void 0})}throw new Error(B)});return e.createElement("nav",{"aria-label":"Breadcrumb",...n},e.createElement("ol",{className:t("maxio-breadcrumbs",a)},o))},exports.BreadcrumbsItem=$,exports.Button=C,exports.Card=Je,exports.Checkbox=G,exports.CheckboxGroup=({helperText:l,className:n,errorMessage:i,children:r,disabled:s,label:c,defaultValue:m,name:d,...u})=>{var p;const x=o.useCheckboxGroupState({defaultValue:m,name:d,errorMessage:i,description:l,label:c,isDisabled:s,isInvalid:!!i,...u}),{groupProps:v,labelProps:g,descriptionProps:b,errorMessageProps:f,isInvalid:h}=a.useCheckboxGroup({"aria-label":null===(p=null!=c?c:u["aria-label"])||void 0===p?void 0:p.toString(),isDisabled:s,isInvalid:!!i,...u},x),E=t("maxio-checkbox-group",{"maxio-checkbox-group--disabled":s},n),_=l&&!i;return e.createElement("div",{className:E,...v},c&&e.createElement("label",{className:"maxio-checkbox-group__label",...g},c),e.createElement(j.Provider,{value:x},r),_&&e.createElement(K,{...b},l),i&&h&&e.createElement(U,{...f},i))},exports.Chip=({label:l,onDismiss:n,dismissLabel:o,leadingIcon:r,trailingIcon:s,title:c,...m})=>{const d=e.useRef(null),u=i.useToggleState(m),{buttonProps:p}=a.useToggleButton(m,u,d),x=t("maxio-chip",{"maxio-chip--selected":null==u?void 0:u.isSelected}),v=t("maxio-chip__button",{"maxio-chip--dismissible":n});return e.createElement("div",{className:x},e.createElement("button",{className:v,ref:d,...p,title:c},r&&e.createElement(f,{variant:r,className:"maxio-chip__icon"}),e.createElement("span",{className:"maxio-chip__label"},l),s&&!n&&e.createElement(f,{variant:s,className:"maxio-chip__icon"})),n&&e.createElement(ut,{onPress:n,"aria-label":o}))},exports.Code=({as:a="div",children:l,className:n,...i})=>{const o=a,r=t("maxio-code",n);return e.createElement(o,{className:r,...i},l)},exports.ComboBox=ye,exports.DataTable=({pattern:t,size:a="md",SubRowComponent:l,onExpand:i,onSelect:o,onSort:r,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:m,columns:d,actions:u,actionsColumnSize:p,onRowAction:x,state:v,...g})=>{var b,f;const h=(({columns:t,HeaderControls:a,RowControls:l,RowActions:n,actions:i,actionsColumnSize:o,enableExpanding:r,enableRowSelection:s})=>e.useMemo(()=>{const c={id:M,size:40,header:t=>e.createElement(a,{...t,enableExpanding:r,enableRowSelection:s}),cell:t=>e.createElement(l,{...t,enableExpanding:r}),meta:{controls:!0}},m=i&&n?{id:L,size:null!=o?o:40,header:"",cell:t=>e.createElement(n,null,i(t.row,t.table)),meta:{actions:!0}}:null;let d=[...t];return s&&(d=[c,...d]),m&&(d=[...d,m]),d},[i,o,n,r,s,t,a,l]))({columns:d,HeaderControls:Z,RowControls:Y,RowActions:Q,actions:u,actionsColumnSize:p,enableRowSelection:c,enableExpanding:Boolean(m)}),E=n.useReactTable({state:{...v,columnPinning:{left:[...c?[M]:[],...ee(null===(b=null==v?void 0:v.columnPinning)||void 0===b?void 0:b.left)],right:[...ee(null===(f=null==v?void 0:v.columnPinning)||void 0===f?void 0:f.right),...u?[L]:[]]}},getSubRows:e=>e.subRows,getCoreRowModel:n.getCoreRowModel(),enableRowSelection:c,enableExpanding:Boolean(m),...!g.manualExpanding&&{getExpandedRowModel:n.getExpandedRowModel()},enableSorting:s,...!g.manualSorting&&{getSortedRowModel:n.getSortedRowModel()},columns:h,...g}),_=E.getCanSomeRowsExpand(),N=E.getState();return e.useEffect(()=>{null==i||i(N.expanded)},[i,N.expanded]),e.useEffect(()=>{null==o||o(N.rowSelection)},[o,N.rowSelection]),e.useEffect(()=>{null==r||r(N.sorting)},[r,N.sorting]),e.createElement(A,{pattern:t,size:a,isExpandable:_,isUsingCustomRow:!!l},e.createElement(F,null,E.getHeaderGroups().map(t=>e.createElement(V,{key:t.id,table:E,isHeader:!0},t.headers.map(t=>e.createElement(H,{key:t.id,table:E,header:t,enableExpanding:m},n.flexRender(t.column.columnDef.header,t.getContext())))))),e.createElement(W,null,E.getRowModel().rows.map(a=>e.createElement(J,{key:a.id,row:a,pattern:t,SubRowComponent:l,enableExpanding:m,onRowAction:x}))))},exports.Display=({as:a="div",children:l,size:n="md",className:i,...o})=>{const r=a,s=t(`maxio-display-${n}`,i);return e.createElement(r,{className:s,...o},l)},exports.Drawer=({open:a,onOpenChange:l,placement:n="right",backdrop:i="dim",size:o="md",className:s,title:c,description:m,children:d,footer:u})=>{const p=e.useId(),x={"data-placement":n,"data-size":o};return e.createElement(r.ModalOverlay,{isOpen:a,onOpenChange:l,isDismissable:!0,className:t("maxio-drawer__backdrop",{"maxio-drawer__backdrop--dim":"dim"===i})},e.createElement(r.Modal,{className:t("maxio-drawer",s),...x},e.createElement(r.Dialog,{className:"maxio-drawer__dialog","aria-labelledby":p},({close:t})=>e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-drawer__header"},e.createElement("div",{className:"maxio-drawer__title-group"},e.createElement(ae,{id:p,size:"md",className:"maxio-drawer__title"},c),m&&e.createElement("p",{className:"maxio-drawer__description"},m)),e.createElement(S,{"aria-label":"Close",onClick:t,icon:e.createElement(f,{variant:"cross"}),variant:"ghost",size:"sm",className:"maxio-drawer__close"})),e.createElement("div",{className:"maxio-drawer__body"},d),null!=u&&e.createElement("div",{className:"maxio-drawer__footer"},u)))))},exports.Flex=dt,exports.FormErrorMessage=U,exports.FormHelperText=K,exports.GlobalToastProvider=({children:t,toastQueue:a,...l})=>{const n=d.useToastQueue(a),i=e.useCallback(()=>{n.visibleToasts.forEach(e=>{a.close(e.key)})},[n.visibleToasts,a]),o=e.useMemo(()=>({addToast:a.add.bind(a),removeToast:a.clear.bind(a),removeAllToasts:i,state:n}),[a,i,n]);return e.createElement(ct.Provider,{value:o},t,n.visibleToasts.length>0&&e.createElement(st,{...l,state:n}))},exports.Grid=({children:a,templateColumns:l,templateRows:n,autoColumns:i,autoRows:o,inline:r,column:s,columnStart:c,columnEnd:m,row:d,rowStart:u,rowEnd:p,gap:x,gapX:v,gapY:g,className:b,justifyContent:f,alignItems:h,...E})=>{const _=t(b,{"maxio-grid":!r,"maxio-inline-grid":r,[`maxio-grid-cols-${l}`]:l,[`maxio-grid-rows-${n}`]:n,[`maxio-auto-cols-${i}`]:i,[`maxio-auto-rows-${o}`]:o,["maxio-col-"+("auto"===s?"auto":`span-${s}`)]:s,[`maxio-col-start-${c}`]:c,[`maxio-col-end-${m}`]:m,["maxio-row-"+("auto"===d?"auto":`span-${d}`)]:d,[`maxio-row-start-${u}`]:u,[`maxio-row-end-${p}`]:p,[`maxio-gap-${x}`]:void 0!==x,[`maxio-gap-x-${v}`]:void 0!==v,[`maxio-gap-y-${g}`]:void 0!==g,[`maxio-justify-${f}`]:f,[`maxio-items-${h}`]:h});return e.createElement("div",{className:_||void 0,...E},a)},exports.Heading=ae,exports.Icon=f,exports.IconButton=S,exports.Label=({as:a="div",children:l,size:n="sm",className:i,...o})=>{const r=a,s=t(`maxio-label-${n}`,i);return e.createElement(r,{className:s,...o},l)},exports.Link=N,exports.ListBox=fe,exports.LoadingSpinner=w,exports.Logo=ot,exports.Menu=({children:t})=>e.createElement(T,null,e.createElement(D,null,t)),exports.MenuButton=({children:a,iconName:l="chevron-down","aria-label":n,size:i="md",variant:o="secondary"})=>{const r=t({"maxio-action-menu__chevron":"chevron-down"===l}),s=t("maxio-button",`maxio-button--${o}`,`maxio-button--${i}`,{"maxio-button--icon":l&&!a}),{isOpen:c,buttonId:m,controlsId:d}=R();return e.createElement("summary",{className:s,"aria-haspopup":"true","aria-label":n,"aria-expanded":c,"aria-controls":d,id:m},a&&e.createElement("span",null,a),l&&e.createElement(f,{variant:l,className:`${r} maxio-button__trailing-element`}))},exports.MenuList=({items:a,alignItemsEnd:l=!1})=>{const n=t("maxio-action-menu__content",{"maxio-action-menu__content--align-end":l}),{controlsId:i,buttonId:o}=R();return e.createElement("div",{className:n,role:"presentation"},e.createElement(_,{role:"menu",itemProps:{role:"menuitem"},id:i,"aria-labelledby":o,items:a}))},exports.OverlayTrigger=ce,exports.Pagination=({size:t="md",onChange:a,totalItems:l=0,itemsPerPage:n=30,currentPage:i=1,pageSizeOptions:o,manualPageInput:r=!1})=>{const[s,c]=e.useState(i),[m,d]=e.useState(n),[u,p]=e.useState(i.toString());e.useEffect(()=>{p(s.toString())},[s]);const x=Math.ceil(l/m),v=s<x,g=s>1,b=m*(s-1)+1,h=Math.min(m*s,l),E=o.map(e=>({label:e.toString(),value:e.toString()})),_=Array.from({length:x},(e,t)=>t+1).map(e=>({label:e.toString(),value:e.toString()})),N=e=>{c(e),null==a||a({currentPage:e,itemsPerPage:m})},w=e=>{const t=parseInt(e,10);if(isNaN(t))return void p(s.toString());const a=Math.max(1,Math.min(t,x));p(a.toString()),N(a)};return e.createElement("div",{className:"maxio-pagination"},e.createElement("div",{className:"maxio-pagination__items-per-page"},e.createElement("label",{htmlFor:"items-per-page-large",className:"maxio-pagination__label"},"Items per page"),e.createElement(Pe,{inline:!0,size:t,options:E,onChange:e=>{return t=Number(e.target.value),d(t),c(1),void(null==a||a({currentPage:1,itemsPerPage:t}));var t},value:m,id:"items-per-page-large"})),e.createElement("div",{className:"maxio-pagination__total-items"},e.createElement("span",null,b,"–",h," of ",l," items")),e.createElement("div",{className:"maxio-pagination__current-page"},r?e.createElement(Ie,{className:"maxio-pagination__page-input",value:u,min:1,max:x,onChange:e=>(e=>{p(e)})(e),onBlur:e=>{w(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(w(e.currentTarget.value),e.currentTarget.blur())},"aria-label":"Page number",size:t,type:"number",onWheel:e=>e.preventDefault()}):e.createElement(Pe,{inline:!0,size:t,"aria-label":"Select page",onChange:e=>N(Number(e.target.value)),value:s,options:_,id:"page-index-large"}),e.createElement("div",{className:"maxio-pagination__label"},"of ",x," pages")),e.createElement("div",{className:"maxio-pagination__controls"},e.createElement(ue,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(S,{icon:e.createElement(f,{variant:"chevron-left"}),size:t,variant:"ghost",onClick:()=>N(s-1),"aria-label":"Previous",disabled:!g})),e.createElement(ue,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(S,{icon:e.createElement(f,{variant:"chevron-right"}),size:t,variant:"ghost",onClick:()=>N(s+1),"aria-label":"Next",disabled:!v}))))},exports.Popover=he,exports.ProgressBar=({label:l,helperText:n,size:i="md",variant:o="default",status:r,value:s,maxValue:c=100})=>{const m=a.useId(),d=a.useId(),u=r&&!!l&&!!s&&!("inline"===o),p=n&&!("inline"===o),x=n&&"inline"===o,{progressBarProps:v,labelProps:g}=a.useProgressBar({maxValue:c,value:s,label:l}),b=t("maxio-progress-bar",{"maxio-progress-bar--lg":"lg"===i,"maxio-progress-bar--success":s&&!("inline"===o)&&"success"===r,"maxio-progress-bar--error":s&&!("inline"===o)&&"error"===r,"maxio-progress-bar--indent":"indent"===o,"maxio-progress-bar--inline":"inline"===o,"maxio-progress-bar--indeterminate":void 0===s});return e.createElement("div",{className:b,...v},e.createElement("div",{id:m,className:"maxio-progress-bar__label",...g},l),x&&e.createElement("div",{id:d,className:"maxio-progress-bar__helper-text"},n),e.createElement("div",{className:"maxio-progress-bar__track"},e.createElement("div",{className:"maxio-progress-bar__progress",style:{"--tw-scale-x":`${s}%`}})),u&&e.createElement("div",{className:`maxio-progress-bar__${r}-icon`}),p&&e.createElement("div",{id:d,className:"maxio-progress-bar__helper-text"},n))},exports.Radio=({indent:l=!1,disabled:n=!1,invalid:i=!1,label:o,...r})=>{const s=e.useRef(null),c=e.useContext(ke),{inputProps:m,isDisabled:d}=a.useRadio({...r,value:(r.value||"").toString(),"aria-label":r["aria-label"]||o,isDisabled:n},c,s),u=t("maxio-radio",{"maxio-radio--indent":l,"maxio-radio--disabled":d||c.isDisabled,"maxio-radio--error":i||c.isInvalid});return e.createElement("label",{className:u},e.createElement("input",{ref:s,role:"radio",type:"radio",className:"maxio-radio__input",...m,name:c.name||m.name}),e.createElement("span",{className:"maxio-radio__control"}),e.createElement("span",{className:"maxio-radio__label"},o))},exports.RadioGroup=({children:t,label:l,errorMessage:n,helperText:i,disabled:o=!1,invalid:r=!1,name:s,defaultValue:c,...d})=>{const u=m.useRadioGroupState({isDisabled:o,isInvalid:r,description:i,name:s,label:l,errorMessage:n,defaultValue:c,...d}),{radioGroupProps:p,labelProps:x,descriptionProps:v,errorMessageProps:g}=a.useRadioGroup({"aria-label":d["aria-label"]||l,...d},u);return e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-radio-group",...p},l&&e.createElement("label",{className:"maxio-radio-group__label",...x},l),e.createElement(ke.Provider,{value:u},t),r&&n&&e.createElement(U,{...g},n),i&&!r&&e.createElement(K,{...v},i)))},exports.SegmentedControl=De,exports.Select=Pe,exports.SideNav=({withIcons:t=!0,shouldToggleSidebar:a=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:o,onChange:r})=>e.createElement(Le,{isOpen:o,onChange:r,collapseBreakpoint:i,withIcons:t,shouldToggleSidebar:a,topDropdownItems:l,sections:n},e.createElement(je,null)),exports.Tab=qe,exports.TabList=({children:a,className:l,ariaLabel:n,overflow:i="none",moreLabel:o="More",...s})=>{const{variant:c,withDivider:m}=e.useContext(Ge),d=e.useContext(r.TabListStateContext),u=e.useId(),[p,x]=e.useState(!1),v=t("maxio-tabs",l,{"maxio-tabs--contained":"contained"===c,"maxio-tabs--divider":m}),g=e.Children.map(a,e=>e);(null!=g?g:[]).forEach(t=>{if(!e.isValidElement(t)||t.type!==qe)throw new Error("You can only pass <Tab /> component as children")});const b="auto"===i&&!!(null==g?void 0:g.length),{ref:h,moreButtonRef:E,overflowIndexes:_,handleKeyDownCapture:N}=(({overflowEnabled:t,childrenArray:a})=>{const l=e.useRef(null),n=e.useRef(null),i=e.useRef(null),[o,s]=e.useState(null),c=se(l),m=e.useContext(r.TabListStateContext),d=null!=(null==m?void 0:m.selectedKey)?Number(m.selectedKey):null,[u,p]=e.useState([]);e.useLayoutEffect(()=>{var e;if(!t||!o)return void p((null!=a?a:[]).map((e,t)=>t));const{visibleIndexes:l}=((e,t,a,l)=>{const n=e.map((e,t)=>t);if(e.reduce((e,t)=>e+t,0)<=t)return{visibleIndexes:n,overflowIndexes:[]};const i=[];let o=a;for(const a of n){if(o+e[a]>t)break;o+=e[a],i.push(a)}if(null!==l&&!i.includes(l)){for(o+=e[l];o>t&&i.length>0;)o-=e[i.pop()];i.push(l)}i.sort((e,t)=>e-t);const r=n.filter(e=>!i.includes(e));return{visibleIndexes:i,overflowIndexes:r}})(o.tabWidths,c,o.moreButtonWidth,null!==(e=i.current)&&void 0!==e?e:d);l.length===(null!=a?a:[]).length&&(i.current=null),p(l)},[t,o,c]),e.useLayoutEffect(()=>{t&&o&&null!==d&&p(e=>(e.includes(d)||(i.current=d),((e,t,a,l,n)=>{if(e.includes(n))return e;const i=[...e,n].sort((e,t)=>e-t);let o=l+i.reduce((e,a)=>e+t[a],0);for(;o>a&&i.length>1;){const e=i.length-1,a=i[e]===n?e-1:e,[l]=i.splice(a,1);o-=t[l]}return i})(e,o.tabWidths,c,o.moreButtonWidth,d)))},[d]);const x=t?(null!=a?a:[]).map((e,t)=>t).filter(e=>!u.includes(e)):[],v=((e,t)=>e.filter(e=>{var a;return!(null===(a=null==t?void 0:t[e])||void 0===a?void 0:a.props.disabled)}))(u,a);e.useLayoutEffect(()=>{var e,i;if(!t||!l.current)return void s(e=>null===e?e:null);const o=Array.from(l.current.querySelectorAll('[role="tab"]')),r=null!==(i=null===(e=n.current)||void 0===e?void 0:e.getBoundingClientRect().width)&&void 0!==i?i:0;s(e=>{var t;const l=(null!=a?a:[]).map((t,a)=>{var l,n,i;const r=null!==(n=null===(l=o[a])||void 0===l?void 0:l.getBoundingClientRect().width)&&void 0!==n?n:0;return r>0?r:null!==(i=null==e?void 0:e.tabWidths[a])&&void 0!==i?i:0}),n=r>0?r:null!==(t=null==e?void 0:e.moreButtonWidth)&&void 0!==t?t:0,i=(null==e?void 0:e.tabWidths.length)===l.length&&e.tabWidths.every((e,t)=>e===l[t]);return e&&i&&e.moreButtonWidth===n?e:{tabWidths:l,moreButtonWidth:n}})},[a,t]);const g=e=>{var t,a;void 0!==e&&(null==m||m.selectionManager.setFocused(!0),null==m||m.selectionManager.setFocusedKey(e),null==m||m.setSelectedKey(e),null===(a=null===(t=l.current)||void 0===t?void 0:t.querySelector(`[role="tab"][data-key="${e}"]`))||void 0===a||a.focus())};return{ref:l,moreButtonRef:n,visibleIndexes:u,overflowIndexes:x,handleKeyDownCapture:e=>{var t;if(0===x.length)return;const a=document.activeElement===n.current,l=null==m?void 0:m.selectionManager.focusedKey,i=a?-1:v.indexOf(Number(l));if(a||-1!==i)switch(e.key){case"ArrowRight":if(a)return;return e.preventDefault(),e.stopPropagation(),void(i<v.length-1?g(v[i+1]):null===(t=n.current)||void 0===t||t.focus());case"ArrowLeft":return e.preventDefault(),e.stopPropagation(),void(a?g(v[v.length-1]):i>0&&g(v[i-1]));case"Home":if(a)return;return e.preventDefault(),e.stopPropagation(),void g(v[0]);case"End":if(a)return;return e.preventDefault(),e.stopPropagation(),void g(v[v.length-1])}}}})({overflowEnabled:b,childrenArray:g}),w=e.createElement("span",{className:"maxio-tabs__tab__content"},o,e.createElement(f,{variant:"chevron-down",className:"maxio-tabs__more__chevron"})),y=_.map(e=>{return`#${t=u,"undefined"!=typeof CSS&&"function"==typeof CSS.escape?CSS.escape(t):t.replace(/[^a-zA-Z0-9_-]/g,"\\$&")} [role="tablist"] > .maxio-tabs__tab:nth-child(${e+1})`;var t});return e.createElement("div",{id:u,className:v,ref:h,onKeyDownCapture:N},y.length>0&&e.createElement("style",null,`${y.join(", ")} { display: none; }`),e.createElement(r.TabList,{"aria-label":n,className:"maxio-contents",...s},(null!=g?g:[]).map((t,a)=>e.cloneElement(t,{key:a,value:a}))),b&&_.length>0&&e.createElement(r.MenuTrigger,{isOpen:p,onOpenChange:x},e.createElement(r.Button,{ref:E,className:"maxio-tabs__tab maxio-tabs__more__trigger","aria-label":o},w),p&&e.createElement(he,{hideArrow:!0,placement:"bottom end",className:"maxio-tabs__more__menu"},e.createElement(r.Menu,{"aria-label":`${o} tabs`,onAction:e=>{null==d||d.setSelectedKey(e),requestAnimationFrame(()=>{var t,a;null===(a=null===(t=h.current)||void 0===t?void 0:t.querySelector(`[role="tab"][data-key="${e}"]`))||void 0===a||a.focus()})}},_.map(t=>{const a=g[t],{disabled:l,type:n,"aria-label":i,"aria-labelledby":o}=a.props,s="icon"===n?a.props.icon:a.props.children;return e.createElement(r.MenuItem,{key:t,id:t,isDisabled:!!l,"aria-label":i,"aria-labelledby":o,className:"maxio-tabs__more__item"},s)})))))},exports.TabPanel=Ue,exports.TabPanels=({children:t})=>{const a=e.Children.map(t,(t,a)=>{if(!e.isValidElement(t)||t.type!==Ue)throw new Error("You can only pass <TabPanel /> component as children");return e.cloneElement(t,{key:a,value:a})});return e.createElement(r.TabPanels,{className:"maxio-tabs__panels"},a)},exports.Tabs=({children:t,variant:a="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:o})=>e.createElement(r.Tabs,{className:"maxio-tabs-container",selectedKey:i,defaultSelectedKey:n,onSelectionChange:e=>null==o?void 0:o(Number(e))},e.createElement(Ke,{variant:a,withDivider:l},t)),exports.Tag=({children:a,size:l,sentiment:n,kind:i="primary",leadingIcon:o,trailingIcon:r})=>{const s=t("maxio-tag",`maxio-tag--${i}`,!!n&&`maxio-tag--${n}`,!!l&&`maxio-tag--${l}`);return e.createElement("div",{className:s},o&&e.createElement(f,{variant:o,className:"maxio-tag__icon"}),e.createElement("span",{className:"maxio-tag__label"},a),r&&e.createElement(f,{variant:r,className:"maxio-tag__icon"}))},exports.TextArea=Se,exports.TextField=Ce,exports.TextInput=Ie,exports.Tile=({children:a,className:l,href:n,onClick:i,target:o,disabled:r})=>{const s=n||i;if(!s)return e.createElement("div",{className:"maxio-tile"},a);const c=t("maxio-tile",l,{"maxio-tile--clickable":s,"maxio-tile--disabled":r});return e.createElement("a",{className:c,href:n,target:o,onClick:e=>{r&&n&&e.preventDefault(),!r&&i&&i()}},a)},exports.ToastProvider=({children:t,...a})=>{const{maxVisibleToasts:l=5,...n}=a,i=d.useToastState({maxVisibleToasts:l,...n});return e.useEffect(()=>{console.warn("ToastProvider is deprecated. Please use the global toast API instead.")},[]),e.createElement(e.Fragment,null,t(i),i.visibleToasts.length>0&&e.createElement(st,{...a,state:i}))},exports.ToastQueue=mt,exports.Toggle=({defaultChecked:a,checked:l,onChange:n,disabled:i,valueDescription:o,valueDescriptionPosition:r,className:s,name:c,id:m,...d})=>{const u=e.useId(),p="boolean"==typeof a,x=m||u,v="left"===r?"row":"row-reverse",g=o&&r,b=e.useCallback(e=>{if("Enter"===e.code||"Space"===e.code){e.preventDefault();const t=e.currentTarget.checked;p&&(e.currentTarget.checked=!t),n&&n(!t,e)}},[p,n]),f=d["aria-label"]||(g?void 0:o);return e.createElement("div",{className:t("maxio-toggle",s,{"maxio-toggle--disabled":i}),style:{display:"inline-flex",flexDirection:v},"data-testid":"toggle-container"},g?e.createElement("label",{className:"maxio-toggle__label",htmlFor:x},o):null,e.createElement("div",{className:"maxio-toggle__container"},e.createElement("input",{type:"checkbox",defaultChecked:a,checked:l,onChange:e=>{n&&n(e.target.checked,e)},onKeyDown:b,disabled:i,className:"maxio-toggle__checkbox",id:x,name:c,"aria-label":f}),e.createElement("div",{className:"maxio-toggle__track",role:"switch","aria-checked":l,"aria-hidden":"true"},e.createElement("div",{className:"maxio-toggle__handle"}),e.createElement("span",{className:"maxio-toggle__icon"},e.createElement("i",{className:"maxio-toggle__icon-on"})),e.createElement("span",{className:"maxio-toggle__icon"},e.createElement("i",{className:"maxio-toggle__icon-off"})))))},exports.Tooltip=me,exports.TooltipTrigger=ue,exports.TopBar=({children:t,actions:a,sideNavIsClosed:l,openSideNav:n})=>e.createElement("nav",{className:"maxio-top-bar"},l&&e.createElement(S,{"aria-label":"Open Side Navigation",variant:"ghost",icon:e.createElement(f,{variant:"sidebar"}),onClick:n}),e.createElement(dt,{grow:!0,justifyContent:"end"},t),a),exports.useElementResizeObserver=se,exports.useHover=oe,exports.useOverlayTrigger=ie,exports.useToast=()=>{const t=e.useContext(ct);if(!t)throw new Error("useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.");return t},exports.useWindowSize=re;
|
|
1
|
+
"use strict";var e=require("react"),t=require("classnames"),a=require("react-aria"),l=require("@react-aria/utils"),n=require("@tanstack/react-table"),i=require("@atlaskit/pragmatic-drag-and-drop/element/adapter"),o=require("@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item"),r=require("@react-stately/toggle"),s=require("@react-stately/checkbox"),c=require("react-aria-components"),d=require("framer-motion"),m=require("@floating-ui/react-dom-interactions"),u=require("@react-stately/radio"),p=require("@react-stately/toast"),x=require("@react-aria/toast");function g(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}var v=g(e);const b=["address-card","arrow-down","arrow-down-left","arrow-down-left-long","arrow-down-long","arrow-down-right","arrow-down-right-long","arrow-down-up","arrow-left","arrow-left-long","arrow-left-right","arrow-right","arrow-right-long","arrow-turn-down-right","arrow-up","arrow-up-left","arrow-up-left-long","arrow-up-long","arrow-up-right","arrow-up-right-long","bank","bar-chart","briefcase","building","business-intelligence","calendar","caret-down","caret-left","caret-right","caret-up","chat","check","check-box","check-box-checked","check-box-checked-fill","check-box-indeterminate-fill","check-circle","check-circle-fill","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle","circle-half-stroke-small","circle-small-dash","circle-small-fill","circle-small-stroke","clipboard","cog","copy-file","credit-card","cross","cross-circle","cross-circle-fill","dashboard","diamond-small-fill","document","document-blank","dollar","dot-circle-fill","dot-fill","error","error-fill","error-small-fill","graph","home","info-circle","info-circle-fill","line-vertical","list","login","logout","megaphone","menu","menu-chevron-left","menu-chevron-right","notification","notification-unread","pen","plus","plus-circle","plus-circle-fill","question-circle","question-circle-fill","recently-viewed","search","square-small-fill","trash","triangle-small-fill","user","warning-circle","warning-circle-fill"],f=["anrok","dropbox","hubspot","numeral","oracle","quotapath","sage","sphere","taxjar"],h=["avalara","pipedrive","quickbooks","salesforce","xero"],E=({variant:a,color:l,className:n,size:i})=>{const o=(e,t)=>t.includes(e),r=o(a,b)||o(a,f),s=o(a,h),c=t({"fa-kit":r,"fa-kit-duotone":s,"fa-sharp fa-regular":!r&&!s,[`fa-${a}`]:!0,[`fa-${i}`]:i,[`maxio-icon--${l}`]:l&&!o(a,f)&&!o(a,h)},n);return e.createElement("i",{className:c})},_=({item:l,isSelected:n,truncateLabel:i=!1,role:o="option",small:r=!1})=>{const s=e.useRef(null),c=e.useRef(!1),d=a.useId();if(e.useEffect(()=>{var e;n&&c.current&&(null===(e=s.current)||void 0===e||e.focus())},[n]),e.useEffect(()=>{c.current=!0},[]),"divider"===l.type)return e.createElement("div",{className:"maxio-action-list__divider",role:"separator","aria-hidden":"true"});const{leadingIconName:m,leadingIconClassName:u,trailingIconName:p,label:x,description:g,link:v}=l,b=t("maxio-action-list__label",{"maxio-truncate":i});return e.createElement("a",{"aria-labelledby":d,...v,className:t("maxio-action-list__content",v.className,{"maxio-action-list__content--size-small":r}),tabIndex:n?0:-1,ref:s,role:o},m&&e.createElement(E,{variant:m,className:t("maxio-action-list__leading-icon",u)}),e.createElement("span",{className:b,id:d},x),g&&e.createElement("span",{className:"maxio-action-list__description"},g),p&&e.createElement(E,{variant:p,className:"maxio-action-list__trailing-icon"}))},w=(e,t,a)=>0===e?e:1===e&&"divider"===t[e-1].type?a||e:"divider"===t[e-1].type?w(e-1,t,a||e):e-1,N=({items:a,isShadowed:l=!0,itemProps:n={},className:i,truncateLabels:o=!1,small:r=!1,...s})=>{const c=t("maxio-action-list",i,{"maxio-action-list--shadow":l}),[d,m]=e.useState(()=>a.findIndex(e=>"divider"!==e.type));return 0===a.length?null:e.createElement("div",{className:c,onKeyDown:e=>{if("Space"===e.code||"Enter"===e.code){const e=a[d];e&&"divider"!==e.type&&window.open(e.link.href,e.link.target||"_self")}"ArrowUp"===e.code&&(e.preventDefault(),m(e=>w(e,a))),"ArrowDown"===e.code&&(e.preventDefault(),m(e=>((e,t)=>{const a=t.findIndex((t,a)=>"divider"!==t.type&&a>e);return-1===a?e:a})(e,a)))},role:"listbox",...s},a.map((t,a)=>e.createElement(_,{item:t,truncateLabel:o,key:`listbox-${t.id}`,isSelected:a===d,small:r,...n})))},y=({className:a,children:l,disabled:n,external:i,icon:o,size:r="sm",underline:s,variant:c,...d})=>{const m=t("maxio-link",{[`maxio-link--${r}`]:r,"maxio-link--disabled":n,[`maxio-link--${c}`]:c,"maxio-link--underline":s},a),u=i?"_blank":"_self";return e.createElement("a",{className:m,target:u,...d},l,o&&e.createElement(E,{variant:o,className:"maxio-link__icon"}))},I=({size:a="md",white:l=!1,className:n})=>{const i=t("maxio-loading-spinner",n,`maxio-loading-spinner--${a}`,{"maxio-loading-spinner--white":l});return e.createElement("div",{className:i,role:"status","aria-label":"loading"})},R=e.forwardRef(({fullWidth:n=!1,leadingElement:i,trailingElement:o,icon:r,variant:s="primary",size:c,...d},m)=>{const u=l.useObjectRef(m),{linkProps:p}=a.useLink({...d},u),x=t("maxio-button",d.className,{[`maxio-button--${c}`]:c,[`maxio-button--${s}`]:s,"maxio-button--full-width":n});return e.createElement("a",{...p,ref:u,className:x,href:d.href},i&&e.cloneElement(i,{...e.isValidElement(i)&&{className:"maxio-button__leading-element"}}),d.children,(o||r)&&e.cloneElement(o||r,{...e.isValidElement(o||r)&&{className:"maxio-button__trailing-element"}}))}),C=e.forwardRef(({disabled:n,loading:i=!1,fullWidth:o=!1,leadingElement:r,trailingElement:s,icon:c,variant:d="primary",size:m,...u},p)=>{const x=l.useObjectRef(p),{buttonProps:g}=a.useButton({...u,isDisabled:n,formAction:"string"==typeof u.formAction?u.formAction:void 0},x),v=["primary","danger"].includes(d),b=t("maxio-button",u.className,{[`maxio-button--${m}`]:m,[`maxio-button--${d}`]:d,"maxio-button--loading":i,"maxio-button--full-width":o});return e.createElement("button",{...g,className:b,ref:x},r&&e.cloneElement(r,{...e.isValidElement(r)&&{className:"maxio-button__leading-element"}}),u.children,!i&&(s||c)&&e.cloneElement(s||c,{...e.isValidElement(s||c)&&{className:"maxio-button__trailing-element"}}),i&&e.createElement(I,{className:"maxio-button__trailing-element",size:"md",white:v}))}),k=e.forwardRef((t,a)=>(e=>"href"in e)(t)?e.createElement(R,{...t,ref:a}):e.createElement(C,{...t,ref:a})),S=({"aria-label":a,className:l,...n})=>e.createElement(k,{"aria-label":a,className:t("maxio-button--icon",l),...n},null),P=({children:a,title:l,linkText:n,linkExternal:i,href:o,display:r="inline",sentiment:s="info",onDismiss:c,className:d})=>{if(!a&&!l)return console.warn("Alert component requires either children or title prop to be rendered"),null;const m=t("maxio-alert",{[`maxio-alert--${s}`]:"info"!==s&&s},d),u={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[s],p=t("maxio-alert__content",{"maxio-alert__content--block":"block"===r});return e.createElement("div",{className:m},e.createElement(E,{variant:u,className:"maxio-alert__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-alert__container"},e.createElement("div",{className:p},l&&e.createElement("span",{className:"maxio-alert__title"},l),a&&e.createElement("span",{className:"maxio-alert__message"},a),n&&o&&e.createElement(y,{className:"maxio-alert__link",href:o,variant:"high-contrast",underline:!0,...i?{external:!0}:{}},n))),c&&e.createElement(S,{icon:e.createElement(E,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:c,className:"maxio-alert__dismiss"}))},T=e.createContext({}),$=({children:t})=>{const[a,l]=e.useState(!1),n=e.useId(),i=e.useId();return e.createElement(T.Provider,{value:{controlsId:n,buttonId:i,isOpen:a,onClose:()=>l(!1),onOpen:()=>l(!0),onToggle:()=>l(e=>!e)}},t)};function D(){const t=e.useContext(T);if(!t||"object"==typeof t&&0===Object.keys(t).length)throw new Error("useMenu hook must be used within a MenuProvider");return t}const M=({children:t})=>{const{isOpen:a,onToggle:l,onClose:n}=D();return e.createElement("details",{open:a,onToggle:l,className:"maxio-action-menu"},"function"==typeof t?t({isOpen:a,onClose:n}):t)},O=({children:a,className:l,href:n,...i})=>{const o=n?e.createElement(y,{size:"sm",href:n},a):a;return e.createElement("li",{className:t("maxio-breadcrumbs__item",l),...i},o)},B="Breadcrumbs requires at least one BreadcrumbsItem as children",z='Last BreadcrumbsItem should not have "href" prop. It is the current page.',L="Breadcrumbs only accepts BreadcrumbsItem as children",A="row-controls",F="row-actions",H=({children:a,pattern:l,size:n,isExpandable:i,isUsingCustomRow:o})=>{const[r,s]=e.useState(!1),[c,d]=e.useState(!1),m=l&&o&&i,u=t("maxio-data-table",{"maxio-data-table--pattern":l&&!m,"maxio-data-table--expanded-child-pattern":m,"maxio-data-table--with-custom-row":o,[`maxio-data-table--${n}`]:n,"maxio-data-table--with-pinned-left-border":r,"maxio-data-table--with-pinned-right-border":c});return e.createElement("div",{className:"maxio-data-table-wrapper",onScroll:e=>{const t=e.target;s(t.scrollLeft>0),d(t.scrollWidth-t.clientWidth-t.scrollLeft>0)}},e.createElement("table",{className:u},a))},V=({children:t})=>e.createElement("thead",null,t),W=({children:t})=>e.createElement("tbody",null,t),j=({children:a,table:l,header:n,className:i,enableExpanding:o,...r})=>{var s,c,d,m,u,p,x,g,v,b,f;const h=null==n?void 0:n.column,_=null===(s=null==h?void 0:h.getCanSort)||void 0===s?void 0:s.call(h),w=null===(c=null==h?void 0:h.getToggleSortingHandler)||void 0===c?void 0:c.call(h),N=null==n?void 0:n.isPlaceholder,y=null===(m=null===(d=null==h?void 0:h.columnDef)||void 0===d?void 0:d.meta)||void 0===m?void 0:m.align,I=null===(p=null===(u=null==h?void 0:h.columnDef)||void 0===u?void 0:u.meta)||void 0===p?void 0:p.width,R=null===(g=null===(x=null==h?void 0:h.columnDef)||void 0===x?void 0:x.meta)||void 0===g?void 0:g.controls,C=null===(b=null===(v=null==h?void 0:h.columnDef)||void 0===v?void 0:v.meta)||void 0===b?void 0:b.actions,k=null==h?void 0:h.getIsPinned(),P=null==h?void 0:h.getIsSorted(),T="asc"===P,$=t("maxio-data-table__cell",i,{[`maxio-data-table__cell--pinned-${k}`]:k,"maxio-data-table__cell--sortable":_,"maxio-data-table__cell--active":P,[`maxio-data-table__cell--${y}`]:y,"maxio-data-table__cell--controls":R,"maxio-data-table__cell--actions":C}),D={...I?{width:I}:{},..."left"===k?{left:null==h?void 0:h.getStart("left")}:"right"===k?{right:null==h?void 0:h.getAfter("right")}:{}},M=((e,t)=>e&&t?"arrow-up":e&&!t?"arrow-down":"arrow-down-up")(!!P,T),O=null==l?void 0:l.getToggleAllRowsExpandedHandler(),B=null===(f=null==l?void 0:l.getIsAllRowsExpanded)||void 0===f?void 0:f.call(l),z=(null==n?void 0:n.headerGroup.headers[0].id)===A?1:0,L=o&&(null==n?void 0:n.index)===z;return N?null:e.createElement("th",{scope:"col",role:"columnheader","aria-sort":P?T?"ascending":"descending":"none",className:$,onClick:w,colSpan:null==n?void 0:n.colSpan,style:D,...r},e.createElement("div",{className:"maxio-data-table__cell-flex"},!0===o&&L&&e.createElement(S,{size:"sm",variant:"ghost",icon:e.createElement(E,{size:"xs",variant:B?"chevron-down":"chevron-right"}),onClick:O,"aria-label":B?"Collapse all rows":"Expand all rows","data-open":B,className:"maxio-data-table__expand-button"}),a,_&&e.createElement(E,{variant:M,className:"maxio-data-table__sort-icon"})))},q=e=>{var t;return null!==(t=e.subRows)&&void 0!==t?t:[]},G=(e,t)=>Object.assign({},e,{subRows:t}),K=(e,t,a=[])=>{for(let l=0;l<e.length;l+=1){const n=e[l],i=[...a,l];if(n===t)return i;const o=K(q(n),t,i);if(o)return o}return null},U=(e,t)=>{const[a,...l]=t,n=e[a];if(!n)return null;const i=[...e];if(0===l.length)return i.splice(a,1),{data:i,item:n};const o=U(q(n),l);return o?(i[a]=G(n,o.data),{data:i,item:o.item}):null},Z=(e,t,a,l)=>{const n=[...e];if(0===t.length)return n.splice(a,0,l),n;const[i,...o]=t,r=e[i];if(!r)return null;const s=Z(q(r),o,a,l);return s?(n[i]=G(r,s),n):null},Y=(e,t)=>{let a,l=e;for(const e of t){if(a=l[e],!a)return;l=q(a)}return a},Q="maxio-data-table-row",X=e.createContext(null),J=()=>e.useContext(X),ee=e=>e.type===Q&&"string"==typeof e.instanceId&&"string"==typeof e.rowId,te=e=>{const t=(e=>{const t=o.extractInstruction(e);return t&&"instruction-blocked"!==t.type?"reorder-above"===t.type?"before":"reorder-below"===t.type?"after":"make-child"===t.type?"inside":null:null})(e);return"string"==typeof e.rowId&&t?{rowId:e.rowId,position:t}:null},ae=({availability:t,children:a,data:l,enableExpanding:n,getRowReorderLabel:r,onRowReorder:s,rowReorderMode:c,table:d})=>{const m=`maxio-data-table-${e.useId()}`,[u,p]=e.useState(""),[x,g]=e.useState(null),[v,b]=e.useState(null),f=e.useRef(null),h=e.useCallback(e=>d.getCoreRowModel().rowsById[e],[d]),E=e.useCallback(e=>{var t;return null!==(t=null==r?void 0:r(e))&&void 0!==t?t:e.id},[r]),_=e.useCallback((e,t)=>{const a=h(e),i=h(t.rowId);if(!a||!i)return null;const o=((e,t,a,l,n)=>{var i,o;if(t.id===a.id||!((e,t,a,l)=>{var n,i;return"all"===l||("siblings"===l?"inside"!==a&&(null!==(n=e.parentId)&&void 0!==n?n:null)===(null!==(i=t.parentId)&&void 0!==i?i:null):"inside"===a?e.depth===t.depth+1:e.depth===t.depth)})(t,a,l,n))return null;const r=K(e,t.original),s=K(e,a.original);if(!r||!s||(d=s,(c=r).length<d.length&&c.every((e,t)=>d[t]===e)))return null;var c,d;const m=U(e,r);if(!m)return null;const u=((e,t)=>{const a=[...e],l=t.length-1;return l>=0&&e.length>l&&t.slice(0,l).every((t,a)=>e[a]===t)&&t[l]<e[l]&&(a[l]-=1),a})(s,r),p=u[u.length-1];if(void 0===p)return null;const x="inside"===l?u:u.slice(0,-1),g=Y(m.data,u);if(!g)return null;const v="inside"===l?q(g).length:p+("after"===l?1:0),b={parentRowId:"inside"===l?a.id:null!==(i=a.parentId)&&void 0!==i?i:null,index:v},f={parentRowId:null!==(o=t.parentId)&&void 0!==o?o:null,index:t.index};if(f.parentRowId===b.parentRowId&&f.index===b.index)return null;const h=Z(m.data,x,v,m.item);return h?{data:h,source:f,destination:b}:null})(l,a,i,t.position,c);return o&&!n&&null!==o.destination.parentRowId&&o.destination.parentRowId!==o.source.parentRowId?null:o},[l,n,h,c]),w=e.useCallback(e=>{f.current=e,g(e)},[]),N=e.useCallback((e,t)=>{const a=h(e),l=h(t.rowId),n=_(e,t);return a&&l&&n?(s({...n,row:a,rowId:a.id,targetRow:l,targetRowId:l.id,position:t.position}),p(`${E(a)} moved ${i=E(l),o=t.position,"inside"===o?`inside ${i}`:`${o} ${i}`}.`),!0):(p("That row cannot be moved to this position."),!1);var i,o},[E,_,h,s]),y=e.useCallback((e,{input:t,element:a,source:l})=>{const n={rowId:e.id,instanceId:m},i=o.attachInstruction(n,{element:a,input:t,currentLevel:e.depth,indentPerLevel:24,mode:"standard"}),r=te(i),s=ee(l.data)&&l.data.instanceId===m&&Boolean(r&&_(l.data.rowId,r));return{...i,isValid:s}},[_,m]),I=e.useCallback((e,a)=>{if(!t.available)return()=>{};const l=e=>{const t=e.isValid?te(e):null;w(t)};return i.dropTargetForElements({element:a,canDrop:({source:t})=>ee(t.data)&&t.data.instanceId===m&&t.data.rowId!==e.id&&!e.getParentRows().some(e=>e.id===t.data.rowId),getData:t=>y(e,t),onDragEnter:({self:e})=>l(e.data),onDrag:({self:e})=>l(e.data),onDragLeave:()=>{var t;(null===(t=f.current)||void 0===t?void 0:t.rowId)===e.id&&w(null)}})},[t,y,m,w]),R=e.useCallback((e,a)=>{const l=a.closest("tr");return t.available&&l instanceof HTMLElement?i.draggable({element:l,dragHandle:a,getInitialData:()=>({type:Q,instanceId:m,rowId:e.id})}):()=>{}},[t,m]);e.useEffect(()=>{if(t.available)return i.monitorForElements({canMonitor:({source:e})=>ee(e.data)&&e.data.instanceId===m,onDragStart:({source:e})=>{if(!ee(e.data))return;const t=h(e.data.rowId);b(e.data.rowId),t&&p(`${E(t)} grabbed. Choose a destination.`)},onDrop:({source:e,location:t})=>{var a;if(ee(e.data)){const l=null===(a=t.current.dropTargets[0])||void 0===a?void 0:a.data,n=!0===(null==l?void 0:l.isValid)?te(l):null;n?N(e.data.rowId,n):p("Row move cancelled.")}b(null),w(null)}})},[N,t,E,h,m,w]),e.useEffect(()=>{if("inside"!==(null==x?void 0:x.position))return;const e=h(x.rowId);if(!(null==e?void 0:e.getCanExpand())||e.getIsExpanded())return;const t=window.setTimeout(()=>e.toggleExpanded(!0),500);return()=>window.clearTimeout(t)},[x,h]);const C=e.useCallback(e=>{var a;if(!t.available)return[];const l=e.parentId?h(e.parentId):null,n=null!==(a=null==l?void 0:l.subRows)&&void 0!==a?a:d.getCoreRowModel().rows,i=n.findIndex(t=>t.id===e.id);if(-1===i)return[];const o=n[i-1],r=n[i+1],s=n[0],c=n[n.length-1],m=[];if(i>1&&s&&m.push({id:"top",label:"Move to top",target:{rowId:s.id,position:"before"}}),o&&m.push({id:"up",label:"Move up",target:{rowId:o.id,position:"before"}}),r&&m.push({id:"down",label:"Move down",target:{rowId:r.id,position:"after"}}),i<n.length-2&&c&&m.push({id:"bottom",label:"Move to bottom",target:{rowId:c.id,position:"after"}}),l){let e=l;for(;e.parentId;){const t=h(e.parentId);if(!t)break;e=t}m.push({id:"move-to-root",label:"Move to root",target:{rowId:e.id,position:"after"}})}return d.getCoreRowModel().flatRows.forEach(t=>{t.id!==e.parentId&&m.push({id:`move-to:${t.id}`,label:`Move to ${E(t)}`,target:{rowId:t.id,position:"inside"}})}),m.filter(t=>Boolean(_(e.id,t.target)))},[t,E,_,h,d]),k=e.useCallback(e=>{var a;if(!t.available)return!1;const l=e.parentId?h(e.parentId):null;return(null!==(a=null==l?void 0:l.subRows)&&void 0!==a?a:d.getCoreRowModel().rows).length>1||"siblings"!==c&&("all"===c?Boolean(l):!(!n||0===e.depth)&&d.getCoreRowModel().flatRows.some(t=>t.depth===e.depth-1&&t.id!==e.parentId))},[t,n,h,c,d]),S=e.useMemo(()=>({activeTarget:x,availability:t,draggingRowId:v,getActions:C,getLabel:E,hasActions:k,moveRow:N,registerHandle:R,registerRow:I}),[x,t,N,v,C,E,k,R,I]);return e.createElement(X.Provider,{value:S},a,e.createElement("span",{className:"maxio-data-table__live-region",role:"status","aria-live":"polite","aria-atomic":"true"},u))},le=({children:l,row:n,isChild:i,isHeader:o,className:r,onRowAction:s,...c})=>{var d,m,u,p,x;const g=null===(d=null==n?void 0:n.getIsSelected)||void 0===d?void 0:d.call(n),v=(null===(m=null==n?void 0:n.getCanExpand)||void 0===m?void 0:m.call(n))&&(null===(u=null==n?void 0:n.getIsExpanded)||void 0===u?void 0:u.call(n)),b=Boolean(n&&s&&!o&&!i),f=e.useRef(null),h=J(),E=null==h?void 0:h.registerRow,_=e.useRef(null),w=e=>{_.current=e.target},{pressProps:N}=a.usePress({isDisabled:!b,onPress:e=>{var t;const a=null!==(t=_.current)&&void 0!==t?t:e.target;_.current=null,n&&s&&!(e=>e instanceof Element&&Boolean(e.closest("a,button,input,select,textarea,label,.maxio-data-table__cell--controls,.maxio-data-table__cell--actions")))(a)&&s(n)}}),{focusProps:y,isFocused:I}=a.useFocusRing(),R=t({"maxio-data-table__row":!o,"maxio-data-table__header-row":o,"maxio-data-table__row--active":g||I,"maxio-data-table__row--expanded":v,"maxio-data-table__row--expanded-child":i,"maxio-data-table__row--actionable":b,"maxio-data-table__row--dragging":Boolean(n)&&(null==h?void 0:h.draggingRowId)===(null==n?void 0:n.id),[`maxio-data-table__row--drop-${null===(p=null==h?void 0:h.activeTarget)||void 0===p?void 0:p.position}`]:Boolean(n)&&(null===(x=null==h?void 0:h.activeTarget)||void 0===x?void 0:x.rowId)===(null==n?void 0:n.id)},r);e.useEffect(()=>{if(n&&E&&f.current&&!o&&!i)return E(n,f.current)},[i,o,E,n]);const C=b?a.mergeProps({onClickCapture:w,onKeyDownCapture:w,tabIndex:0},N,y,c):c;return e.createElement("tr",{...C,ref:f,className:R,tabIndex:b?C.tabIndex:c.tabIndex},l)},ne=e.createContext({}),ie=e.forwardRef(({checked:a,disabled:l,invalid:n,indeterminate:i,className:o,inputProps:r,error:s,label:c},d)=>{const m=t("maxio-checkbox",{"maxio-checkbox--checked":a,"maxio-checkbox--disabled":l,"maxio-checkbox--error":n,"maxio-checkbox--indeterminate":i},o);return e.createElement("label",{className:m},e.createElement("input",{type:"checkbox",role:"checkbox",className:"maxio-checkbox__input",ref:d,...r}),e.createElement("span",{className:"maxio-checkbox__control"},s&&e.createElement("span",{className:"maxio-checkbox__control-error"})),c&&e.createElement("span",{className:"maxio-checkbox__label"},c))});ie.displayName="InnerCheckbox";const oe=({label:t,error:l=!1,className:n,indeterminate:i,value:o="",disabled:s,readOnly:c,defaultChecked:d,checked:m,...u})=>{const p=e.useRef(null),x=e.useContext(ne),{inputProps:g,isDisabled:v,isInvalid:b,isSelected:f}=x&&Object.keys(x).length>0?a.useCheckboxGroupItem({value:o,"aria-label":null!=t?t:u["aria-label"],isDisabled:s,isInvalid:l,isIndeterminate:i,isReadOnly:c,...u},x,p):a.useCheckbox({"aria-label":null!=t?t:u["aria-label"],isDisabled:s,isInvalid:l,isIndeterminate:i,isReadOnly:c,value:o,...u},r.useToggleState({...u,isSelected:m,defaultSelected:d}),p);return e.createElement(ie,{inputProps:g,checked:f,disabled:v,invalid:b,indeterminate:i,className:n,error:l,label:t,ref:p,...u})},re=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-form-helper-text",l),...n},a),se=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-form-error",l),...n},e.createElement(E,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},a)),ce=({table:t,enableRowSelection:a,enableRowReordering:l})=>{var n,i,o,r;const s=null===(n=null==t?void 0:t.getToggleAllPageRowsSelectedHandler)||void 0===n?void 0:n.call(t),c=(null===(i=null==t?void 0:t.getIsAllPageRowsSelected)||void 0===i?void 0:i.call(t))||(null===(o=null==t?void 0:t.getIsAllRowsSelected)||void 0===o?void 0:o.call(t)),d=null===(r=null==t?void 0:t.getIsSomePageRowsSelected)||void 0===r?void 0:r.call(t);return a?e.createElement(e.Fragment,null,l&&e.createElement("span",{className:"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon","aria-hidden":"true",style:{visibility:"hidden"}}),e.createElement(oe,{"aria-label":"Select all rows",onChange:e=>{s("boolean"==typeof e?{target:{checked:e}}:e)},checked:c,indeterminate:!c&&d})):null},de=({className:a,hideArrow:l=!1,children:n,offset:i=4,...o})=>e.createElement(c.Popover,{...o,className:t("maxio-popover",a),offset:i},e.createElement(e.Fragment,null,!l&&e.createElement(c.OverlayArrow,{className:"maxio-popover__arrow"},e.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12","aria-hidden":!0},e.createElement("path",{d:"M0 0 L6 6 L12 0"}))),n)),me=({row:t})=>{var a,l;const n=J(),i=null==n?void 0:n.registerHandle,o=null==n?void 0:n.getActions,r=null==n?void 0:n.hasActions,s=e.useRef(null),[d,m]=e.useState(!1),u=(null==n?void 0:n.draggingRowId)===t.id,p=null!==(a=null==n?void 0:n.getLabel(t))&&void 0!==a?a:t.id,x=e.useMemo(()=>{var e;return null!==(e=null==r?void 0:r(t))&&void 0!==e&&e},[r,t]),g=e.useMemo(()=>{var e;return d&&null!==(e=null==o?void 0:o(t))&&void 0!==e?e:[]},[o,d,t]),v=null!==(l=n&&!n.availability.available?n.availability.message:void 0)&&void 0!==l?l:x?void 0:`No moves are available for ${p}.`;e.useEffect(()=>{if(i&&s.current&&!v)return i(t,s.current)},[i,t,v]),e.useEffect(()=>{v&&m(!1)},[v]);const b=e.createElement(c.Button,{ref:s,type:"button",className:"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon maxio-data-table__drag-handle","aria-label":`Reorder ${p}`,"aria-pressed":u,"aria-disabled":!!v||void 0,onPress:()=>{v||m(!0)}},e.createElement("i",{className:"fa-sharp fa-solid fa-grip-dots-vertical "+(v?"maxio-icon--disabled":"maxio-icon--secondary")}));return v?e.createElement(c.TooltipTrigger,{delay:0,closeDelay:0},b,e.createElement(c.Tooltip,{placement:"bottom start",offset:8,className:"maxio-tooltip maxio-tooltip--arrow-top-left"},e.createElement("div",{className:"maxio-tooltip__content"},v))):e.createElement(c.MenuTrigger,{trigger:"longPress",isOpen:d,onOpenChange:m},b,e.createElement(de,{placement:"bottom start",hideArrow:!0},e.createElement(c.Menu,{autoFocus:"first",className:"maxio-data-table__reorder-menu",items:g,onAction:e=>{const a=g.find(t=>t.id===e);a&&(null==n||n.moveRow(t.id,a.target),requestAnimationFrame(()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.focus()}))}},t=>e.createElement(c.MenuItem,{id:t.id,textValue:t.label,className:"maxio-data-table__reorder-menu-item"},t.label))))},ue=({row:t,enableRowSelection:a,enableRowReordering:l})=>{var n,i,o,r;const s=null===(n=null==t?void 0:t.getToggleSelectedHandler)||void 0===n?void 0:n.call(t),c=(null===(i=null==t?void 0:t.getIsSelected)||void 0===i?void 0:i.call(t))||(null===(o=null==t?void 0:t.getIsAllSubRowsSelected)||void 0===o?void 0:o.call(t)),d=null===(r=null==t?void 0:t.getIsSomeSelected)||void 0===r?void 0:r.call(t),m=t.id||t.index;return e.createElement(e.Fragment,null,l&&e.createElement(me,{row:t}),a&&e.createElement(oe,{"aria-label":`Select row ${m}`,onChange:s,checked:c,indeterminate:d}))},pe=({children:t})=>e.createElement("div",{className:"maxio-data-table__cell-flex"},t),xe=({row:a,cell:l,children:n,className:i,...o})=>{var r,s,c,d,m,u;const p=null==l?void 0:l.column,x=null===(s=null===(r=null==p?void 0:p.columnDef)||void 0===r?void 0:r.meta)||void 0===s?void 0:s.align,g=null===(d=null===(c=null==p?void 0:p.columnDef)||void 0===c?void 0:c.meta)||void 0===d?void 0:d.controls,v=null===(u=null===(m=null==p?void 0:p.columnDef)||void 0===m?void 0:m.meta)||void 0===u?void 0:u.actions,b=null==p?void 0:p.getIsPinned(),f=t("maxio-data-table__cell",i,{[`maxio-data-table__cell--pinned-${b}`]:b,[`maxio-data-table__cell--${x}`]:x,"maxio-data-table__cell--controls":g,"maxio-data-table__cell--actions":v}),h="left"===b?{left:null==p?void 0:p.getStart("left")}:"right"===b?{right:null==p?void 0:p.getAfter("right")}:{};return e.createElement("td",{className:f,style:h,...o},n)},ge=({row:t,SubRowComponent:a,pattern:l,enableExpanding:i,onRowAction:o})=>{var r,s,c,d,m;const u=a&&t.getParentRow()&&t.getParentRow().getIsExpanded(),p=u&&t.getVisibleCells()[0].column.columnDef.id===A,x=u&&t.getVisibleCells()[t.getVisibleCells().length-1].column.columnDef.id===F,g=[x,p].filter(Boolean).length,v=t.getVisibleCells().length-g,b=null!==(s=null===(r=t.getParentRow())||void 0===r?void 0:r.index)&&void 0!==s?s:t.index,f=l&&a&&b%2==1?"maxio-data-table__row--with-pattern":void 0,h=null===(c=t.getCanExpand)||void 0===c?void 0:c.call(t),_=null===(d=null==t?void 0:t.getToggleExpandedHandler)||void 0===d?void 0:d.call(t),w=null===(m=null==t?void 0:t.getIsExpanded)||void 0===m?void 0:m.call(t),N=h&&i?0:1.75,y=t.getVisibleCells()[0].column.columnDef.id===A?1:0,I=t.getVisibleCells().find(({column:e})=>{var t;const{actions:a,controls:l}=null!==(t=e.columnDef.meta)&&void 0!==t?t:{};return!a&&!l}),R=o&&I?I.id:void 0;return e.createElement(e.Fragment,{key:t.id},u?e.createElement(le,{key:`${t.id}-sub`,row:t,isChild:!0,className:f},p&&e.createElement(xe,{className:"maxio-data-table__cell--pinned-left"}),e.createElement(xe,{colSpan:v},a(t)),x&&e.createElement(xe,{className:"maxio-data-table__cell--pinned-right"})):e.createElement(le,{key:`${t.id}-parent`,row:t,className:f,onRowAction:o,"aria-labelledby":R},t.getVisibleCells().map(a=>{const l=i&&a.column.getIndex()===y;return e.createElement(xe,{key:a.id,row:t,cell:a,id:a.id},e.createElement("div",{className:"maxio-data-table__cell-flex",style:i&&l?{paddingLeft:`${(null==t?void 0:t.depth)+N}rem`}:void 0},i&&h&&l&&e.createElement(S,{size:"sm",variant:"ghost",icon:e.createElement(E,{size:"xs",variant:w?"chevron-down":"chevron-right"}),onClick:_,"aria-label":w?"Collapse row":"Expand row","data-open":w,className:"maxio-data-table__expand-button"}),n.flexRender(a.column.columnDef.cell,a.getContext())))})))},ve={available:!0},be={available:!1,reason:"filtering",message:"Reordering is unavailable while the table is filtered."},fe={available:!1,reason:"grouping",message:"Reordering is unavailable while the table is grouped."},he={available:!1,reason:"pagination",message:"Reordering is unavailable while the table is paginated."},Ee=(e=[])=>e.filter(e=>e!==A&&e!==F),_e=[],we=e=>e.subRows,Ne={sm:"h3",md:"h2",lg:"h1"},ye=({children:a,size:l="sm",className:n,...i})=>{const o=Ne[l],r=t(`maxio-heading-${l}`,n);return e.createElement(o,{className:r,...i},a)},Ie={click:m.useClick,hover:e=>m.useHover(e,{delay:100}),focus:m.useFocus,dismiss:m.useDismiss},Re=(e,t)=>t.map(t=>Ie[t](e)),Ce=({placement:t="top",isActive:a=!1,interactions:l=["hover"],floatingElementOffset:n=0,onOverlayUpdate:i,autoHideMs:o})=>{const r=e.useRef(null),{strategy:s,x:c,y:d,context:u,floating:p,reference:x}=m.useFloating({placement:t,open:a,onOpenChange:e=>i(e),middleware:[m.offset(n)]}),{getReferenceProps:g,getFloatingProps:v}=m.useInteractions([...Re(u,l),m.useRole(u,{role:"tooltip"})]);e.useEffect(()=>{r.current&&clearTimeout(r.current),a&&o&&(r.current=window.setTimeout(()=>i(!1),o))},[a,o]);return{isActive:a,refs:{floating:p,reference:x},floatingElementCSSPosition:{position:s,top:null!=d?d:0,left:null!=c?c:0},getReferenceProps:g,getFloatingProps:v}};function ke(t,a=0){const l=e.useRef((new Date).getTime()),n=e.useRef((new Date).getTime()),[i,o]=e.useState(!1);return e.useEffect(()=>{const e=()=>{l.current=(new Date).getTime(),o(!0)},i=()=>{n.current=(new Date).getTime(),window.setTimeout(()=>{l.current-n.current<=0&&o(!1)},a)},r=t&&t.current;return r&&(r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",i)),()=>{r&&(r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",i))}},[t]),i}function Se(t=500){const[a,l]=e.useState(()=>{if("undefined"==typeof window)return{windowWitdh:0,windowHeight:0};const{innerWidth:e,innerHeight:t}=window;return{windowWitdh:e,windowHeight:t}}),n=e.useRef(null);return e.useEffect(()=>{if("undefined"==typeof window)return;const e=()=>{var e;const{innerWidth:a,innerHeight:i}=window;window.clearTimeout(null!==(e=n.current)&&void 0!==e?e:void 0),n.current=window.setTimeout(()=>{l({windowWitdh:a,windowHeight:i})},t)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[t]),a}function Pe(t){const[a,n]=e.useState(()=>{var e,a;return null!==(a=null===(e=t.current)||void 0===e?void 0:e.clientWidth)&&void 0!==a?a:0}),i=()=>{var e,a;const l=null!==(a=null===(e=t.current)||void 0===e?void 0:e.clientWidth)&&void 0!==a?a:0;n(e=>0===l&&e>0?e:l)};return e.useLayoutEffect(i,[t]),l.useResizeObserver({ref:t,onResize:i}),a}const Te=({children:a,usePortal:l=!1,isActive:n=!1,placement:i="top",interactions:o=["hover"],role:r="tooltip",renderOverlay:s,floatingElementOffset:c,motionSettings:u={},autoHideMs:p,onOverlayUpdate:x,className:g})=>{const{getReferenceProps:v,getFloatingProps:b,refs:{floating:f,reference:h},floatingElementCSSPosition:E}=Ce({isActive:n,onOverlayUpdate:x,autoHideMs:p,floatingElementOffset:c,interactions:o,placement:i}),_=e.createElement(d.AnimatePresence,null,n&&e.createElement(d.motion.div,{ref:f,style:E,...u,...b()},s()));return e.createElement(e.Fragment,null,e.createElement("div",{ref:h,className:t("maxio-inline-flex",g),...v(),"data-testid":"overlay-trigger"},a),l?e.createElement(m.FloatingPortal,{id:"maxio-ui-portal"},_):_)},$e=({children:a,arrowPosition:l,size:n="regular",maxWidth:i=160})=>e.createElement("div",{"data-testid":"tooltip",className:t("maxio-tooltip",`maxio-tooltip--${n}`,{[`maxio-tooltip--arrow-${l}`]:l})},e.createElement("div",{className:"maxio-tooltip__content",style:{maxWidth:i}},a)),De={top:"bottom",right:"left",bottom:"top",left:"right","top-start":"bottom-left","top-end":"bottom-right","right-start":"left-top","right-end":"left-bottom","bottom-start":"top-left","bottom-end":"top-right","left-start":"right-top","left-end":"right-bottom"},Me=({children:t,interactions:a=["hover"],placement:l="right",maxWidth:n=160,size:i="regular",renderContent:o,autoHideMs:r,isVisible:s,usePortal:c,className:d,onVisibilityUpdate:m,floatingElementOffset:u=5})=>{const[p,x]=e.useState(!1),g=void 0!==s,v=e.useRef(null),b=e.useCallback(e=>{v.current&&clearTimeout(v.current),v.current=window.setTimeout(()=>{g||x(e),m&&m(e)},50)},[g,m]),f=e.useMemo(()=>(e=>{const t=e.startsWith("top")||e.startsWith("bottom")?"Y":"X",a=`translate${t}(${e.startsWith("bottom")||e.startsWith("right")?"-":""}10px)`;return{initial:{opacity:0,visibility:"hidden",transform:a},animate:{opacity:1,visibility:"visible",transform:`translate${t}(0px)`},exit:{opacity:0,visibility:"hidden",transform:a},transition:{ease:[.4,0,.5,1],duration:.2}}})(l),[l]);return e.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]),e.createElement(Te,{role:"tooltip",className:d,floatingElementOffset:u,motionSettings:f,isActive:g?s:p,onOverlayUpdate:b,autoHideMs:r,usePortal:c,placement:l,interactions:a,renderOverlay:()=>e.createElement($e,{size:i,arrowPosition:De[l],maxWidth:n},o())},t)},Oe=({as:a="div",children:l,compact:n=!1,size:i="md",className:o,...r})=>{const s=a,c=t({[`maxio-body-${i}`]:!n,[`maxio-body-${i}-compact`]:n},o);return e.createElement(s,{className:c,...r},l)},Be=({className:a,...l})=>e.createElement(c.ListBox,{...l,className:t("maxio-listbox",a)});Be.displayName="ListBox";const ze=({className:a,...l})=>{const n=l.textValue||("string"==typeof l.children?l.children:void 0);return e.createElement(c.ListBoxItem,{...l,textValue:n,className:t("maxio-listbox__item",a)},c.composeRenderProps(l.children,(t,{isSelected:a})=>e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-listbox__content"},"string"==typeof t?e.createElement(Oe,{size:"sm"},t):t),a&&e.createElement(E,{variant:"check"}))))};ze.displayName="ListBox.Item";const Le=({className:a,...l})=>e.createElement(c.ListBoxSection,{...l,className:t("maxio-listbox__section",a)});Le.displayName="ListBox.Section";const Ae=({className:a,...l})=>e.createElement(c.Header,{...l,className:t("maxio-listbox__header",a)});Ae.displayName="ListBox.Header";const Fe=Object.assign(Be,{Item:ze,Section:Le,Header:Ae}),He=({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:o,description:r,errorMessage:s,leadingElement:d=null,fullWidth:m,className:u,placeholder:p,renderEmptyState:x,selectionMode:g,children:v,...b})=>{const f=e.useRef(null),h=e.useRef(null),[_,w]=e.useState(),[N,y]=e.useState(0),I=!!s,R=l||I,C=v,k=e.useCallback(()=>{const e=f.current;if(!e)return;const t=h.current,a=t?t.getBoundingClientRect().left-e.getBoundingClientRect().left:0;y(e=>e===-a?e:-a),w(t=>{const a=`${e.offsetWidth}px`;return(null==t?void 0:t["--trigger-width"])===a?t:{"--trigger-width":a}})},[]);e.useEffect(()=>{const e=f.current;if(!e)return;if(k(),"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(k);return t.observe(e),()=>t.disconnect()},[k]);const S=t("maxio-text-field",`maxio-text-field--${i}`,{"maxio-text-field--disabled":a,"maxio-text-field--error":R,"maxio-text-field--readonly":n,"maxio-text-field--full-width":m},u);return e.createElement(c.ComboBox,{...b,isDisabled:a,isInvalid:R,isReadOnly:n,selectionMode:g,className:S},o&&e.createElement(c.Label,{className:"maxio-text-field__label"},o),e.createElement("div",{ref:f,className:"maxio-text-field__items"},d&&e.createElement("div",{className:"maxio-text-field__leading-element"},d),e.createElement(c.Input,{ref:h,className:"maxio-text-field__input",placeholder:p}),e.createElement("div",{className:"maxio-text-field__trailing-element"},e.createElement(c.Button,{className:t("maxio-button","maxio-button--ghost","maxio-button--icon","maxio-button--sm")},e.createElement(E,{variant:"chevron-up-down"})))),r&&!I&&e.createElement(c.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),s&&e.createElement(c.FieldError,{className:"maxio-form-error"},t=>e.createElement(e.Fragment,null,e.createElement(E,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},"function"==typeof s?s(t):s))),e.createElement(de,{hideArrow:!0,className:"maxio-combobox__popover",crossOffset:N,style:_},e.createElement(Fe,{renderEmptyState:x},C)))};He.displayName="ComboBox";const Ve=t=>e.createElement(Fe.Item,{...t});Ve.displayName="ComboBox.Item";const We=t=>e.createElement(Fe.Section,{...t});We.displayName="ComboBox.Section";const je=t=>e.createElement(Fe.Header,{...t});je.displayName="ComboBox.Header";const qe=Object.assign(He,{Item:Ve,Section:We,Header:je}),Ge=e.createContext({}),Ke=e.forwardRef(({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:o,description:r,errorMessage:s,leadingElement:d=null,trailingElement:m=null,fullWidth:u,className:p,...x},g)=>{const v=t("maxio-text-field",`maxio-text-field--${i}`,{"maxio-text-field--disabled":a,"maxio-text-field--error":l,"maxio-text-field--readonly":n,"maxio-text-field--full-width":u},p);return e.createElement(c.TextField,{...x,isDisabled:a,isReadOnly:n,isInvalid:l,className:v},o&&e.createElement(c.Label,{className:"maxio-text-field__label"},o),e.createElement("div",{className:"maxio-text-field__items"},d&&e.createElement("div",{className:"maxio-text-field__leading-element"},d),e.createElement(c.Input,{ref:g,className:"maxio-text-field__input"}),m&&e.createElement("div",{className:"maxio-text-field__trailing-element"},m)),r&&!(l&&s)&&e.createElement(c.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),s&&e.createElement(c.FieldError,{className:"maxio-form-error"},e.createElement(E,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},s)))});Ke.displayName="TextField";const Ue=e.forwardRef(({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:o,description:r,errorMessage:s,fullWidth:d,className:m,...u},p)=>{const x=t("maxio-text-area",`maxio-text-area--${i}`,{"maxio-text-area--disabled":a,"maxio-text-area--error":l,"maxio-text-area--readonly":n,"maxio-text-area--full-width":d},m);return e.createElement(c.TextField,{...u,isDisabled:a,isReadOnly:n,isInvalid:l,className:x},o&&e.createElement(c.Label,{className:"maxio-form-label"},o),e.createElement(c.TextArea,{ref:p,className:"maxio-text-area__input"}),r&&!(l&&s)&&e.createElement(c.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),s&&e.createElement(c.FieldError,{className:"maxio-form-error"},e.createElement(E,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},s)))});Ue.displayName="TextArea";const Ze=e.forwardRef(({disabled:l=!1,invalid:n=!1,readOnly:i=!1,size:o="md",label:r,helperText:s,showErrorMessage:c=!0,errorMessage:d,leadingElement:m=null,trailingElement:u=null,fullWidth:p,className:x,...g},v)=>{var b,f;const h=e.useRef(null);e.useImperativeHandle(v,()=>h.current),e.useEffect(()=>{console.warn("TextInput is deprecated. Please use TextField instead.")},[]);const{spellCheck:E,..._}=g,w={..._,label:r,description:s,errorMessage:d,defaultValue:null===(b=g.defaultValue)||void 0===b?void 0:b.toString(),value:null===(f=g.value)||void 0===f?void 0:f.toString(),isDisabled:l,isReadOnly:i,isInvalid:n},{labelProps:N,inputProps:y,descriptionProps:I,errorMessageProps:R}=a.useTextField(w,h),C=t("maxio-text-field",`maxio-text-field--${o}`,{"maxio-text-field--disabled":l,"maxio-text-field--error":n,"maxio-text-field--readonly":i,"maxio-text-field--full-width":p},x),k=n&&d&&c;return e.createElement("div",{className:C},r&&e.createElement("label",{className:"maxio-text-field__label",...N},r),e.createElement("div",{className:"maxio-text-field__items"},m&&e.createElement("div",{className:"maxio-text-field__leading-element"},m),e.createElement("input",{ref:h,type:"text",className:"maxio-text-field__input",...y,spellCheck:E}),u&&e.createElement("div",{className:"maxio-text-field__trailing-element"},u)),s&&!k&&e.createElement("div",{className:"maxio-form-helper-text",...I},s),k&&e.createElement(se,{...R},d))});Ze.displayName="TextInput";const Ye=({options:l,label:n,size:i="md",inline:o=!1,disabled:r=!1,helperText:s,errorMessage:c,fullWidth:d=!1,...m})=>{const u=t("maxio-select",`maxio-select--${i}`,{"maxio-select--disabled":r,"maxio-select--inline":o,"maxio-select--error":!!c,"maxio-select--full-width":d}),p=a.useId();return e.createElement("div",{className:u},n&&e.createElement("label",{htmlFor:p,className:"maxio-select__label"},n),e.createElement("div",{className:"maxio-select__input-container"},e.createElement("select",{id:p,className:"maxio-select__input",disabled:r,...m},l.map(t=>e.createElement("option",{key:`option-${t.value}`,value:t.value,disabled:t.disabled},t.label))),e.createElement(E,{variant:"chevron-up-down"})),!!c&&e.createElement(se,null,c),s&&!c&&e.createElement("div",{className:"maxio-form-helper-text"},s))},Qe=({className:a,size:l="md",fullWidth:n=!1,selectionMode:i="single",orientation:o="horizontal",disallowEmptySelection:r=!0,...s})=>e.createElement(c.ToggleButtonGroup,{...s,selectionMode:i,orientation:o,disallowEmptySelection:r,className:c.composeRenderProps(a,e=>t("maxio-segmented-control",`maxio-segmented-control--${l}`,{"maxio-segmented-control--full-width":n},e))});Qe.displayName="SegmentedControl";const Xe=({className:a,children:l,...n})=>e.createElement(c.ToggleButton,{...n,className:c.composeRenderProps(a,e=>t("maxio-segmented-control__item",e))},c.composeRenderProps(l,t=>e.createElement(e.Fragment,null,e.createElement(c.SelectionIndicator,{className:"maxio-segmented-control__selection-indicator","data-selected":!0}),t)));Xe.displayName="SegmentedControl.Item";const Je=Object.assign(Qe,{Item:Xe}),et=({leadingIcon:t,trailingIcon:a,type:l="menu",children:n,leadingIconClassName:i,isTooltipVisible:o=!1})=>e.createElement(e.Fragment,null,t&&e.createElement(Me,{usePortal:!0,isVisible:o,renderContent:()=>n,floatingElementOffset:12},e.createElement("span",{className:"maxio-side-nav__icon"},e.createElement(E,{variant:t,className:i}))),e.createElement("span",{className:`maxio-side-nav__${l}-title`,"data-testid":"maxio-sidebar-section-name"},n),a&&e.createElement("span",{className:"maxio-side-nav__menu-chevron"},e.createElement(E,{variant:a}))),tt=e=>"heading"!==e.type,at=e=>{const t=(e=>e.flat().filter(tt).map(e=>e.items).flat().find(e=>null==e?void 0:e.isCurrent))(e);return t?e.map(e=>e.map(e=>{var a;return tt(e)&&(null===(a=e.items)||void 0===a?void 0:a.includes(t))?{...e,isOpen:!0}:e})):e},lt=e.createContext({}),nt=()=>e.useContext(lt),it=({children:t,isOpen:a,onChange:l,withIcons:n=!0,sections:i,shouldToggleSidebar:o=!0,topDropdownItems:r,collapseBreakpoint:s=800})=>{const c=e.useRef(!1),[d,m]=e.useState(()=>!o||("boolean"==typeof a?a:"undefined"==typeof window||window.innerWidth>s)),[u,p]=e.useState(()=>at(i)),{windowWitdh:x}=Se(200);e.useEffect(()=>{c.current&&(null==l||l(d))},[d,l]),e.useEffect(()=>{c.current=!0},[]),e.useEffect(()=>{!function(e){if(!o)return;e<s&&d&&g()}(x)},[x]),e.useEffect(()=>{"boolean"==typeof a&&m(a)},[a]);const g=()=>{m(!1)};return e.createElement(lt.Provider,{value:{sections:u,topDropdownItems:r,onSectionOpen:e=>{p(t=>t.map(t=>t.map(t=>tt(t)?{...t,isOpen:(null==t?void 0:t.name)===e&&!t.isOpen}:t)))},isOpen:d,onOpen:()=>{m(!0)},onClose:g,withIcons:n,shouldToggleSidebar:o}},t)},ot=()=>{const{onOpen:t,topDropdownItems:a,isOpen:l}=nt(),{mainItem:n,otherItems:i,actions:o}=a,r=e.useRef(null),s=ke(r),c=({id:e,title:t,icon:a,iconClass:l,url:n,...i})=>({id:e,label:t,leadingIconName:a,leadingIconClassName:l,link:{href:n,...i}}),{items:d,itemsCount:m}=e.useMemo(()=>({itemsCount:i.length+o.length,items:[...i.map(c),(null==i?void 0:i.length)>0&&(null==o?void 0:o.length)>0?{type:"divider",id:"item-divider"}:null,...o.map(c)].filter(e=>null!=e)}),[o,i]);return e.createElement(e.Fragment,null,0===m?e.createElement("a",{className:"maxio-side-nav__menu-button maxio-side-nav__menu-button--large",href:n.url,onClick:t},e.createElement("span",{className:"maxio-side-nav__menu-title"},n.title)):e.createElement("details",{className:"maxio-action-menu maxio-side-nav--action-menu"},e.createElement("summary",{onClick:t,className:"maxio-side-nav__menu-button","aria-haspopup":"true",ref:r},n.url?e.createElement(e.Fragment,null,e.createElement(et,{type:"menu",isTooltipVisible:!l&&s,leadingIcon:n.icon,trailingIcon:"chevron-up-down",leadingIconClassName:n.iconClass},n.title)):e.createElement(et,{type:"menu",trailingIcon:"chevron-up-down"},n.title)),e.createElement(N,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:d,small:!0})))},rt=({section:t})=>{const{isOpen:a,withIcons:l}=nt(),n=e.useRef(null),i=ke(n);return e.createElement("li",{className:"maxio-side-nav__item","data-key":t.key,"data-testid":"maxio-sidebar-section"},e.createElement("a",{className:"maxio-side-nav__link","aria-current":t.isCurrent?"page":void 0,role:"button",href:t.href,ref:n},e.createElement(et,{isTooltipVisible:i&&!a,type:"menu",leadingIcon:l?t.icon:void 0},t.name)))},st=({section:a})=>{var l,n;const{onOpen:i,onSectionOpen:o,isOpen:r,withIcons:s}=nt(),c=e.useRef(null),d=ke(c);if(!tt(a))return e.createElement("li",{className:"maxio-side-nav__item-header"},a.title);return a.Component?e.createElement(a.Component,{section:a}):a.href?e.createElement(rt,{section:a}):e.createElement("li",{className:t("maxio-side-nav__item",{"maxio-side-nav__item--icon":s}),"data-testid":"maxio-sidebar-section"},e.createElement("button",{className:"maxio-side-nav__menu-button",ref:c,"aria-expanded":a.isOpen?"true":"false",type:"button",onClick:()=>{o(a.name),i()}},e.createElement(et,{type:"menu",isTooltipVisible:!r&&d,leadingIcon:s?a.icon:void 0,trailingIcon:(null===(l=a.items)||void 0===l?void 0:l.length)?"chevron-down":void 0},a.name)),e.createElement("ul",{className:"maxio-side-nav__menu"},null===(n=a.items)||void 0===n?void 0:n.map(t=>e.createElement("li",{key:`section-sub-item-${t.name}`,className:"maxio-side-nav__item","data-testid":"maxio-section-item"},e.createElement("a",{className:"maxio-side-nav__link",href:t.href,"aria-current":t.isCurrent?"page":void 0},e.createElement("span",{className:"maxio-side-nav__link-title"},t.name))))))},ct=()=>{const{sections:t}=nt();return e.createElement(e.Fragment,null,t.map((t,a)=>e.createElement("ul",{role:"list",className:"maxio-side-nav__items",key:`section-list-${a}`},t.map((t,l)=>e.createElement(st,{key:`section-list-item-${t.type}-${a}-${l}`,section:t})))))},dt=()=>{const{onClose:t,shouldToggleSidebar:a}=nt();return e.createElement("div",{className:"maxio-side-nav__logo-container"},e.createElement("a",{className:"maxio-side-nav__brand",href:"/","aria-label":"Maxio"}),a&&e.createElement("button",{className:"maxio-side-nav__menu-toggle","aria-label":"toggle sidebar",onClick:t},e.createElement(E,{variant:"sidebar"})))},mt=()=>{const{isOpen:a}=nt();return e.createElement("nav",{className:t("maxio-side-nav",{"maxio-side-nav--collapsed":!a})},e.createElement(dt,null),e.createElement(ot,null),e.createElement("div",{className:"maxio-side-nav__items-container"},e.createElement(ct,null)))},ut=({disabled:a=!1,value:l=0,className:n,id:i,isCurrent:o,...r})=>{const s="icon"===r.type,d=({isSelected:e})=>t("maxio-tabs__tab",n,{"maxio-tabs__tab--active":e,"maxio-tabs__tab--disabled":a,"maxio-tabs__tab--icon":s});if("icon"===r.type){const{icon:t,...n}=r;return e.createElement(c.Tab,{id:l,isDisabled:a,...n,className:d},e.createElement("div",{className:"maxio-tabs__tab__content"},t))}const{children:m,rightIcon:u,...p}=r;return e.createElement(c.Tab,{id:l,isDisabled:a,...p,className:d},e.createElement("div",{className:"maxio-tabs__tab__content"},m,u||null))},pt=e.createContext({variant:"line",withDivider:!1}),xt=({children:t,variant:a="line",withDivider:l=!1})=>e.createElement(pt.Provider,{value:{variant:a,withDivider:l}},t),gt=({children:a,value:l,className:n,id:i,...o})=>e.createElement(c.TabPanel,{id:l,className:t("maxio-tabs__panel",n),...o},a),vt=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__header",l),...n},a);vt.displayName="Card.Header";const bt=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__body",l),...n},a);bt.displayName="Card.Body";const ft=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__footer",l),...n},a);ft.displayName="Card.Footer";const ht=({children:a,className:l,variant:n="primary",...i})=>e.createElement("div",{className:t("maxio-card",`maxio-card--${n}`,l),...i},a);ht.displayName="Card";const Et=Object.assign(ht,{Header:vt,Body:bt,Footer:ft});var _t,wt,Nt,yt;function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},It.apply(null,arguments)}const Rt=e=>v.createElement("svg",It({xmlns:"http://www.w3.org/2000/svg","data-name":"Maxio Logo SVG",viewBox:"0 0 1036 240"},e),_t||(_t=v.createElement("path",{d:"M59.32 11.3 70.64 0l40.74 40.35v70.99H40.89L0 70.52l11.15-11.14 36.2 36.15h30.07l3.07-3.39-50.91-51.15 10.99-10.97 51.24 50.83 3.72-3.38V47.13zM180.68 11.3 169.36 0l-40.73 40.35v70.99h70.48L240 70.51l-11.15-11.14-36.2 36.15h-30.06l-3.07-3.39 50.91-51.15-10.99-10.97-51.24 50.83-3.72-3.38V47.12l36.2-35.83ZM59.32 228.7l11.31 11.29 40.74-40.35v-70.99H40.89L0 169.48l11.15 11.14 36.2-36.15h30.07l3.07 3.39-50.92 51.15 10.99 10.97 51.24-50.83 3.72 3.38v30.34zM180.68 228.7l-11.32 11.29-40.73-40.35v-70.99h70.48L240 169.48l-11.15 11.14-36.2-36.15h-30.06l-3.07 3.39 50.91 51.15-10.99 10.97-51.24-50.83-3.72 3.38v30.34zM1015.27 139.55c0-29.94-23.74-53.46-52.11-53.46s-52.11 23.52-52.11 53.46 23.74 53.46 52.11 53.46 52.11-23.52 52.11-53.46m20.32.95c-.5 40.27-32.73 72.76-72.43 72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71 72.44-73.71h.94c39.57.52 71.5 33.32 71.5 73.71v.95Z"})),wt||(wt=v.createElement("path",{fillRule:"evenodd",d:"M870.39 24h-20.33v20.33h20.33zm0 40.67h-20.33v148.59h20.33z"})),Nt||(Nt=v.createElement("path",{fillRule:"evenodd",d:"M850.05 24h20.33v20.33h-20.33zM695.01 82.85l50.83 56.28v6.53l-50.28 55.67 15.23 13.2 49.22-54.49h4.71l49.22 54.49 15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15 55.52h-3.96l-50.15-55.52L695 82.85ZM660.49 78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13 0-52.44 18.93-58.09 44.86l-.28 1.27 19.33 3.72.31-1.14c2.39-8.91 6.66-16.54 13.04-21.94 6.36-5.39 14.91-8.63 26.02-8.63s19.12 3.25 24.76 8.96c5.64 5.72 8.73 14.06 8.73 24.53v6.11L616.62 130l-3.26.68c-16.14 3.47-29.79 7.84-39.59 14.45-10.54 7.11-16.64 16.83-16.64 30.62 0 12.51 4.51 22.62 12.5 29.59 7.96 6.95 19.25 10.67 32.63 10.67 22.27 0 41.87-12.03 51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58Zm-40.09 68.13c-12.86 2.77-23.05 5.42-30.03 9.63-3.46 2.09-6.08 4.54-7.84 7.54s-2.71 6.62-2.71 11.15c0 6.38 2.1 12.12 6.32 16.27 4.22 4.14 10.7 6.82 19.7 6.82 26.85 0 47.46-20.48 47.46-51.36v-7.2l-32.9 7.14Z"})),yt||(yt=v.createElement("path",{d:"M434.8 188.74h4.54l61.73-164.33.15-.41h35.57v189.35H515.9V55.37h-4.33l-59.7 157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98H336V24h35.57z"}))),Ct=a=>{const{size:l="sm",className:n,variant:i="lockup",alt:o="maxio logo"}=a,r="mark"===i,s="number"==typeof l;return e.createElement(Rt,{role:"img",viewBox:r?"0 0 240 240":"0 0 1036 240","aria-label":o,height:s?l:void 0,className:t("maxio-logo",!s&&`maxio-logo--${l}`,r&&"maxio-logo--mark",n)})},kt=({state:a,...l})=>{var n,i;const o=e.useRef(null),{toastProps:r,contentProps:s,titleProps:c,closeButtonProps:d}=x.useToast(l,a,o),{closable:m=!0,underline:u=!0,external:p=!1}=l.toast.content,g=t("maxio-toast",{[`maxio-toast--${l.toast.content.sentiment}`]:l.toast.content.sentiment}),v={default:"info-circle-fill",success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[l.toast.content.sentiment||"default"];return e.createElement("div",{className:g,"data-maxio-mode":"dark",...r,ref:o},e.createElement(E,{variant:v,className:"maxio-toast__icon"}),e.createElement("div",{className:"maxio-toast__container",...s},e.createElement("div",{className:"maxio-toast__content",...c},l.toast.content.title&&e.createElement("span",{className:"maxio-toast__title"},l.toast.content.title),l.toast.content.message&&e.createElement("span",{className:"maxio-toast__message"},l.toast.content.message),(null===(n=l.toast.content.link)||void 0===n?void 0:n.text)&&(null===(i=l.toast.content.link)||void 0===i?void 0:i.href)&&e.createElement(y,{href:l.toast.content.link.href,underline:u,external:p},l.toast.content.link.text))),m&&e.createElement(S,{variant:"ghost",icon:e.createElement(E,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss",...d}))},St=({state:t,...a})=>{const l=e.useRef(null),{regionProps:n}=x.useToastRegion(a,t,l);return e.createElement("div",{...n,ref:l,className:a.className,style:{display:"flex",flexDirection:"column",gap:"10px"}},t.visibleToasts.map(a=>e.createElement(kt,{key:a.key,toast:a,state:t})))},Pt=e.createContext(null);class Tt extends p.ToastQueue{}const $t=({basis:a,flex:l,flexDirection:n,wrap:i,grow:o,shrink:r,gap:s,gapX:c,gapY:d,className:m,children:u,alignItems:p,justifyContent:x,...g})=>{const v=t("maxio-flex",{[`maxio-flex-${l}`]:l,[`maxio-basis-${a}`]:void 0!==a,[`maxio-flex-${n}`]:n,[`maxio-flex-${i}`]:i,"maxio-grow":o,"maxio-grow-0":!1===o,"maxio-shrink":r,"maxio-shrink-0":!1===r,[`maxio-gap-${s}`]:void 0!==s,[`maxio-gap-x-${c}`]:void 0!==c,[`maxio-gap-y-${d}`]:void 0!==d,[`maxio-items-${p}`]:p,[`maxio-justify-${x}`]:x},m);return e.createElement("div",{className:v,...g},u)},Dt=({...t})=>{const l=e.useRef(null),{buttonProps:n}=a.useButton(t,l);return e.createElement("button",{...n,className:"maxio-chip__dismiss-button"},e.createElement(E,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},Mt={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"};Object.defineProperty(exports,"createColumnHelper",{enumerable:!0,get:function(){return n.createColumnHelper}}),Object.defineProperty(exports,"DialogTrigger",{enumerable:!0,get:function(){return c.DialogTrigger}}),Object.defineProperty(exports,"Pressable",{enumerable:!0,get:function(){return c.Pressable}}),exports.ActionList=N,exports.Alert=P,exports.AuthLayout=({children:a,heading:l,description:n,sentiment:i="success",leadingElement:o=null,alert:r,topAddon:s=null,footer:c})=>e.createElement("div",{className:"maxio-auth-layout"},e.createElement($t,{alignItems:"center",justifyContent:"between"},e.createElement(Ct,{size:"md"}),s),r&&e.createElement(P,{display:"block",title:r.title,sentiment:r.sentiment},r.children),e.createElement(Et,{variant:"secondary"},e.createElement(Et.Body,null,e.createElement($t,{flexDirection:"col",gap:6},e.createElement($t,{flexDirection:"col",gap:2},e.createElement($t,{alignItems:"center",gap:2},o,e.createElement(ye,{size:"lg",className:t("maxio-auth-layout__heading",Mt[i])},l)),n&&e.createElement($t,{style:{color:"var(--maxio-color-text-tertiary)"}},e.createElement(Oe,{size:"sm",className:"maxio-auth-layout__description"},n))),a)),c&&e.createElement(Et.Footer,null,c))),exports.Avatar=({className:a,src:l,alt:n="avatar"})=>e.createElement("img",{className:t("maxio-avatar",a),alt:n,src:l}),exports.Banner=({children:a,title:l,linkText:n,linkExternal:i,href:o,display:r="inline",sentiment:s="info",onDismiss:c,className:d})=>{if(!a&&!l)return console.warn("Banner component requires either children or title prop to be rendered"),null;const m=t("maxio-banner",{[`maxio-banner--${s}`]:"info"!==s&&s,className:d}),u={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[s],p=t("maxio-banner__content",{"maxio-banner__content--block":"block"===r});return e.createElement("div",{className:m,"aria-live":"assertive"},e.createElement(E,{variant:u,className:"maxio-banner__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-banner__container"},e.createElement("div",{className:p},l&&e.createElement("span",{className:"maxio-banner__title"},l),a&&e.createElement("span",{className:"maxio-banner__message"},a),n&&o&&e.createElement(y,{href:o,..."warning"!==s&&{variant:"inverse"},underline:!0,...i?{external:!0}:{}},n))),c&&e.createElement(S,{icon:e.createElement(E,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:c,className:"maxio-banner__dismiss"}))},exports.Body=Oe,exports.Breadcrumbs=({className:a,children:l,...n})=>{const i=e.Children.count(l);if(0===i)throw new Error(B);const o=e.Children.map(l,(t,a)=>{if(e.isValidElement(t)&&t.type===O){if(a===i-1&&t.props.href)throw new Error(z);return e.cloneElement(t,{"aria-current":a===i-1?"page":void 0})}throw new Error(L)});return e.createElement("nav",{"aria-label":"Breadcrumb",...n},e.createElement("ol",{className:t("maxio-breadcrumbs",a)},o))},exports.BreadcrumbsItem=O,exports.Button=k,exports.Card=Et,exports.Checkbox=oe,exports.CheckboxGroup=({helperText:l,className:n,errorMessage:i,children:o,disabled:r,label:c,defaultValue:d,name:m,...u})=>{var p;const x=s.useCheckboxGroupState({defaultValue:d,name:m,errorMessage:i,description:l,label:c,isDisabled:r,isInvalid:!!i,...u}),{groupProps:g,labelProps:v,descriptionProps:b,errorMessageProps:f,isInvalid:h}=a.useCheckboxGroup({"aria-label":null===(p=null!=c?c:u["aria-label"])||void 0===p?void 0:p.toString(),isDisabled:r,isInvalid:!!i,...u},x),E=t("maxio-checkbox-group",{"maxio-checkbox-group--disabled":r},n),_=l&&!i;return e.createElement("div",{className:E,...g},c&&e.createElement("label",{className:"maxio-checkbox-group__label",...v},c),e.createElement(ne.Provider,{value:x},o),_&&e.createElement(re,{...b},l),i&&h&&e.createElement(se,{...f},i))},exports.Chip=({label:l,onDismiss:n,dismissLabel:i,leadingIcon:o,trailingIcon:s,title:c,...d})=>{const m=e.useRef(null),u=r.useToggleState(d),{buttonProps:p}=a.useToggleButton(d,u,m),x=t("maxio-chip",{"maxio-chip--selected":null==u?void 0:u.isSelected}),g=t("maxio-chip__button",{"maxio-chip--dismissible":n});return e.createElement("div",{className:x},e.createElement("button",{className:g,ref:m,...p,title:c},o&&e.createElement(E,{variant:o,className:"maxio-chip__icon"}),e.createElement("span",{className:"maxio-chip__label"},l),s&&!n&&e.createElement(E,{variant:s,className:"maxio-chip__icon"})),n&&e.createElement(Dt,{onPress:n,"aria-label":i}))},exports.Code=({as:a="div",children:l,className:n,...i})=>{const o=a,r=t("maxio-code",n);return e.createElement(o,{className:r,...i},l)},exports.ComboBox=qe,exports.DataTable=({pattern:t,size:a="md",SubRowComponent:l,onExpand:i,onSelect:o,onSort:r,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:d,columns:m,actions:u,actionsColumnSize:p,onRowAction:x,enableRowReordering:g=!1,getRowReorderLabel:v,onRowReorder:b,rowReorderMode:f="siblings",getRowId:h,getSubRows:E,state:_,...w})=>{var N,y;const I=g?void 0:l,R=!g&&s,C=(({columns:t,HeaderControls:a,RowControls:l,RowActions:n,actions:i,actionsColumnSize:o,enableExpanding:r,enableRowSelection:s,enableRowReordering:c})=>e.useMemo(()=>{const d={id:A,size:s&&c?72:40,header:t=>e.createElement(a,{...t,enableExpanding:r,enableRowSelection:s,enableRowReordering:c}),cell:t=>e.createElement(l,{...t,enableExpanding:r,enableRowSelection:s,enableRowReordering:c}),meta:{controls:!0,width:(s&&c?72:40)+"px"}},m=i&&n?{id:F,size:null!=o?o:40,header:"",cell:t=>e.createElement(n,null,i(t.row,t.table)),meta:{actions:!0}}:null;let u=[...t];return(s||c)&&(u=[d,...u]),m&&(u=[...u,m]),u},[i,o,n,r,s,c,t,a,l]))({columns:m,HeaderControls:ce,RowControls:ue,RowActions:pe,actions:u,actionsColumnSize:p,enableRowSelection:c,enableRowReordering:g,enableExpanding:Boolean(d)}),k=n.useReactTable({state:{..._,...g&&{sorting:_e},columnPinning:{left:[...c||g?[A]:[],...Ee(null===(N=null==_?void 0:_.columnPinning)||void 0===N?void 0:N.left)],right:[...Ee(null===(y=null==_?void 0:_.columnPinning)||void 0===y?void 0:y.right),...u?[F]:[]]}},getCoreRowModel:n.getCoreRowModel(),enableRowSelection:c,enableExpanding:Boolean(d),...!w.manualExpanding&&{getExpandedRowModel:n.getExpandedRowModel()},...!w.manualSorting&&!g&&{getSortedRowModel:n.getSortedRowModel()},columns:C,getRowId:h,...w,getSubRows:g?we:null!=E?E:we,enableSorting:R,...g&&{getSortedRowModel:void 0}}),S=k.getCanSomeRowsExpand(),P=k.getState(),T=(({columnFilters:e,globalFilter:t,grouping:a,hasPagination:l})=>e.length>0||null!=t&&""!==t?be:a.length>0?fe:l?he:ve)({columnFilters:P.columnFilters,globalFilter:P.globalFilter,grouping:P.grouping,hasPagination:Boolean(w.getPaginationRowModel||w.manualPagination)});e.useEffect(()=>{null==i||i(P.expanded)},[i,P.expanded]),e.useEffect(()=>{null==o||o(P.rowSelection)},[o,P.rowSelection]),e.useEffect(()=>{g||null==r||r(P.sorting)},[g,r,P.sorting]);const $=e.createElement(H,{pattern:t,size:a,isExpandable:S,isUsingCustomRow:Boolean(I)},e.createElement(V,null,k.getHeaderGroups().map(t=>e.createElement(le,{key:t.id,table:k,isHeader:!0},t.headers.map(t=>e.createElement(j,{key:t.id,table:k,header:t,enableExpanding:d},n.flexRender(t.column.columnDef.header,t.getContext())))))),e.createElement(W,null,k.getRowModel().rows.map(a=>e.createElement(ge,{key:a.id,row:a,pattern:t,SubRowComponent:I,enableExpanding:d,onRowAction:x}))));return g&&h&&b?e.createElement(ae,{availability:T,data:w.data,enableExpanding:Boolean(d),getRowReorderLabel:v,onRowReorder:b,rowReorderMode:f,table:k},$):$},exports.Display=({as:a="div",children:l,size:n="md",className:i,...o})=>{const r=a,s=t(`maxio-display-${n}`,i);return e.createElement(r,{className:s,...o},l)},exports.Drawer=({open:a,onOpenChange:l,placement:n="right",backdrop:i="dim",size:o="md",className:r,title:s,description:d,children:m,footer:u})=>{const p=e.useId(),x={"data-placement":n,"data-size":o};return e.createElement(c.ModalOverlay,{isOpen:a,onOpenChange:l,isDismissable:!0,className:t("maxio-drawer__backdrop",{"maxio-drawer__backdrop--dim":"dim"===i})},e.createElement(c.Modal,{className:t("maxio-drawer",r),...x},e.createElement(c.Dialog,{className:"maxio-drawer__dialog","aria-labelledby":p},({close:t})=>e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-drawer__header"},e.createElement("div",{className:"maxio-drawer__title-group"},e.createElement(ye,{id:p,size:"md",className:"maxio-drawer__title"},s),d&&e.createElement("p",{className:"maxio-drawer__description"},d)),e.createElement(S,{"aria-label":"Close",onClick:t,icon:e.createElement(E,{variant:"cross"}),variant:"ghost",size:"sm",className:"maxio-drawer__close"})),e.createElement("div",{className:"maxio-drawer__body"},m),null!=u&&e.createElement("div",{className:"maxio-drawer__footer"},u)))))},exports.Flex=$t,exports.FormErrorMessage=se,exports.FormHelperText=re,exports.GlobalToastProvider=({children:t,toastQueue:a,...l})=>{const n=p.useToastQueue(a),i=e.useCallback(()=>{n.visibleToasts.forEach(e=>{a.close(e.key)})},[n.visibleToasts,a]),o=e.useMemo(()=>({addToast:a.add.bind(a),removeToast:a.clear.bind(a),removeAllToasts:i,state:n}),[a,i,n]);return e.createElement(Pt.Provider,{value:o},t,n.visibleToasts.length>0&&e.createElement(St,{...l,state:n}))},exports.Grid=({children:a,templateColumns:l,templateRows:n,autoColumns:i,autoRows:o,inline:r,column:s,columnStart:c,columnEnd:d,row:m,rowStart:u,rowEnd:p,gap:x,gapX:g,gapY:v,className:b,justifyContent:f,alignItems:h,...E})=>{const _=t(b,{"maxio-grid":!r,"maxio-inline-grid":r,[`maxio-grid-cols-${l}`]:l,[`maxio-grid-rows-${n}`]:n,[`maxio-auto-cols-${i}`]:i,[`maxio-auto-rows-${o}`]:o,["maxio-col-"+("auto"===s?"auto":`span-${s}`)]:s,[`maxio-col-start-${c}`]:c,[`maxio-col-end-${d}`]:d,["maxio-row-"+("auto"===m?"auto":`span-${m}`)]:m,[`maxio-row-start-${u}`]:u,[`maxio-row-end-${p}`]:p,[`maxio-gap-${x}`]:void 0!==x,[`maxio-gap-x-${g}`]:void 0!==g,[`maxio-gap-y-${v}`]:void 0!==v,[`maxio-justify-${f}`]:f,[`maxio-items-${h}`]:h});return e.createElement("div",{className:_||void 0,...E},a)},exports.Heading=ye,exports.Icon=E,exports.IconButton=S,exports.Label=({as:a="div",children:l,size:n="sm",className:i,...o})=>{const r=a,s=t(`maxio-label-${n}`,i);return e.createElement(r,{className:s,...o},l)},exports.Link=y,exports.ListBox=Fe,exports.LoadingSpinner=I,exports.Logo=Ct,exports.Menu=({children:t})=>e.createElement($,null,e.createElement(M,null,t)),exports.MenuButton=({children:a,iconName:l="chevron-down","aria-label":n,size:i="md",variant:o="secondary"})=>{const r=t({"maxio-action-menu__chevron":"chevron-down"===l}),s=t("maxio-button",`maxio-button--${o}`,`maxio-button--${i}`,{"maxio-button--icon":l&&!a}),{isOpen:c,buttonId:d,controlsId:m}=D();return e.createElement("summary",{className:s,"aria-haspopup":"true","aria-label":n,"aria-expanded":c,"aria-controls":m,id:d},a&&e.createElement("span",null,a),l&&e.createElement(E,{variant:l,className:`${r} maxio-button__trailing-element`}))},exports.MenuList=({items:a,alignItemsEnd:l=!1})=>{const n=t("maxio-action-menu__content",{"maxio-action-menu__content--align-end":l}),{controlsId:i,buttonId:o}=D();return e.createElement("div",{className:n,role:"presentation"},e.createElement(N,{role:"menu",itemProps:{role:"menuitem"},id:i,"aria-labelledby":o,items:a}))},exports.OverlayTrigger=Te,exports.Pagination=({size:t="md",onChange:a,totalItems:l=0,itemsPerPage:n=30,currentPage:i=1,pageSizeOptions:o,manualPageInput:r=!1})=>{const[s,c]=e.useState(i),[d,m]=e.useState(n),[u,p]=e.useState(i.toString());e.useEffect(()=>{p(s.toString())},[s]);const x=Math.ceil(l/d),g=s<x,v=s>1,b=d*(s-1)+1,f=Math.min(d*s,l),h=o.map(e=>({label:e.toString(),value:e.toString()})),_=Array.from({length:x},(e,t)=>t+1).map(e=>({label:e.toString(),value:e.toString()})),w=e=>{c(e),null==a||a({currentPage:e,itemsPerPage:d})},N=e=>{const t=parseInt(e,10);if(isNaN(t))return void p(s.toString());const a=Math.max(1,Math.min(t,x));p(a.toString()),w(a)};return e.createElement("div",{className:"maxio-pagination"},e.createElement("div",{className:"maxio-pagination__items-per-page"},e.createElement("label",{htmlFor:"items-per-page-large",className:"maxio-pagination__label"},"Items per page"),e.createElement(Ye,{inline:!0,size:t,options:h,onChange:e=>{return t=Number(e.target.value),m(t),c(1),void(null==a||a({currentPage:1,itemsPerPage:t}));var t},value:d,id:"items-per-page-large"})),e.createElement("div",{className:"maxio-pagination__total-items"},e.createElement("span",null,b,"–",f," of ",l," items")),e.createElement("div",{className:"maxio-pagination__current-page"},r?e.createElement(Ze,{className:"maxio-pagination__page-input",value:u,min:1,max:x,onChange:e=>(e=>{p(e)})(e),onBlur:e=>{N(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(N(e.currentTarget.value),e.currentTarget.blur())},"aria-label":"Page number",size:t,type:"number",onWheel:e=>e.preventDefault()}):e.createElement(Ye,{inline:!0,size:t,"aria-label":"Select page",onChange:e=>w(Number(e.target.value)),value:s,options:_,id:"page-index-large"}),e.createElement("div",{className:"maxio-pagination__label"},"of ",x," pages")),e.createElement("div",{className:"maxio-pagination__controls"},e.createElement(Me,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(S,{icon:e.createElement(E,{variant:"chevron-left"}),size:t,variant:"ghost",onClick:()=>w(s-1),"aria-label":"Previous",disabled:!v})),e.createElement(Me,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(S,{icon:e.createElement(E,{variant:"chevron-right"}),size:t,variant:"ghost",onClick:()=>w(s+1),"aria-label":"Next",disabled:!g}))))},exports.Popover=de,exports.ProgressBar=({label:l,helperText:n,size:i="md",variant:o="default",status:r,value:s,maxValue:c=100})=>{const d=a.useId(),m=a.useId(),u=r&&!!l&&!!s&&!("inline"===o),p=n&&!("inline"===o),x=n&&"inline"===o,{progressBarProps:g,labelProps:v}=a.useProgressBar({maxValue:c,value:s,label:l}),b=t("maxio-progress-bar",{"maxio-progress-bar--lg":"lg"===i,"maxio-progress-bar--success":s&&!("inline"===o)&&"success"===r,"maxio-progress-bar--error":s&&!("inline"===o)&&"error"===r,"maxio-progress-bar--indent":"indent"===o,"maxio-progress-bar--inline":"inline"===o,"maxio-progress-bar--indeterminate":void 0===s});return e.createElement("div",{className:b,...g},e.createElement("div",{id:d,className:"maxio-progress-bar__label",...v},l),x&&e.createElement("div",{id:m,className:"maxio-progress-bar__helper-text"},n),e.createElement("div",{className:"maxio-progress-bar__track"},e.createElement("div",{className:"maxio-progress-bar__progress",style:{"--tw-scale-x":`${s}%`}})),u&&e.createElement("div",{className:`maxio-progress-bar__${r}-icon`}),p&&e.createElement("div",{id:m,className:"maxio-progress-bar__helper-text"},n))},exports.Radio=({indent:l=!1,disabled:n=!1,invalid:i=!1,label:o,...r})=>{const s=e.useRef(null),c=e.useContext(Ge),{inputProps:d,isDisabled:m}=a.useRadio({...r,value:(r.value||"").toString(),"aria-label":r["aria-label"]||o,isDisabled:n},c,s),u=t("maxio-radio",{"maxio-radio--indent":l,"maxio-radio--disabled":m||c.isDisabled,"maxio-radio--error":i||c.isInvalid});return e.createElement("label",{className:u},e.createElement("input",{ref:s,role:"radio",type:"radio",className:"maxio-radio__input",...d,name:c.name||d.name}),e.createElement("span",{className:"maxio-radio__control"}),e.createElement("span",{className:"maxio-radio__label"},o))},exports.RadioGroup=({children:t,label:l,errorMessage:n,helperText:i,disabled:o=!1,invalid:r=!1,name:s,defaultValue:c,...d})=>{const m=u.useRadioGroupState({isDisabled:o,isInvalid:r,description:i,name:s,label:l,errorMessage:n,defaultValue:c,...d}),{radioGroupProps:p,labelProps:x,descriptionProps:g,errorMessageProps:v}=a.useRadioGroup({"aria-label":d["aria-label"]||l,...d},m);return e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-radio-group",...p},l&&e.createElement("label",{className:"maxio-radio-group__label",...x},l),e.createElement(Ge.Provider,{value:m},t),r&&n&&e.createElement(se,{...v},n),i&&!r&&e.createElement(re,{...g},i)))},exports.SegmentedControl=Je,exports.Select=Ye,exports.SideNav=({withIcons:t=!0,shouldToggleSidebar:a=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:o,onChange:r})=>e.createElement(it,{isOpen:o,onChange:r,collapseBreakpoint:i,withIcons:t,shouldToggleSidebar:a,topDropdownItems:l,sections:n},e.createElement(mt,null)),exports.Tab=ut,exports.TabList=({children:a,className:l,ariaLabel:n,overflow:i="none",moreLabel:o="More",...r})=>{const{variant:s,withDivider:d}=e.useContext(pt),m=e.useContext(c.TabListStateContext),u=e.useId(),[p,x]=e.useState(!1),g=t("maxio-tabs",l,{"maxio-tabs--contained":"contained"===s,"maxio-tabs--divider":d}),v=e.Children.map(a,e=>e);(null!=v?v:[]).forEach(t=>{if(!e.isValidElement(t)||t.type!==ut)throw new Error("You can only pass <Tab /> component as children")});const b="auto"===i&&!!(null==v?void 0:v.length),{ref:f,moreButtonRef:h,overflowIndexes:_,handleKeyDownCapture:w}=(({overflowEnabled:t,childrenArray:a})=>{const l=e.useRef(null),n=e.useRef(null),i=e.useRef(null),[o,r]=e.useState(null),s=Pe(l),d=e.useContext(c.TabListStateContext),m=null!=(null==d?void 0:d.selectedKey)?Number(d.selectedKey):null,[u,p]=e.useState([]);e.useLayoutEffect(()=>{var e;if(!t||!o)return void p((null!=a?a:[]).map((e,t)=>t));const{visibleIndexes:l}=((e,t,a,l)=>{const n=e.map((e,t)=>t);if(e.reduce((e,t)=>e+t,0)<=t)return{visibleIndexes:n,overflowIndexes:[]};const i=[];let o=a;for(const a of n){if(o+e[a]>t)break;o+=e[a],i.push(a)}if(null!==l&&!i.includes(l)){for(o+=e[l];o>t&&i.length>0;)o-=e[i.pop()];i.push(l)}i.sort((e,t)=>e-t);const r=n.filter(e=>!i.includes(e));return{visibleIndexes:i,overflowIndexes:r}})(o.tabWidths,s,o.moreButtonWidth,null!==(e=i.current)&&void 0!==e?e:m);l.length===(null!=a?a:[]).length&&(i.current=null),p(l)},[t,o,s]),e.useLayoutEffect(()=>{t&&o&&null!==m&&p(e=>(e.includes(m)||(i.current=m),((e,t,a,l,n)=>{if(e.includes(n))return e;const i=[...e,n].sort((e,t)=>e-t);let o=l+i.reduce((e,a)=>e+t[a],0);for(;o>a&&i.length>1;){const e=i.length-1,a=i[e]===n?e-1:e,[l]=i.splice(a,1);o-=t[l]}return i})(e,o.tabWidths,s,o.moreButtonWidth,m)))},[m]);const x=t?(null!=a?a:[]).map((e,t)=>t).filter(e=>!u.includes(e)):[],g=((e,t)=>e.filter(e=>{var a;return!(null===(a=null==t?void 0:t[e])||void 0===a?void 0:a.props.disabled)}))(u,a);e.useLayoutEffect(()=>{var e,i;if(!t||!l.current)return void r(e=>null===e?e:null);const o=Array.from(l.current.querySelectorAll('[role="tab"]')),s=null!==(i=null===(e=n.current)||void 0===e?void 0:e.getBoundingClientRect().width)&&void 0!==i?i:0;r(e=>{var t;const l=(null!=a?a:[]).map((t,a)=>{var l,n,i;const r=null!==(n=null===(l=o[a])||void 0===l?void 0:l.getBoundingClientRect().width)&&void 0!==n?n:0;return r>0?r:null!==(i=null==e?void 0:e.tabWidths[a])&&void 0!==i?i:0}),n=s>0?s:null!==(t=null==e?void 0:e.moreButtonWidth)&&void 0!==t?t:0,i=(null==e?void 0:e.tabWidths.length)===l.length&&e.tabWidths.every((e,t)=>e===l[t]);return e&&i&&e.moreButtonWidth===n?e:{tabWidths:l,moreButtonWidth:n}})},[a,t]);const v=e=>{var t,a;void 0!==e&&(null==d||d.selectionManager.setFocused(!0),null==d||d.selectionManager.setFocusedKey(e),null==d||d.setSelectedKey(e),null===(a=null===(t=l.current)||void 0===t?void 0:t.querySelector(`[role="tab"][data-key="${e}"]`))||void 0===a||a.focus())};return{ref:l,moreButtonRef:n,visibleIndexes:u,overflowIndexes:x,handleKeyDownCapture:e=>{var t;if(0===x.length)return;const a=document.activeElement===n.current,l=null==d?void 0:d.selectionManager.focusedKey,i=a?-1:g.indexOf(Number(l));if(a||-1!==i)switch(e.key){case"ArrowRight":if(a)return;return e.preventDefault(),e.stopPropagation(),void(i<g.length-1?v(g[i+1]):null===(t=n.current)||void 0===t||t.focus());case"ArrowLeft":return e.preventDefault(),e.stopPropagation(),void(a?v(g[g.length-1]):i>0&&v(g[i-1]));case"Home":if(a)return;return e.preventDefault(),e.stopPropagation(),void v(g[0]);case"End":if(a)return;return e.preventDefault(),e.stopPropagation(),void v(g[g.length-1])}}}})({overflowEnabled:b,childrenArray:v}),N=e.createElement("span",{className:"maxio-tabs__tab__content"},o,e.createElement(E,{variant:"chevron-down",className:"maxio-tabs__more__chevron"})),y=_.map(e=>{return`#${t=u,"undefined"!=typeof CSS&&"function"==typeof CSS.escape?CSS.escape(t):t.replace(/[^a-zA-Z0-9_-]/g,"\\$&")} [role="tablist"] > .maxio-tabs__tab:nth-child(${e+1})`;var t});return e.createElement("div",{id:u,className:g,ref:f,onKeyDownCapture:w},y.length>0&&e.createElement("style",null,`${y.join(", ")} { display: none; }`),e.createElement(c.TabList,{"aria-label":n,className:"maxio-contents",...r},(null!=v?v:[]).map((t,a)=>e.cloneElement(t,{key:a,value:a}))),b&&_.length>0&&e.createElement(c.MenuTrigger,{isOpen:p,onOpenChange:x},e.createElement(c.Button,{ref:h,className:"maxio-tabs__tab maxio-tabs__more__trigger","aria-label":o},N),p&&e.createElement(de,{hideArrow:!0,placement:"bottom end",className:"maxio-tabs__more__menu"},e.createElement(c.Menu,{"aria-label":`${o} tabs`,onAction:e=>{null==m||m.setSelectedKey(e),requestAnimationFrame(()=>{var t,a;null===(a=null===(t=f.current)||void 0===t?void 0:t.querySelector(`[role="tab"][data-key="${e}"]`))||void 0===a||a.focus()})}},_.map(t=>{const a=v[t],{disabled:l,type:n,"aria-label":i,"aria-labelledby":o}=a.props,r="icon"===n?a.props.icon:a.props.children;return e.createElement(c.MenuItem,{key:t,id:t,isDisabled:!!l,"aria-label":i,"aria-labelledby":o,className:"maxio-tabs__more__item"},r)})))))},exports.TabPanel=gt,exports.TabPanels=({children:t})=>{const a=e.Children.map(t,(t,a)=>{if(!e.isValidElement(t)||t.type!==gt)throw new Error("You can only pass <TabPanel /> component as children");return e.cloneElement(t,{key:a,value:a})});return e.createElement(c.TabPanels,{className:"maxio-tabs__panels"},a)},exports.Tabs=({children:t,variant:a="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:o})=>e.createElement(c.Tabs,{className:"maxio-tabs-container",selectedKey:i,defaultSelectedKey:n,onSelectionChange:e=>null==o?void 0:o(Number(e))},e.createElement(xt,{variant:a,withDivider:l},t)),exports.Tag=({children:a,size:l,sentiment:n,kind:i="primary",leadingIcon:o,trailingIcon:r})=>{const s=t("maxio-tag",`maxio-tag--${i}`,!!n&&`maxio-tag--${n}`,!!l&&`maxio-tag--${l}`);return e.createElement("div",{className:s},o&&e.createElement(E,{variant:o,className:"maxio-tag__icon"}),e.createElement("span",{className:"maxio-tag__label"},a),r&&e.createElement(E,{variant:r,className:"maxio-tag__icon"}))},exports.TextArea=Ue,exports.TextField=Ke,exports.TextInput=Ze,exports.Tile=({children:a,className:l,href:n,onClick:i,target:o,disabled:r})=>{const s=n||i;if(!s)return e.createElement("div",{className:"maxio-tile"},a);const c=t("maxio-tile",l,{"maxio-tile--clickable":s,"maxio-tile--disabled":r});return e.createElement("a",{className:c,href:n,target:o,onClick:e=>{r&&n&&e.preventDefault(),!r&&i&&i()}},a)},exports.ToastProvider=({children:t,...a})=>{const{maxVisibleToasts:l=5,...n}=a,i=p.useToastState({maxVisibleToasts:l,...n});return e.useEffect(()=>{console.warn("ToastProvider is deprecated. Please use the global toast API instead.")},[]),e.createElement(e.Fragment,null,t(i),i.visibleToasts.length>0&&e.createElement(St,{...a,state:i}))},exports.ToastQueue=Tt,exports.Toggle=({defaultChecked:a,checked:l,onChange:n,disabled:i,valueDescription:o,valueDescriptionPosition:r,className:s,name:c,id:d,...m})=>{const u=e.useId(),p="boolean"==typeof a,x=d||u,g="left"===r?"row":"row-reverse",v=o&&r,b=e.useCallback(e=>{if("Enter"===e.code||"Space"===e.code){e.preventDefault();const t=e.currentTarget.checked;p&&(e.currentTarget.checked=!t),n&&n(!t,e)}},[p,n]),f=m["aria-label"]||(v?void 0:o);return e.createElement("div",{className:t("maxio-toggle",s,{"maxio-toggle--disabled":i}),style:{display:"inline-flex",flexDirection:g},"data-testid":"toggle-container"},v?e.createElement("label",{className:"maxio-toggle__label",htmlFor:x},o):null,e.createElement("div",{className:"maxio-toggle__container"},e.createElement("input",{type:"checkbox",defaultChecked:a,checked:l,onChange:e=>{n&&n(e.target.checked,e)},onKeyDown:b,disabled:i,className:"maxio-toggle__checkbox",id:x,name:c,"aria-label":f}),e.createElement("div",{className:"maxio-toggle__track",role:"switch","aria-checked":l,"aria-hidden":"true"},e.createElement("div",{className:"maxio-toggle__handle"}),e.createElement("span",{className:"maxio-toggle__icon"},e.createElement("i",{className:"maxio-toggle__icon-on"})),e.createElement("span",{className:"maxio-toggle__icon"},e.createElement("i",{className:"maxio-toggle__icon-off"})))))},exports.Tooltip=$e,exports.TooltipTrigger=Me,exports.TopBar=({children:t,actions:a,sideNavIsClosed:l,openSideNav:n})=>e.createElement("nav",{className:"maxio-top-bar"},l&&e.createElement(S,{"aria-label":"Open Side Navigation",variant:"ghost",icon:e.createElement(E,{variant:"sidebar"}),onClick:n}),e.createElement($t,{grow:!0,justifyContent:"end"},t),a),exports.useElementResizeObserver=Pe,exports.useHover=ke,exports.useOverlayTrigger=Ce,exports.useToast=()=>{const t=e.useContext(Pt);if(!t)throw new Error("useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.");return t},exports.useWindowSize=Se;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/components/Logo/logo.svg"],"sourcesContent":["<svg\n id=\"logo-svg\"\n data-name=\"Maxio Logo SVG\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 1036 240\"\n>\n <path d=\"M59.32,11.3L70.64,0h0s40.74,40.35,40.74,40.35v70.99H40.89L0,70.52l11.15-11.14,36.2,36.15h30.07l3.07-3.39L29.58,40.99l10.99-10.97,51.24,50.83,3.72-3.38v-30.34L59.32,11.3Z\" />\n <path d=\"M180.68,11.3L169.36,0h0s-40.73,40.35-40.73,40.35v70.99h70.48l40.89-40.83-11.15-11.14-36.2,36.15h-30.06l-3.07-3.39,50.91-51.15-10.99-10.97-51.24,50.83-3.72-3.38v-30.34l36.2-35.83Z\" />\n <path d=\"M59.32,228.7l11.31,11.29h0s40.74-40.35,40.74-40.35v-70.99H40.89L0,169.48l11.15,11.14,36.2-36.15h30.07l3.07,3.39-50.92,51.15,10.99,10.97,51.24-50.83,3.72,3.38v30.34l-36.2,35.83Z\" />\n <path d=\"M180.68,228.7l-11.32,11.29-40.73-40.35v-70.99h70.48l40.89,40.83-11.15,11.14-36.2-36.15h-30.06l-3.07,3.39,50.91,51.15-10.99,10.97-51.24-50.83-3.72,3.38v30.34l36.2,35.83Z\" />\n <path d=\"M1015.27,139.55c0-29.94-23.74-53.46-52.11-53.46-28.37,0-52.11,23.52-52.11,53.46s23.74,53.46,52.11,53.46,52.11-23.52,52.11-53.46ZM1035.59,140.5c-.5,40.27-32.73,72.76-72.43,72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71,72.44-73.71h.94c39.57.52,71.5,33.32,71.5,73.71v.95Z\" />\n <path fill-rule=\"evenodd\" d=\"M870.39,24h-20.33v20.33h20.33v-20.33ZM870.39,64.67h-20.33v148.59h20.33V64.67Z\" />\n <path fill-rule=\"evenodd\" d=\"M850.05,24h20.33v20.33h-20.33v-20.33Z\" />\n <path fill-rule=\"evenodd\" d=\"M695.01,82.85l50.83,56.28v6.53l-50.28,55.67,15.23,13.2,49.22-54.49h4.71l49.22,54.49,15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15,55.52h-3.96l-50.15-55.52-15.23,13.2Z\" />\n <path fill-rule=\"evenodd\" d=\"M660.49,78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13,0-52.44,18.93-58.09,44.86l-.28,1.27,19.33,3.72.31-1.14c2.39-8.91,6.66-16.54,13.04-21.94,6.36-5.39,14.91-8.63,26.02-8.63s19.12,3.25,24.76,8.96c5.64,5.72,8.73,14.06,8.73,24.53v6.11l-36.67,7.59-3.26.68c-16.14,3.47-29.79,7.84-39.59,14.45-10.54,7.11-16.64,16.83-16.64,30.62,0,12.51,4.51,22.62,12.5,29.59,7.96,6.95,19.25,10.67,32.63,10.67,22.27,0,41.87-12.03,51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58ZM620.4,146.77c-12.86,2.77-23.05,5.42-30.03,9.63-3.46,2.09-6.08,4.54-7.84,7.54-1.76,3-2.71,6.62-2.71,11.15,0,6.38,2.1,12.12,6.32,16.27,4.22,4.14,10.7,6.82,19.7,6.82,26.85,0,47.46-20.48,47.46-51.36v-7.2l-32.9,7.14Z\" />\n <path d=\"M434.8,188.74h4.54l61.73-164.33.15-.41h35.57v189.35h-20.89V55.37h-4.33l-59.7,157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98h-20.88V24h35.57l63.23,164.74Z\" />\n</svg>\n"],"names":["_path","_path2","_path3","_path4","_extends","Object","assign","bind","n","e","arguments","length","t","r","hasOwnProperty","call","apply","SvgLogo","props","React","createElement","xmlns","viewBox","d","fillRule"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/Logo/logo.svg"],"sourcesContent":["<svg\n id=\"logo-svg\"\n data-name=\"Maxio Logo SVG\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 1036 240\"\n>\n <path d=\"M59.32,11.3L70.64,0h0s40.74,40.35,40.74,40.35v70.99H40.89L0,70.52l11.15-11.14,36.2,36.15h30.07l3.07-3.39L29.58,40.99l10.99-10.97,51.24,50.83,3.72-3.38v-30.34L59.32,11.3Z\" />\n <path d=\"M180.68,11.3L169.36,0h0s-40.73,40.35-40.73,40.35v70.99h70.48l40.89-40.83-11.15-11.14-36.2,36.15h-30.06l-3.07-3.39,50.91-51.15-10.99-10.97-51.24,50.83-3.72-3.38v-30.34l36.2-35.83Z\" />\n <path d=\"M59.32,228.7l11.31,11.29h0s40.74-40.35,40.74-40.35v-70.99H40.89L0,169.48l11.15,11.14,36.2-36.15h30.07l3.07,3.39-50.92,51.15,10.99,10.97,51.24-50.83,3.72,3.38v30.34l-36.2,35.83Z\" />\n <path d=\"M180.68,228.7l-11.32,11.29-40.73-40.35v-70.99h70.48l40.89,40.83-11.15,11.14-36.2-36.15h-30.06l-3.07,3.39,50.91,51.15-10.99,10.97-51.24-50.83-3.72,3.38v30.34l36.2,35.83Z\" />\n <path d=\"M1015.27,139.55c0-29.94-23.74-53.46-52.11-53.46-28.37,0-52.11,23.52-52.11,53.46s23.74,53.46,52.11,53.46,52.11-23.52,52.11-53.46ZM1035.59,140.5c-.5,40.27-32.73,72.76-72.43,72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71,72.44-73.71h.94c39.57.52,71.5,33.32,71.5,73.71v.95Z\" />\n <path fill-rule=\"evenodd\" d=\"M870.39,24h-20.33v20.33h20.33v-20.33ZM870.39,64.67h-20.33v148.59h20.33V64.67Z\" />\n <path fill-rule=\"evenodd\" d=\"M850.05,24h20.33v20.33h-20.33v-20.33Z\" />\n <path fill-rule=\"evenodd\" d=\"M695.01,82.85l50.83,56.28v6.53l-50.28,55.67,15.23,13.2,49.22-54.49h4.71l49.22,54.49,15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15,55.52h-3.96l-50.15-55.52-15.23,13.2Z\" />\n <path fill-rule=\"evenodd\" d=\"M660.49,78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13,0-52.44,18.93-58.09,44.86l-.28,1.27,19.33,3.72.31-1.14c2.39-8.91,6.66-16.54,13.04-21.94,6.36-5.39,14.91-8.63,26.02-8.63s19.12,3.25,24.76,8.96c5.64,5.72,8.73,14.06,8.73,24.53v6.11l-36.67,7.59-3.26.68c-16.14,3.47-29.79,7.84-39.59,14.45-10.54,7.11-16.64,16.83-16.64,30.62,0,12.51,4.51,22.62,12.5,29.59,7.96,6.95,19.25,10.67,32.63,10.67,22.27,0,41.87-12.03,51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58ZM620.4,146.77c-12.86,2.77-23.05,5.42-30.03,9.63-3.46,2.09-6.08,4.54-7.84,7.54-1.76,3-2.71,6.62-2.71,11.15,0,6.38,2.1,12.12,6.32,16.27,4.22,4.14,10.7,6.82,19.7,6.82,26.85,0,47.46-20.48,47.46-51.36v-7.2l-32.9,7.14Z\" />\n <path d=\"M434.8,188.74h4.54l61.73-164.33.15-.41h35.57v189.35h-20.89V55.37h-4.33l-59.7,157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98h-20.88V24h35.57l63.23,164.74Z\" />\n</svg>\n"],"names":["_path","_path2","_path3","_path4","_extends","Object","assign","bind","n","e","arguments","length","t","r","hasOwnProperty","call","apply","SvgLogo","props","React","createElement","xmlns","viewBox","d","fillRule"],"mappings":"qs+CAAA,IAAIA,GAAOC,GAAQC,GAAQC,GAC3B,SAASC,KAAa,OAAOA,GAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUC,GAAK,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAAIF,UAAUD,GAAI,IAAK,IAAII,KAAKD,GAAG,CAAG,GAAEE,eAAeC,KAAKH,EAAGC,KAAOL,EAAEK,GAAKD,EAAEC,GAAK,CAAE,OAAOL,CAAG,EAAGJ,GAASY,MAAM,KAAMN,UAAY,CAEnR,MAAMO,GAAUC,GAAsBC,EAAMC,cAAc,MAAOhB,GAAS,CACxEiB,MAAO,6BACP,YAAa,iBACbC,QAAS,gBACRJ,GAAQlB,KAAUA,GAAqBmB,EAAMC,cAAc,OAAQ,CACpEG,EAAG,m3BACAtB,KAAWA,GAAsBkB,EAAMC,cAAc,OAAQ,CAChEI,SAAU,UACVD,EAAG,iEACArB,KAAWA,GAAsBiB,EAAMC,cAAc,OAAQ,CAChEI,SAAU,UACVD,EAAG,s3BACApB,KAAWA,GAAsBgB,EAAMC,cAAc,OAAQ,CAChEG,EAAG"}
|
|
@@ -31,18 +31,20 @@ table state.
|
|
|
31
31
|
|
|
32
32
|
| Option | Purpose | Usage notes |
|
|
33
33
|
| :-------------------- | :------------------------------------------------------- | :------------------------------------------------------------------------------ |
|
|
34
|
-
| `enableSorting` | Allows sortable columns to cycle sort state. |
|
|
34
|
+
| `enableSorting` | Allows sortable columns to cycle sort state. | Ignored when `enableRowReordering` is enabled. |
|
|
35
35
|
| `enableRowSelection` | Adds checkbox controls for selecting rows. | Use controlled row selection state when selections drive actions outside table. |
|
|
36
36
|
| `enableExpanding` | Adds row expansion controls. | Use `rowsOnly` when the table should not show an expand-all header control. |
|
|
37
|
+
| `enableRowReordering` | Adds a drag handle to the pinned row controls cell. | Takes precedence over sorting and custom detail rendering. |
|
|
38
|
+
| `rowReorderMode` | Constrains valid row destinations. | Parent changes require `enableExpanding`; use `same-level` or `all`. |
|
|
37
39
|
| `actions` | Adds a pinned row actions cell. | Use `IconButton` size `sm` for icon-only row actions. |
|
|
38
40
|
| `onRowAction` | Makes each parent row activate a primary row action. | Keep nested controls interactive without triggering the row action. |
|
|
39
|
-
| `SubRowComponent` | Renders custom expanded content connected to parent row. |
|
|
41
|
+
| `SubRowComponent` | Renders custom expanded content connected to parent row. | Ignored when `enableRowReordering` is enabled. |
|
|
40
42
|
| `state.columnPinning` | Pins important columns to the left or right. | Set numeric column `size` values when multiple columns are pinned on one side. |
|
|
41
43
|
|
|
42
44
|
### Behavior
|
|
43
45
|
|
|
44
|
-
- **Mouse and touch**: header controls sort columns, row checkboxes select rows,
|
|
45
|
-
- **Keyboard**: interactive controls are reachable with Tab.
|
|
46
|
+
- **Mouse and touch**: header controls sort columns, row checkboxes select rows, and reorder handles expose only the destinations allowed by `rowReorderMode`. Expand controls show nested or custom row content, and row action controls activate row-specific commands.
|
|
47
|
+
- **Keyboard**: interactive controls are reachable with Tab. Open a reorder handle with Enter or Space, choose one of the valid movement actions, or press Escape to close it. Parent destinations appear only when the selected reorder mode permits them. Actionable rows receive keyboard focus.
|
|
46
48
|
- **Focus management**: keep focus indicators visible on row controls, sortable headers, action buttons, links, and actionable rows.
|
|
47
49
|
- **Controlled state**: use TanStack Table state props when sorting, selection, expansion, or column pinning must be controlled by the product surface.
|
|
48
50
|
- **Column pinning**: set numeric `size` values for multiple pinned columns on the same side so TanStack can calculate sticky offsets correctly.
|
|
@@ -52,6 +54,8 @@ table state.
|
|
|
52
54
|
- Use semantic `<table>`, `<thead>`, `<tbody>`, `<tr>`, `<th>`, and `<td>` markup.
|
|
53
55
|
- Keep sortable header state synchronized with `aria-sort`.
|
|
54
56
|
- Give selection, expansion, and row action controls clear accessible names.
|
|
57
|
+
- Give reorderable rows stable IDs and concise labels through `getRowReorderLabel` so destination announcements are meaningful.
|
|
58
|
+
- Keep unavailable reorder handles focusable, expose `aria-disabled`, and show the reason in a focus- and hover-triggered tooltip.
|
|
55
59
|
- Label actionable rows from visible row content with `aria-labelledby`.
|
|
56
60
|
- Preserve table semantics when rendering links, tags, buttons, or custom content inside cells.
|
|
57
61
|
- Do not rely on color alone to communicate sorted, selected, expanded, or actionable state.
|
|
@@ -160,6 +164,59 @@ still attached to the row.
|
|
|
160
164
|
/>
|
|
161
165
|
```
|
|
162
166
|
|
|
167
|
+
### Row Reordering
|
|
168
|
+
|
|
169
|
+
Row reordering is controlled. Provide stable row IDs and replace your data with
|
|
170
|
+
the immutable tree returned by `onRowReorder`. Nested rows must use `subRows`.
|
|
171
|
+
Row reordering takes precedence over sorting and custom detail rendering:
|
|
172
|
+
`enableSorting`, sorting state, and `SubRowComponent` are ignored while it is
|
|
173
|
+
enabled.
|
|
174
|
+
|
|
175
|
+
Use row reordering for small, non-paginated datasets of approximately 100 total
|
|
176
|
+
rows or fewer. Count every row in the core tree, including nested and collapsed
|
|
177
|
+
rows, not only the rows currently visible. `same-level` and especially `all`
|
|
178
|
+
inspect the full tree when determining menu destinations. For larger,
|
|
179
|
+
virtualized, or heavily nested datasets, use a purpose-built reordering
|
|
180
|
+
workflow.
|
|
181
|
+
|
|
182
|
+
```tsx
|
|
183
|
+
const [customers, setCustomers] = useState(initialCustomers);
|
|
184
|
+
|
|
185
|
+
<DataTable
|
|
186
|
+
columns={columns}
|
|
187
|
+
data={customers}
|
|
188
|
+
enableExpanding
|
|
189
|
+
enableRowReordering
|
|
190
|
+
getRowId={(row) => row.id}
|
|
191
|
+
getRowReorderLabel={(row) => row.original.name}
|
|
192
|
+
rowReorderMode="same-level"
|
|
193
|
+
onRowReorder={({ data, position, source, destination }) => {
|
|
194
|
+
setCustomers(data);
|
|
195
|
+
saveOrder({ position, source, destination });
|
|
196
|
+
}}
|
|
197
|
+
/>;
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
The handle supports pointer input and opens a movement menu when pressed.
|
|
201
|
+
`rowReorderMode` controls which pointer targets and menu actions are available:
|
|
202
|
+
|
|
203
|
+
- `siblings` (default) reorders only within the current parent and never moves
|
|
204
|
+
a row inside another row.
|
|
205
|
+
- `same-level` also moves rows between parents, but preserves their tree depth.
|
|
206
|
+
- `all` allows unrestricted before, after, and inside movement.
|
|
207
|
+
|
|
208
|
+
Moves that place a row under a new parent require `enableExpanding`, ensuring
|
|
209
|
+
the moved row remains reachable through the destination parent's expand
|
|
210
|
+
control.
|
|
211
|
+
|
|
212
|
+
Menu actions are hidden when the selected mode rejects the destination or the
|
|
213
|
+
move would not change the row position.
|
|
214
|
+
|
|
215
|
+
Reordering is disabled while the table is filtered, grouped, or paginated.
|
|
216
|
+
Clear those transformed views before changing the underlying manual order.
|
|
217
|
+
Unavailable reorder handles remain keyboard-focusable and show the reason in
|
|
218
|
+
an accessible tooltip.
|
|
219
|
+
|
|
163
220
|
## Imports
|
|
164
221
|
|
|
165
222
|
```tsx
|
|
@@ -188,13 +245,19 @@ import {
|
|
|
188
245
|
| `aggregationFns` | `Record<string, AggregationFn<any>>` | no | - | - | TypeLiteral |
|
|
189
246
|
| `align` | `"left" \| "right"` | no | - | - | TypeLiteral |
|
|
190
247
|
| `enableExpanding` | `boolean \| "rowsOnly"` | no | - | Enable nested row expansion. Include `'rowsOnly'` for row-level toggles without group expand/collapse header control. | TypeLiteral |
|
|
248
|
+
| `enableRowReordering` | `boolean` | no | `false` | Enable controlled row reordering for small, non-paginated tables. Intended for approximately 100 total rows or fewer, including nested and collapsed rows. Nested row data must use the `subRows` property; custom `getSubRows` accessors are unsupported. | TypeLiteral |
|
|
249
|
+
| `enableSorting` | `boolean` | no | `false` | - | TypeLiteral |
|
|
191
250
|
| `filterFns` | `Record<string, FilterFn<any>>` | no | - | - | TypeLiteral |
|
|
251
|
+
| `getRowReorderLabel` | `((row: Row<TData>) => string)` | no | - | - | TypeLiteral |
|
|
252
|
+
| `getSubRows` | `((originalRow: TData, index: number) => TData[])` | no | - | - | TypeLiteral |
|
|
192
253
|
| `isLoading` | `boolean` | no | - | - | TypeLiteral |
|
|
193
254
|
| `onExpand` | `((expanded: ExpandedState) => void)` | no | - | function to peek into expanding state changes | TypeLiteral |
|
|
194
255
|
| `onRowAction` | `((row: Row<TData>) => void)` | no | - | function called with the pressed row | TypeLiteral |
|
|
256
|
+
| `onRowReorder` | `((event: RowReorderEvent<TData>) => void)` | no | - | - | TypeLiteral |
|
|
195
257
|
| `onSelect` | `((selected: RowSelectionState) => void)` | no | - | function to peek into selection state changes | TypeLiteral |
|
|
196
258
|
| `onSort` | `((selected: SortingState) => void)` | no | - | function to peek into sorting state changes | TypeLiteral |
|
|
197
259
|
| `pattern` | `boolean` | no | - | - | TypeLiteral |
|
|
260
|
+
| `rowReorderMode` | `"all" \| "siblings" \| "same-level"` | no | `siblings` | - | TypeLiteral |
|
|
198
261
|
| `size` | `"sm" \| "md" \| "lg"` | no | `md` | - | TypeLiteral |
|
|
199
262
|
| `sortingFns` | `Record<string, SortingFn<any>>` | no | - | - | TypeLiteral |
|
|
200
263
|
| `SubRowComponent` | `((row: Row<TData>) => ReactNode)` | no | - | - | TypeLiteral |
|
|
@@ -240,6 +303,40 @@ Use nested rows when child records share the same shape as their parent row. Inc
|
|
|
240
303
|
const NestedRows = () => <DataTable enableExpanding />;
|
|
241
304
|
```
|
|
242
305
|
|
|
306
|
+
### Row Reordering
|
|
307
|
+
|
|
308
|
+
Row reordering is controlled. Update the table data from `onRowReorder`. Choose a row reorder mode to limit movement to siblings, preserve tree depth while changing parents, or allow every valid destination.
|
|
309
|
+
|
|
310
|
+
```tsx
|
|
311
|
+
const RowReordering = () => {
|
|
312
|
+
const [rows, setRows] = React.useState<DataTableNode[]>(expandedData);
|
|
313
|
+
|
|
314
|
+
return (
|
|
315
|
+
<DataTable
|
|
316
|
+
columns={expandedColumns}
|
|
317
|
+
data={rows}
|
|
318
|
+
enableExpanding
|
|
319
|
+
enableRowReordering
|
|
320
|
+
getRowId={(row) => row.uuid}
|
|
321
|
+
getRowReorderLabel={(row) =>
|
|
322
|
+
`${row.original.firstName} ${row.original.lastName}`
|
|
323
|
+
}
|
|
324
|
+
initialState={{ expanded: true }}
|
|
325
|
+
onRowReorder={(event) => {
|
|
326
|
+
setRows(event.data);
|
|
327
|
+
action('Row reordered')({
|
|
328
|
+
rowId: event.rowId,
|
|
329
|
+
targetRowId: event.targetRowId,
|
|
330
|
+
position: event.position,
|
|
331
|
+
source: event.source,
|
|
332
|
+
destination: event.destination,
|
|
333
|
+
});
|
|
334
|
+
}}
|
|
335
|
+
rowReorderMode="siblings" />
|
|
336
|
+
);
|
|
337
|
+
};
|
|
338
|
+
```
|
|
339
|
+
|
|
243
340
|
### Custom Rows
|
|
244
341
|
|
|
245
342
|
Use custom rows when an expanded row needs richer content than the standard column layout while remaining connected to the parent row.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxio-com/react-ui-components",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.19.0",
|
|
4
4
|
"description": "React UI components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
"react-dom": "^19.1.1"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
+
"@atlaskit/pragmatic-drag-and-drop": "^2.0.1",
|
|
49
|
+
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^2.0.0",
|
|
48
50
|
"@floating-ui/react-dom": "^2.1.6",
|
|
49
51
|
"@floating-ui/react-dom-interactions": "^0.13.3",
|
|
50
52
|
"@maxio-com/design-tokens": "^4.2.2",
|
|
@@ -63,5 +65,5 @@
|
|
|
63
65
|
"publishConfig": {
|
|
64
66
|
"access": "public"
|
|
65
67
|
},
|
|
66
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "550dc2c6524537ca3808d6b69a07c16f98c9848d"
|
|
67
69
|
}
|
package/typings/index.d.ts
CHANGED
|
@@ -163,9 +163,41 @@ declare const IconButton: ({ "aria-label": ariaLabel, className, ...props }: Ico
|
|
|
163
163
|
|
|
164
164
|
type TableSize = 'sm' | 'md' | 'lg';
|
|
165
165
|
type ColumnAlign = 'left' | 'right';
|
|
166
|
+
type RowReorderMode = 'siblings' | 'same-level' | 'all';
|
|
167
|
+
type RowReorderPosition = 'before' | 'after' | 'inside';
|
|
168
|
+
type RowReorderLocation = {
|
|
169
|
+
parentRowId: string | null;
|
|
170
|
+
index: number;
|
|
171
|
+
};
|
|
172
|
+
type RowReorderEvent<TData extends RowData> = {
|
|
173
|
+
data: TData[];
|
|
174
|
+
row: Row<TData>;
|
|
175
|
+
rowId: string;
|
|
176
|
+
targetRow: Row<TData>;
|
|
177
|
+
targetRowId: string;
|
|
178
|
+
position: RowReorderPosition;
|
|
179
|
+
source: RowReorderLocation;
|
|
180
|
+
destination: RowReorderLocation;
|
|
181
|
+
};
|
|
166
182
|
type RequiredTableOptions<TData extends RowData> = Pick<TableOptions<TData>, 'data' | 'columns'>;
|
|
167
|
-
type OptionalTableOptions<TData extends RowData> = Partial<Omit<TableOptions<TData>, 'getCoreRowModel' | 'enableExpanding'>>;
|
|
168
|
-
type
|
|
183
|
+
type OptionalTableOptions<TData extends RowData> = Partial<Omit<TableOptions<TData>, 'getCoreRowModel' | 'enableExpanding' | 'enableSorting' | 'getSubRows'>>;
|
|
184
|
+
type RowReorderingOptions<TData extends RowData> = {
|
|
185
|
+
enableSorting?: TableOptions<TData>['enableSorting'];
|
|
186
|
+
enableRowReordering?: false;
|
|
187
|
+
getSubRows?: TableOptions<TData>['getSubRows'];
|
|
188
|
+
getRowReorderLabel?: never;
|
|
189
|
+
onRowReorder?: never;
|
|
190
|
+
rowReorderMode?: never;
|
|
191
|
+
} | {
|
|
192
|
+
enableSorting?: TableOptions<TData>['enableSorting'];
|
|
193
|
+
enableRowReordering: true;
|
|
194
|
+
getSubRows?: never;
|
|
195
|
+
getRowId: NonNullable<TableOptions<TData>['getRowId']>;
|
|
196
|
+
getRowReorderLabel?: (row: Row<TData>) => string;
|
|
197
|
+
onRowReorder: (event: RowReorderEvent<TData>) => void;
|
|
198
|
+
rowReorderMode?: RowReorderMode;
|
|
199
|
+
};
|
|
200
|
+
type DataTableBaseProps<TData extends RowData> = {
|
|
169
201
|
size?: TableSize;
|
|
170
202
|
pattern?: boolean;
|
|
171
203
|
align?: ColumnAlign;
|
|
@@ -179,6 +211,7 @@ type DataTableProps<TData extends RowData = unknown> = {
|
|
|
179
211
|
onSelect?: (selected: RowSelectionState) => void;
|
|
180
212
|
onSort?: (selected: SortingState) => void;
|
|
181
213
|
} & RequiredTableOptions<TData> & OptionalTableOptions<TData>;
|
|
214
|
+
type DataTableProps<TData extends RowData = unknown> = DataTableBaseProps<TData> & RowReorderingOptions<TData>;
|
|
182
215
|
declare module '@tanstack/react-table' {
|
|
183
216
|
interface ColumnMeta<TData extends RowData, TValue> {
|
|
184
217
|
align?: ColumnAlign;
|
|
@@ -188,7 +221,7 @@ declare module '@tanstack/react-table' {
|
|
|
188
221
|
}
|
|
189
222
|
}
|
|
190
223
|
|
|
191
|
-
declare const DataTable: <TData extends RowData>({ pattern, size, SubRowComponent, onExpand, onSelect, onSort, enableSorting, enableRowSelection, enableExpanding, columns: originalColumns, actions, actionsColumnSize, onRowAction, state: userState, ...props }: DataTableProps<TData>) => React$1.JSX.Element;
|
|
224
|
+
declare const DataTable: <TData extends RowData>({ pattern, size, SubRowComponent, onExpand, onSelect, onSort, enableSorting, enableRowSelection, enableExpanding, columns: originalColumns, actions, actionsColumnSize, onRowAction, enableRowReordering, getRowReorderLabel, onRowReorder, rowReorderMode, getRowId, getSubRows, state: userState, ...props }: DataTableProps<TData>) => React$1.JSX.Element;
|
|
192
225
|
//# sourceMappingURL=DataTable.d.ts.map
|
|
193
226
|
|
|
194
227
|
type DrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
|