@maxio-com/react-ui-components 9.16.0 → 9.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/skills/maxio-react/SKILL.md +69 -0
- package/dist/skills/maxio-react/agents/openai.yaml +4 -0
- package/dist/skills/maxio-react/references/components-action-list.md +92 -0
- package/dist/skills/maxio-react/references/components-action-menu.md +162 -0
- package/dist/skills/maxio-react/references/components-avatar.md +66 -0
- package/dist/skills/maxio-react/references/components-breadcrumbs.md +86 -0
- package/dist/skills/maxio-react/references/components-buttons-button.md +170 -0
- package/dist/skills/maxio-react/references/components-buttons-iconbutton.md +102 -0
- package/dist/skills/maxio-react/references/components-card.md +175 -0
- package/dist/skills/maxio-react/references/components-chip.md +151 -0
- package/dist/skills/maxio-react/references/components-data-table.md +344 -0
- package/dist/skills/maxio-react/references/components-drawer.md +293 -0
- package/dist/skills/maxio-react/references/components-flex.md +185 -0
- package/dist/skills/maxio-react/references/components-forms-checkbox.md +257 -0
- package/dist/skills/maxio-react/references/components-forms-combobox.md +250 -0
- package/dist/skills/maxio-react/references/components-forms-radio-group.md +202 -0
- package/dist/skills/maxio-react/references/components-forms-select.md +295 -0
- package/dist/skills/maxio-react/references/components-forms-textarea.md +187 -0
- package/dist/skills/maxio-react/references/components-forms-textfield.md +254 -0
- package/dist/skills/maxio-react/references/components-grid.md +140 -0
- package/dist/skills/maxio-react/references/components-icon.md +169 -0
- package/dist/skills/maxio-react/references/components-link.md +180 -0
- package/dist/skills/maxio-react/references/components-listbox.md +205 -0
- package/dist/skills/maxio-react/references/components-loading-spinner.md +123 -0
- package/dist/skills/maxio-react/references/components-logo.md +91 -0
- package/dist/skills/maxio-react/references/components-notifications-alert.md +103 -0
- package/dist/skills/maxio-react/references/components-notifications-banner.md +173 -0
- package/dist/skills/maxio-react/references/components-notifications-toast.md +155 -0
- package/dist/skills/maxio-react/references/components-pagination.md +115 -0
- package/dist/skills/maxio-react/references/components-popover.md +176 -0
- package/dist/skills/maxio-react/references/components-progressbar.md +98 -0
- package/dist/skills/maxio-react/references/components-segmentedcontrol.md +292 -0
- package/dist/skills/maxio-react/references/components-tabs.md +193 -0
- package/dist/skills/maxio-react/references/components-tag.md +117 -0
- package/dist/skills/maxio-react/references/components-tile.md +114 -0
- package/dist/skills/maxio-react/references/components-toggle.md +218 -0
- package/dist/skills/maxio-react/references/components-tooltip.md +178 -0
- package/dist/skills/maxio-react/references/components-typography-body.md +101 -0
- package/dist/skills/maxio-react/references/components-typography-code.md +72 -0
- package/dist/skills/maxio-react/references/components-typography-display.md +91 -0
- package/dist/skills/maxio-react/references/components-typography-heading.md +88 -0
- package/dist/skills/maxio-react/references/components-typography-label.md +82 -0
- package/dist/skills/maxio-react/references/deprecated-textinput.md +250 -0
- package/dist/skills/maxio-react/references/foundations-dark-mode.md +85 -0
- package/dist/skills/maxio-react/references/foundations-design-tokens-about.md +108 -0
- package/dist/skills/maxio-react/references/foundations-design-tokens-colors-primitive-colors.md +33 -0
- package/dist/skills/maxio-react/references/foundations-design-tokens-colors-semantic-colors.md +11 -0
- package/dist/skills/maxio-react/references/foundations-start-here.md +128 -0
- package/dist/skills/maxio-react/references/patterns-auth-layout.md +318 -0
- package/dist/skills/maxio-react/references/patterns-side-nav.md +182 -0
- package/dist/skills/maxio-react/references/patterns-top-bar.md +214 -0
- package/package.json +2 -2
- package/typings/index.d.ts +15 -2
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import a,{useRef as t,useEffect as l,useState as n,cloneElement as i,isValidElement as o,createContext as r,useId as s,useContext as c,Children as m,useMemo as d,forwardRef as u,useCallback as p,useImperativeHandle as x}from"react";import v from"classnames";import{useId as g,useLink as b,useButton as h,usePress as f,useFocusRing as E,mergeProps as _,useCheckboxGroupItem as N,useCheckbox as w,useCheckboxGroup as y,useRadio as k,useRadioGroup as C,useTextField as I,useProgressBar as S,useToggleButton as P}from"react-aria";import{flexRender as $,useReactTable as D,getSortedRowModel as z,getExpandedRowModel as T,getCoreRowModel as O}from"@tanstack/react-table";export{createColumnHelper}from"@tanstack/react-table";import{useToggleState as R}from"@react-stately/toggle";import{useCheckboxGroupState as M}from"@react-stately/checkbox";import{ModalOverlay as B,Modal as A,Dialog as L,ListBox as H,ListBoxItem as V,composeRenderProps as F,ListBoxSection as W,Header as j,Popover as U,OverlayArrow as q,ComboBox as G,Label as K,Input as Y,Button as Z,Text as X,FieldError as Q,TextField as J,ToggleButtonGroup as ee,ToggleButton as ae,SelectionIndicator as te}from"react-aria-components";export{DialogTrigger,Pressable}from"react-aria-components";import{AnimatePresence as le,motion as ne}from"framer-motion";import{useDismiss as ie,useFocus as oe,useHover as re,useClick as se,useFloating as ce,offset as me,useInteractions as de,useRole as ue,FloatingPortal as pe}from"@floating-ui/react-dom-interactions";import{useRadioGroupState as xe}from"@react-stately/radio";import{useToastState as ve,useToastQueue as ge,ToastQueue as be}from"@react-stately/toast";import{useToast as he,useToastRegion as fe}from"@react-aria/toast";const Ee=["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"],_e=["anrok","dropbox","hubspot","numeral","oracle","quotapath","sage","sphere","taxjar"],Ne=["avalara","pipedrive","quickbooks","salesforce","xero"],we=({variant:e,color:t,className:l,size:n})=>{const i=(e,a)=>a.includes(e),o=i(e,Ee)||i(e,_e),r=i(e,Ne),s=v({"fa-kit":o,"fa-kit-duotone":r,"fa-sharp fa-regular":!o&&!r,[`fa-${e}`]:!0,[`fa-${n}`]:n,[`maxio-icon--${t}`]:t&&!i(e,_e)&&!i(e,Ne)},l);return a.createElement("i",{className:s})},ye=({item:e,isSelected:n,truncateLabel:i=!1,role:o="option",small:r=!1})=>{const s=t(null),c=t(!1),m=g();if(l(()=>{var e;n&&c.current&&(null===(e=s.current)||void 0===e||e.focus())},[n]),l(()=>{c.current=!0},[]),"divider"===e.type)return a.createElement("div",{className:"maxio-action-list__divider",role:"separator","aria-hidden":"true"});const{leadingIconName:d,leadingIconClassName:u,trailingIconName:p,label:x,description:b,link:h}=e,f=v("maxio-action-list__label",{"maxio-truncate":i});return a.createElement("a",{"aria-labelledby":m,...h,className:v("maxio-action-list__content",h.className,{"maxio-action-list__content--size-small":r}),tabIndex:n?0:-1,ref:s,role:o},d&&a.createElement(we,{variant:d,className:v("maxio-action-list__leading-icon",u)}),a.createElement("span",{className:f,id:m},x),b&&a.createElement("span",{className:"maxio-action-list__description"},b),p&&a.createElement(we,{variant:p,className:"maxio-action-list__trailing-icon"}))},ke=(e,a,t)=>0===e?e:1===e&&"divider"===a[e-1].type?t||e:"divider"===a[e-1].type?ke(e-1,a,t||e):e-1,Ce=({items:e,isShadowed:t=!0,itemProps:l={},className:i,truncateLabels:o=!1,small:r=!1,...s})=>{const c=v("maxio-action-list",i,{"maxio-action-list--shadow":t}),[m,d]=n(()=>e.findIndex(e=>"divider"!==e.type));return 0===e.length?null:a.createElement("div",{className:c,onKeyDown:a=>{if("Space"===a.code||"Enter"===a.code){const a=e[m];a&&"divider"!==a.type&&window.open(a.link.href,a.link.target||"_self")}"ArrowUp"===a.code&&(a.preventDefault(),d(a=>ke(a,e))),"ArrowDown"===a.code&&(a.preventDefault(),d(a=>((e,a)=>{const t=a.findIndex((a,t)=>"divider"!==a.type&&t>e);return-1===t?e:t})(a,e)))},role:"listbox",...s},e.map((e,t)=>a.createElement(ye,{item:e,truncateLabel:o,key:`listbox-${e.id}`,isSelected:t===m,small:r,...l})))},Ie=({className:e,children:t,disabled:l,external:n,icon:i,size:o="sm",underline:r,variant:s,...c})=>{const m=v("maxio-link",{[`maxio-link--${o}`]:o,"maxio-link--disabled":l,[`maxio-link--${s}`]:s,"maxio-link--underline":r},e),d=n?"_blank":"_self";return a.createElement("a",{className:m,target:d,...c},t,i&&a.createElement(we,{variant:i,className:"maxio-link__icon"}))},Se=({size:e="md",white:t=!1,className:l})=>{const n=v("maxio-loading-spinner",l,`maxio-loading-spinner--${e}`,{"maxio-loading-spinner--white":t});return a.createElement("div",{className:n,role:"status","aria-label":"loading"})},Pe=({fullWidth:e=!1,leadingElement:l,trailingElement:n,icon:r,variant:s="primary",size:c,...m})=>{const d=t(null),{linkProps:u}=b({...m},d),p=v("maxio-button",m.className,{[`maxio-button--${c}`]:c,[`maxio-button--${s}`]:s,"maxio-button--full-width":e});return a.createElement("a",{...u,ref:d,className:p,href:m.href},l&&i(l,{...o(l)&&{className:"maxio-button__leading-element"}}),m.children,(n||r)&&i(n||r,{...o(n||r)&&{className:"maxio-button__trailing-element"}}))},$e=({disabled:e,loading:l=!1,fullWidth:n=!1,leadingElement:r,trailingElement:s,icon:c,variant:m="primary",size:d,...u})=>{const p=t(null),{buttonProps:x}=h({...u,isDisabled:e,formAction:"string"==typeof u.formAction?u.formAction:void 0},p),g=["primary","danger"].includes(m),b=v("maxio-button",u.className,{[`maxio-button--${d}`]:d,[`maxio-button--${m}`]:m,"maxio-button--loading":l,"maxio-button--full-width":n});return a.createElement("button",{...x,className:b,ref:p},r&&i(r,{...o(r)&&{className:"maxio-button__leading-element"}}),u.children,!l&&(s||c)&&i(s||c,{...o(s||c)&&{className:"maxio-button__trailing-element"}}),l&&a.createElement(Se,{className:"maxio-button__trailing-element",size:"md",white:g}))},De=e=>(e=>"href"in e)(e)?a.createElement(Pe,{...e}):a.createElement($e,{...e}),ze=({"aria-label":e,className:t,...l})=>a.createElement(De,{"aria-label":e,className:v("maxio-button--icon",t),...l},null),Te=({children:e,title:t,linkText:l,linkExternal:n,href:i,display:o="inline",sentiment:r="info",onDismiss:s,className:c})=>{if(!e&&!t)return console.warn("Alert component requires either children or title prop to be rendered"),null;const m=v("maxio-alert",{[`maxio-alert--${r}`]:"info"!==r&&r},c),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[r],u=v("maxio-alert__content",{"maxio-alert__content--block":"block"===o});return a.createElement("div",{className:m},a.createElement(we,{variant:d,className:"maxio-alert__icon","aria-hidden":"true"}),a.createElement("section",{className:"maxio-alert__container"},a.createElement("div",{className:u},t&&a.createElement("span",{className:"maxio-alert__title"},t),e&&a.createElement("span",{className:"maxio-alert__message"},e),l&&i&&a.createElement(Ie,{className:"maxio-alert__link",href:i,variant:"high-contrast",underline:!0,...n?{external:!0}:{}},l))),s&&a.createElement(ze,{icon:a.createElement(we,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-alert__dismiss"}))},Oe=r({}),Re=({children:e})=>{const[t,l]=n(!1),i=s(),o=s();return a.createElement(Oe.Provider,{value:{controlsId:i,buttonId:o,isOpen:t,onClose:()=>l(!1),onOpen:()=>l(!0),onToggle:()=>l(e=>!e)}},e)};function Me(){const e=c(Oe);if(!e||"object"==typeof e&&0===Object.keys(e).length)throw new Error("useMenu hook must be used within a MenuProvider");return e}const Be=({children:e})=>{const{isOpen:t,onToggle:l,onClose:n}=Me();return a.createElement("details",{open:t,onToggle:l,className:"maxio-action-menu"},"function"==typeof e?e({isOpen:t,onClose:n}):e)},Ae=({children:e})=>a.createElement(Re,null,a.createElement(Be,null,e)),Le=({items:e,alignItemsEnd:t=!1})=>{const l=v("maxio-action-menu__content",{"maxio-action-menu__content--align-end":t}),{controlsId:n,buttonId:i}=Me();return a.createElement("div",{className:l,role:"presentation"},a.createElement(Ce,{role:"menu",itemProps:{role:"menuitem"},id:n,"aria-labelledby":i,items:e}))},He=({children:e,iconName:t="chevron-down","aria-label":l,size:n="md",variant:i="secondary"})=>{const o=v({"maxio-action-menu__chevron":"chevron-down"===t}),r=v("maxio-button",`maxio-button--${i}`,`maxio-button--${n}`,{"maxio-button--icon":t&&!e}),{isOpen:s,buttonId:c,controlsId:m}=Me();return a.createElement("summary",{className:r,"aria-haspopup":"true","aria-label":l,"aria-expanded":s,"aria-controls":m,id:c},e&&a.createElement("span",null,e),t&&a.createElement(we,{variant:t,className:`${o} maxio-button__trailing-element`}))},Ve=({className:e,src:t,alt:l="avatar"})=>a.createElement("img",{className:v("maxio-avatar",e),alt:l,src:t}),Fe=({children:e,title:t,linkText:l,linkExternal:n,href:i,display:o="inline",sentiment:r="info",onDismiss:s,className:c})=>{if(!e&&!t)return console.warn("Banner component requires either children or title prop to be rendered"),null;const m=v("maxio-banner",{[`maxio-banner--${r}`]:"info"!==r&&r,className:c}),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[r],u=v("maxio-banner__content",{"maxio-banner__content--block":"block"===o});return a.createElement("div",{className:m,"aria-live":"assertive"},a.createElement(we,{variant:d,className:"maxio-banner__icon","aria-hidden":"true"}),a.createElement("section",{className:"maxio-banner__container"},a.createElement("div",{className:u},t&&a.createElement("span",{className:"maxio-banner__title"},t),e&&a.createElement("span",{className:"maxio-banner__message"},e),l&&i&&a.createElement(Ie,{href:i,..."warning"!==r&&{variant:"inverse"},underline:!0,...n?{external:!0}:{}},l))),s&&a.createElement(ze,{icon:a.createElement(we,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-banner__dismiss"}))},We=({children:e,className:t,href:l,...n})=>{const i=l?a.createElement(Ie,{size:"sm",href:l},e):e;return a.createElement("li",{className:v("maxio-breadcrumbs__item",t),...n},i)},je="Breadcrumbs requires at least one BreadcrumbsItem as children",Ue='Last BreadcrumbsItem should not have "href" prop. It is the current page.',qe="Breadcrumbs only accepts BreadcrumbsItem as children",Ge=({className:e,children:t,...l})=>{const n=m.count(t);if(0===n)throw new Error(je);const r=m.map(t,(e,a)=>{if(o(e)&&e.type===We){if(a===n-1&&e.props.href)throw new Error(Ue);return i(e,{"aria-current":a===n-1?"page":void 0})}throw new Error(qe)});return a.createElement("nav",{"aria-label":"Breadcrumb",...l},a.createElement("ol",{className:v("maxio-breadcrumbs",e)},r))},Ke="row-controls",Ye="row-actions",Ze=({children:e,pattern:t,size:l,isExpandable:i,isUsingCustomRow:o})=>{const[r,s]=n(!1),[c,m]=n(!1),d=t&&o&&i,u=v("maxio-data-table",{"maxio-data-table--pattern":t&&!d,"maxio-data-table--expanded-child-pattern":d,"maxio-data-table--with-custom-row":o,[`maxio-data-table--${l}`]:l,"maxio-data-table--with-pinned-left-border":r,"maxio-data-table--with-pinned-right-border":c});return a.createElement("div",{className:"maxio-data-table-wrapper",onScroll:e=>{const a=e.target;s(a.scrollLeft>0),m(a.scrollWidth-a.clientWidth-a.scrollLeft>0)}},a.createElement("table",{className:u},e))},Xe=({children:e})=>a.createElement("thead",null,e),Qe=({children:e})=>a.createElement("tbody",null,e),Je=({children:e,table:t,header:l,className:n,enableExpanding:i,...o})=>{var r,s,c,m,d,u,p,x,g,b,h;const f=null==l?void 0:l.column,E=null===(r=null==f?void 0:f.getCanSort)||void 0===r?void 0:r.call(f),_=null===(s=null==f?void 0:f.getToggleSortingHandler)||void 0===s?void 0:s.call(f),N=null==l?void 0:l.isPlaceholder,w=null===(m=null===(c=null==f?void 0:f.columnDef)||void 0===c?void 0:c.meta)||void 0===m?void 0:m.align,y=null===(u=null===(d=null==f?void 0:f.columnDef)||void 0===d?void 0:d.meta)||void 0===u?void 0:u.width,k=null===(x=null===(p=null==f?void 0:f.columnDef)||void 0===p?void 0:p.meta)||void 0===x?void 0:x.controls,C=null===(b=null===(g=null==f?void 0:f.columnDef)||void 0===g?void 0:g.meta)||void 0===b?void 0:b.actions,I=null==f?void 0:f.getIsPinned(),S=null==f?void 0:f.getIsSorted(),P="asc"===S,$=v("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${I}`]:I,"maxio-data-table__cell--sortable":E,"maxio-data-table__cell--active":S,[`maxio-data-table__cell--${w}`]:w,"maxio-data-table__cell--controls":k,"maxio-data-table__cell--actions":C}),D={...y?{width:y}:{},..."left"===I?{left:null==f?void 0:f.getStart("left")}:"right"===I?{right:null==f?void 0:f.getAfter("right")}:{}},z=((e,a)=>e&&a?"arrow-up":e&&!a?"arrow-down":"arrow-down-up")(!!S,P),T=null==t?void 0:t.getToggleAllRowsExpandedHandler(),O=null===(h=null==t?void 0:t.getIsAllRowsExpanded)||void 0===h?void 0:h.call(t),R=(null==l?void 0:l.headerGroup.headers[0].id)===Ke?1:0,M=i&&(null==l?void 0:l.index)===R;return N?null:a.createElement("th",{scope:"col",role:"columnheader","aria-sort":S?P?"ascending":"descending":"none",className:$,onClick:_,colSpan:null==l?void 0:l.colSpan,style:D,...o},a.createElement("div",{className:"maxio-data-table__cell-flex"},!0===i&&M&&a.createElement(ze,{size:"sm",variant:"ghost",icon:a.createElement(we,{size:"xs",variant:O?"chevron-down":"chevron-right"}),onClick:T,"aria-label":O?"Collapse all rows":"Expand all rows","data-open":O,className:"maxio-data-table__expand-button"}),e,E&&a.createElement(we,{variant:z,className:"maxio-data-table__sort-icon"})))},ea=({children:e,row:t,isChild:l,isHeader:n,className:i,onRowAction:o,...r})=>{var s,c,m;const d=null===(s=null==t?void 0:t.getIsSelected)||void 0===s?void 0:s.call(t),u=(null===(c=null==t?void 0:t.getCanExpand)||void 0===c?void 0:c.call(t))&&(null===(m=null==t?void 0:t.getIsExpanded)||void 0===m?void 0:m.call(t)),p=Boolean(t&&o&&!n&&!l),x=a.useRef(null),g=e=>{x.current=e.target},{pressProps:b}=f({isDisabled:!p,onPress:e=>{var a;const l=null!==(a=x.current)&&void 0!==a?a:e.target;x.current=null,t&&o&&!(e=>e instanceof Element&&Boolean(e.closest("a,button,input,select,textarea,label,.maxio-data-table__cell--controls,.maxio-data-table__cell--actions")))(l)&&o(t)}}),{focusProps:h,isFocused:N}=E(),w=v({"maxio-data-table__row":!n,"maxio-data-table__header-row":n,"maxio-data-table__row--active":d||N,"maxio-data-table__row--expanded":u,"maxio-data-table__row--expanded-child":l,"maxio-data-table__row--actionable":p},i),y=p?_({onClickCapture:g,onKeyDownCapture:g,tabIndex:0},b,h,r):r;return a.createElement("tr",{...y,className:w,tabIndex:p?y.tabIndex:r.tabIndex},e)},aa=r({}),ta=u(({checked:e,disabled:t,invalid:l,indeterminate:n,className:i,inputProps:o,error:r,label:s},c)=>{const m=v("maxio-checkbox",{"maxio-checkbox--checked":e,"maxio-checkbox--disabled":t,"maxio-checkbox--error":l,"maxio-checkbox--indeterminate":n},i);return a.createElement("label",{className:m},a.createElement("input",{type:"checkbox",role:"checkbox",className:"maxio-checkbox__input",ref:c,...o}),a.createElement("span",{className:"maxio-checkbox__control"},r&&a.createElement("span",{className:"maxio-checkbox__control-error"})),s&&a.createElement("span",{className:"maxio-checkbox__label"},s))});ta.displayName="InnerCheckbox";const la=({label:e,error:l=!1,className:n,indeterminate:i,value:o="",disabled:r,readOnly:s,defaultChecked:m,checked:d,...u})=>{const p=t(null),x=c(aa),{inputProps:v,isDisabled:g,isInvalid:b,isSelected:h}=x&&Object.keys(x).length>0?N({value:o,"aria-label":null!=e?e:u["aria-label"],isDisabled:r,isInvalid:l,isIndeterminate:i,isReadOnly:s,...u},x,p):w({"aria-label":null!=e?e:u["aria-label"],isDisabled:r,isInvalid:l,isIndeterminate:i,isReadOnly:s,value:o,...u},R({...u,isSelected:d,defaultSelected:m}),p);return a.createElement(ta,{inputProps:v,checked:h,disabled:g,invalid:b,indeterminate:i,className:n,error:l,label:e,ref:p,...u})},na=({children:e,className:t,...l})=>a.createElement("div",{className:v("maxio-form-helper-text",t),...l},e),ia=({children:e,className:t,...l})=>a.createElement("div",{className:v("maxio-form-error",t),...l},a.createElement(we,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},e)),oa=({helperText:e,className:t,errorMessage:l,children:n,disabled:i,label:o,defaultValue:r,name:s,...c})=>{var m;const d=M({defaultValue:r,name:s,errorMessage:l,description:e,label:o,isDisabled:i,isInvalid:!!l,...c}),{groupProps:u,labelProps:p,descriptionProps:x,errorMessageProps:g,isInvalid:b}=y({"aria-label":null===(m=null!=o?o:c["aria-label"])||void 0===m?void 0:m.toString(),isDisabled:i,isInvalid:!!l,...c},d),h=v("maxio-checkbox-group",{"maxio-checkbox-group--disabled":i},t),f=e&&!l;return a.createElement("div",{className:h,...u},o&&a.createElement("label",{className:"maxio-checkbox-group__label",...p},o),a.createElement(aa.Provider,{value:d},n),f&&a.createElement(na,{...x},e),l&&b&&a.createElement(ia,{...g},l))},ra=({table:e})=>{var t,l,n,i;const o=null===(t=null==e?void 0:e.getToggleAllPageRowsSelectedHandler)||void 0===t?void 0:t.call(e),r=(null===(l=null==e?void 0:e.getIsAllPageRowsSelected)||void 0===l?void 0:l.call(e))||(null===(n=null==e?void 0:e.getIsAllRowsSelected)||void 0===n?void 0:n.call(e)),s=null===(i=null==e?void 0:e.getIsSomePageRowsSelected)||void 0===i?void 0:i.call(e);return a.createElement(la,{"aria-label":"Select all rows",onChange:e=>{o("boolean"==typeof e?{target:{checked:e}}:e)},checked:r,indeterminate:!r&&s})},sa=({row:e})=>{var t,l,n,i;const o=null===(t=null==e?void 0:e.getToggleSelectedHandler)||void 0===t?void 0:t.call(e),r=(null===(l=null==e?void 0:e.getIsSelected)||void 0===l?void 0:l.call(e))||(null===(n=null==e?void 0:e.getIsAllSubRowsSelected)||void 0===n?void 0:n.call(e)),s=null===(i=null==e?void 0:e.getIsSomeSelected)||void 0===i?void 0:i.call(e),c=e.id||e.index;return a.createElement(la,{"aria-label":`Select row ${c}`,onChange:o,checked:r,indeterminate:s})},ca=({children:e})=>a.createElement("div",{className:"maxio-data-table__cell-flex"},e),ma=({row:e,cell:t,children:l,className:n,...i})=>{var o,r,s,c,m,d;const u=null==t?void 0:t.column,p=null===(r=null===(o=null==u?void 0:u.columnDef)||void 0===o?void 0:o.meta)||void 0===r?void 0:r.align,x=null===(c=null===(s=null==u?void 0:u.columnDef)||void 0===s?void 0:s.meta)||void 0===c?void 0:c.controls,g=null===(d=null===(m=null==u?void 0:u.columnDef)||void 0===m?void 0:m.meta)||void 0===d?void 0:d.actions,b=null==u?void 0:u.getIsPinned(),h=v("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${b}`]:b,[`maxio-data-table__cell--${p}`]:p,"maxio-data-table__cell--controls":x,"maxio-data-table__cell--actions":g}),f="left"===b?{left:null==u?void 0:u.getStart("left")}:"right"===b?{right:null==u?void 0:u.getAfter("right")}:{};return a.createElement("td",{className:h,style:f,...i},l)},da=({row:e,SubRowComponent:t,pattern:l,enableExpanding:n,onRowAction:i})=>{var o,r,s,c,m;const d=t&&e.getParentRow()&&e.getParentRow().getIsExpanded(),u=d&&e.getVisibleCells()[0].column.columnDef.id===Ke,p=d&&e.getVisibleCells()[e.getVisibleCells().length-1].column.columnDef.id===Ye,x=[p,u].filter(Boolean).length,v=e.getVisibleCells().length-x,g=null!==(r=null===(o=e.getParentRow())||void 0===o?void 0:o.index)&&void 0!==r?r:e.index,b=l&&t&&g%2==1?"maxio-data-table__row--with-pattern":void 0,h=null===(s=e.getCanExpand)||void 0===s?void 0:s.call(e),f=null===(c=null==e?void 0:e.getToggleExpandedHandler)||void 0===c?void 0:c.call(e),E=null===(m=null==e?void 0:e.getIsExpanded)||void 0===m?void 0:m.call(e),_=h&&n?0:1.75,N=e.getVisibleCells()[0].column.columnDef.id===Ke?1:0,w=e.getVisibleCells().find(({column:e})=>{var a;const{actions:t,controls:l}=null!==(a=e.columnDef.meta)&&void 0!==a?a:{};return!t&&!l}),y=i&&w?w.id:void 0;return a.createElement(a.Fragment,{key:e.id},d?a.createElement(ea,{key:`${e.id}-sub`,row:e,isChild:!0,className:b},u&&a.createElement(ma,{className:"maxio-data-table__cell--pinned-left"}),a.createElement(ma,{colSpan:v},t(e)),p&&a.createElement(ma,{className:"maxio-data-table__cell--pinned-right"})):a.createElement(ea,{key:`${e.id}-parent`,row:e,className:b,onRowAction:i,"aria-labelledby":y},e.getVisibleCells().map(t=>{const l=n&&t.column.getIndex()===N;return a.createElement(ma,{key:t.id,row:e,cell:t,id:t.id},a.createElement("div",{className:"maxio-data-table__cell-flex",style:n&&l?{paddingLeft:`${(null==e?void 0:e.depth)+_}rem`}:void 0},n&&h&&l&&a.createElement(ze,{size:"sm",variant:"ghost",icon:a.createElement(we,{size:"xs",variant:E?"chevron-down":"chevron-right"}),onClick:f,"aria-label":E?"Collapse row":"Expand row","data-open":E,className:"maxio-data-table__expand-button"}),$(t.column.columnDef.cell,t.getContext())))})))},ua=(e=[])=>e.filter(e=>e!==Ke&&e!==Ye),pa=({pattern:e,size:t="md",SubRowComponent:n,onExpand:i,onSelect:o,onSort:r,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:m,columns:u,actions:p,actionsColumnSize:x,onRowAction:v,state:g,...b})=>{var h,f;const E=(({columns:e,HeaderControls:t,RowControls:l,RowActions:n,actions:i,actionsColumnSize:o,enableExpanding:r,enableRowSelection:s})=>d(()=>{const c={id:Ke,size:40,header:e=>a.createElement(t,{...e,enableExpanding:r,enableRowSelection:s}),cell:e=>a.createElement(l,{...e,enableExpanding:r}),meta:{controls:!0}},m=i&&n?{id:Ye,size:null!=o?o:40,header:"",cell:e=>a.createElement(n,null,i(e.row,e.table)),meta:{actions:!0}}:null;let d=[...e];return s&&(d=[c,...d]),m&&(d=[...d,m]),d},[i,o,n,r,s,e,t,l]))({columns:u,HeaderControls:ra,RowControls:sa,RowActions:ca,actions:p,actionsColumnSize:x,enableRowSelection:c,enableExpanding:Boolean(m)}),_=D({state:{...g,columnPinning:{left:[...c?[Ke]:[],...ua(null===(h=null==g?void 0:g.columnPinning)||void 0===h?void 0:h.left)],right:[...ua(null===(f=null==g?void 0:g.columnPinning)||void 0===f?void 0:f.right),...p?[Ye]:[]]}},getSubRows:e=>e.subRows,getCoreRowModel:O(),enableRowSelection:c,enableExpanding:Boolean(m),...!b.manualExpanding&&{getExpandedRowModel:T()},enableSorting:s,...!b.manualSorting&&{getSortedRowModel:z()},columns:E,...b}),N=_.getCanSomeRowsExpand(),w=_.getState();return l(()=>{null==i||i(w.expanded)},[i,w.expanded]),l(()=>{null==o||o(w.rowSelection)},[o,w.rowSelection]),l(()=>{null==r||r(w.sorting)},[r,w.sorting]),a.createElement(Ze,{pattern:e,size:t,isExpandable:N,isUsingCustomRow:!!n},a.createElement(Xe,null,_.getHeaderGroups().map(e=>a.createElement(ea,{key:e.id,table:_,isHeader:!0},e.headers.map(e=>a.createElement(Je,{key:e.id,table:_,header:e,enableExpanding:m},$(e.column.columnDef.header,e.getContext())))))),a.createElement(Qe,null,_.getRowModel().rows.map(t=>a.createElement(da,{key:t.id,row:t,pattern:e,SubRowComponent:n,enableExpanding:m,onRowAction:v}))))},xa={sm:"h3",md:"h2",lg:"h1"},va=({children:e,size:t="sm",className:l,...n})=>{const i=xa[t],o=v(`maxio-heading-${t}`,l);return a.createElement(i,{className:o,...n},e)},ga=({open:e,onOpenChange:t,placement:l="right",backdrop:n="dim",size:i="md",className:o,title:r,description:s,children:c,footer:m})=>{const d=a.useId(),u={"data-placement":l,"data-size":i};return a.createElement(B,{isOpen:e,onOpenChange:t,isDismissable:!0,className:v("maxio-drawer__backdrop",{"maxio-drawer__backdrop--dim":"dim"===n})},a.createElement(A,{className:v("maxio-drawer",o),...u},a.createElement(L,{className:"maxio-drawer__dialog","aria-labelledby":d},({close:e})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-drawer__header"},a.createElement("div",{className:"maxio-drawer__title-group"},a.createElement(va,{id:d,size:"md",className:"maxio-drawer__title"},r),s&&a.createElement("p",{className:"maxio-drawer__description"},s)),a.createElement(ze,{"aria-label":"Close",onClick:e,icon:a.createElement(we,{variant:"cross"}),variant:"ghost",size:"sm",className:"maxio-drawer__close"})),a.createElement("div",{className:"maxio-drawer__body"},c),null!=m&&a.createElement("div",{className:"maxio-drawer__footer"},m)))))},ba={click:se,hover:e=>re(e,{delay:100}),focus:oe,dismiss:ie},ha=(e,a)=>a.map(a=>ba[a](e)),fa=({placement:e="top",isActive:a=!1,interactions:n=["hover"],floatingElementOffset:i=0,onOverlayUpdate:o,autoHideMs:r})=>{const s=t(null),{strategy:c,x:m,y:d,context:u,floating:p,reference:x}=ce({placement:e,open:a,onOpenChange:e=>o(e),middleware:[me(i)]}),{getReferenceProps:v,getFloatingProps:g}=de([...ha(u,n),ue(u,{role:"tooltip"})]);l(()=>{s.current&&clearTimeout(s.current),a&&r&&(s.current=window.setTimeout(()=>o(!1),r))},[a,r]);return{isActive:a,refs:{floating:p,reference:x},floatingElementCSSPosition:{position:c,top:null!=d?d:0,left:null!=m?m:0},getReferenceProps:v,getFloatingProps:g}};function Ea(e,a=0){const i=t((new Date).getTime()),o=t((new Date).getTime()),[r,s]=n(!1);return l(()=>{const t=()=>{i.current=(new Date).getTime(),s(!0)},l=()=>{o.current=(new Date).getTime(),window.setTimeout(()=>{i.current-o.current<=0&&s(!1)},a)},n=e&&e.current;return n&&(n.addEventListener("mouseenter",t),n.addEventListener("mouseleave",l)),()=>{n&&(n.removeEventListener("mouseenter",t),n.removeEventListener("mouseleave",l))}},[e]),r}function _a(e=500){const[a,i]=n(()=>{if("undefined"==typeof window)return{windowWitdh:0,windowHeight:0};const{innerWidth:e,innerHeight:a}=window;return{windowWitdh:e,windowHeight:a}}),o=t(null);return l(()=>{if("undefined"==typeof window)return;const a=()=>{var a;const{innerWidth:t,innerHeight:l}=window;window.clearTimeout(null!==(a=o.current)&&void 0!==a?a:void 0),o.current=window.setTimeout(()=>{i({windowWitdh:t,windowHeight:l})},e)};return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[e]),a}const Na=({children:e,usePortal:t=!1,isActive:l=!1,placement:n="top",interactions:i=["hover"],role:o="tooltip",renderOverlay:r,floatingElementOffset:s,motionSettings:c={},autoHideMs:m,onOverlayUpdate:d,className:u})=>{const{getReferenceProps:p,getFloatingProps:x,refs:{floating:g,reference:b},floatingElementCSSPosition:h}=fa({isActive:l,onOverlayUpdate:d,autoHideMs:m,floatingElementOffset:s,interactions:i,placement:n}),f=a.createElement(le,null,l&&a.createElement(ne.div,{ref:g,style:h,...c,...x()},r()));return a.createElement(a.Fragment,null,a.createElement("div",{ref:b,className:v("maxio-inline-flex",u),...p(),"data-testid":"overlay-trigger"},e),t?a.createElement(pe,{id:"maxio-ui-portal"},f):f)},wa=({children:e,arrowPosition:t,size:l="regular",maxWidth:n=160})=>a.createElement("div",{"data-testid":"tooltip",className:v("maxio-tooltip",`maxio-tooltip--${l}`,{[`maxio-tooltip--arrow-${t}`]:t})},a.createElement("div",{className:"maxio-tooltip__content",style:{maxWidth:n}},e)),ya={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"},ka=({children:e,interactions:i=["hover"],placement:o="right",maxWidth:r=160,size:s="regular",renderContent:c,autoHideMs:m,isVisible:u,usePortal:x,className:v,onVisibilityUpdate:g,floatingElementOffset:b=5})=>{const[h,f]=n(!1),E=void 0!==u,_=t(null),N=p(e=>{_.current&&clearTimeout(_.current),_.current=window.setTimeout(()=>{E||f(e),g&&g(e)},50)},[E,g]),w=d(()=>(e=>{const a=e.startsWith("top")||e.startsWith("bottom")?"Y":"X",t=`translate${a}(${e.startsWith("bottom")||e.startsWith("right")?"-":""}10px)`;return{initial:{opacity:0,visibility:"hidden",transform:t},animate:{opacity:1,visibility:"visible",transform:`translate${a}(0px)`},exit:{opacity:0,visibility:"hidden",transform:t},transition:{ease:[.4,0,.5,1],duration:.2}}})(o),[o]);return l(()=>()=>{_.current&&clearTimeout(_.current)},[]),a.createElement(Na,{role:"tooltip",className:v,floatingElementOffset:b,motionSettings:w,isActive:E?u:h,onOverlayUpdate:N,autoHideMs:m,usePortal:x,placement:o,interactions:i,renderOverlay:()=>a.createElement(wa,{size:s,arrowPosition:ya[o],maxWidth:r},c())},e)},Ca=({as:e="div",children:t,compact:l=!1,size:n="md",className:i,...o})=>{const r=e,s=v({[`maxio-body-${n}`]:!l,[`maxio-body-${n}-compact`]:l},i);return a.createElement(r,{className:s,...o},t)},Ia=({className:e,...t})=>a.createElement(H,{...t,className:v("maxio-listbox",e)});Ia.displayName="ListBox";const Sa=({className:e,...t})=>{const l=t.textValue||("string"==typeof t.children?t.children:void 0);return a.createElement(V,{...t,textValue:l,className:v("maxio-listbox__item",e)},F(t.children,(e,{isSelected:t})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-listbox__content"},"string"==typeof e?a.createElement(Ca,{size:"sm"},e):e),t&&a.createElement(we,{variant:"check"}))))};Sa.displayName="ListBox.Item";const Pa=({className:e,...t})=>a.createElement(W,{...t,className:v("maxio-listbox__section",e)});Pa.displayName="ListBox.Section";const $a=({className:e,...t})=>a.createElement(j,{...t,className:v("maxio-listbox__header",e)});$a.displayName="ListBox.Header";const Da=Object.assign(Ia,{Item:Sa,Section:Pa,Header:$a}),za=({className:e,hideArrow:t=!1,children:l,offset:n=4,...i})=>a.createElement(U,{...i,className:v("maxio-popover",e),offset:n},a.createElement(a.Fragment,null,!t&&a.createElement(q,{className:"maxio-popover__arrow"},a.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12","aria-hidden":!0},a.createElement("path",{d:"M0 0 L6 6 L12 0"}))),l)),Ta=({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:o,errorMessage:r,leadingElement:s=null,fullWidth:c,className:m,placeholder:d,renderEmptyState:u,selectionMode:p,children:x,...g})=>{const b=a.useRef(null),h=a.useRef(null),[f,E]=a.useState(),[_,N]=a.useState(0),w=!!r,y=t||w,k=x,C=a.useCallback(()=>{const e=b.current;if(!e)return;const a=h.current,t=a?a.getBoundingClientRect().left-e.getBoundingClientRect().left:0;N(e=>e===-t?e:-t),E(a=>{const t=`${e.offsetWidth}px`;return(null==a?void 0:a["--trigger-width"])===t?a:{"--trigger-width":t}})},[]);a.useEffect(()=>{const e=b.current;if(!e)return;if(C(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(C);return a.observe(e),()=>a.disconnect()},[C]);const I=v("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":y,"maxio-text-field--readonly":l,"maxio-text-field--full-width":c},m);return a.createElement(G,{...g,isDisabled:e,isInvalid:y,isReadOnly:l,selectionMode:p,className:I},i&&a.createElement(K,{className:"maxio-text-field__label"},i),a.createElement("div",{ref:b,className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(Y,{ref:h,className:"maxio-text-field__input",placeholder:d}),a.createElement("div",{className:"maxio-text-field__trailing-element"},a.createElement(Z,{className:v("maxio-button","maxio-button--ghost","maxio-button--icon","maxio-button--sm")},a.createElement(we,{variant:"chevron-up-down"})))),o&&!w&&a.createElement(X,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},o),r&&a.createElement(Q,{className:"maxio-form-error"},e=>a.createElement(a.Fragment,null,a.createElement(we,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},"function"==typeof r?r(e):r))),a.createElement(za,{hideArrow:!0,className:"maxio-combobox__popover",crossOffset:_,style:f},a.createElement(Da,{renderEmptyState:u},k)))};Ta.displayName="ComboBox";const Oa=e=>a.createElement(Da.Item,{...e});Oa.displayName="ComboBox.Item";const Ra=e=>a.createElement(Da.Section,{...e});Ra.displayName="ComboBox.Section";const Ma=e=>a.createElement(Da.Header,{...e});Ma.displayName="ComboBox.Header";const Ba=Object.assign(Ta,{Item:Oa,Section:Ra,Header:Ma}),Aa=r({}),La=({indent:e=!1,disabled:l=!1,invalid:n=!1,label:i,...o})=>{const r=t(null),s=c(Aa),{inputProps:m,isDisabled:d}=k({...o,value:(o.value||"").toString(),"aria-label":o["aria-label"]||i,isDisabled:l},s,r),u=v("maxio-radio",{"maxio-radio--indent":e,"maxio-radio--disabled":d||s.isDisabled,"maxio-radio--error":n||s.isInvalid});return a.createElement("label",{className:u},a.createElement("input",{ref:r,role:"radio",type:"radio",className:"maxio-radio__input",...m,name:s.name||m.name}),a.createElement("span",{className:"maxio-radio__control"}),a.createElement("span",{className:"maxio-radio__label"},i))},Ha=({children:e,label:t,errorMessage:l,helperText:n,disabled:i=!1,invalid:o=!1,name:r,defaultValue:s,...c})=>{const m=xe({isDisabled:i,isInvalid:o,description:n,name:r,label:t,errorMessage:l,defaultValue:s,...c}),{radioGroupProps:d,labelProps:u,descriptionProps:p,errorMessageProps:x}=C({"aria-label":c["aria-label"]||t,...c},m);return a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-radio-group",...d},t&&a.createElement("label",{className:"maxio-radio-group__label",...u},t),a.createElement(Aa.Provider,{value:m},e),o&&l&&a.createElement(ia,{...x},l),n&&!o&&a.createElement(na,{...p},n)))},Va=u(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:o,errorMessage:r,leadingElement:s=null,trailingElement:c=null,fullWidth:m,className:d,...u},p)=>{const x=v("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":t,"maxio-text-field--readonly":l,"maxio-text-field--full-width":m},d);return a.createElement(J,{...u,isDisabled:e,isReadOnly:l,isInvalid:t,className:x},i&&a.createElement(K,{className:"maxio-text-field__label"},i),a.createElement("div",{className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(Y,{ref:p,className:"maxio-text-field__input"}),c&&a.createElement("div",{className:"maxio-text-field__trailing-element"},c)),o&&!(t&&r)&&a.createElement(X,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},o),r&&a.createElement(Q,{className:"maxio-form-error"},a.createElement(we,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},r)))});Va.displayName="TextField";const Fa=u(({disabled:e=!1,invalid:n=!1,readOnly:i=!1,size:o="md",label:r,helperText:s,showErrorMessage:c=!0,errorMessage:m,leadingElement:d=null,trailingElement:u=null,fullWidth:p,className:g,...b},h)=>{var f,E;const _=t(null);x(h,()=>_.current),l(()=>{console.warn("TextInput is deprecated. Please use TextField instead.")},[]);const{spellCheck:N,...w}=b,y={...w,label:r,description:s,errorMessage:m,defaultValue:null===(f=b.defaultValue)||void 0===f?void 0:f.toString(),value:null===(E=b.value)||void 0===E?void 0:E.toString(),isDisabled:e,isReadOnly:i,isInvalid:n},{labelProps:k,inputProps:C,descriptionProps:S,errorMessageProps:P}=I(y,_),$=v("maxio-text-field",`maxio-text-field--${o}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":n,"maxio-text-field--readonly":i,"maxio-text-field--full-width":p},g),D=n&&m&&c;return a.createElement("div",{className:$},r&&a.createElement("label",{className:"maxio-text-field__label",...k},r),a.createElement("div",{className:"maxio-text-field__items"},d&&a.createElement("div",{className:"maxio-text-field__leading-element"},d),a.createElement("input",{ref:_,type:"text",className:"maxio-text-field__input",...C,spellCheck:N}),u&&a.createElement("div",{className:"maxio-text-field__trailing-element"},u)),s&&!D&&a.createElement("div",{className:"maxio-form-helper-text",...S},s),D&&a.createElement(ia,{...P},m))});Fa.displayName="TextInput";const Wa=({options:e,label:t,size:l="md",inline:n=!1,disabled:i=!1,helperText:o,errorMessage:r,fullWidth:s=!1,...c})=>{const m=v("maxio-select",`maxio-select--${l}`,{"maxio-select--disabled":i,"maxio-select--inline":n,"maxio-select--error":!!r,"maxio-select--full-width":s}),d=g();return a.createElement("div",{className:m},t&&a.createElement("label",{htmlFor:d,className:"maxio-select__label"},t),a.createElement("div",{className:"maxio-select__input-container"},a.createElement("select",{id:d,className:"maxio-select__input",disabled:i,...c},e.map(e=>a.createElement("option",{key:`option-${e.value}`,value:e.value,disabled:e.disabled},e.label))),a.createElement(we,{variant:"chevron-up-down"})),!!r&&a.createElement(ia,null,r),o&&!r&&a.createElement("div",{className:"maxio-form-helper-text"},o))},ja=({size:e="md",onChange:t,totalItems:i=0,itemsPerPage:o=30,currentPage:r=1,pageSizeOptions:s,manualPageInput:c=!1})=>{const[m,d]=n(r),[u,p]=n(o),[x,v]=n(r.toString());l(()=>{v(m.toString())},[m]);const g=Math.ceil(i/u),b=m<g,h=m>1,f=u*(m-1)+1,E=Math.min(u*m,i),_=s.map(e=>({label:e.toString(),value:e.toString()})),N=Array.from({length:g},(e,a)=>a+1).map(e=>({label:e.toString(),value:e.toString()})),w=e=>{d(e),null==t||t({currentPage:e,itemsPerPage:u})},y=e=>{const a=parseInt(e,10);if(isNaN(a))return void v(m.toString());const t=Math.max(1,Math.min(a,g));v(t.toString()),w(t)};return a.createElement("div",{className:"maxio-pagination"},a.createElement("div",{className:"maxio-pagination__items-per-page"},a.createElement("label",{htmlFor:"items-per-page-large",className:"maxio-pagination__label"},"Items per page"),a.createElement(Wa,{inline:!0,size:e,options:_,onChange:e=>{return a=Number(e.target.value),p(a),d(1),void(null==t||t({currentPage:1,itemsPerPage:a}));var a},value:u,id:"items-per-page-large"})),a.createElement("div",{className:"maxio-pagination__total-items"},a.createElement("span",null,f,"–",E," of ",i," items")),a.createElement("div",{className:"maxio-pagination__current-page"},c?a.createElement(Fa,{className:"maxio-pagination__page-input",value:x,min:1,max:g,onChange:e=>(e=>{v(e)})(e),onBlur:e=>{y(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(y(e.currentTarget.value),e.currentTarget.blur())},"aria-label":"Page number",size:e,type:"number",onWheel:e=>e.preventDefault()}):a.createElement(Wa,{inline:!0,size:e,"aria-label":"Select page",onChange:e=>w(Number(e.target.value)),value:m,options:N,id:"page-index-large"}),a.createElement("div",{className:"maxio-pagination__label"},"of ",g," pages")),a.createElement("div",{className:"maxio-pagination__controls"},a.createElement(ka,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},a.createElement(ze,{icon:a.createElement(we,{variant:"chevron-left"}),size:e,variant:"ghost",onClick:()=>w(m-1),"aria-label":"Previous",disabled:!h})),a.createElement(ka,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},a.createElement(ze,{icon:a.createElement(we,{variant:"chevron-right"}),size:e,variant:"ghost",onClick:()=>w(m+1),"aria-label":"Next",disabled:!b}))))},Ua=({label:e,helperText:t,size:l="md",variant:n="default",status:i,value:o,maxValue:r=100})=>{const s=g(),c=g(),m=i&&!!e&&!!o&&!("inline"===n),d=t&&!("inline"===n),u=t&&"inline"===n,{progressBarProps:p,labelProps:x}=S({maxValue:r,value:o,label:e}),b=v("maxio-progress-bar",{"maxio-progress-bar--lg":"lg"===l,"maxio-progress-bar--success":o&&!("inline"===n)&&"success"===i,"maxio-progress-bar--error":o&&!("inline"===n)&&"error"===i,"maxio-progress-bar--indent":"indent"===n,"maxio-progress-bar--inline":"inline"===n,"maxio-progress-bar--indeterminate":void 0===o});return a.createElement("div",{className:b,...p},a.createElement("div",{id:s,className:"maxio-progress-bar__label",...x},e),u&&a.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t),a.createElement("div",{className:"maxio-progress-bar__track"},a.createElement("div",{className:"maxio-progress-bar__progress",style:{"--tw-scale-x":`${o}%`}})),m&&a.createElement("div",{className:`maxio-progress-bar__${i}-icon`}),d&&a.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t))},qa=({className:e,size:t="md",fullWidth:l=!1,selectionMode:n="single",orientation:i="horizontal",disallowEmptySelection:o=!0,...r})=>a.createElement(ee,{...r,selectionMode:n,orientation:i,disallowEmptySelection:o,className:F(e,e=>v("maxio-segmented-control",`maxio-segmented-control--${t}`,{"maxio-segmented-control--full-width":l},e))});qa.displayName="SegmentedControl";const Ga=({className:e,children:t,...l})=>a.createElement(ae,{...l,className:F(e,e=>v("maxio-segmented-control__item",e))},F(t,e=>a.createElement(a.Fragment,null,a.createElement(te,{className:"maxio-segmented-control__selection-indicator","data-selected":!0}),e)));Ga.displayName="SegmentedControl.Item";const Ka=Object.assign(qa,{Item:Ga}),Ya=({leadingIcon:e,trailingIcon:t,type:l="menu",children:n,leadingIconClassName:i,isTooltipVisible:o=!1})=>a.createElement(a.Fragment,null,e&&a.createElement(ka,{usePortal:!0,isVisible:o,renderContent:()=>n,floatingElementOffset:12},a.createElement("span",{className:"maxio-side-nav__icon"},a.createElement(we,{variant:e,className:i}))),a.createElement("span",{className:`maxio-side-nav__${l}-title`,"data-testid":"maxio-sidebar-section-name"},n),t&&a.createElement("span",{className:"maxio-side-nav__menu-chevron"},a.createElement(we,{variant:t}))),Za=e=>"heading"!==e.type,Xa=e=>{const a=(e=>e.flat().filter(Za).map(e=>e.items).flat().find(e=>null==e?void 0:e.isCurrent))(e);return a?e.map(e=>e.map(e=>{var t;return Za(e)&&(null===(t=e.items)||void 0===t?void 0:t.includes(a))?{...e,isOpen:!0}:e})):e},Qa=r({}),Ja=()=>c(Qa),et=({children:e,isOpen:i,onChange:o,withIcons:r=!0,sections:s,shouldToggleSidebar:c=!0,topDropdownItems:m,collapseBreakpoint:d=800})=>{const u=t(!1),[p,x]=n(()=>!c||("boolean"==typeof i?i:"undefined"==typeof window||window.innerWidth>d)),[v,g]=n(()=>Xa(s)),{windowWitdh:b}=_a(200);l(()=>{u.current&&(null==o||o(p))},[p,o]),l(()=>{u.current=!0},[]),l(()=>{!function(e){if(!c)return;e<d&&p&&h()}(b)},[b]),l(()=>{"boolean"==typeof i&&x(i)},[i]);const h=()=>{x(!1)};return a.createElement(Qa.Provider,{value:{sections:v,topDropdownItems:m,onSectionOpen:e=>{g(a=>a.map(a=>a.map(a=>Za(a)?{...a,isOpen:(null==a?void 0:a.name)===e&&!a.isOpen}:a)))},isOpen:p,onOpen:()=>{x(!0)},onClose:h,withIcons:r,shouldToggleSidebar:c}},e)},at=()=>{const{onOpen:e,topDropdownItems:l,isOpen:n}=Ja(),{mainItem:i,otherItems:o,actions:r}=l,s=t(null),c=Ea(s),m=({id:e,title:a,icon:t,iconClass:l,url:n,...i})=>({id:e,label:a,leadingIconName:t,leadingIconClassName:l,link:{href:n,...i}}),{items:u,itemsCount:p}=d(()=>({itemsCount:o.length+r.length,items:[...o.map(m),(null==o?void 0:o.length)>0&&(null==r?void 0:r.length)>0?{type:"divider",id:"item-divider"}:null,...r.map(m)].filter(e=>null!=e)}),[r,o]);return a.createElement(a.Fragment,null,0===p?a.createElement("a",{className:"maxio-side-nav__menu-button maxio-side-nav__menu-button--large",href:i.url,onClick:e},a.createElement("span",{className:"maxio-side-nav__menu-title"},i.title)):a.createElement("details",{className:"maxio-action-menu maxio-side-nav--action-menu"},a.createElement("summary",{onClick:e,className:"maxio-side-nav__menu-button","aria-haspopup":"true",ref:s},i.url?a.createElement(a.Fragment,null,a.createElement(Ya,{type:"menu",isTooltipVisible:!n&&c,leadingIcon:i.icon,trailingIcon:"chevron-up-down",leadingIconClassName:i.iconClass},i.title)):a.createElement(Ya,{type:"menu",trailingIcon:"chevron-up-down"},i.title)),a.createElement(Ce,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:u,small:!0})))},tt=({section:e})=>{const{isOpen:l,withIcons:n}=Ja(),i=t(null),o=Ea(i);return a.createElement("li",{className:"maxio-side-nav__item","data-key":e.key,"data-testid":"maxio-sidebar-section"},a.createElement("a",{className:"maxio-side-nav__link","aria-current":e.isCurrent?"page":void 0,role:"button",href:e.href,ref:i},a.createElement(Ya,{isTooltipVisible:o&&!l,type:"menu",leadingIcon:n?e.icon:void 0},e.name)))},lt=({section:e})=>{var l,n;const{onOpen:i,onSectionOpen:o,isOpen:r,withIcons:s}=Ja(),c=t(null),m=Ea(c);if(!Za(e))return a.createElement("li",{className:"maxio-side-nav__item-header"},e.title);return e.Component?a.createElement(e.Component,{section:e}):e.href?a.createElement(tt,{section:e}):a.createElement("li",{className:v("maxio-side-nav__item",{"maxio-side-nav__item--icon":s}),"data-testid":"maxio-sidebar-section"},a.createElement("button",{className:"maxio-side-nav__menu-button",ref:c,"aria-expanded":e.isOpen?"true":"false",type:"button",onClick:()=>{o(e.name),i()}},a.createElement(Ya,{type:"menu",isTooltipVisible:!r&&m,leadingIcon:s?e.icon:void 0,trailingIcon:(null===(l=e.items)||void 0===l?void 0:l.length)?"chevron-down":void 0},e.name)),a.createElement("ul",{className:"maxio-side-nav__menu"},null===(n=e.items)||void 0===n?void 0:n.map(e=>a.createElement("li",{key:`section-sub-item-${e.name}`,className:"maxio-side-nav__item","data-testid":"maxio-section-item"},a.createElement("a",{className:"maxio-side-nav__link",href:e.href,"aria-current":e.isCurrent?"page":void 0},a.createElement("span",{className:"maxio-side-nav__link-title"},e.name))))))},nt=()=>{const{sections:e}=Ja();return a.createElement(a.Fragment,null,e.map((e,t)=>a.createElement("ul",{role:"list",className:"maxio-side-nav__items",key:`section-list-${t}`},e.map((e,l)=>a.createElement(lt,{key:`section-list-item-${e.type}-${t}-${l}`,section:e})))))},it=()=>{const{onClose:e,shouldToggleSidebar:t}=Ja();return a.createElement("div",{className:"maxio-side-nav__logo-container"},a.createElement("a",{className:"maxio-side-nav__brand",href:"/","aria-label":"Maxio"}),t&&a.createElement("button",{className:"maxio-side-nav__menu-toggle","aria-label":"toggle sidebar",onClick:e},a.createElement(we,{variant:"sidebar"})))},ot=()=>{const{isOpen:e}=Ja();return a.createElement("nav",{className:v("maxio-side-nav",{"maxio-side-nav--collapsed":!e})},a.createElement(it,null),a.createElement(at,null),a.createElement("div",{className:"maxio-side-nav__items-container"},a.createElement(nt,null)))},rt=({withIcons:e=!0,shouldToggleSidebar:t=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:o,onChange:r})=>a.createElement(et,{isOpen:o,onChange:r,collapseBreakpoint:i,withIcons:e,shouldToggleSidebar:t,topDropdownItems:l,sections:n},a.createElement(ot,null)),st=r({}),ct=()=>c(st),mt=({children:e,variant:t="line",withDivider:i=!1,defaultIndex:o=0,onChange:r,index:s})=>{const[c,m]=n(()=>void 0!==s?s:o);l(()=>{void 0===s&&m(o),"number"==typeof s&&m(s)},[o,s]);return a.createElement(st.Provider,{value:{currentIndex:c,variant:t,withDivider:i,onChange:e=>{let a;a="function"==typeof e?e(c):e,void 0===s&&m(a),"function"==typeof r&&r(a)}}},e)},dt=({disabled:e=!1,value:n=0,isCurrent:i,...o})=>{const{onChange:r,currentIndex:s}=ct(),c=v("maxio-tabs__tab",{"maxio-tabs__tab--active":s===n,"maxio-tabs__tab--disabled":e,"maxio-tabs__tab--icon":"icon"===o.type}),m=()=>{r(n)},d={"aria-selected":i,id:`tab-${n}`,"aria-controls":`panel-${n}`,role:"tab",tabIndex:i?0:-1},u=t(null),p=t(!1);if(l(()=>{var e;i&&p.current&&(null===(e=u.current)||void 0===e||e.focus())},[i]),l(()=>{p.current=!0},[]),"icon"===o.type){const{icon:e,...t}=o;return a.createElement("div",{className:c,ref:u,onClick:m,...d,...t},a.createElement("div",{className:"maxio-tabs__tab__content"},e))}const{children:x,rightIcon:g,...b}=o;return a.createElement("div",{ref:u,className:c,onClick:m,...d,...b},a.createElement("div",{className:"maxio-tabs__tab__content"},x,g||null))},ut=({children:e,variant:t="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:o})=>a.createElement(mt,{defaultIndex:n,variant:t,withDivider:l,index:i,onChange:o},e),pt=({children:e,value:t,...l})=>{const{currentIndex:n}=ct();return a.createElement("div",{...l,...t?{id:`panel-${t}`}:{},role:"tabpanel","aria-labelledby":`tab-${t}`,hidden:n!==t},e)},xt=({children:e})=>{const{currentIndex:t}=ct();return a.createElement(a.Fragment,null,m.map(e,(e,a)=>{if(o(e)&&e.type===pt)return a===t?i(e,{value:a}):null;throw new Error("You can only pass <TabPanel /> component as children")}))},vt=(e,a,t)=>0===e?e:1===e&&a[e-1].disabled?t||e:a[e-1].disabled?vt(e-1,a,t||e):e-1,gt=({children:e,className:l,ariaLabel:n,...r})=>{const{variant:s,withDivider:c,currentIndex:d,onChange:u}=ct(),p=v("maxio-tabs",l,{"maxio-tabs--contained":"contained"===s,"maxio-tabs--divider":c}),x=t(null),g=()=>m.map(e,e=>e.props);return a.createElement("div",{className:p,role:"tablist","aria-label":n,"aria-orientation":"horizontal",ref:x,onKeyDown:e=>{var a;"ArrowRight"===e.key&&u(e=>((e,a)=>{const t=a.findIndex((a,t)=>!a.disabled&&t>e);return-1===t?e:t})(e,g())),"ArrowLeft"===e.key&&u(e=>vt(e,g())),null===(a=x.current)||void 0===a||a.focus()},...r},m.map(e,(e,a)=>{if(o(e)&&e.type===dt)return i(e,{value:a,isCurrent:d===a});throw new Error("You can only pass <Tab /> component as children")}))},bt=({children:e,size:t,sentiment:l,kind:n="primary",leadingIcon:i,trailingIcon:o})=>{const r=v("maxio-tag",`maxio-tag--${n}`,!!l&&`maxio-tag--${l}`,!!t&&`maxio-tag--${t}`);return a.createElement("div",{className:r},i&&a.createElement(we,{variant:i,className:"maxio-tag__icon"}),a.createElement("span",{className:"maxio-tag__label"},e),o&&a.createElement(we,{variant:o,className:"maxio-tag__icon"}))},ht=({children:e,className:t,...l})=>a.createElement("div",{className:v("maxio-card__header",t),...l},e);ht.displayName="Card.Header";const ft=({children:e,className:t,...l})=>a.createElement("div",{className:v("maxio-card__body",t),...l},e);ft.displayName="Card.Body";const Et=({children:e,className:t,...l})=>a.createElement("div",{className:v("maxio-card__footer",t),...l},e);Et.displayName="Card.Footer";const _t=({children:e,className:t,variant:l="primary",...n})=>a.createElement("div",{className:v("maxio-card",`maxio-card--${l}`,t),...n},e);_t.displayName="Card";const Nt=Object.assign(_t,{Header:ht,Body:ft,Footer:Et}),wt=({children:e,className:t,href:l,onClick:n,target:i,disabled:o})=>{const r=l||n;if(!r)return a.createElement("div",{className:"maxio-tile"},e);const s=v("maxio-tile",t,{"maxio-tile--clickable":r,"maxio-tile--disabled":o});return a.createElement("a",{className:s,href:l,target:i,onClick:e=>{o&&l&&e.preventDefault(),!o&&n&&n()}},e)};var yt,kt,Ct,It;function St(){return St=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},St.apply(null,arguments)}const Pt=a=>e.createElement("svg",St({xmlns:"http://www.w3.org/2000/svg","data-name":"Maxio Logo SVG",viewBox:"0 0 1036 240"},a),yt||(yt=e.createElement("path",{d:"M59.32 11.3 70.64 0l40.74 40.35v70.99H40.89L0 70.52l11.15-11.14 36.2 36.15h30.07l3.07-3.39-50.91-51.15 10.99-10.97 51.24 50.83 3.72-3.38V47.13zM180.68 11.3 169.36 0l-40.73 40.35v70.99h70.48L240 70.51l-11.15-11.14-36.2 36.15h-30.06l-3.07-3.39 50.91-51.15-10.99-10.97-51.24 50.83-3.72-3.38V47.12l36.2-35.83ZM59.32 228.7l11.31 11.29 40.74-40.35v-70.99H40.89L0 169.48l11.15 11.14 36.2-36.15h30.07l3.07 3.39-50.92 51.15 10.99 10.97 51.24-50.83 3.72 3.38v30.34zM180.68 228.7l-11.32 11.29-40.73-40.35v-70.99h70.48L240 169.48l-11.15 11.14-36.2-36.15h-30.06l-3.07 3.39 50.91 51.15-10.99 10.97-51.24-50.83-3.72 3.38v30.34zM1015.27 139.55c0-29.94-23.74-53.46-52.11-53.46s-52.11 23.52-52.11 53.46 23.74 53.46 52.11 53.46 52.11-23.52 52.11-53.46m20.32.95c-.5 40.27-32.73 72.76-72.43 72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71 72.44-73.71h.94c39.57.52 71.5 33.32 71.5 73.71v.95Z"})),kt||(kt=e.createElement("path",{fillRule:"evenodd",d:"M870.39 24h-20.33v20.33h20.33zm0 40.67h-20.33v148.59h20.33z"})),Ct||(Ct=e.createElement("path",{fillRule:"evenodd",d:"M850.05 24h20.33v20.33h-20.33zM695.01 82.85l50.83 56.28v6.53l-50.28 55.67 15.23 13.2 49.22-54.49h4.71l49.22 54.49 15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15 55.52h-3.96l-50.15-55.52L695 82.85ZM660.49 78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13 0-52.44 18.93-58.09 44.86l-.28 1.27 19.33 3.72.31-1.14c2.39-8.91 6.66-16.54 13.04-21.94 6.36-5.39 14.91-8.63 26.02-8.63s19.12 3.25 24.76 8.96c5.64 5.72 8.73 14.06 8.73 24.53v6.11L616.62 130l-3.26.68c-16.14 3.47-29.79 7.84-39.59 14.45-10.54 7.11-16.64 16.83-16.64 30.62 0 12.51 4.51 22.62 12.5 29.59 7.96 6.95 19.25 10.67 32.63 10.67 22.27 0 41.87-12.03 51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58Zm-40.09 68.13c-12.86 2.77-23.05 5.42-30.03 9.63-3.46 2.09-6.08 4.54-7.84 7.54s-2.71 6.62-2.71 11.15c0 6.38 2.1 12.12 6.32 16.27 4.22 4.14 10.7 6.82 19.7 6.82 26.85 0 47.46-20.48 47.46-51.36v-7.2l-32.9 7.14Z"})),It||(It=e.createElement("path",{d:"M434.8 188.74h4.54l61.73-164.33.15-.41h35.57v189.35H515.9V55.37h-4.33l-59.7 157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98H336V24h35.57z"}))),$t=e=>{const{size:t="sm",className:l,variant:n="lockup",alt:i="maxio logo"}=e,o="mark"===n,r="number"==typeof t;return a.createElement(Pt,{role:"img",viewBox:o?"0 0 240 240":"0 0 1036 240","aria-label":i,height:r?t:void 0,className:v("maxio-logo",!r&&`maxio-logo--${t}`,o&&"maxio-logo--mark",l)})},Dt=({state:e,...l})=>{var n,i;const o=t(null),{toastProps:r,contentProps:s,titleProps:c,closeButtonProps:m}=he(l,e,o),{closable:d=!0,underline:u=!0,external:p=!1}=l.toast.content,x=v("maxio-toast",{[`maxio-toast--${l.toast.content.sentiment}`]:l.toast.content.sentiment}),g={default:"info-circle-fill",success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[l.toast.content.sentiment||"default"];return a.createElement("div",{className:x,"data-maxio-mode":"dark",...r,ref:o},a.createElement(we,{variant:g,className:"maxio-toast__icon"}),a.createElement("div",{className:"maxio-toast__container",...s},a.createElement("div",{className:"maxio-toast__content",...c},l.toast.content.title&&a.createElement("span",{className:"maxio-toast__title"},l.toast.content.title),l.toast.content.message&&a.createElement("span",{className:"maxio-toast__message"},l.toast.content.message),(null===(n=l.toast.content.link)||void 0===n?void 0:n.text)&&(null===(i=l.toast.content.link)||void 0===i?void 0:i.href)&&a.createElement(Ie,{href:l.toast.content.link.href,underline:u,external:p},l.toast.content.link.text))),d&&a.createElement(ze,{variant:"ghost",icon:a.createElement(we,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss",...m}))},zt=({state:e,...t})=>{const l=a.useRef(null),{regionProps:n}=fe(t,e,l);return a.createElement("div",{...n,ref:l,className:t.className,style:{display:"flex",flexDirection:"column",gap:"10px"}},e.visibleToasts.map(t=>a.createElement(Dt,{key:t.key,toast:t,state:e})))},Tt=({children:e,...t})=>{const{maxVisibleToasts:l=5,...n}=t,i=ve({maxVisibleToasts:l,...n});return a.useEffect(()=>{console.warn("ToastProvider is deprecated. Please use the global toast API instead.")},[]),a.createElement(a.Fragment,null,e(i),i.visibleToasts.length>0&&a.createElement(zt,{...t,state:i}))},Ot=r(null),Rt=({children:e,toastQueue:t,...l})=>{const n=ge(t),i=p(()=>{n.visibleToasts.forEach(e=>{t.close(e.key)})},[n.visibleToasts,t]),o=d(()=>({addToast:t.add.bind(t),removeToast:t.clear.bind(t),removeAllToasts:i,state:n}),[t,i,n]);return a.createElement(Ot.Provider,{value:o},e,n.visibleToasts.length>0&&a.createElement(zt,{...l,state:n}))},Mt=()=>{const e=c(Ot);if(!e)throw new Error("useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.");return e};class Bt extends be{}const At=({defaultChecked:e,checked:t,onChange:l,disabled:n,valueDescription:i,valueDescriptionPosition:o,className:r,name:c,id:m,...d})=>{const u=s(),x="boolean"==typeof e,g=m||u,b="left"===o?"row":"row-reverse",h=i&&o,f=p(e=>{if("Enter"===e.code||"Space"===e.code){e.preventDefault();const a=e.currentTarget.checked;x&&(e.currentTarget.checked=!a),l&&l(!a,e)}},[x,l]),E=d["aria-label"]||(h?void 0:i);return a.createElement("div",{className:v("maxio-toggle",r,{"maxio-toggle--disabled":n}),style:{display:"inline-flex",flexDirection:b},"data-testid":"toggle-container"},h?a.createElement("label",{className:"maxio-toggle__label",htmlFor:g},i):null,a.createElement("div",{className:"maxio-toggle__container"},a.createElement("input",{type:"checkbox",defaultChecked:e,checked:t,onChange:e=>{l&&l(e.target.checked,e)},onKeyDown:f,disabled:n,className:"maxio-toggle__checkbox",id:g,name:c,"aria-label":E}),a.createElement("div",{className:"maxio-toggle__track",role:"switch","aria-checked":t,"aria-hidden":"true"},a.createElement("div",{className:"maxio-toggle__handle"}),a.createElement("span",{className:"maxio-toggle__icon"},a.createElement("i",{className:"maxio-toggle__icon-on"})),a.createElement("span",{className:"maxio-toggle__icon"},a.createElement("i",{className:"maxio-toggle__icon-off"})))))},Lt=({basis:e,flex:t,flexDirection:l,wrap:n,grow:i,shrink:o,gap:r,gapX:s,gapY:c,className:m,children:d,alignItems:u,justifyContent:p,...x})=>{const g=v("maxio-flex",{[`maxio-flex-${t}`]:t,[`maxio-basis-${e}`]:void 0!==e,[`maxio-flex-${l}`]:l,[`maxio-flex-${n}`]:n,"maxio-grow":i,"maxio-grow-0":!1===i,"maxio-shrink":o,"maxio-shrink-0":!1===o,[`maxio-gap-${r}`]:void 0!==r,[`maxio-gap-x-${s}`]:void 0!==s,[`maxio-gap-y-${c}`]:void 0!==c,[`maxio-items-${u}`]:u,[`maxio-justify-${p}`]:p},m);return a.createElement("div",{className:g,...x},d)},Ht=({children:e,actions:t,sideNavIsClosed:l,openSideNav:n})=>a.createElement("nav",{className:"maxio-top-bar"},l&&a.createElement(ze,{"aria-label":"Open Side Navigation",variant:"ghost",icon:a.createElement(we,{variant:"sidebar"}),onClick:n}),a.createElement(Lt,{grow:!0,justifyContent:"end"},e),t),Vt=({as:e="div",children:t,size:l="md",className:n,...i})=>{const o=e,r=v(`maxio-display-${l}`,n);return a.createElement(o,{className:r,...i},t)},Ft=({as:e="div",children:t,className:l,...n})=>{const i=e,o=v("maxio-code",l);return a.createElement(i,{className:o,...n},t)},Wt=({as:e="div",children:t,size:l="sm",className:n,...i})=>{const o=e,r=v(`maxio-label-${l}`,n);return a.createElement(o,{className:r,...i},t)},jt=({...e})=>{const l=t(null),{buttonProps:n}=h(e,l);return a.createElement("button",{...n,className:"maxio-chip__dismiss-button"},a.createElement(we,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},Ut=({label:e,onDismiss:l,dismissLabel:n,leadingIcon:i,trailingIcon:o,title:r,...s})=>{const c=t(null),m=R(s),{buttonProps:d}=P(s,m,c),u=v("maxio-chip",{"maxio-chip--selected":null==m?void 0:m.isSelected}),p=v("maxio-chip__button",{"maxio-chip--dismissible":l});return a.createElement("div",{className:u},a.createElement("button",{className:p,ref:c,...d,title:r},i&&a.createElement(we,{variant:i,className:"maxio-chip__icon"}),a.createElement("span",{className:"maxio-chip__label"},e),o&&!l&&a.createElement(we,{variant:o,className:"maxio-chip__icon"})),l&&a.createElement(jt,{onPress:l,"aria-label":n}))},qt=({children:e,templateColumns:t,templateRows:l,autoColumns:n,autoRows:i,inline:o,column:r,columnStart:s,columnEnd:c,row:m,rowStart:d,rowEnd:u,gap:p,gapX:x,gapY:g,className:b,justifyContent:h,alignItems:f,...E})=>{const _=v(b,{"maxio-grid":!o,"maxio-inline-grid":o,[`maxio-grid-cols-${t}`]:t,[`maxio-grid-rows-${l}`]:l,[`maxio-auto-cols-${n}`]:n,[`maxio-auto-rows-${i}`]:i,["maxio-col-"+("auto"===r?"auto":`span-${r}`)]:r,[`maxio-col-start-${s}`]:s,[`maxio-col-end-${c}`]:c,["maxio-row-"+("auto"===m?"auto":`span-${m}`)]:m,[`maxio-row-start-${d}`]:d,[`maxio-row-end-${u}`]:u,[`maxio-gap-${p}`]:void 0!==p,[`maxio-gap-x-${x}`]:void 0!==x,[`maxio-gap-y-${g}`]:void 0!==g,[`maxio-justify-${h}`]:h,[`maxio-items-${f}`]:f});return a.createElement("div",{className:_||void 0,...E},e)},Gt={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"},Kt=({children:e,heading:t,description:l,sentiment:n="success",leadingElement:i=null,alert:o,topAddon:r=null,footer:s})=>a.createElement("div",{className:"maxio-auth-layout"},a.createElement(Lt,{alignItems:"center",justifyContent:"between"},a.createElement($t,{size:"md"}),r),o&&a.createElement(Te,{display:"block",title:o.title,sentiment:o.sentiment},o.children),a.createElement(Nt,{variant:"secondary"},a.createElement(Nt.Body,null,a.createElement(Lt,{flexDirection:"col",gap:6},a.createElement(Lt,{flexDirection:"col",gap:2},a.createElement(Lt,{alignItems:"center",gap:2},i,a.createElement(va,{size:"lg",className:v("maxio-auth-layout__heading",Gt[n])},t)),l&&a.createElement(Lt,{style:{color:"var(--maxio-color-text-tertiary)"}},a.createElement(Ca,{size:"sm",className:"maxio-auth-layout__description"},l))),e)),s&&a.createElement(Nt.Footer,null,s)));export{Ce as ActionList,Te as Alert,Kt as AuthLayout,Ve as Avatar,Fe as Banner,Ca as Body,Ge as Breadcrumbs,We as BreadcrumbsItem,De as Button,Nt as Card,la as Checkbox,oa as CheckboxGroup,Ut as Chip,Ft as Code,Ba as ComboBox,pa as DataTable,Vt as Display,ga as Drawer,Lt as Flex,ia as FormErrorMessage,na as FormHelperText,Rt as GlobalToastProvider,qt as Grid,va as Heading,we as Icon,ze as IconButton,Wt as Label,Ie as Link,Da as ListBox,Se as LoadingSpinner,$t as Logo,Ae as Menu,He as MenuButton,Le as MenuList,Na as OverlayTrigger,ja as Pagination,za as Popover,Ua as ProgressBar,La as Radio,Ha as RadioGroup,Ka as SegmentedControl,Wa as Select,rt as SideNav,dt as Tab,gt as TabList,pt as TabPanel,xt as TabPanels,ut as Tabs,bt as Tag,Va as TextField,Fa as TextInput,wt as Tile,Tt as ToastProvider,Bt as ToastQueue,At as Toggle,wa as Tooltip,ka as TooltipTrigger,Ht as TopBar,Ea as useHover,fa as useOverlayTrigger,Mt as useToast,_a as useWindowSize};
|
|
1
|
+
import*as e from"react";import a,{useRef as t,useEffect as l,useState as n,cloneElement as i,isValidElement as o,createContext as r,useId as s,useContext as c,Children as m,useMemo as d,forwardRef as u,useCallback as x,useImperativeHandle as p}from"react";import v from"classnames";import{useId as g,useLink as b,useButton as h,usePress as f,useFocusRing as E,mergeProps as _,useCheckboxGroupItem as N,useCheckbox as w,useCheckboxGroup as y,useRadio as k,useRadioGroup as C,useTextField as I,useProgressBar as S,useToggleButton as P}from"react-aria";import{flexRender as $,useReactTable as D,getSortedRowModel as T,getExpandedRowModel as z,getCoreRowModel as O}from"@tanstack/react-table";export{createColumnHelper}from"@tanstack/react-table";import{useToggleState as R}from"@react-stately/toggle";import{useCheckboxGroupState as M}from"@react-stately/checkbox";import{ModalOverlay as B,Modal as A,Dialog as L,ListBox as H,ListBoxItem as V,composeRenderProps as F,ListBoxSection as W,Header as j,Popover as U,OverlayArrow as q,ComboBox as G,Label as K,Input as Y,Button as Z,Text as X,FieldError as Q,TextField as J,TextArea as ee,ToggleButtonGroup as ae,ToggleButton as te,SelectionIndicator as le}from"react-aria-components";export{DialogTrigger,Pressable}from"react-aria-components";import{AnimatePresence as ne,motion as ie}from"framer-motion";import{useDismiss as oe,useFocus as re,useHover as se,useClick as ce,useFloating as me,offset as de,useInteractions as ue,useRole as xe,FloatingPortal as pe}from"@floating-ui/react-dom-interactions";import{useRadioGroupState as ve}from"@react-stately/radio";import{useToastState as ge,useToastQueue as be,ToastQueue as he}from"@react-stately/toast";import{useToast as fe,useToastRegion as Ee}from"@react-aria/toast";const _e=["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"],Ne=["anrok","dropbox","hubspot","numeral","oracle","quotapath","sage","sphere","taxjar"],we=["avalara","pipedrive","quickbooks","salesforce","xero"],ye=({variant:e,color:t,className:l,size:n})=>{const i=(e,a)=>a.includes(e),o=i(e,_e)||i(e,Ne),r=i(e,we),s=v({"fa-kit":o,"fa-kit-duotone":r,"fa-sharp fa-regular":!o&&!r,[`fa-${e}`]:!0,[`fa-${n}`]:n,[`maxio-icon--${t}`]:t&&!i(e,Ne)&&!i(e,we)},l);return a.createElement("i",{className:s})},ke=({item:e,isSelected:n,truncateLabel:i=!1,role:o="option",small:r=!1})=>{const s=t(null),c=t(!1),m=g();if(l(()=>{var e;n&&c.current&&(null===(e=s.current)||void 0===e||e.focus())},[n]),l(()=>{c.current=!0},[]),"divider"===e.type)return a.createElement("div",{className:"maxio-action-list__divider",role:"separator","aria-hidden":"true"});const{leadingIconName:d,leadingIconClassName:u,trailingIconName:x,label:p,description:b,link:h}=e,f=v("maxio-action-list__label",{"maxio-truncate":i});return a.createElement("a",{"aria-labelledby":m,...h,className:v("maxio-action-list__content",h.className,{"maxio-action-list__content--size-small":r}),tabIndex:n?0:-1,ref:s,role:o},d&&a.createElement(ye,{variant:d,className:v("maxio-action-list__leading-icon",u)}),a.createElement("span",{className:f,id:m},p),b&&a.createElement("span",{className:"maxio-action-list__description"},b),x&&a.createElement(ye,{variant:x,className:"maxio-action-list__trailing-icon"}))},Ce=(e,a,t)=>0===e?e:1===e&&"divider"===a[e-1].type?t||e:"divider"===a[e-1].type?Ce(e-1,a,t||e):e-1,Ie=({items:e,isShadowed:t=!0,itemProps:l={},className:i,truncateLabels:o=!1,small:r=!1,...s})=>{const c=v("maxio-action-list",i,{"maxio-action-list--shadow":t}),[m,d]=n(()=>e.findIndex(e=>"divider"!==e.type));return 0===e.length?null:a.createElement("div",{className:c,onKeyDown:a=>{if("Space"===a.code||"Enter"===a.code){const a=e[m];a&&"divider"!==a.type&&window.open(a.link.href,a.link.target||"_self")}"ArrowUp"===a.code&&(a.preventDefault(),d(a=>Ce(a,e))),"ArrowDown"===a.code&&(a.preventDefault(),d(a=>((e,a)=>{const t=a.findIndex((a,t)=>"divider"!==a.type&&t>e);return-1===t?e:t})(a,e)))},role:"listbox",...s},e.map((e,t)=>a.createElement(ke,{item:e,truncateLabel:o,key:`listbox-${e.id}`,isSelected:t===m,small:r,...l})))},Se=({className:e,children:t,disabled:l,external:n,icon:i,size:o="sm",underline:r,variant:s,...c})=>{const m=v("maxio-link",{[`maxio-link--${o}`]:o,"maxio-link--disabled":l,[`maxio-link--${s}`]:s,"maxio-link--underline":r},e),d=n?"_blank":"_self";return a.createElement("a",{className:m,target:d,...c},t,i&&a.createElement(ye,{variant:i,className:"maxio-link__icon"}))},Pe=({size:e="md",white:t=!1,className:l})=>{const n=v("maxio-loading-spinner",l,`maxio-loading-spinner--${e}`,{"maxio-loading-spinner--white":t});return a.createElement("div",{className:n,role:"status","aria-label":"loading"})},$e=({fullWidth:e=!1,leadingElement:l,trailingElement:n,icon:r,variant:s="primary",size:c,...m})=>{const d=t(null),{linkProps:u}=b({...m},d),x=v("maxio-button",m.className,{[`maxio-button--${c}`]:c,[`maxio-button--${s}`]:s,"maxio-button--full-width":e});return a.createElement("a",{...u,ref:d,className:x,href:m.href},l&&i(l,{...o(l)&&{className:"maxio-button__leading-element"}}),m.children,(n||r)&&i(n||r,{...o(n||r)&&{className:"maxio-button__trailing-element"}}))},De=({disabled:e,loading:l=!1,fullWidth:n=!1,leadingElement:r,trailingElement:s,icon:c,variant:m="primary",size:d,...u})=>{const x=t(null),{buttonProps:p}=h({...u,isDisabled:e,formAction:"string"==typeof u.formAction?u.formAction:void 0},x),g=["primary","danger"].includes(m),b=v("maxio-button",u.className,{[`maxio-button--${d}`]:d,[`maxio-button--${m}`]:m,"maxio-button--loading":l,"maxio-button--full-width":n});return a.createElement("button",{...p,className:b,ref:x},r&&i(r,{...o(r)&&{className:"maxio-button__leading-element"}}),u.children,!l&&(s||c)&&i(s||c,{...o(s||c)&&{className:"maxio-button__trailing-element"}}),l&&a.createElement(Pe,{className:"maxio-button__trailing-element",size:"md",white:g}))},Te=e=>(e=>"href"in e)(e)?a.createElement($e,{...e}):a.createElement(De,{...e}),ze=({"aria-label":e,className:t,...l})=>a.createElement(Te,{"aria-label":e,className:v("maxio-button--icon",t),...l},null),Oe=({children:e,title:t,linkText:l,linkExternal:n,href:i,display:o="inline",sentiment:r="info",onDismiss:s,className:c})=>{if(!e&&!t)return console.warn("Alert component requires either children or title prop to be rendered"),null;const m=v("maxio-alert",{[`maxio-alert--${r}`]:"info"!==r&&r},c),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[r],u=v("maxio-alert__content",{"maxio-alert__content--block":"block"===o});return a.createElement("div",{className:m},a.createElement(ye,{variant:d,className:"maxio-alert__icon","aria-hidden":"true"}),a.createElement("section",{className:"maxio-alert__container"},a.createElement("div",{className:u},t&&a.createElement("span",{className:"maxio-alert__title"},t),e&&a.createElement("span",{className:"maxio-alert__message"},e),l&&i&&a.createElement(Se,{className:"maxio-alert__link",href:i,variant:"high-contrast",underline:!0,...n?{external:!0}:{}},l))),s&&a.createElement(ze,{icon:a.createElement(ye,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-alert__dismiss"}))},Re=r({}),Me=({children:e})=>{const[t,l]=n(!1),i=s(),o=s();return a.createElement(Re.Provider,{value:{controlsId:i,buttonId:o,isOpen:t,onClose:()=>l(!1),onOpen:()=>l(!0),onToggle:()=>l(e=>!e)}},e)};function Be(){const e=c(Re);if(!e||"object"==typeof e&&0===Object.keys(e).length)throw new Error("useMenu hook must be used within a MenuProvider");return e}const Ae=({children:e})=>{const{isOpen:t,onToggle:l,onClose:n}=Be();return a.createElement("details",{open:t,onToggle:l,className:"maxio-action-menu"},"function"==typeof e?e({isOpen:t,onClose:n}):e)},Le=({children:e})=>a.createElement(Me,null,a.createElement(Ae,null,e)),He=({items:e,alignItemsEnd:t=!1})=>{const l=v("maxio-action-menu__content",{"maxio-action-menu__content--align-end":t}),{controlsId:n,buttonId:i}=Be();return a.createElement("div",{className:l,role:"presentation"},a.createElement(Ie,{role:"menu",itemProps:{role:"menuitem"},id:n,"aria-labelledby":i,items:e}))},Ve=({children:e,iconName:t="chevron-down","aria-label":l,size:n="md",variant:i="secondary"})=>{const o=v({"maxio-action-menu__chevron":"chevron-down"===t}),r=v("maxio-button",`maxio-button--${i}`,`maxio-button--${n}`,{"maxio-button--icon":t&&!e}),{isOpen:s,buttonId:c,controlsId:m}=Be();return a.createElement("summary",{className:r,"aria-haspopup":"true","aria-label":l,"aria-expanded":s,"aria-controls":m,id:c},e&&a.createElement("span",null,e),t&&a.createElement(ye,{variant:t,className:`${o} maxio-button__trailing-element`}))},Fe=({className:e,src:t,alt:l="avatar"})=>a.createElement("img",{className:v("maxio-avatar",e),alt:l,src:t}),We=({children:e,title:t,linkText:l,linkExternal:n,href:i,display:o="inline",sentiment:r="info",onDismiss:s,className:c})=>{if(!e&&!t)return console.warn("Banner component requires either children or title prop to be rendered"),null;const m=v("maxio-banner",{[`maxio-banner--${r}`]:"info"!==r&&r,className:c}),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[r],u=v("maxio-banner__content",{"maxio-banner__content--block":"block"===o});return a.createElement("div",{className:m,"aria-live":"assertive"},a.createElement(ye,{variant:d,className:"maxio-banner__icon","aria-hidden":"true"}),a.createElement("section",{className:"maxio-banner__container"},a.createElement("div",{className:u},t&&a.createElement("span",{className:"maxio-banner__title"},t),e&&a.createElement("span",{className:"maxio-banner__message"},e),l&&i&&a.createElement(Se,{href:i,..."warning"!==r&&{variant:"inverse"},underline:!0,...n?{external:!0}:{}},l))),s&&a.createElement(ze,{icon:a.createElement(ye,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-banner__dismiss"}))},je=({children:e,className:t,href:l,...n})=>{const i=l?a.createElement(Se,{size:"sm",href:l},e):e;return a.createElement("li",{className:v("maxio-breadcrumbs__item",t),...n},i)},Ue="Breadcrumbs requires at least one BreadcrumbsItem as children",qe='Last BreadcrumbsItem should not have "href" prop. It is the current page.',Ge="Breadcrumbs only accepts BreadcrumbsItem as children",Ke=({className:e,children:t,...l})=>{const n=m.count(t);if(0===n)throw new Error(Ue);const r=m.map(t,(e,a)=>{if(o(e)&&e.type===je){if(a===n-1&&e.props.href)throw new Error(qe);return i(e,{"aria-current":a===n-1?"page":void 0})}throw new Error(Ge)});return a.createElement("nav",{"aria-label":"Breadcrumb",...l},a.createElement("ol",{className:v("maxio-breadcrumbs",e)},r))},Ye="row-controls",Ze="row-actions",Xe=({children:e,pattern:t,size:l,isExpandable:i,isUsingCustomRow:o})=>{const[r,s]=n(!1),[c,m]=n(!1),d=t&&o&&i,u=v("maxio-data-table",{"maxio-data-table--pattern":t&&!d,"maxio-data-table--expanded-child-pattern":d,"maxio-data-table--with-custom-row":o,[`maxio-data-table--${l}`]:l,"maxio-data-table--with-pinned-left-border":r,"maxio-data-table--with-pinned-right-border":c});return a.createElement("div",{className:"maxio-data-table-wrapper",onScroll:e=>{const a=e.target;s(a.scrollLeft>0),m(a.scrollWidth-a.clientWidth-a.scrollLeft>0)}},a.createElement("table",{className:u},e))},Qe=({children:e})=>a.createElement("thead",null,e),Je=({children:e})=>a.createElement("tbody",null,e),ea=({children:e,table:t,header:l,className:n,enableExpanding:i,...o})=>{var r,s,c,m,d,u,x,p,g,b,h;const f=null==l?void 0:l.column,E=null===(r=null==f?void 0:f.getCanSort)||void 0===r?void 0:r.call(f),_=null===(s=null==f?void 0:f.getToggleSortingHandler)||void 0===s?void 0:s.call(f),N=null==l?void 0:l.isPlaceholder,w=null===(m=null===(c=null==f?void 0:f.columnDef)||void 0===c?void 0:c.meta)||void 0===m?void 0:m.align,y=null===(u=null===(d=null==f?void 0:f.columnDef)||void 0===d?void 0:d.meta)||void 0===u?void 0:u.width,k=null===(p=null===(x=null==f?void 0:f.columnDef)||void 0===x?void 0:x.meta)||void 0===p?void 0:p.controls,C=null===(b=null===(g=null==f?void 0:f.columnDef)||void 0===g?void 0:g.meta)||void 0===b?void 0:b.actions,I=null==f?void 0:f.getIsPinned(),S=null==f?void 0:f.getIsSorted(),P="asc"===S,$=v("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${I}`]:I,"maxio-data-table__cell--sortable":E,"maxio-data-table__cell--active":S,[`maxio-data-table__cell--${w}`]:w,"maxio-data-table__cell--controls":k,"maxio-data-table__cell--actions":C}),D={...y?{width:y}:{},..."left"===I?{left:null==f?void 0:f.getStart("left")}:"right"===I?{right:null==f?void 0:f.getAfter("right")}:{}},T=((e,a)=>e&&a?"arrow-up":e&&!a?"arrow-down":"arrow-down-up")(!!S,P),z=null==t?void 0:t.getToggleAllRowsExpandedHandler(),O=null===(h=null==t?void 0:t.getIsAllRowsExpanded)||void 0===h?void 0:h.call(t),R=(null==l?void 0:l.headerGroup.headers[0].id)===Ye?1:0,M=i&&(null==l?void 0:l.index)===R;return N?null:a.createElement("th",{scope:"col",role:"columnheader","aria-sort":S?P?"ascending":"descending":"none",className:$,onClick:_,colSpan:null==l?void 0:l.colSpan,style:D,...o},a.createElement("div",{className:"maxio-data-table__cell-flex"},!0===i&&M&&a.createElement(ze,{size:"sm",variant:"ghost",icon:a.createElement(ye,{size:"xs",variant:O?"chevron-down":"chevron-right"}),onClick:z,"aria-label":O?"Collapse all rows":"Expand all rows","data-open":O,className:"maxio-data-table__expand-button"}),e,E&&a.createElement(ye,{variant:T,className:"maxio-data-table__sort-icon"})))},aa=({children:e,row:t,isChild:l,isHeader:n,className:i,onRowAction:o,...r})=>{var s,c,m;const d=null===(s=null==t?void 0:t.getIsSelected)||void 0===s?void 0:s.call(t),u=(null===(c=null==t?void 0:t.getCanExpand)||void 0===c?void 0:c.call(t))&&(null===(m=null==t?void 0:t.getIsExpanded)||void 0===m?void 0:m.call(t)),x=Boolean(t&&o&&!n&&!l),p=a.useRef(null),g=e=>{p.current=e.target},{pressProps:b}=f({isDisabled:!x,onPress:e=>{var a;const l=null!==(a=p.current)&&void 0!==a?a:e.target;p.current=null,t&&o&&!(e=>e instanceof Element&&Boolean(e.closest("a,button,input,select,textarea,label,.maxio-data-table__cell--controls,.maxio-data-table__cell--actions")))(l)&&o(t)}}),{focusProps:h,isFocused:N}=E(),w=v({"maxio-data-table__row":!n,"maxio-data-table__header-row":n,"maxio-data-table__row--active":d||N,"maxio-data-table__row--expanded":u,"maxio-data-table__row--expanded-child":l,"maxio-data-table__row--actionable":x},i),y=x?_({onClickCapture:g,onKeyDownCapture:g,tabIndex:0},b,h,r):r;return a.createElement("tr",{...y,className:w,tabIndex:x?y.tabIndex:r.tabIndex},e)},ta=r({}),la=u(({checked:e,disabled:t,invalid:l,indeterminate:n,className:i,inputProps:o,error:r,label:s},c)=>{const m=v("maxio-checkbox",{"maxio-checkbox--checked":e,"maxio-checkbox--disabled":t,"maxio-checkbox--error":l,"maxio-checkbox--indeterminate":n},i);return a.createElement("label",{className:m},a.createElement("input",{type:"checkbox",role:"checkbox",className:"maxio-checkbox__input",ref:c,...o}),a.createElement("span",{className:"maxio-checkbox__control"},r&&a.createElement("span",{className:"maxio-checkbox__control-error"})),s&&a.createElement("span",{className:"maxio-checkbox__label"},s))});la.displayName="InnerCheckbox";const na=({label:e,error:l=!1,className:n,indeterminate:i,value:o="",disabled:r,readOnly:s,defaultChecked:m,checked:d,...u})=>{const x=t(null),p=c(ta),{inputProps:v,isDisabled:g,isInvalid:b,isSelected:h}=p&&Object.keys(p).length>0?N({value:o,"aria-label":null!=e?e:u["aria-label"],isDisabled:r,isInvalid:l,isIndeterminate:i,isReadOnly:s,...u},p,x):w({"aria-label":null!=e?e:u["aria-label"],isDisabled:r,isInvalid:l,isIndeterminate:i,isReadOnly:s,value:o,...u},R({...u,isSelected:d,defaultSelected:m}),x);return a.createElement(la,{inputProps:v,checked:h,disabled:g,invalid:b,indeterminate:i,className:n,error:l,label:e,ref:x,...u})},ia=({children:e,className:t,...l})=>a.createElement("div",{className:v("maxio-form-helper-text",t),...l},e),oa=({children:e,className:t,...l})=>a.createElement("div",{className:v("maxio-form-error",t),...l},a.createElement(ye,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},e)),ra=({helperText:e,className:t,errorMessage:l,children:n,disabled:i,label:o,defaultValue:r,name:s,...c})=>{var m;const d=M({defaultValue:r,name:s,errorMessage:l,description:e,label:o,isDisabled:i,isInvalid:!!l,...c}),{groupProps:u,labelProps:x,descriptionProps:p,errorMessageProps:g,isInvalid:b}=y({"aria-label":null===(m=null!=o?o:c["aria-label"])||void 0===m?void 0:m.toString(),isDisabled:i,isInvalid:!!l,...c},d),h=v("maxio-checkbox-group",{"maxio-checkbox-group--disabled":i},t),f=e&&!l;return a.createElement("div",{className:h,...u},o&&a.createElement("label",{className:"maxio-checkbox-group__label",...x},o),a.createElement(ta.Provider,{value:d},n),f&&a.createElement(ia,{...p},e),l&&b&&a.createElement(oa,{...g},l))},sa=({table:e})=>{var t,l,n,i;const o=null===(t=null==e?void 0:e.getToggleAllPageRowsSelectedHandler)||void 0===t?void 0:t.call(e),r=(null===(l=null==e?void 0:e.getIsAllPageRowsSelected)||void 0===l?void 0:l.call(e))||(null===(n=null==e?void 0:e.getIsAllRowsSelected)||void 0===n?void 0:n.call(e)),s=null===(i=null==e?void 0:e.getIsSomePageRowsSelected)||void 0===i?void 0:i.call(e);return a.createElement(na,{"aria-label":"Select all rows",onChange:e=>{o("boolean"==typeof e?{target:{checked:e}}:e)},checked:r,indeterminate:!r&&s})},ca=({row:e})=>{var t,l,n,i;const o=null===(t=null==e?void 0:e.getToggleSelectedHandler)||void 0===t?void 0:t.call(e),r=(null===(l=null==e?void 0:e.getIsSelected)||void 0===l?void 0:l.call(e))||(null===(n=null==e?void 0:e.getIsAllSubRowsSelected)||void 0===n?void 0:n.call(e)),s=null===(i=null==e?void 0:e.getIsSomeSelected)||void 0===i?void 0:i.call(e),c=e.id||e.index;return a.createElement(na,{"aria-label":`Select row ${c}`,onChange:o,checked:r,indeterminate:s})},ma=({children:e})=>a.createElement("div",{className:"maxio-data-table__cell-flex"},e),da=({row:e,cell:t,children:l,className:n,...i})=>{var o,r,s,c,m,d;const u=null==t?void 0:t.column,x=null===(r=null===(o=null==u?void 0:u.columnDef)||void 0===o?void 0:o.meta)||void 0===r?void 0:r.align,p=null===(c=null===(s=null==u?void 0:u.columnDef)||void 0===s?void 0:s.meta)||void 0===c?void 0:c.controls,g=null===(d=null===(m=null==u?void 0:u.columnDef)||void 0===m?void 0:m.meta)||void 0===d?void 0:d.actions,b=null==u?void 0:u.getIsPinned(),h=v("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${b}`]:b,[`maxio-data-table__cell--${x}`]:x,"maxio-data-table__cell--controls":p,"maxio-data-table__cell--actions":g}),f="left"===b?{left:null==u?void 0:u.getStart("left")}:"right"===b?{right:null==u?void 0:u.getAfter("right")}:{};return a.createElement("td",{className:h,style:f,...i},l)},ua=({row:e,SubRowComponent:t,pattern:l,enableExpanding:n,onRowAction:i})=>{var o,r,s,c,m;const d=t&&e.getParentRow()&&e.getParentRow().getIsExpanded(),u=d&&e.getVisibleCells()[0].column.columnDef.id===Ye,x=d&&e.getVisibleCells()[e.getVisibleCells().length-1].column.columnDef.id===Ze,p=[x,u].filter(Boolean).length,v=e.getVisibleCells().length-p,g=null!==(r=null===(o=e.getParentRow())||void 0===o?void 0:o.index)&&void 0!==r?r:e.index,b=l&&t&&g%2==1?"maxio-data-table__row--with-pattern":void 0,h=null===(s=e.getCanExpand)||void 0===s?void 0:s.call(e),f=null===(c=null==e?void 0:e.getToggleExpandedHandler)||void 0===c?void 0:c.call(e),E=null===(m=null==e?void 0:e.getIsExpanded)||void 0===m?void 0:m.call(e),_=h&&n?0:1.75,N=e.getVisibleCells()[0].column.columnDef.id===Ye?1:0,w=e.getVisibleCells().find(({column:e})=>{var a;const{actions:t,controls:l}=null!==(a=e.columnDef.meta)&&void 0!==a?a:{};return!t&&!l}),y=i&&w?w.id:void 0;return a.createElement(a.Fragment,{key:e.id},d?a.createElement(aa,{key:`${e.id}-sub`,row:e,isChild:!0,className:b},u&&a.createElement(da,{className:"maxio-data-table__cell--pinned-left"}),a.createElement(da,{colSpan:v},t(e)),x&&a.createElement(da,{className:"maxio-data-table__cell--pinned-right"})):a.createElement(aa,{key:`${e.id}-parent`,row:e,className:b,onRowAction:i,"aria-labelledby":y},e.getVisibleCells().map(t=>{const l=n&&t.column.getIndex()===N;return a.createElement(da,{key:t.id,row:e,cell:t,id:t.id},a.createElement("div",{className:"maxio-data-table__cell-flex",style:n&&l?{paddingLeft:`${(null==e?void 0:e.depth)+_}rem`}:void 0},n&&h&&l&&a.createElement(ze,{size:"sm",variant:"ghost",icon:a.createElement(ye,{size:"xs",variant:E?"chevron-down":"chevron-right"}),onClick:f,"aria-label":E?"Collapse row":"Expand row","data-open":E,className:"maxio-data-table__expand-button"}),$(t.column.columnDef.cell,t.getContext())))})))},xa=(e=[])=>e.filter(e=>e!==Ye&&e!==Ze),pa=({pattern:e,size:t="md",SubRowComponent:n,onExpand:i,onSelect:o,onSort:r,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:m,columns:u,actions:x,actionsColumnSize:p,onRowAction:v,state:g,...b})=>{var h,f;const E=(({columns:e,HeaderControls:t,RowControls:l,RowActions:n,actions:i,actionsColumnSize:o,enableExpanding:r,enableRowSelection:s})=>d(()=>{const c={id:Ye,size:40,header:e=>a.createElement(t,{...e,enableExpanding:r,enableRowSelection:s}),cell:e=>a.createElement(l,{...e,enableExpanding:r}),meta:{controls:!0}},m=i&&n?{id:Ze,size:null!=o?o:40,header:"",cell:e=>a.createElement(n,null,i(e.row,e.table)),meta:{actions:!0}}:null;let d=[...e];return s&&(d=[c,...d]),m&&(d=[...d,m]),d},[i,o,n,r,s,e,t,l]))({columns:u,HeaderControls:sa,RowControls:ca,RowActions:ma,actions:x,actionsColumnSize:p,enableRowSelection:c,enableExpanding:Boolean(m)}),_=D({state:{...g,columnPinning:{left:[...c?[Ye]:[],...xa(null===(h=null==g?void 0:g.columnPinning)||void 0===h?void 0:h.left)],right:[...xa(null===(f=null==g?void 0:g.columnPinning)||void 0===f?void 0:f.right),...x?[Ze]:[]]}},getSubRows:e=>e.subRows,getCoreRowModel:O(),enableRowSelection:c,enableExpanding:Boolean(m),...!b.manualExpanding&&{getExpandedRowModel:z()},enableSorting:s,...!b.manualSorting&&{getSortedRowModel:T()},columns:E,...b}),N=_.getCanSomeRowsExpand(),w=_.getState();return l(()=>{null==i||i(w.expanded)},[i,w.expanded]),l(()=>{null==o||o(w.rowSelection)},[o,w.rowSelection]),l(()=>{null==r||r(w.sorting)},[r,w.sorting]),a.createElement(Xe,{pattern:e,size:t,isExpandable:N,isUsingCustomRow:!!n},a.createElement(Qe,null,_.getHeaderGroups().map(e=>a.createElement(aa,{key:e.id,table:_,isHeader:!0},e.headers.map(e=>a.createElement(ea,{key:e.id,table:_,header:e,enableExpanding:m},$(e.column.columnDef.header,e.getContext())))))),a.createElement(Je,null,_.getRowModel().rows.map(t=>a.createElement(ua,{key:t.id,row:t,pattern:e,SubRowComponent:n,enableExpanding:m,onRowAction:v}))))},va={sm:"h3",md:"h2",lg:"h1"},ga=({children:e,size:t="sm",className:l,...n})=>{const i=va[t],o=v(`maxio-heading-${t}`,l);return a.createElement(i,{className:o,...n},e)},ba=({open:e,onOpenChange:t,placement:l="right",backdrop:n="dim",size:i="md",className:o,title:r,description:s,children:c,footer:m})=>{const d=a.useId(),u={"data-placement":l,"data-size":i};return a.createElement(B,{isOpen:e,onOpenChange:t,isDismissable:!0,className:v("maxio-drawer__backdrop",{"maxio-drawer__backdrop--dim":"dim"===n})},a.createElement(A,{className:v("maxio-drawer",o),...u},a.createElement(L,{className:"maxio-drawer__dialog","aria-labelledby":d},({close:e})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-drawer__header"},a.createElement("div",{className:"maxio-drawer__title-group"},a.createElement(ga,{id:d,size:"md",className:"maxio-drawer__title"},r),s&&a.createElement("p",{className:"maxio-drawer__description"},s)),a.createElement(ze,{"aria-label":"Close",onClick:e,icon:a.createElement(ye,{variant:"cross"}),variant:"ghost",size:"sm",className:"maxio-drawer__close"})),a.createElement("div",{className:"maxio-drawer__body"},c),null!=m&&a.createElement("div",{className:"maxio-drawer__footer"},m)))))},ha={click:ce,hover:e=>se(e,{delay:100}),focus:re,dismiss:oe},fa=(e,a)=>a.map(a=>ha[a](e)),Ea=({placement:e="top",isActive:a=!1,interactions:n=["hover"],floatingElementOffset:i=0,onOverlayUpdate:o,autoHideMs:r})=>{const s=t(null),{strategy:c,x:m,y:d,context:u,floating:x,reference:p}=me({placement:e,open:a,onOpenChange:e=>o(e),middleware:[de(i)]}),{getReferenceProps:v,getFloatingProps:g}=ue([...fa(u,n),xe(u,{role:"tooltip"})]);l(()=>{s.current&&clearTimeout(s.current),a&&r&&(s.current=window.setTimeout(()=>o(!1),r))},[a,r]);return{isActive:a,refs:{floating:x,reference:p},floatingElementCSSPosition:{position:c,top:null!=d?d:0,left:null!=m?m:0},getReferenceProps:v,getFloatingProps:g}};function _a(e,a=0){const i=t((new Date).getTime()),o=t((new Date).getTime()),[r,s]=n(!1);return l(()=>{const t=()=>{i.current=(new Date).getTime(),s(!0)},l=()=>{o.current=(new Date).getTime(),window.setTimeout(()=>{i.current-o.current<=0&&s(!1)},a)},n=e&&e.current;return n&&(n.addEventListener("mouseenter",t),n.addEventListener("mouseleave",l)),()=>{n&&(n.removeEventListener("mouseenter",t),n.removeEventListener("mouseleave",l))}},[e]),r}function Na(e=500){const[a,i]=n(()=>{if("undefined"==typeof window)return{windowWitdh:0,windowHeight:0};const{innerWidth:e,innerHeight:a}=window;return{windowWitdh:e,windowHeight:a}}),o=t(null);return l(()=>{if("undefined"==typeof window)return;const a=()=>{var a;const{innerWidth:t,innerHeight:l}=window;window.clearTimeout(null!==(a=o.current)&&void 0!==a?a:void 0),o.current=window.setTimeout(()=>{i({windowWitdh:t,windowHeight:l})},e)};return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[e]),a}const wa=({children:e,usePortal:t=!1,isActive:l=!1,placement:n="top",interactions:i=["hover"],role:o="tooltip",renderOverlay:r,floatingElementOffset:s,motionSettings:c={},autoHideMs:m,onOverlayUpdate:d,className:u})=>{const{getReferenceProps:x,getFloatingProps:p,refs:{floating:g,reference:b},floatingElementCSSPosition:h}=Ea({isActive:l,onOverlayUpdate:d,autoHideMs:m,floatingElementOffset:s,interactions:i,placement:n}),f=a.createElement(ne,null,l&&a.createElement(ie.div,{ref:g,style:h,...c,...p()},r()));return a.createElement(a.Fragment,null,a.createElement("div",{ref:b,className:v("maxio-inline-flex",u),...x(),"data-testid":"overlay-trigger"},e),t?a.createElement(pe,{id:"maxio-ui-portal"},f):f)},ya=({children:e,arrowPosition:t,size:l="regular",maxWidth:n=160})=>a.createElement("div",{"data-testid":"tooltip",className:v("maxio-tooltip",`maxio-tooltip--${l}`,{[`maxio-tooltip--arrow-${t}`]:t})},a.createElement("div",{className:"maxio-tooltip__content",style:{maxWidth:n}},e)),ka={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"},Ca=({children:e,interactions:i=["hover"],placement:o="right",maxWidth:r=160,size:s="regular",renderContent:c,autoHideMs:m,isVisible:u,usePortal:p,className:v,onVisibilityUpdate:g,floatingElementOffset:b=5})=>{const[h,f]=n(!1),E=void 0!==u,_=t(null),N=x(e=>{_.current&&clearTimeout(_.current),_.current=window.setTimeout(()=>{E||f(e),g&&g(e)},50)},[E,g]),w=d(()=>(e=>{const a=e.startsWith("top")||e.startsWith("bottom")?"Y":"X",t=`translate${a}(${e.startsWith("bottom")||e.startsWith("right")?"-":""}10px)`;return{initial:{opacity:0,visibility:"hidden",transform:t},animate:{opacity:1,visibility:"visible",transform:`translate${a}(0px)`},exit:{opacity:0,visibility:"hidden",transform:t},transition:{ease:[.4,0,.5,1],duration:.2}}})(o),[o]);return l(()=>()=>{_.current&&clearTimeout(_.current)},[]),a.createElement(wa,{role:"tooltip",className:v,floatingElementOffset:b,motionSettings:w,isActive:E?u:h,onOverlayUpdate:N,autoHideMs:m,usePortal:p,placement:o,interactions:i,renderOverlay:()=>a.createElement(ya,{size:s,arrowPosition:ka[o],maxWidth:r},c())},e)},Ia=({as:e="div",children:t,compact:l=!1,size:n="md",className:i,...o})=>{const r=e,s=v({[`maxio-body-${n}`]:!l,[`maxio-body-${n}-compact`]:l},i);return a.createElement(r,{className:s,...o},t)},Sa=({className:e,...t})=>a.createElement(H,{...t,className:v("maxio-listbox",e)});Sa.displayName="ListBox";const Pa=({className:e,...t})=>{const l=t.textValue||("string"==typeof t.children?t.children:void 0);return a.createElement(V,{...t,textValue:l,className:v("maxio-listbox__item",e)},F(t.children,(e,{isSelected:t})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-listbox__content"},"string"==typeof e?a.createElement(Ia,{size:"sm"},e):e),t&&a.createElement(ye,{variant:"check"}))))};Pa.displayName="ListBox.Item";const $a=({className:e,...t})=>a.createElement(W,{...t,className:v("maxio-listbox__section",e)});$a.displayName="ListBox.Section";const Da=({className:e,...t})=>a.createElement(j,{...t,className:v("maxio-listbox__header",e)});Da.displayName="ListBox.Header";const Ta=Object.assign(Sa,{Item:Pa,Section:$a,Header:Da}),za=({className:e,hideArrow:t=!1,children:l,offset:n=4,...i})=>a.createElement(U,{...i,className:v("maxio-popover",e),offset:n},a.createElement(a.Fragment,null,!t&&a.createElement(q,{className:"maxio-popover__arrow"},a.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12","aria-hidden":!0},a.createElement("path",{d:"M0 0 L6 6 L12 0"}))),l)),Oa=({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:o,errorMessage:r,leadingElement:s=null,fullWidth:c,className:m,placeholder:d,renderEmptyState:u,selectionMode:x,children:p,...g})=>{const b=a.useRef(null),h=a.useRef(null),[f,E]=a.useState(),[_,N]=a.useState(0),w=!!r,y=t||w,k=p,C=a.useCallback(()=>{const e=b.current;if(!e)return;const a=h.current,t=a?a.getBoundingClientRect().left-e.getBoundingClientRect().left:0;N(e=>e===-t?e:-t),E(a=>{const t=`${e.offsetWidth}px`;return(null==a?void 0:a["--trigger-width"])===t?a:{"--trigger-width":t}})},[]);a.useEffect(()=>{const e=b.current;if(!e)return;if(C(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(C);return a.observe(e),()=>a.disconnect()},[C]);const I=v("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":y,"maxio-text-field--readonly":l,"maxio-text-field--full-width":c},m);return a.createElement(G,{...g,isDisabled:e,isInvalid:y,isReadOnly:l,selectionMode:x,className:I},i&&a.createElement(K,{className:"maxio-text-field__label"},i),a.createElement("div",{ref:b,className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(Y,{ref:h,className:"maxio-text-field__input",placeholder:d}),a.createElement("div",{className:"maxio-text-field__trailing-element"},a.createElement(Z,{className:v("maxio-button","maxio-button--ghost","maxio-button--icon","maxio-button--sm")},a.createElement(ye,{variant:"chevron-up-down"})))),o&&!w&&a.createElement(X,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},o),r&&a.createElement(Q,{className:"maxio-form-error"},e=>a.createElement(a.Fragment,null,a.createElement(ye,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},"function"==typeof r?r(e):r))),a.createElement(za,{hideArrow:!0,className:"maxio-combobox__popover",crossOffset:_,style:f},a.createElement(Ta,{renderEmptyState:u},k)))};Oa.displayName="ComboBox";const Ra=e=>a.createElement(Ta.Item,{...e});Ra.displayName="ComboBox.Item";const Ma=e=>a.createElement(Ta.Section,{...e});Ma.displayName="ComboBox.Section";const Ba=e=>a.createElement(Ta.Header,{...e});Ba.displayName="ComboBox.Header";const Aa=Object.assign(Oa,{Item:Ra,Section:Ma,Header:Ba}),La=r({}),Ha=({indent:e=!1,disabled:l=!1,invalid:n=!1,label:i,...o})=>{const r=t(null),s=c(La),{inputProps:m,isDisabled:d}=k({...o,value:(o.value||"").toString(),"aria-label":o["aria-label"]||i,isDisabled:l},s,r),u=v("maxio-radio",{"maxio-radio--indent":e,"maxio-radio--disabled":d||s.isDisabled,"maxio-radio--error":n||s.isInvalid});return a.createElement("label",{className:u},a.createElement("input",{ref:r,role:"radio",type:"radio",className:"maxio-radio__input",...m,name:s.name||m.name}),a.createElement("span",{className:"maxio-radio__control"}),a.createElement("span",{className:"maxio-radio__label"},i))},Va=({children:e,label:t,errorMessage:l,helperText:n,disabled:i=!1,invalid:o=!1,name:r,defaultValue:s,...c})=>{const m=ve({isDisabled:i,isInvalid:o,description:n,name:r,label:t,errorMessage:l,defaultValue:s,...c}),{radioGroupProps:d,labelProps:u,descriptionProps:x,errorMessageProps:p}=C({"aria-label":c["aria-label"]||t,...c},m);return a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-radio-group",...d},t&&a.createElement("label",{className:"maxio-radio-group__label",...u},t),a.createElement(La.Provider,{value:m},e),o&&l&&a.createElement(oa,{...p},l),n&&!o&&a.createElement(ia,{...x},n)))},Fa=u(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:o,errorMessage:r,leadingElement:s=null,trailingElement:c=null,fullWidth:m,className:d,...u},x)=>{const p=v("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":t,"maxio-text-field--readonly":l,"maxio-text-field--full-width":m},d);return a.createElement(J,{...u,isDisabled:e,isReadOnly:l,isInvalid:t,className:p},i&&a.createElement(K,{className:"maxio-text-field__label"},i),a.createElement("div",{className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(Y,{ref:x,className:"maxio-text-field__input"}),c&&a.createElement("div",{className:"maxio-text-field__trailing-element"},c)),o&&!(t&&r)&&a.createElement(X,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},o),r&&a.createElement(Q,{className:"maxio-form-error"},a.createElement(ye,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},r)))});Fa.displayName="TextField";const Wa=u(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:o,errorMessage:r,fullWidth:s,className:c,...m},d)=>{const u=v("maxio-text-area",`maxio-text-area--${n}`,{"maxio-text-area--disabled":e,"maxio-text-area--error":t,"maxio-text-area--readonly":l,"maxio-text-area--full-width":s},c);return a.createElement(J,{...m,isDisabled:e,isReadOnly:l,isInvalid:t,className:u},i&&a.createElement(K,{className:"maxio-form-label"},i),a.createElement(ee,{ref:d,className:"maxio-text-area__input"}),o&&!(t&&r)&&a.createElement(X,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},o),r&&a.createElement(Q,{className:"maxio-form-error"},a.createElement(ye,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},r)))});Wa.displayName="TextArea";const ja=u(({disabled:e=!1,invalid:n=!1,readOnly:i=!1,size:o="md",label:r,helperText:s,showErrorMessage:c=!0,errorMessage:m,leadingElement:d=null,trailingElement:u=null,fullWidth:x,className:g,...b},h)=>{var f,E;const _=t(null);p(h,()=>_.current),l(()=>{console.warn("TextInput is deprecated. Please use TextField instead.")},[]);const{spellCheck:N,...w}=b,y={...w,label:r,description:s,errorMessage:m,defaultValue:null===(f=b.defaultValue)||void 0===f?void 0:f.toString(),value:null===(E=b.value)||void 0===E?void 0:E.toString(),isDisabled:e,isReadOnly:i,isInvalid:n},{labelProps:k,inputProps:C,descriptionProps:S,errorMessageProps:P}=I(y,_),$=v("maxio-text-field",`maxio-text-field--${o}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":n,"maxio-text-field--readonly":i,"maxio-text-field--full-width":x},g),D=n&&m&&c;return a.createElement("div",{className:$},r&&a.createElement("label",{className:"maxio-text-field__label",...k},r),a.createElement("div",{className:"maxio-text-field__items"},d&&a.createElement("div",{className:"maxio-text-field__leading-element"},d),a.createElement("input",{ref:_,type:"text",className:"maxio-text-field__input",...C,spellCheck:N}),u&&a.createElement("div",{className:"maxio-text-field__trailing-element"},u)),s&&!D&&a.createElement("div",{className:"maxio-form-helper-text",...S},s),D&&a.createElement(oa,{...P},m))});ja.displayName="TextInput";const Ua=({options:e,label:t,size:l="md",inline:n=!1,disabled:i=!1,helperText:o,errorMessage:r,fullWidth:s=!1,...c})=>{const m=v("maxio-select",`maxio-select--${l}`,{"maxio-select--disabled":i,"maxio-select--inline":n,"maxio-select--error":!!r,"maxio-select--full-width":s}),d=g();return a.createElement("div",{className:m},t&&a.createElement("label",{htmlFor:d,className:"maxio-select__label"},t),a.createElement("div",{className:"maxio-select__input-container"},a.createElement("select",{id:d,className:"maxio-select__input",disabled:i,...c},e.map(e=>a.createElement("option",{key:`option-${e.value}`,value:e.value,disabled:e.disabled},e.label))),a.createElement(ye,{variant:"chevron-up-down"})),!!r&&a.createElement(oa,null,r),o&&!r&&a.createElement("div",{className:"maxio-form-helper-text"},o))},qa=({size:e="md",onChange:t,totalItems:i=0,itemsPerPage:o=30,currentPage:r=1,pageSizeOptions:s,manualPageInput:c=!1})=>{const[m,d]=n(r),[u,x]=n(o),[p,v]=n(r.toString());l(()=>{v(m.toString())},[m]);const g=Math.ceil(i/u),b=m<g,h=m>1,f=u*(m-1)+1,E=Math.min(u*m,i),_=s.map(e=>({label:e.toString(),value:e.toString()})),N=Array.from({length:g},(e,a)=>a+1).map(e=>({label:e.toString(),value:e.toString()})),w=e=>{d(e),null==t||t({currentPage:e,itemsPerPage:u})},y=e=>{const a=parseInt(e,10);if(isNaN(a))return void v(m.toString());const t=Math.max(1,Math.min(a,g));v(t.toString()),w(t)};return a.createElement("div",{className:"maxio-pagination"},a.createElement("div",{className:"maxio-pagination__items-per-page"},a.createElement("label",{htmlFor:"items-per-page-large",className:"maxio-pagination__label"},"Items per page"),a.createElement(Ua,{inline:!0,size:e,options:_,onChange:e=>{return a=Number(e.target.value),x(a),d(1),void(null==t||t({currentPage:1,itemsPerPage:a}));var a},value:u,id:"items-per-page-large"})),a.createElement("div",{className:"maxio-pagination__total-items"},a.createElement("span",null,f,"–",E," of ",i," items")),a.createElement("div",{className:"maxio-pagination__current-page"},c?a.createElement(ja,{className:"maxio-pagination__page-input",value:p,min:1,max:g,onChange:e=>(e=>{v(e)})(e),onBlur:e=>{y(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(y(e.currentTarget.value),e.currentTarget.blur())},"aria-label":"Page number",size:e,type:"number",onWheel:e=>e.preventDefault()}):a.createElement(Ua,{inline:!0,size:e,"aria-label":"Select page",onChange:e=>w(Number(e.target.value)),value:m,options:N,id:"page-index-large"}),a.createElement("div",{className:"maxio-pagination__label"},"of ",g," pages")),a.createElement("div",{className:"maxio-pagination__controls"},a.createElement(Ca,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},a.createElement(ze,{icon:a.createElement(ye,{variant:"chevron-left"}),size:e,variant:"ghost",onClick:()=>w(m-1),"aria-label":"Previous",disabled:!h})),a.createElement(Ca,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},a.createElement(ze,{icon:a.createElement(ye,{variant:"chevron-right"}),size:e,variant:"ghost",onClick:()=>w(m+1),"aria-label":"Next",disabled:!b}))))},Ga=({label:e,helperText:t,size:l="md",variant:n="default",status:i,value:o,maxValue:r=100})=>{const s=g(),c=g(),m=i&&!!e&&!!o&&!("inline"===n),d=t&&!("inline"===n),u=t&&"inline"===n,{progressBarProps:x,labelProps:p}=S({maxValue:r,value:o,label:e}),b=v("maxio-progress-bar",{"maxio-progress-bar--lg":"lg"===l,"maxio-progress-bar--success":o&&!("inline"===n)&&"success"===i,"maxio-progress-bar--error":o&&!("inline"===n)&&"error"===i,"maxio-progress-bar--indent":"indent"===n,"maxio-progress-bar--inline":"inline"===n,"maxio-progress-bar--indeterminate":void 0===o});return a.createElement("div",{className:b,...x},a.createElement("div",{id:s,className:"maxio-progress-bar__label",...p},e),u&&a.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t),a.createElement("div",{className:"maxio-progress-bar__track"},a.createElement("div",{className:"maxio-progress-bar__progress",style:{"--tw-scale-x":`${o}%`}})),m&&a.createElement("div",{className:`maxio-progress-bar__${i}-icon`}),d&&a.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t))},Ka=({className:e,size:t="md",fullWidth:l=!1,selectionMode:n="single",orientation:i="horizontal",disallowEmptySelection:o=!0,...r})=>a.createElement(ae,{...r,selectionMode:n,orientation:i,disallowEmptySelection:o,className:F(e,e=>v("maxio-segmented-control",`maxio-segmented-control--${t}`,{"maxio-segmented-control--full-width":l},e))});Ka.displayName="SegmentedControl";const Ya=({className:e,children:t,...l})=>a.createElement(te,{...l,className:F(e,e=>v("maxio-segmented-control__item",e))},F(t,e=>a.createElement(a.Fragment,null,a.createElement(le,{className:"maxio-segmented-control__selection-indicator","data-selected":!0}),e)));Ya.displayName="SegmentedControl.Item";const Za=Object.assign(Ka,{Item:Ya}),Xa=({leadingIcon:e,trailingIcon:t,type:l="menu",children:n,leadingIconClassName:i,isTooltipVisible:o=!1})=>a.createElement(a.Fragment,null,e&&a.createElement(Ca,{usePortal:!0,isVisible:o,renderContent:()=>n,floatingElementOffset:12},a.createElement("span",{className:"maxio-side-nav__icon"},a.createElement(ye,{variant:e,className:i}))),a.createElement("span",{className:`maxio-side-nav__${l}-title`,"data-testid":"maxio-sidebar-section-name"},n),t&&a.createElement("span",{className:"maxio-side-nav__menu-chevron"},a.createElement(ye,{variant:t}))),Qa=e=>"heading"!==e.type,Ja=e=>{const a=(e=>e.flat().filter(Qa).map(e=>e.items).flat().find(e=>null==e?void 0:e.isCurrent))(e);return a?e.map(e=>e.map(e=>{var t;return Qa(e)&&(null===(t=e.items)||void 0===t?void 0:t.includes(a))?{...e,isOpen:!0}:e})):e},et=r({}),at=()=>c(et),tt=({children:e,isOpen:i,onChange:o,withIcons:r=!0,sections:s,shouldToggleSidebar:c=!0,topDropdownItems:m,collapseBreakpoint:d=800})=>{const u=t(!1),[x,p]=n(()=>!c||("boolean"==typeof i?i:"undefined"==typeof window||window.innerWidth>d)),[v,g]=n(()=>Ja(s)),{windowWitdh:b}=Na(200);l(()=>{u.current&&(null==o||o(x))},[x,o]),l(()=>{u.current=!0},[]),l(()=>{!function(e){if(!c)return;e<d&&x&&h()}(b)},[b]),l(()=>{"boolean"==typeof i&&p(i)},[i]);const h=()=>{p(!1)};return a.createElement(et.Provider,{value:{sections:v,topDropdownItems:m,onSectionOpen:e=>{g(a=>a.map(a=>a.map(a=>Qa(a)?{...a,isOpen:(null==a?void 0:a.name)===e&&!a.isOpen}:a)))},isOpen:x,onOpen:()=>{p(!0)},onClose:h,withIcons:r,shouldToggleSidebar:c}},e)},lt=()=>{const{onOpen:e,topDropdownItems:l,isOpen:n}=at(),{mainItem:i,otherItems:o,actions:r}=l,s=t(null),c=_a(s),m=({id:e,title:a,icon:t,iconClass:l,url:n,...i})=>({id:e,label:a,leadingIconName:t,leadingIconClassName:l,link:{href:n,...i}}),{items:u,itemsCount:x}=d(()=>({itemsCount:o.length+r.length,items:[...o.map(m),(null==o?void 0:o.length)>0&&(null==r?void 0:r.length)>0?{type:"divider",id:"item-divider"}:null,...r.map(m)].filter(e=>null!=e)}),[r,o]);return a.createElement(a.Fragment,null,0===x?a.createElement("a",{className:"maxio-side-nav__menu-button maxio-side-nav__menu-button--large",href:i.url,onClick:e},a.createElement("span",{className:"maxio-side-nav__menu-title"},i.title)):a.createElement("details",{className:"maxio-action-menu maxio-side-nav--action-menu"},a.createElement("summary",{onClick:e,className:"maxio-side-nav__menu-button","aria-haspopup":"true",ref:s},i.url?a.createElement(a.Fragment,null,a.createElement(Xa,{type:"menu",isTooltipVisible:!n&&c,leadingIcon:i.icon,trailingIcon:"chevron-up-down",leadingIconClassName:i.iconClass},i.title)):a.createElement(Xa,{type:"menu",trailingIcon:"chevron-up-down"},i.title)),a.createElement(Ie,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:u,small:!0})))},nt=({section:e})=>{const{isOpen:l,withIcons:n}=at(),i=t(null),o=_a(i);return a.createElement("li",{className:"maxio-side-nav__item","data-key":e.key,"data-testid":"maxio-sidebar-section"},a.createElement("a",{className:"maxio-side-nav__link","aria-current":e.isCurrent?"page":void 0,role:"button",href:e.href,ref:i},a.createElement(Xa,{isTooltipVisible:o&&!l,type:"menu",leadingIcon:n?e.icon:void 0},e.name)))},it=({section:e})=>{var l,n;const{onOpen:i,onSectionOpen:o,isOpen:r,withIcons:s}=at(),c=t(null),m=_a(c);if(!Qa(e))return a.createElement("li",{className:"maxio-side-nav__item-header"},e.title);return e.Component?a.createElement(e.Component,{section:e}):e.href?a.createElement(nt,{section:e}):a.createElement("li",{className:v("maxio-side-nav__item",{"maxio-side-nav__item--icon":s}),"data-testid":"maxio-sidebar-section"},a.createElement("button",{className:"maxio-side-nav__menu-button",ref:c,"aria-expanded":e.isOpen?"true":"false",type:"button",onClick:()=>{o(e.name),i()}},a.createElement(Xa,{type:"menu",isTooltipVisible:!r&&m,leadingIcon:s?e.icon:void 0,trailingIcon:(null===(l=e.items)||void 0===l?void 0:l.length)?"chevron-down":void 0},e.name)),a.createElement("ul",{className:"maxio-side-nav__menu"},null===(n=e.items)||void 0===n?void 0:n.map(e=>a.createElement("li",{key:`section-sub-item-${e.name}`,className:"maxio-side-nav__item","data-testid":"maxio-section-item"},a.createElement("a",{className:"maxio-side-nav__link",href:e.href,"aria-current":e.isCurrent?"page":void 0},a.createElement("span",{className:"maxio-side-nav__link-title"},e.name))))))},ot=()=>{const{sections:e}=at();return a.createElement(a.Fragment,null,e.map((e,t)=>a.createElement("ul",{role:"list",className:"maxio-side-nav__items",key:`section-list-${t}`},e.map((e,l)=>a.createElement(it,{key:`section-list-item-${e.type}-${t}-${l}`,section:e})))))},rt=()=>{const{onClose:e,shouldToggleSidebar:t}=at();return a.createElement("div",{className:"maxio-side-nav__logo-container"},a.createElement("a",{className:"maxio-side-nav__brand",href:"/","aria-label":"Maxio"}),t&&a.createElement("button",{className:"maxio-side-nav__menu-toggle","aria-label":"toggle sidebar",onClick:e},a.createElement(ye,{variant:"sidebar"})))},st=()=>{const{isOpen:e}=at();return a.createElement("nav",{className:v("maxio-side-nav",{"maxio-side-nav--collapsed":!e})},a.createElement(rt,null),a.createElement(lt,null),a.createElement("div",{className:"maxio-side-nav__items-container"},a.createElement(ot,null)))},ct=({withIcons:e=!0,shouldToggleSidebar:t=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:o,onChange:r})=>a.createElement(tt,{isOpen:o,onChange:r,collapseBreakpoint:i,withIcons:e,shouldToggleSidebar:t,topDropdownItems:l,sections:n},a.createElement(st,null)),mt=r({}),dt=()=>c(mt),ut=({children:e,variant:t="line",withDivider:i=!1,defaultIndex:o=0,onChange:r,index:s})=>{const[c,m]=n(()=>void 0!==s?s:o);l(()=>{void 0===s&&m(o),"number"==typeof s&&m(s)},[o,s]);return a.createElement(mt.Provider,{value:{currentIndex:c,variant:t,withDivider:i,onChange:e=>{let a;a="function"==typeof e?e(c):e,void 0===s&&m(a),"function"==typeof r&&r(a)}}},e)},xt=({disabled:e=!1,value:n=0,isCurrent:i,...o})=>{const{onChange:r,currentIndex:s}=dt(),c=v("maxio-tabs__tab",{"maxio-tabs__tab--active":s===n,"maxio-tabs__tab--disabled":e,"maxio-tabs__tab--icon":"icon"===o.type}),m=()=>{r(n)},d={"aria-selected":i,id:`tab-${n}`,"aria-controls":`panel-${n}`,role:"tab",tabIndex:i?0:-1},u=t(null),x=t(!1);if(l(()=>{var e;i&&x.current&&(null===(e=u.current)||void 0===e||e.focus())},[i]),l(()=>{x.current=!0},[]),"icon"===o.type){const{icon:e,...t}=o;return a.createElement("div",{className:c,ref:u,onClick:m,...d,...t},a.createElement("div",{className:"maxio-tabs__tab__content"},e))}const{children:p,rightIcon:g,...b}=o;return a.createElement("div",{ref:u,className:c,onClick:m,...d,...b},a.createElement("div",{className:"maxio-tabs__tab__content"},p,g||null))},pt=({children:e,variant:t="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:o})=>a.createElement(ut,{defaultIndex:n,variant:t,withDivider:l,index:i,onChange:o},e),vt=({children:e,value:t,...l})=>{const{currentIndex:n}=dt();return a.createElement("div",{...l,...t?{id:`panel-${t}`}:{},role:"tabpanel","aria-labelledby":`tab-${t}`,hidden:n!==t},e)},gt=({children:e})=>{const{currentIndex:t}=dt();return a.createElement(a.Fragment,null,m.map(e,(e,a)=>{if(o(e)&&e.type===vt)return a===t?i(e,{value:a}):null;throw new Error("You can only pass <TabPanel /> component as children")}))},bt=(e,a,t)=>0===e?e:1===e&&a[e-1].disabled?t||e:a[e-1].disabled?bt(e-1,a,t||e):e-1,ht=({children:e,className:l,ariaLabel:n,...r})=>{const{variant:s,withDivider:c,currentIndex:d,onChange:u}=dt(),x=v("maxio-tabs",l,{"maxio-tabs--contained":"contained"===s,"maxio-tabs--divider":c}),p=t(null),g=()=>m.map(e,e=>e.props);return a.createElement("div",{className:x,role:"tablist","aria-label":n,"aria-orientation":"horizontal",ref:p,onKeyDown:e=>{var a;"ArrowRight"===e.key&&u(e=>((e,a)=>{const t=a.findIndex((a,t)=>!a.disabled&&t>e);return-1===t?e:t})(e,g())),"ArrowLeft"===e.key&&u(e=>bt(e,g())),null===(a=p.current)||void 0===a||a.focus()},...r},m.map(e,(e,a)=>{if(o(e)&&e.type===xt)return i(e,{value:a,isCurrent:d===a});throw new Error("You can only pass <Tab /> component as children")}))},ft=({children:e,size:t,sentiment:l,kind:n="primary",leadingIcon:i,trailingIcon:o})=>{const r=v("maxio-tag",`maxio-tag--${n}`,!!l&&`maxio-tag--${l}`,!!t&&`maxio-tag--${t}`);return a.createElement("div",{className:r},i&&a.createElement(ye,{variant:i,className:"maxio-tag__icon"}),a.createElement("span",{className:"maxio-tag__label"},e),o&&a.createElement(ye,{variant:o,className:"maxio-tag__icon"}))},Et=({children:e,className:t,...l})=>a.createElement("div",{className:v("maxio-card__header",t),...l},e);Et.displayName="Card.Header";const _t=({children:e,className:t,...l})=>a.createElement("div",{className:v("maxio-card__body",t),...l},e);_t.displayName="Card.Body";const Nt=({children:e,className:t,...l})=>a.createElement("div",{className:v("maxio-card__footer",t),...l},e);Nt.displayName="Card.Footer";const wt=({children:e,className:t,variant:l="primary",...n})=>a.createElement("div",{className:v("maxio-card",`maxio-card--${l}`,t),...n},e);wt.displayName="Card";const yt=Object.assign(wt,{Header:Et,Body:_t,Footer:Nt}),kt=({children:e,className:t,href:l,onClick:n,target:i,disabled:o})=>{const r=l||n;if(!r)return a.createElement("div",{className:"maxio-tile"},e);const s=v("maxio-tile",t,{"maxio-tile--clickable":r,"maxio-tile--disabled":o});return a.createElement("a",{className:s,href:l,target:i,onClick:e=>{o&&l&&e.preventDefault(),!o&&n&&n()}},e)};var Ct,It,St,Pt;function $t(){return $t=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},$t.apply(null,arguments)}const Dt=a=>e.createElement("svg",$t({xmlns:"http://www.w3.org/2000/svg","data-name":"Maxio Logo SVG",viewBox:"0 0 1036 240"},a),Ct||(Ct=e.createElement("path",{d:"M59.32 11.3 70.64 0l40.74 40.35v70.99H40.89L0 70.52l11.15-11.14 36.2 36.15h30.07l3.07-3.39-50.91-51.15 10.99-10.97 51.24 50.83 3.72-3.38V47.13zM180.68 11.3 169.36 0l-40.73 40.35v70.99h70.48L240 70.51l-11.15-11.14-36.2 36.15h-30.06l-3.07-3.39 50.91-51.15-10.99-10.97-51.24 50.83-3.72-3.38V47.12l36.2-35.83ZM59.32 228.7l11.31 11.29 40.74-40.35v-70.99H40.89L0 169.48l11.15 11.14 36.2-36.15h30.07l3.07 3.39-50.92 51.15 10.99 10.97 51.24-50.83 3.72 3.38v30.34zM180.68 228.7l-11.32 11.29-40.73-40.35v-70.99h70.48L240 169.48l-11.15 11.14-36.2-36.15h-30.06l-3.07 3.39 50.91 51.15-10.99 10.97-51.24-50.83-3.72 3.38v30.34zM1015.27 139.55c0-29.94-23.74-53.46-52.11-53.46s-52.11 23.52-52.11 53.46 23.74 53.46 52.11 53.46 52.11-23.52 52.11-53.46m20.32.95c-.5 40.27-32.73 72.76-72.43 72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71 72.44-73.71h.94c39.57.52 71.5 33.32 71.5 73.71v.95Z"})),It||(It=e.createElement("path",{fillRule:"evenodd",d:"M870.39 24h-20.33v20.33h20.33zm0 40.67h-20.33v148.59h20.33z"})),St||(St=e.createElement("path",{fillRule:"evenodd",d:"M850.05 24h20.33v20.33h-20.33zM695.01 82.85l50.83 56.28v6.53l-50.28 55.67 15.23 13.2 49.22-54.49h4.71l49.22 54.49 15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15 55.52h-3.96l-50.15-55.52L695 82.85ZM660.49 78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13 0-52.44 18.93-58.09 44.86l-.28 1.27 19.33 3.72.31-1.14c2.39-8.91 6.66-16.54 13.04-21.94 6.36-5.39 14.91-8.63 26.02-8.63s19.12 3.25 24.76 8.96c5.64 5.72 8.73 14.06 8.73 24.53v6.11L616.62 130l-3.26.68c-16.14 3.47-29.79 7.84-39.59 14.45-10.54 7.11-16.64 16.83-16.64 30.62 0 12.51 4.51 22.62 12.5 29.59 7.96 6.95 19.25 10.67 32.63 10.67 22.27 0 41.87-12.03 51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58Zm-40.09 68.13c-12.86 2.77-23.05 5.42-30.03 9.63-3.46 2.09-6.08 4.54-7.84 7.54s-2.71 6.62-2.71 11.15c0 6.38 2.1 12.12 6.32 16.27 4.22 4.14 10.7 6.82 19.7 6.82 26.85 0 47.46-20.48 47.46-51.36v-7.2l-32.9 7.14Z"})),Pt||(Pt=e.createElement("path",{d:"M434.8 188.74h4.54l61.73-164.33.15-.41h35.57v189.35H515.9V55.37h-4.33l-59.7 157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98H336V24h35.57z"}))),Tt=e=>{const{size:t="sm",className:l,variant:n="lockup",alt:i="maxio logo"}=e,o="mark"===n,r="number"==typeof t;return a.createElement(Dt,{role:"img",viewBox:o?"0 0 240 240":"0 0 1036 240","aria-label":i,height:r?t:void 0,className:v("maxio-logo",!r&&`maxio-logo--${t}`,o&&"maxio-logo--mark",l)})},zt=({state:e,...l})=>{var n,i;const o=t(null),{toastProps:r,contentProps:s,titleProps:c,closeButtonProps:m}=fe(l,e,o),{closable:d=!0,underline:u=!0,external:x=!1}=l.toast.content,p=v("maxio-toast",{[`maxio-toast--${l.toast.content.sentiment}`]:l.toast.content.sentiment}),g={default:"info-circle-fill",success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[l.toast.content.sentiment||"default"];return a.createElement("div",{className:p,"data-maxio-mode":"dark",...r,ref:o},a.createElement(ye,{variant:g,className:"maxio-toast__icon"}),a.createElement("div",{className:"maxio-toast__container",...s},a.createElement("div",{className:"maxio-toast__content",...c},l.toast.content.title&&a.createElement("span",{className:"maxio-toast__title"},l.toast.content.title),l.toast.content.message&&a.createElement("span",{className:"maxio-toast__message"},l.toast.content.message),(null===(n=l.toast.content.link)||void 0===n?void 0:n.text)&&(null===(i=l.toast.content.link)||void 0===i?void 0:i.href)&&a.createElement(Se,{href:l.toast.content.link.href,underline:u,external:x},l.toast.content.link.text))),d&&a.createElement(ze,{variant:"ghost",icon:a.createElement(ye,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss",...m}))},Ot=({state:e,...t})=>{const l=a.useRef(null),{regionProps:n}=Ee(t,e,l);return a.createElement("div",{...n,ref:l,className:t.className,style:{display:"flex",flexDirection:"column",gap:"10px"}},e.visibleToasts.map(t=>a.createElement(zt,{key:t.key,toast:t,state:e})))},Rt=({children:e,...t})=>{const{maxVisibleToasts:l=5,...n}=t,i=ge({maxVisibleToasts:l,...n});return a.useEffect(()=>{console.warn("ToastProvider is deprecated. Please use the global toast API instead.")},[]),a.createElement(a.Fragment,null,e(i),i.visibleToasts.length>0&&a.createElement(Ot,{...t,state:i}))},Mt=r(null),Bt=({children:e,toastQueue:t,...l})=>{const n=be(t),i=x(()=>{n.visibleToasts.forEach(e=>{t.close(e.key)})},[n.visibleToasts,t]),o=d(()=>({addToast:t.add.bind(t),removeToast:t.clear.bind(t),removeAllToasts:i,state:n}),[t,i,n]);return a.createElement(Mt.Provider,{value:o},e,n.visibleToasts.length>0&&a.createElement(Ot,{...l,state:n}))},At=()=>{const e=c(Mt);if(!e)throw new Error("useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.");return e};class Lt extends he{}const Ht=({defaultChecked:e,checked:t,onChange:l,disabled:n,valueDescription:i,valueDescriptionPosition:o,className:r,name:c,id:m,...d})=>{const u=s(),p="boolean"==typeof e,g=m||u,b="left"===o?"row":"row-reverse",h=i&&o,f=x(e=>{if("Enter"===e.code||"Space"===e.code){e.preventDefault();const a=e.currentTarget.checked;p&&(e.currentTarget.checked=!a),l&&l(!a,e)}},[p,l]),E=d["aria-label"]||(h?void 0:i);return a.createElement("div",{className:v("maxio-toggle",r,{"maxio-toggle--disabled":n}),style:{display:"inline-flex",flexDirection:b},"data-testid":"toggle-container"},h?a.createElement("label",{className:"maxio-toggle__label",htmlFor:g},i):null,a.createElement("div",{className:"maxio-toggle__container"},a.createElement("input",{type:"checkbox",defaultChecked:e,checked:t,onChange:e=>{l&&l(e.target.checked,e)},onKeyDown:f,disabled:n,className:"maxio-toggle__checkbox",id:g,name:c,"aria-label":E}),a.createElement("div",{className:"maxio-toggle__track",role:"switch","aria-checked":t,"aria-hidden":"true"},a.createElement("div",{className:"maxio-toggle__handle"}),a.createElement("span",{className:"maxio-toggle__icon"},a.createElement("i",{className:"maxio-toggle__icon-on"})),a.createElement("span",{className:"maxio-toggle__icon"},a.createElement("i",{className:"maxio-toggle__icon-off"})))))},Vt=({basis:e,flex:t,flexDirection:l,wrap:n,grow:i,shrink:o,gap:r,gapX:s,gapY:c,className:m,children:d,alignItems:u,justifyContent:x,...p})=>{const g=v("maxio-flex",{[`maxio-flex-${t}`]:t,[`maxio-basis-${e}`]:void 0!==e,[`maxio-flex-${l}`]:l,[`maxio-flex-${n}`]:n,"maxio-grow":i,"maxio-grow-0":!1===i,"maxio-shrink":o,"maxio-shrink-0":!1===o,[`maxio-gap-${r}`]:void 0!==r,[`maxio-gap-x-${s}`]:void 0!==s,[`maxio-gap-y-${c}`]:void 0!==c,[`maxio-items-${u}`]:u,[`maxio-justify-${x}`]:x},m);return a.createElement("div",{className:g,...p},d)},Ft=({children:e,actions:t,sideNavIsClosed:l,openSideNav:n})=>a.createElement("nav",{className:"maxio-top-bar"},l&&a.createElement(ze,{"aria-label":"Open Side Navigation",variant:"ghost",icon:a.createElement(ye,{variant:"sidebar"}),onClick:n}),a.createElement(Vt,{grow:!0,justifyContent:"end"},e),t),Wt=({as:e="div",children:t,size:l="md",className:n,...i})=>{const o=e,r=v(`maxio-display-${l}`,n);return a.createElement(o,{className:r,...i},t)},jt=({as:e="div",children:t,className:l,...n})=>{const i=e,o=v("maxio-code",l);return a.createElement(i,{className:o,...n},t)},Ut=({as:e="div",children:t,size:l="sm",className:n,...i})=>{const o=e,r=v(`maxio-label-${l}`,n);return a.createElement(o,{className:r,...i},t)},qt=({...e})=>{const l=t(null),{buttonProps:n}=h(e,l);return a.createElement("button",{...n,className:"maxio-chip__dismiss-button"},a.createElement(ye,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},Gt=({label:e,onDismiss:l,dismissLabel:n,leadingIcon:i,trailingIcon:o,title:r,...s})=>{const c=t(null),m=R(s),{buttonProps:d}=P(s,m,c),u=v("maxio-chip",{"maxio-chip--selected":null==m?void 0:m.isSelected}),x=v("maxio-chip__button",{"maxio-chip--dismissible":l});return a.createElement("div",{className:u},a.createElement("button",{className:x,ref:c,...d,title:r},i&&a.createElement(ye,{variant:i,className:"maxio-chip__icon"}),a.createElement("span",{className:"maxio-chip__label"},e),o&&!l&&a.createElement(ye,{variant:o,className:"maxio-chip__icon"})),l&&a.createElement(qt,{onPress:l,"aria-label":n}))},Kt=({children:e,templateColumns:t,templateRows:l,autoColumns:n,autoRows:i,inline:o,column:r,columnStart:s,columnEnd:c,row:m,rowStart:d,rowEnd:u,gap:x,gapX:p,gapY:g,className:b,justifyContent:h,alignItems:f,...E})=>{const _=v(b,{"maxio-grid":!o,"maxio-inline-grid":o,[`maxio-grid-cols-${t}`]:t,[`maxio-grid-rows-${l}`]:l,[`maxio-auto-cols-${n}`]:n,[`maxio-auto-rows-${i}`]:i,["maxio-col-"+("auto"===r?"auto":`span-${r}`)]:r,[`maxio-col-start-${s}`]:s,[`maxio-col-end-${c}`]:c,["maxio-row-"+("auto"===m?"auto":`span-${m}`)]:m,[`maxio-row-start-${d}`]:d,[`maxio-row-end-${u}`]:u,[`maxio-gap-${x}`]:void 0!==x,[`maxio-gap-x-${p}`]:void 0!==p,[`maxio-gap-y-${g}`]:void 0!==g,[`maxio-justify-${h}`]:h,[`maxio-items-${f}`]:f});return a.createElement("div",{className:_||void 0,...E},e)},Yt={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"},Zt=({children:e,heading:t,description:l,sentiment:n="success",leadingElement:i=null,alert:o,topAddon:r=null,footer:s})=>a.createElement("div",{className:"maxio-auth-layout"},a.createElement(Vt,{alignItems:"center",justifyContent:"between"},a.createElement(Tt,{size:"md"}),r),o&&a.createElement(Oe,{display:"block",title:o.title,sentiment:o.sentiment},o.children),a.createElement(yt,{variant:"secondary"},a.createElement(yt.Body,null,a.createElement(Vt,{flexDirection:"col",gap:6},a.createElement(Vt,{flexDirection:"col",gap:2},a.createElement(Vt,{alignItems:"center",gap:2},i,a.createElement(ga,{size:"lg",className:v("maxio-auth-layout__heading",Yt[n])},t)),l&&a.createElement(Vt,{style:{color:"var(--maxio-color-text-tertiary)"}},a.createElement(Ia,{size:"sm",className:"maxio-auth-layout__description"},l))),e)),s&&a.createElement(yt.Footer,null,s)));export{Ie as ActionList,Oe as Alert,Zt as AuthLayout,Fe as Avatar,We as Banner,Ia as Body,Ke as Breadcrumbs,je as BreadcrumbsItem,Te as Button,yt as Card,na as Checkbox,ra as CheckboxGroup,Gt as Chip,jt as Code,Aa as ComboBox,pa as DataTable,Wt as Display,ba as Drawer,Vt as Flex,oa as FormErrorMessage,ia as FormHelperText,Bt as GlobalToastProvider,Kt as Grid,ga as Heading,ye as Icon,ze as IconButton,Ut as Label,Se as Link,Ta as ListBox,Pe as LoadingSpinner,Tt as Logo,Le as Menu,Ve as MenuButton,He as MenuList,wa as OverlayTrigger,qa as Pagination,za as Popover,Ga as ProgressBar,Ha as Radio,Va as RadioGroup,Za as SegmentedControl,Ua as Select,ct as SideNav,xt as Tab,ht as TabList,vt as TabPanel,gt as TabPanels,pt as Tabs,ft as Tag,Wa as TextArea,Fa as TextField,ja as TextInput,kt as Tile,Rt as ToastProvider,Lt as ToastQueue,Ht as Toggle,ya as Tooltip,Ca as TooltipTrigger,Ft as TopBar,_a as useHover,Ea as useOverlayTrigger,At as useToast,Na as useWindowSize};
|