@wizleap-inc/wiz-ui-react 0.60.2 → 0.60.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/dist/wiz-ui.es.js +2 -0
- package/dist/wiz-ui.umd.js +1 -1
- package/package.json +1 -1
package/dist/wiz-ui.es.js
CHANGED
|
@@ -7394,6 +7394,8 @@ const _6 = l2, i2 = Ae({
|
|
|
7394
7394
|
showSnackbar: () => {
|
|
7395
7395
|
}
|
|
7396
7396
|
}), I8 = () => ve(i2), Yt = (() => {
|
|
7397
|
+
if (!window)
|
|
7398
|
+
return 0;
|
|
7397
7399
|
const r = me("md");
|
|
7398
7400
|
return !r || r === "auto" ? 0 : r === "9999px" ? 9999 : parseFloat(r) * parseFloat(window.getComputedStyle(document.documentElement).fontSize);
|
|
7399
7401
|
})(), b6 = ({ children: r }) => {
|
package/dist/wiz-ui.umd.js
CHANGED
|
@@ -39,7 +39,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
39
39
|
rotate(-${s}rad)
|
|
40
40
|
`},x=new ResizeObserver(q);return x.observe(y),()=>{x.disconnect()}},[i,s]),d.useEffect(()=>{const f=v.current,y=m.current;if(!f||!y)return;const q=()=>{f.forEach((_,S)=>{const z=y[S];if(!z||!_)return;const C=8;if(z.offsetHeight+C*2<_.offsetHeight){z.style.padding=`${C}px 0`;return}if(z.style.padding="0",z.offsetHeight<_.offsetHeight){z.style.top=(_.offsetHeight-z.offsetHeight)/2+"px";return}z.style.top=z.offsetHeight*-1+"px",z.style.color="#606166"})},x=new ResizeObserver(q);return f.forEach(_=>{_&&x.observe(_)}),()=>{x.disconnect()}},[]),w("div",{className:g(a,D7),style:t,ref:o,children:[e("span",{className:M7,ref:c,children:r.label}),p.map((f,y)=>e("div",{className:g(E7,f.bgColorStyle),style:f.elementStyle,ref:q=>{v.current[y]=q},children:f.frequency!==0&&e("span",{className:g(R7,f.numberColorStyle),ref:q=>{m.current[y]=q},children:f.frequency})},f.id))]})},Va=({className:a,style:t,data:r,maxFrequency:n,ceilN:l=0,barGap:i=.1,barGroupWidth:s=.8,unit:o,unitPosition:c="no",isTilted:v=!1,children:m})=>{const p=c==="intersection"?o:void 0,f=c==="vertical"?o:void 0,y=v?Math.PI/4:0,q=d.useMemo(()=>{if(n)return n;const x=r.map(z=>z.data).flat(),_=Math.max(...x.map(z=>z.frequency)),S=Math.pow(10,l);return Math.ceil(_/S)*S},[l,r,n]);return w("div",{className:g(a,L7),style:t,children:[w("div",{className:P7,children:[p&&w("span",{className:g(C1,N1.unit),children:["(",p,")"]}),e("span",{className:g(C1,N1.max),children:q}),w("span",{className:g(C1,N1.half),children:[Math.ceil(q/2),f]})]}),w("div",{className:j7,children:[e("div",{className:Z7,children:r.map((x,_)=>e(Q7,{data:x,maxFrequency:q,barGap:i,barGroupWidth:s,theta:y},`${_}-${x.label}`))}),e("div",{className:A7,children:m})]})]})};Va.displayName=b.CompareGraph;const F7=Va;var H7="_1oth5nf0",O7="_1oth5nf3",V7="_1oth5nf5",U7="_1oth5nf4",G7="_1oth5nf2",Y7="_1oth5nf7",Ua="_1oth5nfa",Ga="_1oth5nf9",Ya="_1oth5nf8",K7="_1oth5nf6",Ka=31.830988618379067,_e=["#3DB783","#84D6B3","#D1F0E2","#E4FBF4","#FAFAFA"],T1=18,X7=2.0845056908104667,e1=15.915494309189533,t1=1.8,Xa=36;const J7=({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${T1} ${X7}
|
|
41
41
|
a ${e1} ${e1} 0 0 1 0 ${Ka}
|
|
42
|
-
a ${e1} ${e1} 0 0 1 0 ${-1*Ka}`;return w("div",{className:g(a,O7),style:t,children:[w("svg",{className:U7,viewBox:`0 0 ${Xa} ${Xa}`,children:[e("path",{className:H7,strokeWidth:t1,d:i}),l.map((s,o)=>e("path",{className:G7,style:{stroke:_e[o]||_e[_e.length-1]},strokeDasharray:`${s.width}, 100`,strokeWidth:t1,d:i,transform:`rotate(${(s.startPercentage+t1/2)*360/100}, ${T1}, ${T1})`},`${o}-${s.startPercentage}-${s.width}`))]}),e("div",{className:V7,children:n})]})},Ja=({className:a,style:t,data:r,otherLabel:n="その他",children:l})=>{const i=d.useMemo(()=>r.map(s=>s.percentage),[r]);return w("div",{className:g(a,K7),style:t,children:[e(J7,{percentages:i,children:l}),w("div",{className:Y7,children:[r.map((s,o)=>w("div",{className:Ya,children:[e("span",{className:Ua,style:{backgroundColor:_e[o]||_e[_e.length-1]}}),e("span",{className:Ga,children:s.label})]},o)),w("div",{className:Ya,children:[e("span",{className:Ua,style:{backgroundColor:_e[_e.length-1]}}),e("span",{className:Ga,children:n})]})]})]})};Ja.displayName=b.CircleGraph;const $7=Ja;var e6="_1nylme52",t6={top:"_1nylme54",bottom:"_1nylme55",left:"_1nylme56",right:"_1nylme57"},a6="_1nylme53",r6="_1nylme51",n6={top:"_1nylme58",bottom:"_1nylme59",left:"_1nylme5a",right:"_1nylme5b"},l6="_1nylme50";const $a=({className:a,style:t,direction:r="top",isOpen:n=!1,isDirectionFixed:l=!1,children:i,content:s,expand:o=!1})=>{const[c,v]=d.useState(!1),m=d.useRef(null);return w(de,{children:[e("div",{className:g(a,l6),style:{...t,width:o?"100%":"initial"},onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),ref:m,children:i}),e(ue,{anchorElement:m,isOpen:c||n,onClose:d.useCallback(()=>v(!1),[]),direction:r,shadow:!1,animation:!0,gap:"xs2",isDirectionFixed:l,children:w("div",{className:g(n6[r],r6),children:[e("div",{className:g(e6),children:s}),e("div",{className:g(a6,t6[r]),children:e(y1,{})})]})})]})};$a.displayName=b.Tooltip;const a1=$a;var i6="bkxabb0";const s6={1:"xl2",2:"xl",3:"md",4:"sm",5:"xs",6:"xs2"},o6={1:"gray.900",2:"gray.800",3:"gray.700",4:"gray.700",5:"gray.700",6:"gray.700"},er=({className:a,style:t,level:r=1,color:n=o6[r],fontSize:l=s6[r],children:i})=>{const s=g(a,i6,qe[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})}};er.displayName=b.Heading;const c6=er;var d6={no:"_1d1n4wd2",xs2:"_1d1n4wd3",xs:"_1d1n4wd4",sm:"_1d1n4wd5",md:"_1d1n4wd6",lg:"_1d1n4wd7",xl:"_1d1n4wd8",xl2:"_1d1n4wd9",xl3:"_1d1n4wda",xl4:"_1d1n4wdb",max:"_1d1n4wdc",at:"_1d1n4wdd"},h6="_1d1n4wde",tr={enabled:"_1d1n4wdf",disabled:"_1d1n4wdg"},ar="_1d1n4wd1",u6="_1d1n4wdk",m6="_1d1n4wdl",v6="_1d1n4wd0",f6="_1d1n4wdh",rr={enabled:"_1d1n4wdi",disabled:"_1d1n4wdj"};const p6=({className:a,style:t,item:r,disabled:n,depth:l})=>{const[i,s]=d.useState(!1),[o,c]=d.useState(!1),v=n||r.option.disabled,m=d.useMemo(()=>i?"white.800":v?"gray.400":o?"green.800":r.option.iconDefaultColor??"gray.500",[i,v,o,r.option.iconDefaultColor]),p=()=>{v||r.option.onClick()},f=()=>{v||c(!0)},y=()=>{v||c(!1)},q=_=>{_.key==="Enter"&&(v||r.option.onClick())},x=()=>{if(v)return;s(!0);const _=()=>{s(!1),document.removeEventListener("mouseup",_)};document.addEventListener("mouseup",_)};return e("div",{className:a,style:t,children:w("div",{className:g(h6,v?tr.disabled:tr.enabled,r.option.disabled&&ar),style:{paddingLeft:`calc(${$.spacing.xs2} + ${l} * ${$.spacing.lg})`},onClick:p,onMouseOver:f,onMouseOut:y,onMouseDown:x,onKeyDown:q,tabIndex:0,children:[w("span",{className:m6,children:[e("span",{children:r.option.label}),r.option.icon&&e(j,{icon:r.option.icon,color:m,size:"md"})]}),r.option.exLabel&&e("span",{children:r.option.exLabel})]})})},y6=()=>e("div",{children:e("hr",{className:u6})}),g6=({className:a,style:t,item:r,disabled:n,depth:l})=>w("div",{className:a,style:t,children:[e("span",{className:g(f6,n?rr.disabled:rr.enabled),style:{paddingLeft:`calc(${$.spacing.xs2} + ${l} * ${$.spacing.lg})`},children:r.title}),e(r1,{options:r.items,groupDivider:r.groupDivider,buttonDivider:r.buttonDivider,disabled:n,depth:l+1})]}),nr=({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:v=!1,depth:m=0})=>{const p=d.useMemo(()=>{const f={kind:"divider"};return r.map((q,x)=>{if(q.kind==="divider")return[f];const _={kind:"item",item:q};if(x+1===r.length)return[_];switch(r[x].kind){case"group":return c?[_,f]:[_];case"button":return v&&r[x+1].kind==="button"?[_,f]:[_];case"divider":return[]}}).flat()},[v,c,r]);return e("div",{className:g(a,v6,s&&ar,m===0&&d6[i]),style:{...t,minWidth:o?"100%":n},children:e(G,{gap:"xs2",p:m===0?l:"no",children:p.map((f,y)=>{if(f.kind==="divider")return e(y6,{},`divider-${y}`);if(f.item.kind==="group")return e(g6,{item:f.item,disabled:s,depth:m},`group-${y}-${f.item.title}`);if(f.item.kind==="button")return e(p6,{item:f.item,disabled:s,depth:m},`button-${y}-${f.item.option.value}`)})})})};nr.displayName=b.PopupButtonGroup;const r1=nr;var w6="sz1rv32",q6="sz1rv31",x6="sz1rv30",z6="sz1rv34",_6="sz1rv35",S6="sz1rv37",b6="sz1rv38",I6="sz1rv36",W6="sz1rv33",N6="sz1rv3a",C6="sz1rv39",T6="sz1rv3b";const lr=({className:a,style:t,icon:r,label:n,active:l,disabled:i=!1,tooltipText:s,isPopupLocking:o=!0,buttons:c,isPopupOpen:v=!1,onTogglePopup:m,onTogglePopupLocking:p,...f})=>{var Z;const y="href"in f,q=y?"a":f.as,x=!!((Z=f==null?void 0:f.href)!=null&&Z.startsWith("http")),_=y?{href:i?void 0:f.href??"",target:!i&&x?"_blank":void 0}:f.asProps,S=d.useRef(null),z=c&&c.length>0,C=()=>{m==null||m(!0),z&&(p==null||p(!0))},N=()=>{o||m==null||m(!0)},B=()=>{o||m==null||m(!1)},T=d.useCallback(()=>{v&&(m==null||m(!1),p==null||p(!1))},[v,m,p]),D=()=>{o||m==null||m(!0)},k=()=>{o||m==null||m(!1)},V=w(de,{children:[e("div",{ref:S,onClick:C,className:a,style:{...t,display:s?"block":"inline-block"},onMouseEnter:N,onMouseLeave:B,children:w(q,{..._,className:g(W6,i?_6:l&&z6),children:[e("div",{className:g(I6,i?b6:l&&S6),style:{display:"flex",alignItems:"center"},children:e(r,{})}),e("div",{className:g(C6,!i&&l&&N6),children:n})]})}),z&&e("div",{children:e(ue,{anchorElement:S,isOpen:v,onClose:T,direction:"rightTop",layer:"popover",isDirectionFixed:!0,children:e("div",{className:T6,onMouseEnter:D,onMouseLeave:k,children:e(r1,{options:c,p:"xs",borderRadius:"xs2",disabled:i})})})})]});return s?e(a1,{content:s&&e("div",{children:s}),children:V}):V};lr.displayName=b.NavigationItem;const k6=lr,ir=({className:a,style:t,isOpen:r,width:n="180px",sticky:l=!1,children:i,footer:s})=>{const o=r?n:`calc(${$.spacing.xl} * 2 + ${$.spacing.sm})`,c=l?{position:"sticky",top:`calc(${$.share.HEADER_HEIGHT} + 1px)`,left:0,borderRight:`1px solid ${$.color.gray[400]}`,height:`calc(100vh - ${$.share.HEADER_HEIGHT} - 1px)`}:{};return w("div",{className:g(a,x6),style:{...t,...c,width:o},children:[e("div",{className:q6,children:i}),r&&s&&e("div",{className:w6,children:s})]})};ir.displayName=b.NavigationContainer;const B6=ir;var E6="_1tqo4fx2",M6="_1tqo4fx1",R6="_1tqo4fx0";const sr=({className:a,style:t,isOpen:r,children:n,options:l,skeleton:i,gap:s,isDirectionFixed:o,onClose:c})=>{const v=d.useRef(null);return w(de,{children:[e("div",{className:a,ref:v,style:{...t,width:"fit-content",height:"fit-content"},children:n}),e(ue,{isOpen:r,onClose:c,anchorElement:v,gap:s,isDirectionFixed:o,children:e("div",{className:g(R6,i&&M6),children:e(G,{p:"xs",gap:"xs2",children:l})})})]})};sr.displayName=b.Dropdown;const D6=sr,or=({className:a,style:t,icon:r,disabled:n=!1,onClick:l,children:i})=>{const[s,o]=d.useState(!1),[c,v]=d.useState(!1);function m(){if(c)return"white.800";if(s)return"green.800"}return e("button",{type:"button",className:g(a,E6),style:t,disabled:n,onClick:l,onMouseOver:()=>o(!0),onMouseOut:()=>o(!1),onMouseDown:()=>v(!0),onMouseUp:()=>v(!1),children:w(P,{align:"center",children:[i,r&&e(j,{icon:r,size:"md",color:m()})]})})};or.displayName=b.DropdownItem;const Z6=or;var j6="_1lgeoz87",L6="_1lgeoz82",P6="_1lgeoz88",A6="_1lgeoz83",Q6="_1lgeoz84",F6="_1lgeoz80",H6={default:"_1lgeoz85",expand:"_1lgeoz86"};const O6=200,V6=3e3,cr=({className:a,style:t,message:r,expand:n=!1,enableAnimation:l=!1,autoClose:i=!1,onClose:s})=>{const[o,c]=d.useState(!!l),v=n?"expand":"default";d.useEffect(()=>{l&&c(!1)},[l]);const m=d.useCallback(()=>{if(!l){s();return}c(!0),setTimeout(()=>{s()},O6)},[l,s]);return d.useEffect(()=>{i&&setTimeout(()=>{m()},V6)},[]),e("div",{className:g(a,F6,H6[v],o&&A6),style:t,children:w("div",{className:L6,children:[e(j,{icon:He,color:"white.800"}),e("div",{className:Q6,children:e(X,{color:"white.800",fontSize:"sm",children:r})}),e("button",{type:"button",className:j6,onClick:m,children:e(j,{icon:Be,color:"white.800"})})]})})};cr.displayName=b.SnackBar;const dr=cr,hr=d.createContext({showSnackbar:()=>{}}),U6=()=>d.useContext(hr),ur=(()=>{const a=se("md");return!a||a==="auto"?0:a==="9999px"?9999:parseFloat(a)*parseFloat(window.getComputedStyle(document.documentElement).fontSize)})(),G6=({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,v)=>{const m=v==null?void 0:v.getBoundingClientRect();return c+((m==null?void 0:m.height)??0)+ur},ur),s=(o,c)=>{r(v=>[...v,{message:o,options:c,id:`${new Date().toISOString()}-${l.current++}`}])};return w(hr.Provider,{value:{showSnackbar:s},children:[a,t.map((o,c)=>{var v;return e("div",{className:P6,ref:m=>n.current[c]=m,style:{transitionDuration:"0.2s",bottom:i(c)},children:e(dr,{message:o.message,expand:(v=o.options)==null?void 0:v.expand,onClose:()=>{r(m=>m.filter(p=>p.id!==o.id))},enableAnimation:!0,autoClose:!0})},o.id)})]})};var Y6="_1fl1cku3",K6="_1fl1cku0",X6={default:"_1fl1cku1",disabled:"_1fl1cku2"};function J6(a){return a?"error":"default"}const mr=d.forwardRef(({className:a,style:t,id:r,value:n,placeholder:l,disabled:i,expand:s,rows:o=3,error:c,resize:v="none",maxWidth:m,minWidth:p,maxHeight:f,minHeight:y,onChange:q},x)=>{const _=d.useContext(pe),S=c||_.error;return e("textarea",{ref:x,id:r,value:n,placeholder:l,disabled:i,rows:o,style:{...t,resize:v,maxWidth:m,minWidth:p,maxHeight:f,minHeight:y},className:g(a,K6,X6[i?"disabled":"default"],s&&Y6,fe[J6(S)]),onChange:z=>q(z.target.value)})});mr.displayName=b.TextArea;const vr=mr;var $6={no:"v2atas6",xs2:"v2atas7",xs:"v2atas8",sm:"v2atas9",md:"v2atasa",lg:"v2atasb",xl:"v2atasc",xl2:"v2atasd",xl3:"v2atase",xl4:"v2atasf",max:"v2atasg",at:"v2atash"},ec="v2atas5",fr="v2atas2",k1="v2atas1",tc={last:"v2atas3",noLast:"v2atas4"};const pr=({className:a,style:t,width:r="100%",height:n="100%",borderRadius:l="no",isLoading:i=!0,children:s})=>{const o=i?g(a,k1,fr,$6[l]):a;return e("div",{className:o,style:{...t,width:r,height:n},children:s})};pr.displayName=b.Skeleton;const ac=pr,yr=({className:a,style:t,size:r="2.5rem",isLoading:n=!0,children:l})=>{const i=n?g(a,k1,ec):a;return e("div",{className:i,style:{...t,width:r,height:r},children:l})};yr.displayName=b.SkeletonCircle;const rc=yr,gr=({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(G,{className:a,style:t,gap:n,children:Array.from({length:l},(c,v)=>e("div",{className:g(k1,fr,tc[o(v)],el[r])},v))}):e(de,{children:s})};gr.displayName=b.SkeletonText;const nc=gr;var lc="a4jm6v0",ic="a4jm6v1",sc="a4jm6v3",oc="a4jm6v4";const wr=({className:a,style:t,isLoading:r})=>e("div",{className:g(a,lc,!r&&oc),style:t,children:e("div",{className:ic,children:e("div",{className:sc})})});wr.displayName=b.LoadingOverlay;const cc=wr;var B1="_1p7y12v3",E1={default:"_1p7y12v4",active:"_1p7y12v5"},qr={left:"_1p7y12v1",right:"_1p7y12v2"},dc="_1p7y12v0";const M1=({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())}}),xr=({className:a,style:t,currentPage:r,length:n,onChangePage:l,sideLength:i=2})=>{const s=Math.max(0,i),o=2*s+1,c=m=>{if(m<1)return l(1);if(m>n)return l(n);l(m)},v=()=>{if(n<o)return Array.from({length:n}).map((p,f)=>f+1);function m(){return r<=s?1:r>n-s?n-2*s:r-s}return Array.from({length:o}).map((p,f)=>m()+f)};return w("nav",{className:g(a,dc,r<=1&&qr.left,r>=n&&qr.right),style:t,"aria-label":re.PAGINATION,children:[r>1&&e(M1,{onClick:()=>c(r-1),className:g(B1,E1.default),"aria-label":re.PAGINATION_PREV,children:e(j,{icon:Fe,size:"xl2"})}),v().map(m=>{const p=r===m;return e(M1,{onClick:()=>c(m),className:g(B1,E1[p?"active":"default"]),"aria-current":p?"page":void 0,children:m},m)}),r<n&&e(M1,{onClick:()=>c(r+1),className:g(B1,E1.default),"aria-label":re.PAGINATION_NEXT,children:e(j,{icon:xe,size:"xl2"})})]})};xr.displayName=b.Pagination;const hc=xr;var uc="b6d2ts0";const zr=300,_r=({className:a,style:t,isOpen:r,textValue:n,username:l,placeholder:i,messages:s,haveNewMessage:o,formRows:c,typingUsername:v,status:m,statusOptions:p,statusPlaceholder:f,onChangeStatus:y,onChangeTextValue:q,onSubmit:x,onToggle:_})=>{const S=d.useRef(null),z=d.useRef(null),C=d.useRef(null),[N,B]=d.useState(0),T=d.useMemo(()=>{const Z=[];return s.forEach(A=>{const F=new Date(A.time),L=Z.find(M=>M.date.getFullYear()===F.getFullYear()&&M.date.getMonth()===F.getMonth()&&M.date.getDate()===F.getDate());L?L.contents.push(A):Z.push({date:F,contents:[A]})}),Z},[s]),[D,k]=d.useState(!1),V=d.useCallback(()=>{_(),k(!0),setTimeout(()=>{k(!1)},zr)},[_]);return d.useLayoutEffect(()=>{const Z=S.current,A=z.current;if(!Z||!A)return;const F=()=>{const M=Z.getBoundingClientRect(),ae=A.getBoundingClientRect();B(ae.top-M.top-M.height)};F();const L=new ResizeObserver(()=>{F()});return L.observe(Z),()=>{L.disconnect()}},[]),d.useEffect(()=>{const Z=C.current;Z&&r&&Z.scrollTo(0,Z.scrollHeight)},[r,s]),w(Ie,{className:a,style:t,ref:S,position:"fixed",right:"1.5rem",bottom:r?"0":`${N}px`,transition:D?`bottom ${zr}ms ease-in-out`:void 0,width:"20rem",zIndex:"floating",children:[w(Le,{shadow:!0,align:"stretch",mainHeaderArea:w(P,{align:"center",gap:"xs2",nowrap:!0,children:[e(X,{color:"gray.700",as:"span",bold:!0,children:l}),o&&e(Ie,{width:$.fontSize.md,height:$.fontSize.md,bgColor:"red.800",round:"max"})]}),subHeaderArea:e(j,{size:"xl2",color:"gray.500",icon:r?ze:Ee}),footerArea:w(G,{width:"100%",justify:"end",gap:"xs",children:[e(Wr,{value:n,onChange:q,onSubmit:x,placeholder:i,formRows:c}),m!==void 0&&p!==void 0&&w(P,{nowrap:!0,children:[e(H2,{options:p,value:m,onChange:Z=>y==null?void 0:y(Z),placeholder:f,expand:!0}),e("div",{style:{width:$.spacing.xl4,flexShrink:0}})]}),v&&w(X,{color:"gray.600",as:"p",fontSize:"xs2",children:[e(X,{as:"span",bold:!0,fontSize:"xs2",color:"gray.700",children:v})," さんが入力しています..."]})]}),children:[e("div",{ref:z,children:e(Pe,{})}),e(Ie,{overflowY:"scroll",ref:C,children:e(G,{gap:"xs",py:"xs",height:"320px",nowrap:!0,children:T.map(({date:Z,contents:A},F)=>{const L=`${Z.toDateString()}-${F}`;return w(d.Fragment,{children:[e(P,{justify:"center",children:e(Te,{label:to(Z),variant:"mono",fontSize:"xs2"})}),A.map((M,ae)=>e(br,{content:M,maxChatItemWidth:"192px"},`${L}-${F}-${ae}`))]},L)})})})]}),e("button",{type:"button",className:uc,onClick:V})]})};_r.displayName=b.ChatCard;const mc=_r;function vc(a){return a<1?"未読":a===1?"既読":`既読${a}`}const Sr=({className:a,style:t,content:r,maxChatItemWidth:n})=>{const l=no(r.message),i=r.sender==="me";return w(G,{className:a,style:t,align:i?"end":"start",children:[r.username&&e(X,{as:"span",fontSize:"xs2",color:"gray.600",children:r.username}),w(P,{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(X,{as:"span",fontSize:"xs",color:"gray.700",whiteSpace:"preLine",breakAll:!0,children:s.content},`text-${o}`))}),w(G,{align:i?"end":"start",children:[r.readers&&e(a1,{content:r.readers.join(`
|
|
42
|
+
a ${e1} ${e1} 0 0 1 0 ${-1*Ka}`;return w("div",{className:g(a,O7),style:t,children:[w("svg",{className:U7,viewBox:`0 0 ${Xa} ${Xa}`,children:[e("path",{className:H7,strokeWidth:t1,d:i}),l.map((s,o)=>e("path",{className:G7,style:{stroke:_e[o]||_e[_e.length-1]},strokeDasharray:`${s.width}, 100`,strokeWidth:t1,d:i,transform:`rotate(${(s.startPercentage+t1/2)*360/100}, ${T1}, ${T1})`},`${o}-${s.startPercentage}-${s.width}`))]}),e("div",{className:V7,children:n})]})},Ja=({className:a,style:t,data:r,otherLabel:n="その他",children:l})=>{const i=d.useMemo(()=>r.map(s=>s.percentage),[r]);return w("div",{className:g(a,K7),style:t,children:[e(J7,{percentages:i,children:l}),w("div",{className:Y7,children:[r.map((s,o)=>w("div",{className:Ya,children:[e("span",{className:Ua,style:{backgroundColor:_e[o]||_e[_e.length-1]}}),e("span",{className:Ga,children:s.label})]},o)),w("div",{className:Ya,children:[e("span",{className:Ua,style:{backgroundColor:_e[_e.length-1]}}),e("span",{className:Ga,children:n})]})]})]})};Ja.displayName=b.CircleGraph;const $7=Ja;var e6="_1nylme52",t6={top:"_1nylme54",bottom:"_1nylme55",left:"_1nylme56",right:"_1nylme57"},a6="_1nylme53",r6="_1nylme51",n6={top:"_1nylme58",bottom:"_1nylme59",left:"_1nylme5a",right:"_1nylme5b"},l6="_1nylme50";const $a=({className:a,style:t,direction:r="top",isOpen:n=!1,isDirectionFixed:l=!1,children:i,content:s,expand:o=!1})=>{const[c,v]=d.useState(!1),m=d.useRef(null);return w(de,{children:[e("div",{className:g(a,l6),style:{...t,width:o?"100%":"initial"},onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),ref:m,children:i}),e(ue,{anchorElement:m,isOpen:c||n,onClose:d.useCallback(()=>v(!1),[]),direction:r,shadow:!1,animation:!0,gap:"xs2",isDirectionFixed:l,children:w("div",{className:g(n6[r],r6),children:[e("div",{className:g(e6),children:s}),e("div",{className:g(a6,t6[r]),children:e(y1,{})})]})})]})};$a.displayName=b.Tooltip;const a1=$a;var i6="bkxabb0";const s6={1:"xl2",2:"xl",3:"md",4:"sm",5:"xs",6:"xs2"},o6={1:"gray.900",2:"gray.800",3:"gray.700",4:"gray.700",5:"gray.700",6:"gray.700"},er=({className:a,style:t,level:r=1,color:n=o6[r],fontSize:l=s6[r],children:i})=>{const s=g(a,i6,qe[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})}};er.displayName=b.Heading;const c6=er;var d6={no:"_1d1n4wd2",xs2:"_1d1n4wd3",xs:"_1d1n4wd4",sm:"_1d1n4wd5",md:"_1d1n4wd6",lg:"_1d1n4wd7",xl:"_1d1n4wd8",xl2:"_1d1n4wd9",xl3:"_1d1n4wda",xl4:"_1d1n4wdb",max:"_1d1n4wdc",at:"_1d1n4wdd"},h6="_1d1n4wde",tr={enabled:"_1d1n4wdf",disabled:"_1d1n4wdg"},ar="_1d1n4wd1",u6="_1d1n4wdk",m6="_1d1n4wdl",v6="_1d1n4wd0",f6="_1d1n4wdh",rr={enabled:"_1d1n4wdi",disabled:"_1d1n4wdj"};const p6=({className:a,style:t,item:r,disabled:n,depth:l})=>{const[i,s]=d.useState(!1),[o,c]=d.useState(!1),v=n||r.option.disabled,m=d.useMemo(()=>i?"white.800":v?"gray.400":o?"green.800":r.option.iconDefaultColor??"gray.500",[i,v,o,r.option.iconDefaultColor]),p=()=>{v||r.option.onClick()},f=()=>{v||c(!0)},y=()=>{v||c(!1)},q=_=>{_.key==="Enter"&&(v||r.option.onClick())},x=()=>{if(v)return;s(!0);const _=()=>{s(!1),document.removeEventListener("mouseup",_)};document.addEventListener("mouseup",_)};return e("div",{className:a,style:t,children:w("div",{className:g(h6,v?tr.disabled:tr.enabled,r.option.disabled&&ar),style:{paddingLeft:`calc(${$.spacing.xs2} + ${l} * ${$.spacing.lg})`},onClick:p,onMouseOver:f,onMouseOut:y,onMouseDown:x,onKeyDown:q,tabIndex:0,children:[w("span",{className:m6,children:[e("span",{children:r.option.label}),r.option.icon&&e(j,{icon:r.option.icon,color:m,size:"md"})]}),r.option.exLabel&&e("span",{children:r.option.exLabel})]})})},y6=()=>e("div",{children:e("hr",{className:u6})}),g6=({className:a,style:t,item:r,disabled:n,depth:l})=>w("div",{className:a,style:t,children:[e("span",{className:g(f6,n?rr.disabled:rr.enabled),style:{paddingLeft:`calc(${$.spacing.xs2} + ${l} * ${$.spacing.lg})`},children:r.title}),e(r1,{options:r.items,groupDivider:r.groupDivider,buttonDivider:r.buttonDivider,disabled:n,depth:l+1})]}),nr=({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:v=!1,depth:m=0})=>{const p=d.useMemo(()=>{const f={kind:"divider"};return r.map((q,x)=>{if(q.kind==="divider")return[f];const _={kind:"item",item:q};if(x+1===r.length)return[_];switch(r[x].kind){case"group":return c?[_,f]:[_];case"button":return v&&r[x+1].kind==="button"?[_,f]:[_];case"divider":return[]}}).flat()},[v,c,r]);return e("div",{className:g(a,v6,s&&ar,m===0&&d6[i]),style:{...t,minWidth:o?"100%":n},children:e(G,{gap:"xs2",p:m===0?l:"no",children:p.map((f,y)=>{if(f.kind==="divider")return e(y6,{},`divider-${y}`);if(f.item.kind==="group")return e(g6,{item:f.item,disabled:s,depth:m},`group-${y}-${f.item.title}`);if(f.item.kind==="button")return e(p6,{item:f.item,disabled:s,depth:m},`button-${y}-${f.item.option.value}`)})})})};nr.displayName=b.PopupButtonGroup;const r1=nr;var w6="sz1rv32",q6="sz1rv31",x6="sz1rv30",z6="sz1rv34",_6="sz1rv35",S6="sz1rv37",b6="sz1rv38",I6="sz1rv36",W6="sz1rv33",N6="sz1rv3a",C6="sz1rv39",T6="sz1rv3b";const lr=({className:a,style:t,icon:r,label:n,active:l,disabled:i=!1,tooltipText:s,isPopupLocking:o=!0,buttons:c,isPopupOpen:v=!1,onTogglePopup:m,onTogglePopupLocking:p,...f})=>{var Z;const y="href"in f,q=y?"a":f.as,x=!!((Z=f==null?void 0:f.href)!=null&&Z.startsWith("http")),_=y?{href:i?void 0:f.href??"",target:!i&&x?"_blank":void 0}:f.asProps,S=d.useRef(null),z=c&&c.length>0,C=()=>{m==null||m(!0),z&&(p==null||p(!0))},N=()=>{o||m==null||m(!0)},B=()=>{o||m==null||m(!1)},T=d.useCallback(()=>{v&&(m==null||m(!1),p==null||p(!1))},[v,m,p]),D=()=>{o||m==null||m(!0)},k=()=>{o||m==null||m(!1)},V=w(de,{children:[e("div",{ref:S,onClick:C,className:a,style:{...t,display:s?"block":"inline-block"},onMouseEnter:N,onMouseLeave:B,children:w(q,{..._,className:g(W6,i?_6:l&&z6),children:[e("div",{className:g(I6,i?b6:l&&S6),style:{display:"flex",alignItems:"center"},children:e(r,{})}),e("div",{className:g(C6,!i&&l&&N6),children:n})]})}),z&&e("div",{children:e(ue,{anchorElement:S,isOpen:v,onClose:T,direction:"rightTop",layer:"popover",isDirectionFixed:!0,children:e("div",{className:T6,onMouseEnter:D,onMouseLeave:k,children:e(r1,{options:c,p:"xs",borderRadius:"xs2",disabled:i})})})})]});return s?e(a1,{content:s&&e("div",{children:s}),children:V}):V};lr.displayName=b.NavigationItem;const k6=lr,ir=({className:a,style:t,isOpen:r,width:n="180px",sticky:l=!1,children:i,footer:s})=>{const o=r?n:`calc(${$.spacing.xl} * 2 + ${$.spacing.sm})`,c=l?{position:"sticky",top:`calc(${$.share.HEADER_HEIGHT} + 1px)`,left:0,borderRight:`1px solid ${$.color.gray[400]}`,height:`calc(100vh - ${$.share.HEADER_HEIGHT} - 1px)`}:{};return w("div",{className:g(a,x6),style:{...t,...c,width:o},children:[e("div",{className:q6,children:i}),r&&s&&e("div",{className:w6,children:s})]})};ir.displayName=b.NavigationContainer;const B6=ir;var E6="_1tqo4fx2",M6="_1tqo4fx1",R6="_1tqo4fx0";const sr=({className:a,style:t,isOpen:r,children:n,options:l,skeleton:i,gap:s,isDirectionFixed:o,onClose:c})=>{const v=d.useRef(null);return w(de,{children:[e("div",{className:a,ref:v,style:{...t,width:"fit-content",height:"fit-content"},children:n}),e(ue,{isOpen:r,onClose:c,anchorElement:v,gap:s,isDirectionFixed:o,children:e("div",{className:g(R6,i&&M6),children:e(G,{p:"xs",gap:"xs2",children:l})})})]})};sr.displayName=b.Dropdown;const D6=sr,or=({className:a,style:t,icon:r,disabled:n=!1,onClick:l,children:i})=>{const[s,o]=d.useState(!1),[c,v]=d.useState(!1);function m(){if(c)return"white.800";if(s)return"green.800"}return e("button",{type:"button",className:g(a,E6),style:t,disabled:n,onClick:l,onMouseOver:()=>o(!0),onMouseOut:()=>o(!1),onMouseDown:()=>v(!0),onMouseUp:()=>v(!1),children:w(P,{align:"center",children:[i,r&&e(j,{icon:r,size:"md",color:m()})]})})};or.displayName=b.DropdownItem;const Z6=or;var j6="_1lgeoz87",L6="_1lgeoz82",P6="_1lgeoz88",A6="_1lgeoz83",Q6="_1lgeoz84",F6="_1lgeoz80",H6={default:"_1lgeoz85",expand:"_1lgeoz86"};const O6=200,V6=3e3,cr=({className:a,style:t,message:r,expand:n=!1,enableAnimation:l=!1,autoClose:i=!1,onClose:s})=>{const[o,c]=d.useState(!!l),v=n?"expand":"default";d.useEffect(()=>{l&&c(!1)},[l]);const m=d.useCallback(()=>{if(!l){s();return}c(!0),setTimeout(()=>{s()},O6)},[l,s]);return d.useEffect(()=>{i&&setTimeout(()=>{m()},V6)},[]),e("div",{className:g(a,F6,H6[v],o&&A6),style:t,children:w("div",{className:L6,children:[e(j,{icon:He,color:"white.800"}),e("div",{className:Q6,children:e(X,{color:"white.800",fontSize:"sm",children:r})}),e("button",{type:"button",className:j6,onClick:m,children:e(j,{icon:Be,color:"white.800"})})]})})};cr.displayName=b.SnackBar;const dr=cr,hr=d.createContext({showSnackbar:()=>{}}),U6=()=>d.useContext(hr),ur=(()=>{if(!window)return 0;const a=se("md");return!a||a==="auto"?0:a==="9999px"?9999:parseFloat(a)*parseFloat(window.getComputedStyle(document.documentElement).fontSize)})(),G6=({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,v)=>{const m=v==null?void 0:v.getBoundingClientRect();return c+((m==null?void 0:m.height)??0)+ur},ur),s=(o,c)=>{r(v=>[...v,{message:o,options:c,id:`${new Date().toISOString()}-${l.current++}`}])};return w(hr.Provider,{value:{showSnackbar:s},children:[a,t.map((o,c)=>{var v;return e("div",{className:P6,ref:m=>n.current[c]=m,style:{transitionDuration:"0.2s",bottom:i(c)},children:e(dr,{message:o.message,expand:(v=o.options)==null?void 0:v.expand,onClose:()=>{r(m=>m.filter(p=>p.id!==o.id))},enableAnimation:!0,autoClose:!0})},o.id)})]})};var Y6="_1fl1cku3",K6="_1fl1cku0",X6={default:"_1fl1cku1",disabled:"_1fl1cku2"};function J6(a){return a?"error":"default"}const mr=d.forwardRef(({className:a,style:t,id:r,value:n,placeholder:l,disabled:i,expand:s,rows:o=3,error:c,resize:v="none",maxWidth:m,minWidth:p,maxHeight:f,minHeight:y,onChange:q},x)=>{const _=d.useContext(pe),S=c||_.error;return e("textarea",{ref:x,id:r,value:n,placeholder:l,disabled:i,rows:o,style:{...t,resize:v,maxWidth:m,minWidth:p,maxHeight:f,minHeight:y},className:g(a,K6,X6[i?"disabled":"default"],s&&Y6,fe[J6(S)]),onChange:z=>q(z.target.value)})});mr.displayName=b.TextArea;const vr=mr;var $6={no:"v2atas6",xs2:"v2atas7",xs:"v2atas8",sm:"v2atas9",md:"v2atasa",lg:"v2atasb",xl:"v2atasc",xl2:"v2atasd",xl3:"v2atase",xl4:"v2atasf",max:"v2atasg",at:"v2atash"},ec="v2atas5",fr="v2atas2",k1="v2atas1",tc={last:"v2atas3",noLast:"v2atas4"};const pr=({className:a,style:t,width:r="100%",height:n="100%",borderRadius:l="no",isLoading:i=!0,children:s})=>{const o=i?g(a,k1,fr,$6[l]):a;return e("div",{className:o,style:{...t,width:r,height:n},children:s})};pr.displayName=b.Skeleton;const ac=pr,yr=({className:a,style:t,size:r="2.5rem",isLoading:n=!0,children:l})=>{const i=n?g(a,k1,ec):a;return e("div",{className:i,style:{...t,width:r,height:r},children:l})};yr.displayName=b.SkeletonCircle;const rc=yr,gr=({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(G,{className:a,style:t,gap:n,children:Array.from({length:l},(c,v)=>e("div",{className:g(k1,fr,tc[o(v)],el[r])},v))}):e(de,{children:s})};gr.displayName=b.SkeletonText;const nc=gr;var lc="a4jm6v0",ic="a4jm6v1",sc="a4jm6v3",oc="a4jm6v4";const wr=({className:a,style:t,isLoading:r})=>e("div",{className:g(a,lc,!r&&oc),style:t,children:e("div",{className:ic,children:e("div",{className:sc})})});wr.displayName=b.LoadingOverlay;const cc=wr;var B1="_1p7y12v3",E1={default:"_1p7y12v4",active:"_1p7y12v5"},qr={left:"_1p7y12v1",right:"_1p7y12v2"},dc="_1p7y12v0";const M1=({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())}}),xr=({className:a,style:t,currentPage:r,length:n,onChangePage:l,sideLength:i=2})=>{const s=Math.max(0,i),o=2*s+1,c=m=>{if(m<1)return l(1);if(m>n)return l(n);l(m)},v=()=>{if(n<o)return Array.from({length:n}).map((p,f)=>f+1);function m(){return r<=s?1:r>n-s?n-2*s:r-s}return Array.from({length:o}).map((p,f)=>m()+f)};return w("nav",{className:g(a,dc,r<=1&&qr.left,r>=n&&qr.right),style:t,"aria-label":re.PAGINATION,children:[r>1&&e(M1,{onClick:()=>c(r-1),className:g(B1,E1.default),"aria-label":re.PAGINATION_PREV,children:e(j,{icon:Fe,size:"xl2"})}),v().map(m=>{const p=r===m;return e(M1,{onClick:()=>c(m),className:g(B1,E1[p?"active":"default"]),"aria-current":p?"page":void 0,children:m},m)}),r<n&&e(M1,{onClick:()=>c(r+1),className:g(B1,E1.default),"aria-label":re.PAGINATION_NEXT,children:e(j,{icon:xe,size:"xl2"})})]})};xr.displayName=b.Pagination;const hc=xr;var uc="b6d2ts0";const zr=300,_r=({className:a,style:t,isOpen:r,textValue:n,username:l,placeholder:i,messages:s,haveNewMessage:o,formRows:c,typingUsername:v,status:m,statusOptions:p,statusPlaceholder:f,onChangeStatus:y,onChangeTextValue:q,onSubmit:x,onToggle:_})=>{const S=d.useRef(null),z=d.useRef(null),C=d.useRef(null),[N,B]=d.useState(0),T=d.useMemo(()=>{const Z=[];return s.forEach(A=>{const F=new Date(A.time),L=Z.find(M=>M.date.getFullYear()===F.getFullYear()&&M.date.getMonth()===F.getMonth()&&M.date.getDate()===F.getDate());L?L.contents.push(A):Z.push({date:F,contents:[A]})}),Z},[s]),[D,k]=d.useState(!1),V=d.useCallback(()=>{_(),k(!0),setTimeout(()=>{k(!1)},zr)},[_]);return d.useLayoutEffect(()=>{const Z=S.current,A=z.current;if(!Z||!A)return;const F=()=>{const M=Z.getBoundingClientRect(),ae=A.getBoundingClientRect();B(ae.top-M.top-M.height)};F();const L=new ResizeObserver(()=>{F()});return L.observe(Z),()=>{L.disconnect()}},[]),d.useEffect(()=>{const Z=C.current;Z&&r&&Z.scrollTo(0,Z.scrollHeight)},[r,s]),w(Ie,{className:a,style:t,ref:S,position:"fixed",right:"1.5rem",bottom:r?"0":`${N}px`,transition:D?`bottom ${zr}ms ease-in-out`:void 0,width:"20rem",zIndex:"floating",children:[w(Le,{shadow:!0,align:"stretch",mainHeaderArea:w(P,{align:"center",gap:"xs2",nowrap:!0,children:[e(X,{color:"gray.700",as:"span",bold:!0,children:l}),o&&e(Ie,{width:$.fontSize.md,height:$.fontSize.md,bgColor:"red.800",round:"max"})]}),subHeaderArea:e(j,{size:"xl2",color:"gray.500",icon:r?ze:Ee}),footerArea:w(G,{width:"100%",justify:"end",gap:"xs",children:[e(Wr,{value:n,onChange:q,onSubmit:x,placeholder:i,formRows:c}),m!==void 0&&p!==void 0&&w(P,{nowrap:!0,children:[e(H2,{options:p,value:m,onChange:Z=>y==null?void 0:y(Z),placeholder:f,expand:!0}),e("div",{style:{width:$.spacing.xl4,flexShrink:0}})]}),v&&w(X,{color:"gray.600",as:"p",fontSize:"xs2",children:[e(X,{as:"span",bold:!0,fontSize:"xs2",color:"gray.700",children:v})," さんが入力しています..."]})]}),children:[e("div",{ref:z,children:e(Pe,{})}),e(Ie,{overflowY:"scroll",ref:C,children:e(G,{gap:"xs",py:"xs",height:"320px",nowrap:!0,children:T.map(({date:Z,contents:A},F)=>{const L=`${Z.toDateString()}-${F}`;return w(d.Fragment,{children:[e(P,{justify:"center",children:e(Te,{label:to(Z),variant:"mono",fontSize:"xs2"})}),A.map((M,ae)=>e(br,{content:M,maxChatItemWidth:"192px"},`${L}-${F}-${ae}`))]},L)})})})]}),e("button",{type:"button",className:uc,onClick:V})]})};_r.displayName=b.ChatCard;const mc=_r;function vc(a){return a<1?"未読":a===1?"既読":`既読${a}`}const Sr=({className:a,style:t,content:r,maxChatItemWidth:n})=>{const l=no(r.message),i=r.sender==="me";return w(G,{className:a,style:t,align:i?"end":"start",children:[r.username&&e(X,{as:"span",fontSize:"xs2",color:"gray.600",children:r.username}),w(P,{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(X,{as:"span",fontSize:"xs",color:"gray.700",whiteSpace:"preLine",breakAll:!0,children:s.content},`text-${o}`))}),w(G,{align:i?"end":"start",children:[r.readers&&e(a1,{content:r.readers.join(`
|
|
43
43
|
`),children:e(X,{as:"span",fontSize:"xs2",color:"gray.500",children:vc(r.readers.length)})}),e(X,{as:"span",fontSize:"xs2",color:"gray.500",children:Js(r.time)})]})]})]})};Sr.displayName=b.ChatItem;const br=Sr,Ir=({className:a,style:t,value:r,disabled:n,placeholder:l,formRows:i,onChange:s,onSubmit:o})=>w(P,{className:a,style:t,align:"center",gap:"xs",nowrap:!0,children:[e(vr,{value:r,placeholder:l,disabled:n,rows:i,expand:!0,onChange:s}),e("div",{children:e(je,{icon:_1,disabled:n,onClick:o})})]});Ir.displayName=b.ChatForm;const Wr=Ir,Nr=d.createContext({}),Cr=({className:a,style:t,htmlFor:r,label:n,required:l,error:i,direction:s="horizontal",children:o})=>{const{labelWidth:c="8rem",labelColor:v,labelFontSize:m}=d.useContext(Nr),p=d.useMemo(()=>s==="horizontal"?c:void 0,[c,s]);return e(pe.Provider,{value:{error:i!==void 0},children:w(G,{style:{...t,paddingBottom:i===void 0?$.fontSize.sm:void 0},children:[w(ke,{className:a,direction:s,nowrap:!0,align:s==="horizontal"?"center":void 0,children:[w(P,{width:c,align:"center",gap:"xs2",py:"xs2",children:[e(X,{as:"label",htmlFor:r,color:v,fontSize:m,children:n}),l&&e(Te,{fontSize:"xs2",label:"必須"})]}),o]}),e(X,{fontSize:"xs2",lineHeight:"sm",color:"red.800",style:{marginInlineStart:p},children:i})]})})};Cr.displayName=b.FormControl;const fc=Cr,Tr=({className:a,style:t,labelWidth:r,labelColor:n="gray.900",labelFontSize:l="md",gap:i="md",children:s})=>e(Nr.Provider,{value:{labelWidth:r,labelColor:n,labelFontSize:l},children:e(G,{className:a,style:t,gap:i,children:s})});Tr.displayName=b.FormGroup;const pc=Tr,kr=({className:a,style:t,title:r,timestamp:n,variant:l="primary",read:i,tableInfo:s,width:o,onClick:c})=>{const[v,m]=d.useState(!1),[p,f]=d.useState(!1),[y,q]=d.useState(window.innerWidth);d.useEffect(()=>{function C(){q(window.innerWidth)}return window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)}},[]);const x=d.useMemo(()=>$s(n),[n]),_=d.useMemo(()=>eo(n),[n]),S=y>768,z=()=>{if(S){if(p)return"green.300";if(v)return"gray.200"}return"white.800"};return e(Ie,{className:a,style:t,onMouseOver:d.useCallback(()=>m(!0),[]),onMouseLeave:d.useCallback(()=>m(!1),[]),onPointerDown:d.useCallback(()=>f(!0),[]),onPointerUp:d.useCallback(()=>f(!1),[]),onClick:c,bgColor:z(),height:"fit-content",cursor:"pointer",width:o,children:w(P,{px:"md",py:"xs",justify:"between",align:"center",nowrap:!0,children:[w(G,{gap:"xs",position:"relative",width:"100%",children:[l==="primary"&&w(P,{justify:"between",align:"start",children:[e(G,{gap:"xs",children:s==null?void 0:s.map((C,N)=>w(P,{gap:"xl",children:[e(X,{bold:!i,fontSize:"xs",color:"gray.700",children:C.title}),e(X,{bold:!i,fontSize:"xs",color:"gray.700",children:C.content})]},N))}),e(X,{color:"gray.600",fontSize:"xs2",children:_})]}),e(X,{color:"gray.700",fontSize:"xs",maxLines:2,bold:!i,children:r}),l==="secondary"&&e(X,{color:"gray.600",fontSize:"xs2",children:x})]}),e(j,{icon:xe,color:"green.800"})]})})};kr.displayName=b.NotificationPanel;const Br=kr,Er=({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(Br,{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(Pe,{})]},o.id)),n.length===0&&e(P,{align:"center",justify:"center",height:"100%",children:e(X,{color:"gray.600",fontSize:"sm",children:i})})]});Er.displayName=b.NotificationList;const Mr=Er,Rr=({className:a,style:t,tabs:r,notifications:n,height:l,emptyMessage:i,onClick:s})=>{const[o,c]=d.useState(r[0].name??""),v=d.useMemo(()=>n.filter(p=>p.tabName===o),[o,n]),m=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(Tt,{items:r,activeTabName:o,onClickTab:p=>c(p)}),e(Ie,{bgColor:"white.800",roundB:"xs2",overflow:"hidden",children:e(Mr,{notifications:v,variant:m,height:l,emptyMessage:i,onClick:s})})]})};Rr.displayName=b.Notification;const yc=Rr;var gc="dev1455",Dr={primary:"dev1452 dev1451",secondary:"dev1453 dev1451",tertiary:"dev1454 dev1451"},wc="dev1459",qc="dev145a",xc="dev1450",zc="dev1456",_c="dev1457",Sc="dev1458";const R1=({className:a,style:t,id:r,variant:n="primary",text:l,gridRow:i,gridColumn:s,show:o=!0,onScheduleClick:c})=>{const v=()=>{const[m,p]=i.split("/").map(f=>f.trim()).map(Number);return p-m>2?l:""};return c?e("button",{type:"button",className:g(a,Dr[n],gc),style:{...t,gridRow:i,gridColumn:s},hidden:!o,onClick:()=>c(r),children:v()}):e("div",{className:Dr[n],style:{gridRow:i,gridColumn:s},hidden:!o,children:v()})};R1.displayName=b.ScheduleCard;const D1=0,Z1=23,bc=8,Ic=22,n1=4,Wc=(a,t)=>`startHourはendHour以下の値を指定してください。
|
|
44
44
|
startHour: ${a}, endHour: ${t}`,Zr=(a,t)=>`${a}Hourは${D1}以上${Z1}以下の値を指定してください。
|
|
45
45
|
${a}Hour: ${t}`,Nc=(a,t)=>`Scheduleは${a}時以降から始まる必要があります
|