@maxio-com/react-ui-components 0.0.0-canary.329.cc54db8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.MD +21 -0
- package/README.md +14 -0
- package/dist/index.esm.js +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +62 -0
- package/typings/index.d.ts +713 -0
package/LICENSE.MD
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Maxio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
package/README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# React UI Components
|
|
2
|
+
|
|
3
|
+
UI Components for React Applications. Built with [Maxio CSS Design System 7.8.9](https://maxio-com.github.io/front-end-platform/?path=/docs/design-system_foundations-start-here--docs).
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Make sure to include the snippet with design system stylesheet CSS file on Your page:
|
|
8
|
+
|
|
9
|
+
`<link rel="stylesheet" href="https://ui.maxio.com/7.8.9/styles.css">`
|
|
10
|
+
|
|
11
|
+
or import it in main js file:
|
|
12
|
+
|
|
13
|
+
`import './styles.css';`
|
|
14
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e,{useRef as a,useEffect as t,useState as l,cloneElement as n,isValidElement as i,createContext as o,useId as r,useContext as s,Children as c,useMemo as m,forwardRef as d,useCallback as u,useImperativeHandle as p}from"react";import v from"classnames";import{useId as g,useLink as x,useButton as b,useCheckboxGroupItem as h,useCheckbox as E,useCheckboxGroup as f,useRadio as _,useRadioGroup as N,useTextField as w,useProgressBar as y,useToggleButton as k}from"react-aria";import{flexRender as C,useReactTable as I,getSortedRowModel as P,getExpandedRowModel as S,getCoreRowModel as $}from"@tanstack/react-table";export{createColumnHelper}from"@tanstack/react-table";import{useToggleState as D}from"@react-stately/toggle";import{useCheckboxGroupState as T}from"@react-stately/checkbox";import{AnimatePresence as O,motion as z}from"framer-motion";import{useDismiss as R,useFocus as A,useHover as M,useClick as V,useFloating as H,offset as W,useInteractions as L,useRole as F,FloatingPortal as B}from"@floating-ui/react-dom-interactions";import{useRadioGroupState as q}from"@react-stately/radio";import{useToastState as U,useToastQueue as j,ToastQueue as G}from"@react-stately/toast";import{useToast as Y,useToastRegion as K}from"@react-aria/toast";const X=["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","dropbox","hubspot","sage","oracle","quotapath","avalara","pipedrive","quickbooks","salesforce","xero"],Q=["dropbox","hubspot","sage","oracle","quotapath"],J=["avalara","pipedrive","quickbooks","salesforce","xero"],Z=({variant:a,color:t,className:l,size:n})=>{const i=(e,a)=>a.includes(e),o=i(a,X)||i(a,Q),r=i(a,J),s=v({"fa-kit":o,"fa-kit-duotone":r,"fa-sharp fa-regular":!o&&!r,[`fa-${a}`]:!0,[`fa-${n}`]:n,[`maxio-icon--${t}`]:t&&!i(a,Q)&&!i(a,J)},l);return e.createElement("i",{className:s})},ee=({item:l,isSelected:n,truncateLabel:i=!1,role:o="option",small:r=!1})=>{const s=a(null),c=a(!1),m=g();if(t(()=>{var e;n&&c.current&&(null===(e=s.current)||void 0===e||e.focus())},[n]),t(()=>{c.current=!0},[]),"divider"===l.type)return e.createElement("div",{className:"maxio-action-list__divider",role:"separator","aria-hidden":"true"});const{leadingIconName:d,leadingIconClassName:u,trailingIconName:p,label:x,description:b,link:h}=l,E=v("maxio-action-list__label",{"maxio-truncate":i});return e.createElement("a",{"aria-labelledby":m,...h,className:v("maxio-action-list__content",h.className,{"maxio-action-list__content--size-small":r}),tabIndex:n?0:-1,ref:s,role:o},d&&e.createElement(Z,{variant:d,className:v("maxio-action-list__leading-icon",u)}),e.createElement("span",{className:E,id:m},x),b&&e.createElement("span",{className:"maxio-action-list__description"},b),p&&e.createElement(Z,{variant:p,className:"maxio-action-list__trailing-icon"}))},ae=(e,a,t)=>0===e?e:1===e&&"divider"===a[e-1].type?t||e:"divider"===a[e-1].type?ae(e-1,a,t||e):e-1,te=({items:a,isShadowed:t=!0,itemProps:n={},className:i,truncateLabels:o=!1,small:r=!1,...s})=>{const c=v("maxio-action-list",i,{"maxio-action-list--shadow":t}),[m,d]=l(()=>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=>ae(e,a))),"ArrowDown"===e.code&&(e.preventDefault(),d(e=>((e,a)=>{const t=a.findIndex((a,t)=>"divider"!==a.type&&t>e);return-1===t?e:t})(e,a)))},role:"listbox",...s},a.map((a,t)=>e.createElement(ee,{item:a,truncateLabel:o,key:`listbox-${a.id}`,isSelected:t===m,small:r,...n})))},le=({className:a,children:t,disabled:l,external:n,icon:i,size:o="sm",underline:r,variant:s,...c})=>{const m=v("maxio-link",{[`maxio-link--${o}`]:o,"maxio-link--disabled":l,[`maxio-link--${s}`]:s,"maxio-link--underline":r},a),d=n?"_blank":"_self";return e.createElement("a",{className:m,target:d,...c},t,i&&e.createElement(Z,{variant:i,className:"maxio-link__icon"}))},ne=({size:a="md",white:t=!1,className:l})=>{const n=v("maxio-loading-spinner",l,`maxio-loading-spinner--${a}`,{"maxio-loading-spinner--white":t});return e.createElement("div",{className:n,role:"status","aria-label":"loading"})},ie=({fullWidth:t=!1,leadingElement:l,trailingElement:o,icon:r,variant:s="primary",size:c,...m})=>{const d=a(null),{linkProps:u}=x({...m},d),p=v("maxio-button",m.className,{[`maxio-button--${c}`]:c,[`maxio-button--${s}`]:s,"maxio-button--full-width":t});return e.createElement("a",{...u,ref:d,className:p,href:m.href},l&&n(l,{...i(l)&&{className:"maxio-button__leading-element"}}),m.children,(o||r)&&n(o||r,{...i(o||r)&&{className:"maxio-button__trailing-element"}}))},oe=({disabled:t,loading:l=!1,fullWidth:o=!1,leadingElement:r,trailingElement:s,icon:c,variant:m="primary",size:d,...u})=>{const p=a(null),{buttonProps:g}=b({...u,isDisabled:t,formAction:"string"==typeof u.formAction?u.formAction:void 0},p),x=["primary","danger"].includes(m),h=v("maxio-button",u.className,{[`maxio-button--${d}`]:d,[`maxio-button--${m}`]:m,"maxio-button--loading":l,"maxio-button--full-width":o});return e.createElement("button",{...g,className:h,ref:p},r&&n(r,{...i(r)&&{className:"maxio-button__leading-element"}}),u.children,!l&&(s||c)&&n(s||c,{...i(s||c)&&{className:"maxio-button__trailing-element"}}),l&&e.createElement(ne,{className:"maxio-button__trailing-element",size:"md",white:x}))},re=a=>(e=>"href"in e)(a)?e.createElement(ie,{...a}):e.createElement(oe,{...a}),se=({"aria-label":a,className:t,...l})=>e.createElement(re,{"aria-label":a,className:v("maxio-button--icon",t),...l},null),ce=({children:a,title:t,linkText:l,linkExternal:n,href:i,display:o="inline",sentiment:r="info",onDismiss:s,className:c})=>{if(!a&&!t)return console.warn("Alert component requires either children or title prop to be rendered"),null;const m=v("maxio-alert",{[`maxio-alert--${r}`]:"info"!==r&&r},c),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[r],u=v("maxio-alert__content",{"maxio-alert__content--block":"block"===o});return e.createElement("div",{className:m},e.createElement(Z,{variant:d,className:"maxio-alert__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-alert__container"},e.createElement("div",{className:u},t&&e.createElement("span",{className:"maxio-alert__title"},t),a&&e.createElement("span",{className:"maxio-alert__message"},a),l&&i&&e.createElement(le,{className:"maxio-alert__link",href:i,variant:"high-contrast",underline:!0,...n?{external:!0}:{}},l))),s&&e.createElement(se,{icon:e.createElement(Z,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-alert__dismiss"}))},me=o({}),de=({children:a})=>{const[t,n]=l(!1),i=r(),o=r();return e.createElement(me.Provider,{value:{controlsId:i,buttonId:o,isOpen:t,onClose:()=>n(!1),onOpen:()=>n(!0),onToggle:()=>n(e=>!e)}},a)};function ue(){const e=s(me);if(!e||"object"==typeof e&&0===Object.keys(e).length)throw new Error("useMenu hook must be used within a MenuProvider");return e}const pe=({children:a})=>{const{isOpen:t,onToggle:l,onClose:n}=ue();return e.createElement("details",{open:t,onToggle:l,className:"maxio-action-menu"},"function"==typeof a?a({isOpen:t,onClose:n}):a)},ve=({children:a})=>e.createElement(de,null,e.createElement(pe,null,a)),ge=({items:a,alignItemsEnd:t=!1})=>{const l=v("maxio-action-menu__content",{"maxio-action-menu__content--align-end":t}),{controlsId:n,buttonId:i}=ue();return e.createElement("div",{className:l,role:"presentation"},e.createElement(te,{role:"menu",itemProps:{role:"menuitem"},id:n,"aria-labelledby":i,items:a}))},xe=({children:a,iconName:t="chevron-down","aria-label":l,size:n="md",variant:i="secondary"})=>{const o=v({"maxio-action-menu__chevron":"chevron-down"===t}),r=v("maxio-button",`maxio-button--${i}`,`maxio-button--${n}`,{"maxio-button--icon":t&&!a}),{isOpen:s,buttonId:c,controlsId:m}=ue();return e.createElement("summary",{className:r,"aria-haspopup":"true","aria-label":l,"aria-expanded":s,"aria-controls":m,id:c},a&&e.createElement("span",null,a),t&&e.createElement(Z,{variant:t,className:`${o} maxio-button__trailing-element`}))},be=({className:a,src:t,alt:l="avatar"})=>e.createElement("img",{className:v("maxio-avatar",a),alt:l,src:t}),he=({children:a,title:t,linkText:l,linkExternal:n,href:i,display:o="inline",sentiment:r="info",onDismiss:s,className:c})=>{if(!a&&!t)return console.warn("Banner component requires either children or title prop to be rendered"),null;const m=v("maxio-banner",{[`maxio-banner--${r}`]:"info"!==r&&r,className:c}),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[r],u=v("maxio-banner__content",{"maxio-banner__content--block":"block"===o});return e.createElement("div",{className:m,"aria-live":"assertive"},e.createElement(Z,{variant:d,className:"maxio-banner__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-banner__container"},e.createElement("div",{className:u},t&&e.createElement("span",{className:"maxio-banner__title"},t),a&&e.createElement("span",{className:"maxio-banner__message"},a),l&&i&&e.createElement(le,{href:i,..."warning"!==r&&{variant:"inverse"},underline:!0,...n?{external:!0}:{}},l))),s&&e.createElement(se,{icon:e.createElement(Z,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-banner__dismiss"}))},Ee=({children:a,className:t,href:l,...n})=>{const i=l?e.createElement(le,{size:"sm",href:l},a):a;return e.createElement("li",{className:v("maxio-breadcrumbs__item",t),...n},i)},fe="Breadcrumbs requires at least one BreadcrumbsItem as children",_e='Last BreadcrumbsItem should not have "href" prop. It is the current page.',Ne="Breadcrumbs only accepts BreadcrumbsItem as children",we=({className:a,children:t,...l})=>{const o=c.count(t);if(0===o)throw new Error(fe);const r=c.map(t,(e,a)=>{if(i(e)&&e.type===Ee){if(a===o-1&&e.props.href)throw new Error(_e);return n(e,{"aria-current":a===o-1?"page":void 0})}throw new Error(Ne)});return e.createElement("nav",{"aria-label":"Breadcrumb",...l},e.createElement("ol",{className:v("maxio-breadcrumbs",a)},r))},ye="row-controls",ke="row-actions",Ce=({children:a,pattern:t,size:n,isExpandable:i,isUsingCustomRow:o})=>{const[r,s]=l(!1),[c,m]=l(!1),d=t&&o&&i,u=v("maxio-data-table",{"maxio-data-table--pattern":t&&!d,"maxio-data-table--expanded-child-pattern":d,"maxio-data-table--with-custom-row":o,[`maxio-data-table--${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 a=e.target;s(a.scrollLeft>0),m(a.scrollWidth-a.clientWidth-a.scrollLeft>0)}},e.createElement("table",{className:u},a))},Ie=({children:a})=>e.createElement("thead",null,a),Pe=({children:a})=>e.createElement("tbody",null,a),Se=({children:a,table:t,header:l,className:n,enableExpanding:i,...o})=>{var r,s,c,m,d,u,p,g,x,b,h;const E=null==l?void 0:l.column,f=null===(r=null==E?void 0:E.getCanSort)||void 0===r?void 0:r.call(E),_=null===(s=null==E?void 0:E.getToggleSortingHandler)||void 0===s?void 0:s.call(E),N=null==l?void 0:l.isPlaceholder,w=null===(m=null===(c=null==E?void 0:E.columnDef)||void 0===c?void 0:c.meta)||void 0===m?void 0:m.align,y=null===(u=null===(d=null==E?void 0:E.columnDef)||void 0===d?void 0:d.meta)||void 0===u?void 0:u.width,k=null===(g=null===(p=null==E?void 0:E.columnDef)||void 0===p?void 0:p.meta)||void 0===g?void 0:g.controls,C=null===(b=null===(x=null==E?void 0:E.columnDef)||void 0===x?void 0:x.meta)||void 0===b?void 0:b.actions,I=null==E?void 0:E.getIsPinned(),P=null==E?void 0:E.getIsSorted(),S="asc"===P,$=v("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${I}`]:I,"maxio-data-table__cell--sortable":f,"maxio-data-table__cell--active":P,[`maxio-data-table__cell--${w}`]:w,"maxio-data-table__cell--controls":k,"maxio-data-table__cell--actions":C}),D=y?{width:y}:{},T=((e,a)=>e&&a?"arrow-up":e&&!a?"arrow-down":"arrow-down-up")(!!P,S),O=null==t?void 0:t.getToggleAllRowsExpandedHandler(),z=null===(h=null==t?void 0:t.getIsAllRowsExpanded)||void 0===h?void 0:h.call(t),R=(null==l?void 0:l.headerGroup.headers[0].id)===ye?1:0,A=i&&(null==l?void 0:l.index)===R;return N?null:e.createElement("th",{scope:"col",role:"columnheader","aria-sort":P?S?"ascending":"descending":"none",className:$,onClick:_,colSpan:null==l?void 0:l.colSpan,style:D,...o},e.createElement("div",{className:"maxio-data-table__cell-flex"},i&&A&&e.createElement(se,{size:"sm",variant:"ghost",icon:e.createElement(Z,{size:"xs",variant:z?"chevron-down":"chevron-right"}),onClick:O,"aria-label":z?"Collapse all rows":"Expand all rows","data-open":z,className:"maxio-data-table__expand-button"}),a,f&&e.createElement(Z,{variant:T,className:"maxio-data-table__sort-icon"})))},$e=({children:a,row:t,isChild:l,isHeader:n,className:i})=>{var o,r,s;const c=null===(o=null==t?void 0:t.getIsSelected)||void 0===o?void 0:o.call(t),m=(null===(r=null==t?void 0:t.getCanExpand)||void 0===r?void 0:r.call(t))&&(null===(s=null==t?void 0:t.getIsExpanded)||void 0===s?void 0:s.call(t)),d=v({"maxio-data-table__row":!n,"maxio-data-table__header-row":n,"maxio-data-table__row--active":c,"maxio-data-table__row--expanded":m,"maxio-data-table__row--expanded-child":l},i);return e.createElement("tr",{className:d},a)},De=o({}),Te=d(({checked:a,disabled:t,invalid:l,indeterminate:n,className:i,inputProps:o,error:r,label:s},c)=>{const m=v("maxio-checkbox",{"maxio-checkbox--checked":a,"maxio-checkbox--disabled":t,"maxio-checkbox--error":l,"maxio-checkbox--indeterminate":n},i);return e.createElement("label",{className:m},e.createElement("input",{type:"checkbox",role:"checkbox",className:"maxio-checkbox__input",ref:c,...o}),e.createElement("span",{className:"maxio-checkbox__control"},r&&e.createElement("span",{className:"maxio-checkbox__control-error"})),s&&e.createElement("span",{className:"maxio-checkbox__label"},s))});Te.displayName="InnerCheckbox";const Oe=({label:t,error:l=!1,className:n,indeterminate:i,value:o="",disabled:r,readOnly:c,defaultChecked:m,checked:d,...u})=>{const p=a(null),v=s(De),{inputProps:g,isDisabled:x,isInvalid:b,isSelected:f}=v&&Object.keys(v).length>0?h({value:o,"aria-label":null!=t?t:u["aria-label"],isDisabled:r,isInvalid:l,isIndeterminate:i,isReadOnly:c,...u},v,p):E({"aria-label":null!=t?t:u["aria-label"],isDisabled:r,isInvalid:l,isIndeterminate:i,isReadOnly:c,value:o,...u},D({...u,isSelected:d,defaultSelected:m}),p);return e.createElement(Te,{inputProps:g,checked:f,disabled:x,invalid:b,indeterminate:i,className:n,error:l,label:t,ref:p,...u})},ze=({children:a,className:t,...l})=>e.createElement("div",{className:v("maxio-form-helper-text",t),...l},a),Re=({children:a,className:t,...l})=>e.createElement("div",{className:v("maxio-form-error",t),...l},e.createElement(Z,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},a)),Ae=({helperText:a,className:t,errorMessage:l,children:n,disabled:i,label:o,defaultValue:r,name:s,...c})=>{var m;const d=T({defaultValue:r,name:s,errorMessage:l,description:a,label:o,isDisabled:i,isInvalid:!!l,...c}),{groupProps:u,labelProps:p,descriptionProps:g,errorMessageProps:x,isInvalid:b}=f({"aria-label":null===(m=null!=o?o:c["aria-label"])||void 0===m?void 0:m.toString(),isDisabled:i,isInvalid:!!l,...c},d),h=v("maxio-checkbox-group",{"maxio-checkbox-group--disabled":i},t),E=a&&!l;return e.createElement("div",{className:h,...u},o&&e.createElement("label",{className:"maxio-checkbox-group__label",...p},o),e.createElement(De.Provider,{value:d},n),E&&e.createElement(ze,{...g},a),l&&b&&e.createElement(Re,{...x},l))},Me=({table:a})=>{var t,l,n,i;const o=null===(t=null==a?void 0:a.getToggleAllPageRowsSelectedHandler)||void 0===t?void 0:t.call(a),r=(null===(l=null==a?void 0:a.getIsAllPageRowsSelected)||void 0===l?void 0:l.call(a))||(null===(n=null==a?void 0:a.getIsAllRowsSelected)||void 0===n?void 0:n.call(a)),s=null===(i=null==a?void 0:a.getIsSomePageRowsSelected)||void 0===i?void 0:i.call(a);return e.createElement(Oe,{"aria-label":"Select all rows",onChange:e=>{o("boolean"==typeof e?{target:{checked:e}}:e)},checked:r,indeterminate:!r&&s})},Ve=({row:a})=>{var t,l,n,i;const o=null===(t=null==a?void 0:a.getToggleSelectedHandler)||void 0===t?void 0:t.call(a),r=(null===(l=null==a?void 0:a.getIsSelected)||void 0===l?void 0:l.call(a))||(null===(n=null==a?void 0:a.getIsAllSubRowsSelected)||void 0===n?void 0:n.call(a)),s=null===(i=null==a?void 0:a.getIsSomeSelected)||void 0===i?void 0:i.call(a),c=a.id||a.index;return e.createElement(Oe,{"aria-label":`Select row ${c}`,onChange:o,checked:r,indeterminate:s})},He=({children:a})=>e.createElement("div",{className:"maxio-data-table__cell-flex"},a),We=({row:a,cell:t,children:l,className:n,...i})=>{var o,r,s,c,m,d;const u=null==t?void 0:t.column,p=null===(r=null===(o=null==u?void 0:u.columnDef)||void 0===o?void 0:o.meta)||void 0===r?void 0:r.align,g=null===(c=null===(s=null==u?void 0:u.columnDef)||void 0===s?void 0:s.meta)||void 0===c?void 0:c.controls,x=null===(d=null===(m=null==u?void 0:u.columnDef)||void 0===m?void 0:m.meta)||void 0===d?void 0:d.actions,b=null==u?void 0:u.getIsPinned(),h=v("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${b}`]:b,[`maxio-data-table__cell--${p}`]:p,"maxio-data-table__cell--controls":g,"maxio-data-table__cell--actions":x});return e.createElement("td",{className:h,...i},l)},Le=({row:a,SubRowComponent:t,pattern:l,enableExpanding:n})=>{var i,o,r,s,c;const m=t&&a.getParentRow()&&a.getParentRow().getIsExpanded(),d=m&&a.getVisibleCells()[0].column.columnDef.id===ye,u=m&&a.getVisibleCells()[a.getVisibleCells().length-1].column.columnDef.id===ke,p=[u,d].filter(Boolean).length,v=a.getVisibleCells().length-p,g=null!==(o=null===(i=a.getParentRow())||void 0===i?void 0:i.index)&&void 0!==o?o:a.index,x=l&&t&&g%2==1?"maxio-data-table__row--with-pattern":void 0,b=null===(r=a.getCanExpand)||void 0===r?void 0:r.call(a),h=null===(s=null==a?void 0:a.getToggleExpandedHandler)||void 0===s?void 0:s.call(a),E=null===(c=null==a?void 0:a.getIsExpanded)||void 0===c?void 0:c.call(a),f=b&&n?0:1.75,_=a.getVisibleCells()[0].column.columnDef.id===ye?1:0;return e.createElement(e.Fragment,{key:a.id},m?e.createElement($e,{key:`${a.id}-sub`,row:a,isChild:!0,className:x},d&&e.createElement(We,{className:"maxio-data-table__cell--pinned-left"}),e.createElement(We,{colSpan:v},t(a)),u&&e.createElement(We,{className:"maxio-data-table__cell--pinned-right"})):e.createElement($e,{key:`${a.id}-parent`,row:a,className:x},a.getVisibleCells().map(t=>{const l=n&&t.column.getIndex()===_;return e.createElement(We,{key:t.id,row:a,cell:t},e.createElement("div",{className:"maxio-data-table__cell-flex",style:n&&l?{paddingLeft:`${(null==a?void 0:a.depth)+f}rem`}:void 0},n&&b&&l&&e.createElement(se,{size:"sm",variant:"ghost",icon:e.createElement(Z,{size:"xs",variant:E?"chevron-down":"chevron-right"}),onClick:h,"aria-label":E?"Collapse row":"Expand row","data-open":E,className:"maxio-data-table__expand-button"}),C(t.column.columnDef.cell,t.getContext())))})))},Fe=({pattern:a,size:l="md",SubRowComponent:n,onExpand:i,onSelect:o,onSort:r,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:d=!1,columns:u,actions:p,...v})=>{const g=(({columns:a,HeaderControls:t,RowControls:l,RowActions:n,actions:i,enableExpanding:o,enableRowSelection:r})=>m(()=>{const s={id:ye,header:a=>e.createElement(t,{...a,enableExpanding:o,enableRowSelection:r}),cell:a=>e.createElement(l,{...a,enableExpanding:o}),meta:{controls:!0}},c=i&&n?{id:ke,header:"",cell:a=>e.createElement(n,{...a},i(a.row,a.table)),meta:{actions:!0}}:null;let m=[...a];return(o||r)&&(m=[s,...m]),c&&(m=[...m,c]),m},[i,n,o,r,a,t,l]))({columns:u,HeaderControls:Me,RowControls:Ve,RowActions:He,actions:p,enableRowSelection:c}),x=I({state:{columnPinning:{left:["row-controls"],right:["row-actions"]},...v.state},getSubRows:e=>e.subRows,getCoreRowModel:$(),enableRowSelection:c,enableExpanding:d,...!v.manualExpanding&&{getExpandedRowModel:S()},enableSorting:s,...!v.manualSorting&&{getSortedRowModel:P()},columns:g,...v}),b=x.getCanSomeRowsExpand(),h=x.getState();return t(()=>{null==i||i(h.expanded)},[i,h.expanded]),t(()=>{null==o||o(h.rowSelection)},[o,h.rowSelection]),t(()=>{null==r||r(h.sorting)},[r,h.sorting]),e.createElement(Ce,{pattern:a,size:l,isExpandable:b,isUsingCustomRow:!!n},e.createElement(Ie,null,x.getHeaderGroups().map(a=>e.createElement($e,{key:a.id,table:x,isHeader:!0},a.headers.map(a=>e.createElement(Se,{key:a.id,table:x,header:a,enableExpanding:d},C(a.column.columnDef.header,a.getContext())))))),e.createElement(Pe,null,x.getRowModel().rows.map(t=>e.createElement(Le,{key:t.id,row:t,pattern:a,SubRowComponent:n,enableExpanding:d}))))},Be={click:V,hover:e=>M(e,{delay:100}),focus:A,dismiss:R},qe=(e,a)=>a.map(a=>Be[a](e)),Ue=({placement:e="top",isActive:l=!1,interactions:n=["hover"],floatingElementOffset:i=0,onOverlayUpdate:o,autoHideMs:r})=>{const s=a(null),{strategy:c,x:m,y:d,context:u,floating:p,reference:v}=H({placement:e,open:l,onOpenChange:e=>o(e),middleware:[W(i)]}),{getReferenceProps:g,getFloatingProps:x}=L([...qe(u,n),F(u,{role:"tooltip"})]);t(()=>{s.current&&clearTimeout(s.current),l&&r&&(s.current=window.setTimeout(()=>o(!1),r))},[l,r]);return{isActive:l,refs:{floating:p,reference:v},floatingElementCSSPosition:{position:c,top:null!=d?d:0,left:null!=m?m:0},getReferenceProps:g,getFloatingProps:x}};function je(e,n=0){const i=a((new Date).getTime()),o=a((new Date).getTime()),[r,s]=l(!1);return t(()=>{const a=()=>{i.current=(new Date).getTime(),s(!0)},t=()=>{o.current=(new Date).getTime(),window.setTimeout(()=>{i.current-o.current<=0&&s(!1)},n)},l=e&&e.current;return l&&(l.addEventListener("mouseenter",a),l.addEventListener("mouseleave",t)),()=>{l&&(l.removeEventListener("mouseenter",a),l.removeEventListener("mouseleave",t))}},[e]),r}function Ge(e=500){const[n,i]=l(()=>{const{innerWidth:e,innerHeight:a}=window;return{windowWitdh:e,windowHeight:a}}),o=a(null);return t(()=>{const a=()=>{var a;const{innerWidth:t,innerHeight:l}=window;window.clearTimeout(null!==(a=o.current)&&void 0!==a?a:void 0),o.current=window.setTimeout(()=>{i({windowWitdh:t,windowHeight:l})},e)};return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[e]),n}const Ye=({children:a,usePortal:t=!1,isActive:l=!1,placement:n="top",interactions:i=["hover"],role:o="tooltip",renderOverlay:r,floatingElementOffset:s,motionSettings:c={},autoHideMs:m,onOverlayUpdate:d,className:u})=>{const{getReferenceProps:p,getFloatingProps:g,refs:{floating:x,reference:b},floatingElementCSSPosition:h}=Ue({isActive:l,onOverlayUpdate:d,autoHideMs:m,floatingElementOffset:s,interactions:i,placement:n}),E=e.createElement(O,null,l&&e.createElement(z.div,{ref:x,style:h,...c,...g()},r()));return e.createElement(e.Fragment,null,e.createElement("div",{ref:b,className:v("maxio-inline-flex",u),...p(),"data-testid":"overlay-trigger"},a),t?e.createElement(B,{id:"maxio-ui-portal"},E):E)},Ke=({children:a,arrowPosition:t,size:l="regular",maxWidth:n=160})=>e.createElement("div",{"data-testid":"tooltip",className:v("maxio-tooltip",`maxio-tooltip--${l}`,{[`maxio-tooltip--arrow-${t}`]:t})},e.createElement("div",{className:"maxio-tooltip__content",style:{maxWidth:n}},a)),Xe={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"},Qe=({children:n,interactions:i=["hover"],placement:o="right",maxWidth:r=160,size:s="regular",renderContent:c,autoHideMs:d,isVisible:p,usePortal:v,className:g,onVisibilityUpdate:x,floatingElementOffset:b=5})=>{const[h,E]=l(!1),f=void 0!==p,_=a(null),N=u(e=>{_.current&&clearTimeout(_.current),_.current=window.setTimeout(()=>{f||E(e),x&&x(e)},50)},[f,x]),w=m(()=>(e=>{const a=e.startsWith("top")||e.startsWith("bottom")?"Y":"X",t=`translate${a}(${e.startsWith("bottom")||e.startsWith("right")?"-":""}10px)`;return{initial:{opacity:0,visibility:"hidden",transform:t},animate:{opacity:1,visibility:"visible",transform:`translate${a}(0px)`},exit:{opacity:0,visibility:"hidden",transform:t},transition:{ease:[.4,0,.5,1],duration:.2}}})(o),[o]);return t(()=>()=>{_.current&&clearTimeout(_.current)},[]),e.createElement(Ye,{role:"tooltip",className:g,floatingElementOffset:b,motionSettings:w,isActive:f?p:h,onOverlayUpdate:N,autoHideMs:d,usePortal:v,placement:o,interactions:i,renderOverlay:()=>e.createElement(Ke,{size:s,arrowPosition:Xe[o],maxWidth:r},c())},n)},Je=o({}),Ze=({indent:t=!1,disabled:l=!1,invalid:n=!1,label:i,...o})=>{const r=a(null),c=s(Je),{inputProps:m,isDisabled:d}=_({...o,value:(o.value||"").toString(),"aria-label":o["aria-label"]||i,isDisabled:l},c,r),u=v("maxio-radio",{"maxio-radio--indent":t,"maxio-radio--disabled":d||c.isDisabled,"maxio-radio--error":n||c.isInvalid});return e.createElement("label",{className:u},e.createElement("input",{ref:r,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"},i))},ea=({children:a,label:t,errorMessage:l,helperText:n,disabled:i=!1,invalid:o=!1,name:r,defaultValue:s,...c})=>{const m=q({isDisabled:i,isInvalid:o,description:n,name:r,label:t,errorMessage:l,defaultValue:s,...c}),{radioGroupProps:d,labelProps:u,descriptionProps:p,errorMessageProps:v}=N({"aria-label":c["aria-label"]||t,...c},m);return e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-radio-group",...d},t&&e.createElement("label",{className:"maxio-radio-group__label",...u},t),e.createElement(Je.Provider,{value:m},a),o&&l&&e.createElement(Re,{...v},l),n&&!o&&e.createElement(ze,{...p},n)))},aa=d(({disabled:t=!1,invalid:l=!1,readOnly:n=!1,size:i="md",label:o,helperText:r,showErrorMessage:s=!0,errorMessage:c,leadingElement:m=null,trailingElement:d=null,fullWidth:u,className:g,...x},b)=>{var h,E;const f=a(null);p(b,()=>f.current);const{spellCheck:_,...N}=x,y={...N,label:o,description:r,errorMessage:c,defaultValue:null===(h=x.defaultValue)||void 0===h?void 0:h.toString(),value:null===(E=x.value)||void 0===E?void 0:E.toString(),isDisabled:t,isReadOnly:n,isInvalid:l},{labelProps:k,inputProps:C,descriptionProps:I,errorMessageProps:P}=w(y,f),S=v("maxio-text-field",`maxio-text-field--${i}`,{"maxio-text-field--disabled":t,"maxio-text-field--error":l,"maxio-text-field--readonly":n,"maxio-text-field--full-width":u},g),$=l&&c&&s;return e.createElement("div",{className:S},o&&e.createElement("label",{className:"maxio-text-field__label",...k},o),e.createElement("div",{className:"maxio-text-field__items"},m&&e.createElement("div",{className:"maxio-text-field__leading-element"},m),e.createElement("input",{ref:f,type:"text",className:"maxio-text-field__input",...C,spellCheck:_}),d&&e.createElement("div",{className:"maxio-text-field__trailing-element"},d)),r&&!$&&e.createElement("div",{className:"maxio-form-helper-text",...I},r),$&&e.createElement(Re,{...P},c))});aa.displayName="TextInput";const ta=({options:a,label:t,size:l="md",inline:n=!1,disabled:i=!1,helperText:o,errorMessage:r,fullWidth:s=!1,...c})=>{const m=v("maxio-select",`maxio-select--${l}`,{"maxio-select--disabled":i,"maxio-select--inline":n,"maxio-select--error":!!r,"maxio-select--full-width":s}),d=g();return e.createElement("div",{className:m},t&&e.createElement("label",{htmlFor:d,className:"maxio-select__label"},t),e.createElement("div",{className:"maxio-select__input-container"},e.createElement("select",{id:d,className:"maxio-select__input",disabled:i,...c},a.map(a=>e.createElement("option",{key:`option-${a.value}`,value:a.value},a.label))),e.createElement(Z,{variant:"chevron-up-down"})),!!r&&e.createElement(Re,null,r),o&&!r&&e.createElement("div",{className:"maxio-form-helper-text"},o))},la=({size:a="md",onChange:n,totalItems:i=0,itemsPerPage:o=30,currentPage:r=1,pageSizeOptions:s,manualPageInput:c=!1})=>{const[m,d]=l(r),[u,p]=l(o),[v,g]=l(r.toString());t(()=>{g(m.toString())},[m]);const x=Math.ceil(i/u),b=m<x,h=m>1,E=u*(m-1)+1,f=Math.min(u*m,i),_=s.map(e=>({label:e.toString(),value:e.toString()})),N=Array.from({length:x},(e,a)=>a+1).map(e=>({label:e.toString(),value:e.toString()})),w=e=>{d(e),null==n||n({currentPage:e,itemsPerPage:u})},y=e=>{const a=parseInt(e,10);if(isNaN(a))return void g(m.toString());const t=Math.max(1,Math.min(a,x));g(t.toString()),w(t)};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(ta,{inline:!0,size:a,options:_,onChange:e=>{return a=Number(e.target.value),p(a),d(1),void(null==n||n({currentPage:1,itemsPerPage:a}));var a},value:u,id:"items-per-page-large"})),e.createElement("div",{className:"maxio-pagination__total-items"},e.createElement("span",null,E,"–",f," of ",i," items")),e.createElement("div",{className:"maxio-pagination__current-page"},c?e.createElement(aa,{className:"maxio-pagination__page-input",value:v,min:1,max:x,onChange:e=>(e=>{g(e)})(e),onBlur:e=>{y(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(y(e.currentTarget.value),e.currentTarget.blur())},"aria-label":"Page number",size:a,type:"number",onWheel:e=>e.preventDefault()}):e.createElement(ta,{inline:!0,size:a,"aria-label":"Select page",onChange:e=>w(Number(e.target.value)),value:m,options:N,id:"page-index-large"}),e.createElement("div",{className:"maxio-pagination__label"},"of ",x," pages")),e.createElement("div",{className:"maxio-pagination__controls"},e.createElement(Qe,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(se,{icon:e.createElement(Z,{variant:"chevron-left"}),size:a,variant:"ghost",onClick:()=>w(m-1),"aria-label":"Previous",disabled:!h})),e.createElement(Qe,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(se,{icon:e.createElement(Z,{variant:"chevron-right"}),size:a,variant:"ghost",onClick:()=>w(m+1),"aria-label":"Next",disabled:!b}))))},na=({label:a,helperText:t,size:l="md",variant:n="default",status:i,value:o,maxValue:r=100})=>{const s=g(),c=g(),m=i&&!!a&&!!o&&!("inline"===n),d=t&&!("inline"===n),u=t&&"inline"===n,{progressBarProps:p,labelProps:x}=y({maxValue:r,value:o,label:a}),b=v("maxio-progress-bar",{"maxio-progress-bar--lg":"lg"===l,"maxio-progress-bar--success":o&&!("inline"===n)&&"success"===i,"maxio-progress-bar--error":o&&!("inline"===n)&&"error"===i,"maxio-progress-bar--indent":"indent"===n,"maxio-progress-bar--inline":"inline"===n,"maxio-progress-bar--indeterminate":void 0===o});return e.createElement("div",{className:b,...p},e.createElement("div",{id:s,className:"maxio-progress-bar__label",...x},a),u&&e.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t),e.createElement("div",{className:"maxio-progress-bar__track"},e.createElement("div",{className:"maxio-progress-bar__progress",style:{"--tw-scale-x":`${o}%`}})),m&&e.createElement("div",{className:`maxio-progress-bar__${i}-icon`}),d&&e.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t))},ia=({leadingIcon:a,trailingIcon:t,type:l="menu",children:n,leadingIconClassName:i,isTooltipVisible:o=!1})=>e.createElement(e.Fragment,null,a&&e.createElement(Qe,{usePortal:!0,isVisible:o,renderContent:()=>n,floatingElementOffset:12},e.createElement("span",{className:"maxio-side-nav__icon"},e.createElement(Z,{variant:a,className:i}))),e.createElement("span",{className:`maxio-side-nav__${l}-title`,"data-testid":"maxio-sidebar-section-name"},n),t&&e.createElement("span",{className:"maxio-side-nav__menu-chevron"},e.createElement(Z,{variant:t}))),oa=e=>"heading"!==e.type,ra=e=>{const a=(e=>e.flat().filter(oa).map(e=>e.items).flat().find(e=>null==e?void 0:e.isCurrent))(e);return a?e.map(e=>e.map(e=>{var t;return oa(e)&&(null===(t=e.items)||void 0===t?void 0:t.includes(a))?{...e,isOpen:!0}:e})):e},sa=o({}),ca=()=>s(sa),ma=({children:n,isOpen:i,onChange:o,withIcons:r=!0,sections:s,shouldToggleSidebar:c=!0,topDropdownItems:m,collapseBreakpoint:d=800})=>{const u=a(!1),[p,v]=l(()=>!c||("boolean"==typeof i?i:"undefined"==typeof window||window.innerWidth>d)),[g,x]=l(()=>ra(s)),{windowWitdh:b}=Ge(200);t(()=>{u.current&&(null==o||o(p))},[p,o]),t(()=>{u.current=!0},[]),t(()=>{!function(e){if(!c)return;e<d&&p&&h()}(b)},[b]),t(()=>{"boolean"==typeof i&&v(i)},[i]);const h=()=>{v(!1)};return e.createElement(sa.Provider,{value:{sections:g,topDropdownItems:m,onSectionOpen:e=>{x(a=>a.map(a=>a.map(a=>oa(a)?{...a,isOpen:(null==a?void 0:a.name)===e&&!a.isOpen}:a)))},isOpen:p,onOpen:()=>{v(!0)},onClose:h,withIcons:r,shouldToggleSidebar:c}},n)},da=()=>{const{onOpen:t,topDropdownItems:l,isOpen:n}=ca(),{mainItem:i,otherItems:o,actions:r}=l,s=a(null),c=je(s),d=({id:e,title:a,icon:t,iconClass:l,url:n,...i})=>({id:e,label:a,leadingIconName:t,leadingIconClassName:l,link:{href:n,...i}}),{items:u,itemsCount:p}=m(()=>({itemsCount:o.length+r.length,items:[...o.map(d),(null==o?void 0:o.length)>0&&(null==r?void 0:r.length)>0?{type:"divider",id:"item-divider"}:null,...r.map(d)].filter(e=>null!=e)}),[r,o]);return e.createElement(e.Fragment,null,0===p?e.createElement("a",{className:"maxio-side-nav__menu-button maxio-side-nav__menu-button--large",href:i.url,onClick:t},e.createElement("span",{className:"maxio-side-nav__menu-title"},i.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:s},i.url?e.createElement(e.Fragment,null,e.createElement(ia,{type:"menu",isTooltipVisible:!n&&c,leadingIcon:i.icon,trailingIcon:"chevron-up-down",leadingIconClassName:i.iconClass},i.title)):e.createElement(ia,{type:"menu",trailingIcon:"chevron-up-down"},i.title)),e.createElement(te,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:u,small:!0})))},ua=({section:t})=>{const{isOpen:l,withIcons:n}=ca(),i=a(null),o=je(i);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:i},e.createElement(ia,{isTooltipVisible:o&&!l,type:"menu",leadingIcon:n?t.icon:void 0},t.name)))},pa=({section:t})=>{var l,n;const{onOpen:i,onSectionOpen:o,isOpen:r,withIcons:s}=ca(),c=a(null),m=je(c);if(!oa(t))return e.createElement("li",{className:"maxio-side-nav__item-header"},t.title);return t.Component?e.createElement(t.Component,{section:t}):t.href?e.createElement(ua,{section:t}):e.createElement("li",{className:v("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":t.isOpen?"true":"false",type:"button",onClick:()=>{o(t.name),i()}},e.createElement(ia,{type:"menu",isTooltipVisible:!r&&m,leadingIcon:s?t.icon:void 0,trailingIcon:(null===(l=t.items)||void 0===l?void 0:l.length)?"chevron-down":void 0},t.name)),e.createElement("ul",{className:"maxio-side-nav__menu"},null===(n=t.items)||void 0===n?void 0:n.map(a=>e.createElement("li",{key:`section-sub-item-${a.name}`,className:"maxio-side-nav__item","data-testid":"maxio-section-item"},e.createElement("a",{className:"maxio-side-nav__link",href:a.href,"aria-current":a.isCurrent?"page":void 0},e.createElement("span",{className:"maxio-side-nav__link-title"},a.name))))))},va=()=>{const{sections:a}=ca();return e.createElement(e.Fragment,null,a.map((a,t)=>e.createElement("ul",{role:"list",className:"maxio-side-nav__items",key:`section-list-${t}`},a.map((a,l)=>e.createElement(pa,{key:`section-list-item-${a.type}-${t}-${l}`,section:a})))))},ga=()=>{const{onClose:a,shouldToggleSidebar:t}=ca();return e.createElement("div",{className:"maxio-side-nav__logo-container"},e.createElement("a",{className:"maxio-side-nav__brand",href:"/","aria-label":"Maxio"}),t&&e.createElement("button",{className:"maxio-side-nav__menu-toggle","aria-label":"toggle sidebar",onClick:a},e.createElement(Z,{variant:"sidebar"})))},xa=()=>{const{isOpen:a}=ca();return e.createElement("nav",{className:v("maxio-side-nav",{"maxio-side-nav--collapsed":!a})},e.createElement(ga,null),e.createElement(da,null),e.createElement("div",{className:"maxio-side-nav__items-container"},e.createElement(va,null)))},ba=({withIcons:a=!0,shouldToggleSidebar:t=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:o,onChange:r})=>e.createElement(ma,{isOpen:o,onChange:r,collapseBreakpoint:i,withIcons:a,shouldToggleSidebar:t,topDropdownItems:l,sections:n},e.createElement(xa,null)),ha=o({}),Ea=()=>s(ha),fa=({children:a,variant:n="line",withDivider:i=!1,defaultIndex:o=0,onChange:r,index:s})=>{const[c,m]=l(()=>void 0!==s?s:o);t(()=>{void 0===s&&m(o),"number"==typeof s&&m(s)},[o,s]);return e.createElement(ha.Provider,{value:{currentIndex:c,variant:n,withDivider:i,onChange:e=>{let a;a="function"==typeof e?e(c):e,void 0===s&&m(a),"function"==typeof r&&r(a)}}},a)},_a=({disabled:l=!1,value:n=0,isCurrent:i,...o})=>{const{onChange:r,currentIndex:s}=Ea(),c=v("maxio-tabs__tab",{"maxio-tabs__tab--active":s===n,"maxio-tabs__tab--disabled":l,"maxio-tabs__tab--icon":"icon"===o.type}),m=()=>{r(n)},d={"aria-selected":i,id:`tab-${n}`,"aria-controls":`panel-${n}`,role:"tab",tabIndex:i?0:-1},u=a(null),p=a(!1);if(t(()=>{var e;i&&p.current&&(null===(e=u.current)||void 0===e||e.focus())},[i]),t(()=>{p.current=!0},[]),"icon"===o.type){const{icon:a,...t}=o;return e.createElement("div",{className:c,ref:u,onClick:m,...d,...t},e.createElement("div",{className:"maxio-tabs__tab__content"},a))}const{children:g,rightIcon:x,...b}=o;return e.createElement("div",{ref:u,className:c,onClick:m,...d,...b},e.createElement("div",{className:"maxio-tabs__tab__content"},g,x||null))},Na=({children:a,variant:t="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:o})=>e.createElement(fa,{defaultIndex:n,variant:t,withDivider:l,index:i,onChange:o},a),wa=({children:a,value:t,...l})=>{const{currentIndex:n}=Ea();return e.createElement("div",{...l,...t?{id:`panel-${t}`}:{},role:"tabpanel","aria-labelledby":`tab-${t}`,hidden:n!==t},a)},ya=({children:a})=>{const{currentIndex:t}=Ea();return e.createElement(e.Fragment,null,c.map(a,(e,a)=>{if(i(e)&&e.type===wa)return a===t?n(e,{value:a}):null;throw new Error("You can only pass <TabPanel /> component as children")}))},ka=(e,a,t)=>0===e?e:1===e&&a[e-1].disabled?t||e:a[e-1].disabled?ka(e-1,a,t||e):e-1,Ca=({children:t,className:l,ariaLabel:o,...r})=>{const{variant:s,withDivider:m,currentIndex:d,onChange:u}=Ea(),p=v("maxio-tabs",l,{"maxio-tabs--contained":"contained"===s,"maxio-tabs--divider":m}),g=a(null),x=()=>c.map(t,e=>e.props);return e.createElement("div",{className:p,role:"tablist","aria-label":o,"aria-orientation":"horizontal",ref:g,onKeyDown:e=>{var a;"ArrowRight"===e.key&&u(e=>((e,a)=>{const t=a.findIndex((a,t)=>!a.disabled&&t>e);return-1===t?e:t})(e,x())),"ArrowLeft"===e.key&&u(e=>ka(e,x())),null===(a=g.current)||void 0===a||a.focus()},...r},c.map(t,(e,a)=>{if(i(e)&&e.type===_a)return n(e,{value:a,isCurrent:d===a});throw new Error("You can only pass <Tab /> component as children")}))},Ia=({children:a,size:t,sentiment:l,kind:n="primary",leadingIcon:i,trailingIcon:o})=>{const r=v("maxio-tag",`maxio-tag--${n}`,!!l&&`maxio-tag--${l}`,!!t&&`maxio-tag--${t}`);return e.createElement("div",{className:r},i&&e.createElement(Z,{variant:i,className:"maxio-tag__icon"}),e.createElement("span",{className:"maxio-tag__label"},a),o&&e.createElement(Z,{variant:o,className:"maxio-tag__icon"}))},Pa=({children:a,className:t,href:l,onClick:n,target:i,disabled:o})=>{const r=l||n;if(!r)return e.createElement("div",{className:"maxio-tile"},a);const s=v("maxio-tile",t,{"maxio-tile--clickable":r,"maxio-tile--disabled":o});return e.createElement("a",{className:s,href:l,target:i,onClick:e=>{o&&l&&e.preventDefault(),!o&&n&&n()}},a)},Sa=({state:t,...l})=>{var n,i;const o=a(null),{toastProps:r,contentProps:s,titleProps:c,closeButtonProps:m}=Y(l,t,o),{closable:d=!0,underline:u=!0,external:p=!1}=l.toast.content,g=v("maxio-toast",{[`maxio-toast--${l.toast.content.sentiment}`]:l.toast.content.sentiment}),x={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(Z,{variant:x,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(le,{href:l.toast.content.link.href,underline:u,external:p},l.toast.content.link.text))),d&&e.createElement(se,{variant:"ghost",icon:e.createElement(Z,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss",...m}))},$a=({state:a,...t})=>{const l=e.useRef(null),{regionProps:n}=K(t,a,l);return e.createElement("div",{...n,ref:l,className:t.className,style:{display:"flex",flexDirection:"column",gap:"10px"}},a.visibleToasts.map(t=>e.createElement(Sa,{key:t.key,toast:t,state:a})))},Da=({children:a,...t})=>{const{maxVisibleToasts:l=5,...n}=t,i=U({maxVisibleToasts:l,...n});return e.useEffect(()=>{console.warn("ToastProvider is deprecated. Please use the global toast API instead.")},[]),e.createElement(e.Fragment,null,a(i),i.visibleToasts.length>0&&e.createElement($a,{...t,state:i}))},Ta=o(null),Oa=({children:a,toastQueue:t,...l})=>{const n=j(t),i=u(()=>{n.visibleToasts.forEach(e=>{t.close(e.key)})},[n.visibleToasts,t]),o=m(()=>({addToast:t.add.bind(t),removeToast:t.clear.bind(t),removeAllToasts:i,state:n}),[t,i,n]);return e.createElement(Ta.Provider,{value:o},a,n.visibleToasts.length>0&&e.createElement($a,{...l,state:n}))},za=()=>{const e=s(Ta);if(!e)throw new Error("useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.");return e};class Ra extends G{}const Aa=({defaultChecked:a,checked:t,onChange:l,disabled:n,valueDescription:i,valueDescriptionPosition:o,className:s,name:c,id:m,...d})=>{const p=r(),g="boolean"==typeof a,x=m||p,b="left"===o?"row":"row-reverse",h=i&&o,E=u(e=>{if("Enter"===e.code||"Space"===e.code){e.preventDefault();const a=e.currentTarget.checked;g&&(e.currentTarget.checked=!a),l&&l(!a,e)}},[g,l]),f=d["aria-label"]||(h?void 0:i);return e.createElement("div",{className:v("maxio-toggle",s,{"maxio-toggle--disabled":n}),style:{display:"inline-flex",flexDirection:b},"data-testid":"toggle-container"},h?e.createElement("label",{className:"maxio-toggle__label",htmlFor:x},i):null,e.createElement("div",{className:"maxio-toggle__container"},e.createElement("input",{type:"checkbox",defaultChecked:a,checked:t,onChange:e=>{l&&l(e.target.checked,e)},onKeyDown:E,disabled:n,className:"maxio-toggle__checkbox",id:x,name:c,"aria-label":f}),e.createElement("div",{className:"maxio-toggle__track",role:"switch","aria-checked":t,"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"})))))},Ma=({basis:a,flex:t,flexDirection:l,wrap:n,grow:i,shrink:o,gap:r,gapX:s,gapY:c,className:m,children:d,alignItems:u,justifyContent:p,...g})=>{const x=v("maxio-flex",{[`maxio-flex-${t}`]:t,[`maxio-basis-${a}`]:void 0!==a,[`maxio-flex-${l}`]:l,[`maxio-flex-${n}`]:n,"maxio-grow":i,"maxio-grow-0":!1===i,"maxio-shrink":o,"maxio-shrink-0":!1===o,[`maxio-gap-${r}`]:void 0!==r,[`maxio-gap-x-${s}`]:void 0!==s,[`maxio-gap-y-${c}`]:void 0!==c,[`maxio-items-${u}`]:u,[`maxio-justify-${p}`]:p},m);return e.createElement("div",{className:x,...g},d)},Va=({children:a,actions:t,sideNavIsClosed:l,openSideNav:n})=>e.createElement("nav",{className:"maxio-top-bar"},l&&e.createElement(se,{"aria-label":"Open Side Navigation",variant:"ghost",icon:e.createElement(Z,{variant:"sidebar"}),onClick:n}),e.createElement(Ma,{grow:!0,justifyContent:"end"},a),t),Ha=({as:a="div",children:t,compact:l=!1,size:n="md",className:i,...o})=>{const r=a,s=v({[`maxio-body-${n}`]:!l,[`maxio-body-${n}-compact`]:l},i);return e.createElement(r,{className:s,...o},t)},Wa={sm:"h3",md:"h2",lg:"h1"},La=({children:a,size:t="sm",className:l,...n})=>{const i=Wa[t],o=v(`maxio-heading-${t}`,l);return e.createElement(i,{className:o,...n},a)},Fa=({as:a="div",children:t,size:l="md",className:n,...i})=>{const o=a,r=v(`maxio-display-${l}`,n);return e.createElement(o,{className:r,...i},t)},Ba=({as:a="div",children:t,className:l,...n})=>{const i=a,o=v("maxio-code",l);return e.createElement(i,{className:o,...n},t)},qa=({as:a="div",children:t,size:l="sm",className:n,...i})=>{const o=a,r=v(`maxio-label-${l}`,n);return e.createElement(o,{className:r,...i},t)},Ua=({...t})=>{const l=a(null),{buttonProps:n}=b(t,l);return e.createElement("button",{...n,className:"maxio-chip__dismiss-button"},e.createElement(Z,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},ja=({label:t,onDismiss:l,dismissLabel:n,leadingIcon:i,trailingIcon:o,title:r,...s})=>{const c=a(null),m=D(s),{buttonProps:d}=k(s,m,c),u=v("maxio-chip",{"maxio-chip--selected":null==m?void 0:m.isSelected}),p=v("maxio-chip__button",{"maxio-chip--dismissible":l});return e.createElement("div",{className:u},e.createElement("button",{className:p,ref:c,...d,title:r},i&&e.createElement(Z,{variant:i,className:"maxio-chip__icon"}),e.createElement("span",{className:"maxio-chip__label"},t),o&&!l&&e.createElement(Z,{variant:o,className:"maxio-chip__icon"})),l&&e.createElement(Ua,{onPress:l,"aria-label":n}))},Ga=({children:a,templateColumns:t,templateRows:l,autoColumns:n,autoRows:i,inline:o,column:r,columnStart:s,columnEnd:c,row:m,rowStart:d,rowEnd:u,gap:p,gapX:g,gapY:x,className:b,justifyContent:h,alignItems:E,...f})=>{const _=v(b,{"maxio-grid":!o,"maxio-inline-grid":o,[`maxio-grid-cols-${t}`]:t,[`maxio-grid-rows-${l}`]:l,[`maxio-auto-cols-${n}`]:n,[`maxio-auto-rows-${i}`]:i,["maxio-col-"+("auto"===r?"auto":`span-${r}`)]:r,[`maxio-col-start-${s}`]:s,[`maxio-col-end-${c}`]:c,["maxio-row-"+("auto"===m?"auto":`span-${m}`)]:m,[`maxio-row-start-${d}`]:d,[`maxio-row-end-${u}`]:u,[`maxio-gap-${p}`]:void 0!==p,[`maxio-gap-x-${g}`]:void 0!==g,[`maxio-gap-y-${x}`]:void 0!==x,[`maxio-justify-${h}`]:h,[`maxio-items-${E}`]:E});return e.createElement("div",{className:_||void 0,...f},a)},Ya={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"},Ka=({children:a,heading:t,description:l,sentiment:n="success",leadingElement:i=null,alert:o,topAddon:r=null,footer:s})=>e.createElement("div",{className:"maxio-auth-layout"},e.createElement("div",{className:"maxio-auth-layout__header"}),e.createElement("div",{className:"maxio-auth-layout__main"},o&&e.createElement(ce,{display:"block",title:o.title,sentiment:o.sentiment},o.children),e.createElement("div",{className:"maxio-auth-layout__content-wrapper"},r,e.createElement("div",{className:"maxio-auth-layout__content"},e.createElement(Ma,{flexDirection:"col",gap:2},e.createElement(Ma,{alignItems:"center",gap:2},i,e.createElement(La,{size:"lg",className:v("maxio-auth-layout__heading",Ya[n])},t)),l&&e.createElement(Ha,{size:"sm",className:"maxio-auth-layout__description"},l)),a))),e.createElement(Ma,{alignItems:"center",className:"maxio-auth-layout__footer"},s),e.createElement("div",{className:"maxio-auth-layout__border-top"}),e.createElement("div",{className:"maxio-auth-layout__border-bottom"}),e.createElement("div",{className:"maxio-auth-layout__border-left"}),e.createElement("div",{className:"maxio-auth-layout__border-right"}),e.createElement("div",{className:"maxio-auth-layout__gradient-bottom"}),e.createElement("div",{className:"maxio-auth-layout__gradient-top"}));export{te as ActionList,ce as Alert,Ka as AuthLayout,be as Avatar,he as Banner,Ha as Body,we as Breadcrumbs,Ee as BreadcrumbsItem,re as Button,Oe as Checkbox,Ae as CheckboxGroup,ja as Chip,Ba as Code,Fe as DataTable,Fa as Display,Ma as Flex,Re as FormErrorMessage,ze as FormHelperText,Oa as GlobalToastProvider,Ga as Grid,La as Heading,Z as Icon,se as IconButton,qa as Label,le as Link,ne as LoadingSpinner,ve as Menu,xe as MenuButton,ge as MenuList,Ye as OverlayTrigger,la as Pagination,na as ProgressBar,Ze as Radio,ea as RadioGroup,ta as Select,ba as SideNav,_a as Tab,Ca as TabList,wa as TabPanel,ya as TabPanels,Na as Tabs,Ia as Tag,aa as TextInput,Pa as Tile,Da as ToastProvider,Ra as ToastQueue,Aa as Toggle,Ke as Tooltip,Qe as TooltipTrigger,Va as TopBar,je as useHover,Ue as useOverlayTrigger,za as useToast,Ge as useWindowSize};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react"),a=require("classnames"),t=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-stately/radio"),c=require("@react-stately/toast"),m=require("@react-aria/toast");const d=["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","dropbox","hubspot","sage","oracle","quotapath","avalara","pipedrive","quickbooks","salesforce","xero"],u=["dropbox","hubspot","sage","oracle","quotapath"],p=["avalara","pipedrive","quickbooks","salesforce","xero"],x=({variant:t,color:l,className:n,size:i})=>{const o=(e,a)=>a.includes(e),r=o(t,d)||o(t,u),s=o(t,p),c=a({"fa-kit":r,"fa-kit-duotone":s,"fa-sharp fa-regular":!r&&!s,[`fa-${t}`]:!0,[`fa-${i}`]:i,[`maxio-icon--${l}`]:l&&!o(t,u)&&!o(t,p)},n);return e.createElement("i",{className:c})},g=({item:l,isSelected:n,truncateLabel:i=!1,role:o="option",small:r=!1})=>{const s=e.useRef(null),c=e.useRef(!1),m=t.useId();if(e.useEffect(()=>{var e;n&&c.current&&(null===(e=s.current)||void 0===e||e.focus())},[n]),e.useEffect(()=>{c.current=!0},[]),"divider"===l.type)return e.createElement("div",{className:"maxio-action-list__divider",role:"separator","aria-hidden":"true"});const{leadingIconName:d,leadingIconClassName:u,trailingIconName:p,label:g,description:v,link:b}=l,h=a("maxio-action-list__label",{"maxio-truncate":i});return e.createElement("a",{"aria-labelledby":m,...b,className:a("maxio-action-list__content",b.className,{"maxio-action-list__content--size-small":r}),tabIndex:n?0:-1,ref:s,role:o},d&&e.createElement(x,{variant:d,className:a("maxio-action-list__leading-icon",u)}),e.createElement("span",{className:h,id:m},g),v&&e.createElement("span",{className:"maxio-action-list__description"},v),p&&e.createElement(x,{variant:p,className:"maxio-action-list__trailing-icon"}))},v=(e,a,t)=>0===e?e:1===e&&"divider"===a[e-1].type?t||e:"divider"===a[e-1].type?v(e-1,a,t||e):e-1,b=({items:t,isShadowed:l=!0,itemProps:n={},className:i,truncateLabels:o=!1,small:r=!1,...s})=>{const c=a("maxio-action-list",i,{"maxio-action-list--shadow":l}),[m,d]=e.useState(()=>t.findIndex(e=>"divider"!==e.type));return 0===t.length?null:e.createElement("div",{className:c,onKeyDown:e=>{if("Space"===e.code||"Enter"===e.code){const e=t[m];e&&"divider"!==e.type&&window.open(e.link.href,e.link.target||"_self")}"ArrowUp"===e.code&&(e.preventDefault(),d(e=>v(e,t))),"ArrowDown"===e.code&&(e.preventDefault(),d(e=>((e,a)=>{const t=a.findIndex((a,t)=>"divider"!==a.type&&t>e);return-1===t?e:t})(e,t)))},role:"listbox",...s},t.map((a,t)=>e.createElement(g,{item:a,truncateLabel:o,key:`listbox-${a.id}`,isSelected:t===m,small:r,...n})))},h=({className:t,children:l,disabled:n,external:i,icon:o,size:r="sm",underline:s,variant:c,...m})=>{const d=a("maxio-link",{[`maxio-link--${r}`]:r,"maxio-link--disabled":n,[`maxio-link--${c}`]:c,"maxio-link--underline":s},t),u=i?"_blank":"_self";return e.createElement("a",{className:d,target:u,...m},l,o&&e.createElement(x,{variant:o,className:"maxio-link__icon"}))},f=({size:t="md",white:l=!1,className:n})=>{const i=a("maxio-loading-spinner",n,`maxio-loading-spinner--${t}`,{"maxio-loading-spinner--white":l});return e.createElement("div",{className:i,role:"status","aria-label":"loading"})},E=({fullWidth:l=!1,leadingElement:n,trailingElement:i,icon:o,variant:r="primary",size:s,...c})=>{const m=e.useRef(null),{linkProps:d}=t.useLink({...c},m),u=a("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"}}))},_=({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:p}=t.useButton({...d,isDisabled:l,formAction:"string"==typeof d.formAction?d.formAction:void 0},u),x=["primary","danger"].includes(c),g=a("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",{...p,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(f,{className:"maxio-button__trailing-element",size:"md",white:x}))},N=a=>(e=>"href"in e)(a)?e.createElement(E,{...a}):e.createElement(_,{...a}),w=({"aria-label":t,className:l,...n})=>e.createElement(N,{"aria-label":t,className:a("maxio-button--icon",l),...n},null),y=({children:t,title:l,linkText:n,linkExternal:i,href:o,display:r="inline",sentiment:s="info",onDismiss:c,className:m})=>{if(!t&&!l)return console.warn("Alert component requires either children or title prop to be rendered"),null;const d=a("maxio-alert",{[`maxio-alert--${s}`]:"info"!==s&&s},m),u={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[s],p=a("maxio-alert__content",{"maxio-alert__content--block":"block"===r});return e.createElement("div",{className:d},e.createElement(x,{variant:u,className:"maxio-alert__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-alert__container"},e.createElement("div",{className:p},l&&e.createElement("span",{className:"maxio-alert__title"},l),t&&e.createElement("span",{className:"maxio-alert__message"},t),n&&o&&e.createElement(h,{className:"maxio-alert__link",href:o,variant:"high-contrast",underline:!0,...i?{external:!0}:{}},n))),c&&e.createElement(w,{icon:e.createElement(x,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:c,className:"maxio-alert__dismiss"}))},k=e.createContext({}),C=({children:a})=>{const[t,l]=e.useState(!1),n=e.useId(),i=e.useId();return e.createElement(k.Provider,{value:{controlsId:n,buttonId:i,isOpen:t,onClose:()=>l(!1),onOpen:()=>l(!0),onToggle:()=>l(e=>!e)}},a)};function I(){const a=e.useContext(k);if(!a||"object"==typeof a&&0===Object.keys(a).length)throw new Error("useMenu hook must be used within a MenuProvider");return a}const S=({children:a})=>{const{isOpen:t,onToggle:l,onClose:n}=I();return e.createElement("details",{open:t,onToggle:l,className:"maxio-action-menu"},"function"==typeof a?a({isOpen:t,onClose:n}):a)},P=({children:t,className:l,href:n,...i})=>{const o=n?e.createElement(h,{size:"sm",href:n},t):t;return e.createElement("li",{className:a("maxio-breadcrumbs__item",l),...i},o)},T="Breadcrumbs requires at least one BreadcrumbsItem as children",R='Last BreadcrumbsItem should not have "href" prop. It is the current page.',$="Breadcrumbs only accepts BreadcrumbsItem as children",D="row-controls",O="row-actions",z=({children:t,pattern:l,size:n,isExpandable:i,isUsingCustomRow:o})=>{const[r,s]=e.useState(!1),[c,m]=e.useState(!1),d=l&&o&&i,u=a("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 a=e.target;s(a.scrollLeft>0),m(a.scrollWidth-a.clientWidth-a.scrollLeft>0)}},e.createElement("table",{className:u},t))},M=({children:a})=>e.createElement("thead",null,a),A=({children:a})=>e.createElement("tbody",null,a),V=({children:t,table:l,header:n,className:i,enableExpanding:o,...r})=>{var s,c,m,d,u,p,g,v,b,h,f;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),y=null==n?void 0:n.isPlaceholder,k=null===(d=null===(m=null==E?void 0:E.columnDef)||void 0===m?void 0:m.meta)||void 0===d?void 0:d.align,C=null===(p=null===(u=null==E?void 0:E.columnDef)||void 0===u?void 0:u.meta)||void 0===p?void 0:p.width,I=null===(v=null===(g=null==E?void 0:E.columnDef)||void 0===g?void 0:g.meta)||void 0===v?void 0:v.controls,S=null===(h=null===(b=null==E?void 0:E.columnDef)||void 0===b?void 0:b.meta)||void 0===h?void 0:h.actions,P=null==E?void 0:E.getIsPinned(),T=null==E?void 0:E.getIsSorted(),R="asc"===T,$=a("maxio-data-table__cell",i,{[`maxio-data-table__cell--pinned-${P}`]:P,"maxio-data-table__cell--sortable":_,"maxio-data-table__cell--active":T,[`maxio-data-table__cell--${k}`]:k,"maxio-data-table__cell--controls":I,"maxio-data-table__cell--actions":S}),O=C?{width:C}:{},z=((e,a)=>e&&a?"arrow-up":e&&!a?"arrow-down":"arrow-down-up")(!!T,R),M=null==l?void 0:l.getToggleAllRowsExpandedHandler(),A=null===(f=null==l?void 0:l.getIsAllRowsExpanded)||void 0===f?void 0:f.call(l),V=(null==n?void 0:n.headerGroup.headers[0].id)===D?1:0,B=o&&(null==n?void 0:n.index)===V;return y?null:e.createElement("th",{scope:"col",role:"columnheader","aria-sort":T?R?"ascending":"descending":"none",className:$,onClick:N,colSpan:null==n?void 0:n.colSpan,style:O,...r},e.createElement("div",{className:"maxio-data-table__cell-flex"},o&&B&&e.createElement(w,{size:"sm",variant:"ghost",icon:e.createElement(x,{size:"xs",variant:A?"chevron-down":"chevron-right"}),onClick:M,"aria-label":A?"Collapse all rows":"Expand all rows","data-open":A,className:"maxio-data-table__expand-button"}),t,_&&e.createElement(x,{variant:z,className:"maxio-data-table__sort-icon"})))},B=({children:t,row:l,isChild:n,isHeader:i,className:o})=>{var r,s,c;const m=null===(r=null==l?void 0:l.getIsSelected)||void 0===r?void 0:r.call(l),d=(null===(s=null==l?void 0:l.getCanExpand)||void 0===s?void 0:s.call(l))&&(null===(c=null==l?void 0:l.getIsExpanded)||void 0===c?void 0:c.call(l)),u=a({"maxio-data-table__row":!i,"maxio-data-table__header-row":i,"maxio-data-table__row--active":m,"maxio-data-table__row--expanded":d,"maxio-data-table__row--expanded-child":n},o);return e.createElement("tr",{className:u},t)},H=e.createContext({}),L=e.forwardRef(({checked:t,disabled:l,invalid:n,indeterminate:i,className:o,inputProps:r,error:s,label:c},m)=>{const d=a("maxio-checkbox",{"maxio-checkbox--checked":t,"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))});L.displayName="InnerCheckbox";const F=({label:a,error:l=!1,className:i,indeterminate:o,value:r="",disabled:s,readOnly:c,defaultChecked:m,checked:d,...u})=>{const p=e.useRef(null),x=e.useContext(H),{inputProps:g,isDisabled:v,isInvalid:b,isSelected:h}=x&&Object.keys(x).length>0?t.useCheckboxGroupItem({value:r,"aria-label":null!=a?a:u["aria-label"],isDisabled:s,isInvalid:l,isIndeterminate:o,isReadOnly:c,...u},x,p):t.useCheckbox({"aria-label":null!=a?a:u["aria-label"],isDisabled:s,isInvalid:l,isIndeterminate:o,isReadOnly:c,value:r,...u},n.useToggleState({...u,isSelected:d,defaultSelected:m}),p);return e.createElement(L,{inputProps:g,checked:h,disabled:v,invalid:b,indeterminate:o,className:i,error:l,label:a,ref:p,...u})},W=({children:t,className:l,...n})=>e.createElement("div",{className:a("maxio-form-helper-text",l),...n},t),q=({children:t,className:l,...n})=>e.createElement("div",{className:a("maxio-form-error",l),...n},e.createElement(x,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),e.createElement("div",{className:"maxio-form-error__text"},t)),G=({table:a})=>{var t,l,n,i;const o=null===(t=null==a?void 0:a.getToggleAllPageRowsSelectedHandler)||void 0===t?void 0:t.call(a),r=(null===(l=null==a?void 0:a.getIsAllPageRowsSelected)||void 0===l?void 0:l.call(a))||(null===(n=null==a?void 0:a.getIsAllRowsSelected)||void 0===n?void 0:n.call(a)),s=null===(i=null==a?void 0:a.getIsSomePageRowsSelected)||void 0===i?void 0:i.call(a);return e.createElement(F,{"aria-label":"Select all rows",onChange:e=>{o("boolean"==typeof e?{target:{checked:e}}:e)},checked:r,indeterminate:!r&&s})},U=({row:a})=>{var t,l,n,i;const o=null===(t=null==a?void 0:a.getToggleSelectedHandler)||void 0===t?void 0:t.call(a),r=(null===(l=null==a?void 0:a.getIsSelected)||void 0===l?void 0:l.call(a))||(null===(n=null==a?void 0:a.getIsAllSubRowsSelected)||void 0===n?void 0:n.call(a)),s=null===(i=null==a?void 0:a.getIsSomeSelected)||void 0===i?void 0:i.call(a),c=a.id||a.index;return e.createElement(F,{"aria-label":`Select row ${c}`,onChange:o,checked:r,indeterminate:s})},j=({children:a})=>e.createElement("div",{className:"maxio-data-table__cell-flex"},a),Y=({row:t,cell:l,children:n,className:i,...o})=>{var r,s,c,m,d,u;const p=null==l?void 0:l.column,x=null===(s=null===(r=null==p?void 0:p.columnDef)||void 0===r?void 0:r.meta)||void 0===s?void 0:s.align,g=null===(m=null===(c=null==p?void 0:p.columnDef)||void 0===c?void 0:c.meta)||void 0===m?void 0:m.controls,v=null===(u=null===(d=null==p?void 0:p.columnDef)||void 0===d?void 0:d.meta)||void 0===u?void 0:u.actions,b=null==p?void 0:p.getIsPinned(),h=a("maxio-data-table__cell",i,{[`maxio-data-table__cell--pinned-${b}`]:b,[`maxio-data-table__cell--${x}`]:x,"maxio-data-table__cell--controls":g,"maxio-data-table__cell--actions":v});return e.createElement("td",{className:h,...o},n)},K=({row:a,SubRowComponent:t,pattern:n,enableExpanding:i})=>{var o,r,s,c,m;const d=t&&a.getParentRow()&&a.getParentRow().getIsExpanded(),u=d&&a.getVisibleCells()[0].column.columnDef.id===D,p=d&&a.getVisibleCells()[a.getVisibleCells().length-1].column.columnDef.id===O,g=[p,u].filter(Boolean).length,v=a.getVisibleCells().length-g,b=null!==(r=null===(o=a.getParentRow())||void 0===o?void 0:o.index)&&void 0!==r?r:a.index,h=n&&t&&b%2==1?"maxio-data-table__row--with-pattern":void 0,f=null===(s=a.getCanExpand)||void 0===s?void 0:s.call(a),E=null===(c=null==a?void 0:a.getToggleExpandedHandler)||void 0===c?void 0:c.call(a),_=null===(m=null==a?void 0:a.getIsExpanded)||void 0===m?void 0:m.call(a),N=f&&i?0:1.75,y=a.getVisibleCells()[0].column.columnDef.id===D?1:0;return e.createElement(e.Fragment,{key:a.id},d?e.createElement(B,{key:`${a.id}-sub`,row:a,isChild:!0,className:h},u&&e.createElement(Y,{className:"maxio-data-table__cell--pinned-left"}),e.createElement(Y,{colSpan:v},t(a)),p&&e.createElement(Y,{className:"maxio-data-table__cell--pinned-right"})):e.createElement(B,{key:`${a.id}-parent`,row:a,className:h},a.getVisibleCells().map(t=>{const n=i&&t.column.getIndex()===y;return e.createElement(Y,{key:t.id,row:a,cell:t},e.createElement("div",{className:"maxio-data-table__cell-flex",style:i&&n?{paddingLeft:`${(null==a?void 0:a.depth)+N}rem`}:void 0},i&&f&&n&&e.createElement(w,{size:"sm",variant:"ghost",icon:e.createElement(x,{size:"xs",variant:_?"chevron-down":"chevron-right"}),onClick:E,"aria-label":_?"Collapse row":"Expand row","data-open":_,className:"maxio-data-table__expand-button"}),l.flexRender(t.column.columnDef.cell,t.getContext())))})))},Q={click:r.useClick,hover:e=>r.useHover(e,{delay:100}),focus:r.useFocus,dismiss:r.useDismiss},X=(e,a)=>a.map(a=>Q[a](e)),J=({placement:a="top",isActive:t=!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:p,reference:x}=r.useFloating({placement:a,open:t,onOpenChange:e=>i(e),middleware:[r.offset(n)]}),{getReferenceProps:g,getFloatingProps:v}=r.useInteractions([...X(u,l),r.useRole(u,{role:"tooltip"})]);e.useEffect(()=>{s.current&&clearTimeout(s.current),t&&o&&(s.current=window.setTimeout(()=>i(!1),o))},[t,o]);return{isActive:t,refs:{floating:p,reference:x},floatingElementCSSPosition:{position:c,top:null!=d?d:0,left:null!=m?m:0},getReferenceProps:g,getFloatingProps:v}};function Z(a,t=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)},t)},r=a&&a.current;return r&&(r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",i)),()=>{r&&(r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",i))}},[a]),i}function ee(a=500){const[t,l]=e.useState(()=>{const{innerWidth:e,innerHeight:a}=window;return{windowWitdh:e,windowHeight:a}}),n=e.useRef(null);return e.useEffect(()=>{const e=()=>{var e;const{innerWidth:t,innerHeight:i}=window;window.clearTimeout(null!==(e=n.current)&&void 0!==e?e:void 0),n.current=window.setTimeout(()=>{l({windowWitdh:t,windowHeight:i})},a)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[a]),t}const ae=({children:t,usePortal:l=!1,isActive:n=!1,placement:i="top",interactions:s=["hover"],role:c="tooltip",renderOverlay:m,floatingElementOffset:d,motionSettings:u={},autoHideMs:p,onOverlayUpdate:x,className:g})=>{const{getReferenceProps:v,getFloatingProps:b,refs:{floating:h,reference:f},floatingElementCSSPosition:E}=J({isActive:n,onOverlayUpdate:x,autoHideMs:p,floatingElementOffset:d,interactions:s,placement:i}),_=e.createElement(o.AnimatePresence,null,n&&e.createElement(o.motion.div,{ref:h,style:E,...u,...b()},m()));return e.createElement(e.Fragment,null,e.createElement("div",{ref:f,className:a("maxio-inline-flex",g),...v(),"data-testid":"overlay-trigger"},t),l?e.createElement(r.FloatingPortal,{id:"maxio-ui-portal"},_):_)},te=({children:t,arrowPosition:l,size:n="regular",maxWidth:i=160})=>e.createElement("div",{"data-testid":"tooltip",className:a("maxio-tooltip",`maxio-tooltip--${n}`,{[`maxio-tooltip--arrow-${l}`]:l})},e.createElement("div",{className:"maxio-tooltip__content",style:{maxWidth:i}},t)),le={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"},ne=({children:a,interactions:t=["hover"],placement:l="right",maxWidth:n=160,size:i="regular",renderContent:o,autoHideMs:r,isVisible:s,usePortal:c,className:m,onVisibilityUpdate:d,floatingElementOffset:u=5})=>{const[p,x]=e.useState(!1),g=void 0!==s,v=e.useRef(null),b=e.useCallback(e=>{v.current&&clearTimeout(v.current),v.current=window.setTimeout(()=>{g||x(e),d&&d(e)},50)},[g,d]),h=e.useMemo(()=>(e=>{const a=e.startsWith("top")||e.startsWith("bottom")?"Y":"X",t=`translate${a}(${e.startsWith("bottom")||e.startsWith("right")?"-":""}10px)`;return{initial:{opacity:0,visibility:"hidden",transform:t},animate:{opacity:1,visibility:"visible",transform:`translate${a}(0px)`},exit:{opacity:0,visibility:"hidden",transform:t},transition:{ease:[.4,0,.5,1],duration:.2}}})(l),[l]);return e.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]),e.createElement(ae,{role:"tooltip",className:m,floatingElementOffset:u,motionSettings:h,isActive:g?s:p,onOverlayUpdate:b,autoHideMs:r,usePortal:c,placement:l,interactions:t,renderOverlay:()=>e.createElement(te,{size:i,arrowPosition:le[l],maxWidth:n},o())},a)},ie=e.createContext({}),oe=e.forwardRef(({disabled:l=!1,invalid:n=!1,readOnly:i=!1,size:o="md",label:r,helperText:s,showErrorMessage:c=!0,errorMessage:m,leadingElement:d=null,trailingElement:u=null,fullWidth:p,className:x,...g},v)=>{var b,h;const f=e.useRef(null);e.useImperativeHandle(v,()=>f.current);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===(h=g.value)||void 0===h?void 0:h.toString(),isDisabled:l,isReadOnly:i,isInvalid:n},{labelProps:w,inputProps:y,descriptionProps:k,errorMessageProps:C}=t.useTextField(N,f),I=a("maxio-text-field",`maxio-text-field--${o}`,{"maxio-text-field--disabled":l,"maxio-text-field--error":n,"maxio-text-field--readonly":i,"maxio-text-field--full-width":p},x),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:f,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(q,{...C},m))});oe.displayName="TextInput";const re=({options:l,label:n,size:i="md",inline:o=!1,disabled:r=!1,helperText:s,errorMessage:c,fullWidth:m=!1,...d})=>{const u=a("maxio-select",`maxio-select--${i}`,{"maxio-select--disabled":r,"maxio-select--inline":o,"maxio-select--error":!!c,"maxio-select--full-width":m}),p=t.useId();return e.createElement("div",{className:u},n&&e.createElement("label",{htmlFor:p,className:"maxio-select__label"},n),e.createElement("div",{className:"maxio-select__input-container"},e.createElement("select",{id:p,className:"maxio-select__input",disabled:r,...d},l.map(a=>e.createElement("option",{key:`option-${a.value}`,value:a.value},a.label))),e.createElement(x,{variant:"chevron-up-down"})),!!c&&e.createElement(q,null,c),s&&!c&&e.createElement("div",{className:"maxio-form-helper-text"},s))},se=({leadingIcon:a,trailingIcon:t,type:l="menu",children:n,leadingIconClassName:i,isTooltipVisible:o=!1})=>e.createElement(e.Fragment,null,a&&e.createElement(ne,{usePortal:!0,isVisible:o,renderContent:()=>n,floatingElementOffset:12},e.createElement("span",{className:"maxio-side-nav__icon"},e.createElement(x,{variant:a,className:i}))),e.createElement("span",{className:`maxio-side-nav__${l}-title`,"data-testid":"maxio-sidebar-section-name"},n),t&&e.createElement("span",{className:"maxio-side-nav__menu-chevron"},e.createElement(x,{variant:t}))),ce=e=>"heading"!==e.type,me=e=>{const a=(e=>e.flat().filter(ce).map(e=>e.items).flat().find(e=>null==e?void 0:e.isCurrent))(e);return a?e.map(e=>e.map(e=>{var t;return ce(e)&&(null===(t=e.items)||void 0===t?void 0:t.includes(a))?{...e,isOpen:!0}:e})):e},de=e.createContext({}),ue=()=>e.useContext(de),pe=({children:a,isOpen:t,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 t?t:"undefined"==typeof window||window.innerWidth>s)),[u,p]=e.useState(()=>me(i)),{windowWitdh:x}=ee(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()}(x)},[x]),e.useEffect(()=>{"boolean"==typeof t&&d(t)},[t]);const g=()=>{d(!1)};return e.createElement(de.Provider,{value:{sections:u,topDropdownItems:r,onSectionOpen:e=>{p(a=>a.map(a=>a.map(a=>ce(a)?{...a,isOpen:(null==a?void 0:a.name)===e&&!a.isOpen}:a)))},isOpen:m,onOpen:()=>{d(!0)},onClose:g,withIcons:n,shouldToggleSidebar:o}},a)},xe=()=>{const{onOpen:a,topDropdownItems:t,isOpen:l}=ue(),{mainItem:n,otherItems:i,actions:o}=t,r=e.useRef(null),s=Z(r),c=({id:e,title:a,icon:t,iconClass:l,url:n,...i})=>({id:e,label:a,leadingIconName:t,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:a},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:a,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(b,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:m,small:!0})))},ge=({section:a})=>{const{isOpen:t,withIcons:l}=ue(),n=e.useRef(null),i=Z(n);return e.createElement("li",{className:"maxio-side-nav__item","data-key":a.key,"data-testid":"maxio-sidebar-section"},e.createElement("a",{className:"maxio-side-nav__link","aria-current":a.isCurrent?"page":void 0,role:"button",href:a.href,ref:n},e.createElement(se,{isTooltipVisible:i&&!t,type:"menu",leadingIcon:l?a.icon:void 0},a.name)))},ve=({section:t})=>{var l,n;const{onOpen:i,onSectionOpen:o,isOpen:r,withIcons:s}=ue(),c=e.useRef(null),m=Z(c);if(!ce(t))return e.createElement("li",{className:"maxio-side-nav__item-header"},t.title);return t.Component?e.createElement(t.Component,{section:t}):t.href?e.createElement(ge,{section:t}):e.createElement("li",{className:a("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":t.isOpen?"true":"false",type:"button",onClick:()=>{o(t.name),i()}},e.createElement(se,{type:"menu",isTooltipVisible:!r&&m,leadingIcon:s?t.icon:void 0,trailingIcon:(null===(l=t.items)||void 0===l?void 0:l.length)?"chevron-down":void 0},t.name)),e.createElement("ul",{className:"maxio-side-nav__menu"},null===(n=t.items)||void 0===n?void 0:n.map(a=>e.createElement("li",{key:`section-sub-item-${a.name}`,className:"maxio-side-nav__item","data-testid":"maxio-section-item"},e.createElement("a",{className:"maxio-side-nav__link",href:a.href,"aria-current":a.isCurrent?"page":void 0},e.createElement("span",{className:"maxio-side-nav__link-title"},a.name))))))},be=()=>{const{sections:a}=ue();return e.createElement(e.Fragment,null,a.map((a,t)=>e.createElement("ul",{role:"list",className:"maxio-side-nav__items",key:`section-list-${t}`},a.map((a,l)=>e.createElement(ve,{key:`section-list-item-${a.type}-${t}-${l}`,section:a})))))},he=()=>{const{onClose:a,shouldToggleSidebar:t}=ue();return e.createElement("div",{className:"maxio-side-nav__logo-container"},e.createElement("a",{className:"maxio-side-nav__brand",href:"/","aria-label":"Maxio"}),t&&e.createElement("button",{className:"maxio-side-nav__menu-toggle","aria-label":"toggle sidebar",onClick:a},e.createElement(x,{variant:"sidebar"})))},fe=()=>{const{isOpen:t}=ue();return e.createElement("nav",{className:a("maxio-side-nav",{"maxio-side-nav--collapsed":!t})},e.createElement(he,null),e.createElement(xe,null),e.createElement("div",{className:"maxio-side-nav__items-container"},e.createElement(be,null)))},Ee=e.createContext({}),_e=()=>e.useContext(Ee),Ne=({children:a,variant:t="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(Ee.Provider,{value:{currentIndex:r,variant:t,withDivider:l,onChange:e=>{let a;a="function"==typeof e?e(r):e,void 0===o&&s(a),"function"==typeof i&&i(a)}}},a)},we=({disabled:t=!1,value:l=0,isCurrent:n,...i})=>{const{onChange:o,currentIndex:r}=_e(),s=a("maxio-tabs__tab",{"maxio-tabs__tab--active":r===l,"maxio-tabs__tab--disabled":t,"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:a,...t}=i;return e.createElement("div",{className:s,ref:d,onClick:c,...m,...t},e.createElement("div",{className:"maxio-tabs__tab__content"},a))}const{children:p,rightIcon:x,...g}=i;return e.createElement("div",{ref:d,className:s,onClick:c,...m,...g},e.createElement("div",{className:"maxio-tabs__tab__content"},p,x||null))},ye=({children:a,value:t,...l})=>{const{currentIndex:n}=_e();return e.createElement("div",{...l,...t?{id:`panel-${t}`}:{},role:"tabpanel","aria-labelledby":`tab-${t}`,hidden:n!==t},a)},ke=(e,a,t)=>0===e?e:1===e&&a[e-1].disabled?t||e:a[e-1].disabled?ke(e-1,a,t||e):e-1,Ce=({state:t,...l})=>{var n,i;const o=e.useRef(null),{toastProps:r,contentProps:s,titleProps:c,closeButtonProps:d}=m.useToast(l,t,o),{closable:u=!0,underline:p=!0,external:g=!1}=l.toast.content,v=a("maxio-toast",{[`maxio-toast--${l.toast.content.sentiment}`]:l.toast.content.sentiment}),b={default:"info-circle-fill",success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[l.toast.content.sentiment||"default"];return e.createElement("div",{className:v,"data-maxio-mode":"dark",...r,ref:o},e.createElement(x,{variant:b,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(h,{href:l.toast.content.link.href,underline:p,external:g},l.toast.content.link.text))),u&&e.createElement(w,{variant:"ghost",icon:e.createElement(x,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss",...d}))},Ie=({state:a,...t})=>{const l=e.useRef(null),{regionProps:n}=m.useToastRegion(t,a,l);return e.createElement("div",{...n,ref:l,className:t.className,style:{display:"flex",flexDirection:"column",gap:"10px"}},a.visibleToasts.map(t=>e.createElement(Ce,{key:t.key,toast:t,state:a})))},Se=e.createContext(null);class Pe extends c.ToastQueue{}const Te=({basis:t,flex:l,flexDirection:n,wrap:i,grow:o,shrink:r,gap:s,gapX:c,gapY:m,className:d,children:u,alignItems:p,justifyContent:x,...g})=>{const v=a("maxio-flex",{[`maxio-flex-${l}`]:l,[`maxio-basis-${t}`]:void 0!==t,[`maxio-flex-${n}`]:n,[`maxio-flex-${i}`]:i,"maxio-grow":o,"maxio-grow-0":!1===o,"maxio-shrink":r,"maxio-shrink-0":!1===r,[`maxio-gap-${s}`]:void 0!==s,[`maxio-gap-x-${c}`]:void 0!==c,[`maxio-gap-y-${m}`]:void 0!==m,[`maxio-items-${p}`]:p,[`maxio-justify-${x}`]:x},d);return e.createElement("div",{className:v,...g},u)},Re=({as:t="div",children:l,compact:n=!1,size:i="md",className:o,...r})=>{const s=t,c=a({[`maxio-body-${i}`]:!n,[`maxio-body-${i}-compact`]:n},o);return e.createElement(s,{className:c,...r},l)},$e={sm:"h3",md:"h2",lg:"h1"},De=({children:t,size:l="sm",className:n,...i})=>{const o=$e[l],r=a(`maxio-heading-${l}`,n);return e.createElement(o,{className:r,...i},t)},Oe=({...a})=>{const l=e.useRef(null),{buttonProps:n}=t.useButton(a,l);return e.createElement("button",{...n,className:"maxio-chip__dismiss-button"},e.createElement(x,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},ze={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"};Object.defineProperty(exports,"createColumnHelper",{enumerable:!0,get:function(){return l.createColumnHelper}}),exports.ActionList=b,exports.Alert=y,exports.AuthLayout=({children:t,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("div",{className:"maxio-auth-layout__header"}),e.createElement("div",{className:"maxio-auth-layout__main"},r&&e.createElement(y,{display:"block",title:r.title,sentiment:r.sentiment},r.children),e.createElement("div",{className:"maxio-auth-layout__content-wrapper"},s,e.createElement("div",{className:"maxio-auth-layout__content"},e.createElement(Te,{flexDirection:"col",gap:2},e.createElement(Te,{alignItems:"center",gap:2},o,e.createElement(De,{size:"lg",className:a("maxio-auth-layout__heading",ze[i])},l)),n&&e.createElement(Re,{size:"sm",className:"maxio-auth-layout__description"},n)),t))),e.createElement(Te,{alignItems:"center",className:"maxio-auth-layout__footer"},c),e.createElement("div",{className:"maxio-auth-layout__border-top"}),e.createElement("div",{className:"maxio-auth-layout__border-bottom"}),e.createElement("div",{className:"maxio-auth-layout__border-left"}),e.createElement("div",{className:"maxio-auth-layout__border-right"}),e.createElement("div",{className:"maxio-auth-layout__gradient-bottom"}),e.createElement("div",{className:"maxio-auth-layout__gradient-top"})),exports.Avatar=({className:t,src:l,alt:n="avatar"})=>e.createElement("img",{className:a("maxio-avatar",t),alt:n,src:l}),exports.Banner=({children:t,title:l,linkText:n,linkExternal:i,href:o,display:r="inline",sentiment:s="info",onDismiss:c,className:m})=>{if(!t&&!l)return console.warn("Banner component requires either children or title prop to be rendered"),null;const d=a("maxio-banner",{[`maxio-banner--${s}`]:"info"!==s&&s,className:m}),u={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[s],p=a("maxio-banner__content",{"maxio-banner__content--block":"block"===r});return e.createElement("div",{className:d,"aria-live":"assertive"},e.createElement(x,{variant:u,className:"maxio-banner__icon","aria-hidden":"true"}),e.createElement("section",{className:"maxio-banner__container"},e.createElement("div",{className:p},l&&e.createElement("span",{className:"maxio-banner__title"},l),t&&e.createElement("span",{className:"maxio-banner__message"},t),n&&o&&e.createElement(h,{href:o,..."warning"!==s&&{variant:"inverse"},underline:!0,...i?{external:!0}:{}},n))),c&&e.createElement(w,{icon:e.createElement(x,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:c,className:"maxio-banner__dismiss"}))},exports.Body=Re,exports.Breadcrumbs=({className:t,children:l,...n})=>{const i=e.Children.count(l);if(0===i)throw new Error(T);const o=e.Children.map(l,(a,t)=>{if(e.isValidElement(a)&&a.type===P){if(t===i-1&&a.props.href)throw new Error(R);return e.cloneElement(a,{"aria-current":t===i-1?"page":void 0})}throw new Error($)});return e.createElement("nav",{"aria-label":"Breadcrumb",...n},e.createElement("ol",{className:a("maxio-breadcrumbs",t)},o))},exports.BreadcrumbsItem=P,exports.Button=N,exports.Checkbox=F,exports.CheckboxGroup=({helperText:l,className:n,errorMessage:o,children:r,disabled:s,label:c,defaultValue:m,name:d,...u})=>{var p;const x=i.useCheckboxGroupState({defaultValue:m,name:d,errorMessage:o,description:l,label:c,isDisabled:s,isInvalid:!!o,...u}),{groupProps:g,labelProps:v,descriptionProps:b,errorMessageProps:h,isInvalid:f}=t.useCheckboxGroup({"aria-label":null===(p=null!=c?c:u["aria-label"])||void 0===p?void 0:p.toString(),isDisabled:s,isInvalid:!!o,...u},x),E=a("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(H.Provider,{value:x},r),_&&e.createElement(W,{...b},l),o&&f&&e.createElement(q,{...h},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:p}=t.useToggleButton(m,u,d),g=a("maxio-chip",{"maxio-chip--selected":null==u?void 0:u.isSelected}),v=a("maxio-chip__button",{"maxio-chip--dismissible":i});return e.createElement("div",{className:g},e.createElement("button",{className:v,ref:d,...p,title:c},r&&e.createElement(x,{variant:r,className:"maxio-chip__icon"}),e.createElement("span",{className:"maxio-chip__label"},l),s&&!i&&e.createElement(x,{variant:s,className:"maxio-chip__icon"})),i&&e.createElement(Oe,{onPress:i,"aria-label":o}))},exports.Code=({as:t="div",children:l,className:n,...i})=>{const o=t,r=a("maxio-code",n);return e.createElement(o,{className:r,...i},l)},exports.DataTable=({pattern:a,size:t="md",SubRowComponent:n,onExpand:i,onSelect:o,onSort:r,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:m=!1,columns:d,actions:u,...p})=>{const x=(({columns:a,HeaderControls:t,RowControls:l,RowActions:n,actions:i,enableExpanding:o,enableRowSelection:r})=>e.useMemo(()=>{const s={id:D,header:a=>e.createElement(t,{...a,enableExpanding:o,enableRowSelection:r}),cell:a=>e.createElement(l,{...a,enableExpanding:o}),meta:{controls:!0}},c=i&&n?{id:O,header:"",cell:a=>e.createElement(n,{...a},i(a.row,a.table)),meta:{actions:!0}}:null;let m=[...a];return(o||r)&&(m=[s,...m]),c&&(m=[...m,c]),m},[i,n,o,r,a,t,l]))({columns:d,HeaderControls:G,RowControls:U,RowActions:j,actions:u,enableRowSelection:c}),g=l.useReactTable({state:{columnPinning:{left:["row-controls"],right:["row-actions"]},...p.state},getSubRows:e=>e.subRows,getCoreRowModel:l.getCoreRowModel(),enableRowSelection:c,enableExpanding:m,...!p.manualExpanding&&{getExpandedRowModel:l.getExpandedRowModel()},enableSorting:s,...!p.manualSorting&&{getSortedRowModel:l.getSortedRowModel()},columns:x,...p}),v=g.getCanSomeRowsExpand(),b=g.getState();return e.useEffect(()=>{null==i||i(b.expanded)},[i,b.expanded]),e.useEffect(()=>{null==o||o(b.rowSelection)},[o,b.rowSelection]),e.useEffect(()=>{null==r||r(b.sorting)},[r,b.sorting]),e.createElement(z,{pattern:a,size:t,isExpandable:v,isUsingCustomRow:!!n},e.createElement(M,null,g.getHeaderGroups().map(a=>e.createElement(B,{key:a.id,table:g,isHeader:!0},a.headers.map(a=>e.createElement(V,{key:a.id,table:g,header:a,enableExpanding:m},l.flexRender(a.column.columnDef.header,a.getContext())))))),e.createElement(A,null,g.getRowModel().rows.map(t=>e.createElement(K,{key:t.id,row:t,pattern:a,SubRowComponent:n,enableExpanding:m}))))},exports.Display=({as:t="div",children:l,size:n="md",className:i,...o})=>{const r=t,s=a(`maxio-display-${n}`,i);return e.createElement(r,{className:s,...o},l)},exports.Flex=Te,exports.FormErrorMessage=q,exports.FormHelperText=W,exports.GlobalToastProvider=({children:a,toastQueue:t,...l})=>{const n=c.useToastQueue(t),i=e.useCallback(()=>{n.visibleToasts.forEach(e=>{t.close(e.key)})},[n.visibleToasts,t]),o=e.useMemo(()=>({addToast:t.add.bind(t),removeToast:t.clear.bind(t),removeAllToasts:i,state:n}),[t,i,n]);return e.createElement(Se.Provider,{value:o},a,n.visibleToasts.length>0&&e.createElement(Ie,{...l,state:n}))},exports.Grid=({children:t,templateColumns:l,templateRows:n,autoColumns:i,autoRows:o,inline:r,column:s,columnStart:c,columnEnd:m,row:d,rowStart:u,rowEnd:p,gap:x,gapX:g,gapY:v,className:b,justifyContent:h,alignItems:f,...E})=>{const _=a(b,{"maxio-grid":!r,"maxio-inline-grid":r,[`maxio-grid-cols-${l}`]:l,[`maxio-grid-rows-${n}`]:n,[`maxio-auto-cols-${i}`]:i,[`maxio-auto-rows-${o}`]:o,["maxio-col-"+("auto"===s?"auto":`span-${s}`)]:s,[`maxio-col-start-${c}`]:c,[`maxio-col-end-${m}`]:m,["maxio-row-"+("auto"===d?"auto":`span-${d}`)]:d,[`maxio-row-start-${u}`]:u,[`maxio-row-end-${p}`]:p,[`maxio-gap-${x}`]:void 0!==x,[`maxio-gap-x-${g}`]:void 0!==g,[`maxio-gap-y-${v}`]:void 0!==v,[`maxio-justify-${h}`]:h,[`maxio-items-${f}`]:f});return e.createElement("div",{className:_||void 0,...E},t)},exports.Heading=De,exports.Icon=x,exports.IconButton=w,exports.Label=({as:t="div",children:l,size:n="sm",className:i,...o})=>{const r=t,s=a(`maxio-label-${n}`,i);return e.createElement(r,{className:s,...o},l)},exports.Link=h,exports.LoadingSpinner=f,exports.Menu=({children:a})=>e.createElement(C,null,e.createElement(S,null,a)),exports.MenuButton=({children:t,iconName:l="chevron-down","aria-label":n,size:i="md",variant:o="secondary"})=>{const r=a({"maxio-action-menu__chevron":"chevron-down"===l}),s=a("maxio-button",`maxio-button--${o}`,`maxio-button--${i}`,{"maxio-button--icon":l&&!t}),{isOpen:c,buttonId:m,controlsId:d}=I();return e.createElement("summary",{className:s,"aria-haspopup":"true","aria-label":n,"aria-expanded":c,"aria-controls":d,id:m},t&&e.createElement("span",null,t),l&&e.createElement(x,{variant:l,className:`${r} maxio-button__trailing-element`}))},exports.MenuList=({items:t,alignItemsEnd:l=!1})=>{const n=a("maxio-action-menu__content",{"maxio-action-menu__content--align-end":l}),{controlsId:i,buttonId:o}=I();return e.createElement("div",{className:n,role:"presentation"},e.createElement(b,{role:"menu",itemProps:{role:"menuitem"},id:i,"aria-labelledby":o,items:t}))},exports.OverlayTrigger=ae,exports.Pagination=({size:a="md",onChange:t,totalItems:l=0,itemsPerPage:n=30,currentPage:i=1,pageSizeOptions:o,manualPageInput:r=!1})=>{const[s,c]=e.useState(i),[m,d]=e.useState(n),[u,p]=e.useState(i.toString());e.useEffect(()=>{p(s.toString())},[s]);const g=Math.ceil(l/m),v=s<g,b=s>1,h=m*(s-1)+1,f=Math.min(m*s,l),E=o.map(e=>({label:e.toString(),value:e.toString()})),_=Array.from({length:g},(e,a)=>a+1).map(e=>({label:e.toString(),value:e.toString()})),N=e=>{c(e),null==t||t({currentPage:e,itemsPerPage:m})},y=e=>{const a=parseInt(e,10);if(isNaN(a))return void p(s.toString());const t=Math.max(1,Math.min(a,g));p(t.toString()),N(t)};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(re,{inline:!0,size:a,options:E,onChange:e=>{return a=Number(e.target.value),d(a),c(1),void(null==t||t({currentPage:1,itemsPerPage:a}));var a},value:m,id:"items-per-page-large"})),e.createElement("div",{className:"maxio-pagination__total-items"},e.createElement("span",null,h,"–",f," of ",l," items")),e.createElement("div",{className:"maxio-pagination__current-page"},r?e.createElement(oe,{className:"maxio-pagination__page-input",value:u,min:1,max:g,onChange:e=>(e=>{p(e)})(e),onBlur:e=>{y(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(y(e.currentTarget.value),e.currentTarget.blur())},"aria-label":"Page number",size:a,type:"number",onWheel:e=>e.preventDefault()}):e.createElement(re,{inline:!0,size:a,"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 ",g," pages")),e.createElement("div",{className:"maxio-pagination__controls"},e.createElement(ne,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(w,{icon:e.createElement(x,{variant:"chevron-left"}),size:a,variant:"ghost",onClick:()=>N(s-1),"aria-label":"Previous",disabled:!b})),e.createElement(ne,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},e.createElement(w,{icon:e.createElement(x,{variant:"chevron-right"}),size:a,variant:"ghost",onClick:()=>N(s+1),"aria-label":"Next",disabled:!v}))))},exports.ProgressBar=({label:l,helperText:n,size:i="md",variant:o="default",status:r,value:s,maxValue:c=100})=>{const m=t.useId(),d=t.useId(),u=r&&!!l&&!!s&&!("inline"===o),p=n&&!("inline"===o),x=n&&"inline"===o,{progressBarProps:g,labelProps:v}=t.useProgressBar({maxValue:c,value:s,label:l}),b=a("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),x&&e.createElement("div",{id:d,className:"maxio-progress-bar__helper-text"},n),e.createElement("div",{className:"maxio-progress-bar__track"},e.createElement("div",{className:"maxio-progress-bar__progress",style:{"--tw-scale-x":`${s}%`}})),u&&e.createElement("div",{className:`maxio-progress-bar__${r}-icon`}),p&&e.createElement("div",{id:d,className:"maxio-progress-bar__helper-text"},n))},exports.Radio=({indent:l=!1,disabled:n=!1,invalid:i=!1,label:o,...r})=>{const s=e.useRef(null),c=e.useContext(ie),{inputProps:m,isDisabled:d}=t.useRadio({...r,value:(r.value||"").toString(),"aria-label":r["aria-label"]||o,isDisabled:n},c,s),u=a("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:a,label:l,errorMessage:n,helperText:i,disabled:o=!1,invalid:r=!1,name:c,defaultValue:m,...d})=>{const u=s.useRadioGroupState({isDisabled:o,isInvalid:r,description:i,name:c,label:l,errorMessage:n,defaultValue:m,...d}),{radioGroupProps:p,labelProps:x,descriptionProps:g,errorMessageProps:v}=t.useRadioGroup({"aria-label":d["aria-label"]||l,...d},u);return e.createElement(e.Fragment,null,e.createElement("div",{className:"maxio-radio-group",...p},l&&e.createElement("label",{className:"maxio-radio-group__label",...x},l),e.createElement(ie.Provider,{value:u},a),r&&n&&e.createElement(q,{...v},n),i&&!r&&e.createElement(W,{...g},i)))},exports.Select=re,exports.SideNav=({withIcons:a=!0,shouldToggleSidebar:t=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:o,onChange:r})=>e.createElement(pe,{isOpen:o,onChange:r,collapseBreakpoint:i,withIcons:a,shouldToggleSidebar:t,topDropdownItems:l,sections:n},e.createElement(fe,null)),exports.Tab=we,exports.TabList=({children:t,className:l,ariaLabel:n,...i})=>{const{variant:o,withDivider:r,currentIndex:s,onChange:c}=_e(),m=a("maxio-tabs",l,{"maxio-tabs--contained":"contained"===o,"maxio-tabs--divider":r}),d=e.useRef(null),u=()=>e.Children.map(t,e=>e.props);return e.createElement("div",{className:m,role:"tablist","aria-label":n,"aria-orientation":"horizontal",ref:d,onKeyDown:e=>{var a;"ArrowRight"===e.key&&c(e=>((e,a)=>{const t=a.findIndex((a,t)=>!a.disabled&&t>e);return-1===t?e:t})(e,u())),"ArrowLeft"===e.key&&c(e=>ke(e,u())),null===(a=d.current)||void 0===a||a.focus()},...i},e.Children.map(t,(a,t)=>{if(e.isValidElement(a)&&a.type===we)return e.cloneElement(a,{value:t,isCurrent:s===t});throw new Error("You can only pass <Tab /> component as children")}))},exports.TabPanel=ye,exports.TabPanels=({children:a})=>{const{currentIndex:t}=_e();return e.createElement(e.Fragment,null,e.Children.map(a,(a,l)=>{if(e.isValidElement(a)&&a.type===ye)return l===t?e.cloneElement(a,{value:l}):null;throw new Error("You can only pass <TabPanel /> component as children")}))},exports.Tabs=({children:a,variant:t="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:o})=>e.createElement(Ne,{defaultIndex:n,variant:t,withDivider:l,index:i,onChange:o},a),exports.Tag=({children:t,size:l,sentiment:n,kind:i="primary",leadingIcon:o,trailingIcon:r})=>{const s=a("maxio-tag",`maxio-tag--${i}`,!!n&&`maxio-tag--${n}`,!!l&&`maxio-tag--${l}`);return e.createElement("div",{className:s},o&&e.createElement(x,{variant:o,className:"maxio-tag__icon"}),e.createElement("span",{className:"maxio-tag__label"},t),r&&e.createElement(x,{variant:r,className:"maxio-tag__icon"}))},exports.TextInput=oe,exports.Tile=({children:t,className:l,href:n,onClick:i,target:o,disabled:r})=>{const s=n||i;if(!s)return e.createElement("div",{className:"maxio-tile"},t);const c=a("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()}},t)},exports.ToastProvider=({children:a,...t})=>{const{maxVisibleToasts:l=5,...n}=t,i=c.useToastState({maxVisibleToasts:l,...n});return e.useEffect(()=>{console.warn("ToastProvider is deprecated. Please use the global toast API instead.")},[]),e.createElement(e.Fragment,null,a(i),i.visibleToasts.length>0&&e.createElement(Ie,{...t,state:i}))},exports.ToastQueue=Pe,exports.Toggle=({defaultChecked:t,checked:l,onChange:n,disabled:i,valueDescription:o,valueDescriptionPosition:r,className:s,name:c,id:m,...d})=>{const u=e.useId(),p="boolean"==typeof t,x=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 a=e.currentTarget.checked;p&&(e.currentTarget.checked=!a),n&&n(!a,e)}},[p,n]),h=d["aria-label"]||(v?void 0:o);return e.createElement("div",{className:a("maxio-toggle",s,{"maxio-toggle--disabled":i}),style:{display:"inline-flex",flexDirection:g},"data-testid":"toggle-container"},v?e.createElement("label",{className:"maxio-toggle__label",htmlFor:x},o):null,e.createElement("div",{className:"maxio-toggle__container"},e.createElement("input",{type:"checkbox",defaultChecked:t,checked:l,onChange:e=>{n&&n(e.target.checked,e)},onKeyDown:b,disabled:i,className:"maxio-toggle__checkbox",id:x,name:c,"aria-label":h}),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=te,exports.TooltipTrigger=ne,exports.TopBar=({children:a,actions:t,sideNavIsClosed:l,openSideNav:n})=>e.createElement("nav",{className:"maxio-top-bar"},l&&e.createElement(w,{"aria-label":"Open Side Navigation",variant:"ghost",icon:e.createElement(x,{variant:"sidebar"}),onClick:n}),e.createElement(Te,{grow:!0,justifyContent:"end"},a),t),exports.useHover=Z,exports.useOverlayTrigger=J,exports.useToast=()=>{const a=e.useContext(Se);if(!a)throw new Error("useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.");return a},exports.useWindowSize=ee;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxio-com/react-ui-components",
|
|
3
|
+
"version": "0.0.0-canary.329.cc54db8",
|
|
4
|
+
"description": "React UI components",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"exports": {
|
|
8
|
+
"import": "./dist/index.esm.js",
|
|
9
|
+
"require": "./dist/index.js",
|
|
10
|
+
"types": "./typings/index.d.ts"
|
|
11
|
+
},
|
|
12
|
+
"author": "engineering@maxio.com",
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"typings",
|
|
17
|
+
"package.json"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"clean": "rimraf -rf dist temporary-typings typings tsconfig.tsbuildinfo .rollup.cache",
|
|
21
|
+
"build": "rollup --config rollup.config.ts --configPlugin typescript"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@babel/core": "^7.28.4",
|
|
25
|
+
"@babel/preset-env": "^7.28.3",
|
|
26
|
+
"@babel/preset-react": "^7.27.1",
|
|
27
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
28
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
29
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
30
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
31
|
+
"@rollup/plugin-typescript": "^12.1.4",
|
|
32
|
+
"@types/rollup-plugin-peer-deps-external": "^2.2.5",
|
|
33
|
+
"rimraf": "^6.0.1",
|
|
34
|
+
"rollup": "^4.52.2",
|
|
35
|
+
"rollup-plugin-dts": "^6.2.3",
|
|
36
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
37
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
38
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
39
|
+
"typescript": "^5.9.2"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"react": "^19.1.1",
|
|
43
|
+
"react-dom": "^19.1.1"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@floating-ui/react-dom": "^2.1.6",
|
|
47
|
+
"@floating-ui/react-dom-interactions": "^0.13.3",
|
|
48
|
+
"@maxio-com/design-tokens": "workspace:^",
|
|
49
|
+
"@react-aria/toast": "3.0.7",
|
|
50
|
+
"@react-stately/checkbox": "^3.7.1",
|
|
51
|
+
"@react-stately/radio": "^3.11.1",
|
|
52
|
+
"@react-stately/toast": "3.1.2",
|
|
53
|
+
"@react-stately/toggle": "^3.9.1",
|
|
54
|
+
"@tanstack/react-table": "^8.21.3",
|
|
55
|
+
"classnames": "^2.5.1",
|
|
56
|
+
"framer-motion": "^12.23.19",
|
|
57
|
+
"react-aria": "^3.43.2"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,713 @@
|
|
|
1
|
+
import React$1, { ReactNode, HTMLAttributes, LiHTMLAttributes, AnchorHTMLAttributes, RefObject, FC, ElementType, InputHTMLAttributes } from 'react';
|
|
2
|
+
import { RowData, Row, Table, ExpandedState, RowSelectionState, SortingState, TableOptions } from '@tanstack/react-table';
|
|
3
|
+
export { createColumnHelper } from '@tanstack/react-table';
|
|
4
|
+
import * as _floating_ui_react_dom_interactions from '@floating-ui/react-dom-interactions';
|
|
5
|
+
import { MotionProps } from 'framer-motion';
|
|
6
|
+
import { ToastState, ToastQueue as ToastQueue$1 } from '@react-stately/toast';
|
|
7
|
+
import { AriaCheckboxGroupProps, AriaRadioGroupProps, AriaToggleButtonProps } from 'react-aria';
|
|
8
|
+
|
|
9
|
+
declare const ICONS: readonly ["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", "dropbox", "hubspot", "sage", "oracle", "quotapath", "avalara", "pipedrive", "quickbooks", "salesforce", "xero"];
|
|
10
|
+
|
|
11
|
+
type IconVariant = (typeof ICONS)[number] | string;
|
|
12
|
+
type IconProps = {
|
|
13
|
+
className?: string;
|
|
14
|
+
size?: 'xs' | 'md' | 'lg';
|
|
15
|
+
variant: IconVariant;
|
|
16
|
+
color?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
declare const Icon: ({ variant, color, className, size }: IconProps) => React$1.JSX.Element;
|
|
20
|
+
//# sourceMappingURL=Icon.d.ts.map
|
|
21
|
+
|
|
22
|
+
interface DividerListItem {
|
|
23
|
+
id: string | number;
|
|
24
|
+
type: 'divider';
|
|
25
|
+
}
|
|
26
|
+
interface ListItem {
|
|
27
|
+
type?: 'default';
|
|
28
|
+
id: string | number;
|
|
29
|
+
label: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
leadingIconName?: IconVariant;
|
|
32
|
+
leadingIconClassName?: string;
|
|
33
|
+
trailingIconName?: IconVariant;
|
|
34
|
+
link: React.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
35
|
+
}
|
|
36
|
+
interface ActionItemProps extends React.HTMLAttributes<HTMLAnchorElement | HTMLDivElement> {
|
|
37
|
+
item: ActionListItem;
|
|
38
|
+
isSelected: boolean;
|
|
39
|
+
truncateLabel?: boolean;
|
|
40
|
+
small?: boolean;
|
|
41
|
+
}
|
|
42
|
+
type ActionListItem = ListItem | DividerListItem;
|
|
43
|
+
interface ActionListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
44
|
+
items: ActionListItem[];
|
|
45
|
+
isShadowed?: boolean;
|
|
46
|
+
itemProps?: Omit<ActionItemProps, 'item' | 'isSelected'>;
|
|
47
|
+
truncateLabels?: boolean;
|
|
48
|
+
small?: boolean;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare const ActionList: ({ items, isShadowed, itemProps, className, truncateLabels, small, ...props }: ActionListProps) => React$1.JSX.Element | null;
|
|
52
|
+
//# sourceMappingURL=ActionList.d.ts.map
|
|
53
|
+
|
|
54
|
+
type Sentiment$3 = 'info' | 'success' | 'warning' | 'danger';
|
|
55
|
+
type AlertProps = {
|
|
56
|
+
title?: string;
|
|
57
|
+
children?: string;
|
|
58
|
+
onDismiss?: () => void;
|
|
59
|
+
linkText?: string;
|
|
60
|
+
linkExternal?: boolean;
|
|
61
|
+
href?: string;
|
|
62
|
+
sentiment?: Sentiment$3;
|
|
63
|
+
className?: string;
|
|
64
|
+
display?: 'inline' | 'block';
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
declare const Alert: ({ children, title, linkText, linkExternal, href, display, sentiment, onDismiss, className, }: AlertProps) => React$1.JSX.Element | null;
|
|
68
|
+
//# sourceMappingURL=Alert.d.ts.map
|
|
69
|
+
|
|
70
|
+
interface MenuProps {
|
|
71
|
+
children: ReactNode | (({ isOpen, onClose, }: {
|
|
72
|
+
isOpen: boolean;
|
|
73
|
+
onClose: () => void;
|
|
74
|
+
}) => ReactNode);
|
|
75
|
+
}
|
|
76
|
+
declare const Menu: ({ children }: MenuProps) => React$1.JSX.Element;
|
|
77
|
+
|
|
78
|
+
interface MenuListProps {
|
|
79
|
+
items: ActionListItem[];
|
|
80
|
+
alignItemsEnd?: boolean;
|
|
81
|
+
}
|
|
82
|
+
declare const MenuList: ({ items, alignItemsEnd }: MenuListProps) => React$1.JSX.Element;
|
|
83
|
+
//# sourceMappingURL=MenuList.d.ts.map
|
|
84
|
+
|
|
85
|
+
type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'danger' | 'skeleton';
|
|
86
|
+
type ButtonSize$1 = 'sm' | 'md' | 'lg' | 'xl';
|
|
87
|
+
interface CommonButtonProps {
|
|
88
|
+
variant?: ButtonVariant;
|
|
89
|
+
size?: ButtonSize$1;
|
|
90
|
+
fullWidth?: boolean;
|
|
91
|
+
leadingElement?: React.ReactNode;
|
|
92
|
+
trailingElement?: React.ReactNode;
|
|
93
|
+
icon?: React.ReactNode;
|
|
94
|
+
}
|
|
95
|
+
interface InternalButtonProps extends CommonButtonProps, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value'> {
|
|
96
|
+
disabled?: boolean;
|
|
97
|
+
loading?: boolean;
|
|
98
|
+
href?: never;
|
|
99
|
+
value?: string;
|
|
100
|
+
}
|
|
101
|
+
interface InternalLinkProps extends CommonButtonProps, React.HTMLAttributes<HTMLAnchorElement> {
|
|
102
|
+
href?: string;
|
|
103
|
+
}
|
|
104
|
+
type ButtonProps = InternalButtonProps | InternalLinkProps;
|
|
105
|
+
|
|
106
|
+
type MenuButtonProps = Omit<ButtonProps, 'onClick' | 'children' | 'disabled' | 'loading' | 'icon'> & {
|
|
107
|
+
children?: React.ReactNode;
|
|
108
|
+
iconName?: IconVariant | null;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
declare const MenuButton: ({ children, iconName, "aria-label": ariaLabel, size, variant, }: MenuButtonProps) => React$1.JSX.Element;
|
|
112
|
+
//# sourceMappingURL=MenuButton.d.ts.map
|
|
113
|
+
|
|
114
|
+
type AvatarProps = {
|
|
115
|
+
className?: string;
|
|
116
|
+
src: string;
|
|
117
|
+
alt?: string;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
declare const Avatar: ({ className, src, alt }: AvatarProps) => React$1.JSX.Element;
|
|
121
|
+
//# sourceMappingURL=Avatar.d.ts.map
|
|
122
|
+
|
|
123
|
+
type Sentiment$2 = 'info' | 'success' | 'warning' | 'danger';
|
|
124
|
+
type BannerProps = {
|
|
125
|
+
title?: string;
|
|
126
|
+
children: string;
|
|
127
|
+
onDismiss?: () => void;
|
|
128
|
+
linkText?: string;
|
|
129
|
+
linkExternal?: boolean;
|
|
130
|
+
href?: string;
|
|
131
|
+
sentiment?: Sentiment$2;
|
|
132
|
+
className?: string;
|
|
133
|
+
display?: 'inline' | 'block';
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
declare const Banner: ({ children, title, linkText, linkExternal, href, display, sentiment, onDismiss, className, }: BannerProps) => React$1.JSX.Element | null;
|
|
137
|
+
//# sourceMappingURL=Banner.d.ts.map
|
|
138
|
+
|
|
139
|
+
type BreadcrumbsProps = HTMLAttributes<HTMLElement>;
|
|
140
|
+
type BreadcrumbsItemProps = {
|
|
141
|
+
href?: string;
|
|
142
|
+
} & LiHTMLAttributes<HTMLLIElement>;
|
|
143
|
+
|
|
144
|
+
declare const Breadcrumbs: React$1.FC<BreadcrumbsProps>;
|
|
145
|
+
//# sourceMappingURL=Breadcrumbs.d.ts.map
|
|
146
|
+
|
|
147
|
+
declare const BreadcrumbsItem: React$1.FC<BreadcrumbsItemProps>;
|
|
148
|
+
//# sourceMappingURL=BreadcrumbsItem.d.ts.map
|
|
149
|
+
|
|
150
|
+
declare const Button: (props: ButtonProps) => React$1.JSX.Element;
|
|
151
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
152
|
+
|
|
153
|
+
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
154
|
+
type IconButtonProps = (Omit<InternalButtonProps, 'fullWidth' | 'children'> | Omit<InternalLinkProps, 'fullWidth' | 'children'>) & {
|
|
155
|
+
'aria-label': string;
|
|
156
|
+
size?: ButtonSize;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
declare const IconButton: ({ "aria-label": ariaLabel, className, ...props }: IconButtonProps) => React$1.JSX.Element;
|
|
160
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
161
|
+
|
|
162
|
+
type TableSize = 'sm' | 'md' | 'lg';
|
|
163
|
+
type ColumnAlign = 'left' | 'right';
|
|
164
|
+
type RequiredTableOptions<TData extends RowData> = Pick<TableOptions<TData>, 'data' | 'columns'>;
|
|
165
|
+
type OptionalTableOptions<TData extends RowData> = Partial<Omit<TableOptions<TData>, 'getCoreRowModel'>>;
|
|
166
|
+
type DataTableProps<TData extends RowData = unknown> = {
|
|
167
|
+
size?: TableSize;
|
|
168
|
+
pattern?: boolean;
|
|
169
|
+
align?: ColumnAlign;
|
|
170
|
+
SubRowComponent?: (row: Row<TData>) => React.ReactNode;
|
|
171
|
+
isLoading?: boolean;
|
|
172
|
+
actions?: (row: Row<TData>, table: Table<TData>) => React.ReactNode;
|
|
173
|
+
onExpand?: (expanded: ExpandedState) => void;
|
|
174
|
+
onSelect?: (selected: RowSelectionState) => void;
|
|
175
|
+
onSort?: (selected: SortingState) => void;
|
|
176
|
+
} & RequiredTableOptions<TData> & OptionalTableOptions<TData>;
|
|
177
|
+
declare module '@tanstack/react-table' {
|
|
178
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
179
|
+
align?: ColumnAlign;
|
|
180
|
+
width?: string;
|
|
181
|
+
controls?: boolean;
|
|
182
|
+
actions?: boolean;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
declare const DataTable: <TData extends RowData>({ pattern, size, SubRowComponent, onExpand, onSelect, onSort, enableSorting, enableRowSelection, enableExpanding, columns: originalColumns, actions, ...props }: DataTableProps<TData>) => React$1.JSX.Element;
|
|
187
|
+
//# sourceMappingURL=DataTable.d.ts.map
|
|
188
|
+
|
|
189
|
+
type Variant = 'primary' | 'secondary' | 'tertiary' | 'high-contrast' | 'inverse';
|
|
190
|
+
type Size = 'xs' | 'sm' | 'md' | 'lg';
|
|
191
|
+
interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
192
|
+
className?: string;
|
|
193
|
+
children: ReactNode;
|
|
194
|
+
size?: Size;
|
|
195
|
+
disabled?: boolean;
|
|
196
|
+
icon?: IconVariant;
|
|
197
|
+
external?: boolean;
|
|
198
|
+
variant?: Variant;
|
|
199
|
+
underline?: boolean;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare const Link: React$1.FC<LinkProps>;
|
|
203
|
+
//# sourceMappingURL=Link.d.ts.map
|
|
204
|
+
|
|
205
|
+
type LoadingSpinnerSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
206
|
+
type LoadingSpinnerProps = {
|
|
207
|
+
size?: LoadingSpinnerSize;
|
|
208
|
+
white?: boolean;
|
|
209
|
+
className?: string;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
declare const LoadingSpinner: ({ size, white, className, }: LoadingSpinnerProps) => React$1.JSX.Element;
|
|
213
|
+
//# sourceMappingURL=LoadingSpinner.d.ts.map
|
|
214
|
+
|
|
215
|
+
type Alignment = 'start' | 'end';
|
|
216
|
+
type Side = 'top' | 'right' | 'bottom' | 'left';
|
|
217
|
+
type AlignedPlacement = `${Side}-${Alignment}`;
|
|
218
|
+
type Placement = Side | AlignedPlacement;
|
|
219
|
+
type Interactions = 'click' | 'hover' | 'focus' | 'dismiss';
|
|
220
|
+
type OverlayAriaRole = 'tooltip' | 'dialog' | 'alertdialog' | 'menu' | 'listbox' | 'grid' | 'tree';
|
|
221
|
+
|
|
222
|
+
type OverlayTriggerSettings = {
|
|
223
|
+
placement?: Placement;
|
|
224
|
+
isInitiallyActive?: boolean;
|
|
225
|
+
interactions?: Interactions[];
|
|
226
|
+
floatingElementOffset?: number;
|
|
227
|
+
role: OverlayAriaRole;
|
|
228
|
+
isActive?: boolean;
|
|
229
|
+
onOverlayUpdate: (isActive: boolean) => void;
|
|
230
|
+
autoHideMs?: number;
|
|
231
|
+
};
|
|
232
|
+
declare const useOverlayTrigger: ({ placement, isActive, interactions, floatingElementOffset, onOverlayUpdate, autoHideMs, }: OverlayTriggerSettings) => {
|
|
233
|
+
isActive: boolean;
|
|
234
|
+
refs: {
|
|
235
|
+
floating: (node: HTMLElement | null) => void;
|
|
236
|
+
reference: (node: _floating_ui_react_dom_interactions.ReferenceType | null) => void;
|
|
237
|
+
};
|
|
238
|
+
floatingElementCSSPosition: {
|
|
239
|
+
position: _floating_ui_react_dom_interactions.Strategy;
|
|
240
|
+
top: number;
|
|
241
|
+
left: number;
|
|
242
|
+
};
|
|
243
|
+
getReferenceProps: (userProps?: React.HTMLProps<Element> | undefined) => Record<string, unknown>;
|
|
244
|
+
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
declare function useHover<T extends HTMLElement = HTMLElement>(ref: RefObject<T | null>, mouseLeaveDelay?: number): boolean;
|
|
248
|
+
|
|
249
|
+
declare function useWindowSize(debounce?: number): {
|
|
250
|
+
windowWitdh: number;
|
|
251
|
+
windowHeight: number;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
type OverlayTriggerProps = {
|
|
255
|
+
children: React$1.ReactNode;
|
|
256
|
+
placement?: Placement;
|
|
257
|
+
usePortal?: boolean;
|
|
258
|
+
interactions?: Interactions[];
|
|
259
|
+
renderOverlay: () => React$1.ReactNode;
|
|
260
|
+
role?: OverlayAriaRole;
|
|
261
|
+
floatingElementOffset?: number;
|
|
262
|
+
isActive?: boolean;
|
|
263
|
+
onOverlayUpdate: (isActive: boolean) => void;
|
|
264
|
+
motionSettings?: MotionProps;
|
|
265
|
+
autoHideMs?: number;
|
|
266
|
+
className?: string;
|
|
267
|
+
};
|
|
268
|
+
declare const OverlayTrigger: FC<OverlayTriggerProps>;
|
|
269
|
+
|
|
270
|
+
type PageInfo = {
|
|
271
|
+
currentPage: number;
|
|
272
|
+
itemsPerPage: number;
|
|
273
|
+
};
|
|
274
|
+
type PaginationProps = {
|
|
275
|
+
totalItems?: number;
|
|
276
|
+
currentPage?: number;
|
|
277
|
+
itemsPerPage?: number;
|
|
278
|
+
pageSizeOptions: number[];
|
|
279
|
+
size?: 'sm' | 'md' | 'lg';
|
|
280
|
+
onChange?: (pageInfo: PageInfo) => void;
|
|
281
|
+
manualPageInput?: boolean;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
declare const Pagination: ({ size, onChange, totalItems, itemsPerPage: itemsPerPageProp, currentPage: currentPageProp, pageSizeOptions, manualPageInput, }: PaginationProps) => React$1.JSX.Element;
|
|
285
|
+
//# sourceMappingURL=Pagination.d.ts.map
|
|
286
|
+
|
|
287
|
+
interface ProgressBarProps {
|
|
288
|
+
label: string;
|
|
289
|
+
helperText?: string;
|
|
290
|
+
size?: 'md' | 'lg';
|
|
291
|
+
status?: 'success' | 'error';
|
|
292
|
+
variant?: 'default' | 'inline' | 'indent';
|
|
293
|
+
value?: number;
|
|
294
|
+
maxValue?: number;
|
|
295
|
+
}
|
|
296
|
+
declare const ProgressBar: ({ label, helperText, size, variant, status, value, maxValue, }: ProgressBarProps) => React$1.JSX.Element;
|
|
297
|
+
|
|
298
|
+
interface SingleSection {
|
|
299
|
+
href?: string;
|
|
300
|
+
icon: IconVariant | null;
|
|
301
|
+
name: string;
|
|
302
|
+
key: string;
|
|
303
|
+
isCurrent?: boolean;
|
|
304
|
+
type?: 'regular';
|
|
305
|
+
}
|
|
306
|
+
interface SingleSectionWithItems extends SingleSection {
|
|
307
|
+
isOpen?: boolean;
|
|
308
|
+
items?: SingleSection[];
|
|
309
|
+
}
|
|
310
|
+
type SectionComponent = React.FC<{
|
|
311
|
+
section: SingleSectionWithItems;
|
|
312
|
+
}>;
|
|
313
|
+
interface Section extends SingleSectionWithItems {
|
|
314
|
+
Component?: SectionComponent;
|
|
315
|
+
}
|
|
316
|
+
interface SectionHeading {
|
|
317
|
+
title: string;
|
|
318
|
+
type?: 'heading';
|
|
319
|
+
}
|
|
320
|
+
type SectionGroup = (Section | SectionHeading)[];
|
|
321
|
+
interface SideNavProviderProps {
|
|
322
|
+
children: ReactNode;
|
|
323
|
+
withIcons?: boolean;
|
|
324
|
+
shouldToggleSidebar?: boolean;
|
|
325
|
+
sections: SectionGroup[];
|
|
326
|
+
collapseBreakpoint?: number;
|
|
327
|
+
topDropdownItems: SideNavTopDropdown;
|
|
328
|
+
isOpen?: boolean;
|
|
329
|
+
onChange?: (isOpen: boolean) => void;
|
|
330
|
+
}
|
|
331
|
+
interface SideNavTopDropdown {
|
|
332
|
+
mainItem: SideNavTopDropdownItem;
|
|
333
|
+
otherItems: SideNavTopDropdownItem[];
|
|
334
|
+
actions: SideNavTopDropdownItem[];
|
|
335
|
+
}
|
|
336
|
+
interface SideNavTopDropdownItem extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
337
|
+
id: string;
|
|
338
|
+
title: string;
|
|
339
|
+
icon: IconVariant;
|
|
340
|
+
iconClass?: string;
|
|
341
|
+
url: string;
|
|
342
|
+
rel?: string;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
type SideNavWrapperProps = Omit<SideNavProviderProps, 'children'>;
|
|
346
|
+
declare const SideNavWrapper: ({ withIcons, shouldToggleSidebar, topDropdownItems, sections, collapseBreakpoint, isOpen, onChange, }: SideNavWrapperProps) => React$1.JSX.Element;
|
|
347
|
+
|
|
348
|
+
type CommonTabProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
349
|
+
disabled?: boolean;
|
|
350
|
+
value?: number;
|
|
351
|
+
isCurrent?: boolean;
|
|
352
|
+
};
|
|
353
|
+
type IconTab = {
|
|
354
|
+
type: 'icon';
|
|
355
|
+
icon: ReactNode;
|
|
356
|
+
};
|
|
357
|
+
type DefaultTab = {
|
|
358
|
+
type?: 'default';
|
|
359
|
+
children: ReactNode;
|
|
360
|
+
rightIcon?: ReactNode;
|
|
361
|
+
};
|
|
362
|
+
type TabProps = CommonTabProps & (DefaultTab | IconTab);
|
|
363
|
+
|
|
364
|
+
declare const Tab: ({ disabled, value, isCurrent, ...props }: TabProps) => React$1.JSX.Element;
|
|
365
|
+
//# sourceMappingURL=Tab.d.ts.map
|
|
366
|
+
|
|
367
|
+
type TabsVariant = 'line' | 'contained';
|
|
368
|
+
interface TabsContext {
|
|
369
|
+
variant: TabsVariant;
|
|
370
|
+
withDivider: boolean;
|
|
371
|
+
onChange: (idx: number | ((prevIdx: number) => number)) => void;
|
|
372
|
+
currentIndex: number;
|
|
373
|
+
}
|
|
374
|
+
type TabsProviderProps = Omit<Partial<TabsContext>, 'currentIndex'> & {
|
|
375
|
+
children: ReactNode;
|
|
376
|
+
defaultIndex?: number;
|
|
377
|
+
index?: number;
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
type TabsProps = TabsProviderProps;
|
|
381
|
+
declare const Tabs: ({ children, variant, withDivider, defaultIndex, index, onChange, }: TabsProps) => React$1.JSX.Element;
|
|
382
|
+
//# sourceMappingURL=Tabs.d.ts.map
|
|
383
|
+
|
|
384
|
+
interface TabPanelProps extends React$1.HtmlHTMLAttributes<HTMLDivElement> {
|
|
385
|
+
children: ReactNode;
|
|
386
|
+
value?: number;
|
|
387
|
+
}
|
|
388
|
+
declare const TabPanel: ({ children, value, ...props }: TabPanelProps) => React$1.JSX.Element;
|
|
389
|
+
|
|
390
|
+
interface TabPanelsProps {
|
|
391
|
+
children: React$1.ReactNode;
|
|
392
|
+
}
|
|
393
|
+
declare const TabPanels: ({ children }: TabPanelsProps) => React$1.JSX.Element;
|
|
394
|
+
//# sourceMappingURL=TabPanels.d.ts.map
|
|
395
|
+
|
|
396
|
+
interface TabListProps extends React$1.HtmlHTMLAttributes<HTMLDivElement> {
|
|
397
|
+
ariaLabel: string;
|
|
398
|
+
children: ReactNode;
|
|
399
|
+
}
|
|
400
|
+
declare const TabList: ({ children, className, ariaLabel, ...props }: TabListProps) => React$1.JSX.Element;
|
|
401
|
+
//# sourceMappingURL=TabList.d.ts.map
|
|
402
|
+
|
|
403
|
+
type TagSize = 'sm';
|
|
404
|
+
type TagKind = 'primary' | 'secondary' | 'tertiary';
|
|
405
|
+
type TagSentiment = 'info' | 'success' | 'warning' | 'danger' | 'highlight';
|
|
406
|
+
type TagProps = {
|
|
407
|
+
children: React.ReactNode;
|
|
408
|
+
leadingIcon?: IconVariant;
|
|
409
|
+
trailingIcon?: IconVariant;
|
|
410
|
+
size?: TagSize;
|
|
411
|
+
sentiment?: TagSentiment;
|
|
412
|
+
kind?: TagKind;
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
declare const Tag: ({ children, size, sentiment, kind, leadingIcon, trailingIcon, }: TagProps) => React$1.JSX.Element;
|
|
416
|
+
//# sourceMappingURL=Tag.d.ts.map
|
|
417
|
+
|
|
418
|
+
type TileProps = {
|
|
419
|
+
disabled?: boolean;
|
|
420
|
+
href?: string;
|
|
421
|
+
target?: 'string';
|
|
422
|
+
onClick?: () => void;
|
|
423
|
+
} & React$1.HTMLAttributes<HTMLDivElement>;
|
|
424
|
+
declare const Tile: ({ children, className, href, onClick, target, disabled, }: TileProps) => React$1.JSX.Element;
|
|
425
|
+
//# sourceMappingURL=Tile.d.ts.map
|
|
426
|
+
|
|
427
|
+
type Sentiment$1 = 'info' | 'success' | 'warning' | 'danger';
|
|
428
|
+
interface ToastContent extends Omit<LinkProps, 'children'> {
|
|
429
|
+
title?: string;
|
|
430
|
+
message?: string | ReactNode;
|
|
431
|
+
link?: {
|
|
432
|
+
text: string;
|
|
433
|
+
href: string;
|
|
434
|
+
};
|
|
435
|
+
sentiment?: Sentiment$1;
|
|
436
|
+
closable?: boolean;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
type ToastProviderProps = {
|
|
440
|
+
children: (state: ToastState<ToastContent>) => any;
|
|
441
|
+
className?: string;
|
|
442
|
+
maxVisibleToasts?: number;
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
declare const ToastProvider: ({ children, ...props }: ToastProviderProps) => React$1.JSX.Element;
|
|
446
|
+
//# sourceMappingURL=ToastProvider.d.ts.map
|
|
447
|
+
|
|
448
|
+
type GlobalToastProviderProps = {
|
|
449
|
+
children: React.ReactNode;
|
|
450
|
+
className?: string;
|
|
451
|
+
toastQueue: ToastQueue;
|
|
452
|
+
};
|
|
453
|
+
interface ToastContextValue {
|
|
454
|
+
addToast: (toast: Omit<ToastContent, 'id'>) => string;
|
|
455
|
+
removeToast: (id: string) => void;
|
|
456
|
+
removeAllToasts: () => void;
|
|
457
|
+
state: ToastState<ToastContent>;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
declare const GlobalToastProvider: ({ children, toastQueue, ...props }: GlobalToastProviderProps) => React$1.JSX.Element;
|
|
461
|
+
declare const useToast: () => ToastContextValue;
|
|
462
|
+
declare class ToastQueue extends ToastQueue$1<ToastContent> {
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
type ToggleProps = {
|
|
466
|
+
checked?: boolean;
|
|
467
|
+
defaultChecked?: boolean;
|
|
468
|
+
onChange?: (value: boolean, event?: React$1.ChangeEvent<HTMLInputElement> | React$1.KeyboardEvent<HTMLInputElement>) => void;
|
|
469
|
+
disabled?: boolean;
|
|
470
|
+
name?: string;
|
|
471
|
+
valueDescription?: string;
|
|
472
|
+
valueDescriptionPosition?: 'left' | 'right';
|
|
473
|
+
className?: string;
|
|
474
|
+
id?: string;
|
|
475
|
+
'aria-label'?: string;
|
|
476
|
+
};
|
|
477
|
+
declare const Toggle: ({ defaultChecked, checked, onChange, disabled, valueDescription, valueDescriptionPosition, className, name, id, ...props }: ToggleProps) => React$1.JSX.Element;
|
|
478
|
+
|
|
479
|
+
type ArrowPosition = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'left-top' | 'left-bottom' | 'right' | 'right-top' | 'right-bottom';
|
|
480
|
+
|
|
481
|
+
type TooltipProps = {
|
|
482
|
+
children: React$1.ReactNode;
|
|
483
|
+
size?: 'regular' | 'small';
|
|
484
|
+
arrowPosition?: ArrowPosition;
|
|
485
|
+
maxWidth?: number | 'none';
|
|
486
|
+
};
|
|
487
|
+
declare const Tooltip: FC<TooltipProps>;
|
|
488
|
+
|
|
489
|
+
type TooltipTriggerProps = {
|
|
490
|
+
children: React$1.ReactNode;
|
|
491
|
+
isVisible?: boolean;
|
|
492
|
+
onVisibilityUpdate?: (isVisible: boolean) => void;
|
|
493
|
+
renderContent: () => React$1.ReactNode;
|
|
494
|
+
floatingElementOffset?: number;
|
|
495
|
+
} & Pick<OverlayTriggerProps, 'placement' | 'interactions' | 'usePortal' | 'autoHideMs' | 'className'> & Pick<TooltipProps, 'size' | 'maxWidth'>;
|
|
496
|
+
declare const TooltipTrigger: FC<TooltipTriggerProps>;
|
|
497
|
+
|
|
498
|
+
type TopBarProps = {
|
|
499
|
+
actions: React$1.ReactNode;
|
|
500
|
+
children?: React$1.ReactNode;
|
|
501
|
+
sideNavIsClosed?: boolean;
|
|
502
|
+
openSideNav?: () => void;
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
declare const TopBar: ({ children, actions, sideNavIsClosed, openSideNav, }: TopBarProps) => React$1.JSX.Element;
|
|
506
|
+
|
|
507
|
+
type BaseTypographyProps = {
|
|
508
|
+
className?: string;
|
|
509
|
+
children: ReactNode;
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
type BodyProps = BaseTypographyProps & {
|
|
513
|
+
as?: ElementType;
|
|
514
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
515
|
+
compact?: boolean;
|
|
516
|
+
};
|
|
517
|
+
declare const Body: ({ as, children, compact, size, className, ...rest }: BodyProps) => React$1.JSX.Element;
|
|
518
|
+
|
|
519
|
+
type HeadingProps = BaseTypographyProps & {
|
|
520
|
+
size?: 'sm' | 'md' | 'lg';
|
|
521
|
+
};
|
|
522
|
+
declare const Heading: ({ children, size, className, ...rest }: HeadingProps) => React$1.JSX.Element;
|
|
523
|
+
|
|
524
|
+
type DisplayProps = BaseTypographyProps & {
|
|
525
|
+
as?: ElementType;
|
|
526
|
+
size?: 'sm' | 'md' | 'lg';
|
|
527
|
+
};
|
|
528
|
+
declare const Display: ({ as, children, size, className, ...rest }: DisplayProps) => React$1.JSX.Element;
|
|
529
|
+
|
|
530
|
+
type CodeProps = BaseTypographyProps & {
|
|
531
|
+
as?: ElementType;
|
|
532
|
+
};
|
|
533
|
+
declare const Code: ({ as, children, className, ...rest }: CodeProps) => React$1.JSX.Element;
|
|
534
|
+
|
|
535
|
+
type LabelProps = BaseTypographyProps & {
|
|
536
|
+
as?: ElementType;
|
|
537
|
+
size?: 'xs' | 'sm';
|
|
538
|
+
};
|
|
539
|
+
declare const Label: ({ as, children, size, className, ...rest }: LabelProps) => React$1.JSX.Element;
|
|
540
|
+
|
|
541
|
+
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
542
|
+
indeterminate?: boolean;
|
|
543
|
+
error?: boolean;
|
|
544
|
+
label?: string;
|
|
545
|
+
value?: string;
|
|
546
|
+
disabled?: boolean;
|
|
547
|
+
onChange?: (selected: boolean) => void;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
declare const Checkbox: ({ label, error, className, indeterminate, value, disabled, readOnly, defaultChecked, checked, ...props }: CheckboxProps) => React$1.JSX.Element;
|
|
551
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
552
|
+
|
|
553
|
+
interface CheckboxGroupProps extends Pick<AriaCheckboxGroupProps, 'aria-describedby' | 'aria-details' | 'aria-errormessage' | 'aria-label' | 'aria-labelledby' | 'onBlur' | 'onFocus' | 'onChange' | 'onFocusChange' | 'value' | 'defaultValue' | 'label'> {
|
|
554
|
+
children: ReactNode;
|
|
555
|
+
className?: string;
|
|
556
|
+
disabled?: boolean;
|
|
557
|
+
errorMessage?: string;
|
|
558
|
+
helperText?: string;
|
|
559
|
+
name: string;
|
|
560
|
+
}
|
|
561
|
+
declare const CheckboxGroup: ({ helperText, className, errorMessage, children, disabled, label, defaultValue, name, ...props }: CheckboxGroupProps) => React$1.JSX.Element;
|
|
562
|
+
|
|
563
|
+
interface RadioProps extends React$1.InputHTMLAttributes<HTMLInputElement> {
|
|
564
|
+
label: string;
|
|
565
|
+
indent?: boolean;
|
|
566
|
+
disabled?: boolean;
|
|
567
|
+
invalid?: boolean;
|
|
568
|
+
}
|
|
569
|
+
declare const Radio: ({ indent, disabled, invalid, label, ...props }: RadioProps) => React$1.JSX.Element;
|
|
570
|
+
//# sourceMappingURL=Radio.d.ts.map
|
|
571
|
+
|
|
572
|
+
type RadioGroupProps = Pick<AriaRadioGroupProps, 'aria-describedby' | 'aria-details' | 'aria-errormessage' | 'aria-label' | 'aria-labelledby' | 'onBlur' | 'onFocus' | 'onChange' | 'onFocusChange' | 'value' | 'defaultValue'> & {
|
|
573
|
+
label?: string;
|
|
574
|
+
name: string;
|
|
575
|
+
errorMessage?: string;
|
|
576
|
+
helperText?: string;
|
|
577
|
+
children: React$1.ReactNode;
|
|
578
|
+
disabled?: boolean;
|
|
579
|
+
invalid?: boolean;
|
|
580
|
+
defaultValue?: string;
|
|
581
|
+
};
|
|
582
|
+
declare const RadioGroup: ({ children, label, errorMessage, helperText, disabled, invalid, name, defaultValue, ...props }: RadioGroupProps) => React$1.JSX.Element;
|
|
583
|
+
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
584
|
+
|
|
585
|
+
interface TextInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'autoCapitalize' | 'onChange'> {
|
|
586
|
+
label?: string;
|
|
587
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
588
|
+
fullWidth?: boolean;
|
|
589
|
+
disabled?: boolean;
|
|
590
|
+
invalid?: boolean;
|
|
591
|
+
readOnly?: boolean;
|
|
592
|
+
helperText?: string;
|
|
593
|
+
errorMessage?: string;
|
|
594
|
+
leadingElement?: ReactNode;
|
|
595
|
+
trailingElement?: ReactNode;
|
|
596
|
+
onChange: (value: string) => void;
|
|
597
|
+
showErrorMessage?: boolean;
|
|
598
|
+
}
|
|
599
|
+
declare const TextInput: React$1.ForwardRefExoticComponent<TextInputProps & React$1.RefAttributes<unknown>>;
|
|
600
|
+
//# sourceMappingURL=TextInput.d.ts.map
|
|
601
|
+
|
|
602
|
+
type Option = {
|
|
603
|
+
value: string;
|
|
604
|
+
label: string;
|
|
605
|
+
};
|
|
606
|
+
interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
607
|
+
label?: string;
|
|
608
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
609
|
+
disabled?: boolean;
|
|
610
|
+
inline?: boolean;
|
|
611
|
+
helperText?: string;
|
|
612
|
+
errorMessage?: string;
|
|
613
|
+
options: Option[];
|
|
614
|
+
fullWidth?: boolean;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
declare const Select: ({ options, label, size, inline, disabled, helperText, errorMessage, fullWidth, ...props }: SelectProps) => React$1.JSX.Element;
|
|
618
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
619
|
+
|
|
620
|
+
type FormErrorMessageProps = React$1.HtmlHTMLAttributes<HTMLDivElement>;
|
|
621
|
+
declare const FormErrorMessage: ({ children, className, ...props }: FormErrorMessageProps) => React$1.JSX.Element;
|
|
622
|
+
//# sourceMappingURL=FormErrorMessage.d.ts.map
|
|
623
|
+
|
|
624
|
+
declare const FormHelperText: ({ children, className, ...props }: React$1.HtmlHTMLAttributes<HTMLDivElement>) => React$1.JSX.Element;
|
|
625
|
+
//# sourceMappingURL=FormHelperText.d.ts.map
|
|
626
|
+
|
|
627
|
+
type ChipProps = AriaToggleButtonProps & {
|
|
628
|
+
label: string;
|
|
629
|
+
title?: string;
|
|
630
|
+
onDismiss?: () => void;
|
|
631
|
+
dismissLabel?: string;
|
|
632
|
+
leadingIcon?: IconVariant;
|
|
633
|
+
trailingIcon?: IconVariant;
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
declare const Chip: ({ label, onDismiss, dismissLabel, leadingIcon, trailingIcon, title, ...props }: ChipProps) => React$1.JSX.Element;
|
|
637
|
+
//# sourceMappingURL=Chip.d.ts.map
|
|
638
|
+
|
|
639
|
+
type FlexBasisValue = 'auto' | '1/2' | '1/3' | '2/3' | '1/4' | '2/4' | '3/4' | '1/5' | '2/5' | '3/5' | '4/5' | '1/6' | '2/6' | '3/6' | '4/6' | '5/6' | '1/12' | '2/12' | '3/12' | '4/12' | '5/12' | '6/12' | '7/12' | '8/12' | '9/12' | '10/12' | '11/12' | 'full';
|
|
640
|
+
type GapValue = 0 | 'px' | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96;
|
|
641
|
+
type FlexProps = {
|
|
642
|
+
children?: React.ReactNode;
|
|
643
|
+
flexDirection?: 'row' | 'row-reverse' | 'col' | 'col-reverse';
|
|
644
|
+
wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
645
|
+
alignItems?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
646
|
+
justifyContent?: 'normal' | 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | 'stretch';
|
|
647
|
+
basis?: FlexBasisValue;
|
|
648
|
+
flex?: 'initial' | 'none' | 'auto' | 1;
|
|
649
|
+
grow?: boolean;
|
|
650
|
+
shrink?: boolean;
|
|
651
|
+
gap?: GapValue;
|
|
652
|
+
gapX?: GapValue;
|
|
653
|
+
gapY?: GapValue;
|
|
654
|
+
className?: string;
|
|
655
|
+
} & React.HTMLAttributes<HTMLDivElement>;
|
|
656
|
+
|
|
657
|
+
declare const Flex: ({ basis, flex, flexDirection, wrap, grow, shrink, gap, gapX, gapY, className, children, alignItems, justifyContent, ...props }: FlexProps) => React$1.JSX.Element;
|
|
658
|
+
//# sourceMappingURL=Flex.d.ts.map
|
|
659
|
+
|
|
660
|
+
type TemplateColRowValues = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'none' | 'subgrid';
|
|
661
|
+
type GridColVariant = TemplateColRowValues;
|
|
662
|
+
type GridRowVariant = TemplateColRowValues;
|
|
663
|
+
type AutoColRowVariant = 'auto' | 'min' | 'max' | 'fr';
|
|
664
|
+
type GridColRowStartEndSizes = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13;
|
|
665
|
+
type GridColumnRowVariant = 'auto' | 'full' | GridColRowStartEndSizes;
|
|
666
|
+
type GridColumnRowStartEndVariant = 'auto' | GridColRowStartEndSizes;
|
|
667
|
+
type GapSize = 0 | 'px' | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96;
|
|
668
|
+
type GapVariant = GapSize;
|
|
669
|
+
type BaseContentValues = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | 'stretch';
|
|
670
|
+
type JustifyContentVariant = BaseContentValues | 'normal';
|
|
671
|
+
type BaseItemsValues = 'start' | 'end' | 'center' | 'stretch';
|
|
672
|
+
type AlignItemsVariant = BaseItemsValues | 'baseline';
|
|
673
|
+
type GridProps = {
|
|
674
|
+
children: ReactNode;
|
|
675
|
+
inline?: boolean;
|
|
676
|
+
templateColumns?: GridColVariant;
|
|
677
|
+
templateRows?: GridRowVariant;
|
|
678
|
+
column?: GridColumnRowVariant;
|
|
679
|
+
columnStart?: GridColumnRowStartEndVariant;
|
|
680
|
+
columnEnd?: GridColumnRowStartEndVariant;
|
|
681
|
+
row?: GridColumnRowVariant;
|
|
682
|
+
rowStart?: GridColumnRowStartEndVariant;
|
|
683
|
+
rowEnd?: GridColumnRowStartEndVariant;
|
|
684
|
+
autoColumns?: AutoColRowVariant;
|
|
685
|
+
autoRows?: AutoColRowVariant;
|
|
686
|
+
gap?: GapVariant;
|
|
687
|
+
gapX?: GapVariant;
|
|
688
|
+
gapY?: GapVariant;
|
|
689
|
+
justifyContent?: JustifyContentVariant;
|
|
690
|
+
alignItems?: AlignItemsVariant;
|
|
691
|
+
} & React.HTMLAttributes<HTMLDivElement>;
|
|
692
|
+
//# sourceMappingURL=types.d.ts.map
|
|
693
|
+
|
|
694
|
+
declare const Grid: ({ children, templateColumns, templateRows, autoColumns, autoRows, inline, column, columnStart, columnEnd, row, rowStart, rowEnd, gap, gapX, gapY, className, justifyContent, alignItems, ...props }: GridProps) => React$1.JSX.Element;
|
|
695
|
+
//# sourceMappingURL=Grid.d.ts.map
|
|
696
|
+
|
|
697
|
+
type Sentiment = 'success' | 'danger';
|
|
698
|
+
type AuthLayoutProps = {
|
|
699
|
+
children: React.ReactNode;
|
|
700
|
+
heading: string;
|
|
701
|
+
description?: string | React.ReactNode;
|
|
702
|
+
sentiment?: Sentiment;
|
|
703
|
+
leadingElement?: React.ReactNode;
|
|
704
|
+
alert?: AlertProps;
|
|
705
|
+
footer?: React.ReactNode;
|
|
706
|
+
topAddon?: React.ReactNode;
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
declare const AuthLayout: ({ children, heading, description, sentiment, leadingElement, alert, topAddon, footer, }: AuthLayoutProps) => React$1.JSX.Element;
|
|
710
|
+
//# sourceMappingURL=AuthLayout.d.ts.map
|
|
711
|
+
|
|
712
|
+
export { ActionList, Alert, AuthLayout, Avatar, Banner, Body, Breadcrumbs, BreadcrumbsItem, Button, Checkbox, CheckboxGroup, Chip, Code, DataTable, Display, Flex, FormErrorMessage, FormHelperText, GlobalToastProvider, Grid, Heading, Icon, IconButton, Label, Link, LoadingSpinner, Menu, MenuButton, MenuList, OverlayTrigger, Pagination, ProgressBar, Radio, RadioGroup, Select, SideNavWrapper as SideNav, Tab, TabList, TabPanel, TabPanels, Tabs, Tag, TextInput, Tile, ToastProvider, ToastQueue, Toggle, Tooltip, TooltipTrigger, TopBar, useHover, useOverlayTrigger, useToast, useWindowSize };
|
|
713
|
+
export type { Interactions, OverlayAriaRole, Placement };
|