@maxio-com/react-ui-components 9.15.0 → 9.16.1

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.
Files changed (55) hide show
  1. package/dist/index.esm.js +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/skills/maxio-react/SKILL.md +68 -0
  5. package/dist/skills/maxio-react/agents/openai.yaml +4 -0
  6. package/dist/skills/maxio-react/references/components-action-list.md +92 -0
  7. package/dist/skills/maxio-react/references/components-action-menu.md +162 -0
  8. package/dist/skills/maxio-react/references/components-avatar.md +66 -0
  9. package/dist/skills/maxio-react/references/components-breadcrumbs.md +86 -0
  10. package/dist/skills/maxio-react/references/components-buttons-button.md +170 -0
  11. package/dist/skills/maxio-react/references/components-buttons-iconbutton.md +102 -0
  12. package/dist/skills/maxio-react/references/components-card.md +175 -0
  13. package/dist/skills/maxio-react/references/components-chip.md +151 -0
  14. package/dist/skills/maxio-react/references/components-data-table.md +344 -0
  15. package/dist/skills/maxio-react/references/components-drawer.md +293 -0
  16. package/dist/skills/maxio-react/references/components-flex.md +185 -0
  17. package/dist/skills/maxio-react/references/components-forms-checkbox.md +257 -0
  18. package/dist/skills/maxio-react/references/components-forms-combobox.md +250 -0
  19. package/dist/skills/maxio-react/references/components-forms-radio-group.md +202 -0
  20. package/dist/skills/maxio-react/references/components-forms-select.md +295 -0
  21. package/dist/skills/maxio-react/references/components-forms-textfield.md +253 -0
  22. package/dist/skills/maxio-react/references/components-grid.md +140 -0
  23. package/dist/skills/maxio-react/references/components-icon.md +169 -0
  24. package/dist/skills/maxio-react/references/components-link.md +180 -0
  25. package/dist/skills/maxio-react/references/components-listbox.md +205 -0
  26. package/dist/skills/maxio-react/references/components-loading-spinner.md +123 -0
  27. package/dist/skills/maxio-react/references/components-logo.md +91 -0
  28. package/dist/skills/maxio-react/references/components-notifications-alert.md +103 -0
  29. package/dist/skills/maxio-react/references/components-notifications-banner.md +173 -0
  30. package/dist/skills/maxio-react/references/components-notifications-toast.md +155 -0
  31. package/dist/skills/maxio-react/references/components-pagination.md +115 -0
  32. package/dist/skills/maxio-react/references/components-popover.md +176 -0
  33. package/dist/skills/maxio-react/references/components-progressbar.md +98 -0
  34. package/dist/skills/maxio-react/references/components-segmentedcontrol.md +292 -0
  35. package/dist/skills/maxio-react/references/components-tabs.md +193 -0
  36. package/dist/skills/maxio-react/references/components-tag.md +117 -0
  37. package/dist/skills/maxio-react/references/components-tile.md +114 -0
  38. package/dist/skills/maxio-react/references/components-toggle.md +218 -0
  39. package/dist/skills/maxio-react/references/components-tooltip.md +178 -0
  40. package/dist/skills/maxio-react/references/components-typography-body.md +101 -0
  41. package/dist/skills/maxio-react/references/components-typography-code.md +72 -0
  42. package/dist/skills/maxio-react/references/components-typography-display.md +91 -0
  43. package/dist/skills/maxio-react/references/components-typography-heading.md +88 -0
  44. package/dist/skills/maxio-react/references/components-typography-label.md +82 -0
  45. package/dist/skills/maxio-react/references/deprecated-textinput.md +250 -0
  46. package/dist/skills/maxio-react/references/foundations-dark-mode.md +85 -0
  47. package/dist/skills/maxio-react/references/foundations-design-tokens-about.md +108 -0
  48. package/dist/skills/maxio-react/references/foundations-design-tokens-colors-primitive-colors.md +33 -0
  49. package/dist/skills/maxio-react/references/foundations-design-tokens-colors-semantic-colors.md +11 -0
  50. package/dist/skills/maxio-react/references/foundations-start-here.md +128 -0
  51. package/dist/skills/maxio-react/references/patterns-auth-layout.md +318 -0
  52. package/dist/skills/maxio-react/references/patterns-side-nav.md +182 -0
  53. package/dist/skills/maxio-react/references/patterns-top-bar.md +214 -0
  54. package/package.json +2 -2
  55. package/typings/index.d.ts +24 -4
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react"),t=require("classnames"),a=require("react-aria"),l=require("@tanstack/react-table"),n=require("@react-stately/toggle"),i=require("@react-stately/checkbox"),o=require("framer-motion"),r=require("@floating-ui/react-dom-interactions"),s=require("react-aria-components"),c=require("@react-stately/radio"),m=require("@react-stately/toast"),d=require("@react-aria/toast");function u(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}var x=u(e);const p=["address-card","arrow-down","arrow-down-left","arrow-down-left-long","arrow-down-long","arrow-down-right","arrow-down-right-long","arrow-down-up","arrow-left","arrow-left-long","arrow-left-right","arrow-right","arrow-right-long","arrow-turn-down-right","arrow-up","arrow-up-left","arrow-up-left-long","arrow-up-long","arrow-up-right","arrow-up-right-long","bank","bar-chart","briefcase","building","business-intelligence","calendar","caret-down","caret-left","caret-right","caret-up","chat","check","check-box","check-box-checked","check-box-checked-fill","check-box-indeterminate-fill","check-circle","check-circle-fill","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle","circle-half-stroke-small","circle-small-dash","circle-small-fill","circle-small-stroke","clipboard","cog","copy-file","credit-card","cross","cross-circle","cross-circle-fill","dashboard","diamond-small-fill","document","document-blank","dollar","dot-circle-fill","dot-fill","error","error-fill","error-small-fill","graph","home","info-circle","info-circle-fill","line-vertical","list","login","logout","megaphone","menu","menu-chevron-left","menu-chevron-right","notification","notification-unread","pen","plus","plus-circle","plus-circle-fill","question-circle","question-circle-fill","recently-viewed","search","square-small-fill","trash","triangle-small-fill","user","warning-circle","warning-circle-fill"],g=["anrok","dropbox","hubspot","numeral","oracle","quotapath","sage","sphere","taxjar"],v=["avalara","pipedrive","quickbooks","salesforce","xero"],b=({variant:a,color:l,className:n,size:i})=>{const o=(e,t)=>t.includes(e),r=o(a,p)||o(a,g),s=o(a,v),c=t({"fa-kit":r,"fa-kit-duotone":s,"fa-sharp fa-regular":!r&&!s,[`fa-${a}`]:!0,[`fa-${i}`]:i,[`maxio-icon--${l}`]:l&&!o(a,g)&&!o(a,v)},n);return e.createElement("i",{className:c})},f=({item:l,isSelected:n,truncateLabel:i=!1,role:o="option",small:r=!1})=>{const s=e.useRef(null),c=e.useRef(!1),m=a.useId();if(e.useEffect(()=>{var e;n&&c.current&&(null===(e=s.current)||void 0===e||e.focus())},[n]),e.useEffect(()=>{c.current=!0},[]),"divider"===l.type)return e.createElement("div",{className:"maxio-action-list__divider",role:"separator","aria-hidden":"true"});const{leadingIconName:d,leadingIconClassName:u,trailingIconName:x,label:p,description:g,link:v}=l,f=t("maxio-action-list__label",{"maxio-truncate":i});return e.createElement("a",{"aria-labelledby":m,...v,className:t("maxio-action-list__content",v.className,{"maxio-action-list__content--size-small":r}),tabIndex:n?0:-1,ref:s,role:o},d&&e.createElement(b,{variant:d,className:t("maxio-action-list__leading-icon",u)}),e.createElement("span",{className:f,id:m},p),g&&e.createElement("span",{className:"maxio-action-list__description"},g),x&&e.createElement(b,{variant:x,className:"maxio-action-list__trailing-icon"}))},h=(e,t,a)=>0===e?e:1===e&&"divider"===t[e-1].type?a||e:"divider"===t[e-1].type?h(e-1,t,a||e):e-1,E=({items:a,isShadowed:l=!0,itemProps:n={},className:i,truncateLabels:o=!1,small:r=!1,...s})=>{const c=t("maxio-action-list",i,{"maxio-action-list--shadow":l}),[m,d]=e.useState(()=>a.findIndex(e=>"divider"!==e.type));return 0===a.length?null:e.createElement("div",{className:c,onKeyDown:e=>{if("Space"===e.code||"Enter"===e.code){const e=a[m];e&&"divider"!==e.type&&window.open(e.link.href,e.link.target||"_self")}"ArrowUp"===e.code&&(e.preventDefault(),d(e=>h(e,a))),"ArrowDown"===e.code&&(e.preventDefault(),d(e=>((e,t)=>{const a=t.findIndex((t,a)=>"divider"!==t.type&&a>e);return-1===a?e:a})(e,a)))},role:"listbox",...s},a.map((t,a)=>e.createElement(f,{item:t,truncateLabel:o,key:`listbox-${t.id}`,isSelected:a===m,small:r,...n})))},_=({className:a,children:l,disabled:n,external:i,icon:o,size:r="sm",underline:s,variant:c,...m})=>{const d=t("maxio-link",{[`maxio-link--${r}`]:r,"maxio-link--disabled":n,[`maxio-link--${c}`]:c,"maxio-link--underline":s},a),u=i?"_blank":"_self";return e.createElement("a",{className:d,target:u,...m},l,o&&e.createElement(b,{variant:o,className:"maxio-link__icon"}))},N=({size:a="md",white:l=!1,className:n})=>{const i=t("maxio-loading-spinner",n,`maxio-loading-spinner--${a}`,{"maxio-loading-spinner--white":l});return e.createElement("div",{className:i,role:"status","aria-label":"loading"})},w=({fullWidth:l=!1,leadingElement:n,trailingElement:i,icon:o,variant:r="primary",size:s,...c})=>{const m=e.useRef(null),{linkProps:d}=a.useLink({...c},m),u=t("maxio-button",c.className,{[`maxio-button--${s}`]:s,[`maxio-button--${r}`]:r,"maxio-button--full-width":l});return e.createElement("a",{...d,ref:m,className:u,href:c.href},n&&e.cloneElement(n,{...e.isValidElement(n)&&{className:"maxio-button__leading-element"}}),c.children,(i||o)&&e.cloneElement(i||o,{...e.isValidElement(i||o)&&{className:"maxio-button__trailing-element"}}))},y=({disabled:l,loading:n=!1,fullWidth:i=!1,leadingElement:o,trailingElement:r,icon:s,variant:c="primary",size:m,...d})=>{const u=e.useRef(null),{buttonProps:x}=a.useButton({...d,isDisabled:l,formAction:"string"==typeof d.formAction?d.formAction:void 0},u),p=["primary","danger"].includes(c),g=t("maxio-button",d.className,{[`maxio-button--${m}`]:m,[`maxio-button--${c}`]:c,"maxio-button--loading":n,"maxio-button--full-width":i});return e.createElement("button",{...x,className:g,ref:u},o&&e.cloneElement(o,{...e.isValidElement(o)&&{className:"maxio-button__leading-element"}}),d.children,!n&&(r||s)&&e.cloneElement(r||s,{...e.isValidElement(r||s)&&{className:"maxio-button__trailing-element"}}),n&&e.createElement(N,{className:"maxio-button__trailing-element",size:"md",white:p}))},k=t=>(e=>"href"in e)(t)?e.createElement(w,{...t}):e.createElement(y,{...t}),C=({"aria-label":a,className:l,...n})=>e.createElement(k,{"aria-label":a,className:t("maxio-button--icon",l),...n},null),I=({children:a,title:l,linkText:n,linkExternal:i,href:o,display:r="inline",sentiment:s="info",onDismiss:c,className:m})=>{if(!a&&!l)return console.warn("Alert component requires either children or title prop to be rendered"),null;const d=t("maxio-alert",{[`maxio-alert--${s}`]:"info"!==s&&s},m),u={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[s],x=t("maxio-alert__content",{"maxio-alert__content--block":"block"===r});return e.createElement("div",{className:d},e.createElement(b,{variant:u,className:"maxio-alert__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-alert__container"},e.createElement("div",{className:x},l&&e.createElement("span",{className:"maxio-alert__title"},l),a&&e.createElement("span",{className:"maxio-alert__message"},a),n&&o&&e.createElement(_,{className:"maxio-alert__link",href:o,variant:"high-contrast",underline:!0,...i?{external:!0}:{}},n))),c&&e.createElement(C,{icon:e.createElement(b,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:c,className:"maxio-alert__dismiss"}))},S=e.createContext({}),P=({children:t})=>{const[a,l]=e.useState(!1),n=e.useId(),i=e.useId();return e.createElement(S.Provider,{value:{controlsId:n,buttonId:i,isOpen:a,onClose:()=>l(!1),onOpen:()=>l(!0),onToggle:()=>l(e=>!e)}},t)};function R(){const t=e.useContext(S);if(!t||"object"==typeof t&&0===Object.keys(t).length)throw new Error("useMenu hook must be used within a MenuProvider");return t}const T=({children:t})=>{const{isOpen:a,onToggle:l,onClose:n}=R();return e.createElement("details",{open:a,onToggle:l,className:"maxio-action-menu"},"function"==typeof t?t({isOpen:a,onClose:n}):t)},$=({children:a,className:l,href:n,...i})=>{const o=n?e.createElement(_,{size:"sm",href:n},a):a;return e.createElement("li",{className:t("maxio-breadcrumbs__item",l),...i},o)},D="Breadcrumbs requires at least one BreadcrumbsItem as children",O='Last BreadcrumbsItem should not have "href" prop. It is the current page.',z="Breadcrumbs only accepts BreadcrumbsItem as children",B="row-controls",M="row-actions",L=({children:a,pattern:l,size:n,isExpandable:i,isUsingCustomRow:o})=>{const[r,s]=e.useState(!1),[c,m]=e.useState(!1),d=l&&o&&i,u=t("maxio-data-table",{"maxio-data-table--pattern":l&&!d,"maxio-data-table--expanded-child-pattern":d,"maxio-data-table--with-custom-row":o,[`maxio-data-table--${n}`]:n,"maxio-data-table--with-pinned-left-border":r,"maxio-data-table--with-pinned-right-border":c});return e.createElement("div",{className:"maxio-data-table-wrapper",onScroll:e=>{const t=e.target;s(t.scrollLeft>0),m(t.scrollWidth-t.clientWidth-t.scrollLeft>0)}},e.createElement("table",{className:u},a))},A=({children:t})=>e.createElement("thead",null,t),V=({children:t})=>e.createElement("tbody",null,t),H=({children:a,table:l,header:n,className:i,enableExpanding:o,...r})=>{var s,c,m,d,u,x,p,g,v,f,h;const E=null==n?void 0:n.column,_=null===(s=null==E?void 0:E.getCanSort)||void 0===s?void 0:s.call(E),N=null===(c=null==E?void 0:E.getToggleSortingHandler)||void 0===c?void 0:c.call(E),w=null==n?void 0:n.isPlaceholder,y=null===(d=null===(m=null==E?void 0:E.columnDef)||void 0===m?void 0:m.meta)||void 0===d?void 0:d.align,k=null===(x=null===(u=null==E?void 0:E.columnDef)||void 0===u?void 0:u.meta)||void 0===x?void 0:x.width,I=null===(g=null===(p=null==E?void 0:E.columnDef)||void 0===p?void 0:p.meta)||void 0===g?void 0:g.controls,S=null===(f=null===(v=null==E?void 0:E.columnDef)||void 0===v?void 0:v.meta)||void 0===f?void 0:f.actions,P=null==E?void 0:E.getIsPinned(),R=null==E?void 0:E.getIsSorted(),T="asc"===R,$=t("maxio-data-table__cell",i,{[`maxio-data-table__cell--pinned-${P}`]:P,"maxio-data-table__cell--sortable":_,"maxio-data-table__cell--active":R,[`maxio-data-table__cell--${y}`]:y,"maxio-data-table__cell--controls":I,"maxio-data-table__cell--actions":S}),D={...k?{width:k}:{},..."left"===P?{left:null==E?void 0:E.getStart("left")}:"right"===P?{right:null==E?void 0:E.getAfter("right")}:{}},O=((e,t)=>e&&t?"arrow-up":e&&!t?"arrow-down":"arrow-down-up")(!!R,T),z=null==l?void 0:l.getToggleAllRowsExpandedHandler(),M=null===(h=null==l?void 0:l.getIsAllRowsExpanded)||void 0===h?void 0:h.call(l),L=(null==n?void 0:n.headerGroup.headers[0].id)===B?1:0,A=o&&(null==n?void 0:n.index)===L;return w?null:e.createElement("th",{scope:"col",role:"columnheader","aria-sort":R?T?"ascending":"descending":"none",className:$,onClick:N,colSpan:null==n?void 0:n.colSpan,style:D,...r},e.createElement("div",{className:"maxio-data-table__cell-flex"},!0===o&&A&&e.createElement(C,{size:"sm",variant:"ghost",icon:e.createElement(b,{size:"xs",variant:M?"chevron-down":"chevron-right"}),onClick:z,"aria-label":M?"Collapse all rows":"Expand all rows","data-open":M,className:"maxio-data-table__expand-button"}),a,_&&e.createElement(b,{variant:O,className:"maxio-data-table__sort-icon"})))},F=({children:l,row:n,isChild:i,isHeader:o,className:r,onRowAction:s,...c})=>{var m,d,u;const x=null===(m=null==n?void 0:n.getIsSelected)||void 0===m?void 0:m.call(n),p=(null===(d=null==n?void 0:n.getCanExpand)||void 0===d?void 0:d.call(n))&&(null===(u=null==n?void 0:n.getIsExpanded)||void 0===u?void 0:u.call(n)),g=Boolean(n&&s&&!o&&!i),v=e.useRef(null),b=e=>{v.current=e.target},{pressProps:f}=a.usePress({isDisabled:!g,onPress:e=>{var t;const a=null!==(t=v.current)&&void 0!==t?t:e.target;v.current=null,n&&s&&!(e=>e instanceof Element&&Boolean(e.closest("a,button,input,select,textarea,label,.maxio-data-table__cell--controls,.maxio-data-table__cell--actions")))(a)&&s(n)}}),{focusProps:h,isFocused:E}=a.useFocusRing(),_=t({"maxio-data-table__row":!o,"maxio-data-table__header-row":o,"maxio-data-table__row--active":x||E,"maxio-data-table__row--expanded":p,"maxio-data-table__row--expanded-child":i,"maxio-data-table__row--actionable":g},r),N=g?a.mergeProps({onClickCapture:b,onKeyDownCapture:b,tabIndex:0},f,h,c):c;return e.createElement("tr",{...N,className:_,tabIndex:g?N.tabIndex:c.tabIndex},l)},W=e.createContext({}),j=e.forwardRef(({checked:a,disabled:l,invalid:n,indeterminate:i,className:o,inputProps:r,error:s,label:c},m)=>{const d=t("maxio-checkbox",{"maxio-checkbox--checked":a,"maxio-checkbox--disabled":l,"maxio-checkbox--error":n,"maxio-checkbox--indeterminate":i},o);return e.createElement("label",{className:d},e.createElement("input",{type:"checkbox",role:"checkbox",className:"maxio-checkbox__input",ref:m,...r}),e.createElement("span",{className:"maxio-checkbox__control"},s&&e.createElement("span",{className:"maxio-checkbox__control-error"})),c&&e.createElement("span",{className:"maxio-checkbox__label"},c))});j.displayName="InnerCheckbox";const q=({label:t,error:l=!1,className:i,indeterminate:o,value:r="",disabled:s,readOnly:c,defaultChecked:m,checked:d,...u})=>{const x=e.useRef(null),p=e.useContext(W),{inputProps:g,isDisabled:v,isInvalid:b,isSelected:f}=p&&Object.keys(p).length>0?a.useCheckboxGroupItem({value:r,"aria-label":null!=t?t:u["aria-label"],isDisabled:s,isInvalid:l,isIndeterminate:o,isReadOnly:c,...u},p,x):a.useCheckbox({"aria-label":null!=t?t:u["aria-label"],isDisabled:s,isInvalid:l,isIndeterminate:o,isReadOnly:c,value:r,...u},n.useToggleState({...u,isSelected:d,defaultSelected:m}),x);return e.createElement(j,{inputProps:g,checked:f,disabled:v,invalid:b,indeterminate:o,className:i,error:l,label:t,ref:x,...u})},G=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-form-helper-text",l),...n},a),U=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-form-error",l),...n},e.createElement(b,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},a)),K=({table:t})=>{var a,l,n,i;const o=null===(a=null==t?void 0:t.getToggleAllPageRowsSelectedHandler)||void 0===a?void 0:a.call(t),r=(null===(l=null==t?void 0:t.getIsAllPageRowsSelected)||void 0===l?void 0:l.call(t))||(null===(n=null==t?void 0:t.getIsAllRowsSelected)||void 0===n?void 0:n.call(t)),s=null===(i=null==t?void 0:t.getIsSomePageRowsSelected)||void 0===i?void 0:i.call(t);return e.createElement(q,{"aria-label":"Select all rows",onChange:e=>{o("boolean"==typeof e?{target:{checked:e}}:e)},checked:r,indeterminate:!r&&s})},Y=({row:t})=>{var a,l,n,i;const o=null===(a=null==t?void 0:t.getToggleSelectedHandler)||void 0===a?void 0:a.call(t),r=(null===(l=null==t?void 0:t.getIsSelected)||void 0===l?void 0:l.call(t))||(null===(n=null==t?void 0:t.getIsAllSubRowsSelected)||void 0===n?void 0:n.call(t)),s=null===(i=null==t?void 0:t.getIsSomeSelected)||void 0===i?void 0:i.call(t),c=t.id||t.index;return e.createElement(q,{"aria-label":`Select row ${c}`,onChange:o,checked:r,indeterminate:s})},Z=({children:t})=>e.createElement("div",{className:"maxio-data-table__cell-flex"},t),Q=({row:a,cell:l,children:n,className:i,...o})=>{var r,s,c,m,d,u;const x=null==l?void 0:l.column,p=null===(s=null===(r=null==x?void 0:x.columnDef)||void 0===r?void 0:r.meta)||void 0===s?void 0:s.align,g=null===(m=null===(c=null==x?void 0:x.columnDef)||void 0===c?void 0:c.meta)||void 0===m?void 0:m.controls,v=null===(u=null===(d=null==x?void 0:x.columnDef)||void 0===d?void 0:d.meta)||void 0===u?void 0:u.actions,b=null==x?void 0:x.getIsPinned(),f=t("maxio-data-table__cell",i,{[`maxio-data-table__cell--pinned-${b}`]:b,[`maxio-data-table__cell--${p}`]:p,"maxio-data-table__cell--controls":g,"maxio-data-table__cell--actions":v}),h="left"===b?{left:null==x?void 0:x.getStart("left")}:"right"===b?{right:null==x?void 0:x.getAfter("right")}:{};return e.createElement("td",{className:f,style:h,...o},n)},X=({row:t,SubRowComponent:a,pattern:n,enableExpanding:i,onRowAction:o})=>{var r,s,c,m,d;const u=a&&t.getParentRow()&&t.getParentRow().getIsExpanded(),x=u&&t.getVisibleCells()[0].column.columnDef.id===B,p=u&&t.getVisibleCells()[t.getVisibleCells().length-1].column.columnDef.id===M,g=[p,x].filter(Boolean).length,v=t.getVisibleCells().length-g,f=null!==(s=null===(r=t.getParentRow())||void 0===r?void 0:r.index)&&void 0!==s?s:t.index,h=n&&a&&f%2==1?"maxio-data-table__row--with-pattern":void 0,E=null===(c=t.getCanExpand)||void 0===c?void 0:c.call(t),_=null===(m=null==t?void 0:t.getToggleExpandedHandler)||void 0===m?void 0:m.call(t),N=null===(d=null==t?void 0:t.getIsExpanded)||void 0===d?void 0:d.call(t),w=E&&i?0:1.75,y=t.getVisibleCells()[0].column.columnDef.id===B?1:0,k=t.getVisibleCells().find(({column:e})=>{var t;const{actions:a,controls:l}=null!==(t=e.columnDef.meta)&&void 0!==t?t:{};return!a&&!l}),I=o&&k?k.id:void 0;return e.createElement(e.Fragment,{key:t.id},u?e.createElement(F,{key:`${t.id}-sub`,row:t,isChild:!0,className:h},x&&e.createElement(Q,{className:"maxio-data-table__cell--pinned-left"}),e.createElement(Q,{colSpan:v},a(t)),p&&e.createElement(Q,{className:"maxio-data-table__cell--pinned-right"})):e.createElement(F,{key:`${t.id}-parent`,row:t,className:h,onRowAction:o,"aria-labelledby":I},t.getVisibleCells().map(a=>{const n=i&&a.column.getIndex()===y;return e.createElement(Q,{key:a.id,row:t,cell:a,id:a.id},e.createElement("div",{className:"maxio-data-table__cell-flex",style:i&&n?{paddingLeft:`${(null==t?void 0:t.depth)+w}rem`}:void 0},i&&E&&n&&e.createElement(C,{size:"sm",variant:"ghost",icon:e.createElement(b,{size:"xs",variant:N?"chevron-down":"chevron-right"}),onClick:_,"aria-label":N?"Collapse row":"Expand row","data-open":N,className:"maxio-data-table__expand-button"}),l.flexRender(a.column.columnDef.cell,a.getContext())))})))},J=(e=[])=>e.filter(e=>e!==B&&e!==M),ee={click:r.useClick,hover:e=>r.useHover(e,{delay:100}),focus:r.useFocus,dismiss:r.useDismiss},te=(e,t)=>t.map(t=>ee[t](e)),ae=({placement:t="top",isActive:a=!1,interactions:l=["hover"],floatingElementOffset:n=0,onOverlayUpdate:i,autoHideMs:o})=>{const s=e.useRef(null),{strategy:c,x:m,y:d,context:u,floating:x,reference:p}=r.useFloating({placement:t,open:a,onOpenChange:e=>i(e),middleware:[r.offset(n)]}),{getReferenceProps:g,getFloatingProps:v}=r.useInteractions([...te(u,l),r.useRole(u,{role:"tooltip"})]);e.useEffect(()=>{s.current&&clearTimeout(s.current),a&&o&&(s.current=window.setTimeout(()=>i(!1),o))},[a,o]);return{isActive:a,refs:{floating:x,reference:p},floatingElementCSSPosition:{position:c,top:null!=d?d:0,left:null!=m?m:0},getReferenceProps:g,getFloatingProps:v}};function le(t,a=0){const l=e.useRef((new Date).getTime()),n=e.useRef((new Date).getTime()),[i,o]=e.useState(!1);return e.useEffect(()=>{const e=()=>{l.current=(new Date).getTime(),o(!0)},i=()=>{n.current=(new Date).getTime(),window.setTimeout(()=>{l.current-n.current<=0&&o(!1)},a)},r=t&&t.current;return r&&(r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",i)),()=>{r&&(r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",i))}},[t]),i}function ne(t=500){const[a,l]=e.useState(()=>{if("undefined"==typeof window)return{windowWitdh:0,windowHeight:0};const{innerWidth:e,innerHeight:t}=window;return{windowWitdh:e,windowHeight:t}}),n=e.useRef(null);return e.useEffect(()=>{if("undefined"==typeof window)return;const e=()=>{var e;const{innerWidth:a,innerHeight:i}=window;window.clearTimeout(null!==(e=n.current)&&void 0!==e?e:void 0),n.current=window.setTimeout(()=>{l({windowWitdh:a,windowHeight:i})},t)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[t]),a}const ie=({children:a,usePortal:l=!1,isActive:n=!1,placement:i="top",interactions:s=["hover"],role:c="tooltip",renderOverlay:m,floatingElementOffset:d,motionSettings:u={},autoHideMs:x,onOverlayUpdate:p,className:g})=>{const{getReferenceProps:v,getFloatingProps:b,refs:{floating:f,reference:h},floatingElementCSSPosition:E}=ae({isActive:n,onOverlayUpdate:p,autoHideMs:x,floatingElementOffset:d,interactions:s,placement:i}),_=e.createElement(o.AnimatePresence,null,n&&e.createElement(o.motion.div,{ref:f,style:E,...u,...b()},m()));return e.createElement(e.Fragment,null,e.createElement("div",{ref:h,className:t("maxio-inline-flex",g),...v(),"data-testid":"overlay-trigger"},a),l?e.createElement(r.FloatingPortal,{id:"maxio-ui-portal"},_):_)},oe=({children:a,arrowPosition:l,size:n="regular",maxWidth:i=160})=>e.createElement("div",{"data-testid":"tooltip",className:t("maxio-tooltip",`maxio-tooltip--${n}`,{[`maxio-tooltip--arrow-${l}`]:l})},e.createElement("div",{className:"maxio-tooltip__content",style:{maxWidth:i}},a)),re={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"},se=({children:t,interactions:a=["hover"],placement:l="right",maxWidth:n=160,size:i="regular",renderContent:o,autoHideMs:r,isVisible:s,usePortal:c,className:m,onVisibilityUpdate:d,floatingElementOffset:u=5})=>{const[x,p]=e.useState(!1),g=void 0!==s,v=e.useRef(null),b=e.useCallback(e=>{v.current&&clearTimeout(v.current),v.current=window.setTimeout(()=>{g||p(e),d&&d(e)},50)},[g,d]),f=e.useMemo(()=>(e=>{const t=e.startsWith("top")||e.startsWith("bottom")?"Y":"X",a=`translate${t}(${e.startsWith("bottom")||e.startsWith("right")?"-":""}10px)`;return{initial:{opacity:0,visibility:"hidden",transform:a},animate:{opacity:1,visibility:"visible",transform:`translate${t}(0px)`},exit:{opacity:0,visibility:"hidden",transform:a},transition:{ease:[.4,0,.5,1],duration:.2}}})(l),[l]);return e.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]),e.createElement(ie,{role:"tooltip",className:m,floatingElementOffset:u,motionSettings:f,isActive:g?s:x,onOverlayUpdate:b,autoHideMs:r,usePortal:c,placement:l,interactions:a,renderOverlay:()=>e.createElement(oe,{size:i,arrowPosition:re[l],maxWidth:n},o())},t)},ce=({as:a="div",children:l,compact:n=!1,size:i="md",className:o,...r})=>{const s=a,c=t({[`maxio-body-${i}`]:!n,[`maxio-body-${i}-compact`]:n},o);return e.createElement(s,{className:c,...r},l)},me=({className:a,...l})=>e.createElement(s.ListBox,{...l,className:t("maxio-listbox",a)});me.displayName="ListBox";const de=({className:a,...l})=>{const n=l.textValue||("string"==typeof l.children?l.children:void 0);return e.createElement(s.ListBoxItem,{...l,textValue:n,className:t("maxio-listbox__item",a)},s.composeRenderProps(l.children,(t,{isSelected:a})=>e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-listbox__content"},"string"==typeof t?e.createElement(ce,{size:"sm"},t):t),a&&e.createElement(b,{variant:"check"}))))};de.displayName="ListBox.Item";const ue=({className:a,...l})=>e.createElement(s.ListBoxSection,{...l,className:t("maxio-listbox__section",a)});ue.displayName="ListBox.Section";const xe=({className:a,...l})=>e.createElement(s.Header,{...l,className:t("maxio-listbox__header",a)});xe.displayName="ListBox.Header";const pe=Object.assign(me,{Item:de,Section:ue,Header:xe}),ge=({className:a,hideArrow:l=!1,children:n,offset:i=4,...o})=>e.createElement(s.Popover,{...o,className:t("maxio-popover",a),offset:i},e.createElement(e.Fragment,null,!l&&e.createElement(s.OverlayArrow,{className:"maxio-popover__arrow"},e.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12","aria-hidden":!0},e.createElement("path",{d:"M0 0 L6 6 L12 0"}))),n)),ve=({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:o,description:r,errorMessage:c,leadingElement:m=null,fullWidth:d,className:u,placeholder:x,renderEmptyState:p,selectionMode:g,children:v,...f})=>{const h=e.useRef(null),E=e.useRef(null),[_,N]=e.useState(),[w,y]=e.useState(0),k=!!c,C=l||k,I=v,S=e.useCallback(()=>{const e=h.current;if(!e)return;const t=E.current,a=t?t.getBoundingClientRect().left-e.getBoundingClientRect().left:0;y(e=>e===-a?e:-a),N(t=>{const a=`${e.offsetWidth}px`;return(null==t?void 0:t["--trigger-width"])===a?t:{"--trigger-width":a}})},[]);e.useEffect(()=>{const e=h.current;if(!e)return;if(S(),"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(S);return t.observe(e),()=>t.disconnect()},[S]);const P=t("maxio-text-field",`maxio-text-field--${i}`,{"maxio-text-field--disabled":a,"maxio-text-field--error":C,"maxio-text-field--readonly":n,"maxio-text-field--full-width":d},u);return e.createElement(s.ComboBox,{...f,isDisabled:a,isInvalid:C,isReadOnly:n,selectionMode:g,className:P},o&&e.createElement(s.Label,{className:"maxio-text-field__label"},o),e.createElement("div",{ref:h,className:"maxio-text-field__items"},m&&e.createElement("div",{className:"maxio-text-field__leading-element"},m),e.createElement(s.Input,{ref:E,className:"maxio-text-field__input",placeholder:x}),e.createElement("div",{className:"maxio-text-field__trailing-element"},e.createElement(s.Button,{className:t("maxio-button","maxio-button--ghost","maxio-button--icon","maxio-button--sm")},e.createElement(b,{variant:"chevron-up-down"})))),r&&!k&&e.createElement(s.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),c&&e.createElement(s.FieldError,{className:"maxio-form-error"},t=>e.createElement(e.Fragment,null,e.createElement(b,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},"function"==typeof c?c(t):c))),e.createElement(ge,{hideArrow:!0,className:"maxio-combobox__popover",crossOffset:w,style:_},e.createElement(pe,{renderEmptyState:p},I)))};ve.displayName="ComboBox";const be=t=>e.createElement(pe.Item,{...t});be.displayName="ComboBox.Item";const fe=t=>e.createElement(pe.Section,{...t});fe.displayName="ComboBox.Section";const he=t=>e.createElement(pe.Header,{...t});he.displayName="ComboBox.Header";const Ee=Object.assign(ve,{Item:be,Section:fe,Header:he}),_e=e.createContext({}),Ne=e.forwardRef(({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:o,description:r,errorMessage:c,leadingElement:m=null,trailingElement:d=null,fullWidth:u,className:x,...p},g)=>{const v=t("maxio-text-field",`maxio-text-field--${i}`,{"maxio-text-field--disabled":a,"maxio-text-field--error":l,"maxio-text-field--readonly":n,"maxio-text-field--full-width":u},x);return e.createElement(s.TextField,{...p,isDisabled:a,isReadOnly:n,isInvalid:l,className:v},o&&e.createElement(s.Label,{className:"maxio-text-field__label"},o),e.createElement("div",{className:"maxio-text-field__items"},m&&e.createElement("div",{className:"maxio-text-field__leading-element"},m),e.createElement(s.Input,{ref:g,className:"maxio-text-field__input"}),d&&e.createElement("div",{className:"maxio-text-field__trailing-element"},d)),r&&!(l&&c)&&e.createElement(s.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),c&&e.createElement(s.FieldError,{className:"maxio-form-error"},e.createElement(b,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},c)))});Ne.displayName="TextField";const we=e.forwardRef(({disabled:l=!1,invalid:n=!1,readOnly:i=!1,size:o="md",label:r,helperText:s,showErrorMessage:c=!0,errorMessage:m,leadingElement:d=null,trailingElement:u=null,fullWidth:x,className:p,...g},v)=>{var b,f;const h=e.useRef(null);e.useImperativeHandle(v,()=>h.current),e.useEffect(()=>{console.warn("TextInput is deprecated. Please use TextField instead.")},[]);const{spellCheck:E,..._}=g,N={..._,label:r,description:s,errorMessage:m,defaultValue:null===(b=g.defaultValue)||void 0===b?void 0:b.toString(),value:null===(f=g.value)||void 0===f?void 0:f.toString(),isDisabled:l,isReadOnly:i,isInvalid:n},{labelProps:w,inputProps:y,descriptionProps:k,errorMessageProps:C}=a.useTextField(N,h),I=t("maxio-text-field",`maxio-text-field--${o}`,{"maxio-text-field--disabled":l,"maxio-text-field--error":n,"maxio-text-field--readonly":i,"maxio-text-field--full-width":x},p),S=n&&m&&c;return e.createElement("div",{className:I},r&&e.createElement("label",{className:"maxio-text-field__label",...w},r),e.createElement("div",{className:"maxio-text-field__items"},d&&e.createElement("div",{className:"maxio-text-field__leading-element"},d),e.createElement("input",{ref:h,type:"text",className:"maxio-text-field__input",...y,spellCheck:E}),u&&e.createElement("div",{className:"maxio-text-field__trailing-element"},u)),s&&!S&&e.createElement("div",{className:"maxio-form-helper-text",...k},s),S&&e.createElement(U,{...C},m))});we.displayName="TextInput";const ye=({options:l,label:n,size:i="md",inline:o=!1,disabled:r=!1,helperText:s,errorMessage:c,fullWidth:m=!1,...d})=>{const u=t("maxio-select",`maxio-select--${i}`,{"maxio-select--disabled":r,"maxio-select--inline":o,"maxio-select--error":!!c,"maxio-select--full-width":m}),x=a.useId();return e.createElement("div",{className:u},n&&e.createElement("label",{htmlFor:x,className:"maxio-select__label"},n),e.createElement("div",{className:"maxio-select__input-container"},e.createElement("select",{id:x,className:"maxio-select__input",disabled:r,...d},l.map(t=>e.createElement("option",{key:`option-${t.value}`,value:t.value,disabled:t.disabled},t.label))),e.createElement(b,{variant:"chevron-up-down"})),!!c&&e.createElement(U,null,c),s&&!c&&e.createElement("div",{className:"maxio-form-helper-text"},s))},ke=({className:a,size:l="md",fullWidth:n=!1,selectionMode:i="single",orientation:o="horizontal",disallowEmptySelection:r=!0,...c})=>e.createElement(s.ToggleButtonGroup,{...c,selectionMode:i,orientation:o,disallowEmptySelection:r,className:s.composeRenderProps(a,e=>t("maxio-segmented-control",`maxio-segmented-control--${l}`,{"maxio-segmented-control--full-width":n},e))});ke.displayName="SegmentedControl";const Ce=({className:a,children:l,...n})=>e.createElement(s.ToggleButton,{...n,className:s.composeRenderProps(a,e=>t("maxio-segmented-control__item",e))},s.composeRenderProps(l,t=>e.createElement(e.Fragment,null,e.createElement(s.SelectionIndicator,{className:"maxio-segmented-control__selection-indicator","data-selected":!0}),t)));Ce.displayName="SegmentedControl.Item";const Ie=Object.assign(ke,{Item:Ce}),Se=({leadingIcon:t,trailingIcon:a,type:l="menu",children:n,leadingIconClassName:i,isTooltipVisible:o=!1})=>e.createElement(e.Fragment,null,t&&e.createElement(se,{usePortal:!0,isVisible:o,renderContent:()=>n,floatingElementOffset:12},e.createElement("span",{className:"maxio-side-nav__icon"},e.createElement(b,{variant:t,className:i}))),e.createElement("span",{className:`maxio-side-nav__${l}-title`,"data-testid":"maxio-sidebar-section-name"},n),a&&e.createElement("span",{className:"maxio-side-nav__menu-chevron"},e.createElement(b,{variant:a}))),Pe=e=>"heading"!==e.type,Re=e=>{const t=(e=>e.flat().filter(Pe).map(e=>e.items).flat().find(e=>null==e?void 0:e.isCurrent))(e);return t?e.map(e=>e.map(e=>{var a;return Pe(e)&&(null===(a=e.items)||void 0===a?void 0:a.includes(t))?{...e,isOpen:!0}:e})):e},Te=e.createContext({}),$e=()=>e.useContext(Te),De=({children:t,isOpen:a,onChange:l,withIcons:n=!0,sections:i,shouldToggleSidebar:o=!0,topDropdownItems:r,collapseBreakpoint:s=800})=>{const c=e.useRef(!1),[m,d]=e.useState(()=>!o||("boolean"==typeof a?a:"undefined"==typeof window||window.innerWidth>s)),[u,x]=e.useState(()=>Re(i)),{windowWitdh:p}=ne(200);e.useEffect(()=>{c.current&&(null==l||l(m))},[m,l]),e.useEffect(()=>{c.current=!0},[]),e.useEffect(()=>{!function(e){if(!o)return;e<s&&m&&g()}(p)},[p]),e.useEffect(()=>{"boolean"==typeof a&&d(a)},[a]);const g=()=>{d(!1)};return e.createElement(Te.Provider,{value:{sections:u,topDropdownItems:r,onSectionOpen:e=>{x(t=>t.map(t=>t.map(t=>Pe(t)?{...t,isOpen:(null==t?void 0:t.name)===e&&!t.isOpen}:t)))},isOpen:m,onOpen:()=>{d(!0)},onClose:g,withIcons:n,shouldToggleSidebar:o}},t)},Oe=()=>{const{onOpen:t,topDropdownItems:a,isOpen:l}=$e(),{mainItem:n,otherItems:i,actions:o}=a,r=e.useRef(null),s=le(r),c=({id:e,title:t,icon:a,iconClass:l,url:n,...i})=>({id:e,label:t,leadingIconName:a,leadingIconClassName:l,link:{href:n,...i}}),{items:m,itemsCount:d}=e.useMemo(()=>({itemsCount:i.length+o.length,items:[...i.map(c),(null==i?void 0:i.length)>0&&(null==o?void 0:o.length)>0?{type:"divider",id:"item-divider"}:null,...o.map(c)].filter(e=>null!=e)}),[o,i]);return e.createElement(e.Fragment,null,0===d?e.createElement("a",{className:"maxio-side-nav__menu-button maxio-side-nav__menu-button--large",href:n.url,onClick:t},e.createElement("span",{className:"maxio-side-nav__menu-title"},n.title)):e.createElement("details",{className:"maxio-action-menu maxio-side-nav--action-menu"},e.createElement("summary",{onClick:t,className:"maxio-side-nav__menu-button","aria-haspopup":"true",ref:r},n.url?e.createElement(e.Fragment,null,e.createElement(Se,{type:"menu",isTooltipVisible:!l&&s,leadingIcon:n.icon,trailingIcon:"chevron-up-down",leadingIconClassName:n.iconClass},n.title)):e.createElement(Se,{type:"menu",trailingIcon:"chevron-up-down"},n.title)),e.createElement(E,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:m,small:!0})))},ze=({section:t})=>{const{isOpen:a,withIcons:l}=$e(),n=e.useRef(null),i=le(n);return e.createElement("li",{className:"maxio-side-nav__item","data-key":t.key,"data-testid":"maxio-sidebar-section"},e.createElement("a",{className:"maxio-side-nav__link","aria-current":t.isCurrent?"page":void 0,role:"button",href:t.href,ref:n},e.createElement(Se,{isTooltipVisible:i&&!a,type:"menu",leadingIcon:l?t.icon:void 0},t.name)))},Be=({section:a})=>{var l,n;const{onOpen:i,onSectionOpen:o,isOpen:r,withIcons:s}=$e(),c=e.useRef(null),m=le(c);if(!Pe(a))return e.createElement("li",{className:"maxio-side-nav__item-header"},a.title);return a.Component?e.createElement(a.Component,{section:a}):a.href?e.createElement(ze,{section:a}):e.createElement("li",{className:t("maxio-side-nav__item",{"maxio-side-nav__item--icon":s}),"data-testid":"maxio-sidebar-section"},e.createElement("button",{className:"maxio-side-nav__menu-button",ref:c,"aria-expanded":a.isOpen?"true":"false",type:"button",onClick:()=>{o(a.name),i()}},e.createElement(Se,{type:"menu",isTooltipVisible:!r&&m,leadingIcon:s?a.icon:void 0,trailingIcon:(null===(l=a.items)||void 0===l?void 0:l.length)?"chevron-down":void 0},a.name)),e.createElement("ul",{className:"maxio-side-nav__menu"},null===(n=a.items)||void 0===n?void 0:n.map(t=>e.createElement("li",{key:`section-sub-item-${t.name}`,className:"maxio-side-nav__item","data-testid":"maxio-section-item"},e.createElement("a",{className:"maxio-side-nav__link",href:t.href,"aria-current":t.isCurrent?"page":void 0},e.createElement("span",{className:"maxio-side-nav__link-title"},t.name))))))},Me=()=>{const{sections:t}=$e();return e.createElement(e.Fragment,null,t.map((t,a)=>e.createElement("ul",{role:"list",className:"maxio-side-nav__items",key:`section-list-${a}`},t.map((t,l)=>e.createElement(Be,{key:`section-list-item-${t.type}-${a}-${l}`,section:t})))))},Le=()=>{const{onClose:t,shouldToggleSidebar:a}=$e();return e.createElement("div",{className:"maxio-side-nav__logo-container"},e.createElement("a",{className:"maxio-side-nav__brand",href:"/","aria-label":"Maxio"}),a&&e.createElement("button",{className:"maxio-side-nav__menu-toggle","aria-label":"toggle sidebar",onClick:t},e.createElement(b,{variant:"sidebar"})))},Ae=()=>{const{isOpen:a}=$e();return e.createElement("nav",{className:t("maxio-side-nav",{"maxio-side-nav--collapsed":!a})},e.createElement(Le,null),e.createElement(Oe,null),e.createElement("div",{className:"maxio-side-nav__items-container"},e.createElement(Me,null)))},Ve=e.createContext({}),He=()=>e.useContext(Ve),Fe=({children:t,variant:a="line",withDivider:l=!1,defaultIndex:n=0,onChange:i,index:o})=>{const[r,s]=e.useState(()=>void 0!==o?o:n);e.useEffect(()=>{void 0===o&&s(n),"number"==typeof o&&s(o)},[n,o]);return e.createElement(Ve.Provider,{value:{currentIndex:r,variant:a,withDivider:l,onChange:e=>{let t;t="function"==typeof e?e(r):e,void 0===o&&s(t),"function"==typeof i&&i(t)}}},t)},We=({disabled:a=!1,value:l=0,isCurrent:n,...i})=>{const{onChange:o,currentIndex:r}=He(),s=t("maxio-tabs__tab",{"maxio-tabs__tab--active":r===l,"maxio-tabs__tab--disabled":a,"maxio-tabs__tab--icon":"icon"===i.type}),c=()=>{o(l)},m={"aria-selected":n,id:`tab-${l}`,"aria-controls":`panel-${l}`,role:"tab",tabIndex:n?0:-1},d=e.useRef(null),u=e.useRef(!1);if(e.useEffect(()=>{var e;n&&u.current&&(null===(e=d.current)||void 0===e||e.focus())},[n]),e.useEffect(()=>{u.current=!0},[]),"icon"===i.type){const{icon:t,...a}=i;return e.createElement("div",{className:s,ref:d,onClick:c,...m,...a},e.createElement("div",{className:"maxio-tabs__tab__content"},t))}const{children:x,rightIcon:p,...g}=i;return e.createElement("div",{ref:d,className:s,onClick:c,...m,...g},e.createElement("div",{className:"maxio-tabs__tab__content"},x,p||null))},je=({children:t,value:a,...l})=>{const{currentIndex:n}=He();return e.createElement("div",{...l,...a?{id:`panel-${a}`}:{},role:"tabpanel","aria-labelledby":`tab-${a}`,hidden:n!==a},t)},qe=(e,t,a)=>0===e?e:1===e&&t[e-1].disabled?a||e:t[e-1].disabled?qe(e-1,t,a||e):e-1,Ge=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__header",l),...n},a);Ge.displayName="Card.Header";const Ue=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__body",l),...n},a);Ue.displayName="Card.Body";const Ke=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__footer",l),...n},a);Ke.displayName="Card.Footer";const Ye=({children:a,className:l,variant:n="primary",...i})=>e.createElement("div",{className:t("maxio-card",`maxio-card--${n}`,l),...i},a);Ye.displayName="Card";const Ze=Object.assign(Ye,{Header:Ge,Body:Ue,Footer:Ke});var Qe,Xe,Je,et;function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},tt.apply(null,arguments)}const at=e=>x.createElement("svg",tt({xmlns:"http://www.w3.org/2000/svg","data-name":"Maxio Logo SVG",viewBox:"0 0 1036 240"},e),Qe||(Qe=x.createElement("path",{d:"M59.32 11.3 70.64 0l40.74 40.35v70.99H40.89L0 70.52l11.15-11.14 36.2 36.15h30.07l3.07-3.39-50.91-51.15 10.99-10.97 51.24 50.83 3.72-3.38V47.13zM180.68 11.3 169.36 0l-40.73 40.35v70.99h70.48L240 70.51l-11.15-11.14-36.2 36.15h-30.06l-3.07-3.39 50.91-51.15-10.99-10.97-51.24 50.83-3.72-3.38V47.12l36.2-35.83ZM59.32 228.7l11.31 11.29 40.74-40.35v-70.99H40.89L0 169.48l11.15 11.14 36.2-36.15h30.07l3.07 3.39-50.92 51.15 10.99 10.97 51.24-50.83 3.72 3.38v30.34zM180.68 228.7l-11.32 11.29-40.73-40.35v-70.99h70.48L240 169.48l-11.15 11.14-36.2-36.15h-30.06l-3.07 3.39 50.91 51.15-10.99 10.97-51.24-50.83-3.72 3.38v30.34zM1015.27 139.55c0-29.94-23.74-53.46-52.11-53.46s-52.11 23.52-52.11 53.46 23.74 53.46 52.11 53.46 52.11-23.52 52.11-53.46m20.32.95c-.5 40.27-32.73 72.76-72.43 72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71 72.44-73.71h.94c39.57.52 71.5 33.32 71.5 73.71v.95Z"})),Xe||(Xe=x.createElement("path",{fillRule:"evenodd",d:"M870.39 24h-20.33v20.33h20.33zm0 40.67h-20.33v148.59h20.33z"})),Je||(Je=x.createElement("path",{fillRule:"evenodd",d:"M850.05 24h20.33v20.33h-20.33zM695.01 82.85l50.83 56.28v6.53l-50.28 55.67 15.23 13.2 49.22-54.49h4.71l49.22 54.49 15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15 55.52h-3.96l-50.15-55.52L695 82.85ZM660.49 78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13 0-52.44 18.93-58.09 44.86l-.28 1.27 19.33 3.72.31-1.14c2.39-8.91 6.66-16.54 13.04-21.94 6.36-5.39 14.91-8.63 26.02-8.63s19.12 3.25 24.76 8.96c5.64 5.72 8.73 14.06 8.73 24.53v6.11L616.62 130l-3.26.68c-16.14 3.47-29.79 7.84-39.59 14.45-10.54 7.11-16.64 16.83-16.64 30.62 0 12.51 4.51 22.62 12.5 29.59 7.96 6.95 19.25 10.67 32.63 10.67 22.27 0 41.87-12.03 51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58Zm-40.09 68.13c-12.86 2.77-23.05 5.42-30.03 9.63-3.46 2.09-6.08 4.54-7.84 7.54s-2.71 6.62-2.71 11.15c0 6.38 2.1 12.12 6.32 16.27 4.22 4.14 10.7 6.82 19.7 6.82 26.85 0 47.46-20.48 47.46-51.36v-7.2l-32.9 7.14Z"})),et||(et=x.createElement("path",{d:"M434.8 188.74h4.54l61.73-164.33.15-.41h35.57v189.35H515.9V55.37h-4.33l-59.7 157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98H336V24h35.57z"}))),lt=a=>{const{size:l="sm",className:n,variant:i="lockup",alt:o="maxio logo"}=a,r="mark"===i,s="number"==typeof l;return e.createElement(at,{role:"img",viewBox:r?"0 0 240 240":"0 0 1036 240","aria-label":o,height:s?l:void 0,className:t("maxio-logo",!s&&`maxio-logo--${l}`,r&&"maxio-logo--mark",n)})},nt=({state:a,...l})=>{var n,i;const o=e.useRef(null),{toastProps:r,contentProps:s,titleProps:c,closeButtonProps:m}=d.useToast(l,a,o),{closable:u=!0,underline:x=!0,external:p=!1}=l.toast.content,g=t("maxio-toast",{[`maxio-toast--${l.toast.content.sentiment}`]:l.toast.content.sentiment}),v={default:"info-circle-fill",success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[l.toast.content.sentiment||"default"];return e.createElement("div",{className:g,"data-maxio-mode":"dark",...r,ref:o},e.createElement(b,{variant:v,className:"maxio-toast__icon"}),e.createElement("div",{className:"maxio-toast__container",...s},e.createElement("div",{className:"maxio-toast__content",...c},l.toast.content.title&&e.createElement("span",{className:"maxio-toast__title"},l.toast.content.title),l.toast.content.message&&e.createElement("span",{className:"maxio-toast__message"},l.toast.content.message),(null===(n=l.toast.content.link)||void 0===n?void 0:n.text)&&(null===(i=l.toast.content.link)||void 0===i?void 0:i.href)&&e.createElement(_,{href:l.toast.content.link.href,underline:x,external:p},l.toast.content.link.text))),u&&e.createElement(C,{variant:"ghost",icon:e.createElement(b,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss",...m}))},it=({state:t,...a})=>{const l=e.useRef(null),{regionProps:n}=d.useToastRegion(a,t,l);return e.createElement("div",{...n,ref:l,className:a.className,style:{display:"flex",flexDirection:"column",gap:"10px"}},t.visibleToasts.map(a=>e.createElement(nt,{key:a.key,toast:a,state:t})))},ot=e.createContext(null);class rt extends m.ToastQueue{}const st=({basis:a,flex:l,flexDirection:n,wrap:i,grow:o,shrink:r,gap:s,gapX:c,gapY:m,className:d,children:u,alignItems:x,justifyContent:p,...g})=>{const v=t("maxio-flex",{[`maxio-flex-${l}`]:l,[`maxio-basis-${a}`]:void 0!==a,[`maxio-flex-${n}`]:n,[`maxio-flex-${i}`]:i,"maxio-grow":o,"maxio-grow-0":!1===o,"maxio-shrink":r,"maxio-shrink-0":!1===r,[`maxio-gap-${s}`]:void 0!==s,[`maxio-gap-x-${c}`]:void 0!==c,[`maxio-gap-y-${m}`]:void 0!==m,[`maxio-items-${x}`]:x,[`maxio-justify-${p}`]:p},d);return e.createElement("div",{className:v,...g},u)},ct={sm:"h3",md:"h2",lg:"h1"},mt=({children:a,size:l="sm",className:n,...i})=>{const o=ct[l],r=t(`maxio-heading-${l}`,n);return e.createElement(o,{className:r,...i},a)},dt=({...t})=>{const l=e.useRef(null),{buttonProps:n}=a.useButton(t,l);return e.createElement("button",{...n,className:"maxio-chip__dismiss-button"},e.createElement(b,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},ut={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"};Object.defineProperty(exports,"createColumnHelper",{enumerable:!0,get:function(){return l.createColumnHelper}}),Object.defineProperty(exports,"DialogTrigger",{enumerable:!0,get:function(){return s.DialogTrigger}}),Object.defineProperty(exports,"Pressable",{enumerable:!0,get:function(){return s.Pressable}}),exports.ActionList=E,exports.Alert=I,exports.AuthLayout=({children:a,heading:l,description:n,sentiment:i="success",leadingElement:o=null,alert:r,topAddon:s=null,footer:c})=>e.createElement("div",{className:"maxio-auth-layout"},e.createElement(st,{alignItems:"center",justifyContent:"between"},e.createElement(lt,{size:"md"}),s),r&&e.createElement(I,{display:"block",title:r.title,sentiment:r.sentiment},r.children),e.createElement(Ze,{variant:"secondary"},e.createElement(Ze.Body,null,e.createElement(st,{flexDirection:"col",gap:6},e.createElement(st,{flexDirection:"col",gap:2},e.createElement(st,{alignItems:"center",gap:2},o,e.createElement(mt,{size:"lg",className:t("maxio-auth-layout__heading",ut[i])},l)),n&&e.createElement(st,{style:{color:"var(--maxio-color-text-tertiary)"}},e.createElement(ce,{size:"sm",className:"maxio-auth-layout__description"},n))),a)),c&&e.createElement(Ze.Footer,null,c))),exports.Avatar=({className:a,src:l,alt:n="avatar"})=>e.createElement("img",{className:t("maxio-avatar",a),alt:n,src:l}),exports.Banner=({children:a,title:l,linkText:n,linkExternal:i,href:o,display:r="inline",sentiment:s="info",onDismiss:c,className:m})=>{if(!a&&!l)return console.warn("Banner component requires either children or title prop to be rendered"),null;const d=t("maxio-banner",{[`maxio-banner--${s}`]:"info"!==s&&s,className:m}),u={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[s],x=t("maxio-banner__content",{"maxio-banner__content--block":"block"===r});return e.createElement("div",{className:d,"aria-live":"assertive"},e.createElement(b,{variant:u,className:"maxio-banner__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-banner__container"},e.createElement("div",{className:x},l&&e.createElement("span",{className:"maxio-banner__title"},l),a&&e.createElement("span",{className:"maxio-banner__message"},a),n&&o&&e.createElement(_,{href:o,..."warning"!==s&&{variant:"inverse"},underline:!0,...i?{external:!0}:{}},n))),c&&e.createElement(C,{icon:e.createElement(b,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:c,className:"maxio-banner__dismiss"}))},exports.Body=ce,exports.Breadcrumbs=({className:a,children:l,...n})=>{const i=e.Children.count(l);if(0===i)throw new Error(D);const o=e.Children.map(l,(t,a)=>{if(e.isValidElement(t)&&t.type===$){if(a===i-1&&t.props.href)throw new Error(O);return e.cloneElement(t,{"aria-current":a===i-1?"page":void 0})}throw new Error(z)});return e.createElement("nav",{"aria-label":"Breadcrumb",...n},e.createElement("ol",{className:t("maxio-breadcrumbs",a)},o))},exports.BreadcrumbsItem=$,exports.Button=k,exports.Card=Ze,exports.Checkbox=q,exports.CheckboxGroup=({helperText:l,className:n,errorMessage:o,children:r,disabled:s,label:c,defaultValue:m,name:d,...u})=>{var x;const p=i.useCheckboxGroupState({defaultValue:m,name:d,errorMessage:o,description:l,label:c,isDisabled:s,isInvalid:!!o,...u}),{groupProps:g,labelProps:v,descriptionProps:b,errorMessageProps:f,isInvalid:h}=a.useCheckboxGroup({"aria-label":null===(x=null!=c?c:u["aria-label"])||void 0===x?void 0:x.toString(),isDisabled:s,isInvalid:!!o,...u},p),E=t("maxio-checkbox-group",{"maxio-checkbox-group--disabled":s},n),_=l&&!o;return e.createElement("div",{className:E,...g},c&&e.createElement("label",{className:"maxio-checkbox-group__label",...v},c),e.createElement(W.Provider,{value:p},r),_&&e.createElement(G,{...b},l),o&&h&&e.createElement(U,{...f},o))},exports.Chip=({label:l,onDismiss:i,dismissLabel:o,leadingIcon:r,trailingIcon:s,title:c,...m})=>{const d=e.useRef(null),u=n.useToggleState(m),{buttonProps:x}=a.useToggleButton(m,u,d),p=t("maxio-chip",{"maxio-chip--selected":null==u?void 0:u.isSelected}),g=t("maxio-chip__button",{"maxio-chip--dismissible":i});return e.createElement("div",{className:p},e.createElement("button",{className:g,ref:d,...x,title:c},r&&e.createElement(b,{variant:r,className:"maxio-chip__icon"}),e.createElement("span",{className:"maxio-chip__label"},l),s&&!i&&e.createElement(b,{variant:s,className:"maxio-chip__icon"})),i&&e.createElement(dt,{onPress:i,"aria-label":o}))},exports.Code=({as:a="div",children:l,className:n,...i})=>{const o=a,r=t("maxio-code",n);return e.createElement(o,{className:r,...i},l)},exports.ComboBox=Ee,exports.DataTable=({pattern:t,size:a="md",SubRowComponent:n,onExpand:i,onSelect:o,onSort:r,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:m,columns:d,actions:u,actionsColumnSize:x,onRowAction:p,state:g,...v})=>{var b,f;const h=(({columns:t,HeaderControls:a,RowControls:l,RowActions:n,actions:i,actionsColumnSize:o,enableExpanding:r,enableRowSelection:s})=>e.useMemo(()=>{const c={id:B,size:40,header:t=>e.createElement(a,{...t,enableExpanding:r,enableRowSelection:s}),cell:t=>e.createElement(l,{...t,enableExpanding:r}),meta:{controls:!0}},m=i&&n?{id:M,size:null!=o?o:40,header:"",cell:t=>e.createElement(n,null,i(t.row,t.table)),meta:{actions:!0}}:null;let d=[...t];return s&&(d=[c,...d]),m&&(d=[...d,m]),d},[i,o,n,r,s,t,a,l]))({columns:d,HeaderControls:K,RowControls:Y,RowActions:Z,actions:u,actionsColumnSize:x,enableRowSelection:c,enableExpanding:Boolean(m)}),E=l.useReactTable({state:{...g,columnPinning:{left:[...c?[B]:[],...J(null===(b=null==g?void 0:g.columnPinning)||void 0===b?void 0:b.left)],right:[...J(null===(f=null==g?void 0:g.columnPinning)||void 0===f?void 0:f.right),...u?[M]:[]]}},getSubRows:e=>e.subRows,getCoreRowModel:l.getCoreRowModel(),enableRowSelection:c,enableExpanding:Boolean(m),...!v.manualExpanding&&{getExpandedRowModel:l.getExpandedRowModel()},enableSorting:s,...!v.manualSorting&&{getSortedRowModel:l.getSortedRowModel()},columns:h,...v}),_=E.getCanSomeRowsExpand(),N=E.getState();return e.useEffect(()=>{null==i||i(N.expanded)},[i,N.expanded]),e.useEffect(()=>{null==o||o(N.rowSelection)},[o,N.rowSelection]),e.useEffect(()=>{null==r||r(N.sorting)},[r,N.sorting]),e.createElement(L,{pattern:t,size:a,isExpandable:_,isUsingCustomRow:!!n},e.createElement(A,null,E.getHeaderGroups().map(t=>e.createElement(F,{key:t.id,table:E,isHeader:!0},t.headers.map(t=>e.createElement(H,{key:t.id,table:E,header:t,enableExpanding:m},l.flexRender(t.column.columnDef.header,t.getContext())))))),e.createElement(V,null,E.getRowModel().rows.map(a=>e.createElement(X,{key:a.id,row:a,pattern:t,SubRowComponent:n,enableExpanding:m,onRowAction:p}))))},exports.Display=({as:a="div",children:l,size:n="md",className:i,...o})=>{const r=a,s=t(`maxio-display-${n}`,i);return e.createElement(r,{className:s,...o},l)},exports.Flex=st,exports.FormErrorMessage=U,exports.FormHelperText=G,exports.GlobalToastProvider=({children:t,toastQueue:a,...l})=>{const n=m.useToastQueue(a),i=e.useCallback(()=>{n.visibleToasts.forEach(e=>{a.close(e.key)})},[n.visibleToasts,a]),o=e.useMemo(()=>({addToast:a.add.bind(a),removeToast:a.clear.bind(a),removeAllToasts:i,state:n}),[a,i,n]);return e.createElement(ot.Provider,{value:o},t,n.visibleToasts.length>0&&e.createElement(it,{...l,state:n}))},exports.Grid=({children:a,templateColumns:l,templateRows:n,autoColumns:i,autoRows:o,inline:r,column:s,columnStart:c,columnEnd:m,row:d,rowStart:u,rowEnd:x,gap:p,gapX:g,gapY:v,className:b,justifyContent:f,alignItems:h,...E})=>{const _=t(b,{"maxio-grid":!r,"maxio-inline-grid":r,[`maxio-grid-cols-${l}`]:l,[`maxio-grid-rows-${n}`]:n,[`maxio-auto-cols-${i}`]:i,[`maxio-auto-rows-${o}`]:o,["maxio-col-"+("auto"===s?"auto":`span-${s}`)]:s,[`maxio-col-start-${c}`]:c,[`maxio-col-end-${m}`]:m,["maxio-row-"+("auto"===d?"auto":`span-${d}`)]:d,[`maxio-row-start-${u}`]:u,[`maxio-row-end-${x}`]:x,[`maxio-gap-${p}`]:void 0!==p,[`maxio-gap-x-${g}`]:void 0!==g,[`maxio-gap-y-${v}`]:void 0!==v,[`maxio-justify-${f}`]:f,[`maxio-items-${h}`]:h});return e.createElement("div",{className:_||void 0,...E},a)},exports.Heading=mt,exports.Icon=b,exports.IconButton=C,exports.Label=({as:a="div",children:l,size:n="sm",className:i,...o})=>{const r=a,s=t(`maxio-label-${n}`,i);return e.createElement(r,{className:s,...o},l)},exports.Link=_,exports.ListBox=pe,exports.LoadingSpinner=N,exports.Logo=lt,exports.Menu=({children:t})=>e.createElement(P,null,e.createElement(T,null,t)),exports.MenuButton=({children:a,iconName:l="chevron-down","aria-label":n,size:i="md",variant:o="secondary"})=>{const r=t({"maxio-action-menu__chevron":"chevron-down"===l}),s=t("maxio-button",`maxio-button--${o}`,`maxio-button--${i}`,{"maxio-button--icon":l&&!a}),{isOpen:c,buttonId:m,controlsId:d}=R();return e.createElement("summary",{className:s,"aria-haspopup":"true","aria-label":n,"aria-expanded":c,"aria-controls":d,id:m},a&&e.createElement("span",null,a),l&&e.createElement(b,{variant:l,className:`${r} maxio-button__trailing-element`}))},exports.MenuList=({items:a,alignItemsEnd:l=!1})=>{const n=t("maxio-action-menu__content",{"maxio-action-menu__content--align-end":l}),{controlsId:i,buttonId:o}=R();return e.createElement("div",{className:n,role:"presentation"},e.createElement(E,{role:"menu",itemProps:{role:"menuitem"},id:i,"aria-labelledby":o,items:a}))},exports.OverlayTrigger=ie,exports.Pagination=({size:t="md",onChange:a,totalItems:l=0,itemsPerPage:n=30,currentPage:i=1,pageSizeOptions:o,manualPageInput:r=!1})=>{const[s,c]=e.useState(i),[m,d]=e.useState(n),[u,x]=e.useState(i.toString());e.useEffect(()=>{x(s.toString())},[s]);const p=Math.ceil(l/m),g=s<p,v=s>1,f=m*(s-1)+1,h=Math.min(m*s,l),E=o.map(e=>({label:e.toString(),value:e.toString()})),_=Array.from({length:p},(e,t)=>t+1).map(e=>({label:e.toString(),value:e.toString()})),N=e=>{c(e),null==a||a({currentPage:e,itemsPerPage:m})},w=e=>{const t=parseInt(e,10);if(isNaN(t))return void x(s.toString());const a=Math.max(1,Math.min(t,p));x(a.toString()),N(a)};return e.createElement("div",{className:"maxio-pagination"},e.createElement("div",{className:"maxio-pagination__items-per-page"},e.createElement("label",{htmlFor:"items-per-page-large",className:"maxio-pagination__label"},"Items per page"),e.createElement(ye,{inline:!0,size:t,options:E,onChange:e=>{return t=Number(e.target.value),d(t),c(1),void(null==a||a({currentPage:1,itemsPerPage:t}));var t},value:m,id:"items-per-page-large"})),e.createElement("div",{className:"maxio-pagination__total-items"},e.createElement("span",null,f,"–",h," of ",l," items")),e.createElement("div",{className:"maxio-pagination__current-page"},r?e.createElement(we,{className:"maxio-pagination__page-input",value:u,min:1,max:p,onChange:e=>(e=>{x(e)})(e),onBlur:e=>{w(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(w(e.currentTarget.value),e.currentTarget.blur())},"aria-label":"Page number",size:t,type:"number",onWheel:e=>e.preventDefault()}):e.createElement(ye,{inline:!0,size:t,"aria-label":"Select page",onChange:e=>N(Number(e.target.value)),value:s,options:_,id:"page-index-large"}),e.createElement("div",{className:"maxio-pagination__label"},"of ",p," pages")),e.createElement("div",{className:"maxio-pagination__controls"},e.createElement(se,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(C,{icon:e.createElement(b,{variant:"chevron-left"}),size:t,variant:"ghost",onClick:()=>N(s-1),"aria-label":"Previous",disabled:!v})),e.createElement(se,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(C,{icon:e.createElement(b,{variant:"chevron-right"}),size:t,variant:"ghost",onClick:()=>N(s+1),"aria-label":"Next",disabled:!g}))))},exports.Popover=ge,exports.ProgressBar=({label:l,helperText:n,size:i="md",variant:o="default",status:r,value:s,maxValue:c=100})=>{const m=a.useId(),d=a.useId(),u=r&&!!l&&!!s&&!("inline"===o),x=n&&!("inline"===o),p=n&&"inline"===o,{progressBarProps:g,labelProps:v}=a.useProgressBar({maxValue:c,value:s,label:l}),b=t("maxio-progress-bar",{"maxio-progress-bar--lg":"lg"===i,"maxio-progress-bar--success":s&&!("inline"===o)&&"success"===r,"maxio-progress-bar--error":s&&!("inline"===o)&&"error"===r,"maxio-progress-bar--indent":"indent"===o,"maxio-progress-bar--inline":"inline"===o,"maxio-progress-bar--indeterminate":void 0===s});return e.createElement("div",{className:b,...g},e.createElement("div",{id:m,className:"maxio-progress-bar__label",...v},l),p&&e.createElement("div",{id:d,className:"maxio-progress-bar__helper-text"},n),e.createElement("div",{className:"maxio-progress-bar__track"},e.createElement("div",{className:"maxio-progress-bar__progress",style:{"--tw-scale-x":`${s}%`}})),u&&e.createElement("div",{className:`maxio-progress-bar__${r}-icon`}),x&&e.createElement("div",{id:d,className:"maxio-progress-bar__helper-text"},n))},exports.Radio=({indent:l=!1,disabled:n=!1,invalid:i=!1,label:o,...r})=>{const s=e.useRef(null),c=e.useContext(_e),{inputProps:m,isDisabled:d}=a.useRadio({...r,value:(r.value||"").toString(),"aria-label":r["aria-label"]||o,isDisabled:n},c,s),u=t("maxio-radio",{"maxio-radio--indent":l,"maxio-radio--disabled":d||c.isDisabled,"maxio-radio--error":i||c.isInvalid});return e.createElement("label",{className:u},e.createElement("input",{ref:s,role:"radio",type:"radio",className:"maxio-radio__input",...m,name:c.name||m.name}),e.createElement("span",{className:"maxio-radio__control"}),e.createElement("span",{className:"maxio-radio__label"},o))},exports.RadioGroup=({children:t,label:l,errorMessage:n,helperText:i,disabled:o=!1,invalid:r=!1,name:s,defaultValue:m,...d})=>{const u=c.useRadioGroupState({isDisabled:o,isInvalid:r,description:i,name:s,label:l,errorMessage:n,defaultValue:m,...d}),{radioGroupProps:x,labelProps:p,descriptionProps:g,errorMessageProps:v}=a.useRadioGroup({"aria-label":d["aria-label"]||l,...d},u);return e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-radio-group",...x},l&&e.createElement("label",{className:"maxio-radio-group__label",...p},l),e.createElement(_e.Provider,{value:u},t),r&&n&&e.createElement(U,{...v},n),i&&!r&&e.createElement(G,{...g},i)))},exports.SegmentedControl=Ie,exports.Select=ye,exports.SideNav=({withIcons:t=!0,shouldToggleSidebar:a=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:o,onChange:r})=>e.createElement(De,{isOpen:o,onChange:r,collapseBreakpoint:i,withIcons:t,shouldToggleSidebar:a,topDropdownItems:l,sections:n},e.createElement(Ae,null)),exports.Tab=We,exports.TabList=({children:a,className:l,ariaLabel:n,...i})=>{const{variant:o,withDivider:r,currentIndex:s,onChange:c}=He(),m=t("maxio-tabs",l,{"maxio-tabs--contained":"contained"===o,"maxio-tabs--divider":r}),d=e.useRef(null),u=()=>e.Children.map(a,e=>e.props);return e.createElement("div",{className:m,role:"tablist","aria-label":n,"aria-orientation":"horizontal",ref:d,onKeyDown:e=>{var t;"ArrowRight"===e.key&&c(e=>((e,t)=>{const a=t.findIndex((t,a)=>!t.disabled&&a>e);return-1===a?e:a})(e,u())),"ArrowLeft"===e.key&&c(e=>qe(e,u())),null===(t=d.current)||void 0===t||t.focus()},...i},e.Children.map(a,(t,a)=>{if(e.isValidElement(t)&&t.type===We)return e.cloneElement(t,{value:a,isCurrent:s===a});throw new Error("You can only pass <Tab /> component as children")}))},exports.TabPanel=je,exports.TabPanels=({children:t})=>{const{currentIndex:a}=He();return e.createElement(e.Fragment,null,e.Children.map(t,(t,l)=>{if(e.isValidElement(t)&&t.type===je)return l===a?e.cloneElement(t,{value:l}):null;throw new Error("You can only pass <TabPanel /> component as children")}))},exports.Tabs=({children:t,variant:a="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:o})=>e.createElement(Fe,{defaultIndex:n,variant:a,withDivider:l,index:i,onChange:o},t),exports.Tag=({children:a,size:l,sentiment:n,kind:i="primary",leadingIcon:o,trailingIcon:r})=>{const s=t("maxio-tag",`maxio-tag--${i}`,!!n&&`maxio-tag--${n}`,!!l&&`maxio-tag--${l}`);return e.createElement("div",{className:s},o&&e.createElement(b,{variant:o,className:"maxio-tag__icon"}),e.createElement("span",{className:"maxio-tag__label"},a),r&&e.createElement(b,{variant:r,className:"maxio-tag__icon"}))},exports.TextField=Ne,exports.TextInput=we,exports.Tile=({children:a,className:l,href:n,onClick:i,target:o,disabled:r})=>{const s=n||i;if(!s)return e.createElement("div",{className:"maxio-tile"},a);const c=t("maxio-tile",l,{"maxio-tile--clickable":s,"maxio-tile--disabled":r});return e.createElement("a",{className:c,href:n,target:o,onClick:e=>{r&&n&&e.preventDefault(),!r&&i&&i()}},a)},exports.ToastProvider=({children:t,...a})=>{const{maxVisibleToasts:l=5,...n}=a,i=m.useToastState({maxVisibleToasts:l,...n});return e.useEffect(()=>{console.warn("ToastProvider is deprecated. Please use the global toast API instead.")},[]),e.createElement(e.Fragment,null,t(i),i.visibleToasts.length>0&&e.createElement(it,{...a,state:i}))},exports.ToastQueue=rt,exports.Toggle=({defaultChecked:a,checked:l,onChange:n,disabled:i,valueDescription:o,valueDescriptionPosition:r,className:s,name:c,id:m,...d})=>{const u=e.useId(),x="boolean"==typeof a,p=m||u,g="left"===r?"row":"row-reverse",v=o&&r,b=e.useCallback(e=>{if("Enter"===e.code||"Space"===e.code){e.preventDefault();const t=e.currentTarget.checked;x&&(e.currentTarget.checked=!t),n&&n(!t,e)}},[x,n]),f=d["aria-label"]||(v?void 0:o);return e.createElement("div",{className:t("maxio-toggle",s,{"maxio-toggle--disabled":i}),style:{display:"inline-flex",flexDirection:g},"data-testid":"toggle-container"},v?e.createElement("label",{className:"maxio-toggle__label",htmlFor:p},o):null,e.createElement("div",{className:"maxio-toggle__container"},e.createElement("input",{type:"checkbox",defaultChecked:a,checked:l,onChange:e=>{n&&n(e.target.checked,e)},onKeyDown:b,disabled:i,className:"maxio-toggle__checkbox",id:p,name:c,"aria-label":f}),e.createElement("div",{className:"maxio-toggle__track",role:"switch","aria-checked":l,"aria-hidden":"true"},e.createElement("div",{className:"maxio-toggle__handle"}),e.createElement("span",{className:"maxio-toggle__icon"},e.createElement("i",{className:"maxio-toggle__icon-on"})),e.createElement("span",{className:"maxio-toggle__icon"},e.createElement("i",{className:"maxio-toggle__icon-off"})))))},exports.Tooltip=oe,exports.TooltipTrigger=se,exports.TopBar=({children:t,actions:a,sideNavIsClosed:l,openSideNav:n})=>e.createElement("nav",{className:"maxio-top-bar"},l&&e.createElement(C,{"aria-label":"Open Side Navigation",variant:"ghost",icon:e.createElement(b,{variant:"sidebar"}),onClick:n}),e.createElement(st,{grow:!0,justifyContent:"end"},t),a),exports.useHover=le,exports.useOverlayTrigger=ae,exports.useToast=()=>{const t=e.useContext(ot);if(!t)throw new Error("useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.");return t},exports.useWindowSize=ne;
1
+ "use strict";var e=require("react"),t=require("classnames"),a=require("react-aria"),l=require("@tanstack/react-table"),n=require("@react-stately/toggle"),i=require("@react-stately/checkbox"),o=require("react-aria-components"),r=require("framer-motion"),s=require("@floating-ui/react-dom-interactions"),c=require("@react-stately/radio"),m=require("@react-stately/toast"),d=require("@react-aria/toast");function u(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}var x=u(e);const p=["address-card","arrow-down","arrow-down-left","arrow-down-left-long","arrow-down-long","arrow-down-right","arrow-down-right-long","arrow-down-up","arrow-left","arrow-left-long","arrow-left-right","arrow-right","arrow-right-long","arrow-turn-down-right","arrow-up","arrow-up-left","arrow-up-left-long","arrow-up-long","arrow-up-right","arrow-up-right-long","bank","bar-chart","briefcase","building","business-intelligence","calendar","caret-down","caret-left","caret-right","caret-up","chat","check","check-box","check-box-checked","check-box-checked-fill","check-box-indeterminate-fill","check-circle","check-circle-fill","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle","circle-half-stroke-small","circle-small-dash","circle-small-fill","circle-small-stroke","clipboard","cog","copy-file","credit-card","cross","cross-circle","cross-circle-fill","dashboard","diamond-small-fill","document","document-blank","dollar","dot-circle-fill","dot-fill","error","error-fill","error-small-fill","graph","home","info-circle","info-circle-fill","line-vertical","list","login","logout","megaphone","menu","menu-chevron-left","menu-chevron-right","notification","notification-unread","pen","plus","plus-circle","plus-circle-fill","question-circle","question-circle-fill","recently-viewed","search","square-small-fill","trash","triangle-small-fill","user","warning-circle","warning-circle-fill"],g=["anrok","dropbox","hubspot","numeral","oracle","quotapath","sage","sphere","taxjar"],v=["avalara","pipedrive","quickbooks","salesforce","xero"],b=({variant:a,color:l,className:n,size:i})=>{const o=(e,t)=>t.includes(e),r=o(a,p)||o(a,g),s=o(a,v),c=t({"fa-kit":r,"fa-kit-duotone":s,"fa-sharp fa-regular":!r&&!s,[`fa-${a}`]:!0,[`fa-${i}`]:i,[`maxio-icon--${l}`]:l&&!o(a,g)&&!o(a,v)},n);return e.createElement("i",{className:c})},f=({item:l,isSelected:n,truncateLabel:i=!1,role:o="option",small:r=!1})=>{const s=e.useRef(null),c=e.useRef(!1),m=a.useId();if(e.useEffect(()=>{var e;n&&c.current&&(null===(e=s.current)||void 0===e||e.focus())},[n]),e.useEffect(()=>{c.current=!0},[]),"divider"===l.type)return e.createElement("div",{className:"maxio-action-list__divider",role:"separator","aria-hidden":"true"});const{leadingIconName:d,leadingIconClassName:u,trailingIconName:x,label:p,description:g,link:v}=l,f=t("maxio-action-list__label",{"maxio-truncate":i});return e.createElement("a",{"aria-labelledby":m,...v,className:t("maxio-action-list__content",v.className,{"maxio-action-list__content--size-small":r}),tabIndex:n?0:-1,ref:s,role:o},d&&e.createElement(b,{variant:d,className:t("maxio-action-list__leading-icon",u)}),e.createElement("span",{className:f,id:m},p),g&&e.createElement("span",{className:"maxio-action-list__description"},g),x&&e.createElement(b,{variant:x,className:"maxio-action-list__trailing-icon"}))},h=(e,t,a)=>0===e?e:1===e&&"divider"===t[e-1].type?a||e:"divider"===t[e-1].type?h(e-1,t,a||e):e-1,E=({items:a,isShadowed:l=!0,itemProps:n={},className:i,truncateLabels:o=!1,small:r=!1,...s})=>{const c=t("maxio-action-list",i,{"maxio-action-list--shadow":l}),[m,d]=e.useState(()=>a.findIndex(e=>"divider"!==e.type));return 0===a.length?null:e.createElement("div",{className:c,onKeyDown:e=>{if("Space"===e.code||"Enter"===e.code){const e=a[m];e&&"divider"!==e.type&&window.open(e.link.href,e.link.target||"_self")}"ArrowUp"===e.code&&(e.preventDefault(),d(e=>h(e,a))),"ArrowDown"===e.code&&(e.preventDefault(),d(e=>((e,t)=>{const a=t.findIndex((t,a)=>"divider"!==t.type&&a>e);return-1===a?e:a})(e,a)))},role:"listbox",...s},a.map((t,a)=>e.createElement(f,{item:t,truncateLabel:o,key:`listbox-${t.id}`,isSelected:a===m,small:r,...n})))},_=({className:a,children:l,disabled:n,external:i,icon:o,size:r="sm",underline:s,variant:c,...m})=>{const d=t("maxio-link",{[`maxio-link--${r}`]:r,"maxio-link--disabled":n,[`maxio-link--${c}`]:c,"maxio-link--underline":s},a),u=i?"_blank":"_self";return e.createElement("a",{className:d,target:u,...m},l,o&&e.createElement(b,{variant:o,className:"maxio-link__icon"}))},N=({size:a="md",white:l=!1,className:n})=>{const i=t("maxio-loading-spinner",n,`maxio-loading-spinner--${a}`,{"maxio-loading-spinner--white":l});return e.createElement("div",{className:i,role:"status","aria-label":"loading"})},w=({fullWidth:l=!1,leadingElement:n,trailingElement:i,icon:o,variant:r="primary",size:s,...c})=>{const m=e.useRef(null),{linkProps:d}=a.useLink({...c},m),u=t("maxio-button",c.className,{[`maxio-button--${s}`]:s,[`maxio-button--${r}`]:r,"maxio-button--full-width":l});return e.createElement("a",{...d,ref:m,className:u,href:c.href},n&&e.cloneElement(n,{...e.isValidElement(n)&&{className:"maxio-button__leading-element"}}),c.children,(i||o)&&e.cloneElement(i||o,{...e.isValidElement(i||o)&&{className:"maxio-button__trailing-element"}}))},y=({disabled:l,loading:n=!1,fullWidth:i=!1,leadingElement:o,trailingElement:r,icon:s,variant:c="primary",size:m,...d})=>{const u=e.useRef(null),{buttonProps:x}=a.useButton({...d,isDisabled:l,formAction:"string"==typeof d.formAction?d.formAction:void 0},u),p=["primary","danger"].includes(c),g=t("maxio-button",d.className,{[`maxio-button--${m}`]:m,[`maxio-button--${c}`]:c,"maxio-button--loading":n,"maxio-button--full-width":i});return e.createElement("button",{...x,className:g,ref:u},o&&e.cloneElement(o,{...e.isValidElement(o)&&{className:"maxio-button__leading-element"}}),d.children,!n&&(r||s)&&e.cloneElement(r||s,{...e.isValidElement(r||s)&&{className:"maxio-button__trailing-element"}}),n&&e.createElement(N,{className:"maxio-button__trailing-element",size:"md",white:p}))},k=t=>(e=>"href"in e)(t)?e.createElement(w,{...t}):e.createElement(y,{...t}),C=({"aria-label":a,className:l,...n})=>e.createElement(k,{"aria-label":a,className:t("maxio-button--icon",l),...n},null),I=({children:a,title:l,linkText:n,linkExternal:i,href:o,display:r="inline",sentiment:s="info",onDismiss:c,className:m})=>{if(!a&&!l)return console.warn("Alert component requires either children or title prop to be rendered"),null;const d=t("maxio-alert",{[`maxio-alert--${s}`]:"info"!==s&&s},m),u={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[s],x=t("maxio-alert__content",{"maxio-alert__content--block":"block"===r});return e.createElement("div",{className:d},e.createElement(b,{variant:u,className:"maxio-alert__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-alert__container"},e.createElement("div",{className:x},l&&e.createElement("span",{className:"maxio-alert__title"},l),a&&e.createElement("span",{className:"maxio-alert__message"},a),n&&o&&e.createElement(_,{className:"maxio-alert__link",href:o,variant:"high-contrast",underline:!0,...i?{external:!0}:{}},n))),c&&e.createElement(C,{icon:e.createElement(b,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:c,className:"maxio-alert__dismiss"}))},S=e.createContext({}),P=({children:t})=>{const[a,l]=e.useState(!1),n=e.useId(),i=e.useId();return e.createElement(S.Provider,{value:{controlsId:n,buttonId:i,isOpen:a,onClose:()=>l(!1),onOpen:()=>l(!0),onToggle:()=>l(e=>!e)}},t)};function R(){const t=e.useContext(S);if(!t||"object"==typeof t&&0===Object.keys(t).length)throw new Error("useMenu hook must be used within a MenuProvider");return t}const T=({children:t})=>{const{isOpen:a,onToggle:l,onClose:n}=R();return e.createElement("details",{open:a,onToggle:l,className:"maxio-action-menu"},"function"==typeof t?t({isOpen:a,onClose:n}):t)},$=({children:a,className:l,href:n,...i})=>{const o=n?e.createElement(_,{size:"sm",href:n},a):a;return e.createElement("li",{className:t("maxio-breadcrumbs__item",l),...i},o)},D="Breadcrumbs requires at least one BreadcrumbsItem as children",O='Last BreadcrumbsItem should not have "href" prop. It is the current page.',z="Breadcrumbs only accepts BreadcrumbsItem as children",M="row-controls",B="row-actions",L=({children:a,pattern:l,size:n,isExpandable:i,isUsingCustomRow:o})=>{const[r,s]=e.useState(!1),[c,m]=e.useState(!1),d=l&&o&&i,u=t("maxio-data-table",{"maxio-data-table--pattern":l&&!d,"maxio-data-table--expanded-child-pattern":d,"maxio-data-table--with-custom-row":o,[`maxio-data-table--${n}`]:n,"maxio-data-table--with-pinned-left-border":r,"maxio-data-table--with-pinned-right-border":c});return e.createElement("div",{className:"maxio-data-table-wrapper",onScroll:e=>{const t=e.target;s(t.scrollLeft>0),m(t.scrollWidth-t.clientWidth-t.scrollLeft>0)}},e.createElement("table",{className:u},a))},A=({children:t})=>e.createElement("thead",null,t),V=({children:t})=>e.createElement("tbody",null,t),H=({children:a,table:l,header:n,className:i,enableExpanding:o,...r})=>{var s,c,m,d,u,x,p,g,v,f,h;const E=null==n?void 0:n.column,_=null===(s=null==E?void 0:E.getCanSort)||void 0===s?void 0:s.call(E),N=null===(c=null==E?void 0:E.getToggleSortingHandler)||void 0===c?void 0:c.call(E),w=null==n?void 0:n.isPlaceholder,y=null===(d=null===(m=null==E?void 0:E.columnDef)||void 0===m?void 0:m.meta)||void 0===d?void 0:d.align,k=null===(x=null===(u=null==E?void 0:E.columnDef)||void 0===u?void 0:u.meta)||void 0===x?void 0:x.width,I=null===(g=null===(p=null==E?void 0:E.columnDef)||void 0===p?void 0:p.meta)||void 0===g?void 0:g.controls,S=null===(f=null===(v=null==E?void 0:E.columnDef)||void 0===v?void 0:v.meta)||void 0===f?void 0:f.actions,P=null==E?void 0:E.getIsPinned(),R=null==E?void 0:E.getIsSorted(),T="asc"===R,$=t("maxio-data-table__cell",i,{[`maxio-data-table__cell--pinned-${P}`]:P,"maxio-data-table__cell--sortable":_,"maxio-data-table__cell--active":R,[`maxio-data-table__cell--${y}`]:y,"maxio-data-table__cell--controls":I,"maxio-data-table__cell--actions":S}),D={...k?{width:k}:{},..."left"===P?{left:null==E?void 0:E.getStart("left")}:"right"===P?{right:null==E?void 0:E.getAfter("right")}:{}},O=((e,t)=>e&&t?"arrow-up":e&&!t?"arrow-down":"arrow-down-up")(!!R,T),z=null==l?void 0:l.getToggleAllRowsExpandedHandler(),B=null===(h=null==l?void 0:l.getIsAllRowsExpanded)||void 0===h?void 0:h.call(l),L=(null==n?void 0:n.headerGroup.headers[0].id)===M?1:0,A=o&&(null==n?void 0:n.index)===L;return w?null:e.createElement("th",{scope:"col",role:"columnheader","aria-sort":R?T?"ascending":"descending":"none",className:$,onClick:N,colSpan:null==n?void 0:n.colSpan,style:D,...r},e.createElement("div",{className:"maxio-data-table__cell-flex"},!0===o&&A&&e.createElement(C,{size:"sm",variant:"ghost",icon:e.createElement(b,{size:"xs",variant:B?"chevron-down":"chevron-right"}),onClick:z,"aria-label":B?"Collapse all rows":"Expand all rows","data-open":B,className:"maxio-data-table__expand-button"}),a,_&&e.createElement(b,{variant:O,className:"maxio-data-table__sort-icon"})))},F=({children:l,row:n,isChild:i,isHeader:o,className:r,onRowAction:s,...c})=>{var m,d,u;const x=null===(m=null==n?void 0:n.getIsSelected)||void 0===m?void 0:m.call(n),p=(null===(d=null==n?void 0:n.getCanExpand)||void 0===d?void 0:d.call(n))&&(null===(u=null==n?void 0:n.getIsExpanded)||void 0===u?void 0:u.call(n)),g=Boolean(n&&s&&!o&&!i),v=e.useRef(null),b=e=>{v.current=e.target},{pressProps:f}=a.usePress({isDisabled:!g,onPress:e=>{var t;const a=null!==(t=v.current)&&void 0!==t?t:e.target;v.current=null,n&&s&&!(e=>e instanceof Element&&Boolean(e.closest("a,button,input,select,textarea,label,.maxio-data-table__cell--controls,.maxio-data-table__cell--actions")))(a)&&s(n)}}),{focusProps:h,isFocused:E}=a.useFocusRing(),_=t({"maxio-data-table__row":!o,"maxio-data-table__header-row":o,"maxio-data-table__row--active":x||E,"maxio-data-table__row--expanded":p,"maxio-data-table__row--expanded-child":i,"maxio-data-table__row--actionable":g},r),N=g?a.mergeProps({onClickCapture:b,onKeyDownCapture:b,tabIndex:0},f,h,c):c;return e.createElement("tr",{...N,className:_,tabIndex:g?N.tabIndex:c.tabIndex},l)},W=e.createContext({}),j=e.forwardRef(({checked:a,disabled:l,invalid:n,indeterminate:i,className:o,inputProps:r,error:s,label:c},m)=>{const d=t("maxio-checkbox",{"maxio-checkbox--checked":a,"maxio-checkbox--disabled":l,"maxio-checkbox--error":n,"maxio-checkbox--indeterminate":i},o);return e.createElement("label",{className:d},e.createElement("input",{type:"checkbox",role:"checkbox",className:"maxio-checkbox__input",ref:m,...r}),e.createElement("span",{className:"maxio-checkbox__control"},s&&e.createElement("span",{className:"maxio-checkbox__control-error"})),c&&e.createElement("span",{className:"maxio-checkbox__label"},c))});j.displayName="InnerCheckbox";const q=({label:t,error:l=!1,className:i,indeterminate:o,value:r="",disabled:s,readOnly:c,defaultChecked:m,checked:d,...u})=>{const x=e.useRef(null),p=e.useContext(W),{inputProps:g,isDisabled:v,isInvalid:b,isSelected:f}=p&&Object.keys(p).length>0?a.useCheckboxGroupItem({value:r,"aria-label":null!=t?t:u["aria-label"],isDisabled:s,isInvalid:l,isIndeterminate:o,isReadOnly:c,...u},p,x):a.useCheckbox({"aria-label":null!=t?t:u["aria-label"],isDisabled:s,isInvalid:l,isIndeterminate:o,isReadOnly:c,value:r,...u},n.useToggleState({...u,isSelected:d,defaultSelected:m}),x);return e.createElement(j,{inputProps:g,checked:f,disabled:v,invalid:b,indeterminate:o,className:i,error:l,label:t,ref:x,...u})},G=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-form-helper-text",l),...n},a),U=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-form-error",l),...n},e.createElement(b,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},a)),K=({table:t})=>{var a,l,n,i;const o=null===(a=null==t?void 0:t.getToggleAllPageRowsSelectedHandler)||void 0===a?void 0:a.call(t),r=(null===(l=null==t?void 0:t.getIsAllPageRowsSelected)||void 0===l?void 0:l.call(t))||(null===(n=null==t?void 0:t.getIsAllRowsSelected)||void 0===n?void 0:n.call(t)),s=null===(i=null==t?void 0:t.getIsSomePageRowsSelected)||void 0===i?void 0:i.call(t);return e.createElement(q,{"aria-label":"Select all rows",onChange:e=>{o("boolean"==typeof e?{target:{checked:e}}:e)},checked:r,indeterminate:!r&&s})},Y=({row:t})=>{var a,l,n,i;const o=null===(a=null==t?void 0:t.getToggleSelectedHandler)||void 0===a?void 0:a.call(t),r=(null===(l=null==t?void 0:t.getIsSelected)||void 0===l?void 0:l.call(t))||(null===(n=null==t?void 0:t.getIsAllSubRowsSelected)||void 0===n?void 0:n.call(t)),s=null===(i=null==t?void 0:t.getIsSomeSelected)||void 0===i?void 0:i.call(t),c=t.id||t.index;return e.createElement(q,{"aria-label":`Select row ${c}`,onChange:o,checked:r,indeterminate:s})},Z=({children:t})=>e.createElement("div",{className:"maxio-data-table__cell-flex"},t),Q=({row:a,cell:l,children:n,className:i,...o})=>{var r,s,c,m,d,u;const x=null==l?void 0:l.column,p=null===(s=null===(r=null==x?void 0:x.columnDef)||void 0===r?void 0:r.meta)||void 0===s?void 0:s.align,g=null===(m=null===(c=null==x?void 0:x.columnDef)||void 0===c?void 0:c.meta)||void 0===m?void 0:m.controls,v=null===(u=null===(d=null==x?void 0:x.columnDef)||void 0===d?void 0:d.meta)||void 0===u?void 0:u.actions,b=null==x?void 0:x.getIsPinned(),f=t("maxio-data-table__cell",i,{[`maxio-data-table__cell--pinned-${b}`]:b,[`maxio-data-table__cell--${p}`]:p,"maxio-data-table__cell--controls":g,"maxio-data-table__cell--actions":v}),h="left"===b?{left:null==x?void 0:x.getStart("left")}:"right"===b?{right:null==x?void 0:x.getAfter("right")}:{};return e.createElement("td",{className:f,style:h,...o},n)},X=({row:t,SubRowComponent:a,pattern:n,enableExpanding:i,onRowAction:o})=>{var r,s,c,m,d;const u=a&&t.getParentRow()&&t.getParentRow().getIsExpanded(),x=u&&t.getVisibleCells()[0].column.columnDef.id===M,p=u&&t.getVisibleCells()[t.getVisibleCells().length-1].column.columnDef.id===B,g=[p,x].filter(Boolean).length,v=t.getVisibleCells().length-g,f=null!==(s=null===(r=t.getParentRow())||void 0===r?void 0:r.index)&&void 0!==s?s:t.index,h=n&&a&&f%2==1?"maxio-data-table__row--with-pattern":void 0,E=null===(c=t.getCanExpand)||void 0===c?void 0:c.call(t),_=null===(m=null==t?void 0:t.getToggleExpandedHandler)||void 0===m?void 0:m.call(t),N=null===(d=null==t?void 0:t.getIsExpanded)||void 0===d?void 0:d.call(t),w=E&&i?0:1.75,y=t.getVisibleCells()[0].column.columnDef.id===M?1:0,k=t.getVisibleCells().find(({column:e})=>{var t;const{actions:a,controls:l}=null!==(t=e.columnDef.meta)&&void 0!==t?t:{};return!a&&!l}),I=o&&k?k.id:void 0;return e.createElement(e.Fragment,{key:t.id},u?e.createElement(F,{key:`${t.id}-sub`,row:t,isChild:!0,className:h},x&&e.createElement(Q,{className:"maxio-data-table__cell--pinned-left"}),e.createElement(Q,{colSpan:v},a(t)),p&&e.createElement(Q,{className:"maxio-data-table__cell--pinned-right"})):e.createElement(F,{key:`${t.id}-parent`,row:t,className:h,onRowAction:o,"aria-labelledby":I},t.getVisibleCells().map(a=>{const n=i&&a.column.getIndex()===y;return e.createElement(Q,{key:a.id,row:t,cell:a,id:a.id},e.createElement("div",{className:"maxio-data-table__cell-flex",style:i&&n?{paddingLeft:`${(null==t?void 0:t.depth)+w}rem`}:void 0},i&&E&&n&&e.createElement(C,{size:"sm",variant:"ghost",icon:e.createElement(b,{size:"xs",variant:N?"chevron-down":"chevron-right"}),onClick:_,"aria-label":N?"Collapse row":"Expand row","data-open":N,className:"maxio-data-table__expand-button"}),l.flexRender(a.column.columnDef.cell,a.getContext())))})))},J=(e=[])=>e.filter(e=>e!==M&&e!==B),ee={sm:"h3",md:"h2",lg:"h1"},te=({children:a,size:l="sm",className:n,...i})=>{const o=ee[l],r=t(`maxio-heading-${l}`,n);return e.createElement(o,{className:r,...i},a)},ae={click:s.useClick,hover:e=>s.useHover(e,{delay:100}),focus:s.useFocus,dismiss:s.useDismiss},le=(e,t)=>t.map(t=>ae[t](e)),ne=({placement:t="top",isActive:a=!1,interactions:l=["hover"],floatingElementOffset:n=0,onOverlayUpdate:i,autoHideMs:o})=>{const r=e.useRef(null),{strategy:c,x:m,y:d,context:u,floating:x,reference:p}=s.useFloating({placement:t,open:a,onOpenChange:e=>i(e),middleware:[s.offset(n)]}),{getReferenceProps:g,getFloatingProps:v}=s.useInteractions([...le(u,l),s.useRole(u,{role:"tooltip"})]);e.useEffect(()=>{r.current&&clearTimeout(r.current),a&&o&&(r.current=window.setTimeout(()=>i(!1),o))},[a,o]);return{isActive:a,refs:{floating:x,reference:p},floatingElementCSSPosition:{position:c,top:null!=d?d:0,left:null!=m?m:0},getReferenceProps:g,getFloatingProps:v}};function ie(t,a=0){const l=e.useRef((new Date).getTime()),n=e.useRef((new Date).getTime()),[i,o]=e.useState(!1);return e.useEffect(()=>{const e=()=>{l.current=(new Date).getTime(),o(!0)},i=()=>{n.current=(new Date).getTime(),window.setTimeout(()=>{l.current-n.current<=0&&o(!1)},a)},r=t&&t.current;return r&&(r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",i)),()=>{r&&(r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",i))}},[t]),i}function oe(t=500){const[a,l]=e.useState(()=>{if("undefined"==typeof window)return{windowWitdh:0,windowHeight:0};const{innerWidth:e,innerHeight:t}=window;return{windowWitdh:e,windowHeight:t}}),n=e.useRef(null);return e.useEffect(()=>{if("undefined"==typeof window)return;const e=()=>{var e;const{innerWidth:a,innerHeight:i}=window;window.clearTimeout(null!==(e=n.current)&&void 0!==e?e:void 0),n.current=window.setTimeout(()=>{l({windowWitdh:a,windowHeight:i})},t)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[t]),a}const re=({children:a,usePortal:l=!1,isActive:n=!1,placement:i="top",interactions:o=["hover"],role:c="tooltip",renderOverlay:m,floatingElementOffset:d,motionSettings:u={},autoHideMs:x,onOverlayUpdate:p,className:g})=>{const{getReferenceProps:v,getFloatingProps:b,refs:{floating:f,reference:h},floatingElementCSSPosition:E}=ne({isActive:n,onOverlayUpdate:p,autoHideMs:x,floatingElementOffset:d,interactions:o,placement:i}),_=e.createElement(r.AnimatePresence,null,n&&e.createElement(r.motion.div,{ref:f,style:E,...u,...b()},m()));return e.createElement(e.Fragment,null,e.createElement("div",{ref:h,className:t("maxio-inline-flex",g),...v(),"data-testid":"overlay-trigger"},a),l?e.createElement(s.FloatingPortal,{id:"maxio-ui-portal"},_):_)},se=({children:a,arrowPosition:l,size:n="regular",maxWidth:i=160})=>e.createElement("div",{"data-testid":"tooltip",className:t("maxio-tooltip",`maxio-tooltip--${n}`,{[`maxio-tooltip--arrow-${l}`]:l})},e.createElement("div",{className:"maxio-tooltip__content",style:{maxWidth:i}},a)),ce={top:"bottom",right:"left",bottom:"top",left:"right","top-start":"bottom-left","top-end":"bottom-right","right-start":"left-top","right-end":"left-bottom","bottom-start":"top-left","bottom-end":"top-right","left-start":"right-top","left-end":"right-bottom"},me=({children:t,interactions:a=["hover"],placement:l="right",maxWidth:n=160,size:i="regular",renderContent:o,autoHideMs:r,isVisible:s,usePortal:c,className:m,onVisibilityUpdate:d,floatingElementOffset:u=5})=>{const[x,p]=e.useState(!1),g=void 0!==s,v=e.useRef(null),b=e.useCallback(e=>{v.current&&clearTimeout(v.current),v.current=window.setTimeout(()=>{g||p(e),d&&d(e)},50)},[g,d]),f=e.useMemo(()=>(e=>{const t=e.startsWith("top")||e.startsWith("bottom")?"Y":"X",a=`translate${t}(${e.startsWith("bottom")||e.startsWith("right")?"-":""}10px)`;return{initial:{opacity:0,visibility:"hidden",transform:a},animate:{opacity:1,visibility:"visible",transform:`translate${t}(0px)`},exit:{opacity:0,visibility:"hidden",transform:a},transition:{ease:[.4,0,.5,1],duration:.2}}})(l),[l]);return e.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]),e.createElement(re,{role:"tooltip",className:m,floatingElementOffset:u,motionSettings:f,isActive:g?s:x,onOverlayUpdate:b,autoHideMs:r,usePortal:c,placement:l,interactions:a,renderOverlay:()=>e.createElement(se,{size:i,arrowPosition:ce[l],maxWidth:n},o())},t)},de=({as:a="div",children:l,compact:n=!1,size:i="md",className:o,...r})=>{const s=a,c=t({[`maxio-body-${i}`]:!n,[`maxio-body-${i}-compact`]:n},o);return e.createElement(s,{className:c,...r},l)},ue=({className:a,...l})=>e.createElement(o.ListBox,{...l,className:t("maxio-listbox",a)});ue.displayName="ListBox";const xe=({className:a,...l})=>{const n=l.textValue||("string"==typeof l.children?l.children:void 0);return e.createElement(o.ListBoxItem,{...l,textValue:n,className:t("maxio-listbox__item",a)},o.composeRenderProps(l.children,(t,{isSelected:a})=>e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-listbox__content"},"string"==typeof t?e.createElement(de,{size:"sm"},t):t),a&&e.createElement(b,{variant:"check"}))))};xe.displayName="ListBox.Item";const pe=({className:a,...l})=>e.createElement(o.ListBoxSection,{...l,className:t("maxio-listbox__section",a)});pe.displayName="ListBox.Section";const ge=({className:a,...l})=>e.createElement(o.Header,{...l,className:t("maxio-listbox__header",a)});ge.displayName="ListBox.Header";const ve=Object.assign(ue,{Item:xe,Section:pe,Header:ge}),be=({className:a,hideArrow:l=!1,children:n,offset:i=4,...r})=>e.createElement(o.Popover,{...r,className:t("maxio-popover",a),offset:i},e.createElement(e.Fragment,null,!l&&e.createElement(o.OverlayArrow,{className:"maxio-popover__arrow"},e.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12","aria-hidden":!0},e.createElement("path",{d:"M0 0 L6 6 L12 0"}))),n)),fe=({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:r,description:s,errorMessage:c,leadingElement:m=null,fullWidth:d,className:u,placeholder:x,renderEmptyState:p,selectionMode:g,children:v,...f})=>{const h=e.useRef(null),E=e.useRef(null),[_,N]=e.useState(),[w,y]=e.useState(0),k=!!c,C=l||k,I=v,S=e.useCallback(()=>{const e=h.current;if(!e)return;const t=E.current,a=t?t.getBoundingClientRect().left-e.getBoundingClientRect().left:0;y(e=>e===-a?e:-a),N(t=>{const a=`${e.offsetWidth}px`;return(null==t?void 0:t["--trigger-width"])===a?t:{"--trigger-width":a}})},[]);e.useEffect(()=>{const e=h.current;if(!e)return;if(S(),"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(S);return t.observe(e),()=>t.disconnect()},[S]);const P=t("maxio-text-field",`maxio-text-field--${i}`,{"maxio-text-field--disabled":a,"maxio-text-field--error":C,"maxio-text-field--readonly":n,"maxio-text-field--full-width":d},u);return e.createElement(o.ComboBox,{...f,isDisabled:a,isInvalid:C,isReadOnly:n,selectionMode:g,className:P},r&&e.createElement(o.Label,{className:"maxio-text-field__label"},r),e.createElement("div",{ref:h,className:"maxio-text-field__items"},m&&e.createElement("div",{className:"maxio-text-field__leading-element"},m),e.createElement(o.Input,{ref:E,className:"maxio-text-field__input",placeholder:x}),e.createElement("div",{className:"maxio-text-field__trailing-element"},e.createElement(o.Button,{className:t("maxio-button","maxio-button--ghost","maxio-button--icon","maxio-button--sm")},e.createElement(b,{variant:"chevron-up-down"})))),s&&!k&&e.createElement(o.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},s),c&&e.createElement(o.FieldError,{className:"maxio-form-error"},t=>e.createElement(e.Fragment,null,e.createElement(b,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},"function"==typeof c?c(t):c))),e.createElement(be,{hideArrow:!0,className:"maxio-combobox__popover",crossOffset:w,style:_},e.createElement(ve,{renderEmptyState:p},I)))};fe.displayName="ComboBox";const he=t=>e.createElement(ve.Item,{...t});he.displayName="ComboBox.Item";const Ee=t=>e.createElement(ve.Section,{...t});Ee.displayName="ComboBox.Section";const _e=t=>e.createElement(ve.Header,{...t});_e.displayName="ComboBox.Header";const Ne=Object.assign(fe,{Item:he,Section:Ee,Header:_e}),we=e.createContext({}),ye=e.forwardRef(({isDisabled:a=!1,isInvalid:l=!1,isReadOnly:n=!1,size:i="md",label:r,description:s,errorMessage:c,leadingElement:m=null,trailingElement:d=null,fullWidth:u,className:x,...p},g)=>{const v=t("maxio-text-field",`maxio-text-field--${i}`,{"maxio-text-field--disabled":a,"maxio-text-field--error":l,"maxio-text-field--readonly":n,"maxio-text-field--full-width":u},x);return e.createElement(o.TextField,{...p,isDisabled:a,isReadOnly:n,isInvalid:l,className:v},r&&e.createElement(o.Label,{className:"maxio-text-field__label"},r),e.createElement("div",{className:"maxio-text-field__items"},m&&e.createElement("div",{className:"maxio-text-field__leading-element"},m),e.createElement(o.Input,{ref:g,className:"maxio-text-field__input"}),d&&e.createElement("div",{className:"maxio-text-field__trailing-element"},d)),s&&!(l&&c)&&e.createElement(o.Text,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},s),c&&e.createElement(o.FieldError,{className:"maxio-form-error"},e.createElement(b,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},c)))});ye.displayName="TextField";const ke=e.forwardRef(({disabled:l=!1,invalid:n=!1,readOnly:i=!1,size:o="md",label:r,helperText:s,showErrorMessage:c=!0,errorMessage:m,leadingElement:d=null,trailingElement:u=null,fullWidth:x,className:p,...g},v)=>{var b,f;const h=e.useRef(null);e.useImperativeHandle(v,()=>h.current),e.useEffect(()=>{console.warn("TextInput is deprecated. Please use TextField instead.")},[]);const{spellCheck:E,..._}=g,N={..._,label:r,description:s,errorMessage:m,defaultValue:null===(b=g.defaultValue)||void 0===b?void 0:b.toString(),value:null===(f=g.value)||void 0===f?void 0:f.toString(),isDisabled:l,isReadOnly:i,isInvalid:n},{labelProps:w,inputProps:y,descriptionProps:k,errorMessageProps:C}=a.useTextField(N,h),I=t("maxio-text-field",`maxio-text-field--${o}`,{"maxio-text-field--disabled":l,"maxio-text-field--error":n,"maxio-text-field--readonly":i,"maxio-text-field--full-width":x},p),S=n&&m&&c;return e.createElement("div",{className:I},r&&e.createElement("label",{className:"maxio-text-field__label",...w},r),e.createElement("div",{className:"maxio-text-field__items"},d&&e.createElement("div",{className:"maxio-text-field__leading-element"},d),e.createElement("input",{ref:h,type:"text",className:"maxio-text-field__input",...y,spellCheck:E}),u&&e.createElement("div",{className:"maxio-text-field__trailing-element"},u)),s&&!S&&e.createElement("div",{className:"maxio-form-helper-text",...k},s),S&&e.createElement(U,{...C},m))});ke.displayName="TextInput";const Ce=({options:l,label:n,size:i="md",inline:o=!1,disabled:r=!1,helperText:s,errorMessage:c,fullWidth:m=!1,...d})=>{const u=t("maxio-select",`maxio-select--${i}`,{"maxio-select--disabled":r,"maxio-select--inline":o,"maxio-select--error":!!c,"maxio-select--full-width":m}),x=a.useId();return e.createElement("div",{className:u},n&&e.createElement("label",{htmlFor:x,className:"maxio-select__label"},n),e.createElement("div",{className:"maxio-select__input-container"},e.createElement("select",{id:x,className:"maxio-select__input",disabled:r,...d},l.map(t=>e.createElement("option",{key:`option-${t.value}`,value:t.value,disabled:t.disabled},t.label))),e.createElement(b,{variant:"chevron-up-down"})),!!c&&e.createElement(U,null,c),s&&!c&&e.createElement("div",{className:"maxio-form-helper-text"},s))},Ie=({className:a,size:l="md",fullWidth:n=!1,selectionMode:i="single",orientation:r="horizontal",disallowEmptySelection:s=!0,...c})=>e.createElement(o.ToggleButtonGroup,{...c,selectionMode:i,orientation:r,disallowEmptySelection:s,className:o.composeRenderProps(a,e=>t("maxio-segmented-control",`maxio-segmented-control--${l}`,{"maxio-segmented-control--full-width":n},e))});Ie.displayName="SegmentedControl";const Se=({className:a,children:l,...n})=>e.createElement(o.ToggleButton,{...n,className:o.composeRenderProps(a,e=>t("maxio-segmented-control__item",e))},o.composeRenderProps(l,t=>e.createElement(e.Fragment,null,e.createElement(o.SelectionIndicator,{className:"maxio-segmented-control__selection-indicator","data-selected":!0}),t)));Se.displayName="SegmentedControl.Item";const Pe=Object.assign(Ie,{Item:Se}),Re=({leadingIcon:t,trailingIcon:a,type:l="menu",children:n,leadingIconClassName:i,isTooltipVisible:o=!1})=>e.createElement(e.Fragment,null,t&&e.createElement(me,{usePortal:!0,isVisible:o,renderContent:()=>n,floatingElementOffset:12},e.createElement("span",{className:"maxio-side-nav__icon"},e.createElement(b,{variant:t,className:i}))),e.createElement("span",{className:`maxio-side-nav__${l}-title`,"data-testid":"maxio-sidebar-section-name"},n),a&&e.createElement("span",{className:"maxio-side-nav__menu-chevron"},e.createElement(b,{variant:a}))),Te=e=>"heading"!==e.type,$e=e=>{const t=(e=>e.flat().filter(Te).map(e=>e.items).flat().find(e=>null==e?void 0:e.isCurrent))(e);return t?e.map(e=>e.map(e=>{var a;return Te(e)&&(null===(a=e.items)||void 0===a?void 0:a.includes(t))?{...e,isOpen:!0}:e})):e},De=e.createContext({}),Oe=()=>e.useContext(De),ze=({children:t,isOpen:a,onChange:l,withIcons:n=!0,sections:i,shouldToggleSidebar:o=!0,topDropdownItems:r,collapseBreakpoint:s=800})=>{const c=e.useRef(!1),[m,d]=e.useState(()=>!o||("boolean"==typeof a?a:"undefined"==typeof window||window.innerWidth>s)),[u,x]=e.useState(()=>$e(i)),{windowWitdh:p}=oe(200);e.useEffect(()=>{c.current&&(null==l||l(m))},[m,l]),e.useEffect(()=>{c.current=!0},[]),e.useEffect(()=>{!function(e){if(!o)return;e<s&&m&&g()}(p)},[p]),e.useEffect(()=>{"boolean"==typeof a&&d(a)},[a]);const g=()=>{d(!1)};return e.createElement(De.Provider,{value:{sections:u,topDropdownItems:r,onSectionOpen:e=>{x(t=>t.map(t=>t.map(t=>Te(t)?{...t,isOpen:(null==t?void 0:t.name)===e&&!t.isOpen}:t)))},isOpen:m,onOpen:()=>{d(!0)},onClose:g,withIcons:n,shouldToggleSidebar:o}},t)},Me=()=>{const{onOpen:t,topDropdownItems:a,isOpen:l}=Oe(),{mainItem:n,otherItems:i,actions:o}=a,r=e.useRef(null),s=ie(r),c=({id:e,title:t,icon:a,iconClass:l,url:n,...i})=>({id:e,label:t,leadingIconName:a,leadingIconClassName:l,link:{href:n,...i}}),{items:m,itemsCount:d}=e.useMemo(()=>({itemsCount:i.length+o.length,items:[...i.map(c),(null==i?void 0:i.length)>0&&(null==o?void 0:o.length)>0?{type:"divider",id:"item-divider"}:null,...o.map(c)].filter(e=>null!=e)}),[o,i]);return e.createElement(e.Fragment,null,0===d?e.createElement("a",{className:"maxio-side-nav__menu-button maxio-side-nav__menu-button--large",href:n.url,onClick:t},e.createElement("span",{className:"maxio-side-nav__menu-title"},n.title)):e.createElement("details",{className:"maxio-action-menu maxio-side-nav--action-menu"},e.createElement("summary",{onClick:t,className:"maxio-side-nav__menu-button","aria-haspopup":"true",ref:r},n.url?e.createElement(e.Fragment,null,e.createElement(Re,{type:"menu",isTooltipVisible:!l&&s,leadingIcon:n.icon,trailingIcon:"chevron-up-down",leadingIconClassName:n.iconClass},n.title)):e.createElement(Re,{type:"menu",trailingIcon:"chevron-up-down"},n.title)),e.createElement(E,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:m,small:!0})))},Be=({section:t})=>{const{isOpen:a,withIcons:l}=Oe(),n=e.useRef(null),i=ie(n);return e.createElement("li",{className:"maxio-side-nav__item","data-key":t.key,"data-testid":"maxio-sidebar-section"},e.createElement("a",{className:"maxio-side-nav__link","aria-current":t.isCurrent?"page":void 0,role:"button",href:t.href,ref:n},e.createElement(Re,{isTooltipVisible:i&&!a,type:"menu",leadingIcon:l?t.icon:void 0},t.name)))},Le=({section:a})=>{var l,n;const{onOpen:i,onSectionOpen:o,isOpen:r,withIcons:s}=Oe(),c=e.useRef(null),m=ie(c);if(!Te(a))return e.createElement("li",{className:"maxio-side-nav__item-header"},a.title);return a.Component?e.createElement(a.Component,{section:a}):a.href?e.createElement(Be,{section:a}):e.createElement("li",{className:t("maxio-side-nav__item",{"maxio-side-nav__item--icon":s}),"data-testid":"maxio-sidebar-section"},e.createElement("button",{className:"maxio-side-nav__menu-button",ref:c,"aria-expanded":a.isOpen?"true":"false",type:"button",onClick:()=>{o(a.name),i()}},e.createElement(Re,{type:"menu",isTooltipVisible:!r&&m,leadingIcon:s?a.icon:void 0,trailingIcon:(null===(l=a.items)||void 0===l?void 0:l.length)?"chevron-down":void 0},a.name)),e.createElement("ul",{className:"maxio-side-nav__menu"},null===(n=a.items)||void 0===n?void 0:n.map(t=>e.createElement("li",{key:`section-sub-item-${t.name}`,className:"maxio-side-nav__item","data-testid":"maxio-section-item"},e.createElement("a",{className:"maxio-side-nav__link",href:t.href,"aria-current":t.isCurrent?"page":void 0},e.createElement("span",{className:"maxio-side-nav__link-title"},t.name))))))},Ae=()=>{const{sections:t}=Oe();return e.createElement(e.Fragment,null,t.map((t,a)=>e.createElement("ul",{role:"list",className:"maxio-side-nav__items",key:`section-list-${a}`},t.map((t,l)=>e.createElement(Le,{key:`section-list-item-${t.type}-${a}-${l}`,section:t})))))},Ve=()=>{const{onClose:t,shouldToggleSidebar:a}=Oe();return e.createElement("div",{className:"maxio-side-nav__logo-container"},e.createElement("a",{className:"maxio-side-nav__brand",href:"/","aria-label":"Maxio"}),a&&e.createElement("button",{className:"maxio-side-nav__menu-toggle","aria-label":"toggle sidebar",onClick:t},e.createElement(b,{variant:"sidebar"})))},He=()=>{const{isOpen:a}=Oe();return e.createElement("nav",{className:t("maxio-side-nav",{"maxio-side-nav--collapsed":!a})},e.createElement(Ve,null),e.createElement(Me,null),e.createElement("div",{className:"maxio-side-nav__items-container"},e.createElement(Ae,null)))},Fe=e.createContext({}),We=()=>e.useContext(Fe),je=({children:t,variant:a="line",withDivider:l=!1,defaultIndex:n=0,onChange:i,index:o})=>{const[r,s]=e.useState(()=>void 0!==o?o:n);e.useEffect(()=>{void 0===o&&s(n),"number"==typeof o&&s(o)},[n,o]);return e.createElement(Fe.Provider,{value:{currentIndex:r,variant:a,withDivider:l,onChange:e=>{let t;t="function"==typeof e?e(r):e,void 0===o&&s(t),"function"==typeof i&&i(t)}}},t)},qe=({disabled:a=!1,value:l=0,isCurrent:n,...i})=>{const{onChange:o,currentIndex:r}=We(),s=t("maxio-tabs__tab",{"maxio-tabs__tab--active":r===l,"maxio-tabs__tab--disabled":a,"maxio-tabs__tab--icon":"icon"===i.type}),c=()=>{o(l)},m={"aria-selected":n,id:`tab-${l}`,"aria-controls":`panel-${l}`,role:"tab",tabIndex:n?0:-1},d=e.useRef(null),u=e.useRef(!1);if(e.useEffect(()=>{var e;n&&u.current&&(null===(e=d.current)||void 0===e||e.focus())},[n]),e.useEffect(()=>{u.current=!0},[]),"icon"===i.type){const{icon:t,...a}=i;return e.createElement("div",{className:s,ref:d,onClick:c,...m,...a},e.createElement("div",{className:"maxio-tabs__tab__content"},t))}const{children:x,rightIcon:p,...g}=i;return e.createElement("div",{ref:d,className:s,onClick:c,...m,...g},e.createElement("div",{className:"maxio-tabs__tab__content"},x,p||null))},Ge=({children:t,value:a,...l})=>{const{currentIndex:n}=We();return e.createElement("div",{...l,...a?{id:`panel-${a}`}:{},role:"tabpanel","aria-labelledby":`tab-${a}`,hidden:n!==a},t)},Ue=(e,t,a)=>0===e?e:1===e&&t[e-1].disabled?a||e:t[e-1].disabled?Ue(e-1,t,a||e):e-1,Ke=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__header",l),...n},a);Ke.displayName="Card.Header";const Ye=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__body",l),...n},a);Ye.displayName="Card.Body";const Ze=({children:a,className:l,...n})=>e.createElement("div",{className:t("maxio-card__footer",l),...n},a);Ze.displayName="Card.Footer";const Qe=({children:a,className:l,variant:n="primary",...i})=>e.createElement("div",{className:t("maxio-card",`maxio-card--${n}`,l),...i},a);Qe.displayName="Card";const Xe=Object.assign(Qe,{Header:Ke,Body:Ye,Footer:Ze});var Je,et,tt,at;function lt(){return lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},lt.apply(null,arguments)}const nt=e=>x.createElement("svg",lt({xmlns:"http://www.w3.org/2000/svg","data-name":"Maxio Logo SVG",viewBox:"0 0 1036 240"},e),Je||(Je=x.createElement("path",{d:"M59.32 11.3 70.64 0l40.74 40.35v70.99H40.89L0 70.52l11.15-11.14 36.2 36.15h30.07l3.07-3.39-50.91-51.15 10.99-10.97 51.24 50.83 3.72-3.38V47.13zM180.68 11.3 169.36 0l-40.73 40.35v70.99h70.48L240 70.51l-11.15-11.14-36.2 36.15h-30.06l-3.07-3.39 50.91-51.15-10.99-10.97-51.24 50.83-3.72-3.38V47.12l36.2-35.83ZM59.32 228.7l11.31 11.29 40.74-40.35v-70.99H40.89L0 169.48l11.15 11.14 36.2-36.15h30.07l3.07 3.39-50.92 51.15 10.99 10.97 51.24-50.83 3.72 3.38v30.34zM180.68 228.7l-11.32 11.29-40.73-40.35v-70.99h70.48L240 169.48l-11.15 11.14-36.2-36.15h-30.06l-3.07 3.39 50.91 51.15-10.99 10.97-51.24-50.83-3.72 3.38v30.34zM1015.27 139.55c0-29.94-23.74-53.46-52.11-53.46s-52.11 23.52-52.11 53.46 23.74 53.46 52.11 53.46 52.11-23.52 52.11-53.46m20.32.95c-.5 40.27-32.73 72.76-72.43 72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71 72.44-73.71h.94c39.57.52 71.5 33.32 71.5 73.71v.95Z"})),et||(et=x.createElement("path",{fillRule:"evenodd",d:"M870.39 24h-20.33v20.33h20.33zm0 40.67h-20.33v148.59h20.33z"})),tt||(tt=x.createElement("path",{fillRule:"evenodd",d:"M850.05 24h20.33v20.33h-20.33zM695.01 82.85l50.83 56.28v6.53l-50.28 55.67 15.23 13.2 49.22-54.49h4.71l49.22 54.49 15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15 55.52h-3.96l-50.15-55.52L695 82.85ZM660.49 78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13 0-52.44 18.93-58.09 44.86l-.28 1.27 19.33 3.72.31-1.14c2.39-8.91 6.66-16.54 13.04-21.94 6.36-5.39 14.91-8.63 26.02-8.63s19.12 3.25 24.76 8.96c5.64 5.72 8.73 14.06 8.73 24.53v6.11L616.62 130l-3.26.68c-16.14 3.47-29.79 7.84-39.59 14.45-10.54 7.11-16.64 16.83-16.64 30.62 0 12.51 4.51 22.62 12.5 29.59 7.96 6.95 19.25 10.67 32.63 10.67 22.27 0 41.87-12.03 51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58Zm-40.09 68.13c-12.86 2.77-23.05 5.42-30.03 9.63-3.46 2.09-6.08 4.54-7.84 7.54s-2.71 6.62-2.71 11.15c0 6.38 2.1 12.12 6.32 16.27 4.22 4.14 10.7 6.82 19.7 6.82 26.85 0 47.46-20.48 47.46-51.36v-7.2l-32.9 7.14Z"})),at||(at=x.createElement("path",{d:"M434.8 188.74h4.54l61.73-164.33.15-.41h35.57v189.35H515.9V55.37h-4.33l-59.7 157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98H336V24h35.57z"}))),it=a=>{const{size:l="sm",className:n,variant:i="lockup",alt:o="maxio logo"}=a,r="mark"===i,s="number"==typeof l;return e.createElement(nt,{role:"img",viewBox:r?"0 0 240 240":"0 0 1036 240","aria-label":o,height:s?l:void 0,className:t("maxio-logo",!s&&`maxio-logo--${l}`,r&&"maxio-logo--mark",n)})},ot=({state:a,...l})=>{var n,i;const o=e.useRef(null),{toastProps:r,contentProps:s,titleProps:c,closeButtonProps:m}=d.useToast(l,a,o),{closable:u=!0,underline:x=!0,external:p=!1}=l.toast.content,g=t("maxio-toast",{[`maxio-toast--${l.toast.content.sentiment}`]:l.toast.content.sentiment}),v={default:"info-circle-fill",success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[l.toast.content.sentiment||"default"];return e.createElement("div",{className:g,"data-maxio-mode":"dark",...r,ref:o},e.createElement(b,{variant:v,className:"maxio-toast__icon"}),e.createElement("div",{className:"maxio-toast__container",...s},e.createElement("div",{className:"maxio-toast__content",...c},l.toast.content.title&&e.createElement("span",{className:"maxio-toast__title"},l.toast.content.title),l.toast.content.message&&e.createElement("span",{className:"maxio-toast__message"},l.toast.content.message),(null===(n=l.toast.content.link)||void 0===n?void 0:n.text)&&(null===(i=l.toast.content.link)||void 0===i?void 0:i.href)&&e.createElement(_,{href:l.toast.content.link.href,underline:x,external:p},l.toast.content.link.text))),u&&e.createElement(C,{variant:"ghost",icon:e.createElement(b,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss",...m}))},rt=({state:t,...a})=>{const l=e.useRef(null),{regionProps:n}=d.useToastRegion(a,t,l);return e.createElement("div",{...n,ref:l,className:a.className,style:{display:"flex",flexDirection:"column",gap:"10px"}},t.visibleToasts.map(a=>e.createElement(ot,{key:a.key,toast:a,state:t})))},st=e.createContext(null);class ct extends m.ToastQueue{}const mt=({basis:a,flex:l,flexDirection:n,wrap:i,grow:o,shrink:r,gap:s,gapX:c,gapY:m,className:d,children:u,alignItems:x,justifyContent:p,...g})=>{const v=t("maxio-flex",{[`maxio-flex-${l}`]:l,[`maxio-basis-${a}`]:void 0!==a,[`maxio-flex-${n}`]:n,[`maxio-flex-${i}`]:i,"maxio-grow":o,"maxio-grow-0":!1===o,"maxio-shrink":r,"maxio-shrink-0":!1===r,[`maxio-gap-${s}`]:void 0!==s,[`maxio-gap-x-${c}`]:void 0!==c,[`maxio-gap-y-${m}`]:void 0!==m,[`maxio-items-${x}`]:x,[`maxio-justify-${p}`]:p},d);return e.createElement("div",{className:v,...g},u)},dt=({...t})=>{const l=e.useRef(null),{buttonProps:n}=a.useButton(t,l);return e.createElement("button",{...n,className:"maxio-chip__dismiss-button"},e.createElement(b,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},ut={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"};Object.defineProperty(exports,"createColumnHelper",{enumerable:!0,get:function(){return l.createColumnHelper}}),Object.defineProperty(exports,"DialogTrigger",{enumerable:!0,get:function(){return o.DialogTrigger}}),Object.defineProperty(exports,"Pressable",{enumerable:!0,get:function(){return o.Pressable}}),exports.ActionList=E,exports.Alert=I,exports.AuthLayout=({children:a,heading:l,description:n,sentiment:i="success",leadingElement:o=null,alert:r,topAddon:s=null,footer:c})=>e.createElement("div",{className:"maxio-auth-layout"},e.createElement(mt,{alignItems:"center",justifyContent:"between"},e.createElement(it,{size:"md"}),s),r&&e.createElement(I,{display:"block",title:r.title,sentiment:r.sentiment},r.children),e.createElement(Xe,{variant:"secondary"},e.createElement(Xe.Body,null,e.createElement(mt,{flexDirection:"col",gap:6},e.createElement(mt,{flexDirection:"col",gap:2},e.createElement(mt,{alignItems:"center",gap:2},o,e.createElement(te,{size:"lg",className:t("maxio-auth-layout__heading",ut[i])},l)),n&&e.createElement(mt,{style:{color:"var(--maxio-color-text-tertiary)"}},e.createElement(de,{size:"sm",className:"maxio-auth-layout__description"},n))),a)),c&&e.createElement(Xe.Footer,null,c))),exports.Avatar=({className:a,src:l,alt:n="avatar"})=>e.createElement("img",{className:t("maxio-avatar",a),alt:n,src:l}),exports.Banner=({children:a,title:l,linkText:n,linkExternal:i,href:o,display:r="inline",sentiment:s="info",onDismiss:c,className:m})=>{if(!a&&!l)return console.warn("Banner component requires either children or title prop to be rendered"),null;const d=t("maxio-banner",{[`maxio-banner--${s}`]:"info"!==s&&s,className:m}),u={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[s],x=t("maxio-banner__content",{"maxio-banner__content--block":"block"===r});return e.createElement("div",{className:d,"aria-live":"assertive"},e.createElement(b,{variant:u,className:"maxio-banner__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-banner__container"},e.createElement("div",{className:x},l&&e.createElement("span",{className:"maxio-banner__title"},l),a&&e.createElement("span",{className:"maxio-banner__message"},a),n&&o&&e.createElement(_,{href:o,..."warning"!==s&&{variant:"inverse"},underline:!0,...i?{external:!0}:{}},n))),c&&e.createElement(C,{icon:e.createElement(b,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:c,className:"maxio-banner__dismiss"}))},exports.Body=de,exports.Breadcrumbs=({className:a,children:l,...n})=>{const i=e.Children.count(l);if(0===i)throw new Error(D);const o=e.Children.map(l,(t,a)=>{if(e.isValidElement(t)&&t.type===$){if(a===i-1&&t.props.href)throw new Error(O);return e.cloneElement(t,{"aria-current":a===i-1?"page":void 0})}throw new Error(z)});return e.createElement("nav",{"aria-label":"Breadcrumb",...n},e.createElement("ol",{className:t("maxio-breadcrumbs",a)},o))},exports.BreadcrumbsItem=$,exports.Button=k,exports.Card=Xe,exports.Checkbox=q,exports.CheckboxGroup=({helperText:l,className:n,errorMessage:o,children:r,disabled:s,label:c,defaultValue:m,name:d,...u})=>{var x;const p=i.useCheckboxGroupState({defaultValue:m,name:d,errorMessage:o,description:l,label:c,isDisabled:s,isInvalid:!!o,...u}),{groupProps:g,labelProps:v,descriptionProps:b,errorMessageProps:f,isInvalid:h}=a.useCheckboxGroup({"aria-label":null===(x=null!=c?c:u["aria-label"])||void 0===x?void 0:x.toString(),isDisabled:s,isInvalid:!!o,...u},p),E=t("maxio-checkbox-group",{"maxio-checkbox-group--disabled":s},n),_=l&&!o;return e.createElement("div",{className:E,...g},c&&e.createElement("label",{className:"maxio-checkbox-group__label",...v},c),e.createElement(W.Provider,{value:p},r),_&&e.createElement(G,{...b},l),o&&h&&e.createElement(U,{...f},o))},exports.Chip=({label:l,onDismiss:i,dismissLabel:o,leadingIcon:r,trailingIcon:s,title:c,...m})=>{const d=e.useRef(null),u=n.useToggleState(m),{buttonProps:x}=a.useToggleButton(m,u,d),p=t("maxio-chip",{"maxio-chip--selected":null==u?void 0:u.isSelected}),g=t("maxio-chip__button",{"maxio-chip--dismissible":i});return e.createElement("div",{className:p},e.createElement("button",{className:g,ref:d,...x,title:c},r&&e.createElement(b,{variant:r,className:"maxio-chip__icon"}),e.createElement("span",{className:"maxio-chip__label"},l),s&&!i&&e.createElement(b,{variant:s,className:"maxio-chip__icon"})),i&&e.createElement(dt,{onPress:i,"aria-label":o}))},exports.Code=({as:a="div",children:l,className:n,...i})=>{const o=a,r=t("maxio-code",n);return e.createElement(o,{className:r,...i},l)},exports.ComboBox=Ne,exports.DataTable=({pattern:t,size:a="md",SubRowComponent:n,onExpand:i,onSelect:o,onSort:r,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:m,columns:d,actions:u,actionsColumnSize:x,onRowAction:p,state:g,...v})=>{var b,f;const h=(({columns:t,HeaderControls:a,RowControls:l,RowActions:n,actions:i,actionsColumnSize:o,enableExpanding:r,enableRowSelection:s})=>e.useMemo(()=>{const c={id:M,size:40,header:t=>e.createElement(a,{...t,enableExpanding:r,enableRowSelection:s}),cell:t=>e.createElement(l,{...t,enableExpanding:r}),meta:{controls:!0}},m=i&&n?{id:B,size:null!=o?o:40,header:"",cell:t=>e.createElement(n,null,i(t.row,t.table)),meta:{actions:!0}}:null;let d=[...t];return s&&(d=[c,...d]),m&&(d=[...d,m]),d},[i,o,n,r,s,t,a,l]))({columns:d,HeaderControls:K,RowControls:Y,RowActions:Z,actions:u,actionsColumnSize:x,enableRowSelection:c,enableExpanding:Boolean(m)}),E=l.useReactTable({state:{...g,columnPinning:{left:[...c?[M]:[],...J(null===(b=null==g?void 0:g.columnPinning)||void 0===b?void 0:b.left)],right:[...J(null===(f=null==g?void 0:g.columnPinning)||void 0===f?void 0:f.right),...u?[B]:[]]}},getSubRows:e=>e.subRows,getCoreRowModel:l.getCoreRowModel(),enableRowSelection:c,enableExpanding:Boolean(m),...!v.manualExpanding&&{getExpandedRowModel:l.getExpandedRowModel()},enableSorting:s,...!v.manualSorting&&{getSortedRowModel:l.getSortedRowModel()},columns:h,...v}),_=E.getCanSomeRowsExpand(),N=E.getState();return e.useEffect(()=>{null==i||i(N.expanded)},[i,N.expanded]),e.useEffect(()=>{null==o||o(N.rowSelection)},[o,N.rowSelection]),e.useEffect(()=>{null==r||r(N.sorting)},[r,N.sorting]),e.createElement(L,{pattern:t,size:a,isExpandable:_,isUsingCustomRow:!!n},e.createElement(A,null,E.getHeaderGroups().map(t=>e.createElement(F,{key:t.id,table:E,isHeader:!0},t.headers.map(t=>e.createElement(H,{key:t.id,table:E,header:t,enableExpanding:m},l.flexRender(t.column.columnDef.header,t.getContext())))))),e.createElement(V,null,E.getRowModel().rows.map(a=>e.createElement(X,{key:a.id,row:a,pattern:t,SubRowComponent:n,enableExpanding:m,onRowAction:p}))))},exports.Display=({as:a="div",children:l,size:n="md",className:i,...o})=>{const r=a,s=t(`maxio-display-${n}`,i);return e.createElement(r,{className:s,...o},l)},exports.Drawer=({open:a,onOpenChange:l,placement:n="right",backdrop:i="dim",size:r="md",className:s,title:c,description:m,children:d,footer:u})=>{const x=e.useId(),p={"data-placement":n,"data-size":r};return e.createElement(o.ModalOverlay,{isOpen:a,onOpenChange:l,isDismissable:!0,className:t("maxio-drawer__backdrop",{"maxio-drawer__backdrop--dim":"dim"===i})},e.createElement(o.Modal,{className:t("maxio-drawer",s),...p},e.createElement(o.Dialog,{className:"maxio-drawer__dialog","aria-labelledby":x},({close:t})=>e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-drawer__header"},e.createElement("div",{className:"maxio-drawer__title-group"},e.createElement(te,{id:x,size:"md",className:"maxio-drawer__title"},c),m&&e.createElement("p",{className:"maxio-drawer__description"},m)),e.createElement(C,{"aria-label":"Close",onClick:t,icon:e.createElement(b,{variant:"cross"}),variant:"ghost",size:"sm",className:"maxio-drawer__close"})),e.createElement("div",{className:"maxio-drawer__body"},d),null!=u&&e.createElement("div",{className:"maxio-drawer__footer"},u)))))},exports.Flex=mt,exports.FormErrorMessage=U,exports.FormHelperText=G,exports.GlobalToastProvider=({children:t,toastQueue:a,...l})=>{const n=m.useToastQueue(a),i=e.useCallback(()=>{n.visibleToasts.forEach(e=>{a.close(e.key)})},[n.visibleToasts,a]),o=e.useMemo(()=>({addToast:a.add.bind(a),removeToast:a.clear.bind(a),removeAllToasts:i,state:n}),[a,i,n]);return e.createElement(st.Provider,{value:o},t,n.visibleToasts.length>0&&e.createElement(rt,{...l,state:n}))},exports.Grid=({children:a,templateColumns:l,templateRows:n,autoColumns:i,autoRows:o,inline:r,column:s,columnStart:c,columnEnd:m,row:d,rowStart:u,rowEnd:x,gap:p,gapX:g,gapY:v,className:b,justifyContent:f,alignItems:h,...E})=>{const _=t(b,{"maxio-grid":!r,"maxio-inline-grid":r,[`maxio-grid-cols-${l}`]:l,[`maxio-grid-rows-${n}`]:n,[`maxio-auto-cols-${i}`]:i,[`maxio-auto-rows-${o}`]:o,["maxio-col-"+("auto"===s?"auto":`span-${s}`)]:s,[`maxio-col-start-${c}`]:c,[`maxio-col-end-${m}`]:m,["maxio-row-"+("auto"===d?"auto":`span-${d}`)]:d,[`maxio-row-start-${u}`]:u,[`maxio-row-end-${x}`]:x,[`maxio-gap-${p}`]:void 0!==p,[`maxio-gap-x-${g}`]:void 0!==g,[`maxio-gap-y-${v}`]:void 0!==v,[`maxio-justify-${f}`]:f,[`maxio-items-${h}`]:h});return e.createElement("div",{className:_||void 0,...E},a)},exports.Heading=te,exports.Icon=b,exports.IconButton=C,exports.Label=({as:a="div",children:l,size:n="sm",className:i,...o})=>{const r=a,s=t(`maxio-label-${n}`,i);return e.createElement(r,{className:s,...o},l)},exports.Link=_,exports.ListBox=ve,exports.LoadingSpinner=N,exports.Logo=it,exports.Menu=({children:t})=>e.createElement(P,null,e.createElement(T,null,t)),exports.MenuButton=({children:a,iconName:l="chevron-down","aria-label":n,size:i="md",variant:o="secondary"})=>{const r=t({"maxio-action-menu__chevron":"chevron-down"===l}),s=t("maxio-button",`maxio-button--${o}`,`maxio-button--${i}`,{"maxio-button--icon":l&&!a}),{isOpen:c,buttonId:m,controlsId:d}=R();return e.createElement("summary",{className:s,"aria-haspopup":"true","aria-label":n,"aria-expanded":c,"aria-controls":d,id:m},a&&e.createElement("span",null,a),l&&e.createElement(b,{variant:l,className:`${r} maxio-button__trailing-element`}))},exports.MenuList=({items:a,alignItemsEnd:l=!1})=>{const n=t("maxio-action-menu__content",{"maxio-action-menu__content--align-end":l}),{controlsId:i,buttonId:o}=R();return e.createElement("div",{className:n,role:"presentation"},e.createElement(E,{role:"menu",itemProps:{role:"menuitem"},id:i,"aria-labelledby":o,items:a}))},exports.OverlayTrigger=re,exports.Pagination=({size:t="md",onChange:a,totalItems:l=0,itemsPerPage:n=30,currentPage:i=1,pageSizeOptions:o,manualPageInput:r=!1})=>{const[s,c]=e.useState(i),[m,d]=e.useState(n),[u,x]=e.useState(i.toString());e.useEffect(()=>{x(s.toString())},[s]);const p=Math.ceil(l/m),g=s<p,v=s>1,f=m*(s-1)+1,h=Math.min(m*s,l),E=o.map(e=>({label:e.toString(),value:e.toString()})),_=Array.from({length:p},(e,t)=>t+1).map(e=>({label:e.toString(),value:e.toString()})),N=e=>{c(e),null==a||a({currentPage:e,itemsPerPage:m})},w=e=>{const t=parseInt(e,10);if(isNaN(t))return void x(s.toString());const a=Math.max(1,Math.min(t,p));x(a.toString()),N(a)};return e.createElement("div",{className:"maxio-pagination"},e.createElement("div",{className:"maxio-pagination__items-per-page"},e.createElement("label",{htmlFor:"items-per-page-large",className:"maxio-pagination__label"},"Items per page"),e.createElement(Ce,{inline:!0,size:t,options:E,onChange:e=>{return t=Number(e.target.value),d(t),c(1),void(null==a||a({currentPage:1,itemsPerPage:t}));var t},value:m,id:"items-per-page-large"})),e.createElement("div",{className:"maxio-pagination__total-items"},e.createElement("span",null,f,"–",h," of ",l," items")),e.createElement("div",{className:"maxio-pagination__current-page"},r?e.createElement(ke,{className:"maxio-pagination__page-input",value:u,min:1,max:p,onChange:e=>(e=>{x(e)})(e),onBlur:e=>{w(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(w(e.currentTarget.value),e.currentTarget.blur())},"aria-label":"Page number",size:t,type:"number",onWheel:e=>e.preventDefault()}):e.createElement(Ce,{inline:!0,size:t,"aria-label":"Select page",onChange:e=>N(Number(e.target.value)),value:s,options:_,id:"page-index-large"}),e.createElement("div",{className:"maxio-pagination__label"},"of ",p," pages")),e.createElement("div",{className:"maxio-pagination__controls"},e.createElement(me,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(C,{icon:e.createElement(b,{variant:"chevron-left"}),size:t,variant:"ghost",onClick:()=>N(s-1),"aria-label":"Previous",disabled:!v})),e.createElement(me,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(C,{icon:e.createElement(b,{variant:"chevron-right"}),size:t,variant:"ghost",onClick:()=>N(s+1),"aria-label":"Next",disabled:!g}))))},exports.Popover=be,exports.ProgressBar=({label:l,helperText:n,size:i="md",variant:o="default",status:r,value:s,maxValue:c=100})=>{const m=a.useId(),d=a.useId(),u=r&&!!l&&!!s&&!("inline"===o),x=n&&!("inline"===o),p=n&&"inline"===o,{progressBarProps:g,labelProps:v}=a.useProgressBar({maxValue:c,value:s,label:l}),b=t("maxio-progress-bar",{"maxio-progress-bar--lg":"lg"===i,"maxio-progress-bar--success":s&&!("inline"===o)&&"success"===r,"maxio-progress-bar--error":s&&!("inline"===o)&&"error"===r,"maxio-progress-bar--indent":"indent"===o,"maxio-progress-bar--inline":"inline"===o,"maxio-progress-bar--indeterminate":void 0===s});return e.createElement("div",{className:b,...g},e.createElement("div",{id:m,className:"maxio-progress-bar__label",...v},l),p&&e.createElement("div",{id:d,className:"maxio-progress-bar__helper-text"},n),e.createElement("div",{className:"maxio-progress-bar__track"},e.createElement("div",{className:"maxio-progress-bar__progress",style:{"--tw-scale-x":`${s}%`}})),u&&e.createElement("div",{className:`maxio-progress-bar__${r}-icon`}),x&&e.createElement("div",{id:d,className:"maxio-progress-bar__helper-text"},n))},exports.Radio=({indent:l=!1,disabled:n=!1,invalid:i=!1,label:o,...r})=>{const s=e.useRef(null),c=e.useContext(we),{inputProps:m,isDisabled:d}=a.useRadio({...r,value:(r.value||"").toString(),"aria-label":r["aria-label"]||o,isDisabled:n},c,s),u=t("maxio-radio",{"maxio-radio--indent":l,"maxio-radio--disabled":d||c.isDisabled,"maxio-radio--error":i||c.isInvalid});return e.createElement("label",{className:u},e.createElement("input",{ref:s,role:"radio",type:"radio",className:"maxio-radio__input",...m,name:c.name||m.name}),e.createElement("span",{className:"maxio-radio__control"}),e.createElement("span",{className:"maxio-radio__label"},o))},exports.RadioGroup=({children:t,label:l,errorMessage:n,helperText:i,disabled:o=!1,invalid:r=!1,name:s,defaultValue:m,...d})=>{const u=c.useRadioGroupState({isDisabled:o,isInvalid:r,description:i,name:s,label:l,errorMessage:n,defaultValue:m,...d}),{radioGroupProps:x,labelProps:p,descriptionProps:g,errorMessageProps:v}=a.useRadioGroup({"aria-label":d["aria-label"]||l,...d},u);return e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-radio-group",...x},l&&e.createElement("label",{className:"maxio-radio-group__label",...p},l),e.createElement(we.Provider,{value:u},t),r&&n&&e.createElement(U,{...v},n),i&&!r&&e.createElement(G,{...g},i)))},exports.SegmentedControl=Pe,exports.Select=Ce,exports.SideNav=({withIcons:t=!0,shouldToggleSidebar:a=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:o,onChange:r})=>e.createElement(ze,{isOpen:o,onChange:r,collapseBreakpoint:i,withIcons:t,shouldToggleSidebar:a,topDropdownItems:l,sections:n},e.createElement(He,null)),exports.Tab=qe,exports.TabList=({children:a,className:l,ariaLabel:n,...i})=>{const{variant:o,withDivider:r,currentIndex:s,onChange:c}=We(),m=t("maxio-tabs",l,{"maxio-tabs--contained":"contained"===o,"maxio-tabs--divider":r}),d=e.useRef(null),u=()=>e.Children.map(a,e=>e.props);return e.createElement("div",{className:m,role:"tablist","aria-label":n,"aria-orientation":"horizontal",ref:d,onKeyDown:e=>{var t;"ArrowRight"===e.key&&c(e=>((e,t)=>{const a=t.findIndex((t,a)=>!t.disabled&&a>e);return-1===a?e:a})(e,u())),"ArrowLeft"===e.key&&c(e=>Ue(e,u())),null===(t=d.current)||void 0===t||t.focus()},...i},e.Children.map(a,(t,a)=>{if(e.isValidElement(t)&&t.type===qe)return e.cloneElement(t,{value:a,isCurrent:s===a});throw new Error("You can only pass <Tab /> component as children")}))},exports.TabPanel=Ge,exports.TabPanels=({children:t})=>{const{currentIndex:a}=We();return e.createElement(e.Fragment,null,e.Children.map(t,(t,l)=>{if(e.isValidElement(t)&&t.type===Ge)return l===a?e.cloneElement(t,{value:l}):null;throw new Error("You can only pass <TabPanel /> component as children")}))},exports.Tabs=({children:t,variant:a="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:o})=>e.createElement(je,{defaultIndex:n,variant:a,withDivider:l,index:i,onChange:o},t),exports.Tag=({children:a,size:l,sentiment:n,kind:i="primary",leadingIcon:o,trailingIcon:r})=>{const s=t("maxio-tag",`maxio-tag--${i}`,!!n&&`maxio-tag--${n}`,!!l&&`maxio-tag--${l}`);return e.createElement("div",{className:s},o&&e.createElement(b,{variant:o,className:"maxio-tag__icon"}),e.createElement("span",{className:"maxio-tag__label"},a),r&&e.createElement(b,{variant:r,className:"maxio-tag__icon"}))},exports.TextField=ye,exports.TextInput=ke,exports.Tile=({children:a,className:l,href:n,onClick:i,target:o,disabled:r})=>{const s=n||i;if(!s)return e.createElement("div",{className:"maxio-tile"},a);const c=t("maxio-tile",l,{"maxio-tile--clickable":s,"maxio-tile--disabled":r});return e.createElement("a",{className:c,href:n,target:o,onClick:e=>{r&&n&&e.preventDefault(),!r&&i&&i()}},a)},exports.ToastProvider=({children:t,...a})=>{const{maxVisibleToasts:l=5,...n}=a,i=m.useToastState({maxVisibleToasts:l,...n});return e.useEffect(()=>{console.warn("ToastProvider is deprecated. Please use the global toast API instead.")},[]),e.createElement(e.Fragment,null,t(i),i.visibleToasts.length>0&&e.createElement(rt,{...a,state:i}))},exports.ToastQueue=ct,exports.Toggle=({defaultChecked:a,checked:l,onChange:n,disabled:i,valueDescription:o,valueDescriptionPosition:r,className:s,name:c,id:m,...d})=>{const u=e.useId(),x="boolean"==typeof a,p=m||u,g="left"===r?"row":"row-reverse",v=o&&r,b=e.useCallback(e=>{if("Enter"===e.code||"Space"===e.code){e.preventDefault();const t=e.currentTarget.checked;x&&(e.currentTarget.checked=!t),n&&n(!t,e)}},[x,n]),f=d["aria-label"]||(v?void 0:o);return e.createElement("div",{className:t("maxio-toggle",s,{"maxio-toggle--disabled":i}),style:{display:"inline-flex",flexDirection:g},"data-testid":"toggle-container"},v?e.createElement("label",{className:"maxio-toggle__label",htmlFor:p},o):null,e.createElement("div",{className:"maxio-toggle__container"},e.createElement("input",{type:"checkbox",defaultChecked:a,checked:l,onChange:e=>{n&&n(e.target.checked,e)},onKeyDown:b,disabled:i,className:"maxio-toggle__checkbox",id:p,name:c,"aria-label":f}),e.createElement("div",{className:"maxio-toggle__track",role:"switch","aria-checked":l,"aria-hidden":"true"},e.createElement("div",{className:"maxio-toggle__handle"}),e.createElement("span",{className:"maxio-toggle__icon"},e.createElement("i",{className:"maxio-toggle__icon-on"})),e.createElement("span",{className:"maxio-toggle__icon"},e.createElement("i",{className:"maxio-toggle__icon-off"})))))},exports.Tooltip=se,exports.TooltipTrigger=me,exports.TopBar=({children:t,actions:a,sideNavIsClosed:l,openSideNav:n})=>e.createElement("nav",{className:"maxio-top-bar"},l&&e.createElement(C,{"aria-label":"Open Side Navigation",variant:"ghost",icon:e.createElement(b,{variant:"sidebar"}),onClick:n}),e.createElement(mt,{grow:!0,justifyContent:"end"},t),a),exports.useHover=ie,exports.useOverlayTrigger=ne,exports.useToast=()=>{const t=e.useContext(st);if(!t)throw new Error("useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.");return t},exports.useWindowSize=oe;
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/components/Logo/logo.svg"],"sourcesContent":["<svg\n id=\"logo-svg\"\n data-name=\"Maxio Logo SVG\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 1036 240\"\n>\n <path d=\"M59.32,11.3L70.64,0h0s40.74,40.35,40.74,40.35v70.99H40.89L0,70.52l11.15-11.14,36.2,36.15h30.07l3.07-3.39L29.58,40.99l10.99-10.97,51.24,50.83,3.72-3.38v-30.34L59.32,11.3Z\" />\n <path d=\"M180.68,11.3L169.36,0h0s-40.73,40.35-40.73,40.35v70.99h70.48l40.89-40.83-11.15-11.14-36.2,36.15h-30.06l-3.07-3.39,50.91-51.15-10.99-10.97-51.24,50.83-3.72-3.38v-30.34l36.2-35.83Z\" />\n <path d=\"M59.32,228.7l11.31,11.29h0s40.74-40.35,40.74-40.35v-70.99H40.89L0,169.48l11.15,11.14,36.2-36.15h30.07l3.07,3.39-50.92,51.15,10.99,10.97,51.24-50.83,3.72,3.38v30.34l-36.2,35.83Z\" />\n <path d=\"M180.68,228.7l-11.32,11.29-40.73-40.35v-70.99h70.48l40.89,40.83-11.15,11.14-36.2-36.15h-30.06l-3.07,3.39,50.91,51.15-10.99,10.97-51.24-50.83-3.72,3.38v30.34l36.2,35.83Z\" />\n <path d=\"M1015.27,139.55c0-29.94-23.74-53.46-52.11-53.46-28.37,0-52.11,23.52-52.11,53.46s23.74,53.46,52.11,53.46,52.11-23.52,52.11-53.46ZM1035.59,140.5c-.5,40.27-32.73,72.76-72.43,72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71,72.44-73.71h.94c39.57.52,71.5,33.32,71.5,73.71v.95Z\" />\n <path fill-rule=\"evenodd\" d=\"M870.39,24h-20.33v20.33h20.33v-20.33ZM870.39,64.67h-20.33v148.59h20.33V64.67Z\" />\n <path fill-rule=\"evenodd\" d=\"M850.05,24h20.33v20.33h-20.33v-20.33Z\" />\n <path fill-rule=\"evenodd\" d=\"M695.01,82.85l50.83,56.28v6.53l-50.28,55.67,15.23,13.2,49.22-54.49h4.71l49.22,54.49,15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15,55.52h-3.96l-50.15-55.52-15.23,13.2Z\" />\n <path fill-rule=\"evenodd\" d=\"M660.49,78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13,0-52.44,18.93-58.09,44.86l-.28,1.27,19.33,3.72.31-1.14c2.39-8.91,6.66-16.54,13.04-21.94,6.36-5.39,14.91-8.63,26.02-8.63s19.12,3.25,24.76,8.96c5.64,5.72,8.73,14.06,8.73,24.53v6.11l-36.67,7.59-3.26.68c-16.14,3.47-29.79,7.84-39.59,14.45-10.54,7.11-16.64,16.83-16.64,30.62,0,12.51,4.51,22.62,12.5,29.59,7.96,6.95,19.25,10.67,32.63,10.67,22.27,0,41.87-12.03,51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58ZM620.4,146.77c-12.86,2.77-23.05,5.42-30.03,9.63-3.46,2.09-6.08,4.54-7.84,7.54-1.76,3-2.71,6.62-2.71,11.15,0,6.38,2.1,12.12,6.32,16.27,4.22,4.14,10.7,6.82,19.7,6.82,26.85,0,47.46-20.48,47.46-51.36v-7.2l-32.9,7.14Z\" />\n <path d=\"M434.8,188.74h4.54l61.73-164.33.15-.41h35.57v189.35h-20.89V55.37h-4.33l-59.7,157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98h-20.88V24h35.57l63.23,164.74Z\" />\n</svg>\n"],"names":["_path","_path2","_path3","_path4","_extends","Object","assign","bind","n","e","arguments","length","t","r","hasOwnProperty","call","apply","SvgLogo","props","React","createElement","xmlns","viewBox","d","fillRule"],"mappings":"khqCAAA,IAAIA,GAAOC,GAAQC,GAAQC,GAC3B,SAASC,KAAa,OAAOA,GAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUC,GAAK,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAAIF,UAAUD,GAAI,IAAK,IAAII,KAAKD,GAAG,CAAG,GAAEE,eAAeC,KAAKH,EAAGC,KAAOL,EAAEK,GAAKD,EAAEC,GAAK,CAAE,OAAOL,CAAG,EAAGJ,GAASY,MAAM,KAAMN,UAAY,CAEnR,MAAMO,GAAUC,GAAsBC,EAAMC,cAAc,MAAOhB,GAAS,CACxEiB,MAAO,6BACP,YAAa,iBACbC,QAAS,gBACRJ,GAAQlB,KAAUA,GAAqBmB,EAAMC,cAAc,OAAQ,CACpEG,EAAG,m3BACAtB,KAAWA,GAAsBkB,EAAMC,cAAc,OAAQ,CAChEI,SAAU,UACVD,EAAG,iEACArB,KAAWA,GAAsBiB,EAAMC,cAAc,OAAQ,CAChEI,SAAU,UACVD,EAAG,s3BACApB,KAAWA,GAAsBgB,EAAMC,cAAc,OAAQ,CAChEG,EAAG"}
1
+ {"version":3,"file":"index.js","sources":["../src/components/Logo/logo.svg"],"sourcesContent":["<svg\n id=\"logo-svg\"\n data-name=\"Maxio Logo SVG\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 1036 240\"\n>\n <path d=\"M59.32,11.3L70.64,0h0s40.74,40.35,40.74,40.35v70.99H40.89L0,70.52l11.15-11.14,36.2,36.15h30.07l3.07-3.39L29.58,40.99l10.99-10.97,51.24,50.83,3.72-3.38v-30.34L59.32,11.3Z\" />\n <path d=\"M180.68,11.3L169.36,0h0s-40.73,40.35-40.73,40.35v70.99h70.48l40.89-40.83-11.15-11.14-36.2,36.15h-30.06l-3.07-3.39,50.91-51.15-10.99-10.97-51.24,50.83-3.72-3.38v-30.34l36.2-35.83Z\" />\n <path d=\"M59.32,228.7l11.31,11.29h0s40.74-40.35,40.74-40.35v-70.99H40.89L0,169.48l11.15,11.14,36.2-36.15h30.07l3.07,3.39-50.92,51.15,10.99,10.97,51.24-50.83,3.72,3.38v30.34l-36.2,35.83Z\" />\n <path d=\"M180.68,228.7l-11.32,11.29-40.73-40.35v-70.99h70.48l40.89,40.83-11.15,11.14-36.2-36.15h-30.06l-3.07,3.39,50.91,51.15-10.99,10.97-51.24-50.83-3.72,3.38v30.34l36.2,35.83Z\" />\n <path d=\"M1015.27,139.55c0-29.94-23.74-53.46-52.11-53.46-28.37,0-52.11,23.52-52.11,53.46s23.74,53.46,52.11,53.46,52.11-23.52,52.11-53.46ZM1035.59,140.5c-.5,40.27-32.73,72.76-72.43,72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71,72.44-73.71h.94c39.57.52,71.5,33.32,71.5,73.71v.95Z\" />\n <path fill-rule=\"evenodd\" d=\"M870.39,24h-20.33v20.33h20.33v-20.33ZM870.39,64.67h-20.33v148.59h20.33V64.67Z\" />\n <path fill-rule=\"evenodd\" d=\"M850.05,24h20.33v20.33h-20.33v-20.33Z\" />\n <path fill-rule=\"evenodd\" d=\"M695.01,82.85l50.83,56.28v6.53l-50.28,55.67,15.23,13.2,49.22-54.49h4.71l49.22,54.49,15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15,55.52h-3.96l-50.15-55.52-15.23,13.2Z\" />\n <path fill-rule=\"evenodd\" d=\"M660.49,78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13,0-52.44,18.93-58.09,44.86l-.28,1.27,19.33,3.72.31-1.14c2.39-8.91,6.66-16.54,13.04-21.94,6.36-5.39,14.91-8.63,26.02-8.63s19.12,3.25,24.76,8.96c5.64,5.72,8.73,14.06,8.73,24.53v6.11l-36.67,7.59-3.26.68c-16.14,3.47-29.79,7.84-39.59,14.45-10.54,7.11-16.64,16.83-16.64,30.62,0,12.51,4.51,22.62,12.5,29.59,7.96,6.95,19.25,10.67,32.63,10.67,22.27,0,41.87-12.03,51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58ZM620.4,146.77c-12.86,2.77-23.05,5.42-30.03,9.63-3.46,2.09-6.08,4.54-7.84,7.54-1.76,3-2.71,6.62-2.71,11.15,0,6.38,2.1,12.12,6.32,16.27,4.22,4.14,10.7,6.82,19.7,6.82,26.85,0,47.46-20.48,47.46-51.36v-7.2l-32.9,7.14Z\" />\n <path d=\"M434.8,188.74h4.54l61.73-164.33.15-.41h35.57v189.35h-20.89V55.37h-4.33l-59.7,157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98h-20.88V24h35.57l63.23,164.74Z\" />\n</svg>\n"],"names":["_path","_path2","_path3","_path4","_extends","Object","assign","bind","n","e","arguments","length","t","r","hasOwnProperty","call","apply","SvgLogo","props","React","createElement","xmlns","viewBox","d","fillRule"],"mappings":"0rqCAAA,IAAIA,GAAOC,GAAQC,GAAQC,GAC3B,SAASC,KAAa,OAAOA,GAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUC,GAAK,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAAIF,UAAUD,GAAI,IAAK,IAAII,KAAKD,GAAG,CAAG,GAAEE,eAAeC,KAAKH,EAAGC,KAAOL,EAAEK,GAAKD,EAAEC,GAAK,CAAE,OAAOL,CAAG,EAAGJ,GAASY,MAAM,KAAMN,UAAY,CAEnR,MAAMO,GAAUC,GAAsBC,EAAMC,cAAc,MAAOhB,GAAS,CACxEiB,MAAO,6BACP,YAAa,iBACbC,QAAS,gBACRJ,GAAQlB,KAAUA,GAAqBmB,EAAMC,cAAc,OAAQ,CACpEG,EAAG,m3BACAtB,KAAWA,GAAsBkB,EAAMC,cAAc,OAAQ,CAChEI,SAAU,UACVD,EAAG,iEACArB,KAAWA,GAAsBiB,EAAMC,cAAc,OAAQ,CAChEI,SAAU,UACVD,EAAG,s3BACApB,KAAWA,GAAsBgB,EAAMC,cAAc,OAAQ,CAChEG,EAAG"}
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: maxio-react
3
+ description: Build interfaces using the Maxio Design System. Use when creating or editing React components in Maxio applications.
4
+ ---
5
+
6
+ # Maxio React
7
+
8
+ Use this skill to build React components using `@maxio-com/react-ui-components`.
9
+
10
+ ## Workflow
11
+
12
+ 1. Load the relevant reference file for each component, pattern, foundation, or deprecated surface the task mentions.
13
+ 2. Import components from `@maxio-com/react-ui-components` unless a local package source edit requires a relative import.
14
+ 3. Use the Prop Types section as the component prop contract.
15
+ 4. Ensure the Maxio UI CSS from `https://ui.maxio.com/{version}/styles.css` is loaded by the consuming app.
16
+ 5. Preserve accessibility props shown in the references, especially labels, ARIA attributes, keyboard behavior, and React Aria-backed component requirements.
17
+ 6. Inspect package source files when generated story snippets or prop details are insufficient for the task.
18
+
19
+ ## References
20
+
21
+ - [Foundations / Start Here](references/foundations-start-here.md)
22
+ - [Foundations / Dark Mode](references/foundations-dark-mode.md)
23
+ - [Foundations / Design Tokens / About](references/foundations-design-tokens-about.md)
24
+ - [Foundations / Design Tokens / Colors / Primitive Colors](references/foundations-design-tokens-colors-primitive-colors.md)
25
+ - [Foundations / Design Tokens / Colors / Semantic Colors](references/foundations-design-tokens-colors-semantic-colors.md)
26
+ - [Components / Action List](references/components-action-list.md)
27
+ - [Components / Action Menu](references/components-action-menu.md)
28
+ - [Components / Avatar](references/components-avatar.md)
29
+ - [Components / Breadcrumbs](references/components-breadcrumbs.md)
30
+ - [Components / Buttons / Button](references/components-buttons-button.md)
31
+ - [Components / Buttons / IconButton](references/components-buttons-iconbutton.md)
32
+ - [Components / Card](references/components-card.md)
33
+ - [Components / Chip](references/components-chip.md)
34
+ - [Components / Data Table](references/components-data-table.md)
35
+ - [Components / Drawer](references/components-drawer.md)
36
+ - [Components / Flex](references/components-flex.md)
37
+ - [Components / Forms / Checkbox](references/components-forms-checkbox.md)
38
+ - [Components / Forms / ComboBox](references/components-forms-combobox.md)
39
+ - [Components / Forms / Radio Group](references/components-forms-radio-group.md)
40
+ - [Components / Forms / Select](references/components-forms-select.md)
41
+ - [Components / Forms / TextField](references/components-forms-textfield.md)
42
+ - [Components / Grid](references/components-grid.md)
43
+ - [Components / Icon](references/components-icon.md)
44
+ - [Components / Link](references/components-link.md)
45
+ - [Components / ListBox](references/components-listbox.md)
46
+ - [Components / Loading Spinner](references/components-loading-spinner.md)
47
+ - [Components / Logo](references/components-logo.md)
48
+ - [Components / Notifications / Alert](references/components-notifications-alert.md)
49
+ - [Components / Notifications / Banner](references/components-notifications-banner.md)
50
+ - [Components / Notifications / Toast](references/components-notifications-toast.md)
51
+ - [Components / Pagination](references/components-pagination.md)
52
+ - [Components / Popover](references/components-popover.md)
53
+ - [Components / ProgressBar](references/components-progressbar.md)
54
+ - [Components / SegmentedControl](references/components-segmentedcontrol.md)
55
+ - [Components / Tabs](references/components-tabs.md)
56
+ - [Components / Tag](references/components-tag.md)
57
+ - [Components / Tile](references/components-tile.md)
58
+ - [Components / Toggle](references/components-toggle.md)
59
+ - [Components / Tooltip](references/components-tooltip.md)
60
+ - [Components / Typography / Body](references/components-typography-body.md)
61
+ - [Components / Typography / Code](references/components-typography-code.md)
62
+ - [Components / Typography / Display](references/components-typography-display.md)
63
+ - [Components / Typography / Heading](references/components-typography-heading.md)
64
+ - [Components / Typography / Label](references/components-typography-label.md)
65
+ - [Patterns / Auth Layout](references/patterns-auth-layout.md)
66
+ - [Patterns / Side Nav](references/patterns-side-nav.md)
67
+ - [Patterns / Top Bar](references/patterns-top-bar.md)
68
+ - [Deprecated / TextInput](references/deprecated-textinput.md)
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Maxio React"
3
+ short_description: "Build Maxio React components"
4
+ default_prompt: "Use $maxio-react to build a Maxio React component."
@@ -0,0 +1,92 @@
1
+ # ActionList
2
+
3
+ ## Usage Guidelines
4
+
5
+ ### Overview
6
+
7
+ ActionList presents a keyboard-navigable group of related links or commands, with optional icons, descriptions, dividers, and compact density.
8
+
9
+ #### When to Use
10
+
11
+ - Use ActionList when users need to choose from a compact group of related actions or destinations.
12
+ - Use ActionList inside menus, popovers, drawers, or contextual surfaces where each row activates a command or link.
13
+ - Use ActionList when items need supporting icons, descriptions, dividers, or compact density while keeping one consistent interaction model.
14
+
15
+ #### When Not to Use
16
+
17
+ - Do not use ActionList for long-form navigation structures. Use navigation components or plain links instead.
18
+ - Do not use ActionList for selectable form inputs that submit values. Use Select, Radio, Checkbox, or another form control instead.
19
+ - Do not use ActionList for tabular data, summaries, or content lists where rows are not actions.
20
+
21
+ ### Behavior
22
+
23
+ - **Mouse and touch**: clicking or tapping an item follows its link or activates its command.
24
+ - **Keyboard**: Arrow Down and Arrow Up move focus between non-divider items. Enter and Space activate the focused item.
25
+ - **Focus management**: the selected item receives `tabIndex={0}` while other action items receive `tabIndex={-1}`.
26
+ - **Dividers**: divider items separate groups visually and are skipped by keyboard navigation.
27
+ - **Density**: use `small` for dense menus where vertical space is constrained.
28
+
29
+ ### Accessibility
30
+
31
+ - Provide an accessible name for the list with visible text, `aria-label`, or `aria-labelledby`.
32
+ - Use the default listbox and option roles for option-picking patterns.
33
+ - Use `role="menu"` on the list and `role="menuitem"` on items when the list represents a menu of commands.
34
+ - Keep item labels visible and specific enough to describe the action or destination.
35
+ - Keep dividers marked as separators and hidden from assistive technology when they are only visual.
36
+ - Preserve visible focus styling and keyboard activation for custom item content.
37
+
38
+ ### Content
39
+
40
+ - Start command labels with a verb when the item performs an action.
41
+ - Use destination names when the item navigates to a known resource.
42
+ - Add descriptions only when users need more context to distinguish nearby choices.
43
+ - Use leading icons to aid recognition, not as the only label.
44
+ - Use dividers sparingly to group related actions.
45
+
46
+ ### Related
47
+
48
+ - **[ActionMenu](components-action-menu.md)**: use when the action list should be opened from a trigger and dismissed as an overlay.
49
+ - **[Link](components-link.md)**: use for standalone text navigation.
50
+ - **[Button](components-buttons-button.md)**: use for a single page-level action.
51
+
52
+ ## React
53
+
54
+ ```tsx
55
+ import { ActionList } from '@maxio-com/react-ui-components';
56
+ ```
57
+
58
+ ## Imports
59
+
60
+ ```tsx
61
+ import { ActionList } from "@maxio-com/react-ui-components";
62
+ ```
63
+
64
+ ## Prop Types
65
+
66
+ ### ActionList
67
+
68
+ | Prop | Type | Required | Default | Description | Source |
69
+ | --- | --- | --- | --- | --- | --- |
70
+ | `isShadowed` | `boolean` | no | `true` | Wheateher the list should be rendered with a shadow. | ActionListProps |
71
+ | `itemProps` | `Omit<ActionItemProps, "item" \| "isSelected">` | no | `{}` | The props to pass to each item. | ActionListProps |
72
+ | `items` | `ActionListItem[]` | yes | - | The items to display in the list. | ActionListProps |
73
+ | `small` | `boolean` | no | `false` | Whether the content should be rendered in a small size - smaller vertical padding | ActionListProps |
74
+ | `truncateLabels` | `boolean` | no | `false` | Whether to truncate the labels | ActionListProps |
75
+
76
+ ## Stories
77
+
78
+ ### default
79
+
80
+ Snippet unavailable: SyntaxError: Expected render to be an arrow function or function expression
81
+
82
+ ### focused
83
+
84
+ Snippet unavailable: SyntaxError: Expected render to be an arrow function or function expression
85
+
86
+ ### hovered
87
+
88
+ Snippet unavailable: SyntaxError: Expected render to be an arrow function or function expression
89
+
90
+ ### active
91
+
92
+ Snippet unavailable: SyntaxError: Expected render to be an arrow function or function expression