@wizleap-inc/wiz-ui-react 0.69.0 → 0.69.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wiz-ui.es.js CHANGED
@@ -7464,9 +7464,6 @@ const n2 = ({
7464
7464
  ...u.asProps,
7465
7465
  style: {
7466
7466
  cursor: i ? "not-allowed" : "pointer",
7467
- backgroundColor: "white",
7468
- border: "none",
7469
- width: "100%",
7470
7467
  ...u.asProps.style
7471
7468
  }
7472
7469
  }, p = A(null), x = o && o.length > 0, q = se(() => {
@@ -39,7 +39,7 @@ React keys must be passed directly to JSX without using spread:
39
39
  rotate(-${s}rad)
40
40
  `},g=new ResizeObserver(z);return g.observe(y),()=>{g.disconnect()}},[i,s]),d.useEffect(()=>{const f=m.current,y=v.current;if(!f||!y)return;const z=()=>{f.forEach((_,x)=>{const S=y[x];if(!S||!_)return;const W=8;if(S.offsetHeight+W*2<_.offsetHeight){S.style.padding=`${W}px 0`;return}if(S.style.padding="0",S.offsetHeight<_.offsetHeight){S.style.top=(_.offsetHeight-S.offsetHeight)/2+"px";return}S.style.top=S.offsetHeight*-1+"px",S.style.color="#606166"})},g=new ResizeObserver(z);return f.forEach(_=>{_&&g.observe(_)}),()=>{g.disconnect()}},[]),w("div",{className:q(a,e7),style:t,ref:o,children:[e("span",{className:J6,ref:c,children:r.label}),p.map((f,y)=>e("div",{className:q(X6,f.bgColorStyle),style:f.elementStyle,ref:z=>{m.current[y]=z},children:f.frequency!==0&&e("span",{className:q($6,f.numberColorStyle),ref:z=>{v.current[y]=z},children:f.frequency})},f.id))]})},K2=({className:a,style:t,data:r,maxFrequency:n,ceilN:l=0,barGap:i=.1,barGroupWidth:s=.8,unit:o,unitPosition:c="no",isTilted:m=!1,children:v})=>{const p=c==="intersection"?o:void 0,f=c==="vertical"?o:void 0,y=m?Math.PI/4:0,z=d.useMemo(()=>{if(n)return n;const g=r.map(S=>S.data).flat(),_=Math.max(...g.map(S=>S.frequency)),x=Math.pow(10,l);return Math.ceil(_/x)*x},[l,r,n]);return w("div",{className:q(a,r7),style:t,children:[w("div",{className:n7,children:[p&&w("span",{className:q(T1,N1.unit),children:["(",p,")"]}),e("span",{className:q(T1,N1.max),children:z}),w("span",{className:q(T1,N1.half),children:[Math.ceil(z/2),f]})]}),w("div",{className:a7,children:[e("div",{className:t7,children:r.map((g,_)=>e(i7,{data:g,maxFrequency:z,barGap:i,barGroupWidth:s,theta:y},`${_}-${g.label}`))}),e("div",{className:l7,children:v})]})]})};K2.displayName=b.CompareGraph;const s7=K2;var o7="_1oth5nf0",c7="_1oth5nf3",d7="_1oth5nf5",h7="_1oth5nf4",u7="_1oth5nf2",m7="_1oth5nf7",X2="_1oth5nfa",J2="_1oth5nf9",$2="_1oth5nf8",v7="_1oth5nf6",er=31.830988618379067,_e=["#3DB783","#84D6B3","#D1F0E2","#E4FBF4","#FAFAFA"],C1=18,f7=2.0845056908104667,e1=15.915494309189533,t1=1.8,tr=36;const p7=({className:a,style:t,percentages:r,children:n})=>{const l=d.useMemo(()=>{let s=0;return r.map(o=>{const c=s;return s+=o,{width:o-t1,startPercentage:c}}).filter(o=>o.width>0)},[r]),i=`M${C1} ${f7}
41
41
  a ${e1} ${e1} 0 0 1 0 ${er}
42
- a ${e1} ${e1} 0 0 1 0 ${-1*er}`;return w("div",{className:q(a,c7),style:t,children:[w("svg",{className:h7,viewBox:`0 0 ${tr} ${tr}`,children:[e("path",{className:o7,strokeWidth:t1,d:i}),l.map((s,o)=>e("path",{className:u7,style:{stroke:_e[o]||_e[_e.length-1]},strokeDasharray:`${s.width}, 100`,strokeWidth:t1,d:i,transform:`rotate(${(s.startPercentage+t1/2)*360/100}, ${C1}, ${C1})`},`${o}-${s.startPercentage}-${s.width}`))]}),e("div",{className:d7,children:n})]})},ar=({className:a,style:t,data:r,otherLabel:n="その他",children:l})=>{const i=d.useMemo(()=>r.map(s=>s.percentage),[r]);return w("div",{className:q(a,v7),style:t,children:[e(p7,{percentages:i,children:l}),w("div",{className:m7,children:[r.map((s,o)=>w("div",{className:$2,children:[e("span",{className:X2,style:{backgroundColor:_e[o]||_e[_e.length-1]}}),e("span",{className:J2,children:s.label})]},o)),w("div",{className:$2,children:[e("span",{className:X2,style:{backgroundColor:_e[_e.length-1]}}),e("span",{className:J2,children:n})]})]})]})};ar.displayName=b.CircleGraph;const g7=ar;var y7="_1nylme52",w7={top:"_1nylme54",bottom:"_1nylme55",left:"_1nylme56",right:"_1nylme57"},q7="_1nylme53",x7="_1nylme51",z7={top:"_1nylme58",bottom:"_1nylme59",left:"_1nylme5a",right:"_1nylme5b"},_7="_1nylme50";const rr=({className:a,style:t,direction:r="top",isOpen:n=!1,isDirectionFixed:l=!1,children:i,content:s,expand:o=!1})=>{const[c,m]=d.useState(!1),v=d.useRef(null);return w(oe,{children:[e("div",{className:q(a,_7),style:{...t,width:o?"100%":"initial"},onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),ref:v,children:i}),e(fe,{anchorElement:v,isOpen:c||n,onClose:d.useCallback(()=>m(!1),[]),direction:r,shadow:!1,animation:!0,gap:"xs2",isDirectionFixed:l,children:w("div",{className:q(z7[r],x7),children:[e("div",{className:q(y7),children:s}),e("div",{className:q(q7,w7[r]),children:e(g1,{})})]})})]})};rr.displayName=b.Tooltip;const a1=rr;var S7="bkxabb0";const b7={1:"xl2",2:"xl",3:"md",4:"sm",5:"xs",6:"xs2"},I7={1:"gray.900",2:"gray.800",3:"gray.700",4:"gray.700",5:"gray.700",6:"gray.700"},nr=({className:a,style:t,level:r=1,color:n=I7[r],fontSize:l=b7[r],children:i})=>{const s=q(a,S7,xe[l],be[n]);switch(r){case 1:return e("h1",{className:s,style:t,children:i});case 2:return e("h2",{className:s,style:t,children:i});case 3:return e("h3",{className:s,style:t,children:i});case 4:return e("h4",{className:s,style:t,children:i});case 5:return e("h5",{className:s,style:t,children:i});case 6:return e("h6",{className:s,style:t,children:i})}};nr.displayName=b.Heading;const W7=nr;var N7={no:"_1d1n4wd2",xs2:"_1d1n4wd3",xs:"_1d1n4wd4",sm:"_1d1n4wd5",md:"_1d1n4wd6",lg:"_1d1n4wd7",xl:"_1d1n4wd8",xl2:"_1d1n4wd9",xl3:"_1d1n4wda",xl4:"_1d1n4wdb",max:"_1d1n4wdc",at:"_1d1n4wdd"},T7="_1d1n4wde",lr={enabled:"_1d1n4wdf",disabled:"_1d1n4wdg"},ir="_1d1n4wd1",C7="_1d1n4wdk",k7="_1d1n4wdl",B7="_1d1n4wd0",E7="_1d1n4wdh",sr={enabled:"_1d1n4wdi",disabled:"_1d1n4wdj"};const M7=({className:a,style:t,item:r,disabled:n,depth:l})=>{const[i,s]=d.useState(!1),[o,c]=d.useState(!1),m=n||r.option.disabled,v=d.useMemo(()=>i?"white.800":m?"gray.400":o?"green.800":r.option.iconDefaultColor??"gray.500",[i,m,o,r.option.iconDefaultColor]),p=()=>{m||r.option.onClick()},f=()=>{m||c(!0)},y=()=>{m||c(!1)},z=_=>{_.key==="Enter"&&(m||r.option.onClick())},g=()=>{if(m)return;s(!0);const _=()=>{s(!1),document.removeEventListener("mouseup",_)};document.addEventListener("mouseup",_)};return e("div",{className:a,style:t,children:w("div",{className:q(T7,m?lr.disabled:lr.enabled,r.option.disabled&&ir),style:{paddingLeft:`calc(${J.spacing.xs2} + ${l} * ${J.spacing.lg})`},onClick:p,onMouseOver:f,onMouseOut:y,onMouseDown:g,onKeyDown:z,tabIndex:0,children:[w("span",{className:k7,children:[e("span",{children:r.option.label}),r.option.icon&&e(L,{icon:r.option.icon,color:v,size:"md"})]}),r.option.exLabel&&e("span",{children:r.option.exLabel})]})})},R7=()=>e("div",{children:e("hr",{className:C7})}),D7=({className:a,style:t,item:r,disabled:n,depth:l})=>w("div",{className:a,style:t,children:[e("span",{className:q(E7,n?sr.disabled:sr.enabled),style:{paddingLeft:`calc(${J.spacing.xs2} + ${l} * ${J.spacing.lg})`},children:r.title}),e(k1,{options:r.items,groupDivider:r.groupDivider,buttonDivider:r.buttonDivider,disabled:n,depth:l+1})]}),or=({className:a,style:t,options:r,width:n="10rem",p:l="no",borderRadius:i="no",disabled:s=!1,expand:o=!1,groupDivider:c=!1,buttonDivider:m=!1,depth:v=0})=>{const p=d.useMemo(()=>{const f={kind:"divider"};return r.map((z,g)=>{if(z.kind==="divider")return[f];const _={kind:"item",item:z};if(g+1===r.length)return[_];switch(r[g].kind){case"group":return c?[_,f]:[_];case"button":return m&&r[g+1].kind==="button"?[_,f]:[_];case"divider":return[]}}).flat()},[m,c,r]);return e("div",{className:q(a,B7,s&&ir,v===0&&N7[i]),style:{...t,minWidth:o?"100%":n},children:e(Y,{gap:"xs2",p:v===0?l:"no",children:p.map((f,y)=>{if(f.kind==="divider")return e(R7,{},`divider-${y}`);if(f.item.kind==="group")return e(D7,{item:f.item,disabled:s,depth:v},`group-${y}-${f.item.title}`);if(f.item.kind==="button")return e(M7,{item:f.item,disabled:s,depth:v},`button-${y}-${f.item.option.value}`)})})})};or.displayName=b.PopupButtonGroup;const k1=or;var Z7="sz1rv32",P7="sz1rv31",L7="sz1rv30",j7="sz1rv34",A7="sz1rv35",Q7="sz1rv37",F7="sz1rv38",H7="sz1rv36",O7="sz1rv33",V7="sz1rv3a",G7="sz1rv39",U7="sz1rv3b";const cr=({className:a,style:t,icon:r,label:n,active:l,disabled:i=!1,tooltipText:s,buttons:o,isPopupOpen:c=!1,onTogglePopup:m,...v})=>{var k;const p="href"in v,f=p?"a":v.as,y=!!((k=v==null?void 0:v.href)!=null&&k.startsWith("http")),z=p?{href:i?void 0:v.href??"",target:!i&&y?"_blank":void 0}:{...v.asProps,style:{cursor:i?"not-allowed":"pointer",backgroundColor:"white",border:"none",width:"100%",...v.asProps.style}},g=d.useRef(null),_=o&&o.length>0,x=d.useCallback(()=>{m==null||m(!1)},[m]),S=()=>{m==null||m(!c)},W=d.useCallback(D=>D.map(T=>T.kind==="divider"?T:T.kind==="button"?{kind:"button",option:{...T.option,onClick:()=>{T.option.onClick(),x()}}}:{...T,items:W(T.items)}),[x]),C=d.useMemo(()=>o?W(o):[],[o,W]),E=e("div",{ref:g,onClick:S,className:a,style:{...t,display:s?"block":"inline-block"},children:e(f,{...z,className:q(O7,i?A7:l&&j7),children:w(Z,{justify:"between",align:"center",width:"100%",nowrap:!0,children:[w(Z,{nowrap:!0,gap:"sm",children:[e("div",{className:q(H7,i?F7:l&&Q7),style:{display:"flex",alignItems:"center"},children:e(L,{icon:r,color:"inherit"})}),e("div",{className:q(G7,!i&&l&&V7),children:n})]}),_&&e(L,{icon:ye,color:!i&&l?"green.800":"gray.700"})]})})});return w(oe,{children:[s?e(a1,{content:e("div",{children:s}),children:E}):w(oe,{children:[" ",E," "]}),_&&e(fe,{anchorElement:g,isOpen:c,onClose:x,direction:"rightTop",layer:"popover",isDirectionFixed:!0,children:e("div",{className:U7,children:e(k1,{options:C,p:"xs",borderRadius:"xs2",disabled:i})})})]})};cr.displayName=b.NavigationItem;const Y7=cr,dr=({className:a,style:t,isOpen:r,width:n="180px",sticky:l=!1,children:i,footer:s})=>{const o=r?n:`calc(${J.spacing.xl} * 2 + ${J.spacing.sm})`,c=l?{position:"sticky",top:`calc(${J.share.HEADER_HEIGHT} + 1px)`,left:0,borderRight:`1px solid ${J.color.gray[400]}`,height:`calc(100vh - ${J.share.HEADER_HEIGHT} - 1px)`}:{};return w("div",{className:q(a,L7),style:{...t,...c,width:o},children:[e("div",{className:P7,children:i}),r&&s&&e("div",{className:Z7,children:s})]})};dr.displayName=b.NavigationContainer;const K7=dr;var X7="_1tqo4fx2",J7="_1tqo4fx1",$7="_1tqo4fx0";const hr=({className:a,style:t,isOpen:r,children:n,options:l,skeleton:i,gap:s,isDirectionFixed:o,onClose:c})=>{const m=d.useRef(null);return w(oe,{children:[e("div",{className:a,ref:m,style:{...t,width:"fit-content",height:"fit-content"},children:n}),e(fe,{isOpen:r,onClose:c,anchorElement:m,gap:s,isDirectionFixed:o,children:e("div",{className:q($7,i&&J7),children:e(Y,{p:"xs",gap:"xs2",children:l})})})]})};hr.displayName=b.Dropdown;const ec=hr,ur=({className:a,style:t,icon:r,disabled:n=!1,onClick:l,children:i})=>{const[s,o]=d.useState(!1),[c,m]=d.useState(!1);function v(){if(c)return"white.800";if(s)return"green.800"}return e("button",{type:"button",className:q(a,X7),style:t,disabled:n,onClick:l,onMouseOver:()=>o(!0),onMouseOut:()=>o(!1),onMouseDown:()=>m(!0),onMouseUp:()=>m(!1),children:w(Z,{align:"center",children:[i,r&&e(L,{icon:r,size:"md",color:v()})]})})};ur.displayName=b.DropdownItem;const tc=ur;var ac="_1lgeoz87",rc="_1lgeoz82",nc="_1lgeoz88",lc="_1lgeoz83",ic="_1lgeoz84",sc="_1lgeoz80",oc={default:"_1lgeoz85",expand:"_1lgeoz86"};const cc=200,dc=3e3,mr=({className:a,style:t,message:r,expand:n=!1,enableAnimation:l=!1,autoClose:i=!1,onClose:s})=>{const[o,c]=d.useState(!!l),m=n?"expand":"default";d.useEffect(()=>{l&&c(!1)},[l]);const v=d.useCallback(()=>{if(!l){s();return}c(!0),setTimeout(()=>{s()},cc)},[l,s]);return d.useEffect(()=>{i&&setTimeout(()=>{v()},dc)},[]),e("div",{className:q(a,sc,oc[m],o&&lc),style:t,children:w("div",{className:rc,children:[e(L,{icon:He,color:"white.800"}),e("div",{className:ic,children:e(ee,{color:"white.800",fontSize:"sm",children:r})}),e("button",{type:"button",className:ac,onClick:v,children:e(L,{icon:Ne,color:"white.800"})})]})})};mr.displayName=b.SnackBar;const vr=mr,fr=d.createContext({showSnackbar:()=>{}}),hc=()=>d.useContext(fr),pr=(()=>{if(!window)return 0;const a=he("md");return!a||a==="auto"?0:a==="9999px"?9999:parseFloat(a)*parseFloat(window.getComputedStyle(document.documentElement).fontSize)})(),uc=({children:a})=>{const[t,r]=d.useState([]),n=d.useRef([]),l=d.useRef(0);d.useEffect(()=>{n.current=n.current.slice(0,t.length)},[t.length]);const i=o=>n.current.slice(0,o).reduce((c,m)=>{const v=m==null?void 0:m.getBoundingClientRect();return c+((v==null?void 0:v.height)??0)+pr},pr),s=(o,c)=>{r(m=>[...m,{message:o,options:c,id:`${new Date().toISOString()}-${l.current++}`}])};return w(fr.Provider,{value:{showSnackbar:s},children:[a,t.map((o,c)=>{var m;return e("div",{className:nc,ref:v=>n.current[c]=v,style:{transitionDuration:"0.2s",bottom:i(c)},children:e(vr,{message:o.message,expand:(m=o.options)==null?void 0:m.expand,onClose:()=>{r(v=>v.filter(p=>p.id!==o.id))},enableAnimation:!0,autoClose:!0})},o.id)})]})};var mc="_1fl1cku3",vc="_1fl1cku0",fc={default:"_1fl1cku1",disabled:"_1fl1cku2"};function pc(a){return a?"error":"default"}const gr=d.forwardRef(({className:a,style:t,id:r,value:n,placeholder:l,disabled:i,expand:s,rows:o=3,error:c,resize:m="none",maxWidth:v,minWidth:p,maxHeight:f,minHeight:y,onChange:z},g)=>{const _=d.useContext(we),x=c||_.error;return e("textarea",{ref:g,id:r,value:n,placeholder:l,disabled:i,rows:o,style:{...t,resize:m,maxWidth:v,minWidth:p,maxHeight:f,minHeight:y},className:q(a,vc,fc[i?"disabled":"default"],s&&mc,ge[pc(x)]),onChange:S=>z(S.target.value)})});gr.displayName=b.TextArea;const yr=gr;var gc={no:"v2atas6",xs2:"v2atas7",xs:"v2atas8",sm:"v2atas9",md:"v2atasa",lg:"v2atasb",xl:"v2atasc",xl2:"v2atasd",xl3:"v2atase",xl4:"v2atasf",max:"v2atasg",at:"v2atash"},yc="v2atas5",wr="v2atas2",B1="v2atas1",wc={last:"v2atas3",noLast:"v2atas4"};const qr=({className:a,style:t,width:r="100%",height:n="100%",borderRadius:l="no",isLoading:i=!0,children:s})=>{const o=i?q(a,B1,wr,gc[l]):a;return e("div",{className:o,style:{...t,width:r,height:n},children:s})};qr.displayName=b.Skeleton;const qc=qr,xr=({className:a,style:t,size:r="2.5rem",isLoading:n=!0,children:l})=>{const i=n?q(a,B1,yc):a;return e("div",{className:i,style:{...t,width:r,height:r},children:l})};xr.displayName=b.SkeletonCircle;const xc=xr,zr=({className:a,style:t,fontSize:r="lg",gap:n="sm",lines:l=1,isLoading:i=!0,children:s})=>{const o=c=>l===1?"noLast":c===l-1?"last":"noLast";return i?e(Y,{className:a,style:t,gap:n,children:Array.from({length:l},(c,m)=>e("div",{className:q(B1,wr,wc[o(m)],ll[r])},m))}):e(oe,{children:s})};zr.displayName=b.SkeletonText;const zc=zr;var _c="a4jm6v0",Sc="a4jm6v1",bc="a4jm6v3",Ic="a4jm6v4";const _r=({className:a,style:t,isLoading:r})=>e("div",{className:q(a,_c,!r&&Ic),style:t,children:e("div",{className:Sc,children:e("div",{className:bc})})});_r.displayName=b.LoadingOverlay;const Wc=_r;var E1="_1p7y12v3",M1={default:"_1p7y12v4",active:"_1p7y12v5"},Sr={left:"_1p7y12v1",right:"_1p7y12v2"},Nc="_1p7y12v0";const R1=({onKeyDown:a,...t})=>e("div",{role:"button",tabIndex:0,...t,onKeyDown:r=>{a==null||a(r),(r.key==="Enter"||r.key===" ")&&r.target instanceof HTMLElement&&(r.stopPropagation(),r.target.click())}}),br=({className:a,style:t,currentPage:r,length:n,onChangePage:l,sideLength:i=2})=>{const s=Math.max(0,i),o=2*s+1,c=v=>{if(v<1)return l(1);if(v>n)return l(n);l(v)},m=()=>{if(n<o)return Array.from({length:n}).map((p,f)=>f+1);function v(){return r<=s?1:r>n-s?n-2*s:r-s}return Array.from({length:o}).map((p,f)=>v()+f)};return w("nav",{className:q(a,Nc,r<=1&&Sr.left,r>=n&&Sr.right),style:t,"aria-label":ne.PAGINATION,children:[r>1&&e(R1,{onClick:()=>c(r-1),className:q(E1,M1.default),"aria-label":ne.PAGINATION_PREV,children:e(L,{icon:Fe,size:"xl2"})}),m().map(v=>{const p=r===v;return e(R1,{onClick:()=>c(v),className:q(E1,M1[p?"active":"default"]),"aria-current":p?"page":void 0,children:v},v)}),r<n&&e(R1,{onClick:()=>c(r+1),className:q(E1,M1.default),"aria-label":ne.PAGINATION_NEXT,children:e(L,{icon:ye,size:"xl2"})})]})};br.displayName=b.Pagination;const Tc=br;var Cc="b6d2ts0";const kc=a=>{const t=a.getHours(),r=a.getMinutes();return[t,r].map(n=>String(n).padStart(2,"0")).join(":")},Bc=a=>{const t=a.getFullYear(),r=a.getMonth()+1,n=a.getDate(),l=a.getHours(),i=a.getMinutes(),s=[t,r,n].map(c=>String(c).padStart(2,"0")).join("/"),o=[l,i].map(c=>String(c).padStart(2,"0")).join(":");return`${s} ${o}`},pe={year:31536e6,month:2592e6,day:864e5,hour:36e5,minute:6e4},Ec=a=>{const t=new Date().getTime()-a.getTime(),r=(n,l)=>Math.floor(t/n)+l;return t<pe.minute?"たった今":t<pe.hour?r(pe.minute,"分前"):t<pe.day?r(pe.hour,"時間前"):t<pe.month?r(pe.day,"日前"):t<pe.year?r(pe.month,"ヶ月前"):r(pe.year,"年前")},Mc=(a,t=!1)=>{const r=a.getMonth()+1,n=a.getDate(),l=["日","月","火","水","木","金","土"][a.getDay()];return[r,n].map(i=>t?String(i).padStart(2,"0"):String(i)).join("/").concat(`(${l})`)},Rc=a=>{const t=Math.floor(a),r=Math.floor((a-t)*60);return[t,r.toString().padStart(2,"0")].join(":")},Dc=a=>{let t=a;return t=t.replace(/&/g,"&amp;"),t=t.replace(/</g,"&lt;"),t=t.replace(/>/g,"&gt;"),t},Ir=/(https?:\/\/[\w/:%#\$&\?\(\)~\.=\+\-]+)/g,Zc=a=>Dc(a).split(Ir).map(t=>t===""?null:{type:t.match(Ir)?"link":"text",content:t}).filter(t=>t!==null),Wr=300,Nr=({className:a,style:t,isOpen:r,textValue:n,username:l,placeholder:i,messages:s,haveNewMessage:o,formRows:c,typingUsername:m,status:v,statusOptions:p,statusPlaceholder:f,onChangeStatus:y,onChangeTextValue:z,onSubmit:g,onToggle:_})=>{const x=d.useRef(null),S=d.useRef(null),W=d.useRef(null),[C,E]=d.useState(0),k=d.useMemo(()=>{const R=[];return s.forEach(V=>{const H=new Date(V.time),j=R.find(B=>B.date.getFullYear()===H.getFullYear()&&B.date.getMonth()===H.getMonth()&&B.date.getDate()===H.getDate());j?j.contents.push(V):R.push({date:H,contents:[V]})}),R},[s]),[D,T]=d.useState(!1),F=d.useCallback(()=>{_(),T(!0),setTimeout(()=>{T(!1)},Wr)},[_]);return d.useLayoutEffect(()=>{const R=x.current,V=S.current;if(!R||!V)return;const H=()=>{const B=R.getBoundingClientRect(),A=V.getBoundingClientRect();E(A.top-B.top-B.height)};H();const j=new ResizeObserver(()=>{H()});return j.observe(R),()=>{j.disconnect()}},[]),d.useEffect(()=>{const R=W.current;R&&r&&R.scrollTo(0,R.scrollHeight)},[r,s]),w(Ie,{className:a,style:t,ref:x,position:"fixed",right:"1.5rem",bottom:r?"0":`${C}px`,transition:D?`bottom ${Wr}ms ease-in-out`:void 0,width:"20rem",zIndex:"floating",children:[w(Le,{shadow:!0,align:"stretch",mainHeaderArea:w(Z,{align:"center",gap:"xs2",nowrap:!0,children:[e(ee,{color:"gray.700",as:"span",bold:!0,children:l}),o&&e(Ie,{width:J.fontSize.md,height:J.fontSize.md,bgColor:"red.800",round:"max"})]}),subHeaderArea:e(L,{size:"xl2",color:"gray.500",icon:r?ze:Ee}),footerArea:w(Y,{width:"100%",justify:"end",gap:"xs",children:[e(Br,{value:n,onChange:z,onSubmit:g,placeholder:i,formRows:c}),v!==void 0&&p!==void 0&&w(Z,{nowrap:!0,children:[e(Ka,{options:p,value:v,onChange:R=>y==null?void 0:y(R),placeholder:f,expand:!0}),e("div",{style:{width:J.spacing.xl4,flexShrink:0}})]}),m&&w(ee,{color:"gray.600",as:"p",fontSize:"xs2",children:[e(ee,{as:"span",bold:!0,fontSize:"xs2",color:"gray.700",children:m})," さんが入力しています..."]})]}),children:[e("div",{ref:S,children:e(je,{})}),e(Ie,{overflowY:"scroll",ref:W,children:e(Y,{gap:"xs",py:"xs",height:"320px",nowrap:!0,children:k.map(({date:R,contents:V},H)=>{const j=`${R.toDateString()}-${H}`;return w(d.Fragment,{children:[e(Z,{justify:"center",children:e(We,{label:Mc(R),variant:"mono",fontSize:"xs2"})}),V.map((B,A)=>e(Cr,{content:B,maxChatItemWidth:"192px"},`${j}-${H}-${A}`))]},j)})})})]}),e("button",{type:"button",className:Cc,onClick:F})]})};Nr.displayName=b.ChatCard;const Pc=Nr;function Lc(a){return a<1?"未読":a===1?"既読":`既読${a}`}const Tr=({className:a,style:t,content:r,maxChatItemWidth:n})=>{const l=Zc(r.message),i=r.sender==="me";return w(Y,{className:a,style:t,align:i?"end":"start",children:[r.username&&e(ee,{as:"span",fontSize:"xs2",color:"gray.600",children:r.username}),w(Z,{align:"end",gap:"xs2",reverse:i,children:[e(Le,{border:!0,fit:!0,px:"md",py:"xs",maxWidth:n,children:l.map((s,o)=>s.type==="link"?e(l5,{href:s.content,openInNewTab:!0,fontSize:"xs",children:s.content},`anchor-${o}`):e(ee,{as:"span",fontSize:"xs",color:"gray.700",whiteSpace:"preLine",breakAll:!0,children:s.content},`text-${o}`))}),w(Y,{align:i?"end":"start",children:[r.readers&&e(a1,{content:r.readers.join(`
42
+ a ${e1} ${e1} 0 0 1 0 ${-1*er}`;return w("div",{className:q(a,c7),style:t,children:[w("svg",{className:h7,viewBox:`0 0 ${tr} ${tr}`,children:[e("path",{className:o7,strokeWidth:t1,d:i}),l.map((s,o)=>e("path",{className:u7,style:{stroke:_e[o]||_e[_e.length-1]},strokeDasharray:`${s.width}, 100`,strokeWidth:t1,d:i,transform:`rotate(${(s.startPercentage+t1/2)*360/100}, ${C1}, ${C1})`},`${o}-${s.startPercentage}-${s.width}`))]}),e("div",{className:d7,children:n})]})},ar=({className:a,style:t,data:r,otherLabel:n="その他",children:l})=>{const i=d.useMemo(()=>r.map(s=>s.percentage),[r]);return w("div",{className:q(a,v7),style:t,children:[e(p7,{percentages:i,children:l}),w("div",{className:m7,children:[r.map((s,o)=>w("div",{className:$2,children:[e("span",{className:X2,style:{backgroundColor:_e[o]||_e[_e.length-1]}}),e("span",{className:J2,children:s.label})]},o)),w("div",{className:$2,children:[e("span",{className:X2,style:{backgroundColor:_e[_e.length-1]}}),e("span",{className:J2,children:n})]})]})]})};ar.displayName=b.CircleGraph;const g7=ar;var y7="_1nylme52",w7={top:"_1nylme54",bottom:"_1nylme55",left:"_1nylme56",right:"_1nylme57"},q7="_1nylme53",x7="_1nylme51",z7={top:"_1nylme58",bottom:"_1nylme59",left:"_1nylme5a",right:"_1nylme5b"},_7="_1nylme50";const rr=({className:a,style:t,direction:r="top",isOpen:n=!1,isDirectionFixed:l=!1,children:i,content:s,expand:o=!1})=>{const[c,m]=d.useState(!1),v=d.useRef(null);return w(oe,{children:[e("div",{className:q(a,_7),style:{...t,width:o?"100%":"initial"},onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),ref:v,children:i}),e(fe,{anchorElement:v,isOpen:c||n,onClose:d.useCallback(()=>m(!1),[]),direction:r,shadow:!1,animation:!0,gap:"xs2",isDirectionFixed:l,children:w("div",{className:q(z7[r],x7),children:[e("div",{className:q(y7),children:s}),e("div",{className:q(q7,w7[r]),children:e(g1,{})})]})})]})};rr.displayName=b.Tooltip;const a1=rr;var S7="bkxabb0";const b7={1:"xl2",2:"xl",3:"md",4:"sm",5:"xs",6:"xs2"},I7={1:"gray.900",2:"gray.800",3:"gray.700",4:"gray.700",5:"gray.700",6:"gray.700"},nr=({className:a,style:t,level:r=1,color:n=I7[r],fontSize:l=b7[r],children:i})=>{const s=q(a,S7,xe[l],be[n]);switch(r){case 1:return e("h1",{className:s,style:t,children:i});case 2:return e("h2",{className:s,style:t,children:i});case 3:return e("h3",{className:s,style:t,children:i});case 4:return e("h4",{className:s,style:t,children:i});case 5:return e("h5",{className:s,style:t,children:i});case 6:return e("h6",{className:s,style:t,children:i})}};nr.displayName=b.Heading;const W7=nr;var N7={no:"_1d1n4wd2",xs2:"_1d1n4wd3",xs:"_1d1n4wd4",sm:"_1d1n4wd5",md:"_1d1n4wd6",lg:"_1d1n4wd7",xl:"_1d1n4wd8",xl2:"_1d1n4wd9",xl3:"_1d1n4wda",xl4:"_1d1n4wdb",max:"_1d1n4wdc",at:"_1d1n4wdd"},T7="_1d1n4wde",lr={enabled:"_1d1n4wdf",disabled:"_1d1n4wdg"},ir="_1d1n4wd1",C7="_1d1n4wdk",k7="_1d1n4wdl",B7="_1d1n4wd0",E7="_1d1n4wdh",sr={enabled:"_1d1n4wdi",disabled:"_1d1n4wdj"};const M7=({className:a,style:t,item:r,disabled:n,depth:l})=>{const[i,s]=d.useState(!1),[o,c]=d.useState(!1),m=n||r.option.disabled,v=d.useMemo(()=>i?"white.800":m?"gray.400":o?"green.800":r.option.iconDefaultColor??"gray.500",[i,m,o,r.option.iconDefaultColor]),p=()=>{m||r.option.onClick()},f=()=>{m||c(!0)},y=()=>{m||c(!1)},z=_=>{_.key==="Enter"&&(m||r.option.onClick())},g=()=>{if(m)return;s(!0);const _=()=>{s(!1),document.removeEventListener("mouseup",_)};document.addEventListener("mouseup",_)};return e("div",{className:a,style:t,children:w("div",{className:q(T7,m?lr.disabled:lr.enabled,r.option.disabled&&ir),style:{paddingLeft:`calc(${J.spacing.xs2} + ${l} * ${J.spacing.lg})`},onClick:p,onMouseOver:f,onMouseOut:y,onMouseDown:g,onKeyDown:z,tabIndex:0,children:[w("span",{className:k7,children:[e("span",{children:r.option.label}),r.option.icon&&e(L,{icon:r.option.icon,color:v,size:"md"})]}),r.option.exLabel&&e("span",{children:r.option.exLabel})]})})},R7=()=>e("div",{children:e("hr",{className:C7})}),D7=({className:a,style:t,item:r,disabled:n,depth:l})=>w("div",{className:a,style:t,children:[e("span",{className:q(E7,n?sr.disabled:sr.enabled),style:{paddingLeft:`calc(${J.spacing.xs2} + ${l} * ${J.spacing.lg})`},children:r.title}),e(k1,{options:r.items,groupDivider:r.groupDivider,buttonDivider:r.buttonDivider,disabled:n,depth:l+1})]}),or=({className:a,style:t,options:r,width:n="10rem",p:l="no",borderRadius:i="no",disabled:s=!1,expand:o=!1,groupDivider:c=!1,buttonDivider:m=!1,depth:v=0})=>{const p=d.useMemo(()=>{const f={kind:"divider"};return r.map((z,g)=>{if(z.kind==="divider")return[f];const _={kind:"item",item:z};if(g+1===r.length)return[_];switch(r[g].kind){case"group":return c?[_,f]:[_];case"button":return m&&r[g+1].kind==="button"?[_,f]:[_];case"divider":return[]}}).flat()},[m,c,r]);return e("div",{className:q(a,B7,s&&ir,v===0&&N7[i]),style:{...t,minWidth:o?"100%":n},children:e(Y,{gap:"xs2",p:v===0?l:"no",children:p.map((f,y)=>{if(f.kind==="divider")return e(R7,{},`divider-${y}`);if(f.item.kind==="group")return e(D7,{item:f.item,disabled:s,depth:v},`group-${y}-${f.item.title}`);if(f.item.kind==="button")return e(M7,{item:f.item,disabled:s,depth:v},`button-${y}-${f.item.option.value}`)})})})};or.displayName=b.PopupButtonGroup;const k1=or;var Z7="sz1rv32",P7="sz1rv31",L7="sz1rv30",j7="sz1rv34",A7="sz1rv35",Q7="sz1rv37",F7="sz1rv38",H7="sz1rv36",O7="sz1rv33",V7="sz1rv3a",G7="sz1rv39",U7="sz1rv3b";const cr=({className:a,style:t,icon:r,label:n,active:l,disabled:i=!1,tooltipText:s,buttons:o,isPopupOpen:c=!1,onTogglePopup:m,...v})=>{var k;const p="href"in v,f=p?"a":v.as,y=!!((k=v==null?void 0:v.href)!=null&&k.startsWith("http")),z=p?{href:i?void 0:v.href??"",target:!i&&y?"_blank":void 0}:{...v.asProps,style:{cursor:i?"not-allowed":"pointer",...v.asProps.style}},g=d.useRef(null),_=o&&o.length>0,x=d.useCallback(()=>{m==null||m(!1)},[m]),S=()=>{m==null||m(!c)},W=d.useCallback(D=>D.map(T=>T.kind==="divider"?T:T.kind==="button"?{kind:"button",option:{...T.option,onClick:()=>{T.option.onClick(),x()}}}:{...T,items:W(T.items)}),[x]),C=d.useMemo(()=>o?W(o):[],[o,W]),E=e("div",{ref:g,onClick:S,className:a,style:{...t,display:s?"block":"inline-block"},children:e(f,{...z,className:q(O7,i?A7:l&&j7),children:w(Z,{justify:"between",align:"center",width:"100%",nowrap:!0,children:[w(Z,{nowrap:!0,gap:"sm",children:[e("div",{className:q(H7,i?F7:l&&Q7),style:{display:"flex",alignItems:"center"},children:e(L,{icon:r,color:"inherit"})}),e("div",{className:q(G7,!i&&l&&V7),children:n})]}),_&&e(L,{icon:ye,color:!i&&l?"green.800":"gray.700"})]})})});return w(oe,{children:[s?e(a1,{content:e("div",{children:s}),children:E}):w(oe,{children:[" ",E," "]}),_&&e(fe,{anchorElement:g,isOpen:c,onClose:x,direction:"rightTop",layer:"popover",isDirectionFixed:!0,children:e("div",{className:U7,children:e(k1,{options:C,p:"xs",borderRadius:"xs2",disabled:i})})})]})};cr.displayName=b.NavigationItem;const Y7=cr,dr=({className:a,style:t,isOpen:r,width:n="180px",sticky:l=!1,children:i,footer:s})=>{const o=r?n:`calc(${J.spacing.xl} * 2 + ${J.spacing.sm})`,c=l?{position:"sticky",top:`calc(${J.share.HEADER_HEIGHT} + 1px)`,left:0,borderRight:`1px solid ${J.color.gray[400]}`,height:`calc(100vh - ${J.share.HEADER_HEIGHT} - 1px)`}:{};return w("div",{className:q(a,L7),style:{...t,...c,width:o},children:[e("div",{className:P7,children:i}),r&&s&&e("div",{className:Z7,children:s})]})};dr.displayName=b.NavigationContainer;const K7=dr;var X7="_1tqo4fx2",J7="_1tqo4fx1",$7="_1tqo4fx0";const hr=({className:a,style:t,isOpen:r,children:n,options:l,skeleton:i,gap:s,isDirectionFixed:o,onClose:c})=>{const m=d.useRef(null);return w(oe,{children:[e("div",{className:a,ref:m,style:{...t,width:"fit-content",height:"fit-content"},children:n}),e(fe,{isOpen:r,onClose:c,anchorElement:m,gap:s,isDirectionFixed:o,children:e("div",{className:q($7,i&&J7),children:e(Y,{p:"xs",gap:"xs2",children:l})})})]})};hr.displayName=b.Dropdown;const ec=hr,ur=({className:a,style:t,icon:r,disabled:n=!1,onClick:l,children:i})=>{const[s,o]=d.useState(!1),[c,m]=d.useState(!1);function v(){if(c)return"white.800";if(s)return"green.800"}return e("button",{type:"button",className:q(a,X7),style:t,disabled:n,onClick:l,onMouseOver:()=>o(!0),onMouseOut:()=>o(!1),onMouseDown:()=>m(!0),onMouseUp:()=>m(!1),children:w(Z,{align:"center",children:[i,r&&e(L,{icon:r,size:"md",color:v()})]})})};ur.displayName=b.DropdownItem;const tc=ur;var ac="_1lgeoz87",rc="_1lgeoz82",nc="_1lgeoz88",lc="_1lgeoz83",ic="_1lgeoz84",sc="_1lgeoz80",oc={default:"_1lgeoz85",expand:"_1lgeoz86"};const cc=200,dc=3e3,mr=({className:a,style:t,message:r,expand:n=!1,enableAnimation:l=!1,autoClose:i=!1,onClose:s})=>{const[o,c]=d.useState(!!l),m=n?"expand":"default";d.useEffect(()=>{l&&c(!1)},[l]);const v=d.useCallback(()=>{if(!l){s();return}c(!0),setTimeout(()=>{s()},cc)},[l,s]);return d.useEffect(()=>{i&&setTimeout(()=>{v()},dc)},[]),e("div",{className:q(a,sc,oc[m],o&&lc),style:t,children:w("div",{className:rc,children:[e(L,{icon:He,color:"white.800"}),e("div",{className:ic,children:e(ee,{color:"white.800",fontSize:"sm",children:r})}),e("button",{type:"button",className:ac,onClick:v,children:e(L,{icon:Ne,color:"white.800"})})]})})};mr.displayName=b.SnackBar;const vr=mr,fr=d.createContext({showSnackbar:()=>{}}),hc=()=>d.useContext(fr),pr=(()=>{if(!window)return 0;const a=he("md");return!a||a==="auto"?0:a==="9999px"?9999:parseFloat(a)*parseFloat(window.getComputedStyle(document.documentElement).fontSize)})(),uc=({children:a})=>{const[t,r]=d.useState([]),n=d.useRef([]),l=d.useRef(0);d.useEffect(()=>{n.current=n.current.slice(0,t.length)},[t.length]);const i=o=>n.current.slice(0,o).reduce((c,m)=>{const v=m==null?void 0:m.getBoundingClientRect();return c+((v==null?void 0:v.height)??0)+pr},pr),s=(o,c)=>{r(m=>[...m,{message:o,options:c,id:`${new Date().toISOString()}-${l.current++}`}])};return w(fr.Provider,{value:{showSnackbar:s},children:[a,t.map((o,c)=>{var m;return e("div",{className:nc,ref:v=>n.current[c]=v,style:{transitionDuration:"0.2s",bottom:i(c)},children:e(vr,{message:o.message,expand:(m=o.options)==null?void 0:m.expand,onClose:()=>{r(v=>v.filter(p=>p.id!==o.id))},enableAnimation:!0,autoClose:!0})},o.id)})]})};var mc="_1fl1cku3",vc="_1fl1cku0",fc={default:"_1fl1cku1",disabled:"_1fl1cku2"};function pc(a){return a?"error":"default"}const gr=d.forwardRef(({className:a,style:t,id:r,value:n,placeholder:l,disabled:i,expand:s,rows:o=3,error:c,resize:m="none",maxWidth:v,minWidth:p,maxHeight:f,minHeight:y,onChange:z},g)=>{const _=d.useContext(we),x=c||_.error;return e("textarea",{ref:g,id:r,value:n,placeholder:l,disabled:i,rows:o,style:{...t,resize:m,maxWidth:v,minWidth:p,maxHeight:f,minHeight:y},className:q(a,vc,fc[i?"disabled":"default"],s&&mc,ge[pc(x)]),onChange:S=>z(S.target.value)})});gr.displayName=b.TextArea;const yr=gr;var gc={no:"v2atas6",xs2:"v2atas7",xs:"v2atas8",sm:"v2atas9",md:"v2atasa",lg:"v2atasb",xl:"v2atasc",xl2:"v2atasd",xl3:"v2atase",xl4:"v2atasf",max:"v2atasg",at:"v2atash"},yc="v2atas5",wr="v2atas2",B1="v2atas1",wc={last:"v2atas3",noLast:"v2atas4"};const qr=({className:a,style:t,width:r="100%",height:n="100%",borderRadius:l="no",isLoading:i=!0,children:s})=>{const o=i?q(a,B1,wr,gc[l]):a;return e("div",{className:o,style:{...t,width:r,height:n},children:s})};qr.displayName=b.Skeleton;const qc=qr,xr=({className:a,style:t,size:r="2.5rem",isLoading:n=!0,children:l})=>{const i=n?q(a,B1,yc):a;return e("div",{className:i,style:{...t,width:r,height:r},children:l})};xr.displayName=b.SkeletonCircle;const xc=xr,zr=({className:a,style:t,fontSize:r="lg",gap:n="sm",lines:l=1,isLoading:i=!0,children:s})=>{const o=c=>l===1?"noLast":c===l-1?"last":"noLast";return i?e(Y,{className:a,style:t,gap:n,children:Array.from({length:l},(c,m)=>e("div",{className:q(B1,wr,wc[o(m)],ll[r])},m))}):e(oe,{children:s})};zr.displayName=b.SkeletonText;const zc=zr;var _c="a4jm6v0",Sc="a4jm6v1",bc="a4jm6v3",Ic="a4jm6v4";const _r=({className:a,style:t,isLoading:r})=>e("div",{className:q(a,_c,!r&&Ic),style:t,children:e("div",{className:Sc,children:e("div",{className:bc})})});_r.displayName=b.LoadingOverlay;const Wc=_r;var E1="_1p7y12v3",M1={default:"_1p7y12v4",active:"_1p7y12v5"},Sr={left:"_1p7y12v1",right:"_1p7y12v2"},Nc="_1p7y12v0";const R1=({onKeyDown:a,...t})=>e("div",{role:"button",tabIndex:0,...t,onKeyDown:r=>{a==null||a(r),(r.key==="Enter"||r.key===" ")&&r.target instanceof HTMLElement&&(r.stopPropagation(),r.target.click())}}),br=({className:a,style:t,currentPage:r,length:n,onChangePage:l,sideLength:i=2})=>{const s=Math.max(0,i),o=2*s+1,c=v=>{if(v<1)return l(1);if(v>n)return l(n);l(v)},m=()=>{if(n<o)return Array.from({length:n}).map((p,f)=>f+1);function v(){return r<=s?1:r>n-s?n-2*s:r-s}return Array.from({length:o}).map((p,f)=>v()+f)};return w("nav",{className:q(a,Nc,r<=1&&Sr.left,r>=n&&Sr.right),style:t,"aria-label":ne.PAGINATION,children:[r>1&&e(R1,{onClick:()=>c(r-1),className:q(E1,M1.default),"aria-label":ne.PAGINATION_PREV,children:e(L,{icon:Fe,size:"xl2"})}),m().map(v=>{const p=r===v;return e(R1,{onClick:()=>c(v),className:q(E1,M1[p?"active":"default"]),"aria-current":p?"page":void 0,children:v},v)}),r<n&&e(R1,{onClick:()=>c(r+1),className:q(E1,M1.default),"aria-label":ne.PAGINATION_NEXT,children:e(L,{icon:ye,size:"xl2"})})]})};br.displayName=b.Pagination;const Tc=br;var Cc="b6d2ts0";const kc=a=>{const t=a.getHours(),r=a.getMinutes();return[t,r].map(n=>String(n).padStart(2,"0")).join(":")},Bc=a=>{const t=a.getFullYear(),r=a.getMonth()+1,n=a.getDate(),l=a.getHours(),i=a.getMinutes(),s=[t,r,n].map(c=>String(c).padStart(2,"0")).join("/"),o=[l,i].map(c=>String(c).padStart(2,"0")).join(":");return`${s} ${o}`},pe={year:31536e6,month:2592e6,day:864e5,hour:36e5,minute:6e4},Ec=a=>{const t=new Date().getTime()-a.getTime(),r=(n,l)=>Math.floor(t/n)+l;return t<pe.minute?"たった今":t<pe.hour?r(pe.minute,"分前"):t<pe.day?r(pe.hour,"時間前"):t<pe.month?r(pe.day,"日前"):t<pe.year?r(pe.month,"ヶ月前"):r(pe.year,"年前")},Mc=(a,t=!1)=>{const r=a.getMonth()+1,n=a.getDate(),l=["日","月","火","水","木","金","土"][a.getDay()];return[r,n].map(i=>t?String(i).padStart(2,"0"):String(i)).join("/").concat(`(${l})`)},Rc=a=>{const t=Math.floor(a),r=Math.floor((a-t)*60);return[t,r.toString().padStart(2,"0")].join(":")},Dc=a=>{let t=a;return t=t.replace(/&/g,"&amp;"),t=t.replace(/</g,"&lt;"),t=t.replace(/>/g,"&gt;"),t},Ir=/(https?:\/\/[\w/:%#\$&\?\(\)~\.=\+\-]+)/g,Zc=a=>Dc(a).split(Ir).map(t=>t===""?null:{type:t.match(Ir)?"link":"text",content:t}).filter(t=>t!==null),Wr=300,Nr=({className:a,style:t,isOpen:r,textValue:n,username:l,placeholder:i,messages:s,haveNewMessage:o,formRows:c,typingUsername:m,status:v,statusOptions:p,statusPlaceholder:f,onChangeStatus:y,onChangeTextValue:z,onSubmit:g,onToggle:_})=>{const x=d.useRef(null),S=d.useRef(null),W=d.useRef(null),[C,E]=d.useState(0),k=d.useMemo(()=>{const R=[];return s.forEach(V=>{const H=new Date(V.time),j=R.find(B=>B.date.getFullYear()===H.getFullYear()&&B.date.getMonth()===H.getMonth()&&B.date.getDate()===H.getDate());j?j.contents.push(V):R.push({date:H,contents:[V]})}),R},[s]),[D,T]=d.useState(!1),F=d.useCallback(()=>{_(),T(!0),setTimeout(()=>{T(!1)},Wr)},[_]);return d.useLayoutEffect(()=>{const R=x.current,V=S.current;if(!R||!V)return;const H=()=>{const B=R.getBoundingClientRect(),A=V.getBoundingClientRect();E(A.top-B.top-B.height)};H();const j=new ResizeObserver(()=>{H()});return j.observe(R),()=>{j.disconnect()}},[]),d.useEffect(()=>{const R=W.current;R&&r&&R.scrollTo(0,R.scrollHeight)},[r,s]),w(Ie,{className:a,style:t,ref:x,position:"fixed",right:"1.5rem",bottom:r?"0":`${C}px`,transition:D?`bottom ${Wr}ms ease-in-out`:void 0,width:"20rem",zIndex:"floating",children:[w(Le,{shadow:!0,align:"stretch",mainHeaderArea:w(Z,{align:"center",gap:"xs2",nowrap:!0,children:[e(ee,{color:"gray.700",as:"span",bold:!0,children:l}),o&&e(Ie,{width:J.fontSize.md,height:J.fontSize.md,bgColor:"red.800",round:"max"})]}),subHeaderArea:e(L,{size:"xl2",color:"gray.500",icon:r?ze:Ee}),footerArea:w(Y,{width:"100%",justify:"end",gap:"xs",children:[e(Br,{value:n,onChange:z,onSubmit:g,placeholder:i,formRows:c}),v!==void 0&&p!==void 0&&w(Z,{nowrap:!0,children:[e(Ka,{options:p,value:v,onChange:R=>y==null?void 0:y(R),placeholder:f,expand:!0}),e("div",{style:{width:J.spacing.xl4,flexShrink:0}})]}),m&&w(ee,{color:"gray.600",as:"p",fontSize:"xs2",children:[e(ee,{as:"span",bold:!0,fontSize:"xs2",color:"gray.700",children:m})," さんが入力しています..."]})]}),children:[e("div",{ref:S,children:e(je,{})}),e(Ie,{overflowY:"scroll",ref:W,children:e(Y,{gap:"xs",py:"xs",height:"320px",nowrap:!0,children:k.map(({date:R,contents:V},H)=>{const j=`${R.toDateString()}-${H}`;return w(d.Fragment,{children:[e(Z,{justify:"center",children:e(We,{label:Mc(R),variant:"mono",fontSize:"xs2"})}),V.map((B,A)=>e(Cr,{content:B,maxChatItemWidth:"192px"},`${j}-${H}-${A}`))]},j)})})})]}),e("button",{type:"button",className:Cc,onClick:F})]})};Nr.displayName=b.ChatCard;const Pc=Nr;function Lc(a){return a<1?"未読":a===1?"既読":`既読${a}`}const Tr=({className:a,style:t,content:r,maxChatItemWidth:n})=>{const l=Zc(r.message),i=r.sender==="me";return w(Y,{className:a,style:t,align:i?"end":"start",children:[r.username&&e(ee,{as:"span",fontSize:"xs2",color:"gray.600",children:r.username}),w(Z,{align:"end",gap:"xs2",reverse:i,children:[e(Le,{border:!0,fit:!0,px:"md",py:"xs",maxWidth:n,children:l.map((s,o)=>s.type==="link"?e(l5,{href:s.content,openInNewTab:!0,fontSize:"xs",children:s.content},`anchor-${o}`):e(ee,{as:"span",fontSize:"xs",color:"gray.700",whiteSpace:"preLine",breakAll:!0,children:s.content},`text-${o}`))}),w(Y,{align:i?"end":"start",children:[r.readers&&e(a1,{content:r.readers.join(`
43
43
  `),children:e(ee,{as:"span",fontSize:"xs2",color:"gray.500",children:Lc(r.readers.length)})}),e(ee,{as:"span",fontSize:"xs2",color:"gray.500",children:kc(r.time)})]})]})]})};Tr.displayName=b.ChatItem;const Cr=Tr,kr=({className:a,style:t,value:r,disabled:n,placeholder:l,formRows:i,onChange:s,onSubmit:o})=>w(Z,{className:a,style:t,align:"center",gap:"xs",nowrap:!0,children:[e(yr,{value:r,placeholder:l,disabled:n,rows:i,expand:!0,onChange:s}),e("div",{children:e(Pe,{icon:_1,disabled:n,onClick:o})})]});kr.displayName=b.ChatForm;const Br=kr,Er=d.createContext({}),Mr=({className:a,style:t,htmlFor:r,label:n,required:l,error:i,direction:s="horizontal",children:o})=>{const{labelWidth:c="8rem",labelColor:m,labelFontSize:v}=d.useContext(Er),p=d.useMemo(()=>s==="horizontal"?c:void 0,[c,s]);return e(we.Provider,{value:{error:i!==void 0},children:w(Y,{style:{...t,paddingBottom:i===void 0?J.fontSize.sm:void 0},children:[w(Be,{className:a,direction:s,nowrap:!0,align:s==="horizontal"?"center":void 0,children:[w(Z,{width:c,align:"center",gap:"xs2",py:"xs2",children:[e(ee,{as:"label",htmlFor:r,color:m,fontSize:v,children:n}),l&&e(We,{fontSize:"xs2",label:"必須"})]}),o]}),e(ee,{fontSize:"xs2",lineHeight:"sm",color:"red.800",style:{marginInlineStart:p},children:i})]})})};Mr.displayName=b.FormControl;const jc=Mr,Rr=({className:a,style:t,labelWidth:r,labelColor:n="gray.900",labelFontSize:l="md",gap:i="md",children:s})=>e(Er.Provider,{value:{labelWidth:r,labelColor:n,labelFontSize:l},children:e(Y,{className:a,style:t,gap:i,children:s})});Rr.displayName=b.FormGroup;const Ac=Rr,Dr=({className:a,style:t,title:r,timestamp:n,variant:l="primary",read:i,tableInfo:s,width:o,onClick:c})=>{const[m,v]=d.useState(!1),[p,f]=d.useState(!1),[y,z]=d.useState(window.innerWidth);d.useEffect(()=>{function W(){z(window.innerWidth)}return window.addEventListener("resize",W),()=>{window.removeEventListener("resize",W)}},[]);const g=d.useMemo(()=>Bc(n),[n]),_=d.useMemo(()=>Ec(n),[n]),x=y>768,S=()=>{if(x){if(p)return"green.300";if(m)return"gray.200"}return"white.800"};return e(Ie,{className:a,style:t,onMouseOver:d.useCallback(()=>v(!0),[]),onMouseLeave:d.useCallback(()=>v(!1),[]),onPointerDown:d.useCallback(()=>f(!0),[]),onPointerUp:d.useCallback(()=>f(!1),[]),onClick:c,bgColor:S(),height:"fit-content",cursor:"pointer",width:o,children:w(Z,{px:"md",py:"xs",justify:"between",align:"center",nowrap:!0,children:[w(Y,{gap:"xs",position:"relative",width:"100%",children:[l==="primary"&&w(Z,{justify:"between",align:"start",children:[e(Y,{gap:"xs",children:s==null?void 0:s.map((W,C)=>w(Z,{gap:"xl",children:[e(ee,{bold:!i,fontSize:"xs",color:"gray.700",children:W.title}),e(ee,{bold:!i,fontSize:"xs",color:"gray.700",children:W.content})]},C))}),e(ee,{color:"gray.600",fontSize:"xs2",children:_})]}),e(ee,{color:"gray.700",fontSize:"xs",maxLines:2,bold:!i,children:r}),l==="secondary"&&e(ee,{color:"gray.600",fontSize:"xs2",children:g})]}),e(L,{icon:ye,color:"green.800"})]})})};Dr.displayName=b.NotificationPanel;const Zr=Dr,Pr=({className:a,style:t,variant:r,notifications:n,height:l,emptyMessage:i,onClick:s})=>w(Ie,{className:a,style:t,height:l,overflowY:"scroll",children:[n.map((o,c)=>w(d.Fragment,{children:[e(Zr,{variant:r,read:o.read,title:o.title,timestamp:o.timestamp,tableInfo:o.tableInfo,onClick:()=>s==null?void 0:s(o.id)}),c!==n.length-1&&e(je,{})]},o.id)),n.length===0&&e(Z,{align:"center",justify:"center",height:"100%",children:e(ee,{color:"gray.600",fontSize:"sm",children:i})})]});Pr.displayName=b.NotificationList;const Lr=Pr,jr=({className:a,style:t,tabs:r,notifications:n,height:l,emptyMessage:i,onClick:s})=>{const[o,c]=d.useState(r[0].name??""),m=d.useMemo(()=>n.filter(p=>p.tabName===o),[o,n]),v=d.useMemo(()=>{var p;return(p=r.find(f=>f.name===o))==null?void 0:p.variant},[o,r]);return w("div",{className:a,style:t,children:[e(Ct,{items:r,activeTabName:o,onClickTab:p=>c(p)}),e(Ie,{bgColor:"white.800",roundB:"xs2",overflow:"hidden",children:e(Lr,{notifications:m,variant:v,height:l,emptyMessage:i,onClick:s})})]})};jr.displayName=b.Notification;const Qc=jr;var Fc="dev1455",Ar={primary:"dev1452 dev1451",secondary:"dev1453 dev1451",tertiary:"dev1454 dev1451"},Hc="dev1459",Oc="dev145a",Vc="dev1450",Gc="dev1456",Uc="dev1457",Yc="dev1458";const D1=({className:a,style:t,id:r,variant:n="primary",text:l,gridRow:i,gridColumn:s,show:o=!0,onScheduleClick:c})=>{const m=()=>{const[v,p]=i.split("/").map(f=>f.trim()).map(Number);return p-v>2?l:""};return c?e("button",{type:"button",className:q(a,Ar[n],Fc),style:{...t,gridRow:i,gridColumn:s},hidden:!o,onClick:()=>c(r),children:m()}):e("div",{className:Ar[n],style:{gridRow:i,gridColumn:s},hidden:!o,children:m()})};D1.displayName=b.ScheduleCard;const Z1=0,P1=23,Kc=8,Xc=22,r1=4,Jc=(a,t)=>`startHourはendHour以下の値を指定してください。
44
44
  startHour: ${a}, endHour: ${t}`,Qr=(a,t)=>`${a}Hourは${Z1}以上${P1}以下の値を指定してください。
45
45
  ${a}Hour: ${t}`,$c=(a,t)=>`Scheduleは${a}時以降から始まる必要があります
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wizleap-inc/wiz-ui-react",
3
- "version": "0.69.0",
3
+ "version": "0.69.1",
4
4
  "description": "A React UI Framework for Wizleap Inc.",
5
5
  "devDependencies": {
6
6
  "@storybook/react": "^7.0.2",
@@ -26,8 +26,8 @@
26
26
  "react": "^18.2.0",
27
27
  "react-dom": "^18.2.0",
28
28
  "@wizleap-inc/wiz-ui-constants": "0.29.0",
29
- "@wizleap-inc/wiz-ui-styles": "0.32.0",
30
- "@wizleap-inc/wiz-ui-utils": "0.3.0"
29
+ "@wizleap-inc/wiz-ui-utils": "0.3.0",
30
+ "@wizleap-inc/wiz-ui-styles": "0.32.0"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "tsc --noEmit && vite build",