@rocket.chat/fuselage 0.90.1 → 0.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -194,7 +194,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
194
194
  ${n&&l.css`
195
195
  scroll-behavior: smooth !important;
196
196
  `}
197
- `,null),x=(0,i.useCallback)((e=>(e.className=d&&z(e.className,d),void 0!==a&&void 0===e.onScroll&&(e.onScroll=c),e)),[d,c,a]);return(0,j.jsx)(H.Provider,{value:W(x),children:e})};function Tr({elevation:e="1",padding:r=16,...t}){return(0,j.jsx)(He,{"rcx-tile":!0,"rcx-tile--elevation":e,padding:r,...t})}var Rr=(0,i.memo)((({customEmpty:e})=>(0,j.jsx)(wr,{label:e||"Empty"})));function zr({maxHeight:e="x144",multiple:r,renderEmpty:t=Rr,options:n,cursor:a,renderItem:s=wr,onSelect:o,customEmpty:l,id:c,...d}){const x=(0,i.useRef)(null);(0,i.useLayoutEffect)((()=>{if(!x.current)return;const{current:e}=x,r=e?.querySelector(".rcx-option--focus");r&&(r.offsetTop+r.clientHeight>e.scrollTop+e.clientHeight||r.offsetTop-r.clientHeight<e.scrollTop)&&(e.scrollTop=r.offsetTop)}),[a]);const u=(0,i.useMemo)((()=>n.map((([e,r,t,n,i,l],c)=>{switch(i){case"heading":return(0,j.jsx)(Er,{children:r},e);case"divider":return(0,j.jsx)(Ir,{},e);default:return(0,j.jsx)(s,{role:"option",label:r,onMouseDown:a=>{n||(fr(a),o([e,r,t,n,i,l]))},value:e,selected:!!t,disabled:n,focus:a===c},e)}}))),[n,a,o,s]);return(0,j.jsx)(He,{"rcx-options":!0,...d,children:(0,j.jsx)(Tr,{padding:0,paddingBlock:"x12",paddingInline:0,elevation:"2",children:(0,j.jsx)(Dr,{vertical:!0,smooth:!0,children:(0,j.jsxs)(Tr,{ref:x,elevation:"0",padding:"none",maxHeight:e,onMouseDown:fr,onClick:fr,is:"ol","aria-multiselectable":r||!0,role:"listbox",id:c,"aria-activedescendant":n?.[a]?.[0]?String(n?.[a]?.[0]):void 0,children:[!n.length&&(0,j.jsx)(t,{customEmpty:l}),u]})})})})}function Or(e){return(0,j.jsx)(He,{"rcx-options":!0,children:(0,j.jsx)(Tr,{padding:0,paddingBlock:"x12",paddingInline:0,children:(0,j.jsx)(Dr,{vertical:!0,smooth:!0,children:(0,j.jsx)(Tr,{elevation:"0",padding:"none",maxHeight:"x240",...e})})})})}var Fr=(e=Ue.HIDDEN)=>{const[r,t]=(0,_.useDebouncedState)(e,10);return[r,(0,_.useStableCallback)((()=>t(Ue.HIDDEN))),(0,_.useStableCallback)((()=>t(Ue.VISIBLE)))]},Lr=27,Vr=38,Ar=40,Hr=36,Wr=35,Gr=9,qr=13,Ur=(e,r,t)=>{const[n,a]=(0,i.useState)(e),s=Fr(),[o,l,c]=s,d=(0,_.useStableCallback)((()=>a(0))),x=(0,_.useStableCallback)((e=>{const{keyCode:r}=e;if(Ue.HIDDEN===o&&r===Gr)return c()}));return[n,(0,_.useStableCallback)((e=>{const i=([,,,e])=>!e||"option"===e,x=()=>((e,r)=>{for(let t=e.length-1;t>=0;t--)if(r(e[t],t,e))return t;return-1})(r,i),{keyCode:u,key:m}=e;switch(Ue.HIDDEN===o&&u!==Lr&&u!==Gr&&c(),u){case Hr:return e.preventDefault(),d();case Wr:return e.preventDefault(),a(x());case Vr:return e.preventDefault(),a(n<1?x():e=>((e,r,t)=>{for(let n=t-1;n>=0;n--)if(r(e[n],n,e))return n;return-1})(r,i,e));case Ar:return e.preventDefault(),n===x()?a(0):a((e=>((e,r,t)=>{for(let n=t+1;n<e.length;n++)if(r(e[n],n,e))return n;return-1})(r,i,e)));case qr:return e.preventDefault(),o===Ue.VISIBLE&&(e.persist(),e.nativeEvent.stopImmediatePropagation(),e.stopPropagation()),l(),void t(r[n],s);case Lr:if(e.preventDefault(),d(),l(),o===Ue.VISIBLE)return e.persist(),e.nativeEvent.stopImmediatePropagation(),e.stopPropagation(),!1;break;default:if(m.match(/^[\d\w]$/i)){const e=r.findIndex((e=>{if(!i(e))return!1;const[,r]=e;return"string"==typeof r&&r[0].toLowerCase()===m}));~e&&a(e)}}})),x,d,s]},Kr=({anchor:e,children:r,placement:t,margin:n,className:a,...s})=>{const o=(0,i.useRef)(null),{style:l,placement:c}=(0,_.usePosition)(e,o,(0,i.useMemo)((()=>({placement:t,margin:n})),[t,n]))||{},d=(0,i.useMemo)((()=>({position:"fixed",...l})),[l]),{document:x}=F(),[u]=(0,i.useState)((()=>{const e=x.getElementById("position-container");if(e)return e;const r=x.createElement("div");return r.id="position-container",x.body.appendChild(r),r}));return(0,i.useEffect)((()=>()=>{0===u.childNodes.length&&x.body.removeChild(u)}),[u,x]),(0,C.createPortal)((0,i.cloneElement)(r,{ref:o,style:d,...s,placement:c}),u)},Zr=({width:e,visible:r,children:t,...n})=>(0,j.jsx)(Ue,{visibility:r,children:(0,j.jsx)(Kr,{...n,children:t})}),Yr=(e,r)=>e?"string"==typeof e?r.filter((r=>r.value===e)):r?.filter((r=>e.includes(r.value))):[],Xr=e=>r=>!!e&&("string"==typeof e?r.value===e:e.includes(r.value));function Qr({is:e="span",variant:r="secondary",small:t,className:n,...a}){const s=[r,t&&"small"].filter(Boolean).map((e=>`rcx-badge--${e}`)).join(" ");return(0,j.jsx)(e,{className:A(n,`rcx-box rcx-box--full rcx-badge ${s}`),...a})}function Jr({ref:e,variant:r,primary:t,secondary:n,danger:a,warning:s,success:o,external:l,icon:c,is:d="button",rel:x,size:u,tiny:m,mini:p,small:b,medium:h,large:g,square:f,loading:v,disabled:_,children:y,...k}){const w="a"===d&&{rel:l?"noopener noreferrer":void 0,target:l?"_blank":void 0}||"button"===d&&{type:"button"}||{},N=(0,i.useMemo)((()=>{const e=r||t&&"primary"||n&&o&&"secondary-success"||n&&s&&"secondary-warning"||n&&a&&"secondary-danger"||o&&"success"||s&&"warning"||a&&"danger"||n&&"secondary";return e?{[`rcx-button--${e}`]:!0}:{}}),[r,t,n,a,s,o]),S=u||p&&"mini"||m&&"tiny"||b&&"small"||h&&"medium"||g&&"large"||void 0;return(0,j.jsx)(He,{is:d,type:"button","rcx-button":!0,...N,"rcx-button--small":"small"===S,"rcx-button--medium":"medium"===S,"rcx-button--large":"large"===S,"rcx-button--square":f,"rcx-button--tiny-square":"tiny"===S&&f,"rcx-button--mini-square":"mini"===S&&f,"rcx-button--small-square":"small"===S&&f,"rcx-button--medium-square":"medium"===S&&f,"rcx-button--large-square":"large"===S&&f,"rcx-button--loading":v,disabled:_||v,ref:e,...w,...k,children:(0,j.jsxs)("span",{className:"rcx-button--content",children:[c&&!v&&(0,j.jsx)(Ge,{size:"x16",name:c,marginInlineEnd:4}),v&&(0,j.jsx)(Ge,{size:"x16",name:"loading",marginInlineEnd:4}),y]})})}var et=e=>e?[`rcx-button--icon-${[e].filter(Boolean).join("-")}`]:[""],rt=e=>[`rcx-button--icon-${[e].filter(Boolean).join("-")}-pressed`];function tt({icon:e,primary:r,info:t,secondary:n,danger:a,warning:s,success:o,mini:l,large:c,tiny:d,small:x,medium:u,pressed:m,children:p,...b}){const h=(0,i.useMemo)((()=>(n&&a?"secondary-danger":n&&s&&"secondary-warning")||n&&o&&"secondary-success"||n&&t&&"secondary-info"||t&&"info"||o&&"success"||s&&"warning"||a&&"danger"||r&&"secondary-info"||n&&"secondary"||""),[a,t,r,n,o,s]),g=(0,i.useMemo)((()=>{const e={};return h&&(e[`${et(h)}`]=!0),m&&(e[`${rt(h)}`]=!0),e}),[h,m]),f=(0,i.useMemo)((()=>(l?"mini":d&&"tiny")||x&&"small"||u&&"medium"||c&&"large"||"large"),[u,l,x,d,c]);return(0,j.jsxs)(He,{is:"button",type:"button","rcx-button":!0,"rcx-button--icon":!0,"rcx-button--square":!0,...g,[`rcx-button--${f}-square`]:!0,"rcx-button--icon-pressed":m,...b,children:[(0,i.isValidElement)(e)?e:(0,j.jsx)(Ge,{name:e,size:(c?"x28":u&&"x24")||x&&"x20"||d&&"x16"||l&&"x12"||"x28"}),p]})}var nt=["neutral","info","success","warning","danger"],at=({secondary:e,label:r,onClick:t,icon:n,...a})=>(0,j.jsxs)("button",{className:"rcx-box rcx-box--full rcx-bubble__button "+(e?"rcx-bubble__button--secondary":"rcx-bubble__button--primary"),onClick:t,...a,children:[n&&(0,j.jsx)(Ge,{name:n,size:"x16"}),r&&(0,j.jsx)("span",{children:r})]}),st=({secondary:e,label:r,icon:t,...n})=>(0,j.jsxs)("span",{className:"rcx-bubble__item "+(e?"rcx-bubble__item--secondary":"rcx-bubble__item--primary"),...n,children:[t&&(0,j.jsx)(Ge,{name:t,size:"x16",marginInlineEnd:8}),r&&(0,j.jsx)("span",{children:r})]});function ot({align:e="start",children:r,stretch:t,vertical:n,wrap:a,small:s,large:o,joined:i,ghostPosition:l,className:c,...d}){return(0,j.jsx)("div",{className:["rcx-button-group",t&&"rcx-button-group--stretch",n&&"rcx-button-group--vertical",e&&`rcx-button-group--align-${e}`,!i&&s&&"rcx-button-group--small",!i&&o&&"rcx-button-group--large",a&&"rcx-button-group--wrap",i&&"rcx-button-group--joined",i&&l&&`rcx-button-group--ghost-${l}`,c].filter(Boolean).join(" "),role:"group",...d,children:r})}var it=({title:e,id:r,...t})=>(0,j.jsxs)(He,{is:"span",marginInline:2,"rcx-label__info":!0,children:[(0,j.jsx)("span",{hidden:!0,id:r,children:e}),(0,j.jsx)(Ge,{...t,name:"info-circled",title:e})]}),lt=({xs:e,sm:r,md:t,lg:n,xl:a,...s})=>(0,j.jsx)(He,{"rcx-grid__item":!0,"rcx-grid__item--xs":e,"rcx-grid__item--sm":r,"rcx-grid__item--md":t,"rcx-grid__item--lg":n,"rcx-grid__item--xl":a,...s}),ct=({xs:e,sm:r,md:t,lg:n,xl:a,...s})=>(0,j.jsx)(He,{"rcx-grid__wrapper":!0,children:(0,j.jsx)(He,{"rcx-grid":!0,"rcx-grid--xs":e,"rcx-grid--sm":r,"rcx-grid--md":t,"rcx-grid--lg":n,"rcx-grid--xl":a,...s})});ct.Item=lt;var dt=(0,i.memo)((function({width:e,position:r,backgroundColor:t="room",...n}){return(0,j.jsx)(He,{"rcx-vertical-bar":!0,backgroundColor:t,color:"default",display:"flex",flexDirection:"column",flexShrink:0,width:e,borderInlineStartWidth:"default",borderInlineStartColor:"extra-light",borderInlineStartStyle:"solid",height:"full",position:r,insetInlineEnd:"none",insetBlockStart:"none",zIndex:10,...n})})),xt=(0,i.memo)((({name:e,...r})=>(0,j.jsx)(tt,{...r,small:!0,flexShrink:0,icon:e}))),ut=(0,i.memo)((e=>(0,j.jsx)(ot,{...e}))),mt=(0,i.memo)((e=>(0,j.jsx)(Jr,{...e})));var pt=(0,i.memo)((function(e){return(0,j.jsx)(He,{"rcx-vertical-bar__content":!0,paddingInline:24,display:"flex",flexDirection:"column",overflowY:"hidden",height:"full",...e})})),bt=({children:e,...r})=>(0,j.jsx)("div",{...r,className:"rcx-states",children:e}),ht=({variation:e,...r})=>(0,j.jsx)(Ge,{...r,"rcx-states__icon":!0,className:e&&`rcx-states__icon--${e}`,size:"x32"}),gt=({children:e,...r})=>(0,j.jsx)("div",{...r,className:"rcx-states__subtitle",children:e}),ft=({children:e,...r})=>(0,j.jsx)("h3",{...r,className:"rcx-states__title",children:e});var vt=(0,i.memo)((function({icon:e="magnifier",title:r="Nothing Found",subtitle:t,...n}){return(0,j.jsx)(pt,{justifyContent:"center",...n,children:(0,j.jsxs)(bt,{children:[(0,j.jsx)(ht,{name:e}),(0,j.jsx)(ft,{children:r}),t&&(0,j.jsx)(gt,{children:t})]})})}));var jt=(0,i.memo)((function(e){return(0,j.jsx)(He,{paddingInline:16,paddingBlock:20,...e})})),_t=(0,i.memo)((({children:e,...r})=>(0,j.jsx)(He,{display:"flex",alignItems:"center",height:"x44",paddingInline:16,borderBlockEndWidth:"default",borderBlockColor:"extra-light",flexShrink:0,...r,children:(0,j.jsx)(He,{display:"flex",alignItems:"center",justifyContent:"space-between",flexGrow:1,height:"100%",overflow:"hidden",marginInline:-4,paddingInline:4,className:l.css`
197
+ `,null),x=(0,i.useCallback)((e=>(e.className=d&&z(e.className,d),void 0!==a&&void 0===e.onScroll&&(e.onScroll=c),e)),[d,c,a]);return(0,j.jsx)(H.Provider,{value:W(x),children:e})};function Tr({elevation:e="1",padding:r=16,...t}){return(0,j.jsx)(He,{"rcx-tile":!0,"rcx-tile--elevation":e,padding:r,...t})}var Rr=(0,i.memo)((({customEmpty:e})=>(0,j.jsx)(wr,{label:e||"Empty"})));function zr({maxHeight:e="x144",multiple:r,renderEmpty:t=Rr,options:n,cursor:a,renderItem:s=wr,onSelect:o,customEmpty:l,id:c,...d}){const x=(0,i.useRef)(null);(0,i.useLayoutEffect)((()=>{if(!x.current)return;const{current:e}=x,r=e?.querySelector(".rcx-option--focus");r&&(r.offsetTop+r.clientHeight>e.scrollTop+e.clientHeight||r.offsetTop-r.clientHeight<e.scrollTop)&&(e.scrollTop=r.offsetTop)}),[a]);const u=(0,i.useMemo)((()=>n.map((([e,r,t,n,i,l],c)=>{switch(i){case"heading":return(0,j.jsx)(Er,{children:r},e);case"divider":return(0,j.jsx)(Ir,{},e);default:return(0,j.jsx)(s,{role:"option",label:r,onMouseDown:a=>{n||(fr(a),o([e,r,t,n,i,l]))},value:e,selected:!!t,disabled:n,focus:a===c},e)}}))),[n,a,o,s]);return(0,j.jsx)(He,{"rcx-options":!0,...d,children:(0,j.jsx)(Tr,{padding:0,paddingBlock:"x12",paddingInline:0,elevation:"2",children:(0,j.jsx)(Dr,{vertical:!0,smooth:!0,children:(0,j.jsxs)(Tr,{ref:x,elevation:"0",padding:"none",maxHeight:e,onMouseDown:fr,onClick:fr,is:"ol","aria-multiselectable":r||!0,role:"listbox",id:c,"aria-activedescendant":n?.[a]?.[0]?String(n?.[a]?.[0]):void 0,children:[!n.length&&(0,j.jsx)(t,{customEmpty:l}),u]})})})})}function Or(e){return(0,j.jsx)(He,{"rcx-options":!0,children:(0,j.jsx)(Tr,{padding:0,paddingBlock:"x12",paddingInline:0,children:(0,j.jsx)(Dr,{vertical:!0,smooth:!0,children:(0,j.jsx)(Tr,{elevation:"0",padding:"none",maxHeight:"x240",...e})})})})}var Fr=(e=Ue.HIDDEN)=>{const[r,t]=(0,_.useDebouncedState)(e,10);return[r,(0,_.useStableCallback)((()=>t(Ue.HIDDEN))),(0,_.useStableCallback)((()=>t(Ue.VISIBLE)))]},Lr=27,Vr=38,Ar=40,Hr=36,Wr=35,Gr=9,qr=13,Ur=(e,r,t)=>{const[n,a]=(0,i.useState)(e),s=Fr(),[o,l,c]=s,d=(0,_.useStableCallback)((()=>a(0))),x=(0,_.useStableCallback)((e=>{const{keyCode:r}=e;if(Ue.HIDDEN===o&&r===Gr)return c()}));return[n,(0,_.useStableCallback)((e=>{const i=([,,,e])=>!e||"option"===e,x=()=>((e,r)=>{for(let t=e.length-1;t>=0;t--)if(r(e[t],t,e))return t;return-1})(r,i),{keyCode:u,key:m}=e;switch(Ue.HIDDEN===o&&u!==Lr&&u!==Gr&&c(),u){case Hr:return e.preventDefault(),d();case Wr:return e.preventDefault(),a(x());case Vr:return e.preventDefault(),a(n<1?x():e=>((e,r,t)=>{for(let n=t-1;n>=0;n--)if(r(e[n],n,e))return n;return-1})(r,i,e));case Ar:return e.preventDefault(),n===x()?a(0):a((e=>((e,r,t)=>{for(let n=t+1;n<e.length;n++)if(r(e[n],n,e))return n;return-1})(r,i,e)));case qr:return e.preventDefault(),o===Ue.VISIBLE&&(e.persist(),e.nativeEvent.stopImmediatePropagation(),e.stopPropagation()),l(),void t(r[n],s);case Lr:if(e.preventDefault(),d(),l(),o===Ue.VISIBLE)return e.persist(),e.nativeEvent.stopImmediatePropagation(),e.stopPropagation(),!1;break;default:if(m.match(/^[\d\w]$/i)){const e=r.findIndex((e=>{if(!i(e))return!1;const[,r]=e;return"string"==typeof r&&r[0].toLowerCase()===m}));~e&&a(e)}}})),x,d,s]},Kr=({anchor:e,children:r,placement:t,margin:n,className:a,...s})=>{const o=(0,i.useRef)(null),{style:l,placement:c}=(0,_.usePosition)(e,o,(0,i.useMemo)((()=>({placement:t,margin:n})),[t,n]))||{},d=(0,i.useMemo)((()=>({position:"fixed",...l})),[l]),{document:x}=F(),[u]=(0,i.useState)((()=>{const e=x.getElementById("position-container");if(e)return e;const r=x.createElement("div");return r.id="position-container",x.body.appendChild(r),r}));return(0,i.useEffect)((()=>()=>{0===u.childNodes.length&&x.body.removeChild(u)}),[u,x]),(0,C.createPortal)((0,i.cloneElement)(r,{ref:o,style:d,...s,placement:c}),u)},Zr=({width:e,visible:r,children:t,...n})=>(0,j.jsx)(Ue,{visibility:r,children:(0,j.jsx)(Kr,{...n,children:t})}),Yr=(e,r)=>e?"string"==typeof e?r.filter((r=>r.value===e)):r?.filter((r=>e.includes(r.value))):[],Xr=e=>r=>!!e&&("string"==typeof e?r.value===e:e.includes(r.value));function Qr({is:e="span",variant:r="secondary",small:t,className:n,...a}){const s=[r,t&&"small"].filter(Boolean).map((e=>`rcx-badge--${e}`)).join(" ");return(0,j.jsx)(e,{className:A(n,`rcx-box rcx-box--full rcx-badge ${s}`),...a})}function Jr({ref:e,variant:r,primary:t,secondary:n,danger:a,warning:s,success:o,external:l,icon:c,is:d="button",rel:x,size:u,tiny:m,mini:p,small:b,medium:h,large:g,square:f,loading:v,disabled:_,children:y,...k}){const w="a"===d&&{rel:l?"noopener noreferrer":void 0,target:l?"_blank":void 0}||"button"===d&&{type:"button"}||{},N=(0,i.useMemo)((()=>{const e=r||t&&"primary"||n&&o&&"secondary-success"||n&&s&&"secondary-warning"||n&&a&&"secondary-danger"||o&&"success"||s&&"warning"||a&&"danger"||n&&"secondary";return e?{[`rcx-button--${e}`]:!0}:{}}),[r,t,n,a,s,o]),S=u||p&&"mini"||m&&"tiny"||b&&"small"||h&&"medium"||g&&"large"||void 0;return(0,j.jsx)(He,{is:d,type:"button","rcx-button":!0,...N,"rcx-button--small":"small"===S,"rcx-button--medium":"medium"===S,"rcx-button--large":"large"===S,"rcx-button--square":f,"rcx-button--tiny-square":"tiny"===S&&f,"rcx-button--mini-square":"mini"===S&&f,"rcx-button--small-square":"small"===S&&f,"rcx-button--medium-square":"medium"===S&&f,"rcx-button--large-square":"large"===S&&f,"rcx-button--loading":v,disabled:_||v,ref:e,...w,...k,children:(0,j.jsxs)("span",{className:"rcx-button--content",children:[c&&!v&&(0,j.jsx)(Ge,{size:"x16",name:c,marginInlineEnd:4}),v&&(0,j.jsx)(Ge,{size:"x16",name:"loading",marginInlineEnd:4}),y]})})}var et=e=>e?[`rcx-button--icon-${[e].filter(Boolean).join("-")}`]:[""],rt=e=>[`rcx-button--icon-${[e].filter(Boolean).join("-")}-pressed`];function tt({icon:e,badge:r,primary:t,info:n,secondary:a,danger:s,warning:o,success:l,mini:c,large:d,tiny:x,small:u,medium:m,pressed:p,children:b,...h}){const g=(0,i.useMemo)((()=>(a&&s?"secondary-danger":a&&o&&"secondary-warning")||a&&l&&"secondary-success"||a&&n&&"secondary-info"||n&&"info"||l&&"success"||o&&"warning"||s&&"danger"||t&&"secondary-info"||a&&"secondary"||""),[s,n,t,a,l,o]),f=(0,i.useMemo)((()=>{const e={};return g&&(e[`${et(g)}`]=!0),p&&(e[`${rt(g)}`]=!0),e}),[g,p]),v=(0,i.useMemo)((()=>(c?"mini":x&&"tiny")||u&&"small"||m&&"medium"||d&&"large"||"large"),[m,c,u,x,d]);return(0,j.jsxs)(He,{is:"button",type:"button","rcx-button":!0,"rcx-button--icon":!0,"rcx-button--square":!0,...f,[`rcx-button--${v}-square`]:!0,"rcx-button--icon-pressed":p,"rcx-button--with-badge":Boolean(r),...h,children:[(0,i.isValidElement)(e)?e:(0,j.jsx)(Ge,{name:e,size:(d?"x28":m&&"x24")||u&&"x20"||x&&"x16"||c&&"x12"||"x28"}),Boolean(r)&&(0,j.jsx)("span",{className:"rcx-button__badge","aria-hidden":"true",children:r}),b]})}var nt=["neutral","info","success","warning","danger"],at=({secondary:e,label:r,onClick:t,icon:n,...a})=>(0,j.jsxs)("button",{className:"rcx-box rcx-box--full rcx-bubble__button "+(e?"rcx-bubble__button--secondary":"rcx-bubble__button--primary"),onClick:t,...a,children:[n&&(0,j.jsx)(Ge,{name:n,size:"x16"}),r&&(0,j.jsx)("span",{children:r})]}),st=({secondary:e,label:r,icon:t,...n})=>(0,j.jsxs)("span",{className:"rcx-bubble__item "+(e?"rcx-bubble__item--secondary":"rcx-bubble__item--primary"),...n,children:[t&&(0,j.jsx)(Ge,{name:t,size:"x16",marginInlineEnd:8}),r&&(0,j.jsx)("span",{children:r})]});function ot({align:e="start",children:r,stretch:t,vertical:n,wrap:a,small:s,large:o,joined:i,ghostPosition:l,className:c,...d}){return(0,j.jsx)("div",{className:["rcx-button-group",t&&"rcx-button-group--stretch",n&&"rcx-button-group--vertical",e&&`rcx-button-group--align-${e}`,!i&&s&&"rcx-button-group--small",!i&&o&&"rcx-button-group--large",a&&"rcx-button-group--wrap",i&&"rcx-button-group--joined",i&&l&&`rcx-button-group--ghost-${l}`,c].filter(Boolean).join(" "),role:"group",...d,children:r})}var it=({title:e,id:r,...t})=>(0,j.jsxs)(He,{is:"span",marginInline:2,"rcx-label__info":!0,children:[(0,j.jsx)("span",{hidden:!0,id:r,children:e}),(0,j.jsx)(Ge,{...t,name:"info-circled",title:e})]}),lt=({xs:e,sm:r,md:t,lg:n,xl:a,...s})=>(0,j.jsx)(He,{"rcx-grid__item":!0,"rcx-grid__item--xs":e,"rcx-grid__item--sm":r,"rcx-grid__item--md":t,"rcx-grid__item--lg":n,"rcx-grid__item--xl":a,...s}),ct=({xs:e,sm:r,md:t,lg:n,xl:a,...s})=>(0,j.jsx)(He,{"rcx-grid__wrapper":!0,children:(0,j.jsx)(He,{"rcx-grid":!0,"rcx-grid--xs":e,"rcx-grid--sm":r,"rcx-grid--md":t,"rcx-grid--lg":n,"rcx-grid--xl":a,...s})});ct.Item=lt;var dt=(0,i.memo)((function({width:e,position:r,backgroundColor:t="room",...n}){return(0,j.jsx)(He,{"rcx-vertical-bar":!0,backgroundColor:t,color:"default",display:"flex",flexDirection:"column",flexShrink:0,width:e,borderInlineStartWidth:"default",borderInlineStartColor:"extra-light",borderInlineStartStyle:"solid",height:"full",position:r,insetInlineEnd:"none",insetBlockStart:"none",zIndex:10,...n})})),xt=(0,i.memo)((({name:e,...r})=>(0,j.jsx)(tt,{...r,small:!0,flexShrink:0,icon:e}))),ut=(0,i.memo)((e=>(0,j.jsx)(ot,{...e}))),mt=(0,i.memo)((e=>(0,j.jsx)(Jr,{...e})));var pt=(0,i.memo)((function(e){return(0,j.jsx)(He,{"rcx-vertical-bar__content":!0,paddingInline:24,display:"flex",flexDirection:"column",overflowY:"hidden",height:"full",...e})})),bt=({children:e,...r})=>(0,j.jsx)("div",{...r,className:"rcx-states",children:e}),ht=({variation:e,...r})=>(0,j.jsx)(Ge,{...r,"rcx-states__icon":!0,className:e&&`rcx-states__icon--${e}`,size:"x32"}),gt=({children:e,...r})=>(0,j.jsx)("div",{...r,className:"rcx-states__subtitle",children:e}),ft=({children:e,...r})=>(0,j.jsx)("h3",{...r,className:"rcx-states__title",children:e});var vt=(0,i.memo)((function({icon:e="magnifier",title:r="Nothing Found",subtitle:t,...n}){return(0,j.jsx)(pt,{justifyContent:"center",...n,children:(0,j.jsxs)(bt,{children:[(0,j.jsx)(ht,{name:e}),(0,j.jsx)(ft,{children:r}),t&&(0,j.jsx)(gt,{children:t})]})})}));var jt=(0,i.memo)((function(e){return(0,j.jsx)(He,{paddingInline:16,paddingBlock:20,...e})})),_t=(0,i.memo)((({children:e,...r})=>(0,j.jsx)(He,{display:"flex",alignItems:"center",height:"x44",paddingInline:16,borderBlockEndWidth:"default",borderBlockColor:"extra-light",flexShrink:0,...r,children:(0,j.jsx)(He,{display:"flex",alignItems:"center",justifyContent:"space-between",flexGrow:1,height:"100%",overflow:"hidden",marginInline:-4,paddingInline:4,className:l.css`
198
198
  gap: 8px;
199
199
  `,children:e})}))),yt=(0,i.memo)((e=>(0,j.jsx)(Ge,{...e,paddingInline:2,size:"x20"})));var kt=(0,i.memo)((function(e){return(0,j.jsx)(He,{"rcx-vertical-bar__section":!0,padding:16,display:"flex",alignItems:"center",flexGrow:1,borderBlockEndWidth:"default",borderBlockColor:"extra-light",...e})})),wt=(0,i.memo)((e=>(0,j.jsxs)(dt,{...e,children:[(0,j.jsx)(_t,{children:(0,j.jsx)(gr,{width:"100%"})}),(0,j.jsxs)(He,{padding:24,children:[(0,j.jsx)(gr,{marginBlockEnd:4,width:"32px",height:"32px",variant:"rect"}),Array(5).fill(5).map(((e,r)=>(0,j.jsx)(gr,{},r)))]})]}))),Nt=(0,i.memo)((e=>(0,j.jsx)(He,{flexShrink:1,flexGrow:1,fontScale:"h5",withTruncatedText:!0,is:"h5",...e})));function St({children:e,style:r,...t}){return(0,j.jsx)(Tr,{style:r,elevation:"2",paddingInline:"0",paddingBlock:"0",display:"flex",flexDirection:"column",overflow:"auto","data-testid":"dropdown",...t,children:(0,j.jsx)(He,{flexShrink:1,paddingBlock:12,children:"hidden"===r?.visibility?null:e})})}function Ct({ref:e,reference:r,placement:t="bottom-start",...n}){const{style:a}=(0,_.usePosition)(r,e,{placement:t});return(0,j.jsx)(St,{style:a,ref:e,...n})}function It({children:e,...r}){return(0,j.jsx)(Tr,{elevation:"2",paddingInline:"0",paddingBlock:"0",width:"100vw",maxHeight:"80%",position:"fixed",display:"flex",flexDirection:"column",overflow:"auto",style:{bottom:0,left:0},zIndex:2,"data-testid":"dropdown",...r,children:(0,j.jsx)(He,{flexShrink:1,paddingBlock:16,children:e})})}var Bt=(0,i.createContext)(!1);function Mt({context:e,componentName:r,children:t,parentComponent:n}){if(!(0,i.useContext)(e))throw new Error(`${r} should be used as children of ${n} Component`);return t}var $t=e=>{const r=(0,j.jsx)(He,{is:"span","rcx-field__description":!0,...e});return"development"===process.env.NODE_ENV?(0,j.jsx)(Mt,{context:Bt,parentComponent:"Field",componentName:$t.name,children:r}):r},Et=e=>{const r=(0,j.jsx)(He,{is:"span","rcx-field__error":!0,...e});return"development"===process.env.NODE_ENV?(0,j.jsx)(Mt,{context:Bt,parentComponent:"Field",componentName:Et.name,children:r}):r},Pt=e=>{const r=(0,j.jsx)(He,{is:"span","rcx-field__hint":!0,...e});return"development"===process.env.NODE_ENV?(0,j.jsx)(Mt,{context:Bt,parentComponent:"Field",componentName:Pt.name,children:r}):r};var Dt=e=>{const r=(0,j.jsx)(it,{...e});return"development"===process.env.NODE_ENV?(0,j.jsx)(Mt,{context:Bt,parentComponent:"Field",componentName:Dt.name,children:r}):r},Tt=e=>{const r=(0,j.jsx)(He,{is:"a","rcx-field__link":!0,...e});return"development"===process.env.NODE_ENV?(0,j.jsx)(Mt,{context:Bt,parentComponent:"Field",componentName:Tt.name,children:r}):r},Rt=e=>{const r=(0,j.jsx)(He,{is:"span","rcx-field__row":!0,...e});return"development"===process.env.NODE_ENV?(0,j.jsx)(Mt,{context:Bt,parentComponent:"Field",componentName:Rt.name,children:r}):r};function zt({inline:e=!1,children:r,direction:t,wrap:n,alignItems:a,alignContent:s,justifyContent:o}){const l=(0,i.useCallback)((r=>(void 0!==e&&void 0===r.display&&(r.display=e?"inline-flex":"flex"),void 0!==t&&void 0===r.flexDirection&&(r.flexDirection=t),void 0!==n&&void 0===r.flexWrap&&(r.flexWrap="no-wrap"===n?"nowrap":n),void 0!==a&&void 0===r.alignItems&&(r.alignItems=("start"===a?"flex-start":"end"===a&&"flex-end")||a),void 0!==s&&void 0===r.alignContent&&(r.alignContent=("start"===s?"flex-start":"end"===s&&"flex-end")||s),void 0!==o&&void 0===r.justifyContent&&(r.justifyContent=("start"===o?"flex-start":"end"===o&&"flex-end")||o),r)),[s,a,t,e,o,n]);return(0,j.jsx)(H.Provider,{value:W(l),children:r})}function Ot({children:e,order:r,grow:t,shrink:n,basis:a,align:s}){const o=(0,i.useCallback)((e=>(void 0!==r&&void 0===e.order&&(e.order=r),void 0!==t&&void 0===e.flexGrow&&(e.flexGrow=t),void 0!==n&&void 0===e.flexShrink&&(e.flexShrink=n),void 0!==a&&void 0===e.flexBasis&&(e.flexBasis=a),void 0!==s&&void 0===e.alignSelf&&(e.alignSelf=("start"===s?"flex-start":"end"===s&&"flex-end")||s),e)),[s,a,t,r,n]);return(0,j.jsx)(H.Provider,{value:W(o),children:e})}var Ft=(0,i.memo)((function({is:e="li",id:r,children:t,focus:n,selected:a,className:s,title:o,disabled:l,variant:c,onClick:d,...x}){return(0,i.createElement)(e,{...x,key:r,id:r,"aria-selected":!!a,"aria-disabled":!!l,title:o,onClick:e=>{l?fr(e):d?.(e)},className:["rcx-option",s,n&&"rcx-option--focus",a&&"rcx-option--selected",l&&"rcx-option--disabled",c&&`rcx-option--${c}`].filter(Boolean).join(" ")},t)}));function Lt({item:e,state:r}){const t=(0,i.useRef)(null),{menuItemProps:{onPointerUp:n,...a},isFocused:s,isDisabled:o}=(0,k.useMenuItem)({key:e.key},r,t);return(0,j.jsxs)(Ft,{...(0,k.mergeProps)(a,{onPointerDown:n}),ref:t,focus:s,disabled:o,is:"label",variant:e.value?.variant,children:[(0,j.jsx)("div",{className:"rcx-option__wrapper",children:e.rendered}),e.value&&e.value.description&&(0,j.jsx)(Sr,{children:e.value.description})]})}function Vt({portalContainer:e,popoverRef:r,...t}){const n=(0,i.useRef)(null),a=r??n,{state:s,children:o,isNonModal:l}=t,{document:c}=F(),{popoverProps:d,underlayProps:x}=(0,k.usePopover)({...t,popoverRef:a,boundaryElement:c?.body},s);return(0,j.jsxs)(k.Overlay,{portalContainer:e??c?.body,children:[!l&&(0,j.jsx)("div",{...x}),(0,j.jsxs)("div",{...d,ref:a,children:[!l&&(0,j.jsx)(k.DismissButton,{onDismiss:s.close}),o,(0,j.jsx)(k.DismissButton,{onDismiss:s.close})]})]})}var At=(0,i.createContext)(null);function Ht({children:e,state:r,offset:t=4,maxWidth:n,...a}){const s=!(0,_.useBreakpoints)().includes("sm"),o=(0,i.useContext)(At),l=(0,i.useRef)(null),c=null!==o,d=(0,i.useRef)(null);(0,k.useInteractOutside)({ref:d,isDisabled:c,onInteractOutside:e=>{const t=a.triggerRef?.current;t&&t.contains(e.target)||r.close()}});const x=(0,j.jsxs)(Vt,{state:r,offset:t,popoverRef:d,...a,portalContainer:c?o?.current??void 0:void 0,children:[s?(0,j.jsx)(It,{children:e}):(0,j.jsx)(St,{maxHeight:"80vh",overflowY:"auto",maxWidth:n,children:e}),!c&&(0,j.jsx)("span",{ref:l,style:{display:"contents"}})]});return c?x:(0,j.jsx)(At.Provider,{value:l,children:x})}function Wt({item:e,state:r,rootMenuTriggerState:t,parentMenuRef:n,onAction:a}){const s=(0,i.useRef)(null),o=(0,i.useRef)(null),l=(0,w.useSubmenuTriggerState)({triggerKey:e.key},t),{submenuTriggerProps:c,submenuProps:d,popoverProps:x}=(0,k.useSubmenuTrigger)({parentMenuRef:n,submenuRef:o},l,s),u=()=>{s.current?.focus(),l.close()},{menuItemProps:m,isFocused:p,isDisabled:b}=(0,k.useMenuItem)({...c,onKeyDown:e=>{if("Escape"===e.key)return l.isOpen?void u():void e.continuePropagation();c.onKeyDown?.(e)},key:e.key},r,s);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Ft,{...(0,k.mergeProps)(m,{id:c.id,"aria-haspopup":c["aria-haspopup"],"aria-expanded":c["aria-expanded"],"aria-controls":c["aria-controls"]}),ref:s,focus:p,disabled:b,is:"div",variant:e.value?.variant,children:(0,j.jsxs)("div",{className:"rcx-option__wrapper",children:[e.rendered,(0,j.jsx)("div",{className:"rcx-option__input",children:(0,j.jsx)(Ge,{name:"chevron-left",size:"x16"})})]})}),l.isOpen&&(0,j.jsx)(Ht,{...x,state:l,triggerRef:s,placement:"right top",children:(0,j.jsx)(qt,{...d,onKeyDown:e=>{if("Escape"===e.key)return e.stopPropagation(),void u();d.onKeyDown?.(e)},rootMenuTriggerState:t,menuRef:o,onAction:a,children:e.props?.children})})]})}function Gt({section:e,state:r,rootMenuTriggerState:t,parentMenuRef:n,onAction:a}){const{itemProps:s,headingProps:o,groupProps:i}=(0,k.useMenuSection)({heading:e.rendered,"aria-label":e["aria-label"]}),{separatorProps:l}=(0,k.useSeparator)({elementType:"span"});return(0,j.jsxs)(j.Fragment,{children:[e.key!==r.collection.getFirstKey()&&(0,j.jsx)(Cr,{...l}),(0,j.jsxs)("div",{...s,children:[e.rendered&&(0,j.jsx)($r,{...o,children:e.rendered}),(0,j.jsx)(He,{...i,padding:"0",children:[...e.childNodes].map((e=>e.hasChildNodes?(0,j.jsx)(Wt,{item:e,state:r,rootMenuTriggerState:t,parentMenuRef:n,onAction:a},e.key):(0,j.jsx)(Lt,{item:e,state:r},e.key)))})]})]})}function qt({rootMenuTriggerState:e,menuRef:r,...t}){const n=(0,w.useTreeState)(t),a=(0,i.useRef)(null),s=r??a,{menuProps:o}=(0,k.useMenu)(t,n,s);return(0,j.jsx)("div",{...o,ref:s,children:[...n.collection].map((r=>"section"===r.type?(0,j.jsx)(Gt,{section:r,state:n,rootMenuTriggerState:e,parentMenuRef:s,onAction:t.onAction},r.key):r.hasChildNodes?(0,j.jsx)(Wt,{item:r,state:n,rootMenuTriggerState:e,parentMenuRef:s,onAction:t.onAction},r.key):(0,j.jsx)(Lt,{item:r,state:n},r.key)))})}var Ut=e=>{switch(e){case"bottom":return"bottom";case"bottom-start":default:return"bottom start";case"bottom-end":return"bottom end";case"top":return"top";case"top-start":return"top start";case"top-end":return"top end";case"left":return"left";case"left-start":return"left top";case"left-end":return"left bottom";case"right":return"right";case"right-start":return"right top";case"right-end":return"right bottom"}};function Kt(e){return null}function Zt(e){return null!=e.hasChildItems?e.hasChildItems:!!e.childItems||!!(e.title&&i.Children.count(e.children)>0)}function Yt(e){return null}Kt.getCollectionNode=function*(e,r){const{childItems:t,title:n,children:a}=e,s=e.title||e.children,o=e.textValue||("string"==typeof s?s:"")||e["aria-label"]||"";o||r?.suppressTextValueWarning||console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:"item",props:e,rendered:s,textValue:o,"aria-label":e["aria-label"],hasChildNodes:Zt(e),*childNodes(){if(t)for(const e of t)yield{type:"item",value:e};else if(n){const e=[];i.Children.forEach(a,(r=>{e.push({type:"item",element:r})})),yield*e}}}};function Xt(e){return null}function Qt({className:e,clickable:r,sequential:t,isSelected:n,isEditing:a,isPending:s,highlight:o,...i}){return(0,j.jsx)("div",{className:A(e,["rcx-message",(r||i.onClick)&&"rcx-message--clickable",t&&"rcx-message--sequential",n&&"rcx-message--selected",a&&"rcx-message--editing",s&&"rcx-message--pending",o&&"rcx-message--highlight"].filter(Boolean).join(" ")),...i})}function Jt({className:e,fixedWidth:r,...t}){return(0,j.jsx)(He,{"rcx-message-block":!0,"rcx-message-block--width-fixed":r,...t})}Yt.getCollectionNode=function*(e,r){const[t,...n]=(e=>{const r=[],t=e=>{Array.isArray(e)?e.forEach(t):(0,i.isValidElement)(e)&&r.push(e)};return t(e),r})(e.children);if(!t||0===n.length)throw new Error("A <MenuSubmenuTrigger> must have at least two children: the trigger item followed by one or more submenu items.");const a=t.props.children,s=e.textValue||t.props.textValue||("string"==typeof a?a:"")||e["aria-label"]||t.props["aria-label"]||"";s||r?.suppressTextValueWarning||console.warn("<MenuSubmenuTrigger> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:"item",props:{...e,children:n},rendered:a,textValue:s,"aria-label":e["aria-label"]||t.props["aria-label"],value:e.variant?{variant:e.variant}:void 0,hasChildNodes:!0,*childNodes(){for(const e of n)yield{type:"item",element:e}}}},Xt.getCollectionNode=function*(e){const{children:r,title:t,items:n}=e;yield{type:"section",props:e,hasChildNodes:!0,rendered:t,"aria-label":e["aria-label"],*childNodes(){if("function"==typeof r){if(!n)throw new Error("props.children was a function but props.items is missing");for(const e of n)yield{type:"item",value:e,element:r(e)}}else{const e=[];i.Children.forEach(r,(r=>{e.push({type:"item",element:r??void 0})})),yield*e}}}};var en=({name:e,image:r,className:t,...n})=>(0,j.jsx)("span",{className:`${t||""} ${e}`,style:r&&r.length?{backgroundImage:r}:void 0,...n});var rn=e=>(0,j.jsx)("div",{className:"rcx-box rcx-box--full rcx-message-container rcx-message-container--left",...e}),tn=e=>(0,j.jsx)("div",{className:"rcx-message-metrics__content-item",...e}),nn=({className:e,...r})=>(0,j.jsx)("div",{className:A(e,"rcx-message-metrics__item"),...r});var an=({counter:e,className:r})=>(0,j.jsx)("div",{className:`rcx-message-reactions__counter ${r}`,children:e}),sn=({className:e,...r})=>(0,j.jsx)(en,{className:`rcx-message-reactions__emoji ${e||""}`,...r});var on=({large:e,medium:r,className:t,disabled:n,onClick:a,variant:s,children:o,icon:i,href:l,...c})=>{const d=[s,r&&"medium",e&&"large",n&&"disabled",a&&"clickable",l&&"clickable"].filter(Boolean).map((e=>`rcx-tag--${e}`)).join(" ");return(0,j.jsxs)(He,{is:l?"a":"span",className:A(t,`rcx-tag ${d}`),onClick:a,href:l,...c,children:[i,(0,j.jsx)("span",{className:"rcx-tag__inner",children:o})]})};var ln=({...e})=>(0,j.jsx)(Ge,{className:"rcx-box rcx-box--full rcx-message-thread__icon",size:"x16",...e});function cn(e){return(0,j.jsx)(He,{is:"div","rcx-select__addon":!0,...e})}function dn(e){return(0,j.jsx)(He,{fontScale:"p2m",color:"hint","rcx-select__focus":!0,is:"button",type:"button",...e})}function xn(e){return(0,j.jsx)(dn,{"rcx-input-box--undecorated":!0,order:1,...e})}var un=(0,i.memo)((function(e){return(0,j.jsx)(ur,{...e})}));function mn({ref:e,value:r,filter:t,setFilter:n,options:a=[],error:s,disabled:o,anchor:l=xn,onChange:c=()=>{},getLabel:d=([,e]=["",""])=>e,getValue:x=([e])=>e,placeholder:u,renderOptions:m=zr,renderItem:p,customEmpty:b,renderSelected:h,addonIcon:g,...f}){const[v,y]=(0,i.useState)(r||[]);(0,i.useEffect)((()=>y(r||[])),[r]);const[k,w]=(0,i.useState)(),N=a.findIndex((e=>x(e)===k)),S=()=>R.current?.classList.remove("focus-visible"),C=([e])=>{if(v.includes(e)){w(void 0);const r=v.filter((r=>r!==e));return y(r),c(r)}n?.(""),w(e);const r=[...v,e];return y(r),c(r)},I=a.filter((([,e])=>!t||e.toLowerCase().includes(t.toLowerCase()))).map((([e,r])=>v.includes(e)?[e,r,!0]:[e,r])),[B,M,$,E,[P,D,T]]=Ur(N,I,C);(0,i.useEffect)(E,[t]);const R=(0,i.useRef)(null),z=(0,_.useMergedRefs)(e,R),{ref:O,borderBoxSize:F}=(0,_.useResizeObserver)();(0,_.useOutsideClick)([O],S);const L=(0,_.useStableCallback)((()=>P===Ue.VISIBLE?D():(R.current?.focus(),T()))),V=f.id?`${f.id}-listbox`:void 0,{id:A,name:H,"aria-label":W,"aria-labelledby":G,"aria-describedby":q,"aria-invalid":U,"aria-required":K,...Z}=f;return(0,j.jsxs)(He,{is:"div",animated:!0,"rcx-select":!0,className:[s&&"invalid",o&&"disabled"],ref:O,onClick:L,disabled:o,...Z,children:[(0,j.jsx)(Ot,{grow:1,children:(0,j.jsx)(cr,{inline:"x4",children:(0,j.jsx)(zt,{children:(0,j.jsx)(He,{is:"div",children:(0,j.jsx)(He,{is:"div",display:"flex",alignItems:"center",flexWrap:"wrap",margin:"-x8",children:(0,j.jsxs)(cr,{all:"x4",children:[(0,j.jsx)(l,{ref:z,disabled:o??!1,onClick:T,onBlur:D,onKeyDown:M,onKeyUp:$,role:"combobox","aria-expanded":P===Ue.VISIBLE,"aria-haspopup":"listbox","aria-controls":V,id:A,name:H,"aria-label":W,"aria-labelledby":G,"aria-describedby":q,"aria-invalid":U,"aria-required":K,children:0===v.length?u:null}),v.map((e=>{const r=a.find((([r])=>r===e));return h?(0,j.jsx)(h,{value:e,label:d(r),onMouseDown:e=>{fr(e),C(r),S()},children:d(r)},e):(0,j.jsx)(un,{tabIndex:-1,onMouseDown:e=>{fr(e),C(r),S()},children:d(r)},String(e))}))]})})})})})}),(0,j.jsx)(Ot,{grow:0,shrink:0,children:(0,j.jsx)(cr,{inline:"x4",children:(0,j.jsx)(cn,{children:(0,j.jsx)(Ge,{name:P===Ue.VISIBLE?"chevron-up":g||"chevron-down",size:"x20"})})})}),(0,j.jsx)(Zr,{visible:P,anchor:O,children:(0,j.jsx)(m,{width:F.inlineSize,onMouseDown:fr,multiple:!0,filter:t,renderItem:p||Nr,id:V,options:I,onSelect:C,cursor:B,customEmpty:b})})]})}var pn=(0,i.createContext)({});function bn({children:e,...r}){const{placeholder:t,filter:n,setFilter:a}=(0,i.use)(pn);return(0,j.jsx)(Ot,{grow:1,children:(0,j.jsx)(mr,{placeholder:t,value:n,onInput:e=>a?.(e.currentTarget.value),...r,"rcx-input-box--undecorated":!0,order:1,autoComplete:"off"})})}var hn=e=>(0,j.jsx)(Cr,{"rcx-navbar-divider":!0,vertical:!0,...e});var gn=(0,i.memo)((()=>(0,j.jsx)(wr,{label:"Empty"})));(0,i.memo)((function({selected:e,children:r,...t}){return(0,j.jsx)(wr,{label:r,selected:e,...t,children:(0,j.jsx)(vr,{checked:e})})}));function fn({ref:e,withTitle:r,multiple:t,renderEmpty:n=gn,options:a,cursor:s,renderItem:o=wr,onSelect:l,endReached:c,...d}){const x=({index:e,data:t})=>{const{value:n,label:a,selected:c}=t;return(0,i.createElement)(o,{...r&&{title:a},index:e,role:"option",label:a,onMouseDown:e=>(fr(e),l([n,a]),!1),key:n,value:n,selected:!!c,focus:s===e||void 0})};return(0,j.jsx)(He,{"rcx-options":!0,...d,ref:e,children:(0,j.jsx)(Tr,{padding:0,paddingBlock:"x12",paddingInline:0,elevation:"2",children:a.length?(0,j.jsx)(I.Virtuoso,{endReached:c,style:{height:"144px"},totalCount:a.length,data:a,itemContent:(e,r)=>(0,j.jsx)(x,{index:e,data:r})}):(0,j.jsx)(n,{})})})}function vn(e){return(0,j.jsx)(He,{is:"div","rcx-select__wrapper":!0,...e})}var jn=({value:e,withTitle:r,filter:t,setFilter:n,error:a,disabled:s,options:o=[],anchor:l=dn,onChange:c=()=>{},placeholder:d,renderOptions:x=fn,renderItem:u=wr,endReached:m,...p})=>{const[b,h]=(0,i.useState)(e),g=void 0!==e?e:b,f=o.find((e=>e?.value===g)),[v,y,k]=Fr(),w=(0,_.useStableCallback)((([e])=>{h(e),c(e),y()})),N=(0,i.useRef)(null),{ref:S,borderBoxSize:C}=(0,_.useResizeObserver)(),I=f?.label,B=void 0===t||v===Ue.HIDDEN?I||d:void 0,M=(0,_.useStableCallback)((()=>v===Ue.VISIBLE?y():N&&N.current?(N.current.focus(),k()):void 0));return(0,j.jsxs)(He,{animated:!0,"rcx-select":!0,disabled:s,ref:S,onClick:M,className:(0,i.useMemo)((()=>[a&&"invalid",s&&"disabled"]),[a,s]),...p,children:[(0,j.jsxs)(vn,{display:"flex",marginInline:"neg-x4","rcx-select__wrapper--hidden":!!B,children:[B&&(0,j.jsx)(He,{flexGrow:1,is:"span",marginInline:4,"rcx-select__item":!0,fontScale:"p2m",color:I?"titles-labels":"hint",children:B}),(0,j.jsx)(l,{disabled:s,"rcx-input-box--undecorated":!0,filter:t,ref:N,"aria-haspopup":"listbox",onClick:k,onBlur:y}),(0,j.jsx)(cr,{inline:"x4",children:(0,j.jsx)(cn,{children:(0,j.jsx)(Ge,{name:v===Ue.VISIBLE?"chevron-up":"chevron-down",size:"x20"})})})]}),(0,j.jsx)(Zr,{visible:v,anchor:S,children:(0,j.jsx)(x,{withTitle:r,width:C.inlineSize,role:"listbox",filter:t,options:o,onSelect:w,endReached:m,onMouseDown:fr,renderItem:u})})]})},_n=({withTitle:e,value:r,filter:t,options:n=[],error:a,disabled:s,anchor:o=dn,onChange:l=()=>{},placeholder:c,renderOptions:d=fn,renderItem:x=wr,endReached:u,...m})=>{const[p,b]=(0,i.useState)(r||[]),h=void 0!==r?r:p,g=n.filter((e=>h.some((r=>r.value===e.value)))),[f,v,y]=Fr(),k=(0,i.useRef)(null),{ref:w,borderBoxSize:N}=(0,_.useResizeObserver)(),S=(0,_.useStableCallback)((()=>f===Ue.VISIBLE?v():k&&k.current?(k.current.focus(),y()):void 0)),C=e=>{const r=h.filter((r=>r.value!==e));b(r),l(r)},I=e=>{h.some((r=>r.value===e))?C(e):(e=>{const r=n.find((r=>r.value===e));if(!r)return;const t=[...h,r];b(t),l(t)})(e)};return(0,j.jsxs)(He,{is:"div","rcx-select":!0,className:[a&&"invalid",s&&"disabled"],onClick:S,disabled:s,...m,ref:w,children:[(0,j.jsx)(Ot,{grow:1,children:(0,j.jsx)(cr,{inline:"x4",children:(0,j.jsx)(zt,{children:(0,j.jsx)(He,{is:"div",children:(0,j.jsx)(He,{is:"div",display:"flex",alignItems:"center",flexWrap:"wrap",margin:"-x8",role:"listbox",children:(0,j.jsxs)(cr,{all:"x4",children:[(0,j.jsx)(o,{disabled:s,ref:k,"aria-haspopup":"listbox",onClick:y,onBlur:v,order:1,"rcx-input-box--undecorated":!0,children:c??null}),g.map((({value:r,label:t},n)=>(0,j.jsx)(ur,{maxWidth:"x150",withTruncatedText:!0,title:e?t:void 0,tabIndex:-1,role:"option",onClick:e=>{fr(e),C(r)},children:t},r??n)))]})})})})})}),(0,j.jsx)(Ot,{grow:0,shrink:0,children:(0,j.jsx)(cr,{inline:"x4",children:(0,j.jsx)(cn,{children:(0,j.jsx)(Ge,{name:f===Ue.VISIBLE?"cross":"chevron-down",size:"x20"})})})}),(0,j.jsx)(Zr,{visible:f,anchor:w,children:(0,j.jsx)(d,{width:N.inlineSize,onMouseDown:fr,multiple:!0,filter:t,role:"listbox",options:n,cursor:-1,endReached:u,renderItem:x,onSelect:([e])=>{I(e)}})})]})},yn=()=>"Items per page:",kn=({count:e,current:r,itemsPerPage:t})=>`Showing results ${r+1} - ${Math.min(r+t,e)} of ${e}`,wn=[25,50,100],Nn=e=>{const{document:r}=F();return(0,i.useMemo)((()=>{const t=r.getElementById("rcx-styles")||r.head.lastChild,n=r.getElementById(e);if(n)return n;const a=r.createElement("style");return a.setAttribute("id",e),r.head.insertBefore(a,t),r.head.appendChild(r.createElement("style")),a}),[e,r])},Sn=e=>{const{badge:r,button:t,font:n,shadow:a,status:s,statusBullet:o,stroke:i,surface:l}=(e=>({badge:c.default[e],button:B.default[e],font:x.default[e],shadow:u.default[e],status:m.default[e],statusBullet:M.default[e],stroke:p.default[e],surface:b.default[e]}))(e);return{...[{category:"Stroke",description:"Use as component's outline, stroke, dividers",list:[{name:"stroke-extra-light",color:i.extraLight},{name:"stroke-light",color:i.light},{name:"stroke-medium",color:i.medium},{name:"stroke-dark",color:i.dark},{name:"stroke-extra-dark",color:i.extraDark},{name:"stroke-extra-light-highlight",color:i.extraLightHighlight},{name:"stroke-highlight",color:i.highlight},{name:"stroke-extra-light-error",color:i.extraLightError},{name:"stroke-error",color:i.error}]},{category:"Surface",description:"Use as a container on top of the background",list:[{name:"surface-light",color:l.light},{name:"surface-tint",color:l.tint},{name:"surface-room",color:l.room},{name:"surface-neutral",color:l.neutral},{name:"surface-disabled",color:l.disabled},{name:"surface-hover",color:l.hover},{name:"surface-selected",color:l.selected},{name:"surface-dark",color:l.dark},{name:"surface-featured",color:l.featured},{name:"surface-featured-hover",color:l.featuredHover},{name:"surface-overlay",color:l.overlay},{name:"surface-sidebar",color:l.sidebar}]},{category:"Shadow",description:"Use as a shadow color",list:[{name:"shadow-highlight",color:a.highlight},{name:"shadow-danger",color:a.danger},{name:"shadow-elevation-border",color:a["elevation-border"]},{name:"shadow-elevation-1",color:a["elevation-1"]},{name:"shadow-elevation-2x",color:a["elevation-2x"]},{name:"shadow-elevation-2y",color:a["elevation-2y"]}]},{category:"Font",description:"These should be applied according to surfaces",list:[{name:"font-white",color:n.white},{name:"font-disabled",color:n.disabled},{name:"font-annotation",color:n.annotation},{name:"font-hint",color:n.hint},{name:"font-secondary-info",color:n.secondaryInfo},{name:"font-default",color:n.default},{name:"font-titles-labels",color:n.titlesLabels},{name:"font-info",color:n.info},{name:"font-danger",color:n.danger},{name:"font-pure-black",color:n.pureBlack},{name:"font-pure-white",color:n.pureWhite}]},{category:"Status",description:"Status Background",list:[{name:"status-background-info",color:s.info},{name:"status-background-success",color:s.success},{name:"status-background-danger",color:s.danger},{name:"status-background-warning",color:s.warning},{name:"status-background-warning-2",color:s["warning-2"]},{name:"status-background-service-1",color:s["service-1"]},{name:"status-background-service-2",color:s["service-2"]},{name:"status-background-service-3",color:s["service-3"]}]},{description:"Status Font",list:[{name:"status-font-on-info",color:s["font-on-info"]},{name:"status-font-on-success",color:s["font-on-success"]},{name:"status-font-on-danger",color:s["font-on-danger"]},{name:"status-font-on-warning",color:s["font-on-warning"]},{name:"status-font-on-warning-2",color:s["font-on-warning-2"]},{name:"status-font-on-service-1",color:s["font-on-service-1"]},{name:"status-font-on-service-2 ",color:s["font-on-service-2"]},{name:"status-font-on-service-3 ",color:s["font-on-service-3"]}]},{category:"Badge",description:"Badge Background",list:[{name:"badge-background-level-0",color:r["level-0"]},{name:"badge-background-level-1",color:r["level-1"]},{name:"badge-background-level-2",color:r["level-2"]},{name:"badge-background-level-3",color:r["level-3"]},{name:"badge-background-level-4",color:r["level-4"]}]},{category:"Status Bullet",description:"Used to show user status",list:[{name:"status-bullet-online",color:o.online},{name:"status-bullet-away",color:o.away},{name:"status-bullet-busy",color:o.busy},{name:"status-bullet-disabled",color:o.disabled},{name:"status-bullet-offline",color:o.offline},{name:"status-bullet-loading",color:o.loading}]},{category:"Button",description:"Primary Background",list:[{name:"button-background-primary-default",color:t.backgroundPrimaryDefault},{name:"button-background-primary-hover",color:t.backgroundPrimaryHover},{name:"button-background-primary-press",color:t.backgroundPrimaryPress},{name:"button-background-primary-focus",color:t.backgroundPrimaryFocus},{name:"button-background-primary-keyfocus",color:t.backgroundPrimaryKeyfocus},{name:"button-background-primary-disabled",color:t.backgroundPrimaryDisabled}]},{description:"Secondary Background",list:[{name:"button-background-secondary-default",color:t.backgroundSecondaryDefault},{name:"button-background-secondary-hover",color:t.backgroundSecondaryHover},{name:"button-background-secondary-press",color:t.backgroundSecondaryPress},{name:"button-background-secondary-focus",color:t.backgroundSecondaryFocus},{name:"button-background-secondary-keyfocus",color:t.backgroundSecondaryKeyfocus},{name:"button-background-secondary-disabled",color:t.backgroundSecondaryDisabled}]},{description:"Secondary Danger Background",list:[{name:"button-background-secondary-danger-default",color:t.backgroundSecondaryDangerDefault},{name:"button-background-secondary-danger-hover",color:t.backgroundSecondaryDangerHover},{name:"button-background-secondary-danger-press",color:t.backgroundSecondaryDangerPress},{name:"button-background-secondary-danger-focus",color:t.backgroundSecondaryDangerFocus},{name:"button-background-secondary-danger-keyfocus",color:t.backgroundSecondaryDangerKeyfocus},{name:"button-background-secondary-danger-disabled",color:t.backgroundDangerDisabled}]},{description:"Danger Background",list:[{name:"button-background-danger-default",color:t.backgroundDangerDefault},{name:"button-background-danger-hover",color:t.backgroundDangerHover},{name:"button-background-danger-press",color:t.backgroundDangerPress},{name:"button-background-danger-focus",color:t.backgroundDangerFocus},{name:"button-background-danger-keyfocus",color:t.backgroundDangerKeyfocus},{name:"button-background-danger-disabled",color:t.backgroundDangerDisabled}]},{description:"Success Background",list:[{name:"button-background-success-default",color:t.backgroundSuccessDefault},{name:"button-background-success-hover",color:t.backgroundSuccessHover},{name:"button-background-success-press",color:t.backgroundSuccessPress},{name:"button-background-success-focus",color:t.backgroundSuccessFocus},{name:"button-background-success-keyfocus",color:t.backgroundSuccessKeyfocus},{name:"button-background-success-disabled",color:t.backgroundSuccessDisabled}]},{description:"Font",list:[{name:"button-font-on-primary",color:t.fontOnPrimary},{name:"button-font-on-primary-disabled",color:t.fontOnPrimaryDisabled},{name:"button-font-on-secondary",color:t.fontOnSecondary},{name:"button-font-on-secondary-disabled",color:t.fontOnSecondaryDisabled},{name:"button-font-on-secondary-danger",color:t.fontOnSecondaryDanger},{name:"button-font-on-secondary-danger-disabled",color:t.onSecondaryDangerDisabled},{name:"button-font-on-danger",color:t.fontOnDanger},{name:"button-font-on-danger-disabled",color:t.fontOnDangerDisabled},{name:"button-font-on-success",color:t.fontOnSuccess},{name:"button-font-on-success-disabled",color:t.fontOnSuccessDisabled}]}].reduce(((e,r)=>({...e,...r.list.reduce(((e,r)=>({...e,[r.name]:r.color})),{})})),{})}},Cn=Sn("light"),In=Sn("high-contrast"),Bn={light:Cn,dark:Sn("dark"),"high-contrast":In};var Mn=(0,i.memo)((function({theme:e="light",tagId:r="main-palette",prefix:t="--rcx-color",selector:n,palette:a}){const s=a||((e,r,t=":root")=>`${t} {\n${Object.entries(e).map((([e,t])=>`${r}-${e}: ${t};`)).join("\n")}\n}`)(Bn[e],t,n);return(0,j.jsx)(j.Fragment,{children:(0,C.createPortal)(s,Nn(r))})}));var $n=e=>`${Math.min(Math.max(0,e),100).toFixed(1)}%`,En={info:"status-font-on-info",success:"status-font-on-success",warning:"status-font-on-warning",danger:"status-font-on-danger"},Pn={info:"status-background-info",success:"status-background-success",warning:"status-background-warning",danger:"status-background-danger"},Dn=(e,r,t)=>t?e?Pn.danger:En.danger:e?Pn[r]:En[r];var Tn=e=>(0,j.jsx)(He,{is:"div","rcx-select__wrapper":!0,...e});function Rn({ref:e,value:r,filter:t,error:n,disabled:a,options:s=[],anchor:o=dn,onChange:l=()=>{},getValue:c=([e]=["",""])=>e,getLabel:d=([,e]=["",""])=>e,placeholder:x="",renderItem:u,renderSelected:m,renderOptions:p=zr,addonIcon:b,customEmpty:h,...g}){const[f,v]=(0,i.useState)(r||""),y=(0,_.useStableCallback)((([e])=>{v(e),l(e)})),k=s.find((e=>c(e)===f)),w=s.indexOf(k),N=(0,i.useMemo)((()=>s.filter((([,e])=>!t||~e.toLowerCase().indexOf(t.toLowerCase()))).map((([e,r])=>f===e?[e,r,!0]:[e,r]))),[s,f,t]),[S,C,I,B,[M,$,E]]=Ur(w,N,y),P=(0,i.useRef)(null),D=(0,_.useMergedRefs)(e,P),T=()=>P.current?.classList.remove("focus-visible"),R=(0,_.useStableCallback)((([e])=>{v(e),l(e),T(),$()})),{ref:z,borderBoxSize:O}=(0,_.useResizeObserver)();((e,r)=>{const t=(0,i.useRef)(!1),n=(0,_.useStableCallback)(e);(0,i.useEffect)((()=>{t.current&&n(),t.current=!0}),r||[])})(B,[t,f]),(0,_.useOutsideClick)([z],T);const F=d(k),L=(void 0===t||M===Ue.HIDDEN)&&(F||x||"string"==typeof x),V=(0,_.useStableCallback)((()=>P.current?.classList.contains("focus-visible")?(T(),$()):(P.current?.classList.add("focus-visible"),P.current?.focus(),E())));return(0,j.jsxs)(He,{animated:!0,"rcx-select":!0,disabled:a,ref:z,onClick:V,className:(0,i.useMemo)((()=>[n&&"invalid",a&&"disabled"]),[n,a]),...g,children:[(0,j.jsxs)(Tn,{display:"flex",marginInline:"neg-x4","rcx-select__wrapper--hidden":!!L,children:[L&&(m?(0,j.jsx)(m,{role:"option",value:c(k),label:F,onClick:R},c(k)):(0,j.jsx)(He,{flexGrow:1,is:"span",marginInline:4,"rcx-select__item":!0,fontScale:"p2",color:F?"titles-labels":"hint",children:L})),(0,j.jsx)(o,{ref:D,disabled:a??!1,onClick:E,onBlur:$,onKeyDown:C,onKeyUp:I,children:r?null:k||x}),(0,j.jsx)(cr,{inline:"x4",children:(0,j.jsx)(cn,{children:(0,j.jsx)(Ge,{name:M===Ue.VISIBLE?"chevron-up":b||"chevron-down",size:"x20"})})})]}),(0,j.jsx)(Zr,{visible:M,anchor:z,children:(0,j.jsx)(p,{width:O.inlineSize,role:"listbox",filter:t,options:N,onSelect:R,renderItem:u,cursor:S,customEmpty:h})})]})}function zn(e){const r=(0,i.useRef)(null),{listBoxRef:t=r,state:n}=e,{listBoxProps:a}=(0,k.useListBox)(e,n,t);return(0,j.jsx)("div",{...a,ref:t,children:[...n.collection].map((e=>"section"===e.type?(0,j.jsx)(On,{section:e,state:n},e.key):(0,j.jsx)(Fn,{item:e,state:n},e.key)))})}function On({section:e,state:r}){const{itemProps:t,headingProps:n,groupProps:a}=(0,k.useListBoxSection)({heading:e.rendered,"aria-label":e["aria-label"]});return(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("li",{...t,className:"pt-2",children:[e.rendered&&(0,j.jsx)("span",{...n,className:"text-xs font-bold uppercase text-gray-500 mx-3",children:e.rendered}),(0,j.jsx)("ul",{...a,children:[...e.childNodes].map((e=>(0,j.jsx)(Fn,{item:e,state:r},e.key)))})]})})}function Fn({item:e,state:r}){const t=(0,i.useRef)(null),{optionProps:n,isDisabled:a,isSelected:s,isFocused:o}=(0,k.useOption)({key:e.key},r,t);return(0,j.jsx)(wr,{ref:t,disabled:a,selected:s,focus:o,label:e.rendered,...n,children:e.rendered},e.key)}function Ln({ref:e,small:r,error:t,isDisabled:n,focus:a,id:s,...o}){const{buttonProps:i}=(0,k.useButton)(o,e);return(0,j.jsx)(He,{...i,id:s,animated:!0,"rcx-select":!0,ref:e,is:"button",display:"flex",flexDirection:"row",fontScale:"p2",justifyContent:"space-between","rcx-input-box--small":r,className:[t&&"invalid",n&&"disabled",a&&"focus"].filter(Boolean).join(" "),children:o.children})}function Vn({ref:e,error:r,placeholder:t,value:n,onChange:a,small:s,isDisabled:o,disabled:i,id:l,...c}){const d=o||i,x=(0,w.useSelectState)({isDisabled:d,selectedKey:"bigint"!=typeof n?n:null,onSelectionChange:a,...c}),{ref:u,borderBoxSize:m}=(0,_.useResizeObserver)(),p=(0,_.useMergedRefs)(e,u),{triggerProps:b,valueProps:h,menuProps:g}=(0,k.useSelect)({isDisabled:d,...c},x,u),{focusProps:f,isFocusVisible:v}=(0,k.useFocusRing)();return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(He,{position:"relative",size:0,children:(0,j.jsx)(k.HiddenSelect,{state:x,triggerRef:u,label:c.label,name:c.name,isDisabled:d})}),(0,j.jsxs)(Ln,{...(0,k.mergeProps)(f,b),ref:p,small:s,focus:v||x.isOpen,error:r,id:l,children:[(0,j.jsx)(He,{is:"span",color:x.selectedItem?"titles-labels":"hint",...h,...s&&{fontScale:"c1"},children:x.selectedItem?x.selectedItem.rendered:t}),(0,j.jsx)(Ge,{color:"titles-labels",name:x.isOpen?"chevron-up":"chevron-down",size:"x20"})]}),x.isOpen&&(0,j.jsx)(Vt,{state:x,triggerRef:u,placement:"bottom",offset:4,containerPadding:8,children:(0,j.jsx)(Or,{style:{width:m?.inlineSize},children:(0,j.jsx)(zn,{...g,state:x})})})]})}var An=(0,i.createContext)({});function Hn({children:e,...r}){const{placeholder:t,filter:n,setFilter:a}=(0,i.use)(An);return(0,j.jsx)(mr,{marginInline:4,flexGrow:1,className:"rcx-select__focus",placeholder:t,value:n,onInput:e=>a?.(e.currentTarget.value),...r,"rcx-input-box--undecorated":!0})}var Wn=({expanded:e,defaultExpanded:r,disabled:t,noncollapsible:n,tabIndex:a=0})=>{const[s,o]=(0,_.useToggle)(r),l=(e=>void 0!==e)(e)?e:s,c=n||l,d=(0,i.useId)(),x=(0,i.useId)();return{barProps:n?{"aria-disabled":"true","aria-expanded":"true","aria-labelledby":d}:{"aria-controls":x,"aria-expanded":l?"true":"false",tabIndex:t?void 0:a,onClick:e=>{t||(e.currentTarget?.blur(),o())},onKeyDown:e=>{if(!t&&e.currentTarget===e.target&&["Enter","Space"].includes(e.code)){if(e.preventDefault(),e.repeat)return;o()}}},titleId:d,panelId:x,panelExpanded:c,expanded:l}};var Gn=({size:e,className:r,...t})=>(0,j.jsx)("svg",{...t,width:"10",height:"10",viewBox:"0 0 10 10","aria-hidden":"true",className:`rcx-status-bullet rcx-status-bullet--away ${r} ${"small"===e?"rcx-status-bullet--small":""}`,xmlns:"http://www.w3.org/2000/svg",children:(0,j.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.13337 9.93325C7.78434 9.93325 9.93338 7.78422 9.93338 5.13325C9.93338 2.48229 7.78434 0.333252 5.13337 0.333252C2.48241 0.333252 0.333374 2.48229 0.333374 5.13325C0.333374 7.78422 2.48241 9.93325 5.13337 9.93325ZM5.80004 2.33325C5.80004 1.96506 5.50156 1.66659 5.13337 1.66659C4.76518 1.66659 4.46671 1.96506 4.46671 2.33325V5.13325V5.45367L4.71691 5.65383L6.71691 7.25383C7.00442 7.48384 7.42395 7.43722 7.65395 7.14972C7.88396 6.86221 7.83735 6.44268 7.54984 6.21267L5.80004 4.81284V2.33325Z"})}),qn=({size:e,className:r,...t})=>(0,j.jsx)("svg",{...t,width:"10",height:"10",viewBox:"0 0 10 10","aria-hidden":"true",className:`rcx-status-bullet rcx-status-bullet--busy ${r} ${"small"===e?"rcx-status-bullet--small":""}`,xmlns:"http://www.w3.org/2000/svg",children:(0,j.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.13337 9.93325C7.78434 9.93325 9.93338 7.78422 9.93338 5.13325C9.93338 2.48229 7.78434 0.333252 5.13337 0.333252C2.48241 0.333252 0.333374 2.48229 0.333374 5.13325C0.333374 7.78422 2.48241 9.93325 5.13337 9.93325ZM3.53338 4.46655C3.16519 4.46655 2.86671 4.76503 2.86671 5.13322C2.86671 5.50141 3.16519 5.79989 3.53338 5.79989H6.73338C7.10157 5.79989 7.40004 5.50141 7.40004 5.13322C7.40004 4.76503 7.10157 4.46655 6.73338 4.46655H3.53338Z"})}),Un=({size:e,className:r,...t})=>(0,j.jsx)("svg",{...t,width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",className:`rcx-status-bullet rcx-status-bullet--disabled ${r} ${"small"===e?"rcx-status-bullet--small":""}`,xmlns:"http://www.w3.org/2000/svg",children:(0,j.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24ZM13.3367 5.33333C13.3367 4.59695 12.7398 4 12.0034 4C11.267 4 10.67 4.59695 10.67 5.33333V14.6667C10.67 15.403 11.267 16 12.0034 16C12.7398 16 13.3367 15.403 13.3367 14.6667V5.33333ZM13.3367 18.6667C13.3367 17.9303 12.7398 17.3333 12.0034 17.3333C11.267 17.3333 10.67 17.9303 10.67 18.6667C10.67 19.403 11.267 20 12.0034 20C12.7398 20 13.3367 19.403 13.3367 18.6667Z"})}),Kn=({size:e,className:r,...t})=>(0,j.jsx)("svg",{...t,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",className:`rcx-status-bullet rcx-status-bullet--loading ${r} ${"small"===e?"rcx-status-bullet--small":""}`,children:(0,j.jsx)("circle",{cx:"6",cy:"6",r:"5",className:"rcx-status-bullet rcx-status-bullet--loading",strokeWidth:"2",strokeDasharray:"2 2"})}),Zn=({size:e,className:r,...t})=>(0,j.jsx)("svg",{...t,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",className:`rcx-status-bullet rcx-status-bullet--offline ${r} ${"small"===e?"rcx-status-bullet--small":""}`,children:(0,j.jsx)("circle",{cx:"6",cy:"6",r:"5",className:"rcx-status-bullet rcx-status-bullet--offline",strokeWidth:"2"})}),Yn=({size:e,className:r,...t})=>(0,j.jsx)("svg",{...t,width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",className:`rcx-status-bullet rcx-status-bullet--online ${r} ${"small"===e?"rcx-status-bullet--small":""}`,xmlns:"http://www.w3.org/2000/svg",children:(0,j.jsx)("path",{d:"M24 12.0001C24 18.6275 18.6274 24.0001 12 24.0001C5.37255 24.0001 -3.05176e-05 18.6275 -3.05176e-05 12.0001C-3.05176e-05 5.37271 5.37255 0.00012207 12 0.00012207C18.6274 0.00012207 24 5.37271 24 12.0001Z"})}),Xn=({status:e="loading",...r})=>{switch(e){case"online":return(0,j.jsx)(Yn,{...r});case"away":return(0,j.jsx)(Gn,{...r});case"busy":return(0,j.jsx)(qn,{...r});case"disabled":return(0,j.jsx)(Un,{...r});case"offline":return(0,j.jsx)(Zn,{...r});default:return(0,j.jsx)(Kn,{...r})}},Qn=({title:e,titleId:r,badge:t,menu:n,barProps:a,expanded:s,empty:o,role:i,...l})=>(0,j.jsxs)("div",{className:["rcx-box rcx-box--full","rcx-sidebar-collapse-group__bar",!s&&o&&"rcx-sidebar-collapse-group__bar--empty",!s&&t&&"rcx-sidebar-collapse-group__bar--unread","rcx-box--animated"].filter(Boolean).join(" "),...l,children:[(0,j.jsxs)("div",{className:"rcx-box rcx-sidebar-collapse-group__bar-button",role:i,...a,children:[void 0!==s&&(0,j.jsx)(qe,{size:"x20",right:!s}),e&&(0,j.jsx)("h4",{className:"rcx-box rcx-box--full rcx-sidebar-collapse-group__title",id:r,children:e}),!s&&t&&t]}),n]});var Jn=({align:e="end",small:r=!0,...t})=>(0,j.jsx)(ot,{align:e,small:r,...t}),ea=()=>(0,j.jsx)(Cr,{"rcx-sidebar--divider":!0,marginBlockStart:-2,marginBlockEnd:0}),ra=()=>(0,j.jsx)(Cr,{"rcx-sidepanel--divider":!0,marginBlockStart:-2,marginBlockEnd:0});var ta=(0,i.createContext)(!1);function na({disabled:e,circleCount:r,iteration:t,inheritColor:n,...a}){return(0,j.jsx)(He,{is:"span",className:l.css`
200
200
  animation-duration: ${.466*r}s;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocket.chat/fuselage",
3
- "version": "0.90.1",
3
+ "version": "0.91.0",
4
4
  "description": "Rocket.Chat's React Components Library",
5
5
  "homepage": "https://github.com/RocketChat/fuselage#readme",
6
6
  "bugs": {
@@ -54,7 +54,7 @@
54
54
  "@microsoft/api-extractor": "~7.58.12",
55
55
  "@rocket.chat/fuselage-hooks": "^0.43.1",
56
56
  "@rocket.chat/icons": "^0.50.0",
57
- "@rocket.chat/storybook-dark-mode": "^4.2.1",
57
+ "@rocket.chat/storybook-dark-mode": "~4.2.1",
58
58
  "@rocket.chat/visual-regression": "^0.0.1",
59
59
  "@storybook/addon-a11y": "~9.1.20",
60
60
  "@storybook/addon-docs": "~9.1.20",