animal-island-ui 0.7.2 → 0.7.3

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/AI_USAGE.md CHANGED
@@ -13,7 +13,7 @@ npm install animal-island-ui
13
13
  ```ts
14
14
  // app entry (main.tsx / _app.tsx / App.tsx)
15
15
  import 'animal-island-ui/style'; // MUST import BEFORE any component usage
16
- // Fonts (Nunito / Zen Maru Gothic / M PLUS Rounded 1c) are auto-bundled via @fontsource.
16
+ // Fonts (Nunito / Noto Sans SC / Zen Maru Gothic) are auto-bundled via @fontsource.
17
17
  ```
18
18
 
19
19
  ```ts
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),o=require("react"),K=require("react-dom"),z="animal-btn-QoKe1",J="animal-btn-small-6Srsd",X="animal-btn-middle-zEXqv",Z="animal-btn-large-k9IvA",Q="animal-btn-default-L7yE6",_="animal-btn-primary-9tMG9",aa="animal-btn-dashed-wzZ-i",na="animal-btn-text-Tope4",ea="animal-btn-link-pURnf",ia="animal-btn-danger-zQ4kF",ta="animal-btn-ghost-Ykty4",ca="animal-btn-block-MC4pp",sa="animal-btn-loading-PfXLM",la="animal-animal-btn-loading-Rf1hg",oa="animal-btn-icon-P5CS9",y={btn:z,"btn-small":"animal-btn-small-6Srsd",btnSmall:J,"btn-middle":"animal-btn-middle-zEXqv",btnMiddle:X,"btn-large":"animal-btn-large-k9IvA",btnLarge:Z,"btn-default":"animal-btn-default-L7yE6",btnDefault:Q,"btn-primary":"animal-btn-primary-9tMG9",btnPrimary:_,"btn-dashed":"animal-btn-dashed-wzZ-i",btnDashed:aa,"btn-text":"animal-btn-text-Tope4",btnText:na,"btn-link":"animal-btn-link-pURnf",btnLink:ea,"btn-danger":"animal-btn-danger-zQ4kF",btnDanger:ia,"btn-ghost":"animal-btn-ghost-Ykty4",btnGhost:ta,"btn-block":"animal-btn-block-MC4pp",btnBlock:ca,"btn-loading":"animal-btn-loading-PfXLM",btnLoading:sa,"animal-btn-loading":"animal-animal-btn-loading-Rf1hg",animalBtnLoading:la,"btn-icon":"animal-btn-icon-P5CS9",btnIcon:oa},L=({type:n="default",size:e="middle",danger:t=!1,ghost:i=!1,block:s=!1,loading:c=!1,disabled:r=!1,icon:m,htmlType:l="button",children:p,className:h,...w})=>{const u=[y.btn,y[`btn-${n}`],y[`btn-${e}`],t&&y["btn-danger"],i&&y["btn-ghost"],s&&y["btn-block"],c&&y["btn-loading"],h].filter(Boolean).join(" ");return a.jsxs("button",{type:l,className:u,disabled:r,...w,children:[m&&!c&&a.jsx("span",{className:y["btn-icon"],children:m}),p&&a.jsx("span",{children:p})]})};L.displayName="Button";const ra="animal-wrapper-IRrhj",da="animal-wrapper-disabled-MWwHK",ma="animal-input-12WUn",pa="animal-wrapper-small-mWvja",ha="animal-wrapper-middle-zXqMR",ua="animal-wrapper-large-RrYM4",wa="animal-wrapper-error-W-VRo",ba="animal-wrapper-warning-miO7A",fa="animal-prefix-g8f1R",ga="animal-suffix-o7ywP",ya="animal-clear-HuR2N",C={wrapper:ra,"wrapper-disabled":"animal-wrapper-disabled-MWwHK",wrapperDisabled:da,input:ma,"wrapper-small":"animal-wrapper-small-mWvja",wrapperSmall:pa,"wrapper-middle":"animal-wrapper-middle-zXqMR",wrapperMiddle:ha,"wrapper-large":"animal-wrapper-large-RrYM4",wrapperLarge:ua,"wrapper-error":"animal-wrapper-error-W-VRo",wrapperError:wa,"wrapper-warning":"animal-wrapper-warning-miO7A",wrapperWarning:ba,prefix:fa,suffix:ga,clear:ya},R=({size:n="middle",prefix:e,suffix:t,allowClear:i=!1,status:s,disabled:c=!1,className:r,value:m,defaultValue:l,onChange:p,onClear:h,...w})=>{const[u,k]=o.useState(l??""),b=m!==void 0,j=b?m:u,I=o.useCallback(D=>{b||k(D.target.value),p?.(D)},[b,p]),S=o.useCallback(()=>{b||k(""),h?.();const D=new Event("input",{bubbles:!0}),A={value:""};p?.({target:A,currentTarget:A,nativeEvent:D})},[b,p,h]),g=[C.wrapper,C[`wrapper-${n}`],s&&C[`wrapper-${s}`],c&&C["wrapper-disabled"],r].filter(Boolean).join(" ");return a.jsxs("span",{className:g,children:[e&&a.jsx("span",{className:C.prefix,children:e}),a.jsx("input",{className:C.input,disabled:c,value:j,onChange:I,...w}),i&&j&&!c&&a.jsx("span",{className:C.clear,onClick:S,role:"button",tabIndex:-1,children:"×"}),t&&a.jsx("span",{className:C.suffix,children:t})]})};R.displayName="Input";const Ca="animal-switch-disabled-U5tjL",xa="animal-switch-checked-6HKL4",ja="animal-switch-small-jkWtD",va="animal-handle-KgZ7M",ka="animal-inner-5x97M",Da="animal-switch-loading--3JYL",Na="animal-spinner-QK4sP",La="animal-animal-spin-P6YYa",x={switch:"animal-switch-NQPLj","switch-disabled":"animal-switch-disabled-U5tjL",switchDisabled:Ca,"switch-checked":"animal-switch-checked-6HKL4",switchChecked:xa,"switch-small":"animal-switch-small-jkWtD",switchSmall:ja,handle:va,inner:ka,"switch-loading":"animal-switch-loading--3JYL",switchLoading:Da,spinner:Na,"animal-spin":"animal-animal-spin-P6YYa",animalSpin:La},q=({checked:n,defaultChecked:e=!1,size:t="default",disabled:i=!1,loading:s=!1,checkedChildren:c,unCheckedChildren:r,onChange:m,className:l})=>{const[p,h]=o.useState(e),w=n!==void 0,u=w?n:p,k=o.useCallback(()=>{if(i||s)return;const j=!u;w||h(j),m?.(j)},[i,s,u,w,m]),b=[x.switch,x[`switch-${t}`],u&&x["switch-checked"],i&&x["switch-disabled"],s&&x["switch-loading"],l].filter(Boolean).join(" ");return a.jsxs("button",{type:"button",role:"switch","aria-checked":u,className:b,onClick:k,disabled:i,children:[a.jsx("span",{className:x.handle,children:s&&a.jsx("span",{className:x.spinner})}),a.jsx("span",{className:x.inner,children:u?c:r})]})};q.displayName="Switch";const M=({children:n,className:e,style:t})=>a.jsx("div",{className:`animal-cursor${e?` ${e}`:""}`,style:t,children:n});M.displayName="Cursor";const $=n=>n==null||typeof n=="boolean"?0:typeof n=="string"||typeof n=="number"?String(n).length:Array.isArray(n)?n.reduce((e,t)=>e+$(t),0):o.isValidElement(n)?$(n.props.children):0,E=(n,e,t="tw")=>{if(e.stopped||n==null||typeof n=="boolean")return null;if(typeof n=="string"||typeof n=="number"){const i=String(n);if(e.remaining>=i.length)return e.remaining-=i.length,i;const s=i.slice(0,e.remaining);return e.remaining=0,e.stopped=!0,s}if(Array.isArray(n))return n.map((i,s)=>a.jsx(o.Fragment,{children:E(i,e,`${t}-${s}`)},`${t}-${s}`));if(o.isValidElement(n)){const i=n.props,s=E(i.children,e,t);return o.cloneElement(n,void 0,s)}return null},P=({children:n,speed:e=90,trigger:t,autoPlay:i=!0,onDone:s})=>{const c=o.useMemo(()=>$(n),[n]),[r,m]=o.useState(i?0:c),l=o.useRef(null);o.useEffect(()=>{if(l.current&&window.clearInterval(l.current),!i){m(c);return}if(m(0),c!==0)return l.current=window.setInterval(()=>{m(h=>h>=c?(l.current&&window.clearInterval(l.current),h):h+1)},e),()=>{l.current&&window.clearInterval(l.current)}},[c,e,t,i]),o.useEffect(()=>{c>0&&r>=c&&s?.()},[r,c]);const p={remaining:r,stopped:!1};return a.jsx(a.Fragment,{children:E(n,p)})};P.displayName="Typewriter";const Ma="animal-mask-hAWeP",Ia="animal-modal-d0zyM",Sa="animal-modalClipped-7IuAw",Ta="animal-header-udOSi",Ba="animal-title-s6pv3",$a="animal-body--aiyx",Ea="animal-footer-9Ib-a",v={mask:Ma,modal:Ia,modalClipped:Sa,header:Ta,title:Ba,body:$a,footer:Ea},Pa=()=>a.jsx("svg",{style:{position:"absolute",width:0,height:0},"aria-hidden":!0,children:a.jsx("clipPath",{id:"animal-modal-clip",clipPathUnits:"objectBoundingBox",children:a.jsx("path",{d:"M0.501,0.005 L0.501,0.005 L0.523,0.005 L0.549,0.006 C0.704,0.01,0.796,0.017,0.825,0.027 L0.827,0.028 C0.872,0.045,0.939,0.044,0.978,0.17 C1,0.254,1,0.365,0.99,0.505 L0.988,0.513 C0.979,0.558,0.971,0.598,0.965,0.633 C0.956,0.689,0.979,0.77,0.964,0.865 C0.953,0.928,0.921,0.966,0.869,0.979 C0.821,0.986,0.773,0.992,0.726,0.995 L0.712,0.996 L0.694,0.997 C0.648,1,0.586,1,0.507,1 L0.501,1 L0.464,1 C0.385,1,0.325,0.998,0.283,0.995 C0.234,0.992,0.184,0.987,0.133,0.979 C0.081,0.966,0.05,0.928,0.039,0.865 C0.023,0.77,0.047,0.689,0.037,0.633 C0.031,0.595,0.023,0.552,0.013,0.505 C-0.006,0.365,-0.002,0.254,0.024,0.17 C0.064,0.045,0.13,0.045,0.174,0.028 L0.175,0.028 C0.204,0.017,0.303,0.009,0.474,0.005 L0.501,0.005"})})}),Y=({open:n,title:e,width:t=520,maskClosable:i=!0,closable:s=!0,footer:c,onClose:r,onOk:m,children:l,className:p,typeSpeed:h=80,typewriter:w=!0})=>{const[u,k]=o.useState(0);o.useEffect(()=>{n&&k(g=>g+1)},[n]),o.useEffect(()=>{if(!n)return;const g=D=>{D.key==="Escape"&&r?.()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n,r]),o.useEffect(()=>(n&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow=""}),[n]);const b=o.useCallback(()=>{i&&r?.()},[i,r]),j=o.useCallback(g=>{g.stopPropagation()},[]);if(!n)return null;const I=a.jsxs(a.Fragment,{children:[a.jsx(L,{type:"primary",onClick:r,children:"取消"}),a.jsx(L,{type:"primary",onClick:m,children:"确定"})]}),S=a.jsx(M,{children:a.jsx("div",{className:v.mask,onClick:b,children:a.jsxs("div",{className:[v.modal,p].filter(Boolean).join(" "),style:{width:t},onClick:j,role:"dialog","aria-modal":"true",children:[a.jsx(Pa,{}),a.jsxs("div",{className:v.modalClipped,children:[(e||s)&&a.jsx("div",{className:v.header,children:e&&a.jsx("div",{className:v.title,children:e})}),a.jsx("div",{className:v.body,children:w?a.jsx(P,{speed:h,trigger:u,children:l}):l}),c!==null&&a.jsx("div",{className:v.footer,children:c===void 0?I:c})]})]})})});return K.createPortal(S,document.body)};Y.displayName="Modal";const Aa="animal-card-DJ515",Ha="animal-card-title-PL-WB",Wa="animal-card-app-pink-3Eo8d",Ra="animal-card-purple-Gq7sR",qa="animal-card-app-blue-GHH1a",Ya="animal-card-app-yellow-DWB-L",Oa="animal-card-app-orange-V5yD7",Va="animal-card-app-teal-R5kFG",Fa="animal-card-app-green-xlNUs",Ga="animal-card-app-red-DzE0l",Ua="animal-card-lime-green-KiJbe",Ka="animal-card-yellow-green-4c-lF",za="animal-card-brown-hLCrx",Ja="animal-card-warm-peach-pink-RlSVo",T={card:Aa,"card-title":"animal-card-title-PL-WB",cardTitle:Ha,"card-app-pink":"animal-card-app-pink-3Eo8d",cardAppPink:Wa,"card-purple":"animal-card-purple-Gq7sR",cardPurple:Ra,"card-app-blue":"animal-card-app-blue-GHH1a",cardAppBlue:qa,"card-app-yellow":"animal-card-app-yellow-DWB-L",cardAppYellow:Ya,"card-app-orange":"animal-card-app-orange-V5yD7",cardAppOrange:Oa,"card-app-teal":"animal-card-app-teal-R5kFG",cardAppTeal:Va,"card-app-green":"animal-card-app-green-xlNUs",cardAppGreen:Fa,"card-app-red":"animal-card-app-red-DzE0l",cardAppRed:Ga,"card-lime-green":"animal-card-lime-green-KiJbe",cardLimeGreen:Ua,"card-yellow-green":"animal-card-yellow-green-4c-lF",cardYellowGreen:Ka,"card-brown":"animal-card-brown-hLCrx",cardBrown:za,"card-warm-peach-pink":"animal-card-warm-peach-pink-RlSVo",cardWarmPeachPink:Ja},O=({type:n="default",color:e="default",children:t,className:i,style:s,...c})=>{const r=[T.card,n==="title"&&T["card-title"],e!=="default"&&T[`card-${e}`],i].filter(Boolean).join(" ");return a.jsx("div",{className:r,style:s,...c,children:t})};O.displayName="Card";const Xa="animal-footer-5DMOR",Za="animal-tree-KZ8hX",H={footer:Xa,tree:Za},V=({type:n="sea",className:e,style:t})=>{const i=[H.footer,H[n],e].filter(Boolean).join(" ");return a.jsx("div",{className:i,style:t})};V.displayName="Footer";const Qa="animal-faqCard-5jlOE",_a="animal-disabled-9DAjm",an="animal-questionHeader-iqP87",nn="animal-questionIcon-xRkdp",en="animal-expanded-a8Eze",tn="animal-questionText-jVpUv",cn="animal-leafDecoration-RoK4H",sn="animal-answerWrapper-tzFtx",ln="animal-answerContent-ppsk-",f={faqCard:Qa,disabled:_a,questionHeader:an,questionIcon:nn,expanded:en,questionText:tn,leafDecoration:cn,answerWrapper:sn,answerContent:ln},F=({question:n,answer:e,defaultExpanded:t=!1,disabled:i=!1,className:s,style:c})=>{const[r,m]=o.useState(t),l=()=>{i||m(!r)},p=[f.faqCard,r&&f.expanded,i&&f.disabled,s].filter(Boolean).join(" ");return a.jsxs("div",{className:p,style:c,children:[a.jsxs("button",{className:f.questionHeader,onClick:l,disabled:i,"aria-expanded":r,children:[a.jsx("span",{className:f.questionIcon,children:r?"−":"+"}),a.jsx("span",{className:f.questionText,children:n}),a.jsx("span",{className:f.leafDecoration,children:a.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",children:a.jsx("path",{fill:"currentColor",d:"M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z"})})})]}),a.jsx("div",{className:f.answerWrapper,children:a.jsx("div",{className:f.answerContent,children:e})})]})};F.displayName="Collapse";const on="animal-acDatetime-hVKh7",rn="animal-acDate-rhO3k",dn="animal-acWeekday-bxDHR",mn="animal-acMonthday-1jUmX",pn="animal-acTime-S-twb",hn="animal-acColon-g4vuJ",N={acDatetime:on,acDate:rn,acWeekday:dn,acMonthday:mn,acTime:pn,acColon:hn},un=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],wn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],G=({className:n})=>{const[e,t]=o.useState(new Date);return o.useEffect(()=>{const i=setInterval(()=>t(new Date),1e3);return()=>clearInterval(i)},[]),a.jsx(M,{children:a.jsxs("div",{className:`${N.acDatetime} ${n||""}`,children:[a.jsxs("div",{className:N.acDate,children:[a.jsx("span",{className:N.acWeekday,children:un[e.getDay()]}),a.jsxs("span",{className:N.acMonthday,children:[wn[e.getMonth()]," ",e.getDate()]})]}),a.jsxs("div",{className:N.acTime,children:[e.getHours().toString().padStart(2,"0"),a.jsx("span",{className:N.acColon,children:":"}),e.getMinutes().toString().padStart(2,"0")]})]})})};G.displayName="Time";const bn="animal-phoneContainer-49yKw",fn="animal-phone-bXgSa",gn="animal-statusBar-Vb96q",yn="animal-time-cokU-",Cn="animal-signalIcons-TuL3l",xn="animal-screenContent-oyJF-",jn="animal-homeScreen-no2yS",vn="animal-grasswave-l6cyA",kn="animal-dateDisplay-cnvu8",Dn="animal-dateDisplayHeader-32i0J",Nn="animal-blink--R0wf",Ln="animal-dayText-7NEMb",Mn="animal-appsGrid-opTs8",In="animal-appItem-1NmDt",Sn="animal-appIcon-tTPIg",Tn="animal-iconBounce-n4Boc",Bn="animal-appIconOffset-b5SZG",$n="animal-iconBounceOffset-XfsXI",En="animal-appItemOffset-FEStg",Pn="animal-iconCamera-c-grH",An="animal-iconMiles-L9Cow",Hn="animal-iconCritterpedia-okU95",Wn="animal-iconDiy-gZgxn",Rn="animal-iconDesign-YvE9z",qn="animal-iconMap-xmfHe",Yn="animal-iconVariant-k-kkB",On="animal-iconHelicopter-HV-TH",Vn="animal-iconChat-TVZXY",Fn="animal-iconWifi-RoLJH",Gn="animal-iconLocation-YfhoK",Un="animal-iconPage-wMmBC",Kn="animal-badge-drGmk",zn="animal-pageIndicator-mQ-Pg",d={phoneContainer:bn,phone:fn,statusBar:gn,time:yn,signalIcons:Cn,screenContent:xn,homeScreen:jn,grasswave:vn,dateDisplay:kn,dateDisplayHeader:Dn,blink:Nn,dayText:Ln,appsGrid:Mn,appItem:In,appIcon:Sn,iconBounce:Tn,appIconOffset:Bn,iconBounceOffset:$n,appItemOffset:En,iconCamera:Pn,iconMiles:An,iconCritterpedia:Hn,iconDiy:Wn,iconDesign:Rn,iconMap:qn,iconVariant:Yn,iconHelicopter:On,iconChat:Vn,iconWifi:Fn,iconLocation:Gn,iconPage:Un,badge:Kn,pageIndicator:zn},Jn=[{id:"camera",iconClass:"iconCamera",color:"#B77DEE",hasNewMessage:!0},{id:"app",iconClass:"iconMiles",color:"#889DF0",offset:!0},{id:"critterpedia",iconClass:"iconCritterpedia",color:"#F7CD67"},{id:"diy",iconClass:"iconDiy",color:"#E59266"},{id:"shopping",iconClass:"iconDesign",color:"#F8A6B2"},{id:"variant",iconClass:"iconMap",color:"#82D5BB",hasNewMessage:!0},{id:"design",iconClass:"iconVariant",color:"#8AC68A"},{id:"map",iconClass:"iconHelicopter",color:"#FC736D"},{id:"chat",iconClass:"iconChat",color:"#D1DA49"}],Xn=({className:n})=>{const[e,t]=o.useState(new Date);o.useEffect(()=>{const l=setInterval(()=>{t(new Date)},1e3);return()=>clearInterval(l)},[]);const i=e.getHours(),s=e.getMinutes(),c=i>=12?"PM":"AM",r=i%12||12,m=s.toString().padStart(2,"0");return a.jsx("div",{className:`${d.phoneContainer} ${n||""}`,children:a.jsx("div",{className:d.phone,children:a.jsx("div",{className:d.screenContent,children:a.jsxs("div",{className:d.homeScreen,children:[a.jsxs("div",{className:d.dateDisplay,children:[a.jsxs("div",{className:d.dateDisplayHeader,children:[a.jsx("span",{className:d.iconWifi}),a.jsxs("div",{children:[r,a.jsx("span",{className:d.blink,children:":"}),m,c]}),a.jsx("span",{className:d.iconLocation})]}),a.jsx("div",{className:d.dayText,children:"Welcome!"})]}),a.jsx("div",{className:d.appsGrid,children:Jn.map(l=>a.jsxs("div",{className:`${d.appItem} ${l.offset?d.appItemOffset:""}`,style:{backgroundColor:l.color},children:[l.hasNewMessage&&a.jsx("span",{className:d.badge}),a.jsx("span",{className:`${d.appIcon} ${d[l.iconClass]} ${l.offset?d.appIconOffset:""}`})]},l.id))}),a.jsx("div",{className:d.pageIndicator,children:a.jsx("span",{className:d.iconPage})})]})})})})},Zn="animal-divider-ZBhpE",Qn="animal-line-teal-Z80hb",_n="animal-line-white-VDY1E",ae="animal-line-yellow-ifvJz",ne="animal-wave-yellow-AO-io",W={divider:Zn,"line-teal":"animal-line-teal-Z80hb",lineTeal:Qn,"line-white":"animal-line-white-VDY1E",lineWhite:_n,"line-yellow":"animal-line-yellow-ifvJz",lineYellow:ae,"wave-yellow":"animal-wave-yellow-AO-io",waveYellow:ne},U=({type:n="line-brown",className:e,style:t})=>{const i=[W.divider,W[n],e].filter(Boolean).join(" ");return a.jsx("div",{className:i,style:t})};U.displayName="Divider";const ee="animal-icon-wUFR-",ie="animal-iconBounce-Q1e3X",te="animal-icon-miles-oVFnM",ce="animal-icon-camera-W9x4U",se="animal-icon-chat-dfYOk",le="animal-icon-critterpedia-vDPSY",oe="animal-icon-design-8gBms",re="animal-icon-diy-AwPHs",de="animal-icon-helicopter-w6ZL6",me="animal-icon-map-ogQk4",pe="animal-icon-shopping-TSh2U",he="animal-icon-variant-E6wqy",ue="animal-iconList-MRyTC",we="animal-iconListItem-nTF3l",be="animal-iconListLabel-t2M3-",B={icon:ee,"icon-bounce":"animal-icon-bounce-1MvWH",iconBounce:ie,"icon-miles":"animal-icon-miles-oVFnM",iconMiles:te,"icon-camera":"animal-icon-camera-W9x4U",iconCamera:ce,"icon-chat":"animal-icon-chat-dfYOk",iconChat:se,"icon-critterpedia":"animal-icon-critterpedia-vDPSY",iconCritterpedia:le,"icon-design":"animal-icon-design-8gBms",iconDesign:oe,"icon-diy":"animal-icon-diy-AwPHs",iconDiy:re,"icon-helicopter":"animal-icon-helicopter-w6ZL6",iconHelicopter:de,"icon-map":"animal-icon-map-ogQk4",iconMap:me,"icon-shopping":"animal-icon-shopping-TSh2U",iconShopping:pe,"icon-variant":"animal-icon-variant-E6wqy",iconVariant:he,iconList:ue,iconListItem:we,iconListLabel:be},fe=({name:n,size:e=24,className:t,style:i,bounce:s=!1,...c})=>a.jsx("span",{className:`${B.icon} ${B[n]} ${s?B["icon-bounce"]:""} ${t||""}`,style:{width:e,height:e,...i},...c}),ge=[{name:"icon-miles",label:"NookMiles"},{name:"icon-camera",label:"Camera"},{name:"icon-chat",label:"Chat"},{name:"icon-critterpedia",label:"Critterpedia"},{name:"icon-design",label:"Design"},{name:"icon-diy",label:"DIY"},{name:"icon-helicopter",label:"Helicopter"},{name:"icon-map",label:"Map"},{name:"icon-shopping",label:"Shopping"},{name:"icon-variant",label:"Variant"}];exports.Button=L;exports.Card=O;exports.Collapse=F;exports.Cursor=M;exports.Divider=U;exports.Footer=V;exports.ICON_LIST=ge;exports.Icon=fe;exports.Input=R;exports.Modal=Y;exports.Phone=Xn;exports.Switch=q;exports.Time=G;exports.Typewriter=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),J=require("react-dom"),X="animal-btn-QoKe1",Z="animal-btn-small-6Srsd",Q="animal-btn-middle-zEXqv",_="animal-btn-large-k9IvA",aa="animal-btn-default-L7yE6",na="animal-btn-primary-9tMG9",ea="animal-btn-dashed-wzZ-i",ia="animal-btn-text-Tope4",ta="animal-btn-link-pURnf",sa="animal-btn-danger-zQ4kF",la="animal-btn-ghost-Ykty4",oa="animal-btn-block-MC4pp",ca="animal-btn-loading-PfXLM",ra="animal-animal-btn-loading-Rf1hg",da="animal-btn-icon-P5CS9",j={btn:X,"btn-small":"animal-btn-small-6Srsd",btnSmall:Z,"btn-middle":"animal-btn-middle-zEXqv",btnMiddle:Q,"btn-large":"animal-btn-large-k9IvA",btnLarge:_,"btn-default":"animal-btn-default-L7yE6",btnDefault:aa,"btn-primary":"animal-btn-primary-9tMG9",btnPrimary:na,"btn-dashed":"animal-btn-dashed-wzZ-i",btnDashed:ea,"btn-text":"animal-btn-text-Tope4",btnText:ia,"btn-link":"animal-btn-link-pURnf",btnLink:ta,"btn-danger":"animal-btn-danger-zQ4kF",btnDanger:sa,"btn-ghost":"animal-btn-ghost-Ykty4",btnGhost:la,"btn-block":"animal-btn-block-MC4pp",btnBlock:oa,"btn-loading":"animal-btn-loading-PfXLM",btnLoading:ca,"animal-btn-loading":"animal-animal-btn-loading-Rf1hg",animalBtnLoading:ra,"btn-icon":"animal-btn-icon-P5CS9",btnIcon:da},B=({type:n="default",size:e="middle",danger:s=!1,ghost:i=!1,block:l=!1,loading:t=!1,disabled:p=!1,icon:m,htmlType:r="button",children:u,className:f,...w})=>{const b=[j.btn,j[`btn-${n}`],j[`btn-${e}`],s&&j["btn-danger"],i&&j["btn-ghost"],l&&j["btn-block"],t&&j["btn-loading"],f].filter(Boolean).join(" ");return a.jsxs("button",{type:r,className:b,disabled:p,...w,children:[m&&!t&&a.jsx("span",{className:j["btn-icon"],children:m}),u&&a.jsx("span",{children:u})]})};B.displayName="Button";const pa="animal-wrapper-IRrhj",ma="animal-wrapper-disabled-MWwHK",ha="animal-input-12WUn",ua="animal-wrapper-small-mWvja",wa="animal-wrapper-middle-zXqMR",fa="animal-wrapper-large-RrYM4",ba="animal-wrapper-error-W-VRo",ga="animal-wrapper-warning-miO7A",ya="animal-prefix-g8f1R",Ca="animal-suffix-o7ywP",xa="animal-clear-HuR2N",k={wrapper:pa,"wrapper-disabled":"animal-wrapper-disabled-MWwHK",wrapperDisabled:ma,input:ha,"wrapper-small":"animal-wrapper-small-mWvja",wrapperSmall:ua,"wrapper-middle":"animal-wrapper-middle-zXqMR",wrapperMiddle:wa,"wrapper-large":"animal-wrapper-large-RrYM4",wrapperLarge:fa,"wrapper-error":"animal-wrapper-error-W-VRo",wrapperError:ba,"wrapper-warning":"animal-wrapper-warning-miO7A",wrapperWarning:ga,prefix:ya,suffix:Ca,clear:xa},O=({size:n="middle",prefix:e,suffix:s,allowClear:i=!1,status:l,disabled:t=!1,className:p,value:m,defaultValue:r,onChange:u,onClear:f,...w})=>{const[b,v]=c.useState(r??""),d=m!==void 0,y=d?m:b,S=c.useCallback(C=>{d||v(C.target.value),u?.(C)},[d,u]),D=c.useCallback(()=>{d||v(""),f?.();const C=new Event("input",{bubbles:!0}),I={value:""};u?.({target:I,currentTarget:I,nativeEvent:C})},[d,u,f]),o=[k.wrapper,k[`wrapper-${n}`],l&&k[`wrapper-${l}`],t&&k["wrapper-disabled"],p].filter(Boolean).join(" ");return a.jsxs("span",{className:o,children:[e&&a.jsx("span",{className:k.prefix,children:e}),a.jsx("input",{className:k.input,disabled:t,value:y,onChange:S,...w}),i&&y&&!t&&a.jsx("span",{className:k.clear,onClick:D,role:"button",tabIndex:-1,children:"×"}),s&&a.jsx("span",{className:k.suffix,children:s})]})};O.displayName="Input";const va="animal-switch-disabled-U5tjL",ja="animal-switch-checked-6HKL4",ka="animal-switch-small-jkWtD",Na="animal-handle-KgZ7M",Da="animal-inner-5x97M",La="animal-switch-loading--3JYL",Ma="animal-spinner-QK4sP",Sa="animal-animal-spin-P6YYa",N={switch:"animal-switch-NQPLj","switch-disabled":"animal-switch-disabled-U5tjL",switchDisabled:va,"switch-checked":"animal-switch-checked-6HKL4",switchChecked:ja,"switch-small":"animal-switch-small-jkWtD",switchSmall:ka,handle:Na,inner:Da,"switch-loading":"animal-switch-loading--3JYL",switchLoading:La,spinner:Ma,"animal-spin":"animal-animal-spin-P6YYa",animalSpin:Sa},q=({checked:n,defaultChecked:e=!1,size:s="default",disabled:i=!1,loading:l=!1,checkedChildren:t,unCheckedChildren:p,onChange:m,className:r})=>{const[u,f]=c.useState(e),w=n!==void 0,b=w?n:u,v=c.useCallback(()=>{if(i||l)return;const y=!b;w||f(y),m?.(y)},[i,l,b,w,m]),d=[N.switch,N[`switch-${s}`],b&&N["switch-checked"],i&&N["switch-disabled"],l&&N["switch-loading"],r].filter(Boolean).join(" ");return a.jsxs("button",{type:"button",role:"switch","aria-checked":b,className:d,onClick:v,disabled:i,children:[a.jsx("span",{className:N.handle,children:l&&a.jsx("span",{className:N.spinner})}),a.jsx("span",{className:N.inner,children:b?t:p})]})};q.displayName="Switch";const $=({children:n,className:e,style:s})=>a.jsx("div",{className:`animal-cursor${e?` ${e}`:""}`,style:s,children:n});$.displayName="Cursor";const H=n=>n==null||typeof n=="boolean"?0:typeof n=="string"||typeof n=="number"?String(n).length:Array.isArray(n)?n.reduce((e,s)=>e+H(s),0):c.isValidElement(n)?H(n.props.children):0,A=(n,e,s="tw")=>{if(e.stopped||n==null||typeof n=="boolean")return null;if(typeof n=="string"||typeof n=="number"){const i=String(n);if(e.remaining>=i.length)return e.remaining-=i.length,i;const l=i.slice(0,e.remaining);return e.remaining=0,e.stopped=!0,l}if(Array.isArray(n))return n.map((i,l)=>a.jsx(c.Fragment,{children:A(i,e,`${s}-${l}`)},`${s}-${l}`));if(c.isValidElement(n)){const i=n.props,l=A(i.children,e,s);return c.cloneElement(n,void 0,l)}return null},W=({children:n,speed:e=90,trigger:s,autoPlay:i=!0,onDone:l})=>{const t=c.useMemo(()=>H(n),[n]),[p,m]=c.useState(i?0:t),r=c.useRef(null);c.useEffect(()=>{if(r.current&&window.clearInterval(r.current),!i){m(t);return}if(m(0),t!==0)return r.current=window.setInterval(()=>{m(f=>f>=t?(r.current&&window.clearInterval(r.current),f):f+1)},e),()=>{r.current&&window.clearInterval(r.current)}},[t,e,s,i]),c.useEffect(()=>{t>0&&p>=t&&l?.()},[p,t]);const u={remaining:p,stopped:!1};return a.jsx(a.Fragment,{children:A(n,u)})};W.displayName="Typewriter";const Ia="animal-mask-hAWeP",Ba="animal-modal-d0zyM",$a="animal-modalClipped-7IuAw",Ta="animal-header-udOSi",Ea="animal-title-s6pv3",Ha="animal-body--aiyx",Aa="animal-footer-9Ib-a",L={mask:Ia,modal:Ba,modalClipped:$a,header:Ta,title:Ea,body:Ha,footer:Aa},Wa=()=>a.jsx("svg",{style:{position:"absolute",width:0,height:0},"aria-hidden":!0,children:a.jsx("clipPath",{id:"animal-modal-clip",clipPathUnits:"objectBoundingBox",children:a.jsx("path",{d:"M0.501,0.005 L0.501,0.005 L0.523,0.005 L0.549,0.006 C0.704,0.01,0.796,0.017,0.825,0.027 L0.827,0.028 C0.872,0.045,0.939,0.044,0.978,0.17 C1,0.254,1,0.365,0.99,0.505 L0.988,0.513 C0.979,0.558,0.971,0.598,0.965,0.633 C0.956,0.689,0.979,0.77,0.964,0.865 C0.953,0.928,0.921,0.966,0.869,0.979 C0.821,0.986,0.773,0.992,0.726,0.995 L0.712,0.996 L0.694,0.997 C0.648,1,0.586,1,0.507,1 L0.501,1 L0.464,1 C0.385,1,0.325,0.998,0.283,0.995 C0.234,0.992,0.184,0.987,0.133,0.979 C0.081,0.966,0.05,0.928,0.039,0.865 C0.023,0.77,0.047,0.689,0.037,0.633 C0.031,0.595,0.023,0.552,0.013,0.505 C-0.006,0.365,-0.002,0.254,0.024,0.17 C0.064,0.045,0.13,0.045,0.174,0.028 L0.175,0.028 C0.204,0.017,0.303,0.009,0.474,0.005 L0.501,0.005"})})}),Y=({open:n,title:e,width:s=520,maskClosable:i=!0,closable:l=!0,footer:t,onClose:p,onOk:m,children:r,className:u,typeSpeed:f=80,typewriter:w=!0})=>{const[b,v]=c.useState(0);c.useEffect(()=>{n&&v(o=>o+1)},[n]),c.useEffect(()=>{if(!n)return;const o=C=>{C.key==="Escape"&&p?.()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[n,p]),c.useEffect(()=>(n&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow=""}),[n]);const d=c.useCallback(()=>{i&&p?.()},[i,p]),y=c.useCallback(o=>{o.stopPropagation()},[]);if(!n)return null;const S=a.jsxs(a.Fragment,{children:[a.jsx(B,{type:"primary",onClick:p,children:"取消"}),a.jsx(B,{type:"primary",onClick:m,children:"确定"})]}),D=a.jsx($,{children:a.jsx("div",{className:L.mask,onClick:d,children:a.jsxs("div",{className:[L.modal,u].filter(Boolean).join(" "),style:{width:s},onClick:y,role:"dialog","aria-modal":"true",children:[a.jsx(Wa,{}),a.jsxs("div",{className:L.modalClipped,children:[(e||l)&&a.jsx("div",{className:L.header,children:e&&a.jsx("div",{className:L.title,children:e})}),a.jsx("div",{className:L.body,children:w?a.jsx(W,{speed:f,trigger:b,children:r}):r}),t!==null&&a.jsx("div",{className:L.footer,children:t===void 0?S:t})]})]})})});return J.createPortal(D,document.body)};Y.displayName="Modal";const Pa="animal-card-DJ515",Ra="animal-card-title-PL-WB",Oa="animal-card-app-pink-3Eo8d",qa="animal-card-purple-Gq7sR",Ya="animal-card-app-blue-GHH1a",Fa="animal-card-app-yellow-DWB-L",Va="animal-card-app-orange-V5yD7",Ga="animal-card-app-teal-R5kFG",Ka="animal-card-app-green-xlNUs",Ua="animal-card-app-red-DzE0l",za="animal-card-lime-green-KiJbe",Ja="animal-card-yellow-green-4c-lF",Xa="animal-card-brown-hLCrx",Za="animal-card-warm-peach-pink-RlSVo",T={card:Pa,"card-title":"animal-card-title-PL-WB",cardTitle:Ra,"card-app-pink":"animal-card-app-pink-3Eo8d",cardAppPink:Oa,"card-purple":"animal-card-purple-Gq7sR",cardPurple:qa,"card-app-blue":"animal-card-app-blue-GHH1a",cardAppBlue:Ya,"card-app-yellow":"animal-card-app-yellow-DWB-L",cardAppYellow:Fa,"card-app-orange":"animal-card-app-orange-V5yD7",cardAppOrange:Va,"card-app-teal":"animal-card-app-teal-R5kFG",cardAppTeal:Ga,"card-app-green":"animal-card-app-green-xlNUs",cardAppGreen:Ka,"card-app-red":"animal-card-app-red-DzE0l",cardAppRed:Ua,"card-lime-green":"animal-card-lime-green-KiJbe",cardLimeGreen:za,"card-yellow-green":"animal-card-yellow-green-4c-lF",cardYellowGreen:Ja,"card-brown":"animal-card-brown-hLCrx",cardBrown:Xa,"card-warm-peach-pink":"animal-card-warm-peach-pink-RlSVo",cardWarmPeachPink:Za},F=({type:n="default",color:e="default",children:s,className:i,style:l,...t})=>{const p=[T.card,n==="title"&&T["card-title"],e!=="default"&&T[`card-${e}`],i].filter(Boolean).join(" ");return a.jsx("div",{className:p,style:l,...t,children:s})};F.displayName="Card";const Qa="animal-footer-5DMOR",_a="animal-tree-KZ8hX",P={footer:Qa,tree:_a},V=({type:n="sea",className:e,style:s})=>{const i=[P.footer,P[n],e].filter(Boolean).join(" ");return a.jsx("div",{className:i,style:s})};V.displayName="Footer";const an="animal-faqCard-5jlOE",nn="animal-disabled-9DAjm",en="animal-questionHeader-iqP87",tn="animal-questionIcon-xRkdp",sn="animal-expanded-a8Eze",ln="animal-questionText-jVpUv",on="animal-leafDecoration-RoK4H",cn="animal-answerWrapper-tzFtx",rn="animal-answerContent-ppsk-",x={faqCard:an,disabled:nn,questionHeader:en,questionIcon:tn,expanded:sn,questionText:ln,leafDecoration:on,answerWrapper:cn,answerContent:rn},G=({question:n,answer:e,defaultExpanded:s=!1,disabled:i=!1,className:l,style:t})=>{const[p,m]=c.useState(s),r=()=>{i||m(!p)},u=[x.faqCard,p&&x.expanded,i&&x.disabled,l].filter(Boolean).join(" ");return a.jsxs("div",{className:u,style:t,children:[a.jsxs("button",{className:x.questionHeader,onClick:r,disabled:i,"aria-expanded":p,children:[a.jsx("span",{className:x.questionIcon,children:p?"−":"+"}),a.jsx("span",{className:x.questionText,children:n}),a.jsx("span",{className:x.leafDecoration,children:a.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",children:a.jsx("path",{fill:"currentColor",d:"M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z"})})})]}),a.jsx("div",{className:x.answerWrapper,children:a.jsx("div",{className:x.answerContent,children:e})})]})};G.displayName="Collapse";const dn="animal-acDatetime-hVKh7",pn="animal-acDate-rhO3k",mn="animal-acWeekday-bxDHR",hn="animal-acMonthday-1jUmX",un="animal-acTime-S-twb",wn="animal-acColon-g4vuJ",M={acDatetime:dn,acDate:pn,acWeekday:mn,acMonthday:hn,acTime:un,acColon:wn},fn=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],bn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],K=({className:n})=>{const[e,s]=c.useState(new Date);return c.useEffect(()=>{const i=setInterval(()=>s(new Date),1e3);return()=>clearInterval(i)},[]),a.jsx($,{children:a.jsxs("div",{className:`${M.acDatetime} ${n||""}`,children:[a.jsxs("div",{className:M.acDate,children:[a.jsx("span",{className:M.acWeekday,children:fn[e.getDay()]}),a.jsxs("span",{className:M.acMonthday,children:[bn[e.getMonth()]," ",e.getDate()]})]}),a.jsxs("div",{className:M.acTime,children:[e.getHours().toString().padStart(2,"0"),a.jsx("span",{className:M.acColon,children:":"}),e.getMinutes().toString().padStart(2,"0")]})]})})};K.displayName="Time";const gn="animal-phoneContainer-49yKw",yn="animal-phone-bXgSa",Cn="animal-statusBar-Vb96q",xn="animal-time-cokU-",vn="animal-signalIcons-TuL3l",jn="animal-screenContent-oyJF-",kn="animal-homeScreen-no2yS",Nn="animal-grasswave-l6cyA",Dn="animal-dateDisplay-cnvu8",Ln="animal-dateDisplayHeader-32i0J",Mn="animal-blink--R0wf",Sn="animal-dayText-7NEMb",In="animal-appsGrid-opTs8",Bn="animal-appItem-1NmDt",$n="animal-appIcon-tTPIg",Tn="animal-iconBounce-n4Boc",En="animal-appIconOffset-b5SZG",Hn="animal-iconBounceOffset-XfsXI",An="animal-appItemOffset-FEStg",Wn="animal-iconCamera-c-grH",Pn="animal-iconMiles-L9Cow",Rn="animal-iconCritterpedia-okU95",On="animal-iconDiy-gZgxn",qn="animal-iconDesign-YvE9z",Yn="animal-iconMap-xmfHe",Fn="animal-iconVariant-k-kkB",Vn="animal-iconHelicopter-HV-TH",Gn="animal-iconChat-TVZXY",Kn="animal-iconWifi-RoLJH",Un="animal-iconLocation-YfhoK",zn="animal-iconPage-wMmBC",Jn="animal-badge-drGmk",Xn="animal-pageIndicator-mQ-Pg",h={phoneContainer:gn,phone:yn,statusBar:Cn,time:xn,signalIcons:vn,screenContent:jn,homeScreen:kn,grasswave:Nn,dateDisplay:Dn,dateDisplayHeader:Ln,blink:Mn,dayText:Sn,appsGrid:In,appItem:Bn,appIcon:$n,iconBounce:Tn,appIconOffset:En,iconBounceOffset:Hn,appItemOffset:An,iconCamera:Wn,iconMiles:Pn,iconCritterpedia:Rn,iconDiy:On,iconDesign:qn,iconMap:Yn,iconVariant:Fn,iconHelicopter:Vn,iconChat:Gn,iconWifi:Kn,iconLocation:Un,iconPage:zn,badge:Jn,pageIndicator:Xn},Zn=[{id:"camera",iconClass:"iconCamera",color:"#B77DEE",hasNewMessage:!0},{id:"app",iconClass:"iconMiles",color:"#889DF0",offset:!0},{id:"critterpedia",iconClass:"iconCritterpedia",color:"#F7CD67"},{id:"diy",iconClass:"iconDiy",color:"#E59266"},{id:"shopping",iconClass:"iconDesign",color:"#F8A6B2"},{id:"variant",iconClass:"iconMap",color:"#82D5BB",hasNewMessage:!0},{id:"design",iconClass:"iconVariant",color:"#8AC68A"},{id:"map",iconClass:"iconHelicopter",color:"#FC736D"},{id:"chat",iconClass:"iconChat",color:"#D1DA49"}],Qn=({className:n})=>{const[e,s]=c.useState(new Date);c.useEffect(()=>{const r=setInterval(()=>{s(new Date)},1e3);return()=>clearInterval(r)},[]);const i=e.getHours(),l=e.getMinutes(),t=i>=12?"PM":"AM",p=i%12||12,m=l.toString().padStart(2,"0");return a.jsx("div",{className:`${h.phoneContainer} ${n||""}`,children:a.jsx("div",{className:h.phone,children:a.jsx("div",{className:h.screenContent,children:a.jsxs("div",{className:h.homeScreen,children:[a.jsxs("div",{className:h.dateDisplay,children:[a.jsxs("div",{className:h.dateDisplayHeader,children:[a.jsx("span",{className:h.iconWifi}),a.jsxs("div",{children:[p,a.jsx("span",{className:h.blink,children:":"}),m,t]}),a.jsx("span",{className:h.iconLocation})]}),a.jsx("div",{className:h.dayText,children:"Welcome!"})]}),a.jsx("div",{className:h.appsGrid,children:Zn.map(r=>a.jsxs("div",{className:`${h.appItem} ${r.offset?h.appItemOffset:""}`,style:{backgroundColor:r.color},children:[r.hasNewMessage&&a.jsx("span",{className:h.badge}),a.jsx("span",{className:`${h.appIcon} ${h[r.iconClass]} ${r.offset?h.appIconOffset:""}`})]},r.id))}),a.jsx("div",{className:h.pageIndicator,children:a.jsx("span",{className:h.iconPage})})]})})})})},_n="animal-divider-ZBhpE",ae="animal-line-teal-Z80hb",ne="animal-line-white-VDY1E",ee="animal-line-yellow-ifvJz",ie="animal-wave-yellow-AO-io",R={divider:_n,"line-teal":"animal-line-teal-Z80hb",lineTeal:ae,"line-white":"animal-line-white-VDY1E",lineWhite:ne,"line-yellow":"animal-line-yellow-ifvJz",lineYellow:ee,"wave-yellow":"animal-wave-yellow-AO-io",waveYellow:ie},U=({type:n="line-brown",className:e,style:s})=>{const i=[R.divider,R[n],e].filter(Boolean).join(" ");return a.jsx("div",{className:i,style:s})};U.displayName="Divider";const te="animal-icon-wUFR-",se="animal-iconBounce-Q1e3X",le="animal-icon-miles-oVFnM",oe="animal-icon-camera-W9x4U",ce="animal-icon-chat-dfYOk",re="animal-icon-critterpedia-vDPSY",de="animal-icon-design-8gBms",pe="animal-icon-diy-AwPHs",me="animal-icon-helicopter-w6ZL6",he="animal-icon-map-ogQk4",ue="animal-icon-shopping-TSh2U",we="animal-icon-variant-E6wqy",fe="animal-iconList-MRyTC",be="animal-iconListItem-nTF3l",ge="animal-iconListLabel-t2M3-",E={icon:te,"icon-bounce":"animal-icon-bounce-1MvWH",iconBounce:se,"icon-miles":"animal-icon-miles-oVFnM",iconMiles:le,"icon-camera":"animal-icon-camera-W9x4U",iconCamera:oe,"icon-chat":"animal-icon-chat-dfYOk",iconChat:ce,"icon-critterpedia":"animal-icon-critterpedia-vDPSY",iconCritterpedia:re,"icon-design":"animal-icon-design-8gBms",iconDesign:de,"icon-diy":"animal-icon-diy-AwPHs",iconDiy:pe,"icon-helicopter":"animal-icon-helicopter-w6ZL6",iconHelicopter:me,"icon-map":"animal-icon-map-ogQk4",iconMap:he,"icon-shopping":"animal-icon-shopping-TSh2U",iconShopping:ue,"icon-variant":"animal-icon-variant-E6wqy",iconVariant:we,iconList:fe,iconListItem:be,iconListLabel:ge},ye=({name:n,size:e=24,className:s,style:i,bounce:l=!1,...t})=>a.jsx("span",{className:`${E.icon} ${E[n]} ${l?E["icon-bounce"]:""} ${s||""}`,style:{width:e,height:e,...i},...t}),Ce=[{name:"icon-miles",label:"NookMiles"},{name:"icon-camera",label:"Camera"},{name:"icon-chat",label:"Chat"},{name:"icon-critterpedia",label:"Critterpedia"},{name:"icon-design",label:"Design"},{name:"icon-diy",label:"DIY"},{name:"icon-helicopter",label:"Helicopter"},{name:"icon-map",label:"Map"},{name:"icon-shopping",label:"Shopping"},{name:"icon-variant",label:"Variant"}],xe="animal-wrapper-pbOTq",ve="animal-trigger-2-Ahh",je="animal-open-867xo",ke="animal-value-623RB",Ne="animal-placeholder-vpC8E",De="animal-arrow-xNbxA",Le="animal-dropdown-0l6jF",Me="animal-option-GEkLI",Se="animal-active-jtSpt",Ie="animal-hovered-N-cco",Be="animal-pillBar-O9cTb",$e="animal-optionDot-FQtyw",Te="animal-disabled-Oy12C",g={wrapper:xe,trigger:ve,open:je,value:ke,placeholder:Ne,arrow:De,dropdown:Le,option:Me,active:Se,hovered:Ie,pillBar:Be,optionDot:$e,disabled:Te},z=({options:n,value:e,onChange:s,placeholder:i="请选择",disabled:l=!1})=>{const[t,p]=c.useState(!1),[m,r]=c.useState(null),[u,f]=c.useState({}),w=c.useRef(null),b=n.find(d=>d.key===e)?.label||i;c.useEffect(()=>{const d=y=>{w.current&&!w.current.contains(y.target)&&p(!1)};return t&&document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[t]),c.useEffect(()=>{if(t&&w.current){const d=w.current.getBoundingClientRect(),y=window.innerWidth,S=window.innerHeight,D=n.length*44+24,o={position:"absolute"};d.right+200>y?(o.right="100%",o.marginRight="6px",o.left="auto"):(o.left="100%",o.marginLeft="6px",o.right="auto");const C=S-d.bottom,I=d.top;C<D&&I>C?(o.top="auto",o.bottom="100%",o.marginBottom="6px",delete o.transform):C<D||d.top<D?(o.top="100%",o.marginTop="6px",o.bottom="auto",delete o.transform):(o.top="50%",o.transform="translateY(-50%)",o.bottom="auto"),f(o)}},[t,n.length]);const v=d=>{s(d),p(!1)};return a.jsxs("div",{ref:w,className:`${g.wrapper} ${l?g.disabled:""}`,children:[a.jsxs("div",{className:`${g.trigger} ${t?g.open:""}`,onClick:()=>!l&&p(!t),children:[a.jsx("span",{className:e?g.value:g.placeholder,children:b}),a.jsx("span",{className:g.arrow,children:a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:a.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t&&a.jsx("div",{className:g.dropdown,style:u,children:n.map(d=>a.jsxs("div",{className:`${g.option} ${e===d.key?g.active:""} ${m===d.key?g.hovered:""}`,onClick:()=>v(d.key),onMouseEnter:()=>r(d.key),onMouseLeave:()=>r(null),children:[a.jsx("span",{className:g.optionDot}),d.label,e===d.key&&a.jsx("div",{className:g.pillBar})]},d.key))})]})};z.displayName="Select";exports.Button=B;exports.Card=F;exports.Collapse=G;exports.Cursor=$;exports.Divider=U;exports.Footer=V;exports.ICON_LIST=Ce;exports.Icon=ye;exports.Input=O;exports.Modal=Y;exports.Phone=Qn;exports.Select=z;exports.Switch=q;exports.Time=K;exports.Typewriter=W;