amotify 0.1.8 → 0.1.9
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/@declaration/_.js +0 -1
- package/dist/@declaration/module.js +0 -1
- package/dist/@declaration/property.js +0 -1
- package/dist/@styles/componentClasses/_.css +1 -1
- package/dist/@utils/GenerateClassName.js +1 -2
- package/dist/@utils/LaunchReactApp.js +1 -2
- package/dist/@utils/_.js +1 -2
- package/dist/@utils/collectForm.js +1 -2
- package/dist/@utils/color.js +1 -2
- package/dist/@utils/config.js +1 -2
- package/dist/@utils/fin.js +0 -1
- package/dist/@utils/jsminEx.js +1 -2
- package/dist/@utils/pageTransit.js +1 -2
- package/dist/@utils/useRecycle.js +1 -2
- package/dist/@utils/useStore.js +1 -2
- package/dist/atoms/Box.js +1 -2
- package/dist/atoms/FAI.js +1 -2
- package/dist/atoms/Flex.js +1 -2
- package/dist/atoms/Grid.js +1 -2
- package/dist/atoms/Img.js +1 -2
- package/dist/atoms/Logo.js +1 -2
- package/dist/atoms/P.js +1 -2
- package/dist/atoms/Placeholder.js +1 -2
- package/dist/atoms/Span.js +1 -2
- package/dist/atoms/_.js +0 -1
- package/dist/{chunk-E3D4DIO4.js → chunk-VY3566IV.js} +0 -1
- package/dist/fn/Button.js +1 -2
- package/dist/fn/Cropper.d.ts +0 -1
- package/dist/fn/Cropper.js +1 -2
- package/dist/fn/Effect/Fade.js +1 -2
- package/dist/fn/Effect/Pudding.js +1 -2
- package/dist/fn/Effect/Ripple.js +1 -2
- package/dist/fn/Effect/_.js +1 -2
- package/dist/fn/Input/Checker.js +1 -2
- package/dist/fn/Input/Chips/Selector.js +1 -2
- package/dist/fn/Input/Chips/_.js +1 -2
- package/dist/fn/Input/Contenteditable.js +1 -2
- package/dist/fn/Input/DigitCharacters.js +1 -2
- package/dist/fn/Input/Filer.js +1 -2
- package/dist/fn/Input/Hidden.js +1 -2
- package/dist/fn/Input/List.js +1 -2
- package/dist/fn/Input/Parts.js +1 -2
- package/dist/fn/Input/Plain.js +1 -2
- package/dist/fn/Input/RichSelect.js +1 -2
- package/dist/fn/Input/Search.js +1 -2
- package/dist/fn/Input/Segmented.js +1 -2
- package/dist/fn/Input/Select.js +1 -2
- package/dist/fn/Input/Slider.js +1 -2
- package/dist/fn/Input/Switch.js +1 -2
- package/dist/fn/Input/Text.js +1 -2
- package/dist/fn/Input/TextArea.js +1 -2
- package/dist/fn/Input/Time/Picker.js +1 -2
- package/dist/fn/Input/Time/_.js +1 -2
- package/dist/fn/Input/_.js +1 -2
- package/dist/fn/Input/core.js +1 -2
- package/dist/fn/Layout/PageNotFound.js +1 -2
- package/dist/fn/Layout/PageRouter.js +1 -2
- package/dist/fn/Layout/PageViewController.js +1 -2
- package/dist/fn/Layout/Plate.js +1 -2
- package/dist/fn/Layout/RootViewController.js +1 -2
- package/dist/fn/Layout/SwipeView.js +1 -2
- package/dist/fn/Layout/TabBar.js +1 -2
- package/dist/fn/Layout/_.js +1 -2
- package/dist/fn/Loader/_.js +1 -2
- package/dist/fn/Loader/corner.js +1 -2
- package/dist/fn/Loader/mini.js +1 -2
- package/dist/fn/Loader/top.js +1 -2
- package/dist/fn/Sheet.js +1 -2
- package/dist/fn/Snackbar.js +1 -2
- package/dist/fn/Table/Data.js +1 -2
- package/dist/fn/Table/Drag.js +1 -2
- package/dist/fn/Table/Normal.js +1 -2
- package/dist/fn/Table/Parts.js +1 -2
- package/dist/fn/Table/Wrapper.js +1 -2
- package/dist/fn/Table/_.js +1 -2
- package/dist/fn/Table/cellStyling.js +1 -2
- package/dist/fn/Tooltips.js +1 -2
- package/dist/fn/_.js +0 -1
- package/dist/index.js +0 -1
- package/dist/mols/Accordion.js +1 -2
- package/dist/mols/Column.js +1 -2
- package/dist/mols/LinkifyText.js +1 -2
- package/dist/mols/List.d.ts +1 -1
- package/dist/mols/List.js +1 -2
- package/dist/mols/Row.js +1 -2
- package/dist/mols/Text.js +1 -2
- package/dist/mols/_.js +0 -1
- package/dist/orgs/_.js +0 -1
- package/dist/style.css +1 -1
- package/dist/style.d.ts +2 -2
- package/dist/temps/_.js +0 -1
- package/package.json +5 -4
- package/dist/@declaration/_.js.map +0 -7
- package/dist/@declaration/module.js.map +0 -7
- package/dist/@declaration/property.js.map +0 -7
- package/dist/@utils/GenerateClassName.js.map +0 -7
- package/dist/@utils/LaunchReactApp.js.map +0 -7
- package/dist/@utils/_.js.map +0 -7
- package/dist/@utils/collectForm.js.map +0 -7
- package/dist/@utils/color.js.map +0 -7
- package/dist/@utils/config.js.map +0 -7
- package/dist/@utils/fin.js.map +0 -7
- package/dist/@utils/jsminEx.js.map +0 -7
- package/dist/@utils/pageTransit.js.map +0 -7
- package/dist/@utils/useRecycle.js.map +0 -7
- package/dist/@utils/useStore.js.map +0 -7
- package/dist/atoms/Box.js.map +0 -7
- package/dist/atoms/FAI.js.map +0 -7
- package/dist/atoms/Flex.js.map +0 -7
- package/dist/atoms/Grid.js.map +0 -7
- package/dist/atoms/Img.js.map +0 -7
- package/dist/atoms/Logo.js.map +0 -7
- package/dist/atoms/P.js.map +0 -7
- package/dist/atoms/Placeholder.js.map +0 -7
- package/dist/atoms/Span.js.map +0 -7
- package/dist/atoms/_.js.map +0 -7
- package/dist/chunk-E3D4DIO4.js.map +0 -7
- package/dist/fn/Button.js.map +0 -7
- package/dist/fn/Cropper.js.map +0 -7
- package/dist/fn/Effect/Fade.js.map +0 -7
- package/dist/fn/Effect/Pudding.js.map +0 -7
- package/dist/fn/Effect/Ripple.js.map +0 -7
- package/dist/fn/Effect/_.js.map +0 -7
- package/dist/fn/Input/Checker.js.map +0 -7
- package/dist/fn/Input/Chips/Selector.js.map +0 -7
- package/dist/fn/Input/Chips/_.js.map +0 -7
- package/dist/fn/Input/Contenteditable.js.map +0 -7
- package/dist/fn/Input/DigitCharacters.js.map +0 -7
- package/dist/fn/Input/Filer.js.map +0 -7
- package/dist/fn/Input/Hidden.js.map +0 -7
- package/dist/fn/Input/List.js.map +0 -7
- package/dist/fn/Input/Parts.js.map +0 -7
- package/dist/fn/Input/Plain.js.map +0 -7
- package/dist/fn/Input/RichSelect.js.map +0 -7
- package/dist/fn/Input/Search.js.map +0 -7
- package/dist/fn/Input/Segmented.js.map +0 -7
- package/dist/fn/Input/Select.js.map +0 -7
- package/dist/fn/Input/Slider.js.map +0 -7
- package/dist/fn/Input/Switch.js.map +0 -7
- package/dist/fn/Input/Text.js.map +0 -7
- package/dist/fn/Input/TextArea.js.map +0 -7
- package/dist/fn/Input/Time/Picker.js.map +0 -7
- package/dist/fn/Input/Time/_.js.map +0 -7
- package/dist/fn/Input/_.js.map +0 -7
- package/dist/fn/Input/core.js.map +0 -7
- package/dist/fn/Layout/PageNotFound.js.map +0 -7
- package/dist/fn/Layout/PageRouter.js.map +0 -7
- package/dist/fn/Layout/PageViewController.js.map +0 -7
- package/dist/fn/Layout/Plate.js.map +0 -7
- package/dist/fn/Layout/RootViewController.js.map +0 -7
- package/dist/fn/Layout/SwipeView.js.map +0 -7
- package/dist/fn/Layout/TabBar.js.map +0 -7
- package/dist/fn/Layout/_.js.map +0 -7
- package/dist/fn/Loader/_.js.map +0 -7
- package/dist/fn/Loader/corner.js.map +0 -7
- package/dist/fn/Loader/mini.js.map +0 -7
- package/dist/fn/Loader/top.js.map +0 -7
- package/dist/fn/Sheet.js.map +0 -7
- package/dist/fn/Snackbar.js.map +0 -7
- package/dist/fn/Table/Data.js.map +0 -7
- package/dist/fn/Table/Drag.js.map +0 -7
- package/dist/fn/Table/Normal.js.map +0 -7
- package/dist/fn/Table/Parts.js.map +0 -7
- package/dist/fn/Table/Wrapper.js.map +0 -7
- package/dist/fn/Table/_.js.map +0 -7
- package/dist/fn/Table/cellStyling.js.map +0 -7
- package/dist/fn/Tooltips.js.map +0 -7
- package/dist/fn/_.js.map +0 -7
- package/dist/index.js.map +0 -7
- package/dist/mols/Accordion.js.map +0 -7
- package/dist/mols/Column.js.map +0 -7
- package/dist/mols/LinkifyText.js.map +0 -7
- package/dist/mols/List.js.map +0 -7
- package/dist/mols/Row.js.map +0 -7
- package/dist/mols/Text.js.map +0 -7
- package/dist/mols/_.js.map +0 -7
- package/dist/orgs/_.js.map +0 -7
- package/dist/temps/_.js.map +0 -7
package/dist/fn/Input/Filer.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as h,c as x,d as Q,e as L}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=Filer.js.map
|
|
1
|
+
import{b as h,c as x,d as Q,e as L}from"../../chunk-VY3566IV.js";import{Fragment as G,jsx as t,jsxs as f}from"react/jsx-runtime";import{useState as q,useEffect as te}from"react";import{$$ as p,useStore as X,Config as P,GenerateClassName as ae}from"../../@utils/_";import y from"../../atoms/Box";import $ from"../../atoms/FAI";import O from"../../atoms/Flex";import Y from"../../mols/Column";import le from"../../mols/Row";import W from"../Button";import H from"../Snackbar";import{Wrapper as ne,BoxWrapper as ie,CommonEffects as oe,DefaultStyles as se}from"./core";import re from"./Text";import{InputFilerClasses as m}from"../../@styles/componentClasses/_";import{faCloudArrowUp as pe}from"@fortawesome/free-solid-svg-icons/faCloudArrowUp";function ue(e){let{value:a,params:l}=e,{required:s}=l,n=[];return s&&!a.length&&n.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!n.filter(({type:u})=>u=="invalid").length,notice:n}}const ee={List:e=>{let{files:a,params:l,val_status:s,set_status:n}=e,u=(l.limit||1)-s.dataValue.length,c=a.map((d,S)=>t(ee.Cell,{index:S,file:d,className:l.cellClassName,val_status:s,set_status:n,fileNameEdit:l.fileNameEdit},d.name));return u>0&&c.push(t("label",{className:[l.cellClassName,m("AddButton")].join(" "),"data-component-id":s.componentID,htmlFor:l.id,tabIndex:l.tabIndex,onKeyDown:d=>{let{key:S}=d;l.tabIndex!=-1&&[" ","Enter"].includes(S)&&p(P.get().appRoot).find("#"+l.id).click()},children:f(le.Center,{padding:["1/3",0],children:[t(y,{isRounded:!0,className:m("AddIcon"),children:t($,{icon:pe,className:m("Icon"),fontColor:"theme",fontSize:"4.thirdTitle",backgroundColor:"tcOpLow",ssSphere:4})}),f(y,{children:[t(y,{children:`\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\uFF08${u}\uFF09`,fontColor:"theme",fontSize:"2.normal",isSemiBoldFont:!0}),t(y,{isSemiBoldFont:!0,fontColor:"4.thin",fontSize:"0.xs",children:"\u30D5\u30A1\u30A4\u30EB\u3092\u30C9\u30ED\u30C3\u30D7"})]})]})},"AddButton")),t(Y,{flexSizing:"auto",className:l.className,children:c})},Cell:e=>{let{index:a,file:l,className:s,val_status:n,set_status:u,fileNameEdit:c=!0}=e,{name:d,size:S,type:i}=l,[R,b]=q(!1),N=p.uuid.gen(),V=S.rank(),[J,M]=d.replace(/\s/,"").replace(/(.*)\.(.*)$/,"$1 $2").split(" "),o="\u30D5\u30A1\u30A4\u30EB";return i.match(/image/)?o=i.replace(/image\//,""):i.match(/pdf/)?o="PDF":i.match(/csv/)?o="CSV":i.match(/spreadsheet/)?o="SpreadSheet":i.match(/presentation/)?o="PowerPoint":i.match(/word/)?o="Word":i.match(/zip/)?o="Zip":i.match(/powerpoint/)?o="PowerPoint":i.match(/html/)?o="HTML":i.match(/js/)?o="JavaScript":i.match(/css/)?o="CSS":i.match(/text\/plain/)&&(o="\u30C6\u30AD\u30B9\u30C8"),te(()=>{R&&setTimeout(()=>{p(P.get().appRoot).find("#"+N).focus()},100)},[R]),f(O,{verticalAlign:"center",flexWrap:!1,gap:1,className:s,children:[t($.File,{fontSize:"4.thirdTitle",fontColor:"4.thin"}),f(y,{flexSizing:0,children:[t(y,{children:t(O,{verticalAlign:"center",gap:"2/3",flexWrap:!1,className:m("FileName"),children:R?t(G,{children:f(Y,{gap:"1/2",flexSizing:0,children:[f(O,{gap:"2/3",verticalAlign:"center",children:[t(re.Normal,{tone:"border",wrapStyles:{flexSizing:"auto"},restrict:"fileName",name:"name",required:!0,id:N,form:"form-"+N,enableFormSubmit:!0,value:J,onKeyDown:g=>{let{key:_}=g;_=="Escape"&&b(!1)}}),f(y,{children:[". ",M]})]}),f(O,{gap:"2/3",horizontalAlign:"right",flexWrap:!1,children:[t(W.Button.Sub.R,{padding:["2/3",1],children:"\u9589\u3058\u308B",onClick:()=>{b(!1)}}),t(W.Button.Prime.R,{padding:["2/3",1],submitOption:{formName:"form-"+N,callback:g=>L(void 0,null,function*(){let{name:_}=g,w=[...n.dataValue],T=w[a],U=T.id;if(!T)return;let{target:r}=yield T.read();if(!r)return;let D=yield String(r.result).toBlob(l.type);if(!D)return;let z=new File([D],_+"."+M,{type:T.type});z.id=U,w[a]=z,u(x(h({},n),{dataValue:w,eventType:"update",eventID:p.uuid.gen()})),b(!1)})},children:"\u6C7A\u5B9A"})]})]})}):f(G,{children:[d,c?t(W.Button.Clear.R,{ssSphere:2.5,flexSizing:"none",color:"cloud",fontColor:"4.thin",padding:"1/3",ssEffectsOnActive:"expand",onClick:()=>{b(!0)},children:t($.Pen,{})}):null]})})}),R?null:t(G,{children:t(y,{fontSize:"1.mini",fontColor:"4.thin",flexSizing:0,children:o+"\u30D5\u30A1\u30A4\u30EB / "+V+"B"})})]}),t(W.Button.Sub.R,{color:"cloud",fontColor:"4.thin",ssSphere:3,onClick:()=>{let g=[...n.dataValue];g[a]&&(g.splice(a,1),u(x(h({},n),{dataValue:g,eventType:"update",eventID:p.uuid.gen()})))},children:t($.Times,{})})]})}},de=e=>{let Z=e,{tone:a,required:l,form:s,fileNameEdit:n=!0,systemOnly:u=!1,accept:c="*",limit:d=1,checkValidationAtFirst:S,onChange:i,onValidate:R,onUpdateValue:b,onUpdateValidValue:N,value:V=[],className:J,cellStyles:M,cellClassName:o,componentID:g,status_id:_,enableFormSubmit:w}=Z,T=Q(Z,["tone","required","form","fileNameEdit","systemOnly","accept","limit","checkValidationAtFirst","onChange","onValidate","onUpdateValue","onUpdateValidValue","value","className","cellStyles","cellClassName","componentID","status_id","enableFormSubmit"]),U={componentID:e.componentID||"",dataValue:V,eventType:"init",eventID:p.uuid.gen()},[r,B]=q(U),[D,z]=q({ok:!1,notice:[]});oe({type:"file",params:e,val_status:r,set_status:B,val_validate:D,set_validate:z,DefaultValidation:ue,onUpdateValue:b,onUpdateValidValue:N,ExtraOverrideParams:{dataValue:V,formatValue:V},ExtraStoreParams:{AddFiles:A=>L(void 0,null,function*(){let k=X.get(r.componentID).Files,v=[];for(var F=0;F<(A==null?void 0:A.length);F++){let I=A[F],{type:E,name:C}=I;if(F+1+k.length>d){H.add({componentID:C,secondsToClose:12e3,children:`\u30D5\u30A1\u30A4\u30EB\u9078\u629E\u4E0A\u9650\u3092\u8D85\u3048\u305F\u305F\u3081\u3001${C}}\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002`,backgroundColor:"nega"});continue}if(c&&c=="image"&&!E.match(/image/)){H.add({componentID:C,secondsToClose:12e3,children:`\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u304C\u7570\u306A\u308B\u305F\u3081\u3001${C} \u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002`,backgroundColor:"nega"});continue}v.push(I)}B(x(h({},r),{dataValue:[...k,...v],eventType:"update",eventID:p.uuid.gen()}))})}});let j="";return c&&(c=="image"?j="image/png,image/jpeg":j=c),f(ie,{val_status:r,set_status:B,val_validate:D,params:e,children:[t("input",x(h({type:"file",className:m("Input"),"data-form":s,"data-input-type":"file","data-component-id":r.componentID,"data-validation":D.ok,accept:j,multiple:d!=1,onChange:A=>L(void 0,null,function*(){let k=A.target,v=k.files,F=[];for(var I=0;I<(v==null?void 0:v.length);I++){let E=v[I],C=E.name;if(E.id=p.uuid.gen(),I+1+r.dataValue.length>d){H.add({componentID:C,secondsToClose:12e3,children:`\u30D5\u30A1\u30A4\u30EB\u767B\u9332\u6570\u3092\u8D85\u3048\u305F\u305F\u3081\u3001${C}}\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002`,backgroundColor:"nega"});continue}F.push(E)}B(x(h({},r),{dataValue:[...r.dataValue,...F],eventType:"update",eventID:p.uuid.gen()})),k.value=""})},T),{tabIndex:-1,value:""})),u?null:t(ee.List,{files:r.dataValue,params:e,val_status:r,set_status:B})]})};p(document).addEvent({eventType:"dragover",callback:e=>{e.preventDefault(),p(P.get().appRoot).find("."+m("AddButton")).addClass(m("Draggable"))},option:{passive:!1}}).addEvent({eventType:"drop",callback:e=>{e.preventDefault(),p(P.get().appRoot).find("."+m("AddButton")).removeClass(m("Draggable"));let a=e.dataTransfer.files;if(a.length){let l=e.target;if(p(P.get().appRoot).find(l).hasClass(m("AddButton"))){let{componentId:s}=l.dataset,n=X.get(s);n&&n.AddFiles&&n.AddFiles(a)}}},option:{passive:!1}});const K=e=>{e=h({},e),e.override="force";let a=ae(e);return a.cellClassName=[a.cellClassName,se.Boxish(x(h({},a.cellStyles),{tone:a.tone})).className].join(" "),t(ne,{componentID:e.componentID,children:de,params:a})};K.fn={openDialog:e=>{let{multiple:a,accept:l}=e;return new Promise(s=>{const n=document.createElement("input");n.type="file",n.multiple=a!=null?a:!0,l&&(l=="image"?n.accept="image/png,image/jpeg":n.accept=l),n.onchange=u=>{s(u.target.files)},n.click()})}};export{K as Filer,K as default};
|
package/dist/fn/Input/Hidden.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as i,c as o,d as r}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=Hidden.js.map
|
|
1
|
+
import{b as i,c as o,d as r}from"../../chunk-VY3566IV.js";import{jsx as d}from"react/jsx-runtime";import{Wrapper as l}from"./core";const s=n=>{let e=n,{componentID:p="",enableFormSubmit:c,form:m,value:t=""}=e,u=r(e,["componentID","enableFormSubmit","form","value"]);return d("input",o(i({value:JSON.stringify(t),"data-input-type":"hidden","data-form":m,"data-component-id":p,"data-value":JSON.stringify(t)},u),{type:"hidden"}))},a=n=>d(l,{componentID:n.componentID,children:s,params:n});export{a as Hidden,a as default};
|
package/dist/fn/Input/List.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as t,c,d as B}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=List.js.map
|
|
1
|
+
import{b as t,c,d as B}from"../../chunk-VY3566IV.js";import{jsx as l,jsxs as te}from"react/jsx-runtime";import{useState as X}from"react";import{$$ as I,Config as ne}from"../../@utils/_";import D from"../../atoms/Box";import ie from"../../atoms/Flex";import oe from"../../atoms/FAI";import se from"../Button";import{BoxWrapper as re,SubmitForm as ce,CommonEffects as de,DefaultStyles as ue,Wrapper as pe}from"./core";import fe from"./Hidden";import{InputListClasses as s}from"../../@styles/componentClasses/_";function me(e){let{value:n,params:i}=e,{type:h,required:d,minSelect:a=0}=i,o=[];return d&&(n.length||h=="radio"&&o.push({type:"invalid",label:"\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093"})),a&&n.length<a&&o.push({type:"invalid",label:`${a}\u500B\u4EE5\u4E0A\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044`}),{ok:!o.filter(({type:r})=>r=="invalid").length,notice:o}}const ye=e=>{let{value:n,options:i=[]}=e,h=I.is.exist(n)?I.flatArray(n):[],d=i.map(o=>{let{value:r,label:C}=o;return c(t({},o),{value:JSON.stringify(r),label:C})}),a=[];return h.forEach(o=>{let r=JSON.stringify(o);d.findIndex(k=>k.value==r)!=-1&&a.push(r)}),l(P.Core,c(t({},e),{value:a,options:d}))},P={Core:e=>{let N=e,{type:n,tone:i,required:h,componentID:d="",form:a,override:o,freeCSS:r,icon:C,iconType:k,enableFormSubmit:J,defaultActiveStyling:$,checkValidationAtFirst:W,onValidate:j,onUpdateValue:R,onUpdateValidValue:_,value:A,options:v,leftIndicator:z,rightIndicator:U,className:F,cellStyles:q,cellClassName:w,cellCheckedStyles:H,cellCheckedClassName:K}=N,T=B(N,["type","tone","required","componentID","form","override","freeCSS","icon","iconType","enableFormSubmit","defaultActiveStyling","checkValidationAtFirst","onValidate","onUpdateValue","onUpdateValidValue","value","options","leftIndicator","rightIndicator","className","cellStyles","cellClassName","cellCheckedStyles","cellCheckedClassName"]),g={componentID:d,dataValue:A,eventType:"init",eventID:I.uuid.gen()},[u,b]=X(g),[x,S]=X({ok:!1,notice:[]});return de({type:"list",params:e,val_status:u,set_status:b,val_validate:x,set_validate:S,onUpdateValue:R,onUpdateValidValue:_,DefaultValidation:me}),te(re,{val_status:u,set_status:b,val_validate:x,params:e,children:[l(fe,c(t({"data-value":JSON.stringify(u.dataValue),form:a,"data-input-type":n,"data-validation":x.ok},T),{componentID:u.componentID})),l(P.List,{params:e,val_status:u,set_status:b})]})},List:e=>{let{params:n,val_status:i,set_status:h}=e,{componentID:d,type:a,tone:o,icon:r=!0,options:C,name:k,form:J,tabIndex:$,hideInput:W,disabled:j,className:R,cellStyles:_,cellClassName:A="",cellCheckedStyles:v,cellCheckedClassName:z="",enableFormSubmit:U,defaultActiveStyling:F=!0}=n,{dataValue:q}=i,w=r?l(D,{flexSizing:"none",children:n.iconType=="radio"?l(P.RadioIcon,{}):n.iconType=="checkbox"?l(P.CheckboxIcon,{}):null}):null,H=C.map((K,T)=>{let Q=K,{value:g,label:u,disabled:b=j,className:x="",checkedStyles:S,checkedClassName:N=""}=Q,ae=B(Q,["value","label","disabled","className","checkedStyles","checkedClassName"]),G=I.uuid.gen(),M=q.findIndex(p=>p===g)!=-1,L=t(t({},_),ae),O=[s("Label"),s("defaultActiveStyling_"+!!F),A,x];return M&&(L=c(t(t(t({},L),v),S),{freeCSS:t(t(t({},L.freeCSS),v==null?void 0:v.freeCSS),S==null?void 0:S.freeCSS)}),O=[...O,z,N]),[l("input",{type:a=="radio"?"radio":"checkbox",className:[s("Input"),s("defaultActiveStyling_"+!!F)].join(" "),name:"RadioCheckbox-"+k,"data-list-index":d+"-"+T,id:G,value:String(g),"data-form-name":J,disabled:b,checked:M,onFocus:p=>{if(b||a!="radio"||i.dataValue.length)return;let{value:f,checked:V}=p.target,m=[f];h(c(t({},i),{dataValue:m,eventType:"update",eventID:I.uuid.gen()}))},onChange:p=>{if(b)return;let{value:f,checked:V}=p.target,m=[];if(a=="radio")m=[f];else if(a=="checkbox"||a=="checker")if(V)m=[...i.dataValue,f];else{let y=[...i.dataValue];y.splice(i.dataValue.findIndex(le=>le==f),1),m=y}h(c(t({},i),{dataValue:m,eventType:"update",eventID:I.uuid.gen()}))},onKeyDown:p=>{let{key:f,shiftKey:V}=p;if((a=="checkbox"||a=="checker")&&f!="Tab"){if(f.match(/Arrow/)){p.preventDefault();let m=["ArrowLeft","ArrowUp"].includes(f)?-1:1,y=T+m;y<0?y=C.length-1:y>=C.length&&(y=0),I(ne.get().appRoot).find(`input[data-list-index="${d}-${y}"]`).focus()}}U&&ce(p)},tabIndex:$},"List-"+JSON.stringify(g)),te(se.Label.Plain,c(t({htmlFor:G,className:O.join(" "),tabIndex:-1,display:"flex",ssEffectsOnActive:!1,verticalAlign:"center",gap:"1/3",flexWrap:!1},L),{children:[w,I.is.string(u)?l(D,{children:u}):u]}),"ListTrigger-"+JSON.stringify(g))]});return l(ie,{flexSizing:"auto",freeCSS:t({},n.freeCSS),className:[R,s("CellBase"),s("HideInput_"+W),s("IconIndicator_"+!!r),s("Tone_"+o)].join(" "),children:H})},RadioIcon:()=>l(D,{className:s("Icon"),backgroundColor:"1.layer.base",border:!0,transition:"middle",position:"relative",borderRadius:"sphere",flexCenter:!0}),CheckboxIcon:()=>l(D,{className:[s("Icon"),s("CheckboxIcon")].join(" "),borderRadius:"3.tone.tertiary",backgroundColor:"1.layer.base",border:!0,transition:"middle",fontColor:"white",position:"relative",flexCenter:!0,children:l(oe.Check,{className:s("I"),transition:"middle",opacity:"trans",freeCSS:{zIndex:8}})})},E=e=>{e=t({},e);let n=ue.ListCell(e);return l(pe,{componentID:e.componentID,children:ye,params:n})},Y=e=>l(E,c(t({iconType:"radio",tone:e.tone},e),{type:"radio"})),Z=e=>l(E,c(t({iconType:"checkbox",tone:e.tone},e),{type:"checkbox"})),ee={Plain:E,Radio:Y,Checkbox:Z};export{Z as Checkbox,ee as List,Y as Radio,ee as default};
|
package/dist/fn/Input/Parts.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as t,c as n,d}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=Parts.js.map
|
|
1
|
+
import{b as t,c as n,d}from"../../chunk-VY3566IV.js";import{jsx as a}from"react/jsx-runtime";import p from"../../atoms/Box";import s from"../../atoms/Span";import{DefaultStyles as c}from"./core";import{InputClasses as u}from"../../@styles/componentClasses/_";const I={RequiredSign:e=>a(s,t({fontColor:"white",fontSize:"0.xs",padding:["1/4","1/3"],backgroundColor:"nega",borderRadius:"3.tone.tertiary",children:"\u5FC5\u9808"},e)),RequiredShortSign:e=>a(s,t({fontColor:"nega",padding:["1/4","1/3"],borderRadius:"3.tone.tertiary",children:"*"},e)),OmitSign:e=>a(s,t({fontColor:"white",fontSize:"0.xs",padding:["1/4","1/3"],borderRadius:"3.tone.tertiary",backgroundColor:"6.layer.darkest",children:"\u7701\u7565\u53EF"},e)),LeftIndicator:e=>{let r=e,{tone:i}=r,o=d(r,["tone"]);return a(p,t(n(t({},c.Indicator(i)),{borderTopRightRadius:"2/3",borderBottomRightRadius:"2/3"}),o))},RightIndicator:e=>{let r=e,{tone:i}=r,o=d(r,["tone"]);return a(p,t(n(t({},c.Indicator(i)),{borderTopLeftRadius:"2/3",borderBottomLeftRadius:"2/3"}),o))},RightIcon:e=>{let r=e,{tone:i="border"}=r,o=d(r,["tone"]);return a(p,n(t(n(t({},c.IndicatorIcon),{right:"3/4",className:u("IndicatorIcon")}),o),{freeCSS:t({zIndex:6,pointerEvents:"none"},o.freeCSS)}))},LeftIcon:e=>{let r=e,{tone:i="border"}=r,o=d(r,["tone"]);return a(p,n(t(n(t({},c.IndicatorIcon),{left:"3/4",className:u("IndicatorIcon")}),o),{freeCSS:t({zIndex:6,pointerEvents:"none"},o.freeCSS)}))}};export{I as Parts,I as default};
|
package/dist/fn/Input/Plain.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as t}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=Plain.js.map
|
|
1
|
+
import{b as t}from"../../chunk-VY3566IV.js";import{jsx as n}from"react/jsx-runtime";import{GenerateClassName as p}from"../../@utils/_";const a=e=>n("input",t({},p(e)));export{a as _Plain,a as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as t,c as a,d as O}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=RichSelect.js.map
|
|
1
|
+
import{b as t,c as a,d as O}from"../../chunk-VY3566IV.js";import{jsx as n}from"react/jsx-runtime";import{useState as R}from"react";import{$$ as s}from"../../@utils/_";import M from"../../atoms/Box";import P from"../../atoms/FAI";import $ from"../../mols/Column";import j from"../Button";import _ from"../Tooltips";import{Wrapper as K,BoxWrapper as z,CommonEffects as G,DefaultStyles as Q}from"./core";import X from"./Parts";import{InputRichSelectClasses as Y,InputClasses as Z}from"../../@styles/componentClasses/_";function w(e){let{value:l,params:r}=e,{required:o,options:i}=r,p=[];return o&&(!i.length||i.length&&s.is.nullish(JSON.parse(l)))&&p.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!p.filter(({type:d})=>d=="invalid").length,notice:p}}const ee=e=>{let E=e,{tone:l,required:r,form:o,className:i,enableFormSubmit:p,enableUnSelected:d,checkValidationAtFirst:b,onChange:I,onKeyDown:V,onValidate:C,onUpdateValue:f,onUpdateValidValue:h,value:y="",options:x,placeholder:k,leftIndicator:le,rightIndicator:ne,leftIcon:oe,rightIcon:ae,componentID:ie,status_id:ue,cellStyles:A,sheetStyles:m,gravityPoint:F}=E,L=O(E,["tone","required","form","className","enableFormSubmit","enableUnSelected","checkValidationAtFirst","onChange","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","options","placeholder","leftIndicator","rightIndicator","leftIcon","rightIcon","componentID","status_id","cellStyles","sheetStyles","gravityPoint"]),H={componentID:e.componentID||"",dataValue:y,eventType:"init",eventID:s.uuid.gen()},[D]=R(s.uuid.gen()),[u,S]=R(H),[v,J]=R({ok:!1,notice:[]});G({type:"richSelect",params:e,val_status:u,set_status:S,ExtraOverrideParams:{dataValue:y,formatValue:y},val_validate:v,set_validate:J,DefaultValidation:w,onUpdateValue:f,onUpdateValidValue:h});let T=n(M,{fontColor:"4.thin",textAlign:"left",children:k||"\u9078\u629E"});if(u.dataValue){let c=x.find(g=>g.type=="button"&&g.value==u.dataValue);c&&(T=c.selectedLabel||c.label)}return n(z,{val_status:u,set_status:S,val_validate:v,params:e,children:n("button",a(t({},L),{"data-form":o,"data-validation":v.ok,"data-component-id":u.componentID,"data-value":u.dataValue,"data-input-type":"richSelect",className:[i,Y("SelectLegend"),Z("InputCover")].join(" "),onClick:c=>{_.open({tipsID:D,parent:c.currentTarget,gravityPoint:F||13,close_option:{elementBlur:""},content:()=>{let g=x.map(U=>{let{type:W,value:q,label:B}=U;return W=="button"?n(j.Button.Clear.R,a(t({color:"cloud",borderRadius:0,fontColor:"2.normal",textAlign:"left",padding:0,onClick:()=>{S(a(t({},u),{dataValue:q,eventType:"update",eventID:s.uuid.gen()})),_.close(D)}},A),{children:B})):B});return n($,a(t({ssCardBox:!0,padding:[1,0],gap:0,overflow:"auto"},m),{freeCSS:t({minWidth:12*20,maxHeight:"90vh"},m==null?void 0:m.freeCSS),children:g}))}})},children:T}))})},te=e=>{let{value:l=null,placeholder:r,options:o=[]}=e,i=0,p=JSON.stringify(l),d=o.map(I=>{let{type:V,value:C}=I,f=JSON.stringify(C),h=f==p;return i|=Number(h),a(t({},I),{type:V||"button",value:f})});i||(l=null);let b=JSON.stringify(l);return n(ee,a(t({},e),{value:b,options:d}))},N=e=>{var r,o;e=t({},e),s.is.nullish(e.rightIcon)&&(e.rightIcon=n(X.RightIcon,a(t({flexType:"col"},e.rightIconStyles),{children:n(P.AngleDown,{})}))),e.rightIcon&&(e.paddingRight=(r=e.paddingRight)!=null?r:3),e.leftIcon&&(e.paddingLeft=(o=e.paddingLeft)!=null?o:3);let l=Q.Boxish(e);return delete l.rightIconStyles,n(K,{componentID:e.componentID,children:te,params:l})};export{N as RichSelect,N as default};
|
package/dist/fn/Input/Search.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as e}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=Search.js.map
|
|
1
|
+
import{b as e}from"../../chunk-VY3566IV.js";import{jsx as t,jsxs as p}from"react/jsx-runtime";import r from"../../atoms/Box";import n from"../../atoms/FAI";import i from"../../mols/Row";import f from"../../mols/Column";import{faAngleUp as l}from"@fortawesome/free-solid-svg-icons/faAngleUp";import{faAngleDown as u}from"@fortawesome/free-solid-svg-icons/faAngleDown";import c from"./Chips/_";import d from"./Parts";const m=a=>t(c,e({AddButtonComponent:o=>o.selected.length?null:t(r,{children:"\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044"}),SelectedCellComponent:o=>t(r,{width:1,textAlign:"left",children:p(i.Separate,{children:[o.label,o.defaultRemoveButton]})}),paddingLeft:3,rightIcon:t(d.LeftIcon,{children:p(f,{gap:0,children:[t(n,{icon:l}),t(n,{icon:u,freeCSS:{marginTop:-6}})]})}),limit:1},a));export{m as Search,m as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as o,c as l,d as a}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=Segmented.js.map
|
|
1
|
+
import{b as o,c as l,d as a}from"../../chunk-VY3566IV.js";import{jsx as t}from"react/jsx-runtime";import{$$ as R}from"../../@utils/_";import{useState as c}from"react";import x from"./List";import{InputSegmentedClasses as u}from"../../@styles/componentClasses/_";const n=e=>{let S=e,{tone:E,appearance:i,value:r,options:f,onUpdateValue:b,onUpdateValidValue:C,freeCSS:p,cellStyles:g,cellClassName:k,cellCheckedClassName:B,cellCheckedStyles:I}=S,m=a(S,["tone","appearance","value","options","onUpdateValue","onUpdateValidValue","freeCSS","cellStyles","cellClassName","cellCheckedClassName","cellCheckedStyles"]),[v]=c(R.uuid.gen()),[s,L]=c(r),[w,h]=c(s);return s!=r&&(L(r),h(r)),t(x.Radio,l(o({defaultActiveStyling:!1,flexWrap:!1,borderRadius:"2.tone.secondary",position:"relative",options:f,value:w,componentID:v,icon:!1},m),{freeCSS:o({whiteSpace:"nowrap"},p),cellStyles:o({flexCenter:!0,ssPushable:!0,boxShadow:"none"},g),cellClassName:[k,u("Label"),u("Tone_"+i)].join(" "),cellCheckedStyles:o({isSemiBoldFont:!0},I),cellCheckedClassName:[B,u("Checked")].join(" "),tone:"custom",onUpdateValue:b,onUpdateValidValue:y=>{C&&C(y),i=="BottomLine"&&h(y.value[0])}}))},d={Auto:e=>(e=o({},e),e=l(o({padding:"1/3",gap:"1/3",ssCardBox:!0},e),{cellStyles:o({borderRadius:"inherit",position:"relative"},e.cellStyles),cellCheckedStyles:o({backgroundColor:"theme",fontColor:"white"},e.cellCheckedStyles)}),t(n,o({appearance:e.tone||"Auto"},e))),Normal:e=>(e=o({},e),e=l(o({border:!0,borderColor:"theme",overflow:"hidden",gap:0,ssLastChildLossBorder:"right",fontColor:"3.blur"},e),{cellStyles:o({borderRadius:0,borderRight:!0,borderColor:"theme"},e.cellStyles),cellCheckedStyles:o({backgroundColor:"theme",fontColor:"white"},e.cellCheckedStyles)}),e.tone="ThemeBorder",t(n,o({appearance:"Border"},e))),Cloud:e=>(e=o({},e),e=l(o({padding:"1/3",gap:"1/3",backgroundColor:"cloud"},e),{cellStyles:o({borderRadius:"inherit",position:"relative"},e.cellStyles),cellCheckedStyles:o({backgroundColor:"theme",fontColor:"white"},e.cellCheckedStyles)}),t(n,o({appearance:e.tone||"Cloud"},e))),Cloud2:e=>(e=o({},e),e.tone="WhiteCloud",t(d.Cloud,l(o({fontColor:"3.blur"},e),{cellCheckedStyles:o({fontColor:"1.clear"},e.cellCheckedStyles)}))),Cloud3:e=>(e=o({},e),e.tone="ThemeCloud",t(d.Cloud,l(o({backgroundColor:"tcOpFew",fontColor:"theme"},e),{cellStyles:o({},e.cellStyles)}))),Border:e=>(e=o({},e),e=l(o({backgroundColor:"1.layer.base",border:"2.normal",overflow:"hidden",gap:0,ssLastChildLossBorder:"right",boxShadow:"0.thin"},e),{cellStyles:o({borderRadius:0,borderRight:"2.normal"},e.cellStyles),cellCheckedStyles:o({backgroundColor:"tcOpFew",fontColor:"theme"},e.cellCheckedStyles)}),t(n,o({appearance:e.tone||"Border"},e))),Border2:e=>(e=o({},e),e=l(o({border:!0,borderColor:"theme",overflow:"hidden",gap:0,ssLastChildLossBorder:"right",boxShadow:"0.thin",fontColor:"3.blur"},e),{cellStyles:o({borderRadius:0,borderRight:!0,borderColor:"theme"},e.cellStyles),cellCheckedStyles:o({backgroundColor:"theme",fontColor:"white"},e.cellCheckedStyles)}),e.tone="ThemeBorder",t(n,o({appearance:"Border"},e))),BottomLine:e=>(e=o({},e),e=l(o({gap:0,fontColor:"3.blur"},e),{cellStyles:o({ssEffectsOnActive:"ripple.theme",borderRadius:0,padding:1},e.cellStyles),cellCheckedStyles:o({fontColor:"theme"},e.cellCheckedStyles)}),t(n,o({appearance:"BottomLine"},e)))};export{d as Segmented,d as default};
|
package/dist/fn/Input/Select.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as c,c as d,d as T}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=Select.js.map
|
|
1
|
+
import{b as c,c as d,d as T}from"../../chunk-VY3566IV.js";import{Fragment as Q,jsx as l,jsxs as G}from"react/jsx-runtime";import{useState as C}from"react";import{$$ as S}from"../../@utils/_";import E from"../../atoms/Box";import J from"../../atoms/FAI";import{Wrapper as U,BoxWrapper as W,SubmitForm as q,CommonEffects as K,DefaultStyles as M}from"./core";import $ from"./Parts";import{InputClasses as j,InputSelectClasses as N}from"../../@styles/componentClasses/_";function H(e){let{value:t,params:u}=e,{required:n,options:a}=u,o=[];return n&&(!a.length||a.length&&S.is.nullish(JSON.parse(t)))&&o.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!o.filter(({type:r})=>r=="invalid").length,notice:o}}const _={Core:e=>{var O;let x=e,{tone:t,required:u,form:n,className:a,enableFormSubmit:o,enableUnSelected:r,checkValidationAtFirst:f,onChange:p,onKeyDown:I,onValidate:b,onUpdateValue:m,onUpdateValidValue:y,value:h="",options:B,placeholder:F,leftIndicator:X,rightIndicator:Y,leftIcon:Z,rightIcon:P,componentID:w,status_id:ee}=x,L=T(x,["tone","required","form","className","enableFormSubmit","enableUnSelected","checkValidationAtFirst","onChange","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","options","placeholder","leftIndicator","rightIndicator","leftIcon","rightIcon","componentID","status_id"]),A={componentID:e.componentID||"",dataValue:h,eventType:"init",eventID:S.uuid.gen()},[s,v]=C(A),[g,D]=C({ok:!1,notice:[]});K({type:"select",params:e,val_status:s,set_status:v,ExtraOverrideParams:{dataValue:h,formatValue:h},val_validate:g,set_validate:D,DefaultValidation:H,onUpdateValue:m,onUpdateValidValue:y});let R=l(E,{fontColor:"4.thin",textAlign:"left",children:F||"\u9078\u629E"});if(s.dataValue){let i=B.find(V=>V.value==s.dataValue);i&&(R=(O=i.displayLabel)!=null?O:i.label)}return l(W,{val_status:s,set_status:v,val_validate:g,params:e,children:G(E,{className:[a,N("SelectLegend"),j("InputCover")].join(" "),children:[R,l("select",d(c({"data-form":n,"data-input-type":"select","data-validation":g.ok,"data-component-id":s.componentID,"data-value":s.dataValue,value:s.dataValue,onKeyDown:i=>{I&&I(i),o&&q(i)},onChange:i=>{let{value:V}=i.target;g.ok&&D({ok:!1,notice:[]}),v(d(c({},s),{dataValue:V,eventType:"update",eventID:S.uuid.gen()})),p&&p(i)}},L),{className:N("Select"),children:l(_.Options,c({},e))}))]})})},Options:e=>{let{options:t=[],placeholder:u="\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",enableUnSelected:n=!0}=e,a=t.map(o=>{let{value:r,label:f}=o,p=String(r);return l("option",{value:p,children:f},p)});return n&&a.unshift(l("option",{value:JSON.stringify(null),children:u},0)),l(Q,{children:a})}},z=e=>{let{value:t=null,placeholder:u,options:n=[]}=e,a=0,o=JSON.stringify(t),r=n.map(p=>{let{value:I,label:b}=p,m=JSON.stringify(I),y=m==o;return a|=Number(y),d(c({},p),{value:m,label:b})});a||(t=null);let f=JSON.stringify(t);return l(_.Core,d(c({},e),{value:f,options:r}))},k=e=>{var u,n;e=c({},e),S.is.nullish(e.rightIcon)&&(e.rightIcon=l($.RightIcon,d(c({flexType:"col"},e.rightIconStyles),{children:l(J.AngleDown,{})}))),e.rightIcon&&(e.paddingRight=(u=e.paddingRight)!=null?u:3),e.leftIcon&&(e.paddingLeft=(n=e.paddingLeft)!=null?n:3);let t=M.Boxish(e);return delete t.rightIconStyles,l(U,{componentID:e.componentID,children:z,params:t})};export{k as Select,k as default};
|
package/dist/fn/Input/Slider.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as I,c as V,d as B}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=Slider.js.map
|
|
1
|
+
import{b as I,c as V,d as B}from"../../chunk-VY3566IV.js";import{jsx as m,jsxs as M}from"react/jsx-runtime";import{useState as A,useEffect as q}from"react";import{$$ as r,Config as L,useStore as E,GenerateClassName as O}from"../../@utils/_";import x from"../../atoms/Box";import F from"../../atoms/Flex";import $ from"../../mols/Column";import G from"../Button";import{Wrapper as X,BoxWrapper as j,SubmitForm as J,CommonEffects as Q}from"./core";import Y from"./Hidden";import{InputSliderClasses as v}from"../../@styles/componentClasses/_";function Z(a){let{value:e,params:o}=a,{required:n}=o,s=[];return n&&!e&&s.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!s.filter(({type:i})=>i=="invalid").length,notice:s}}const N=a=>{let{value:e,val_status:o}=a,{min:n,max:s,step:i}=o;e=Math.max(e,n),e=Math.min(e,s);let t=e/s*s;return t=Math.round(t/i),{stepValue:t*i,stepIndex:t,positionLeft:t*i/s*100+"%"}},z={IndicatorLabels:a=>{let{componentID:e,min:o,max:n,step:s,customLegends:i}=a,u=[],t=Math.round(o/s),d=Math.round(n/s),f=d-t+1;for(var p=t;p<=d;p++){let l=p*s;l=Math.max(l,o),l=Math.min(l,n);let g=l/n*100+"%";u.push(m(x,{className:v("Label"),id:"Legend-"+e+"-"+p,display:p==t||p==d?"flex":"none",position:"absolute",top:0,unitHeight:1,unitWidth:1.5,transition:"middle",fontColor:"1.clear",freeCSS:{left:g,whiteSpace:"nowrap",textAlign:"center"},verticalAlign:"center",horizontalAlign:"center",children:i?i(l):l.rank()},l))}return q(()=>{const l=()=>{let g=r(L.get().appRoot).find("#Labels-"+e),{width:S}=g.position(),C=Math.round(S/50)-1,y=Math.round(f/C);for(let c=t+1;c<d;c++)r(L.get().appRoot).find("#Legend-"+e+"-"+c).css({display:c%y==0?"flex":"none"})};return r(window).addEvent({eventID:"SliderResizeCallback-"+e,eventType:"resize",callback:()=>{l()}}),l(),()=>{r(window).removeEvent("SliderResizeCallback-"+e)}},[]),m(F,{className:v("Labels"),verticalAlign:"center",horizontalAlign:"between",backgroundColor:"posi",fontSize:"0.xs",position:"relative",id:"Labels-"+e,children:m(x,{position:"absolute",top:0,left:0,bottom:0,freeCSS:{right:12*1.5},children:u})})},Rail:a=>{let{val_status:e,set_status:o,DotData:n,form:s,enableFormSubmit:i}=a,{componentID:u}=e;return M(F,{className:v("Rail"),position:"relative",paddingLeft:"1/2",unitHeight:1.5,verticalAlign:"center",freeCSS:{minWidth:"10rem",zIndex:1,cursor:"pointer"},onMouseDown:t=>{t.stopPropagation(),h.Effects.Start(t,{val_status:e,set_status:o,DotData:n})},onTouchStart:t=>{t.stopPropagation(),h.Effects.Start(t,{val_status:e,set_status:o,DotData:n})},children:[m(x,{className:v("Bar"),backgroundColor:"4.layer.darken",position:"relative",borderRadius:"sphere",transition:"middle",flexSizing:"none",unitHeight:"2/3",width:1,id:u+"_Bar",children:m(x,{className:v("BarColor"),position:"relative",height:1,width:0,left:0,transition:"long",borderRadius:"inherit",backgroundColor:a.color,opacity:"middle",overflow:"hidden",freeCSS:{width:n.positionLeft},id:u+"_BarColor"})}),m(x,{className:v("BallWrap"),position:"absolute",top:0,left:0,bottom:0,freeCSS:{right:12*1.5},children:m(G.Button.Plain,{className:v("Ball"),position:"absolute",backgroundColor:a.color,top:0,left:0,ssSphere:1.5,freeCSS:{zIndex:2,left:n.positionLeft},"data-form-name":s,id:u+"_Ball",onKeyDown:t=>{h.KeyDownEvent({event:t,val_status:e,set_status:o,DotData:n}),i&&J(t)}})})]})}},h={Effects:{Start:(a,e)=>{r(document).addEvent({eventID:"SliderMouseMove",eventType:"mousemove",callback:o=>{h.Effects.Move(o,e)},option:{passive:!1}}).addEvent({eventID:"SliderTouchMove",eventType:"touchmove",callback:o=>{h.Effects.Move(o,e)},option:{passive:!1}}).addEvent({eventID:"SliderMouseUp",eventType:"mouseup",callback:()=>{h.Effects.End()}}).addEvent({eventID:"SliderTouchEnd",eventType:"touchend",callback:()=>{h.Effects.End()}})},Move:(a,e)=>{let o=r.getCursor(a).x,{val_status:n,set_status:s}=e,{componentID:i,min:u,max:t}=n,d=r(L.get().appRoot).find("#"+i+"_Ball"),f=r(L.get().appRoot).find("#"+i+"_Bar"),p=r(L.get().appRoot).find("#"+i+"_BarColor"),{width:l,left:g}=f.position(),S=(o-g)/l;S=Math.max(S,0),S=Math.min(S,1);let C=S*t,y=N({value:C,val_status:n}),c=y.positionLeft,D=y.stepValue;d.css({left:c}),p.css({width:c});let{prevValue:T}=E.get(i);return D!=T&&(E.update({key:i,value:{prevValue:D}}),s(V(I({},n),{dataValue:D,eventType:"update",eventID:r.uuid.gen()}))),a.preventDefault(),a.stopPropagation(),!1},End:()=>{r(document).removeEvent(["SliderMouseMove","SliderTouchMove","SliderMouseUp","SliderTouchEnd"])}},KeyDownEvent:a=>{let{event:e,val_status:o,set_status:n}=a,{min:s,max:i,step:u}=o,{key:t,metaKey:d,ctrlKey:f}=e,p=f||d,l=o.dataValue;t.match(/Arrow/)&&(e.preventDefault(),t.match(/Left|Up/)?p?l=s:l-=u:t.match(/Right|Down/)&&(p?l=i:l+=u),l=Math.max(Math.min(l,i),s),E.update({key:o.componentID,value:{prevValue:l}}),n(V(I({},o),{dataValue:l,eventType:"update",eventID:r.uuid.gen()})))}},ee=a=>{let k=a,{color:e="theme",required:o,form:n="",legends:{enable:s=!0,custom:i,showAlways:u=!1}={},min:t,max:d,step:f,enableFormSubmit:p,checkValidationAtFirst:l,onChange:g,onKeyDown:S,onValidate:C,onUpdateValue:y,onUpdateValidValue:c,value:D="",className:T}=k,W=B(k,["color","required","form","legends","min","max","step","enableFormSubmit","checkValidationAtFirst","onChange","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","className"]),H={componentID:a.componentID||"",dataValue:D,min:t,max:d,step:f,eventType:"init",eventID:r.uuid.gen()},[b,R]=A(H),[_,U]=A({ok:!1,notice:[]});Q({params:a,val_status:b,set_status:R,val_validate:_,set_validate:U,onUpdateValue:y,onUpdateValidValue:c,DefaultValidation:Z,ExtraOverrideParams:{dataValue:D},ExtraStoreParams:{prevValue:b.dataValue,setValueByForeign:P=>{R(V(I({},b),{dataValue:P,eventType:"update",eventID:r.uuid.gen()}))}}});let w=N({value:b.dataValue,val_status:b});return M(j,{val_status:b,set_status:R,val_validate:_,params:a,children:[m(Y,I({value:w.stepValue,form:n,"data-value":w.stepValue,"data-validation":_.ok,"data-input-type":"slider"},W)),M($,{gap:"1/2",flexSizing:"auto",className:[v("Wrap"),T,v("ShowLegendsAlways_"+u)].join(" "),children:[m(z.Rail,{color:e,val_status:b,set_status:R,DotData:w,form:n,enableFormSubmit:p}),s?m(z.IndicatorLabels,{componentID:b.componentID,min:t,max:d,step:f,customLegends:i}):null]})]})},K=a=>(a=I({},a),m(X,{componentID:a.componentID,children:ee,params:O(a)}));export{K as Slider,K as default};
|
package/dist/fn/Input/Switch.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as l,c as f,d as V}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=Switch.js.map
|
|
1
|
+
import{b as l,c as f,d as V}from"../../chunk-VY3566IV.js";import{jsx as a,jsxs as w}from"react/jsx-runtime";import{useState as g}from"react";import{$$ as x}from"../../@utils/_";import s from"../../atoms/Box";import F from"../../mols/Row";import N from"../Button";import{Wrapper as L,BoxWrapper as q,SubmitForm as H,CommonEffects as O}from"./core";import{InputSwitchClasses as c}from"../../@styles/componentClasses/_";function U(e){let{value:I,params:o}=e,{required:y}=o,n=[];return y&&!I&&n.push({type:"invalid",label:"ON\u306B\u306A\u3063\u3066\u3044\u307E\u305B\u3093"}),{ok:!n.filter(({type:r})=>r=="invalid").length,notice:n}}const W=e=>{let k=e,{componentID:I,color:o="posi",required:y,form:n,id:r,enableFormSubmit:R,checkValidationAtFirst:A,onChange:b,onKeyDown:v,onValidate:K,onUpdateValue:T,onUpdateValidValue:B,value:m="",icon:C="",appearance:p="material"}=k,_=V(k,["componentID","color","required","form","id","enableFormSubmit","checkValidationAtFirst","onChange","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","icon","appearance"]),E={componentID:e.componentID||"",dataValue:m,eventType:"init",eventID:x.uuid.gen()},[t,h]=g(E),[u,S]=g({ok:!1,notice:[]}),d=!!t.dataValue;return O({params:e,val_status:t,set_status:h,val_validate:u,set_validate:S,DefaultValidation:U,onUpdateValue:T,onUpdateValidValue:B,ExtraOverrideParams:{dataValue:m,formatValue:m}}),w(q,{val_status:t,set_status:h,val_validate:u,params:e,children:[a("input",l({type:"checkbox","data-form":n,"data-input-type":"switch","data-validation":u.ok,"data-component-id":t.componentID,"data-value":t.dataValue,checked:t.dataValue,className:c("Input"),id:r,onKeyDown:i=>{v&&v(i),R&&H(i)},onChange:i=>{u.ok&&S({ok:!1,notice:[]}),h(f(l({},t),{dataValue:i.target.checked,eventType:"update",eventID:x.uuid.gen()})),b&&b(i)}},_)),a(N.Label.Plain,{tabIndex:-1,htmlFor:r,padding:"1/3",transition:"middle",borderRadius:"1.tone.primary",className:c("Label"),children:a(s,f(l({},p=="applely"?{padding:"1/4",isRounded:!0,backgroundColor:d?o:"5.layer.darker"}:{}),{children:w(F.Center,{unitHeight:2.5,position:"relative",freeCSS:{width:12*4.5},children:[p=="material"?a(s,{position:"absolute",backgroundColor:d?o:"5.layer.darker",borderRadius:"sphere",unitHeight:1,transition:"middle",width:1,className:c("Bar"),opacity:"middle"}):null,a(s,{position:"absolute",top:0,left:0,backgroundColor:p=="material"&&d?o:"white",transition:"middle",ssSphere:2.5,boxShadow:"1.remark",className:c("Dot"),children:C?a(s,{transition:"middle",ssSquare:2,flexCenter:!0,fontColor:p=="applely"&&d?o:"white",children:C}):null})]})}))})]})},D=e=>(e=l({},e),e.color=e.color||"theme",a(L,{componentID:e.componentID,children:W,params:e}));export{D as Switch,D as default};
|
package/dist/fn/Input/Text.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as o,c as I,d as F}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=Text.js.map
|
|
1
|
+
import{b as o,c as I,d as F}from"../../chunk-VY3566IV.js";import{Fragment as Z,jsx as i,jsxs as H}from"react/jsx-runtime";import{useState as E,useEffect as O}from"react";import{$$ as x,Config as w,useStore as ee}from"../../@utils/_";import C from"../../atoms/Box";import te from"../../atoms/FAI";import ae from"../Button";import U from"../Tooltips";import{faEye as re}from"@fortawesome/free-solid-svg-icons/faEye";import{Wrapper as ie,BoxWrapper as ne,SubmitForm as oe,CommonEffects as le,DefaultStyles as ue}from"./core";import A from"./Parts";const se={number:{reg:/^-?[0-9\.]+$/g,exist:!0,reason:"\u534A\u89D2\u6570\u5B57\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"},katakana:{reg:/^[ァ-ヶー ヲ-゚ ]*$/g,exist:!0,reason:"\u30AB\u30BF\u30AB\u30CA\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"},"hankaku.katakana":{reg:/^[ヲ-゚ ]*$/g,exist:!0,reason:"\u534A\u89D2\u30AB\u30BF\u30AB\u30CA\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"},digitNumber:{reg:/^-?[0-9\.]+$/g,exist:!0,reason:"\u534A\u89D2\u6570\u5B57\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"},fileName:{reg:/[¥\/:*\?\"\'\|\.\s\n\r\<\>]/g,exist:!1,reason:"\u7A7A\u767D\u307E\u305F\u306F\u4E00\u90E8\u306E\u7279\u6B8A\u6587\u5B57\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093"},creditCard:{reg:/^\d{14,16}$/g,exist:!0,reason:"14~16\u6841\u306E\u6570\u5B57\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"},email:{reg:/^[A-Za-z0-9]{1}[A-Za-z0-9_.-]*@{1}[A-Za-z0-9_.-]+\.[A-Za-z0-9]+$/,exist:!0,reason:H(Z,{children:[i(C,{children:"\u25CB\u25CB\u25CB\u25CB@\u25CB\u25CB\u25CB\u25CB.\u25CB\u25CB\u25CB\u306E\u5F62\u5F0F\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"}),i(C,{children:"\u6700\u5F8C\u306E\u6587\u5B57\u306B.(\u30C9\u30C3\u30C8)\u3092\u5165\u308C\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"})]})},password:{reg:/^(?=[^A-Z]*[A-Z])(?=[^a-z]*[a-z])(?=[^0-9]*[0-9]).{8,}$/,exist:!0,reason:"8\u6587\u5B57\u4EE5\u4E0A\u3001\u534A\u89D2\u82F1\u6570\u5927\u5C0F\u6587\u5B57\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"},tel:{reg:/.*$/g,exist:!0,reason:H(Z,{children:[i(C,{children:"0\u304B\u3089\u59CB\u307E\u308B\u756A\u53F7\u306E\u307F\u5165\u529B\u53EF\u80FD\u3067\u3059"}),i(C,{children:"9~12\u6841\u306E\u6570\u5B57\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"}),i(C,{children:"\u6570\u5B57\u306E\u307F\u5165\u529B\u53EF\u80FD\u3067\u3059"})]})},url:{reg:/^https?:\/\/[^\n\s]+(\.|\:)[^\n\s\.\:]+$/,exist:!0,reason:"URL\u5F62\u5F0F : http(s)://\u25EF\u25EF\u25EF\u25EF"},postal:{reg:/^\d{7}$/g,exist:!0,reason:"7\u6841\u306E\u6570\u5B57\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"}},V=e=>{let{restrict:r,value:p=""}=e,t=String(p),a=!1;if(["tel","number","digitNumber","test","postal","creditCard"].includes(r)&&(t=t.zen2hanNumber()),r=="katakana"&&(t=t.replace(/[^ァ-ヶー ヲ-゚ ]/ig,"")),r=="hankaku.katakana"&&(t=t.replace(/[^ヲ-゚ ]/ig,"")),["postal","creditCard"].includes(r)&&(t=t.removeLetters()),["number","digitNumber"].includes(r)&&t&&t!="-")if(t=="0-")t="-";else{t[0]=="-"&&(a=!0),t=t.replace(/[^0-9\.]/ig,"");let n=Number(t);n===0&&(a=!1),a&&(n=-1*n),x.is.exist(e.min)&&(n=Math.max(n,Number(e.min))),x.is.exist(e.max)&&(n=Math.min(n,Number(e.max))),t=String(Math.abs(n))}let s=t;if(r=="digitNumber"){if(t&&t!="-"){let n=[];for(let l=t.length-1;l>=0;l--){n.unshift(t[l]);let g=t.length-1-l+1;l!=0&&g%3==0&&n.unshift(",")}s=n.join("")}}else r=="postal"?t.length>=4&&(s=t.clip(0,3)+"-"+t.clip(3)):r=="creditCard"&&(s=t.replace(/.{4}(?=.)/g,"$& "));return["number","digitNumber"].includes(r)&&a&&(t="-"+t,s="-"+s),{formatValue:s,dataValue:t}},pe=e=>{let{id:r,restrict:p,val_status:t}=e,a=x(w.get().appRoot).find("#"+r)[0];if(a&&t.prevValue&&t.formatValue){let{formatValue:s,prevValue:n,caretFrom:l,caretTo:g}=t;if(p=="creditCard")s.length>=n.length&&l%5==0&&(l++,g++),a.setSelectionRange(l,g);else if(p=="postal")s.length==5&&n.length==3&&(l++,g++),a.setSelectionRange(l,g);else if(p=="digitNumber"){let S=s.length-n.length;S==2&&(l++,g++),S==-2&&(l--,g--),a.setSelectionRange(l,g)}}},K=(e,r)=>{let p={ok:!0,body:""};return(()=>{let t=se[r];if(!t)return;let a=t.reason;if(t){let s=!!(+!!e.match(t.reg)^+!t.exist);p={ok:s,body:s?"":a}}})(),p};function me(e){let{value:r,params:p}=e,{restrict:t="text",maxLength:a=255,required:s}=p,n=[];if(x.is.exist(a)&&r.length>=Number(a)&&n.push({type:"invalid",label:a+"\u5B57\u4EE5\u5185\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"}),r){let l=K(r,t);l.ok||n.push({type:"invalid",label:l.body})}else s&&n.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"});return{ok:!n.filter(({type:l})=>l=="invalid").length,notice:n}}const de=e=>{let X=e,{componentID:r,tone:p,required:t,restrict:a="text",form:s,autoComplete:n="off",autoCapitalize:l="off",enableFormSubmit:g,clearButton:S=!1,checkValidationAtFirst:ce,onChange:J,onKeyDown:M,onValidate:fe,onUpdateValue:W,onUpdateValidValue:q,value:$="",leftIndicator:ge,rightIndicator:xe,leftIcon:be,rightIcon:he,maxLength:Ie,min:N,max:k}=X,m=F(X,["componentID","tone","required","restrict","form","autoComplete","autoCapitalize","enableFormSubmit","clearButton","checkValidationAtFirst","onChange","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","leftIndicator","rightIndicator","leftIcon","rightIcon","maxLength","min","max"]),Y=a=="password"?"password":"text",P=["number","digitNumber","creditCard"].includes(a)?"numeric":a=="email"?"email":"text",j=I(o({componentID:r},V({min:N,max:k,restrict:a,value:$})),{prevValue:"",eventType:"init",eventID:x.uuid.gen(),caretFrom:null,caretTo:null}),[G,L]=E(!1),[u,v]=E(j),[y,R]=E({ok:!1,notice:[]});return le({params:e,val_status:u,set_status:v,val_validate:y,set_validate:R,DefaultValidation:me,onUpdateValue:W,onUpdateValidValue:q,ExtraOverrideParams:o({},V({min:N,max:k,restrict:a,value:$}))}),O(()=>{pe({id:e.id,restrict:a,val_status:u})},[u]),i(ne,{val_status:u,set_status:v,val_validate:y,params:e,children:i("input",I(o({type:Y,inputMode:P,"data-form":s,"data-input-type":"text","data-validation":y.ok,"data-value":u.dataValue,"data-component-id":u.componentID,value:u.formatValue,autoComplete:n,autoCapitalize:l,onKeyDown:d=>{let{key:f,target:D}=d;{let b=D,{selectionStart:h,selectionEnd:Q}=b,T=Number(h),z=Number(Q),B=u.formatValue[Number(T)],_=u.formatValue[Number(T)-1];f=="Delete"&&(a=="creditCard"&&B==" "||a=="postal"&&B=="-"||a=="digitNumber"&&B==",")&&(b.setSelectionRange(T+1,z+1),d.preventDefault()),f=="Backspace"&&(a=="creditCard"&&_==" "||a=="postal"&&_=="-"||a=="digitNumber"&&_==",")&&(b.setSelectionRange(T-1,z-1),d.preventDefault()),f=="Enter"||f=="Tab"}if(["number","digitNumber","creditCard"].includes(a)&&f=="Clear"&&v(I(o({},u),{dataValue:"",formatValue:"",eventType:"update",eventID:x.uuid.gen()})),["number","digitNumber"].includes(a)&&["ArrowUp","ArrowDown"].includes(f)){let b=+(f=="ArrowUp")*2-1,h=String(Number(u.dataValue)+b);y.ok&&R({ok:!1,notice:[]}),v(I(o(o({},u),V({min:N,max:k,restrict:a,value:h})),{eventType:"update",eventID:x.uuid.gen()})),d.preventDefault()}M&&M(d),g&&oe(d)},onChange:d=>{let{value:f,selectionStart:D,selectionEnd:b}=d.target,h=V({min:N,max:k,restrict:a,value:f});G&&(h.formatValue=f),h.formatValue!=u.formatValue&&(y.ok&&R({ok:!1,notice:[]}),v(I(o(o({},u),h),{prevValue:u.formatValue,eventType:"update",eventID:x.uuid.gen(),caretFrom:Number(D),caretTo:Number(b)})),J&&J(d))}},m),{onCompositionStart:d=>{m!=null&&m.onCompositionStart&&(m==null||m.onCompositionStart(d)),L(!0)},onCompositionEnd:d=>{if(m!=null&&m.onCompositionEnd&&(m==null||m.onCompositionEnd(d)),a=="text")return;let f=V({min:N,max:k,restrict:a,value:u.formatValue});v(I(o(o({},u),f),{prevValue:u.formatValue,eventType:"update",eventID:x.uuid.gen(),caretFrom:Number(u.formatValue.length+1),caretTo:Number(u.formatValue.length+1)})),L(!1)}}))})},c={Validate:K,Normal:e=>{var r,p;return e=o({},e),e.rightIcon&&(e.paddingRight=(r=e.paddingRight)!=null?r:3),e.leftIcon&&(e.paddingLeft=(p=e.paddingLeft)!=null?p:3),i(ie,{componentID:e.componentID,children:de,params:ue.Boxish(e)})},Katakana:e=>i(c.Normal,o({restrict:"katakana"},e)),HankakuKatakana:e=>i(c.Normal,o({restrict:"hankaku.katakana"},e)),CreditCard:e=>i(c.Normal,o({restrict:"creditCard"},e)),Tel:e=>i(c.Normal,o({restrict:"tel",placeholder:"xxx-xxxx-xxxx"},e)),Number:e=>i(c.Normal,o({restrict:"number"},e)),DigitNumber:e=>i(c.Normal,o({restrict:"digitNumber"},e)),Email:e=>i(c.Normal,o({restrict:"email"},e)),Url:e=>i(c.Normal,o({restrict:"url",placeholder:"https://example.com"},e)),Postal:e=>{let[r]=E(x.uuid.gen());return O(()=>()=>{ee.delete(r)},[]),i(c.Normal,o({restrict:"postal",placeholder:"\u90F5\u4FBF\u756A\u53F7",leftIndicator:i(A.LeftIndicator,{children:"\u3012"})},e))},Password:e=>i(c.Normal,o({restrict:"password",placeholder:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B",rightIndicator:i(A.RightIndicator,{padding:0,children:i(ae.Button.Normal.R,{padding:[0,1],fontColor:"theme",borderRadius:"inherit",backgroundColor:"inherit",height:1,ssEffectsOnActive:["expand"],onMouseOver:r=>{U.open({parent:r.currentTarget,gravityPoint:24,padding:[1,0],content:i(U.Comps.Body,{children:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u8868\u793A"})})},tabIndex:-1,onClick:r=>{x(w.get().appRoot).find(r.target).parent().parent().parent().find("input").callback(p=>{let t=p[0];t.type=t.type==="password"?"text":"password"})},children:i(te,{icon:re,freeCSS:{pointerEvents:"none"}})})})},e)),Money:{JPY:e=>i(c.DigitNumber,o({placeholder:"\u91D1\u984D\u3092\u5165\u529B",rightIndicator:i(A.RightIndicator,{children:"\u5186"})},e))}};export{c as Text,de as TextInput,c as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as u,c as g,d as T}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=TextArea.js.map
|
|
1
|
+
import{b as u,c as g,d as T}from"../../chunk-VY3566IV.js";import{jsx as s}from"react/jsx-runtime";import{useState as v}from"react";import{$$ as y}from"../../@utils/_";import{Wrapper as E,BoxWrapper as _,SubmitForm as k,CommonEffects as C,DefaultStyles as S}from"./core";function F(e){let{value:t,params:n}=e,{required:o}=n,i=[];return o&&!t&&i.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!i.filter(({type:d})=>d=="invalid").length,notice:i}}const B=e=>{let m=e,{componentID:t,tone:n,required:o,form:i,enableFormSubmit:d,checkValidationAtFirst:L,onChange:c,onKeyDown:f,onValidate:W,onUpdateValue:x,onUpdateValidValue:V,value:D="",leftIndicator:q,rightIndicator:H,leftIcon:K,rightIcon:M}=m,R=T(m,["componentID","tone","required","form","enableFormSubmit","checkValidationAtFirst","onChange","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","leftIndicator","rightIndicator","leftIcon","rightIcon"]),b={componentID:t,dataValue:D,eventType:"init",eventID:y.uuid.gen()},[a,r]=v(b),[p,I]=v({ok:!1,notice:[]});return C({params:e,val_status:a,set_status:r,val_validate:p,set_validate:I,onUpdateValue:x,onUpdateValidValue:V,DefaultValidation:F}),s(_,{val_status:a,set_status:r,val_validate:p,params:e,children:s("textarea",u({"data-form":i,"data-input-type":"textarea","data-validation":p.ok,"data-value":a.dataValue,"data-component-id":a.componentID,value:a.dataValue,onKeyDown:l=>{f&&f(l),d&&k(l)},onChange:l=>{let{value:A}=l.target;p.ok&&I({ok:!1,notice:[]}),r(g(u({},a),{dataValue:A,eventType:"update",eventID:y.uuid.gen()})),c&&c(l)}},R))})},h=e=>{var n,o;e=u({},e),e.rightIcon&&(e.paddingRight=(n=e.paddingRight)!=null?n:3),e.leftIcon&&(e.paddingLeft=(o=e.paddingLeft)!=null?o:3);let t=S.Boxish(e);return t.rows=t.rows||5,s(E,{componentID:e.componentID,children:B,params:t})};export{h as TextArea,h as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as f,c as T}from"../../../chunk-E3D4DIO4.js";import{Fragment as $,jsx as i,jsxs as y}from"react/jsx-runtime";import{createElement as P}from"react";import{useState as w,useEffect as z,useRef as Y}from"react";import{$$ as c}from"@utils";import C from"@atoms/Box";import N from"@atoms/FAI";import B from"@atoms/Flex";import _ from"@atoms/Grid";import M from"@mols/Row";import x from"@mols/Column";import O from"@mols/Text";import v from"@fn/Button";import H from"@fn/Tooltips";import R from"../Select";import{List as F}from"../List";import{InputTimeClasses as g}from"@styles/componentClasses/_";let A=r=>{var t,a;let e=[],d=Number((t=r==null?void 0:r.min)!=null?t:1900),o=Number((a=r==null?void 0:r.max)!=null?a:c.Time().addYear(10).year);for(let m=d;m<=o;m++)e.unshift({value:m,label:[m,...c.transformer.wareki(m).value].join(" - ")});return e};const L=r=>{let{restrict:e,era:d="year",defaultValue:o=""}=r;r=f({},r),r.tipsID=r.tipsID||c.uuid.gen();const t=Y(!1);let[a,m]=w((()=>{var s,p;if(e=="clock"){let l=String(o).split(/[^\d]/);l[0]||(l=[0,0]);let u=Number(l[0]),h=Number(l[1]);return{modifiedType:"init",hour:u,minutes:h}}else if(e=="date"){let[l,u,h]=(s=String(o))==null?void 0:s.split(/\D/);return(c.is.nullish(l)||c.is.nullish(u)||c.is.nullish(h))&&([l,u,h]=c.Time().toFormat("%Y-%M-%D").split("-")),{modifiedType:"init",year:Number(l),month:Number(u),date:Number(h)}}else if(e!="week"){if(e=="month"){let[l,u]=String(o).split(/\D/);return(c.is.nullish(l)||c.is.nullish(u))&&([l,u]=c.Time().toFormat("%Y-%M").split("-")),{modifiedType:"init",year:Number(l),month:Number(u)}}else if(e=="year"){let[l]=String(o).split(/\D/);return c.is.nullish(l)&&([l]=c.Time().toFormat("%Y").split("-")),{modifiedType:"init",year:Number(l)}}else if(e=="dateWareki"){let[l,u,h]=(p=String(o))==null?void 0:p.split(/\D/);return(c.is.nullish(l)||c.is.nullish(u)||c.is.nullish(h))&&([l,u,h]=c.Time().toFormat("%Y-%M-%D").split("-")),{modifiedType:"init",era:d||"year",year:Number(l),month:Number(u),date:Number(h)}}}return{}})());z(()=>{if(t.current){if(a.modifiedType=="update"){let s="",p=d||"year";if(e=="clock"){let{hour:l,minutes:u}=a;s=[l.zeroEmbed(2),u.zeroEmbed(2)].join("/")}else if(e=="date"){let{year:l,month:u,date:h}=a;s=[l,u.zeroEmbed(2),h.zeroEmbed(2)].join("/")}else if(e!="week"){if(e=="month"){let{year:l,month:u}=a;s=[l,u.zeroEmbed(2)].join("/")}else if(e=="year"){let{year:l}=a;s=String(l)}else if(e=="dateWareki"){let{year:l,month:u,date:h,era:S}=a;p=S,s=[l,u.zeroEmbed(2),h.zeroEmbed(2)].join("/")}}r.onValueUpdate(s,p)}}else t.current=!0},[a]);let n=T(f({},r),{val_value:a,set_value:m});return i(C,{backgroundColor:"1.layer.base",borderRadius:"2.tone.secondary",boxShadow:"1.remark",border:!0,overflow:"hidden",children:i(C,{overflow:"auto",className:g(e.toCapital()+"Base"),children:e=="clock"?i(k.Clock._,f({},n)):e=="date"?i(k.Date._,f({},n)):e=="week"?"":e=="month"?i(k.Month._,f({},n)):e=="year"?i(k.Year._,f({},n)):e=="dates"||e=="months"?"":e=="dateWareki"?i(k.DateWareki._,f({},n)):i($,{})})})},k={Clock:{_:r=>{let{min:e,max:d,onValueUpdate:o,tipsID:t,val_value:a,set_value:m}=r,[n,s]=w(a.hour>12?2:1),[p,l]=w(Number(localStorage.getItem("timePickerUnit")||5));z(()=>{localStorage.setItem("timePickerUnit",String(p))},[p]);let{hour:u,minutes:h}=a;return y(x,{padding:1,children:[y(B,{flexType:"row",flexWrap:!1,gap:1,className:g("Body"),children:[y(x,{className:g("DesignSide"),flexSizing:0,children:[i(C,{className:g("ClockUiBase"),padding:[1,"2/3"],flexCenter:!0,children:y(C,{className:g("ClockUi"),backgroundColor:"tcOpLow",isRounded:!0,position:"relative",children:[i(C,{position:"absolute",backgroundColor:"theme",unitWidth:"1/12",className:[g("Needle"),g("hour")].join(" "),freeCSS:{transform:`rotate(${u*30+h/2}deg)`}}),i(C,{position:"absolute",backgroundColor:"theme",unitWidth:"1/12",className:[g("Needle"),g("minute")].join(" "),freeCSS:{transform:`rotate(${h*6}deg)`}})]})}),i(F.Radio,{tone:"plain",icon:!0,value:[n],options:[{value:1,label:"AM"},{value:2,label:"PM"}],flexType:"col",gap:0,cellStyles:{padding:"1/2",horizontalAlign:"between",gap:"1/3"},tabIndex:-1,onUpdateValidValue:({value:S})=>{let D=a.hour%12+(S==2?12:0);s(S),m({modifiedType:"update",hour:D,minutes:a.minutes})}}),i(C,{borderTop:!0,margin:[0,1]}),i(F.Radio,{tone:"plain",icon:!0,value:[p],options:[{value:1,label:"/ 1\u5206"},{value:2,label:"/ 2\u5206"},{value:5,label:"/ 5\u5206"}],flexType:"col",gap:0,cellStyles:{padding:"1/2",horizontalAlign:"between",gap:"1/3"},tabIndex:-1,onUpdateValidValue:({value:S})=>{l(S)}})]}),y(x,{children:[y(C,{flexCenter:!0,fontSize:"3.paragraph",isSemiBoldFont:!0,children:[a.hour.zeroEmbed(2)," : ",a.minutes.zeroEmbed(2)]}),y(B,{flexWrap:!1,borderRadius:"1.tone.primary",boxShadow:"0.remark.inset",flexChilds:"even",freeCSS:{minWidth:12*12},padding:["1/3",0],children:[i(x,{gap:0,overflow:"auto",padding:"2/3",borderRight:!0,freeCSS:{maxHeight:12*22},children:k.Clock.Hours({onClick:S=>{let V=S+(n==2?12:0);m({modifiedType:"update",hour:V,minutes:a.minutes})},min:e,max:d,ampm:n})}),i(x,{gap:0,overflow:"auto",padding:"2/3",freeCSS:{maxHeight:12*22},children:k.Clock.Minutes({onClick:S=>{m({modifiedType:"update",hour:a.hour,minutes:S})},min:e,max:d,unit:p})})]})]})]}),i(k.Variables.Footer,{tipsID:t,onValueUpdate:o})]})},Hours:r=>{let e=[];for(let d=0;d<12;d++){let o=r.ampm==2?d+12:d,t=!1;{let a=Number(String(o*100).replace(/\D/ig,""));if(r.min&&Number(String(r.min).replace(/\D/ig,""))>a&&(t=!0),r.max){let m=Number(String(r.max).replace(/\D/ig,""));a>m&&(t=!0)}}e.push(i(v.Button.Normal.R,{isLocked:t,borderBottom:!0,borderRadius:0,padding:["1/2",1],freeCSS:{whiteSpace:"nowrap"},tabIndex:-1,onClick:()=>{r.onClick(d)},children:o.zeroEmbed(2)},d))}return e},Minutes:r=>{let e=[];for(let d=0;d<60/r.unit;d++){let o=d*r.unit;e.push(i(v.Button.Normal.R,{borderBottom:!0,borderRadius:0,padding:["1/2",1],freeCSS:{whiteSpace:"nowrap"},tabIndex:-1,onClick:()=>{r.onClick(o)},children:o.zeroEmbed(2)},o))}return e}},Date:{_:r=>{let{min:e,max:d,onValueUpdate:o,tipsID:t,val_value:a,set_value:m}=r,{year:n,month:s,date:p}=a;return y(x,{padding:1,children:[y(B,{horizontalAlign:"between",verticalAlign:"center",flexWrap:!1,children:[y(B,{verticalAlign:"bottom",horizontalAlign:"left",gap:"2/3",flexWrap:!1,children:[i(R,{override:"force",enableUnSelected:!1,value:n,options:A(),border:"1.thin",padding:["1/3","2/3"],paddingRight:2,rightIconStyles:{right:"1/3"},onUpdateValidValue:({value:l})=>{m({modifiedType:"update",year:Number(l),month:s,date:p})}}),i(R,{override:"force",enableUnSelected:!1,value:s,options:(()=>{let l=[];for(let u=1;u<=12;u++)l.push({value:u,label:String(u),displayLabel:String(u)+"\u6708"});return l})(),placeholder:"",border:"1.thin",padding:["1/3","2/3"],paddingRight:2,rightIconStyles:{right:"1/3"},onUpdateValidValue:({value:l})=>{m({modifiedType:"update",year:n,month:Number(l),date:p})}})]}),i(k.Variables.ShiftButtons,{callback:l=>{let u=s+l,h=n;l==-1?(u<=0&&h--,u=u||12):s==12&&h++,m({modifiedType:"update",year:h,month:u,date:a.date})}})]}),i(C,{borderTop:!0}),i(C,{children:k.Date.MonthCalendar({min:e,max:d,year:a.year,month:a.month,current:[a.year,a.month,a.date],callback:l=>{let[u,h,S]=l;m({modifiedType:"update",year:u,month:h,date:S})}})}),i(k.Variables.Footer,{tipsID:t,onValueUpdate:o})]})},MonthCalendar:r=>{let{min:e,max:d,year:o,month:t,current:a,callback:m}=r,n=c.Time(),s=c.Time([o,t.zeroEmbed(2),"01"].join("/")),p=s.getLastDayOfTheMonth(),l=c.Time(s).addMonth(-1).getLastDayOfTheMonth().date,u=[],h=[],S=[],V=[],D={padding:0,unitWidth:3,unitHeight:3,flexCenter:!0,borderRadius:"3.tone.tertiary"};for(var b=0;b<7;b++)u.push(P(C,T(f({className:[g("CalendarDay"),g("Legend")].join(" ")},D),{key:b}),["\u65E5","\u6708","\u706B","\u6C34","\u6728","\u91D1","\u571F"][b]));for(var b=0;b<s.weekday;b++)h.unshift(P(C,T(f({className:[g("CalendarDay"),g("Dummy")].join(" "),fontColor:"4.thin"},D),{key:b}),l-b));for(var b=1;b<=p.date;b++){let U=b,j=o==n.year&&t==n.month&&b==n.date,I=!1;{let E=Number(String([o,t.zeroEmbed(2),b.zeroEmbed(2)].join("/")).replace(/\D/ig,""));if(r.min&&Number(String(r.min).replace(/\D/ig,""))>E&&(I=!0),r.max){let W=Number(String(r.max).replace(/\D/ig,""));E>W&&(I=!0)}}S.push(P(v.Button.Clear.R,T(f({className:[g("CalendarDay"),g("isToday_"+j)].join(" ")},D),{onClick:()=>{m([o,t,U])},tabIndex:-1,key:U,isLocked:I,fontColor:"1.clear",ssEffectsOnActive:"shrink",padding:0,flexCenter:!0,borderRadius:"sphere",children:b})))}for(var b=1;b<7-p.weekday;b++)V.push(P(C,T(f({className:[g("CalendarDay"),g("Dummy")].join(" "),fontColor:"4.thin"},D),{key:b}),b));return y(_,{gridCols:7,gap:"1/3",children:[u,h,S,V]})}},Month:{_:r=>{let{min:e,max:d,onValueUpdate:o,tipsID:t,val_value:a,set_value:m}=r,{year:n,month:s}=a;return y(x,{padding:1,children:[y(M.Separate,{gap:0,children:[i(M.Center,{verticalAlign:"bottom",gap:"2/3",children:i(R,{enableUnSelected:!1,value:n,options:A(),override:"force",border:"1.thin",padding:["1/3","2/3"],paddingRight:2,rightIconStyles:{right:"1/3"},onUpdateValidValue:({value:p})=>{m({modifiedType:"update",year:Number(p),month:s})}})}),i(k.Variables.ShiftButtons,{callback:p=>{let l=Math.min(Math.max(n+p,1900),2100);m({modifiedType:"update",year:l,month:s})}})]}),i(C,{borderTop:!0}),k.Month.Months({min:e,max:d,year:a.year,callback:p=>{let[l,u]=p;m({modifiedType:"update",year:l,month:u})}}),i(k.Variables.Footer,{tipsID:t,onValueUpdate:o})]})},Months:r=>{let{year:e,callback:d}=r,o=c.Time(),t=[];for(let a=1;a<=12;a++){let m=e==o.year&&a==o.month,n=!1;{let p=Number(String([e,a.zeroEmbed(2)].join("/")).replace(/\D/ig,""));if(r.min&&Number(String(r.min).replace(/\D/ig,""))>p&&(n=!0),r.max){let l=Number(String(r.max).replace(/\D/ig,""));p>l&&(n=!0)}}let s=[g("Cell"),m?g("isThisMonth"):""].join(" ");t.push(y(v.Button.Clear.R,{className:s,isLocked:n,fontColor:"2.normal",padding:["2/3",1],ssEffectsOnActive:"shrink",onClick:()=>{d([e,a])},children:[a," \u6708"]},e+"-"+a))}return i(_,{gridCols:4,gap:"2/3",children:t})}},Year:{_:r=>{let{min:e,max:d,onValueUpdate:o,tipsID:t,val_value:a,set_value:m}=r,{year:n}=a;return y(x,{padding:1,children:[i(R,{enableUnSelected:!1,value:n||c.Time().year,override:"force",options:A({min:e,max:d}),onUpdateValidValue:({value:s})=>{m({modifiedType:"update",year:Number(s)})}}),i(k.Variables.Footer,{tipsID:t,onValueUpdate:o,onSubmit:()=>{m({modifiedType:"update",year:Number(n||c.Time().year)})}})]})}},DateWareki:{_:r=>{let{min:e,max:d,onValueUpdate:o,tipsID:t,val_value:a,set_value:m}=r,{era:n,year:s,month:p,date:l}=a,u={val_value:a,set_value:m};return y(C,{children:[y(M.Left,{verticalAlign:"unset",borderBottom:!0,gap:0,children:[i(k.DateWareki.EraSelect,f({},u)),i(C,{borderRight:!0}),i(k.DateWareki.Calendar,f({},u))]}),i(C,{padding:1,children:i(k.Variables.Footer,{tipsID:t,onValueUpdate:o})})]})},EraSelect:r=>{let{val_value:e,set_value:d}=r,o={padding:["1/2",1.5],fontColor:"3.blur"},t={backgroundColor:"cloud",fontColor:"2.normal",isSemiBoldFont:!0};return y(x,{gap:0,padding:1,children:[i(v.Button.Clear.R,T(f({color:"cloud"},o),{isActiveStyles:t,isActive:e.era=="year",onClick:()=>{let a=c.Time();d({modifiedType:"update",era:"year",year:a.year,month:a.month,date:a.date})},children:"\u897F\u66A6"})),i(v.Button.Clear.R,T(f({color:"cloud"},o),{isActiveStyles:t,isActive:e.era=="reiwa",onClick:()=>{let a=c.Time();d({modifiedType:"update",era:"reiwa",year:a.year,month:a.month,date:a.date})},children:"\u4EE4\u548C"})),i(v.Button.Clear.R,T(f({color:"cloud"},o),{isActiveStyles:t,isActive:e.era=="heisei",onClick:()=>{d({modifiedType:"update",era:"heisei",year:2019,month:1,date:1})},children:"\u5E73\u6210"})),i(v.Button.Clear.R,T(f({color:"cloud"},o),{isActiveStyles:t,isActive:e.era=="shouwa",onClick:()=>{d({modifiedType:"update",era:"shouwa",year:1989,month:1,date:1})},children:"\u662D\u548C"})),i(v.Button.Clear.R,T(f({color:"cloud"},o),{isActiveStyles:t,isActive:e.era=="taisho",onClick:()=>{d({modifiedType:"update",era:"taisho",year:1926,month:1,date:1})},children:"\u5927\u6B63"})),i(v.Button.Clear.R,T(f({color:"cloud"},o),{isActiveStyles:t,isActive:e.era=="meiji",onClick:()=>{d({modifiedType:"update",era:"meiji",year:1912,month:1,date:1})},children:"\u660E\u6CBB"}))]})},Calendar:r=>{let{val_value:e,set_value:d}=r,o=[];if(e.era=="year")for(let t=1900;t<2100;t++)o.unshift({value:t,label:t+"\u5E74"});else if(e.era=="reiwa"){let t=c.Time().year-2018;for(let a=1;a<=t+10;a++)o.unshift({value:2019+a-1,label:"\u4EE4\u548C"+(a==1?"\u5143":a)+"\u5E74"})}else if(e.era=="heisei")for(let t=1;t<=31;t++)o.unshift({value:1989+t-1,label:"\u5E73\u6210"+(t==1?"\u5143":t)+"\u5E74"});else if(e.era=="shouwa")for(let t=1;t<=64;t++)o.unshift({value:1926+t-1,label:"\u662D\u548C"+(t==1?"\u5143":t)+"\u5E74"});else if(e.era=="taisho")for(let t=1;t<=15;t++)o.unshift({value:1912+t-1,label:"\u5927\u6B63"+(t==1?"\u5143":t)+"\u5E74"});else if(e.era=="meiji")for(let t=1;t<=45;t++)o.unshift({value:1868+t-1,label:"\u660E\u6CBB"+(t==1?"\u5143":t)+"\u5E74"});return y(x,{padding:1,children:[y(M.Separate,{children:[i(R,{tone:"cloud",enableUnSelected:!1,override:"force",border:"1.thin",padding:["1/3","2/3"],paddingRight:2,rightIconStyles:{right:"1/3"},options:o,value:e.year,onUpdateValidValue:({value:t})=>{d(T(f({},e),{modifiedType:"update",year:Number(t)}))}}),y(M.Center,{gap:"1/3",children:[i(v.Button.Clear.S,{ssSphere:2,onClick:()=>{let t=e.month-1;d({modifiedType:"update",era:e.era,year:t==0?e.year-1:e.year,month:t==0?12:t,date:1})},children:i(N.ChevronLeft,{})}),i(R,{tone:"cloud",enableUnSelected:!1,override:"force",border:"1.thin",padding:["1/3","2/3"],paddingRight:2,rightIconStyles:{right:"1/3"},options:[{value:1,label:"1\u6708"},{value:2,label:"2\u6708"},{value:3,label:"3\u6708"},{value:4,label:"4\u6708"},{value:5,label:"5\u6708"},{value:6,label:"6\u6708"},{value:7,label:"7\u6708"},{value:8,label:"8\u6708"},{value:9,label:"9\u6708"},{value:10,label:"10\u6708"},{value:11,label:"11\u6708"},{value:12,label:"12\u6708"}],value:e.month,onUpdateValidValue:({value:t})=>{d({modifiedType:"update",era:e.era,year:e.year,month:Number(t),date:1})}}),i(v.Button.Clear.S,{ssSphere:2,onClick:()=>{let t=e.month+1;d({modifiedType:"update",era:e.era,year:t==13?e.year+1:e.year,month:t==13?1:t,date:1})},children:i(N.ChevronRight,{})})]})]}),i(k.DateWareki.MonthCell,f({},r))]},e.era)},MonthCell:r=>{let{val_value:e,set_value:d}=r,o=c.Time([e.year.zeroEmbed(4),e.month.zeroEmbed(2),e.date.zeroEmbed(2)].join("/"));if(!o.validate)return;let t=o.getFirstDayOfTheMonth().weekday,a=o.getLastDayOfTheMonth(),m=[];for(let n=0;n<7;n++)m.push(i(O.Supplement,{flexCenter:!0,fontColor:n==0?"googleRed":n==6?"googleBlue":"3.blur",children:c.transformer.weekday.shortJP(n)}));for(let n=0;n<t;n++){let s=c.Time(o).getFirstDayOfTheMonth().addDate(n-t);m.push(i(v.Button.Sub.R,{color:"cloud",border:"1.thin",ssSquare:3,opacity:"middle",onClick:p=>{p.preventDefault(),p.stopPropagation(),d({modifiedType:"update",era:e.era,year:s.year,month:s.month,date:s.date})},children:s.date}))}for(let n=1;n<=a.date;n++){let s=c.Time(o).setDate(n);m.push(i(v.Button.Border.R,{ssSquare:3,onClick:()=>{d({modifiedType:"update",era:e.era,year:s.year,month:s.month,date:s.date})},children:s.date}))}for(let n=0;n<7-a.weekday-1;n++){let s=c.Time(o).addMonth(1).setDate(1).addDate(n);m.push(i(v.Button.Sub.R,{color:"cloud",border:"1.thin",ssSquare:3,opacity:"middle",onClick:p=>{p.preventDefault(),p.stopPropagation(),d({modifiedType:"update",era:e.era,year:s.year,month:s.month,date:s.date})},children:s.date}))}return i(_,{gridCols:7,gap:"1/4",children:m})}},Variables:{Footer:r=>y(B,{flexWrap:!1,gap:1,flexChilds:"even",freeCSS:{whiteSpace:"nowrap"},children:[y(v.Button.Border.R,{onClick:()=>{r.onValueUpdate("")},tabIndex:-1,flexSizing:"none",padding:["2/3",1],children:[i(N.Times,{})," \u524A\u9664"]}),i(v.Button.Prime.R,{flexSizing:"auto",onClick:()=>{r.onSubmit&&r.onSubmit(),H.close(r.tipsID)},tabIndex:-1,children:"\u6C7A\u5B9A",padding:["2/3",1]})]}),ShiftButtons:r=>y(B,{flexWrap:!1,gap:"1/3",children:[i(v.Button.Clear.R,T(f({className:g("LeftButton"),tabIndex:-1,right:0},k.Variables.ShiftButtonStyles),{onClick:()=>{r.callback(-1)},children:i(N.ChevronLeft,{})})),i(v.Button.Clear.R,T(f({className:g("RightButton"),tabIndex:-1,left:0},k.Variables.ShiftButtonStyles),{onClick:()=>{r.callback(1)},children:i(N.ChevronRight,{})}))]}),ShiftButtonStyles:{flexCenter:!0,padding:0,unitWidth:3,unitHeight:3,borderRadius:"sphere",position:"relative"}}};export{L as Picker,L as default};
|
|
2
|
-
//# sourceMappingURL=Picker.js.map
|
|
1
|
+
import{b as f,c as T}from"../../../chunk-VY3566IV.js";import{Fragment as $,jsx as i,jsxs as y}from"react/jsx-runtime";import{createElement as P}from"react";import{useState as w,useEffect as z,useRef as Y}from"react";import{$$ as c}from"../../../@utils/_";import C from"../../../atoms/Box";import N from"../../../atoms/FAI";import B from"../../../atoms/Flex";import _ from"../../../atoms/Grid";import M from"../../../mols/Row";import x from"../../../mols/Column";import O from"../../../mols/Text";import v from"../../Button";import H from"../../Tooltips";import R from"../Select";import{List as F}from"../List";import{InputTimeClasses as g}from"../../../@styles/componentClasses/_";let A=r=>{var t,a;let e=[],d=Number((t=r==null?void 0:r.min)!=null?t:1900),o=Number((a=r==null?void 0:r.max)!=null?a:c.Time().addYear(10).year);for(let m=d;m<=o;m++)e.unshift({value:m,label:[m,...c.transformer.wareki(m).value].join(" - ")});return e};const L=r=>{let{restrict:e,era:d="year",defaultValue:o=""}=r;r=f({},r),r.tipsID=r.tipsID||c.uuid.gen();const t=Y(!1);let[a,m]=w((()=>{var s,p;if(e=="clock"){let l=String(o).split(/[^\d]/);l[0]||(l=[0,0]);let u=Number(l[0]),h=Number(l[1]);return{modifiedType:"init",hour:u,minutes:h}}else if(e=="date"){let[l,u,h]=(s=String(o))==null?void 0:s.split(/\D/);return(c.is.nullish(l)||c.is.nullish(u)||c.is.nullish(h))&&([l,u,h]=c.Time().toFormat("%Y-%M-%D").split("-")),{modifiedType:"init",year:Number(l),month:Number(u),date:Number(h)}}else if(e!="week"){if(e=="month"){let[l,u]=String(o).split(/\D/);return(c.is.nullish(l)||c.is.nullish(u))&&([l,u]=c.Time().toFormat("%Y-%M").split("-")),{modifiedType:"init",year:Number(l),month:Number(u)}}else if(e=="year"){let[l]=String(o).split(/\D/);return c.is.nullish(l)&&([l]=c.Time().toFormat("%Y").split("-")),{modifiedType:"init",year:Number(l)}}else if(e=="dateWareki"){let[l,u,h]=(p=String(o))==null?void 0:p.split(/\D/);return(c.is.nullish(l)||c.is.nullish(u)||c.is.nullish(h))&&([l,u,h]=c.Time().toFormat("%Y-%M-%D").split("-")),{modifiedType:"init",era:d||"year",year:Number(l),month:Number(u),date:Number(h)}}}return{}})());z(()=>{if(t.current){if(a.modifiedType=="update"){let s="",p=d||"year";if(e=="clock"){let{hour:l,minutes:u}=a;s=[l.zeroEmbed(2),u.zeroEmbed(2)].join("/")}else if(e=="date"){let{year:l,month:u,date:h}=a;s=[l,u.zeroEmbed(2),h.zeroEmbed(2)].join("/")}else if(e!="week"){if(e=="month"){let{year:l,month:u}=a;s=[l,u.zeroEmbed(2)].join("/")}else if(e=="year"){let{year:l}=a;s=String(l)}else if(e=="dateWareki"){let{year:l,month:u,date:h,era:S}=a;p=S,s=[l,u.zeroEmbed(2),h.zeroEmbed(2)].join("/")}}r.onValueUpdate(s,p)}}else t.current=!0},[a]);let n=T(f({},r),{val_value:a,set_value:m});return i(C,{backgroundColor:"1.layer.base",borderRadius:"2.tone.secondary",boxShadow:"1.remark",border:!0,overflow:"hidden",children:i(C,{overflow:"auto",className:g(e.toCapital()+"Base"),children:e=="clock"?i(k.Clock._,f({},n)):e=="date"?i(k.Date._,f({},n)):e=="week"?"":e=="month"?i(k.Month._,f({},n)):e=="year"?i(k.Year._,f({},n)):e=="dates"||e=="months"?"":e=="dateWareki"?i(k.DateWareki._,f({},n)):i($,{})})})},k={Clock:{_:r=>{let{min:e,max:d,onValueUpdate:o,tipsID:t,val_value:a,set_value:m}=r,[n,s]=w(a.hour>12?2:1),[p,l]=w(Number(localStorage.getItem("timePickerUnit")||5));z(()=>{localStorage.setItem("timePickerUnit",String(p))},[p]);let{hour:u,minutes:h}=a;return y(x,{padding:1,children:[y(B,{flexType:"row",flexWrap:!1,gap:1,className:g("Body"),children:[y(x,{className:g("DesignSide"),flexSizing:0,children:[i(C,{className:g("ClockUiBase"),padding:[1,"2/3"],flexCenter:!0,children:y(C,{className:g("ClockUi"),backgroundColor:"tcOpLow",isRounded:!0,position:"relative",children:[i(C,{position:"absolute",backgroundColor:"theme",unitWidth:"1/12",className:[g("Needle"),g("hour")].join(" "),freeCSS:{transform:`rotate(${u*30+h/2}deg)`}}),i(C,{position:"absolute",backgroundColor:"theme",unitWidth:"1/12",className:[g("Needle"),g("minute")].join(" "),freeCSS:{transform:`rotate(${h*6}deg)`}})]})}),i(F.Radio,{tone:"plain",icon:!0,value:[n],options:[{value:1,label:"AM"},{value:2,label:"PM"}],flexType:"col",gap:0,cellStyles:{padding:"1/2",horizontalAlign:"between",gap:"1/3"},tabIndex:-1,onUpdateValidValue:({value:S})=>{let D=a.hour%12+(S==2?12:0);s(S),m({modifiedType:"update",hour:D,minutes:a.minutes})}}),i(C,{borderTop:!0,margin:[0,1]}),i(F.Radio,{tone:"plain",icon:!0,value:[p],options:[{value:1,label:"/ 1\u5206"},{value:2,label:"/ 2\u5206"},{value:5,label:"/ 5\u5206"}],flexType:"col",gap:0,cellStyles:{padding:"1/2",horizontalAlign:"between",gap:"1/3"},tabIndex:-1,onUpdateValidValue:({value:S})=>{l(S)}})]}),y(x,{children:[y(C,{flexCenter:!0,fontSize:"3.paragraph",isSemiBoldFont:!0,children:[a.hour.zeroEmbed(2)," : ",a.minutes.zeroEmbed(2)]}),y(B,{flexWrap:!1,borderRadius:"1.tone.primary",boxShadow:"0.remark.inset",flexChilds:"even",freeCSS:{minWidth:12*12},padding:["1/3",0],children:[i(x,{gap:0,overflow:"auto",padding:"2/3",borderRight:!0,freeCSS:{maxHeight:12*22},children:k.Clock.Hours({onClick:S=>{let V=S+(n==2?12:0);m({modifiedType:"update",hour:V,minutes:a.minutes})},min:e,max:d,ampm:n})}),i(x,{gap:0,overflow:"auto",padding:"2/3",freeCSS:{maxHeight:12*22},children:k.Clock.Minutes({onClick:S=>{m({modifiedType:"update",hour:a.hour,minutes:S})},min:e,max:d,unit:p})})]})]})]}),i(k.Variables.Footer,{tipsID:t,onValueUpdate:o})]})},Hours:r=>{let e=[];for(let d=0;d<12;d++){let o=r.ampm==2?d+12:d,t=!1;{let a=Number(String(o*100).replace(/\D/ig,""));if(r.min&&Number(String(r.min).replace(/\D/ig,""))>a&&(t=!0),r.max){let m=Number(String(r.max).replace(/\D/ig,""));a>m&&(t=!0)}}e.push(i(v.Button.Normal.R,{isLocked:t,borderBottom:!0,borderRadius:0,padding:["1/2",1],freeCSS:{whiteSpace:"nowrap"},tabIndex:-1,onClick:()=>{r.onClick(d)},children:o.zeroEmbed(2)},d))}return e},Minutes:r=>{let e=[];for(let d=0;d<60/r.unit;d++){let o=d*r.unit;e.push(i(v.Button.Normal.R,{borderBottom:!0,borderRadius:0,padding:["1/2",1],freeCSS:{whiteSpace:"nowrap"},tabIndex:-1,onClick:()=>{r.onClick(o)},children:o.zeroEmbed(2)},o))}return e}},Date:{_:r=>{let{min:e,max:d,onValueUpdate:o,tipsID:t,val_value:a,set_value:m}=r,{year:n,month:s,date:p}=a;return y(x,{padding:1,children:[y(B,{horizontalAlign:"between",verticalAlign:"center",flexWrap:!1,children:[y(B,{verticalAlign:"bottom",horizontalAlign:"left",gap:"2/3",flexWrap:!1,children:[i(R,{override:"force",enableUnSelected:!1,value:n,options:A(),border:"1.thin",padding:["1/3","2/3"],paddingRight:2,rightIconStyles:{right:"1/3"},onUpdateValidValue:({value:l})=>{m({modifiedType:"update",year:Number(l),month:s,date:p})}}),i(R,{override:"force",enableUnSelected:!1,value:s,options:(()=>{let l=[];for(let u=1;u<=12;u++)l.push({value:u,label:String(u),displayLabel:String(u)+"\u6708"});return l})(),placeholder:"",border:"1.thin",padding:["1/3","2/3"],paddingRight:2,rightIconStyles:{right:"1/3"},onUpdateValidValue:({value:l})=>{m({modifiedType:"update",year:n,month:Number(l),date:p})}})]}),i(k.Variables.ShiftButtons,{callback:l=>{let u=s+l,h=n;l==-1?(u<=0&&h--,u=u||12):s==12&&h++,m({modifiedType:"update",year:h,month:u,date:a.date})}})]}),i(C,{borderTop:!0}),i(C,{children:k.Date.MonthCalendar({min:e,max:d,year:a.year,month:a.month,current:[a.year,a.month,a.date],callback:l=>{let[u,h,S]=l;m({modifiedType:"update",year:u,month:h,date:S})}})}),i(k.Variables.Footer,{tipsID:t,onValueUpdate:o})]})},MonthCalendar:r=>{let{min:e,max:d,year:o,month:t,current:a,callback:m}=r,n=c.Time(),s=c.Time([o,t.zeroEmbed(2),"01"].join("/")),p=s.getLastDayOfTheMonth(),l=c.Time(s).addMonth(-1).getLastDayOfTheMonth().date,u=[],h=[],S=[],V=[],D={padding:0,unitWidth:3,unitHeight:3,flexCenter:!0,borderRadius:"3.tone.tertiary"};for(var b=0;b<7;b++)u.push(P(C,T(f({className:[g("CalendarDay"),g("Legend")].join(" ")},D),{key:b}),["\u65E5","\u6708","\u706B","\u6C34","\u6728","\u91D1","\u571F"][b]));for(var b=0;b<s.weekday;b++)h.unshift(P(C,T(f({className:[g("CalendarDay"),g("Dummy")].join(" "),fontColor:"4.thin"},D),{key:b}),l-b));for(var b=1;b<=p.date;b++){let U=b,j=o==n.year&&t==n.month&&b==n.date,I=!1;{let E=Number(String([o,t.zeroEmbed(2),b.zeroEmbed(2)].join("/")).replace(/\D/ig,""));if(r.min&&Number(String(r.min).replace(/\D/ig,""))>E&&(I=!0),r.max){let W=Number(String(r.max).replace(/\D/ig,""));E>W&&(I=!0)}}S.push(P(v.Button.Clear.R,T(f({className:[g("CalendarDay"),g("isToday_"+j)].join(" ")},D),{onClick:()=>{m([o,t,U])},tabIndex:-1,key:U,isLocked:I,fontColor:"1.clear",ssEffectsOnActive:"shrink",padding:0,flexCenter:!0,borderRadius:"sphere",children:b})))}for(var b=1;b<7-p.weekday;b++)V.push(P(C,T(f({className:[g("CalendarDay"),g("Dummy")].join(" "),fontColor:"4.thin"},D),{key:b}),b));return y(_,{gridCols:7,gap:"1/3",children:[u,h,S,V]})}},Month:{_:r=>{let{min:e,max:d,onValueUpdate:o,tipsID:t,val_value:a,set_value:m}=r,{year:n,month:s}=a;return y(x,{padding:1,children:[y(M.Separate,{gap:0,children:[i(M.Center,{verticalAlign:"bottom",gap:"2/3",children:i(R,{enableUnSelected:!1,value:n,options:A(),override:"force",border:"1.thin",padding:["1/3","2/3"],paddingRight:2,rightIconStyles:{right:"1/3"},onUpdateValidValue:({value:p})=>{m({modifiedType:"update",year:Number(p),month:s})}})}),i(k.Variables.ShiftButtons,{callback:p=>{let l=Math.min(Math.max(n+p,1900),2100);m({modifiedType:"update",year:l,month:s})}})]}),i(C,{borderTop:!0}),k.Month.Months({min:e,max:d,year:a.year,callback:p=>{let[l,u]=p;m({modifiedType:"update",year:l,month:u})}}),i(k.Variables.Footer,{tipsID:t,onValueUpdate:o})]})},Months:r=>{let{year:e,callback:d}=r,o=c.Time(),t=[];for(let a=1;a<=12;a++){let m=e==o.year&&a==o.month,n=!1;{let p=Number(String([e,a.zeroEmbed(2)].join("/")).replace(/\D/ig,""));if(r.min&&Number(String(r.min).replace(/\D/ig,""))>p&&(n=!0),r.max){let l=Number(String(r.max).replace(/\D/ig,""));p>l&&(n=!0)}}let s=[g("Cell"),m?g("isThisMonth"):""].join(" ");t.push(y(v.Button.Clear.R,{className:s,isLocked:n,fontColor:"2.normal",padding:["2/3",1],ssEffectsOnActive:"shrink",onClick:()=>{d([e,a])},children:[a," \u6708"]},e+"-"+a))}return i(_,{gridCols:4,gap:"2/3",children:t})}},Year:{_:r=>{let{min:e,max:d,onValueUpdate:o,tipsID:t,val_value:a,set_value:m}=r,{year:n}=a;return y(x,{padding:1,children:[i(R,{enableUnSelected:!1,value:n||c.Time().year,override:"force",options:A({min:e,max:d}),onUpdateValidValue:({value:s})=>{m({modifiedType:"update",year:Number(s)})}}),i(k.Variables.Footer,{tipsID:t,onValueUpdate:o,onSubmit:()=>{m({modifiedType:"update",year:Number(n||c.Time().year)})}})]})}},DateWareki:{_:r=>{let{min:e,max:d,onValueUpdate:o,tipsID:t,val_value:a,set_value:m}=r,{era:n,year:s,month:p,date:l}=a,u={val_value:a,set_value:m};return y(C,{children:[y(M.Left,{verticalAlign:"unset",borderBottom:!0,gap:0,children:[i(k.DateWareki.EraSelect,f({},u)),i(C,{borderRight:!0}),i(k.DateWareki.Calendar,f({},u))]}),i(C,{padding:1,children:i(k.Variables.Footer,{tipsID:t,onValueUpdate:o})})]})},EraSelect:r=>{let{val_value:e,set_value:d}=r,o={padding:["1/2",1.5],fontColor:"3.blur"},t={backgroundColor:"cloud",fontColor:"2.normal",isSemiBoldFont:!0};return y(x,{gap:0,padding:1,children:[i(v.Button.Clear.R,T(f({color:"cloud"},o),{isActiveStyles:t,isActive:e.era=="year",onClick:()=>{let a=c.Time();d({modifiedType:"update",era:"year",year:a.year,month:a.month,date:a.date})},children:"\u897F\u66A6"})),i(v.Button.Clear.R,T(f({color:"cloud"},o),{isActiveStyles:t,isActive:e.era=="reiwa",onClick:()=>{let a=c.Time();d({modifiedType:"update",era:"reiwa",year:a.year,month:a.month,date:a.date})},children:"\u4EE4\u548C"})),i(v.Button.Clear.R,T(f({color:"cloud"},o),{isActiveStyles:t,isActive:e.era=="heisei",onClick:()=>{d({modifiedType:"update",era:"heisei",year:2019,month:1,date:1})},children:"\u5E73\u6210"})),i(v.Button.Clear.R,T(f({color:"cloud"},o),{isActiveStyles:t,isActive:e.era=="shouwa",onClick:()=>{d({modifiedType:"update",era:"shouwa",year:1989,month:1,date:1})},children:"\u662D\u548C"})),i(v.Button.Clear.R,T(f({color:"cloud"},o),{isActiveStyles:t,isActive:e.era=="taisho",onClick:()=>{d({modifiedType:"update",era:"taisho",year:1926,month:1,date:1})},children:"\u5927\u6B63"})),i(v.Button.Clear.R,T(f({color:"cloud"},o),{isActiveStyles:t,isActive:e.era=="meiji",onClick:()=>{d({modifiedType:"update",era:"meiji",year:1912,month:1,date:1})},children:"\u660E\u6CBB"}))]})},Calendar:r=>{let{val_value:e,set_value:d}=r,o=[];if(e.era=="year")for(let t=1900;t<2100;t++)o.unshift({value:t,label:t+"\u5E74"});else if(e.era=="reiwa"){let t=c.Time().year-2018;for(let a=1;a<=t+10;a++)o.unshift({value:2019+a-1,label:"\u4EE4\u548C"+(a==1?"\u5143":a)+"\u5E74"})}else if(e.era=="heisei")for(let t=1;t<=31;t++)o.unshift({value:1989+t-1,label:"\u5E73\u6210"+(t==1?"\u5143":t)+"\u5E74"});else if(e.era=="shouwa")for(let t=1;t<=64;t++)o.unshift({value:1926+t-1,label:"\u662D\u548C"+(t==1?"\u5143":t)+"\u5E74"});else if(e.era=="taisho")for(let t=1;t<=15;t++)o.unshift({value:1912+t-1,label:"\u5927\u6B63"+(t==1?"\u5143":t)+"\u5E74"});else if(e.era=="meiji")for(let t=1;t<=45;t++)o.unshift({value:1868+t-1,label:"\u660E\u6CBB"+(t==1?"\u5143":t)+"\u5E74"});return y(x,{padding:1,children:[y(M.Separate,{children:[i(R,{tone:"cloud",enableUnSelected:!1,override:"force",border:"1.thin",padding:["1/3","2/3"],paddingRight:2,rightIconStyles:{right:"1/3"},options:o,value:e.year,onUpdateValidValue:({value:t})=>{d(T(f({},e),{modifiedType:"update",year:Number(t)}))}}),y(M.Center,{gap:"1/3",children:[i(v.Button.Clear.S,{ssSphere:2,onClick:()=>{let t=e.month-1;d({modifiedType:"update",era:e.era,year:t==0?e.year-1:e.year,month:t==0?12:t,date:1})},children:i(N.ChevronLeft,{})}),i(R,{tone:"cloud",enableUnSelected:!1,override:"force",border:"1.thin",padding:["1/3","2/3"],paddingRight:2,rightIconStyles:{right:"1/3"},options:[{value:1,label:"1\u6708"},{value:2,label:"2\u6708"},{value:3,label:"3\u6708"},{value:4,label:"4\u6708"},{value:5,label:"5\u6708"},{value:6,label:"6\u6708"},{value:7,label:"7\u6708"},{value:8,label:"8\u6708"},{value:9,label:"9\u6708"},{value:10,label:"10\u6708"},{value:11,label:"11\u6708"},{value:12,label:"12\u6708"}],value:e.month,onUpdateValidValue:({value:t})=>{d({modifiedType:"update",era:e.era,year:e.year,month:Number(t),date:1})}}),i(v.Button.Clear.S,{ssSphere:2,onClick:()=>{let t=e.month+1;d({modifiedType:"update",era:e.era,year:t==13?e.year+1:e.year,month:t==13?1:t,date:1})},children:i(N.ChevronRight,{})})]})]}),i(k.DateWareki.MonthCell,f({},r))]},e.era)},MonthCell:r=>{let{val_value:e,set_value:d}=r,o=c.Time([e.year.zeroEmbed(4),e.month.zeroEmbed(2),e.date.zeroEmbed(2)].join("/"));if(!o.validate)return;let t=o.getFirstDayOfTheMonth().weekday,a=o.getLastDayOfTheMonth(),m=[];for(let n=0;n<7;n++)m.push(i(O.Supplement,{flexCenter:!0,fontColor:n==0?"googleRed":n==6?"googleBlue":"3.blur",children:c.transformer.weekday.shortJP(n)}));for(let n=0;n<t;n++){let s=c.Time(o).getFirstDayOfTheMonth().addDate(n-t);m.push(i(v.Button.Sub.R,{color:"cloud",border:"1.thin",ssSquare:3,opacity:"middle",onClick:p=>{p.preventDefault(),p.stopPropagation(),d({modifiedType:"update",era:e.era,year:s.year,month:s.month,date:s.date})},children:s.date}))}for(let n=1;n<=a.date;n++){let s=c.Time(o).setDate(n);m.push(i(v.Button.Border.R,{ssSquare:3,onClick:()=>{d({modifiedType:"update",era:e.era,year:s.year,month:s.month,date:s.date})},children:s.date}))}for(let n=0;n<7-a.weekday-1;n++){let s=c.Time(o).addMonth(1).setDate(1).addDate(n);m.push(i(v.Button.Sub.R,{color:"cloud",border:"1.thin",ssSquare:3,opacity:"middle",onClick:p=>{p.preventDefault(),p.stopPropagation(),d({modifiedType:"update",era:e.era,year:s.year,month:s.month,date:s.date})},children:s.date}))}return i(_,{gridCols:7,gap:"1/4",children:m})}},Variables:{Footer:r=>y(B,{flexWrap:!1,gap:1,flexChilds:"even",freeCSS:{whiteSpace:"nowrap"},children:[y(v.Button.Border.R,{onClick:()=>{r.onValueUpdate("")},tabIndex:-1,flexSizing:"none",padding:["2/3",1],children:[i(N.Times,{})," \u524A\u9664"]}),i(v.Button.Prime.R,{flexSizing:"auto",onClick:()=>{r.onSubmit&&r.onSubmit(),H.close(r.tipsID)},tabIndex:-1,children:"\u6C7A\u5B9A",padding:["2/3",1]})]}),ShiftButtons:r=>y(B,{flexWrap:!1,gap:"1/3",children:[i(v.Button.Clear.R,T(f({className:g("LeftButton"),tabIndex:-1,right:0},k.Variables.ShiftButtonStyles),{onClick:()=>{r.callback(-1)},children:i(N.ChevronLeft,{})})),i(v.Button.Clear.R,T(f({className:g("RightButton"),tabIndex:-1,left:0},k.Variables.ShiftButtonStyles),{onClick:()=>{r.callback(1)},children:i(N.ChevronRight,{})}))]}),ShiftButtonStyles:{flexCenter:!0,padding:0,unitWidth:3,unitHeight:3,borderRadius:"sphere",position:"relative"}}};export{L as Picker,L as default};
|
package/dist/fn/Input/Time/_.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{a as H,b as o,c as _,d as z}from"../../../chunk-E3D4DIO4.js";import{Fragment as Ie,jsx as T,jsxs as Z}from"react/jsx-runtime";import{useState as W,useEffect as X,useRef as re}from"react";import{$$ as b,Config as K,useStore as O}from"@utils";import ie from"@atoms/Box";import ae from"@atoms/FAI";import q from"@fn/Button";import G from"@fn/Tooltips";import{faClock as ne}from"@fortawesome/free-solid-svg-icons/faClock";import{faCalendarAlt as le}from"@fortawesome/free-solid-svg-icons/faCalendarAlt";import{Wrapper as oe,BoxWrapper as se,SubmitForm as ue,CommonEffects as pe,DefaultStyles as me}from"../core";import ce from"../Hidden";import de from"../Select";import fe from"../Parts";import ge from"./Picker";const A=" ~ ",he={clock:{defaultValue:"--:--",format:/^\d{2}\D\d{2}$/,ranges:[{type:"hour",from:0,length:2},{type:"minute",from:3,length:2}],sets:1},date:{defaultValue:"----/--/--",format:/^\d{4}\D\d{2}\D\d{2}$/,ranges:[{type:"year",from:0,length:4},{type:"month",from:5,length:2},{type:"date",from:8,length:2}],sets:1},week:{defaultValue:"----\u5E74\u7B2C--\u9031",format:/^\d{4}\D\d{2}$/,ranges:[{type:"year",from:0,length:4,region:6},{type:"week",from:6,length:2,region:3}],sets:1},month:{defaultValue:"----\u5E74--\u6708",format:/^\d{4}\D\d{2}$/,ranges:[{type:"year",from:0,length:4},{type:"month",from:5,length:2,region:3}],sets:1},year:{defaultValue:"----\u5E74",format:/^\d{4}$/,ranges:[{type:"year",from:0,length:4,region:5}],sets:1},dates:{defaultValue:"----/--/--",format:/^\d{4}\D\d{2}\D\d{2}$/,ranges:[{type:"year",from:0,length:4},{type:"month",from:5,length:2},{type:"date",from:8,length:2,region:5},{type:"year",from:10+A.length,length:4},{type:"month",from:15+A.length,length:2},{type:"date",from:18+A.length,length:2}],sets:2},months:{defaultValue:"----\u5E74--\u6708",format:/^\d{4}\D\d{2}$/,ranges:[{type:"year",from:0,length:4},{type:"month",from:5,length:2,region:6},{type:"year",from:8+A.length,length:4},{type:"month",from:13+A.length,length:2,region:3}],sets:2},dateWareki:{defaultValue:"----\u5E74--\u6708--\u65E5",format:/^\d{4}\D\d{2}\D\d{2}$/,ranges:[{type:"dateWareki",from:0,length:4,region:5},{type:"month",from:5,length:2,region:3},{type:"date",from:8,length:2,region:3}],sets:1}},$=e=>{let{restrict:l,value:v,era:t}=e,D=b.flatArray(v||""),{defaultValue:g,format:d,ranges:m,sets:i}=he[l],u=[],n=l=="clock"?":":"/";for(let a=0;a<D.length;a++)D[a]=String(D[a]).replace(/\D/ig,n);for(let a=0;a<i;a++){let c=D[a]||"";if(!c.match(d))D[a]="",u.push(g);else{let x=g;c.split(/\D/).forEach((S,R)=>{if(R==0&&l=="dateWareki"){let h=Number(S);t!="year"&&(h>=2019?t=="reiwa"?h-=2018:t=="heisei"&&(h=31):h>=1989?t=="heisei"?h-=1988:t=="shouwa"&&(h=64):h>=1926?t=="shouwa"?h-=1925:t=="taisho"&&(h=15):h>=1912?t=="taisho"?h-=1911:t=="meiji"&&(h=45):h>=1868&&(h-=1867)),S=h.zeroEmbed(4)}x=x.replace(new RegExp("------------------".slice(0,S.length)),S)}),u.push(x)}}return{formatValue:u.join(A),dataValue:["dates","months"].includes(l)?D:D[0],ranges:m}};function ye(e){let{params:l}=e,{restrict:v,min:t,max:D,required:g}=l,d=[],m=b.flatArray(e.value),i={empty:!1,escalated:1,filled:!0,correct:!0,prohibited:!1};(()=>{let u=v=="clock"?":":"/";for(let n=0;n<m.length;n++)m[n]=String(m[n]).replace(/\D/ig,u);for(let n=0;n<m.length;n++){let a=m[n],c=m[n-1];a.removeLetters()||(i.empty=!0),n>0&&(i.escalated&=+(a>=c))}i.escalated&&(i.empty||(v.match(/clock/)?m.forEach(n=>{let[a,c]=n.split(/\D+/);!a||!c?i.filled=!1:(Number(a)>23||Number(c)>59)&&(i.correct=!1)}):v.match(/date/)?m.forEach(n=>{let[a,c,x]=n.split(/\D+/);if(!a||!c||!x)i.filled=!1;else{let S=b.Time(n);(!S.validate||n!=S.toFormatYMD())&&(i.correct=!1)}}):v.match(/week/)?m.forEach(n=>{let[a,c]=n.split(/\D+/);if(!a||!c)i.filled=!1;else{let x=b.Time(a+"/01/01").weekday,R=b.Time(a+"/01/0"+(7-x+1)).addWeek(Number(c)-1);a!=String(R.year)&&(i.correct=!1)}}):v.match(/month/)?m.forEach(n=>{let[a,c]=n.split(/\D+/);!a||!c?i.filled=!1:b.Time([a,c,"01"].join("/")).validate||(i.correct=!1)}):v.match(/year/),i.filled&&i.correct&&m.forEach(n=>{{let a=Number(String(n).replace(/\D/ig,""));if(t&&Number(String(t).replace(/\D/ig,""))>a&&(i.prohibited=!0),D){let c=Number(String(D).replace(/\D/ig,""));a>c&&(i.prohibited=!0)}}})))})();{let{empty:u,escalated:n,filled:a,correct:c,prohibited:x}=i;u&&g&&(d=[{type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}]),n||d.push({type:"invalid",label:"\u6642\u7CFB\u5217\u3092\u6B63\u3057\u304F\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"}),c||d.push({type:"invalid",label:"\u7121\u52B9\u306A\u5024\u304C\u5165\u529B\u3055\u308C\u3066\u3044\u307E\u3059"}),a||d.push({type:"invalid",label:"\u6700\u5F8C\u307E\u3067\u5024\u3092\u57CB\u3081\u3066\u304F\u3060\u3055\u3044"}),x&&d.push({type:"invalid",label:Z(Ie,{children:[T(ie,{children:"\u5165\u529B\u7BC4\u56F2\u304C\u5236\u9650\u3055\u308C\u3066\u3044\u307E\u3059"}),"[",t||"\u4E0B\u9650\u7121\u3057","] ~ [",D||"\u4E0A\u9650\u7121\u3057","]"]})})}return{ok:!d.filter(({type:u})=>u=="invalid").length,notice:d}}const Q={picker:{launch:e=>{let l=e.tipsID||b.uuid.gen();G.open(_(o({gravityPoint:e.gravityPoint||24,padding:"1/2",tipsID:l},e),{close_option:o({aroundClick:!0,elementBlur:!1},e.close_option),content:T(ge,{restrict:e.restrict,min:e.min,max:e.max,era:e.era,defaultValue:e.defaultValue,tipsID:l,onValueUpdate:(v,t)=>{e.onValueUpdate(v,t)}})}))},remove:e=>{G.close(e)}}},ve=e=>{let U=e,{tone:l,required:v,restrict:t="clock",componentID:D,era:g,form:d,name:m,min:i,max:u,className:n,enableFormSubmit:a,checkValidationAtFirst:c,onKeyDown:x,onValidate:S,onUpdateValue:R,onUpdateValidValue:h,value:B="",leftIndicator:J,rightIndicator:F}=U,f=z(U,["tone","required","restrict","componentID","era","form","name","min","max","className","enableFormSubmit","checkValidationAtFirst","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","leftIndicator","rightIndicator"]),[r,C]=W(g),[s,V]=W(_(o({componentID:e.componentID||""},$({restrict:t,value:B,era:r})),{eventType:"init",eventID:b.uuid.gen()})),[y,M]=W({ok:!1,notice:[]}),[I,k]=W({active:!1,index:0,prevIndex:-1});pe({type:"time",params:e,val_status:s,set_status:V,val_validate:y,set_validate:M,DefaultValidation:ye,onUpdateValue:R,onUpdateValidValue:h,ExtraOverrideParams:o({},$({restrict:t,value:B,era:r}))});const E=re(!1);return X(()=>{if(E.current){V(o(o({},s),$({restrict:t,value:s.dataValue,era:r})));let p=O.get("refreshEra_"+s.componentID);p&&p.refreshEra(r)}else E.current=!0},[r]),O.update({key:s.componentID,value:{openPicker:()=>{e.disabled||Q.picker.launch({parent:"#Picker-"+s.componentID,tipsID:"PickerTips-"+s.componentID,restrict:t,min:i,max:u,defaultValue:s.dataValue,era:r,onValueUpdate:(p,w)=>{V(_(o(o({},s),$({restrict:t,value:p,era:w})),{eventType:"update",eventID:b.uuid.gen()})),C(w)}})},resetEra:p=>{C(p),V(_(o(o({},s),$({restrict:t,value:"",era:r})),{eventType:"update",eventID:b.uuid.gen()}))}}}),X(()=>{let{index:p,active:w}=I;if(w){p=Math.max(p,0),p=Math.min(p,s.ranges.length-1);let{from:P,length:L}=s.ranges[p],j=b(K.get().appRoot).find("#"+e.id)[0];j&&j.setSelectionRange(P,P+L)}},[I]),Z(se,{val_status:s,set_status:V,val_validate:y,params:e,children:[T(ce,{name:m,"data-input-type":"time","data-form":d,"data-validation":y.ok,componentID:s.componentID,"data-value":JSON.stringify(["dates","months"].includes(t)?!s.dataValue[0]||!s.dataValue[1]?null:s.dataValue:s.dataValue||null)}),K.get().isTouchDevice?T(q.Button.Plain,{className:n,freeCSS:{textAlign:"left"},children:s.formatValue,onClick:p=>{let w=O.get(s.componentID);w&&w.openPicker(),p.stopPropagation()}}):T("input",o({type:"text",inputMode:"numeric","data-input-type":"time","data-form-name":d,value:s.formatValue,className:n,tabIndex:K.get().isTouchDevice?-1:0,onKeyDown:p=>{De({restrict:t,event:p,val_era:r,val_status:s,set_status:V,val_focus:I,set_focus:k}),x&&x(p),a&&ue(p)},onKeyUp:p=>{p.key=="Tab"&&k(_(o({},I),{active:!0}))},onClick:p=>{let w=p.target.selectionEnd,P=0;s.ranges.forEach((L,j)=>{let{from:Y,length:ee,region:te}=L;Y<=w&&w<=Y+(te||ee)&&(P=j)}),k(_(o({},I),{active:!0,index:P})),p.preventDefault()},onChange:()=>{}},f))]})},De=e=>{let{val_era:l,restrict:v,event:t,val_status:D,set_status:g,val_focus:d,set_focus:m}=e,{key:i,shiftKey:u,ctrlKey:n,metaKey:a}=t,c=n||a,{selectionStart:x,selectionEnd:S}=t.target,{index:R,prevIndex:h}=d,{ranges:B,formatValue:J}=D,F=B.length-1;if(["Tab","ArrowLeft","ArrowRight"].includes(i)){let f=0;if(i=="Tab"){let r=+!u*2-1;if(f=d.index+r,f<0||f>F)return}else{let r=i=="ArrowLeft"?-1:i=="ArrowRight"?1:0;c||x==0&&S==String(D.formatValue).length?f=r==1?F:0:f=Math.max(0,Math.min(R+r,F))}m(_(o({},d),{index:f,prevIndex:R})),t.preventDefault()}if(["Backspace","ArrowUp","ArrowDown","0","1","2","3","4","5","6","7","8","9"].includes(i)){t.preventDefault();let f=R;f=Math.max(f,0),f=Math.min(f,F);let{type:r,from:C,length:s}=B[f],V=J.slice(C,C+s),y;if(i=="Backspace")y="------".slice(0,s);else if(["ArrowUp","ArrowDown"].includes(i)){let M=i=="ArrowUp"?1:-1;V=V|0,y=V+M;let[I,k,E]=r=="dateWareki"?l=="year"?[0,2999,4]:l=="reiwa"?[1,2999,4]:l=="heisei"?[1,31,4]:l=="shouwa"?[1,64,4]:l=="taisho"?[1,15,4]:l=="meiji"?[1,45,4]:[0,0,0]:r=="minute"?[0,59,2]:r=="hour"?[0,23,2]:r=="date"?[1,31,2]:r=="week"?[1,53,2]:r=="month"?[1,12,2]:r=="year"?[0,2999,4]:[0,0,0];y>k?y=I:y<I&&(y=k),y=Number(y).zeroEmbed(E)}else if(["0","1","2","3","4","5","6","7","8","9"].includes(i)){let M=V|0,I=i,k=`${M}${I}`;if(h!=R&&h>=0&&(M=0,k="0"+I),r=="year"||r=="dateWareki"&&l=="year")Number(k)>1e4?y=I:y=k,(y|0)>1e3&&f++;else if(["hour","minute","date","week","month"].includes(r)||r=="dateWareki"&&l!="year"){let E=r=="dateWareki"?l=="reiwa"?100:l=="heisei"?31:l=="shouwa"?64:l=="taisho"?15:l=="meiji"?45:0:r=="minute"?59:r=="hour"?23:r=="date"?31:r=="week"?53:r=="month"?12:0;y=(k|0)>E?I:k,(Number(I)>Number(String(E)[0])||V=="0000".slice(0,String(E).length)&&(k!="0000".slice(0,String(E).length)||["minute","hour"].includes(r)&&h==R)||(k|0)>=H(10,String(E).length-1))&&f++}r=="year"||r=="dateWareki"?y=(y|0).zeroEmbed(4):y=(y|0).zeroEmbed(2)}{let M=String(J).partReplace(C,String(y)),I=M.split(A).map(k=>k.replace(/(^\D|\D$)/,"").split(/\D+/).join(v=="clock"?":":"/").replace(/(^\D|\D$)/,""));if(v=="dateWareki"){let k=I[0].split(/\D/),[E,U,p]=k;k.length==3&&E&&(I=[[Number(E)-1+Number({year:1,reiwa:2019,heisei:1989,shouwa:1926,taisho:1912,meiji:1868}[l]),U,p].join("/")])}f=Math.max(f,0),f=Math.min(f,F),g(_(o({},D),{dataValue:["dates","months"].includes(v)?I:I[0],formatValue:M,eventType:"update",eventID:b.uuid.gen()})),m(_(o({},d),{index:f,prevIndex:d.index}))}}},N={Origin:e=>{e=o({},e);let[l]=W(e.componentID||b.uuid.gen());if(e.componentID=l,b.is.nullish(e.rightIndicator)){let v=(e.restrict||"").match(/clock/)?ne:le;e.rightIndicator=T(fe.RightIndicator,{padding:0,children:T(q.Button.Sub.R,{color:"cloud",border:"unset",padding:[0,1],fontColor:"theme",borderRadius:"inherit",backgroundColor:"inherit",flexCenter:!0,height:1,ssEffectsOnActive:["ripple.cloud"],tabIndex:-1,id:"Picker-"+e.componentID,onClick:()=>{let t=O.get(e.componentID);t&&t.openPicker()},children:T(ae,{icon:v})})})}return T(oe,{componentID:e.componentID,children:ve,params:me.Boxish(e)})},Clock:e=>T(N.Origin,o({restrict:"clock",era:"clock"},e)),Date:e=>T(N.Origin,o({restrict:"date"},e)),Week:e=>T(N.Origin,o({restrict:"week"},e)),Month:e=>T(N.Origin,o({restrict:"month"},e)),Year:e=>T(N.Origin,o({restrict:"year"},e)),DateWareki:e=>{e=o({},e);let[l]=W(e.componentID||b.uuid.gen());e.componentID=l;let{defaultEra:v="wareki"}=e,[t,D]=W((()=>{let g="year";if(v=="wareki"&&(g="reiwa",e.value)){let[d,m,i]=e.value.split(/\D/);if(d&&m&&i){let u=Number(d);u>=2019?(u-=2019,g="reiwa"):u>=1989?(u-=1989,g="heisei"):u>=1926?(u-=1926,g="shouwa"):u>=1912?(u-=1912,g="taisho"):u>=1868&&(u-=1868,g="meiji"),u+=1}}return g})());return X(()=>{O.set({key:"refreshEra_"+l,value:{refreshEra:g=>{D(g)}}})},[]),T(N.Origin,_(o({restrict:"dateWareki",leftIndicator:T(de,{enableUnSelected:!1,value:t,tone:e.tone,override:"force",flexCenter:!0,borderTopRightRadius:"2/3",borderBottomRightRadius:"2/3",height:1,freeCSS:{whiteSpace:"nowrap"},options:[{value:"year",label:"\u897F\u66A6"},{value:"reiwa",label:"\u4EE4\u548C"},{value:"heisei",label:"\u5E73\u6210"},{value:"shouwa",label:"\u662D\u548C"},{value:"taisho",label:"\u5927\u6B63"},{value:"meiji",label:"\u660E\u6CBB"}],onUpdateValidValue:({value:g,eventType:d})=>{D(g);let m=O.get(e.componentID);m&&m.resetEra&&m.resetEra(g)}})},e),{era:t}))},Periods:{Date:e=>T(N.Origin,o({restrict:"dates"},e)),Month:e=>T(N.Origin,o({restrict:"months"},e))},fn:Q};export{N as Time,N as default};
|
|
2
|
-
//# sourceMappingURL=_.js.map
|
|
1
|
+
import{a as H,b as o,c as _,d as z}from"../../../chunk-VY3566IV.js";import{Fragment as Ie,jsx as T,jsxs as Z}from"react/jsx-runtime";import{useState as W,useEffect as X,useRef as re}from"react";import{$$ as b,Config as K,useStore as O}from"../../../@utils/_";import ie from"../../../atoms/Box";import ae from"../../../atoms/FAI";import q from"../../Button";import G from"../../Tooltips";import{faClock as ne}from"@fortawesome/free-solid-svg-icons/faClock";import{faCalendarAlt as le}from"@fortawesome/free-solid-svg-icons/faCalendarAlt";import{Wrapper as oe,BoxWrapper as se,SubmitForm as ue,CommonEffects as pe,DefaultStyles as me}from"../core";import ce from"../Hidden";import de from"../Select";import fe from"../Parts";import ge from"./Picker";const A=" ~ ",he={clock:{defaultValue:"--:--",format:/^\d{2}\D\d{2}$/,ranges:[{type:"hour",from:0,length:2},{type:"minute",from:3,length:2}],sets:1},date:{defaultValue:"----/--/--",format:/^\d{4}\D\d{2}\D\d{2}$/,ranges:[{type:"year",from:0,length:4},{type:"month",from:5,length:2},{type:"date",from:8,length:2}],sets:1},week:{defaultValue:"----\u5E74\u7B2C--\u9031",format:/^\d{4}\D\d{2}$/,ranges:[{type:"year",from:0,length:4,region:6},{type:"week",from:6,length:2,region:3}],sets:1},month:{defaultValue:"----\u5E74--\u6708",format:/^\d{4}\D\d{2}$/,ranges:[{type:"year",from:0,length:4},{type:"month",from:5,length:2,region:3}],sets:1},year:{defaultValue:"----\u5E74",format:/^\d{4}$/,ranges:[{type:"year",from:0,length:4,region:5}],sets:1},dates:{defaultValue:"----/--/--",format:/^\d{4}\D\d{2}\D\d{2}$/,ranges:[{type:"year",from:0,length:4},{type:"month",from:5,length:2},{type:"date",from:8,length:2,region:5},{type:"year",from:10+A.length,length:4},{type:"month",from:15+A.length,length:2},{type:"date",from:18+A.length,length:2}],sets:2},months:{defaultValue:"----\u5E74--\u6708",format:/^\d{4}\D\d{2}$/,ranges:[{type:"year",from:0,length:4},{type:"month",from:5,length:2,region:6},{type:"year",from:8+A.length,length:4},{type:"month",from:13+A.length,length:2,region:3}],sets:2},dateWareki:{defaultValue:"----\u5E74--\u6708--\u65E5",format:/^\d{4}\D\d{2}\D\d{2}$/,ranges:[{type:"dateWareki",from:0,length:4,region:5},{type:"month",from:5,length:2,region:3},{type:"date",from:8,length:2,region:3}],sets:1}},$=e=>{let{restrict:l,value:v,era:t}=e,D=b.flatArray(v||""),{defaultValue:g,format:d,ranges:m,sets:i}=he[l],u=[],n=l=="clock"?":":"/";for(let a=0;a<D.length;a++)D[a]=String(D[a]).replace(/\D/ig,n);for(let a=0;a<i;a++){let c=D[a]||"";if(!c.match(d))D[a]="",u.push(g);else{let x=g;c.split(/\D/).forEach((S,R)=>{if(R==0&&l=="dateWareki"){let h=Number(S);t!="year"&&(h>=2019?t=="reiwa"?h-=2018:t=="heisei"&&(h=31):h>=1989?t=="heisei"?h-=1988:t=="shouwa"&&(h=64):h>=1926?t=="shouwa"?h-=1925:t=="taisho"&&(h=15):h>=1912?t=="taisho"?h-=1911:t=="meiji"&&(h=45):h>=1868&&(h-=1867)),S=h.zeroEmbed(4)}x=x.replace(new RegExp("------------------".slice(0,S.length)),S)}),u.push(x)}}return{formatValue:u.join(A),dataValue:["dates","months"].includes(l)?D:D[0],ranges:m}};function ye(e){let{params:l}=e,{restrict:v,min:t,max:D,required:g}=l,d=[],m=b.flatArray(e.value),i={empty:!1,escalated:1,filled:!0,correct:!0,prohibited:!1};(()=>{let u=v=="clock"?":":"/";for(let n=0;n<m.length;n++)m[n]=String(m[n]).replace(/\D/ig,u);for(let n=0;n<m.length;n++){let a=m[n],c=m[n-1];a.removeLetters()||(i.empty=!0),n>0&&(i.escalated&=+(a>=c))}i.escalated&&(i.empty||(v.match(/clock/)?m.forEach(n=>{let[a,c]=n.split(/\D+/);!a||!c?i.filled=!1:(Number(a)>23||Number(c)>59)&&(i.correct=!1)}):v.match(/date/)?m.forEach(n=>{let[a,c,x]=n.split(/\D+/);if(!a||!c||!x)i.filled=!1;else{let S=b.Time(n);(!S.validate||n!=S.toFormatYMD())&&(i.correct=!1)}}):v.match(/week/)?m.forEach(n=>{let[a,c]=n.split(/\D+/);if(!a||!c)i.filled=!1;else{let x=b.Time(a+"/01/01").weekday,R=b.Time(a+"/01/0"+(7-x+1)).addWeek(Number(c)-1);a!=String(R.year)&&(i.correct=!1)}}):v.match(/month/)?m.forEach(n=>{let[a,c]=n.split(/\D+/);!a||!c?i.filled=!1:b.Time([a,c,"01"].join("/")).validate||(i.correct=!1)}):v.match(/year/),i.filled&&i.correct&&m.forEach(n=>{{let a=Number(String(n).replace(/\D/ig,""));if(t&&Number(String(t).replace(/\D/ig,""))>a&&(i.prohibited=!0),D){let c=Number(String(D).replace(/\D/ig,""));a>c&&(i.prohibited=!0)}}})))})();{let{empty:u,escalated:n,filled:a,correct:c,prohibited:x}=i;u&&g&&(d=[{type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}]),n||d.push({type:"invalid",label:"\u6642\u7CFB\u5217\u3092\u6B63\u3057\u304F\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"}),c||d.push({type:"invalid",label:"\u7121\u52B9\u306A\u5024\u304C\u5165\u529B\u3055\u308C\u3066\u3044\u307E\u3059"}),a||d.push({type:"invalid",label:"\u6700\u5F8C\u307E\u3067\u5024\u3092\u57CB\u3081\u3066\u304F\u3060\u3055\u3044"}),x&&d.push({type:"invalid",label:Z(Ie,{children:[T(ie,{children:"\u5165\u529B\u7BC4\u56F2\u304C\u5236\u9650\u3055\u308C\u3066\u3044\u307E\u3059"}),"[",t||"\u4E0B\u9650\u7121\u3057","] ~ [",D||"\u4E0A\u9650\u7121\u3057","]"]})})}return{ok:!d.filter(({type:u})=>u=="invalid").length,notice:d}}const Q={picker:{launch:e=>{let l=e.tipsID||b.uuid.gen();G.open(_(o({gravityPoint:e.gravityPoint||24,padding:"1/2",tipsID:l},e),{close_option:o({aroundClick:!0,elementBlur:!1},e.close_option),content:T(ge,{restrict:e.restrict,min:e.min,max:e.max,era:e.era,defaultValue:e.defaultValue,tipsID:l,onValueUpdate:(v,t)=>{e.onValueUpdate(v,t)}})}))},remove:e=>{G.close(e)}}},ve=e=>{let U=e,{tone:l,required:v,restrict:t="clock",componentID:D,era:g,form:d,name:m,min:i,max:u,className:n,enableFormSubmit:a,checkValidationAtFirst:c,onKeyDown:x,onValidate:S,onUpdateValue:R,onUpdateValidValue:h,value:B="",leftIndicator:J,rightIndicator:F}=U,f=z(U,["tone","required","restrict","componentID","era","form","name","min","max","className","enableFormSubmit","checkValidationAtFirst","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","leftIndicator","rightIndicator"]),[r,C]=W(g),[s,V]=W(_(o({componentID:e.componentID||""},$({restrict:t,value:B,era:r})),{eventType:"init",eventID:b.uuid.gen()})),[y,M]=W({ok:!1,notice:[]}),[I,k]=W({active:!1,index:0,prevIndex:-1});pe({type:"time",params:e,val_status:s,set_status:V,val_validate:y,set_validate:M,DefaultValidation:ye,onUpdateValue:R,onUpdateValidValue:h,ExtraOverrideParams:o({},$({restrict:t,value:B,era:r}))});const E=re(!1);return X(()=>{if(E.current){V(o(o({},s),$({restrict:t,value:s.dataValue,era:r})));let p=O.get("refreshEra_"+s.componentID);p&&p.refreshEra(r)}else E.current=!0},[r]),O.update({key:s.componentID,value:{openPicker:()=>{e.disabled||Q.picker.launch({parent:"#Picker-"+s.componentID,tipsID:"PickerTips-"+s.componentID,restrict:t,min:i,max:u,defaultValue:s.dataValue,era:r,onValueUpdate:(p,w)=>{V(_(o(o({},s),$({restrict:t,value:p,era:w})),{eventType:"update",eventID:b.uuid.gen()})),C(w)}})},resetEra:p=>{C(p),V(_(o(o({},s),$({restrict:t,value:"",era:r})),{eventType:"update",eventID:b.uuid.gen()}))}}}),X(()=>{let{index:p,active:w}=I;if(w){p=Math.max(p,0),p=Math.min(p,s.ranges.length-1);let{from:P,length:L}=s.ranges[p],j=b(K.get().appRoot).find("#"+e.id)[0];j&&j.setSelectionRange(P,P+L)}},[I]),Z(se,{val_status:s,set_status:V,val_validate:y,params:e,children:[T(ce,{name:m,"data-input-type":"time","data-form":d,"data-validation":y.ok,componentID:s.componentID,"data-value":JSON.stringify(["dates","months"].includes(t)?!s.dataValue[0]||!s.dataValue[1]?null:s.dataValue:s.dataValue||null)}),K.get().isTouchDevice?T(q.Button.Plain,{className:n,freeCSS:{textAlign:"left"},children:s.formatValue,onClick:p=>{let w=O.get(s.componentID);w&&w.openPicker(),p.stopPropagation()}}):T("input",o({type:"text",inputMode:"numeric","data-input-type":"time","data-form-name":d,value:s.formatValue,className:n,tabIndex:K.get().isTouchDevice?-1:0,onKeyDown:p=>{De({restrict:t,event:p,val_era:r,val_status:s,set_status:V,val_focus:I,set_focus:k}),x&&x(p),a&&ue(p)},onKeyUp:p=>{p.key=="Tab"&&k(_(o({},I),{active:!0}))},onClick:p=>{let w=p.target.selectionEnd,P=0;s.ranges.forEach((L,j)=>{let{from:Y,length:ee,region:te}=L;Y<=w&&w<=Y+(te||ee)&&(P=j)}),k(_(o({},I),{active:!0,index:P})),p.preventDefault()},onChange:()=>{}},f))]})},De=e=>{let{val_era:l,restrict:v,event:t,val_status:D,set_status:g,val_focus:d,set_focus:m}=e,{key:i,shiftKey:u,ctrlKey:n,metaKey:a}=t,c=n||a,{selectionStart:x,selectionEnd:S}=t.target,{index:R,prevIndex:h}=d,{ranges:B,formatValue:J}=D,F=B.length-1;if(["Tab","ArrowLeft","ArrowRight"].includes(i)){let f=0;if(i=="Tab"){let r=+!u*2-1;if(f=d.index+r,f<0||f>F)return}else{let r=i=="ArrowLeft"?-1:i=="ArrowRight"?1:0;c||x==0&&S==String(D.formatValue).length?f=r==1?F:0:f=Math.max(0,Math.min(R+r,F))}m(_(o({},d),{index:f,prevIndex:R})),t.preventDefault()}if(["Backspace","ArrowUp","ArrowDown","0","1","2","3","4","5","6","7","8","9"].includes(i)){t.preventDefault();let f=R;f=Math.max(f,0),f=Math.min(f,F);let{type:r,from:C,length:s}=B[f],V=J.slice(C,C+s),y;if(i=="Backspace")y="------".slice(0,s);else if(["ArrowUp","ArrowDown"].includes(i)){let M=i=="ArrowUp"?1:-1;V=V|0,y=V+M;let[I,k,E]=r=="dateWareki"?l=="year"?[0,2999,4]:l=="reiwa"?[1,2999,4]:l=="heisei"?[1,31,4]:l=="shouwa"?[1,64,4]:l=="taisho"?[1,15,4]:l=="meiji"?[1,45,4]:[0,0,0]:r=="minute"?[0,59,2]:r=="hour"?[0,23,2]:r=="date"?[1,31,2]:r=="week"?[1,53,2]:r=="month"?[1,12,2]:r=="year"?[0,2999,4]:[0,0,0];y>k?y=I:y<I&&(y=k),y=Number(y).zeroEmbed(E)}else if(["0","1","2","3","4","5","6","7","8","9"].includes(i)){let M=V|0,I=i,k=`${M}${I}`;if(h!=R&&h>=0&&(M=0,k="0"+I),r=="year"||r=="dateWareki"&&l=="year")Number(k)>1e4?y=I:y=k,(y|0)>1e3&&f++;else if(["hour","minute","date","week","month"].includes(r)||r=="dateWareki"&&l!="year"){let E=r=="dateWareki"?l=="reiwa"?100:l=="heisei"?31:l=="shouwa"?64:l=="taisho"?15:l=="meiji"?45:0:r=="minute"?59:r=="hour"?23:r=="date"?31:r=="week"?53:r=="month"?12:0;y=(k|0)>E?I:k,(Number(I)>Number(String(E)[0])||V=="0000".slice(0,String(E).length)&&(k!="0000".slice(0,String(E).length)||["minute","hour"].includes(r)&&h==R)||(k|0)>=H(10,String(E).length-1))&&f++}r=="year"||r=="dateWareki"?y=(y|0).zeroEmbed(4):y=(y|0).zeroEmbed(2)}{let M=String(J).partReplace(C,String(y)),I=M.split(A).map(k=>k.replace(/(^\D|\D$)/,"").split(/\D+/).join(v=="clock"?":":"/").replace(/(^\D|\D$)/,""));if(v=="dateWareki"){let k=I[0].split(/\D/),[E,U,p]=k;k.length==3&&E&&(I=[[Number(E)-1+Number({year:1,reiwa:2019,heisei:1989,shouwa:1926,taisho:1912,meiji:1868}[l]),U,p].join("/")])}f=Math.max(f,0),f=Math.min(f,F),g(_(o({},D),{dataValue:["dates","months"].includes(v)?I:I[0],formatValue:M,eventType:"update",eventID:b.uuid.gen()})),m(_(o({},d),{index:f,prevIndex:d.index}))}}},N={Origin:e=>{e=o({},e);let[l]=W(e.componentID||b.uuid.gen());if(e.componentID=l,b.is.nullish(e.rightIndicator)){let v=(e.restrict||"").match(/clock/)?ne:le;e.rightIndicator=T(fe.RightIndicator,{padding:0,children:T(q.Button.Sub.R,{color:"cloud",border:"unset",padding:[0,1],fontColor:"theme",borderRadius:"inherit",backgroundColor:"inherit",flexCenter:!0,height:1,ssEffectsOnActive:["ripple.cloud"],tabIndex:-1,id:"Picker-"+e.componentID,onClick:()=>{let t=O.get(e.componentID);t&&t.openPicker()},children:T(ae,{icon:v})})})}return T(oe,{componentID:e.componentID,children:ve,params:me.Boxish(e)})},Clock:e=>T(N.Origin,o({restrict:"clock",era:"clock"},e)),Date:e=>T(N.Origin,o({restrict:"date"},e)),Week:e=>T(N.Origin,o({restrict:"week"},e)),Month:e=>T(N.Origin,o({restrict:"month"},e)),Year:e=>T(N.Origin,o({restrict:"year"},e)),DateWareki:e=>{e=o({},e);let[l]=W(e.componentID||b.uuid.gen());e.componentID=l;let{defaultEra:v="wareki"}=e,[t,D]=W((()=>{let g="year";if(v=="wareki"&&(g="reiwa",e.value)){let[d,m,i]=e.value.split(/\D/);if(d&&m&&i){let u=Number(d);u>=2019?(u-=2019,g="reiwa"):u>=1989?(u-=1989,g="heisei"):u>=1926?(u-=1926,g="shouwa"):u>=1912?(u-=1912,g="taisho"):u>=1868&&(u-=1868,g="meiji"),u+=1}}return g})());return X(()=>{O.set({key:"refreshEra_"+l,value:{refreshEra:g=>{D(g)}}})},[]),T(N.Origin,_(o({restrict:"dateWareki",leftIndicator:T(de,{enableUnSelected:!1,value:t,tone:e.tone,override:"force",flexCenter:!0,borderTopRightRadius:"2/3",borderBottomRightRadius:"2/3",height:1,freeCSS:{whiteSpace:"nowrap"},options:[{value:"year",label:"\u897F\u66A6"},{value:"reiwa",label:"\u4EE4\u548C"},{value:"heisei",label:"\u5E73\u6210"},{value:"shouwa",label:"\u662D\u548C"},{value:"taisho",label:"\u5927\u6B63"},{value:"meiji",label:"\u660E\u6CBB"}],onUpdateValidValue:({value:g,eventType:d})=>{D(g);let m=O.get(e.componentID);m&&m.resetEra&&m.resetEra(g)}})},e),{era:t}))},Periods:{Date:e=>T(N.Origin,o({restrict:"dates"},e)),Month:e=>T(N.Origin,o({restrict:"months"},e))},fn:Q};export{N as Time,N as default};
|
package/dist/fn/Input/_.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as a}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=_.js.map
|
|
1
|
+
import{b as a}from"../../chunk-VY3566IV.js";import{jsx as f}from"react/jsx-runtime";import{GenerateClassName as R}from"../../@utils/_";import b from"./Plain";import i from"./Hidden";import p from"./Text";import m from"./TextArea";import n from"./Contenteditable";import l from"./DigitCharacters";import c from"./Time/_";import s from"./Select";import d from"./RichSelect";import*as t from"./List";import x from"./Chips/_";import h from"./Search";import C from"./Filer";import y from"./Slider";import _ from"./Switch";import T from"./Checker";import S from"./Segmented";import u from"./Parts";var r;(e=>(e.Plain=b,e.Hidden=i,e.Text=p,e.TextArea=m,e.Contenteditable=n,e.DigitCharacters=l,e.Time=c,e.Select=s,e.RichSelect=d,e.List=t.List,e.Radio=t.Radio,e.Checkbox=t.Checkbox,e.Checker=T,e.Chips=x,e.Search=h,e.Filer=C,e.Slider=y,e.Switch=_,e.Segmented=S,e.Comps=u))(r||(r={}));const ce={Plain:o=>f("input",a({},R(o))),Hidden:i,Text:p,TextArea:m,Contenteditable:n,DigitCharacters:l,Time:c,Select:s,RichSelect:d,Radio:t.Radio,Checkbox:t.Checkbox,Checker:T,Chips:x,Search:h,Filer:C,Slider:y,Switch:_,Segmented:S,Comps:u};export{r as Input,r as default};
|
package/dist/fn/Input/core.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{b as o,c as r,e as B}from"../../chunk-
|
|
2
|
-
//# sourceMappingURL=core.js.map
|
|
1
|
+
import{b as o,c as r,e as B}from"../../chunk-VY3566IV.js";import{jsx as m,jsxs as C}from"react/jsx-runtime";import{useState as N,useEffect as T,useRef as W}from"react";import{$$ as l,Config as P,useStore as v,GenerateClassName as E}from"../../@utils/_";import{InputClasses as k}from"../../@styles/componentClasses/_";import x from"../../atoms/Box";import F from"../../atoms/Flex";import V from"../../atoms/FAI";import z from"../../mols/Row";import L from"../../mols/Column";import A from"../Button";import D from"../Tooltips";const ie=e=>{let[t]=N(e.componentID||l.uuid.gen());e=o({},e),e.params=r(o({enableFormSubmit:!0,status_id:l.uuid.gen(),override:"never",name:l.uuid.gen(),id:l.uuid.gen(),"aria-label":"Input-"+t},e.params),{componentID:t});let{children:n}=e;return m(n,o({},e.params))},se=e=>{let{children:t,val_status:n,set_status:a,val_validate:c,params:i}=e,{clearButton:s,rightIcon:u,leftIcon:p,wrapStyles:y}=i;return n.eventType=="init"&&!i.checkValidationAtFirst&&(c.notice=[]),C(x,r(o({position:"relative"},y),{id:"BoxWrapper-"+n.componentID,children:[C(F,{flexWrap:!1,className:k("Wrapper"),children:[i.leftIndicator,C(F,{position:"relative",flexSizing:"auto",children:[p,t,s&&n.dataValue?m(A.Button.Normal.R,{ssSphere:2,flexCenter:!0,fontColor:"5.translucent",ssEffectsOnActive:["ripple.theme"],position:"absolute",right:1,top:"50%",freeCSS:{zIndex:3},className:k("IndicatorIcon"),onClick:()=>{a(r(o({},n),{dataValue:"",formatValue:"",eventType:"update",eventID:l.uuid.gen()}))},children:m(V.Times,{})}):u]}),i.rightIndicator]}),m(U,{notice:c.notice,val_status:n})]}))},U=e=>{let{notice:t,val_status:n}=e,{componentID:a,eventType:c}=n;l.interval.clear("NoticeTimer-"+a),l.interval.clear("NoticeTimerClose-"+a);let i="notice-"+e.val_status.componentID,s="notice-tips-"+e.val_status.componentID;if(!t.length)return D.close(s),null;let u=t.map(p=>{let{type:y,label:I}=p,S=y=="invalid"?V.Times:y=="warn"?V.Exclamation:V.Check;return C(z.Left,{gap:0,borderRadius:"2.tone.secondary",children:[m(S,{flexCenter:!0,fontSize:"3.paragraph",fontColor:{invalid:"nega",warn:"warn",valid:"posi"}[y]}),m(x,{fontColor:"white",children:I})]})});return l.interval.standBy("NoticeTimer-"+a,350,()=>{D.open({tipsID:s,parent:"#"+i,padding:["1/2",0],content:C(D.Comps.Body,{padding:["1/2","2/3"],fontSize:"1.mini",position:"relative",children:[m(x,{position:"absolute",unitHeight:1,unitWidth:1,left:1,backgroundColor:"dark",freeCSS:{zIndex:1,transform:"rotate(45deg)",top:-6}}),m(L,{gap:"1/3",position:"relative",freeCSS:{zIndex:2},backgroundColor:"inherit",children:u})]})}),l.interval.standBy("NoticeTimerClose-"+a,7500,()=>{D.close(s)})}),m(x,{className:k("Notices"),id:i})},ue=e=>{let{type:t,params:n,val_status:a,set_status:c,ExtraOverrideParams:i,ExtraStoreParams:s,val_validate:u,set_validate:p,DefaultValidation:y,onUpdateValue:I,onUpdateValidValue:S}=e;n=o({},n);let{componentID:R}=a,[w,O]=N(l.uuid.gen());T(()=>(v.update({key:R,value:o({ResolveRefresh:null,Refresh:()=>new Promise((d,f)=>{v.get(R).ResolveRefresh=d,O(l.uuid.gen())}),GenNotice:d=>{let{ok:f,notice:g}=d;p({ok:f,notice:g})}},s)}),()=>{v.delete(R)}),[]);const _=W(!1);T(()=>{_.current?c(r(o({},a),{eventType:"refresh",eventID:l.uuid.gen()})):_.current=!0},[w]),T(()=>{n.value=a.dataValue,l.interval.clear("ValidationTimer-"+R),j({val_status:a,set_validate:p,DefaultValidation:y,params:n})},[a.eventID]),(()=>{let{override:d}=n;if(d=="never"||d=="beforeModified"&&!["init","override"].includes(a.eventType))return;let f=v.get(a.componentID);f&&(n.value!=a.dataValue&&n.status_id!=f.status_id&&c(r(o(r(o({},a),{dataValue:n.value}),i),{eventType:"override",eventID:l.uuid.gen()})),f.status_id=n.status_id)})(),T(()=>{let{componentID:d,eventType:f,dataValue:g}=a,h=g;if(t=="list"?h=g.map(b=>JSON.parse(b)):t=="select"||t=="richSelect"?h=JSON.parse(g):t=="file"&&v.update({key:d,value:{Files:a.dataValue}}),f=="refresh"){let b=v.get(d);b&&b.ResolveRefresh&&b.ResolveRefresh(null)}f=="update"&&(I&&I({componentID:d,value:h,storeData:v.get(d),eventType:f}),l.scope(()=>{u.ok&&S&&S({componentID:d,value:h,storeData:v.get(d),eventType:f})}))},[u])},j=e=>{let{val_status:t,params:n,set_validate:a,DefaultValidation:c}=e,i=c({value:t.dataValue,params:n});if(!i.ok){a(i);return}let s=i.notice;const u=()=>B(void 0,null,function*(){if(!n.onValidate)return;let p=yield n.onValidate({value:t.dataValue,eventType:t.eventType,props:e});if(!p.ok){a({ok:!1,notice:[...s,...p.notice]});return}a({ok:!0,notice:[...s,...p.notice]})});n.onValidate?t.eventType=="refresh"?u():l.interval.standBy("ValidationTimer-"+t.componentID,450,u):a({ok:!0,notice:s})},de=e=>{let t=e.target,{form:n,formName:a}=t.dataset;n=a||n;let c=!1,i=l(P.get().appRoot).find(`[data-form-submit-button="${n}"]`)[0];if(!i)return c;let s=i.dataset.sdfike||"",u=e.key,p=e.ctrlKey||e.metaKey;return l.scope(()=>{s.includes("enter")&&(u!="Enter"||e.nativeEvent.isComposing||P.get().browserIs=="safari"&&e.keyCode==229)||((u=="Enter"&&(s.includes("enter")||s.includes("auxEnter")&&p)||u==" "&&s.includes("space"))&&(i.click(),e.preventDefault()),c=!0)}),c},K={Input:e=>{if(e=="plain")return{};let t={padding:"3/4",transition:"middle",flexSizing:"auto",boxShadow:"0.thin"};return e=="border"?t=r(o({},t),{border:!0,borderRadius:"2.tone.secondary",backgroundColor:"1.layer.base"}):e=="cloud"?t=r(o({},t),{border:"1.thin",borderRadius:"2.tone.secondary",backgroundColor:"cloud"}):e=="bottomBorder"&&(t=r(o({},t),{borderRadius:0,border:"unset",borderBottom:!0,backgroundColor:"cloud"})),t},ListCell:e=>{e=o({},e),e.tone||(e.tone="border");let{tone:t}=e;return t=="plain"||(e=r(o({},e),{cellStyles:o({position:"relative",padding:["3/4",1],borderRadius:"2.tone.secondary",transition:"middle"},e.cellStyles)}),t=="normal"?e=r(o({gap:"1/2"},e),{cellStyles:o({isSemiBoldFont:!0},e.cellStyles),cellCheckedStyles:{backgroundColor:"cloud"}}):(e=r(o({gap:"3/4"},e),{cellStyles:o({boxShadow:"0.thin"},e.cellStyles)}),(t=="cloud"||t=="vivid")&&(e.cellStyles=o({border:"1.thin",backgroundColor:"2.layer.cloud"},e.cellStyles)),t=="border"?(e.cellStyles=o({border:!0,backgroundColor:"1.layer.base"},e.cellStyles),e.cellCheckedStyles=o({borderColor:"theme",fontColor:"theme"},e.cellCheckedStyles)):t=="cloud"?e.cellCheckedStyles=o({backgroundColor:"tcOpFew",fontColor:"theme",borderColor:"theme"},e.cellCheckedStyles):t=="vivid"&&(e.cellCheckedStyles=o({backgroundColor:"theme",fontColor:"white",borderColor:"theme"},e.cellCheckedStyles)))),E(e)},Boxish:e=>{e=o({},e),e.tone||(e.tone="border");let t=r(o(o(o(r(o({},K.Input(e.tone)),{fontColor:"2.normal"}),e),e.leftIndicator?{borderTopLeftRadius:"2/3",borderBottomLeftRadius:"2/3",marginLeft:"1/4"}:null),e.rightIndicator?{borderTopRightRadius:"2/3",borderBottomRightRadius:"2/3",marginRight:"1/4"}:null),{className:[k("Input"),e.className].join(" ")});return E(t)},Indicator:e=>{if(e||(e="border"),e=="plain")return{};let t={flexSizing:"none",flexCenter:!0,padding:[0,1],borderRadius:"2.tone.secondary",backgroundColor:"cloud"};return e=="border"?t=r(o({},t),{border:!0}):e=="cloud"?t=r(o({},t),{border:"1.thin"}):e=="bottomBorder"&&(t=r(o({},t),{borderRadius:0,borderBottom:!0})),t},IndicatorIcon:{position:"absolute",unitWidth:2,unitHeight:2,top:"50%",flexCenter:!0,fontColor:"theme",fontSize:"1.mini",backgroundColor:"inherit"}};export{se as BoxWrapper,ue as CommonEffects,K as DefaultStyles,de as SubmitForm,j as ValidationCheck,ie as Wrapper};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import"../../chunk-
|
|
2
|
-
//# sourceMappingURL=PageNotFound.js.map
|
|
1
|
+
import"../../chunk-VY3566IV.js";import{jsx as o,jsxs as t}from"react/jsx-runtime";import r from"../../atoms/Box";import l from"../../atoms/FAI";import p from"../../mols/Row";import e from"../../mols/Text";import a from"../../mols/Column";import m from"../Button";const i=()=>{let{href:n}=location;return o(p.Center,{padding:[4,1],children:t(a,{ssCardBox:!0,gap:2,padding:[3,2],textAlign:"center",width:1,freeCSS:{maxWidth:12*30},children:[o(l.LinkSlash,{fontColor:"theme",freeCSS:{fontSize:"3rem"}}),t(r,{children:[o(e.Paragraph,{children:"\u3053\u306E\u30DA\u30FC\u30B8\u306F\u3054\u5229\u7528\u3044\u305F\u3060\u3051\u307E\u305B\u3093\u3002"}),o(e.Supplement,{fontColor:"3.blur",children:"\u5165\u529B\u3055\u308C\u305F\u30EA\u30F3\u30AF\u306E\u30DA\u30FC\u30B8\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002"})]}),t(a,{children:[t(e.Normal,{textAlign:"left",ssCardBox:"cloud",isSemiBoldFont:!0,padding:1,children:["\u30FB\u30EA\u30F3\u30AF\u304C\u6B63\u3057\u3044\u304B",o(r,{margin:["1/2",0],borderBottom:!0}),"\u30FB\u30EA\u30F3\u30AF\u306E\u6709\u52B9\u671F\u9650",o(r,{margin:["1/2",0],borderBottom:!0}),"\u30FB\u30A2\u30AF\u30BB\u30B9\u6A29\u9650\u7B49\u304C\u6B63\u3057\u3044\u304B"]}),"\u306A\u3069\u3092\u3082\u3046\u4E00\u5EA6\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"]}),o(m.Anchor.Link,{newTab:!0,href:n,children:n}),o(m.Anchor.BorderToFill.R,{href:"/",width:1,children:"\u30DB\u30FC\u30E0\u306B\u623B\u308B"})]})})};export{i as PageNotFound,i as default};
|