@maxhub/max-ui 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{Children as n,cloneElement as r,forwardRef as l,useRef as i,useState as _,useEffect as o,isValidElement as s,useMemo as c,useLayoutEffect as p,createContext as d,useContext as u}from"react";function m(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=m(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}function h(){for(var e,t,a=0,n="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=m(e))&&(n&&(n+=" "),n+=t);return n}var v;function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},y.apply(null,arguments)}var g,f=function(e){return a.createElement("svg",y({xmlns:"http://www.w3.org/2000/svg",width:12,height:16,fill:"none"},e),v||(v=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.934 3.434a.8.8 0 0 1 1.132 0l4 4a.8.8 0 0 1 0 1.132l-4 4a.8.8 0 0 1-1.132-1.132L6.37 8 2.934 4.566a.8.8 0 0 1 0-1.132",clipRule:"evenodd"})))};function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},C.apply(null,arguments)}var b,N=function(e){return a.createElement("svg",C({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),g||(g=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16M5.566 4.434a.8.8 0 1 0-1.132 1.132L6.87 8l-2.435 2.434a.8.8 0 0 0 1.132 1.132L8 9.13l2.434 2.435a.8.8 0 0 0 1.132-1.132L9.13 8l2.435-2.434a.8.8 0 0 0-1.132-1.132L8 6.87z",clipRule:"evenodd"})))};function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},B.apply(null,arguments)}var I,S=function(e){return a.createElement("svg",B({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),b||(b=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.242 2.115c-2.605 0-4.677 2.044-4.677 4.517s2.072 4.517 4.677 4.517 4.677-2.044 4.677-4.517-2.072-4.517-4.677-4.517M1 6.632C1 3.252 3.817.55 7.242.55s6.242 2.701 6.242 6.082a5.97 5.97 0 0 1-1.692 4.165l3 3.247a.783.783 0 1 1-1.15 1.062l-3.074-3.326a6.34 6.34 0 0 1-3.326.935C3.817 12.715 1 10.013 1 6.632",clipRule:"evenodd"})))};function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},T.apply(null,arguments)}var A,x,w=function(e){return a.createElement("svg",T({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),I||(I=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.364 4.364a.9.9 0 0 1 1.272 0L10 8.727l4.364-4.363a.9.9 0 0 1 1.272 1.272L11.273 10l4.363 4.364a.9.9 0 0 1-1.272 1.272L10 11.273l-4.364 4.363a.9.9 0 0 1-1.272-1.272L8.727 10 4.364 5.636a.9.9 0 0 1 0-1.272",clipRule:"evenodd"})))};function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},L.apply(null,arguments)}var z,E=function(e){return a.createElement("svg",L({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),A||(A=a.createElement("circle",{cx:10,cy:10,r:10,fill:"currentColor"})),x||(x=a.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.364 5.364a.9.9 0 0 1 1.272 0L10 8.727l3.364-3.363a.9.9 0 0 1 1.272 1.272L11.274 10l3.364 3.364a.9.9 0 1 1-1.273 1.272L10 11.273l-3.364 3.363a.9.9 0 0 1-1.272-1.272L8.727 10 5.364 6.636a.9.9 0 0 1 0-1.272",clipRule:"evenodd"})))};function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},O.apply(null,arguments)}var M=function(e){return a.createElement("svg",O({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),z||(z=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.268 6.268a.915.915 0 0 1 1.294 0L12 10.706l4.438-4.438a.915.915 0 1 1 1.294 1.294L13.294 12l4.438 4.438a.915.915 0 1 1-1.294 1.294L12 13.294l-4.438 4.438a.915.915 0 1 1-1.294-1.294L10.706 12 6.268 7.562a.915.915 0 0 1 0-1.294",clipRule:"evenodd"})))};const k=e=>"string"==typeof e?e:`${e}px`,j=e=>{const{options:t,content:a}=e,{asChild:l,children:i}=t;if(!l)return"function"==typeof a?a(i):a;const _=n.only(i);return r(_,{children:"function"==typeof a?a(_.props.children):a})},H=e=>void 0!==e&&!1!==e&&null!==e&&""!==e,P=()=>!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g),D=(...e)=>{const t=e.filter(Boolean);if(t.length<=1){return t[0]??null}return e=>{for(const a of t)"function"==typeof a?a(e):a&&(a.current=e)}},$=()=>{};var U=Object.defineProperty,R=(e,t)=>U(e,"name",{value:t,configurable:!0});function Y(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function W(...e){return t=>{let a=!1;const n=e.map(e=>{const n=Y(e,t);return a||"function"!=typeof n||(a=!0),n});if(a)return()=>{for(let t=0;t<n.length;t++){const a=n[t];"function"==typeof a?a():Y(e[t],null)}}}}function F(...e){return a.useCallback(W(...e),e)}R(Y,"setRef"),R(W,"composeRefs"),R(F,"useComposedRefs");var G=Object.defineProperty,X=(e,t)=>G(e,"name",{value:t,configurable:!0});function Z(e){const t=a.forwardRef((t,n)=>{let{children:r,...l}=t,i=null,_=!1;const o=[];re(r)&&"function"==typeof oe&&(r=oe(r._payload)),a.Children.forEach(r,e=>{if(ae(e)){_=!0;const t=e;let a="child"in t.props?t.props.child:t.props.children;re(a)&&"function"==typeof oe&&(a=oe(a._payload)),i=K(t,a),o.push(i?.props?.children)}else o.push(e)}),i?i=a.cloneElement(i,void 0,o):!_&&1===a.Children.count(r)&&a.isValidElement(r)&&(i=r);const s=i?te(i):void 0,c=F(n,s);if(!i){if(r||0===r)throw new Error(_?_e(e):ie(e));return r}const p=ee(l,i.props??{});return i.type!==a.Fragment&&(p.ref=n?c:s),a.cloneElement(i,p)});return t.displayName=`${e}.Slot`,t}X(Z,"createSlot");var q=Z("Slot"),V=Symbol.for("radix.slottable");function J(e){const t=X(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=V,t}X(J,"createSlottable");var Q=J("Slottable"),K=X((e,t)=>{if("child"in e.props){const t=e.props.child;return a.isValidElement(t)?a.cloneElement(t,void 0,e.props.children(t.props.children)):null}return a.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function ee(e,t){const a={...t};for(const n in t){const r=e[n],l=t[n];/^on[A-Z]/.test(n)?r&&l?a[n]=(...e)=>{const t=l(...e);return r(...e),t}:r&&(a[n]=r):"style"===n?a[n]={...r,...l}:"className"===n&&(a[n]=[r,l].filter(Boolean).join(" "))}return{...e,...a}}function te(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}function ae(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===V}X(ee,"mergeProps"),X(te,"getElementRef"),X(ae,"isSlottable");var ne=Symbol.for("react.lazy");function re(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===ne&&"_payload"in e&&le(e._payload)}function le(e){return"object"==typeof e&&null!==e&&"then"in e}X(re,"isLazyComponent"),X(le,"isPromiseLike");var ie=X(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),_e=X(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),oe=a[" use ".trim().toString()],se="SvgButton__-Jm";const ce=l((t,a)=>{const{className:n,asChild:r,...l}=t;return e(r?q:"button",{ref:a,className:h(se,n),...l})});ce.displayName="SvgButton";var pe="ClearableInput__4PN",de="ClearableInput__button__iUo",ue="ClearableInput__count__K7Z";const me=l((a,n)=>{const{className:r,onChange:l,innerClassNames:o,withClearButton:s=!0,disabled:c,count:p,...d}=a,u=i(null),[m,v]=_(!d.value&&!d.defaultValue);return t("span",{className:h(pe,r),children:[e("input",{ref:D(u,n),className:h(o?.input),onChange:e=>{l?.(e),v(!e.target.value)},disabled:c,...d}),!m&&!c&&!!p&&e("div",{className:h(ue,o?.count),children:p}),!m&&!c&&s&&e(ce,{className:h(de,o?.clearButton),onClick:()=>{u.current&&(e=>{const{el:t,value:a}=e,n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;n?.call(t,a);const r=new Event("input",{bubbles:!0});t.dispatchEvent(r)})({el:u.current,value:""})},"aria-label":"Очистить",children:e(N,{})})]})});me.displayName="ClearableInput";var he="Container__yZR",ve="Container_fullWidth__2tY";l((t,a)=>{const{className:n,asChild:r,fullWidth:l,...i}=t,_=r?q:"div",o=h(he,{[ve]:l},n);return e(_,{ref:a,className:o,...i})}).displayName="Container";var ye="EllipsisText__DEC",ge="EllipsisText_multiline__y4t",fe="EllipsisText_singleLine__Arf";const Ce=l((t,a)=>{const{className:n,maxLines:r=1,style:l,asChild:i,..._}=t,o=i?q:"span",s=h(ye,{[ge]:r>1,[fe]:1===r},n);return e(o,{ref:a,className:s,style:{"--MaxUi-EllipsisText_linesCount":r,...l},..._})});Ce.displayName="EllipsisText";var be="Flex__pih";l((t,a)=>{const{className:n,display:r="flex",direction:l="row",align:i="flex-start",justify:_="start",asChild:o,wrap:s,style:c,gap:p,gapX:d,gapY:u,...m}=t;return e(o?q:"div",{ref:a,className:h(be,n),style:{flexDirection:l,justifyContent:_,alignItems:i,flexWrap:s,...c,display:r,"--MaxUi-Flex_gapX":k(d??p??0),"--MaxUi-Flex_gapY":k(u??p??0)},...m})}).displayName="Flex";var Ne="Grid__lFk";l((t,a)=>{const{className:n,style:r,display:l="grid",align:i="start",justify:_="start",gap:o,gapX:s,gapY:c,cols:p,rows:d,asChild:u,...m}=t;return e(u?q:"div",{ref:a,className:h(Ne,n),style:{justifyContent:_,alignItems:i,...r,display:l,"--MaxUi-Grid_gapX":k(s??o??0),"--MaxUi-Grid_gapY":k(c??o??0),"--MaxUi-Grid_cols":p??0,"--MaxUi-Grid_rows":d??0},...m})}).displayName="Grid";var Be={Panel:"Panel__XH0",Panel_centeredX:"Panel_centeredX__DG7",Panel_centeredY:"Panel_centeredY__f-k",Panel_mode_primary:"Panel_mode_primary__fNs",Panel_mode_secondary:"Panel_mode_secondary__Tez"};l((t,a)=>{const{className:n,mode:r="primary",centeredX:l,centeredY:i,..._}=t,o=h(Be.Panel,Be[`Panel_mode_${r}`],{[Be.Panel_centeredX]:l,[Be.Panel_centeredY]:i},n);return e("div",{ref:a,className:o,..._})}).displayName="Panel";var Ie="Ripple__dJ9",Se="Ripple_active__uv5";const Te=l((t,a)=>{const{className:n,...r}=t,l=i(null),_=i(null),s=e=>{const t=e.currentTarget.getBoundingClientRect();((e,t)=>{null!==_.current&&(_.current.classList.remove(Se),_.current.style.top=t+"px",_.current.style.left=e+"px",_.current.classList.add(Se))})(e.clientX-(t.left??0),e.clientY-(t.top??0))};return o(()=>{if(_.current)return l.current=_.current.parentElement,null!==l.current&&l.current.addEventListener("pointerdown",s),()=>{null!==l.current&&l.current?.removeEventListener("pointerdown",s)}},[]),e("span",{ref:D(a,_),role:"presentation","aria-hidden":!0,className:h(Ie,n),onAnimationEnd:()=>{null!==_.current&&_.current.classList.remove(Se)},...r})});Te.displayName="Ripple";const Ae=e=>{const{asChild:t,children:a,rootElement:n,disabled:r,loading:l}=e;if(!t&&"button"===n){return{disabled:r,...l?{"aria-disabled":!0}:{}}}if(t&&s(a)){const{type:e}=a;if("a"===e){return{"aria-disabled":r??l,...r?{onClick:e=>{e.preventDefault()},tabIndex:-1}:{}}}}return{role:"button",tabIndex:r?-1:0,"aria-disabled":r??l,...r?{onClick:void 0}:{}}},xe=e=>{const t=i(e);return o(()=>{t.current=e}),c(()=>(...e)=>t.current?.(...e),[])},we=()=>{const{colorScheme:e}=Ot();return e},Le=e=>{const{src:t,referrerPolicy:a}=e,[n,r]=_("idle");return p(()=>{if(!t)return void r("error");let e=!0;const n=new window.Image,l=t=>()=>{e&&r(t)};return r("loading"),n.onload=l("loaded"),n.onerror=l("error"),n.src=t,a&&(n.referrerPolicy=a),()=>{e=!1}},[t,a]),n},ze=()=>{const{platform:e}=Ot();return e},Ee=(e={})=>{const{listenChanges:t}=e,[a,n]=_(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),r=e=>{n(()=>e.matches?"dark":"light")};return o(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return n(()=>e.matches?"dark":"light"),t?(e.addEventListener("change",r),()=>{e.removeEventListener("change",r)}):$},[t]),a};var Oe="Tappable__O--",Me="Tappable_interactive__4Uv",ke="Tappable_disabled__0z8",je="Tappable_activeMode_ripple__3k-",He="Tappable_activeMode_highlight__Hs-",Pe="Tappable__ripple__Egr";const De=l((a,n)=>{const{className:r,disabled:l,asChild:i,children:_,as:o="div",...c}=a,p=i?q:o,d=ze(),u=Ae({asChild:i,children:_,disabled:l,rootElement:o}),m=(({onClick:e,href:t,children:a,asChild:n,parentChildren:r=a})=>n?!(!n||!s(r))&&("href"in r.props||"onClick"in r.props):!!e||!!t)(a),v="android"===d&&m&&!l,y=h(Oe,{[Me]:m,[ke]:l,[He]:!v,[je]:v},r);return t(p,{ref:n,className:y,...m?u:{},...c,children:[_,v&&e(Te,{className:Pe})]})});De.displayName="Tappable";const $e=d({size:48}),Ue=()=>u($e);var Re={};const Ye=l((t,a)=>{const{className:n,onClick:r,...l}=t,{size:i}=Ue(),_=(e=>e<40?12:e<54?16:e<72?20:24)(i);return e(ce,{ref:a,className:h(Re.AvatarCloseButton,n),onClick:e=>{e.preventDefault(),r?.(e)},...l,children:e(E,{width:_,height:_})})});Ye.displayName="AvatarCloseButton";var We={AvatarContainer:"AvatarContainer__7c-",AvatarContainer_form_circle:"AvatarContainer_form_circle__J44",AvatarContainer__content:"AvatarContainer__content__h8v",AvatarContainer_form_squircle:"AvatarContainer_form_squircle__1i0",AvatarContainer__overlay:"AvatarContainer__overlay__qul",AvatarContainer__rightBottomCorner:"AvatarContainer__rightBottomCorner__kZG",AvatarContainer__rightTopCorner:"AvatarContainer__rightTopCorner__y4y"};const Fe=l((a,n)=>{const{className:r,style:l,children:i,overlay:_,rightTopCorner:o,rightBottomCorner:s,innerClassNames:c,size:p=48,asChild:d,form:u="circle",...m}=a,v=d?q:"div",y=h(We.AvatarContainer,We[`AvatarContainer_form_${u}`],r);return e($e.Provider,{value:{size:p},children:t(v,{ref:n,className:y,style:{"--MaxUi-AvatarContainer_size":`${p}px`,...l},...m,children:[e(Q,{children:j({options:{asChild:a.asChild,children:i},content:a=>t("span",{className:h(We.AvatarContainer__content,c?.content),children:[a,H(_)&&e("span",{className:h(We.AvatarContainer__overlay,c?.overlay),children:_})]},"subtree-container")})}),H(s)&&e("span",{className:h(We.AvatarContainer__rightBottomCorner,c?.rightBottomCorner),children:s}),H(o)&&e("span",{className:h(We.AvatarContainer__rightTopCorner,c?.rightTopCorner),children:o})]})})});Fe.displayName="AvatarContainer";var Ge="AvatarIcon__ZUI";const Xe=l((t,a)=>{const{className:n,...r}=t;return e("span",{ref:a,className:h(Ge,n),...r})});Xe.displayName="AvatarIcon";var Ze={AvatarText:"AvatarText__DIj",AvatarText_gradient_red:"AvatarText_gradient_red__bnV",AvatarText_gradient_orange:"AvatarText_gradient_orange__Ngq",AvatarText_gradient_green:"AvatarText_gradient_green__n7Z",AvatarText_gradient_blue:"AvatarText_gradient_blue__gLu",AvatarText_gradient_purple:"AvatarText_gradient_purple__UsS",AvatarText__in:"AvatarText__in__cDg"};const qe=e=>e<20?{fontSize:6}:e<28?{fontSize:8}:e<32?{fontSize:10}:e<36?{fontSize:11}:e<40?{fontSize:13}:e<48?{fontSize:14}:e<54?{fontSize:17}:e<64?{fontSize:18}:e<72?{fontSize:21}:e<88?{fontSize:26}:{fontSize:30},Ve=l((t,a)=>{const{className:n,children:r,gradient:l="red",...i}=t,{size:_}=Ue(),o=h(Ze.AvatarText,{[Ze[`AvatarText_gradient_${l}`]]:"custom"!==l},n);return e("span",{ref:a,className:o,...i,children:e("span",{className:Ze.AvatarText__in,style:qe(_),children:r})})});Ve.displayName="AvatarText";var Je="AvatarImage__H7-";const Qe=l((t,a)=>{const{className:n,fallback:r,fallbackGradient:l="red",...i}=t,[o,s]=_("idle"),c=Le({src:i.src??i.srcSet,referrerPolicy:i.referrerPolicy}),d=xe(e=>{s(e)});return p(()=>{"idle"!==c&&d(c)},[c,d]),"error"===o?e(Ve,{gradient:l,children:r}):e("img",{ref:a,className:h(Je,n),...i})});Qe.displayName="AvatarImage";var Ke={AvatarOnlineDot:"AvatarOnlineDot__-GT",AvatarOnlineDot_size_xs:"AvatarOnlineDot_size_xs__2SY",AvatarOnlineDot__dot:"AvatarOnlineDot__dot__8dL",AvatarOnlineDot_size_s:"AvatarOnlineDot_size_s__T1u",AvatarOnlineDot_size_m:"AvatarOnlineDot_size_m__ris",AvatarOnlineDot_size_l:"AvatarOnlineDot_size_l__zo4"};const et=l((t,a)=>{const{className:n,...r}=t,{size:l}=Ue(),i=(e=>e<40?"xs":e<54?"s":e<72?"m":"l")(l),_=h(Ke.AvatarOnlineDot,Ke[`AvatarOnlineDot_size_${i}`],n);return l<16||l>80?null:e("span",{ref:a,className:_,...r,children:e("span",{className:Ke.AvatarOnlineDot__dot})})});et.displayName="AvatarOnlineDot";var tt="AvatarOverlay__-nV";const at=l((t,a)=>{const{className:n,onClick:r,...l}=t;return e("span",{ref:a,className:h(tt,n),onClick:e=>{e.preventDefault(),r?.(e)},...l})});at.displayName="AvatarOverlay";const nt=Object.assign({},{Container:Fe,Image:Qe,Overlay:at,Icon:Xe,Text:Ve,OnlineDot:et,CloseButton:Ye});var rt={Spinner:"Spinner__piy",Spinner_appearance_primary:"Spinner_appearance_primary__mxz",Spinner_appearance_themed:"Spinner_appearance_themed__-9S","Spinner_appearance_primary-static":"Spinner_appearance_primary-static__JxW",Spinner_appearance_contrast:"Spinner_appearance_contrast__Mv6","Spinner_appearance_contrast-static":"Spinner_appearance_contrast-static__rM7",Spinner_appearance_negative:"Spinner_appearance_negative__eMf","Spinner_appearance_neutral-themed":"Spinner_appearance_neutral-themed__D8F",androidSpinner:"androidSpinner__w-L",rotation:"rotation__CUP",iosSpinner:"iosSpinner__3q2",bar:"bar__aHj",fade:"fade__2ZD"};const lt=({size:t})=>e("div",{className:rt.androidSpinner,style:{width:t,height:t}}),it=({size:t})=>e("div",{className:rt.iosSpinner,style:{width:t,height:t},children:Array.from({length:8},(t,a)=>e("div",{className:rt.bar},a))}),_t=l((t,a)=>{const{className:n,size:r=20,appearance:l="primary",...i}=t,_=ze(),o=h(rt.Spinner,rt[`Spinner_appearance_${l}`],n);return e("span",{ref:a,role:"status",className:o,...i,children:e("ios"===_?it:lt,{size:r})})});_t.displayName="Spinner";var ot={Button:"Button__0OJ",Button_loading:"Button_loading__LD-",Button__iconBefore:"Button__iconBefore__BUe",Button__content:"Button__content__vnq",Button__indicator:"Button__indicator__HuA",Button__iconAfter:"Button__iconAfter__VhZ",Button_disabled:"Button_disabled__jkY",Button_stretched:"Button_stretched__mzq",Button_activeMode_ripple:"Button_activeMode_ripple__E5Y",Button_activeMode_highlight:"Button_activeMode_highlight__K3j",Button_size_xsmall:"Button_size_xsmall__QCm",Button_size_small:"Button_size_small__LLG",Button_size_medium:"Button_size_medium__fI9",Button_size_large:"Button_size_large__S2-",Button_variant_primary:"Button_variant_primary__yLL",Button_variant_secondary:"Button_variant_secondary__DR6",Button_variant_ghost:"Button_variant_ghost__EkG","Button_variant_primary-contrast":"Button_variant_primary-contrast__b63","Button_variant_secondary-contrast":"Button_variant_secondary-contrast__cey",Button_variant_overlay:"Button_variant_overlay__keO",Button_variant_destructive:"Button_variant_destructive__2Ug",Button__spinnerContainer:"Button__spinnerContainer__G4I",Button__ripple:"Button__ripple__jw0"},st={Counter:"Counter__0Oj",Counter_variant_primary:"Counter_variant_primary__8Mz","Counter_variant_primary-contrast":"Counter_variant_primary-contrast__yFz",Counter_variant_attention:"Counter_variant_attention__IWH","Counter_variant_attention-contrast":"Counter_variant_attention-contrast__LHu",Counter_variant_promo:"Counter_variant_promo__9kD",Counter_variant_static:"Counter_variant_static__d8Y","Counter_variant_static-contrast":"Counter_variant_static-contrast__bAq",Counter_variant_default:"Counter_variant_default__weZ",Counter_variant_mute:"Counter_variant_mute__2SU",Counter_variant_menu:"Counter_variant_menu__qf0"};const ct=l((t,a)=>{const{className:n,value:r,rounded:l,variant:i="primary",..._}=t,o=h(st.Counter,st[`Counter_variant_${i}`],n),s=c(()=>l?Intl.NumberFormat("en",{notation:"compact"}).format(r):r,[l,r]);return e("span",{ref:a,className:o,..._,children:s})});ct.displayName="Counter";const pt=e=>{switch(e){case"xsmall":return 16;case"small":case"medium":return 20;case"large":return 24}},dt=e=>{switch(e){case"primary":case"destructive":case"overlay":return"contrast-static";case"secondary":return"primary";case"ghost":return"themed";case"primary-contrast":case"secondary-contrast":return"primary-static"}},ut=e=>{switch(e){case"primary":return{variant:"primary-contrast"};case"secondary":case"ghost":case"primary-contrast":case"secondary-contrast":return{variant:"static"};case"overlay":return{variant:"static-contrast"};case"destructive":return{variant:"attention-contrast"}}},mt=l((a,n)=>{const{className:l,iconBefore:i,iconAfter:_,indicator:o,children:c,onClick:p,loading:d,disabled:u=!1,asChild:m=!1,innerClassNames:v,stretched:y=!1,size:g="medium",variant:f="primary",...C}=a,b="button",N=m?q:b,B=ze(),I=Ae({asChild:m,children:c,disabled:u,rootElement:b,loading:d}),S=u||d,T="android"===B,A=h(ot.Button,ot[`Button_variant_${f}`],ot[`Button_size_${g}`],{[ot.Button_loading]:d,[ot.Button_disabled]:u,[ot.Button_stretched]:y,[ot.Button_activeMode_highlight]:!S&&!T,[ot.Button_activeMode_ripple]:!S&&T},l);return t(N,{ref:n,className:A,onClick:e=>{d?e.preventDefault():p?.(e)},...I,...C,children:[H(i)&&e("span",{className:h(ot.Button__iconBefore,v?.iconBefore),children:i}),d&&e("span",{className:h(ot.Button__spinnerContainer,v?.spinnerContainer),children:e(_t,{className:h(v?.spinner),size:pt(g),appearance:dt(f)})}),e(Q,{children:j({options:{asChild:m,children:c},content:t=>e(Ce,{className:h(ot.Button__content,v?.content),children:t},"subtree-container")})}),H(o)&&e("span",{className:h(ot.Button__indicator,v?.indicator),children:(x=o,w=f,s(x)&&x.type===ct?r(x,{...ut(w)}):x)}),H(_)&&e("span",{className:h(ot.Button__iconAfter,v?.iconAfter),children:_}),T&&!S&&e(Te,{className:ot.Button__ripple})]});var x,w});mt.displayName="Button";var ht={CellAction:"CellAction__vzN",CellAction_mode_primary:"CellAction_mode_primary__vZQ",CellAction_disabled:"CellAction_disabled__VZA",CellAction_mode_secondary:"CellAction_mode_secondary__AJk",CellAction_mode_themed:"CellAction_mode_themed__-Gg",CellAction_mode_destructive:"CellAction_mode_destructive__ovY",CellAction_mode_custom:"CellAction_mode_custom__3T8",CellAction_height_compact:"CellAction_height_compact__ysc",CellAction_height_normal:"CellAction_height_normal__ELj",CellAction__before:"CellAction__before__oZm",CellAction__content:"CellAction__content__Uib",CellAction__chevron:"CellAction__chevron__6SI"};const vt=l((a,n)=>{const{className:r,before:l,children:i,innerClassNames:_,asChild:o=!1,mode:s="primary",height:c="normal",showChevron:p=!1,...d}=a,u=h(ht.CellAction,ht[`CellAction_mode_${s}`],ht[`CellAction_height_${c}`],{[ht.CellAction_disabled]:d.disabled},r);return t(De,{ref:n,className:u,asChild:o,as:"button",parentChildren:i,...d,children:[H(l)&&e("span",{className:h(ht.CellAction__before,_?.before),children:l}),e(Q,{children:j({options:{asChild:o,children:i},content:t=>e("span",{className:h(ht.CellAction__content,_?.content),children:t},"subtree-container")})}),p&&e(f,{className:h(ht.CellAction__chevron,_?.chevron)})]})});vt.displayName="CellAction";var yt={CellHeader:"CellHeader__Epf",CellHeader_titleStyle_caps:"CellHeader_titleStyle_caps__nfB",CellHeader__content:"CellHeader__content__El-",CellHeader_titleStyle_normal:"CellHeader_titleStyle_normal__M-p",CellHeader_fullWidth:"CellHeader_fullWidth__h2Y",CellHeader__after:"CellHeader__after__RXN"};const gt=l((a,n)=>{const{className:r,titleStyle:l="caps",fullWidth:i=!1,children:_,after:o,innerClassNames:s,...c}=a,p=h(yt.CellHeader,yt[`CellHeader_titleStyle_${l}`],{[yt.CellHeader_fullWidth]:i},r);return t("div",{ref:n,className:p,...c,children:[H(_)&&e("div",{className:h(yt.CellHeader__content,s?.content),children:_}),H(o)&&e("div",{className:h(yt.CellHeader__after,s?.after),children:o})]})});gt.displayName="CellHeader";var ft={CellInput:"CellInput__92-",CellInput_disabled:"CellInput_disabled__fZ7",CellInput__input:"CellInput__input__gQ3",CellInput_height_compact:"CellInput_height_compact__Mv2",CellInput_height_normal:"CellInput_height_normal__ovc",CellInput__before:"CellInput__before__Hkm",CellInput__body:"CellInput__body__Egp",CellInput__clearButton:"CellInput__clearButton__znK"};const Ct=l((a,n)=>{const{className:r,height:l="normal",before:i,innerClassNames:_,disabled:o,...s}=a,c=h(ft.CellInput,ft[`CellInput_height_${l}`],{[ft.CellInput_disabled]:o},r);return t("label",{className:c,children:[H(i)&&e(Ce,{className:h(ft.CellInput__before,_?.before),maxLines:1,children:i}),e(me,{ref:n,className:h(ft.CellInput__body,_?.body),innerClassNames:{input:h(ft.CellInput__input,_?.input),clearButton:h(ft.CellInput__clearButton,_?.clearButton)},type:"text",disabled:o,...s})]})});Ct.displayName="CellInput";var bt={CellList:"CellList__1ou",CellList_filled:"CellList_filled__ikE",CellList__body:"CellList__body__ouS",CellList_mode_island:"CellList_mode_island__aCu"};const Nt=l((a,n)=>{const{className:r,header:l,children:i,mode:_="full-width",filled:o="island"===_,...s}=a,c=h(bt.CellList,bt[`CellList_mode_${_}`],{[bt.CellList_filled]:o},r);return t("div",{ref:n,className:c,...s,children:[H(l)&&e("div",{className:bt.CellList__header,children:l}),e("div",{className:bt.CellList__body,children:i})]})});Nt.displayName="CellList";var Bt={CellSimple:"CellSimple__n0z",CellSimple_disabled:"CellSimple_disabled__T-3",CellSimple__title:"CellSimple__title__aYs",CellSimple__overline:"CellSimple__overline__Ncr",CellSimple__link:"CellSimple__link__ie-",CellSimple_subtitle_secondary:"CellSimple_subtitle_secondary__3uL",CellSimple__subtitle:"CellSimple__subtitle__oIF",CellSimple_subtitle_tertiary:"CellSimple_subtitle_tertiary__lz0",CellSimple_height_compact:"CellSimple_height_compact__HUQ",CellSimple_height_normal:"CellSimple_height_normal__pxj",CellSimple__before:"CellSimple__before__5Q9",CellSimple__after:"CellSimple__after__2FK",CellSimple__content:"CellSimple__content__SOk",CellSimple__chevron:"CellSimple__chevron__cSs",CellSimple_separator:"CellSimple_separator__aOX"};const It=l((a,n)=>{const{className:r,title:l,subtitle:i,subtitleMode:_="secondary",before:o,after:s,children:c,overline:p,showChevron:d=!1,asChild:u=!1,disabled:m=!1,innerClassNames:v,height:y="normal",as:g="div",separator:C,link:b,...N}=a,B=h(Bt.CellSimple,Bt[`CellSimple_height_${y}`],Bt[`CellSimple_subtitle_${_}`],{[Bt.CellSimple_disabled]:m,[Bt.CellSimple_separator]:C},r);return t(De,{ref:n,className:B,asChild:u,as:g,parentChildren:c,...N,children:[H(o)&&e("div",{className:h(Bt.CellSimple__before,v?.before),children:o}),e(Q,{children:j({options:{asChild:u,children:c},content:a=>t("div",{className:h(Bt.CellSimple__content,v?.content),children:[H(p)&&e("div",{className:h(Bt.CellSimple__overline,v?.overline),children:p}),H(l)&&e("div",{className:h(Bt.CellSimple__title,v?.title),children:l}),H(i)&&e("div",{className:h(Bt.CellSimple__subtitle,v?.subtitle),children:i}),a,b&&e("a",{className:h(Bt.CellSimple__link,v?.link),href:b,target:"_blank",rel:"noreferrer",children:b})]},"subtree-container")})}),(H(s)||d)&&t("div",{className:h(Bt.CellSimple__after,v?.after),children:[s,d&&e(f,{className:h(Bt.CellSimple__chevron,v?.chevron)})]})]})});It.displayName="CellSimple";const St=e=>{switch(e){case"xsmall":return 16;case"small":case"medium":return 20;case"large":return 24}},Tt=e=>{switch(e){case"primary":case"destructive":case"overlay":return"contrast-static";case"secondary":case"ghost":return"primary";case"primary-contrast":case"secondary-contrast":return"primary-static"}};var At={IconButton:"IconButton__KCr",IconButton_loading:"IconButton_loading__RxW",IconButton__content:"IconButton__content__dCL",IconButton_disabled:"IconButton_disabled__SZj",IconButton_activeMode_ripple:"IconButton_activeMode_ripple__asi",IconButton_activeMode_highlight:"IconButton_activeMode_highlight__h15",IconButton_size_xsmall:"IconButton_size_xsmall__G5T",IconButton_size_small:"IconButton_size_small__e3f",IconButton_size_medium:"IconButton_size_medium__MQQ",IconButton_size_large:"IconButton_size_large__9oz",IconButton_variant_primary:"IconButton_variant_primary__-4n",IconButton_variant_secondary:"IconButton_variant_secondary__dFi",IconButton_variant_ghost:"IconButton_variant_ghost__jvE","IconButton_variant_primary-contrast":"IconButton_variant_primary-contrast__O-T","IconButton_variant_secondary-contrast":"IconButton_variant_secondary-contrast__uNH",IconButton_variant_overlay:"IconButton_variant_overlay__vJc",IconButton_variant_destructive:"IconButton_variant_destructive__9rk",IconButton__spinnerContainer:"IconButton__spinnerContainer__9--",IconButton__ripple:"IconButton__ripple__l8M"};const xt=l((a,n)=>{const{children:r,className:l,disabled:i,innerClassNames:_,loading:o,asChild:s=!1,size:c="medium",variant:p="primary",...d}=a,u="button",m=s?q:u,v=ze(),y=Ae({asChild:s,children:r,disabled:i,rootElement:u,loading:o}),g=i||o,f="android"===v,C=h(At.IconButton,At[`IconButton_variant_${p}`],At[`IconButton_size_${c}`],{[At.IconButton_loading]:o,[At.IconButton_disabled]:i,[At.IconButton_activeMode_highlight]:!g&&!f,[At.IconButton_activeMode_ripple]:!g&&f},l);return t(m,{ref:n,className:C,...y,...d,children:[o&&e("span",{className:h(At.IconButton__spinnerContainer,_?.spinnerContainer),children:e(_t,{className:h(_?.spinner),size:St(c),appearance:Tt(p)})}),e(Q,{children:j({options:{asChild:s,children:r},content:t=>e("span",{className:h(At.IconButton__content,_?.content),children:t},"subtree-container")})}),f&&!g&&e(Te,{className:At.IconButton__ripple})]})});xt.displayName="IconButton";var wt={Input:"Input__A3w",Input_disabled:"Input_disabled__mpt",Input_size_medium:"Input_size_medium__EjC",Input_size_large:"Input_size_large__8OF",Input_mode_default:"Input_mode_default__ncX",Input_mode_contrast:"Input_mode_contrast__EIY",Input__body:"Input__body__sVJ",Input__iconBefore:"Input__iconBefore__gxx",Input__iconAfter:"Input__iconAfter__jL1",Input__clearButton:"Input__clearButton__nKe",Input__input:"Input__input__gy5",Input__hint:"Input__hint__dE5"};const Lt=l((a,n)=>{const{className:r,innerClassNames:l,withClearButton:i,iconBefore:_,iconAfter:o,size:s="large",mode:c="primary",hint:p,...d}=a,u=h(wt.Input,wt[`Input_mode_${c}`],wt[`Input_size_${s}`],{[wt.Input_disabled]:d.disabled},r);return t("div",{className:h(l?.container),children:[t("label",{className:u,children:[H(_)&&e("div",{className:h(wt.Input__iconBefore,l?.iconBefore),children:_}),e(me,{ref:n,className:h(wt.Input__body,l?.body),withClearButton:i,innerClassNames:{input:h(wt.Input__input,l?.input),clearButton:h(wt.Input__clearButton,l?.clearButton)},...d}),H(o)&&e("div",{className:h(wt.Input__iconAfter,l?.iconAfter),children:o})]}),H(p)&&e("div",{className:h(wt.Input__hint,l?.hint),children:p})]})});Lt.displayName="Input";var zt={MaxUI:"MaxUI__g7Q",MaxUI_platform_ios:"MaxUI_platform_ios__gAV",MaxUI_platform_android:"MaxUI_platform_android__m3U",MaxUI_colorScheme_light:"MaxUI_colorScheme_light__Woo",MaxUI_colorScheme_dark:"MaxUI_colorScheme_dark__jFq"};const Et=d({platform:"ios",colorScheme:"light"}),Ot=()=>u(Et),Mt=l((t,a)=>{const{children:n,className:r,colorScheme:l,platform:i=(P()?"ios":"android")}=t,_=Ee({listenChanges:!l}),o=l??_,s=c(()=>({colorScheme:o,platform:i}),[o,i]),p=h(zt.MaxUI,zt[`MaxUI_colorScheme_${o}`],zt[`MaxUI_platform_${i}`],r);return e(Et.Provider,{value:s,children:e("div",{ref:a,className:p,children:n})})});Mt.displayName="MaxUI";var kt={Switch:"Switch__-vj",Switch__toggle:"Switch__toggle__WU2",Switch__thumb:"Switch__thumb__jlX",Switch__input:"Switch__input__EDr",Switch_platform_ios:"Switch_platform_ios__B-C",Switch_platform_android:"Switch_platform_android__72T"};const jt=l((a,n)=>{const{className:r,...l}=a,i=ze(),_=h(kt.Switch,kt[`Switch_platform_${i}`],r);return t("span",{className:_,children:[e("input",{ref:n,type:"checkbox",role:"switch",className:kt.Switch__input,...l}),e("span",{className:kt.Switch__toggle,children:e("span",{className:kt.Switch__thumb})})]})});jt.displayName="Switch";var Ht={Textarea:"Textarea__Sy6",Textarea_disabled:"Textarea_disabled__uY3",Textarea_mode_primary:"Textarea_mode_primary__E7l",Textarea_mode_secondary:"Textarea_mode_secondary__BYw",Textarea__textarea:"Textarea__textarea__Ok-"};const Pt=l((t,a)=>{const{className:n,innerClassNames:r,mode:l="primary",...i}=t,_=h(Ht.Textarea,Ht[`Textarea_mode_${l}`],{[Ht.Textarea_disabled]:i.disabled},n);return e("div",{className:_,children:e("textarea",{ref:a,className:h(Ht.Textarea__textarea,r?.textarea),...i})})});Pt.displayName="Textarea";var Dt={TypographyAction_variant_large:"TypographyAction_variant_large__l5j",TypographyAction_variant_medium:"TypographyAction_variant_medium__9H-",TypographyAction_variant_small:"TypographyAction_variant_small__-LL",TypographyAction_variant_label:"TypographyAction_variant_label__vhv"};const $t=l((t,a)=>{const{className:n,variant:r="large",asChild:l,...i}=t,_=l?q:"span",o=h(Dt.TypographyAction,Dt[`TypographyAction_variant_${r}`],n);return e(_,{ref:a,className:o,...i})});$t.displayName="TypographyAction";var Ut={TypographyBody_variant_large:"TypographyBody_variant_large__vlS",TypographyBody_variant_medium:"TypographyBody_variant_medium__9v3",TypographyBody_variant_small:"TypographyBody_variant_small__beJ","TypographyBody_variant_small-strong":"TypographyBody_variant_small-strong__mWy","TypographyBody_variant_small-caps":"TypographyBody_variant_small-caps__18r"};const Rt=l((t,a)=>{const{className:n,variant:r="large-strong",asChild:l,...i}=t,_=l?q:"span",o=h(Ut.TypographyBody,Ut[`TypographyBody_variant_${r}`],n);return e(_,{ref:a,className:o,...i})});Rt.displayName="TypographyBody";var Yt="TypographyDisplay__6MW";const Wt=l((t,a)=>{const{className:n,asChild:r,...l}=t;return e(r?q:"span",{ref:a,className:h(Yt,n),...l})});Wt.displayName="TypographyDisplay";var Ft={"TypographyHeadline_variant_large-strong":"TypographyHeadline_variant_large-strong__mwz",TypographyHeadline_variant_medium:"TypographyHeadline_variant_medium__s92","TypographyHeadline_variant_medium-strong":"TypographyHeadline_variant_medium-strong__dFT",TypographyHeadline_variant_small:"TypographyHeadline_variant_small__8Ei","TypographyHeadline_variant_small-strong":"TypographyHeadline_variant_small-strong__kUR"};const Gt=l((t,a)=>{const{className:n,variant:r="large-strong",asChild:l,...i}=t,_=l?q:"span",o=h(Ft.TypographyHeadline,Ft[`TypographyHeadline_variant_${r}`],n);return e(_,{ref:a,className:o,...i})});Gt.displayName="TypographyHeadline";var Xt={TypographyLabel_variant_large:"TypographyLabel_variant_large__6vr","TypographyLabel_variant_large-strong":"TypographyLabel_variant_large-strong__uCg","TypographyLabel_variant_large-caps":"TypographyLabel_variant_large-caps__b1i",TypographyLabel_variant_medium:"TypographyLabel_variant_medium__Xo5","TypographyLabel_variant_medium-strong":"TypographyLabel_variant_medium-strong__Bk8","TypographyLabel_variant_small-strong":"TypographyLabel_variant_small-strong__qCw","TypographyLabel_variant_small-caps":"TypographyLabel_variant_small-caps__beb"};const Zt=l((t,a)=>{const{className:n,variant:r="large",asChild:l,...i}=t,_=l?q:"span",o=h(Xt.TypographyLabel,Xt[`TypographyLabel_variant_${r}`],n);return e(_,{ref:a,className:o,...i})});Zt.displayName="TypographyLabel";var qt={"TypographyTitle_variant_large-strong":"TypographyTitle_variant_large-strong__9PL","TypographyTitle_variant_medium-strong":"TypographyTitle_variant_medium-strong__th0",TypographyTitle_variant_small:"TypographyTitle_variant_small__zJR","TypographyTitle_variant_small-strong":"TypographyTitle_variant_small-strong__BrE"};const Vt=l((t,a)=>{const{className:n,variant:r="large-strong",asChild:l,...i}=t,_=l?q:"span",o=h(qt.TypographyTitle,qt[`TypographyTitle_variant_${r}`],n);return e(_,{ref:a,className:o,...i})});Vt.displayName="TypographyTitle";const Jt=Object.assign({},{Display:Wt,Headline:Gt,Title:Vt,Body:Rt,Label:Zt,Action:$t});export{nt as Avatar,mt as Button,vt as CellAction,gt as CellHeader,Ct as CellInput,Nt as CellList,It as CellSimple,ct as Counter,f as Icon16Chevron,N as Icon16CloseIos,S as Icon16SearchOutline,w as Icon20CloseAndroid,E as Icon20CloseFilled,M as Icon24CloseAndroid,xt as IconButton,Lt as Input,Mt as MaxUI,Et as MaxUIContext,q as Slot,Q as Slottable,_t as Spinner,jt as Switch,Pt as Textarea,Jt as Typography,j as getSubtree,H as hasReactNode,D as mergeRefs,Ot as useAppearance,Ae as useButtonLikeProps,xe as useCallbackRef,we as useColorScheme,Le as useImageLoadingStatus,ze as usePlatform,Ee as useSystemColorScheme};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{Children as n,cloneElement as r,forwardRef as l,useRef as i,useState as _,useEffect as o,isValidElement as s,useMemo as c,useLayoutEffect as p,createContext as d,useContext as u}from"react";function m(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=m(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}function h(){for(var e,t,a=0,n="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=m(e))&&(n&&(n+=" "),n+=t);return n}var v;function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},y.apply(null,arguments)}var g,f=function(e){return a.createElement("svg",y({xmlns:"http://www.w3.org/2000/svg",width:12,height:16,fill:"none"},e),v||(v=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.934 3.434a.8.8 0 0 1 1.132 0l4 4a.8.8 0 0 1 0 1.132l-4 4a.8.8 0 0 1-1.132-1.132L6.37 8 2.934 4.566a.8.8 0 0 1 0-1.132",clipRule:"evenodd"})))};function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},C.apply(null,arguments)}var b,N=function(e){return a.createElement("svg",C({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),g||(g=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16M5.566 4.434a.8.8 0 1 0-1.132 1.132L6.87 8l-2.435 2.434a.8.8 0 0 0 1.132 1.132L8 9.13l2.434 2.435a.8.8 0 0 0 1.132-1.132L9.13 8l2.435-2.434a.8.8 0 0 0-1.132-1.132L8 6.87z",clipRule:"evenodd"})))};function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},B.apply(null,arguments)}var I,S=function(e){return a.createElement("svg",B({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),b||(b=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.242 2.115c-2.605 0-4.677 2.044-4.677 4.517s2.072 4.517 4.677 4.517 4.677-2.044 4.677-4.517-2.072-4.517-4.677-4.517M1 6.632C1 3.252 3.817.55 7.242.55s6.242 2.701 6.242 6.082a5.97 5.97 0 0 1-1.692 4.165l3 3.247a.783.783 0 1 1-1.15 1.062l-3.074-3.326a6.34 6.34 0 0 1-3.326.935C3.817 12.715 1 10.013 1 6.632",clipRule:"evenodd"})))};function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},T.apply(null,arguments)}var A,x,w=function(e){return a.createElement("svg",T({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),I||(I=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.364 4.364a.9.9 0 0 1 1.272 0L10 8.727l4.364-4.363a.9.9 0 0 1 1.272 1.272L11.273 10l4.363 4.364a.9.9 0 0 1-1.272 1.272L10 11.273l-4.364 4.363a.9.9 0 0 1-1.272-1.272L8.727 10 4.364 5.636a.9.9 0 0 1 0-1.272",clipRule:"evenodd"})))};function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},L.apply(null,arguments)}var z,E=function(e){return a.createElement("svg",L({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),A||(A=a.createElement("circle",{cx:10,cy:10,r:10,fill:"currentColor"})),x||(x=a.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.364 5.364a.9.9 0 0 1 1.272 0L10 8.727l3.364-3.363a.9.9 0 0 1 1.272 1.272L11.274 10l3.364 3.364a.9.9 0 1 1-1.273 1.272L10 11.273l-3.364 3.363a.9.9 0 0 1-1.272-1.272L8.727 10 5.364 6.636a.9.9 0 0 1 0-1.272",clipRule:"evenodd"})))};function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},O.apply(null,arguments)}var M=function(e){return a.createElement("svg",O({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),z||(z=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.268 6.268a.915.915 0 0 1 1.294 0L12 10.706l4.438-4.438a.915.915 0 1 1 1.294 1.294L13.294 12l4.438 4.438a.915.915 0 1 1-1.294 1.294L12 13.294l-4.438 4.438a.915.915 0 1 1-1.294-1.294L10.706 12 6.268 7.562a.915.915 0 0 1 0-1.294",clipRule:"evenodd"})))};const k=e=>"string"==typeof e?e:`${e}px`,j=e=>{const{options:t,content:a}=e,{asChild:l,children:i}=t;if(!l)return"function"==typeof a?a(i):a;const _=n.only(i);return r(_,{children:"function"==typeof a?a(_.props.children):a})},H=e=>void 0!==e&&!1!==e&&null!==e&&""!==e,P=()=>!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g),D=(...e)=>{const t=e.filter(Boolean);if(t.length<=1){return t[0]??null}return e=>{for(const a of t)"function"==typeof a?a(e):a&&(a.current=e)}},$=()=>{};var U=Object.defineProperty,R=(e,t)=>U(e,"name",{value:t,configurable:!0});function Y(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function W(...e){return t=>{let a=!1;const n=e.map(e=>{const n=Y(e,t);return a||"function"!=typeof n||(a=!0),n});if(a)return()=>{for(let t=0;t<n.length;t++){const a=n[t];"function"==typeof a?a():Y(e[t],null)}}}}function F(...e){return a.useCallback(W(...e),e)}R(Y,"setRef"),R(W,"composeRefs"),R(F,"useComposedRefs");var G=Object.defineProperty,X=(e,t)=>G(e,"name",{value:t,configurable:!0});function Z(e){const t=a.forwardRef((t,n)=>{let{children:r,...l}=t,i=null,_=!1;const o=[];re(r)&&"function"==typeof oe&&(r=oe(r._payload)),a.Children.forEach(r,e=>{if(ae(e)){_=!0;const t=e;let a="child"in t.props?t.props.child:t.props.children;re(a)&&"function"==typeof oe&&(a=oe(a._payload)),i=K(t,a),o.push(i?.props?.children)}else o.push(e)}),i?i=a.cloneElement(i,void 0,o):!_&&1===a.Children.count(r)&&a.isValidElement(r)&&(i=r);const s=i?te(i):void 0,c=F(n,s);if(!i){if(r||0===r)throw new Error(_?_e(e):ie(e));return r}const p=ee(l,i.props??{});return i.type!==a.Fragment&&(p.ref=n?c:s),a.cloneElement(i,p)});return t.displayName=`${e}.Slot`,t}X(Z,"createSlot");var q=Z("Slot"),V=Symbol.for("radix.slottable");function J(e){const t=X(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=V,t}X(J,"createSlottable");var Q=J("Slottable"),K=X((e,t)=>{if("child"in e.props){const t=e.props.child;return a.isValidElement(t)?a.cloneElement(t,void 0,e.props.children(t.props.children)):null}return a.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function ee(e,t){const a={...t};for(const n in t){const r=e[n],l=t[n];/^on[A-Z]/.test(n)?r&&l?a[n]=(...e)=>{const t=l(...e);return r(...e),t}:r&&(a[n]=r):"style"===n?a[n]={...r,...l}:"className"===n&&(a[n]=[r,l].filter(Boolean).join(" "))}return{...e,...a}}function te(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}function ae(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===V}X(ee,"mergeProps"),X(te,"getElementRef"),X(ae,"isSlottable");var ne=Symbol.for("react.lazy");function re(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===ne&&"_payload"in e&&le(e._payload)}function le(e){return"object"==typeof e&&null!==e&&"then"in e}X(re,"isLazyComponent"),X(le,"isPromiseLike");var ie=X(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),_e=X(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),oe=a[" use ".trim().toString()],se="SvgButton__-Jm";const ce=l((t,a)=>{const{className:n,asChild:r,...l}=t;return e(r?q:"button",{ref:a,className:h(se,n),...l})});ce.displayName="SvgButton";var pe="ClearableInput__4PN",de="ClearableInput__button__iUo",ue="ClearableInput__count__K7Z";const me=l((a,n)=>{const{className:r,onChange:l,innerClassNames:o,withClearButton:s=!0,disabled:c,count:p,...d}=a,u=i(null),[m,v]=_(!d.value&&!d.defaultValue);return t("span",{className:h(pe,r),children:[e("input",{ref:D(u,n),className:h(o?.input),onChange:e=>{l?.(e),v(!e.target.value)},disabled:c,...d}),!m&&!c&&!!p&&e("div",{className:h(ue,o?.count),children:p}),!m&&!c&&s&&e(ce,{className:h(de,o?.clearButton),onClick:()=>{u.current&&(e=>{const{el:t,value:a}=e,n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;n?.call(t,a);const r=new Event("input",{bubbles:!0});t.dispatchEvent(r)})({el:u.current,value:""})},"aria-label":"Очистить",children:e(N,{})})]})});me.displayName="ClearableInput";var he="Container__yZR",ve="Container_fullWidth__2tY";const ye=l((t,a)=>{const{className:n,asChild:r,fullWidth:l,...i}=t,_=r?q:"div",o=h(he,{[ve]:l},n);return e(_,{ref:a,className:o,...i})});ye.displayName="Container";var ge="EllipsisText__DEC",fe="EllipsisText_multiline__y4t",Ce="EllipsisText_singleLine__Arf";const be=l((t,a)=>{const{className:n,maxLines:r=1,style:l,asChild:i,..._}=t,o=i?q:"span",s=h(ge,{[fe]:r>1,[Ce]:1===r},n);return e(o,{ref:a,className:s,style:{"--MaxUi-EllipsisText_linesCount":r,...l},..._})});be.displayName="EllipsisText";var Ne="Flex__pih";const Be=l((t,a)=>{const{className:n,display:r="flex",direction:l="row",align:i="flex-start",justify:_="start",asChild:o,wrap:s,style:c,gap:p,gapX:d,gapY:u,...m}=t;return e(o?q:"div",{ref:a,className:h(Ne,n),style:{flexDirection:l,justifyContent:_,alignItems:i,flexWrap:s,...c,display:r,"--MaxUi-Flex_gapX":k(d??p??0),"--MaxUi-Flex_gapY":k(u??p??0)},...m})});Be.displayName="Flex";var Ie="Grid__lFk";const Se=l((t,a)=>{const{className:n,style:r,display:l="grid",align:i="start",justify:_="start",gap:o,gapX:s,gapY:c,cols:p,rows:d,asChild:u,...m}=t;return e(u?q:"div",{ref:a,className:h(Ie,n),style:{justifyContent:_,alignItems:i,...r,display:l,"--MaxUi-Grid_gapX":k(s??o??0),"--MaxUi-Grid_gapY":k(c??o??0),"--MaxUi-Grid_cols":p??0,"--MaxUi-Grid_rows":d??0},...m})});Se.displayName="Grid";var Te={Panel:"Panel__XH0",Panel_centeredX:"Panel_centeredX__DG7",Panel_centeredY:"Panel_centeredY__f-k",Panel_mode_primary:"Panel_mode_primary__fNs",Panel_mode_secondary:"Panel_mode_secondary__Tez"};const Ae=l((t,a)=>{const{className:n,mode:r="primary",centeredX:l,centeredY:i,..._}=t,o=h(Te.Panel,Te[`Panel_mode_${r}`],{[Te.Panel_centeredX]:l,[Te.Panel_centeredY]:i},n);return e("div",{ref:a,className:o,..._})});Ae.displayName="Panel";var xe="Ripple__dJ9",we="Ripple_active__uv5";const Le=l((t,a)=>{const{className:n,...r}=t,l=i(null),_=i(null),s=e=>{const t=e.currentTarget.getBoundingClientRect();((e,t)=>{null!==_.current&&(_.current.classList.remove(we),_.current.style.top=t+"px",_.current.style.left=e+"px",_.current.classList.add(we))})(e.clientX-(t.left??0),e.clientY-(t.top??0))};return o(()=>{if(_.current)return l.current=_.current.parentElement,null!==l.current&&l.current.addEventListener("pointerdown",s),()=>{null!==l.current&&l.current?.removeEventListener("pointerdown",s)}},[]),e("span",{ref:D(a,_),role:"presentation","aria-hidden":!0,className:h(xe,n),onAnimationEnd:()=>{null!==_.current&&_.current.classList.remove(we)},...r})});Le.displayName="Ripple";const ze=e=>{const{asChild:t,children:a,rootElement:n,disabled:r,loading:l}=e;if(!t&&"button"===n){return{disabled:r,...l?{"aria-disabled":!0}:{}}}if(t&&s(a)){const{type:e}=a;if("a"===e){return{"aria-disabled":r??l,...r?{onClick:e=>{e.preventDefault()},tabIndex:-1}:{}}}}return{role:"button",tabIndex:r?-1:0,"aria-disabled":r??l,...r?{onClick:void 0}:{}}},Ee=e=>{const t=i(e);return o(()=>{t.current=e}),c(()=>(...e)=>t.current?.(...e),[])},Oe=()=>{const{colorScheme:e}=Ht();return e},Me=e=>{const{src:t,referrerPolicy:a}=e,[n,r]=_("idle");return p(()=>{if(!t)return void r("error");let e=!0;const n=new window.Image,l=t=>()=>{e&&r(t)};return r("loading"),n.onload=l("loaded"),n.onerror=l("error"),n.src=t,a&&(n.referrerPolicy=a),()=>{e=!1}},[t,a]),n},ke=()=>{const{platform:e}=Ht();return e},je=(e={})=>{const{listenChanges:t}=e,[a,n]=_(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),r=e=>{n(()=>e.matches?"dark":"light")};return o(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return n(()=>e.matches?"dark":"light"),t?(e.addEventListener("change",r),()=>{e.removeEventListener("change",r)}):$},[t]),a};var He="Tappable__O--",Pe="Tappable_interactive__4Uv",De="Tappable_disabled__0z8",$e="Tappable_activeMode_ripple__3k-",Ue="Tappable_activeMode_highlight__Hs-",Re="Tappable__ripple__Egr";const Ye=l((a,n)=>{const{className:r,disabled:l,asChild:i,children:_,as:o="div",...c}=a,p=i?q:o,d=ke(),u=ze({asChild:i,children:_,disabled:l,rootElement:o}),m=(({onClick:e,href:t,children:a,asChild:n,parentChildren:r=a})=>n?!(!n||!s(r))&&("href"in r.props||"onClick"in r.props):!!e||!!t)(a),v="android"===d&&m&&!l,y=h(He,{[Pe]:m,[De]:l,[Ue]:!v,[$e]:v},r);return t(p,{ref:n,className:y,...m?u:{},...c,children:[_,v&&e(Le,{className:Re})]})});Ye.displayName="Tappable";const We=d({size:48}),Fe=()=>u(We);var Ge={};const Xe=l((t,a)=>{const{className:n,onClick:r,...l}=t,{size:i}=Fe(),_=(e=>e<40?12:e<54?16:e<72?20:24)(i);return e(ce,{ref:a,className:h(Ge.AvatarCloseButton,n),onClick:e=>{e.preventDefault(),r?.(e)},...l,children:e(E,{width:_,height:_})})});Xe.displayName="AvatarCloseButton";var Ze={AvatarContainer:"AvatarContainer__7c-",AvatarContainer_form_circle:"AvatarContainer_form_circle__J44",AvatarContainer__content:"AvatarContainer__content__h8v",AvatarContainer_form_squircle:"AvatarContainer_form_squircle__1i0",AvatarContainer__overlay:"AvatarContainer__overlay__qul",AvatarContainer__rightBottomCorner:"AvatarContainer__rightBottomCorner__kZG",AvatarContainer__rightTopCorner:"AvatarContainer__rightTopCorner__y4y"};const qe=l((a,n)=>{const{className:r,style:l,children:i,overlay:_,rightTopCorner:o,rightBottomCorner:s,innerClassNames:c,size:p=48,asChild:d,form:u="circle",...m}=a,v=d?q:"div",y=h(Ze.AvatarContainer,Ze[`AvatarContainer_form_${u}`],r);return e(We.Provider,{value:{size:p},children:t(v,{ref:n,className:y,style:{"--MaxUi-AvatarContainer_size":`${p}px`,...l},...m,children:[e(Q,{children:j({options:{asChild:a.asChild,children:i},content:a=>t("span",{className:h(Ze.AvatarContainer__content,c?.content),children:[a,H(_)&&e("span",{className:h(Ze.AvatarContainer__overlay,c?.overlay),children:_})]},"subtree-container")})}),H(s)&&e("span",{className:h(Ze.AvatarContainer__rightBottomCorner,c?.rightBottomCorner),children:s}),H(o)&&e("span",{className:h(Ze.AvatarContainer__rightTopCorner,c?.rightTopCorner),children:o})]})})});qe.displayName="AvatarContainer";var Ve="AvatarIcon__ZUI";const Je=l((t,a)=>{const{className:n,...r}=t;return e("span",{ref:a,className:h(Ve,n),...r})});Je.displayName="AvatarIcon";var Qe={AvatarText:"AvatarText__DIj",AvatarText_gradient_red:"AvatarText_gradient_red__bnV",AvatarText_gradient_orange:"AvatarText_gradient_orange__Ngq",AvatarText_gradient_green:"AvatarText_gradient_green__n7Z",AvatarText_gradient_blue:"AvatarText_gradient_blue__gLu",AvatarText_gradient_purple:"AvatarText_gradient_purple__UsS",AvatarText__in:"AvatarText__in__cDg"};const Ke=e=>e<20?{fontSize:6}:e<28?{fontSize:8}:e<32?{fontSize:10}:e<36?{fontSize:11}:e<40?{fontSize:13}:e<48?{fontSize:14}:e<54?{fontSize:17}:e<64?{fontSize:18}:e<72?{fontSize:21}:e<88?{fontSize:26}:{fontSize:30},et=l((t,a)=>{const{className:n,children:r,gradient:l="red",...i}=t,{size:_}=Fe(),o=h(Qe.AvatarText,{[Qe[`AvatarText_gradient_${l}`]]:"custom"!==l},n);return e("span",{ref:a,className:o,...i,children:e("span",{className:Qe.AvatarText__in,style:Ke(_),children:r})})});et.displayName="AvatarText";var tt="AvatarImage__H7-";const at=l((t,a)=>{const{className:n,fallback:r,fallbackGradient:l="red",...i}=t,[o,s]=_("idle"),c=Me({src:i.src??i.srcSet,referrerPolicy:i.referrerPolicy}),d=Ee(e=>{s(e)});return p(()=>{"idle"!==c&&d(c)},[c,d]),"error"===o?e(et,{gradient:l,children:r}):e("img",{ref:a,className:h(tt,n),...i})});at.displayName="AvatarImage";var nt={AvatarOnlineDot:"AvatarOnlineDot__-GT",AvatarOnlineDot_size_xs:"AvatarOnlineDot_size_xs__2SY",AvatarOnlineDot__dot:"AvatarOnlineDot__dot__8dL",AvatarOnlineDot_size_s:"AvatarOnlineDot_size_s__T1u",AvatarOnlineDot_size_m:"AvatarOnlineDot_size_m__ris",AvatarOnlineDot_size_l:"AvatarOnlineDot_size_l__zo4"};const rt=l((t,a)=>{const{className:n,...r}=t,{size:l}=Fe(),i=(e=>e<40?"xs":e<54?"s":e<72?"m":"l")(l),_=h(nt.AvatarOnlineDot,nt[`AvatarOnlineDot_size_${i}`],n);return l<16||l>80?null:e("span",{ref:a,className:_,...r,children:e("span",{className:nt.AvatarOnlineDot__dot})})});rt.displayName="AvatarOnlineDot";var lt="AvatarOverlay__-nV";const it=l((t,a)=>{const{className:n,onClick:r,...l}=t;return e("span",{ref:a,className:h(lt,n),onClick:e=>{e.preventDefault(),r?.(e)},...l})});it.displayName="AvatarOverlay";const _t=Object.assign({},{Container:qe,Image:at,Overlay:it,Icon:Je,Text:et,OnlineDot:rt,CloseButton:Xe});var ot={Spinner:"Spinner__piy",Spinner_appearance_primary:"Spinner_appearance_primary__mxz",Spinner_appearance_themed:"Spinner_appearance_themed__-9S","Spinner_appearance_primary-static":"Spinner_appearance_primary-static__JxW",Spinner_appearance_contrast:"Spinner_appearance_contrast__Mv6","Spinner_appearance_contrast-static":"Spinner_appearance_contrast-static__rM7",Spinner_appearance_negative:"Spinner_appearance_negative__eMf","Spinner_appearance_neutral-themed":"Spinner_appearance_neutral-themed__D8F",androidSpinner:"androidSpinner__w-L",rotation:"rotation__CUP",iosSpinner:"iosSpinner__3q2",bar:"bar__aHj",fade:"fade__2ZD"};const st=({size:t})=>e("div",{className:ot.androidSpinner,style:{width:t,height:t}}),ct=({size:t})=>e("div",{className:ot.iosSpinner,style:{width:t,height:t},children:Array.from({length:8},(t,a)=>e("div",{className:ot.bar},a))}),pt=l((t,a)=>{const{className:n,size:r=20,appearance:l="primary",...i}=t,_=ke(),o=h(ot.Spinner,ot[`Spinner_appearance_${l}`],n);return e("span",{ref:a,role:"status",className:o,...i,children:e("ios"===_?ct:st,{size:r})})});pt.displayName="Spinner";var dt={Button:"Button__0OJ",Button_loading:"Button_loading__LD-",Button__iconBefore:"Button__iconBefore__BUe",Button__content:"Button__content__vnq",Button__indicator:"Button__indicator__HuA",Button__iconAfter:"Button__iconAfter__VhZ",Button_disabled:"Button_disabled__jkY",Button_stretched:"Button_stretched__mzq",Button_activeMode_ripple:"Button_activeMode_ripple__E5Y",Button_activeMode_highlight:"Button_activeMode_highlight__K3j",Button_size_xsmall:"Button_size_xsmall__QCm",Button_size_small:"Button_size_small__LLG",Button_size_medium:"Button_size_medium__fI9",Button_size_large:"Button_size_large__S2-",Button_variant_primary:"Button_variant_primary__yLL",Button_variant_secondary:"Button_variant_secondary__DR6",Button_variant_ghost:"Button_variant_ghost__EkG","Button_variant_primary-contrast":"Button_variant_primary-contrast__b63","Button_variant_secondary-contrast":"Button_variant_secondary-contrast__cey",Button_variant_overlay:"Button_variant_overlay__keO",Button_variant_destructive:"Button_variant_destructive__2Ug",Button__spinnerContainer:"Button__spinnerContainer__G4I",Button__ripple:"Button__ripple__jw0"},ut={Counter:"Counter__0Oj",Counter_variant_primary:"Counter_variant_primary__8Mz","Counter_variant_primary-contrast":"Counter_variant_primary-contrast__yFz",Counter_variant_attention:"Counter_variant_attention__IWH","Counter_variant_attention-contrast":"Counter_variant_attention-contrast__LHu",Counter_variant_promo:"Counter_variant_promo__9kD",Counter_variant_static:"Counter_variant_static__d8Y","Counter_variant_static-contrast":"Counter_variant_static-contrast__bAq",Counter_variant_default:"Counter_variant_default__weZ",Counter_variant_mute:"Counter_variant_mute__2SU",Counter_variant_menu:"Counter_variant_menu__qf0"};const mt=l((t,a)=>{const{className:n,value:r,rounded:l,variant:i="primary",..._}=t,o=h(ut.Counter,ut[`Counter_variant_${i}`],n),s=c(()=>l?Intl.NumberFormat("en",{notation:"compact"}).format(r):r,[l,r]);return e("span",{ref:a,className:o,..._,children:s})});mt.displayName="Counter";const ht=e=>{switch(e){case"xsmall":return 16;case"small":case"medium":return 20;case"large":return 24}},vt=e=>{switch(e){case"primary":case"destructive":case"overlay":return"contrast-static";case"secondary":return"primary";case"ghost":return"themed";case"primary-contrast":case"secondary-contrast":return"primary-static"}},yt=e=>{switch(e){case"primary":return{variant:"primary-contrast"};case"secondary":case"ghost":case"primary-contrast":case"secondary-contrast":return{variant:"static"};case"overlay":return{variant:"static-contrast"};case"destructive":return{variant:"attention-contrast"}}},gt=l((a,n)=>{const{className:l,iconBefore:i,iconAfter:_,indicator:o,children:c,onClick:p,loading:d,disabled:u=!1,asChild:m=!1,innerClassNames:v,stretched:y=!1,size:g="medium",variant:f="primary",...C}=a,b="button",N=m?q:b,B=ke(),I=ze({asChild:m,children:c,disabled:u,rootElement:b,loading:d}),S=u||d,T="android"===B,A=h(dt.Button,dt[`Button_variant_${f}`],dt[`Button_size_${g}`],{[dt.Button_loading]:d,[dt.Button_disabled]:u,[dt.Button_stretched]:y,[dt.Button_activeMode_highlight]:!S&&!T,[dt.Button_activeMode_ripple]:!S&&T},l);return t(N,{ref:n,className:A,onClick:e=>{d?e.preventDefault():p?.(e)},...I,...C,children:[H(i)&&e("span",{className:h(dt.Button__iconBefore,v?.iconBefore),children:i}),d&&e("span",{className:h(dt.Button__spinnerContainer,v?.spinnerContainer),children:e(pt,{className:h(v?.spinner),size:ht(g),appearance:vt(f)})}),e(Q,{children:j({options:{asChild:m,children:c},content:t=>e(be,{className:h(dt.Button__content,v?.content),children:t},"subtree-container")})}),H(o)&&e("span",{className:h(dt.Button__indicator,v?.indicator),children:(x=o,w=f,s(x)&&x.type===mt?r(x,{...yt(w)}):x)}),H(_)&&e("span",{className:h(dt.Button__iconAfter,v?.iconAfter),children:_}),T&&!S&&e(Le,{className:dt.Button__ripple})]});var x,w});gt.displayName="Button";var ft={CellAction:"CellAction__vzN",CellAction_mode_primary:"CellAction_mode_primary__vZQ",CellAction_disabled:"CellAction_disabled__VZA",CellAction_mode_secondary:"CellAction_mode_secondary__AJk",CellAction_mode_themed:"CellAction_mode_themed__-Gg",CellAction_mode_destructive:"CellAction_mode_destructive__ovY",CellAction_mode_custom:"CellAction_mode_custom__3T8",CellAction_height_compact:"CellAction_height_compact__ysc",CellAction_height_normal:"CellAction_height_normal__ELj",CellAction__before:"CellAction__before__oZm",CellAction__content:"CellAction__content__Uib",CellAction__chevron:"CellAction__chevron__6SI"};const Ct=l((a,n)=>{const{className:r,before:l,children:i,innerClassNames:_,asChild:o=!1,mode:s="primary",height:c="normal",showChevron:p=!1,...d}=a,u=h(ft.CellAction,ft[`CellAction_mode_${s}`],ft[`CellAction_height_${c}`],{[ft.CellAction_disabled]:d.disabled},r);return t(Ye,{ref:n,className:u,asChild:o,as:"button",parentChildren:i,...d,children:[H(l)&&e("span",{className:h(ft.CellAction__before,_?.before),children:l}),e(Q,{children:j({options:{asChild:o,children:i},content:t=>e("span",{className:h(ft.CellAction__content,_?.content),children:t},"subtree-container")})}),p&&e(f,{className:h(ft.CellAction__chevron,_?.chevron)})]})});Ct.displayName="CellAction";var bt={CellHeader:"CellHeader__Epf",CellHeader_titleStyle_caps:"CellHeader_titleStyle_caps__nfB",CellHeader__content:"CellHeader__content__El-",CellHeader_titleStyle_normal:"CellHeader_titleStyle_normal__M-p",CellHeader_fullWidth:"CellHeader_fullWidth__h2Y",CellHeader__after:"CellHeader__after__RXN"};const Nt=l((a,n)=>{const{className:r,titleStyle:l="caps",fullWidth:i=!1,children:_,after:o,innerClassNames:s,...c}=a,p=h(bt.CellHeader,bt[`CellHeader_titleStyle_${l}`],{[bt.CellHeader_fullWidth]:i},r);return t("div",{ref:n,className:p,...c,children:[H(_)&&e("div",{className:h(bt.CellHeader__content,s?.content),children:_}),H(o)&&e("div",{className:h(bt.CellHeader__after,s?.after),children:o})]})});Nt.displayName="CellHeader";var Bt={CellInput:"CellInput__92-",CellInput_disabled:"CellInput_disabled__fZ7",CellInput__input:"CellInput__input__gQ3",CellInput_height_compact:"CellInput_height_compact__Mv2",CellInput_height_normal:"CellInput_height_normal__ovc",CellInput__before:"CellInput__before__Hkm",CellInput__body:"CellInput__body__Egp",CellInput__clearButton:"CellInput__clearButton__znK"};const It=l((a,n)=>{const{className:r,height:l="normal",before:i,innerClassNames:_,disabled:o,...s}=a,c=h(Bt.CellInput,Bt[`CellInput_height_${l}`],{[Bt.CellInput_disabled]:o},r);return t("label",{className:c,children:[H(i)&&e(be,{className:h(Bt.CellInput__before,_?.before),maxLines:1,children:i}),e(me,{ref:n,className:h(Bt.CellInput__body,_?.body),innerClassNames:{input:h(Bt.CellInput__input,_?.input),clearButton:h(Bt.CellInput__clearButton,_?.clearButton)},type:"text",disabled:o,...s})]})});It.displayName="CellInput";var St={CellList:"CellList__1ou",CellList_filled:"CellList_filled__ikE",CellList__body:"CellList__body__ouS",CellList_mode_island:"CellList_mode_island__aCu"};const Tt=l((a,n)=>{const{className:r,header:l,children:i,mode:_="full-width",filled:o="island"===_,...s}=a,c=h(St.CellList,St[`CellList_mode_${_}`],{[St.CellList_filled]:o},r);return t("div",{ref:n,className:c,...s,children:[H(l)&&e("div",{className:St.CellList__header,children:l}),e("div",{className:St.CellList__body,children:i})]})});Tt.displayName="CellList";var At={CellSimple:"CellSimple__n0z",CellSimple_disabled:"CellSimple_disabled__T-3",CellSimple__title:"CellSimple__title__aYs",CellSimple__overline:"CellSimple__overline__Ncr",CellSimple__link:"CellSimple__link__ie-",CellSimple_subtitle_secondary:"CellSimple_subtitle_secondary__3uL",CellSimple__subtitle:"CellSimple__subtitle__oIF",CellSimple_subtitle_tertiary:"CellSimple_subtitle_tertiary__lz0",CellSimple_height_compact:"CellSimple_height_compact__HUQ",CellSimple_height_normal:"CellSimple_height_normal__pxj",CellSimple__before:"CellSimple__before__5Q9",CellSimple__after:"CellSimple__after__2FK",CellSimple__content:"CellSimple__content__SOk",CellSimple__chevron:"CellSimple__chevron__cSs",CellSimple_separator:"CellSimple_separator__aOX"};const xt=l((a,n)=>{const{className:r,title:l,subtitle:i,subtitleMode:_="secondary",before:o,after:s,children:c,overline:p,showChevron:d=!1,asChild:u=!1,disabled:m=!1,innerClassNames:v,height:y="normal",as:g="div",separator:C,link:b,...N}=a,B=h(At.CellSimple,At[`CellSimple_height_${y}`],At[`CellSimple_subtitle_${_}`],{[At.CellSimple_disabled]:m,[At.CellSimple_separator]:C},r);return t(Ye,{ref:n,className:B,asChild:u,as:g,parentChildren:c,...N,children:[H(o)&&e("div",{className:h(At.CellSimple__before,v?.before),children:o}),e(Q,{children:j({options:{asChild:u,children:c},content:a=>t("div",{className:h(At.CellSimple__content,v?.content),children:[H(p)&&e("div",{className:h(At.CellSimple__overline,v?.overline),children:p}),H(l)&&e("div",{className:h(At.CellSimple__title,v?.title),children:l}),H(i)&&e("div",{className:h(At.CellSimple__subtitle,v?.subtitle),children:i}),a,b&&e("a",{className:h(At.CellSimple__link,v?.link),href:b,target:"_blank",rel:"noreferrer",children:b})]},"subtree-container")})}),(H(s)||d)&&t("div",{className:h(At.CellSimple__after,v?.after),children:[s,d&&e(f,{className:h(At.CellSimple__chevron,v?.chevron)})]})]})});xt.displayName="CellSimple";const wt=e=>{switch(e){case"xsmall":return 16;case"small":case"medium":return 20;case"large":return 24}},Lt=e=>{switch(e){case"primary":case"destructive":case"overlay":return"contrast-static";case"secondary":case"ghost":return"primary";case"primary-contrast":case"secondary-contrast":return"primary-static"}};var zt={IconButton:"IconButton__KCr",IconButton_loading:"IconButton_loading__RxW",IconButton__content:"IconButton__content__dCL",IconButton_disabled:"IconButton_disabled__SZj",IconButton_activeMode_ripple:"IconButton_activeMode_ripple__asi",IconButton_activeMode_highlight:"IconButton_activeMode_highlight__h15",IconButton_size_xsmall:"IconButton_size_xsmall__G5T",IconButton_size_small:"IconButton_size_small__e3f",IconButton_size_medium:"IconButton_size_medium__MQQ",IconButton_size_large:"IconButton_size_large__9oz",IconButton_variant_primary:"IconButton_variant_primary__-4n",IconButton_variant_secondary:"IconButton_variant_secondary__dFi",IconButton_variant_ghost:"IconButton_variant_ghost__jvE","IconButton_variant_primary-contrast":"IconButton_variant_primary-contrast__O-T","IconButton_variant_secondary-contrast":"IconButton_variant_secondary-contrast__uNH",IconButton_variant_overlay:"IconButton_variant_overlay__vJc",IconButton_variant_destructive:"IconButton_variant_destructive__9rk",IconButton__spinnerContainer:"IconButton__spinnerContainer__9--",IconButton__ripple:"IconButton__ripple__l8M"};const Et=l((a,n)=>{const{children:r,className:l,disabled:i,innerClassNames:_,loading:o,asChild:s=!1,size:c="medium",variant:p="primary",...d}=a,u="button",m=s?q:u,v=ke(),y=ze({asChild:s,children:r,disabled:i,rootElement:u,loading:o}),g=i||o,f="android"===v,C=h(zt.IconButton,zt[`IconButton_variant_${p}`],zt[`IconButton_size_${c}`],{[zt.IconButton_loading]:o,[zt.IconButton_disabled]:i,[zt.IconButton_activeMode_highlight]:!g&&!f,[zt.IconButton_activeMode_ripple]:!g&&f},l);return t(m,{ref:n,className:C,...y,...d,children:[o&&e("span",{className:h(zt.IconButton__spinnerContainer,_?.spinnerContainer),children:e(pt,{className:h(_?.spinner),size:wt(c),appearance:Lt(p)})}),e(Q,{children:j({options:{asChild:s,children:r},content:t=>e("span",{className:h(zt.IconButton__content,_?.content),children:t},"subtree-container")})}),f&&!g&&e(Le,{className:zt.IconButton__ripple})]})});Et.displayName="IconButton";var Ot={Input:"Input__A3w",Input_disabled:"Input_disabled__mpt",Input_size_medium:"Input_size_medium__EjC",Input_size_large:"Input_size_large__8OF",Input_mode_default:"Input_mode_default__ncX",Input_mode_contrast:"Input_mode_contrast__EIY",Input__body:"Input__body__sVJ",Input__iconBefore:"Input__iconBefore__gxx",Input__iconAfter:"Input__iconAfter__jL1",Input__clearButton:"Input__clearButton__nKe",Input__input:"Input__input__gy5",Input__hint:"Input__hint__dE5"};const Mt=l((a,n)=>{const{className:r,innerClassNames:l,withClearButton:i,iconBefore:_,iconAfter:o,size:s="large",mode:c="primary",hint:p,...d}=a,u=h(Ot.Input,Ot[`Input_mode_${c}`],Ot[`Input_size_${s}`],{[Ot.Input_disabled]:d.disabled},r);return t("div",{className:h(l?.container),children:[t("label",{className:u,children:[H(_)&&e("div",{className:h(Ot.Input__iconBefore,l?.iconBefore),children:_}),e(me,{ref:n,className:h(Ot.Input__body,l?.body),withClearButton:i,innerClassNames:{input:h(Ot.Input__input,l?.input),clearButton:h(Ot.Input__clearButton,l?.clearButton)},...d}),H(o)&&e("div",{className:h(Ot.Input__iconAfter,l?.iconAfter),children:o})]}),H(p)&&e("div",{className:h(Ot.Input__hint,l?.hint),children:p})]})});Mt.displayName="Input";var kt={MaxUI:"MaxUI__g7Q",MaxUI_platform_ios:"MaxUI_platform_ios__gAV",MaxUI_platform_android:"MaxUI_platform_android__m3U",MaxUI_colorScheme_light:"MaxUI_colorScheme_light__Woo",MaxUI_colorScheme_dark:"MaxUI_colorScheme_dark__jFq"};const jt=d({platform:"ios",colorScheme:"light"}),Ht=()=>u(jt),Pt=l((t,a)=>{const{children:n,className:r,colorScheme:l,platform:i=(P()?"ios":"android")}=t,_=je({listenChanges:!l}),o=l??_,s=c(()=>({colorScheme:o,platform:i}),[o,i]),p=h(kt.MaxUI,kt[`MaxUI_colorScheme_${o}`],kt[`MaxUI_platform_${i}`],r);return e(jt.Provider,{value:s,children:e("div",{ref:a,className:p,children:n})})});Pt.displayName="MaxUI";var Dt={Switch:"Switch__-vj",Switch__toggle:"Switch__toggle__WU2",Switch__thumb:"Switch__thumb__jlX",Switch__input:"Switch__input__EDr",Switch_platform_ios:"Switch_platform_ios__B-C",Switch_platform_android:"Switch_platform_android__72T"};const $t=l((a,n)=>{const{className:r,...l}=a,i=ke(),_=h(Dt.Switch,Dt[`Switch_platform_${i}`],r);return t("span",{className:_,children:[e("input",{ref:n,type:"checkbox",role:"switch",className:Dt.Switch__input,...l}),e("span",{className:Dt.Switch__toggle,children:e("span",{className:Dt.Switch__thumb})})]})});$t.displayName="Switch";var Ut={Textarea:"Textarea__Sy6",Textarea_disabled:"Textarea_disabled__uY3",Textarea_mode_primary:"Textarea_mode_primary__E7l",Textarea_mode_secondary:"Textarea_mode_secondary__BYw",Textarea__textarea:"Textarea__textarea__Ok-"};const Rt=l((t,a)=>{const{className:n,innerClassNames:r,mode:l="primary",...i}=t,_=h(Ut.Textarea,Ut[`Textarea_mode_${l}`],{[Ut.Textarea_disabled]:i.disabled},n);return e("div",{className:_,children:e("textarea",{ref:a,className:h(Ut.Textarea__textarea,r?.textarea),...i})})});Rt.displayName="Textarea";var Yt={TypographyAction_variant_large:"TypographyAction_variant_large__l5j",TypographyAction_variant_medium:"TypographyAction_variant_medium__9H-",TypographyAction_variant_small:"TypographyAction_variant_small__-LL",TypographyAction_variant_label:"TypographyAction_variant_label__vhv"};const Wt=l((t,a)=>{const{className:n,variant:r="large",asChild:l,...i}=t,_=l?q:"span",o=h(Yt.TypographyAction,Yt[`TypographyAction_variant_${r}`],n);return e(_,{ref:a,className:o,...i})});Wt.displayName="TypographyAction";var Ft={TypographyBody_variant_large:"TypographyBody_variant_large__vlS",TypographyBody_variant_medium:"TypographyBody_variant_medium__9v3",TypographyBody_variant_small:"TypographyBody_variant_small__beJ","TypographyBody_variant_small-strong":"TypographyBody_variant_small-strong__mWy","TypographyBody_variant_small-caps":"TypographyBody_variant_small-caps__18r"};const Gt=l((t,a)=>{const{className:n,variant:r="large-strong",asChild:l,...i}=t,_=l?q:"span",o=h(Ft.TypographyBody,Ft[`TypographyBody_variant_${r}`],n);return e(_,{ref:a,className:o,...i})});Gt.displayName="TypographyBody";var Xt="TypographyDisplay__6MW";const Zt=l((t,a)=>{const{className:n,asChild:r,...l}=t;return e(r?q:"span",{ref:a,className:h(Xt,n),...l})});Zt.displayName="TypographyDisplay";var qt={"TypographyHeadline_variant_large-strong":"TypographyHeadline_variant_large-strong__mwz",TypographyHeadline_variant_medium:"TypographyHeadline_variant_medium__s92","TypographyHeadline_variant_medium-strong":"TypographyHeadline_variant_medium-strong__dFT",TypographyHeadline_variant_small:"TypographyHeadline_variant_small__8Ei","TypographyHeadline_variant_small-strong":"TypographyHeadline_variant_small-strong__kUR"};const Vt=l((t,a)=>{const{className:n,variant:r="large-strong",asChild:l,...i}=t,_=l?q:"span",o=h(qt.TypographyHeadline,qt[`TypographyHeadline_variant_${r}`],n);return e(_,{ref:a,className:o,...i})});Vt.displayName="TypographyHeadline";var Jt={TypographyLabel_variant_large:"TypographyLabel_variant_large__6vr","TypographyLabel_variant_large-strong":"TypographyLabel_variant_large-strong__uCg","TypographyLabel_variant_large-caps":"TypographyLabel_variant_large-caps__b1i",TypographyLabel_variant_medium:"TypographyLabel_variant_medium__Xo5","TypographyLabel_variant_medium-strong":"TypographyLabel_variant_medium-strong__Bk8","TypographyLabel_variant_small-strong":"TypographyLabel_variant_small-strong__qCw","TypographyLabel_variant_small-caps":"TypographyLabel_variant_small-caps__beb"};const Qt=l((t,a)=>{const{className:n,variant:r="large",asChild:l,...i}=t,_=l?q:"span",o=h(Jt.TypographyLabel,Jt[`TypographyLabel_variant_${r}`],n);return e(_,{ref:a,className:o,...i})});Qt.displayName="TypographyLabel";var Kt={"TypographyTitle_variant_large-strong":"TypographyTitle_variant_large-strong__9PL","TypographyTitle_variant_medium-strong":"TypographyTitle_variant_medium-strong__th0",TypographyTitle_variant_small:"TypographyTitle_variant_small__zJR","TypographyTitle_variant_small-strong":"TypographyTitle_variant_small-strong__BrE"};const ea=l((t,a)=>{const{className:n,variant:r="large-strong",asChild:l,...i}=t,_=l?q:"span",o=h(Kt.TypographyTitle,Kt[`TypographyTitle_variant_${r}`],n);return e(_,{ref:a,className:o,...i})});ea.displayName="TypographyTitle";const ta=Object.assign({},{Display:Zt,Headline:Vt,Title:ea,Body:Gt,Label:Qt,Action:Wt});export{_t as Avatar,gt as Button,Ct as CellAction,Nt as CellHeader,It as CellInput,Tt as CellList,xt as CellSimple,me as ClearableInput,ye as Container,mt as Counter,be as EllipsisText,Be as Flex,Se as Grid,f as Icon16Chevron,N as Icon16CloseIos,S as Icon16SearchOutline,w as Icon20CloseAndroid,E as Icon20CloseFilled,M as Icon24CloseAndroid,Et as IconButton,Mt as Input,Pt as MaxUI,jt as MaxUIContext,Ae as Panel,Le as Ripple,q as Slot,Q as Slottable,pt as Spinner,ce as SvgButton,$t as Switch,Ye as Tappable,Rt as Textarea,ta as Typography,j as getSubtree,H as hasReactNode,D as mergeRefs,Ht as useAppearance,ze as useButtonLikeProps,Ee as useCallbackRef,Oe as useColorScheme,Me as useImageLoadingStatus,ke as usePlatform,je as useSystemColorScheme};
@@ -2,6 +2,7 @@ export * from './components';
2
2
  export { getSubtree, type GetSubtreeProps, hasReactNode, mergeRefs } from './helpers';
3
3
  export * from './hooks';
4
4
  export * from './icons';
5
+ export * from './internal';
5
6
  export type { AsChildProp, ColorSchemeType, InnerClassNamesProp, MergeProps, PlatformType } from './types';
6
7
  export { Slot, type SlotProps, Slottable } from '@radix-ui/react-slot';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtF,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC3G,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtF,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC3G,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxhub/max-ui",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "author": "Vadim Tregubenko",
5
5
  "module": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",