ingred-ui 32.0.0 → 32.1.0
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/components/NavigationRail/MobileMenuButton/MobileMenuButton.d.ts +9 -0
- package/dist/components/NavigationRail/MobileMenuButton/MobileMenuButtonView.d.ts +7 -0
- package/dist/components/NavigationRail/MobileMenuButton/index.d.ts +1 -0
- package/dist/components/NavigationRail/NavigationRail.d.ts +2 -0
- package/dist/components/NavigationRail/NavigationRailContainer/NavigationRailContainer.d.ts +7 -0
- package/dist/components/NavigationRail/NavigationRailContainer/styled.d.ts +1 -1
- package/dist/components/NavigationRail/utils.d.ts +6 -0
- package/dist/index.es.js +118 -118
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +118 -118
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1503,7 +1503,7 @@ object-assign
|
|
|
1503
1503
|
background-color: transparent;
|
|
1504
1504
|
color: ${({theme:e})=>e.palette.neutral.lighter};
|
|
1505
1505
|
}
|
|
1506
|
-
`,yh=p((function({selected:e,value:n,selectable:r,onClickDate:i,children:o,isSaturday:a=!1,isSundayOrHoliday:l=!1,isToday:s=!1}){return t.createElement(fh,{isToday:s},r?t.createElement(vh,{type:"button",selected:e,isSaturday:a,isSundayOrHoliday:l,onClick:()=>{null==i||i(n)}},o):t.createElement(xh,{type:"button",isSaturday:a,isSundayOrHoliday:l},o))})),wh=e=>(e=>{try{const t=e.year(),n=hc(t),r=e.format("YYYY/M/D");return n.some((e=>e.date===r))}catch(e){return!1}})(e),Ch=e=>e.format("YYYY-MM-DD")===js().format("YYYY-MM-DD"),Eh=(e,t)=>js(new Date(e.year(),e.month(),t)),Ih=e=>(e=>{const t=e.day(),n=0===t,r=6===t,i=wh(e);return{dayOfWeek:t,isSunday:n,isSaturday:r,isHoliday:i,isSundayOrHoliday:n||i}})(e),kh=(e,t)=>!t(e),Mh=e=>Array.from(new Array(e.daysInMonth()),((e,t)=>t+1)),Ah=(e,t=0)=>(e.startOf("month").day()-t+7)%7,$h=({date:e,weekList:n,weekStart:r=0,monthFormat:i,current:o,isOutsideRange:a,onDateChange:l,onPreviousMonth:s,onNextMonth:c})=>t.createElement(Jm,null,t.createElement(th,null,t.createElement(eh,null,t.createElement(qm,null,t.createElement(Km,{weight:"bold",size:"xl"},o.format(i))),t.createElement("div",{style:{display:"flex",gap:"8px"}},t.createElement(uc,{size:"small",color:"clear",icon:t.createElement(ee,{name:"arrow_left",size:"md",color:"currentColor"}),type:"button","aria-label":"前の月",onClick:s}),t.createElement(Ru,{content:"今日を選択"},t.createElement(uc,{size:"small",color:"clear",icon:t.createElement(ee,{name:"calendar",size:"md",color:"currentColor"}),type:"button","aria-label":"今日を選択",onClick:()=>l(js())})),t.createElement(uc,{size:"small",color:"clear",icon:t.createElement(ee,{name:"arrow_right",size:"md",color:"currentColor"}),type:"button","aria-label":"次の月",onClick:c})))),t.createElement(Um,null,null==n?void 0:n.map((e=>t.createElement(Qm,{key:e},e))),Array.from(new Array(Ah(o,r)),((e,n)=>t.createElement(Qm,{key:`empty-${n}`}))),Mh(o).map((n=>{const r=Eh(o,n),i=Ih(r),s=e.format("YYYY-MM-DD")===r.format("YYYY-MM-DD"),c=kh(r,a);return t.createElement(yh,{key:n,value:r,selectable:c,selected:s,isSaturday:i.isSaturday,isSundayOrHoliday:i.isSundayOrHoliday,isToday:Ch(r),onClickDate:l},n)})))),Dh=e=>{const[t,n]=i(e),r=d((()=>{n((e=>e.subtract(1,"month")))}),[]),o=d((()=>{n((e=>e.add(1,"month")))}),[]);return{currentMonth:t,goToPreviousMonth:r,goToNextMonth:o,goToMonth:d((e=>{n(e)}),[])}};function Lh(e){return(Math.trunc(e)%7+7)%7}function Oh(e){const{weekConfig:t,fallbackLabels:n,fallbackStart:r}=e;if(void 0!==t){if(7!==t.labels.length)throw new Error("ingred-ui Calendar: weekConfig.labels must contain exactly 7 entries");return Object.assign(Object.assign({},t),{start:Lh(t.start)})}return{start:Lh(r),labels:n}}const Sh=n((function(e,n){var{date:r,monthFormat:i="YYYY年M月",weekConfig:o,defaultPresetButton:s,presetButtons:c,onPresetButtonClick:u,showDateFields:p=!1,dateFieldFormat:m="YYYY-MM-DD",showTimeFields:h=!1,timeFieldProps:g,labelSuffix:f,isOutsideRange:b=(()=>!1),onDateChange:v}=e,x=D(e,["date","monthFormat","weekConfig","defaultPresetButton","presetButtons","onPresetButtonClick","showDateFields","dateFieldFormat","showTimeFields","timeFieldProps","labelSuffix","isOutsideRange","onDateChange"]);const[y,w]=t.useState(0),{currentMonth:C,goToPreviousMonth:E,goToNextMonth:I,goToMonth:k}=Dh(r),M=d((e=>{const t=r.hour(e.hour()).minute(e.minute()).second(0).millisecond(0);v(t)}),[r,v]),A=l((()=>p?t.createElement(ph,null,t.createElement(dh,null,t.createElement(hh,null,t.createElement(mh,null,"日付"),f),t.createElement(uh,null,t.createElement(zE,{date:r,format:m,size:"medium",variant:"dark",onDateChange:v}),h&&t.createElement(
|
|
1506
|
+
`,yh=p((function({selected:e,value:n,selectable:r,onClickDate:i,children:o,isSaturday:a=!1,isSundayOrHoliday:l=!1,isToday:s=!1}){return t.createElement(fh,{isToday:s},r?t.createElement(vh,{type:"button",selected:e,isSaturday:a,isSundayOrHoliday:l,onClick:()=>{null==i||i(n)}},o):t.createElement(xh,{type:"button",isSaturday:a,isSundayOrHoliday:l},o))})),wh=e=>(e=>{try{const t=e.year(),n=hc(t),r=e.format("YYYY/M/D");return n.some((e=>e.date===r))}catch(e){return!1}})(e),Ch=e=>e.format("YYYY-MM-DD")===js().format("YYYY-MM-DD"),Eh=(e,t)=>js(new Date(e.year(),e.month(),t)),Ih=e=>(e=>{const t=e.day(),n=0===t,r=6===t,i=wh(e);return{dayOfWeek:t,isSunday:n,isSaturday:r,isHoliday:i,isSundayOrHoliday:n||i}})(e),kh=(e,t)=>!t(e),Mh=e=>Array.from(new Array(e.daysInMonth()),((e,t)=>t+1)),Ah=(e,t=0)=>(e.startOf("month").day()-t+7)%7,$h=({date:e,weekList:n,weekStart:r=0,monthFormat:i,current:o,isOutsideRange:a,onDateChange:l,onPreviousMonth:s,onNextMonth:c})=>t.createElement(Jm,null,t.createElement(th,null,t.createElement(eh,null,t.createElement(qm,null,t.createElement(Km,{weight:"bold",size:"xl"},o.format(i))),t.createElement("div",{style:{display:"flex",gap:"8px"}},t.createElement(uc,{size:"small",color:"clear",icon:t.createElement(ee,{name:"arrow_left",size:"md",color:"currentColor"}),type:"button","aria-label":"前の月",onClick:s}),t.createElement(Ru,{content:"今日を選択"},t.createElement(uc,{size:"small",color:"clear",icon:t.createElement(ee,{name:"calendar",size:"md",color:"currentColor"}),type:"button","aria-label":"今日を選択",onClick:()=>l(js())})),t.createElement(uc,{size:"small",color:"clear",icon:t.createElement(ee,{name:"arrow_right",size:"md",color:"currentColor"}),type:"button","aria-label":"次の月",onClick:c})))),t.createElement(Um,null,null==n?void 0:n.map((e=>t.createElement(Qm,{key:e},e))),Array.from(new Array(Ah(o,r)),((e,n)=>t.createElement(Qm,{key:`empty-${n}`}))),Mh(o).map((n=>{const r=Eh(o,n),i=Ih(r),s=e.format("YYYY-MM-DD")===r.format("YYYY-MM-DD"),c=kh(r,a);return t.createElement(yh,{key:n,value:r,selectable:c,selected:s,isSaturday:i.isSaturday,isSundayOrHoliday:i.isSundayOrHoliday,isToday:Ch(r),onClickDate:l},n)})))),Dh=e=>{const[t,n]=i(e),r=d((()=>{n((e=>e.subtract(1,"month")))}),[]),o=d((()=>{n((e=>e.add(1,"month")))}),[]);return{currentMonth:t,goToPreviousMonth:r,goToNextMonth:o,goToMonth:d((e=>{n(e)}),[])}};function Lh(e){return(Math.trunc(e)%7+7)%7}function Oh(e){const{weekConfig:t,fallbackLabels:n,fallbackStart:r}=e;if(void 0!==t){if(7!==t.labels.length)throw new Error("ingred-ui Calendar: weekConfig.labels must contain exactly 7 entries");return Object.assign(Object.assign({},t),{start:Lh(t.start)})}return{start:Lh(r),labels:n}}const Sh=n((function(e,n){var{date:r,monthFormat:i="YYYY年M月",weekConfig:o,defaultPresetButton:s,presetButtons:c,onPresetButtonClick:u,showDateFields:p=!1,dateFieldFormat:m="YYYY-MM-DD",showTimeFields:h=!1,timeFieldProps:g,labelSuffix:f,isOutsideRange:b=(()=>!1),onDateChange:v}=e,x=D(e,["date","monthFormat","weekConfig","defaultPresetButton","presetButtons","onPresetButtonClick","showDateFields","dateFieldFormat","showTimeFields","timeFieldProps","labelSuffix","isOutsideRange","onDateChange"]);const[y,w]=t.useState(0),{currentMonth:C,goToPreviousMonth:E,goToNextMonth:I,goToMonth:k}=Dh(r),M=d((e=>{const t=r.hour(e.hour()).minute(e.minute()).second(0).millisecond(0);v(t)}),[r,v]),A=l((()=>p?t.createElement(ph,null,t.createElement(dh,null,t.createElement(hh,null,t.createElement(mh,null,"日付"),f),t.createElement(uh,null,t.createElement(zE,{date:r,format:m,size:"medium",variant:"dark",onDateChange:v}),h&&t.createElement(tL,Object.assign({size:(null==g?void 0:g.size)||"medium",time:r,variant:"dark",width:(null==g?void 0:g.width)||"80px",onTimeChange:M},g))))):null),[p,h,g,r,m,f,v,M]);a((()=>{k(r)}),[r,k]);const{labels:$,start:L}=Oh({weekConfig:o,fallbackLabels:[...Cp],fallbackStart:0});return t.createElement(Wm,Object.assign({ref:n},x),t.createElement(nh,null,t.createElement(rh,null,t.createElement(Xm,null,t.createElement($h,{date:r,current:C,monthFormat:i,weekList:$,weekStart:L,isOutsideRange:b,onDateChange:e=>{v(e),w((e=>e+1))},onPreviousMonth:E,onNextMonth:I})),t.createElement(gh,{key:y,defaultPresetButton:s,presetButtons:c,dateFields:A,onPresetButtonClick:u}))))}));var Vh=p(Sh);const Hh="none",Rh="start",Nh="start_only",zh="end",Th="between",Zh="start",Bh="end",Ph=(e,t,n,r)=>{const i=((e,t,n)=>{const r=js(new Date(t.year(),t.month(),n));return e.format("YYYY-MM-DD")===r.format("YYYY-MM-DD")})(e,n,r),o=((e,t,n)=>{const r=js(new Date(t.year(),t.month(),n));return e.format("YYYY-MM-DD")===r.format("YYYY-MM-DD")})(t,n,r),a=((e,t,n,r)=>{const i=js(new Date(n.year(),n.month(),r)),o=e.format("YYYY-MM-DD"),a=t.format("YYYY-MM-DD");return o!==a&&i.isAfter(o,"day")&&i.isBefore(a,"day")})(e,t,n,r),l=e.isSame(t,"day");switch(!0){case i&&l:return Nh;case i&&!l:return Rh;case o&&!l:return zh;case a:return Th;default:return Hh}},_h=x(ah)``,Gh=x.button`
|
|
1507
1507
|
background-color: transparent;
|
|
1508
1508
|
border: none;
|
|
1509
1509
|
height: ${({theme:e})=>4*e.spacing}px;
|
|
@@ -1587,7 +1587,7 @@ object-assign
|
|
|
1587
1587
|
background-color: transparent;
|
|
1588
1588
|
color: ${({theme:e})=>e.palette.neutral.lighter};
|
|
1589
1589
|
}
|
|
1590
|
-
`,Kh=p((function({state:e,value:n,selectable:r,onClickDate:i,children:o,isSaturday:a=!1,isSundayOrHoliday:l=!1,isToday:s=!1}){return t.createElement(_h,{"data-state":e,isToday:s},(({state:e,value:n,selectable:r,onClickDate:i,children:o,isSaturday:a=!1,isSundayOrHoliday:l=!1})=>{const s=()=>{null==i||i(n)};if(!r)return t.createElement(Qh,{type:"button",isSaturday:a,isSundayOrHoliday:l},o);switch(e){case Nh:return t.createElement(Wh,{type:"button",isSaturday:a,isSundayOrHoliday:l,onClick:s},o);case Rh:return t.createElement(Xh,{type:"button",isSaturday:a,isSundayOrHoliday:l,onClick:s},o);case zh:return t.createElement(Jh,{type:"button",isSaturday:a,isSundayOrHoliday:l,onClick:s},o);case Th:return t.createElement(Uh,{type:"button",isSaturday:a,isSundayOrHoliday:l,onClick:s},o);default:return t.createElement(Yh,{type:"button",isSaturday:a,isSundayOrHoliday:l,onClick:s},o)}})({state:e,value:n,selectable:r,onClickDate:i,children:o,isSaturday:a,isSundayOrHoliday:l}))})),qh=({startDate:e,endDate:n,monthFormat:r,weekList:o,weekStart:a=0,current:l,isOutsideRange:s,onDatesChange:c,onPreviousMonth:u,onNextMonth:p,onTodayClick:m})=>{const[h,g]=i(Zh),f=d((t=>{if(e&&n&&!e.isSame(n,"day"))return null==c||c({startDate:t,endDate:t}),void g(Bh);switch(h){case Zh:null==c||c({startDate:t,endDate:t}),g(Bh);break;case Bh:e&&t.isBefore(e)?null==c||c({startDate:t,endDate:e}):null==c||c({startDate:e,endDate:t}),g(Zh)}}),[h,c,n,e]);return t.createElement(Jm,null,t.createElement(th,null,t.createElement(eh,null,t.createElement(qm,null,t.createElement(Km,{weight:"bold",size:"xl"},l.format(r))),t.createElement("div",{style:{display:"flex",gap:"8px"}},t.createElement(uc,{size:"small",color:"clear",type:"button",icon:t.createElement(ee,{name:"arrow_left",size:"md",color:"currentColor"}),"aria-label":"前の月",onClick:u}),t.createElement(Ru,{content:"今日に戻る"},t.createElement(uc,{size:"small",color:"clear",type:"button",icon:t.createElement(ee,{name:"calendar",size:"md",color:"currentColor"}),"aria-label":"今日に戻る",onClick:m})),t.createElement(uc,{size:"small",color:"clear",type:"button",icon:t.createElement(ee,{name:"arrow_right",size:"md",color:"currentColor"}),"aria-label":"次の月",onClick:p})))),t.createElement(Um,null,null==o?void 0:o.map((e=>t.createElement(Qm,{key:e},e))),Array.from(new Array(Ah(l,a)),((e,n)=>t.createElement(Qm,{key:`empty-${n}`}))),Mh(l).map((r=>{const i=Eh(l,r),o=Ih(i),a=kh(i,s);return t.createElement(Kh,{key:r,value:i,state:Ph(e,n,l,r),selectable:a,isSaturday:o.isSaturday,isSundayOrHoliday:o.isSundayOrHoliday,isToday:Ch(i),onClickDate:f},r)}))))},eg=n((function(e,n){var{startDate:r,endDate:i,monthFormat:o="YYYY年M月",weekConfig:s,defaultPresetButton:c,presetButtons:u,onPresetButtonClick:p,showDateFields:m=!1,dateFieldFormat:h="YYYY-MM-DD",showTimeFields:g=!1,timeFieldProps:f,startLabelSuffix:b,endLabelSuffix:v,onApply:x,onCancel:y,applyButtonText:w="適用",cancelButtonText:C="キャンセル",isOutsideRange:E=(()=>!1),onDatesChange:I}=e,k=D(e,["startDate","endDate","monthFormat","weekConfig","defaultPresetButton","presetButtons","onPresetButtonClick","showDateFields","dateFieldFormat","showTimeFields","timeFieldProps","startLabelSuffix","endLabelSuffix","onApply","onCancel","applyButtonText","cancelButtonText","isOutsideRange","onDatesChange"]);const[M,A]=t.useState(0),{currentMonth:$,goToPreviousMonth:L,goToNextMonth:O,goToMonth:S}=Dh(r);a((()=>{S(r)}),[r,S]);const V=d((()=>{const e=js();null==I||I({startDate:e,endDate:e}),S(e),A((e=>e+1))}),[I,S]),H=d((e=>{null==I||I({startDate:e,endDate:i})}),[i,I]),R=d((e=>{null==I||I({startDate:r,endDate:e})}),[r,I]),N=d((e=>{const t=r.hour(e.hour()).minute(e.minute()).second(0).millisecond(0);null==I||I({startDate:t,endDate:i})}),[r,i,I]),z=d((e=>{const t=i.hour(e.hour()).minute(e.minute()).second(0).millisecond(0);null==I||I({startDate:r,endDate:t})}),[r,i,I]),T=l((()=>m?t.createElement(ph,null,t.createElement(dh,null,t.createElement(hh,null,t.createElement(mh,null,"開始日時"),b),t.createElement(uh,null,t.createElement(zE,{date:r,format:h,size:"medium",variant:"dark",onDateChange:H}),g&&t.createElement(
|
|
1590
|
+
`,Kh=p((function({state:e,value:n,selectable:r,onClickDate:i,children:o,isSaturday:a=!1,isSundayOrHoliday:l=!1,isToday:s=!1}){return t.createElement(_h,{"data-state":e,isToday:s},(({state:e,value:n,selectable:r,onClickDate:i,children:o,isSaturday:a=!1,isSundayOrHoliday:l=!1})=>{const s=()=>{null==i||i(n)};if(!r)return t.createElement(Qh,{type:"button",isSaturday:a,isSundayOrHoliday:l},o);switch(e){case Nh:return t.createElement(Wh,{type:"button",isSaturday:a,isSundayOrHoliday:l,onClick:s},o);case Rh:return t.createElement(Xh,{type:"button",isSaturday:a,isSundayOrHoliday:l,onClick:s},o);case zh:return t.createElement(Jh,{type:"button",isSaturday:a,isSundayOrHoliday:l,onClick:s},o);case Th:return t.createElement(Uh,{type:"button",isSaturday:a,isSundayOrHoliday:l,onClick:s},o);default:return t.createElement(Yh,{type:"button",isSaturday:a,isSundayOrHoliday:l,onClick:s},o)}})({state:e,value:n,selectable:r,onClickDate:i,children:o,isSaturday:a,isSundayOrHoliday:l}))})),qh=({startDate:e,endDate:n,monthFormat:r,weekList:o,weekStart:a=0,current:l,isOutsideRange:s,onDatesChange:c,onPreviousMonth:u,onNextMonth:p,onTodayClick:m})=>{const[h,g]=i(Zh),f=d((t=>{if(e&&n&&!e.isSame(n,"day"))return null==c||c({startDate:t,endDate:t}),void g(Bh);switch(h){case Zh:null==c||c({startDate:t,endDate:t}),g(Bh);break;case Bh:e&&t.isBefore(e)?null==c||c({startDate:t,endDate:e}):null==c||c({startDate:e,endDate:t}),g(Zh)}}),[h,c,n,e]);return t.createElement(Jm,null,t.createElement(th,null,t.createElement(eh,null,t.createElement(qm,null,t.createElement(Km,{weight:"bold",size:"xl"},l.format(r))),t.createElement("div",{style:{display:"flex",gap:"8px"}},t.createElement(uc,{size:"small",color:"clear",type:"button",icon:t.createElement(ee,{name:"arrow_left",size:"md",color:"currentColor"}),"aria-label":"前の月",onClick:u}),t.createElement(Ru,{content:"今日に戻る"},t.createElement(uc,{size:"small",color:"clear",type:"button",icon:t.createElement(ee,{name:"calendar",size:"md",color:"currentColor"}),"aria-label":"今日に戻る",onClick:m})),t.createElement(uc,{size:"small",color:"clear",type:"button",icon:t.createElement(ee,{name:"arrow_right",size:"md",color:"currentColor"}),"aria-label":"次の月",onClick:p})))),t.createElement(Um,null,null==o?void 0:o.map((e=>t.createElement(Qm,{key:e},e))),Array.from(new Array(Ah(l,a)),((e,n)=>t.createElement(Qm,{key:`empty-${n}`}))),Mh(l).map((r=>{const i=Eh(l,r),o=Ih(i),a=kh(i,s);return t.createElement(Kh,{key:r,value:i,state:Ph(e,n,l,r),selectable:a,isSaturday:o.isSaturday,isSundayOrHoliday:o.isSundayOrHoliday,isToday:Ch(i),onClickDate:f},r)}))))},eg=n((function(e,n){var{startDate:r,endDate:i,monthFormat:o="YYYY年M月",weekConfig:s,defaultPresetButton:c,presetButtons:u,onPresetButtonClick:p,showDateFields:m=!1,dateFieldFormat:h="YYYY-MM-DD",showTimeFields:g=!1,timeFieldProps:f,startLabelSuffix:b,endLabelSuffix:v,onApply:x,onCancel:y,applyButtonText:w="適用",cancelButtonText:C="キャンセル",isOutsideRange:E=(()=>!1),onDatesChange:I}=e,k=D(e,["startDate","endDate","monthFormat","weekConfig","defaultPresetButton","presetButtons","onPresetButtonClick","showDateFields","dateFieldFormat","showTimeFields","timeFieldProps","startLabelSuffix","endLabelSuffix","onApply","onCancel","applyButtonText","cancelButtonText","isOutsideRange","onDatesChange"]);const[M,A]=t.useState(0),{currentMonth:$,goToPreviousMonth:L,goToNextMonth:O,goToMonth:S}=Dh(r);a((()=>{S(r)}),[r,S]);const V=d((()=>{const e=js();null==I||I({startDate:e,endDate:e}),S(e),A((e=>e+1))}),[I,S]),H=d((e=>{null==I||I({startDate:e,endDate:i})}),[i,I]),R=d((e=>{null==I||I({startDate:r,endDate:e})}),[r,I]),N=d((e=>{const t=r.hour(e.hour()).minute(e.minute()).second(0).millisecond(0);null==I||I({startDate:t,endDate:i})}),[r,i,I]),z=d((e=>{const t=i.hour(e.hour()).minute(e.minute()).second(0).millisecond(0);null==I||I({startDate:r,endDate:t})}),[r,i,I]),T=l((()=>m?t.createElement(ph,null,t.createElement(dh,null,t.createElement(hh,null,t.createElement(mh,null,"開始日時"),b),t.createElement(uh,null,t.createElement(zE,{date:r,format:h,size:"medium",variant:"dark",onDateChange:H}),g&&t.createElement(tL,Object.assign({size:(null==f?void 0:f.size)||"medium",time:r,variant:"dark",width:(null==f?void 0:f.width)||"80px",onTimeChange:N},f)))),t.createElement(dh,null,t.createElement(hh,null,t.createElement(mh,null,"終了日時"),v),t.createElement(uh,null,t.createElement(zE,{date:i,format:h,size:"medium",variant:"dark",onDateChange:R}),g&&t.createElement(tL,Object.assign({size:(null==f?void 0:f.size)||"medium",time:i,variant:"dark",width:(null==f?void 0:f.width)||"80px",onTimeChange:z},f))))):null),[m,g,f,r,i,h,b,v,H,R,N,z]),Z=Boolean(u||T),{labels:B,start:P}=Oh({weekConfig:s,fallbackLabels:[...Cp],fallbackStart:0}),_=Z?t.createElement(gh,{key:M,defaultPresetButton:c,presetButtons:u,dateFields:T,onPresetButtonClick:p}):null,G=t.createElement(Xm,null,t.createElement(qh,{startDate:r,endDate:i,monthFormat:o,weekList:B,weekStart:P,current:$,isOutsideRange:E,onDatesChange:e=>{null==I||I(e),A((e=>e+1))},onPreviousMonth:L,onNextMonth:O,onTodayClick:V}));return t.createElement(Wm,Object.assign({ref:n},k),t.createElement(nh,null,t.createElement(rh,null,G,_,x?t.createElement(ih,null,t.createElement(Gs,null,y?t.createElement(uc,{color:"clear",size:"small",type:"button",onClick:y},C):null,t.createElement(uc,{color:"primary",size:"small",type:"button",onClick:x},w))):null)))}));var tg=p(eg);const ng=x.div`
|
|
1591
1591
|
border-radius: ${({theme:e})=>e.radius}px;
|
|
1592
1592
|
background-color: ${({theme:e})=>e.palette.background.default};
|
|
1593
1593
|
width: ${({width:e})=>e||"auto"};
|
|
@@ -4562,7 +4562,7 @@ object-assign
|
|
|
4562
4562
|
display: none;
|
|
4563
4563
|
|
|
4564
4564
|
@media (max-width: ${B.MOBILE}px) {
|
|
4565
|
-
display:
|
|
4565
|
+
display: block;
|
|
4566
4566
|
}
|
|
4567
4567
|
`,jA=x.div`
|
|
4568
4568
|
position: relative;
|
|
@@ -4595,12 +4595,12 @@ object-assign
|
|
|
4595
4595
|
height: ${({size:e})=>e};
|
|
4596
4596
|
transform: ${({invisible:e})=>e?"scale(0)":"scale(1)"};
|
|
4597
4597
|
transition: transform 0.3s;
|
|
4598
|
-
`,UA={small:"8px",medium:"12px",large:"16px"},QA=e.forwardRef((function({variant:t="normal",badgeContent:n="",position:r="top-right",overlayOffsetPercent:i=50,dotSize:o="medium",max:a=99,showZero:l=!1,invisible:s=!1,layout:c="overlay",color:d="danger",fontWeight:u="normal",fontSize:p,size:m="small",children:h},g){let f=s;(0===n&&!l||""===n&&"dot"!==t)&&(f=!0);let b="";return"dot"!==t&&(b="number"==typeof n&&n>a?`${a}+`:n),"inline"===c&&"normal"===t?e.createElement(WA,{ref:g},h,f?null:e.createElement(zm,{type:"pill",color:d,fontWeight:u,fontSize:p,size:m},b)):e.createElement(jA,{ref:g},h,e.createElement(XA,{position:r,invisible:f,$overlayOffsetPercent:i},"dot"===t?e.createElement(JA,{size:UA[o],invisible:f}):e.createElement(zm,{type:"pill",color:d,fontWeight:u,fontSize:p,size:m},b)))})),KA=`(max-width: ${B.MOBILE}px)`,
|
|
4598
|
+
`,UA={small:"8px",medium:"12px",large:"16px"},QA=e.forwardRef((function({variant:t="normal",badgeContent:n="",position:r="top-right",overlayOffsetPercent:i=50,dotSize:o="medium",max:a=99,showZero:l=!1,invisible:s=!1,layout:c="overlay",color:d="danger",fontWeight:u="normal",fontSize:p,size:m="small",children:h},g){let f=s;(0===n&&!l||""===n&&"dot"!==t)&&(f=!0);let b="";return"dot"!==t&&(b="number"==typeof n&&n>a?`${a}+`:n),"inline"===c&&"normal"===t?e.createElement(WA,{ref:g},h,f?null:e.createElement(zm,{type:"pill",color:d,fontWeight:u,fontSize:p,size:m},b)):e.createElement(jA,{ref:g},h,e.createElement(XA,{position:r,invisible:f,$overlayOffsetPercent:i},"dot"===t?e.createElement(JA,{size:UA[o],invisible:f}):e.createElement(zm,{type:"pill",color:d,fontWeight:u,fontSize:p,size:m},b)))})),KA=t.forwardRef((function(e,n){const{isMobile:r,isMobileMenuOpen:i,handleMobileMenuToggle:o,notificationCount:a}=_A();if(!r||i)return null;const l=t.createElement(uc,{ref:n,color:"clear",size:"medium","aria-label":"メニューを開く",icon:t.createElement(ee,{name:"menu",color:"currentColor"}),onClick:o});return a>0?t.createElement(QA,{variant:"dot",dotSize:"small",position:"top-right",overlayOffsetPercent:10},l):l})),qA=`(max-width: ${B.MOBILE}px)`,e$=t.forwardRef((function({defaultFixed:e=!1,onChangeOpen:n,onChangeFixed:r,notificationCount:i=0,slotNotificationCount:o=0,showMobileMenuButton:a=!0,children:l},s){const[c,d]=t.useState(e),[u,p]=t.useState(e),m=oo(qA),[h,g]=t.useState(!1),[f,b]=t.useState(0),v=t.useCallback((()=>{b((e=>e+1))}),[]),x=t.useCallback((()=>{b((e=>Math.max(0,e-1)))}),[]),y=a&&0===f&&m&&!h;return t.createElement(GA.Provider,{value:{isOpen:c,isFixed:u,handleOpen:()=>{u||(d(!0),n&&n(!0))},handleClose:()=>{u||(d(!1),n&&n(!1))},handleFixed:()=>{d(!0),p(!0),r&&r(!0)},handleUnFixed:()=>{d(!1),p(!1),r&&r(!1)},isMobile:m,isMobileMenuOpen:h,handleMobileMenuToggle:()=>{g((e=>!e))},registerMobileMenuButton:v,unregisterMobileMenuButton:x,notificationCount:i,slotNotificationCount:o}},t.createElement(YA,{ref:s},l,y&&t.createElement(FA,null,t.createElement(KA,null))))})),t$=x.div`
|
|
4599
4599
|
flex-shrink: 0;
|
|
4600
4600
|
flex-basis: ${RA};
|
|
4601
4601
|
display: flex;
|
|
4602
4602
|
align-items: center;
|
|
4603
|
-
`,
|
|
4603
|
+
`,n$=x.div`
|
|
4604
4604
|
flex-grow: 1;
|
|
4605
4605
|
overflow-x: hidden;
|
|
4606
4606
|
overflow-y: auto;
|
|
@@ -4608,7 +4608,7 @@ object-assign
|
|
|
4608
4608
|
& * {
|
|
4609
4609
|
text-decoration: none;
|
|
4610
4610
|
}
|
|
4611
|
-
`,
|
|
4611
|
+
`,r$=x.div`
|
|
4612
4612
|
flex-shrink: 0;
|
|
4613
4613
|
flex-basis: ${NA};
|
|
4614
4614
|
display: flex;
|
|
@@ -4618,7 +4618,7 @@ object-assign
|
|
|
4618
4618
|
@media (max-width: ${B.MOBILE}px) {
|
|
4619
4619
|
display: none;
|
|
4620
4620
|
}
|
|
4621
|
-
`,
|
|
4621
|
+
`,i$=x.div`
|
|
4622
4622
|
padding-left: ${({isFixed:e})=>e?HA:VA};
|
|
4623
4623
|
width: 100%;
|
|
4624
4624
|
height: 100%;
|
|
@@ -4627,10 +4627,10 @@ object-assign
|
|
|
4627
4627
|
@media (max-width: ${B.MOBILE}px) {
|
|
4628
4628
|
padding-left: 0;
|
|
4629
4629
|
}
|
|
4630
|
-
`,
|
|
4630
|
+
`,o$=t.forwardRef((function({children:e},n){const{isFixed:r}=t.useContext(GA);return t.createElement(i$,{ref:n,isFixed:r},e)})),a$=x.span`
|
|
4631
4631
|
display: inline-flex;
|
|
4632
4632
|
line-height: 0;
|
|
4633
|
-
`,
|
|
4633
|
+
`,l$=t.forwardRef((function({labelFixtureTooltip:e=(e=>(e?"Unfix":"Fix")+" the side menu")},n){const r=J(),{isOpen:i,isFixed:o,isMobile:a,handleFixed:l,handleUnFixed:s,slotNotificationCount:c}=t.useContext(GA),d=e(o),u=!a&&!i&&!o&&c>0,p=t.useCallback((()=>{o?null==s||s():null==l||l()}),[o,l,s]),m=t.createElement(uc,{ref:n,isQuiet:!0,color:"clear",size:"medium","aria-label":d,icon:t.createElement(ee,{name:o?"sidebar_fold":"sidebar_unfold",color:"currentColor"}),onClick:p});return t.createElement(Ru,{key:o?"fixed":"unfixed",content:d,positionPriority:["right"],offset:[0,2.5*r.spacing],enterDelay:ZA},t.createElement(a$,null,u?t.createElement(QA,{variant:"dot",dotSize:"small",position:"top-right",overlayOffsetPercent:10},m):m))})),s$=x.div`
|
|
4634
4634
|
cursor: pointer;
|
|
4635
4635
|
display: flex;
|
|
4636
4636
|
align-items: center;
|
|
@@ -4645,7 +4645,7 @@ object-assign
|
|
|
4645
4645
|
& > * {
|
|
4646
4646
|
flex-shrink: 0;
|
|
4647
4647
|
}
|
|
4648
|
-
`,
|
|
4648
|
+
`,c$=x.div`
|
|
4649
4649
|
flex-shrink: 1;
|
|
4650
4650
|
flex-grow: 1;
|
|
4651
4651
|
display: flex;
|
|
@@ -4660,7 +4660,7 @@ object-assign
|
|
|
4660
4660
|
`:w`
|
|
4661
4661
|
display: none;
|
|
4662
4662
|
`}
|
|
4663
|
-
`,
|
|
4663
|
+
`,d$=x(ve)`
|
|
4664
4664
|
white-space: nowrap;
|
|
4665
4665
|
overflow: hidden;
|
|
4666
4666
|
text-overflow: ellipsis;
|
|
@@ -4671,7 +4671,7 @@ object-assign
|
|
|
4671
4671
|
& > * + * {
|
|
4672
4672
|
margin-left: ${({theme:e})=>.5*e.spacing}px;
|
|
4673
4673
|
}
|
|
4674
|
-
`;const
|
|
4674
|
+
`;const u$=x.span`
|
|
4675
4675
|
display: flex;
|
|
4676
4676
|
align-items: center;
|
|
4677
4677
|
align-content: center;
|
|
@@ -4691,7 +4691,7 @@ object-assign
|
|
|
4691
4691
|
${({invisible:e})=>e&&w`
|
|
4692
4692
|
display: none;
|
|
4693
4693
|
`}
|
|
4694
|
-
`,
|
|
4694
|
+
`,p$=({notificationCount:t=0,invisible:n=!1,style:r})=>{const i=t>=100?"99+":t;return e.createElement(u$,{invisible:n,style:r},i)},m$=e.forwardRef((function(t,n){var{title:r,isActive:i=!1,iconName:o,notificationCount:a=0,badge:l}=t,s=D(t,["title","isActive","iconName","notificationCount","badge"]);const c=J(),{isOpen:d,isMobile:u,isMobileMenuOpen:p}=e.useContext(GA),m=void 0!==l,h=a>0,g=u?p:d;return e.createElement(s$,Object.assign({ref:n,isActive:i,$isMenuExpanded:g,"aria-current":i?"page":void 0},s),h?e.createElement(QA,{badgeContent:a,position:"top-left",invisible:g},e.createElement(ee,{name:o,size:"lg",type:i?"fill":"line",color:i?"active":c.palette.black})):e.createElement(ee,{name:o,size:"lg",type:i?"fill":"line",color:i?"active":c.palette.black}),e.createElement(c$,{isOpen:u?p:d},e.createElement(d$,{component:"span",color:i?"primary":"initial",weight:"bold",size:"sm"},r)),m&&(u?p:d)&&e.createElement(zm,Object.assign({},l,{size:l.size||"small"})),h&&e.createElement(p$,{notificationCount:a,invisible:0===a||!(u?p:d),style:{marginLeft:m&&(u?p:d)?"4px":"0"}}))})),h$=x.div`
|
|
4695
4695
|
cursor: pointer;
|
|
4696
4696
|
display: flex;
|
|
4697
4697
|
align-items: center;
|
|
@@ -4706,7 +4706,7 @@ object-assign
|
|
|
4706
4706
|
& > * {
|
|
4707
4707
|
flex-shrink: 0;
|
|
4708
4708
|
}
|
|
4709
|
-
`,
|
|
4709
|
+
`,g$=x.div`
|
|
4710
4710
|
flex-shrink: 1;
|
|
4711
4711
|
flex-grow: 1;
|
|
4712
4712
|
display: flex;
|
|
@@ -4721,11 +4721,11 @@ object-assign
|
|
|
4721
4721
|
`:w`
|
|
4722
4722
|
display: none;
|
|
4723
4723
|
`}
|
|
4724
|
-
`,
|
|
4724
|
+
`,f$=x(ve)`
|
|
4725
4725
|
white-space: nowrap;
|
|
4726
4726
|
overflow: hidden;
|
|
4727
4727
|
text-overflow: ellipsis;
|
|
4728
|
-
`,
|
|
4728
|
+
`,b$=x.div`
|
|
4729
4729
|
flex-shrink: 0;
|
|
4730
4730
|
margin-right: ${({theme:e})=>e.spacing}px;
|
|
4731
4731
|
transform: rotate(${({isExpand:e})=>e?"180deg":"none"});
|
|
@@ -4736,12 +4736,12 @@ object-assign
|
|
|
4736
4736
|
`:w`
|
|
4737
4737
|
display: none;
|
|
4738
4738
|
`}
|
|
4739
|
-
`,
|
|
4739
|
+
`,v$=x.div`
|
|
4740
4740
|
overflow-y: hidden;
|
|
4741
4741
|
max-height: ${({isExpand:e,height:t})=>e?t:"0px"};
|
|
4742
4742
|
transition: max-height 0.3s
|
|
4743
4743
|
${({delay:e})=>e?ZA:0}s;
|
|
4744
|
-
`,
|
|
4744
|
+
`,x$=e.forwardRef((function(t,n){var{title:r,isActive:i=!1,iconName:o,expansionList:a=[],defaultExpand:l=!1,notificationCount:s=0,onChangeExpand:c,onClick:d}=t,u=D(t,["title","isActive","iconName","expansionList","defaultExpand","notificationCount","onChangeExpand","onClick"]);const p=J(),{isOpen:m,isMobile:h,isMobileMenuOpen:g}=e.useContext(GA),[f,b]=e.useState(l),[v,x]=e.useState(!1),[y,w]=e.useState("auto"),C=e.useRef(null),E=m||h&&g;return e.useEffect((()=>{x(E)}),[E]),e.useEffect((()=>{x(!1),c&&c(f)}),[f,c]),e.useEffect((()=>{if(!C.current)return;const{height:e}=C.current.getBoundingClientRect();0!==e&&w(`${e}px`)}),[]),e.createElement("div",{ref:n},e.createElement(h$,Object.assign({isActive:i,$isMenuExpanded:E,onClick:e=>{0!==a.length&&b(!f),d&&d(e)}},u),e.createElement(QA,{badgeContent:s,position:"top-left"},e.createElement(ee,{name:o,size:"lg",type:i?"fill":"line",color:i?"active":p.palette.black})),e.createElement(g$,{isOpen:E},e.createElement(f$,{component:"span",color:i?"primary":"initial",weight:"bold",size:"sm"},r)),e.createElement(b$,{isExpand:f,isOpen:E},e.createElement(ee,{name:"arrow_bottom",color:i?"active":p.palette.black,size:"md"}))),e.createElement(v$,{ref:C,isExpand:f&&E||"auto"===y,height:y,delay:v},a.map(((t,n)=>e.createElement(e.Fragment,{key:n},t)))))})),y$=x.div`
|
|
4745
4745
|
cursor: pointer;
|
|
4746
4746
|
display: flex;
|
|
4747
4747
|
align-items: center;
|
|
@@ -4754,7 +4754,7 @@ object-assign
|
|
|
4754
4754
|
& > * {
|
|
4755
4755
|
flex-shrink: 0;
|
|
4756
4756
|
}
|
|
4757
|
-
`,
|
|
4757
|
+
`,w$=x(ve)`
|
|
4758
4758
|
flex-shrink: 1;
|
|
4759
4759
|
flex-grow: 1;
|
|
4760
4760
|
display: flex;
|
|
@@ -4763,7 +4763,7 @@ object-assign
|
|
|
4763
4763
|
white-space: nowrap;
|
|
4764
4764
|
overflow: hidden;
|
|
4765
4765
|
text-overflow: ellipsis;
|
|
4766
|
-
`,
|
|
4766
|
+
`,C$=e.forwardRef((function(t,n){var{title:r,isActive:i=!1,notificationCount:o=0,badge:a}=t,l=D(t,["title","isActive","notificationCount","badge"]);const s=J();return e.createElement(y$,Object.assign({ref:n},l),e.createElement(w$,{component:"div",weight:i?"bold":"normal",color:i?"primary":s.palette.black,size:"sm"},r),a&&e.createElement(zm,Object.assign({},a,{size:a.size||"small"})),e.createElement(p$,{notificationCount:o,invisible:0===o,style:{marginLeft:a?"4px":"0"}}))})),E$=x.div`
|
|
4767
4767
|
flex-shrink: 0;
|
|
4768
4768
|
display: none;
|
|
4769
4769
|
flex-direction: column;
|
|
@@ -4783,7 +4783,7 @@ object-assign
|
|
|
4783
4783
|
display: none;
|
|
4784
4784
|
}
|
|
4785
4785
|
`}
|
|
4786
|
-
`,
|
|
4786
|
+
`,I$=x.div`
|
|
4787
4787
|
display: none;
|
|
4788
4788
|
flex-shrink: 0;
|
|
4789
4789
|
align-items: center;
|
|
@@ -4801,7 +4801,7 @@ object-assign
|
|
|
4801
4801
|
display: none;
|
|
4802
4802
|
}
|
|
4803
4803
|
`}
|
|
4804
|
-
`,
|
|
4804
|
+
`,k$=x.div`
|
|
4805
4805
|
flex-shrink: 0;
|
|
4806
4806
|
display: flex;
|
|
4807
4807
|
align-items: center;
|
|
@@ -4817,7 +4817,7 @@ object-assign
|
|
|
4817
4817
|
padding: 0;
|
|
4818
4818
|
border-bottom: none;
|
|
4819
4819
|
}
|
|
4820
|
-
`,
|
|
4820
|
+
`,M$=x.div`
|
|
4821
4821
|
flex: 1;
|
|
4822
4822
|
min-width: 0;
|
|
4823
4823
|
display: flex;
|
|
@@ -4835,7 +4835,7 @@ object-assign
|
|
|
4835
4835
|
align-self: stretch;
|
|
4836
4836
|
width: 100%;
|
|
4837
4837
|
}
|
|
4838
|
-
`,
|
|
4838
|
+
`,A$=x.div`
|
|
4839
4839
|
flex-shrink: 0;
|
|
4840
4840
|
display: flex;
|
|
4841
4841
|
align-items: center;
|
|
@@ -4844,7 +4844,7 @@ object-assign
|
|
|
4844
4844
|
@media (max-width: ${B.MOBILE}px) {
|
|
4845
4845
|
display: none;
|
|
4846
4846
|
}
|
|
4847
|
-
|
|
4847
|
+
`,$$=x.div`
|
|
4848
4848
|
display: flex;
|
|
4849
4849
|
align-items: center;
|
|
4850
4850
|
gap: inherit;
|
|
@@ -4869,20 +4869,20 @@ object-assign
|
|
|
4869
4869
|
width: 100%;
|
|
4870
4870
|
}
|
|
4871
4871
|
`}
|
|
4872
|
-
|
|
4872
|
+
`,D$=t.forwardRef((function({children:e,actions:n},r){const{isOpen:i,isFixed:o,isMobile:a,handleMobileMenuToggle:l}=_A(),s=a||i||o,c=t.Children.count(e)>0,d=t.createElement(uc,{color:"clear",size:"medium","aria-label":"メニューを閉じる",icon:t.createElement(ee,{name:"close",color:"currentColor"}),onClick:l}),u=a?d:null!=n?n:t.createElement(l$,null),p=t.createElement(M$,{$showCustom:s,"data-testid":"navigation-rail-slot-custom"},e);return a?t.createElement(E$,{ref:r,"data-testid":"navigation-rail-slot",$showCustom:s},t.createElement(I$,{$showCustom:s,"data-testid":"navigation-rail-slot-mobile-close"},d),c?t.createElement(k$,{$showCustom:s},p):null):t.createElement(k$,{ref:r,"data-testid":"navigation-rail-slot",$showCustom:s},p,t.createElement(A$,{$showCustom:s},u))})),L$=t.forwardRef((function({children:e,visibility:n="all"},r){return t.createElement($$,{ref:r,$visibility:n,$passthrough:"all"===n},e)})),O$="undefined"!=typeof window?t.useLayoutEffect:t.useEffect,S$=t.forwardRef((function(e,n){const{registerMobileMenuButton:r,unregisterMobileMenuButton:i}=_A();return O$((()=>(null==r||r(),()=>null==i?void 0:i())),[r,i]),t.createElement(KA,{ref:n})}));function V$(e){let n=!1;return t.Children.forEach(e,(e=>{!n&&t.isValidElement(e)&&(e.type!==D$?e.type===t.Fragment&&(n=V$(e.props.children)):n=!0)})),n}const H$=t.forwardRef((function({children:e},n){const{isOpen:r,isFixed:i,handleOpen:o,handleClose:a,isMobile:l,isMobileMenuOpen:s,handleMobileMenuToggle:c}=t.useContext(GA),d=V$(e),u=l&&!d?t.createElement(D$,null):null;return t.createElement(t.Fragment,null,t.createElement(PA,{isVisible:l&&s,"data-testid":"navigation-rail-overlay",onClick:c}),t.createElement(BA,{ref:n,isOpen:r,isFixed:i,isMobile:l,isMobileMenuOpen:s,onMouseEnter:()=>{l||null==o||o()},onMouseLeave:()=>{l||null==a||a()}},u,e))})),R$=H$;R$.Container=e$,R$.Header=t$,R$.Content=n$,R$.Footer=r$,R$.Menu=m$,R$.ExpansionMenu=x$,R$.ExpansionMenuItem=C$,R$.Fixture=l$,R$.MainContent=o$,R$.Slot=D$,R$.SlotContent=L$,R$.MobileMenuButton=S$;const N$=e.forwardRef((function(t,n){var{title:r,description:i,slotContent:o,slotExpansion:a="whenChecked",disabled:l,error:s,checked:c,inputRef:d}=t,u=D(t,["title","description","slotContent","slotExpansion","disabled","error","checked","inputRef"]);const p=!!c,{controlWrapRef:m,assignInputRef:h,handleHeaderClick:g}=xg(l,d),f=e.createElement(fg,null,e.createElement(gg,{ref:m},e.createElement(pw,Object.assign({},u,{checked:c,disabled:l,error:s,inputRef:h}),r)),yg(i)?e.createElement(bg,{$disabled:!!l},i):null);return e.createElement(vg,{ref:n,checked:p,disabled:l,header:f,slot:o,slotExpansion:a,onHeaderClick:g})})),z$=x.div`
|
|
4873
4873
|
${({height:e,maxHeight:t,minHeight:n})=>Eg({height:e,maxHeight:t,minHeight:n})}
|
|
4874
|
-
`,
|
|
4874
|
+
`,T$=e.forwardRef((function(t,n){var{height:r="auto",maxHeight:i="none",minHeight:o="none",children:a}=t,l=D(t,["height","maxHeight","minHeight","children"]);return e.createElement(z$,Object.assign({height:r,maxHeight:i,minHeight:o},l,{ref:n}),a)})),Z$="24px",B$=x.div`
|
|
4875
4875
|
flex-direction: row;
|
|
4876
4876
|
width: 100%;
|
|
4877
|
-
min-height: ${
|
|
4877
|
+
min-height: ${Z$};
|
|
4878
4878
|
display: flex;
|
|
4879
4879
|
align-items: center;
|
|
4880
4880
|
position: relative;
|
|
4881
4881
|
cursor: ${({disabled:e})=>e?"not-allowed":"default"};
|
|
4882
|
-
`,
|
|
4882
|
+
`,P$=x.div`
|
|
4883
4883
|
position: relative;
|
|
4884
4884
|
flex: 1;
|
|
4885
|
-
min-height: ${
|
|
4885
|
+
min-height: ${Z$};
|
|
4886
4886
|
display: flex;
|
|
4887
4887
|
align-items: center;
|
|
4888
4888
|
min-width: 100px;
|
|
@@ -4900,7 +4900,7 @@ object-assign
|
|
|
4900
4900
|
background-color: ${({theme:e})=>e.palette.neutral.lighter};
|
|
4901
4901
|
pointer-events: none;
|
|
4902
4902
|
}
|
|
4903
|
-
`,
|
|
4903
|
+
`,_$=x.div`
|
|
4904
4904
|
position: absolute;
|
|
4905
4905
|
top: 50%;
|
|
4906
4906
|
left: 0;
|
|
@@ -4914,7 +4914,7 @@ object-assign
|
|
|
4914
4914
|
width: ${e}%;
|
|
4915
4915
|
left: ${t}%;
|
|
4916
4916
|
`}
|
|
4917
|
-
`,
|
|
4917
|
+
`,G$=x.div`
|
|
4918
4918
|
position: absolute;
|
|
4919
4919
|
width: 18px;
|
|
4920
4920
|
height: 18px;
|
|
@@ -4934,7 +4934,7 @@ object-assign
|
|
|
4934
4934
|
left: ${e}%;
|
|
4935
4935
|
transform: translate(-50%, -50%);
|
|
4936
4936
|
`}
|
|
4937
|
-
`,
|
|
4937
|
+
`,Y$=x.div`
|
|
4938
4938
|
position: absolute;
|
|
4939
4939
|
top: 0;
|
|
4940
4940
|
left: 0;
|
|
@@ -4944,7 +4944,7 @@ object-assign
|
|
|
4944
4944
|
z-index: 1;
|
|
4945
4945
|
display: flex;
|
|
4946
4946
|
justify-content: space-between;
|
|
4947
|
-
`,
|
|
4947
|
+
`,F$=x.div`
|
|
4948
4948
|
position: absolute;
|
|
4949
4949
|
display: flex;
|
|
4950
4950
|
flex-direction: column;
|
|
@@ -4955,7 +4955,7 @@ object-assign
|
|
|
4955
4955
|
top: 50%;
|
|
4956
4956
|
transform: translateY(-50%);
|
|
4957
4957
|
`}
|
|
4958
|
-
`,
|
|
4958
|
+
`,j$=x.div`
|
|
4959
4959
|
border-radius: 50%;
|
|
4960
4960
|
position: absolute;
|
|
4961
4961
|
top: 50%;
|
|
@@ -4965,32 +4965,32 @@ object-assign
|
|
|
4965
4965
|
|
|
4966
4966
|
width: 8px;
|
|
4967
4967
|
height: 8px;
|
|
4968
|
-
`,
|
|
4969
|
-
&.${
|
|
4970
|
-
transform: ${({direction:e})=>
|
|
4968
|
+
`,W$=(e,t,n)=>Math.max(t,Math.min(n,e)),X$=(e,t,n,r)=>void 0===e?r?[t,n]:t:Array.isArray(e)?[W$(e[0],t,n),W$(e[1],t,n)]:W$(e,t,n),J$=(e,t,n)=>(e-t)/(n-t)*100,U$=(e,t,n,r,i)=>{const o=n+(e-t.left)/t.width*100/100*(r-n),a=Math.round(o/i)*i;return W$(a,n,r)},Q$=(e,t)=>{if(1===t.length)return 0;const[n,r]=t,i=Math.abs(e-n),o=Math.abs(e-r);if(i!==o)return i<o?0:1;return e>=(n+r)/2?1:0},K$=(e,t,n,r,i,o,a)=>{const l="PageUp"===t||"PageDown"===t?10*i:i;let s;if(o&&Array.isArray(e)){const i=null!=a?a:0,o=e[i];switch(t){case"ArrowLeft":case"ArrowDown":case"PageDown":s=W$(o-l,n,r);break;case"ArrowRight":case"ArrowUp":case"PageUp":s=W$(o+l,n,r);break;case"Home":s=n;break;case"End":s=r;break;default:return e}const c=[...e];return c[i]=s,0===i?c[0]=Math.min(s,c[1]):c[1]=Math.max(s,c[0]),c}{const i=Array.isArray(e)?e[0]:e;switch(t){case"ArrowLeft":case"ArrowDown":case"PageDown":s=W$(i-l,n,r);break;case"ArrowRight":case"ArrowUp":case"PageUp":s=W$(i+l,n,r);break;case"Home":s=n;break;case"End":s=r;break;default:return e}return s}},q$=()=>{document.body.style.userSelect="none"},eD=()=>{document.body.style.userSelect=""},tD=e=>{e.preventDefault()};function nD({value:t,defaultValue:n,onChange:r,min:i,max:o,step:a,disabled:l=!1}){const s=e.useCallback((e=>{const r=Array.isArray(t)||Array.isArray(n);return X$(e,i,o,r)}),[i,o,t,n]),[c,d]=e.useState(s(n)),[u,p]=e.useState(!1),[m,h]=e.useState(null),[g,f]=e.useState(new Map),[b,v]=e.useState(new Map),x=e.useRef(null),y=e.useRef(null);e.useEffect((()=>{if(void 0===t&&void 0!==n){const e=s(n);d(e)}}),[t,n,s]);const w=void 0!==t?t:c,C=e.useCallback((e=>{r?r(e):d(e)}),[r]),E=e.useCallback((e=>{if(!x.current)return i;const t=x.current.getBoundingClientRect();return U$(e,t,i,o,a)}),[i,o,a]),I=e.useCallback((e=>{if(l)return;e.preventDefault(),p(!0),q$(),document.addEventListener("wheel",tD,{passive:!1}),document.addEventListener("touchmove",tD,{passive:!1});const t=E(e.clientX);if(Array.isArray(w)){const e=Q$(t,w);h(e);const n=[...w];n[e]=t,C(n)}else h(0),C(t)}),[l,E,w,C]),k=e.useCallback((e=>{if(!u||l)return;const t=E(e.clientX);if(Array.isArray(w)&&null!==m){const e=[...w];e[m]=t,0===m?e[0]=Math.min(t,e[1]):e[1]=Math.max(t,e[0]),C(e)}else Array.isArray(w)||C(t)}),[u,l,E,w,m,C]),M=e.useCallback((()=>{p(!1),h(null),eD(),document.removeEventListener("wheel",tD),document.removeEventListener("touchmove",tD)}),[]),A=e.useCallback((e=>{if(l)return;e.preventDefault(),p(!0),q$(),document.addEventListener("wheel",tD,{passive:!1}),document.addEventListener("touchmove",tD,{passive:!1});const t=new Map,n=new Map;Array.from(e.changedTouches).forEach((e=>{const r=E(e.clientX);if(t.set(e.identifier,e),Array.isArray(w)){const t=Q$(r,w);n.set(e.identifier,t)}else n.set(e.identifier,0)})),f(t),v(n)}),[l,E,w]),$=e.useCallback((e=>{u&&!l&&(e.preventDefault(),Array.from(e.changedTouches).forEach((e=>{const t=b.get(e.identifier);if(void 0===t)return;const n=E(e.clientX);if(Array.isArray(w)){const e=[...w];e[t]=n,0===t?e[0]=Math.min(n,e[1]):e[1]=Math.max(n,e[0]),C(e)}else C(n)})))}),[u,l,E,w,b,C]),D=e.useCallback((e=>{const t=new Map(g),n=new Map(b);Array.from(e.changedTouches).forEach((e=>{t.delete(e.identifier),n.delete(e.identifier)})),f(t),v(n),0===t.size&&(p(!1),eD(),document.removeEventListener("wheel",tD),document.removeEventListener("touchmove",tD))}),[g,b]);return{currentValue:w,isDragging:u,trackRef:x,thumbRef:y,handleChange:C,handleMouseDown:I,handleMouseMove:k,handleMouseUp:M,handleTouchStart:A,handleTouchMove:$,handleTouchEnd:D}}function rD({showScale:t,min:n,max:r,step:i,currentValue:o}){const a=J(),l=e.useCallback((()=>{if(!t)return[];const e=[];for(let t=n;t<=r;t+=i)e.push(t);return e}),[t,n,r,i]),s=e.useCallback((e=>Array.isArray(o)?e>=o[0]&&e<=o[1]:e<=o),[o]),c=e.useCallback((()=>{if(!t)return null;const i=l();return e.createElement(Y$,{},i.map((t=>e.createElement(F$,{key:t,percentage:(t-n)/(r-n)*100},e.createElement(j$,{theme:a,isOnFill:s(t)})))))}),[t,l,n,r,s,a]);return{getScaleValues:l,isScaleOnFill:s,renderScale:c}}let iD=0;const oD={min:0,max:100,step:1,disabled:!1,showScale:!1},aD=e.forwardRef((function(t,n){var{value:r,defaultValue:i,onChange:o,min:a=oD.min,max:l=oD.max,step:s=oD.step,disabled:c=oD.disabled,showScale:d=oD.showScale,id:u,className:p,style:m,"aria-label":h,"aria-labelledby":g,"aria-describedby":f}=t,b=D(t,["value","defaultValue","onChange","min","max","step","disabled","showScale","id","className","style","aria-label","aria-labelledby","aria-describedby"]);const v=J(),x=e.useId(),y=e.useMemo((()=>"slider-"+ ++iD),[]),w=u||x||y,{currentValue:C,isDragging:E,trackRef:I,thumbRef:k,handleChange:M,handleMouseDown:A,handleMouseMove:$,handleMouseUp:L,handleTouchStart:O,handleTouchMove:S,handleTouchEnd:V}=nD({value:r,defaultValue:i,onChange:o,min:a,max:l,step:s,disabled:c}),{renderScale:H}=rD({showScale:d,min:a,max:l,step:s,currentValue:C}),R=e.useCallback((e=>J$(e,a,l)),[a,l]),N=e.useCallback((e=>{if(c)return;const t=Array.isArray(C),n=K$(C,e.key,a,l,s,t,null);n!==C&&(e.preventDefault(),M(n))}),[c,C,a,l,s,M]),z=e.useCallback((e=>{const t=parseFloat(e.target.value);if(Array.isArray(C)){const e=[...C];e[0]=t,M(e)}else M(t)}),[C,M]),T=e.useCallback((e=>{if(!Array.isArray(C))return;const t=parseFloat(e.target.value),n=[...C];n[0]=Math.min(t,n[1]),M(n)}),[C,M]),Z=e.useCallback((e=>{if(!Array.isArray(C))return;const t=parseFloat(e.target.value),n=[...C];n[1]=Math.max(t,n[0]),M(n)}),[C,M]);return e.useEffect((()=>{if(E){document.addEventListener("mousemove",$),document.addEventListener("mouseup",L),document.addEventListener("touchmove",S),document.addEventListener("touchend",V);const e=e=>e.preventDefault();return document.addEventListener("contextmenu",e),()=>{document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",L),document.removeEventListener("touchmove",S),document.removeEventListener("touchend",V),document.removeEventListener("contextmenu",e)}}}),[E,$,L,S,V]),e.createElement(B$,Object.assign({ref:n,theme:v,disabled:c,className:p,style:m},b),e.createElement(P$,{ref:I,id:w,tabIndex:c?-1:0,role:"slider","aria-valuemin":a,"aria-valuemax":l,"aria-valuenow":Array.isArray(C)?C[0]:C,"aria-valuetext":Array.isArray(C)?`${C[0]} to ${C[1]}`:void 0,"aria-disabled":c,"aria-label":h,"aria-labelledby":g,"aria-describedby":f,onMouseDown:A,onTouchStart:O,onKeyDown:N},Array.isArray(C)?e.createElement(e.Fragment,null,e.createElement(_$,{percentage:R(C[1])-R(C[0]),isDragging:E,startPercentage:R(C[0]),disabled:c}),e.createElement(G$,{ref:k,percentage:R(C[0]),isDragging:E,disabled:c}),e.createElement(G$,{percentage:R(C[1]),isDragging:E,disabled:c})):e.createElement(e.Fragment,null,e.createElement(_$,{percentage:R(C),isDragging:E,disabled:c}),e.createElement(G$,{ref:k,percentage:R(C),isDragging:E,disabled:c})),H()),Array.isArray(C)?e.createElement(e.Fragment,null,e.createElement("input",{type:"range",min:a,max:l,step:s,value:C[0],style:{position:"absolute",opacity:0,pointerEvents:"none",width:"1px",height:"1px",margin:"-1px",padding:0,border:"none",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap"},"aria-label":"Slider minimum value","aria-labelledby":g,"aria-describedby":f,disabled:c,onChange:T}),e.createElement("input",{type:"range",min:a,max:l,step:s,value:C[1],style:{position:"absolute",opacity:0,pointerEvents:"none",width:"1px",height:"1px",margin:"-1px",padding:0,border:"none",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap"},"aria-label":"Slider maximum value","aria-labelledby":g,"aria-describedby":f,disabled:c,onChange:Z})):e.createElement("input",{type:"range",min:a,max:l,step:s,value:C,style:{position:"absolute",opacity:0,pointerEvents:"none",width:"1px",height:"1px",margin:"-1px",padding:0,border:"none",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap"},"aria-label":"Slider input","aria-labelledby":g,"aria-describedby":f,disabled:c,onChange:z}))})),lD=s(null),sD=()=>{const e=c(lD);if(!e)throw new Error("SliderField components must be used within a SliderField");return e},cD=({children:e})=>{const n=r(),i={fieldId:n,sliderId:`${n}-slider`,outputId:`${n}-output`};return t.createElement(lD.Provider,{value:i},e)};cD.Slider=e=>{const{sliderId:n,outputId:r}=sD(),i=e.id||n,o=e["aria-describedby"]||r;return t.createElement(aD,Object.assign({},e,{id:i,"aria-describedby":o}))},cD.Output=e=>{var{children:n,id:r}=e,i=D(e,["children","id"]);const{outputId:o}=sD();return t.createElement("div",Object.assign({},i,{id:r||o}),n)};const dD=e=>{switch(e){case"down":default:return"translateY(100vh)";case"up":return"translateY(-100vh)";case"right":return"translateX(100vw)";case"left":return"translateX(-100vw)"}},uD="slide-transition",pD=x(mu)`
|
|
4969
|
+
&.${uD}-enter, &.${uD}-appear {
|
|
4970
|
+
transform: ${({direction:e})=>dD(e)};
|
|
4971
4971
|
}
|
|
4972
|
-
&.${
|
|
4972
|
+
&.${uD}-enter-active, &.${uD}-appear-active {
|
|
4973
4973
|
transform: none;
|
|
4974
4974
|
transition: transform ${({timeout:e})=>$u(e,"enter")}ms;
|
|
4975
4975
|
}
|
|
4976
|
-
&.${
|
|
4976
|
+
&.${uD}-exit {
|
|
4977
4977
|
transform: none;
|
|
4978
4978
|
}
|
|
4979
|
-
&.${
|
|
4980
|
-
transform: ${({direction:e})=>
|
|
4979
|
+
&.${uD}-exit-active {
|
|
4980
|
+
transform: ${({direction:e})=>dD(e)};
|
|
4981
4981
|
transition: transform ${({timeout:e})=>$u(e,"exit")}ms;
|
|
4982
4982
|
}
|
|
4983
|
-
&.${
|
|
4984
|
-
transform: ${({direction:e})=>
|
|
4983
|
+
&.${uD}-exit-done {
|
|
4984
|
+
transform: ${({direction:e})=>dD(e)};
|
|
4985
4985
|
}
|
|
4986
|
-
`,
|
|
4986
|
+
`,mD=t=>{var{timeout:n=300,children:r,direction:i="down"}=t,o=D(t,["timeout","children","direction"]);const a=e.useRef(null);return e.createElement(pD,Object.assign({nodeRef:a,appear:!0,timeout:n,direction:i,classNames:uD},o),e.createElement("div",{ref:a},r))},hD=x.div`
|
|
4987
4987
|
position: fixed;
|
|
4988
4988
|
left: ${({horizontal:e,theme:t})=>"left"===e?3*t.spacing+"px":"auto"};
|
|
4989
4989
|
right: ${({horizontal:e,theme:t})=>"right"===e?3*t.spacing+"px":"auto"};
|
|
4990
4990
|
top: ${({vertical:e,theme:t})=>"top"===e?3*t.spacing+"px":"auto"};
|
|
4991
4991
|
bottom: ${({vertical:e,theme:t})=>"bottom"===e?3*t.spacing+"px":"auto"};
|
|
4992
4992
|
z-index: ${({theme:e})=>e.depth.snackbar};
|
|
4993
|
-
`,
|
|
4993
|
+
`,gD=x.div`
|
|
4994
4994
|
position: relative;
|
|
4995
4995
|
min-width: 320px;
|
|
4996
4996
|
max-width: 400px;
|
|
@@ -5002,104 +5002,104 @@ object-assign
|
|
|
5002
5002
|
box-shadow: ${({boxShadow:e})=>e};
|
|
5003
5003
|
border-radius: ${({theme:e})=>e.radius}px;
|
|
5004
5004
|
color: ${({textColor:e})=>e||"inherit"};
|
|
5005
|
-
`,
|
|
5005
|
+
`,fD=x.div`
|
|
5006
5006
|
position: absolute;
|
|
5007
5007
|
top: ${({theme:e})=>e.spacing}px;
|
|
5008
5008
|
right: ${({theme:e})=>e.spacing}px;
|
|
5009
5009
|
cursor: pointer;
|
|
5010
|
-
`,
|
|
5010
|
+
`,bD=({color:t,onClose:n,children:r})=>{const i=(e=>({default:{iconColor:e.palette.black,boxShadow:ho(5,e.palette.action.shadowOpacity,e.palette.action.shadowBase),background:e.palette.background.default},dark:{iconColor:e.palette.white,boxShadow:ho(5,e.palette.action.shadowOpacity,e.palette.action.shadowBase),background:e.palette.black,textColor:e.palette.text.white},warning:{iconColor:e.palette.warning.ultraDark,boxShadow:ho(5,e.palette.action.shadowOpacity,e.palette.warning.highlight),background:e.palette.warning.highlight}}))(J())[t];return e.createElement(gD,Object.assign({},i),r,e.createElement(fD,{onClick:n},e.createElement(ee,{name:"close",color:i.iconColor})))},vD=e.forwardRef((function({color:t="default",anchorOrigin:{vertical:n,horizontal:r}={vertical:"bottom",horizontal:"right"},isOpen:i,onClose:o,children:a},l){return i?e.createElement(hD,{ref:l,vertical:n,horizontal:r,role:"warning"===t?"alert":"status"},e.createElement(bD,{color:t,onClose:o},a)):null})),xD=x.div`
|
|
5011
5011
|
display: block;
|
|
5012
|
-
`,
|
|
5012
|
+
`,yD=e.forwardRef((function(t,n){var{children:r}=t,i=D(t,["children"]);return e.createElement(re,Object.assign({ref:n,display:"flex"},i),e.createElement(Ks,{pr:1}),e.createElement(_g,{orientation:"vertical"}),e.createElement(Ks,{pr:1}),e.createElement(xD,null,r))})),wD={small:{height:"28px",fontSize:"12px",padding:"0 4px",borderRadius:"4px",itemHeight:"20px",itemPadding:"0 4px",itemRadius:"2px",iconSize:"sm-md",iconItemWidth:"24px",gap:"4px"},medium:{height:"32px",fontSize:"12px",padding:"0 4px",borderRadius:"4px",itemHeight:"24px",itemPadding:"0 6px",itemRadius:"4px",iconSize:"sm-md",iconItemWidth:"24px",gap:"6px"},large:{height:"40px",fontSize:"13px",padding:"0 6px",borderRadius:"6px",itemHeight:"28px",itemPadding:"0 8px",itemRadius:"4px",iconSize:"md",iconItemWidth:"28px",gap:"8px"}},CD=e=>({light:{containerBackground:e.palette.background.default,indicatorBackground:e.palette.black,textColor:e.palette.black,textColorActive:e.palette.background.default,textColorDisabled:e.palette.text.disabled,iconColor:e.palette.black,iconColorActive:e.palette.background.default,iconColorDisabled:e.palette.neutral.lighter,borderColor:e.palette.divider,hoverBackground:e.palette.neutral.softLight},dark:{containerBackground:e.palette.neutral.ultraLight,indicatorBackground:e.palette.black,textColor:e.palette.black,textColorActive:e.palette.background.default,textColorDisabled:e.palette.text.disabled,iconColor:e.palette.black,iconColorActive:e.palette.background.default,iconColorDisabled:e.palette.neutral.lighter,borderColor:e.palette.divider,hoverBackground:e.palette.neutral.softLight},primary:{containerBackground:e.palette.primary.ultraLight,indicatorBackground:e.palette.primary.base,textColor:e.palette.primary.base,textColorActive:e.palette.background.default,textColorDisabled:e.palette.text.disabled,iconColor:e.palette.primary.base,iconColorActive:e.palette.background.default,iconColorDisabled:e.palette.neutral.lighter,borderColor:e.palette.primary.base,hoverBackground:e.palette.primary.highlight}}),ED=x.div`
|
|
5013
5013
|
display: inline-flex;
|
|
5014
5014
|
align-items: center;
|
|
5015
|
-
height: ${({$size:e})=>
|
|
5016
|
-
padding: ${({$size:e})=>
|
|
5017
|
-
border-radius: ${({$size:e})=>
|
|
5018
|
-
background-color: ${({$variant:e,theme:t,$disabled:n})=>{if(n)return t.palette.neutral.softLight;return
|
|
5015
|
+
height: ${({$size:e})=>wD[e].height};
|
|
5016
|
+
padding: ${({$size:e})=>wD[e].padding};
|
|
5017
|
+
border-radius: ${({$size:e})=>wD[e].borderRadius};
|
|
5018
|
+
background-color: ${({$variant:e,theme:t,$disabled:n})=>{if(n)return t.palette.neutral.softLight;return CD(t)[e].containerBackground}};
|
|
5019
5019
|
border: 1px solid
|
|
5020
|
-
${({$variant:e,theme:t,$disabled:n})=>{if(n)return t.palette.text.disabled;return
|
|
5020
|
+
${({$variant:e,theme:t,$disabled:n})=>{if(n)return t.palette.text.disabled;return CD(t)[e].borderColor}};
|
|
5021
5021
|
width: ${({$fullWidth:e,$width:t})=>e?"100%":t?`${isNaN(+t)?t:t+"px"}`:"auto"};
|
|
5022
5022
|
cursor: ${({$disabled:e})=>e?"not-allowed":"default"};
|
|
5023
5023
|
transition: all 0.3s ease-in-out;
|
|
5024
|
-
`,
|
|
5024
|
+
`,ID=x.div`
|
|
5025
5025
|
position: relative;
|
|
5026
5026
|
width: 100%;
|
|
5027
|
-
`,
|
|
5027
|
+
`,kD=x.div`
|
|
5028
5028
|
position: relative;
|
|
5029
5029
|
width: 100%;
|
|
5030
5030
|
white-space: nowrap;
|
|
5031
5031
|
display: flex;
|
|
5032
5032
|
align-items: center;
|
|
5033
|
-
gap: ${({$size:e})=>
|
|
5033
|
+
gap: ${({$size:e})=>wD[e].gap};
|
|
5034
5034
|
${({$fullWidth:e})=>e&&"\n & > * {\n flex: 1;\n }\n "}
|
|
5035
|
-
`,
|
|
5035
|
+
`,MD=x.div`
|
|
5036
5036
|
display: inline-flex;
|
|
5037
5037
|
align-items: center;
|
|
5038
5038
|
justify-content: center;
|
|
5039
|
-
width: ${({$size:e})=>
|
|
5040
|
-
height: ${({$size:e})=>
|
|
5041
|
-
border-radius: ${({$size:e})=>
|
|
5039
|
+
width: ${({$size:e})=>wD[e].iconItemWidth};
|
|
5040
|
+
height: ${({$size:e})=>wD[e].itemHeight};
|
|
5041
|
+
border-radius: ${({$size:e})=>wD[e].itemRadius};
|
|
5042
5042
|
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
5043
5043
|
transition: all 0.3s ease-in-out;
|
|
5044
5044
|
background-color: transparent;
|
|
5045
5045
|
|
|
5046
5046
|
@media (any-hover: hover) {
|
|
5047
5047
|
&:hover:not([data-disabled="true"]) {
|
|
5048
|
-
background-color: ${({$variant:e,theme:t,$active:n,$disabled:r})=>{if(r)return"transparent";if(n)return"transparent";return
|
|
5048
|
+
background-color: ${({$variant:e,theme:t,$active:n,$disabled:r})=>{if(r)return"transparent";if(n)return"transparent";return CD(t)[e].hoverBackground}};
|
|
5049
5049
|
}
|
|
5050
5050
|
}
|
|
5051
|
-
`,
|
|
5051
|
+
`,AD=x.div`
|
|
5052
5052
|
display: inline-flex;
|
|
5053
5053
|
align-items: center;
|
|
5054
5054
|
justify-content: center;
|
|
5055
|
-
height: ${({$size:e})=>
|
|
5056
|
-
padding: ${({$size:e})=>
|
|
5057
|
-
border-radius: ${({$size:e})=>
|
|
5055
|
+
height: ${({$size:e})=>wD[e].itemHeight};
|
|
5056
|
+
padding: ${({$size:e})=>wD[e].itemPadding};
|
|
5057
|
+
border-radius: ${({$size:e})=>wD[e].itemRadius};
|
|
5058
5058
|
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
5059
5059
|
transition: all 0.3s ease-in-out;
|
|
5060
5060
|
background-color: transparent;
|
|
5061
5061
|
|
|
5062
5062
|
@media (any-hover: hover) {
|
|
5063
5063
|
&:hover:not([data-disabled="true"]) {
|
|
5064
|
-
background-color: ${({$variant:e,theme:t,$active:n,$disabled:r})=>{if(r)return"transparent";if(n)return"transparent";return
|
|
5064
|
+
background-color: ${({$variant:e,theme:t,$active:n,$disabled:r})=>{if(r)return"transparent";if(n)return"transparent";return CD(t)[e].hoverBackground}};
|
|
5065
5065
|
}
|
|
5066
5066
|
}
|
|
5067
5067
|
|
|
5068
5068
|
span {
|
|
5069
|
-
color: ${({$variant:e,theme:t,$active:n,$disabled:r})=>{if(r&&n)return t.palette.background.default;if(r){return
|
|
5069
|
+
color: ${({$variant:e,theme:t,$active:n,$disabled:r})=>{if(r&&n)return t.palette.background.default;if(r){return CD(t)[e].textColorDisabled}if(n){return CD(t)[e].textColorActive}return CD(t)[e].textColor}};
|
|
5070
5070
|
transition: color 0.5s ease-in-out;
|
|
5071
5071
|
}
|
|
5072
|
-
|
|
5072
|
+
`,$D=x.div`
|
|
5073
5073
|
position: absolute;
|
|
5074
5074
|
top: 0;
|
|
5075
5075
|
height: 100%;
|
|
5076
5076
|
transition: all 0.3s ease-in-out; //インジケーターの動きだしタイミングを少しだけ速くする
|
|
5077
|
-
background-color: ${({$variant:e,theme:t,$disabled:n})=>{if(n)return t.palette.text.disabled;return
|
|
5078
|
-
border-radius: ${({$size:e})=>
|
|
5079
|
-
`,
|
|
5077
|
+
background-color: ${({$variant:e,theme:t,$disabled:n})=>{if(n)return t.palette.text.disabled;return CD(t)[e].indicatorBackground}};
|
|
5078
|
+
border-radius: ${({$size:e})=>wD[e].itemRadius};
|
|
5079
|
+
`,DD="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function LD(e){const n=t.useRef(e);return DD((()=>{n.current=e})),t.useCallback(((...e)=>n.current(...e)),[])}const OD=e.forwardRef((function({cases:t,value:n,onChange:r,size:i="medium",variant:o="light",disabled:a=!1,fullWidth:l=!1,width:s,showTooltip:c=!1,tooltipPosition:d=["top-start","bottom-start","auto"]},u){const p=J(),m=t,h=new Map,g=e.useRef(null),f=e.useRef(null),[b,v]=e.useState({}),x=(e,t)=>()=>{!r||a||t||r(e)},y=e.useMemo((()=>"small"===i||"medium"===i?"sm-md":"md"),[i]),w=e.useCallback(((e,t)=>e&&t?p.palette.background.default:e?p.palette.text.disabled:t?p.palette.background.default:CD(p)[o].iconColor),[p,o]),C=e.useMemo((()=>"small"===i?"xs":"sm"),[i]),E=LD((()=>{const{tabsMeta:e,tabMeta:t}=(()=>{const e=g.current;let t,r;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&null!=n&&f.current){const e=f.current.children;if(e.length>0){const t=e[h.get(n)];r=(null==t?void 0:t.getBoundingClientRect())||null}}return{tabsMeta:t,tabMeta:r}})();let r=0;if(t&&e){const n=e.scrollLeft;r=t.left-e.left+n}const i={left:r,width:t?t.width:0};if(void 0===b.left||void 0===b.width)v(i);else{const e=Math.abs(b.left-i.left),t=Math.abs((null==b?void 0:b.width)-i.width);(e>=1||t>=1)&&v(i)}}));return e.useEffect((()=>{E()}),[n,m.length,i,o,E]),e.useEffect((()=>{const e=()=>{E()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[E]),e.createElement(ED,{ref:u,$size:i,$variant:o,$disabled:a,$fullWidth:l,$width:s,role:"tablist","aria-label":"Switch options"},e.createElement(ID,{ref:g},e.createElement($D,{$size:i,$variant:o,$disabled:a,style:Object.assign({},b)}),e.createElement(kD,{ref:f,$size:i,$fullWidth:l},m.map(((t,r)=>{const l=void 0===t.value?r:t.value;h.set(l,r);const s=l===n,u=t.disabled||a,p=null!=t.icon?e.createElement(MD,{$size:i,$variant:o,$active:s,$disabled:u,"data-disabled":u,role:"tab","aria-selected":s,tabIndex:u?-1:0,onClick:x(l,u)},e.createElement(ee,{name:t.icon,size:y,color:w(u,s)})):e.createElement(AD,{key:t.name,$size:i,$variant:o,$active:s,$disabled:u,"data-disabled":u,role:"tab","aria-selected":s,tabIndex:u?-1:0,onClick:x(l,u)},e.createElement(ve,{trimVertical:!0,component:"span",size:C,weight:"normal",color:"secondary"},t.name));return c?e.createElement(Ru,{key:t.name,content:t.name,positionPriority:d,offset:[0,15]},p):e.createElement(e.Fragment,{key:t.name},p)})))))})),SD=e.forwardRef((function(t,n){var{children:r}=t,i=D(t,["children"]);return e.createElement("tbody",Object.assign({ref:n},i),r)})),VD=x.td`
|
|
5080
5080
|
width: ${({width:e})=>e};
|
|
5081
5081
|
padding: ${({theme:e})=>2*e.spacing}px;
|
|
5082
|
-
`,
|
|
5082
|
+
`,HD=e.forwardRef((function(t,n){var{width:r="auto",children:i}=t,o=D(t,["width","children"]);return e.createElement(VD,Object.assign({ref:n,width:r},o),e.createElement(ve,{component:"div"},i))})),RD=e.forwardRef((function({children:t},n){return e.createElement("thead",{ref:n},t)})),ND={small:"8px",medium:"12px",large:"16px"},zD=x.tr`
|
|
5083
5083
|
border: 1px solid ${({theme:e})=>e.palette.divider};
|
|
5084
5084
|
|
|
5085
5085
|
& > td,
|
|
5086
5086
|
th {
|
|
5087
|
-
padding-top: ${({verticalSpacing:e})=>
|
|
5088
|
-
padding-bottom: ${({verticalSpacing:e})=>
|
|
5087
|
+
padding-top: ${({verticalSpacing:e})=>ND[e]};
|
|
5088
|
+
padding-bottom: ${({verticalSpacing:e})=>ND[e]};
|
|
5089
5089
|
}
|
|
5090
|
-
`,
|
|
5090
|
+
`,TD=e.forwardRef((function(t,n){var{children:r,verticalSpacing:i="medium"}=t,o=D(t,["children","verticalSpacing"]);return e.createElement(zD,Object.assign({ref:n,verticalSpacing:i},o),r)})),ZD=x.th`
|
|
5091
5091
|
width: ${({width:e})=>e};
|
|
5092
5092
|
padding: ${({theme:e})=>2*e.spacing}px;
|
|
5093
5093
|
background-color: ${({theme:e})=>e.palette.neutral.highlight};
|
|
5094
5094
|
border: 1px solid ${({theme:e})=>e.palette.divider};
|
|
5095
|
-
`,
|
|
5095
|
+
`,BD=t.forwardRef((function(e,n){var{width:r="auto",children:i}=e,o=D(e,["width","children"]);return t.createElement(ZD,Object.assign({ref:n,width:r},o),t.createElement(ve,{component:"div",weight:"bold",size:"md",lineHeight:"normal"},i))})),PD=x.table`
|
|
5096
5096
|
width: 100%;
|
|
5097
5097
|
border-collapse: collapse;
|
|
5098
5098
|
table-layout: auto;
|
|
5099
5099
|
background-color: ${({theme:e})=>e.palette.background.default};
|
|
5100
|
-
`,
|
|
5100
|
+
`,_D=e.forwardRef((function(t,n){var{children:r}=t,i=D(t,["children"]);return e.createElement(PD,Object.assign({ref:n},i),r)}));_D.Header=RD,_D.Body=SD,_D.Row=TD,_D.Cell=HD,_D.HeaderCell=BD;const GD=x.div`
|
|
5101
5101
|
position: relative;
|
|
5102
|
-
`,
|
|
5102
|
+
`,YD=x.div``,FD=x.button`
|
|
5103
5103
|
flex-irection: column;
|
|
5104
5104
|
flex-shrink: 0;
|
|
5105
5105
|
line-height: 1.25;
|
|
@@ -5120,27 +5120,27 @@ object-assign
|
|
|
5120
5120
|
background-color: ${({selected:e})=>e?"":({theme:e})=>e.palette.neutral.highlight};
|
|
5121
5121
|
transition: 0.5s;
|
|
5122
5122
|
}
|
|
5123
|
-
`,
|
|
5123
|
+
`,jD=x(ve)`
|
|
5124
5124
|
padding-right: 2px;
|
|
5125
5125
|
font-weight: normal;
|
|
5126
5126
|
color: ${({selected:e})=>e?({theme:e})=>e.palette.primary.base:"secondary"};
|
|
5127
|
-
`,
|
|
5127
|
+
`,WD=x.div`
|
|
5128
5128
|
position: absolute;
|
|
5129
5129
|
top: 0;
|
|
5130
5130
|
height: 100%;
|
|
5131
5131
|
transition: all 0.3s ease-in-out;
|
|
5132
5132
|
border-bottom: ${({theme:e})=>`solid ${e.palette.primary.base} 2px`};
|
|
5133
|
-
`,
|
|
5133
|
+
`,XD=x.div`
|
|
5134
5134
|
height: 1px;
|
|
5135
5135
|
width: 100%;
|
|
5136
5136
|
background: ${({theme:e})=>e.palette.neutral.lighter};
|
|
5137
|
-
`,
|
|
5137
|
+
`,JD=e.forwardRef((function({text:t,count:n,countMax:r,value:i,selected:o,onChange:a,onClick:l},s){const c=J(),d=o?"primary":"secondaryDark";return e.createElement(FD,{ref:s,key:t,value:i,tabIndex:o?0:-1,role:"tab","aria-selected":o,theme:c,selected:o,onClick:e=>{!o&&a&&a(i),l&&l(e)}},e.createElement(QA,{showZero:!0,layout:"inline",badgeContent:n,max:null!=r?r:99,color:d,size:"small"},e.createElement(jD,{selected:o},t)))}));var UD=e.forwardRef(((t,n)=>{const{data:r,value:i,onChange:o,onClick:a}=t,l=new Map,s=e.useRef(null),[c,d]=e.useState({}),[u,p]=e.useState(null),m=Su(n,p),h=LD((()=>{const{tabsMeta:e,tabMeta:t}=(()=>{const e=null!=u?u:void 0;let t,n;if(e){const n=e.getBoundingClientRect();t={scrollLeft:e.scrollLeft,left:n.left}}if(e&&i&&s.current){const e=s.current.children;if(e.length>0){const t=e[l.get(i)];n=(null==t?void 0:t.getBoundingClientRect())||null}}return{tabsMeta:t,tabMeta:n}})();let n=0;if(t&&e){const r=e.scrollLeft;n=t.left-e.left+r}const r={left:n,width:t?t.width:0};if(void 0===c.left||void 0===c.width)d(r);else{const e=Math.abs(c.left-r.left),t=Math.abs(c.width-r.width);(e>=1||t>=1)&&d(r)}}));return e.useEffect((()=>{h()})),e.useEffect((()=>{const e=()=>{h()};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[h]),e.createElement(GD,{ref:m},e.createElement(WD,{style:Object.assign({},c)}),e.createElement(YD,{ref:s,role:"tablist"},r.map(((t,n)=>{const r=t.value,s=r===i;return l.set(r,n),e.createElement(JD,{key:n.toString(),selected:s,value:r,count:t.count,countMax:t.countMax,text:t.text,onChange:o,onClick:a})})),e.createElement(XD,null)))}));const QD=x.div`
|
|
5138
5138
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
5139
|
-
`,JD=(e=15)=>{const t=[];for(let n=0;n<24;n++)for(let r=0;r<60;r+=e){const e=js().hour(n).minute(r).format("HH:mm");t.push(e)}return t},UD=(e,t,n,r)=>{let i;if(0===t)i=e.add(n,"hour").second(0).millisecond(0);else{if(2!==t)return null;i=e.add(n,"minute").second(0).millisecond(0)}const o=i.format(r);return{newTime:i,normalizedValue:o}};var QD=p((({time:e,error:n=!1,errorText:s,disabled:c=!1,onTimeChange:u,dropdownInterval:p=60,filterTimeOptions:m,size:h="medium",variant:g="light",width:f="120px",maxHeight:b=300,onFocus:v,onBlur:x})=>{var y,w,C,E;we("TimeField","TimeField は非推奨です。代わりに TimeField2 を使用してください。");const I=J(),[k,M]=i(!1),A=o(null),D=r(),L="HH:mm",O=e||js(),S=l((()=>{const e=JD(p);return m&&m.length>0?e.filter((e=>m.every((t=>t(e))))):e}),[p,m]),[V,H]=i(O.format(L)),[R,N]=i(eE(V)),[z,T]=i({start:0,end:R.length-1,current:0}),[Z,B]=i(null);a((()=>{const e=O.format(L);H(e),N(eE(e))}),[O,L]);const P=d((()=>{setTimeout((()=>{var e,t,n;const r=null!==(t=null===(e=A.current)||void 0===e?void 0:e.selectionStart)&&void 0!==t?t:0,i=R[R.length-1].end+1,o=r>=i?i:r,a=R.findIndex((e=>o>=e.start&&o<=e.end+1));T((e=>R[a].editable?e.current===a?e:Object.assign(Object.assign({},e),{current:a}):Object.assign(Object.assign({},e),{current:a+1}))),null===(n=A.current)||void 0===n||n.setSelectionRange(R[a].start,R[a].end+1)}))}),[R]),_=d((()=>{P(),null==v||v()}),[P,v]),G=d((()=>{T((e=>Object.assign(Object.assign({},e),{current:0}))),B(null),null==x||x()}),[x]),Y=d(((e,t,n)=>{const r=UD(e,t,n,L);return r?r.newTime:null}),[L]),F=d((t=>{const n=sE(t.code),r=n?cE(t.code):null;if(!lE.includes(t.key)&&!n)return;if(t.key===iE.ArrowLeft||t.key===iE.ArrowRight){t.preventDefault();const e=((e,t,n)=>{if(t===iE.ArrowLeft){for(let t=e-1;t>=0;t--)if(n[t].editable)return t-e}else if(t===iE.ArrowRight)for(let t=e+1;t<n.length;t++)if(n[t].editable)return t-e;return 0})(z.current,t.key,R);T((t=>Object.assign(Object.assign({},t),{current:t.current+e}))),B(null)}if(t.key===iE.ArrowUp||t.key===iE.ArrowDown){t.preventDefault();const n=t.key===iE.ArrowUp?1:-1,r=e||js(),i=Y(r,z.current,n);if(i){const e=i.format(L);H(e),N(eE(e)),u&&u(i)}}const i=n?r:t.key;if((aE.includes(t.key)||n)&&i){t.preventDefault();const n=((e,t,n,r)=>{const i=t.map((e=>Object.assign({},e)));let o=!1,a=null;if(r!==n){i[n].value=e.padStart(t[n].value.length,"0");const r=parseInt(e);(0===n?r<=2:r<=5)?a=n:(a=null,o=!0)}else{const r=(t[n].value.slice(1)+e).slice(-t[n].value.length);i[n].value=r,a=null,o=!0}return{newSections:i,shouldMoveToNextSection:o,newLastEditedSection:a}})(i,R,z.current,Z),r=tE(n.newSections),o=e||js(),a=r,l=js(`${o.format("YYYY-MM-DD")} ${a}`),s=l.format(L);if($((()=>{H(s),N(eE(s))})),l.isValid()&&u){const e=o.hour(l.hour()).minute(l.minute()).second(0).millisecond(0);u(e)}if(B(n.newLastEditedSection),n.shouldMoveToNextSection)for(let e=z.current+1;e<R.length;e++)if(R[e].editable){T((t=>Object.assign(Object.assign({},t),{current:e})));break}}if(t.key===iE.Backspace){t.preventDefault();const e=((e,t)=>{const n=e.map((e=>Object.assign({},e)));return n[t].value="0".padStart(e[t].value.length,"0"),n})(R,z.current);N(e),B(null);const n=tE(e);H(n)}}),[R,z,Z,L,u,e,Y]),j=d((()=>{P()}),[P]),W=d((t=>{const[n,r]=t.split(":").map(Number),i=(e||js()).hour(n).minute(r).second(0).millisecond(0);u&&u(i),M(!1)}),[e,u]),X=d((t=>{t.preventDefault();const n=t.clipboardData.getData("text").trim(),[r,i]=n.split(":"),o=parseInt(r,10),a=parseInt(i,10);if(!(!isNaN(o)&&!isNaN(a)&&o>=0&&o<=23&&a>=0&&a<=59))return;const l=e||js(),s=js(`${l.format("YYYY-MM-DD")} ${n}`);if(s.isValid()){const e=l.hour(s.hour()).minute(s.minute()).second(0).millisecond(0),t=e.format(L);H(t),N(eE(t)),u&&u(e)}}),[e,L,u]);return a((()=>{var e;R[z.current]&&(null===(e=A.current)||void 0===e||e.setSelectionRange(R[z.current].start,R[z.current].end+1))}),[z,R]),a((()=>{if(k&&e){const t=e.format(L);requestAnimationFrame((()=>{const e=document.querySelector(`[data-timefield-item="${CSS.escape(D)}-${t}"]`);e&&"function"==typeof e.scrollIntoView&&e.scrollIntoView({block:"center"})}))}}),[k,e,D,L]),t.createElement(t.Fragment,null,t.createElement(Cs,{ref:A,readOnly:!0,multiline:!1,error:n||!!s,disabled:c,width:f,size:h,variant:g,value:V,append:t.createElement(XD,{disabled:c,"aria-label":"時刻を選択",role:"button",tabIndex:c?-1:0,onClick:e=>{e.stopPropagation(),e.preventDefault(),c||M(!k)}},t.createElement(ee,{name:"arrow_down",color:c?I.palette.text.disabled:I.palette.black})),onFocus:_,onBlur:G,onKeyDown:F,onMouseDown:j,onPaste:X}),t.createElement(Ts,null,t.createElement(zs,{open:k,trigger:{x:null!==(w=null===(y=A.current)||void 0===y?void 0:y.getBoundingClientRect().left)&&void 0!==w?w:0,y:(null!==(E=null===(C=A.current)||void 0===C?void 0:C.getBoundingClientRect().bottom)&&void 0!==E?E:0)+5},placement:"bottom-start",width:120,maxHeight:b,onOpenChange:M},S.length>0?S.map((n=>{const r=(null==e?void 0:e.format(L))===n;return t.createElement(po,{key:n,"data-timefield-item":`${D}-${n}`,checked:r,onChange:e=>{e&&W(n)}},n)})):t.createElement(ft,{disabled:!0},"選択可能な時刻がありません"))),s&&t.createElement(t.Fragment,null,t.createElement(Ks,{py:1}),t.createElement(ip,null,s)))}));var KD=p((({time:e,name:n,error:s=!1,errorText:c,disabled:u=!1,onTimeChange:p,dropdownInterval:m=60,filterTimeOptions:h,size:g="medium",variant:f="light",width:b="120px",maxHeight:v=300,onFocus:x,onBlur:y})=>{var w,C,E,I;const k=J(),[M,A]=i(!1),$=o(null),D=r(),L="HH:mm",O=ws(),S=e||js(),V=l((()=>{const e=JD(m);return h&&h.length>0?e.filter((e=>h.every((t=>t(e))))):e}),[m,h]),{value:H,sections:R,focusedIndex:N,isFocused:z,getSegmentProps:T,groupProps:Z}=(({time:e,disabled:t=!1,onTimeChange:n})=>{const r="HH:mm",l=e||js(),[s,c]=i(l.format(r)),u=o(s),[p,m]=i(eE(s)),[h,g]=i(null),f=o(null),b=o(0),[v,x]=i(!1),y=o([]),w=o(null),C=d((e=>{f.current=e,g(e)}),[]),E=d((e=>{C(e),b.current=0;const t=y.current[e];t&&t!==document.activeElement&&t.focus()}),[C]);a((()=>{const t=(e||js()).format(r);c(t),u.current=t,m(eE(t))}),[e]);const I=d(((e,t)=>{for(let n=e+t;n>=0&&n<p.length;n+=t)if(p[n].editable)return n;return null}),[p]),k=d((t=>{const i=f.current;if(null===i)return;const o=p[i];if(!(null==o?void 0:o.editable))return;const a=b.current;let l=o.value;0===a&&(l="".padStart(o.value.length,"0"));const s=`${l.slice(1)}${t}`,d=[...p];d[i]=Object.assign(Object.assign({},d[i]),{value:s}),m(d);const h=a+1;b.current=h;const g=0===i,v=parseInt(t);let x=!1;x=0===a?!(g?v<=2:v<=5):h>=o.value.length;const y=tE(d),w=e||js(),C=js(`${w.format("YYYY-MM-DD")} ${y}`),k=C.format(r);if(c(k),u.current=k,m(eE(k)),x){b.current=0;const e=I(i,1);null!==e&&E(e)}if(C.isValid()&&n){const e=w.hour(C.hour()).minute(C.minute()).second(0).millisecond(0);n(e)}}),[p,e,n,I,E]),M=d((e=>t=>{y.current[e]=t}),[]),A=d((e=>()=>{x(!0),C(e),b.current=0}),[C]),$=d((e=>t=>{const n=t.relatedTarget;w.current&&n&&w.current.contains(n)||f.current===e&&(x(!1),C(null),b.current=0)}),[C]),D=d((t=>i=>{const o=p[t];if((null==o?void 0:o.editable)&&!(i.ctrlKey||i.metaKey||i.altKey))if(i.key!==iE.ArrowUp&&i.key!==iE.ArrowDown){if(i.key===iE.Backspace||i.key===iE.Delete){i.preventDefault(),i.stopPropagation();const e=i.key===iE.Backspace,n="0".repeat(o.value.length);if(o.value===n&&0===b.current){if(e){const e=I(t,-1);null!==e&&E(e)}return}const r=[...p];r[t]=Object.assign(Object.assign({},r[t]),{value:n}),m(r),b.current=0;const a=tE(r);return c(a),void(u.current=a)}if(sE(i.code)){i.preventDefault();const e=cE(i.code);e&&k(e)}}else{i.preventDefault();const o=i.key===iE.ArrowUp?1:-1,a=e||js(),[l,s]=u.current.split(":").map(Number),d=a.hour(l).minute(s).second(0).millisecond(0),p=UD(d,t,o,r);p&&(c(p.normalizedValue),u.current=p.normalizedValue,m(eE(p.normalizedValue)),null==n||n(p.newTime))}}),[p,e,r,n,k,I,E]),L=d((e=>e=>{const t=e.nativeEvent;if(e.preventDefault(),"deleteContentBackward"!==t.inputType&&"deleteContentForward"!==t.inputType&&null!=t.data){const e=t.data;/^\d$/.test(e)&&k(e)}}),[k]),O=d((e=>{const n=p[e];if(t||!(null==n?void 0:n.editable))return{ref:M(e),"aria-hidden":!0};const r=["時","分"][p.slice(0,e+1).filter((e=>e.editable)).length-1];return{ref:M(e),role:"spinbutton",contentEditable:!0,suppressContentEditableWarning:!0,inputMode:"numeric",tabIndex:0,enterKeyHint:"next",spellCheck:!1,autoCorrect:"off",style:{caretColor:"transparent"},"aria-label":r,onFocus:A(e),onBlur:$(e),onKeyDown:D(e),onBeforeInput:L(e),onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}}}),[p,t,M,A,$,D,L]),S=d((e=>{const t=f.current;if(null!==t)if(e.key!==iE.ArrowLeft&&e.key!==iE.ArrowRight){if(e.key===iE.Tab){const n=e.shiftKey?-1:1,r=I(t,n);null!==r&&(e.preventDefault(),E(r))}}else{e.preventDefault();const n=e.key===iE.ArrowLeft?-1:1,r=I(t,n);null!==r&&E(r)}}),[I,E]),V=d((t=>{t.preventDefault();const i=t.clipboardData.getData("text").trim(),[o,a]=i.split(":"),l=parseInt(o,10),s=parseInt(a,10);if(isNaN(l)||isNaN(s)||l<0||l>23||s<0||s>59)return;const d=(e||js()).hour(l).minute(s).second(0).millisecond(0),p=d.format(r);c(p),u.current=p,m(eE(p)),null==n||n(d)}),[e,r,n]);return{value:s,sections:p,focusedIndex:h,isFocused:v,getSegmentProps:O,groupProps:{ref:w,onKeyDown:S,onPaste:V}}})({time:S,disabled:u,onTimeChange:p}),B=d((()=>{null==x||x()}),[x]),P=d((e=>{const t=e.relatedTarget;$.current&&t&&$.current.contains(t)||null==y||y()}),[y]),_=d((t=>{const[n,r]=t.split(":").map(Number),i=(e||js()).hour(n).minute(r).second(0).millisecond(0);null==p||p(i),A(!1)}),[e,p]),G=d((e=>{e.stopPropagation(),e.preventDefault(),u||A(!M)}),[u,M]),Y=d((e=>t=>{t&&_(e)}),[_]);return a((()=>{if(M&&e){const t=e.format(L);requestAnimationFrame((()=>{const e=document.querySelector(`[data-timefield-item="${CSS.escape(D)}-${t}"]`);e&&"function"==typeof e.scrollIntoView&&e.scrollIntoView({block:"center"})}))}}),[M,e,D,L]),t.createElement(t.Fragment,null,t.createElement(SE,{ref:$,$disabled:u,$error:s||!!c,$focused:z,$isIOS:O,$size:g,$variant:f,$width:b,onBlurCapture:P,onFocusCapture:B},t.createElement(VE,Object.assign({},Z),R.map(((e,n)=>t.createElement(HE,Object.assign({key:`${e.start}-${e.end}`,$editable:e.editable,$focused:z&&N===n},T(n)),e.value)))),t.createElement(RE,null,t.createElement(XD,{disabled:u,"aria-label":"時刻を選択",role:"button",tabIndex:u?-1:0,onClick:G},t.createElement(ee,{color:u?k.palette.text.disabled:k.palette.black,name:"arrow_down"})))),t.createElement("input",{type:"hidden",name:n,value:H,disabled:u}),t.createElement(Ts,null,t.createElement(zs,{maxHeight:v,open:M,placement:"bottom-start",trigger:{x:null!==(C=null===(w=$.current)||void 0===w?void 0:w.getBoundingClientRect().left)&&void 0!==C?C:0,y:(null!==(I=null===(E=$.current)||void 0===E?void 0:E.getBoundingClientRect().bottom)&&void 0!==I?I:0)+5},width:120,onOpenChange:A},V.length>0?V.map((n=>{const r=(null==e?void 0:e.format(L))===n;return t.createElement(po,{key:n,checked:r,"data-timefield-item":`${D}-${n}`,onChange:Y(n)},n)})):t.createElement(ft,{disabled:!0},"選択可能な時刻がありません"))),c&&t.createElement(t.Fragment,null,t.createElement(Ks,{py:1}),t.createElement(ip,null,c)))}));const qD=x.div`
|
|
5139
|
+
`,KD=(e=15)=>{const t=[];for(let n=0;n<24;n++)for(let r=0;r<60;r+=e){const e=js().hour(n).minute(r).format("HH:mm");t.push(e)}return t},qD=(e,t,n,r)=>{let i;if(0===t)i=e.add(n,"hour").second(0).millisecond(0);else{if(2!==t)return null;i=e.add(n,"minute").second(0).millisecond(0)}const o=i.format(r);return{newTime:i,normalizedValue:o}};var eL=p((({time:e,error:n=!1,errorText:s,disabled:c=!1,onTimeChange:u,dropdownInterval:p=60,filterTimeOptions:m,size:h="medium",variant:g="light",width:f="120px",maxHeight:b=300,onFocus:v,onBlur:x})=>{var y,w,C,E;we("TimeField","TimeField は非推奨です。代わりに TimeField2 を使用してください。");const I=J(),[k,M]=i(!1),A=o(null),D=r(),L="HH:mm",O=e||js(),S=l((()=>{const e=KD(p);return m&&m.length>0?e.filter((e=>m.every((t=>t(e))))):e}),[p,m]),[V,H]=i(O.format(L)),[R,N]=i(eE(V)),[z,T]=i({start:0,end:R.length-1,current:0}),[Z,B]=i(null);a((()=>{const e=O.format(L);H(e),N(eE(e))}),[O,L]);const P=d((()=>{setTimeout((()=>{var e,t,n;const r=null!==(t=null===(e=A.current)||void 0===e?void 0:e.selectionStart)&&void 0!==t?t:0,i=R[R.length-1].end+1,o=r>=i?i:r,a=R.findIndex((e=>o>=e.start&&o<=e.end+1));T((e=>R[a].editable?e.current===a?e:Object.assign(Object.assign({},e),{current:a}):Object.assign(Object.assign({},e),{current:a+1}))),null===(n=A.current)||void 0===n||n.setSelectionRange(R[a].start,R[a].end+1)}))}),[R]),_=d((()=>{P(),null==v||v()}),[P,v]),G=d((()=>{T((e=>Object.assign(Object.assign({},e),{current:0}))),B(null),null==x||x()}),[x]),Y=d(((e,t,n)=>{const r=qD(e,t,n,L);return r?r.newTime:null}),[L]),F=d((t=>{const n=sE(t.code),r=n?cE(t.code):null;if(!lE.includes(t.key)&&!n)return;if(t.key===iE.ArrowLeft||t.key===iE.ArrowRight){t.preventDefault();const e=((e,t,n)=>{if(t===iE.ArrowLeft){for(let t=e-1;t>=0;t--)if(n[t].editable)return t-e}else if(t===iE.ArrowRight)for(let t=e+1;t<n.length;t++)if(n[t].editable)return t-e;return 0})(z.current,t.key,R);T((t=>Object.assign(Object.assign({},t),{current:t.current+e}))),B(null)}if(t.key===iE.ArrowUp||t.key===iE.ArrowDown){t.preventDefault();const n=t.key===iE.ArrowUp?1:-1,r=e||js(),i=Y(r,z.current,n);if(i){const e=i.format(L);H(e),N(eE(e)),u&&u(i)}}const i=n?r:t.key;if((aE.includes(t.key)||n)&&i){t.preventDefault();const n=((e,t,n,r)=>{const i=t.map((e=>Object.assign({},e)));let o=!1,a=null;if(r!==n){i[n].value=e.padStart(t[n].value.length,"0");const r=parseInt(e);(0===n?r<=2:r<=5)?a=n:(a=null,o=!0)}else{const r=(t[n].value.slice(1)+e).slice(-t[n].value.length);i[n].value=r,a=null,o=!0}return{newSections:i,shouldMoveToNextSection:o,newLastEditedSection:a}})(i,R,z.current,Z),r=tE(n.newSections),o=e||js(),a=r,l=js(`${o.format("YYYY-MM-DD")} ${a}`),s=l.format(L);if($((()=>{H(s),N(eE(s))})),l.isValid()&&u){const e=o.hour(l.hour()).minute(l.minute()).second(0).millisecond(0);u(e)}if(B(n.newLastEditedSection),n.shouldMoveToNextSection)for(let e=z.current+1;e<R.length;e++)if(R[e].editable){T((t=>Object.assign(Object.assign({},t),{current:e})));break}}if(t.key===iE.Backspace){t.preventDefault();const e=((e,t)=>{const n=e.map((e=>Object.assign({},e)));return n[t].value="0".padStart(e[t].value.length,"0"),n})(R,z.current);N(e),B(null);const n=tE(e);H(n)}}),[R,z,Z,L,u,e,Y]),j=d((()=>{P()}),[P]),W=d((t=>{const[n,r]=t.split(":").map(Number),i=(e||js()).hour(n).minute(r).second(0).millisecond(0);u&&u(i),M(!1)}),[e,u]),X=d((t=>{t.preventDefault();const n=t.clipboardData.getData("text").trim(),[r,i]=n.split(":"),o=parseInt(r,10),a=parseInt(i,10);if(!(!isNaN(o)&&!isNaN(a)&&o>=0&&o<=23&&a>=0&&a<=59))return;const l=e||js(),s=js(`${l.format("YYYY-MM-DD")} ${n}`);if(s.isValid()){const e=l.hour(s.hour()).minute(s.minute()).second(0).millisecond(0),t=e.format(L);H(t),N(eE(t)),u&&u(e)}}),[e,L,u]);return a((()=>{var e;R[z.current]&&(null===(e=A.current)||void 0===e||e.setSelectionRange(R[z.current].start,R[z.current].end+1))}),[z,R]),a((()=>{if(k&&e){const t=e.format(L);requestAnimationFrame((()=>{const e=document.querySelector(`[data-timefield-item="${CSS.escape(D)}-${t}"]`);e&&"function"==typeof e.scrollIntoView&&e.scrollIntoView({block:"center"})}))}}),[k,e,D,L]),t.createElement(t.Fragment,null,t.createElement(Cs,{ref:A,readOnly:!0,multiline:!1,error:n||!!s,disabled:c,width:f,size:h,variant:g,value:V,append:t.createElement(QD,{disabled:c,"aria-label":"時刻を選択",role:"button",tabIndex:c?-1:0,onClick:e=>{e.stopPropagation(),e.preventDefault(),c||M(!k)}},t.createElement(ee,{name:"arrow_down",color:c?I.palette.text.disabled:I.palette.black})),onFocus:_,onBlur:G,onKeyDown:F,onMouseDown:j,onPaste:X}),t.createElement(Ts,null,t.createElement(zs,{open:k,trigger:{x:null!==(w=null===(y=A.current)||void 0===y?void 0:y.getBoundingClientRect().left)&&void 0!==w?w:0,y:(null!==(E=null===(C=A.current)||void 0===C?void 0:C.getBoundingClientRect().bottom)&&void 0!==E?E:0)+5},placement:"bottom-start",width:120,maxHeight:b,onOpenChange:M},S.length>0?S.map((n=>{const r=(null==e?void 0:e.format(L))===n;return t.createElement(po,{key:n,"data-timefield-item":`${D}-${n}`,checked:r,onChange:e=>{e&&W(n)}},n)})):t.createElement(ft,{disabled:!0},"選択可能な時刻がありません"))),s&&t.createElement(t.Fragment,null,t.createElement(Ks,{py:1}),t.createElement(ip,null,s)))}));var tL=p((({time:e,name:n,error:s=!1,errorText:c,disabled:u=!1,onTimeChange:p,dropdownInterval:m=60,filterTimeOptions:h,size:g="medium",variant:f="light",width:b="120px",maxHeight:v=300,onFocus:x,onBlur:y})=>{var w,C,E,I;const k=J(),[M,A]=i(!1),$=o(null),D=r(),L="HH:mm",O=ws(),S=e||js(),V=l((()=>{const e=KD(m);return h&&h.length>0?e.filter((e=>h.every((t=>t(e))))):e}),[m,h]),{value:H,sections:R,focusedIndex:N,isFocused:z,getSegmentProps:T,groupProps:Z}=(({time:e,disabled:t=!1,onTimeChange:n})=>{const r="HH:mm",l=e||js(),[s,c]=i(l.format(r)),u=o(s),[p,m]=i(eE(s)),[h,g]=i(null),f=o(null),b=o(0),[v,x]=i(!1),y=o([]),w=o(null),C=d((e=>{f.current=e,g(e)}),[]),E=d((e=>{C(e),b.current=0;const t=y.current[e];t&&t!==document.activeElement&&t.focus()}),[C]);a((()=>{const t=(e||js()).format(r);c(t),u.current=t,m(eE(t))}),[e]);const I=d(((e,t)=>{for(let n=e+t;n>=0&&n<p.length;n+=t)if(p[n].editable)return n;return null}),[p]),k=d((t=>{const i=f.current;if(null===i)return;const o=p[i];if(!(null==o?void 0:o.editable))return;const a=b.current;let l=o.value;0===a&&(l="".padStart(o.value.length,"0"));const s=`${l.slice(1)}${t}`,d=[...p];d[i]=Object.assign(Object.assign({},d[i]),{value:s}),m(d);const h=a+1;b.current=h;const g=0===i,v=parseInt(t);let x=!1;x=0===a?!(g?v<=2:v<=5):h>=o.value.length;const y=tE(d),w=e||js(),C=js(`${w.format("YYYY-MM-DD")} ${y}`),k=C.format(r);if(c(k),u.current=k,m(eE(k)),x){b.current=0;const e=I(i,1);null!==e&&E(e)}if(C.isValid()&&n){const e=w.hour(C.hour()).minute(C.minute()).second(0).millisecond(0);n(e)}}),[p,e,n,I,E]),M=d((e=>t=>{y.current[e]=t}),[]),A=d((e=>()=>{x(!0),C(e),b.current=0}),[C]),$=d((e=>t=>{const n=t.relatedTarget;w.current&&n&&w.current.contains(n)||f.current===e&&(x(!1),C(null),b.current=0)}),[C]),D=d((t=>i=>{const o=p[t];if((null==o?void 0:o.editable)&&!(i.ctrlKey||i.metaKey||i.altKey))if(i.key!==iE.ArrowUp&&i.key!==iE.ArrowDown){if(i.key===iE.Backspace||i.key===iE.Delete){i.preventDefault(),i.stopPropagation();const e=i.key===iE.Backspace,n="0".repeat(o.value.length);if(o.value===n&&0===b.current){if(e){const e=I(t,-1);null!==e&&E(e)}return}const r=[...p];r[t]=Object.assign(Object.assign({},r[t]),{value:n}),m(r),b.current=0;const a=tE(r);return c(a),void(u.current=a)}if(sE(i.code)){i.preventDefault();const e=cE(i.code);e&&k(e)}}else{i.preventDefault();const o=i.key===iE.ArrowUp?1:-1,a=e||js(),[l,s]=u.current.split(":").map(Number),d=a.hour(l).minute(s).second(0).millisecond(0),p=qD(d,t,o,r);p&&(c(p.normalizedValue),u.current=p.normalizedValue,m(eE(p.normalizedValue)),null==n||n(p.newTime))}}),[p,e,r,n,k,I,E]),L=d((e=>e=>{const t=e.nativeEvent;if(e.preventDefault(),"deleteContentBackward"!==t.inputType&&"deleteContentForward"!==t.inputType&&null!=t.data){const e=t.data;/^\d$/.test(e)&&k(e)}}),[k]),O=d((e=>{const n=p[e];if(t||!(null==n?void 0:n.editable))return{ref:M(e),"aria-hidden":!0};const r=["時","分"][p.slice(0,e+1).filter((e=>e.editable)).length-1];return{ref:M(e),role:"spinbutton",contentEditable:!0,suppressContentEditableWarning:!0,inputMode:"numeric",tabIndex:0,enterKeyHint:"next",spellCheck:!1,autoCorrect:"off",style:{caretColor:"transparent"},"aria-label":r,onFocus:A(e),onBlur:$(e),onKeyDown:D(e),onBeforeInput:L(e),onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}}}),[p,t,M,A,$,D,L]),S=d((e=>{const t=f.current;if(null!==t)if(e.key!==iE.ArrowLeft&&e.key!==iE.ArrowRight){if(e.key===iE.Tab){const n=e.shiftKey?-1:1,r=I(t,n);null!==r&&(e.preventDefault(),E(r))}}else{e.preventDefault();const n=e.key===iE.ArrowLeft?-1:1,r=I(t,n);null!==r&&E(r)}}),[I,E]),V=d((t=>{t.preventDefault();const i=t.clipboardData.getData("text").trim(),[o,a]=i.split(":"),l=parseInt(o,10),s=parseInt(a,10);if(isNaN(l)||isNaN(s)||l<0||l>23||s<0||s>59)return;const d=(e||js()).hour(l).minute(s).second(0).millisecond(0),p=d.format(r);c(p),u.current=p,m(eE(p)),null==n||n(d)}),[e,r,n]);return{value:s,sections:p,focusedIndex:h,isFocused:v,getSegmentProps:O,groupProps:{ref:w,onKeyDown:S,onPaste:V}}})({time:S,disabled:u,onTimeChange:p}),B=d((()=>{null==x||x()}),[x]),P=d((e=>{const t=e.relatedTarget;$.current&&t&&$.current.contains(t)||null==y||y()}),[y]),_=d((t=>{const[n,r]=t.split(":").map(Number),i=(e||js()).hour(n).minute(r).second(0).millisecond(0);null==p||p(i),A(!1)}),[e,p]),G=d((e=>{e.stopPropagation(),e.preventDefault(),u||A(!M)}),[u,M]),Y=d((e=>t=>{t&&_(e)}),[_]);return a((()=>{if(M&&e){const t=e.format(L);requestAnimationFrame((()=>{const e=document.querySelector(`[data-timefield-item="${CSS.escape(D)}-${t}"]`);e&&"function"==typeof e.scrollIntoView&&e.scrollIntoView({block:"center"})}))}}),[M,e,D,L]),t.createElement(t.Fragment,null,t.createElement(SE,{ref:$,$disabled:u,$error:s||!!c,$focused:z,$isIOS:O,$size:g,$variant:f,$width:b,onBlurCapture:P,onFocusCapture:B},t.createElement(VE,Object.assign({},Z),R.map(((e,n)=>t.createElement(HE,Object.assign({key:`${e.start}-${e.end}`,$editable:e.editable,$focused:z&&N===n},T(n)),e.value)))),t.createElement(RE,null,t.createElement(QD,{disabled:u,"aria-label":"時刻を選択",role:"button",tabIndex:u?-1:0,onClick:G},t.createElement(ee,{color:u?k.palette.text.disabled:k.palette.black,name:"arrow_down"})))),t.createElement("input",{type:"hidden",name:n,value:H,disabled:u}),t.createElement(Ts,null,t.createElement(zs,{maxHeight:v,open:M,placement:"bottom-start",trigger:{x:null!==(C=null===(w=$.current)||void 0===w?void 0:w.getBoundingClientRect().left)&&void 0!==C?C:0,y:(null!==(I=null===(E=$.current)||void 0===E?void 0:E.getBoundingClientRect().bottom)&&void 0!==I?I:0)+5},width:120,onOpenChange:A},V.length>0?V.map((n=>{const r=(null==e?void 0:e.format(L))===n;return t.createElement(po,{key:n,checked:r,"data-timefield-item":`${D}-${n}`,onChange:Y(n)},n)})):t.createElement(ft,{disabled:!0},"選択可能な時刻がありません"))),c&&t.createElement(t.Fragment,null,t.createElement(Ks,{py:1}),t.createElement(ip,null,c)))}));const nL=x.div`
|
|
5140
5140
|
padding: ${({theme:e})=>2*e.spacing}px;
|
|
5141
5141
|
transition: height ${({transitionDuration:e})=>e-100}ms
|
|
5142
5142
|
100ms;
|
|
5143
|
-
`,
|
|
5143
|
+
`,rL=x.div`
|
|
5144
5144
|
position: relative;
|
|
5145
5145
|
display: flex;
|
|
5146
5146
|
align-items: center;
|
|
@@ -5157,7 +5157,7 @@ object-assign
|
|
|
5157
5157
|
opacity: ${({opacity:e})=>e};
|
|
5158
5158
|
border-radius: ${({theme:e})=>e.radius}px;
|
|
5159
5159
|
overflow: hidden;
|
|
5160
|
-
`,
|
|
5160
|
+
`,iL=x.div`
|
|
5161
5161
|
flex-shrink: 0;
|
|
5162
5162
|
display: flex;
|
|
5163
5163
|
align-items: center;
|
|
@@ -5165,18 +5165,18 @@ object-assign
|
|
|
5165
5165
|
width: 28px;
|
|
5166
5166
|
height: 28px;
|
|
5167
5167
|
margin-right: ${({theme:e})=>2*e.spacing}px;
|
|
5168
|
-
`,
|
|
5168
|
+
`,oL=x.div`
|
|
5169
5169
|
cursor: pointer;
|
|
5170
5170
|
margin-left: ${({theme:e})=>2*e.spacing}px;
|
|
5171
|
-
`,
|
|
5171
|
+
`,aL=C`
|
|
5172
5172
|
from {
|
|
5173
5173
|
width: 100%;
|
|
5174
5174
|
}
|
|
5175
5175
|
to {
|
|
5176
5176
|
width: 0%
|
|
5177
5177
|
}
|
|
5178
|
-
`,
|
|
5179
|
-
animation: ${
|
|
5178
|
+
`,lL=x.div`
|
|
5179
|
+
animation: ${aL}
|
|
5180
5180
|
${({autoDismissTimeout:e})=>e}ms linear;
|
|
5181
5181
|
background-color: ${({backgroundColor:e})=>e};
|
|
5182
5182
|
top: 0;
|
|
@@ -5185,7 +5185,7 @@ object-assign
|
|
|
5185
5185
|
position: absolute;
|
|
5186
5186
|
width: 0;
|
|
5187
5187
|
height: 3px;
|
|
5188
|
-
`,
|
|
5188
|
+
`,sL={right:"translate3d(120%, 0, 0)",left:"translate3d(-120%, 0, 0)",bottom:"translate3d(0, 120%, 0)",top:"translate3d(0, -120%, 0)"};function cL(e){const t=e.split("-"),n="center"===t[1]?t[0]:t[1];return sL[n]}const dL=({appearance:t,placement:n,transitionDuration:r,transitionState:i,onDismiss:o,children:a,autoDismiss:l,autoDismissTimeout:s,isRunning:c})=>{const d=J(),u=(({palette:t})=>({info:{background:t.primary.highlight,boxShadow:ho(5,t.action.shadowOpacity,t.primary.softLight),icon:e.createElement(ee,{name:"information",type:"fill",size:"lg",color:t.primary.base}),countDownBackground:t.primary.base,titleColor:t.primary.darker,contentColor:t.primary.base,closeColor:t.primary.softLight},success:{background:t.success.highlight,boxShadow:ho(5,t.action.shadowOpacity,t.success.lighter),icon:e.createElement(ee,{name:"checkbox_circle",type:"fill",size:"lg",color:t.success.base}),countDownBackground:t.success.base,titleColor:t.success.darker,contentColor:t.success.base,closeColor:t.success.lighter},warning:{background:t.warning.highlight,boxShadow:ho(5,t.action.shadowOpacity,t.warning.light),icon:e.createElement(ee,{name:"alert",type:"fill",size:"lg",color:t.warning.base}),countDownBackground:t.warning.base,titleColor:t.warning.ultraDark,contentColor:t.warning.base,closeColor:t.warning.light},error:{background:t.danger.highlight,boxShadow:ho(5,t.action.shadowOpacity,t.danger.lighter),icon:e.createElement(ee,{name:"alert",type:"fill",size:"lg",color:t.danger.base}),countDownBackground:t.danger.base,titleColor:t.danger.darker,contentColor:t.danger.base,closeColor:t.danger.lighter}}))(d)[t],[p,m]=e.useState("auto"),h=e.useRef(null);return e.useEffect((()=>{if("entered"===i){const e=h.current;e&&m(e.offsetHeight+d.spacing)}"exiting"===i&&m(0)}),[i,d.spacing]),e.createElement(nL,{ref:h,style:{height:p},transitionDuration:r},e.createElement(rL,Object.assign({background:u.background,boxShadow:u.boxShadow,transitionDuration:r,role:"error"===t||"warning"===t?"alert":"status"},(e=>({entering:{transform:`${cL(e)}`,opacity:0},entered:{transform:"translate3d(0,0,0)",opacity:1},exiting:{transform:"scale(0.66)",opacity:0},exited:{transform:"scale(0.66)",opacity:0}}))(n)[i]),e.createElement(re,{display:"flex",flex:1,alignItems:"center",justifyContent:"space-between"},e.createElement(re,{display:"flex",alignItems:"center"},e.createElement(iL,null,u.icon),e.createElement(ve,{color:u.titleColor,weight:"bold"},a)),e.createElement(oL,{onClick:()=>{o()}},e.createElement(ee,{name:"close",color:u.closeColor}))),e.createElement(lL,{opacity:l?1:0,autoDismissTimeout:s,isRunning:c,backgroundColor:u.countDownBackground})))},uL=x.div`
|
|
5189
5189
|
border: 0;
|
|
5190
5190
|
clip: rect(1px, 1px, 1px, 1px);
|
|
5191
5191
|
height: 1;
|
|
@@ -5194,7 +5194,7 @@ object-assign
|
|
|
5194
5194
|
position: absolute;
|
|
5195
5195
|
white-space: nowrap;
|
|
5196
5196
|
width: 1;
|
|
5197
|
-
`,
|
|
5197
|
+
`,pL=x.div`
|
|
5198
5198
|
cursor: pointer;
|
|
5199
5199
|
flex-shrink: 0;
|
|
5200
5200
|
opacity: 0.5;
|
|
@@ -5203,14 +5203,14 @@ object-assign
|
|
|
5203
5203
|
&:hover {
|
|
5204
5204
|
opacity: 1;
|
|
5205
5205
|
}
|
|
5206
|
-
`,
|
|
5206
|
+
`,mL=x.div`
|
|
5207
5207
|
flex-grow: 1;
|
|
5208
5208
|
font-size: 14;
|
|
5209
5209
|
line-height: 1.4;
|
|
5210
5210
|
min-height: 40px;
|
|
5211
5211
|
padding: ${({gutter:e})=>`${e}px ${1.5*e}px`};
|
|
5212
|
-
`,
|
|
5213
|
-
animation: ${({autoDismissTimeout:e})=>`${
|
|
5212
|
+
`,hL=C`from { height: 100%; } to { height: 0% }`,gL=x.div`
|
|
5213
|
+
animation: ${({autoDismissTimeout:e})=>`${hL} ${e}ms linear`};
|
|
5214
5214
|
animation-play-state: ${({isRunning:e})=>e?"running":"paused"};
|
|
5215
5215
|
background-color: rgba(0, 0, 0, 0.1);
|
|
5216
5216
|
bottom: 0;
|
|
@@ -5219,7 +5219,7 @@ object-assign
|
|
|
5219
5219
|
opacity: ${({opacity:e})=>e};
|
|
5220
5220
|
position: absolute;
|
|
5221
5221
|
width: 100%;
|
|
5222
|
-
`,
|
|
5222
|
+
`,fL=x.div`
|
|
5223
5223
|
background-color: ${({backgroundColor:e})=>e};
|
|
5224
5224
|
border-top-left-radius: ${({borderRadius:e})=>e}px;
|
|
5225
5225
|
border-bottom-left-radius: ${({borderRadius:e})=>e}px;
|
|
@@ -5231,11 +5231,11 @@ object-assign
|
|
|
5231
5231
|
overflow: hidden;
|
|
5232
5232
|
text-align: center;
|
|
5233
5233
|
width: 30px;
|
|
5234
|
-
`,
|
|
5234
|
+
`,bL=x.div`
|
|
5235
5235
|
height: ${({height:e})=>e};
|
|
5236
5236
|
transition: height
|
|
5237
5237
|
${({transitionDuration:e})=>`height ${e-100}ms 100ms`};
|
|
5238
|
-
`,
|
|
5238
|
+
`,vL=x.div`
|
|
5239
5239
|
background-color: ${({backgroundColor:e})=>e};
|
|
5240
5240
|
border-radius: ${({borderRadius:e})=>e}px;
|
|
5241
5241
|
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.175);
|
|
@@ -5246,7 +5246,7 @@ object-assign
|
|
|
5246
5246
|
transition: ${({transitionDuration:e})=>`transform ${e}ms cubic-bezier(0.2, 0, 0, 1), opacity ${e}ms`};
|
|
5247
5247
|
width: ${({width:e})=>e}px;
|
|
5248
5248
|
${({transitionState:e,placement:t})=>{switch(e){case"entered":return w({transform:"translate3d(0,0,0)"});case"exiting":case"exited":return w({transform:"scale(0.66)",opacity:0});case"entering":return w((e=>{const t=e.split("-");return{right:"translate3d(120%, 0, 0)",left:"translate3d(-120%, 0, 0)",bottom:"translate3d(0, 120%, 0)",top:"translate3d(0, -120%, 0)"}["center"===t[1]?t[0]:t[1]]})(t));default:return""}}}
|
|
5249
|
-
`;function
|
|
5249
|
+
`;function xL(e){return{"aria-hidden":!0,height:16,width:e,viewBox:`0 0 ${e} 16`,style:{display:"inline-block",verticalAlign:"text-top",fill:"currentColor"}}}const yL=e=>t.createElement("svg",Object.assign({},xL(14),e),t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})),wL=()=>{};const CL=e=>{var{tag:n="span"}=e,r=D(e,["tag"]);return t.createElement(uL,Object.assign({as:n},r))},EL={success:{icon:e=>t.createElement("svg",Object.assign({},xL(12),e),t.createElement("path",{fillRule:"evenodd",d:"M12 5.5l-8 8-4-4L1.5 8 4 10.5 10.5 4 12 5.5z"})),text:"#006644",fg:"#36B37E",bg:"#E3FCEF"},error:{icon:e=>t.createElement("svg",Object.assign({},xL(12),e),t.createElement("path",{fillRule:"evenodd",d:"M5.05.01c.81 2.17.41 3.38-.52 4.31C3.55 5.37 1.98 6.15.9 7.68c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.01 8.68 2.15 5.05.02L5.03 0l.02.01z"})),text:"#BF2600",fg:"#FF5630",bg:"#FFEBE6"},warning:{icon:e=>t.createElement("svg",Object.assign({},xL(16),e),t.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})),text:"#FF8B00",fg:"#FFAB00",bg:"#FFFAE6"},info:{icon:e=>t.createElement("svg",Object.assign({},xL(14),e),t.createElement("path",{fillRule:"evenodd",d:"M6.3 5.71a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 8.01c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V8v.01zM7 2.32C3.86 2.32 1.3 4.86 1.3 8c0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 1c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})),text:"#505F79",fg:"#2684FF",bg:"white"}},IL=e=>{var{children:n}=e,r=D(e,["children"]);return t.createElement(pL,Object.assign({role:"button",className:"react-toast-notifications__toast__dismiss-button",gutter:8},r),n)},kL=e=>t.createElement(mL,Object.assign({className:"react-toast-notifications__toast__content",gutter:8},e)),ML=e=>{var{autoDismissTimeout:n,opacity:r,isRunning:i}=e,o=D(e,["autoDismissTimeout","opacity","isRunning"]);return t.createElement(gL,Object.assign({className:"react-toast-notifications__toast__countdown",autoDismissTimeout:n,isRunning:i,opacity:r},o))},AL=({appearance:e,autoDismiss:n,autoDismissTimeout:r,isRunning:i})=>{const o=EL[e],a=o.icon;return t.createElement(fL,{className:"react-toast-notifications__toast__icon-wrapper",color:o.bg,backgroundColor:o.fg,borderRadius:4,gutter:8},t.createElement(ML,{opacity:n?1:0,autoDismissTimeout:r,isRunning:i}),t.createElement(a,{className:"react-toast-notifications__toast__icon",css:{position:"relative",zIndex:1}}))},$L=e=>{var{appearance:n,placement:r,transitionDuration:l,transitionState:s}=e,c=D(e,["appearance","placement","transitionDuration","transitionState"]);const[d,u]=i("auto"),p=o(null);return a((()=>{if(p.current){if("entered"===s){const e=p.current;u(e.offsetHeight+8)}"exiting"===s&&u(0)}}),[s]),t.createElement(bL,{ref:p,height:d,transitionDuration:l},t.createElement(vL,Object.assign({className:`react-toast-notifications__toast react-toast-notifications__toast--${n}`,backgroundColor:EL[n].bg,borderRadius:4,color:EL[n].text,gutter:8,placement:r,width:360,transitionState:s,transitionDuration:l},c)))},DL=e=>{var{appearance:n="info",autoDismiss:r,autoDismissTimeout:i,children:o,isRunning:a,onDismiss:l,placement:s,transitionDuration:c,transitionState:d,onMouseEnter:u,onMouseLeave:p}=e,m=D(e,["appearance","autoDismiss","autoDismissTimeout","children","isRunning","onDismiss","placement","transitionDuration","transitionState","onMouseEnter","onMouseLeave"]);return t.createElement($L,Object.assign({appearance:n,placement:s,transitionState:d,transitionDuration:c,onMouseEnter:u,onMouseLeave:p},m),t.createElement(AL,{appearance:n,autoDismiss:r,autoDismissTimeout:i,isRunning:a}),t.createElement(kL,null,o),l?t.createElement(IL,{onClick:l},t.createElement(yL,{className:"react-toast-notifications__toast__dismiss-icon"}),t.createElement(CL,{className:"react-toast-notifications__toast__dismiss-text"},"Close")):null)};DL.defaultProps={onDismiss:wL};const LL=x.div`
|
|
5250
5250
|
box-sizing: border-box;
|
|
5251
5251
|
max-height: 100%;
|
|
5252
5252
|
max-width: 100%;
|
|
@@ -5256,13 +5256,13 @@ object-assign
|
|
|
5256
5256
|
position: fixed;
|
|
5257
5257
|
z-index: 1000;
|
|
5258
5258
|
${({placement:e})=>{switch(e){case"top-left":return w({top:0,left:0});case"top-center":return w({top:0,left:"50%",transform:"translateX(-50%)"});case"top-right":return w({top:0,right:0});case"bottom-left":return w({bottom:0,left:0});case"bottom-center":return w({bottom:0,left:"50%",transform:"translateX(-50%)"});case"bottom-right":return w({bottom:0,right:0});default:return""}}}
|
|
5259
|
-
|
|
5259
|
+
`,OL=e=>{var{hasToasts:n,placement:r}=e,i=D(e,["hasToasts","placement"]);return t.createElement(LL,Object.assign({className:"react-toast-notifications__container",hasToasts:n,placement:r},i))};class SL{constructor(e,t){this.callback=e,this.start=t,this.remaining=t,this.resume()}clear(){clearTimeout(this.timerId)}pause(){clearTimeout(this.timerId),this.remaining-=Date.now()-this.start}resume(){this.start=Date.now(),clearTimeout(this.timerId),this.timerId=setTimeout(this.callback,this.remaining)}}class VL extends b{constructor(){super(...arguments),this.state={isRunning:Boolean(this.props.autoDismiss)},this.startTimer=()=>{const{autoDismiss:e,autoDismissTimeout:t,onDismiss:n}=this.props;e&&(this.setState({isRunning:!0}),this.timeout=new SL(n,t))},this.clearTimer=()=>{this.timeout&&this.timeout.clear()},this.onMouseEnter=()=>{this.setState({isRunning:!1},(()=>{this.timeout&&this.timeout.pause()}))},this.onMouseLeave=()=>{this.setState({isRunning:!0},(()=>{this.timeout&&this.timeout.resume()}))}}componentDidMount(){this.startTimer()}componentDidUpdate(e){if(e.autoDismiss!==this.props.autoDismiss){(this.props.autoDismiss?this.startTimer:this.clearTimer)()}}componentWillUnmount(){this.clearTimer()}render(){const e=this.props,{autoDismiss:n,autoDismissTimeout:r,component:i}=e,o=D(e,["autoDismiss","autoDismissTimeout","component"]),{isRunning:a}=this.state,l=n?this.onMouseEnter:wL,s=n?this.onMouseLeave:wL;return t.createElement(i,Object.assign({autoDismiss:n,autoDismissTimeout:r,isRunning:a,onMouseEnter:l,onMouseLeave:s},o))}}VL.defaultProps={autoDismiss:!1};const HL={Toast:DL,ToastContainer:OL},RL=t.createContext({add:()=>"0",remove:wL,removeAll:wL,update:wL,toasts:[]}),{Consumer:NL,Provider:zL}=RL,TL=!("undefined"==typeof window||!window.document||!window.document.createElement);let ZL=class extends b{constructor(e){super(e),this.state={toasts:[]},this.has=e=>!!this.state.toasts.length&&Boolean(this.state.toasts.filter((t=>t.id===e)).length),this.onDismiss=(e,t=wL)=>()=>{t(e),this.remove(e)},this.add=(e,t,n=wL)=>{const r=(null==t?void 0:t.id)?t.id:function(){let e=46656*Math.random()|0,t=46656*Math.random()|0;return e=("000"+e.toString(36)).slice(-3),t=("000"+t.toString(36)).slice(-3),e+t}();if(!this.has(r))return this.setState((n=>{const i=Object.assign({content:e,id:r},t);return{toasts:this.props.newestOnTop?[i,...n.toasts]:[...n.toasts,i]}}),(()=>n(r))),r},this.remove=(e,t=wL)=>{this.has(e)&&this.setState((t=>{const n=t.toasts.filter((t=>t.id!==e));return{toasts:n}}),(()=>t(e)))},this.removeAll=()=>{this.state.toasts.length&&this.state.toasts.forEach((e=>this.remove(e.id)))},this.update=(e,t,n=wL)=>{this.has(e)&&this.setState((n=>{const r=n.toasts,i=r.findIndex((t=>t.id===e)),o=Object.assign(Object.assign({},r[i]),t);return{toasts:[...r.slice(0,i),o,...r.slice(i+1)]}}),(()=>n(e)))},this.nodeRef=t.createRef()}render(){const{autoDismiss:e,autoDismissTimeout:n,children:r,components:i,placement:o,portalTargetSelector:a,transitionDuration:l}=this.props,{Toast:s,ToastContainer:c}=Object.assign(Object.assign({},HL),i),{add:d,remove:u,removeAll:p,update:m}=this,h=this.state.toasts,g=Boolean(h.length),f=TL?a?document.querySelector(a):document.body:null;return t.createElement(zL,{value:{add:d,remove:u,removeAll:p,update:m,toasts:h}},r,f?M(t.createElement(c,{placement:o,hasToasts:g},t.createElement(wu,{component:null},h.map((r=>{var{appearance:i,autoDismiss:a,content:c,id:d,onDismiss:u}=r,p=D(r,["appearance","autoDismiss","content","id","onDismiss"]);return t.createElement(cu,{key:d,appear:!0,mountOnEnter:!0,unmountOnExit:!0,nodeRef:this.nodeRef,timeout:l},(r=>t.createElement(VL,Object.assign({key:d,appearance:i,autoDismiss:void 0!==a?a:e,autoDismissTimeout:n,component:s,placement:o,transitionDuration:l,transitionState:r,onDismiss:this.onDismiss(d,u)},p),c)))})))),f):t.createElement(c,{placement:o,hasToasts:g}))}};ZL.defaultProps={autoDismiss:!1,autoDismissTimeout:5e3,components:HL,newestOnTop:!1,placement:"top-right",transitionDuration:220,nodeRef:null};const BL=x(OL)`
|
|
5260
5260
|
z-index: ${({theme:e})=>e.depth.toast} !important;
|
|
5261
|
-
`,
|
|
5261
|
+
`,PL=t=>{var{children:n}=t,r=D(t,["children"]);const i={pt:r.placement.includes("top")?3:0,pb:r.placement.includes("bottom")?3:0};return e.createElement(BL,Object.assign({},r),e.createElement(Ks,Object.assign({},i),n))},_L={appearance:"info",autoDismiss:!1,autoDismissTimeout:0,isRunning:!0,onDismiss:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},placement:"top-center",transitionDuration:0,transitionState:"entered",children:null},GL=e=>t.createElement(dL,Object.assign({},_L,e));GL.Provider=t=>{var{children:n}=t,r=D(t,["children"]);return e.createElement(ZL,Object.assign({},r,{components:Object.assign({Toast:dL,ToastContainer:PL},r.components)}),n)},GL.useToasts=()=>{const e=c(RL);if(!e)throw Error("The `useToasts` hook must be called from a descendent of the `ToastProvider`.");return{addToast:e.add,removeToast:e.remove,removeAllToasts:e.removeAll,updateToast:e.update,toastStack:e.toasts}};const YL=x.div`
|
|
5262
5262
|
position: relative;
|
|
5263
5263
|
width: 40px;
|
|
5264
5264
|
height: 22px;
|
|
5265
|
-
`,
|
|
5265
|
+
`,FL=x.span`
|
|
5266
5266
|
position: absolute;
|
|
5267
5267
|
top: 50%;
|
|
5268
5268
|
left: 3px;
|
|
@@ -5275,19 +5275,19 @@ object-assign
|
|
|
5275
5275
|
${({checked:e,disabled:t,theme:n})=>t&&e?mo(n.palette.primary.base,.6):t&&!e?mo(n.palette.divider,.6):e?n.palette.primary.dark:n.palette.divider};
|
|
5276
5276
|
box-shadow: ${({theme:e})=>ho(3,e.palette.action.shadowOpacity,e.palette.action.shadowBase)};
|
|
5277
5277
|
transition: all 0.2s ease-in-out;
|
|
5278
|
-
`,
|
|
5278
|
+
`,jL=x.div`
|
|
5279
5279
|
position: absolute;
|
|
5280
5280
|
width: 100%;
|
|
5281
5281
|
word-break: break-all;
|
|
5282
5282
|
white-space: nowrap;
|
|
5283
5283
|
transition: all 0.2s ease-in-out;
|
|
5284
|
-
`,
|
|
5284
|
+
`,WL=x(jL)`
|
|
5285
5285
|
padding-left: 8px;
|
|
5286
5286
|
opacity: 0;
|
|
5287
|
-
`,
|
|
5287
|
+
`,XL=x(jL)`
|
|
5288
5288
|
padding-right: 8px;
|
|
5289
5289
|
opacity: 1;
|
|
5290
|
-
`,
|
|
5290
|
+
`,JL=x.label`
|
|
5291
5291
|
position: absolute;
|
|
5292
5292
|
top: 0;
|
|
5293
5293
|
left: 0;
|
|
@@ -5305,13 +5305,13 @@ object-assign
|
|
|
5305
5305
|
transition: all 0.2s ease-in-out;
|
|
5306
5306
|
|
|
5307
5307
|
${({checked:e})=>e&&w`
|
|
5308
|
-
& > ${
|
|
5308
|
+
& > ${FL} {
|
|
5309
5309
|
left: calc(100% - 14px - 5px);
|
|
5310
5310
|
}
|
|
5311
|
-
& > ${
|
|
5311
|
+
& > ${WL} {
|
|
5312
5312
|
opacity: 1;
|
|
5313
5313
|
}
|
|
5314
|
-
& > ${
|
|
5314
|
+
& > ${XL} {
|
|
5315
5315
|
opacity: 0;
|
|
5316
5316
|
}
|
|
5317
5317
|
`}
|
|
@@ -5321,11 +5321,11 @@ object-assign
|
|
|
5321
5321
|
border-color: ${({theme:e})=>e.palette.primary.base};
|
|
5322
5322
|
}
|
|
5323
5323
|
`}
|
|
5324
|
-
`,
|
|
5324
|
+
`,UL=x.input`
|
|
5325
5325
|
width: 0;
|
|
5326
5326
|
height: 0;
|
|
5327
5327
|
visibility: hidden;
|
|
5328
|
-
`,
|
|
5328
|
+
`,QL=e.forwardRef((function(t,n){const{checked:r=!1,disabled:i=!1,onChange:o,width:a="48px",checkedText:l="",unCheckedText:s="",inputRef:c,children:d}=t;return"production"!==process.env.NODE_ENV&&d&&console.warn("[ingred-ui] ToggleButton: childrenによるラベル指定は非推奨です。別の手段でラベルを指定してください。"),e.createElement(YL,{ref:n,width:a},e.createElement(JL,{checked:r,disabled:i,width:a},e.createElement(UL,{ref:c,checked:r,type:"checkbox",readOnly:null==o,disabled:i,onChange:o}),e.createElement(WL,null,e.createElement(ve,{component:"div",color:i?"disabled":"primary",align:"left",size:"xs",weight:"bold"},l)),e.createElement(XL,null,e.createElement(ve,{component:"div",color:i?"disabled":"secondary",align:"right",size:"xs",weight:"bold"},s)),e.createElement(FL,{checked:r,disabled:i})))})),KL=x.div``,qL=x.span`
|
|
5329
5329
|
background-color: ${({active:e,theme:t})=>e?t.palette.primary.base:t.palette.white};
|
|
5330
5330
|
border: 1px solid
|
|
5331
5331
|
${({theme:e,active:t})=>t?e.palette.primary.dark:e.palette.neutral.lighter};
|
|
@@ -5333,26 +5333,26 @@ object-assign
|
|
|
5333
5333
|
height: ${({theme:e})=>3*e.spacing}px;
|
|
5334
5334
|
width: ${({theme:e})=>3*e.spacing}px;
|
|
5335
5335
|
outline: none;
|
|
5336
|
-
`,
|
|
5336
|
+
`,eO=x.div`
|
|
5337
5337
|
display: grid;
|
|
5338
5338
|
grid-template-columns: 38px repeat(24, 1fr);
|
|
5339
5339
|
grid-gap: ${({theme:e})=>e.spacing/2}px;
|
|
5340
5340
|
align-items: center;
|
|
5341
5341
|
justify-items: center;
|
|
5342
5342
|
width: fit-content;
|
|
5343
|
-
`,
|
|
5343
|
+
`,tO=x.div`
|
|
5344
5344
|
height: 24px;
|
|
5345
5345
|
text-align: center;
|
|
5346
5346
|
background-color: ${({theme:e})=>e.palette.neutral.softLight};
|
|
5347
5347
|
border-radius: ${({theme:e})=>e.spacing/2}px;
|
|
5348
5348
|
border: 1px solid ${({theme:e})=>e.palette.neutral.lighter};
|
|
5349
|
-
`,
|
|
5349
|
+
`,nO=x(tO)`
|
|
5350
5350
|
width: 38px;
|
|
5351
|
-
`,
|
|
5351
|
+
`,rO=x(tO)`
|
|
5352
5352
|
width: 24px;
|
|
5353
|
-
`,
|
|
5353
|
+
`,iO=x(tO)`
|
|
5354
5354
|
border: none;
|
|
5355
|
-
`,
|
|
5355
|
+
`,oO=e=>{if(!e)return Array(7).fill(Array(24).fill("1"));const t=(e=>{if(!e)return Array(7).fill(Array(24).fill("1")).join("");let t="";for(const n of e)switch(n){case"0":t+="0000";break;case"1":t+="0001";break;case"2":t+="0010";break;case"3":t+="0011";break;case"4":t+="0100";break;case"5":t+="0101";break;case"6":t+="0110";break;case"7":t+="0111";break;case"8":t+="1000";break;case"9":t+="1001";break;case"a":t+="1010";break;case"b":t+="1011";break;case"c":t+="1100";break;case"d":t+="1101";break;case"e":t+="1110";break;case"f":t+="1111";break;default:return""}return t})(e),n=[];for(let e=0;e<7;e++){n[e]=[];for(let r=0;r<24;r++)n[e][r]=t.charAt(24*e+r)}return n},aO=Array.from(Array(24)).map(((e,t)=>t)),lO=({weekList:e,weekTime:n,WeekTimeItem:r,interactive:i=!1,isWithinHoverRange:o,onMouseOver:a,onMouseDown:s})=>{const c=l((()=>oO(n)),[n]),d=(e,t)=>()=>{null==a||a(e,t)},u=(e,t,n)=>()=>{null==s||s(e,t,n)};return t.createElement(eO,null,t.createElement(iO,null),aO.map((e=>t.createElement(rO,{key:e},e))),c.map(((n,a)=>t.createElement(v,{key:a},t.createElement(nO,null,e[a]),n.map(((n,l)=>t.createElement(r,Object.assign({key:`${a}-${l}`,active:"1"===n,hover:!!o&&o(a,l)},i?{"aria-label":`${e[a]} ${String(l).padStart(2,"0")}:00`,"aria-pressed":"1"===n}:{},{onMouseOver:d(a,l),onMouseDown:u(a,l,n)}))))))))},sO=t.forwardRef((function(e,n){const r=$p({props:e,name:"WeekTime"}),{weekList:i,weekTime:o}=r;return t.createElement(KL,{ref:n},t.createElement(lO,{weekTime:o,weekList:i,WeekTimeItem:qL}))})),cO=x.div``,dO=x.button`
|
|
5356
5356
|
background-color: ${({active:e,hover:t,theme:n})=>t?n.palette.primary.highlight:e?n.palette.primary.base:n.palette.white};
|
|
5357
5357
|
border: 1px solid
|
|
5358
5358
|
${({theme:e,active:t,hover:n})=>n?e.palette.primary.softLight:t?e.palette.primary.dark:e.palette.neutral.lighter};
|
|
@@ -5361,5 +5361,5 @@ object-assign
|
|
|
5361
5361
|
height: ${({theme:e})=>3*e.spacing}px;
|
|
5362
5362
|
width: ${({theme:e})=>3*e.spacing}px;
|
|
5363
5363
|
outline: none;
|
|
5364
|
-
`,
|
|
5364
|
+
`,uO=t.forwardRef((function(e,n){const r=$p({props:e,name:"WeekTimeSelector"}),{weekList:o,weekTime:s,errorText:c,onChange:d}=r,u=l((()=>oO(s)),[s]),[p,m]=i({weekIndex:0,timeIndex:0}),[h,g]=i({weekIndex:0,timeIndex:0}),[f,b]=i("none"),[v,x]=i("1"),y=(e,t,n)=>{if("choosing"===f){const r=((e,t,n,r,i,o)=>{const a=[...o],l=Math.min(e,n),s=Math.max(e,n),c=Math.min(t,r),d=Math.max(t,r);for(let e=l;e<=s;e++){const t=a[e].map(((t,n)=>e>=l&&e<=s&&n>=c&&n<=d?i:t));a[e]=t}return a})(p.weekIndex,p.timeIndex,e,t,n,[...u]);b("none"),null==d||d((e=>{let t="";for(let n=0;n<7;n++)for(let r=0;r<24;r++)t+=e[n][r];return(e=>{let t="";for(let n=0;n<e.length;n+=4)switch(e.substr(n,4)){case"0000":t+="0";break;case"0001":t+="1";break;case"0010":t+="2";break;case"0011":t+="3";break;case"0100":t+="4";break;case"0101":t+="5";break;case"0110":t+="6";break;case"0111":t+="7";break;case"1000":t+="8";break;case"1001":t+="9";break;case"1010":t+="a";break;case"1011":t+="b";break;case"1100":t+="c";break;case"1101":t+="d";break;case"1110":t+="e";break;case"1111":t+="f";break;default:return""}return t})(t)})(r))}else"none"===f&&(m({weekIndex:e,timeIndex:t}),g({weekIndex:e,timeIndex:t}),b("choosing"))},w=()=>{"choosing"===f&&y(h.weekIndex,h.timeIndex,v)};return a((()=>(addEventListener("mouseup",w),()=>{removeEventListener("mouseup",w)}))),t.createElement(cO,{ref:n},t.createElement(lO,{weekTime:s,weekList:o,WeekTimeItem:dO,interactive:!0,isWithinHoverRange:(e,t)=>{if("choosing"===f){const n=Math.min(p.weekIndex,h.weekIndex),r=Math.max(p.weekIndex,h.weekIndex),i=Math.min(p.timeIndex,h.timeIndex),o=Math.max(p.timeIndex,h.timeIndex);return e>=n&&e<=r&&t>=i&&t<=o}return!1},onMouseOver:(e,t)=>{"none"!==f&&g({weekIndex:e,timeIndex:t})},onMouseDown:(e,t,n)=>{const r="1"===n?"0":"1";x(r),y(e,t,r)}}),c&&t.createElement(Ks,{pt:1},t.createElement(ip,null,c)))}));export{hp as ADVANCED_FILTER_CONSTANTS,de as Accordion,Ce as ActionButton,Bp as AdvancedFilter,Np as AdvancedFilterConfigPanel,Zt as AdvancedFilterTrigger,wm as Backdrop,zm as Badge,_m as Banner,B as BreakPoint,uc as Button,jm as ButtonGroup,Vh as Calendar,tg as CalendarRange,ng as Card,cg as Checkbox,wg as CheckboxCard,Cg as ClickAwayListener,Rg as ConfirmModal,P as ContainerBreakPoint,Jg as ContextMenu,zs as ContextMenu2,Gs as ContextMenu2ButtonControlsItem,ft as ContextMenu2ButtonItem,po as ContextMenu2CheckItem,Ts as ContextMenu2Container,Zs as ContextMenu2HeadingItem,Ps as ContextMenu2HelpTextItem,_s as ContextMenu2SeparatorItem,ss as ContextMenu2SortableGroup,ps as ContextMenu2SortableItem,xo as ContextMenu2SwitchItem,Is as ContextMenu2TextInputItem,Eo as ContextMenu2TriggerItem,Jy as CreatableSelect,Wp as DATE_OPERATORS,Yw as DataTable,YC as DataTable2,QC as DataTable2ActionButton,XC as DataTable2Body,UC as DataTable2Cell,jC as DataTable2Column,WC as DataTable2ColumnLabel,FC as DataTable2Head,KC as DataTable2InlineEditor,qC as DataTable2InlineSelectEditor,JC as DataTable2Row,ME as DateField,zE as DateField2,Lp as DatePicker,LE as DateRangeField,PE as DateRangeField2,GE as DateRangePicker,_g as Divider,KE as Drawer,aI as DropdownButton,II as DualListBox,Ck as DualListBox2,bk as DualListBox2Accordion,ak as DualListBox2Item,hk as DualListBox2Section,ip as ErrorText,Ou as Fade,kk as FileUploader,jk as FilterComboBox,Tp as FilterPositionCalculator,nM as FilterSelectInput,kM as FilterTagInput,AM as FixedPanel,re as Flex,OM as FloatingTip,BM as FullSizeConfirmModal,GM as Grow,ee as Icon,XM as IconText,Cs as Input,Vw as ItemEmpty,QM as LoadingBar,Ap as LocaleProvider,Wg as Menu,Yg as MenuList,Hg as Modal,SA as MultipleFilter,jp as NUMBER_OPERATORS,R$ as NavigationRail,GA as NavigationRailContext,QA as NotificationBadge,Jp as PRESET_OPERATORS,$w as Pager,jg as Popover,Vg as Portal,pw as RadioButton,N$ as RadioCard,z as Radius,Nu as SELECT2_SIZES,Xp as SELECTION_OPERATORS,T$ as ScrollArea,Xy as Select,qu as Select2,ep as Select2Option,tp as Select2OptionGroup,np as Select2Separator,N as Shadow,mD as Slide,aD as Slider,cD as SliderField,vD as Snackbar,T as Space,Ks as Spacer,oc as Spinner,yD as SplitAnnotation,OD as Switch,Fp as TEXT_OPERATORS,_D as Table,UD as Tabs,De as Tag,gA as TextField,L as ThemeProvider,eL as TimeField,tL as TimeField2,GL as Toast,QL as ToggleButton,Ru as Tooltip,ve as Typography,sO as WeekTime,uO as WeekTimeSelector,am as applyFilter,lm as applyMultipleFilters,om as applyOperatorToValue,Z as breakpointPrimitives,st as buildFilterSlots,em as changeOperatorLabel,pm as changeValueLabel,W$ as clamp,O as colors,Kp as combineOperators,dm as combineValues,Qp as createOperator,W as createTheme,cm as createValue,X as defaultTheme,kp as enUS,sm as evaluateFilterConditions,he as fontSize,Fe as generateTagText,je as generateTagTitle,Je as getAvailableTypes,X$ as getClampedValue,lt as getConfiguredFilters,Ue as getFilterTypeLabel,Dw as getFilteredItems,K$ as getKeyboardValue,bm as getLabelsForValues,Q$ as getNearestThumbIndex,J$ as getPercentage,Up as getPresetOperators,tm as getPresetOperatorsWithLabels,ot as getPresetSlotId,me as getResponsiveFontSizeCss,Qe as getTagBoldText,U$ as getValueFromPosition,fm as getValueLabels,gm as getValueStrings,at as isConfiguredFilter,Ve as isCustomOperator,Se as isRangeOperator,pe as isResponsiveObject,We as isValidFilterConfig,Xe as isValidFilterType,Ep as jaJP,vm as mergeValues,im as normalizeForSearch,qp as overrideOperatorLabels,um as overrideValueLabels,H as palette,tD as preventScroll,q$ as preventTextSelection,be as resolveFontWeight,eD as restoreTextSelection,nm as selectOperators,rm as selectOperatorsByIndex,mm as selectValues,hm as selectValuesByIndex,xm as sortValues,mk as toGroupedItems,_ as trimVertical,zp as useAdvancedFilterState,As as useContextMenu2Anchor,Zp as useFilterMenuPosition,Lw as useFilterState,_A as useNavigationRail,nD as useSlider,rD as useSliderScale,J as useTheme,Ip as zhCN};
|
|
5365
5365
|
//# sourceMappingURL=index.es.js.map
|