@maxhub/max-ui 0.1.12 → 0.1.13
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 +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as a,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{forwardRef as r,createContext as l,useContext as _,Children as i,cloneElement as o,isValidElement as s,useRef as c,useEffect as p,useMemo as d,useState as u,useLayoutEffect as m}from"react";function h(e){var a,t,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(a=0;a<r;a++)e[a]&&(t=h(e[a]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function y(){for(var e,a,t=0,n="",r=arguments.length;t<r;t++)(e=arguments[t])&&(a=h(e))&&(n&&(n+=" "),n+=a);return n}var v;function g(){return g=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},g.apply(null,arguments)}var C,f=function(e){return n.createElement("svg",g({xmlns:"http://www.w3.org/2000/svg",width:12,height:16,fill:"none"},e),v||(v=n.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 B(){return B=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},B.apply(null,arguments)}var N;function b(){return b=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},b.apply(null,arguments)}var I,T=function(e){return n.createElement("svg",b({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),N||(N=n.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 S(){return S=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},S.apply(null,arguments)}var A,x;function w(){return w=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},w.apply(null,arguments)}var L=function(e){return n.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),A||(A=n.createElement("circle",{cx:10,cy:10,r:10,fill:"currentColor"})),x||(x=n.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 M(e,a){if("function"==typeof e)return e(a);null!=e&&(e.current=a)}function z(a){const t=E(a),r=n.forwardRef((a,r)=>{const{children:l,..._}=a,i=n.Children.toArray(l),o=i.find(j);if(o){const a=o.props.children,l=i.map(e=>e===o?n.Children.count(a)>1?n.Children.only(null):n.isValidElement(a)?a.props.children:null:e);return e(t,{..._,ref:r,children:n.isValidElement(a)?n.cloneElement(a,void 0,l):null})}return e(t,{..._,ref:r,children:l})});return r.displayName=`${a}.Slot`,r}var D=z("Slot");function E(e){const a=n.forwardRef((e,a)=>{const{children:t,...r}=e;if(n.isValidElement(t)){const e=function(e){let a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=a&&"isReactWarning"in a&&a.isReactWarning;if(t)return e.ref;if(a=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=a&&"isReactWarning"in a&&a.isReactWarning,t)return e.props.ref;return e.props.ref||e.ref}(t),l=function(e,a){const t={...a};for(const n in a){const r=e[n],l=a[n];/^on[A-Z]/.test(n)?r&&l?t[n]=(...e)=>{const a=l(...e);return r(...e),a}:r&&(t[n]=r):"style"===n?t[n]={...r,...l}:"className"===n&&(t[n]=[r,l].filter(Boolean).join(" "))}return{...e,...t}}(r,t.props);return t.type!==n.Fragment&&(l.ref=a?function(...e){return a=>{let t=!1;const n=e.map(e=>{const n=M(e,a);return t||"function"!=typeof n||(t=!0),n});if(t)return()=>{for(let a=0;a<n.length;a++){const t=n[a];"function"==typeof t?t():M(e[a],null)}}}}(a,e):e),n.cloneElement(t,l)}return n.Children.count(t)>1?n.Children.only(null):null});return a.displayName=`${e}.SlotClone`,a}var O=Symbol("radix.slottable");function k(t){const n=({children:t})=>e(a,{children:t});return n.displayName=`${t}.Slottable`,n.__radixId=O,n}var H=k("Slottable");function j(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===O}var $="SvgButton__kk9";const U=r((a,t)=>{const{className:n,asChild:r,...l}=a;return e(r?D:"button",{ref:t,className:y($,n),...l})});U.displayName="SvgButton";const P=l({size:48}),R=()=>_(P);var G={};const W=r((a,t)=>{const{className:n,onClick:r,...l}=a,{size:_}=R(),i=(e=>e<40?12:e<54?16:e<72?20:24)(_);return e(U,{ref:t,className:y(G.AvatarCloseButton,n),onClick:e=>{e.preventDefault(),r?.(e)},...l,children:e(L,{width:i,height:i})})});W.displayName="AvatarCloseButton";const Y=e=>"string"==typeof e?e:`${e}px`,X=(e,a)=>{const{asChild:t,children:n}=e;if(!t)return"function"==typeof a?a(n):a;const r=i.only(n);return o(r,{children:"function"==typeof a?a(r.props.children):a})},F=e=>void 0!==e&&!1!==e&&null!==e&&""!==e,q=()=>!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g),Z=(...e)=>{const a=e.filter(Boolean);if(a.length<=1){return a[0]??null}return e=>{for(const t of a)"function"==typeof t?t(e):t&&(t.current=e)}},J=()=>{};var Q={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 V=r((a,n)=>{const{className:r,style:l,children:_,overlay:i,rightTopCorner:o,rightBottomCorner:s,innerClassNames:c,size:p=48,asChild:d,form:u="circle",...m}=a,h=d?D:"div",v=y(Q.AvatarContainer,Q[`AvatarContainer_form_${u}`],r);return e(P.Provider,{value:{size:p},children:t(h,{ref:n,className:v,style:{"--MaxUi-AvatarContainer_size":`${p}px`,...l},...m,children:[e(H,{children:X({asChild:a.asChild,children:_},a=>t("span",{className:y(Q.AvatarContainer__content,c?.content),children:[a,F(i)&&e("span",{className:y(Q.AvatarContainer__overlay,c?.overlay),children:i})]},"subtree-container"))}),F(s)&&e("span",{className:y(Q.AvatarContainer__rightBottomCorner,c?.rightBottomCorner),children:s}),F(o)&&e("span",{className:y(Q.AvatarContainer__rightTopCorner,c?.rightTopCorner),children:o})]})})});V.displayName="AvatarContainer";var K="AvatarIcon__ZUI";const ee=r((a,t)=>{const{className:n,...r}=a;return e("span",{ref:t,className:y(K,n),...r})});ee.displayName="AvatarIcon";const ae=e=>{const{asChild:a,children:t,rootElement:n,disabled:r,loading:l}=e;if(!a&&"button"===n){return{disabled:r,...l?{"aria-disabled":!0}:{}}}if(a&&s(t)){const{type:e}=t;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}:{}}},te=e=>{const a=c(e);return p(()=>{a.current=e}),d(()=>(...e)=>a.current?.(...e),[])},ne=()=>{const{colorScheme:e}=ya();return e},re=(e,a)=>{const[t,n]=u("idle");return m(()=>{if(!e)return void n("error");let t=!0;const r=new window.Image,l=e=>()=>{t&&n(e)};return n("loading"),r.onload=l("loaded"),r.onerror=l("error"),r.src=e,a&&(r.referrerPolicy=a),()=>{t=!1}},[e,a]),t},le=()=>{const{platform:e}=ya();return e},_e=({listenChanges:e}={})=>{const[a,t]=u(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),n=e=>{t(()=>e.matches?"dark":"light")};return p(()=>{const a=window.matchMedia("(prefers-color-scheme: dark)");return t(()=>a.matches?"dark":"light"),e?(a.addEventListener("change",n),()=>{a.removeEventListener("change",n)}):J},[e]),a};var ie={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 oe=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},se=r((a,t)=>{const{className:n,children:r,gradient:l="red",..._}=a,{size:i}=R(),o=y(ie.AvatarText,{[ie[`AvatarText_gradient_${l}`]]:"custom"!==l},n);return e("span",{ref:t,className:o,..._,children:e("span",{className:ie.AvatarText__in,style:oe(i),children:r})})});se.displayName="AvatarText";var ce="AvatarImage__H7-";const pe=r((a,t)=>{const{className:n,fallback:r,fallbackGradient:l="red",..._}=a,[i,o]=u("idle"),s=re(_.src??_.srcSet,_.referrerPolicy),c=te(e=>{o(e)});return m(()=>{"idle"!==s&&c(s)},[s,c]),"error"===i?e(se,{gradient:l,children:r}):e("img",{ref:t,className:y(ce,n),..._})});pe.displayName="AvatarImage";var de={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 ue=r((a,t)=>{const{className:n,...r}=a,{size:l}=R(),_=(e=>e<40?"xs":e<54?"s":e<72?"m":"l")(l),i=y(de.AvatarOnlineDot,de[`AvatarOnlineDot_size_${_}`],n);return e("span",{ref:t,className:i,...r,children:e("span",{className:de.AvatarOnlineDot__dot})})});ue.displayName="AvatarOnlineDot";var me="AvatarOverlay__-nV";const he=r((a,t)=>{const{className:n,onClick:r,...l}=a;return e("span",{ref:t,className:y(me,n),onClick:e=>{e.preventDefault(),r?.(e)},...l})});he.displayName="AvatarOverlay";const ye=Object.assign({},{Container:V,Image:pe,Overlay:he,Icon:ee,Text:se,OnlineDot:ue,CloseButton:W});var ve="EllipsisText__vGw",ge="EllipsisText_multiline__1tx",Ce="EllipsisText_singleLine__3CP";const fe=r((a,t)=>{const{className:n,maxLines:r=1,style:l,asChild:_,...i}=a,o=_?D:"span",s=y(ve,{[ge]:r>1,[Ce]:1===r},n);return e(o,{ref:t,className:s,style:{"--MaxUi-EllipsisText_linesCount":r,...l},...i})});fe.displayName="EllipsisText";var Be="Ripple__R4t",Ne="Ripple_active__Rit";const be=r((a,t)=>{const{className:n,...r}=a,l=c(null),_=c(null),i=e=>{const a=e.currentTarget.getBoundingClientRect();((e,a)=>{null!==_.current&&(_.current.classList.remove(Ne),_.current.style.top=a+"px",_.current.style.left=e+"px",_.current.classList.add(Ne))})(e.clientX-(a.left??0),e.clientY-(a.top??0))};return p(()=>{if(_.current)return l.current=_.current.parentElement,null!==l.current&&l.current.addEventListener("pointerdown",i),()=>{null!==l.current&&l.current?.removeEventListener("pointerdown",i)}},[]),e("span",{ref:Z(t,_),role:"presentation","aria-hidden":!0,className:y(Be,n),onAnimationEnd:()=>{null!==_.current&&_.current.classList.remove(Ne)},...r})});be.displayName="Ripple";var Ie={Spinner:"Spinner__piy",rotation:"rotation__CUP",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",Spinner__spinner:"Spinner__spinner__Qdc"};const Te=r((a,n)=>{const{className:r,size:l=20,appearance:_="primary",...i}=a,o=y(Ie.Spinner,Ie[`Spinner_appearance_${_}`],r);return e("span",{ref:n,role:"status",className:o,...i,children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 20 20",fill:"none",children:[e("g",{clipPath:"url(#spinner)",children:e("g",{transform:"matrix(8.74228e-10 -0.01 0.01 8.74228e-10 10 10)",children:e("foreignObject",{x:"-1120",y:"-1120",width:"2240",height:"2240",children:e("div",{className:Ie.Spinner__spinner})})})}),e("defs",{children:e("clipPath",{id:"spinner",children:e("path",{d:"M8.74228e-07 10C1.35705e-06 4.47715 4.47715 -1.35705e-06 10 -8.74228e-07C15.5228 -3.91405e-07 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 3.91405e-07 15.5228 8.74228e-07 10ZM18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18C14.4183 18 18 14.4183 18 10Z"})})})]})})});Te.displayName="Spinner";var Se={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_small:"Button_size_small__LLG",Button_mode_primary:"Button_mode_primary__lfx",Button_mode_secondary:"Button_mode_secondary__u7i",Button_mode_tertiary:"Button_mode_tertiary__1G9",Button_size_medium:"Button_size_medium__fI9",Button_size_large:"Button_size_large__S2-",Button_mode_link:"Button_mode_link__a3e",Button_appearance_themed:"Button_appearance_themed__z2B",Button_appearance_negative:"Button_appearance_negative__-Iy",Button_appearance_neutral:"Button_appearance_neutral__SAu","Button_appearance_neutral-themed":"Button_appearance_neutral-themed__H03","Button_appearance_contrast-static":"Button_appearance_contrast-static__DgE",Button__spinnerContainer:"Button__spinnerContainer__G4I",Button__ripple:"Button__ripple__jw0"},Ae={Counter:"Counter__0Oj",Counter_appearance_themed:"Counter_appearance_themed__anX",Counter_mode_filled:"Counter_mode_filled__9Uy",Counter_disabled:"Counter_disabled__Nhg",Counter_muted:"Counter_muted__3IJ",Counter_mode_inverse:"Counter_mode_inverse__IIJ",Counter_appearance_neutral:"Counter_appearance_neutral__SN9","Counter_appearance_neutral-themed":"Counter_appearance_neutral-themed__yq8","Counter_appearance_neutral-static":"Counter_appearance_neutral-static__UeR",Counter_appearance_negative:"Counter_appearance_negative__JZg"};const xe=r((a,t)=>{const{className:n,value:r,rounded:l,appearance:_="themed",mode:i="filled",disabled:o=!1,muted:s=!1,...c}=a,p=y(Ae.Counter,Ae[`Counter_appearance_${_}`],Ae[`Counter_mode_${i}`],{[Ae.Counter_disabled]:o,[Ae.Counter_muted]:s},n),u=d(()=>l?Intl.NumberFormat("en",{notation:"compact"}).format(r):r,[l,r]);return e("span",{ref:t,className:p,...c,role:"",children:u})});xe.displayName="Counter";const we=(e,a)=>{if("primary"===a)switch(e){case"themed":case"negative":case"neutral-themed":return"contrast-static";case"contrast-static":return"primary-static";case"neutral":return"contrast"}switch(e){case"themed":return"themed";case"negative":return"negative";case"neutral":return"primary";case"neutral-themed":return"neutral-themed";case"contrast-static":return"contrast-static"}},Le=(e,a)=>"negative"===e?{mode:"primary"===a?"inverse":"filled",appearance:"negative"}:"neutral"===e?{mode:"primary"===a?"inverse":"filled",appearance:"neutral"}:"neutral-themed"===e?{mode:"primary"===a?"inverse":"filled",appearance:"neutral-themed"}:"contrast-static"===e?{mode:"primary"===a?"filled":"inverse",appearance:"neutral-static"}:{mode:"primary"===a?"inverse":"filled",appearance:"themed"},Me=(e,a,t,n)=>s(e)&&e.type===xe?o(e,{...Le(a,t),disabled:n}):e,ze=r((a,n)=>{const{className:r,iconBefore:l,iconAfter:_,indicator:i,children:o,onClick:s,loading:c,disabled:p=!1,asChild:d=!1,innerClassNames:u,stretched:m=!1,size:h="medium",mode:v="primary",appearance:g="themed",...C}=a,f="button",B=d?D:f,N=le(),b=ae({asChild:d,children:o,disabled:p,rootElement:f,loading:c}),I=p||c,T="android"===N&&"link"!==v,S=y(Se.Button,Se[`Button_appearance_${g}`],Se[`Button_mode_${v}`],Se[`Button_size_${h}`],{[Se.Button_loading]:c,[Se.Button_disabled]:p,[Se.Button_stretched]:m,[Se.Button_activeMode_highlight]:!I&&!T,[Se.Button_activeMode_ripple]:!I&&T},r);return t(B,{ref:n,className:S,onClick:e=>{c||s?.(e)},...b,...C,children:[F(l)&&e("span",{className:y(Se.Button__iconBefore,u?.iconBefore),children:l}),c&&e("span",{className:y(Se.Button__spinnerContainer,u?.spinnerContainer),children:e(Te,{className:y(u?.spinner),size:(A=h,"small"===A?20:24),appearance:we(g,v)})}),e(H,{children:X({asChild:d,children:o},a=>e(fe,{className:y(Se.Button__content,u?.content),children:a},"subtree-container"))}),F(i)&&e("span",{className:y(Se.Button__indicator,u?.indicator),children:Me(i,g,v,p)}),F(_)&&e("span",{className:y(Se.Button__iconAfter,u?.iconAfter),children:_}),T&&!I&&e(be,{className:Se.Button__ripple})]});var A});ze.displayName="Button";var De="Tappable__TDG",Ee="Tappable_interactive__fYU",Oe="Tappable_disabled__DQf",ke="Tappable_activeMode_ripple__YMg",He="Tappable_activeMode_highlight__W7X",je="Tappable__ripple__XiX";const $e=r((a,n)=>{const{className:r,disabled:l,asChild:_,children:i,parentChildren:o,as:c="div",...p}=a,d=_?D:c,u=le(),m=ae({asChild:_,children:i,disabled:l,rootElement:c}),h=(({onClick:e,href:a,children:t,asChild:n,parentChildren:r=t})=>n?!(!n||!s(r))&&("href"in r.props||"onClick"in r.props):!!e||!!a)(a),v="android"===u&&h&&!l,g=y(De,{[Ee]:h,[Oe]:l,[He]:!v,[ke]:v},r);return t(d,{ref:n,className:g,...h?m:{},...p,children:[i,v&&e(be,{className:je})]})});$e.displayName="Tappable";var Ue={CellAction:"CellAction__vzN",CellAction_mode_primary:"CellAction_mode_primary__vZQ",CellAction_disabled:"CellAction_disabled__VZA",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 Pe=r((a,n)=>{const{className:r,before:l,children:_,innerClassNames:i,asChild:o=!1,mode:s="primary",height:c="normal",showChevron:p=!1,...d}=a,u=y(Ue.CellAction,Ue[`CellAction_mode_${s}`],Ue[`CellAction_height_${c}`],{[Ue.CellAction_disabled]:d.disabled},r);return t($e,{ref:n,className:u,asChild:o,as:"button",parentChildren:_,...d,children:[F(l)&&e("span",{className:y(Ue.CellAction__before,i?.before),children:l}),e(H,{children:X({asChild:o,children:_},a=>e("span",{className:y(Ue.CellAction__content,i?.content),children:a},"subtree-container"))}),p&&e(f,{className:y(Ue.CellAction__chevron,i?.chevron)})]})});Pe.displayName="CellAction";var Re={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 Ge=r((a,n)=>{const{className:r,titleStyle:l="caps",fullWidth:_=!1,children:i,after:o,innerClassNames:s,...c}=a,p=y(Re.CellHeader,Re[`CellHeader_titleStyle_${l}`],{[Re.CellHeader_fullWidth]:_},r);return t("div",{ref:n,className:p,...c,children:[F(i)&&e("div",{className:y(Re.CellHeader__content,s?.content),children:i}),F(o)&&e("div",{className:y(Re.CellHeader__after,s?.after),children:o})]})});Ge.displayName="CellHeader";var We="ClearableInput__FRL",Ye="ClearableInput__button__GlG";const Xe={ios:e(function(e){return n.createElement("svg",B({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),C||(C=n.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"})))},{}),android:e(function(e){return n.createElement("svg",S({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),I||(I=n.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"})))},{})},Fe=r((a,n)=>{const{className:r,onChange:l,innerClassNames:_,withClearButton:i=!0,disabled:o,...s}=a,p=c(null),[d,m]=u(!s.value&&!s.defaultValue),h=le();return t("span",{className:y(We,r),children:[e("input",{ref:Z(p,n),className:y(_?.input),onChange:e=>{l?.(e),m(!e.target.value)},disabled:o,...s}),!d&&!o&&i&&e(U,{className:y(Ye,_?.clearButton),onClick:()=>{p.current&&((e,a="")=>{const t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;t?.call(e,a);const n=new Event("input",{bubbles:!0});e.dispatchEvent(n)})(p.current)},"aria-label":"Очистить",children:Xe[h]})]})});Fe.displayName="ClearableInput";var qe={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 Ze=r((a,n)=>{const{className:r,height:l="normal",before:_,innerClassNames:i,disabled:o,...s}=a,c=y(qe.CellInput,qe[`CellInput_height_${l}`],{[qe.CellInput_disabled]:o},r);return t("label",{className:c,children:[F(_)&&e(fe,{className:y(qe.CellInput__before,i?.before),maxLines:1,children:_}),e(Fe,{ref:n,className:y(qe.CellInput__body,i?.body),innerClassNames:{input:y(qe.CellInput__input,i?.input),clearButton:y(qe.CellInput__clearButton,i?.clearButton)},type:"text",disabled:o,...s})]})});Ze.displayName="CellInput";var Je={CellList:"CellList__1ou",CellList_filled:"CellList_filled__ikE",CellList__body:"CellList__body__ouS",CellList_mode_island:"CellList_mode_island__aCu"};const Qe=r((a,n)=>{const{className:r,header:l,children:_,mode:i="full-width",filled:o="island"===i,...s}=a,c=y(Je.CellList,Je[`CellList_mode_${i}`],{[Je.CellList_filled]:o},r);return t("div",{ref:n,className:c,...s,children:[F(l)&&e("div",{className:Je.CellList__header,children:l}),e("div",{className:Je.CellList__body,children:_})]})});Qe.displayName="CellList";var Ve={CellSimple:"CellSimple__n0z",CellSimple_disabled:"CellSimple_disabled__T-3",CellSimple__subtitle:"CellSimple__subtitle__oIF",CellSimple__overline:"CellSimple__overline__Ncr",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__title:"CellSimple__title__aYs",CellSimple__chevron:"CellSimple__chevron__cSs"};const Ke=r((a,n)=>{const{className:r,title:l,subtitle:_,before:i,after:o,children:s,overline:c,showChevron:p=!1,asChild:d=!1,disabled:u=!1,innerClassNames:m,height:h="normal",as:v="div",...g}=a,C=y(Ve.CellSimple,Ve[`CellSimple_height_${h}`],{[Ve.CellSimple_disabled]:u},r);return t($e,{ref:n,className:C,asChild:d,as:v,parentChildren:s,...g,children:[F(i)&&e("div",{className:y(Ve.CellSimple__before,m?.before),children:i}),e(H,{children:X({asChild:d,children:s},a=>t("div",{className:y(Ve.CellSimple__content,m?.content),children:[F(c)&&e("div",{className:y(Ve.CellSimple__overline,m?.overline),children:c}),F(l)&&e("div",{className:y(Ve.CellSimple__title,m?.title),children:l}),F(_)&&e("div",{className:y(Ve.CellSimple__subtitle,m?.subtitle),children:_}),a]},"subtree-container"))}),(F(o)||p)&&t("div",{className:y(Ve.CellSimple__after,m?.after),children:[o,p&&e(f,{className:y(Ve.CellSimple__chevron,m?.chevron)})]})]})});Ke.displayName="CellSimple";var ea="Container__MSr",aa="Container_fullWidth__Dor";const ta=r((a,t)=>{const{className:n,asChild:r,fullWidth:l,..._}=a,i=r?D:"div",o=y(ea,{[aa]:l},n);return e(i,{ref:t,className:o,..._})});ta.displayName="Container";var na={Dot:"Dot__dio",Dot_appearance_themed:"Dot_appearance_themed__AJa","Dot_appearance_contrast-pinned":"Dot_appearance_contrast-pinned__i8T","Dot_appearance_neutral-fade":"Dot_appearance_neutral-fade__paA","Dot_appearance_accent-red":"Dot_appearance_accent-red__GZs",Dot_appearance_inherit:"Dot_appearance_inherit__xh2"};const ra=r((a,t)=>{const{className:n,appearance:r="inherit",...l}=a,_=y(na.Dot,na[`Dot_appearance_${r}`],n);return e("span",{ref:t,className:_,...l})});ra.displayName="Dot";var la="Flex__8ia";const _a=r((a,t)=>{const{className:n,display:r="flex",direction:l="row",align:_="flex-start",justify:i="start",asChild:o,wrap:s,style:c,gap:p,gapX:d,gapY:u,...m}=a;return e(o?D:"div",{ref:t,className:y(la,n),style:{flexDirection:l,justifyContent:i,alignItems:_,flexWrap:s,...c,display:r,"--MaxUi-Flex_gapX":Y(d??p??0),"--MaxUi-Flex_gapY":Y(u??p??0)},...m})});_a.displayName="Flex";var ia="Grid__tMN";const oa=r((a,t)=>{const{className:n,style:r,display:l="grid",align:_="start",justify:i="start",gap:o,gapX:s,gapY:c,cols:p,rows:d,asChild:u,...m}=a;return e(u?D:"div",{ref:t,className:y(ia,n),style:{justifyContent:i,alignItems:_,...r,display:l,"--MaxUi-Grid_gapX":Y(s??o??0),"--MaxUi-Grid_gapY":Y(c??o??0),"--MaxUi-Grid_cols":p??0,"--MaxUi-Grid_rows":d??0},...m})});oa.displayName="Grid";const sa=(e,a)=>{if("primary"===a)switch(e){case"themed":case"negative":case"neutral-themed":return"contrast-static";case"neutral":return"contrast";case"contrast-static":return"primary-static"}switch(e){case"themed":return"themed";case"negative":return"negative";case"neutral":return"primary";case"neutral-themed":return"neutral-themed";case"contrast-static":return"contrast-static"}};var ca={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_mode_primary:"IconButton_mode_primary__FqT",IconButton_size_small:"IconButton_size_small__e3f",IconButton_mode_secondary:"IconButton_mode_secondary__d4Q",IconButton_mode_tertiary:"IconButton_mode_tertiary__s90",IconButton_size_medium:"IconButton_size_medium__MQQ",IconButton_size_large:"IconButton_size_large__9oz",IconButton_appearance_themed:"IconButton_appearance_themed__jUC",IconButton_mode_link:"IconButton_mode_link__kNB",IconButton_appearance_negative:"IconButton_appearance_negative__qI2",IconButton_appearance_neutral:"IconButton_appearance_neutral__8iK","IconButton_appearance_neutral-themed":"IconButton_appearance_neutral-themed__xJM","IconButton_appearance_contrast-static":"IconButton_appearance_contrast-static__Fp4",IconButton__spinnerContainer:"IconButton__spinnerContainer__9--",IconButton__ripple:"IconButton__ripple__l8M"};const pa=r((a,n)=>{const{children:r,className:l,disabled:_,innerClassNames:i,loading:o,asChild:s=!1,size:c="medium",mode:p="primary",appearance:d="themed",...u}=a,m="button",h=s?D:m,v=le(),g=ae({asChild:s,children:r,disabled:_,rootElement:m,loading:o}),C=_||o,f="android"===v&&"link"!==p,B=y(ca.IconButton,ca[`IconButton_appearance_${d}`],ca[`IconButton_mode_${p}`],ca[`IconButton_size_${c}`],{[ca.IconButton_loading]:o,[ca.IconButton_disabled]:_,[ca.IconButton_activeMode_highlight]:!C&&!f,[ca.IconButton_activeMode_ripple]:!C&&f},l);return t(h,{ref:n,className:B,...g,...u,children:[o&&e("span",{className:y(ca.IconButton__spinnerContainer,i?.spinnerContainer),children:e(Te,{className:y(i?.spinner),size:(N=c,"small"===N?20:24),appearance:sa(d,p)})}),e(H,{children:X({asChild:s,children:r},a=>e("span",{className:y(ca.IconButton__content,i?.content),children:a},"subtree-container"))}),f&&!C&&e(be,{className:ca.IconButton__ripple})]});var N});pa.displayName="IconButton";var da={Input:"Input__A3w",Input_disabled:"Input_disabled__mpt",Input_compact:"Input_compact__gBl",Input_mode_primary:"Input_mode_primary__2Mr",Input_mode_secondary:"Input_mode_secondary__c6D",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"};const ua=r((a,n)=>{const{className:r,iconBefore:l,iconAfter:_,innerClassNames:i,withClearButton:o,compact:s=!1,mode:c="primary",...p}=a,d=y(da.Input,da[`Input_mode_${c}`],{[da.Input_compact]:s,[da.Input_disabled]:p.disabled},r);return t("label",{className:d,children:[F(l)&&e("div",{className:y(da.Input__iconBefore,i?.iconBefore),children:l}),e(Fe,{ref:n,className:y(da.Input__body,i?.body),withClearButton:o,innerClassNames:{input:y(da.Input__input,i?.input),clearButton:y(da.Input__clearButton,i?.clearButton)},...p}),F(_)&&e("div",{className:y(da.Input__iconAfter,i?.iconAfter),children:_})]})});ua.displayName="Input";var ma={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 ha=l({platform:"ios",colorScheme:"light"}),ya=()=>_(ha),va=r((a,t)=>{const{children:n,className:r,colorScheme:l,platform:_=(q()?"ios":"android")}=a,i=_e({listenChanges:!l}),o=l??i,s=d(()=>({colorScheme:o,platform:_}),[]),c=y(ma.MaxUI,ma[`MaxUI_colorScheme_${o}`],ma[`MaxUI_platform_${_}`],r);return e(ha.Provider,{value:s,children:e("div",{ref:t,className:c,children:n})})});va.displayName="MaxUI";var ga={Panel:"Panel__kpB",Panel_centeredX:"Panel_centeredX__jxE",Panel_centeredY:"Panel_centeredY__fp1",Panel_mode_primary:"Panel_mode_primary__hES",Panel_mode_secondary:"Panel_mode_secondary__yer"};const Ca=r((a,t)=>{const{className:n,mode:r="primary",centeredX:l,centeredY:_,...i}=a,o=y(ga.Panel,ga[`Panel_mode_${r}`],{[ga.Panel_centeredX]:l,[ga.Panel_centeredY]:_},n);return e("div",{ref:t,className:o,...i})});Ca.displayName="Panel";var fa={SearchInput:"SearchInput__cI6",SearchInput__body:"SearchInput__body__WUT",SearchInput__icon:"SearchInput__icon__dsa",SearchInput__clearButton:"SearchInput__clearButton__qsm",SearchInput__input:"SearchInput__input__xoX",SearchInput_platform_ios:"SearchInput_platform_ios__Sn7",SearchInput_platform_android:"SearchInput_platform_android__QG9"};const Ba=r((a,n)=>{const{className:r,placeholder:l="Поиск",innerClassNames:_,...i}=a,o=le(),s=y(fa.SearchInput,fa[`SearchInput_platform_${o}`],r);return t("label",{className:s,children:[e(T,{className:fa.SearchInput__icon}),e(Fe,{ref:n,className:y(fa.SearchInput__body,_?.body),innerClassNames:{input:y(fa.SearchInput__input,_?.input),clearButton:y(fa.SearchInput__clearButton,_?.clearButton)},type:"text",placeholder:l,...i})]})});Ba.displayName="SearchInput";var Na={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 ba=r((a,n)=>{const{className:r,...l}=a,_=le(),i=y(Na.Switch,Na[`Switch_platform_${_}`],r);return t("span",{className:i,children:[e("input",{ref:n,type:"checkbox",role:"switch",className:Na.Switch__input,...l}),e("span",{className:Na.Switch__toggle,children:e("span",{className:Na.Switch__thumb})})]})});ba.displayName="Switch";var Ia={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 Ta=r((a,t)=>{const{className:n,innerClassNames:r,mode:l="primary",..._}=a,i=y(Ia.Textarea,Ia[`Textarea_mode_${l}`],{[Ia.Textarea_disabled]:_.disabled},n);return e("div",{className:i,children:e("textarea",{ref:t,className:y(Ia.Textarea__textarea,r?.textarea),..._})})});Ta.displayName="Textarea";var Sa={ToolButton:"ToolButton__lde",ToolButton_appearance_default:"ToolButton_appearance_default__gqg",ToolButton_disabled:"ToolButton_disabled__gq5",ToolButton_appearance_secondary:"ToolButton_appearance_secondary__ghs",ToolButton_withLabel:"ToolButton_withLabel__FsL",ToolButton__icon:"ToolButton__icon__ds5",ToolButton__label:"ToolButton__label__GCi"};const Aa=r((a,n)=>{const{className:r,icon:l,children:_,asChild:i,innerClassNames:o,appearance:s="default",disabled:c=!1,...p}=a,d=y(Sa.ToolButton,Sa[`ToolButton_appearance_${s}`],{[Sa.ToolButton_withLabel]:F(_),[Sa.ToolButton_disabled]:c},r);return t($e,{ref:n,className:d,as:"button",parentChildren:_,asChild:i,disabled:c,...p,children:[F(l)&&e("span",{className:y(Sa.ToolButton__icon,o?.icon),children:l}),F(_)&&e(H,{children:X({asChild:i,children:_},a=>e(fe,{maxLines:1,className:y(Sa.ToolButton__label,o?.label),children:a},"subtree-container"))})]})});Aa.displayName="ToolButton";var xa={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 wa=r((a,t)=>{const{className:n,variant:r="large",asChild:l,..._}=a,i=l?D:"span",o=y(xa.TypographyAction,xa[`TypographyAction_variant_${r}`],n);return e(i,{ref:t,className:o,..._})});wa.displayName="TypographyAction";var La={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 Ma=r((a,t)=>{const{className:n,variant:r="large-strong",asChild:l,..._}=a,i=l?D:"span",o=y(La.TypographyBody,La[`TypographyBody_variant_${r}`],n);return e(i,{ref:t,className:o,..._})});Ma.displayName="TypographyBody";var za="TypographyDisplay__6MW";const Da=r((a,t)=>{const{className:n,asChild:r,...l}=a;return e(r?D:"span",{ref:t,className:y(za,n),...l})});Da.displayName="TypographyDisplay";var Ea={"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 Oa=r((a,t)=>{const{className:n,variant:r="large-strong",asChild:l,..._}=a,i=l?D:"span",o=y(Ea.TypographyHeadline,Ea[`TypographyHeadline_variant_${r}`],n);return e(i,{ref:t,className:o,..._})});Oa.displayName="TypographyHeadline";var ka={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 Ha=r((a,t)=>{const{className:n,variant:r="large",asChild:l,..._}=a,i=l?D:"span",o=y(ka.TypographyLabel,ka[`TypographyLabel_variant_${r}`],n);return e(i,{ref:t,className:o,..._})});Ha.displayName="TypographyLabel";var ja={"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 $a=r((a,t)=>{const{className:n,variant:r="large-strong",asChild:l,..._}=a,i=l?D:"span",o=y(ja.TypographyTitle,ja[`TypographyTitle_variant_${r}`],n);return e(i,{ref:t,className:o,..._})});$a.displayName="TypographyTitle";const Ua=Object.assign({},{Display:Da,Headline:Oa,Title:$a,Body:Ma,Label:Ha,Action:wa});export{ye as Avatar,ze as Button,Pe as CellAction,Ge as CellHeader,Ze as CellInput,Qe as CellList,Ke as CellSimple,ta as Container,xe as Counter,ra as Dot,fe as EllipsisText,_a as Flex,oa as Grid,pa as IconButton,ua as Input,va as MaxUI,ha as MaxUIContext,Ca as Panel,be as Ripple,D as Root,Ba as SearchInput,D as Slot,H as Slottable,Te as Spinner,U as SvgButton,ba as Switch,$e as Tappable,Ta as Textarea,Aa as ToolButton,Ua as Typography,z as createSlot,k as createSlottable,ya as useAppearance,ae as useButtonLikeProps,te as useCallbackRef,ne as useColorScheme,re as useImageLoadingStatus,le as usePlatform,_e as useSystemColorScheme};
|
|
1
|
+
import{jsx as e,Fragment as a,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{forwardRef as r,createContext as l,useContext as _,Children as i,cloneElement as o,isValidElement as s,useRef as c,useEffect as p,useMemo as d,useState as u,useLayoutEffect as m}from"react";function h(e){var a,t,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(a=0;a<r;a++)e[a]&&(t=h(e[a]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function y(){for(var e,a,t=0,n="",r=arguments.length;t<r;t++)(e=arguments[t])&&(a=h(e))&&(n&&(n+=" "),n+=a);return n}var v;function g(){return g=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},g.apply(null,arguments)}var C,f=function(e){return n.createElement("svg",g({xmlns:"http://www.w3.org/2000/svg",width:12,height:16,fill:"none"},e),v||(v=n.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 B(){return B=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},B.apply(null,arguments)}var N;function b(){return b=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},b.apply(null,arguments)}var I,T=function(e){return n.createElement("svg",b({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),N||(N=n.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 S(){return S=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},S.apply(null,arguments)}var A,x;function w(){return w=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},w.apply(null,arguments)}var L=function(e){return n.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),A||(A=n.createElement("circle",{cx:10,cy:10,r:10,fill:"currentColor"})),x||(x=n.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 M(e,a){if("function"==typeof e)return e(a);null!=e&&(e.current=a)}function z(a){const t=E(a),r=n.forwardRef((a,r)=>{const{children:l,..._}=a,i=n.Children.toArray(l),o=i.find(j);if(o){const a=o.props.children,l=i.map(e=>e===o?n.Children.count(a)>1?n.Children.only(null):n.isValidElement(a)?a.props.children:null:e);return e(t,{..._,ref:r,children:n.isValidElement(a)?n.cloneElement(a,void 0,l):null})}return e(t,{..._,ref:r,children:l})});return r.displayName=`${a}.Slot`,r}var D=z("Slot");function E(e){const a=n.forwardRef((e,a)=>{const{children:t,...r}=e;if(n.isValidElement(t)){const e=function(e){let a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=a&&"isReactWarning"in a&&a.isReactWarning;if(t)return e.ref;if(a=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=a&&"isReactWarning"in a&&a.isReactWarning,t)return e.props.ref;return e.props.ref||e.ref}(t),l=function(e,a){const t={...a};for(const n in a){const r=e[n],l=a[n];/^on[A-Z]/.test(n)?r&&l?t[n]=(...e)=>{const a=l(...e);return r(...e),a}:r&&(t[n]=r):"style"===n?t[n]={...r,...l}:"className"===n&&(t[n]=[r,l].filter(Boolean).join(" "))}return{...e,...t}}(r,t.props);return t.type!==n.Fragment&&(l.ref=a?function(...e){return a=>{let t=!1;const n=e.map(e=>{const n=M(e,a);return t||"function"!=typeof n||(t=!0),n});if(t)return()=>{for(let a=0;a<n.length;a++){const t=n[a];"function"==typeof t?t():M(e[a],null)}}}}(a,e):e),n.cloneElement(t,l)}return n.Children.count(t)>1?n.Children.only(null):null});return a.displayName=`${e}.SlotClone`,a}var O=Symbol("radix.slottable");function k(t){const n=({children:t})=>e(a,{children:t});return n.displayName=`${t}.Slottable`,n.__radixId=O,n}var H=k("Slottable");function j(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===O}var $="SvgButton__kk9";const U=r((a,t)=>{const{className:n,asChild:r,...l}=a;return e(r?D:"button",{ref:t,className:y($,n),...l})});U.displayName="SvgButton";const P=l({size:48}),R=()=>_(P);var G={};const W=r((a,t)=>{const{className:n,onClick:r,...l}=a,{size:_}=R(),i=(e=>e<40?12:e<54?16:e<72?20:24)(_);return e(U,{ref:t,className:y(G.AvatarCloseButton,n),onClick:e=>{e.preventDefault(),r?.(e)},...l,children:e(L,{width:i,height:i})})});W.displayName="AvatarCloseButton";const Y=e=>"string"==typeof e?e:`${e}px`,X=(e,a)=>{const{asChild:t,children:n}=e;if(!t)return"function"==typeof a?a(n):a;const r=i.only(n);return o(r,{children:"function"==typeof a?a(r.props.children):a})},F=e=>void 0!==e&&!1!==e&&null!==e&&""!==e,q=()=>!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g),Z=(...e)=>{const a=e.filter(Boolean);if(a.length<=1){return a[0]??null}return e=>{for(const t of a)"function"==typeof t?t(e):t&&(t.current=e)}},J=()=>{};var Q={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 V=r((a,n)=>{const{className:r,style:l,children:_,overlay:i,rightTopCorner:o,rightBottomCorner:s,innerClassNames:c,size:p=48,asChild:d,form:u="circle",...m}=a,h=d?D:"div",v=y(Q.AvatarContainer,Q[`AvatarContainer_form_${u}`],r);return e(P.Provider,{value:{size:p},children:t(h,{ref:n,className:v,style:{"--MaxUi-AvatarContainer_size":`${p}px`,...l},...m,children:[e(H,{children:X({asChild:a.asChild,children:_},a=>t("span",{className:y(Q.AvatarContainer__content,c?.content),children:[a,F(i)&&e("span",{className:y(Q.AvatarContainer__overlay,c?.overlay),children:i})]},"subtree-container"))}),F(s)&&e("span",{className:y(Q.AvatarContainer__rightBottomCorner,c?.rightBottomCorner),children:s}),F(o)&&e("span",{className:y(Q.AvatarContainer__rightTopCorner,c?.rightTopCorner),children:o})]})})});V.displayName="AvatarContainer";var K="AvatarIcon__ZUI";const ee=r((a,t)=>{const{className:n,...r}=a;return e("span",{ref:t,className:y(K,n),...r})});ee.displayName="AvatarIcon";const ae=e=>{const{asChild:a,children:t,rootElement:n,disabled:r,loading:l}=e;if(!a&&"button"===n){return{disabled:r,...l?{"aria-disabled":!0}:{}}}if(a&&s(t)){const{type:e}=t;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}:{}}},te=e=>{const a=c(e);return p(()=>{a.current=e}),d(()=>(...e)=>a.current?.(...e),[])},ne=()=>{const{colorScheme:e}=ya();return e},re=(e,a)=>{const[t,n]=u("idle");return m(()=>{if(!e)return void n("error");let t=!0;const r=new window.Image,l=e=>()=>{t&&n(e)};return n("loading"),r.onload=l("loaded"),r.onerror=l("error"),r.src=e,a&&(r.referrerPolicy=a),()=>{t=!1}},[e,a]),t},le=()=>{const{platform:e}=ya();return e},_e=({listenChanges:e}={})=>{const[a,t]=u(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),n=e=>{t(()=>e.matches?"dark":"light")};return p(()=>{const a=window.matchMedia("(prefers-color-scheme: dark)");return t(()=>a.matches?"dark":"light"),e?(a.addEventListener("change",n),()=>{a.removeEventListener("change",n)}):J},[e]),a};var ie={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 oe=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},se=r((a,t)=>{const{className:n,children:r,gradient:l="red",..._}=a,{size:i}=R(),o=y(ie.AvatarText,{[ie[`AvatarText_gradient_${l}`]]:"custom"!==l},n);return e("span",{ref:t,className:o,..._,children:e("span",{className:ie.AvatarText__in,style:oe(i),children:r})})});se.displayName="AvatarText";var ce="AvatarImage__H7-";const pe=r((a,t)=>{const{className:n,fallback:r,fallbackGradient:l="red",..._}=a,[i,o]=u("idle"),s=re(_.src??_.srcSet,_.referrerPolicy),c=te(e=>{o(e)});return m(()=>{"idle"!==s&&c(s)},[s,c]),"error"===i?e(se,{gradient:l,children:r}):e("img",{ref:t,className:y(ce,n),..._})});pe.displayName="AvatarImage";var de={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 ue=r((a,t)=>{const{className:n,...r}=a,{size:l}=R(),_=(e=>e<40?"xs":e<54?"s":e<72?"m":"l")(l),i=y(de.AvatarOnlineDot,de[`AvatarOnlineDot_size_${_}`],n);return e("span",{ref:t,className:i,...r,children:e("span",{className:de.AvatarOnlineDot__dot})})});ue.displayName="AvatarOnlineDot";var me="AvatarOverlay__-nV";const he=r((a,t)=>{const{className:n,onClick:r,...l}=a;return e("span",{ref:t,className:y(me,n),onClick:e=>{e.preventDefault(),r?.(e)},...l})});he.displayName="AvatarOverlay";const ye=Object.assign({},{Container:V,Image:pe,Overlay:he,Icon:ee,Text:se,OnlineDot:ue,CloseButton:W});var ve="EllipsisText__vGw",ge="EllipsisText_multiline__1tx",Ce="EllipsisText_singleLine__3CP";const fe=r((a,t)=>{const{className:n,maxLines:r=1,style:l,asChild:_,...i}=a,o=_?D:"span",s=y(ve,{[ge]:r>1,[Ce]:1===r},n);return e(o,{ref:t,className:s,style:{"--MaxUi-EllipsisText_linesCount":r,...l},...i})});fe.displayName="EllipsisText";var Be="Ripple__R4t",Ne="Ripple_active__Rit";const be=r((a,t)=>{const{className:n,...r}=a,l=c(null),_=c(null),i=e=>{const a=e.currentTarget.getBoundingClientRect();((e,a)=>{null!==_.current&&(_.current.classList.remove(Ne),_.current.style.top=a+"px",_.current.style.left=e+"px",_.current.classList.add(Ne))})(e.clientX-(a.left??0),e.clientY-(a.top??0))};return p(()=>{if(_.current)return l.current=_.current.parentElement,null!==l.current&&l.current.addEventListener("pointerdown",i),()=>{null!==l.current&&l.current?.removeEventListener("pointerdown",i)}},[]),e("span",{ref:Z(t,_),role:"presentation","aria-hidden":!0,className:y(Be,n),onAnimationEnd:()=>{null!==_.current&&_.current.classList.remove(Ne)},...r})});be.displayName="Ripple";var Ie={Spinner:"Spinner__piy",rotation:"rotation__CUP",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",Spinner__spinner:"Spinner__spinner__Qdc"};const Te=r((a,n)=>{const{className:r,size:l=20,appearance:_="primary",...i}=a,o=y(Ie.Spinner,Ie[`Spinner_appearance_${_}`],r);return e("span",{ref:n,role:"status",className:o,...i,children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 20 20",fill:"none",children:[e("g",{clipPath:"url(#spinner)",children:e("g",{transform:"matrix(8.74228e-10 -0.01 0.01 8.74228e-10 10 10)",children:e("foreignObject",{x:"-1120",y:"-1120",width:"2240",height:"2240",children:e("div",{className:Ie.Spinner__spinner})})})}),e("defs",{children:e("clipPath",{id:"spinner",children:e("path",{d:"M8.74228e-07 10C1.35705e-06 4.47715 4.47715 -1.35705e-06 10 -8.74228e-07C15.5228 -3.91405e-07 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 3.91405e-07 15.5228 8.74228e-07 10ZM18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18C14.4183 18 18 14.4183 18 10Z"})})})]})})});Te.displayName="Spinner";var Se={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_small:"Button_size_small__LLG",Button_mode_primary:"Button_mode_primary__lfx",Button_mode_secondary:"Button_mode_secondary__u7i",Button_mode_tertiary:"Button_mode_tertiary__1G9",Button_size_medium:"Button_size_medium__fI9",Button_size_large:"Button_size_large__S2-",Button_mode_link:"Button_mode_link__a3e",Button_appearance_themed:"Button_appearance_themed__z2B",Button_appearance_negative:"Button_appearance_negative__-Iy",Button_appearance_neutral:"Button_appearance_neutral__SAu","Button_appearance_neutral-themed":"Button_appearance_neutral-themed__H03","Button_appearance_contrast-static":"Button_appearance_contrast-static__DgE",Button__spinnerContainer:"Button__spinnerContainer__G4I",Button__ripple:"Button__ripple__jw0"},Ae={Counter:"Counter__0Oj",Counter_appearance_themed:"Counter_appearance_themed__anX",Counter_mode_filled:"Counter_mode_filled__9Uy",Counter_disabled:"Counter_disabled__Nhg",Counter_muted:"Counter_muted__3IJ",Counter_mode_inverse:"Counter_mode_inverse__IIJ",Counter_appearance_neutral:"Counter_appearance_neutral__SN9","Counter_appearance_neutral-themed":"Counter_appearance_neutral-themed__yq8","Counter_appearance_neutral-static":"Counter_appearance_neutral-static__UeR",Counter_appearance_negative:"Counter_appearance_negative__JZg"};const xe=r((a,t)=>{const{className:n,value:r,rounded:l,appearance:_="themed",mode:i="filled",disabled:o=!1,muted:s=!1,...c}=a,p=y(Ae.Counter,Ae[`Counter_appearance_${_}`],Ae[`Counter_mode_${i}`],{[Ae.Counter_disabled]:o,[Ae.Counter_muted]:s},n),u=d(()=>l?Intl.NumberFormat("en",{notation:"compact"}).format(r):r,[l,r]);return e("span",{ref:t,className:p,...c,role:"",children:u})});xe.displayName="Counter";const we=(e,a)=>{if("primary"===a)switch(e){case"themed":case"negative":case"neutral-themed":return"contrast-static";case"contrast-static":return"primary-static";case"neutral":return"contrast"}switch(e){case"themed":return"themed";case"negative":return"negative";case"neutral":return"primary";case"neutral-themed":return"neutral-themed";case"contrast-static":return"contrast-static"}},Le=(e,a)=>"negative"===e?{mode:"primary"===a?"inverse":"filled",appearance:"negative"}:"neutral"===e?{mode:"primary"===a?"inverse":"filled",appearance:"neutral"}:"neutral-themed"===e?{mode:"primary"===a?"inverse":"filled",appearance:"neutral-themed"}:"contrast-static"===e?{mode:"primary"===a?"filled":"inverse",appearance:"neutral-static"}:{mode:"primary"===a?"inverse":"filled",appearance:"themed"},Me=(e,a,t,n)=>s(e)&&e.type===xe?o(e,{...Le(a,t),disabled:n}):e,ze=r((a,n)=>{const{className:r,iconBefore:l,iconAfter:_,indicator:i,children:o,onClick:s,loading:c,disabled:p=!1,asChild:d=!1,innerClassNames:u,stretched:m=!1,size:h="medium",mode:v="primary",appearance:g="themed",...C}=a,f="button",B=d?D:f,N=le(),b=ae({asChild:d,children:o,disabled:p,rootElement:f,loading:c}),I=p||c,T="android"===N&&"link"!==v,S=y(Se.Button,Se[`Button_appearance_${g}`],Se[`Button_mode_${v}`],Se[`Button_size_${h}`],{[Se.Button_loading]:c,[Se.Button_disabled]:p,[Se.Button_stretched]:m,[Se.Button_activeMode_highlight]:!I&&!T,[Se.Button_activeMode_ripple]:!I&&T},r);return t(B,{ref:n,className:S,onClick:e=>{c||s?.(e)},...b,...C,children:[F(l)&&e("span",{className:y(Se.Button__iconBefore,u?.iconBefore),children:l}),c&&e("span",{className:y(Se.Button__spinnerContainer,u?.spinnerContainer),children:e(Te,{className:y(u?.spinner),size:(A=h,"small"===A?20:24),appearance:we(g,v)})}),e(H,{children:X({asChild:d,children:o},a=>e(fe,{className:y(Se.Button__content,u?.content),children:a},"subtree-container"))}),F(i)&&e("span",{className:y(Se.Button__indicator,u?.indicator),children:Me(i,g,v,p)}),F(_)&&e("span",{className:y(Se.Button__iconAfter,u?.iconAfter),children:_}),T&&!I&&e(be,{className:Se.Button__ripple})]});var A});ze.displayName="Button";var De="Tappable__TDG",Ee="Tappable_interactive__fYU",Oe="Tappable_disabled__DQf",ke="Tappable_activeMode_ripple__YMg",He="Tappable_activeMode_highlight__W7X",je="Tappable__ripple__XiX";const $e=r((a,n)=>{const{className:r,disabled:l,asChild:_,children:i,parentChildren:o,as:c="div",...p}=a,d=_?D:c,u=le(),m=ae({asChild:_,children:i,disabled:l,rootElement:c}),h=(({onClick:e,href:a,children:t,asChild:n,parentChildren:r=t})=>n?!(!n||!s(r))&&("href"in r.props||"onClick"in r.props):!!e||!!a)(a),v="android"===u&&h&&!l,g=y(De,{[Ee]:h,[Oe]:l,[He]:!v,[ke]:v},r);return t(d,{ref:n,className:g,...h?m:{},...p,children:[i,v&&e(be,{className:je})]})});$e.displayName="Tappable";var Ue={CellAction:"CellAction__vzN",CellAction_mode_primary:"CellAction_mode_primary__vZQ",CellAction_disabled:"CellAction_disabled__VZA",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 Pe=r((a,n)=>{const{className:r,before:l,children:_,innerClassNames:i,asChild:o=!1,mode:s="primary",height:c="normal",showChevron:p=!1,...d}=a,u=y(Ue.CellAction,Ue[`CellAction_mode_${s}`],Ue[`CellAction_height_${c}`],{[Ue.CellAction_disabled]:d.disabled},r);return t($e,{ref:n,className:u,asChild:o,as:"button",parentChildren:_,...d,children:[F(l)&&e("span",{className:y(Ue.CellAction__before,i?.before),children:l}),e(H,{children:X({asChild:o,children:_},a=>e("span",{className:y(Ue.CellAction__content,i?.content),children:a},"subtree-container"))}),p&&e(f,{className:y(Ue.CellAction__chevron,i?.chevron)})]})});Pe.displayName="CellAction";var Re={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 Ge=r((a,n)=>{const{className:r,titleStyle:l="caps",fullWidth:_=!1,children:i,after:o,innerClassNames:s,...c}=a,p=y(Re.CellHeader,Re[`CellHeader_titleStyle_${l}`],{[Re.CellHeader_fullWidth]:_},r);return t("div",{ref:n,className:p,...c,children:[F(i)&&e("div",{className:y(Re.CellHeader__content,s?.content),children:i}),F(o)&&e("div",{className:y(Re.CellHeader__after,s?.after),children:o})]})});Ge.displayName="CellHeader";var We="ClearableInput__FRL",Ye="ClearableInput__button__GlG";const Xe={ios:e(function(e){return n.createElement("svg",B({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),C||(C=n.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"})))},{}),android:e(function(e){return n.createElement("svg",S({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),I||(I=n.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"})))},{})},Fe=r((a,n)=>{const{className:r,onChange:l,innerClassNames:_,withClearButton:i=!0,disabled:o,...s}=a,p=c(null),[d,m]=u(!s.value&&!s.defaultValue),h=le();return t("span",{className:y(We,r),children:[e("input",{ref:Z(p,n),className:y(_?.input),onChange:e=>{l?.(e),m(!e.target.value)},disabled:o,...s}),!d&&!o&&i&&e(U,{className:y(Ye,_?.clearButton),onClick:()=>{p.current&&((e,a="")=>{const t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;t?.call(e,a);const n=new Event("input",{bubbles:!0});e.dispatchEvent(n)})(p.current)},"aria-label":"Очистить",children:Xe[h]})]})});Fe.displayName="ClearableInput";var qe={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 Ze=r((a,n)=>{const{className:r,height:l="normal",before:_,innerClassNames:i,disabled:o,...s}=a,c=y(qe.CellInput,qe[`CellInput_height_${l}`],{[qe.CellInput_disabled]:o},r);return t("label",{className:c,children:[F(_)&&e(fe,{className:y(qe.CellInput__before,i?.before),maxLines:1,children:_}),e(Fe,{ref:n,className:y(qe.CellInput__body,i?.body),innerClassNames:{input:y(qe.CellInput__input,i?.input),clearButton:y(qe.CellInput__clearButton,i?.clearButton)},type:"text",disabled:o,...s})]})});Ze.displayName="CellInput";var Je={CellList:"CellList__1ou",CellList_filled:"CellList_filled__ikE",CellList__body:"CellList__body__ouS",CellList_mode_island:"CellList_mode_island__aCu"};const Qe=r((a,n)=>{const{className:r,header:l,children:_,mode:i="full-width",filled:o="island"===i,...s}=a,c=y(Je.CellList,Je[`CellList_mode_${i}`],{[Je.CellList_filled]:o},r);return t("div",{ref:n,className:c,...s,children:[F(l)&&e("div",{className:Je.CellList__header,children:l}),e("div",{className:Je.CellList__body,children:_})]})});Qe.displayName="CellList";var Ve={CellSimple:"CellSimple__n0z",CellSimple_disabled:"CellSimple_disabled__T-3",CellSimple__subtitle:"CellSimple__subtitle__oIF",CellSimple__overline:"CellSimple__overline__Ncr",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__title:"CellSimple__title__aYs",CellSimple__chevron:"CellSimple__chevron__cSs"};const Ke=r((a,n)=>{const{className:r,title:l,subtitle:_,before:i,after:o,children:s,overline:c,showChevron:p=!1,asChild:d=!1,disabled:u=!1,innerClassNames:m,height:h="normal",as:v="div",...g}=a,C=y(Ve.CellSimple,Ve[`CellSimple_height_${h}`],{[Ve.CellSimple_disabled]:u},r);return t($e,{ref:n,className:C,asChild:d,as:v,parentChildren:s,...g,children:[F(i)&&e("div",{className:y(Ve.CellSimple__before,m?.before),children:i}),e(H,{children:X({asChild:d,children:s},a=>t("div",{className:y(Ve.CellSimple__content,m?.content),children:[F(c)&&e("div",{className:y(Ve.CellSimple__overline,m?.overline),children:c}),F(l)&&e("div",{className:y(Ve.CellSimple__title,m?.title),children:l}),F(_)&&e("div",{className:y(Ve.CellSimple__subtitle,m?.subtitle),children:_}),a]},"subtree-container"))}),(F(o)||p)&&t("div",{className:y(Ve.CellSimple__after,m?.after),children:[o,p&&e(f,{className:y(Ve.CellSimple__chevron,m?.chevron)})]})]})});Ke.displayName="CellSimple";var ea="Container__MSr",aa="Container_fullWidth__Dor";const ta=r((a,t)=>{const{className:n,asChild:r,fullWidth:l,..._}=a,i=r?D:"div",o=y(ea,{[aa]:l},n);return e(i,{ref:t,className:o,..._})});ta.displayName="Container";var na={Dot:"Dot__dio",Dot_appearance_themed:"Dot_appearance_themed__AJa","Dot_appearance_contrast-pinned":"Dot_appearance_contrast-pinned__i8T","Dot_appearance_neutral-fade":"Dot_appearance_neutral-fade__paA","Dot_appearance_accent-red":"Dot_appearance_accent-red__GZs",Dot_appearance_inherit:"Dot_appearance_inherit__xh2"};const ra=r((a,t)=>{const{className:n,appearance:r="inherit",...l}=a,_=y(na.Dot,na[`Dot_appearance_${r}`],n);return e("span",{ref:t,className:_,...l})});ra.displayName="Dot";var la="Flex__8ia";const _a=r((a,t)=>{const{className:n,display:r="flex",direction:l="row",align:_="flex-start",justify:i="start",asChild:o,wrap:s,style:c,gap:p,gapX:d,gapY:u,...m}=a;return e(o?D:"div",{ref:t,className:y(la,n),style:{flexDirection:l,justifyContent:i,alignItems:_,flexWrap:s,...c,display:r,"--MaxUi-Flex_gapX":Y(d??p??0),"--MaxUi-Flex_gapY":Y(u??p??0)},...m})});_a.displayName="Flex";var ia="Grid__tMN";const oa=r((a,t)=>{const{className:n,style:r,display:l="grid",align:_="start",justify:i="start",gap:o,gapX:s,gapY:c,cols:p,rows:d,asChild:u,...m}=a;return e(u?D:"div",{ref:t,className:y(ia,n),style:{justifyContent:i,alignItems:_,...r,display:l,"--MaxUi-Grid_gapX":Y(s??o??0),"--MaxUi-Grid_gapY":Y(c??o??0),"--MaxUi-Grid_cols":p??0,"--MaxUi-Grid_rows":d??0},...m})});oa.displayName="Grid";const sa=(e,a)=>{if("primary"===a)switch(e){case"themed":case"negative":case"neutral-themed":return"contrast-static";case"neutral":return"contrast";case"contrast-static":return"primary-static"}switch(e){case"themed":return"themed";case"negative":return"negative";case"neutral":return"primary";case"neutral-themed":return"neutral-themed";case"contrast-static":return"contrast-static"}};var ca={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_mode_primary:"IconButton_mode_primary__FqT",IconButton_size_small:"IconButton_size_small__e3f",IconButton_mode_secondary:"IconButton_mode_secondary__d4Q",IconButton_mode_tertiary:"IconButton_mode_tertiary__s90",IconButton_size_medium:"IconButton_size_medium__MQQ",IconButton_size_large:"IconButton_size_large__9oz",IconButton_appearance_themed:"IconButton_appearance_themed__jUC",IconButton_mode_link:"IconButton_mode_link__kNB",IconButton_appearance_negative:"IconButton_appearance_negative__qI2",IconButton_appearance_neutral:"IconButton_appearance_neutral__8iK","IconButton_appearance_neutral-themed":"IconButton_appearance_neutral-themed__xJM","IconButton_appearance_contrast-static":"IconButton_appearance_contrast-static__Fp4",IconButton__spinnerContainer:"IconButton__spinnerContainer__9--",IconButton__ripple:"IconButton__ripple__l8M"};const pa=r((a,n)=>{const{children:r,className:l,disabled:_,innerClassNames:i,loading:o,asChild:s=!1,size:c="medium",mode:p="primary",appearance:d="themed",...u}=a,m="button",h=s?D:m,v=le(),g=ae({asChild:s,children:r,disabled:_,rootElement:m,loading:o}),C=_||o,f="android"===v&&"link"!==p,B=y(ca.IconButton,ca[`IconButton_appearance_${d}`],ca[`IconButton_mode_${p}`],ca[`IconButton_size_${c}`],{[ca.IconButton_loading]:o,[ca.IconButton_disabled]:_,[ca.IconButton_activeMode_highlight]:!C&&!f,[ca.IconButton_activeMode_ripple]:!C&&f},l);return t(h,{ref:n,className:B,...g,...u,children:[o&&e("span",{className:y(ca.IconButton__spinnerContainer,i?.spinnerContainer),children:e(Te,{className:y(i?.spinner),size:(N=c,"small"===N?20:24),appearance:sa(d,p)})}),e(H,{children:X({asChild:s,children:r},a=>e("span",{className:y(ca.IconButton__content,i?.content),children:a},"subtree-container"))}),f&&!C&&e(be,{className:ca.IconButton__ripple})]});var N});pa.displayName="IconButton";var da={Input:"Input__A3w",Input_disabled:"Input_disabled__mpt",Input_compact:"Input_compact__gBl",Input_mode_primary:"Input_mode_primary__2Mr",Input_mode_secondary:"Input_mode_secondary__c6D",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"};const ua=r((a,n)=>{const{className:r,iconBefore:l,iconAfter:_,innerClassNames:i,withClearButton:o,compact:s=!1,mode:c="primary",...p}=a,d=y(da.Input,da[`Input_mode_${c}`],{[da.Input_compact]:s,[da.Input_disabled]:p.disabled},r);return t("label",{className:d,children:[F(l)&&e("div",{className:y(da.Input__iconBefore,i?.iconBefore),children:l}),e(Fe,{ref:n,className:y(da.Input__body,i?.body),withClearButton:o,innerClassNames:{input:y(da.Input__input,i?.input),clearButton:y(da.Input__clearButton,i?.clearButton)},...p}),F(_)&&e("div",{className:y(da.Input__iconAfter,i?.iconAfter),children:_})]})});ua.displayName="Input";var ma={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 ha=l({platform:"ios",colorScheme:"light"}),ya=()=>_(ha),va=r((a,t)=>{const{children:n,className:r,colorScheme:l,platform:_=(q()?"ios":"android")}=a,i=_e({listenChanges:!l}),o=l??i,s=d(()=>({colorScheme:o,platform:_}),[o,_]),c=y(ma.MaxUI,ma[`MaxUI_colorScheme_${o}`],ma[`MaxUI_platform_${_}`],r);return e(ha.Provider,{value:s,children:e("div",{ref:t,className:c,children:n})})});va.displayName="MaxUI";var ga={Panel:"Panel__kpB",Panel_centeredX:"Panel_centeredX__jxE",Panel_centeredY:"Panel_centeredY__fp1",Panel_mode_primary:"Panel_mode_primary__hES",Panel_mode_secondary:"Panel_mode_secondary__yer"};const Ca=r((a,t)=>{const{className:n,mode:r="primary",centeredX:l,centeredY:_,...i}=a,o=y(ga.Panel,ga[`Panel_mode_${r}`],{[ga.Panel_centeredX]:l,[ga.Panel_centeredY]:_},n);return e("div",{ref:t,className:o,...i})});Ca.displayName="Panel";var fa={SearchInput:"SearchInput__cI6",SearchInput__body:"SearchInput__body__WUT",SearchInput__icon:"SearchInput__icon__dsa",SearchInput__clearButton:"SearchInput__clearButton__qsm",SearchInput__input:"SearchInput__input__xoX",SearchInput_platform_ios:"SearchInput_platform_ios__Sn7",SearchInput_platform_android:"SearchInput_platform_android__QG9"};const Ba=r((a,n)=>{const{className:r,placeholder:l="Поиск",innerClassNames:_,...i}=a,o=le(),s=y(fa.SearchInput,fa[`SearchInput_platform_${o}`],r);return t("label",{className:s,children:[e(T,{className:fa.SearchInput__icon}),e(Fe,{ref:n,className:y(fa.SearchInput__body,_?.body),innerClassNames:{input:y(fa.SearchInput__input,_?.input),clearButton:y(fa.SearchInput__clearButton,_?.clearButton)},type:"text",placeholder:l,...i})]})});Ba.displayName="SearchInput";var Na={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 ba=r((a,n)=>{const{className:r,...l}=a,_=le(),i=y(Na.Switch,Na[`Switch_platform_${_}`],r);return t("span",{className:i,children:[e("input",{ref:n,type:"checkbox",role:"switch",className:Na.Switch__input,...l}),e("span",{className:Na.Switch__toggle,children:e("span",{className:Na.Switch__thumb})})]})});ba.displayName="Switch";var Ia={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 Ta=r((a,t)=>{const{className:n,innerClassNames:r,mode:l="primary",..._}=a,i=y(Ia.Textarea,Ia[`Textarea_mode_${l}`],{[Ia.Textarea_disabled]:_.disabled},n);return e("div",{className:i,children:e("textarea",{ref:t,className:y(Ia.Textarea__textarea,r?.textarea),..._})})});Ta.displayName="Textarea";var Sa={ToolButton:"ToolButton__lde",ToolButton_appearance_default:"ToolButton_appearance_default__gqg",ToolButton_disabled:"ToolButton_disabled__gq5",ToolButton_appearance_secondary:"ToolButton_appearance_secondary__ghs",ToolButton_withLabel:"ToolButton_withLabel__FsL",ToolButton__icon:"ToolButton__icon__ds5",ToolButton__label:"ToolButton__label__GCi"};const Aa=r((a,n)=>{const{className:r,icon:l,children:_,asChild:i,innerClassNames:o,appearance:s="default",disabled:c=!1,...p}=a,d=y(Sa.ToolButton,Sa[`ToolButton_appearance_${s}`],{[Sa.ToolButton_withLabel]:F(_),[Sa.ToolButton_disabled]:c},r);return t($e,{ref:n,className:d,as:"button",parentChildren:_,asChild:i,disabled:c,...p,children:[F(l)&&e("span",{className:y(Sa.ToolButton__icon,o?.icon),children:l}),F(_)&&e(H,{children:X({asChild:i,children:_},a=>e(fe,{maxLines:1,className:y(Sa.ToolButton__label,o?.label),children:a},"subtree-container"))})]})});Aa.displayName="ToolButton";var xa={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 wa=r((a,t)=>{const{className:n,variant:r="large",asChild:l,..._}=a,i=l?D:"span",o=y(xa.TypographyAction,xa[`TypographyAction_variant_${r}`],n);return e(i,{ref:t,className:o,..._})});wa.displayName="TypographyAction";var La={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 Ma=r((a,t)=>{const{className:n,variant:r="large-strong",asChild:l,..._}=a,i=l?D:"span",o=y(La.TypographyBody,La[`TypographyBody_variant_${r}`],n);return e(i,{ref:t,className:o,..._})});Ma.displayName="TypographyBody";var za="TypographyDisplay__6MW";const Da=r((a,t)=>{const{className:n,asChild:r,...l}=a;return e(r?D:"span",{ref:t,className:y(za,n),...l})});Da.displayName="TypographyDisplay";var Ea={"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 Oa=r((a,t)=>{const{className:n,variant:r="large-strong",asChild:l,..._}=a,i=l?D:"span",o=y(Ea.TypographyHeadline,Ea[`TypographyHeadline_variant_${r}`],n);return e(i,{ref:t,className:o,..._})});Oa.displayName="TypographyHeadline";var ka={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 Ha=r((a,t)=>{const{className:n,variant:r="large",asChild:l,..._}=a,i=l?D:"span",o=y(ka.TypographyLabel,ka[`TypographyLabel_variant_${r}`],n);return e(i,{ref:t,className:o,..._})});Ha.displayName="TypographyLabel";var ja={"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 $a=r((a,t)=>{const{className:n,variant:r="large-strong",asChild:l,..._}=a,i=l?D:"span",o=y(ja.TypographyTitle,ja[`TypographyTitle_variant_${r}`],n);return e(i,{ref:t,className:o,..._})});$a.displayName="TypographyTitle";const Ua=Object.assign({},{Display:Da,Headline:Oa,Title:$a,Body:Ma,Label:Ha,Action:wa});export{ye as Avatar,ze as Button,Pe as CellAction,Ge as CellHeader,Ze as CellInput,Qe as CellList,Ke as CellSimple,ta as Container,xe as Counter,ra as Dot,fe as EllipsisText,_a as Flex,oa as Grid,pa as IconButton,ua as Input,va as MaxUI,ha as MaxUIContext,Ca as Panel,be as Ripple,D as Root,Ba as SearchInput,D as Slot,H as Slottable,Te as Spinner,U as SvgButton,ba as Switch,$e as Tappable,Ta as Textarea,Aa as ToolButton,Ua as Typography,z as createSlot,k as createSlottable,ya as useAppearance,ae as useButtonLikeProps,te as useCallbackRef,ne as useColorScheme,re as useImageLoadingStatus,le as usePlatform,_e as useSystemColorScheme};
|