ingred-ui 31.0.5 → 31.0.6
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/DateField/DateField2/useDateField2.d.ts +2 -0
- package/dist/components/DropdownButton/types.d.ts +10 -0
- package/dist/components/LoadingBar/LoadingBar.d.ts +1 -1
- package/dist/components/Slider/types.d.ts +4 -0
- package/dist/components/TimeField/useTimeField2.d.ts +2 -0
- package/dist/components/WeekTime/internal/WeekTimeElement/WeekTimeElement.d.ts +7 -0
- package/dist/index.es.js +18 -18
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1093,7 +1093,7 @@ object-assign
|
|
|
1093
1093
|
color: ${({theme:e})=>e.palette.black};
|
|
1094
1094
|
cursor: pointer;
|
|
1095
1095
|
z-index: 1;
|
|
1096
|
-
`,ju=e=>{var{value:n,multiple:r=!1,disabled:s=!1,placeholder:c="選択してください",size:u="medium",variant:p="light",tagVariant:m,tagOverflow:h="truncate",showBulkActions:b=!1,selectAllLabel:v="すべて選択",clearAllLabel:x="すべてクリア",searchable:y=!1,searchPlaceholder:w="検索",noResultsMessage:C="見つかりませんでした",error:E=!1,applyButtonText:I="適用",cancelButtonText:k="キャンセル",children:M,onChange:A,onTempChange:$,width:L,minWidth:O,placement:S,middleware:V}=e,H=D(e,["value","multiple","disabled","placeholder","size","variant","tagVariant","tagOverflow","showBulkActions","selectAllLabel","clearAllLabel","searchable","searchPlaceholder","noResultsMessage","error","applyButtonText","cancelButtonText","children","onChange","onTempChange","width","minWidth","placement","middleware"]);const[R,N]=i(!1),[z,T]=i(""),[Z,B]=i([]),[P,_]=i(!1),G=o(null),Y=l((()=>m||("light"===p?"dark":"light")),[p,m]),F=l((()=>r?Array.isArray(n)?n:[]:void 0!==n?[n]:[]),[n,r]),j=l((()=>{if(!M)return[];const e=[],t=n=>{g.forEach(n,(n=>{if(!f(n))return;const r=n;if(r.type&&"string"!=typeof r.type){const n=r.type.displayName||r.type.name;if("Select2Option"===n){const t=r.props.value,n=r.props.children,i=!!r.props.disabled,o=r.props.prepend,a=r.props.append;void 0!==t&&e.push({value:t,label:String(n),disabled:i,prepend:o,append:a})}else"Select2OptionGroup"===n&&r.props.children&&t(r.props.children)}}))};return t(M),e}),[M]),W=d((e=>{null==A||A(e)}),[A]),X=d((e=>{s||(N(e),e&&r&&B([...F]),e||T(""))}),[s,r,F]),J=d((e=>{e.disabled||(W(e.value),N(!1),T(""))}),[W]),U=d(((e,t)=>{t.disabled||B((n=>e?[...n,t.value]:n.filter((e=>e!==t.value))))}),[]),Q=d((()=>{r&&W(Z),N(!1),T("")}),[W,r,Z]),K=d((()=>{N(!1),T("")}),[]),q=d((e=>{if(r&&Array.isArray(n)){const t=n.filter((t=>t!==e));W(t)}}),[r,n,W]),te=d((e=>{T(e.target.value)}),[]),ne=d((e=>{e.stopPropagation(),T("")}),[]),re=d((()=>{s||X(!R)}),[s,X,R]),ie=l((()=>j.find((e=>e.value===n))),[j,n]),oe=l((()=>r&&Array.isArray(n)?j.filter((e=>n.includes(e.value))):[]),[r,j,n]),ae=l((()=>{if(!y||!z)return j;const e=z.trim();if(!e)return j;const t=e.includes(","),n=e.startsWith('"')&&e.endsWith('"'),r=gd(e);return j.filter((i=>{const o=i.label.toLowerCase();return n?r.some((e=>o===e.toLowerCase())):t?r.some((e=>o.includes(e.toLowerCase()))):o.includes(e.toLowerCase())}))}),[j,z,y]),le=d((()=>{const e=ae.filter((e=>!e.disabled)).map((e=>e.value));B((t=>[...new Set([...t,...e])]))}),[ae]),se=d((()=>{B([])}),[]),ce=d((()=>{G.current&&"wrap"!==h&&_(G.current.scrollWidth>G.current.clientWidth)}),[h]);a((()=>{if(!window.ResizeObserver)return;if(!G.current)return;ce();const e=new window.ResizeObserver((()=>{G.current&&ce()}));return e.observe(G.current),()=>{e.disconnect()}}),[ce,oe,h]),a((()=>{r&&Array.isArray(n)&&B(n)}),[r,n]),a((()=>{r&&"function"==typeof $&&$(Z)}),[r,Z]);const de=l((()=>b&&r?t.createElement(Yu,null,t.createElement($u,{content:v,positionPriority:["top"],offset:[0,8],disabled:0===ae.length},t.createElement(ic,{icon:t.createElement(ee,{name:"check_thin",color:"currentColor"}),size:"small",color:"secondaryDark",disabled:0===ae.length,onClick:le})),t.createElement($u,{content:x,positionPriority:["top"],offset:[0,8],disabled:0===ae.length},t.createElement(ic,{icon:t.createElement(ee,{name:"close",color:"currentColor"}),size:"small",color:"secondaryDark",disabled:0===ae.length,onClick:se}))):null),[b,r,v,x,ae,le,se]),ue=l((()=>y&&b&&r?t.createElement(_u,null,t.createElement(Gu,null,t.createElement(Pu,{autoFocus:!0,placeholder:w,value:z,onChange:te}),z&&t.createElement(Fu,{type:"button","aria-label":"検索をリセット",onClick:ne},t.createElement(ee,{name:"close_circle",type:"fill",color:"currentColor"}))),de):y?t.createElement(_u,null,t.createElement(Gu,null,t.createElement(Pu,{autoFocus:!0,placeholder:w,value:z,onChange:te}),z&&t.createElement(Fu,{type:"button","aria-label":"検索をリセット",onClick:ne},t.createElement(ee,{name:"close_circle",type:"fill",color:"currentColor"})))):b&&r?de:null),[y,b,r,z,w,te,ne,de]),pe=l((()=>r?t.createElement(Ns,null,t.createElement(ic,{color:"clear",size:"small",onClick:K},k),t.createElement(ic,{color:"primary",size:"small",onClick:Q},I)):null),[r,Q,K,I,k]),me=t.createElement(Su,Object.assign({$disabled:s,$error:E,$hasValue:r?Array.isArray(n)&&n.length>0:!!ie,$isOpen:R,$multiple:r,$size:u,$variant:p,"aria-expanded":R,"aria-invalid":E,disabled:s,role:"combobox",type:"button"},H),r&&Array.isArray(n)&&0===n.length?t.createElement(Zu,{$disabled:s,$variant:p},c):!r&&t.createElement(Hu,null,ie?t.createElement(t.Fragment,null,ie.prepend&&t.createElement(Nu,{$size:u,$disabled:s},t.isValidElement(ie.prepend)&&ie.prepend.type===ee?t.cloneElement(ie.prepend,{size:parseInt(Du[u].iconSize,10),color:ie.prepend.props.color||"currentColor"}):ie.prepend),t.createElement(Ru,null,ie.label)):t.createElement(Zu,{$disabled:s,$variant:p},c)),t.createElement(Bu,{$disabled:s,$size:u,$multiple:r},t.createElement(ee,{name:"arrow_down",color:"currentColor"})));return t.createElement(Lu,null,t.createElement(Ou,{$disabled:s,$error:E,$isOpen:R,$size:u,$variant:p,$tagOverflow:h,"data-disabled":s,"data-overflowing":"wrap"!==h&&P,style:{cursor:r||s?"default":"pointer"}},t.createElement(Os,null,t.createElement(Ls,{noResultsMessage:y?C:void 0,open:R,stickyFooter:pe,stickyHeader:ue,trigger:
|
|
1096
|
+
`,ju=e=>{var{value:n,multiple:r=!1,disabled:s=!1,placeholder:c="選択してください",size:u="medium",variant:p="light",tagVariant:m,tagOverflow:h="truncate",showBulkActions:b=!1,selectAllLabel:v="すべて選択",clearAllLabel:x="すべてクリア",searchable:y=!1,searchPlaceholder:w="検索",noResultsMessage:C="見つかりませんでした",error:E=!1,applyButtonText:I="適用",cancelButtonText:k="キャンセル",children:M,onChange:A,onTempChange:$,width:L,minWidth:O,placement:S,middleware:V}=e,H=D(e,["value","multiple","disabled","placeholder","size","variant","tagVariant","tagOverflow","showBulkActions","selectAllLabel","clearAllLabel","searchable","searchPlaceholder","noResultsMessage","error","applyButtonText","cancelButtonText","children","onChange","onTempChange","width","minWidth","placement","middleware"]);const[R,N]=i(!1),[z,T]=i(""),[Z,B]=i([]),[P,_]=i(!1),G=o(null),Y=l((()=>m||("light"===p?"dark":"light")),[p,m]),F=l((()=>r?Array.isArray(n)?n:[]:void 0!==n?[n]:[]),[n,r]),j=l((()=>{if(!M)return[];const e=[],t=n=>{g.forEach(n,(n=>{if(!f(n))return;const r=n;if(r.type&&"string"!=typeof r.type){const n=r.type.displayName||r.type.name;if("Select2Option"===n){const t=r.props.value,n=r.props.children,i=!!r.props.disabled,o=r.props.prepend,a=r.props.append;void 0!==t&&e.push({value:t,label:String(n),disabled:i,prepend:o,append:a})}else"Select2OptionGroup"===n&&r.props.children&&t(r.props.children)}}))};return t(M),e}),[M]),W=d((e=>{null==A||A(e)}),[A]),X=d((e=>{s||(N(e),e&&r&&B([...F]),e||T(""))}),[s,r,F]),J=d((e=>{e.disabled||(W(e.value),N(!1),T(""))}),[W]),U=d(((e,t)=>{t.disabled||B((n=>e?[...n,t.value]:n.filter((e=>e!==t.value))))}),[]),Q=d((()=>{r&&W(Z),N(!1),T("")}),[W,r,Z]),K=d((()=>{N(!1),T("")}),[]),q=d((e=>{if(r&&Array.isArray(n)){const t=n.filter((t=>t!==e));W(t)}}),[r,n,W]),te=d((e=>{T(e.target.value)}),[]),ne=d((e=>{e.stopPropagation(),T("")}),[]),re=d((()=>{s||X(!R)}),[s,X,R]),ie=l((()=>j.find((e=>e.value===n))),[j,n]),oe=l((()=>r&&Array.isArray(n)?j.filter((e=>n.includes(e.value))):[]),[r,j,n]),ae=l((()=>{if(!y||!z)return j;const e=z.trim();if(!e)return j;const t=e.includes(","),n=e.startsWith('"')&&e.endsWith('"'),r=gd(e);return j.filter((i=>{const o=i.label.toLowerCase();return n?r.some((e=>o===e.toLowerCase())):t?r.some((e=>o.includes(e.toLowerCase()))):o.includes(e.toLowerCase())}))}),[j,z,y]),le=d((()=>{const e=ae.filter((e=>!e.disabled)).map((e=>e.value));B((t=>[...new Set([...t,...e])]))}),[ae]),se=d((()=>{B([])}),[]),ce=d((()=>{G.current&&"wrap"!==h&&_(G.current.scrollWidth>G.current.clientWidth)}),[h]);a((()=>{if(!window.ResizeObserver)return;if(!G.current)return;ce();const e=new window.ResizeObserver((()=>{G.current&&ce()}));return e.observe(G.current),()=>{e.disconnect()}}),[ce,oe,h]),a((()=>{r&&Array.isArray(n)&&B(n)}),[r,n]),a((()=>{r&&"function"==typeof $&&$(Z)}),[r,Z]);const de=l((()=>b&&r?t.createElement(Yu,null,t.createElement($u,{content:v,positionPriority:["top"],offset:[0,8],disabled:0===ae.length},t.createElement(ic,{icon:t.createElement(ee,{name:"check_thin",color:"currentColor"}),size:"small",color:"secondaryDark",disabled:0===ae.length,onClick:le})),t.createElement($u,{content:x,positionPriority:["top"],offset:[0,8],disabled:0===ae.length},t.createElement(ic,{icon:t.createElement(ee,{name:"close",color:"currentColor"}),size:"small",color:"secondaryDark",disabled:0===ae.length,onClick:se}))):null),[b,r,v,x,ae,le,se]),ue=l((()=>y&&b&&r?t.createElement(_u,null,t.createElement(Gu,null,t.createElement(Pu,{autoFocus:!0,placeholder:w,value:z,onChange:te}),z&&t.createElement(Fu,{type:"button","aria-label":"検索をリセット",onClick:ne},t.createElement(ee,{name:"close_circle",type:"fill",color:"currentColor"}))),de):y?t.createElement(_u,null,t.createElement(Gu,null,t.createElement(Pu,{autoFocus:!0,placeholder:w,value:z,onChange:te}),z&&t.createElement(Fu,{type:"button","aria-label":"検索をリセット",onClick:ne},t.createElement(ee,{name:"close_circle",type:"fill",color:"currentColor"})))):b&&r?de:null),[y,b,r,z,w,te,ne,de]),pe=l((()=>r?t.createElement(Ns,null,t.createElement(ic,{color:"clear",size:"small",onClick:K},k),t.createElement(ic,{color:"primary",size:"small",onClick:Q},I)):null),[r,Q,K,I,k]),me=H,he="string"==typeof me["aria-label"]||"string"==typeof me["aria-labelledby"],ge=t.createElement(Su,Object.assign({$disabled:s,$error:E,$hasValue:r?Array.isArray(n)&&n.length>0:!!ie,$isOpen:R,$multiple:r,$size:u,$variant:p,"aria-expanded":R,"aria-invalid":E,"aria-label":he?void 0:c,disabled:s,role:"combobox",type:"button"},H),r&&Array.isArray(n)&&0===n.length?t.createElement(Zu,{$disabled:s,$variant:p},c):!r&&t.createElement(Hu,null,ie?t.createElement(t.Fragment,null,ie.prepend&&t.createElement(Nu,{$size:u,$disabled:s},t.isValidElement(ie.prepend)&&ie.prepend.type===ee?t.cloneElement(ie.prepend,{size:parseInt(Du[u].iconSize,10),color:ie.prepend.props.color||"currentColor"}):ie.prepend),t.createElement(Ru,null,ie.label)):t.createElement(Zu,{$disabled:s,$variant:p},c)),t.createElement(Bu,{$disabled:s,$size:u,$multiple:r},t.createElement(ee,{name:"arrow_down",color:"currentColor"})));return t.createElement(Lu,null,t.createElement(Ou,{$disabled:s,$error:E,$isOpen:R,$size:u,$variant:p,$tagOverflow:h,"data-disabled":s,"data-overflowing":"wrap"!==h&&P,style:{cursor:r||s?"default":"pointer"}},t.createElement(Os,null,t.createElement(Ls,{noResultsMessage:y?C:void 0,open:R,stickyFooter:pe,stickyHeader:ue,trigger:ge,width:L,minWidth:O,placement:S,middleware:V,onOpenChange:X},(()=>{const e=y&&!!z?new Set(ae.map((e=>e.value))):void 0;if(M){const i=((e,i)=>{const o=[];let a=null;const l=(e,o,a)=>{const l=e.props.value,s=!!e.props.disabled,c=e.props.children,d=e.props.prepend,u=e.props.append;if(i&&!i.has(l))return null;const p=r?Z.includes(l):l===n;return t.createElement(io,{key:`${o}-${a}`,checked:p,closeOnChange:!r,disabled:s,tabIndex:0,prepend:d,append:u,onChange:()=>{r?U(!p,{value:l,label:String(c),disabled:s,prepend:d,append:u}):J({value:l,label:String(c),disabled:s,prepend:d,append:u})}},c)},s=()=>{if(null===a)return;const e=a,n=e.options.map(((t,n)=>l(t,`option-${e.label}`,n))).filter(Boolean);0!==n.length&&(o.push(t.createElement(Ss,{key:`heading-${e.label}`},e.label)),o.push(...n))};return g.forEach(e,(e=>{if(!f(e))return;const n=e;if(n.type&&"string"!=typeof n.type){const e=n.type.displayName||n.type.name;if("Select2OptionGroup"===e)null!==a&&s(),a={label:n.props.label,options:[]},n.props.children&&g.forEach(n.props.children,(e=>{if(f(e)){const t=e;"Select2Option"===(t.type.displayName||t.type.name)&&null!==a&&a.options.push(t)}}));else if("Select2Separator"===e)o.length>0&&o.push(t.createElement(Rs,{key:`separator-${o.length}`}));else if("Select2Option"===e)if(null!==a)a.options.push(n);else{const e=n.props.value;if(i&&!i.has(e))return;o.push(l(n,"option",o.length))}else o.push(n)}})),null!==a&&s(),o})(M,e);return 0===i.length?t.createElement(xs,{message:C}):i}return ae.length>0?ae.map((e=>{const i=r?Z.includes(e.value):e.value===n;return t.createElement(io,{key:e.value.toString(),checked:i,closeOnChange:!r,disabled:e.disabled,tabIndex:0,prepend:e.prepend,append:e.append,onChange:()=>{r?U(!i,e):J(e)}},e.label)})):t.createElement(xs,{message:C})})())),r&&t.createElement(Vu,{$tagOverflow:h},t.createElement(zu,{ref:G,$tagOverflow:h,"data-testid":"tag-container",onClick:re},oe.map((e=>{const n=s?void 0:()=>q(e.value);return t.createElement(Tu,{key:e.value.toString(),disabled:s,label:e.label,size:u,variant:Y,onRemove:n})}))))))},Wu=e=>null;Wu.displayName="Select2Option";const Xu=e=>null;Xu.displayName="Select2OptionGroup";const Ju=()=>null;Ju.displayName="Select2Separator";const Uu=x(ve)`
|
|
1097
1097
|
${_}
|
|
1098
1098
|
`,Qu=e.forwardRef((function({children:t,size:n="md"},r){const i=J();return e.createElement(re,{ref:r,display:"flex",alignItems:"center"},e.createElement(Fs,{pr:.5},e.createElement(ee,{name:"alert",type:"fill",color:i.palette.danger.base,size:"sm"===n?"sm-md":n})),e.createElement(Uu,{color:i.palette.danger.base,size:n},t))})),Ku=e=>{const{inputType:t,selectedValues:n,selectedRadioValue:r,startDate:i,endDate:o,value:a,isRangeOperator:l}=e;return"checkbox"===t?n:"radio"===t?[r]:l?[i,o]:[a]},qu=(e,t)=>{const n=qe(e).find((e=>e.value===t));return(null==n?void 0:n.label)||t},ep=e=>{const{conditionConfig:t,inputType:n,operator:r,values:i,dateFormat:o}=e;return i.map((e=>{if("checkbox"===n||"radio"===n){const n=((e,t)=>{if(t){const n=e.operators.find((e=>e.value===t));if(null==n?void 0:n.options)return n.options}return e.options||[]})(t,r).find((t=>t.value===e));return(null==n?void 0:n.label)||String(e)}if("date"===n&&o){const t=String(e);if(!t||""===t.trim())return t;const n=Zs(t,"YYYY-MM-DD");return n.isValid()?n.format(o):t}return String(e)}))},tp=e=>{const{inputType:t,operator:n,selectedValues:r,selectedRadioValue:i,startDate:o,endDate:a,value:l,isRangeOperator:s,customValidation:c}=e;if("checkbox"===t){if(0===r.length)return{isValid:!1,errorMessage:"少なくとも1つの項目を選択してください"}}else if("radio"===t){if(""===i||null==i)return{isValid:!1,errorMessage:"項目を選択してください"}}else if(s){if(!o||!a)return{isValid:!1,errorMessage:"開始日と終了日の両方を選択してください"}}else if(!l||""===l.trim())return{isValid:!1,errorMessage:"date"===t?"日付を選択してください":"値を入力してください"};if(c){let e;return e="checkbox"===t?r:"radio"===t?[i]:s?[o,a]:[l],c(e,n)}return s&&new Date(o)>new Date(a)?{isValid:!1,errorMessage:"開始日は終了日より前である必要があります"}:{isValid:!0,errorMessage:""}},np=e=>{const{inputType:t,selectedValues:n,selectedRadioValue:r,startDate:i,endDate:o,value:a,isRangeOperator:l}=e;return"checkbox"===t?n.length>0:"radio"===t?""!==r&&null!=r:l?!(!i||!o):!(!a||""===a.trim())},rp=e=>!1!==e.required,ip=(e,t)=>{const n=Qe(t,e.conditionKey);return n?{condition:e,conditionConfig:n}:null},op=e=>{const{condition:t,conditionConfig:n}=e,r=et(n,t.operator),i=tt(n,t.operator);return np({inputType:r,selectedValues:t.selectedValues,selectedRadioValue:t.selectedRadioValue,startDate:t.startDate,endDate:t.endDate,value:t.value,isRangeOperator:i})},ap=e=>{const{condition:t,conditionConfig:n}=e,r=et(n,t.operator),i=tt(n,t.operator);return tp({inputType:r,operator:t.operator,selectedValues:t.selectedValues,selectedRadioValue:t.selectedRadioValue,startDate:t.startDate,endDate:t.endDate,value:t.value,isRangeOperator:i,customValidation:n.customValidation})},lp={MENU_WIDTH:160,CONFIG_PANEL_WIDTH:264,DEFAULT_MENU_POSITION:24,TAG_SPACING:8,TAG_OFFSET_MULTIPLE:40,ESTIMATED_TAG_WIDTH:120,ICON_AREA_WIDTH:24,CLEAR_BUTTON_WIDTH:16,FALLBACK_POSITION_X:80,FALLBACK_POSITION_Y:148,CONFIG_PANEL_HEADER_HEIGHT:60,CONFIG_PANEL_BUTTON_HEIGHT:50,CONFIG_PANEL_PADDING:16,CONFIG_PANEL_MIN_CONTENT_HEIGHT:200,TRANSITION_DURATION:200,MIN_VALUE_LENGTH:1},sp="[data-tag]",cp='[role="menu"]',dp='[data-advanced-filter-trigger="true"]',up='[role="button"]',pp=({options:e,selectedValues:n,onValueToggle:r})=>t.createElement(vt,null,e.map((e=>t.createElement(io,{key:String(e.value),checked:n.includes(e.value),onChange:t=>r(e.value,t)},e.label))));pp.displayName="CheckboxValueInput";const mp=({options:e,selectedRadioValue:n,onRadioChange:r})=>t.createElement(vt,null,e.map((e=>t.createElement(io,{key:String(e.value),checked:n===e.value,onChange:t=>{t&&r(e.value)}},e.label))));mp.displayName="RadioValueInput";const hp=640,gp=["日","月","火","水","木","金","土"],fp={components:{ConfirmModal:{defaultProps:{confirmText:"確認",cancelText:"キャンセル"}},FullSizeConfirmModal:{defaultProps:{confirmText:"確認",cancelText:"キャンセル"}},FileUploader:{defaultProps:{title:"ファイルをドラッグ&ドロップ、またはここをクリック"}},ItemEmpty:{defaultProps:{title:"見つかりませんでした。"}},Select:{defaultProps:{placeholder:"選択...",emptyMessage:"見つかりません"}},CreatableSelect:{defaultProps:{placeholder:"選択...",emptyMessage:"見つかりません",addMessage:"次の文字列を追加する"}},MultipleFilter:{defaultProps:{placeholder:"新しいフィルターを追加してください"}},FilterCard:{defaultProps:{applyButtonTitle:"適用",inputErrorText:"入力してください",formPlaceholder:"検索",sectionTitle:"セクション"}},EditFilterCard:{defaultProps:{}},DatePicker:{defaultProps:{monthFormat:"YYYY年MM月",weekConfig:{start:0,labels:[...gp]}}},DateRangePicker:{defaultProps:{monthFormat:"YYYY年MM月",weekConfig:{start:0,labels:[...gp]},applyButtonText:"適用",cancelButtonText:"キャンセル"}},WeekTime:{defaultProps:{weekList:["月","火","水","木","金","土","日"]}},WeekTimeSelector:{defaultProps:{weekList:["月","火","水","木","金","土","日"]}},DualListBox:{defaultProps:{selectedItemTitle:"個選択済み"}}}},bp={components:{ConfirmModal:{defaultProps:{confirmText:"确认",cancelText:"取消"}},FullSizeConfirmModal:{defaultProps:{confirmText:"确认",cancelText:"取消"}},FileUploader:{defaultProps:{title:"把文件拖入, 同样支持点击上传。"}},ItemEmpty:{defaultProps:{title:"未找到。"}}}},vp={components:{DatePicker:{defaultProps:{monthFormat:"MMM YYYY",weekConfig:{start:0,labels:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}}},DateRangePicker:{defaultProps:{monthFormat:"MMM YYYY",weekConfig:{start:0,labels:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},applyButtonText:"Apply",cancelButtonText:"Cancel"}},WeekTime:{defaultProps:{weekList:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},WeekTimeSelector:{defaultProps:{weekList:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},DualListBox:{defaultProps:{selectedItemTitle:"selected"}}}},xp=e.createContext({locale:vp}),yp=({locale:t,children:n})=>e.createElement(xp.Provider,{value:{locale:t}},n);function wp(e){var n,r;const{name:i,props:o}=e,a=t.useContext(xp).locale,l=Object.assign({},o);if(!a||!a.components)return l;const s=null===(r=null===(n=a.components)||void 0===n?void 0:n[i])||void 0===r?void 0:r.defaultProps;for(const e in s)void 0===l[e]&&(l[e]=s[e]);return l}const Cp=n((function(e,n){const r=wp({props:e,name:"DatePicker"}),{date:o,format:a="YYYY-MM-DD",disabled:s=!1,size:c="medium",variant:u="light",width:p,monthFormat:m,weekConfig:h,showDateFields:g=!1,showTimeFields:f=!1,timeFieldProps:b,useCalendarRange:v=!1,isOutsideRange:x,error:y=!1,errorText:w,defaultPresetButton:C,presetButtons:E,onPresetButtonClick:I,onDateChange:k,onDatesChange:M,endDate:A}=r,$=J(),[D,L]=i(!1),{context:O,refs:S,strategy:V,x:H,y:R}=zi({placement:"bottom-start",open:D,onOpenChange:L,middleware:[Tn(10),zn(),Zn({padding:8})]}),N=Ri(O),z=ji(O),{getReferenceProps:T,getFloatingProps:Z}=Zi([N,z]),B=d((()=>{s||L((e=>!e))}),[s]),P=d((e=>{k(e),L(!1)}),[k]),_=l((()=>t.createElement(ee,{name:"date_range",color:s?$.palette.neutral.base:$.palette.text.accent})),[s,$]),G=l((()=>"100%"===p||"string"==typeof p&&p.includes("100%")?{width:"100%"}:{width:"fit-content"}),[p]);return t.createElement(re,{ref:n,style:G},t.createElement("div",Object.assign({ref:S.setReference},T()),t.createElement(DE,{date:o,format:a,error:y,errorText:w,disabled:s,size:c,variant:u,width:p,append:_,onDateChange:k,onAppendClick:B})),D&&t.createElement(Mi,null,t.createElement(Di,{context:O,modal:!1,initialFocus:-1,returnFocus:!1},v?t.createElement(Wh,Object.assign({ref:S.setFloating,startDate:o,endDate:A||o,monthFormat:m,weekConfig:h,defaultPresetButton:C,presetButtons:E,showDateFields:g,showTimeFields:f,timeFieldProps:b,dateFieldFormat:a,isOutsideRange:x,style:{position:V,top:null!=R?R:0,left:null!=H?H:0,zIndex:$.depth.calendarRange,overflow:"hidden",maxWidth:"min(640px, calc(100vw - 16px))"},onPresetButtonClick:I,onDatesChange:M},Z())):t.createElement(kh,Object.assign({ref:S.setFloating,date:o,monthFormat:m,weekConfig:h,defaultPresetButton:C,presetButtons:E,showDateFields:g,showTimeFields:f,timeFieldProps:b,dateFieldFormat:a,isOutsideRange:x,style:{position:V,top:null!=R?R:0,left:null!=H?H:0,zIndex:$.depth.calendar,overflow:"hidden",maxWidth:"min(640px, calc(100vw - 16px))"},onPresetButtonClick:I,onDateChange:P},Z())))))}));var Ep=p(Cp);const Ip=({startDate:e,endDate:n,onStartDateChange:r,onEndDateChange:i,format:o="YYYY-MM-DD"})=>{const a=l((()=>{if(e&&""!==e.trim()){const t=Zs(e,"YYYY-MM-DD");return t.isValid()?t:Zs()}return Zs()}),[e]),s=l((()=>{if(n&&""!==n.trim()){const e=Zs(n,"YYYY-MM-DD");return e.isValid()?e:Zs()}return Zs()}),[n]);return t.createElement(pt,null,t.createElement(ht,null,t.createElement(bt,{htmlFor:"start-date-picker"},"開始日"),t.createElement(Ep,{date:a,format:o,variant:"dark",width:"100%",onDateChange:e=>{r(e.format("YYYY-MM-DD"))}})),t.createElement(ht,null,t.createElement(bt,{htmlFor:"end-date-picker"},"終了日"),t.createElement(Ep,{date:s,format:o,variant:"dark",width:"100%",onDateChange:e=>{i(e.format("YYYY-MM-DD"))}})))};Ip.displayName="DateRangeInput";const kp=({inputType:e,value:n,placeholder:r,onValueChange:i,onKeyDown:o,format:a="YYYY-MM-DD",inputRef:s})=>{const c=l((()=>{if("date"===e&&n&&""!==n.trim()){const e=Zs(n,"YYYY-MM-DD");return e.isValid()?e:Zs()}return Zs()}),[e,n]),d=e=>{const t=e.format("YYYY-MM-DD");i(t)};return"date"===e?t.createElement(ft,null,t.createElement(Ep,{date:c,format:a,variant:"dark",width:"100%",onDateChange:d})):t.createElement(gt,null,t.createElement(gs,{ref:s,type:"text",value:n,placeholder:r,fullWidth:!0,variant:"dark",onChange:e=>i(e.target.value),onKeyDown:o}))};kp.displayName="TextValueInput";const Mp=({filterConfig:e,operator:n,value:r,selectedValues:i,selectedRadioValue:o,startDate:a,endDate:l,onValueChange:s,onValueToggle:c,onRadioChange:d,onStartDateChange:u,onEndDateChange:p,onKeyDown:m,isRangeOperator:h,textInputRef:g})=>{const f=ze(e,n);return"checkbox"===f?t.createElement(pp,{options:Ze(e,n),selectedValues:i,onValueToggle:c}):"radio"===f?t.createElement(mp,{options:Ze(e,n),selectedRadioValue:o,onRadioChange:d}):h(n)?t.createElement(Ip,{startDate:a,endDate:l,format:Be(e),onStartDateChange:u,onEndDateChange:p}):t.createElement(kp,{inputType:f,inputRef:"text"===f?g:void 0,value:r,placeholder:Te(e),format:"date"===f?Be(e):void 0,onValueChange:s,onKeyDown:m})};Mp.displayName="ConfigPanelValueInput";const Ap=(e,t,n)=>{if(!t)return((e,t)=>{const n=Ke(e),r=et(e,n);let i="",o="",a="";return tt(e,n)?(o=t,a=t):"date"===r&&(i=t),{id:`condition_${e.conditionKey}`,conditionKey:e.conditionKey,conditionLabel:e.conditionLabel,operator:n,value:i,selectedValues:[],selectedRadioValue:"",startDate:o,endDate:a}})(e,n);let r="",i=[],o="",a="",l="";if((t.isRange||!1)&&t.values.length>=2)a="string"==typeof t.values[0]?t.values[0]:"",l="string"==typeof t.values[1]?t.values[1]:"";else if(t.values.length>0){const e=t.values[0];"string"==typeof e&&(r=e),i=t.values,o=e}return{id:`condition_${e.conditionKey}`,conditionKey:t.conditionKey,conditionLabel:t.conditionLabel,operator:t.operator,value:r,selectedValues:i,selectedRadioValue:o,startDate:a,endDate:l}},$p=({filterConfig:e,multiConditionState:n,onKeyDown:r,textInputRef:i})=>{const{conditions:o,updateConditionOperator:a,updateConditionValue:s,updateConditionSelectedValues:c,updateConditionSelectedRadioValue:d,updateConditionStartDate:u,updateConditionEndDate:p}=n,m=Ue(e),h=l((()=>nt(e,o)),[e,o]);return t.createElement("div",null,m.map(((n,l)=>{const g=o.find((e=>e.conditionKey===n.conditionKey));if(!g)return null;const f=et(n,g.operator),b=tt(n,g.operator),v=m.length>=2;return t.createElement("div",{key:g.id},l>0&&t.createElement(Rs,null),v&&t.createElement(Ss,null,n.conditionLabel),t.createElement(Dt,null,t.createElement(ju,{value:g.operator,variant:"dark",onChange:e=>{"string"==typeof e&&a(g.id,e)}},qe(n).map((e=>t.createElement(Wu,{key:e.value,value:e.value},e.label))))),t.createElement(Dt,null,t.createElement(Mp,{endDate:g.endDate,filterConfig:e?Object.assign(Object.assign({},e),{operators:qe(n),inputType:f,options:n.options}):void 0,isRangeOperator:()=>b,operator:g.operator,selectedRadioValue:g.selectedRadioValue,selectedValues:g.selectedValues,startDate:g.startDate,textInputRef:g.id===h?i:void 0,value:g.value,onEndDateChange:e=>{p(g.id,e)},onKeyDown:r,onRadioChange:e=>{d(g.id,e)},onStartDateChange:e=>{u(g.id,e)},onValueChange:e=>{s(g.id,e)},onValueToggle:(e,t)=>{const n=[...g.selectedValues];if(t)n.push(e);else{const t=n.indexOf(e);t>-1&&n.splice(t,1)}c(g.id,n)}})))})))};$p.displayName="MultiConditionInput";const Dp=({filterType:e,isOpen:n,onApply:r,onCancel:s,editingFilter:c,filterConfig:p,savedCoordinates:m})=>{var h;const g=(e=>void 0!==(null==e?void 0:e.multiConditionConfigs)&&e.multiConditionConfigs.length>0)(p),[f,b]=i(""),v=d((()=>b("")),[]),x=d((e=>{const t=Ne(p).find((t=>t.value===e));return(null==t?void 0:t.isRange)||!1}),[p]),y=((e,t,n,r)=>{const[o,l]=i(Re(e)),[s,c]=i(""),[u,p]=i([]),[m,h]=i(""),[g,f]=i(""),[b,v]=i("");a((()=>{if(t)l(t.operator),c("string"==typeof t.values[0]?t.values[0]:""),p(t.values),h(t.values[0]||""),n&&n(t.operator)?(f("string"==typeof t.values[0]?t.values[0]:""),v("string"==typeof t.values[1]?t.values[1]:"")):(f(""),v(""));else{const t=Re(e);l(t);const r=ze(e,t),i=Zs().format("YYYY-MM-DD");n&&n(t)?(f(i),v(i),c("")):"date"===r?(c(i),f(""),v("")):(c(""),f(""),v("")),p([]),h("")}}),[t,n,e]);const x=d((e=>{c(e),null==r||r()}),[r]),y=d(((e,t)=>{p(t?t=>[...t,e]:t=>t.filter((t=>t!==e))),null==r||r()}),[r]),w=d((e=>{h(e),null==r||r()}),[r]),C=d((e=>{f(e),null==r||r()}),[r]),E=d((e=>{v(e),null==r||r()}),[r]);return{operator:o,value:s,selectedValues:u,selectedRadioValue:m,startDate:g,endDate:b,setOperator:l,setValue:c,setSelectedValues:p,setSelectedRadioValue:h,setStartDate:f,setEndDate:v,handleValueChange:x,handleValueToggle:y,handleRadioChange:w,handleStartDateChange:C,handleEndDateChange:E}})(p,c||void 0,x,v),w=((e,t,n)=>{const r=l((()=>Ue(e)),[e]),[o,s]=i([]);a((()=>{var e;if(0===r.length)return;const n=Zs().format("YYYY-MM-DD"),i=new Map((null===(e=null==t?void 0:t.conditions)||void 0===e?void 0:e.map((e=>[e.conditionKey,e])))||[]),o=r.map((e=>Ap(e,i.get(e.conditionKey),n)));s(o)}),[t,r]);const c=d((()=>{if(0===r.length)return;const e=new Set(o.map((e=>e.conditionKey))),t=r.find((t=>!e.has(t.conditionKey)))||r[0],i=Ke(t),a=et(t,i),l=Zs().format("YYYY-MM-DD");let c="",d="",u="";tt(t,i)?(d=l,u=l):"date"===a&&(c=l);const p={id:`condition_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,conditionKey:t.conditionKey,conditionLabel:t.conditionLabel,operator:i,value:c,selectedValues:[],selectedRadioValue:"",startDate:d,endDate:u};s((e=>[...e,p])),null==n||n()}),[r,o,n]),u=d((e=>{s((t=>t.filter((t=>t.id!==e)))),null==n||n()}),[n]),p=d(((e,t,i)=>{const o=r.find((e=>e.conditionKey===t));if(!o)return;const a=Ke(o),l=et(o,a),c=Zs().format("YYYY-MM-DD");let d="",u="",p="";tt(o,a)?(u=c,p=c):"date"===l&&(d=c),s((n=>n.map((n=>n.id===e?Object.assign(Object.assign({},n),{conditionKey:t,conditionLabel:i,operator:a,value:d,selectedValues:[],selectedRadioValue:"",startDate:u,endDate:p}):n)))),null==n||n()}),[r,n]),m=d(((e,t)=>{s((n=>n.map((n=>{if(n.id!==e)return n;const i=r.find((e=>e.conditionKey===n.conditionKey));if(!i)return n;const o=et(i,t),a=Zs().format("YYYY-MM-DD"),l=tt(i,t);let s=n.value,c=n.startDate,d=n.endDate,u=n.selectedValues,p=n.selectedRadioValue;return l?(c&&""!==c.trim()||(c=a),d&&""!==d.trim()||(d=a),s="",u=[],p=""):"date"===o?(s&&""!==s.trim()||(s=a),c="",d="",u=[],p=""):(c="",d=""),Object.assign(Object.assign({},n),{operator:t,value:s,startDate:c,endDate:d,selectedValues:u,selectedRadioValue:p})})))),null==n||n()}),[r,n]),h=d(((e,t)=>{s((n=>n.map((n=>n.id===e?Object.assign(Object.assign({},n),{value:t}):n)))),null==n||n()}),[n]),g=d(((e,t)=>{s((n=>n.map((n=>n.id===e?Object.assign(Object.assign({},n),{selectedValues:t}):n)))),null==n||n()}),[n]),f=d(((e,t)=>{s((n=>n.map((n=>n.id===e?Object.assign(Object.assign({},n),{selectedRadioValue:t}):n)))),null==n||n()}),[n]),b=d(((e,t)=>{s((n=>n.map((n=>n.id===e?Object.assign(Object.assign({},n),{startDate:t}):n)))),null==n||n()}),[n]),v=d(((e,t)=>{s((n=>n.map((n=>n.id===e?Object.assign(Object.assign({},n),{endDate:t}):n)))),null==n||n()}),[n]),x=d((e=>o.find((t=>t.id===e))),[o]);return{conditions:o,addCondition:c,removeCondition:u,updateConditionKey:p,updateConditionOperator:m,updateConditionValue:h,updateConditionSelectedValues:g,updateConditionSelectedRadioValue:f,updateConditionStartDate:b,updateConditionEndDate:v,getConditionById:x}})(p,c||null,v),C=d((()=>((e,t)=>{if(0===e.length)return{isValid:!1,errorMessage:"少なくとも1つの条件を設定してください"};if(!e.some((e=>{const n=ip(e,t);return!!n&&op(n)})))return{isValid:!1,errorMessage:"少なくとも1つの条件を入力してください"};for(const n of e){const e=ip(n,t);if(!e)return{isValid:!1,errorMessage:`条件設定 ${n.conditionKey} が見つかりません`};if(!rp(e.conditionConfig))continue;const r=ap(e);if(!r.isValid)return{isValid:!1,errorMessage:`${n.conditionLabel}: ${r.errorMessage}`}}return{isValid:!0,errorMessage:""}})(w.conditions,p)),[w.conditions,p]),E=d((()=>((e,t)=>0!==e.length&&(!!e.some((e=>{const n=ip(e,t);return!!n&&op(n)}))&&e.every((e=>{const n=ip(e,t);return!!n&&(!rp(n.conditionConfig)||op(n))}))))(w.conditions,p)),[w.conditions,p]),{validateInput:I,canApply:k}=(({filterConfig:e,operator:t,selectedValues:n,selectedRadioValue:r,startDate:i,endDate:o,value:a,isRangeOperator:l})=>({validateInput:d((()=>{const s=ze(e,t);return tp({inputType:s,operator:t,selectedValues:n,selectedRadioValue:r,startDate:i,endDate:o,value:a,isRangeOperator:l(t),customValidation:null==e?void 0:e.customValidation})}),[e,t,n,r,i,o,a,l]),canApply:d((()=>{const s=ze(e,t);return np({inputType:s,selectedValues:n,selectedRadioValue:r,startDate:i,endDate:o,value:a,isRangeOperator:l(t)})}),[e,n,r,t,i,o,a,l])}))({filterConfig:p,operator:y.operator,selectedValues:y.selectedValues,selectedRadioValue:y.selectedRadioValue,startDate:y.startDate,endDate:y.endDate,value:y.value,isRangeOperator:x}),{refs:M,floatingStyles:A,getFloatingProps:$,isPositioned:D,contentMaxHeight:L}=(({isOpen:e,savedCoordinates:t,onCancel:n})=>{const[r,o]=i(!1),[l,s]=i(300),{refs:c,floatingStyles:d,context:u}=zi({open:e,onOpenChange:e=>{e||n()},placement:"bottom-start",middleware:[Zn({padding:8,crossAxis:!1}),Bn({apply({availableWidth:e,availableHeight:t,elements:n}){if(n.floating){const r=Math.max(lp.CONFIG_PANEL_MIN_CONTENT_HEIGHT,t-lp.CONFIG_PANEL_HEADER_HEIGHT-lp.CONFIG_PANEL_BUTTON_HEIGHT-lp.CONFIG_PANEL_PADDING);s(r),Object.assign(n.floating.style,{maxWidth:`${Math.max(0,e)}px`})}}})]}),p=Ri(u,{outsidePress:e=>!e.target.closest("[data-tag]")}),{getFloatingProps:m}=Zi([p]);return a((()=>{if(t&&e){const e={getBoundingClientRect:()=>({width:0,height:0,x:t.x,y:t.y,top:t.y,left:t.x,right:t.x,bottom:t.y})};c.setReference(e),o(!0)}}),[t,e,c]),a((()=>{e||o(!1)}),[e]),{refs:c,floatingStyles:d,getFloatingProps:m,isPositioned:r,contentMaxHeight:l,context:u}})({isOpen:n,savedCoordinates:m||null,onCancel:s}),O=o(null);(({isOpen:e,isPositioned:t,focusSessionKey:n,shouldFocus:r,textInputRef:i})=>{const l=o(!1);a((()=>{e||(l.current=!1)}),[e]),a((()=>{l.current=!1}),[n]),u((()=>{var n;e&&t&&r&&!l.current&&(null===(n=i.current)||void 0===n||n.focus(),l.current=!0)}),[e,t,r,n,i])})({isOpen:n,isPositioned:D,focusSessionKey:`${null!==(h=null==c?void 0:c.id)&&void 0!==h?h:"new"}:${e}`,shouldFocus:l((()=>{if(g)return null!==nt(p,w.conditions);return"text"===ze(p,y.operator)&&!x(y.operator)}),[g,p,w.conditions,y.operator,x]),textInputRef:O});const S=d((()=>{if(g){const e=C();if(!e.isValid)return void b(e.errorMessage);b("");const t=(e=>{const{conditions:t,filterConfig:n}=e,r=[],i=[];for(const e of t)try{const t=Qe(n,e.conditionKey);if(!t){i.push(`条件設定 ${e.conditionKey} が見つかりません`);continue}const o=et(t,e.operator),a=tt(t,e.operator),l=Ku({inputType:o,selectedValues:e.selectedValues,selectedRadioValue:e.selectedRadioValue,startDate:e.startDate,endDate:e.endDate,value:e.value,isRangeOperator:a});if(!l||0===l.length||!l.some((e=>""!==e&&null!=e)))continue;const s=qu(t,e.operator),c=ep({conditionConfig:t,inputType:o,operator:e.operator,values:l,dateFormat:n?Be(n):void 0});r.push({conditionKey:e.conditionKey,conditionLabel:e.conditionLabel,operator:e.operator,operatorLabel:s,values:l,valueLabels:c,isRange:a})}catch(t){const n=t instanceof Error?t.message:"不明なエラーが発生しました";i.push(`条件 ${e.conditionLabel} の処理中にエラーが発生しました: ${n}`)}return{conditions:r,errors:i}})({conditions:w.conditions,filterConfig:p});if(t.errors.length>0)return void b(t.errors.join("\n"));r({operator:"",operatorLabel:"",values:[],valueLabels:[],isRange:!1,conditions:t.conditions})}else{const e=I();if(!e.isValid)return void b(e.errorMessage);b("");const t=ze(p,y.operator),n=Ku({inputType:t,selectedValues:y.selectedValues,selectedRadioValue:y.selectedRadioValue,startDate:y.startDate,endDate:y.endDate,value:y.value,isRangeOperator:x(y.operator)}),i=((e,t)=>{var n;return e&&(null===(n=Ne(e).find((e=>e.value===t)))||void 0===n?void 0:n.label)||t})(p,y.operator),o=(e=>{const{filterConfig:t,inputType:n,operator:r,values:i}=e;return i.map((e=>{if("checkbox"===n||"radio"===n){const n=Ze(t,r).find((t=>t.value===e));return(null==n?void 0:n.label)||String(e)}if("date"===n){const n=Be(t),r=String(e);if(!r||""===r.trim())return r;const i=Zs(r,"YYYY-MM-DD");return i.isValid()?i.format(n):r}return String(e)}))})({filterConfig:p,inputType:t,operator:y.operator,values:n});r({operator:y.operator,operatorLabel:i,values:n,valueLabels:o,isRange:x(y.operator)})}}),[g,p,w,y,I,C,r,x]),{handleKeyDown:V}=(({isOpen:e,canApply:t,handleApply:n,onCancel:r,floatingRef:i})=>{const o=d((e=>{if("Enter"===e.key&&!e.shiftKey&&!e.ctrlKey&&!e.altKey){if(e.isComposing||229===e.keyCode)return void e.preventDefault();e.preventDefault(),t()&&n()}}),[t,n]);return a((()=>{const t=t=>{"Escape"===t.key&&e&&r()};return e&&document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[e,r]),a((()=>{if(!e)return;const t=e=>{var t;const n=e.target;(null===(t=i.current)||void 0===t?void 0:t.contains(n))&&o(e)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[e,o,i]),{handleKeyDown:e=>{o(e)}}})({isOpen:n,canApply:g?E:k,handleApply:S,onCancel:s,floatingRef:M.floating}),H=l((()=>{if(g)return!1;return"text"===ze(p,y.operator)&&("contains"===y.operator||"not_contains"===y.operator)}),[p,y.operator,g]);return t.createElement(kt,Object.assign({ref:M.setFloating,$isOpen:n,$isPositioned:D,style:A,tabIndex:-1,onKeyDown:V},$()),t.createElement(Mt,null,t.createElement(At,null,e)),t.createElement($t,{style:{maxHeight:`${L}px`}},g?t.createElement($p,{filterConfig:p,multiConditionState:w,textInputRef:O,onKeyDown:V}):t.createElement(t.Fragment,null,t.createElement(Dt,null,t.createElement(ju,{value:y.operator,variant:"dark",onChange:e=>{if("string"!=typeof e)return;v();const t=e;y.setOperator(t);const n=Zs().format("YYYY-MM-DD"),r=(e=>{const{filterConfig:t,newOperator:n,isRangeOperator:r,currentStartDate:i,currentEndDate:o,currentValue:a,todayString:l}=e;if(r(n))return{startDate:i&&""!==i.trim()?void 0:l,endDate:o&&""!==o.trim()?void 0:l};{const e={startDate:"",endDate:""};return"date"!==ze(t,n)||a&&""!==a.trim()||(e.value=l),e}})({filterConfig:p,newOperator:t,isRangeOperator:x,currentStartDate:y.startDate,currentEndDate:y.endDate,currentValue:y.value,todayString:n});void 0!==r.startDate&&y.setStartDate(r.startDate),void 0!==r.endDate&&y.setEndDate(r.endDate),void 0!==r.value&&y.setValue(r.value)}},Ne(p).map((e=>t.createElement(Wu,{key:e.value,value:e.value},e.label))))),t.createElement(Dt,null,t.createElement(Mp,{endDate:y.endDate,filterConfig:p,isRangeOperator:x,operator:y.operator,selectedRadioValue:y.selectedRadioValue,selectedValues:y.selectedValues,startDate:y.startDate,textInputRef:O,value:y.value,onEndDateChange:y.handleEndDateChange,onKeyDown:V,onRadioChange:y.handleRadioChange,onStartDateChange:y.handleStartDateChange,onValueChange:y.handleValueChange,onValueToggle:y.handleValueToggle}),H&&t.createElement(Hs,{prepend:t.createElement(ee,{name:"question"})},"カンマ区切りで複数ワードをOR検索できます。")))),f&&t.createElement(Lt,null,t.createElement(Qu,{size:"sm"},f)),t.createElement(Ot,null,t.createElement(Ns,null,t.createElement(ic,{type:"button",size:"small",color:"clear",onClick:s},"キャンセル"),t.createElement(ic,{type:"button",size:"small",disabled:g?!E():!k(),onClick:S},"適用"))))};Dp.displayName="AdvancedFilterConfigPanel";const Lp=({types:e,onFiltersChange:t,initialAppliedFilters:n})=>{const[r,l]=i(null),[s,c]=i(!1),[d,u]=i((()=>null!=n?n:[])),[p,m]=i(null),[h,g]=i(!1),f=o(null),[b,v]=i(24),[x,y]=i(null),w=o(t);w.current=t;const C=o(p);C.current=p;const E=o(d);E.current=d,a((()=>{var t;const n=new Set(e.map((e=>e.type))),r=E.current,i=r.filter((e=>n.has(e.type)));if(i.length!==r.length){u(i),null===(t=w.current)||void 0===t||t.call(w,i);const e=C.current;e&&!n.has(e.type)&&(m(null),c(!1),l(null))}}),[e]);return{selectedType:r,isConfigPanelOpen:s,appliedFilters:d,editingFilter:p,isMenuOpen:h,menuPosition:b,savedMenuCoordinates:x,triggerRef:f,setSelectedType:l,setIsConfigPanelOpen:c,setAppliedFilters:u,setEditingFilter:m,setIsMenuOpen:g,setMenuPosition:v,setSavedMenuCoordinates:y,handleTypeSelect:e=>{l(e),c(!0)},handleConfigApply:n=>{let i;if(p){const e=((e,t)=>t.conditions&&t.conditions.length>0?Object.assign(Object.assign({},e),{operator:"",operatorLabel:"",values:[],valueLabels:[],isRange:!1,conditions:t.conditions}):Object.assign(Object.assign({},e),{operator:t.operator,operatorLabel:t.operatorLabel,values:t.values,valueLabels:t.valueLabels,isRange:t.isRange,conditions:void 0}))(p,n);i=d.map((t=>t.id===p.id?e:t)),m(null)}else{const t=Xe(e,r),o=((e,t,n)=>n.conditions&&n.conditions.length>0?{id:He(),type:e,typeLabel:t,operator:"",operatorLabel:"",values:[],valueLabels:[],isRange:!1,conditions:n.conditions}:{id:He(),type:e,typeLabel:t,operator:n.operator,operatorLabel:n.operatorLabel,values:n.values,valueLabels:n.valueLabels,isRange:n.isRange})(r,t,n);i=[...d,o]}u(i),null==t||t(i),c(!1),l(null)},handleRemoveFilter:e=>{const n=((e,t)=>e.filter((e=>e.id!==t)))(d,e);u(n),null==t||t(n),p&&p.id===e&&(m(null),c(!1),l(null))},handleClearAll:()=>{const e=[];u(e),null==t||t(e),m(null),c(!1),l(null),g(!1)},handleConfigCancel:()=>{c(!1),l(null),m(null)},handleEditFilter:e=>{p&&p.id===e.id||(h&&g(!1),m(e),l(e.type),c(!0))}}};class Op{static calculateMenuPosition(){const e=document.querySelectorAll(sp);if(0===e.length)return lp.DEFAULT_MENU_POSITION;const t=e[0].closest(up);if(!t)return lp.DEFAULT_MENU_POSITION;const n=e[e.length-1].getBoundingClientRect(),r=t.getBoundingClientRect();let i=n.right-r.left+lp.TAG_SPACING;return e.length>=1&&(i+=lp.TAG_OFFSET_MULTIPLE),this.calculateSafePosition(i)}static calculateSafePosition(e){const t=window.innerWidth,n=Math.max(lp.MENU_WIDTH,lp.CONFIG_PANEL_WIDTH);return e+n>t-16?Math.max(0,t-n-16):e}static calculateConfigPanelPosition(e,t,n){const r=t.findIndex((t=>t.id===e.id));if(-1===r)return this.getFallbackPosition();const i=document.querySelectorAll(sp);let o=null;for(const t of Array.from(i)){if(t.getAttribute("data-tag")===e.id){o=t;break}}let a=null==n?void 0:n.current;if(!a){const e=document.querySelector(dp);e&&(a=e)}return o&&a?this.calculateFromActualElements(o,a):a?this.calculateFromTrigger(a,r):this.getFallbackPosition(r)}static calculateFromActualElements(e,t){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{position:r.left-n.left,coordinates:{x:r.left,y:r.bottom+16}}}static calculateFromTrigger(e,t){const n=e.getBoundingClientRect(),r=n.left+lp.ICON_AREA_WIDTH+t*lp.ESTIMATED_TAG_WIDTH;return{position:r-n.left,coordinates:{x:r,y:n.bottom+lp.TAG_SPACING}}}static getFallbackPosition(e=0){const t=lp.FALLBACK_POSITION_X+e*lp.ESTIMATED_TAG_WIDTH;return{position:t,coordinates:{x:t,y:lp.FALLBACK_POSITION_Y}}}static getSavedCoordinates(){const e=document.querySelector(cp);if(!e)return null;const t=e.getBoundingClientRect();return{x:t.left,y:t.top}}}const Sp=({setMenuPosition:e})=>{const t=d((()=>{const t=Op.calculateMenuPosition();e(t)}),[e]);return{handleMenuOpen:t}},Vp=({types:e,placeholder:n="フィルターを追加",disabled:r=!1,filterConfigs:i={},size:o="medium",variant:a="light",width:l="100%",onFiltersChange:s,initialAppliedFilters:c})=>{const{selectedType:d,isConfigPanelOpen:u,appliedFilters:p,editingFilter:m,isMenuOpen:h,menuPosition:g,savedMenuCoordinates:f,triggerRef:b,setMenuPosition:v,setSavedMenuCoordinates:x,setIsMenuOpen:y,handleTypeSelect:w,handleConfigApply:C,handleRemoveFilter:E,handleClearAll:I,handleConfigCancel:k,handleEditFilter:M}=Lp({types:e,onFiltersChange:s,initialAppliedFilters:c}),{handleMenuOpen:A}=Sp({setMenuPosition:v});t.useLayoutEffect((()=>{if(m){const{position:e,coordinates:t}=Op.calculateConfigPanelPosition(m,p,b);v(e),x(t)}}),[m,p,b,v,x]);const $=We(e,p);return t.createElement("div",null,$.length>0&&t.createElement(Os,null,t.createElement(Ls,{open:h,trigger:t.createElement(St,{ref:b,placeholder:n,disabled:r,isOpen:h,appliedFilters:p,size:o,variant:a,width:l,onEditFilter:M,onRemoveFilter:E,onClearAll:I}),minWidth:lp.MENU_WIDTH,placement:"bottom-start",middleware:[Tn({mainAxis:8,crossAxis:g}),Zn({padding:8}),Bn({apply({availableWidth:e,availableHeight:t,elements:n}){if(n.floating){Object.assign(n.floating.style,{width:"max-content",minWidth:`${lp.MENU_WIDTH}px`,maxWidth:`${Math.max(0,e)}px`,maxHeight:`${Math.max(0,t)}px`});const r=n.floating.getBoundingClientRect();x({x:r.left,y:r.top})}}})],onOpenChange:e=>{y(e),e&&A()}},$.map((e=>t.createElement(ut,{key:e.type,disabled:e.disabled,closeOnClick:!0,onClick:()=>w(e.type)},e.label))))),0===$.length&&t.createElement(St,{placeholder:"すべてのフィルターが適用済み",disabled:!0,appliedFilters:p,size:o,variant:a,width:l,onEditFilter:M,onRemoveFilter:E,onClearAll:I}),u&&d&&f&&t.createElement(Dp,{filterType:Xe(e,d),isOpen:u,editingFilter:m,filterConfig:i[d],savedCoordinates:f,onApply:C,onCancel:k}))};Vp.displayName="AdvancedFilter";const Hp=e=>{if(e instanceof Date)return!isNaN(e.getTime());if("number"==typeof e){const t=new Date(e);return!isNaN(t.getTime())}if("string"==typeof e){if(""===e.trim())return!1;return Zs(e).isValid()}return!1},Rp=e=>{if(e instanceof Date)return isNaN(e.getTime())?null:e;if("number"==typeof e){const t=new Date(e);return isNaN(t.getTime())?null:t}if("string"==typeof e){const t=Zs(e);if(t.isValid())return t.toDate()}return null},Np=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),zp=(e,t)=>0===((e,t)=>{const n=Np(e),r=Np(t);return n.getTime()-r.getTime()})(e,t),Tp=[{value:"equals",label:"次に一致する"},{value:"contains",label:"次を含む"},{value:"starts_with",label:"次で始まる"},{value:"ends_with",label:"次で終わる"},{value:"not_equals",label:"次に一致しない"},{value:"not_contains",label:"次を含まない"}],Zp=[{value:"equals",label:"次に一致する"},{value:"greater_than",label:"次より大きい"},{value:"less_than",label:"次より小さい"},{value:"greater_than_or_equal",label:"次以上"},{value:"less_than_or_equal",label:"次以下"},{value:"between",label:"次の範囲内",isRange:!0},{value:"not_between",label:"次の範囲外",isRange:!0}],Bp=[{value:"equals",label:"次に一致する"},{value:"before",label:"次より前"},{value:"after",label:"次より後"},{value:"between",label:"次の範囲内",isRange:!0},{value:"not_between",label:"次の範囲外",isRange:!0}],Pp=[{value:"equals",label:"次に一致する"},{value:"not_equals",label:"次に一致しない"},{value:"in",label:"次のいずれかに一致する"},{value:"not_in",label:"次のいずれにも一致しない"}],_p={text_basic:[Tp[0],Tp[1],Tp[2]],text_search:[Tp[1],Tp[0],Tp[5]],selection_basic:[Pp[0],Pp[1]],selection_multiple:[Pp[2],Pp[0],Pp[3]],date_basic:[Bp[0],Bp[2],Bp[1]],number_basic:[Zp[0],Zp[1],Zp[2],Zp[3],Zp[4]]},Gp=e=>{const t=_p[e];return t?[...t]:[]},Yp=(e,t)=>({value:e,label:t}),Fp=(...e)=>e.flat(),jp=(e,t)=>e.map((e=>Object.assign(Object.assign({},e),{label:t[e.value]||e.label}))),Wp=(e,t)=>Object.assign(Object.assign({},e),{label:t}),Xp=(e,t)=>{const n=Gp(e);return jp(n,t)},Jp=(e,t)=>t.map((t=>e.find((e=>e.value===t)))).filter((e=>void 0!==e)),Up=(e,t)=>t.map((t=>e[t])).filter((e=>void 0!==e)),Qp=(e,t,n)=>{if("boolean"==typeof e&&"boolean"==typeof n[0])return((e,t,n)=>{switch(t){case"equals":return e===n;case"not_equals":return e!==n;default:return!1}})(e,t,n[0]);if("between"===t||"not_between"===t){if(n.length<2)return!1;if("boolean"==typeof e)return!1;return((e,t,n,r)=>{if(Hp(String(e))&&Hp(n)&&Hp(r)){const i=Rp(String(e)),o=Rp(n),a=Rp(r);if(i&&o&&a){const e=Np(i),n=Np(o),r=Np(a),l=e>=n&&e<=r;return"between"===t?l:!l}}const i=Number(e),o=Number(n),a=Number(r);if(!isNaN(i)&&!isNaN(o)&&!isNaN(a)){const e=i>=o&&i<=a;return"between"===t?e:!e}return!1})(e,t,"string"==typeof n[0]?n[0]:String(n[0]),"string"==typeof n[1]?n[1]:String(n[1]))}if("before"===t||"after"===t){if("boolean"==typeof e)return!1;return((e,t,n)=>{if(Hp(String(e))&&Hp(n)){const r=Rp(String(e)),i=Rp(n);if(r&&i){const e=Np(r),n=Np(i);return"before"===t?e<n:e>n}}const r=Number(e),i=Number(n);return!isNaN(r)&&!isNaN(i)&&("before"===t?r<i:r>i)})(e,t,"string"==typeof n[0]?n[0]:String(n[0]))}if("equals"===t||"not_equals"===t){if("boolean"==typeof e)return!1;if(n.length>1){const r=String(e).toLowerCase(),i=n.map((e=>"string"==typeof e?e.toLowerCase():String(e))).includes(r);return"equals"===t?i:!i}return((e,t,n)=>{if(Hp(String(e))&&Hp(n)){const r=Rp(String(e)),i=Rp(n);if(r&&i){const e=zp(r,i);return"equals"===t?e:!e}}const r=String(e).toLowerCase()===n.toLowerCase();return"equals"===t?r:!r})(e,t,"string"==typeof n[0]?n[0]:String(n[0]||""))}const r="string"==typeof n[0]?n[0]:String(n[0]||"");if("contains"===t||"not_contains"===t||"starts_with"===t||"ends_with"===t)return((e,t,n)=>{const r=e.toLowerCase(),i=n.trim();if(("contains"===t||"not_contains"===t)&&i.includes(",")){const e=gd(i);return"contains"===t?e.some((e=>r.includes(e.toLowerCase()))):!e.some((e=>r.includes(e.toLowerCase())))}const o=i.toLowerCase();switch(t){case"contains":return r.includes(o);case"not_contains":return!r.includes(o);case"starts_with":return r.startsWith(o);case"ends_with":return r.endsWith(o);default:return!1}})(String(e),t,r);if("in"===t||"not_in"===t){const r=String(e).toLowerCase(),i=n.map((e=>"string"==typeof e?e.toLowerCase():String(e))).includes(r);return"in"===t?i:!i}if("greater_than"===t||"less_than"===t||"greater_than_or_equal"===t||"less_than_or_equal"===t){const n=Number(e);if(!isNaN(n))return((e,t,n)=>{const r=Number(n);if(isNaN(r))return!1;switch(t){case"greater_than":return e>r;case"less_than":return e<r;case"greater_than_or_equal":return e>=r;case"less_than_or_equal":return e<=r;default:return!1}})(n,t,r)}return!0},Kp=(e,t,n,r)=>r.length?e.filter((e=>{const i=e[t];return Qp(i,n,r)})):e,qp=(e,t)=>t.reduce(((e,t)=>Kp(e,t.field,t.operator,t.values)),e),em=(e,t,n,r)=>{const i=n.filter((e=>e.values&&e.values.length>0));return 0!==i.length&&i.every((n=>{var i;const{conditionKey:o,operator:a,values:l}=n,s=null==r?void 0:r[t],c=null===(i=null==s?void 0:s.multiConditionConfigs)||void 0===i?void 0:i.find((e=>e.conditionKey===o)),d=((e,t,n,r)=>{const i=e[r||`${t}Attr`];if(i&&"object"==typeof i&&n in i)return i[n]})(e,t,o,null==c?void 0:c.valueSource);return(null==c?void 0:c.customOperator)?c.customOperator(l,a,d):Qp(d,a,l)}))},tm=(e,t)=>({value:e,label:t}),nm=(...e)=>e.flat(),rm=(e,t)=>e.map((e=>Object.assign(Object.assign({},e),{label:t[e.value]||e.label}))),im=(e,t)=>Object.assign(Object.assign({},e),{label:t}),om=(e,t)=>t.map((t=>e.find((e=>e.value===t)))).filter((e=>void 0!==e)),am=(e,t)=>t.map((t=>e[t])).filter((e=>void 0!==e)),lm=e=>e.map((e=>e.value)),sm=e=>e.map((e=>e.label)),cm=(e,t)=>t.map((t=>{const n=e.find((e=>e.value===t));return(null==n?void 0:n.label)||t})),dm=(...e)=>{const t=e.flat().filter(((e,t,n)=>t===n.findIndex((t=>t.value===e.value))));return t},um=(e,t="label")=>[...e].sort(((e,n)=>e[t].localeCompare(n[t]))),pm=x.div`
|
|
1099
1099
|
position: fixed;
|
|
@@ -1838,7 +1838,7 @@ object-assign
|
|
|
1838
1838
|
z-index: ${({theme:e})=>e.depth.modal};
|
|
1839
1839
|
|
|
1840
1840
|
visibility: ${({isHidden:e})=>e?"hidden":"visible"};
|
|
1841
|
-
`,kg=({disablePortal:t=!1,container:n,children:r})=>{const[i,o]=e.useState(null);return e.useEffect((()=>{o(n||document.body)}),[n]),t?r||null:i?I.createPortal(r,i):null},Mg=e.forwardRef((function({isOpen:t=!0,hasBackground:n=!0,backdropProps:r,enableTransition:i=!0,onClose:o,children:a},l){const[s,c]=e.useState(!0),d=()=>{c(!1)},u=()=>{c(!0)},p={};return i&&a.props.hasOwnProperty("in")&&(p.onEnter=ps(d,a.props.onEnter),p.onExited=ps(u,a.props.onExited)),e.createElement(kg,null,e.createElement(Ig,{ref:l,isHidden:!t&&s},n&&e.createElement(mm,Object.assign({},r,{isOpen:!i||t,onClick:e=>{o&&o(e,"backdropClick")}})),e.cloneElement(a,p)))})),Ag=e.forwardRef((function(t,n){const r=wp({props:t,name:"ConfirmModal"}),{title:i,confirmText:o="Confirm",cancelText:a="Cancel",children:l,onClose:s,onSubmit:c,onConfirm:d,buttonColor:u="primary",isOpen:p=!0,disabled:m,loading:h,overflowYScroll:g=!0,disableHorizontalPadding:f=!1,subActions:b,modalProps:v,fadeProps:x}=r,y=J(),w=!(!c&&!d),C=e=>t=>{s&&s(t,e)},E=d?"button":"submit",I=e.createElement(e.Fragment,null,e.createElement(vg,null,e.createElement(xg,null,e.createElement(ve,{weight:"bold",size:"xxxl"},i),b&&e.createElement(Fs,{pl:2},e.createElement(re,{display:"flex",alignItems:"center",gap:1},b.map(((t,n)=>e.createElement(e.Fragment,{key:n},t)))))),e.createElement(Cg,{onClick:C("clickCloseIcon")},e.createElement(ee,{name:"close",size:"lg",color:y.palette.black}))),e.createElement(yg,{overflowYScroll:g,showFooter:w},f?l:e.createElement(Fs,{px:3,pb:3},l)),w&&e.createElement(wg,null,e.createElement(re,{display:"flex",alignItems:"center"},e.createElement(ic,{type:"button",color:"clear",inline:!0,onClick:C("clickCancelButton")},a),e.createElement(Fs,{pr:2}),e.createElement(ic,{type:E,color:u,disabled:m,inline:!0,onClick:d},o))));return e.createElement(Mg,Object.assign({isOpen:p,onClose:s},v),e.createElement(Iu,Object.assign({in:p,unmountOnExit:!0},x),e.createElement(bg,{ref:n},c&&!d?e.createElement("form",{onSubmit:c},I):I,h&&e.createElement(Eg,null,e.createElement(Ks,null)))))})),$g=x.div`
|
|
1841
|
+
`,kg=({disablePortal:t=!1,container:n,children:r})=>{const[i,o]=e.useState(null);return e.useEffect((()=>{o(n||document.body)}),[n]),t?r||null:i?I.createPortal(r,i):null},Mg=e.forwardRef((function({isOpen:t=!0,hasBackground:n=!0,backdropProps:r,enableTransition:i=!0,onClose:o,children:a},l){const[s,c]=e.useState(!0),d=()=>{c(!1)},u=()=>{c(!0)},p={};return i&&a.props.hasOwnProperty("in")&&(p.onEnter=ps(d,a.props.onEnter),p.onExited=ps(u,a.props.onExited)),e.createElement(kg,null,e.createElement(Ig,{ref:l,isHidden:!t&&s},n&&e.createElement(mm,Object.assign({},r,{isOpen:!i||t,onClick:e=>{o&&o(e,"backdropClick")}})),e.cloneElement(a,p)))})),Ag=e.forwardRef((function(t,n){const r=wp({props:t,name:"ConfirmModal"}),{title:i,confirmText:o="Confirm",cancelText:a="Cancel",children:l,onClose:s,onSubmit:c,onConfirm:d,buttonColor:u="primary",isOpen:p=!0,disabled:m,loading:h,overflowYScroll:g=!0,disableHorizontalPadding:f=!1,subActions:b,modalProps:v,fadeProps:x}=r,y=J(),w=!(!c&&!d),C=e=>t=>{s&&s(t,e)},E=d?"button":"submit",I=e.createElement(e.Fragment,null,e.createElement(vg,null,e.createElement(xg,null,e.createElement(ve,{weight:"bold",size:"xxxl"},i),b&&e.createElement(Fs,{pl:2},e.createElement(re,{display:"flex",alignItems:"center",gap:1},b.map(((t,n)=>e.createElement(e.Fragment,{key:n},t)))))),e.createElement(Cg,{onClick:C("clickCloseIcon")},e.createElement(ee,{name:"close",size:"lg",color:y.palette.black}))),e.createElement(yg,{overflowYScroll:g,showFooter:w},f?l:e.createElement(Fs,{px:3,pb:3},l)),w&&e.createElement(wg,null,e.createElement(re,{display:"flex",alignItems:"center"},e.createElement(ic,{type:"button",color:"clear",inline:!0,onClick:C("clickCancelButton")},a),e.createElement(Fs,{pr:2}),e.createElement(ic,{type:E,color:u,disabled:m,inline:!0,onClick:d},o))));return e.createElement(Mg,Object.assign({isOpen:p,onClose:s},v),e.createElement(Iu,Object.assign({in:p,unmountOnExit:!0},x),e.createElement(bg,{ref:n,role:"dialog","aria-modal":"true","aria-label":i},c&&!d?e.createElement("form",{onSubmit:c},I):I,h&&e.createElement(Eg,null,e.createElement(Ks,null)))))})),$g=x.div`
|
|
1842
1842
|
display: ${({inline:e})=>e?"inline-block":"block"};
|
|
1843
1843
|
padding: ${({theme:e})=>e.spacing}px 0;
|
|
1844
1844
|
border-radius: ${({theme:e})=>e.radius}px;
|
|
@@ -2125,7 +2125,7 @@ object-assign
|
|
|
2125
2125
|
background-color: ${({active:e,theme:t})=>e?t.palette.primary.base:t.palette.primary.highlight};
|
|
2126
2126
|
cursor: ${({active:e})=>e?"default":"pointer"};
|
|
2127
2127
|
}
|
|
2128
|
-
`,hw=({index:t,isActiveIndex:n,onClick:r})=>e.createElement(mw,{disabled:n,active:n,type:"button",onClick:r},e.createElement(ve,{component:"span",weight:"bold",size:"xs",color:n?"white":"primary"},t)),gw=x.button`
|
|
2128
|
+
`,hw=({index:t,isActiveIndex:n,onClick:r})=>e.createElement(mw,{disabled:n,active:n,type:"button","aria-label":`${t} ページ目`,"aria-current":n?"page":void 0,onClick:r},e.createElement(ve,{component:"span",weight:"bold",size:"xs",color:n?"white":"primary"},t)),gw=x.button`
|
|
2129
2129
|
width: 28px;
|
|
2130
2130
|
height: 28px;
|
|
2131
2131
|
padding: 0 5px;
|
|
@@ -2143,7 +2143,7 @@ object-assign
|
|
|
2143
2143
|
background-color: ${({disabled:e,theme:t})=>e?t.palette.neutral.softLight:t.palette.primary.highlight};
|
|
2144
2144
|
cursor: ${({disabled:e})=>e?"default":"pointer"};
|
|
2145
2145
|
}
|
|
2146
|
-
`,fw=({isRight:t,disabled:n,onClick:r})=>{const i=J();return e.createElement(gw,{disabled:n,type:"button","aria-label":t?"
|
|
2146
|
+
`,fw=({isRight:t,disabled:n,onClick:r})=>{const i=J();return e.createElement(gw,{disabled:n,type:"button","aria-label":t?"次のページへ":"前のページへ",onClick:r},e.createElement(ee,{name:t?"arrow_right":"arrow_left",size:"md",color:n?i.palette.text.disabled:i.palette.icon.active}))},bw=x.div`
|
|
2147
2147
|
width: 28px;
|
|
2148
2148
|
height: 28px;
|
|
2149
2149
|
margin: 0 ${({theme:e})=>.5*e.spacing}px;
|
|
@@ -2153,7 +2153,7 @@ object-assign
|
|
|
2153
2153
|
letter-spacing: 1.5px;
|
|
2154
2154
|
font-size: 12px;
|
|
2155
2155
|
font-weight: bold;
|
|
2156
|
-
`,vw=()=>e.createElement(bw,null,"..."),xw=({pagerCount:t,index:n,onClick:r})=>{const i=((e,t)=>{switch(!0){case t<4:return 3;case e-3<t:return e-2;default:return t}})(t,n),o=e=>()=>r(e);return e.createElement(e.Fragment,null,e.createElement(hw,{index:1,isActiveIndex:1===n,onClick:o(1)}),3!==i&&e.createElement(vw,null),((e,t)=>{switch(e){case 3:return[e-1,e,e+1,e+2];case t-2:return[e-2,e-1,e,e+1];default:return[e-1,e,e+1]}})(i,t).map((t=>e.createElement(hw,{key:t,index:t,isActiveIndex:n===t,onClick:o(t)}))),i!==t-2&&e.createElement(vw,null),e.createElement(hw,{index:t,isActiveIndex:n===t,onClick:o(t)}))},yw=e.forwardRef((function({per:t,total:n,index:r=1,onClick:i},o){const a=Math.ceil(n/t),l=1===r||0===n,s=r===a||0===n,c=e=>()=>i(e);return e.createElement(re,{ref:o,display:"flex",alignItems:"center"},e.createElement(fw,{isRight:!1,disabled:l,onClick:c(r-1)}),a<7?[...Array(a)].map(((t,n)=>e.createElement(hw,{key:n,index:n+1,isActiveIndex:r===n+1,onClick:c(n+1)}))):e.createElement(xw,{pagerCount:a,index:r,onClick:i}),e.createElement(fw,{isRight:!0,disabled:s,onClick:c(r+1)}))}));function ww(e,{per:t,index:n}){return e.slice((n-1)*t,n*t)}const Cw=(t=100,n=1)=>e.useState({per:t,index:n}),Ew=x.div`
|
|
2156
|
+
`,vw=()=>e.createElement(bw,null,"..."),xw=({pagerCount:t,index:n,onClick:r})=>{const i=((e,t)=>{switch(!0){case t<4:return 3;case e-3<t:return e-2;default:return t}})(t,n),o=e=>()=>r(e);return e.createElement(e.Fragment,null,e.createElement(hw,{index:1,isActiveIndex:1===n,onClick:o(1)}),3!==i&&e.createElement(vw,null),((e,t)=>{switch(e){case 3:return[e-1,e,e+1,e+2];case t-2:return[e-2,e-1,e,e+1];default:return[e-1,e,e+1]}})(i,t).map((t=>e.createElement(hw,{key:t,index:t,isActiveIndex:n===t,onClick:o(t)}))),i!==t-2&&e.createElement(vw,null),e.createElement(hw,{index:t,isActiveIndex:n===t,onClick:o(t)}))},yw=e.forwardRef((function({per:t,total:n,index:r=1,onClick:i},o){const a=Math.ceil(n/t),l=1===r||0===n,s=r===a||0===n,c=e=>()=>i(e);return e.createElement(re,{ref:o,display:"flex",alignItems:"center",role:"navigation","aria-label":"ページネーション"},e.createElement(fw,{isRight:!1,disabled:l,onClick:c(r-1)}),a<7?[...Array(a)].map(((t,n)=>e.createElement(hw,{key:n,index:n+1,isActiveIndex:r===n+1,onClick:c(n+1)}))):e.createElement(xw,{pagerCount:a,index:r,onClick:i}),e.createElement(fw,{isRight:!0,disabled:s,onClick:c(r+1)}))}));function ww(e,{per:t,index:n}){return e.slice((n-1)*t,n*t)}const Cw=(t=100,n=1)=>e.useState({per:t,index:n}),Ew=x.div`
|
|
2157
2157
|
display: flex;
|
|
2158
2158
|
flex-direction: column;
|
|
2159
2159
|
align-items: center;
|
|
@@ -2695,7 +2695,7 @@ object-assign
|
|
|
2695
2695
|
}
|
|
2696
2696
|
`,yE=x.span`
|
|
2697
2697
|
${_}
|
|
2698
|
-
`,wE=n((function(e,n){var{format:r="YYYY-MM-DD",error:i=!1,errorText:o,disabled:a=!1,size:s="medium",variant:c="light",startWidth:d,endWidth:u,append:p,onAppendClick:m}=e,h=D(e,["format","error","errorText","disabled","size","variant","startWidth","endWidth","append","onAppendClick"]);we("DateRangeField","DateRangeField は非推奨です。代わりに DateRangeField2 を使用してください。");const g=l((()=>9*fE(r)*(parseInt(as[s].fontSize)/13)+"px"),[r,s]),f=l((()=>`${9*fE(r)*(parseInt(as[s].fontSize)/13)+(p?32:0)}px`),[r,s,p]),b=null!=d?d:g,v=null!=u?u:f,x=e=>t=>{var n,r;const{startDate:i,endDate:o}=h.date;e===Oh?null===(n=h.onDatesChange)||void 0===n||n.call(h,{endDate:o,startDate:t}):null===(r=h.onDatesChange)||void 0===r||r.call(h,{startDate:i,endDate:t})},y=gE(Object.assign(Object.assign({},h),{format:r,date:h.date.startDate,onDateChange:x(Oh)})),{ref:w}=y,C=D(y,["ref"]),E=gE(Object.assign(Object.assign({},h),{format:r,date:h.date.endDate,onDateChange:x(Sh)})),{ref:I}=E,k=D(E,["ref"]),M=ku(n,w),A=ku(n,I);return t.createElement(t.Fragment,null,t.createElement(xE,{error:i||!!o,disabled:a,$size:s,$variant:c},t.createElement(gs,Object.assign({ref:M,readOnly:!0,disabled:a,width:b,size:s,variant:c,error:i||!!o,style:{border:"none",background:"transparent",textAlign:"center",boxShadow:"none"}},C)),t.createElement(yE,null,"-"),t.createElement(gs,Object.assign({ref:A,readOnly:!0,disabled:a,width:v,size:s,variant:c,error:i||!!o,style:{border:"none",background:"transparent",textAlign:"center",boxShadow:"none"},append:p,onAppendClick:m},k))),o&&t.createElement(Fs,{pt:1},t.createElement(Qu,null,o)))}));var CE=p(wE);const EE=({date:e,format:t="YYYY-MM-DD",disabled:n=!1,onDateChange:r})=>{var l;Zs.extend(hE);const[s,c]=i(null!==(l=null==e?void 0:e.format(t))&&void 0!==l?l:""),[u,p]=i(jC(s)),[m,h]=i(null),g=o(null),f=o(0),[b,v]=i(!1),x=o([]),y=o(null),w=d((e=>{g.current=e,h(e)}),[]),C=d((e=>{w(e),f.current=0;const t=x.current[e];t&&t!==document.activeElement&&t.focus()}),[w]);a((()=>{var n;const r=null!==(n=null==e?void 0:e.format(t))&&void 0!==n?n:"";c(r),p(jC(r))}),[e,t]);const E=d(((e,t)=>{for(let n=e+t;n>=0&&n<u.length;n+=t)if(u[n].editable)return n;return null}),[u]),I=d((e=>{const n=g.current;if(null===n)return;const i=u[n];if(!(null==i?void 0:i.editable))return;const o=f.current;let a=i.value;0===o&&(a="".padStart(i.value.length,"0"));const l=`${a.slice(1)}${e}`,s=[...u];s[n]=Object.assign(Object.assign({},s[n]),{value:l}),p(s);const d=o+1;f.current=d;const m=u.slice(0,n+1).filter((e=>e.editable)).length-1,h=XC(i.value.length,t,m);if(JC(e,o,h,i.value.length)){const e=WC(s);if(!Zs(e,t,!0).isValid())return void c(e);f.current=0;const i=E(n,1);null!==i&&C(i);const o=Zs(e,t,!0),a=o.format(t);c(a),p(jC(a)),null==r||r(o)}else{const e=WC(s);if(!Zs(e,t,!0).isValid())return void c(e);const n=Zs(e,t);c(n.format(t)),null==r||r(n)}}),[u,t,r,E,C]),k=d((e=>t=>{x.current[e]=t}),[]),M=d((e=>()=>{v(!0),w(e),f.current=0}),[w]),A=d((e=>t=>{const n=t.relatedTarget;y.current&&n&&y.current.contains(n)||g.current===e&&(v(!1),w(null),f.current=0)}),[w]),$=d((e=>n=>{const i=u[e];if(!(null==i?void 0:i.editable))return;if(n.ctrlKey||n.metaKey||n.altKey)return;if(n.key===UC.ArrowUp||n.key===UC.ArrowDown){n.preventDefault();const i=n.key===UC.ArrowUp?1:-1,o=Number(u[e].value)+i,a=String(o).padStart(u[e].value.length,"0"),l=[...u];l[e]=Object.assign(Object.assign({},l[e]),{value:a}),p(l);const s=WC(l),d=Zs(s,t),m=d.format(t);return c(m),p(jC(m)),void(d.isValid()&&(null==r||r(d)))}if(n.key===UC.Backspace||n.key===UC.Delete){n.preventDefault(),n.stopPropagation();const t=n.key===UC.Backspace,r="0".repeat(i.value.length);if(i.value===r&&0===f.current){if(t){const t=E(e,-1);null!==t&&C(t)}return}const o=[...u];return o[e]=Object.assign(Object.assign({},o[e]),{value:r}),p(o),f.current=0,void c(WC(o))}if(eE(n.code)){n.preventDefault();const e=tE(n.code);e&&I(e)}}),[u,t,r,I,E,C]),D=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)&&I(e)}}),[I]),L=d((e=>{const
|
|
2698
|
+
`,wE=n((function(e,n){var{format:r="YYYY-MM-DD",error:i=!1,errorText:o,disabled:a=!1,size:s="medium",variant:c="light",startWidth:d,endWidth:u,append:p,onAppendClick:m}=e,h=D(e,["format","error","errorText","disabled","size","variant","startWidth","endWidth","append","onAppendClick"]);we("DateRangeField","DateRangeField は非推奨です。代わりに DateRangeField2 を使用してください。");const g=l((()=>9*fE(r)*(parseInt(as[s].fontSize)/13)+"px"),[r,s]),f=l((()=>`${9*fE(r)*(parseInt(as[s].fontSize)/13)+(p?32:0)}px`),[r,s,p]),b=null!=d?d:g,v=null!=u?u:f,x=e=>t=>{var n,r;const{startDate:i,endDate:o}=h.date;e===Oh?null===(n=h.onDatesChange)||void 0===n||n.call(h,{endDate:o,startDate:t}):null===(r=h.onDatesChange)||void 0===r||r.call(h,{startDate:i,endDate:t})},y=gE(Object.assign(Object.assign({},h),{format:r,date:h.date.startDate,onDateChange:x(Oh)})),{ref:w}=y,C=D(y,["ref"]),E=gE(Object.assign(Object.assign({},h),{format:r,date:h.date.endDate,onDateChange:x(Sh)})),{ref:I}=E,k=D(E,["ref"]),M=ku(n,w),A=ku(n,I);return t.createElement(t.Fragment,null,t.createElement(xE,{error:i||!!o,disabled:a,$size:s,$variant:c},t.createElement(gs,Object.assign({ref:M,readOnly:!0,disabled:a,width:b,size:s,variant:c,error:i||!!o,style:{border:"none",background:"transparent",textAlign:"center",boxShadow:"none"}},C)),t.createElement(yE,null,"-"),t.createElement(gs,Object.assign({ref:A,readOnly:!0,disabled:a,width:v,size:s,variant:c,error:i||!!o,style:{border:"none",background:"transparent",textAlign:"center",boxShadow:"none"},append:p,onAppendClick:m},k))),o&&t.createElement(Fs,{pt:1},t.createElement(Qu,null,o)))}));var CE=p(wE);const EE=({date:e,format:t="YYYY-MM-DD",disabled:n=!1,onDateChange:r})=>{var l;Zs.extend(hE);const[s,c]=i(null!==(l=null==e?void 0:e.format(t))&&void 0!==l?l:""),[u,p]=i(jC(s)),[m,h]=i(null),g=o(null),f=o(0),[b,v]=i(!1),x=o([]),y=o(null),w=d((e=>{g.current=e,h(e)}),[]),C=d((e=>{w(e),f.current=0;const t=x.current[e];t&&t!==document.activeElement&&t.focus()}),[w]);a((()=>{var n;const r=null!==(n=null==e?void 0:e.format(t))&&void 0!==n?n:"";c(r),p(jC(r))}),[e,t]);const E=d(((e,t)=>{for(let n=e+t;n>=0&&n<u.length;n+=t)if(u[n].editable)return n;return null}),[u]),I=d((e=>{const n=g.current;if(null===n)return;const i=u[n];if(!(null==i?void 0:i.editable))return;const o=f.current;let a=i.value;0===o&&(a="".padStart(i.value.length,"0"));const l=`${a.slice(1)}${e}`,s=[...u];s[n]=Object.assign(Object.assign({},s[n]),{value:l}),p(s);const d=o+1;f.current=d;const m=u.slice(0,n+1).filter((e=>e.editable)).length-1,h=XC(i.value.length,t,m);if(JC(e,o,h,i.value.length)){const e=WC(s);if(!Zs(e,t,!0).isValid())return void c(e);f.current=0;const i=E(n,1);null!==i&&C(i);const o=Zs(e,t,!0),a=o.format(t);c(a),p(jC(a)),null==r||r(o)}else{const e=WC(s);if(!Zs(e,t,!0).isValid())return void c(e);const n=Zs(e,t);c(n.format(t)),null==r||r(n)}}),[u,t,r,E,C]),k=d((e=>t=>{x.current[e]=t}),[]),M=d((e=>()=>{v(!0),w(e),f.current=0}),[w]),A=d((e=>t=>{const n=t.relatedTarget;y.current&&n&&y.current.contains(n)||g.current===e&&(v(!1),w(null),f.current=0)}),[w]),$=d((e=>n=>{const i=u[e];if(!(null==i?void 0:i.editable))return;if(n.ctrlKey||n.metaKey||n.altKey)return;if(n.key===UC.ArrowUp||n.key===UC.ArrowDown){n.preventDefault();const i=n.key===UC.ArrowUp?1:-1,o=Number(u[e].value)+i,a=String(o).padStart(u[e].value.length,"0"),l=[...u];l[e]=Object.assign(Object.assign({},l[e]),{value:a}),p(l);const s=WC(l),d=Zs(s,t),m=d.format(t);return c(m),p(jC(m)),void(d.isValid()&&(null==r||r(d)))}if(n.key===UC.Backspace||n.key===UC.Delete){n.preventDefault(),n.stopPropagation();const t=n.key===UC.Backspace,r="0".repeat(i.value.length);if(i.value===r&&0===f.current){if(t){const t=E(e,-1);null!==t&&C(t)}return}const o=[...u];return o[e]=Object.assign(Object.assign({},o[e]),{value:r}),p(o),f.current=0,void c(WC(o))}if(eE(n.code)){n.preventDefault();const e=tE(n.code);e&&I(e)}}),[u,t,r,I,E,C]),D=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)&&I(e)}}),[I]),L=d((e=>{var r;const i=u[e];if(!(!n&&(null==i?void 0:i.editable)))return{ref:k(e),"aria-hidden":!0};const o=u.slice(0,e+1).filter((e=>e.editable)).length-1,a={year:"年",month:"月",day:"日",unknown:void 0}[XC(null!==(r=null==i?void 0:i.value.length)&&void 0!==r?r:0,t,o)];return{ref:k(e),role:"spinbutton",contentEditable:!0,suppressContentEditableWarning:!0,inputMode:"numeric",tabIndex:0,enterKeyHint:"next",spellCheck:!1,autoCorrect:"off",style:{caretColor:"transparent"},"aria-label":a,onFocus:M(e),onBlur:A(e),onKeyDown:$(e),onBeforeInput:D(e),onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}}}),[u,n,t,k,M,A,$,D]),O=d((e=>{const t=g.current;if(null!==t)if(e.key!==UC.ArrowLeft&&e.key!==UC.ArrowRight){if(e.key===UC.Tab){const n=e.shiftKey?-1:1,r=E(t,n);null!==r&&(e.preventDefault(),C(r))}}else{e.preventDefault();const n=e.key===UC.ArrowLeft?-1:1,r=E(t,n);null!==r&&C(r)}}),[E,C]),S=d((e=>{e.preventDefault();const n=e.clipboardData.getData("text").trim(),i=/[Hh]|mm|ss/.test(t),o=[t];o.push("YYYY年M月D日","YYYY年MM月DD日"),i&&o.push("YYYY年M月D日 HH:mm","YYYY年MM月DD日 HH:mm","YYYY年M月D日 HH:mm:ss","YYYY年MM月DD日 HH:mm:ss"),o.push("YYYY-MM-DD","YYYY-M-DD","YYYY-MM-D","YYYY-M-D","YYYY/MM/DD","YYYY/M/DD","YYYY/MM/D","YYYY/M/D"),i&&o.push("YYYY-MM-DD HH:mm","YYYY-M-DD HH:mm","YYYY-MM-D HH:mm","YYYY-M-D HH:mm","YYYY/MM/DD HH:mm","YYYY/M/DD HH:mm","YYYY/MM/D HH:mm","YYYY/M/D HH:mm");const a=n.match(/(\d{4})[-/年](\d{1,2})[-/月](\d{1,2})/);if(a){const[,e,t,n]=a,r=parseInt(e,10),i=parseInt(t,10),o=parseInt(n,10);if(r<1900||r>2100||i<1||i>12||o<1||o>31)return;if(o>Zs(`${r}-${i}-01`).daysInMonth())return}let l=null;const s=Zs(n);if(s.isValid())l=s;else for(const e of o){const t=Zs(n,e,!0);if(t.isValid()){l=t;break}}if(!(null==l?void 0:l.isValid()))return;const c=l.year(),d=l.month()+1,u=l.date();if(!(c<1900||c>2100||d<1||d>12||u<1||u>31)){if(i){const e=n.match(/(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?/);if(e){const t=parseInt(e[1],10),n=parseInt(e[2],10),r=e[3]?parseInt(e[3],10):0;if(t<0||t>23||n<0||n>59||r<0||r>59)return}}null==r||r(l)}}),[t,r]);return{value:s,sections:u,focusedIndex:m,isFocused:b,getSegmentProps:L,groupProps:{ref:y,onKeyDown:O,onPaste:S}}},IE=x.div`
|
|
2699
2699
|
position: relative;
|
|
2700
2700
|
display: inline-flex;
|
|
2701
2701
|
align-items: center;
|
|
@@ -2923,7 +2923,7 @@ object-assign
|
|
|
2923
2923
|
`,QE=x.span`
|
|
2924
2924
|
display: flex;
|
|
2925
2925
|
align-items: center;
|
|
2926
|
-
`,KE=({size:t="medium",color:n="primary",onClick:r,split:i=!1,contents:o=[],disabled:a=!1,children:l,icon:s,selectedValue:c,menuWidth:d=200,loading:u=!1})=>{const
|
|
2926
|
+
`,KE=({size:t="medium",color:n="primary",onClick:r,split:i=!1,contents:o=[],disabled:a=!1,children:l,icon:s,selectedValue:c,menuWidth:d=200,loading:u=!1,toggleAriaLabel:p="メニューを開く"})=>{const m=J(),h=!!u,g="string"==typeof u?u:u?"Loading...":void 0,f=((e,t)=>e?m.palette.text.disabled:"primary"===t?m.palette.white:m.palette.black)(a||h,n),b=e.useMemo((()=>({small:"16px",medium:"18px",large:"20px"}[t])),[t]),v=void 0!==c?c:l,x=e.useMemo((()=>e.createElement(ee,{name:"arrow_bottom",size:FE[t].arrowIconSize,color:f})),[t,f]),y=e.useMemo((()=>h?e.createElement(Ks,{width:b}):null),[h,b]),w=!!s,C=!!v,E=h?w?y:void 0:s,I=h?!w&&C||w&&C?g:void 0:v,k=h?w?y:void 0:s,M=(()=>{if(h&&(!w||C))return C?g:void 0})(),A=i?e.createElement(jE,null,e.createElement(WE,{size:t,color:n,inline:!0,disabled:a||h,icon:E,onClick:r},I),e.createElement(XE,{size:t,color:n,inline:!0,disabled:a||h,"data-testid":"menu-toggle","aria-label":p},x)):e.createElement(JE,{size:t,color:n,disabled:a||h,"data-testid":"menu-toggle",icon:k,"aria-label":C?void 0:p},e.createElement(UE,null,h?M?e.createElement(e.Fragment,null,"string"==typeof M?e.createElement(_s,null,M):M,e.createElement(QE,null,e.createElement(Fs,{pr:.5}),x)):e.createElement(QE,null,e.createElement(Fs,{pr:.5}),x):e.createElement(e.Fragment,null,v&&e.createElement(_s,null,v),e.createElement(QE,null,e.createElement(Fs,{pr:.5}),x))));return e.createElement(Os,null,e.createElement(Ls,{trigger:A,width:d},o.map(((t,n)=>e.createElement(e.Fragment,{key:`${n}-${t.text}`},t.divideTop&&e.createElement(Rs,null),(t=>"heading"===t.type?e.createElement(Ss,null,t.text):"helpText"===t.type?e.createElement(Hs,{prepend:t.prepend},t.text):void 0!==t.checked?e.createElement(io,{closeOnChange:!0,checked:t.checked,color:t.color,disabled:t.disabled,prepend:t.icon,onChange:t.onChange},t.text):e.createElement(dt,{closeOnClick:!0,color:t.color,disabled:t.disabled,prepend:t.icon,onClick:t.onClick},t.text))(t))))))},qE=x.div`
|
|
2927
2927
|
background-color: ${({theme:e})=>e.palette.background.default};
|
|
2928
2928
|
border: 1px solid ${({theme:e})=>e.palette.divider};
|
|
2929
2929
|
border-radius: ${({theme:e})=>e.radius}px;
|
|
@@ -2969,7 +2969,7 @@ object-assign
|
|
|
2969
2969
|
align-items: center;
|
|
2970
2970
|
justify-content: center;
|
|
2971
2971
|
gap: ${({theme:e})=>2*e.spacing}px;
|
|
2972
|
-
`,hI=({items:e,selectedItemTitle:n,onRemove:r})=>{const i=J();return t.createElement(sI,null,t.createElement(cI,null,t.createElement(ve,{size:"sm",weight:"bold"},t.createElement(ve,{color:"primary",component:"span",size:"sm",weight:"bold"},e.length," "),n)),t.createElement(dI,null,e.map(((n,o)=>t.createElement(uI,{key:n.id,isLastIndex:o+1===e.length},n.content,t.createElement(mI,null,r&&t.createElement(pI,{type:"button",onClick:()=>r(n)},t.createElement(ee,{color:i.palette.black,name:"close_circle",type:"fill"}))))))))},gI=(e,t)=>{const n=[];return e.forEach((e=>{if(e.items)return void n.push(Object.assign(Object.assign({},e),{items:gI(e.items,t)}));t.find((t=>t.id===e.id))?n.push(Object.assign(Object.assign({},e),{selected:!0})):n.push(e)})),n},fI=e.forwardRef((function(t){const{candidateItems:n,selectedItems:r,selectedItemTitle:i,disableCheckbox:o,onAdd:a,onRemove:l}=wp({props:t,name:"DualListBox"}),s=J(),c=e.useMemo((()=>gI(n,r)),[n,r]);return e.createElement(qE,null,e.createElement(lI,{disableCheckbox:o,items:c,onAdd:a,onRemove:l}),e.createElement(Hg,{color:s.palette.divider,orientation:"vertical"}),e.createElement(hI,{items:r,selectedItemTitle:i,onRemove:l}))})),bI=x.div`
|
|
2972
|
+
`,hI=({items:e,selectedItemTitle:n,onRemove:r})=>{const i=J();return t.createElement(sI,null,t.createElement(cI,null,t.createElement(ve,{size:"sm",weight:"bold"},t.createElement(ve,{color:"primary",component:"span",size:"sm",weight:"bold"},e.length," "),n)),t.createElement(dI,null,e.map(((n,o)=>t.createElement(uI,{key:n.id,isLastIndex:o+1===e.length},n.content,t.createElement(mI,null,r&&t.createElement(pI,{type:"button","aria-label":"選択を解除",onClick:()=>r(n)},t.createElement(ee,{color:i.palette.black,name:"close_circle",type:"fill"}))))))))},gI=(e,t)=>{const n=[];return e.forEach((e=>{if(e.items)return void n.push(Object.assign(Object.assign({},e),{items:gI(e.items,t)}));t.find((t=>t.id===e.id))?n.push(Object.assign(Object.assign({},e),{selected:!0})):n.push(e)})),n},fI=e.forwardRef((function(t){const{candidateItems:n,selectedItems:r,selectedItemTitle:i,disableCheckbox:o,onAdd:a,onRemove:l}=wp({props:t,name:"DualListBox"}),s=J(),c=e.useMemo((()=>gI(n,r)),[n,r]);return e.createElement(qE,null,e.createElement(lI,{disableCheckbox:o,items:c,onAdd:a,onRemove:l}),e.createElement(Hg,{color:s.palette.divider,orientation:"vertical"}),e.createElement(hI,{items:r,selectedItemTitle:i,onRemove:l}))})),bI=x.div`
|
|
2973
2973
|
container-type: inline-size;
|
|
2974
2974
|
line-break: anywhere;
|
|
2975
2975
|
height: 100%;
|
|
@@ -4266,7 +4266,7 @@ object-assign
|
|
|
4266
4266
|
display: flex;
|
|
4267
4267
|
justify-content: center;
|
|
4268
4268
|
align-items: center;
|
|
4269
|
-
`,SM=e.forwardRef((function(t,n){we("FullSizeConfirmModal","FullSizeConfirmModal は非推奨です。代わりに Drawer を使用してください。");const r=wp({props:t,name:"FullSizeConfirmModal"}),{title:i,confirmText:o="Confirm",cancelText:a="Cancel",children:l,onClose:s,onSubmit:c,buttonColor:d="primary",isOpen:u=!0,disabled:p,loading:m,overflowYScroll:h=!0,disableHorizontalPadding:g=!1,subActions:f,modalProps:b,fadeProps:v}=r,x=J(),y=!!c,w=e=>t=>{s&&s(t,e)};return e.createElement(Mg,Object.assign({isOpen:u,onClose:s},b),e.createElement(Iu,Object.assign({in:u,unmountOnExit:!0},v),e.createElement(kM,{ref:n},e.createElement("form",{onSubmit:c},e.createElement(MM,null,e.createElement(AM,null,e.createElement(ve,{weight:"bold",size:"xxxl"},i),f&&e.createElement(Fs,{pl:2},e.createElement(re,{display:"flex",alignItems:"center",gap:1},f.map(((t,n)=>e.createElement(e.Fragment,{key:n},t)))))),e.createElement(LM,{onClick:w("clickCloseIcon")},e.createElement(ee,{name:"close",size:"lg",color:x.palette.black}))),e.createElement($M,{overflowYScroll:h,showFooter:y},g?l:e.createElement(Fs,{px:3,pb:3},l)),y&&e.createElement(DM,null,e.createElement(re,{display:"flex",alignItems:"center"},e.createElement(ic,{type:"button",color:"secondaryLight",inline:!0,onClick:w("clickCancelButton")},a),e.createElement(Fs,{pr:2}),e.createElement(ic,{type:"submit",color:d,disabled:p,inline:!0},o)))),m&&e.createElement(OM,null,e.createElement(Ks,null)))))})),VM="grow-transition",HM=x(au)`
|
|
4269
|
+
`,SM=e.forwardRef((function(t,n){we("FullSizeConfirmModal","FullSizeConfirmModal は非推奨です。代わりに Drawer を使用してください。");const r=wp({props:t,name:"FullSizeConfirmModal"}),{title:i,confirmText:o="Confirm",cancelText:a="Cancel",children:l,onClose:s,onSubmit:c,buttonColor:d="primary",isOpen:u=!0,disabled:p,loading:m,overflowYScroll:h=!0,disableHorizontalPadding:g=!1,subActions:f,modalProps:b,fadeProps:v}=r,x=J(),y=!!c,w=e=>t=>{s&&s(t,e)};return e.createElement(Mg,Object.assign({isOpen:u,onClose:s},b),e.createElement(Iu,Object.assign({in:u,unmountOnExit:!0},v),e.createElement(kM,{ref:n,role:"dialog","aria-modal":"true","aria-label":i},e.createElement("form",{onSubmit:c},e.createElement(MM,null,e.createElement(AM,null,e.createElement(ve,{weight:"bold",size:"xxxl"},i),f&&e.createElement(Fs,{pl:2},e.createElement(re,{display:"flex",alignItems:"center",gap:1},f.map(((t,n)=>e.createElement(e.Fragment,{key:n},t)))))),e.createElement(LM,{onClick:w("clickCloseIcon")},e.createElement(ee,{name:"close",size:"lg",color:x.palette.black}))),e.createElement($M,{overflowYScroll:h,showFooter:y},g?l:e.createElement(Fs,{px:3,pb:3},l)),y&&e.createElement(DM,null,e.createElement(re,{display:"flex",alignItems:"center"},e.createElement(ic,{type:"button",color:"secondaryLight",inline:!0,onClick:w("clickCancelButton")},a),e.createElement(Fs,{pr:2}),e.createElement(ic,{type:"submit",color:d,disabled:p,inline:!0},o)))),m&&e.createElement(OM,null,e.createElement(Ks,null)))))})),VM="grow-transition",HM=x(au)`
|
|
4270
4270
|
&.${VM}-enter, &.${VM}-appear {
|
|
4271
4271
|
transform: scale(0);
|
|
4272
4272
|
}
|
|
@@ -4332,7 +4332,7 @@ object-assign
|
|
|
4332
4332
|
right: -8%;
|
|
4333
4333
|
left: 107%;
|
|
4334
4334
|
}
|
|
4335
|
-
`,GM=x.span`
|
|
4335
|
+
`,GM=x.span.attrs({role:"progressbar","aria-label":"読み込み中","aria-busy":!0})`
|
|
4336
4336
|
position: relative;
|
|
4337
4337
|
display: block;
|
|
4338
4338
|
overflow: hidden;
|
|
@@ -4695,7 +4695,7 @@ object-assign
|
|
|
4695
4695
|
font-weight: bold;
|
|
4696
4696
|
transform: ${({invisible:e})=>e?"scale(0)":"scale(1)"};
|
|
4697
4697
|
transition: transform 0.3s;
|
|
4698
|
-
`,n$=({notificationCount:t=0,invisible:n=!1,style:r})=>{const i=t>=100?"99+":t;return e.createElement(t$,{invisible:n,style:r},i)},r$=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(HA),m=void 0!==l,h=a>0,g=u?p:d;return e.createElement(jA,Object.assign({ref:n,isActive:i},s),h?e.createElement(e$,{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(WA,{isOpen:u?p:d},e.createElement(XA,{component:"span",color:i?"primary":"initial",weight:"bold",size:"sm"},r)),m&&(u?p:d)&&e.createElement(Dm,Object.assign({},l,{size:l.size||"small"})),h&&e.createElement(n$,{notificationCount:a,invisible:0===a||!(u?p:d),style:{marginLeft:m&&(u?p:d)?"4px":"0"}}))})),i$=x.div`
|
|
4698
|
+
`,n$=({notificationCount:t=0,invisible:n=!1,style:r})=>{const i=t>=100?"99+":t;return e.createElement(t$,{invisible:n,style:r},i)},r$=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(HA),m=void 0!==l,h=a>0,g=u?p:d;return e.createElement(jA,Object.assign({ref:n,isActive:i,"aria-current":i?"page":void 0},s),h?e.createElement(e$,{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(WA,{isOpen:u?p:d},e.createElement(XA,{component:"span",color:i?"primary":"initial",weight:"bold",size:"sm"},r)),m&&(u?p:d)&&e.createElement(Dm,Object.assign({},l,{size:l.size||"small"})),h&&e.createElement(n$,{notificationCount:a,invisible:0===a||!(u?p:d),style:{marginLeft:m&&(u?p:d)?"4px":"0"}}))})),i$=x.div`
|
|
4699
4699
|
cursor: pointer;
|
|
4700
4700
|
display: flex;
|
|
4701
4701
|
align-items: center;
|
|
@@ -4852,7 +4852,7 @@ object-assign
|
|
|
4852
4852
|
|
|
4853
4853
|
width: 8px;
|
|
4854
4854
|
height: 8px;
|
|
4855
|
-
`,M$=(e,t,n)=>Math.max(t,Math.min(n,e)),A$=(e,t,n,r)=>void 0===e?r?[t,n]:t:Array.isArray(e)?[M$(e[0],t,n),M$(e[1],t,n)]:M$(e,t,n),$$=(e,t,n)=>(e-t)/(n-t)*100,D$=(e,t,n,r,i)=>{const o=n+(e-t.left)/t.width*100/100*(r-n),a=Math.round(o/i)*i;return M$(a,n,r)},L$=(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},O$=(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=M$(o-l,n,r);break;case"ArrowRight":case"ArrowUp":case"PageUp":s=M$(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=M$(i-l,n,r);break;case"ArrowRight":case"ArrowUp":case"PageUp":s=M$(i+l,n,r);break;case"Home":s=n;break;case"End":s=r;break;default:return e}return s}},S$=()=>{document.body.style.userSelect="none"},V$=()=>{document.body.style.userSelect=""},H$=e=>{e.preventDefault()};function R$({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 A$(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 D$(e,t,i,o,a)}),[i,o,a]),I=e.useCallback((e=>{if(l)return;e.preventDefault(),p(!0),S$(),document.addEventListener("wheel",H$,{passive:!1}),document.addEventListener("touchmove",H$,{passive:!1});const t=E(e.clientX);if(Array.isArray(w)){const e=L$(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),V$(),document.removeEventListener("wheel",H$),document.removeEventListener("touchmove",H$)}),[]),A=e.useCallback((e=>{if(l)return;e.preventDefault(),p(!0),S$(),document.addEventListener("wheel",H$,{passive:!1}),document.addEventListener("touchmove",H$,{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=L$(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),V$(),document.removeEventListener("wheel",H$),document.removeEventListener("touchmove",H$))}),[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 N$({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(E$,{},i.map((t=>e.createElement(I$,{key:t,percentage:(t-n)/(r-n)*100},e.createElement(k$,{theme:a,isOnFill:s(t)})))))}),[t,l,n,r,s,a]);return{getScaleValues:l,isScaleOnFill:s,renderScale:c}}let z$=0;const T$={min:0,max:100,step:1,disabled:!1,showScale:!1},Z$=e.forwardRef((function(t,n){var{value:r,defaultValue:i,onChange:o,min:a=T$.min,max:l=T$.max,step:s=T$.step,disabled:c=T$.disabled,showScale:d=T$.showScale,id:u,className:p,style:m,"aria-
|
|
4855
|
+
`,M$=(e,t,n)=>Math.max(t,Math.min(n,e)),A$=(e,t,n,r)=>void 0===e?r?[t,n]:t:Array.isArray(e)?[M$(e[0],t,n),M$(e[1],t,n)]:M$(e,t,n),$$=(e,t,n)=>(e-t)/(n-t)*100,D$=(e,t,n,r,i)=>{const o=n+(e-t.left)/t.width*100/100*(r-n),a=Math.round(o/i)*i;return M$(a,n,r)},L$=(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},O$=(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=M$(o-l,n,r);break;case"ArrowRight":case"ArrowUp":case"PageUp":s=M$(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=M$(i-l,n,r);break;case"ArrowRight":case"ArrowUp":case"PageUp":s=M$(i+l,n,r);break;case"Home":s=n;break;case"End":s=r;break;default:return e}return s}},S$=()=>{document.body.style.userSelect="none"},V$=()=>{document.body.style.userSelect=""},H$=e=>{e.preventDefault()};function R$({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 A$(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 D$(e,t,i,o,a)}),[i,o,a]),I=e.useCallback((e=>{if(l)return;e.preventDefault(),p(!0),S$(),document.addEventListener("wheel",H$,{passive:!1}),document.addEventListener("touchmove",H$,{passive:!1});const t=E(e.clientX);if(Array.isArray(w)){const e=L$(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),V$(),document.removeEventListener("wheel",H$),document.removeEventListener("touchmove",H$)}),[]),A=e.useCallback((e=>{if(l)return;e.preventDefault(),p(!0),S$(),document.addEventListener("wheel",H$,{passive:!1}),document.addEventListener("touchmove",H$,{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=L$(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),V$(),document.removeEventListener("wheel",H$),document.removeEventListener("touchmove",H$))}),[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 N$({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(E$,{},i.map((t=>e.createElement(I$,{key:t,percentage:(t-n)/(r-n)*100},e.createElement(k$,{theme:a,isOnFill:s(t)})))))}),[t,l,n,r,s,a]);return{getScaleValues:l,isScaleOnFill:s,renderScale:c}}let z$=0;const T$={min:0,max:100,step:1,disabled:!1,showScale:!1},Z$=e.forwardRef((function(t,n){var{value:r,defaultValue:i,onChange:o,min:a=T$.min,max:l=T$.max,step:s=T$.step,disabled:c=T$.disabled,showScale:d=T$.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-"+ ++z$),[]),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}=R$({value:r,defaultValue:i,onChange:o,min:a,max:l,step:s,disabled:c}),{renderScale:H}=N$({showScale:d,min:a,max:l,step:s,currentValue:C}),R=e.useCallback((e=>$$(e,a,l)),[a,l]),N=e.useCallback((e=>{if(c)return;const t=Array.isArray(C),n=O$(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(x$,Object.assign({ref:n,theme:v,disabled:c,className:p,style:m},b),e.createElement(y$,{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(w$,{percentage:R(C[1])-R(C[0]),isDragging:E,startPercentage:R(C[0]),disabled:c}),e.createElement(C$,{ref:k,percentage:R(C[0]),isDragging:E,disabled:c}),e.createElement(C$,{percentage:R(C[1]),isDragging:E,disabled:c})):e.createElement(e.Fragment,null,e.createElement(w$,{percentage:R(C),isDragging:E,disabled:c}),e.createElement(C$,{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}))})),B$=s(null),P$=()=>{const e=c(B$);if(!e)throw new Error("SliderField components must be used within a SliderField");return e},_$=({children:e})=>{const n=r(),i={fieldId:n,sliderId:`${n}-slider`,outputId:`${n}-output`};return t.createElement(B$.Provider,{value:i},e)};_$.Slider=e=>{const{sliderId:n,outputId:r}=P$(),i=e.id||n,o=e["aria-describedby"]||r;return t.createElement(Z$,Object.assign({},e,{id:i,"aria-describedby":o}))},_$.Output=e=>{var{children:n,id:r}=e,i=D(e,["children","id"]);const{outputId:o}=P$();return t.createElement("div",Object.assign({},i,{id:r||o}),n)};const G$=e=>{switch(e){case"down":default:return"translateY(100vh)";case"up":return"translateY(-100vh)";case"right":return"translateX(100vw)";case"left":return"translateX(-100vw)"}},Y$="slide-transition",F$=x(au)`
|
|
4856
4856
|
&.${Y$}-enter, &.${Y$}-appear {
|
|
4857
4857
|
transform: ${({direction:e})=>G$(e)};
|
|
4858
4858
|
}
|
|
@@ -4894,7 +4894,7 @@ object-assign
|
|
|
4894
4894
|
top: ${({theme:e})=>e.spacing}px;
|
|
4895
4895
|
right: ${({theme:e})=>e.spacing}px;
|
|
4896
4896
|
cursor: pointer;
|
|
4897
|
-
`,U$=({color:t,onClose:n,children:r})=>{const i=(e=>({default:{iconColor:e.palette.black,boxShadow:ao(5,e.palette.action.shadowOpacity,e.palette.action.shadowBase),background:e.palette.background.default},dark:{iconColor:e.palette.white,boxShadow:ao(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:ao(5,e.palette.action.shadowOpacity,e.palette.warning.highlight),background:e.palette.warning.highlight}}))(J())[t];return e.createElement(X$,Object.assign({},i),r,e.createElement(J$,{onClick:n},e.createElement(ee,{name:"close",color:i.iconColor})))},Q$=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(W$,{ref:l,vertical:n,horizontal:r},e.createElement(U$,{color:t,onClose:o},a)):null})),K$=x.div`
|
|
4897
|
+
`,U$=({color:t,onClose:n,children:r})=>{const i=(e=>({default:{iconColor:e.palette.black,boxShadow:ao(5,e.palette.action.shadowOpacity,e.palette.action.shadowBase),background:e.palette.background.default},dark:{iconColor:e.palette.white,boxShadow:ao(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:ao(5,e.palette.action.shadowOpacity,e.palette.warning.highlight),background:e.palette.warning.highlight}}))(J())[t];return e.createElement(X$,Object.assign({},i),r,e.createElement(J$,{onClick:n},e.createElement(ee,{name:"close",color:i.iconColor})))},Q$=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(W$,{ref:l,vertical:n,horizontal:r,role:"warning"===t?"alert":"status"},e.createElement(U$,{color:t,onClose:o},a)):null})),K$=x.div`
|
|
4898
4898
|
display: block;
|
|
4899
4899
|
`,q$=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(Fs,{pr:1}),e.createElement(Hg,{orientation:"vertical"}),e.createElement(Fs,{pr:1}),e.createElement(K$,null,r))})),eD={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"}},tD=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}}),nD=x.div`
|
|
4900
4900
|
display: inline-flex;
|
|
@@ -5021,9 +5021,9 @@ object-assign
|
|
|
5021
5021
|
height: 1px;
|
|
5022
5022
|
width: 100%;
|
|
5023
5023
|
background: ${({theme:e})=>e.palette.neutral.lighter};
|
|
5024
|
-
`,$D=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(ID,{ref:s,key:t,value:i,tabIndex:o?0:-1,theme:c,selected:o,onClick:e=>{!o&&a&&a(i),l&&l(e)}},e.createElement(e$,{showZero:!0,layout:"inline",badgeContent:n,max:null!=r?r:99,color:d,size:"small"},e.createElement(kD,{selected:o},t)))}));var DD=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=ku(n,p),h=cD((()=>{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(CD,{ref:m},e.createElement(MD,{style:Object.assign({},c)}),e.createElement(ED,{ref:s},r.map(((t,n)=>{const r=t.value,s=r===i;return l.set(r,n),e.createElement($D,{key:n.toString(),selected:s,value:r,count:t.count,countMax:t.countMax,text:t.text,onChange:o,onClick:a})})),e.createElement(AD,null)))}));const LD=x.div`
|
|
5024
|
+
`,$D=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(ID,{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(e$,{showZero:!0,layout:"inline",badgeContent:n,max:null!=r?r:99,color:d,size:"small"},e.createElement(kD,{selected:o},t)))}));var DD=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=ku(n,p),h=cD((()=>{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(CD,{ref:m},e.createElement(MD,{style:Object.assign({},c)}),e.createElement(ED,{ref:s,role:"tablist"},r.map(((t,n)=>{const r=t.value,s=r===i;return l.set(r,n),e.createElement($D,{key:n.toString(),selected:s,value:r,count:t.count,countMax:t.countMax,text:t.text,onChange:o,onClick:a})})),e.createElement(AD,null)))}));const LD=x.div`
|
|
5025
5025
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
5026
|
-
`,OD=(e=15)=>{const t=[];for(let n=0;n<24;n++)for(let r=0;r<60;r+=e){const e=Zs().hour(n).minute(r).format("HH:mm");t.push(e)}return t},SD=(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 VD=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||Zs(),S=l((()=>{const e=OD(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(jC(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(jC(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=SD(e,t,n,L);return r?r.newTime:null}),[L]),F=d((t=>{const n=eE(t.code),r=n?tE(t.code):null;if(!qC.includes(t.key)&&!n)return;if(t.key===UC.ArrowLeft||t.key===UC.ArrowRight){t.preventDefault();const e=((e,t,n)=>{if(t===UC.ArrowLeft){for(let t=e-1;t>=0;t--)if(n[t].editable)return t-e}else if(t===UC.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===UC.ArrowUp||t.key===UC.ArrowDown){t.preventDefault();const n=t.key===UC.ArrowUp?1:-1,r=e||Zs(),i=Y(r,z.current,n);if(i){const e=i.format(L);H(e),N(jC(e)),u&&u(i)}}const i=n?r:t.key;if((KC.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=WC(n.newSections),o=e||Zs(),a=r,l=Zs(`${o.format("YYYY-MM-DD")} ${a}`),s=l.format(L);if($((()=>{H(s),N(jC(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===UC.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=WC(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||Zs()).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||Zs(),s=Zs(`${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(jC(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(gs,{ref:A,readOnly:!0,multiline:!1,error:n||!!s,disabled:c,width:f,size:h,variant:g,value:V,append:t.createElement(LD,{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(Os,null,t.createElement(Ls,{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(io,{key:n,"data-timefield-item":`${D}-${n}`,checked:r,onChange:e=>{e&&W(n)}},n)})):t.createElement(dt,{disabled:!0},"選択可能な時刻がありません"))),s&&t.createElement(t.Fragment,null,t.createElement(Fs,{py:1}),t.createElement(Qu,null,s)))}));var HD=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=hs(),S=e||Zs(),V=l((()=>{const e=OD(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||Zs(),[s,c]=i(l.format(r)),u=o(s),[p,m]=i(jC(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||Zs()).format(r);c(t),u.current=t,m(jC(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=WC(d),w=e||Zs(),C=Zs(`${w.format("YYYY-MM-DD")} ${y}`),k=C.format(r);if(c(k),u.current=k,m(jC(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!==UC.ArrowUp&&i.key!==UC.ArrowDown){if(i.key===UC.Backspace||i.key===UC.Delete){i.preventDefault(),i.stopPropagation();const e=i.key===UC.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=WC(r);return c(a),void(u.current=a)}if(eE(i.code)){i.preventDefault();const e=tE(i.code);e&&k(e)}}else{i.preventDefault();const o=i.key===UC.ArrowUp?1:-1,a=e||Zs(),[l,s]=u.current.split(":").map(Number),d=a.hour(l).minute(s).second(0).millisecond(0),p=SD(d,t,o,r);p&&(c(p.normalizedValue),u.current=p.normalizedValue,m(jC(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];return!t&&(null==n?void 0:n.editable)?{ref:M(e),role:"spinbutton",contentEditable:!0,suppressContentEditableWarning:!0,inputMode:"numeric",tabIndex:0,enterKeyHint:"next",spellCheck:!1,autoCorrect:"off",style:{caretColor:"transparent"},onFocus:A(e),onBlur:$(e),onKeyDown:D(e),onBeforeInput:L(e),onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}}:{ref:M(e),"aria-hidden":!0}}),[p,t,M,A,$,D,L]),S=d((e=>{const t=f.current;if(null!==t)if(e.key!==UC.ArrowLeft&&e.key!==UC.ArrowRight){if(e.key===UC.Tab){const n=e.shiftKey?-1:1,r=I(t,n);null!==r&&(e.preventDefault(),E(r))}}else{e.preventDefault();const n=e.key===UC.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||Zs()).hour(l).minute(s).second(0).millisecond(0),p=d.format(r);c(p),u.current=p,m(jC(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||Zs()).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(IE,{ref:$,$disabled:u,$error:s||!!c,$focused:z,$isIOS:O,$size:g,$variant:f,$width:b,onBlurCapture:P,onFocusCapture:B},t.createElement(kE,Object.assign({},Z),R.map(((e,n)=>t.createElement(ME,Object.assign({key:`${e.start}-${e.end}`,$editable:e.editable,$focused:z&&N===n},T(n)),e.value)))),t.createElement(AE,null,t.createElement(LD,{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(Os,null,t.createElement(Ls,{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(io,{key:n,checked:r,"data-timefield-item":`${D}-${n}`,onChange:Y(n)},n)})):t.createElement(dt,{disabled:!0},"選択可能な時刻がありません"))),c&&t.createElement(t.Fragment,null,t.createElement(Fs,{py:1}),t.createElement(Qu,null,c)))}));const RD=x.div`
|
|
5026
|
+
`,OD=(e=15)=>{const t=[];for(let n=0;n<24;n++)for(let r=0;r<60;r+=e){const e=Zs().hour(n).minute(r).format("HH:mm");t.push(e)}return t},SD=(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 VD=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||Zs(),S=l((()=>{const e=OD(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(jC(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(jC(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=SD(e,t,n,L);return r?r.newTime:null}),[L]),F=d((t=>{const n=eE(t.code),r=n?tE(t.code):null;if(!qC.includes(t.key)&&!n)return;if(t.key===UC.ArrowLeft||t.key===UC.ArrowRight){t.preventDefault();const e=((e,t,n)=>{if(t===UC.ArrowLeft){for(let t=e-1;t>=0;t--)if(n[t].editable)return t-e}else if(t===UC.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===UC.ArrowUp||t.key===UC.ArrowDown){t.preventDefault();const n=t.key===UC.ArrowUp?1:-1,r=e||Zs(),i=Y(r,z.current,n);if(i){const e=i.format(L);H(e),N(jC(e)),u&&u(i)}}const i=n?r:t.key;if((KC.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=WC(n.newSections),o=e||Zs(),a=r,l=Zs(`${o.format("YYYY-MM-DD")} ${a}`),s=l.format(L);if($((()=>{H(s),N(jC(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===UC.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=WC(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||Zs()).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||Zs(),s=Zs(`${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(jC(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(gs,{ref:A,readOnly:!0,multiline:!1,error:n||!!s,disabled:c,width:f,size:h,variant:g,value:V,append:t.createElement(LD,{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(Os,null,t.createElement(Ls,{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(io,{key:n,"data-timefield-item":`${D}-${n}`,checked:r,onChange:e=>{e&&W(n)}},n)})):t.createElement(dt,{disabled:!0},"選択可能な時刻がありません"))),s&&t.createElement(t.Fragment,null,t.createElement(Fs,{py:1}),t.createElement(Qu,null,s)))}));var HD=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=hs(),S=e||Zs(),V=l((()=>{const e=OD(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||Zs(),[s,c]=i(l.format(r)),u=o(s),[p,m]=i(jC(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||Zs()).format(r);c(t),u.current=t,m(jC(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=WC(d),w=e||Zs(),C=Zs(`${w.format("YYYY-MM-DD")} ${y}`),k=C.format(r);if(c(k),u.current=k,m(jC(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!==UC.ArrowUp&&i.key!==UC.ArrowDown){if(i.key===UC.Backspace||i.key===UC.Delete){i.preventDefault(),i.stopPropagation();const e=i.key===UC.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=WC(r);return c(a),void(u.current=a)}if(eE(i.code)){i.preventDefault();const e=tE(i.code);e&&k(e)}}else{i.preventDefault();const o=i.key===UC.ArrowUp?1:-1,a=e||Zs(),[l,s]=u.current.split(":").map(Number),d=a.hour(l).minute(s).second(0).millisecond(0),p=SD(d,t,o,r);p&&(c(p.normalizedValue),u.current=p.normalizedValue,m(jC(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!==UC.ArrowLeft&&e.key!==UC.ArrowRight){if(e.key===UC.Tab){const n=e.shiftKey?-1:1,r=I(t,n);null!==r&&(e.preventDefault(),E(r))}}else{e.preventDefault();const n=e.key===UC.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||Zs()).hour(l).minute(s).second(0).millisecond(0),p=d.format(r);c(p),u.current=p,m(jC(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||Zs()).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(IE,{ref:$,$disabled:u,$error:s||!!c,$focused:z,$isIOS:O,$size:g,$variant:f,$width:b,onBlurCapture:P,onFocusCapture:B},t.createElement(kE,Object.assign({},Z),R.map(((e,n)=>t.createElement(ME,Object.assign({key:`${e.start}-${e.end}`,$editable:e.editable,$focused:z&&N===n},T(n)),e.value)))),t.createElement(AE,null,t.createElement(LD,{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(Os,null,t.createElement(Ls,{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(io,{key:n,checked:r,"data-timefield-item":`${D}-${n}`,onChange:Y(n)},n)})):t.createElement(dt,{disabled:!0},"選択可能な時刻がありません"))),c&&t.createElement(t.Fragment,null,t.createElement(Fs,{py:1}),t.createElement(Qu,null,c)))}));const RD=x.div`
|
|
5027
5027
|
padding: ${({theme:e})=>2*e.spacing}px;
|
|
5028
5028
|
transition: height ${({transitionDuration:e})=>e-100}ms
|
|
5029
5029
|
100ms;
|
|
@@ -5072,7 +5072,7 @@ object-assign
|
|
|
5072
5072
|
position: absolute;
|
|
5073
5073
|
width: 0;
|
|
5074
5074
|
height: 3px;
|
|
5075
|
-
`,PD={right:"translate3d(120%, 0, 0)",left:"translate3d(-120%, 0, 0)",bottom:"translate3d(0, 120%, 0)",top:"translate3d(0, -120%, 0)"};function _D(e){const t=e.split("-"),n="center"===t[1]?t[0]:t[1];return PD[n]}const GD=({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:ao(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:ao(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:ao(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:ao(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(RD,{ref:h,style:{height:p},transitionDuration:r},e.createElement(ND,Object.assign({background:u.background,boxShadow:u.boxShadow,transitionDuration:r},(e=>({entering:{transform:`${_D(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(zD,null,u.icon),e.createElement(ve,{color:u.titleColor,weight:"bold"},a)),e.createElement(TD,{onClick:()=>{o()}},e.createElement(ee,{name:"close",color:u.closeColor}))),e.createElement(BD,{opacity:l?1:0,autoDismissTimeout:s,isRunning:c,backgroundColor:u.countDownBackground})))},YD=x.div`
|
|
5075
|
+
`,PD={right:"translate3d(120%, 0, 0)",left:"translate3d(-120%, 0, 0)",bottom:"translate3d(0, 120%, 0)",top:"translate3d(0, -120%, 0)"};function _D(e){const t=e.split("-"),n="center"===t[1]?t[0]:t[1];return PD[n]}const GD=({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:ao(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:ao(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:ao(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:ao(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(RD,{ref:h,style:{height:p},transitionDuration:r},e.createElement(ND,Object.assign({background:u.background,boxShadow:u.boxShadow,transitionDuration:r,role:"error"===t||"warning"===t?"alert":"status"},(e=>({entering:{transform:`${_D(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(zD,null,u.icon),e.createElement(ve,{color:u.titleColor,weight:"bold"},a)),e.createElement(TD,{onClick:()=>{o()}},e.createElement(ee,{name:"close",color:u.closeColor}))),e.createElement(BD,{opacity:l?1:0,autoDismissTimeout:s,isRunning:c,backgroundColor:u.countDownBackground})))},YD=x.div`
|
|
5076
5076
|
border: 0;
|
|
5077
5077
|
clip: rect(1px, 1px, 1px, 1px);
|
|
5078
5078
|
height: 1;
|
|
@@ -5239,7 +5239,7 @@ object-assign
|
|
|
5239
5239
|
width: 24px;
|
|
5240
5240
|
`,zL=x(HL)`
|
|
5241
5241
|
border: none;
|
|
5242
|
-
`,TL=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},ZL=Array.from(Array(24)).map(((e,t)=>t)),BL=({weekList:e,weekTime:n,WeekTimeItem:r,
|
|
5242
|
+
`,TL=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},ZL=Array.from(Array(24)).map(((e,t)=>t)),BL=({weekList:e,weekTime:n,WeekTimeItem:r,interactive:i=!1,isWithinHoverRange:o,onMouseOver:a,onMouseDown:s})=>{const c=l((()=>TL(n)),[n]),d=(e,t)=>()=>{null==a||a(e,t)},u=(e,t,n)=>()=>{null==s||s(e,t,n)};return t.createElement(VL,null,t.createElement(zL,null),ZL.map((e=>t.createElement(NL,{key:e},e))),c.map(((n,a)=>t.createElement(v,{key:a},t.createElement(RL,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)}))))))))},PL=t.forwardRef((function(e,n){const r=wp({props:e,name:"WeekTime"}),{weekList:i,weekTime:o}=r;return t.createElement(OL,{ref:n},t.createElement(BL,{weekTime:o,weekList:i,WeekTimeItem:SL}))})),_L=x.div``,GL=x.button`
|
|
5243
5243
|
background-color: ${({active:e,hover:t,theme:n})=>t?n.palette.primary.highlight:e?n.palette.primary.base:n.palette.white};
|
|
5244
5244
|
border: 1px solid
|
|
5245
5245
|
${({theme:e,active:t,hover:n})=>n?e.palette.primary.softLight:t?e.palette.primary.dark:e.palette.neutral.lighter};
|
|
@@ -5248,5 +5248,5 @@ object-assign
|
|
|
5248
5248
|
height: ${({theme:e})=>3*e.spacing}px;
|
|
5249
5249
|
width: ${({theme:e})=>3*e.spacing}px;
|
|
5250
5250
|
outline: none;
|
|
5251
|
-
`,YL=t.forwardRef((function(e,n){const r=wp({props:e,name:"WeekTimeSelector"}),{weekList:o,weekTime:s,errorText:c,onChange:d}=r,u=l((()=>TL(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(_L,{ref:n},t.createElement(BL,{weekTime:s,weekList:o,WeekTimeItem:GL,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(Fs,{pt:1},t.createElement(Qu,null,c)))}));export{lp as ADVANCED_FILTER_CONSTANTS,de as Accordion,Ce as ActionButton,Vp as AdvancedFilter,Dp as AdvancedFilterConfigPanel,St as AdvancedFilterTrigger,mm as Backdrop,Dm as Badge,Hm as Banner,B as BreakPoint,ic as Button,Tm as ButtonGroup,kh as Calendar,Wh as CalendarRange,Xh as Card,tg as Checkbox,mg as CheckboxCard,hg as ClickAwayListener,Ag as ConfirmModal,P as ContainerBreakPoint,Pg as ContextMenu,Ls as ContextMenu2,Ns as ContextMenu2ButtonControlsItem,dt as ContextMenu2ButtonItem,io as ContextMenu2CheckItem,Os as ContextMenu2Container,Ss as ContextMenu2HeadingItem,Hs as ContextMenu2HelpTextItem,Rs as ContextMenu2SeparatorItem,ts as ContextMenu2SortableGroup,os as ContextMenu2SortableItem,po as ContextMenu2SwitchItem,bs as ContextMenu2TextInputItem,fo as ContextMenu2TriggerItem,Py as CreatableSelect,Bp as DATE_OPERATORS,Nw as DataTable,NC as DataTable2,GC as DataTable2ActionButton,BC as DataTable2Body,_C as DataTable2Cell,TC as DataTable2Column,ZC as DataTable2ColumnLabel,zC as DataTable2Head,YC as DataTable2InlineEditor,FC as DataTable2InlineSelectEditor,PC as DataTable2Row,vE as DateField,DE as DateField2,Ep as DatePicker,CE as DateRangeField,VE as DateRangeField2,RE as DateRangePicker,Hg as Divider,YE as Drawer,KE as DropdownButton,fI as DualListBox,hk as DualListBox2,ck as DualListBox2Accordion,KI as DualListBox2Item,ak as DualListBox2Section,Qu as ErrorText,Iu as Fade,bk as FileUploader,Tk as FilterComboBox,Op as FilterPositionCalculator,Xk as FilterSelectInput,bM as FilterTagInput,xM as FixedPanel,re as Flex,EM as FloatingTip,SM as FullSizeConfirmModal,RM as Grow,ee as Icon,BM as IconText,gs as Input,kw as ItemEmpty,GM as LoadingBar,yp as LocaleProvider,Zg as Menu,Ng as MenuList,Mg as Modal,IA as MultipleFilter,Zp as NUMBER_OPERATORS,h$ as NavigationRail,HA as NavigationRailContext,e$ as NotificationBadge,_p as PRESET_OPERATORS,yw as Pager,Tg as Popover,kg as Portal,iw as RadioButton,g$ as RadioCard,z as Radius,Du as SELECT2_SIZES,Pp as SELECTION_OPERATORS,b$ as ScrollArea,By as Select,ju as Select2,Wu as Select2Option,Xu as Select2OptionGroup,Ju as Select2Separator,N as Shadow,j$ as Slide,Z$ as Slider,_$ as SliderField,Q$ as Snackbar,T as Space,Fs as Spacer,Ks as Spinner,q$ as SplitAnnotation,dD as Switch,Tp as TEXT_OPERATORS,wD as Table,DD as Tabs,De as Tag,lA as TextField,L as ThemeProvider,VD as TimeField,HD as TimeField2,CL as Toast,LL as ToggleButton,$u as Tooltip,ve as Typography,PL as WeekTime,YL as WeekTimeSelector,Kp as applyFilter,qp as applyMultipleFilters,Qp as applyOperatorToValue,Z as breakpointPrimitives,Wp as changeOperatorLabel,im as changeValueLabel,M$ as clamp,O as colors,Fp as combineOperators,nm as combineValues,Yp as createOperator,W as createTheme,tm as createValue,X as defaultTheme,vp as enUS,em as evaluateFilterConditions,he as fontSize,Ge as generateTagText,Ye as generateTagTitle,We as getAvailableTypes,A$ as getClampedValue,Xe as getFilterTypeLabel,ww as getFilteredItems,O$ as getKeyboardValue,cm as getLabelsForValues,L$ as getNearestThumbIndex,$$ as getPercentage,Gp as getPresetOperators,Xp as getPresetOperatorsWithLabels,me as getResponsiveFontSizeCss,Je as getTagBoldText,D$ as getValueFromPosition,sm as getValueLabels,lm as getValueStrings,Ve as isCustomOperator,Se as isRangeOperator,pe as isResponsiveObject,Fe as isValidFilterConfig,je as isValidFilterType,fp as jaJP,dm as mergeValues,jp as overrideOperatorLabels,rm as overrideValueLabels,H as palette,H$ as preventScroll,S$ as preventTextSelection,be as resolveFontWeight,V$ as restoreTextSelection,Jp as selectOperators,Up as selectOperatorsByIndex,om as selectValues,am as selectValuesByIndex,um as sortValues,ok as toGroupedItems,_ as trimVertical,Lp as useAdvancedFilterState,ys as useContextMenu2Anchor,Sp as useFilterMenuPosition,Cw as useFilterState,R$ as useSlider,N$ as useSliderScale,J as useTheme,bp as zhCN};
|
|
5251
|
+
`,YL=t.forwardRef((function(e,n){const r=wp({props:e,name:"WeekTimeSelector"}),{weekList:o,weekTime:s,errorText:c,onChange:d}=r,u=l((()=>TL(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(_L,{ref:n},t.createElement(BL,{weekTime:s,weekList:o,WeekTimeItem:GL,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(Fs,{pt:1},t.createElement(Qu,null,c)))}));export{lp as ADVANCED_FILTER_CONSTANTS,de as Accordion,Ce as ActionButton,Vp as AdvancedFilter,Dp as AdvancedFilterConfigPanel,St as AdvancedFilterTrigger,mm as Backdrop,Dm as Badge,Hm as Banner,B as BreakPoint,ic as Button,Tm as ButtonGroup,kh as Calendar,Wh as CalendarRange,Xh as Card,tg as Checkbox,mg as CheckboxCard,hg as ClickAwayListener,Ag as ConfirmModal,P as ContainerBreakPoint,Pg as ContextMenu,Ls as ContextMenu2,Ns as ContextMenu2ButtonControlsItem,dt as ContextMenu2ButtonItem,io as ContextMenu2CheckItem,Os as ContextMenu2Container,Ss as ContextMenu2HeadingItem,Hs as ContextMenu2HelpTextItem,Rs as ContextMenu2SeparatorItem,ts as ContextMenu2SortableGroup,os as ContextMenu2SortableItem,po as ContextMenu2SwitchItem,bs as ContextMenu2TextInputItem,fo as ContextMenu2TriggerItem,Py as CreatableSelect,Bp as DATE_OPERATORS,Nw as DataTable,NC as DataTable2,GC as DataTable2ActionButton,BC as DataTable2Body,_C as DataTable2Cell,TC as DataTable2Column,ZC as DataTable2ColumnLabel,zC as DataTable2Head,YC as DataTable2InlineEditor,FC as DataTable2InlineSelectEditor,PC as DataTable2Row,vE as DateField,DE as DateField2,Ep as DatePicker,CE as DateRangeField,VE as DateRangeField2,RE as DateRangePicker,Hg as Divider,YE as Drawer,KE as DropdownButton,fI as DualListBox,hk as DualListBox2,ck as DualListBox2Accordion,KI as DualListBox2Item,ak as DualListBox2Section,Qu as ErrorText,Iu as Fade,bk as FileUploader,Tk as FilterComboBox,Op as FilterPositionCalculator,Xk as FilterSelectInput,bM as FilterTagInput,xM as FixedPanel,re as Flex,EM as FloatingTip,SM as FullSizeConfirmModal,RM as Grow,ee as Icon,BM as IconText,gs as Input,kw as ItemEmpty,GM as LoadingBar,yp as LocaleProvider,Zg as Menu,Ng as MenuList,Mg as Modal,IA as MultipleFilter,Zp as NUMBER_OPERATORS,h$ as NavigationRail,HA as NavigationRailContext,e$ as NotificationBadge,_p as PRESET_OPERATORS,yw as Pager,Tg as Popover,kg as Portal,iw as RadioButton,g$ as RadioCard,z as Radius,Du as SELECT2_SIZES,Pp as SELECTION_OPERATORS,b$ as ScrollArea,By as Select,ju as Select2,Wu as Select2Option,Xu as Select2OptionGroup,Ju as Select2Separator,N as Shadow,j$ as Slide,Z$ as Slider,_$ as SliderField,Q$ as Snackbar,T as Space,Fs as Spacer,Ks as Spinner,q$ as SplitAnnotation,dD as Switch,Tp as TEXT_OPERATORS,wD as Table,DD as Tabs,De as Tag,lA as TextField,L as ThemeProvider,VD as TimeField,HD as TimeField2,CL as Toast,LL as ToggleButton,$u as Tooltip,ve as Typography,PL as WeekTime,YL as WeekTimeSelector,Kp as applyFilter,qp as applyMultipleFilters,Qp as applyOperatorToValue,Z as breakpointPrimitives,Wp as changeOperatorLabel,im as changeValueLabel,M$ as clamp,O as colors,Fp as combineOperators,nm as combineValues,Yp as createOperator,W as createTheme,tm as createValue,X as defaultTheme,vp as enUS,em as evaluateFilterConditions,he as fontSize,Ge as generateTagText,Ye as generateTagTitle,We as getAvailableTypes,A$ as getClampedValue,Xe as getFilterTypeLabel,ww as getFilteredItems,O$ as getKeyboardValue,cm as getLabelsForValues,L$ as getNearestThumbIndex,$$ as getPercentage,Gp as getPresetOperators,Xp as getPresetOperatorsWithLabels,me as getResponsiveFontSizeCss,Je as getTagBoldText,D$ as getValueFromPosition,sm as getValueLabels,lm as getValueStrings,Ve as isCustomOperator,Se as isRangeOperator,pe as isResponsiveObject,Fe as isValidFilterConfig,je as isValidFilterType,fp as jaJP,dm as mergeValues,jp as overrideOperatorLabels,rm as overrideValueLabels,H as palette,H$ as preventScroll,S$ as preventTextSelection,be as resolveFontWeight,V$ as restoreTextSelection,Jp as selectOperators,Up as selectOperatorsByIndex,om as selectValues,am as selectValuesByIndex,um as sortValues,ok as toGroupedItems,_ as trimVertical,Lp as useAdvancedFilterState,ys as useContextMenu2Anchor,Sp as useFilterMenuPosition,Cw as useFilterState,R$ as useSlider,N$ as useSliderScale,J as useTheme,bp as zhCN};
|
|
5252
5252
|
//# sourceMappingURL=index.es.js.map
|