@maxio-com/react-ui-components 9.17.1 → 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.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react"),t=require("classnames"),a=require("react-aria"),l=require("@tanstack/react-table"),n=require("@react-stately/toggle"),i=require("@react-stately/checkbox"),o=require("react-aria-components"),r=require("framer-motion"),s=require("@floating-ui/react-dom-interactions"),c=require("@react-stately/radio"),m=require("@react-stately/toast"),d=require("@react-aria/toast");function u(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=u(e);const p=["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"],v=["avalara","pipedrive","quickbooks","salesforce","xero"],b=({variant:a,color:l,className:n,size:i})=>{const o=(e,t)=>t.includes(e),r=o(a,p)||o(a,g),s=o(a,v),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,v)},n);return e.createElement("i",{className:c})},f=({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:x,label:p,description:g,link:v}=l,f=t("maxio-action-list__label",{"maxio-truncate":i});return e.createElement("a",{"aria-labelledby":m,...v,className:t("maxio-action-list__content",v.className,{"maxio-action-list__content--size-small":r}),tabIndex:n?0:-1,ref:s,role:o},d&&e.createElement(b,{variant:d,className:t("maxio-action-list__leading-icon",u)}),e.createElement("span",{className:f,id:m},p),g&&e.createElement("span",{className:"maxio-action-list__description"},g),x&&e.createElement(b,{variant:x,className:"maxio-action-list__trailing-icon"}))},h=(e,t,a)=>0===e?e:1===e&&"divider"===t[e-1].type?a||e:"divider"===t[e-1].type?h(e-1,t,a||e):e-1,E=({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=>h(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(f,{item:t,truncateLabel:o,key:`listbox-${t.id}`,isSelected:a===m,small:r,...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(b,{variant:o,className:"maxio-link__icon"}))},N=({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"})},w=({fullWidth:l=!1,leadingElement:n,trailingElement:i,icon:o,variant:r="primary",size:s,...c})=>{const m=e.useRef(null),{linkProps:d}=a.useLink({...c},m),u=t("maxio-button",c.className,{[`maxio-button--${s}`]:s,[`maxio-button--${r}`]:r,"maxio-button--full-width":l});return e.createElement("a",{...d,ref:m,className:u,href:c.href},n&&e.cloneElement(n,{...e.isValidElement(n)&&{className:"maxio-button__leading-element"}}),c.children,(i||o)&&e.cloneElement(i||o,{...e.isValidElement(i||o)&&{className:"maxio-button__trailing-element"}}))},y=({disabled:l,loading:n=!1,fullWidth:i=!1,leadingElement:o,trailingElement:r,icon:s,variant:c="primary",size:m,...d})=>{const u=e.useRef(null),{buttonProps:x}=a.useButton({...d,isDisabled:l,formAction:"string"==typeof d.formAction?d.formAction:void 0},u),p=["primary","danger"].includes(c),g=t("maxio-button",d.className,{[`maxio-button--${m}`]:m,[`maxio-button--${c}`]:c,"maxio-button--loading":n,"maxio-button--full-width":i});return e.createElement("button",{...x,className:g,ref:u},o&&e.cloneElement(o,{...e.isValidElement(o)&&{className:"maxio-button__leading-element"}}),d.children,!n&&(r||s)&&e.cloneElement(r||s,{...e.isValidElement(r||s)&&{className:"maxio-button__trailing-element"}}),n&&e.createElement(N,{className:"maxio-button__trailing-element",size:"md",white:p}))},k=t=>(e=>"href"in e)(t)?e.createElement(w,{...t}):e.createElement(y,{...t}),C=({"aria-label":a,className:l,...n})=>e.createElement(k,{"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],x=t("maxio-alert__content",{"maxio-alert__content--block":"block"===r});return e.createElement("div",{className:d},e.createElement(b,{variant:u,className:"maxio-alert__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-alert__container"},e.createElement("div",{className:x},l&&e.createElement("span",{className:"maxio-alert__title"},l),a&&e.createElement("span",{className:"maxio-alert__message"},a),n&&o&&e.createElement(_,{className:"maxio-alert__link",href:o,variant:"high-contrast",underline:!0,...i?{external:!0}:{}},n))),c&&e.createElement(C,{icon:e.createElement(b,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:c,className:"maxio-alert__dismiss"}))},S=e.createContext({}),P=({children:t})=>{const[a,l]=e.useState(!1),n=e.useId(),i=e.useId();return e.createElement(S.Provider,{value:{controlsId:n,buttonId:i,isOpen:a,onClose:()=>l(!1),onOpen:()=>l(!0),onToggle:()=>l(e=>!e)}},t)};function T(){const t=e.useContext(S);if(!t||"object"==typeof t&&0===Object.keys(t).length)throw new Error("useMenu hook must be used within a MenuProvider");return t}const R=({children:t})=>{const{isOpen:a,onToggle:l,onClose:n}=T();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(_,{size:"sm",href:n},a):a;return e.createElement("li",{className:t("maxio-breadcrumbs__item",l),...i},o)},D="Breadcrumbs requires at least one BreadcrumbsItem as children",O='Last BreadcrumbsItem should not have "href" prop. It is the current page.',z="Breadcrumbs only accepts BreadcrumbsItem as children",M="row-controls",B="row-actions",L=({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))},A=({children:t})=>e.createElement("thead",null,t),F=({children:t})=>e.createElement("tbody",null,t),V=({children:a,table:l,header:n,className:i,enableExpanding:o,...r})=>{var s,c,m,d,u,x,p,g,v,f,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===(x=null===(u=null==E?void 0:E.columnDef)||void 0===u?void 0:u.meta)||void 0===x?void 0:x.width,I=null===(g=null===(p=null==E?void 0:E.columnDef)||void 0===p?void 0:p.meta)||void 0===g?void 0:g.controls,S=null===(f=null===(v=null==E?void 0:E.columnDef)||void 0===v?void 0:v.meta)||void 0===f?void 0:f.actions,P=null==E?void 0:E.getIsPinned(),T=null==E?void 0:E.getIsSorted(),R="asc"===T,$=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":I,"maxio-data-table__cell--actions":S}),D={...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:$,onClick:N,colSpan:null==n?void 0:n.colSpan,style:D,...r},e.createElement("div",{className:"maxio-data-table__cell-flex"},!0===o&&A&&e.createElement(C,{size:"sm",variant:"ghost",icon:e.createElement(b,{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(b,{variant:O,className:"maxio-data-table__sort-icon"})))},H=({children:l,row:n,isChild:i,isHeader:o,className:r,onRowAction:s,...c})=>{var m,d,u;const x=null===(m=null==n?void 0:n.getIsSelected)||void 0===m?void 0:m.call(n),p=(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)),g=Boolean(n&&s&&!o&&!i),v=e.useRef(null),b=e=>{v.current=e.target},{pressProps:f}=a.usePress({isDisabled:!g,onPress:e=>{var t;const a=null!==(t=v.current)&&void 0!==t?t:e.target;v.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":x||E,"maxio-data-table__row--expanded":p,"maxio-data-table__row--expanded-child":i,"maxio-data-table__row--actionable":g},r),N=g?a.mergeProps({onClickCapture:b,onKeyDownCapture:b,tabIndex:0},f,h,c):c;return e.createElement("tr",{...N,className:_,tabIndex:g?N.tabIndex:c.tabIndex},l)},W=e.createContext({}),j=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))});j.displayName="InnerCheckbox";const q=({label:t,error:l=!1,className:i,indeterminate:o,value:r="",disabled:s,readOnly:c,defaultChecked:m,checked:d,...u})=>{const x=e.useRef(null),p=e.useContext(W),{inputProps:g,isDisabled:v,isInvalid:b,isSelected:f}=p&&Object.keys(p).length>0?a.useCheckboxGroupItem({value:r,"aria-label":null!=t?t:u["aria-label"],isDisabled:s,isInvalid:l,isIndeterminate:o,isReadOnly:c,...u},p,x):a.useCheckbox({"aria-label":null!=t?t:u["aria-label"],isDisabled:s,isInvalid:l,isIndeterminate:o,isReadOnly:c,value:r,...u},n.useToggleState({...u,isSelected:d,defaultSelected:m}),x);return e.createElement(j,{inputProps:g,checked:f,disabled:v,invalid:b,indeterminate:o,className:i,error:l,label:t,ref:x,...u})},G=({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(b,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},a)),K=({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(q,{"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(q,{"aria-label":`Select row ${c}`,onChange:o,checked:r,indeterminate:s})},Z=({children:t})=>e.createElement("div",{className:"maxio-data-table__cell-flex"},t),Q=({row:a,cell:l,children:n,className:i,...o})=>{var r,s,c,m,d,u;const x=null==l?void 0:l.column,p=null===(s=null===(r=null==x?void 0:x.columnDef)||void 0===r?void 0:r.meta)||void 0===s?void 0:s.align,g=null===(m=null===(c=null==x?void 0:x.columnDef)||void 0===c?void 0:c.meta)||void 0===m?void 0:m.controls,v=null===(u=null===(d=null==x?void 0:x.columnDef)||void 0===d?void 0:d.meta)||void 0===u?void 0:u.actions,b=null==x?void 0:x.getIsPinned(),f=t("maxio-data-table__cell",i,{[`maxio-data-table__cell--pinned-${b}`]:b,[`maxio-data-table__cell--${p}`]:p,"maxio-data-table__cell--controls":g,"maxio-data-table__cell--actions":v}),h="left"===b?{left:null==x?void 0:x.getStart("left")}:"right"===b?{right:null==x?void 0:x.getAfter("right")}:{};return e.createElement("td",{className:f,style:h,...o},n)},X=({row:t,SubRowComponent:a,pattern:n,enableExpanding:i,onRowAction:o})=>{var r,s,c,m,d;const u=a&&t.getParentRow()&&t.getParentRow().getIsExpanded(),x=u&&t.getVisibleCells()[0].column.columnDef.id===M,p=u&&t.getVisibleCells()[t.getVisibleCells().length-1].column.columnDef.id===B,g=[p,x].filter(Boolean).length,v=t.getVisibleCells().length-g,f=null!==(s=null===(r=t.getParentRow())||void 0===r?void 0:r.index)&&void 0!==s?s:t.index,h=n&&a&&f%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}),I=o&&k?k.id:void 0;return e.createElement(e.Fragment,{key:t.id},u?e.createElement(H,{key:`${t.id}-sub`,row:t,isChild:!0,className:h},x&&e.createElement(Q,{className:"maxio-data-table__cell--pinned-left"}),e.createElement(Q,{colSpan:v},a(t)),p&&e.createElement(Q,{className:"maxio-data-table__cell--pinned-right"})):e.createElement(H,{key:`${t.id}-parent`,row:t,className:h,onRowAction:o,"aria-labelledby":I},t.getVisibleCells().map(a=>{const n=i&&a.column.getIndex()===y;return e.createElement(Q,{key:a.id,row:t,cell:a,id:a.id},e.createElement("div",{className:"maxio-data-table__cell-flex",style:i&&n?{paddingLeft:`${(null==t?void 0:t.depth)+w}rem`}:void 0},i&&E&&n&&e.createElement(C,{size:"sm",variant:"ghost",icon:e.createElement(b,{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"}),l.flexRender(a.column.columnDef.cell,a.getContext())))})))},J=(e=[])=>e.filter(e=>e!==M&&e!==B),ee={sm:"h3",md:"h2",lg:"h1"},te=({children:a,size:l="sm",className:n,...i})=>{const o=ee[l],r=t(`maxio-heading-${l}`,n);return e.createElement(o,{className:r,...i},a)},ae={click:s.useClick,hover:e=>s.useHover(e,{delay:100}),focus:s.useFocus,dismiss:s.useDismiss},le=(e,t)=>t.map(t=>ae[t](e)),ne=({placement:t="top",isActive:a=!1,interactions:l=["hover"],floatingElementOffset:n=0,onOverlayUpdate:i,autoHideMs:o})=>{const r=e.useRef(null),{strategy:c,x:m,y:d,context:u,floating:x,reference:p}=s.useFloating({placement:t,open:a,onOpenChange:e=>i(e),middleware:[s.offset(n)]}),{getReferenceProps:g,getFloatingProps:v}=s.useInteractions([...le(u,l),s.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:x,reference:p},floatingElementCSSPosition:{position:c,top:null!=d?d:0,left:null!=m?m:0},getReferenceProps:g,getFloatingProps:v}};function ie(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 oe(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}const re=({children:a,usePortal:l=!1,isActive:n=!1,placement:i="top",interactions:o=["hover"],role:c="tooltip",renderOverlay:m,floatingElementOffset:d,motionSettings:u={},autoHideMs:x,onOverlayUpdate:p,className:g})=>{const{getReferenceProps:v,getFloatingProps:b,refs:{floating:f,reference:h},floatingElementCSSPosition:E}=ne({isActive:n,onOverlayUpdate:p,autoHideMs:x,floatingElementOffset:d,interactions:o,placement:i}),_=e.createElement(r.AnimatePresence,null,n&&e.createElement(r.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",g),...v(),"data-testid":"overlay-trigger"},a),l?e.createElement(s.FloatingPortal,{id:"maxio-ui-portal"},_):_)},se=({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)),ce={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:m,onVisibilityUpdate:d,floatingElementOffset:u=5})=>{const[x,p]=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||p(e),d&&d(e)},50)},[g,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(()=>()=>{v.current&&clearTimeout(v.current)},[]),e.createElement(re,{role:"tooltip",className:m,floatingElementOffset:u,motionSettings:f,isActive:g?s:x,onOverlayUpdate:b,autoHideMs:r,usePortal:c,placement:l,interactions:a,renderOverlay:()=>e.createElement(se,{size:i,arrowPosition:ce[l],maxWidth:n},o())},t)},de=({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)},ue=({className:a,...l})=>e.createElement(o.ListBox,{...l,className:t("maxio-listbox",a)});ue.displayName="ListBox";const xe=({className:a,...l})=>{const n=l.textValue||("string"==typeof l.children?l.children:void 0);return e.createElement(o.ListBoxItem,{...l,textValue:n,className:t("maxio-listbox__item",a)},o.composeRenderProps(l.children,(t,{isSelected:a})=>e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-listbox__content"},"string"==typeof t?e.createElement(de,{size:"sm"},t):t),a&&e.createElement(b,{variant:"check"}))))};xe.displayName="ListBox.Item";const pe=({className:a,...l})=>e.createElement(o.ListBoxSection,{...l,className:t("maxio-listbox__section",a)});pe.displayName="ListBox.Section";const ge=({className:a,...l})=>e.createElement(o.Header,{...l,className:t("maxio-listbox__header",a)});ge.displayName="ListBox.Header";const ve=Object.assign(ue,{Item:xe,Section:pe,Header:ge}),be=({className:a,hideArrow:l=!1,children:n,offset:i=4,...r})=>e.createElement(o.Popover,{...r,className:t("maxio-popover",a),offset:i},e.createElement(e.Fragment,null,!l&&e.createElement(o.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)),fe=({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:r,description:s,errorMessage:c,leadingElement:m=null,fullWidth:d,className:u,placeholder:x,renderEmptyState:p,selectionMode:g,children:v,...f})=>{const h=e.useRef(null),E=e.useRef(null),[_,N]=e.useState(),[w,y]=e.useState(0),k=!!c,C=l||k,I=v,S=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(S(),"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(S);return t.observe(e),()=>t.disconnect()},[S]);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(o.ComboBox,{...f,isDisabled:a,isInvalid:C,isReadOnly:n,selectionMode:g,className:P},r&&e.createElement(o.Label,{className:"maxio-text-field__label"},r),e.createElement("div",{ref:h,className:"maxio-text-field__items"},m&&e.createElement("div",{className:"maxio-text-field__leading-element"},m),e.createElement(o.Input,{ref:E,className:"maxio-text-field__input",placeholder:x}),e.createElement("div",{className:"maxio-text-field__trailing-element"},e.createElement(o.Button,{className:t("maxio-button","maxio-button--ghost","maxio-button--icon","maxio-button--sm")},e.createElement(b,{variant:"chevron-up-down"})))),s&&!k&&e.createElement(o.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},s),c&&e.createElement(o.FieldError,{className:"maxio-form-error"},t=>e.createElement(e.Fragment,null,e.createElement(b,{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(be,{hideArrow:!0,className:"maxio-combobox__popover",crossOffset:w,style:_},e.createElement(ve,{renderEmptyState:p},I)))};fe.displayName="ComboBox";const he=t=>e.createElement(ve.Item,{...t});he.displayName="ComboBox.Item";const Ee=t=>e.createElement(ve.Section,{...t});Ee.displayName="ComboBox.Section";const _e=t=>e.createElement(ve.Header,{...t});_e.displayName="ComboBox.Header";const Ne=Object.assign(fe,{Item:he,Section:Ee,Header:_e}),we=e.createContext({}),ye=e.forwardRef(({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:r,description:s,errorMessage:c,leadingElement:m=null,trailingElement:d=null,fullWidth:u,className:x,...p},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},x);return e.createElement(o.TextField,{...p,isDisabled:a,isReadOnly:n,isInvalid:l,className:v},r&&e.createElement(o.Label,{className:"maxio-text-field__label"},r),e.createElement("div",{className:"maxio-text-field__items"},m&&e.createElement("div",{className:"maxio-text-field__leading-element"},m),e.createElement(o.Input,{ref:g,className:"maxio-text-field__input"}),d&&e.createElement("div",{className:"maxio-text-field__trailing-element"},d)),s&&!(l&&c)&&e.createElement(o.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},s),c&&e.createElement(o.FieldError,{className:"maxio-form-error"},e.createElement(b,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},c)))});ye.displayName="TextField";const ke=e.forwardRef(({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:r,description:s,errorMessage:c,fullWidth:m,className:d,...u},x)=>{const p=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(o.TextField,{...u,isDisabled:a,isReadOnly:n,isInvalid:l,className:p},r&&e.createElement(o.Label,{className:"maxio-form-label"},r),e.createElement(o.TextArea,{ref:x,className:"maxio-text-area__input"}),s&&!(l&&c)&&e.createElement(o.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},s),c&&e.createElement(o.FieldError,{className:"maxio-form-error"},e.createElement(b,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},c)))});ke.displayName="TextArea";const Ce=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:x,className:p,...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,N={..._,label:r,description:s,errorMessage:m,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:w,inputProps:y,descriptionProps:k,errorMessageProps:C}=a.useTextField(N,h),I=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":x},p),S=n&&m&&c;return e.createElement("div",{className:I},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&&!S&&e.createElement("div",{className:"maxio-form-helper-text",...k},s),S&&e.createElement(U,{...C},m))});Ce.displayName="TextInput";const Ie=({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}),x=a.useId();return e.createElement("div",{className:u},n&&e.createElement("label",{htmlFor:x,className:"maxio-select__label"},n),e.createElement("div",{className:"maxio-select__input-container"},e.createElement("select",{id:x,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(b,{variant:"chevron-up-down"})),!!c&&e.createElement(U,null,c),s&&!c&&e.createElement("div",{className:"maxio-form-helper-text"},s))},Se=({className:a,size:l="md",fullWidth:n=!1,selectionMode:i="single",orientation:r="horizontal",disallowEmptySelection:s=!0,...c})=>e.createElement(o.ToggleButtonGroup,{...c,selectionMode:i,orientation:r,disallowEmptySelection:s,className:o.composeRenderProps(a,e=>t("maxio-segmented-control",`maxio-segmented-control--${l}`,{"maxio-segmented-control--full-width":n},e))});Se.displayName="SegmentedControl";const Pe=({className:a,children:l,...n})=>e.createElement(o.ToggleButton,{...n,className:o.composeRenderProps(a,e=>t("maxio-segmented-control__item",e))},o.composeRenderProps(l,t=>e.createElement(e.Fragment,null,e.createElement(o.SelectionIndicator,{className:"maxio-segmented-control__selection-indicator","data-selected":!0}),t)));Pe.displayName="SegmentedControl.Item";const Te=Object.assign(Se,{Item:Pe}),Re=({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(b,{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(b,{variant:a}))),$e=e=>"heading"!==e.type,De=e=>{const t=(e=>e.flat().filter($e).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 $e(e)&&(null===(a=e.items)||void 0===a?void 0:a.includes(t))?{...e,isOpen:!0}:e})):e},Oe=e.createContext({}),ze=()=>e.useContext(Oe),Me=({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,x]=e.useState(()=>De(i)),{windowWitdh:p}=oe(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&&g()}(p)},[p]),e.useEffect(()=>{"boolean"==typeof a&&d(a)},[a]);const g=()=>{d(!1)};return e.createElement(Oe.Provider,{value:{sections:u,topDropdownItems:r,onSectionOpen:e=>{x(t=>t.map(t=>t.map(t=>$e(t)?{...t,isOpen:(null==t?void 0:t.name)===e&&!t.isOpen}:t)))},isOpen:m,onOpen:()=>{d(!0)},onClose:g,withIcons:n,shouldToggleSidebar:o}},t)},Be=()=>{const{onOpen:t,topDropdownItems:a,isOpen:l}=ze(),{mainItem:n,otherItems:i,actions:o}=a,r=e.useRef(null),s=ie(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(Re,{type:"menu",isTooltipVisible:!l&&s,leadingIcon:n.icon,trailingIcon:"chevron-up-down",leadingIconClassName:n.iconClass},n.title)):e.createElement(Re,{type:"menu",trailingIcon:"chevron-up-down"},n.title)),e.createElement(E,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:m,small:!0})))},Le=({section:t})=>{const{isOpen:a,withIcons:l}=ze(),n=e.useRef(null),i=ie(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(Re,{isTooltipVisible:i&&!a,type:"menu",leadingIcon:l?t.icon:void 0},t.name)))},Ae=({section:a})=>{var l,n;const{onOpen:i,onSectionOpen:o,isOpen:r,withIcons:s}=ze(),c=e.useRef(null),m=ie(c);if(!$e(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(Le,{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(Re,{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))))))},Fe=()=>{const{sections:t}=ze();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(Ae,{key:`section-list-item-${t.type}-${a}-${l}`,section:t})))))},Ve=()=>{const{onClose:t,shouldToggleSidebar:a}=ze();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(b,{variant:"sidebar"})))},He=()=>{const{isOpen:a}=ze();return e.createElement("nav",{className:t("maxio-side-nav",{"maxio-side-nav--collapsed":!a})},e.createElement(Ve,null),e.createElement(Be,null),e.createElement("div",{className:"maxio-side-nav__items-container"},e.createElement(Fe,null)))},We=e.createContext({}),je=()=>e.useContext(We),qe=({children:t,variant:a="line",withDivider:l=!1,defaultIndex:n=0,onChange:i,index:o})=>{const[r,s]=e.useState(()=>void 0!==o?o:n);e.useEffect(()=>{void 0===o&&s(n),"number"==typeof o&&s(o)},[n,o]);return e.createElement(We.Provider,{value:{currentIndex:r,variant:a,withDivider:l,onChange:e=>{let t;t="function"==typeof e?e(r):e,void 0===o&&s(t),"function"==typeof i&&i(t)}}},t)},Ge=({disabled:a=!1,value:l=0,isCurrent:n,...i})=>{const{onChange:o,currentIndex:r}=je(),s=t("maxio-tabs__tab",{"maxio-tabs__tab--active":r===l,"maxio-tabs__tab--disabled":a,"maxio-tabs__tab--icon":"icon"===i.type}),c=()=>{o(l)},m={"aria-selected":n,id:`tab-${l}`,"aria-controls":`panel-${l}`,role:"tab",tabIndex:n?0:-1},d=e.useRef(null),u=e.useRef(!1);if(e.useEffect(()=>{var e;n&&u.current&&(null===(e=d.current)||void 0===e||e.focus())},[n]),e.useEffect(()=>{u.current=!0},[]),"icon"===i.type){const{icon:t,...a}=i;return e.createElement("div",{className:s,ref:d,onClick:c,...m,...a},e.createElement("div",{className:"maxio-tabs__tab__content"},t))}const{children:x,rightIcon:p,...g}=i;return e.createElement("div",{ref:d,className:s,onClick:c,...m,...g},e.createElement("div",{className:"maxio-tabs__tab__content"},x,p||null))},Ue=({children:t,value:a,...l})=>{const{currentIndex:n}=je();return e.createElement("div",{...l,...a?{id:`panel-${a}`}:{},role:"tabpanel","aria-labelledby":`tab-${a}`,hidden:n!==a},t)},Ke=(e,t,a)=>0===e?e:1===e&&t[e-1].disabled?a||e:t[e-1].disabled?Ke(e-1,t,a||e):e-1,Ye=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__header",l),...n},a);Ye.displayName="Card.Header";const Ze=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__body",l),...n},a);Ze.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:Ye,Body:Ze,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}=d.useToast(l,a,o),{closable:u=!0,underline:x=!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(b,{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(_,{href:l.toast.content.link.href,underline:x,external:p},l.toast.content.link.text))),u&&e.createElement(C,{variant:"ghost",icon:e.createElement(b,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss",...m}))},st=({state:t,...a})=>{const l=e.useRef(null),{regionProps:n}=d.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 m.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:x,justifyContent:p,...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-${m}`]:void 0!==m,[`maxio-items-${x}`]:x,[`maxio-justify-${p}`]:p},d);return e.createElement("div",{className:v,...g},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(b,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},xt={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"};Object.defineProperty(exports,"createColumnHelper",{enumerable:!0,get:function(){return l.createColumnHelper}}),Object.defineProperty(exports,"DialogTrigger",{enumerable:!0,get:function(){return o.DialogTrigger}}),Object.defineProperty(exports,"Pressable",{enumerable:!0,get:function(){return o.Pressable}}),exports.ActionList=E,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(te,{size:"lg",className:t("maxio-auth-layout__heading",xt[i])},l)),n&&e.createElement(dt,{style:{color:"var(--maxio-color-text-tertiary)"}},e.createElement(de,{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],x=t("maxio-banner__content",{"maxio-banner__content--block":"block"===r});return e.createElement("div",{className:d,"aria-live":"assertive"},e.createElement(b,{variant:u,className:"maxio-banner__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-banner__container"},e.createElement("div",{className:x},l&&e.createElement("span",{className:"maxio-banner__title"},l),a&&e.createElement("span",{className:"maxio-banner__message"},a),n&&o&&e.createElement(_,{href:o,..."warning"!==s&&{variant:"inverse"},underline:!0,...i?{external:!0}:{}},n))),c&&e.createElement(C,{icon:e.createElement(b,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:c,className:"maxio-banner__dismiss"}))},exports.Body=de,exports.Breadcrumbs=({className:a,children:l,...n})=>{const i=e.Children.count(l);if(0===i)throw new Error(D);const o=e.Children.map(l,(t,a)=>{if(e.isValidElement(t)&&t.type===$){if(a===i-1&&t.props.href)throw new Error(O);return e.cloneElement(t,{"aria-current":a===i-1?"page":void 0})}throw new Error(z)});return e.createElement("nav",{"aria-label":"Breadcrumb",...n},e.createElement("ol",{className:t("maxio-breadcrumbs",a)},o))},exports.BreadcrumbsItem=$,exports.Button=k,exports.Card=Je,exports.Checkbox=q,exports.CheckboxGroup=({helperText:l,className:n,errorMessage:o,children:r,disabled:s,label:c,defaultValue:m,name:d,...u})=>{var x;const p=i.useCheckboxGroupState({defaultValue:m,name:d,errorMessage:o,description:l,label:c,isDisabled:s,isInvalid:!!o,...u}),{groupProps:g,labelProps:v,descriptionProps:b,errorMessageProps:f,isInvalid:h}=a.useCheckboxGroup({"aria-label":null===(x=null!=c?c:u["aria-label"])||void 0===x?void 0:x.toString(),isDisabled:s,isInvalid:!!o,...u},p),E=t("maxio-checkbox-group",{"maxio-checkbox-group--disabled":s},n),_=l&&!o;return e.createElement("div",{className:E,...g},c&&e.createElement("label",{className:"maxio-checkbox-group__label",...v},c),e.createElement(W.Provider,{value:p},r),_&&e.createElement(G,{...b},l),o&&h&&e.createElement(U,{...f},o))},exports.Chip=({label:l,onDismiss:i,dismissLabel:o,leadingIcon:r,trailingIcon:s,title:c,...m})=>{const d=e.useRef(null),u=n.useToggleState(m),{buttonProps:x}=a.useToggleButton(m,u,d),p=t("maxio-chip",{"maxio-chip--selected":null==u?void 0:u.isSelected}),g=t("maxio-chip__button",{"maxio-chip--dismissible":i});return e.createElement("div",{className:p},e.createElement("button",{className:g,ref:d,...x,title:c},r&&e.createElement(b,{variant:r,className:"maxio-chip__icon"}),e.createElement("span",{className:"maxio-chip__label"},l),s&&!i&&e.createElement(b,{variant:s,className:"maxio-chip__icon"})),i&&e.createElement(ut,{onPress:i,"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=Ne,exports.DataTable=({pattern:t,size:a="md",SubRowComponent:n,onExpand:i,onSelect:o,onSort:r,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:m,columns:d,actions:u,actionsColumnSize:x,onRowAction:p,state:g,...v})=>{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:B,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:K,RowControls:Y,RowActions:Z,actions:u,actionsColumnSize:x,enableRowSelection:c,enableExpanding:Boolean(m)}),E=l.useReactTable({state:{...g,columnPinning:{left:[...c?[M]:[],...J(null===(b=null==g?void 0:g.columnPinning)||void 0===b?void 0:b.left)],right:[...J(null===(f=null==g?void 0:g.columnPinning)||void 0===f?void 0:f.right),...u?[B]:[]]}},getSubRows:e=>e.subRows,getCoreRowModel:l.getCoreRowModel(),enableRowSelection:c,enableExpanding:Boolean(m),...!v.manualExpanding&&{getExpandedRowModel:l.getExpandedRowModel()},enableSorting:s,...!v.manualSorting&&{getSortedRowModel:l.getSortedRowModel()},columns:h,...v}),_=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(L,{pattern:t,size:a,isExpandable:_,isUsingCustomRow:!!n},e.createElement(A,null,E.getHeaderGroups().map(t=>e.createElement(H,{key:t.id,table:E,isHeader:!0},t.headers.map(t=>e.createElement(V,{key:t.id,table:E,header:t,enableExpanding:m},l.flexRender(t.column.columnDef.header,t.getContext())))))),e.createElement(F,null,E.getRowModel().rows.map(a=>e.createElement(X,{key:a.id,row:a,pattern:t,SubRowComponent:n,enableExpanding:m,onRowAction:p}))))},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:r="md",className:s,title:c,description:m,children:d,footer:u})=>{const x=e.useId(),p={"data-placement":n,"data-size":r};return e.createElement(o.ModalOverlay,{isOpen:a,onOpenChange:l,isDismissable:!0,className:t("maxio-drawer__backdrop",{"maxio-drawer__backdrop--dim":"dim"===i})},e.createElement(o.Modal,{className:t("maxio-drawer",s),...p},e.createElement(o.Dialog,{className:"maxio-drawer__dialog","aria-labelledby":x},({close:t})=>e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-drawer__header"},e.createElement("div",{className:"maxio-drawer__title-group"},e.createElement(te,{id:x,size:"md",className:"maxio-drawer__title"},c),m&&e.createElement("p",{className:"maxio-drawer__description"},m)),e.createElement(C,{"aria-label":"Close",onClick:t,icon:e.createElement(b,{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=G,exports.GlobalToastProvider=({children:t,toastQueue:a,...l})=>{const n=m.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:x,gap:p,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-${m}`]:m,["maxio-row-"+("auto"===d?"auto":`span-${d}`)]:d,[`maxio-row-start-${u}`]:u,[`maxio-row-end-${x}`]:x,[`maxio-gap-${p}`]:void 0!==p,[`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=te,exports.Icon=b,exports.IconButton=C,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=_,exports.ListBox=ve,exports.LoadingSpinner=N,exports.Logo=ot,exports.Menu=({children:t})=>e.createElement(P,null,e.createElement(R,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}=T();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(b,{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}=T();return e.createElement("div",{className:n,role:"presentation"},e.createElement(E,{role:"menu",itemProps:{role:"menuitem"},id:i,"aria-labelledby":o,items:a}))},exports.OverlayTrigger=re,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,x]=e.useState(i.toString());e.useEffect(()=>{x(s.toString())},[s]);const p=Math.ceil(l/m),g=s<p,v=s>1,f=m*(s-1)+1,h=Math.min(m*s,l),E=o.map(e=>({label:e.toString(),value:e.toString()})),_=Array.from({length:p},(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 x(s.toString());const a=Math.max(1,Math.min(t,p));x(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(Ie,{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,f,"–",h," of ",l," items")),e.createElement("div",{className:"maxio-pagination__current-page"},r?e.createElement(Ce,{className:"maxio-pagination__page-input",value:u,min:1,max:p,onChange:e=>(e=>{x(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(Ie,{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 ",p," pages")),e.createElement("div",{className:"maxio-pagination__controls"},e.createElement(me,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(C,{icon:e.createElement(b,{variant:"chevron-left"}),size:t,variant:"ghost",onClick:()=>N(s-1),"aria-label":"Previous",disabled:!v})),e.createElement(me,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(C,{icon:e.createElement(b,{variant:"chevron-right"}),size:t,variant:"ghost",onClick:()=>N(s+1),"aria-label":"Next",disabled:!g}))))},exports.Popover=be,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),x=n&&!("inline"===o),p=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:m,className:"maxio-progress-bar__label",...v},l),p&&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`}),x&&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(we),{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:m,...d})=>{const u=c.useRadioGroupState({isDisabled:o,isInvalid:r,description:i,name:s,label:l,errorMessage:n,defaultValue:m,...d}),{radioGroupProps:x,labelProps:p,descriptionProps:g,errorMessageProps:v}=a.useRadioGroup({"aria-label":d["aria-label"]||l,...d},u);return e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-radio-group",...x},l&&e.createElement("label",{className:"maxio-radio-group__label",...p},l),e.createElement(we.Provider,{value:u},t),r&&n&&e.createElement(U,{...v},n),i&&!r&&e.createElement(G,{...g},i)))},exports.SegmentedControl=Te,exports.Select=Ie,exports.SideNav=({withIcons:t=!0,shouldToggleSidebar:a=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:o,onChange:r})=>e.createElement(Me,{isOpen:o,onChange:r,collapseBreakpoint:i,withIcons:t,shouldToggleSidebar:a,topDropdownItems:l,sections:n},e.createElement(He,null)),exports.Tab=Ge,exports.TabList=({children:a,className:l,ariaLabel:n,...i})=>{const{variant:o,withDivider:r,currentIndex:s,onChange:c}=je(),m=t("maxio-tabs",l,{"maxio-tabs--contained":"contained"===o,"maxio-tabs--divider":r}),d=e.useRef(null),u=()=>e.Children.map(a,e=>e.props);return e.createElement("div",{className:m,role:"tablist","aria-label":n,"aria-orientation":"horizontal",ref:d,onKeyDown:e=>{var t;"ArrowRight"===e.key&&c(e=>((e,t)=>{const a=t.findIndex((t,a)=>!t.disabled&&a>e);return-1===a?e:a})(e,u())),"ArrowLeft"===e.key&&c(e=>Ke(e,u())),null===(t=d.current)||void 0===t||t.focus()},...i},e.Children.map(a,(t,a)=>{if(e.isValidElement(t)&&t.type===Ge)return e.cloneElement(t,{value:a,isCurrent:s===a});throw new Error("You can only pass <Tab /> component as children")}))},exports.TabPanel=Ue,exports.TabPanels=({children:t})=>{const{currentIndex:a}=je();return e.createElement(e.Fragment,null,e.Children.map(t,(t,l)=>{if(e.isValidElement(t)&&t.type===Ue)return l===a?e.cloneElement(t,{value:l}):null;throw new Error("You can only pass <TabPanel /> component as children")}))},exports.Tabs=({children:t,variant:a="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:o})=>e.createElement(qe,{defaultIndex:n,variant:a,withDivider:l,index:i,onChange:o},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(b,{variant:o,className:"maxio-tag__icon"}),e.createElement("span",{className:"maxio-tag__label"},a),r&&e.createElement(b,{variant:r,className:"maxio-tag__icon"}))},exports.TextArea=ke,exports.TextField=ye,exports.TextInput=Ce,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=m.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(),x="boolean"==typeof a,p=m||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;x&&(e.currentTarget.checked=!t),n&&n(!t,e)}},[x,n]),f=d["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:p},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:p,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=se,exports.TooltipTrigger=me,exports.TopBar=({children:t,actions:a,sideNavIsClosed:l,openSideNav:n})=>e.createElement("nav",{className:"maxio-top-bar"},l&&e.createElement(C,{"aria-label":"Open Side Navigation",variant:"ghost",icon:e.createElement(b,{variant:"sidebar"}),onClick:n}),e.createElement(dt,{grow:!0,justifyContent:"end"},t),a),exports.useHover=ie,exports.useOverlayTrigger=ne,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=oe;
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":"sksCAAA,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"}
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. | Configure per-column sorting behavior in the TanStack column definition. |
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. | Keep expanded content concise and related to the 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, expand controls show nested or custom row content, and row action controls activate row-specific commands.
45
- - **Keyboard**: interactive controls are reachable with Tab. Buttons and checkboxes keep their native keyboard behavior. Actionable rows receive keyboard focus.
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.