amotify 0.2.31 → 0.2.32

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.
@@ -1 +1 @@
1
- import{b as f,c as g,d as H,e as X}from"../../chunk-C5N2D3ZX.js";import{Fragment as J,jsx as a,jsxs as F}from"react/jsx-runtime";import{useState as y,useEffect as b,useRef as Z}from"react";import r from"@mingoo/jsmin";import{GenerateHTMLProps as ee,ExtractStyles as te,useStore as $}from"../../@utils";import{Box as T,Span as le,FAI as M,Column as oe}from"../../atoms";import{Text as E,Row as z}from"../../mols";import j from"../Button";import{Loader as ae}from"../Loader";import{Sheet as P}from"../Sheet";import{OptionalInputWrapper as ne,BoxWrapper as re,CoreEffects as W,DefaultStyles as ie}from"./core";import{InputAutocompleteClasses as x}from"../../@styles/componentClasses";import{InputLabel as se}from"./Label";import{RightIcon as Q}from".";function ue(e){let{value:t,states:o}=e,{required:l,options:c,min:u,max:d}=o;u=u||0,d=d||65535;let i=[],n=t.filter(p=>p!=="null").length;return l&&(n||i.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"})),n<u&&i.push({type:"invalid",label:u+"\u500B\u4EE5\u4E0A\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044"}),n>d&&i.push({type:"invalid",label:d+"\u500B\u307E\u3067\u9078\u629E\u3067\u304D\u307E\u3059"}),{ok:!i.filter(({type:p})=>p=="invalid").length,notice:i}}const R={InitOptions:e=>{let t=[];return e.forEach(o=>{let{type:l,label:c,value:u,searchValue:d}=o;t.push(g(f({},o),{searchValue:d||(r.is.string(c)?c:""),type:l||"selector",value:r.JsonTo(u)}))}),t},FilterSelectableOptions:(e,t)=>{let o=e.val_options;if(t||(o=e.val_options.filter(l=>l.type!="label")),e.val_keyword){let l=e.val_keyword.toLower().replace(/ /g,"");o=o.filter(c=>(c.searchValue||"").toLower().replace(/ /g,"").includes(l))}return o}},w={Shallow:e=>{let{rootStates:t,val_status:o}=e,l=te(t);return a(T,{position:"absolute",top:0,left:0,right:0,height:0,overflow:"hidden",opacity:"trans",freeCSS:{zIndex:3,pointerEvents:"none"},children:a(E.Description,g(f({className:t.className},l),{position:"absolute",width:1,freeCSS:g(f({},l.freeCSS),{color:"orange"}),"data-id":"shallow_"+o.componentID,children:a(T,{"data-input-value-shallow":o.componentID,children:"A"})}))})},Button:e=>{let{rootStates:t}=e,G=t,{tone:o,required:l,form:c,className:u,multiSelect:d,enableFormSubmit:i,checkValidationAtFirst:n,onValidate:p,onUpdateValue:s,onUpdateValidValue:m,value:v="",options:I,leftIndicator:S,rightIndicator:_,leftIcon:C,rightIcon:D,componentID:O,status_id:h,wrapStyles:B,emptySelect:A,SearchInput:K,SearchInputPlaceholder:U,SelectedComponent:q,SelectorComponent:N,SelectorGravityPoint:L,DynamicOptionsOnSearch:ce}=G,k=H(G,["tone","required","form","className","multiSelect","enableFormSubmit","checkValidationAtFirst","onValidate","onUpdateValue","onUpdateValidValue","value","options","leftIndicator","rightIndicator","leftIcon","rightIcon","componentID","status_id","wrapStyles","emptySelect","SearchInput","SearchInputPlaceholder","SelectedComponent","SelectorComponent","SelectorGravityPoint","DynamicOptionsOnSearch"]);return a(J,{children:F("div",g(f({tabIndex:0},k),{"data-disabled":t.disabled,"data-name":t.name,"data-value":r.JsonTo(e.val_status.dataValue),"data-form":c,"data-show-validation":W.isShowValidation(e.val_validate,e.val_status,!!n),"data-validation":e.val_validate.ok,"data-component-id":e.val_status.componentID,"data-input-origin":e.val_status.componentID,"data-focus":!!e.val_focus,"data-input-type":"autocomplete-"+(d?"multi":"single"),className:[u,x("Core")].join(" "),onMouseDown:V=>{t.disabled||e.val_focus&&(V.stopPropagation(),V.preventDefault())},onFocus:V=>{t.disabled||e.set_focus(!0)},onClick:V=>{t.disabled||(k!=null&&k.onClick&&(k==null||k.onClick(V)),!!r(V.target).parent("."+x("SelectedCell")).length)||e.set_focus(!0)},onKeyDown:V=>{i&&W.SubmitForm(V)},children:[F(z.Left,{flexWrap:!0,gap:"1/3",freeCSS:{letterSpacing:".5px"},children:[a(w.Selected,f({},e)),a(le,{width:0,overflow:"hidden",opacity:"trans",children:"A"}),a(w.SearchInput,f({},e))]}),a(w.Selector,f({},e))]}))})},SearchInput:e=>{let{rootStates:t}=e;return b(()=>{var l;if(t.disabled||!e.val_focus)return;let o=R.FilterSelectableOptions(e);e.set_optionFocused(((l=o[0])==null?void 0:l.value)||null)},[e.val_keyword]),b(()=>{e.set_selectorOpen(e.val_focus),e.val_focus&&r("#SearchInput_"+t.componentID).focus()},[e.val_focus]),b(()=>{e.val_status.eventType!="init"&&(t.max==e.val_status.dataValue.length?(e.set_focus(!1),e.set_selectorOpen(!1)):r("#SearchInput_"+t.componentID).focus())},[e.val_status.dataValue]),t.disabled||!e.val_focus?null:a(T,{id:"SearchInput_"+t.componentID,placeholder:t.SearchInputPlaceholder||"\u691C\u7D22...",opacity:e.val_focus?"max":"trans","data-form":t.form,transition:"middle",flexSizing:0,htmlTag:"input",border:"unset",backgroundColor:"trans",value:e.val_keyword,freeCSS:{outline:"none"},onKeyDown:o=>{let{key:l,metaKey:c,ctrlKey:u}=o,d=c||u;l=="Escape"||l=="Tab"?e.set_focus(!1):l==" "?r.scope(()=>{e.val_selectorOpen||e.val_keyword||(o.preventDefault(),e.set_selectorOpen(!0))}):l=="Backspace"?r.scope(()=>{if(e.val_keyword)return;let i=[...e.val_status.dataValue];i.pop(),e.set_status(n=>g(f({},n),{dataValue:i,eventType:"update",eventID:r.uuid.gen()}))}):l=="Enter"&&r.scope(()=>{if(!e.val_selectorOpen)return e.set_selectorOpen(!0);if(!e.val_optionFocused)return;let i=e.val_options.find(p=>p.value==e.val_optionFocused);if(!i)return;let{value:n}=i;e.set_status(p=>{let s=[...p.dataValue];return r.scope(()=>{if(n==="null")return s=[];p.dataValue.includes(n)?s=s.filter(v=>v!==n):t.multiSelect?s.push(n):s=[n]}),g(f({},p),{dataValue:s,eventType:"update",eventID:r.uuid.gen()})}),e.set_keyword("")}),r.scope(()=>{if(!["ArrowDown","ArrowUp"].includes(l))return;if(o.preventDefault(),!e.val_selectorOpen)return e.set_selectorOpen(!0);let i=l=="ArrowDown"?1:-1,n=R.FilterSelectableOptions(e),p=n.length-1,s=null;r.scope(()=>{var m,v,I,S;if(i==1){if(s=((m=n[0])==null?void 0:m.value)||null,e.val_optionFocused==null)return;if(d){s=n[p].value||s||null;return}let _=n.findIndex(C=>C.value==e.val_optionFocused);if(_==-1)return;s=((v=n[_+1])==null?void 0:v.value)||s||null}else{if(s=n[p].value||null,e.val_optionFocused==null)return;if(d){s=((I=n[0])==null?void 0:I.value)||s||null;return}let _=n.findIndex(C=>C.value==e.val_optionFocused);if(_==-1)return;s=((S=n[_-1])==null?void 0:S.value)||s||null}}),e.set_optionFocused(s)}),t.enableFormSubmit&&W.SubmitForm(o)},onChange:o=>{let c=o.target.value;e.set_keyword(c)}},"searchInput")},Selector:e=>{let{rootStates:t}=e,o="autocomplete-sheet-"+t.componentID;return b(()=>{if(t.disabled)return;let l="autocomplete-click-"+t.componentID;e.val_focus?r(document).addEvent({eventID:l,eventType:"click",callback:c=>{let u=r(c.target),d=!!r(u).parent("."+x("Core")).length;r(u).parent("."+x("Selector")).length||d||e.set_focus(!1)}}):(r(document).removeEvent([l]),e.set_keyword(""))},[e.val_focus]),b(()=>{if(e.val_selectorOpen){let l=r('[data-input-origin="'+t.componentID+'"]');if(!l)return;P.open({sheetID:o,type:"custom",parent:l[0],marginTop:"1/4",gravityPoint:t.SelectorGravityPoint||22,close_option:{aroundClick:!1},content:a(w.SelectorBody,f({},e))})}else P.close(o)},[e.val_selectorOpen]),b(()=>{if(t.disabled||!e.val_focus)return;P.customSheet.reposition(o);let l=$.get("refresh-autocomplete-selector-"+t.componentID);l&&l(e)},[e.val_focus,e.val_options,e.val_status.dataValue,e.val_keyword,e.val_optionFocused]),null},SelectorBody:e=>{let[t,o]=y(e),{rootStates:l}=t,[c,u]=y("idle"),[d,i]=y("idle");b(()=>{$.set({["refresh-autocomplete-selector-"+l.componentID]:m=>{o(m)}})},[]),b(()=>{if(!t.val_focus||!l.DynamicOptionsOnSearch)return;if(c=="idle")return u("ok");i("fetch");let m="autocomplete-search-"+l.componentID;r.interval.clear(m),r.interval.standBy(m,300,()=>X(void 0,null,function*(){let v=yield l.DynamicOptionsOnSearch(t.val_keyword);i("idle");let I=R.InitOptions(v||[]);t.set_options(I)}))},[t.val_keyword]);let n=[],p=R.FilterSelectableOptions(t,!0),s=R.FilterSelectableOptions(t);return p.forEach((m,v)=>{let{type:I,value:S}=m,_=t.val_optionFocused==S,C=t.val_status.dataValue.includes(S),D=l.SelectorComponent;n.push(a(D,{option:m,isFocused:_,isSelected:C,addCallback:()=>{t.set_status(O=>{let h=[...O.dataValue];return r.scope(()=>{if(S==="null")return h=[];O.dataValue.includes(S)?h=h.filter(A=>A!==S):l.multiSelect?h.push(S):h=[S]}),g(f({},O),{dataValue:h,eventType:"update",eventID:r.uuid.gen()})})}},String(S)||r.uuid.gen()))}),s.length||(n=[a(E.Supplement,{padding:[0,1],fontColor:"4.thin",children:"\u5019\u88DC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093"},"no-selector-notice")]),d=="fetch"&&(n=[F(z.Left,{padding:1,fontColor:"3.blur",children:[a(ae.Theme.R,{showInitial:!0}),a(E.Supplement,{children:"Loading..."})]},"loader")]),a(P.Body,{className:x("Selector"),ssCardBox:!0,borderRadius:"3.tone.tertiary",boxShadow:"1.normal",freeCSS:{minWidth:12*18},children:a(oe,{gap:0,padding:[1,0],children:n})})},Selected:e=>{let{rootStates:t,val_status:o,set_status:l,val_optionsDict:c}=e,u=[];return o.dataValue.forEach(d=>{let i=c[String(d)];if(!i)return;let n=t.SelectedComponent,p=i.label;i.value==="null"&&(p=""),u.push(a(T,{className:x("SelectedCell"),children:a(n,{value:i.value,label:p,children:p,removeCallback:s=>{if(s.stopPropagation(),s.preventDefault(),t.disabled)return;let m=[...o.dataValue];m=m.filter(v=>v!==d),l(v=>g(f({},v),{dataValue:m,eventType:"update",eventID:r.uuid.gen()}))}})},String(i.value)))}),a(J,{children:u})},Core:e=>{let{onUpdateValue:t,onUpdateValidValue:o,value:l}=e,c={componentID:e.componentID||"",dataValue:l,eventType:"init",eventID:r.uuid.gen()},[u,d]=y(!1),[i,n]=y(""),[p,s]=y(e.options),[m,v]=y(e.value[0]||null),[I,S]=y({}),[_,C]=y(!1),[D,O]=y(c),[h,B]=y({ok:!1,notice:[]}),A=Z(!1);b(()=>{A.current?s(e.options):A.current=!0},[e.options]),b(()=>{if(!p.length)return;let q=[...p],N=f({},I);q.forEach(L=>{L.type!="label"&&(N[String(L.value)]=L)}),S(N)},[p]);let K={rootStates:e,val_selectorOpen:u,set_selectorOpen:d,val_options:p,set_options:s,val_optionFocused:m,set_optionFocused:v,val_optionsDict:I,set_optionsDict:S,val_keyword:i,set_keyword:n,val_focus:_,set_focus:C,val_status:D,set_status:O,val_validate:h,set_validate:B};W.CommonEffects({type:"autocomplete",states:e,val_status:D,set_status:O,val_validate:h,set_validate:B,onUpdateValue:t,onUpdateValidValue:o,DefaultValidation:ue,ExtraOverrideStates:{dataValue:l,formatValue:l}});let U=_||D.dataValue.length&&D.dataValue[0]!=="null";return F(re,{val_status:D,set_status:O,val_validate:h,states:e,children:[a(se,{componentID:e.componentID,fontSize:e.fontSize,required:e.required,label:e.label,isActive:U}),a(w.Shallow,f({},K)),a(w.Button,f({},K))]})}},Y=e=>{let t=f({},e);t=g(f({value:[],min:0,max:65535,multiSelect:!0,padding:1,SearchInput:!0,emptySelect:!0,SelectorComponent:({option:l,isSelected:c,isFocused:u,addCallback:d})=>l.type=="selector"?a(j.Button.Sub.S,{color:"cloud",backgroundColor:"trans",borderRadius:0,fontColor:"2.normal",textAlign:"left",padding:["1/2",1.5],isActive:c||u,isActiveStyles:u?{backgroundColor:"cloud"}:{backgroundColor:"theme.opa.few",fontColor:"theme"},onClick:i=>{d()},children:a(E.Supplement,{paddingLeft:c?"1/2":0,transition:"short",children:l.label})}):a(J,{children:l.label}),SelectedComponent:({value:l,label:c,removeCallback:u})=>F(z.Left,{ssCardBox:"cloud",backgroundColor:"layer.3",borderRadius:"2.tone.secondary",fontSize:"1.mini",padding:"1/2",gap:0,children:[a(T,{padding:[0,"1/4"],children:c}),a(j.Button.Sub.R,{color:"cloud",fontColor:"white",backgroundColor:"layer.6",isRounded:!0,padding:"1/4",onClick:u,children:a(M.Times,{ssSphere:1})})]},"test")},t),{freeCSS:f({cursor:"pointer"},t.freeCSS)}),t.multiSelect||(t.min=1,t.max=1),t.options=t.options||[],t.emptySelect&&(t.options=[{value:null,label:a(E.Supplement,{fontColor:"4.thin",children:"\u9078\u629E\u3092\u89E3\u9664"})},...t.options]);let o=[];return t.value=r.flatArray(t.value||null),t.value.forEach((l,c)=>{o.push(r.JsonTo(l))}),t.value=o,t.options=R.InitOptions(t.options),r.is.nullish(t.rightIcon)&&(t.rightIcon=a(Q,{freeCSS:{pointerEvents:"none"},children:a(M.Search,{})}),t.disabled&&(t.rightIcon=a(Q,{fontColor:"5.translucent",freeCSS:{pointerEvents:"none"},children:a(M.Ban,{})}))),t.rightIcon&&(t=f({paddingRight:3},t)),t.leftIcon&&(t=f({paddingLeft:3},t)),a(ne,{componentID:t.componentID,children:w.Core,states:ee(ie.Boxish(t))})};export{Y as Autocomplete,Y as default};
1
+ import{b as v,c as D,d as j,e as Q}from"../../chunk-C5N2D3ZX.js";import{Fragment as H,jsx as l,jsxs as U}from"react/jsx-runtime";import{useState as b,useEffect as w,useRef as ae}from"react";import r from"@mingoo/jsmin";import{ExtractStyles as ne,useStore as Y}from"../../@utils";import{Box as R,Span as re,FAI as q,Column as ie}from"../../atoms";import{Text as B,Row as G}from"../../mols";import Z from"../Button";import{Loader as se}from"../Loader";import{Sheet as K}from"../Sheet";import{OptionalInputWrapper as ue,BoxWrapper as ce,CoreEffects as N,DefaultStyles as pe}from"./core";import{InputAutocompleteClasses as L}from"../../@styles/componentClasses";import{InputLabel as de}from"./Label";import{RightIcon as ee}from".";function me(t){let{value:e,states:a}=t,{required:o,options:c,min:u,max:S}=a;u=u||0,S=S||65535;let n=[],i=e.filter(m=>m!=="null").length;return o&&(i||n.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"})),i<u&&n.push({type:"invalid",label:u+"\u500B\u4EE5\u4E0A\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044"}),i>S&&n.push({type:"invalid",label:S+"\u500B\u307E\u3067\u9078\u629E\u3067\u304D\u307E\u3059"}),{ok:!n.filter(({type:m})=>m=="invalid").length,notice:n}}const A={InitOptions:t=>{let e=[];return t.forEach(a=>{let{type:o,label:c,value:u,searchValue:S}=a,n=S||(r.is.string(c)?c:"")||(r.is.string(u)?u:"");e.push(D(v({},a),{searchValue:n,type:o||"selector",value:r.JsonTo(u)}))}),e},FilterSelectableOptions:(t,e)=>{let a=t.val_options;if(e||(a=t.val_options.filter(o=>o.type!="label")),t.val_keyword){let o=t.val_keyword.toLower().replace(/ /g,"");a=a.filter(c=>(c.searchValue||"").toLower().replace(/ /g,"").includes(o))}return a}},F={Shallow:t=>{let{rootStates:e,val_status:a}=t,o=ne(e);return l(R,{position:"absolute",top:0,left:0,right:0,height:0,overflow:"hidden",opacity:"trans",freeCSS:{zIndex:3,pointerEvents:"none"},children:l(B.Description,D(v({className:e.className},o),{position:"absolute",width:1,freeCSS:D(v({},o.freeCSS),{color:"orange"}),"data-id":"shallow_"+a.componentID,children:l(R,{"data-input-value-shallow":a.componentID,children:"A"})}))})},Button:t=>{let{rootStates:e,val_keyword:a,set_keyword:o,val_optionFocused:c,set_optionFocused:u,val_options:S,set_options:n,val_optionsDict:i,set_optionsDict:m,val_preventOpenSelectorOnFocus:s,set_preventOpenSelectorOnFocus:p,val_selectorOpen:f,set_selectorOpen:y,val_status:d,set_status:_,val_validate:I,set_validate:V}=t,X=e,{tone:C,required:g,form:T,className:x,multiSelect:P,enableFormSubmit:E,checkValidationAtFirst:z,onValidate:J,onUpdateValue:W,onUpdateValidValue:fe,value:Se="",options:ve,leftIndicator:he,rightIndicator:ye,leftIcon:_e,rightIcon:Ie,componentID:ge,status_id:be,wrapStyles:Oe,emptySelect:De,SearchInput:Ve,SearchInputPlaceholder:Ce,SelectedComponent:we,SelectorComponent:ke,SelectorGravityPoint:xe,DynamicOptionsOnSearch:Re}=X,k=j(X,["tone","required","form","className","multiSelect","enableFormSubmit","checkValidationAtFirst","onValidate","onUpdateValue","onUpdateValidValue","value","options","leftIndicator","rightIndicator","leftIcon","rightIcon","componentID","status_id","wrapStyles","emptySelect","SearchInput","SearchInputPlaceholder","SelectedComponent","SelectorComponent","SelectorGravityPoint","DynamicOptionsOnSearch"]);w(()=>{var O;if(e.disabled||!f)return;let h=A.FilterSelectableOptions(t);u(((O=h[0])==null?void 0:O.value)||null)},[a]),w(()=>{d.eventType!="init"&&(e.max==d.dataValue.length?(y(!1),p(!0),setTimeout(()=>{let h=r('[data-input-origin="'+e.componentID+'"]');h&&h.focus()},10)):r("#SearchInput_"+e.componentID).focus())},[d.dataValue]);let M="autocomplete-sheet-"+e.componentID;return w(()=>{let h="autocomplete-click-"+e.componentID;if(f){let O=r('[data-input-origin="'+e.componentID+'"]');if(!O)return;r("#SearchInput_"+e.componentID).focus(),K.open({sheetID:M,type:"custom",parent:O[0],padding:["1/4",0],gravityPoint:e.SelectorGravityPoint||22,close_option:{aroundClick:!1},content:l(F.Selector,v({},t))}),r(document).addEvent({eventID:h,eventType:"click",callback:oe=>{let $=r(oe.target),le=!!r($).parent("."+L("Core")).length;r($).parent("."+L("Selector")).length||le||y(!1)}})}else r(document).removeEvent([h]),o(""),K.close(M)},[f]),w(()=>{if(e.disabled||!f)return;K.customSheet.reposition(M);let h=Y.get("refresh-autocomplete-selector-"+e.componentID);h&&h(t)},[S,d.dataValue,a,c]),l(H,{children:l(R,D(v({tabIndex:0},k),{"data-disabled":e.disabled,"data-name":e.name,"data-value":r.JsonTo(d.dataValue),"data-form":T,"data-show-validation":N.isShowValidation(I,d,!!z),"data-validation":I.ok,"data-component-id":d.componentID,"data-input-origin":d.componentID,"data-focus":!!f,"data-input-type":"autocomplete-"+(P?"multi":"single"),className:[x,L("Core")].join(" "),onFocus:h=>{if(k!=null&&k.onFocus&&(k==null||k.onFocus(h)),!e.disabled&&!e.disabled){if(s)return p(!1);y(!0)}},onKeyDown:h=>{let{key:O}=h;E&&N.SubmitForm(h),!f&&(O==" "||O=="ArrowDown"||O=="ArrowUp"||O=="Enter")&&y(!0)},children:U(G.Left,{flexWrap:!0,gap:"1/3",freeCSS:{letterSpacing:".5px"},children:[l(F.Selected,v({},t)),l(re,{width:0,overflow:"hidden",opacity:"trans",children:"A"}),l(F.SearchInput,v({},t))]})}))})},SearchInput:t=>{let{rootStates:e}=t;return e.disabled||!t.val_selectorOpen?null:l(R,{id:"SearchInput_"+e.componentID,placeholder:e.SearchInputPlaceholder||"\u691C\u7D22...",opacity:t.val_selectorOpen?"max":"trans","data-form":e.form,transition:"middle",flexSizing:0,htmlTag:"input",border:"unset",backgroundColor:"trans",value:t.val_keyword,freeCSS:{outline:"none"},onKeyDown:a=>{let{key:o,metaKey:c,ctrlKey:u}=a,S=c||u;o=="Escape"?(t.set_selectorOpen(!1),t.set_preventOpenSelectorOnFocus(!0),setTimeout(()=>{let n=r('[data-input-origin="'+e.componentID+'"]');n&&n.focus()},10)):o=="Tab"?t.set_selectorOpen(!1):o==" "?r.scope(()=>{t.val_selectorOpen||t.val_keyword||(a.preventDefault(),t.set_selectorOpen(!0))}):o=="Backspace"?r.scope(()=>{if(t.val_keyword)return;let n=[...t.val_status.dataValue];n.pop(),t.set_status(i=>D(v({},i),{dataValue:n,eventType:"update",eventID:r.uuid.gen()}))}):o=="Enter"&&r.scope(()=>{if(!t.val_selectorOpen)return t.set_selectorOpen(!0);if(!t.val_optionFocused)return;let n=t.val_options.find(m=>m.value==t.val_optionFocused);if(!n)return;let{value:i}=n;t.set_status(m=>{let s=[...m.dataValue];return r.scope(()=>{if(i==="null")return s=[];m.dataValue.includes(i)?s=s.filter(f=>f!==i):e.multiSelect?s.push(i):s=[i]}),D(v({},m),{dataValue:s,eventType:"update",eventID:r.uuid.gen()})}),t.set_keyword("")}),r.scope(()=>{if(!["ArrowDown","ArrowUp"].includes(o))return;if(a.preventDefault(),!t.val_selectorOpen)return t.set_selectorOpen(!0);let n=o=="ArrowDown"?1:-1,i=A.FilterSelectableOptions(t),m=i.length-1,s=null;r.scope(()=>{var p,f,y,d;if(n==1){if(s=((p=i[0])==null?void 0:p.value)||null,t.val_optionFocused==null)return;if(S){s=i[m].value||s||null;return}let _=i.findIndex(I=>I.value==t.val_optionFocused);if(_==-1)return;s=((f=i[_+1])==null?void 0:f.value)||s||null}else{if(s=i[m].value||null,t.val_optionFocused==null)return;if(S){s=((y=i[0])==null?void 0:y.value)||s||null;return}let _=i.findIndex(I=>I.value==t.val_optionFocused);if(_==-1)return;s=((d=i[_-1])==null?void 0:d.value)||s||null}}),t.set_optionFocused(s)}),e.enableFormSubmit&&N.SubmitForm(a)},onChange:a=>{let c=a.target.value;t.set_keyword(c)}},"searchInput")},Selector:t=>{let[e,a]=b(t),{rootStates:o}=e,[c,u]=b("idle"),[S,n]=b("idle");w(()=>{Y.set({["refresh-autocomplete-selector-"+o.componentID]:p=>{a(p)}})},[]),w(()=>{if(!e.val_selectorOpen||!o.DynamicOptionsOnSearch)return;if(c=="idle")return u("ok");n("fetch");let p="autocomplete-search-"+o.componentID;r.interval.clear(p),r.interval.standBy(p,300,()=>Q(void 0,null,function*(){let f=yield o.DynamicOptionsOnSearch(e.val_keyword);n("idle");let y=A.InitOptions(f||[]);e.set_options(y)}))},[e.val_keyword]);let i=[],m=A.FilterSelectableOptions(e,!0),s=A.FilterSelectableOptions(e);return m.forEach((p,f)=>{let{type:y,value:d}=p,_=e.val_optionFocused==d,I=e.val_status.dataValue.includes(d),V=o.SelectorComponent;i.push(l(V,{option:p,isFocused:_,isSelected:I,addCallback:()=>{e.set_status(C=>{let g=[...C.dataValue];return r.scope(()=>{if(d==="null")return g=[];C.dataValue.includes(d)?g=g.filter(x=>x!==d):o.multiSelect?g.push(d):g=[d]}),D(v({},C),{dataValue:g,eventType:"update",eventID:r.uuid.gen()})})}},String(d)||r.uuid.gen()))}),s.length||(i=[l(B.Supplement,{padding:[0,1],fontColor:"4.thin",children:"\u5019\u88DC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093"},"no-selector-notice")]),S=="fetch"&&(i=[U(G.Left,{padding:1,fontColor:"3.blur",children:[l(se.Theme.R,{showInitial:!0}),l(B.Supplement,{children:"Loading..."})]},"loader")]),l(K.Body,{className:L("Selector"),ssCardBox:!0,borderRadius:"3.tone.tertiary",boxShadow:"1.normal",freeCSS:{minWidth:12*18},children:l(ie,{gap:0,padding:[1,0],children:i})})},Selected:t=>{let{rootStates:e,val_status:a,set_status:o,val_optionsDict:c}=t,u=[];return a.dataValue.forEach(S=>{let n=c[String(S)];if(!n)return;let i=e.SelectedComponent,m=n.label;n.value==="null"&&(m=""),u.push(l(R,{className:L("SelectedCell"),children:l(i,{value:n.value,label:m,children:m,removeCallback:s=>{if(s.stopPropagation(),s.preventDefault(),e.disabled)return;let p=[...a.dataValue];p=p.filter(f=>f!==S),o(f=>D(v({},f),{dataValue:p,eventType:"update",eventID:r.uuid.gen()}))}})},String(n.value)))}),l(H,{children:u})},Core:t=>{let{onUpdateValue:e,onUpdateValidValue:a,value:o}=t,c={componentID:t.componentID||"",dataValue:o,eventType:"init",eventID:r.uuid.gen()},[u,S]=b(!1),[n,i]=b(!1),[m,s]=b(""),[p,f]=b(t.options),[y,d]=b(t.value[0]||null),[_,I]=b({}),[V,C]=b(c),[g,T]=b({ok:!1,notice:[]}),x=ae(!1);w(()=>{x.current?f(t.options):x.current=!0},[t.options]),w(()=>{if(!p.length)return;let z=[...p],J=v({},_);z.forEach(W=>{W.type!="label"&&(J[String(W.value)]=W)}),I(J)},[p]);let P={rootStates:t,val_options:p,set_options:f,val_optionFocused:y,set_optionFocused:d,val_optionsDict:_,set_optionsDict:I,val_preventOpenSelectorOnFocus:u,set_preventOpenSelectorOnFocus:S,val_selectorOpen:n,set_selectorOpen:i,val_keyword:m,set_keyword:s,val_status:V,set_status:C,val_validate:g,set_validate:T};N.CommonEffects({type:"autocomplete",states:t,val_status:V,set_status:C,val_validate:g,set_validate:T,onUpdateValue:e,onUpdateValidValue:a,DefaultValidation:me,ExtraOverrideStates:{dataValue:o,formatValue:o}});let E=V.dataValue.length&&V.dataValue[0]!=="null";return E=E||n,U(ce,{val_status:V,set_status:C,val_validate:g,states:t,children:[l(de,{componentID:t.componentID,fontSize:t.fontSize,required:t.required,label:t.label,isActive:E}),l(F.Shallow,v({},P)),l(F.Button,v({},P))]})}},te=t=>{let e=v({},t);e=D(v({value:[],min:0,max:65535,multiSelect:!0,padding:1,SearchInput:!0,emptySelect:!0,SelectorComponent:({option:o,isSelected:c,isFocused:u,addCallback:S})=>o.type=="selector"?l(Z.Button.Sub.S,{color:"cloud",backgroundColor:"trans",borderRadius:0,fontColor:"2.normal",textAlign:"left",padding:["1/2",1.5],isActive:c||u,isActiveStyles:u?{backgroundColor:"cloud"}:{backgroundColor:"theme.opa.few",fontColor:"theme"},onClick:n=>{S()},children:l(B.Supplement,{paddingLeft:c?"1/2":0,transition:"short",children:o.label})}):l(H,{children:o.label}),SelectedComponent:({value:o,label:c,removeCallback:u})=>U(G.Left,{ssCardBox:"cloud",backgroundColor:"layer.3",borderRadius:"2.tone.secondary",fontSize:"1.mini",padding:"1/2",gap:0,children:[l(R,{padding:[0,"1/4"],children:c}),l(Z.Button.Sub.R,{color:"cloud",fontColor:"white",backgroundColor:"layer.6",isRounded:!0,padding:"1/4",onClick:u,children:l(q.Times,{ssSphere:1})})]},"test")},e),{freeCSS:v({cursor:"pointer"},e.freeCSS)}),e.multiSelect||(e.min=1,e.max=1),e.options=e.options||[],e.emptySelect&&(e.options=[{value:null,label:l(B.Supplement,{fontColor:"4.thin",children:"\u9078\u629E\u3092\u89E3\u9664"})},...e.options]);let a=[];return e.value=r.flatArray(e.value||null),e.value.forEach((o,c)=>{a.push(r.JsonTo(o))}),e.value=a,e.options=A.InitOptions(e.options),r.is.nullish(e.rightIcon)&&(e.rightIcon=l(ee,{freeCSS:{pointerEvents:"none"},children:l(q.Search,{})}),e.disabled&&(e.rightIcon=l(ee,{fontColor:"5.translucent",freeCSS:{pointerEvents:"none"},children:l(q.Ban,{})}))),e.rightIcon&&(e=v({paddingRight:3},e)),e.leftIcon&&(e=v({paddingLeft:3},e)),l(ue,{componentID:e.componentID,children:F.Core,states:pe.Boxish(e)})};export{te as Autocomplete,te as default};
@@ -16,7 +16,7 @@ declare namespace List {
16
16
  minSelect?: number;
17
17
  disabled?: boolean;
18
18
  value?: any | any[];
19
- options: Options[];
19
+ options: Option[];
20
20
  hideInput?: boolean;
21
21
  cellStyles?: StyleTags.PropsNFreeCSS;
22
22
  cellClassName?: string;
@@ -27,7 +27,7 @@ declare namespace List {
27
27
  type: Type;
28
28
  tone: Tone;
29
29
  };
30
- type Options = {
30
+ type Option = {
31
31
  value: any;
32
32
  label: ReactElement;
33
33
  disabled?: boolean;
@@ -1 +1 @@
1
- import{b as o,c as p,d as P}from"../../chunk-C5N2D3ZX.js";import{jsx as a,jsxs as oe}from"react/jsx-runtime";import{useState as Y}from"react";import y from"@mingoo/jsmin";import{$$fromRoot as ae,GenerateHTMLProps as ne}from"../../@utils";import{Box as T,Flex as se,Label as ie,FAI as re}from"../../atoms";import Z from"../Button";import{OptionalInputWrapper as de,BoxWrapper as ce,CoreEffects as ee}from"./core";import ue from"./Hidden";import{InputListClasses as I}from"../../@styles/componentClasses";function me(t){let{value:l,states:s}=t,{type:e,required:u,minSelect:n=0}=s,i=[];return u&&(l.length||e=="radio"&&i.push({type:"invalid",label:"\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093"})),n&&l.length<n&&i.push({type:"invalid",label:`${n}\u500B\u4EE5\u4E0A\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044`}),{ok:!i.filter(({type:d})=>d=="invalid").length,notice:i}}const L={OptionalListWrapper:t=>{let{value:l,options:s=[]}=t,e=y.is.exist(l)?y.flatArray(l):[],u=s.map(i=>{let{value:d,label:h}=i;return p(o({},i),{value:JSON.stringify(d),label:h})}),n=[];return e.forEach(i=>{let d=JSON.stringify(i);u.findIndex(D=>D.value==d)!=-1&&n.push(d)}),a(L.Core,p(o({},t),{value:n,options:u}))},Core:t=>{let R=t,{type:l,tone:s,required:e,componentID:u="",form:n,override:i,icon:d,iconType:h,CustomIcon:D,enableFormSubmit:M,checkValidationAtFirst:J,onValidate:w,onUpdateValue:g,onUpdateValidValue:_,value:B,options:W,className:k,cellStyles:$,cellClassName:X,cellCheckedStyles:q,cellCheckedClassName:H,minSelect:U,hideInput:z,freeCSS:F,wrapStyles:m}=R,x=P(R,["type","tone","required","componentID","form","override","icon","iconType","CustomIcon","enableFormSubmit","checkValidationAtFirst","onValidate","onUpdateValue","onUpdateValidValue","value","options","className","cellStyles","cellClassName","cellCheckedStyles","cellCheckedClassName","minSelect","hideInput","freeCSS","wrapStyles"]),S={componentID:u,dataValue:B,eventType:"init",eventID:y.uuid.gen()},[f,C]=Y(S),[v,K]=Y({ok:!1,notice:[]});return ee.CommonEffects({type:"list",states:t,val_status:f,set_status:C,val_validate:v,set_validate:K,onUpdateValue:g,onUpdateValidValue:_,DefaultValidation:me}),oe(ce,{val_status:f,set_status:C,val_validate:v,states:t,children:[a(ue,p(o({"data-value":JSON.stringify(f.dataValue),form:n,"data-input-type":l,"data-validation":v.ok},x),{componentID:f.componentID})),a(L.List,{rootStates:t,val_status:f,set_status:C})]})},List:t=>{let{rootStates:l,val_status:s,set_status:e}=t,{componentID:u,type:n,tone:i,icon:d=!0,options:h,name:D,form:M,tabIndex:J,hideInput:w,disabled:g,className:_,cellStyles:B,cellClassName:W="",cellCheckedStyles:k,cellCheckedClassName:$="",enableFormSubmit:X}=l,{dataValue:q}=s,H=l.CustomIcon,U=h.map((z,F)=>{let Q=z,{value:m,label:x,disabled:S,className:f="",checkedStyles:C,checkedClassName:v="",freeCSS:K}=Q,R=P(Q,["value","label","disabled","className","checkedStyles","checkedClassName","freeCSS"]),j=y.uuid.gen(),V=q.findIndex(r=>r===m)!=-1,b=o(o({},B),R),O=[I("Label"),W,f];V&&(b=p(o(o(o({},b),k),C),{freeCSS:o(o(o({},b==null?void 0:b.freeCSS),k==null?void 0:k.freeCSS),C==null?void 0:C.freeCSS)}),O=[...O,$,v]);const G=()=>{if(g||S)return;let r=[];if(n=="radio")r=[m];else if(n=="checkbox"||n=="checker")if(!V)r=[...s.dataValue,m];else{let c=[...s.dataValue];c.splice(s.dataValue.findIndex(E=>E==m),1),r=c}e(c=>p(o({},c),{dataValue:r,eventType:"update",eventID:y.uuid.gen()}))};return[a(T,{htmlTag:"input",type:n=="radio"?"radio":"checkbox",className:I("Input"),name:"RadioCheckbox-"+D,"data-list-index":u+"-"+F,id:j,value:String(m),"data-form-name":M,disabled:g||S,checked:V,onFocus:r=>{S||n=="radio"&&(s.dataValue.length||e(c=>p(o({},c),{dataValue:[m],eventType:"update",eventID:y.uuid.gen()})))},onChange:()=>{G()},onKeyDown:r=>{let{key:c,shiftKey:E}=r;if((n=="checkbox"||n=="checker")&&c!="Tab"){if(c.match(/Arrow/)){r.preventDefault();let le=["ArrowLeft","ArrowUp"].includes(c)?-1:1,N=F+le;N<0?N=h.length-1:N>=h.length&&(N=0),ae(`input[data-list-index="${u}-${N}"]`).focus()}}X&&ee.SubmitForm(r)},tabIndex:J},"List-"+JSON.stringify(m)),oe(ie,p(o({"data-disabled":g||S,htmlFor:j,className:O.join(" "),tabIndex:-1,display:"flex",verticalAlign:"center",gap:"1/6",flexWrap:!1},b),{children:[d&&a(H,{isChecked:V,toggle:()=>{G()}}),y.is.string(x)?a(T,{children:x}):x]}),"ListTrigger-"+JSON.stringify(m))]});return a(se,{flexSizing:"auto",style:l.style,freeCSS:o({},l.freeCSS),className:[_,I("CellBase"),I("HideInput_"+w),I("IconIndicator_"+!!d),I("Tone_"+i)].join(" "),children:U})},RadioIcon:t=>a(Z.Button.Normal.R,{ssPushable:!0,color:"cloud",tabIndex:-1,ssEffectsOnActive:"ripple.cloud",ssSphere:3,onClick:l=>{l.preventDefault(),l.stopPropagation(),t.toggle()},children:a(T,{ssSphere:1.5,border:"3.thick",borderWidth:2,borderColor:t.isChecked?"theme":"3.thick",position:"relative",transition:"middle",children:a(T,{position:"absolute",transition:"middle",isRounded:!0,backgroundColor:t.isChecked?"theme":"trans",opacity:t.isChecked?"max":"trans",freeCSS:{width:"60%",height:"60%",transform:t.isChecked?"scale(1)":"scale(.6)"}})})}),CheckboxIcon:t=>a(Z.Button.Normal.R,{ssPushable:!0,color:"cloud",tabIndex:-1,ssEffectsOnActive:"ripple.cloud",ssSphere:3,onClick:l=>{l.preventDefault(),l.stopPropagation(),t.toggle()},children:a(T,{ssSquare:1.5,flexCenter:!0,border:"3.thick",borderWidth:2,borderColor:t.isChecked?"theme":"3.thick",borderRadius:"3.tone.tertiary",position:"relative",backgroundColor:t.isChecked?"theme":"trans",transition:"middle",fontColor:"white",children:a(re.Check,{transition:"middle",opacity:t.isChecked?"max":"trans",freeCSS:{zIndex:8}})})})},A=t=>{t=t||"checkbox";const l=e=>(e=p(o({gap:"1/2",iconType:t=="radio"?"radio":"checkbox"},e),{type:t,cellStyles:o({position:"relative",borderRadius:"2.tone.secondary",transition:"middle"},e.cellStyles)}),e.CustomIcon||(e.iconType=="radio"?e.CustomIcon=L.RadioIcon:e.iconType=="checkbox"&&(e.CustomIcon=L.CheckboxIcon)),e.tone=="normal"?(e.cellStyles=o({padding:["1/4",1],border:"1.thin",isRounded:!0,backgroundColor:"layer.1"},e.cellStyles),e.cellCheckedStyles=o({borderColor:"theme",fontColor:"theme",boxShadow:"1.normal"},e.cellCheckedStyles)):e.tone=="border"?(e.cellStyles=o({paddingRight:1,border:"1.thin",isRounded:!0,backgroundColor:"layer.1"},e.cellStyles),e.cellCheckedStyles=o({borderColor:"theme",fontColor:"theme"},e.cellCheckedStyles)):e.tone=="cloud"&&(e.cellStyles=o({paddingRight:1,isRounded:!0,border:"1.thin",backgroundColor:"layer.2"},e.cellStyles),e.cellCheckedStyles=o({backgroundColor:"cloud",fontColor:"theme"},e.cellCheckedStyles)),e=ne(e),a(de,{componentID:e.componentID,children:L.OptionalListWrapper,states:e})),s=l;return s.Normal=e=>a(l,o({type:t,tone:"normal",icon:!1},e)),s.Border=e=>a(l,o({type:t,tone:"border"},e)),s.Cloud=e=>a(l,o({type:t,tone:"cloud"},e)),s},pe=A("checkbox"),Ce=A("radio"),te=A();export{pe as Checkbox,te as List,Ce as Radio,te as default};
1
+ import{b as o,c as p,d as J}from"../../chunk-C5N2D3ZX.js";import{jsx as a,jsxs as oe}from"react/jsx-runtime";import{useState as Y}from"react";import y from"@mingoo/jsmin";import{$$fromRoot as ae,GenerateHTMLProps as ne}from"../../@utils";import{Box as T,Flex as se,Label as ie,FAI as re}from"../../atoms";import Z from"../Button";import{OptionalInputWrapper as de,BoxWrapper as ce,CoreEffects as ee}from"./core";import ue from"./Hidden";import{InputListClasses as b}from"../../@styles/componentClasses";function me(t){let{value:l,states:n}=t,{type:e,required:u,minSelect:s=0}=n,i=[];return u&&(l.length||e=="radio"&&i.push({type:"invalid",label:"\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093"})),s&&l.length<s&&i.push({type:"invalid",label:`${s}\u500B\u4EE5\u4E0A\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044`}),{ok:!i.filter(({type:d})=>d=="invalid").length,notice:i}}const L={OptionalListWrapper:t=>{let{value:l,options:n=[]}=t,e=y.is.exist(l)?y.flatArray(l):[],u=n.map(i=>{let{value:d,label:h}=i;return p(o({},i),{value:JSON.stringify(d),label:h})}),s=[];return e.forEach(i=>{let d=JSON.stringify(i);u.findIndex(D=>D.value==d)!=-1&&s.push(d)}),a(L.Core,p(o({},t),{value:s,options:u}))},Core:t=>{let V=t,{type:l,tone:n,required:e,componentID:u="",form:s,override:i,icon:d,iconType:h,CustomIcon:D,enableFormSubmit:A,checkValidationAtFirst:M,onValidate:w,onUpdateValue:k,onUpdateValidValue:_,value:B,options:W,className:g,cellStyles:$,cellClassName:X,cellCheckedStyles:q,cellCheckedClassName:H,minSelect:U,hideInput:z,freeCSS:F,wrapStyles:m}=V,x=J(V,["type","tone","required","componentID","form","override","icon","iconType","CustomIcon","enableFormSubmit","checkValidationAtFirst","onValidate","onUpdateValue","onUpdateValidValue","value","options","className","cellStyles","cellClassName","cellCheckedStyles","cellCheckedClassName","minSelect","hideInput","freeCSS","wrapStyles"]),S={componentID:u,dataValue:B,eventType:"init",eventID:y.uuid.gen()},[f,C]=Y(S),[v,K]=Y({ok:!1,notice:[]});return ee.CommonEffects({type:"list",states:t,val_status:f,set_status:C,val_validate:v,set_validate:K,onUpdateValue:k,onUpdateValidValue:_,DefaultValidation:me}),oe(ce,{val_status:f,set_status:C,val_validate:v,states:t,children:[a(ue,p(o({"data-value":JSON.stringify(f.dataValue),form:s,"data-input-type":l,"data-validation":v.ok},x),{componentID:f.componentID})),a(L.List,{rootStates:t,val_status:f,set_status:C})]})},List:t=>{let{rootStates:l,val_status:n,set_status:e}=t,{componentID:u,type:s,tone:i,icon:d=!0,options:h,name:D,form:A,tabIndex:M,hideInput:w,disabled:k,className:_,cellStyles:B,cellClassName:W="",cellCheckedStyles:g,cellCheckedClassName:$="",enableFormSubmit:X}=l,{dataValue:q}=n,H=l.CustomIcon,U=h.map((z,F)=>{let Q=z,{value:m,label:x,disabled:S,className:f="",checkedStyles:C,checkedClassName:v="",freeCSS:K}=Q,V=J(Q,["value","label","disabled","className","checkedStyles","checkedClassName","freeCSS"]),j=y.uuid.gen(),R=q.findIndex(r=>r===m)!=-1,I=o(o({},B),V),O=[b("Label"),W,f];R&&(I=p(o(o(o({},I),g),C),{freeCSS:o(o(o({},I==null?void 0:I.freeCSS),g==null?void 0:g.freeCSS),C==null?void 0:C.freeCSS)}),O=[...O,$,v]);const G=()=>{if(k||S)return;let r=[];if(s=="radio")r=[m];else if(s=="checkbox"||s=="checker")if(!R)r=[...n.dataValue,m];else{let c=[...n.dataValue];c.splice(n.dataValue.findIndex(E=>E==m),1),r=c}e(c=>p(o({},c),{dataValue:r,eventType:"update",eventID:y.uuid.gen()}))};return[a(T,{htmlTag:"input",type:s=="radio"?"radio":"checkbox",className:b("Input"),name:"RadioCheckbox-"+D,"data-list-index":u+"-"+F,id:j,value:String(m),"data-form-name":A,disabled:k||S,checked:R,onFocus:r=>{S||s=="radio"&&(n.dataValue.length||e(c=>p(o({},c),{dataValue:[m],eventType:"update",eventID:y.uuid.gen()})))},onChange:()=>{G()},onKeyDown:r=>{let{key:c,shiftKey:E}=r;if((s=="checkbox"||s=="checker")&&c!="Tab"){if(c.match(/Arrow/)){r.preventDefault();let le=["ArrowLeft","ArrowUp"].includes(c)?-1:1,N=F+le;N<0?N=h.length-1:N>=h.length&&(N=0),ae(`input[data-list-index="${u}-${N}"]`).focus()}}X&&ee.SubmitForm(r)},tabIndex:M},"List-"+JSON.stringify(m)),oe(ie,p(o({"data-disabled":k||S,htmlFor:j,className:O.join(" "),tabIndex:-1,display:"flex",verticalAlign:"center",gap:"1/6",flexWrap:!1},I),{children:[d&&a(H,{isChecked:R,toggle:()=>{G()}}),y.is.string(x)?a(T,{children:x}):x]}),"ListTrigger-"+JSON.stringify(m))]});return a(se,{flexSizing:"auto",style:l.style,freeCSS:o({},l.freeCSS),className:[_,b("CellBase"),b("HideInput_"+w),b("IconIndicator_"+!!d),b("Tone_"+i)].join(" "),children:U})},RadioIcon:t=>a(Z.Button.Normal.R,{ssPushable:!0,color:"cloud",tabIndex:-1,ssEffectsOnActive:"ripple.cloud",ssSphere:3,onClick:l=>{l.preventDefault(),l.stopPropagation(),t.toggle()},children:a(T,{ssSphere:1.5,border:"3.thick",borderWidth:2,borderColor:t.isChecked?"theme":"3.thick",position:"relative",transition:"middle",children:a(T,{position:"absolute",transition:"middle",isRounded:!0,backgroundColor:t.isChecked?"theme":"trans",opacity:t.isChecked?"max":"trans",freeCSS:{width:"60%",height:"60%",transform:t.isChecked?"scale(1)":"scale(.6)"}})})}),CheckboxIcon:t=>a(Z.Button.Normal.R,{ssPushable:!0,color:"cloud",tabIndex:-1,ssEffectsOnActive:"ripple.cloud",ssSphere:3,onClick:l=>{l.preventDefault(),l.stopPropagation(),t.toggle()},children:a(T,{ssSquare:1.5,flexCenter:!0,border:"3.thick",borderWidth:2,borderColor:t.isChecked?"theme":"3.thick",borderRadius:"3.tone.tertiary",position:"relative",backgroundColor:t.isChecked?"theme":"trans",transition:"middle",fontColor:"white",children:a(re.Check,{transition:"middle",opacity:t.isChecked?"max":"trans",freeCSS:{zIndex:8}})})})},P=t=>{t=t||"checkbox";const l=e=>(e=p(o({gap:"1/2",iconType:t=="radio"?"radio":"checkbox"},e),{type:t,cellStyles:o({position:"relative",borderRadius:"2.tone.secondary",transition:"middle"},e.cellStyles)}),e.CustomIcon||(e.iconType=="radio"?e.CustomIcon=L.RadioIcon:e.iconType=="checkbox"&&(e.CustomIcon=L.CheckboxIcon)),e.tone=="normal"?(e.cellStyles=o({padding:["1/4",1],border:"1.thin",isRounded:!0,backgroundColor:"layer.1"},e.cellStyles),e.cellCheckedStyles=o({borderColor:"theme",fontColor:"theme",boxShadow:"1.normal"},e.cellCheckedStyles)):e.tone=="border"?(e.cellStyles=o({paddingRight:1,border:"1.thin",isRounded:!0,backgroundColor:"layer.1"},e.cellStyles),e.cellCheckedStyles=o({borderColor:"theme",fontColor:"theme"},e.cellCheckedStyles)):e.tone=="cloud"&&(e.cellStyles=o({paddingRight:1,isRounded:!0,border:"1.thin",backgroundColor:"layer.2"},e.cellStyles),e.cellCheckedStyles=o({backgroundColor:"cloud",fontColor:"theme"},e.cellCheckedStyles)),e=ne(e),a(de,{componentID:e.componentID,children:L.OptionalListWrapper,states:e})),n=l;return n.Normal=e=>a(l,o({type:t,tone:"normal",icon:!1},e)),n.Border=e=>a(l,o({type:t,tone:"border"},e)),n.Cloud=e=>a(l,o({type:t,tone:"cloud"},e)),n.Vivid=e=>a(l,o({type:t,tone:"normal",icon:!1,cellCheckedStyles:{backgroundColor:"theme",fontColor:"white"}},e)),n.Simple=e=>a(l,o({type:t,tone:"plain",icon:!1,cellCheckedStyles:{fontColor:"theme"}},e)),n},pe=P("checkbox"),Ce=P("radio"),te=P();export{pe as Checkbox,te as List,Ce as Radio,te as default};
@@ -1 +1 @@
1
- import{b as t}from"../../chunk-C5N2D3ZX.js";import{Fragment as l,jsx as e}from"react/jsx-runtime";import{FAI as p}from"../../atoms";import{Autocomplete as c}from"./Autocomplete";import{RightIcon as m}from".";const o=r=>e(c,t({multiSelect:!1,SelectedComponent:({value:u,label:n})=>e(l,{children:n}),rightIcon:e(m,{children:e(p.AngleDown,{})})},r));export{o as Search,o as default};
1
+ import{b as t}from"../../chunk-C5N2D3ZX.js";import{Fragment as l,jsx as e}from"react/jsx-runtime";import{FAI as p}from"../../atoms";import{Autocomplete as c}from"./Autocomplete";import{RightIcon as m}from".";const o=n=>e(c,t({multiSelect:!1,SelectedComponent:({value:u,label:r})=>e(l,{children:r}),rightIcon:e(m,{freeCSS:{pointerEvents:"none"},children:e(p.AngleDown,{})})},n));export{o as Search,o as default};
@@ -5,7 +5,7 @@ declare namespace Segmented {
5
5
  type CoreInput = Segmented.Input & {
6
6
  __sys_segmented_type: Segmented.Tones;
7
7
  };
8
- type ListInput = List.Options[];
8
+ type ListInput = List.Option[];
9
9
  type Input = List.Input;
10
10
  namespace Methods {
11
11
  type Component = {
@@ -3,7 +3,7 @@ import { StyleTags, ReactElement } from '../../@declares';
3
3
  import { KeyValueDict } from '@mingoo/jsmin';
4
4
  import { InputTypes } from '.';
5
5
  declare namespace Select {
6
- type Input = InputTypes.CoreInput<Value | Value[]> & React.DOMAttributes<HTMLInputElement> & {
6
+ type Input = InputTypes.CoreInput<Value> & React.DOMAttributes<HTMLInputElement> & {
7
7
  label?: ReactElement;
8
8
  tone?: InputTypes.BoxTone;
9
9
  tabIndex?: number;
@@ -19,7 +19,7 @@ declare namespace Select {
19
19
  SelectedCellStyles?: StyleTags.PropsNFreeCSS;
20
20
  SelectorCellStyles?: StyleTags.PropsNFreeCSS;
21
21
  SelectorStyles?: StyleTags.PropsNFreeCSS;
22
- gravityPoint?: number;
22
+ SelectorGravityPoint?: number;
23
23
  };
24
24
  type Value = string | number | boolean | KeyValueDict | void | null;
25
25
  type Option = {
@@ -1 +1 @@
1
- import{b as l,c as d,d as U}from"../../chunk-C5N2D3ZX.js";import{Fragment as pe,jsx as o,jsxs as B}from"react/jsx-runtime";import{useState as R}from"react";import v from"@mingoo/jsmin";import{GenerateHTMLProps as X,ExtractStyles as Y}from"../../@utils";import{Box as _,Span as Z,FAI as j,Column as ee}from"../../atoms";import{Text as te,Row as ae}from"../../mols";import le from"../Button";import{OptionalInputWrapper as oe,BoxWrapper as ne,CoreEffects as q,DefaultStyles as se}from"./core";import{InputLabel as ie}from"./Label";import{RightIcon as ue}from".";function re(e){let{value:t,states:n}=e,{required:s,options:u}=n,S=[];return s&&t==="null"&&S.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!S.filter(({type:m})=>m=="invalid").length,notice:S}}const ce={FilterSelectableOptions:(e,t)=>{let n=e.rootStates.options;return t||(n=n.filter(s=>s.type!="label")),n}},F={Shallow:e=>{let{rootStates:t,val_status:n}=e,s=Y(t);return o(_,{position:"absolute",top:0,left:0,right:0,height:0,overflow:"hidden",opacity:"trans",freeCSS:{zIndex:3,pointerEvents:"none"},children:o(te.Description,d(l({className:t.className},s),{position:"absolute",width:1,freeCSS:d(l({},s.freeCSS),{color:"orange"}),children:o(_,{"data-input-value-shallow":n.componentID,children:"A"})}))})},Button:e=>{let{rootStates:t,val_optionFocused:n,set_optionFocused:s,val_validate:u,set_validate:S,val_focus:m,set_focus:r,val_status:i,set_status:b}=e,O=t,{tone:x,required:V,form:g,className:y,enableFormSubmit:T,emptySelect:D,checkValidationAtFirst:w,onValidate:M,onUpdateValue:A,onUpdateValidValue:de,value:Se="",options:J,leftIndicator:fe,rightIndicator:ve,leftIcon:ye,rightIcon:me,componentID:Ie,status_id:be,wrapStyles:ge,SelectedCellStyles:$,SelectorCellStyles:_e,SelectorStyles:Ve,gravityPoint:he}=O,a=U(O,["tone","required","form","className","enableFormSubmit","emptySelect","checkValidationAtFirst","onValidate","onUpdateValue","onUpdateValidValue","value","options","leftIndicator","rightIndicator","leftIcon","rightIcon","componentID","status_id","wrapStyles","SelectedCellStyles","SelectorCellStyles","SelectorStyles","gravityPoint"]),k=[];return i.dataValue!=="null"&&v.scope(()=>{let p=J.find(I=>I.value==i.dataValue);p&&k.push(o(_,d(l({},$),{children:p.label}),String(p.value)))}),o(pe,{children:B("div",d(l({tabIndex:0},a),{"data-disabled":t.disabled,"data-name":t.name,"data-form":g,"data-show-validation":q.isShowValidation(u,i,!!w),"data-validation":u.ok,"data-component-id":i.componentID,"data-input-origin":i.componentID,"data-value":i.dataValue,"data-input-type":"select",className:y,onFocus:p=>{a!=null&&a.onFocus&&(a==null||a.onFocus(p)),!t.disabled&&r(!0)},onBlur:p=>{a!=null&&a.onBlur&&(a==null||a.onBlur(p)),!t.disabled&&r(!1)},onKeyDown:p=>{let{key:I,metaKey:G,ctrlKey:Q}=p,W=G||Q;if(a!=null&&a.onKeyDown&&(a==null||a.onKeyDown(p)),!t.disabled){if(v.scope(()=>{if(!["ArrowDown","ArrowUp"].includes(I))return;p.preventDefault();let C=I=="ArrowDown"?1:-1,c=ce.FilterSelectableOptions(e),P=c.length-1,f=null;v.scope(()=>{var K,L,N,z;if(C==1){if(f=((K=c[0])==null?void 0:K.value)||null,e.val_optionFocused==null)return;if(W){f=c[P].value||f||null;return}let h=c.findIndex(E=>E.value==e.val_optionFocused);if(h==-1)return;f=((L=c[h+1])==null?void 0:L.value)||f||null}else{if(f=c[P].value||null,e.val_optionFocused==null)return;if(W){f=((N=c[0])==null?void 0:N.value)||f||null;return}let h=c.findIndex(E=>E.value==e.val_optionFocused);if(h==-1)return;f=((z=c[h-1])==null?void 0:z.value)||f||null}}),e.set_optionFocused(f)}),I=="Escape")r(!1);else if(I==" "){if(!m)return r(!0)}else if(I=="Enter"){if(!m)return r(!0);if(!n)return;p.preventDefault();let C=e.rootStates.options.find(c=>c.value==e.val_optionFocused);if(!C)return;b(c=>d(l({},c),{dataValue:C.value,eventType:"update",eventID:v.uuid.gen()})),r(!1)}}},children:[B(ae.Left,{flexWrap:!0,gap:"1/3",children:[o(Z,{width:0,overflow:"hidden",opacity:"trans",children:"A"}),k]}),o(F.Selector,l({},e))]}))})},Selector:e=>{var b;let{rootStates:t,val_optionFocused:n,set_optionFocused:s,val_focus:u,set_focus:S,val_status:m,set_status:r}=e,i=[];return t.options.forEach((x,V)=>{let{type:g,value:y,label:T}=x,D=n==y,w=m.dataValue===y;if(g=="button"){i.push(o(le.Button.Sub.S,d(l({tabIndex:u?0:-1,color:"cloud",backgroundColor:"trans",borderRadius:0,fontSize:"inherit",fontColor:"2.normal",textAlign:"left",padding:["1/2",2]},t.SelectorCellStyles),{isActive:w||D,isActiveStyles:D?{backgroundColor:"cloud"}:{backgroundColor:"theme.opa.few",fontColor:"theme"},onClick:M=>{r(A=>d(l({},A),{dataValue:y,eventType:"update",eventID:v.uuid.gen()})),S(!1)},children:o(_,{paddingLeft:D?"1/2":0,transition:"short",children:T})}),String(y)));return}i.push(o(_,{children:T},v.uuid.gen()))}),o(_,d(l({position:"absolute",height:u?"auto":0,top:"100%",left:0,right:0,ssCardBox:!0,marginTop:"1/4",overflow:"auto",transition:"long",borderRadius:"2.tone.secondary",padding:["1/2",0]},t.SelectorStyles),{freeCSS:d(l({zIndex:100,transform:u?"scale(1)":"scale(0.9)",opacity:u?1:0,pointerEvents:u?"all":"none"},(b=t.SelectorStyles)==null?void 0:b.freeCSS),{maxHeight:"90vh"}),children:o(ee,{gap:0,children:i})}))},Core:e=>{let{onUpdateValue:t,onUpdateValidValue:n,value:s}=e,u={componentID:e.componentID||"",dataValue:s,eventType:"init",eventID:v.uuid.gen()},[S,m]=R(!1),[r,i]=R(u),[b,x]=R(e.value||null),[V,g]=R({ok:!1,notice:[]}),y={rootStates:e,val_optionFocused:b,set_optionFocused:x,val_focus:S,set_focus:m,val_status:r,set_status:i,val_validate:V,set_validate:g};return q.CommonEffects({type:"select",states:e,val_status:r,set_status:i,val_validate:V,set_validate:g,onUpdateValue:t,onUpdateValidValue:n,DefaultValidation:re,ExtraOverrideStates:{dataValue:s,formatValue:s}}),B(ne,{val_status:r,set_status:i,val_validate:V,states:e,children:[o(ie,{componentID:e.componentID,fontSize:e.fontSize,required:e.required,label:e.label,isActive:S||r.dataValue!=="null"}),o(F.Shallow,l({},y)),o(F.Button,l({},y))]})}},H=e=>{e=d(l({emptySelect:!0},e),{freeCSS:l({cursor:"pointer"},e.freeCSS)}),e.value=v.JsonTo(e.value||null),e.emptySelect&&(e.options=[{value:null,label:"\u9078\u629E\u3092\u89E3\u9664"},...e.options]),e.options.forEach((n,s)=>{let{type:u,value:S}=n;e.options[s]=d(l({},n),{type:u||"button",value:v.JsonTo(S)})}),v.is.nullish(e.rightIcon)&&(e.rightIcon=o(ue,{children:o(j.AngleDown,{})})),e.rightIcon&&(e=l({paddingRight:3},e)),e.leftIcon&&(e=l({paddingLeft:3},e));let t=X(se.Boxish(e));return o(oe,{componentID:e.componentID,children:F.Core,states:t})};export{H as Select,H as default};
1
+ import{b as u,c as y,d as J}from"../../chunk-C5N2D3ZX.js";import{Fragment as X,jsx as l,jsxs as Q}from"react/jsx-runtime";import{useState as C,useEffect as w}from"react";import s from"@mingoo/jsmin";import{ExtractStyles as ee,useStore as $}from"../../@utils";import{Box as x,Span as te,FAI as le,Column as ae}from"../../atoms";import{Text as k,Row as ne}from"../../mols";import oe from"../Button";import{Sheet as P}from"../Sheet";import{OptionalInputWrapper as re,BoxWrapper as se,CoreEffects as L,DefaultStyles as ie}from"./core";import{InputAutocompleteClasses as B}from"../../@styles/componentClasses";import{InputLabel as ue}from"./Label";import{RightIcon as ce}from".";function pe(e){let{value:t,states:a}=e,{required:r,options:i}=a,I=[];return r&&t==="null"&&I.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!I.filter(({type:b})=>b=="invalid").length,notice:I}}const N={FilterSelectableOptions:(e,t)=>{let a=e.rootStates.options;return t||(a=a.filter(r=>r.type!="label")),a}},R={Shallow:e=>{let{rootStates:t,val_status:a}=e,r=ee(t);return l(x,{position:"absolute",top:0,left:0,right:0,height:0,overflow:"hidden",opacity:"trans",freeCSS:{zIndex:3,pointerEvents:"none"},children:l(k.Description,y(u({className:t.className},r),{position:"absolute",width:1,freeCSS:y(u({},r.freeCSS),{color:"orange"}),children:l(x,{"data-input-value-shallow":a.componentID,children:"A"})}))})},Button:e=>{let{rootStates:t,val_preventOpenSelectorOnFocus:a,set_preventOpenSelectorOnFocus:r,val_optionFocused:i,set_optionFocused:I,val_validate:b,set_validate:f,val_status:d,set_status:h,val_selectorOpen:S,set_selectorOpen:c}=e,U=t,{tone:_,required:V,form:D,className:T,enableFormSubmit:Y,emptySelect:de,checkValidationAtFirst:Z,onValidate:Se,onUpdateValue:fe,onUpdateValidValue:me,value:ve="",options:ye,leftIndicator:Ie,rightIndicator:be,leftIcon:ge,rightIcon:he,componentID:De,status_id:Ce,wrapStyles:_e,SelectedCellStyles:Ve,SelectorCellStyles:Oe,SelectorStyles:xe,SelectorGravityPoint:Re}=U,n=J(U,["tone","required","form","className","enableFormSubmit","emptySelect","checkValidationAtFirst","onValidate","onUpdateValue","onUpdateValidValue","value","options","leftIndicator","rightIndicator","leftIcon","rightIcon","componentID","status_id","wrapStyles","SelectedCellStyles","SelectorCellStyles","SelectorStyles","SelectorGravityPoint"]),K="select-sheet-"+t.componentID;return w(()=>{if(t.disabled)return;let o="select-click-"+t.componentID;if(S){let v=s('[data-input-origin="'+t.componentID+'"]');if(!v)return;P.open({sheetID:K,type:"custom",parent:v[0],padding:["1/4",0],gravityPoint:t.SelectorGravityPoint||22,close_option:{aroundClick:!1},content:l(R.Selector,u({},e))}),s(document).addEvent({eventID:o,eventType:"click",callback:A=>{let F=s(A.target),E=!!s(F).parent("."+B("Core")).length;s(F).parent("."+B("Selector")).length||E||c(!1)}})}else s(document).removeEvent([o]),P.close(K)},[S]),w(()=>{if(d.eventType=="init")return;let o=s('[data-input-origin="'+t.componentID+'"]');o&&o.focus()},[d.dataValue]),w(()=>{if(t.disabled||!S)return;let o=$.get("refresh-select-selector-"+t.componentID);o&&o(e)},[t.options,d.dataValue,i]),l(X,{children:l(x,y(u({tabIndex:0},n),{"data-disabled":t.disabled,"data-name":t.name,"data-form":D,"data-show-validation":L.isShowValidation(b,d,!!Z),"data-validation":b.ok,"data-component-id":d.componentID,"data-input-origin":d.componentID,"data-value":d.dataValue,"data-input-type":"select",className:[T,B("Core")].join(" "),onFocus:o=>{if(n!=null&&n.onFocus&&(n==null||n.onFocus(o)),!t.disabled){if(a)return r(!1);c(!0)}},onClick:o=>{n!=null&&n.onClick&&(n==null||n.onClick(o)),!t.disabled&&c(!0)},onKeyDown:o=>{let{key:v,metaKey:A,ctrlKey:F}=o,E=A||F;if(n!=null&&n.onKeyDown&&(n==null||n.onKeyDown(o)),Y&&L.SubmitForm(o),!t.disabled){if(s.scope(()=>{if(!["ArrowDown","ArrowUp"].includes(v))return;if(o.preventDefault(),!S)return c(!0);let g=v=="ArrowDown"?1:-1,p=N.FilterSelectableOptions(e),q=p.length-1,m=null;s.scope(()=>{var G,z,H,M;if(g==1){if(m=((G=p[0])==null?void 0:G.value)||null,i==null)return;if(E){m=p[q].value||m||null;return}let O=p.findIndex(W=>W.value==i);if(O==-1)return;m=((z=p[O+1])==null?void 0:z.value)||m||null}else{if(m=p[q].value||null,i==null)return;if(E){m=((H=p[0])==null?void 0:H.value)||m||null;return}let O=p.findIndex(W=>W.value==i);if(O==-1)return;m=((M=p[O-1])==null?void 0:M.value)||m||null}}),I(m)}),v=="Escape")c(!1);else if(v=="Tab")c(!1);else if(v=="Backspace")h(g=>y(u({},g),{dataValue:"null",eventType:"update",eventID:s.uuid.gen()}));else if(v==" ")o.preventDefault(),c(!0);else if(v=="Enter"){if(!S)return c(!0);if(!i)return;o.preventDefault();let g=t.options.find(p=>p.value==i);if(!g)return;h(p=>y(u({},p),{dataValue:g.value,eventType:"update",eventID:s.uuid.gen()})),c(!1)}}},children:Q(ne.Left,{flexWrap:!0,gap:"1/3",freeCSS:{letterSpacing:".5px"},children:[l(R.Selected,u({},e)),l(te,{width:0,overflow:"hidden",opacity:"trans",children:"A"})]})}))})},Selector:e=>{let[t,a]=C(e),{rootStates:r}=t;w(()=>{$.set({["refresh-select-selector-"+r.componentID]:f=>{a(f)}})},[]);let i=[],I=N.FilterSelectableOptions(t,!0),b=N.FilterSelectableOptions(t);return I.forEach((f,d)=>{let{type:h,value:S}=f,c=t.val_optionFocused==S,_=t.val_status.dataValue===S;if(h=="selector"){i.push(l(oe.Button.Sub.S,{color:"cloud",backgroundColor:"trans",borderRadius:0,fontColor:"2.normal",textAlign:"left",padding:["1/2",1.5],isActive:_||c,isActiveStyles:c?{backgroundColor:"cloud"}:{backgroundColor:"theme.opa.few",fontColor:"theme"},onClick:V=>{t.set_status(D=>y(u({},D),{dataValue:S,eventType:"update",eventID:s.uuid.gen()})),t.set_selectorOpen(!1),t.set_preventOpenSelectorOnFocus(!0)},children:l(k.Supplement,{paddingLeft:_?"1/2":0,transition:"short",children:f.label})},String(S)));return}i.push(l(x,{children:f.label},s.uuid.gen()))}),b.length||(i=[l(k.Supplement,{padding:[0,1],fontColor:"4.thin",children:"\u5019\u88DC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093"},"no-selector-notice")]),l(P.Body,{className:B("Selector"),ssCardBox:!0,borderRadius:"3.tone.tertiary",boxShadow:"1.normal",freeCSS:{minWidth:12*18},children:l(ae,{gap:0,padding:[1,0],children:i})})},Selected:e=>{let t=[];return e.val_status.dataValue!=="null"&&s.scope(()=>{let a=e.rootStates.options.find(r=>r.value==e.val_status.dataValue);a&&t.push(l(x,y(u({},e.rootStates.SelectedCellStyles),{children:a.label}),String(a.value)))}),l(X,{children:t})},Core:e=>{let{onUpdateValue:t,onUpdateValidValue:a,value:r}=e,i={componentID:e.componentID||"",dataValue:r,eventType:"init",eventID:s.uuid.gen()},[I,b]=C(!1),[f,d]=C(i),[h,S]=C(!1),[c,_]=C(e.value||null),[V,D]=C({ok:!1,notice:[]}),T={rootStates:e,val_preventOpenSelectorOnFocus:I,set_preventOpenSelectorOnFocus:b,val_optionFocused:c,set_optionFocused:_,val_selectorOpen:h,set_selectorOpen:S,val_status:f,set_status:d,val_validate:V,set_validate:D};return L.CommonEffects({type:"select",states:e,val_status:f,set_status:d,val_validate:V,set_validate:D,onUpdateValue:t,onUpdateValidValue:a,DefaultValidation:pe,ExtraOverrideStates:{dataValue:r,formatValue:r}}),Q(se,{val_status:f,set_status:d,val_validate:V,states:e,children:[l(ue,{componentID:e.componentID,fontSize:e.fontSize,required:e.required,label:e.label,isActive:f.dataValue!=="null"}),l(R.Shallow,u({},T)),l(R.Button,u({},T))]})}},j=e=>(e=y(u({emptySelect:!0},e),{freeCSS:u({cursor:"pointer"},e.freeCSS)}),e.value=s.JsonTo(e.value||null),e.emptySelect&&(e.options=[{value:null,label:l(k.Supplement,{fontColor:"4.thin",children:"\u9078\u629E\u3092\u89E3\u9664"})},...e.options]),e.options.forEach((t,a)=>{let{type:r,value:i}=t;e.options[a]=y(u({},t),{type:r||"selector",value:s.JsonTo(i)})}),s.is.nullish(e.rightIcon)&&(e.rightIcon=l(ce,{freeCSS:{pointerEvents:"none"},children:l(le.AngleDown,{})})),e.rightIcon&&(e=u({paddingRight:3},e)),e.leftIcon&&(e=u({paddingLeft:3},e)),l(re,{componentID:e.componentID,children:R.Core,states:ie.Boxish(e)}));export{j as Select,j as default};
package/dist/fn/Sheet.js CHANGED
@@ -1 +1 @@
1
- import{b as m,c as I,d as $}from"../chunk-C5N2D3ZX.js";import{jsx as l,jsxs as V}from"react/jsx-runtime";import n from"@mingoo/jsmin";import{useState as O,useEffect as W,useRef as re}from"react";import{$$fromRoot as H,Config as Y,useStore as T}from"../@utils";import{Box as E,Flex as ne,Img as q,FAI as ae,Column as K}from"../atoms";import{Row as Z}from"../mols";import ee from"./Button";import se from"./SwipeView";import ie from"./Input";import{SheetClasses as i}from"../@styles/componentClasses";const y={currentIndex:0,contents:{},addNewSheet:function(t){let e=I(m({sheetGroups:t.sheetGroups||[],backgroundEffect:!0,overwrap:t.type=="custom",hold_state:!1,isOpen:!0},t),{sheetID:t.sheetID||n.uuid.gen(),close_option:m({pageTransit:!0,escapeKeyDown:!0,aroundClick:t.type=="custom"},t.close_option)});if(e.type=="custom"&&(e.parent=e.parent||e.event.currentTarget),this.contents[e.sheetID]){let s=T.get(e.sheetID);s&&s.refresh&&s.refresh(e,!0);return}this.contents[e.sheetID]={isOpen:!0,hold_state:!!e.hold_state,p:e,created_at:n.Time()};let a=T.get("Sheet-"+Y.get().sessionUID);a&&a.refresh()},Wrapper:()=>{let[t,e]=O(n.uuid.gen());W(()=>{T.set({["Sheet-"+Y.get().sessionUID]:{refresh:()=>{e(n.uuid.gen())}}}),n(Y.get().appRoot).addEvent({eventType:"keyup",eventID:"SheetEvent.keyUp",callback:function(s){let{key:p,metaKey:c}=s;if(p=="Escape"||p==","&&c){let h=Object.values(y.contents).filter(d=>d.isOpen);if(!h.length)return;let o=h.reduce((d,w)=>d.created_at.value>w.created_at.value?d:w);M.close(o.p.sheetID,p)}}}).addEvent({eventType:"click",eventID:"SheetEvent.Click",callback:function(s){let p=Object.values(y.contents).filter(o=>o.p.type=="custom");if(!p.length||!!p.find(o=>{let{p:d}=o,w=d.parent,x=s.target,B=H(w)[0];return!!(w==x||B===x||n(B).find(x).length)}))return;let h=s.target;h!=null&&h.closest("."+i("CustomSheet"))||p.forEach(o=>{var d;(d=o.p.close_option)!=null&&d.aroundClick&&M.close(o.p.sheetID)})}})},[]);let a=Object.entries(y.contents).map(([s,p])=>l(E,{id:"Sheet-"+s,children:l(y.Core,m({isOpen:p.isOpen},p.p),s)},s));return l(E,{className:["AMOTIFY_be",i("Wrapper")].join(" "),children:a})},Core:t=>{var G;let[e]=O(n.uuid.gen()),[a,s]=O(t),[p,c]=O(t.isOpen),{type:h,sheetID:o,openAfter:d,closeAfter:w}=a,x=!a.overwrap,B=y.Types[{"normal.topLeft":"Normal","normal.topCenter":"Normal","normal.topRight":"Normal","normal.middleLeft":"Normal","normal.middleCenter":"Normal","normal.middleRight":"Normal","normal.bottomLeft":"Normal","normal.bottomCenter":"Normal","normal.bottomRight":"Normal",image:"Normal","drawer.left":"Edge","drawer.right":"Edge","drawer.bottom":"Bottom",custom:"Custom"}[h]];W(()=>{T.set({[o]:{refresh:(f,r)=>{s(f),c(r!=null?r:!1)},resize:f=>{if(h=="drawer.bottom"){let r=T.get(e);r&&r.resize&&r.resize(f)}else(a.type.includes("normal")||a.type.includes("drawer"))&&s(r=>I(m({},r),{size:f}))},close:f=>{y.contents[o].isOpen=!1,c(!1)},open:()=>{y.contents[o].isOpen=!0,c(!0)}}})}),W(()=>{n.scope(()=>{if(!x||!a.backgroundEffect)return;let f=Object.values(y.contents).filter(b=>b.isOpen&&!b.p.overwrap&&b.p.type!="custom").length,r=H(".AMOTIFY_be_root");if(p){if(r.hasClass(i("FixScroll")))return;let b=n("html"),C=0;f==1&&(C=b[0].scrollTop|0,s(v=>I(m({},v),{bodyScrolls:C}))),Y.get().isPhone||(b[0].scrollTop=0,r.addClass(i("FixScroll")).callback(v=>{v[0].scrollTop=C}).await(40).addClass(i("Float")));return}Y.get().isPhone||f==0&&r.hasClass(i("FixScroll"))&&r.removeClass(i("Float")).await(251).removeClass(i("FixScroll")).callback(()=>{n("html")[0].scrollTop=a.bodyScrolls||0,r[0].scrollTop=0})}),n.scope(()=>{let f=H("#"+e);if(p){f.await(10).removeClass(i("Hide")).await(10).addClass(i("Open")).callback(()=>{let r=y.contents[o];r&&(r.isOpen=!0,d&&d())});return}f.await(10).removeClass(i("Open")).await(251).addClass(i("Hide")).callback(()=>{!w||w();let r=y.contents[o];if(!r||(r.isOpen=!1,a.hold_state))return;delete y.contents[o];let b=T.get("Sheet-"+Y.get().sessionUID);b&&b.refresh()})})},[p]),W(()=>{y.currentIndex++;let{close_option:f}=a;n.scope(()=>{if(!(f!=null&&f.parentBlur))return;let r=n(a.parent);r[0]&&r.addEvent({eventID:"SheetClosation-"+o,eventType:"mouseout",callback:()=>{r.removeEvent("SheetClosation-"+o),c(!1)}})})},[]);let[_,F]=h.split(".");return l(E,{className:[i("Wrap"),i("Tcate_"+_),i("Tpos_"+F),i("isNewSheet_"+x)].join(" "),width:1,height:0,ssAbsoluteCovered:!0,freeCSS:{zIndex:y.currentIndex+1},id:e,children:V(K,{className:i("Content"),gap:0,height:"viewHeight",overflow:"auto",transition:"middle",children:[!!x&&l(y.TapSensor,{sheetID:o,delegateAroundClick:(G=a.close_option)==null?void 0:G.aroundClick}),l(B,m({componentID:e},a))]})},e)},Types:{Normal:t=>{let N=t,{sheetID:e,sheetGroups:a,bodyScrolls:s,content:p,className:c="",type:h,size:o="R",freeCSS:d,openAfter:w,closeAfter:x,close_option:B,hold_state:_,overwrap:F,isOpen:G,backgroundEffect:f}=N,r=$(N,["sheetID","sheetGroups","bodyScrolls","content","className","type","size","freeCSS","openAfter","closeAfter","close_option","hold_state","overwrap","isOpen","backgroundEffect"]),[b,C]=h.split("."),v={},k=[];return C.match(/top/)?(k.push("top"),v.marginBottom="auto"):C.match(/middle/)?(k.push("center"),v.marginTop="auto",v.marginBottom="auto"):C.match(/bottom/)&&(k.push("bottom"),v.marginTop="auto"),C.match(/left/i)?(k.push("left"),v.marginRight="auto"):C.match(/center/i)?(k.push("center"),v.marginLeft="auto",v.marginRight="auto"):C.match(/right/i)&&(k.push("right"),v.marginLeft="auto"),l(E,I(m(m({className:[i("BB"),c].join(" "),padding:1,transition:"long",opacity:"trans"},r),v),{freeCSS:m({width:{S:"26rem",R:"36rem",L:"44rem","2L":"60rem","3L":"72rem",MAX:"100vw"}[o],maxWidth:"96vw",transformOrigin:k.join(" ")},d),children:n.is.function(p)?l(p,{}):p}))},Edge:t=>{let r=t,{sheetID:e,sheetGroups:a,bodyScrolls:s,type:p,content:c,className:h="",size:o="R",openAfter:d,closeAfter:w,close_option:x,hold_state:B,overwrap:_,isOpen:F,backgroundEffect:G}=r,f=$(r,["sheetID","sheetGroups","bodyScrolls","type","content","className","size","openAfter","closeAfter","close_option","hold_state","overwrap","isOpen","backgroundEffect"]);return l(E,I(m(I(m({className:[i("BB"),h].join(" ")},p=="drawer.right"?{marginLeft:"auto"}:p=="drawer.left"?{marginRight:"auto"}:{}),{opacity:"trans",transition:"long",position:"relative",backgroundColor:"layer.1",flexSizing:"none",minHeight:"viewHeight",boxShadow:"3.remark"}),f),{freeCSS:m({width:{S:"20rem",R:"27rem",L:"32rem","2L":"40rem","3L":"58rem",MAX:"100vw"}[o],maxWidth:"96vw"},f.freeCSS),children:n.is.function(c)?l(c,{}):c}))},Bottom:t=>{let X=t,{componentID:e,sheetID:a,sheetGroups:s,bodyScrolls:p,content:c,size:h="R",sizeChanged:o,baseStyles:d,openAfter:w,closeAfter:x,close_option:{swipeDown:B=!0}={},hold_state:_,overwrap:F,isOpen:G,backgroundEffect:f}=X,r=$(X,["componentID","sheetID","sheetGroups","bodyScrolls","content","size","sizeChanged","baseStyles","openAfter","closeAfter","close_option","hold_state","overwrap","isOpen","backgroundEffect"]),b=n.getScreenSize(),C=[0,.2,.6,.95],v={ZERO:0,S:1,R:2,L:3},[k,N]=O(h),[P,j]=O({process:!1,processStart:0,originY:0,originValue:0,viewHeight:0,value:C[v[h]]});T.update({[e]:{val_edit:P,resize:D=>{let S=C[v[D]];j(u=>I(m({},u),{value:S})),N(D)}}});const A={Start:D=>{n(document).addEvent({eventID:"BottomSheetMouseMove",eventType:"mousemove",callback:A.Move}).addEvent({eventID:"BottomSheetTouchMove",eventType:"touchmove",callback:A.Move}).addEvent({eventID:"BottomSheetMouseUp",eventType:"mouseup",callback:A.End}).addEvent({eventID:"BottomSheetTouchEnd",eventType:"touchend",callback:A.End});let S=n.getCursor(D),u=I(m({},P),{process:!0,processStart:new Date().getTime(),originY:S.y,originValue:P.value,viewHeight:n.getScreenSize().height});T.update({[e]:{val_edit:u}}),j(u)},Move:D=>{var z;let S=(z=T.get(e))==null?void 0:z.val_edit;if(!S.process)return;let L=(n.getCursor(D).y-S.originY)/S.viewHeight,g=S.originValue-L;if(g>.95)g=.95+(g-.95)*.5;else if(g<.2){let R=.2-g;R-=.1,g=.1+(.1-R)*.5}j(I(m({},S),{value:g}))},End:D=>{var g;let S=(g=T.get(e))==null?void 0:g.val_edit;if(!S.process)return;n(document).removeEvent(["BottomSheetMouseMove","BottomSheetTouchMove","BottomSheetMouseUp","BottomSheetTouchEnd"]);let u=0;if(S.value<.1||(S.value<.5?u=1:S.value>.75?u=3:u=2),new Date().getTime()-S.processStart<300){let z=n.getCursor(D).y-S.originY;if(Math.abs(z)>=20){let R=+(z<0)*2-1;u+=R,u=Math.min(Math.max(u,0),C.length-1)}}u==0&&(B||(u=1)),N(["ZERO","S","R","L"][u]),j(I(m({},S),{value:C[u],process:!1}))}},U=re(!1);return W(()=>{U.current?k=="ZERO"?B&&M.close(a):setTimeout(()=>{t.sizeChanged&&t.sizeChanged(k)},250):U.current=!0},[k]),l(E,{className:i("BB"),margin:[0,"auto"],marginTop:"auto",opacity:"trans",width:1,transition:"long",freeCSS:m({maxWidth:12*60,height:b.height*P.value},P.process?{transition:"0s"}:{}),children:V(K,I(m({gap:0,flexSizing:"none",borderTopLeftRadius:"1.tone.primary",borderTopRightRadius:"1.tone.primary",border:!0,borderBottom:"unset",boxShadow:"3.remark",position:"relative",overflow:"hidden",height:1},d),{children:[l(Z.Separate,{padding:"1/2",backgroundColor:"layer.1",position:"relative",freeCSS:{userSelect:"none"},children:l(Z.Center,{onMouseDown:A.Start,onTouchStart:A.Start,flexSizing:0,padding:"2/3",ssPushable:!0,isRounded:!0,freeCSS:{cursor:"grab",userSelect:"none"},children:l(E,{unitWidth:6,unitHeight:"1/2",backgroundColor:"layer.4",isRounded:!0,className:i("DragBar")})})}),l(E,I(m({backgroundColor:"layer.1",flexSizing:0,overflow:"auto"},r),{children:n.is.function(c)?l(c,{}):c}))]}))})},Custom:t=>{let S=t,{sheetID:e,sheetGroups:a,bodyScrolls:s,event:p,parent:c,nextToCursor:h,gravityPoint:o=22,content:d,close_option:w,hold_state:x,openAfter:B,closeAfter:_,overwrap:F,isOpen:G,backgroundEffect:f}=S,r=$(S,["sheetID","sheetGroups","bodyScrolls","event","parent","nextToCursor","gravityPoint","content","close_option","hold_state","openAfter","closeAfter","overwrap","isOpen","backgroundEffect"]),[b]=O(n.uuid.gen()),C=n.is.element(c)||n.is.jsmin(c)?n(c):H(c),v='[data-sheet-id="'+b+'"]',k='[data-sheet-content="'+b+'"]';o=o;let N=o%5||5,P=Math.ceil(o/5);const j={Init:()=>{if(h&&p){let J=n.getScreenSize(),Q=n.getCursor(p);return{top:Q.y-J.pageYOffset,left:Q.x-J.pageXOffset}}let u={},{top:L,right:g,bottom:z,left:R,height:te,width:oe}=C.position();return[1,2].includes(N)?u.left=R:N==3?u.left=R+oe/2:[4,5].includes(N)&&(u.left=g),o<=10?u.top=L:o<=15?u.top=L+te/2:o<=25&&(u.top=z),u},Adjust:u=>{let L=H(v).position(),g=H(k).position(),z=n.getScreenSize(),R=m({},u);return g.top<0&&(R.top=L.top-g.top),g.left<0&&(R.left=L.left-g.left),g.right>z.width&&(R.left=L.left-(g.right-z.width)),g.bottom>z.height&&(R.top=L.top-(g.bottom-z.height)),R}};let[A,U]=O("init"),[X,D]=O(j.Init());return W(()=>{H(v).await(10).addClass(i("Open")).await(250).callback(()=>{U("adjust")}),T.update({["customSheet-"+t.sheetID]:{reposition:()=>{U("init")}}})},[]),W(()=>{A=="init"?(D(u=>j.Init()),U("adjust")):A=="adjust"&&D(u=>j.Adjust(u))},[A]),C[0]?l(E,{className:[i("BB"),i("CustomSheet")].join(" "),"data-sheet-id":b,transition:"long",opacity:"trans",position:"absolute",width:0,height:0,flexCenter:!0,freeCSS:X,children:l(ne,{position:"absolute",className:[i("GPT"),i("GPT_"+o),i("Col_"+N),i("Row_"+P)].join(" "),children:l(E,I(m({"data-sheet-content":b,flexSizing:"none",maxHeight:"viewHeight"},r),{freeCSS:m({maxWidth:"98vw"},r.freeCSS),children:n.is.function(d)?l(d,{}):d}))})}):null}},TapSensor:t=>l(E,{className:i("TapSensor"),children:l(ee.Button.Plain,{className:i("TapContent"),onClick:()=>{var e;(e=t.delegateAroundClick)!=null&&e&&M.close(t.sheetID)},freeCSS:{cursor:"default",pointerEvents:"all"}})})},M={Wrapper:()=>l(y.Wrapper,{}),open:t=>{let e=t;if(e.sheetID=(e.sheetID||"").replace(/\./g,"-"),e.type=="image"){let s=e.sheetID||n.uuid.gen(),a=e,{type:p,src:c}=a,h=$(a,["type","src"]);M.open(I(m({type:"normal.topCenter",backgroundColor:"trans"},h),{sheetID:s,freeCSS:{maxWidth:"96vw",transformOrigin:"top"},content:()=>{let[o]=O(n.flatArray(c)),[d,w]=O(0),x=[],B=[];return o.forEach((_,F)=>{x.push({value:F,label:l(q,{src:n.flatArray(_)[0],width:"auto",height:1,freeCSS:{maxWidth:12*6,maxHeight:12*3}})}),B.push(l(q,{width:1,height:"auto",src:n.flatArray(_)[0]}))}),V(K,{gap:0,children:[V(Z.Separate,{gap:2,padding:1,backgroundColor:"layer.1",borderTopLeftRadius:"1.tone.primary",borderTopRightRadius:"1.tone.primary",children:[l(ie.Radio.Border,{icon:!1,value:d,override:"force",horizontalAlign:"center",onUpdateValidValue:({value:_})=>{w(_)},cellStyles:{borderWidth:2,padding:"1/3"},options:x}),l(ee.Button.Border.S,{color:"cloud",isRounded:!0,onClick:()=>{M.close(s)},children:V(Z.Center,{gap:"1/3",children:["\u9589\u3058\u308B",l(ae.Times,{})]})})]}),l(se,{slideIndex:d,options:{loop:o.length>1,onSlideCallback:_=>{w(_)}},slides:B,wrapper:_=>l(E,{borderBottomLeftRadius:"1.tone.primary",borderBottomRightRadius:"1.tone.primary",children:_})})]})}}));return}y.addNewSheet(e)},refresh:(t,e)=>{t.sheetID=(t.sheetID||"").replace(/\./g,"-");let a=T.get(t.sheetID);a&&a.refresh&&a.refresh(t,e)},resize:t=>{t.sheetID=(t.sheetID||"").replace(/\./g,"-");let e=T.get(t.sheetID);e&&e.resize&&e.resize(t.size)},customSheet:{reposition:t=>{let e=T.get("customSheet-"+t);e&&e.reposition&&e.reposition()}},close:function(t,e,a){var p;t=t==null?void 0:t.replace(/\./g,"-");let s=y.contents[t];if(s&&!(e=="Escape"&&!((p=s.p.close_option)!=null&&p.escapeKeyDown))){let{p:c}=s,{sheetID:h}=c,o=T.get(h);o&&o.close&&o.close(a)}},closeGroup:t=>{var e;t=(t||"").replace(/\./g,"-");for(let[a,s]of Object.entries(y.contents))(e=s.p.sheetGroups)!=null&&e.includes(t)&&M.close(a)},closeAll:t=>{var e;for(let[a,s]of Object.entries(y.contents))t&&((e=s.p.close_option)==null?void 0:e.pageTransit)==!1||M.close(a,"pageTransit",!0)},Body:t=>l(E,m({className:i("BaseBody"),backgroundColor:"layer.1",borderRadius:"1.tone.primary",position:"relative",boxShadow:"3.remark",transition:"long"},t))};export{M as Sheet,M as default};
1
+ import{b as g,c as R,d as Y}from"../chunk-C5N2D3ZX.js";import{jsx as u,jsxs as $}from"react/jsx-runtime";import n from"@mingoo/jsmin";import{useState as A,useEffect as X,useRef as te}from"react";import{$$fromRoot as H,Config as U,useStore as _}from"../@utils";import{Box as z,Flex as oe,Img as q,FAI as re,Column as J}from"../atoms";import{Row as K}from"../mols";import ee from"./Button";import ne from"./SwipeView";import se from"./Input";import{SheetClasses as c}from"../@styles/componentClasses";const w={currentIndex:0,contents:{},addNewSheet:function(t){let e=R(g({sheetGroups:t.sheetGroups||[],backgroundEffect:!0,overwrap:t.type=="custom",hold_state:!1,isOpen:!0},t),{sheetID:t.sheetID||n.uuid.gen(),close_option:g({pageTransit:!0,escapeKeyDown:!0,aroundClick:t.type=="custom"},t.close_option)});if(e.type=="custom"&&(e.parent=e.parent||e.event.currentTarget),this.contents[e.sheetID]){let l=_.get(e.sheetID);l&&l.refresh&&l.refresh(e,!0);return}this.contents[e.sheetID]={isOpen:!0,hold_state:!!e.hold_state,p:e,created_at:n.Time()};let a=_.get("Sheet-"+U.get().sessionUID);a&&a.refresh()},Wrapper:()=>{let[t,e]=A(n.uuid.gen());X(()=>{_.set({["Sheet-"+U.get().sessionUID]:{refresh:()=>{e(n.uuid.gen())}}}),n(U.get().appRoot).addEvent({eventType:"keyup",eventID:"SheetEvent.keyUp",callback:function(l){let{key:m,metaKey:h}=l;if(m=="Escape"||m==","&&h){let S=Object.values(w.contents).filter(f=>f.isOpen);if(!S.length)return;let r=S.reduce((f,T)=>f.created_at.value>T.created_at.value?f:T);N.close(r.p.sheetID,m)}}}).addEvent({eventType:"click",eventID:"SheetEvent.Click",callback:function(l){let m=Object.values(w.contents).filter(r=>r.p.type=="custom");if(!m.length||!!m.find(r=>{let{p:f}=r,T=f.parent,B=l.target,E=H(T)[0];return!!(T==B||E===B||n(E).find(B).length)}))return;let S=l.target;S!=null&&S.closest("."+c("CustomSheet"))||m.forEach(r=>{var f;(f=r.p.close_option)!=null&&f.aroundClick&&N.close(r.p.sheetID)})}})},[]);let a=Object.entries(w.contents).map(([l,m])=>u(z,{id:"Sheet-"+l,children:u(w.Core,g({isOpen:m.isOpen},m.p),l)},l));return u(z,{className:["AMOTIFY_be",c("Wrapper")].join(" "),children:a})},Core:t=>{var G;let[e]=A(n.uuid.gen()),[a,l]=A(t),[m,h]=A(t.isOpen),{type:S,sheetID:r,openAfter:f,closeAfter:T}=a,B=!a.overwrap,E=w.Types[{"normal.topLeft":"Normal","normal.topCenter":"Normal","normal.topRight":"Normal","normal.middleLeft":"Normal","normal.middleCenter":"Normal","normal.middleRight":"Normal","normal.bottomLeft":"Normal","normal.bottomCenter":"Normal","normal.bottomRight":"Normal",image:"Normal","drawer.left":"Edge","drawer.right":"Edge","drawer.bottom":"Bottom",custom:"Custom"}[S]];X(()=>{_.set({[r]:{refresh:(v,s)=>{l(v),h(s!=null?s:!1)},resize:v=>{if(S=="drawer.bottom"){let s=_.get(e);s&&s.resize&&s.resize(v)}else(a.type.includes("normal")||a.type.includes("drawer"))&&l(s=>R(g({},s),{size:v}))},close:v=>{w.contents[r].isOpen=!1,h(!1)},open:()=>{w.contents[r].isOpen=!0,h(!0)}}})}),X(()=>{n.scope(()=>{if(!B||!a.backgroundEffect)return;let v=Object.values(w.contents).filter(I=>I.isOpen&&!I.p.overwrap&&I.p.type!="custom").length,s=H(".AMOTIFY_be_root");if(m){if(s.hasClass(c("FixScroll")))return;let I=n("html"),C=0;v==1&&(C=I[0].scrollTop|0,l(y=>R(g({},y),{bodyScrolls:C}))),U.get().isPhone||(I[0].scrollTop=0,s.addClass(c("FixScroll")).callback(y=>{y[0].scrollTop=C}).await(40).addClass(c("Float")));return}U.get().isPhone||v==0&&s.hasClass(c("FixScroll"))&&s.removeClass(c("Float")).await(251).removeClass(c("FixScroll")).callback(()=>{n("html")[0].scrollTop=a.bodyScrolls||0,s[0].scrollTop=0})}),n.scope(()=>{let v=H("#"+e);if(m){v.await(10).removeClass(c("Hide")).await(10).addClass(c("Open")).callback(()=>{let s=w.contents[r];s&&(s.isOpen=!0,f&&f())});return}v.await(10).removeClass(c("Open")).await(251).addClass(c("Hide")).callback(()=>{!T||T();let s=w.contents[r];if(!s||(s.isOpen=!1,a.hold_state))return;delete w.contents[r];let I=_.get("Sheet-"+U.get().sessionUID);I&&I.refresh()})})},[m]),X(()=>{w.currentIndex++;let{close_option:v}=a;n.scope(()=>{if(!(v!=null&&v.parentBlur))return;let s=n(a.parent);s[0]&&s.addEvent({eventID:"SheetClosation-"+r,eventType:"mouseout",callback:()=>{s.removeEvent("SheetClosation-"+r),h(!1)}})})},[]);let[k,F]=S.split(".");return u(z,{className:[c("Wrap"),c("Tcate_"+k),c("Tpos_"+F),c("isNewSheet_"+B)].join(" "),width:1,height:0,ssAbsoluteCovered:!0,freeCSS:{zIndex:w.currentIndex+1},id:e,children:$(J,{className:c("Content"),gap:0,height:"viewHeight",overflow:"auto",transition:"middle",children:[!!B&&u(w.TapSensor,{sheetID:r,delegateAroundClick:(G=a.close_option)==null?void 0:G.aroundClick}),u(E,g({componentID:e},a))]})},e)},Types:{Normal:t=>{let x=t,{sheetID:e,sheetGroups:a,bodyScrolls:l,content:m,className:h="",type:S,size:r="R",freeCSS:f,openAfter:T,closeAfter:B,close_option:E,hold_state:k,overwrap:F,isOpen:G,backgroundEffect:v}=x,s=Y(x,["sheetID","sheetGroups","bodyScrolls","content","className","type","size","freeCSS","openAfter","closeAfter","close_option","hold_state","overwrap","isOpen","backgroundEffect"]),[I,C]=S.split("."),y={},D=[];return C.match(/top/)?(D.push("top"),y.marginBottom="auto"):C.match(/middle/)?(D.push("center"),y.marginTop="auto",y.marginBottom="auto"):C.match(/bottom/)&&(D.push("bottom"),y.marginTop="auto"),C.match(/left/i)?(D.push("left"),y.marginRight="auto"):C.match(/center/i)?(D.push("center"),y.marginLeft="auto",y.marginRight="auto"):C.match(/right/i)&&(D.push("right"),y.marginLeft="auto"),u(z,R(g(g({className:[c("BB"),h].join(" "),padding:1,transition:"long",opacity:"trans"},s),y),{freeCSS:g({width:{S:"26rem",R:"36rem",L:"44rem","2L":"60rem","3L":"72rem",MAX:"100vw"}[r],maxWidth:"96vw",transformOrigin:D.join(" ")},f),children:n.is.function(m)?u(m,{}):m}))},Edge:t=>{let s=t,{sheetID:e,sheetGroups:a,bodyScrolls:l,type:m,content:h,className:S="",size:r="R",openAfter:f,closeAfter:T,close_option:B,hold_state:E,overwrap:k,isOpen:F,backgroundEffect:G}=s,v=Y(s,["sheetID","sheetGroups","bodyScrolls","type","content","className","size","openAfter","closeAfter","close_option","hold_state","overwrap","isOpen","backgroundEffect"]);return u(z,R(g(R(g({className:[c("BB"),S].join(" ")},m=="drawer.right"?{marginLeft:"auto"}:m=="drawer.left"?{marginRight:"auto"}:{}),{opacity:"trans",transition:"long",position:"relative",backgroundColor:"layer.1",flexSizing:"none",minHeight:"viewHeight",boxShadow:"3.remark"}),v),{freeCSS:g({width:{S:"20rem",R:"27rem",L:"32rem","2L":"40rem","3L":"58rem",MAX:"100vw"}[r],maxWidth:"96vw"},v.freeCSS),children:n.is.function(h)?u(h,{}):h}))},Bottom:t=>{let V=t,{componentID:e,sheetID:a,sheetGroups:l,bodyScrolls:m,content:h,size:S="R",sizeChanged:r,baseStyles:f,openAfter:T,closeAfter:B,close_option:{swipeDown:E=!0}={},hold_state:k,overwrap:F,isOpen:G,backgroundEffect:v}=V,s=Y(V,["componentID","sheetID","sheetGroups","bodyScrolls","content","size","sizeChanged","baseStyles","openAfter","closeAfter","close_option","hold_state","overwrap","isOpen","backgroundEffect"]),I=n.getScreenSize(),C=[0,.2,.6,.95],y={ZERO:0,S:1,R:2,L:3},[D,x]=A(S),[O,P]=A({process:!1,processStart:0,originY:0,originValue:0,viewHeight:0,value:C[y[S]]});_.update({[e]:{val_edit:O,resize:b=>{let d=C[y[b]];P(p=>R(g({},p),{value:d})),x(b)}}});const W={Start:b=>{n(document).addEvent({eventID:"BottomSheetMouseMove",eventType:"mousemove",callback:W.Move}).addEvent({eventID:"BottomSheetTouchMove",eventType:"touchmove",callback:W.Move}).addEvent({eventID:"BottomSheetMouseUp",eventType:"mouseup",callback:W.End}).addEvent({eventID:"BottomSheetTouchEnd",eventType:"touchend",callback:W.End});let d=n.getCursor(b),p=R(g({},O),{process:!0,processStart:new Date().getTime(),originY:d.y,originValue:O.value,viewHeight:n.getScreenSize().height});_.update({[e]:{val_edit:p}}),P(p)},Move:b=>{var M;let d=(M=_.get(e))==null?void 0:M.val_edit;if(!d.process)return;let L=(n.getCursor(b).y-d.originY)/d.viewHeight,o=d.originValue-L;if(o>.95)o=.95+(o-.95)*.5;else if(o<.2){let j=.2-o;j-=.1,o=.1+(.1-j)*.5}P(R(g({},d),{value:o}))},End:b=>{var o;let d=(o=_.get(e))==null?void 0:o.val_edit;if(!d.process)return;n(document).removeEvent(["BottomSheetMouseMove","BottomSheetTouchMove","BottomSheetMouseUp","BottomSheetTouchEnd"]);let p=0;if(d.value<.1||(d.value<.5?p=1:d.value>.75?p=3:p=2),new Date().getTime()-d.processStart<300){let M=n.getCursor(b).y-d.originY;if(Math.abs(M)>=20){let j=+(M<0)*2-1;p+=j,p=Math.min(Math.max(p,0),C.length-1)}}p==0&&(E||(p=1)),x(["ZERO","S","R","L"][p]),P(R(g({},d),{value:C[p],process:!1}))}},Z=te(!1);return X(()=>{Z.current?D=="ZERO"?E&&N.close(a):setTimeout(()=>{t.sizeChanged&&t.sizeChanged(D)},250):Z.current=!0},[D]),u(z,{className:c("BB"),margin:[0,"auto"],marginTop:"auto",opacity:"trans",width:1,transition:"long",freeCSS:g({maxWidth:12*60,height:I.height*O.value},O.process?{transition:"0s"}:{}),children:$(J,R(g({gap:0,flexSizing:"none",borderTopLeftRadius:"1.tone.primary",borderTopRightRadius:"1.tone.primary",border:!0,borderBottom:"unset",boxShadow:"3.remark",position:"relative",overflow:"hidden",height:1},f),{children:[u(K.Separate,{padding:"1/2",backgroundColor:"layer.1",position:"relative",freeCSS:{userSelect:"none"},children:u(K.Center,{onMouseDown:W.Start,onTouchStart:W.Start,flexSizing:0,padding:"2/3",ssPushable:!0,isRounded:!0,freeCSS:{cursor:"grab",userSelect:"none"},children:u(z,{unitWidth:6,unitHeight:"1/2",backgroundColor:"layer.4",isRounded:!0,className:c("DragBar")})})}),u(z,R(g({backgroundColor:"layer.1",flexSizing:0,overflow:"auto"},s),{children:n.is.function(h)?u(h,{}):h}))]}))})},Custom:t=>{let V=t,{sheetID:e,sheetGroups:a,bodyScrolls:l,event:m,parent:h,nextToCursor:S,gravityPoint:r=22,content:f,close_option:T,hold_state:B,openAfter:E,closeAfter:k,overwrap:F,isOpen:G,backgroundEffect:v}=V,s=Y(V,["sheetID","sheetGroups","bodyScrolls","event","parent","nextToCursor","gravityPoint","content","close_option","hold_state","openAfter","closeAfter","overwrap","isOpen","backgroundEffect"]),[I]=A(n.uuid.gen()),C=n.is.element(h)||n.is.jsmin(h)?n(h):H(h),y='[data-sheet-id="'+I+'"]',D='[data-sheet-content="'+I+'"]';r=r;let x=r%5||5,O=Math.ceil(r/5);const P={Init:()=>{if(S&&m){let i=n.getScreenSize(),Q=n.getCursor(m);return{top:Q.y-i.pageYOffset,left:Q.x-i.pageXOffset}}let b={},{top:d,right:p,bottom:L,left:o,height:M,width:j}=C.position();return[1,2].includes(x)?b.left=o:x==3?b.left=o+j/2:[4,5].includes(x)&&(b.left=p),r<=10?b.top=d:r<=15?b.top=d+M/2:r<=25&&(b.top=L),b},Adjust:()=>{let b=H(y).position(),d=H(D).position(),p=C.position(),L=n.getScreenSize(),o={};for(let i in d)o[i]=d[i];{let i=0;O==1?i=p.top-o.bottom:O==2?i=p.top-o.top:O==3?i=p.top-o.top+(p.height-o.height)/2:O==4?i=p.bottom-o.bottom:O==5&&(i=p.bottom-o.top),o.top+=i,o.bottom+=i}{let i=0;x==1?i=p.left-o.right:x==2?i=p.left-o.left:x==3?i=p.left-o.left+(p.width-o.width)/2:x==4?i=p.right-o.right:x==5&&(i=p.right-o.left),o.left+=i,o.right+=i}if(o.top<0){let i=-o.top;o.top+=i,o.bottom+=i}if(o.bottom>L.height){let i=o.bottom-L.height;o.top-=i,o.bottom-=i}if(o.left<0){let i=-o.left;o.left+=i,o.right+=i}if(o.right>L.width){let i=o.right-L.width;o.left-=i,o.right-=i}let M=o.top-d.top,j=o.left-d.left;n(y).css({top:b.top+M+"px",left:b.left+j+"px"})}};let[W,Z]=A(P.Init());return X(()=>{H(y).await(10).addClass(c("Open")).await(200).callback(()=>{P.Adjust()}),_.update({["customSheet-"+t.sheetID]:{reposition:()=>{P.Adjust()}}})},[]),C[0]?u(z,{className:[c("BB"),c("CustomSheet")].join(" "),"data-sheet-id":I,transition:"long",position:"absolute",width:0,height:0,opacity:"trans",flexCenter:!0,freeCSS:W,children:u(oe,{position:"absolute",className:[c("GPT"),c("GPT_"+r),c("Col_"+x),c("Row_"+O)].join(" "),children:u(z,R(g({"data-sheet-content":I,flexSizing:"none",maxHeight:"viewHeight"},s),{freeCSS:g({maxWidth:"98vw"},s.freeCSS),children:n.is.function(f)?u(f,{}):f}))})}):null}},TapSensor:t=>u(z,{className:c("TapSensor"),children:u(ee.Button.Plain,{className:c("TapContent"),onClick:()=>{var e;(e=t.delegateAroundClick)!=null&&e&&N.close(t.sheetID)},freeCSS:{cursor:"default",pointerEvents:"all"}})})},N={Wrapper:()=>u(w.Wrapper,{}),open:t=>{let e=t;if(e.sheetID=(e.sheetID||"").replace(/\./g,"-"),e.type=="image"){let l=e.sheetID||n.uuid.gen(),a=e,{type:m,src:h}=a,S=Y(a,["type","src"]);N.open(R(g({type:"normal.topCenter",backgroundColor:"trans"},S),{sheetID:l,freeCSS:{maxWidth:"96vw",transformOrigin:"top"},content:()=>{let[r]=A(n.flatArray(h)),[f,T]=A(0),B=[],E=[];return r.forEach((k,F)=>{B.push({value:F,label:u(q,{src:n.flatArray(k)[0],width:"auto",height:1,freeCSS:{maxWidth:12*6,maxHeight:12*3}})}),E.push(u(q,{width:1,height:"auto",src:n.flatArray(k)[0]}))}),$(J,{gap:0,children:[$(K.Separate,{gap:2,padding:1,backgroundColor:"layer.1",borderTopLeftRadius:"1.tone.primary",borderTopRightRadius:"1.tone.primary",children:[u(se.Radio.Border,{icon:!1,value:f,override:"force",horizontalAlign:"center",onUpdateValidValue:({value:k})=>{T(k)},cellStyles:{borderWidth:2,padding:"1/3"},options:B}),u(ee.Button.Border.S,{color:"cloud",isRounded:!0,onClick:()=>{N.close(l)},children:$(K.Center,{gap:"1/3",children:["\u9589\u3058\u308B",u(re.Times,{})]})})]}),u(ne,{slideIndex:f,options:{loop:r.length>1,onSlideCallback:k=>{T(k)}},slides:E,wrapper:k=>u(z,{borderBottomLeftRadius:"1.tone.primary",borderBottomRightRadius:"1.tone.primary",children:k})})]})}}));return}w.addNewSheet(e)},refresh:(t,e)=>{t.sheetID=(t.sheetID||"").replace(/\./g,"-");let a=_.get(t.sheetID);a&&a.refresh&&a.refresh(t,e)},resize:t=>{t.sheetID=(t.sheetID||"").replace(/\./g,"-");let e=_.get(t.sheetID);e&&e.resize&&e.resize(t.size)},customSheet:{reposition:t=>{let e=_.get("customSheet-"+t);e&&e.reposition&&e.reposition()}},close:function(t,e,a){var m;t=t==null?void 0:t.replace(/\./g,"-");let l=w.contents[t];if(l&&!(e=="Escape"&&!((m=l.p.close_option)!=null&&m.escapeKeyDown))){let{p:h}=l,{sheetID:S}=h,r=_.get(S);r&&r.close&&r.close(a)}},closeGroup:t=>{var e;t=(t||"").replace(/\./g,"-");for(let[a,l]of Object.entries(w.contents))(e=l.p.sheetGroups)!=null&&e.includes(t)&&N.close(a)},closeAll:t=>{var e;for(let[a,l]of Object.entries(w.contents))t&&((e=l.p.close_option)==null?void 0:e.pageTransit)==!1||N.close(a,"pageTransit",!0)},Body:t=>u(z,g({className:c("BaseBody"),backgroundColor:"layer.1",borderRadius:"1.tone.primary",position:"relative",boxShadow:"3.remark",transition:"long"},t))};export{N as Sheet,N as default};
@@ -1,8 +1,8 @@
1
- import{b as M,c as W,e as A}from"../chunk-C5N2D3ZX.js";import{Fragment as B,jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as D,useEffect as _}from"react";import S,{Filer as N}from"@mingoo/jsmin";import{Config as R,ThemeColors as J,Box as t,Span as K,Grid as c,Flex as h,FAI as g,Img as w,Logo as i,Column as p,Placeholder as j,List as F,ListItem as O,LinkifyText as $,Accordion as U,Row as s,Text as n,PageViewController as Q,SwipeView as Z,TabBar as ee,Plate as H,Table as C,Input as d,Button as r,Sheet as b,Snackbar as G,Tooltips as k,Loader as y,Effect as oe,Cropper as te,RootViewController as re}from"..";const v={index:()=>o(B,{children:[o(h,{gap:1,children:[e(t,{flexCenter:!0,children:e(j,{ssSphere:6,children:"Placeholder"})}),o(c,{gridCols:3,gap:1,flexSizing:"auto",children:[e(t,{padding:2,backgroundColor:"layer.1"}),e(t,{padding:2,backgroundColor:"layer.2"}),e(t,{padding:2,backgroundColor:"layer.3"}),e(t,{padding:2,backgroundColor:"layer.4"}),e(t,{padding:2,backgroundColor:"layer.5"}),e(t,{padding:2,backgroundColor:"layer.6"})]}),o(c,{gridCols:3,gap:"1/2",flexSizing:"auto",ssCardBox:!0,children:[e(t,{flexCenter:!0,fontColor:"1.clear",children:"FontColor1"}),e(t,{flexCenter:!0,fontColor:"2.normal",children:"FontColor2"}),e(t,{flexCenter:!0,fontColor:"3.blur",children:"FontColor3"}),e(t,{flexCenter:!0,fontColor:"4.thin",children:"FontColor4"}),e(t,{flexCenter:!0,fontColor:"5.translucent",children:"FontColor5"})]})]}),e(v.Fonts,{}),e(v.Box,{}),e(v.Flex,{}),e(v.Grid,{}),e(v.Others,{})]}),Fonts:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{padding:1,borderBottom:!0,children:"Font"}),o(t,{overflow:"auto",padding:1,children:[e(n.Description,{padding:1,children:`<Box
1
+ import{b as M,c as _,e as A}from"../chunk-C5N2D3ZX.js";import{Fragment as B,jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as D,useEffect as W}from"react";import S,{Filer as N}from"@mingoo/jsmin";import{Config as R,ThemeColors as J,Box as t,Span as K,Grid as c,Flex as h,FAI as x,Img as w,Logo as i,Column as p,Placeholder as j,List as y,ListItem as O,LinkifyText as $,Accordion as U,Row as s,Text as n,PageViewController as Q,SwipeView as Z,TabBar as ee,Plate as H,Table as C,Input as d,Button as r,Sheet as b,Snackbar as G,Tooltips as k,Loader as P,Effect as oe,Cropper as te,RootViewController as re}from"..";const v={index:()=>o(B,{children:[o(h,{gap:1,children:[e(t,{flexCenter:!0,children:e(j,{ssSphere:6,children:"Placeholder"})}),o(c,{gridCols:3,gap:1,flexSizing:"auto",children:[e(t,{padding:2,backgroundColor:"layer.1"}),e(t,{padding:2,backgroundColor:"layer.2"}),e(t,{padding:2,backgroundColor:"layer.3"}),e(t,{padding:2,backgroundColor:"layer.4"}),e(t,{padding:2,backgroundColor:"layer.5"}),e(t,{padding:2,backgroundColor:"layer.6"})]}),o(c,{gridCols:3,gap:"1/2",flexSizing:"auto",ssCardBox:!0,children:[e(t,{flexCenter:!0,fontColor:"1.clear",children:"FontColor1"}),e(t,{flexCenter:!0,fontColor:"2.normal",children:"FontColor2"}),e(t,{flexCenter:!0,fontColor:"3.blur",children:"FontColor3"}),e(t,{flexCenter:!0,fontColor:"4.thin",children:"FontColor4"}),e(t,{flexCenter:!0,fontColor:"5.translucent",children:"FontColor5"})]})]}),e(v.Fonts,{}),e(v.Box,{}),e(v.Flex,{}),e(v.Grid,{}),e(v.Others,{})]}),Fonts:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{padding:1,borderBottom:!0,children:"Font"}),o(t,{overflow:"auto",padding:1,children:[e(n.Description,{padding:1,children:`<Box
2
2
  fontSize={ 0 ~ 8 }
3
3
  >
4
4
  some text
5
- </Box>`}),e(F,{items:[o(B,{children:["\u30FB Landing",o(t,{isSemiBoldFont:!0,fontSize:"7.landing",children:["Visualize Your ",e(K,{fontColor:"theme",children:"Colors"})," On a Real Website"]})]}),o(B,{children:["\u30FB Title",e(t,{fontSize:"6.title",children:"\u4EE4\u548C\uFF14\u5E74\u5EA6\u306E\u56FD\u6C11\u8CA0\u62C5\u7387\u3092\u516C\u8868\u3057\u307E\u3059"})]}),o(B,{children:["\u30FB SubTitle",e(t,{fontSize:"5.subTitle",children:"\u652F\u6255\u3044\u3092\u53D7\u3051\u4ED8\u3051\u308B"})]}),o(B,{children:["\u30FB ThirdTitle",e(t,{fontSize:"4.thirdTitle",children:"\u79DF\u7A0E\u8CA0\u62C5\u7387\u3068\u793E\u4F1A\u4FDD\u969C\u8CA0\u62C5\u7387\u3092\u5408\u8A08\u3057\u305F\u56FD\u6C11\u8CA0\u62C5\u7387\u306B\u3064\u3044\u3066\u3001\u4EE4\u548C\uFF14\u5E74\u5EA6\u306E\u898B\u901A\u3057\u3092\u63A8\u8A08\u3057\u307E\u3057\u305F\u306E\u3067\u3001\u516C\u8868\u3057\u307E\u3059\u3002"})]}),o(B,{children:["\u30FB Paragraph",e(n.Description,{fontSize:"3.paragraph",children:e($,{text:`
5
+ </Box>`}),e(y,{items:[o(B,{children:["\u30FB Landing",o(t,{isSemiBoldFont:!0,fontSize:"7.landing",children:["Visualize Your ",e(K,{fontColor:"theme",children:"Colors"})," On a Real Website"]})]}),o(B,{children:["\u30FB Title",e(t,{fontSize:"6.title",children:"\u4EE4\u548C\uFF14\u5E74\u5EA6\u306E\u56FD\u6C11\u8CA0\u62C5\u7387\u3092\u516C\u8868\u3057\u307E\u3059"})]}),o(B,{children:["\u30FB SubTitle",e(t,{fontSize:"5.subTitle",children:"\u652F\u6255\u3044\u3092\u53D7\u3051\u4ED8\u3051\u308B"})]}),o(B,{children:["\u30FB ThirdTitle",e(t,{fontSize:"4.thirdTitle",children:"\u79DF\u7A0E\u8CA0\u62C5\u7387\u3068\u793E\u4F1A\u4FDD\u969C\u8CA0\u62C5\u7387\u3092\u5408\u8A08\u3057\u305F\u56FD\u6C11\u8CA0\u62C5\u7387\u306B\u3064\u3044\u3066\u3001\u4EE4\u548C\uFF14\u5E74\u5EA6\u306E\u898B\u901A\u3057\u3092\u63A8\u8A08\u3057\u307E\u3057\u305F\u306E\u3067\u3001\u516C\u8868\u3057\u307E\u3059\u3002"})]}),o(B,{children:["\u30FB Paragraph",e(n.Description,{fontSize:"3.paragraph",children:e($,{text:`
6
6
  This article discusses performance best practices for fonts.
7
7
  There are a variety of ways in which web fonts impact performance`})})]}),o(B,{children:["\u30FB Normal",e(t,{fontSize:"2.normal",children:"\u52B9\u7387\u7684\u3067\u6301\u7D9A\u53EF\u80FD\u306A\u8CA1\u653F\u3078\u306E\u8EE2\u63DB\u3092\u56F3\u308A\u3001\u3053\u306E\u8CA1\u653F\u69CB\u9020\u3092\u5404\u822C\u306E\u69CB\u9020\u6539\u9769\u3068\u3068\u3082\u306B\u63A8\u9032\u3059\u308B\u3053\u3068\u3067\u3001\u6C11\u9593\u9700\u8981\u4E3B\u5C0E\u306E\u6301\u7D9A\u7684\u7D4C\u6E08\u6210\u9577\u306E\u5B9F\u73FE\u3092\u76EE\u6307\u3057\u307E\u3059\u3002 \u5C11\u5B50\u30FB\u9AD8\u9F62\u5316\u3001\u56FD\u969B\u5316\u306A\u3069\u7D4C\u6E08\u793E\u4F1A\u306E\u69CB\u9020\u5909\u5316\u306B\u5BFE\u5FDC\u3067\u304D\u308B21\u4E16\u7D00\u306E\u3042\u308B\u3079\u304D\u7A0E\u5236\u3092\u304D\u305A\u304D\u307E\u3059\u3002 \u8CA1\u653F\u6295\u878D\u8CC7\u306F\u3001\u884C\u8CA1\u653F\u6539\u9769\u306E\u8DA3\u65E8\u3092\u8E0F\u307E\u3048\u3001\u6C11\u9593\u3067\u306F\u3067\u304D\u306A\u3044\u5206\u91CE\u30FB\u4E8B\u696D\u306A\u3069\u306B\u91CD\u70B9\u5316\u3092\u884C\u3044\u3001\u771F\u306B\u653F\u7B56\u7684\u306B\u5FC5\u8981\u306A\u8CC7\u91D1\u9700\u8981\u306B\u306F\u7684\u78BA\u306B\u5BFE\u5FDC\u3057\u307E\u3059\u3002 \u91D1\u878D\u5E81\u3068\u5354\u529B\u3057\u3001\u91D1\u878D\u306E\u30BB\u30FC\u30D5\u30C6\u30A3\u30CD\u30C3\u30C8\u3092\u6574\u5099\u3057\u3001\u91D1\u878D\u5371\u6A5F\u306B\u7D20\u65E9\u304F\u5BFE\u5FDC\u3059\u308B\u306A\u3069\u3001\u91D1\u878D\u30B7\u30B9\u30C6\u30E0\u306E\u5B89\u5B9A\u306E\u78BA\u4FDD\u3092\u76EE\u6307\u3057\u307E\u3059\u3002 \u56FD\u969B\u7684\u306A\u5354\u529B\u7B49\u306B\u7A4D\u6975\u7684\u306B\u53D6\u308A\u7D44\u3080\u3053\u3068\u306B\u3088\u308A\u3001\u56FD\u969B\u901A\u8CA8\u30B7\u30B9\u30C6\u30E0\u306E\u5B89\u5B9A\u30FB\u56FD\u969B\u8CBF\u6613\u306E\u79E9\u5E8F\u3042\u308B\u767A\u5C55\u3092\u76EE\u6307\u3057\u307E\u3059\u3002"})]}),o(B,{children:["\u30FB Mini",e(t,{fontSize:"1.mini",children:"Copyright \xA9 Ministry of Finance Japan. All Rights Reserved."})]})]})]})]}),Box:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Box"}),e(t,{padding:1,overflow:"auto",children:e(C.Normal,{ssCardBox:!1,borderRadius:0,height:1,tone:"cellBorder",colLength:2,head:!1,rows:[[{children:e(n.Description,{children:`<Box>
8
8
  helloWorld!!
@@ -60,20 +60,20 @@ maxWidth={ 8 }
60
60
  src='...'
61
61
  alt='noImage'
62
62
  />
63
- `})},{children:e(w,{src:i.Images.defaultIcon("user"),alt:"noImage",freeCSS:{maxHeight:12*8,maxWidth:12*8}})}]]})})]})},f={index:()=>o(B,{children:[e(f.Comun,{}),e(f.Mingoo,{}),e(f.Google,{}),e(f.Facebook,{}),e(f.Line,{}),e(f.Twitter,{})]}),Comun:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Comun"}),e(t,{padding:1,overflow:"auto",children:o(p,{padding:2,children:[o(s.Left,{gap:2,children:[e(i.Brands.ComunIcon,{size:"S"}),e(i.Brands.ComunIcon,{size:"R"}),e(i.Brands.ComunIcon,{size:"L"}),e(i.Brands.ComunIcon,{size:"2L"}),e(i.Brands.ComunIcon,{size:"3L"})]}),o(s.Left,{gap:2,children:[e(i.Brands.ComunTitle,{size:"S"}),e(i.Brands.ComunTitle,{size:"R"}),e(i.Brands.ComunTitle,{size:"L"}),e(i.Brands.ComunTitle,{size:"2L"}),e(i.Brands.ComunTitle,{size:"3L"})]}),o(s.Left,{gap:2,children:[e(i.Brands.ComunLogoH,{size:"S"}),e(i.Brands.ComunLogoH,{size:"R"}),e(i.Brands.ComunLogoH,{size:"L"}),e(i.Brands.ComunLogoH,{size:"2L"}),e(i.Brands.ComunLogoH,{size:"3L"})]}),o(s.Left,{gap:2,children:[e(i.Brands.ComunLogoV,{size:"S"}),e(i.Brands.ComunLogoV,{size:"R"}),e(i.Brands.ComunLogoV,{size:"L"}),e(i.Brands.ComunLogoV,{size:"2L"}),e(i.Brands.ComunLogoV,{size:"3L"})]})]})})]}),Mingoo:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Mingoo"}),e(t,{padding:1,overflow:"auto",children:o(s.Center,{gap:2,padding:2,flexType:"col",children:[e(i.Brands.MingooIcon,{size:"S"}),e(i.Brands.MingooIcon,{size:"R"}),e(i.Brands.MingooIcon,{size:"L"}),e(i.Brands.MingooIcon,{size:"2L"}),e(i.Brands.MingooIcon,{size:"3L"})]})})]}),Google:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Google"}),e(t,{padding:1,overflow:"auto",children:o(s.Center,{flexType:"col",gap:2,padding:2,children:[e(i.Brands.Google,{size:"S"}),e(i.Brands.Google,{size:"R"}),e(i.Brands.Google,{size:"L"}),e(i.Brands.Google,{size:"2L"}),e(i.Brands.Google,{size:"3L"})]})})]}),Facebook:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Facebook"}),e(t,{padding:1,overflow:"auto",children:o(s.Center,{flexType:"col",gap:2,padding:2,children:[e(i.Brands.Facebook,{size:"S"}),e(i.Brands.Facebook,{size:"R"}),e(i.Brands.Facebook,{size:"L"}),e(i.Brands.Facebook,{size:"2L"}),e(i.Brands.Facebook,{size:"3L"})]})})]}),Line:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"LINE"}),e(t,{padding:1,overflow:"auto",children:o(s.Center,{flexType:"col",gap:2,padding:2,children:[e(i.Brands.LINE,{size:"S"}),e(i.Brands.LINE,{size:"R"}),e(i.Brands.LINE,{size:"L"}),e(i.Brands.LINE,{size:"2L"}),e(i.Brands.LINE,{size:"3L"})]})})]}),Twitter:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Twitter"}),e(t,{padding:1,overflow:"auto",children:o(s.Center,{flexType:"col",gap:2,padding:2,children:[e(i.Brands.Twitter,{size:"S"}),e(i.Brands.Twitter,{size:"R"}),e(i.Brands.Twitter,{size:"L"}),e(i.Brands.Twitter,{size:"2L"}),e(i.Brands.Twitter,{size:"3L"})]})})]})},P={index:()=>o(B,{children:[e(P.Ripple,{}),e(P.Variables,{}),e(P.Tooltips,{}),e(P.Snackbar,{})]}),Ripple:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Ripple"}),o(p,{padding:2,children:[e(n.Description,{children:`<Element
63
+ `})},{children:e(w,{src:i.Images.defaultIcon("user"),alt:"noImage",freeCSS:{maxHeight:12*8,maxWidth:12*8}})}]]})})]})},f={index:()=>o(B,{children:[e(f.Comun,{}),e(f.Mingoo,{}),e(f.Google,{}),e(f.Facebook,{}),e(f.Line,{}),e(f.Twitter,{})]}),Comun:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Comun"}),e(t,{padding:1,overflow:"auto",children:o(p,{padding:2,children:[o(s.Left,{gap:2,children:[e(i.Brands.ComunIcon,{size:"S"}),e(i.Brands.ComunIcon,{size:"R"}),e(i.Brands.ComunIcon,{size:"L"}),e(i.Brands.ComunIcon,{size:"2L"}),e(i.Brands.ComunIcon,{size:"3L"})]}),o(s.Left,{gap:2,children:[e(i.Brands.ComunTitle,{size:"S"}),e(i.Brands.ComunTitle,{size:"R"}),e(i.Brands.ComunTitle,{size:"L"}),e(i.Brands.ComunTitle,{size:"2L"}),e(i.Brands.ComunTitle,{size:"3L"})]}),o(s.Left,{gap:2,children:[e(i.Brands.ComunLogoH,{size:"S"}),e(i.Brands.ComunLogoH,{size:"R"}),e(i.Brands.ComunLogoH,{size:"L"}),e(i.Brands.ComunLogoH,{size:"2L"}),e(i.Brands.ComunLogoH,{size:"3L"})]}),o(s.Left,{gap:2,children:[e(i.Brands.ComunLogoV,{size:"S"}),e(i.Brands.ComunLogoV,{size:"R"}),e(i.Brands.ComunLogoV,{size:"L"}),e(i.Brands.ComunLogoV,{size:"2L"}),e(i.Brands.ComunLogoV,{size:"3L"})]})]})})]}),Mingoo:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Mingoo"}),e(t,{padding:1,overflow:"auto",children:o(s.Center,{gap:2,padding:2,flexType:"col",children:[e(i.Brands.MingooIcon,{size:"S"}),e(i.Brands.MingooIcon,{size:"R"}),e(i.Brands.MingooIcon,{size:"L"}),e(i.Brands.MingooIcon,{size:"2L"}),e(i.Brands.MingooIcon,{size:"3L"})]})})]}),Google:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Google"}),e(t,{padding:1,overflow:"auto",children:o(s.Center,{flexType:"col",gap:2,padding:2,children:[e(i.Brands.Google,{size:"S"}),e(i.Brands.Google,{size:"R"}),e(i.Brands.Google,{size:"L"}),e(i.Brands.Google,{size:"2L"}),e(i.Brands.Google,{size:"3L"})]})})]}),Facebook:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Facebook"}),e(t,{padding:1,overflow:"auto",children:o(s.Center,{flexType:"col",gap:2,padding:2,children:[e(i.Brands.Facebook,{size:"S"}),e(i.Brands.Facebook,{size:"R"}),e(i.Brands.Facebook,{size:"L"}),e(i.Brands.Facebook,{size:"2L"}),e(i.Brands.Facebook,{size:"3L"})]})})]}),Line:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"LINE"}),e(t,{padding:1,overflow:"auto",children:o(s.Center,{flexType:"col",gap:2,padding:2,children:[e(i.Brands.LINE,{size:"S"}),e(i.Brands.LINE,{size:"R"}),e(i.Brands.LINE,{size:"L"}),e(i.Brands.LINE,{size:"2L"}),e(i.Brands.LINE,{size:"3L"})]})})]}),Twitter:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Twitter"}),e(t,{padding:1,overflow:"auto",children:o(s.Center,{flexType:"col",gap:2,padding:2,children:[e(i.Brands.Twitter,{size:"S"}),e(i.Brands.Twitter,{size:"R"}),e(i.Brands.Twitter,{size:"L"}),e(i.Brands.Twitter,{size:"2L"}),e(i.Brands.Twitter,{size:"3L"})]})})]})},F={index:()=>o(B,{children:[e(F.Ripple,{}),e(F.Variables,{}),e(F.Tooltips,{}),e(F.Snackbar,{})]}),Ripple:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Ripple"}),o(p,{padding:2,children:[e(n.Description,{children:`<Element
64
64
  ssEffectsOnActive={ 'ripple.( cloud | theme | nega | posi | warn )' }
65
65
  />`}),o(s.Center,{children:[e(t,{ssCardBox:!0,padding:1,ssEffectsOnActive:"ripple.theme",children:"DIV"}),e(r.Button.Prime.R,{ssEffectsOnActive:"ripple.white",children:"White"}),e(r.Button.Border.R,{ssEffectsOnActive:"ripple.cloud",children:"Cloud"}),e(r.Button.Border.R,{ssEffectsOnActive:"ripple.theme",children:"Theme"})]})]})]}),Variables:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Effects"}),o(p,{padding:2,children:[e(n.Description,{children:`<Button
66
66
  ssEffectsOnActive={ 'shrink' }
67
- />`}),e(s.Left,{children:e(r.Button.Prime.R,{onClick:()=>{y.fn.mini.active("testLoadingKey"),setTimeout(()=>{y.fn.stopALL()},5e3)},children:o(s.Center,{gap:0,children:[e(y.White.S,{loaderID:"testLoadingKey",marginRight:1}),e(t,{textAlign:"left",children:"Launch Mini Loader"})]})})}),o(s.Left,{children:[e(r.Button.Border.R,{ssEffectsOnActive:"shrink",children:"Shrink"}),e(r.Button.Border.R,{ssEffectsOnActive:"pudding",children:"Pudding"}),e(r.Button.Border.R,{ssEffectsOnActive:"expand",children:"Expand"}),e(r.Button.Border.R,{ssEffectsOnActive:"push",children:"Push"}),e(r.Button.Border.R,{children:"corner Loader",onClick:()=>{y.fn.corner.active(),setTimeout(()=>{y.fn.corner.stop()},3e3)}})]})]})]}),Tooltips:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Tooltips"}),o(p,{padding:2,children:[o(r.Button.Prime.R,{onContextMenu:l=>{l.preventDefault(),k.open({tipsID:"testTooltips",event:l,nextToCursor:!0,gravityPoint:10,close_option:{parentBlur:!1},padding:0,freeCSS:{minWidth:12*16},content:o(p,{ssCardBox:!0,gap:0,borderRadius:"3.tone.tertiary",padding:"1/2",children:[e(r.Button.Clear.S,{color:"cloud",fontColor:"2.normal",textAlign:"left",children:"Button Label1"}),e(r.Button.Clear.S,{color:"cloud",fontColor:"2.normal",textAlign:"left",children:"Button Label2"}),e(r.Button.Clear.S,{color:"cloud",fontColor:"2.normal",textAlign:"left",children:"Button Label3"}),e(r.Button.Clear.S,{color:"cloud",fontColor:"2.normal",textAlign:"left",children:"Button Label4"}),e(r.Button.Clear.S,{color:"cloud",fontColor:"2.normal",textAlign:"left",children:"Button Label5"})]})})},children:["OpenTooltips next to cursor",e("br",{}),"( onContextMenu )"]}),e(c,{gridCols:5,gap:1,children:Array.from({length:25}).map((l,a)=>e(r.Button.Border.R,{onMouseOver:u=>{k.open({tipsID:"tips-"+(a+1),event:u,gravityPoint:a+1,close_option:{parentBlur:!1},padding:0,content:e(k.Body,{children:a},a)})},children:a+1},a))})]})]}),Snackbar:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Snackbars"}),o(s.Center,{padding:2,children:[e(r.Button.Prime.R,{onClick:()=>{G.add({secondsToClose:3,children:"hello World!!"})},children:"Add Normal Snackbar"}),e(r.Button.Prime.R,{onClick:()=>{G.add({snackID:"testSnackID1",secondsToClose:30,children:o(s.Separate,{verticalAlign:"baseline",paddingLeft:"2/3",children:["\u4E88\u7D04\u6642\u9593\u304C\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F",e(r.Button.Clear.S,{color:"white",fontColor:"posi",children:"\u5143\u306B\u623B\u3059"})]})})},children:"Notices"}),e(r.Button.Prime.R,{onClick:()=>{let l=S.uuid.gen();G.add({snackID:l,children:o(p,{padding:1,children:[o(s.Left,{verticalAlign:"top",children:[e(w,{src:i.Images.defaultIcon("user"),ssSphere:4}),e(n.Description,{children:`Some Text
67
+ />`}),e(s.Left,{children:e(r.Button.Prime.R,{onClick:()=>{P.fn.mini.active("testLoadingKey"),setTimeout(()=>{P.fn.stopALL()},5e3)},children:o(s.Center,{gap:0,children:[e(P.White.S,{loaderID:"testLoadingKey",marginRight:1}),e(t,{textAlign:"left",children:"Launch Mini Loader"})]})})}),o(s.Left,{children:[e(r.Button.Border.R,{ssEffectsOnActive:"shrink",children:"Shrink"}),e(r.Button.Border.R,{ssEffectsOnActive:"pudding",children:"Pudding"}),e(r.Button.Border.R,{ssEffectsOnActive:"expand",children:"Expand"}),e(r.Button.Border.R,{ssEffectsOnActive:"push",children:"Push"}),e(r.Button.Border.R,{children:"corner Loader",onClick:()=>{P.fn.corner.active(),setTimeout(()=>{P.fn.corner.stop()},3e3)}})]})]})]}),Tooltips:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Tooltips"}),o(p,{padding:2,children:[o(r.Button.Prime.R,{onContextMenu:l=>{l.preventDefault(),k.open({tipsID:"testTooltips",event:l,nextToCursor:!0,gravityPoint:10,close_option:{parentBlur:!1},padding:0,freeCSS:{minWidth:12*16},content:o(p,{ssCardBox:!0,gap:0,borderRadius:"3.tone.tertiary",padding:"1/2",children:[e(r.Button.Clear.S,{color:"cloud",fontColor:"2.normal",textAlign:"left",children:"Button Label1"}),e(r.Button.Clear.S,{color:"cloud",fontColor:"2.normal",textAlign:"left",children:"Button Label2"}),e(r.Button.Clear.S,{color:"cloud",fontColor:"2.normal",textAlign:"left",children:"Button Label3"}),e(r.Button.Clear.S,{color:"cloud",fontColor:"2.normal",textAlign:"left",children:"Button Label4"}),e(r.Button.Clear.S,{color:"cloud",fontColor:"2.normal",textAlign:"left",children:"Button Label5"})]})})},children:["OpenTooltips next to cursor",e("br",{}),"( onContextMenu )"]}),e(c,{gridCols:5,gap:1,children:Array.from({length:25}).map((l,a)=>e(r.Button.Border.R,{onMouseOver:u=>{k.open({tipsID:"tips-"+(a+1),event:u,gravityPoint:a+1,close_option:{parentBlur:!1},padding:0,content:e(k.Body,{children:a},a)})},children:a+1},a))})]})]}),Snackbar:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Snackbars"}),o(s.Center,{padding:2,children:[e(r.Button.Prime.R,{onClick:()=>{G.add({secondsToClose:3,children:"hello World!!"})},children:"Add Normal Snackbar"}),e(r.Button.Prime.R,{onClick:()=>{G.add({snackID:"testSnackID1",secondsToClose:30,children:o(s.Separate,{verticalAlign:"baseline",paddingLeft:"2/3",children:["\u4E88\u7D04\u6642\u9593\u304C\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F",e(r.Button.Clear.S,{color:"white",fontColor:"posi",children:"\u5143\u306B\u623B\u3059"})]})})},children:"Notices"}),e(r.Button.Prime.R,{onClick:()=>{let l=S.uuid.gen();G.add({snackID:l,children:o(p,{padding:1,children:[o(s.Left,{verticalAlign:"top",children:[e(w,{src:i.Images.defaultIcon("user"),ssSphere:4}),e(n.Description,{children:`Some Text
68
68
  Some Text
69
- Some Text`})]}),o(s.Separate,{children:[e(r.Button.Sub.S,{color:"white",onClick:()=>{G.remove(l)},children:"\u9589\u3058\u308B"}),e(r.Anchor.Prime.S,{href:"",children:"\u8A73\u7D30"})]})]})})},children:"Message"})]})]})},V={index:()=>o(B,{children:[e(V.Types,{}),e(V.Tone,{})]}),Tone:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Tone"}),e(t,{padding:1,overflow:"auto",children:o(c,{gridCols:2,gap:2,children:[o(t,{children:[e(t,{padding:1,isBoldFont:!0,fontSize:"3.paragraph",children:"\u30FBPrime"}),o(c,{gridCols:3,padding:1,gap:1,children:[e(r.Button.Prime.R,{color:"theme",children:"theme"}),e(r.Button.Prime.R,{color:"coffee",children:"posi"}),e(r.Button.Prime.R,{color:"ninja",children:"nega"}),e(r.Button.Prime.R,{color:"droplet",children:"warn"}),e(r.Button.Prime.R,{color:"googleBlue",children:"mono"}),e(r.Button.Prime.R,{color:"poizon",children:"pozion"})]})]}),o(t,{children:[e(t,{padding:1,isBoldFont:!0,fontSize:"3.paragraph",children:"\u30FBSub"}),o(c,{gridCols:3,gap:1,padding:1,children:[e(r.Button.Sub.R,{color:"theme",children:"theme"}),e(r.Button.Sub.R,{color:"posi",children:"posi"}),e(r.Button.Sub.R,{color:"nega",children:"nega"}),e(r.Button.Sub.R,{color:"warn",children:"warn"}),e(r.Button.Sub.R,{color:"cloud",children:"cloud"})]}),o(c,{gridCols:3,gap:1,padding:1,ssCardBox:!0,backgroundColor:"dark",children:[e(r.Button.Sub.R,{color:"white",children:"white"}),e(r.Button.Sub.R,{color:"cloud",children:"cloud"})]})]}),o(t,{children:[e(t,{padding:1,isBoldFont:!0,fontSize:"3.paragraph",children:"\u30FBClear"}),o(c,{gridCols:3,gap:1,padding:1,children:[e(r.Button.Clear.R,{color:"theme",children:"theme"}),e(r.Button.Clear.R,{color:"posi",children:"posi"}),e(r.Button.Clear.R,{color:"nega",children:"nega"}),e(r.Button.Clear.R,{color:"warn",children:"warn"}),e(r.Button.Clear.R,{color:"cloud",children:"cloud"})]}),o(c,{gridCols:3,gap:1,padding:1,ssCardBox:!0,backgroundColor:"dark",children:[e(r.Button.Clear.R,{color:"white",children:"white"}),e(r.Button.Clear.R,{color:"cloud",children:"cloud"})]})]}),o(t,{children:[e(t,{padding:1,isBoldFont:!0,fontSize:"3.paragraph",children:"\u30FBFillToBorder"}),o(c,{gridCols:3,gap:1,padding:1,children:[e(r.Button.FillToBorder.R,{color:"theme",children:"theme"}),e(r.Button.FillToBorder.R,{color:"posi",children:"posi"}),e(r.Button.FillToBorder.R,{color:"nega",children:"nega"}),e(r.Button.FillToBorder.R,{color:"warn",children:"warn"})]}),o(c,{gridCols:3,gap:1,padding:1,ssCardBox:!0,backgroundColor:"dark",children:[e(r.Button.FillToBorder.R,{color:"white",children:"white"}),e(r.Button.FillToBorder.R,{color:"cloud",children:"cloud"})]})]}),o(t,{children:[e(t,{padding:1,isBoldFont:!0,fontSize:"3.paragraph",children:"\u30FBBorderToFill"}),o(c,{gridCols:3,gap:1,padding:1,children:[e(r.Button.BorderToFill.R,{color:"theme",fontColor:"nega",children:e(t,{children:"theme"})}),e(r.Button.BorderToFill.R,{color:"posi",children:"posi"}),e(r.Button.BorderToFill.R,{color:"nega",children:"nega"}),e(r.Button.BorderToFill.R,{color:"warn",children:"warn"})]}),o(c,{gridCols:3,gap:1,padding:1,ssCardBox:!0,backgroundColor:"dark",children:[e(r.Button.BorderToFill.R,{color:"white",children:"white"}),e(r.Button.BorderToFill.R,{color:"cloud",children:"cloud"})]})]}),o(t,{children:[e(t,{padding:1,isBoldFont:!0,fontSize:"3.paragraph",children:"\u30FBOthers"}),o(c,{gridCols:3,gap:1,padding:1,children:[e(r.Button.Border.R,{children:"Border"}),e(r.Button.Normal.R,{children:"Normal"}),e(r.Button.Link,{children:"Link"}),e(r.Button.Plain,{children:"Plain"})]})]})]})})]}),Types:()=>o(h,{gap:2,flexChilds:"auto",children:[o(t,{ssCardBox:!0,children:[e(n.ThirdTitle,{borderBottom:!0,padding:1,children:"\u30FBButton"}),e(t,{padding:1,overflow:"auto",children:e(F,{items:[o(B,{children:[e(r.Button.Prime.R,{children:"Button.Prime"}),"Button.Button.Prime"]}),o(B,{children:[e(r.Button.Sub.R,{children:"Button.Sub"}),"Button.Button.Sub"]}),o(B,{children:[e(r.Button.Border.R,{children:"Button.Border"}),"Button.Button.Border"]})]})})]}),o(t,{ssCardBox:!0,children:[e(n.ThirdTitle,{borderBottom:!0,padding:1,children:"\u30FBLabel"}),e(t,{padding:1,overflow:"auto",children:e(F,{ListChildCallback:({children:l})=>e(p,{gap:"1/3",padding:[1,0],horizontalAlign:"between",borderBottom:"2.normal",children:l}),items:[o(B,{children:["Button.Label.Prime",e(r.Label.Prime.R,{children:"Label.Prime"})]}),o(B,{children:["Button.Label.Sub",e(r.Label.Sub.R,{children:"Label.Sub"})]}),o(B,{children:["Button.Label.Border",e(r.Label.Border.R,{children:"Label.Border"})]})]})})]}),o(t,{ssCardBox:!0,children:[e(n.ThirdTitle,{borderBottom:!0,padding:1,children:"\u30FBAnchor"}),e(t,{padding:1,overflow:"auto",children:e(F,{ListChildCallback:({children:l})=>e(p,{gap:"1/3",padding:[1,0],horizontalAlign:"between",borderBottom:"2.normal",children:l}),items:[o(B,{children:["Button.Anchor.Prime",e(r.Anchor.Prime.R,{href:"",children:"Anchor.Prime"})]}),o(B,{children:["Button.Anchor.Sub",e(r.Anchor.Sub.R,{href:"",children:"Anchor.Sub"})]}),o(B,{children:["Button.Anchor.Border",e(r.Anchor.Border.R,{href:"",children:"Anchor.Border"})]})]})})]}),o(t,{ssCardBox:!0,children:[e(n.ThirdTitle,{borderBottom:!0,padding:1,children:"\u30FBSizes"}),o(p,{padding:2,gap:2,children:[e(s.Left,{children:e(r.Button.Prime.XS,{children:'size="XS"'})}),e(s.Left,{children:e(r.Button.Prime.S,{children:'size="S"'})}),e(s.Left,{children:e(r.Button.Prime.R,{children:'size="R"'})}),e(s.Left,{children:e(r.Button.Prime.L,{children:'size="L"'})})]})]})]})},le={index:()=>{let l=a=>e(t,M({flexCenter:!0,ssCardBox:"layer",textAlign:"center",padding:2},a));return o(p,{gap:4,children:[o(p,{children:[e(n.Paragraph,{children:"Shadows"}),o(c,{gap:2,gridCols:4,children:[e(l,{boxShadow:"0.min",children:"0.min"}),e(l,{boxShadow:"0.normal",children:"0.normal"}),e(l,{boxShadow:"0.remark",children:"0.remark"}),e(l,{boxShadow:"0.max",children:"0.max"}),e(l,{boxShadow:"1.min",children:"1.min"}),e(l,{boxShadow:"1.normal",children:"1.normal"}),e(l,{boxShadow:"1.remark",children:"1.remark"}),e(l,{boxShadow:"1.max",children:"1.max"}),e(l,{boxShadow:"2.min",children:"2.min"}),e(l,{boxShadow:"2.normal",children:"2.normal"}),e(l,{boxShadow:"2.remark",children:"2.remark"}),e(l,{boxShadow:"2.max",children:"2.max"}),e(l,{boxShadow:"3.min",children:"3.min"}),e(l,{boxShadow:"3.normal",children:"3.normal"}),e(l,{boxShadow:"3.remark",children:"3.remark"}),e(l,{boxShadow:"3.max",children:"3.max"}),e(l,{boxShadow:"4.min",children:"4.min"}),e(l,{boxShadow:"4.normal",children:"4.normal"}),e(l,{boxShadow:"4.remark",children:"4.remark"}),e(l,{boxShadow:"4.max",children:"4.max"}),e(l,{boxShadow:"5.min",children:"5.min"}),e(l,{boxShadow:"5.normal",children:"5.normal"}),e(l,{boxShadow:"5.remark",children:"5.remark"}),e(l,{boxShadow:"5.max",children:"5.max"})]})]}),o(p,{children:[e(n.Paragraph,{children:"Inset Shadows"}),o(c,{gap:2,gridCols:4,children:[e(l,{boxShadow:"0.min.inset",children:"0.min.inset"}),e(l,{boxShadow:"0.normal.inset",children:"0.normal.inset"}),e(l,{boxShadow:"0.remark.inset",children:"0.remark.inset"}),e(l,{boxShadow:"0.max.inset",children:"0.max.inset"}),e(l,{boxShadow:"1.min.inset",children:"1.min.inset"}),e(l,{boxShadow:"1.normal.inset",children:"1.normal.inset"}),e(l,{boxShadow:"1.remark.inset",children:"1.remark.inset"}),e(l,{boxShadow:"1.max.inset",children:"1.max.inset"}),e(l,{boxShadow:"2.min.inset",children:"2.min.inset"}),e(l,{boxShadow:"2.normal.inset",children:"2.normal.inset"}),e(l,{boxShadow:"2.remark.inset",children:"2.remark.inset"}),e(l,{boxShadow:"2.max.inset",children:"2.max.inset"}),e(l,{boxShadow:"3.min.inset",children:"3.min.inset"}),e(l,{boxShadow:"3.normal.inset",children:"3.normal.inset"}),e(l,{boxShadow:"3.remark.inset",children:"3.remark.inset"}),e(l,{boxShadow:"3.max.inset",children:"3.max.inset"})]})]})]})}},ne=()=>{const l={Basic:()=>o(t,{ssCardBox:!0,children:[e(n.Paragraph,{borderBottom:!0,padding:1,children:"TextInput"}),o(p,{padding:1,gap:2,children:[o(s.Separate,{marginBottom:2,children:[e(n.Description,{children:`<Input.Text
69
+ Some Text`})]}),o(s.Separate,{children:[e(r.Button.Sub.S,{color:"white",onClick:()=>{G.remove(l)},children:"\u9589\u3058\u308B"}),e(r.Anchor.Prime.S,{href:"",children:"\u8A73\u7D30"})]})]})})},children:"Message"})]})]})},V={index:()=>o(B,{children:[e(V.Types,{}),e(V.Tone,{})]}),Tone:()=>o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Tone"}),e(t,{padding:1,overflow:"auto",children:o(c,{gridCols:2,gap:2,children:[o(t,{children:[e(t,{padding:1,isBoldFont:!0,fontSize:"3.paragraph",children:"\u30FBPrime"}),o(c,{gridCols:3,padding:1,gap:1,children:[e(r.Button.Prime.R,{color:"theme",children:"theme"}),e(r.Button.Prime.R,{color:"coffee",children:"posi"}),e(r.Button.Prime.R,{color:"ninja",children:"nega"}),e(r.Button.Prime.R,{color:"droplet",children:"warn"}),e(r.Button.Prime.R,{color:"googleBlue",children:"mono"}),e(r.Button.Prime.R,{color:"poizon",children:"pozion"})]})]}),o(t,{children:[e(t,{padding:1,isBoldFont:!0,fontSize:"3.paragraph",children:"\u30FBSub"}),o(c,{gridCols:3,gap:1,padding:1,children:[e(r.Button.Sub.R,{color:"theme",children:"theme"}),e(r.Button.Sub.R,{color:"posi",children:"posi"}),e(r.Button.Sub.R,{color:"nega",children:"nega"}),e(r.Button.Sub.R,{color:"warn",children:"warn"}),e(r.Button.Sub.R,{color:"cloud",children:"cloud"})]}),o(c,{gridCols:3,gap:1,padding:1,ssCardBox:!0,backgroundColor:"dark",children:[e(r.Button.Sub.R,{color:"white",children:"white"}),e(r.Button.Sub.R,{color:"cloud",children:"cloud"})]})]}),o(t,{children:[e(t,{padding:1,isBoldFont:!0,fontSize:"3.paragraph",children:"\u30FBClear"}),o(c,{gridCols:3,gap:1,padding:1,children:[e(r.Button.Clear.R,{color:"theme",children:"theme"}),e(r.Button.Clear.R,{color:"posi",children:"posi"}),e(r.Button.Clear.R,{color:"nega",children:"nega"}),e(r.Button.Clear.R,{color:"warn",children:"warn"}),e(r.Button.Clear.R,{color:"cloud",children:"cloud"})]}),o(c,{gridCols:3,gap:1,padding:1,ssCardBox:!0,backgroundColor:"dark",children:[e(r.Button.Clear.R,{color:"white",children:"white"}),e(r.Button.Clear.R,{color:"cloud",children:"cloud"})]})]}),o(t,{children:[e(t,{padding:1,isBoldFont:!0,fontSize:"3.paragraph",children:"\u30FBFillToBorder"}),o(c,{gridCols:3,gap:1,padding:1,children:[e(r.Button.FillToBorder.R,{color:"theme",children:"theme"}),e(r.Button.FillToBorder.R,{color:"posi",children:"posi"}),e(r.Button.FillToBorder.R,{color:"nega",children:"nega"}),e(r.Button.FillToBorder.R,{color:"warn",children:"warn"})]}),o(c,{gridCols:3,gap:1,padding:1,ssCardBox:!0,backgroundColor:"dark",children:[e(r.Button.FillToBorder.R,{color:"white",children:"white"}),e(r.Button.FillToBorder.R,{color:"cloud",children:"cloud"})]})]}),o(t,{children:[e(t,{padding:1,isBoldFont:!0,fontSize:"3.paragraph",children:"\u30FBBorderToFill"}),o(c,{gridCols:3,gap:1,padding:1,children:[e(r.Button.BorderToFill.R,{color:"theme",fontColor:"nega",children:e(t,{children:"theme"})}),e(r.Button.BorderToFill.R,{color:"posi",children:"posi"}),e(r.Button.BorderToFill.R,{color:"nega",children:"nega"}),e(r.Button.BorderToFill.R,{color:"warn",children:"warn"})]}),o(c,{gridCols:3,gap:1,padding:1,ssCardBox:!0,backgroundColor:"dark",children:[e(r.Button.BorderToFill.R,{color:"white",children:"white"}),e(r.Button.BorderToFill.R,{color:"cloud",children:"cloud"})]})]}),o(t,{children:[e(t,{padding:1,isBoldFont:!0,fontSize:"3.paragraph",children:"\u30FBOthers"}),o(c,{gridCols:3,gap:1,padding:1,children:[e(r.Button.Border.R,{children:"Border"}),e(r.Button.Normal.R,{children:"Normal"}),e(r.Button.Link,{children:"Link"}),e(r.Button.Plain,{children:"Plain"})]})]})]})})]}),Types:()=>o(h,{gap:2,flexChilds:"auto",children:[o(t,{ssCardBox:!0,children:[e(n.ThirdTitle,{borderBottom:!0,padding:1,children:"\u30FBButton"}),e(t,{padding:1,overflow:"auto",children:e(y,{items:[o(B,{children:[e(r.Button.Prime.R,{children:"Button.Prime"}),"Button.Button.Prime"]}),o(B,{children:[e(r.Button.Sub.R,{children:"Button.Sub"}),"Button.Button.Sub"]}),o(B,{children:[e(r.Button.Border.R,{children:"Button.Border"}),"Button.Button.Border"]})]})})]}),o(t,{ssCardBox:!0,children:[e(n.ThirdTitle,{borderBottom:!0,padding:1,children:"\u30FBLabel"}),e(t,{padding:1,overflow:"auto",children:e(y,{ListChildCallback:({children:l})=>e(p,{gap:"1/3",padding:[1,0],horizontalAlign:"between",borderBottom:"2.normal",children:l}),items:[o(B,{children:["Button.Label.Prime",e(r.Label.Prime.R,{children:"Label.Prime"})]}),o(B,{children:["Button.Label.Sub",e(r.Label.Sub.R,{children:"Label.Sub"})]}),o(B,{children:["Button.Label.Border",e(r.Label.Border.R,{children:"Label.Border"})]})]})})]}),o(t,{ssCardBox:!0,children:[e(n.ThirdTitle,{borderBottom:!0,padding:1,children:"\u30FBAnchor"}),e(t,{padding:1,overflow:"auto",children:e(y,{ListChildCallback:({children:l})=>e(p,{gap:"1/3",padding:[1,0],horizontalAlign:"between",borderBottom:"2.normal",children:l}),items:[o(B,{children:["Button.Anchor.Prime",e(r.Anchor.Prime.R,{href:"",children:"Anchor.Prime"})]}),o(B,{children:["Button.Anchor.Sub",e(r.Anchor.Sub.R,{href:"",children:"Anchor.Sub"})]}),o(B,{children:["Button.Anchor.Border",e(r.Anchor.Border.R,{href:"",children:"Anchor.Border"})]})]})})]}),o(t,{ssCardBox:!0,children:[e(n.ThirdTitle,{borderBottom:!0,padding:1,children:"\u30FBSizes"}),o(p,{padding:2,gap:2,children:[e(s.Left,{children:e(r.Button.Prime.XS,{children:'size="XS"'})}),e(s.Left,{children:e(r.Button.Prime.S,{children:'size="S"'})}),e(s.Left,{children:e(r.Button.Prime.R,{children:'size="R"'})}),e(s.Left,{children:e(r.Button.Prime.L,{children:'size="L"'})})]})]})]})},le={index:()=>{let l=a=>e(t,M({flexCenter:!0,ssCardBox:"layer",textAlign:"center",padding:2},a));return o(p,{gap:4,children:[o(p,{children:[e(n.Paragraph,{children:"Shadows"}),o(c,{gap:2,gridCols:4,children:[e(l,{boxShadow:"0.min",children:"0.min"}),e(l,{boxShadow:"0.normal",children:"0.normal"}),e(l,{boxShadow:"0.remark",children:"0.remark"}),e(l,{boxShadow:"0.max",children:"0.max"}),e(l,{boxShadow:"1.min",children:"1.min"}),e(l,{boxShadow:"1.normal",children:"1.normal"}),e(l,{boxShadow:"1.remark",children:"1.remark"}),e(l,{boxShadow:"1.max",children:"1.max"}),e(l,{boxShadow:"2.min",children:"2.min"}),e(l,{boxShadow:"2.normal",children:"2.normal"}),e(l,{boxShadow:"2.remark",children:"2.remark"}),e(l,{boxShadow:"2.max",children:"2.max"}),e(l,{boxShadow:"3.min",children:"3.min"}),e(l,{boxShadow:"3.normal",children:"3.normal"}),e(l,{boxShadow:"3.remark",children:"3.remark"}),e(l,{boxShadow:"3.max",children:"3.max"}),e(l,{boxShadow:"4.min",children:"4.min"}),e(l,{boxShadow:"4.normal",children:"4.normal"}),e(l,{boxShadow:"4.remark",children:"4.remark"}),e(l,{boxShadow:"4.max",children:"4.max"}),e(l,{boxShadow:"5.min",children:"5.min"}),e(l,{boxShadow:"5.normal",children:"5.normal"}),e(l,{boxShadow:"5.remark",children:"5.remark"}),e(l,{boxShadow:"5.max",children:"5.max"})]})]}),o(p,{children:[e(n.Paragraph,{children:"Inset Shadows"}),o(c,{gap:2,gridCols:4,children:[e(l,{boxShadow:"0.min.inset",children:"0.min.inset"}),e(l,{boxShadow:"0.normal.inset",children:"0.normal.inset"}),e(l,{boxShadow:"0.remark.inset",children:"0.remark.inset"}),e(l,{boxShadow:"0.max.inset",children:"0.max.inset"}),e(l,{boxShadow:"1.min.inset",children:"1.min.inset"}),e(l,{boxShadow:"1.normal.inset",children:"1.normal.inset"}),e(l,{boxShadow:"1.remark.inset",children:"1.remark.inset"}),e(l,{boxShadow:"1.max.inset",children:"1.max.inset"}),e(l,{boxShadow:"2.min.inset",children:"2.min.inset"}),e(l,{boxShadow:"2.normal.inset",children:"2.normal.inset"}),e(l,{boxShadow:"2.remark.inset",children:"2.remark.inset"}),e(l,{boxShadow:"2.max.inset",children:"2.max.inset"}),e(l,{boxShadow:"3.min.inset",children:"3.min.inset"}),e(l,{boxShadow:"3.normal.inset",children:"3.normal.inset"}),e(l,{boxShadow:"3.remark.inset",children:"3.remark.inset"}),e(l,{boxShadow:"3.max.inset",children:"3.max.inset"})]})]})]})}},ne=()=>{const l={Basic:()=>o(t,{ssCardBox:!0,children:[e(n.Paragraph,{borderBottom:!0,padding:1,children:"TextInput"}),o(p,{padding:1,gap:2,children:[o(s.Separate,{marginBottom:2,children:[e(n.Description,{children:`<Input.Text
70
70
  required
71
71
  value={ 'hello React!!' }
72
- />`}),e(d.TextField,{label:"testInputLabel",required:!0,value:"helloReact"})]}),o(s.Center,{flexChilds:"even",backgroundColor:"nega",paddingTop:2,freeCSS:{maxWidth:312},children:[e(d.TextField,{tone:"cloud",label:"FirstName - \u540D",name:"firstName",required:!0}),e(d.TextField,{tone:"cloud",label:"LastName - \u59D3",name:"lastName",required:!0})]}),e(d.TextField.Email,{label:"Input.TextField.Email",autoComplete:"off",name:"emailInput",value:"******@gmail.com"}),e(d.TextField.Number,{label:"Input.TextField.Number",value:"324"}),e(d.TextField,{label:"Input.TextField (number.zeroStart)",restrict:"number.zeroStart",value:"0324"}),o(t,{children:["Input.DigitCharacters",e(d.DigitCharacters,{numericOnly:!0,value:"0324",digits:6})]}),e(d.TextField.Tel,{label:"Input.TextField.Tel",value:"080-6995-2229"}),e(d.TextField.Money.JPY,{value:"3000",placeholder:"\u91D1\u984D",label:"Input.TextField.Money.JPY"}),e(d.TextField.Url,{label:"Input.TextField.Url",value:"http://google.com"}),o(t,{children:[o(s.Right,{verticalAlign:"unset",children:[e(t,{flexSizing:0,children:e(d.TextField.Postal,{label:"Input.TextField.Postal",override:"force"})}),e(r.Button.Border.R,{onClick:()=>A(void 0,null,function*(){}),children:"\u73FE\u5728\u5730\u3092\u53D6\u5F97"})]}),e(t,{id:"postalResult",padding:1,textAlign:"left"})]}),e(d.TextField.Password,{label:"Input.TextField.Password",value:"onigiriUmai"}),e(d.TextField,{label:"Input.TextField (multiline)",multiline:!0,autoHeight:!1,value:`text1
72
+ />`}),e(d.TextField,{label:"testInputLabel",required:!0,value:"helloReact"})]}),e(d.TextField.Email,{label:"Input.TextField.Email",autoComplete:"off",name:"emailInput",value:"******@gmail.com"}),e(d.TextField.Number,{label:"Input.TextField.Number",value:"324"}),e(d.TextField,{label:"Input.TextField (number.zeroStart)",restrict:"number.zeroStart",value:"0324"}),o(t,{children:["Input.DigitCharacters",e(d.DigitCharacters,{numericOnly:!0,value:"0324",digits:6})]}),e(d.TextField.Tel,{label:"Input.TextField.Tel",value:"080-6995-2229"}),e(d.TextField.Money.JPY,{value:"3000",placeholder:"\u91D1\u984D",label:"Input.TextField.Money.JPY"}),e(d.TextField.Url,{label:"Input.TextField.Url",value:"http://google.com"}),o(t,{children:[o(s.Right,{verticalAlign:"unset",children:[e(t,{flexSizing:0,children:e(d.TextField.Postal,{label:"Input.TextField.Postal",override:"force"})}),e(r.Button.Border.R,{onClick:()=>A(void 0,null,function*(){}),children:"\u73FE\u5728\u5730\u3092\u53D6\u5F97"})]}),e(t,{id:"postalResult",padding:1,textAlign:"left"})]}),e(d.TextField.Password,{label:"Input.TextField.Password",value:"onigiriUmai"}),e(d.TextField,{label:"Input.TextField (multiline)",multiline:!0,autoHeight:!1,value:`text1
73
73
  text2
74
74
  text3
75
75
  text4
76
- text5`,minRows:5}),e(d.TextField,{label:"Input.TextField (autoHeight) (multiline)",multiline:!0,autoHeight:!0,value:"",freeCSS:{minHeight:72},onUpdateValidValue:a=>{console.log(a)}})]})]}),Time:()=>e(B,{children:o(t,{ssCardBox:!0,children:[e(n.Paragraph,{borderBottom:!0,padding:1,children:"Time Input"}),e(t,{padding:1,children:o(p,{gap:1.5,children:[e(d.Time.Clock,{label:"Input.Time.Clock"}),e(d.Time.Date,{label:"Input.Time.Date"}),e(d.Time.Week,{label:"Input.Time.Week"}),e(d.Time.Month,{label:"Input.Time.Month"}),e(d.Time.Year,{label:"Input.Time.Year"}),e(d.Time.Periods.Date,{label:"Input.Time.Periods.Date"}),e(d.Time.Periods.Month,{label:"Input.Time.Periods.Month"}),e(d.Time.DateWareki,{label:"Input.Time.DateWareki"}),e(t,{children:e(d.Select,{label:"Input.TimePicker",id:"timePicker",options:[{value:"clock",label:"clock"},{value:"date",label:"date"},{value:"week",label:"week"},{value:"month",label:"month"},{value:"year",label:"year"},{value:"dates",label:"dates"},{value:"months",label:"months"},{value:"dateWareki",label:"dateWareki"}],onUpdateValidValue:({value:a})=>{d.Time.fn.picker.launch({parent:"#timePicker",restrict:a,defaultValue:"",onValueUpdate:u=>{console.log(u)}})}})})]})})]})}),List:()=>e(B,{children:o(t,{ssCardBox:!0,children:[e(n.Paragraph,{borderBottom:!0,padding:1,children:"Radio & Checkbox Input"}),e(t,{padding:1,children:o(p,{children:[o(h,{gap:2,flexChilds:"auto",children:[o(t,{children:["Input.Checkbox",e(d.Checkbox,{value:[2,"3"],minSelect:2,options:[{value:"1",label:"Option1"},{value:"2",label:"Option2"},{value:"3",label:"Option3"}]})]}),o(t,{children:["Input.Radio",e(d.Radio,{value:[1],options:[{value:1,label:"Option1"},{value:2,label:"Option2"},{value:3,label:"Option3"},{value:4,label:"Option4"},{value:5,label:"Option5"}]})]}),o(t,{children:["CustomIcon",e(d.Radio,{value:[1],options:[{value:1,label:"Option1"},{value:2,label:"Option2"},{value:3,label:"Option3"}],CustomIcon:a=>o(r.Button.Normal.S,{ssPushable:!0,color:"cloud",tabIndex:-1,ssEffectsOnActive:"ripple.cloud",isRounded:!0,fontSize:"3.paragraph",fontColor:a.isChecked?"theme":"5.translucent",onClick:u=>{u.preventDefault(),u.stopPropagation(),a.toggle()},children:[e(g.Heart,{})," 3"]})})]})]}),o(p,{children:[e(n.Paragraph,{children:"Tones"}),o(p,{children:[o(t,{children:["Plain",e(d.Radio,{value:[1],gap:1,options:[{value:1,label:"Option1"},{value:2,label:"Option2"},{value:3,label:"Option3"}]})]}),o(t,{children:["Plain icon={ false }",e(d.Checkbox,{icon:!1,cellStyles:{padding:["1/3","2/3"],isRounded:!0},cellCheckedStyles:{fontColor:"theme"},value:[2,"3"],minSelect:2,hideInput:!0,options:[{value:"1",label:"Option1"},{value:"2",label:"Option2"},{value:"3",label:"Option3"}]})]}),o(t,{children:["Normal",e(d.Checkbox.Normal,{value:[2,"3"],minSelect:2,hideInput:!0,options:[{value:"1",label:"Option1"},{value:"2",label:"Option2"},{value:"3",label:"Option3"}]})]}),o(t,{children:["Cloud",e(d.Checkbox.Cloud,{value:[1],options:[{value:1,label:"Option1"},{value:2,label:"Option2"},{value:3,label:"Option3"}]})]}),o(t,{children:["Border",e(d.Radio.Border,{value:[1],options:[{value:1,label:"Option1"},{value:2,label:"Option2"},{value:3,label:"Option3"}]})]})]})]})]})})]})}),Select:()=>e(B,{children:o(t,{ssCardBox:!0,children:[e(n.Paragraph,{borderBottom:!0,padding:1,children:"Select,Autocomplete Input"}),o(p,{padding:1,gap:1.5,children:[e(d.Select,{label:"Input.Select",required:!0,value:3,options:[{value:1,label:"option1"},{value:2,label:"option2"},{value:3,label:"option3a"},{value:4,label:"option4"}]}),e(d.Search,{label:"Input.Search",required:!0,options:[{value:1,label:"1"},{value:{value1:2,value2:3},label:"Object"},{value:3,label:"3"},{value:101,label:"101"},{value:102,label:"102"}],DynamicOptionsOnSearch:(...a)=>A(void 0,null,function*(){let u=[];for(let x=0;x<100;x++)u.push({value:x,label:String(x)});return u})}),e(d.Autocomplete,{label:"Input.Autocomplete",value:[4],options:[{value:1,label:"X-men"},{value:2,label:"\u30B7\u30E7\u30FC\u30B7\u30E3\u30F3\u30AF\u306E\u7A7A"},{value:3,label:"\u30B9\u30BF\u30FC\u30A6\u30A9\u30FC\u30BA"},{value:4,label:"\u30B4\u30C3\u30C9\u30D5\u30A1\u30FC\u30B6\u30FC: Part II"},{value:5,label:"\u30B4\u30C3\u30C9\u30D5\u30A1\u30FC\u30B6\u30FC: Part III"},{value:6,label:"\u30A4\u30F3\u30BB\u30D7\u30B7\u30E7\u30F3"}],onUpdateValidValue:({value:a})=>{console.log(a)}})]})]})}),Segmented:()=>o(t,{ssCardBox:!0,children:[e(n.ThirdTitle,{borderBottom:!0,padding:1,children:"Segmented"}),o(p,{padding:2,gap:2,children:[e(s.Left,{children:e(d.Segmented,{value:1,options:[{value:0,label:"Home"},{value:1,label:"Notice"},{value:2,label:"Posts"},{value:3,label:"Settings"}]})}),e(s.Left,{children:e(d.Segmented.Cloud,{value:1,options:[{value:0,label:e(g.AngleLeft,{})},{value:1,label:e(g.AngleRight,{})},{value:2,label:e(g.AngleUp,{})},{value:3,label:e(g.AngleDown,{})}]})}),e(s.Left,{children:e(d.Segmented.CloudTheme,{value:1,options:[{value:0,label:e(g.AngleLeft,{})},{value:1,label:e(g.AngleRight,{})},{value:2,label:e(g.AngleUp,{})},{value:3,label:e(g.AngleDown,{})}]})}),e(s.Left,{children:e(d.Segmented.CloudMono,{value:1,options:[{value:0,label:e(g.AngleLeft,{})},{value:1,label:e(g.AngleRight,{})},{value:2,label:e(g.AngleUp,{})},{value:3,label:e(g.AngleDown,{})}]})}),e(s.Left,{children:e(d.Segmented.Border,{value:1,options:[{value:0,label:"On"},{value:1,label:"Off"}]})}),e(s.Left,{children:e(d.Segmented.BorderVivid,{value:1,options:[{value:0,label:"On"},{value:1,label:"Off"}]})}),e(s.Left,{borderBottom:!0,children:e(d.Segmented.Bottomline,{value:1,options:[{value:0,label:"Takana"},{value:1,label:"Mentai"},{value:2,label:"Mayo"},{value:3,label:"Gyudon"}]})})]})]}),Variables:()=>e(B,{children:o(t,{ssCardBox:!0,children:[e(n.Paragraph,{borderBottom:!0,padding:1,children:"Variables"}),e(t,{padding:1,children:e(p,{children:o(h,{gap:2,flexChilds:"auto",children:[o(t,{children:["Input.File",e(d.Filer,{limit:3,onUpdateValidValue:({value:a})=>{console.log(a[0])}})]}),o(t,{children:["Input.Switch",o(h,{gap:2,children:[e(d.Switch,{}),e(d.Switch,{appearance:"applely",color:"icicles",value:!0}),e(d.Switch,{appearance:"applely",icon:e(g.Check,{}),color:"warn",value:!0})]})]}),o(t,{flexNewLine:!0,children:["Input.Slider",e(d.Slider,{color:"battery",name:"sliderInput",value:40,step:10,min:0,max:100})]})]})})})]})})};return e(B,{children:e(H,{size:"L",children:o(c,{gridCols:2,gap:2,children:[e(l.Basic,{}),e(l.Select,{}),e(l.Time,{}),e(l.List,{}),e(l.Segmented,{}),e(l.Variables,{})]})})})},ae=()=>{const l=a=>{let u="testModal2";b.open({type:a,sheetID:u,size:"S",padding:2,content:o(b.Body,{padding:1,children:[e(t,{padding:2,children:"Content"}),e(s.Right,{children:e(r.Button.Prime.R,{onClick:()=>{b.close(u)},children:"\u9589\u3058\u308B"})})]})})};return o(B,{children:[o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"CardBox"}),e(t,{padding:1,overflow:"auto",children:e(n.Description,{children:`<Box styles={{ssCardBox:true}}>
76
+ text5`,minRows:5}),e(d.TextField,{label:"Input.TextField (autoHeight) (multiline)",multiline:!0,autoHeight:!0,value:"",freeCSS:{minHeight:72},onUpdateValidValue:a=>{console.log(a)}})]})]}),Time:()=>e(B,{children:o(t,{ssCardBox:!0,children:[e(n.Paragraph,{borderBottom:!0,padding:1,children:"Time Input"}),e(t,{padding:1,children:o(p,{gap:1.5,children:[e(d.Time.Clock,{label:"Input.Time.Clock"}),e(d.Time.Date,{label:"Input.Time.Date"}),e(d.Time.Week,{label:"Input.Time.Week"}),e(d.Time.Month,{label:"Input.Time.Month"}),e(d.Time.Year,{label:"Input.Time.Year"}),e(d.Time.Periods.Date,{label:"Input.Time.Periods.Date"}),e(d.Time.Periods.Month,{label:"Input.Time.Periods.Month"}),e(d.Time.DateWareki,{label:"Input.Time.DateWareki"}),e(t,{children:e(d.Select,{label:"Input.TimePicker",id:"timePicker",options:[{value:"clock",label:"clock"},{value:"date",label:"date"},{value:"week",label:"week"},{value:"month",label:"month"},{value:"year",label:"year"},{value:"dates",label:"dates"},{value:"months",label:"months"},{value:"dateWareki",label:"dateWareki"}],onUpdateValidValue:({value:a})=>{d.Time.fn.picker.launch({parent:"#timePicker",restrict:a,defaultValue:"",onValueUpdate:u=>{console.log(u)}})}})})]})})]})}),List:()=>e(B,{children:o(t,{ssCardBox:!0,children:[e(n.Paragraph,{borderBottom:!0,padding:1,children:"Radio & Checkbox Input"}),e(t,{padding:1,children:o(p,{children:[o(h,{gap:2,flexChilds:"auto",children:[o(t,{children:["Input.Checkbox",e(d.Checkbox,{value:[2,"3"],minSelect:2,options:[{value:"1",label:"Option1"},{value:"2",label:"Option2"},{value:"3",label:"Option3"}]})]}),o(t,{children:["Input.Radio",e(d.Radio,{value:[1],options:[{value:1,label:"Option1"},{value:2,label:"Option2"},{value:3,label:"Option3"},{value:4,label:"Option4"},{value:5,label:"Option5"}]})]}),o(t,{children:["CustomIcon",e(d.Radio,{value:[1],options:[{value:1,label:"Option1"},{value:2,label:"Option2"},{value:3,label:"Option3"}],CustomIcon:a=>o(r.Button.Normal.S,{ssPushable:!0,color:"cloud",tabIndex:-1,ssEffectsOnActive:"ripple.cloud",isRounded:!0,fontSize:"3.paragraph",fontColor:a.isChecked?"theme":"5.translucent",onClick:u=>{u.preventDefault(),u.stopPropagation(),a.toggle()},children:[e(x.Heart,{})," 3"]})})]})]}),o(p,{children:[e(n.Paragraph,{children:"Tones"}),o(p,{children:[o(t,{children:["Plain",e(d.Radio,{value:[1],gap:1,options:[{value:1,label:"Option1"},{value:2,label:"Option2"},{value:3,label:"Option3"}]})]}),o(t,{children:["Plain icon={ false }",e(d.Checkbox,{icon:!1,cellStyles:{padding:["1/3","2/3"],isRounded:!0},cellCheckedStyles:{fontColor:"theme"},value:[2,"3"],minSelect:2,hideInput:!0,options:[{value:"1",label:"Option1"},{value:"2",label:"Option2"},{value:"3",label:"Option3"}]})]}),o(t,{children:["Simple",e(d.Checkbox.Simple,{value:[2,"3"],minSelect:2,hideInput:!0,options:[{value:"1",label:"Option1"},{value:"2",label:"Option2"},{value:"3",label:"Option3"}]})]}),o(t,{children:["Normal",e(d.Checkbox.Normal,{value:[2,"3"],minSelect:2,hideInput:!0,options:[{value:"1",label:"Option1"},{value:"2",label:"Option2"},{value:"3",label:"Option3"}]})]}),o(t,{children:["Vivid",e(d.Checkbox.Vivid,{value:[2,"3"],minSelect:2,hideInput:!0,options:[{value:"1",label:"Option1"},{value:"2",label:"Option2"},{value:"3",label:"Option3"}]})]}),o(t,{children:["Cloud",e(d.Checkbox.Cloud,{value:[1],options:[{value:1,label:"Option1"},{value:2,label:"Option2"},{value:3,label:"Option3"}]})]}),o(t,{children:["Border",e(d.Radio.Border,{value:[1],options:[{value:1,label:"Option1"},{value:2,label:"Option2"},{value:3,label:"Option3"}]})]})]})]})]})})]})}),Select:()=>e(B,{children:o(t,{ssCardBox:!0,children:[e(n.Paragraph,{borderBottom:!0,padding:1,children:"Select,Autocomplete Input"}),o(p,{padding:2,gap:1.5,children:[e(d.Select,{label:"Input.Select",required:!0,value:3,options:[{value:1,label:"option1"},{value:2,label:"option2"},{value:3,label:"option3a"},{value:4,label:"option4"}]}),e(d.Search,{label:"Input.Search",required:!0,options:[{value:1,label:"1"},{value:{value1:2,value2:3},label:"Object"},{value:3,label:"3"},{value:101,label:"101"},{value:102,label:"102"}],DynamicOptionsOnSearch:(...a)=>A(void 0,null,function*(){let u=[];for(let g=0;g<100;g++)u.push({value:g,label:String(g)});return u})}),e(d.Autocomplete,{label:"Input.Autocomplete",SelectorGravityPoint:6,max:2,value:[4],options:[{value:1,label:"X-men"},{value:2,label:"\u30B7\u30E7\u30FC\u30B7\u30E3\u30F3\u30AF\u306E\u7A7A"},{value:3,label:"\u30B9\u30BF\u30FC\u30A6\u30A9\u30FC\u30BA"},{value:4,label:"\u30B4\u30C3\u30C9\u30D5\u30A1\u30FC\u30B6\u30FC: Part II"},{value:5,label:"\u30B4\u30C3\u30C9\u30D5\u30A1\u30FC\u30B6\u30FC: Part III"},{value:6,label:"\u30A4\u30F3\u30BB\u30D7\u30B7\u30E7\u30F3"}],onUpdateValidValue:({value:a})=>{console.log(a)}})]})]})}),Segmented:()=>o(t,{ssCardBox:!0,children:[e(n.ThirdTitle,{borderBottom:!0,padding:1,children:"Segmented"}),o(p,{padding:2,gap:2,children:[e(s.Left,{children:e(d.Segmented,{value:1,options:[{value:0,label:"Home"},{value:1,label:"Notice"},{value:2,label:"Posts"},{value:3,label:"Settings"}]})}),e(s.Left,{children:e(d.Segmented.Cloud,{value:1,options:[{value:0,label:e(x.AngleLeft,{})},{value:1,label:e(x.AngleRight,{})},{value:2,label:e(x.AngleUp,{})},{value:3,label:e(x.AngleDown,{})}]})}),e(s.Left,{children:e(d.Segmented.CloudTheme,{value:1,options:[{value:0,label:e(x.AngleLeft,{})},{value:1,label:e(x.AngleRight,{})},{value:2,label:e(x.AngleUp,{})},{value:3,label:e(x.AngleDown,{})}]})}),e(s.Left,{children:e(d.Segmented.CloudMono,{value:1,options:[{value:0,label:e(x.AngleLeft,{})},{value:1,label:e(x.AngleRight,{})},{value:2,label:e(x.AngleUp,{})},{value:3,label:e(x.AngleDown,{})}]})}),e(s.Left,{children:e(d.Segmented.Border,{value:1,options:[{value:0,label:"On"},{value:1,label:"Off"}]})}),e(s.Left,{children:e(d.Segmented.BorderVivid,{value:1,options:[{value:0,label:"On"},{value:1,label:"Off"}]})}),e(s.Left,{borderBottom:!0,children:e(d.Segmented.Bottomline,{value:1,options:[{value:0,label:"Takana"},{value:1,label:"Mentai"},{value:2,label:"Mayo"},{value:3,label:"Gyudon"}]})})]})]}),Variables:()=>e(B,{children:o(t,{ssCardBox:!0,children:[e(n.Paragraph,{borderBottom:!0,padding:1,children:"Variables"}),e(t,{padding:1,children:e(p,{children:o(h,{gap:2,flexChilds:"auto",children:[o(t,{children:["Input.File",e(d.Filer,{limit:3,onUpdateValidValue:({value:a})=>{console.log(a[0])}})]}),o(t,{children:["Input.Switch",o(h,{gap:2,children:[e(d.Switch,{}),e(d.Switch,{appearance:"applely",color:"icicles",value:!0}),e(d.Switch,{appearance:"applely",icon:e(x.Check,{}),color:"warn",value:!0})]})]}),o(t,{flexNewLine:!0,children:["Input.Slider",e(d.Slider,{color:"battery",name:"sliderInput",value:40,step:10,min:0,max:100})]})]})})})]})})};return e(B,{children:e(H,{size:"L",children:o(c,{gridCols:2,gap:2,children:[e(l.Basic,{}),e(l.Select,{}),e(l.Time,{}),e(l.List,{}),e(l.Segmented,{}),e(l.Variables,{})]})})})},ae=()=>{const l=a=>{let u="testModal2";b.open({type:a,sheetID:u,size:"S",padding:2,content:o(b.Body,{padding:1,children:[e(t,{padding:2,children:"Content"}),e(s.Right,{children:e(r.Button.Prime.R,{onClick:()=>{b.close(u)},children:"\u9589\u3058\u308B"})})]})})};return o(B,{children:[o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"CardBox"}),e(t,{padding:1,overflow:"auto",children:e(n.Description,{children:`<Box styles={{ssCardBox:true}}>
77
77
  <Box>
78
78
  Header
79
79
  </Box>
@@ -91,9 +91,9 @@ text5`,minRows:5}),e(d.TextField,{label:"Input.TextField (autoHeight) (multiline
91
91
  content: RightSideReactComponent
92
92
  }
93
93
  ] }
94
- />`})}),e(t,{padding:2,overflow:"auto",children:o(F,{ssCardBox:!0,padding:1,children:[o(O.Left,{children:[e(t,{padding:"1/2",backgroundColor:"cloud",children:"Left"}),e(t,{padding:"1/2",backgroundColor:"cloud",flexSizing:0,children:"Right"})]}),o(O.Right,{children:[e(t,{padding:"1/2",backgroundColor:"cloud",flexSizing:0,children:"Left"}),e(t,{padding:"1/2",backgroundColor:"cloud",children:"Right"})]}),o(O.Separate,{children:[e(t,{padding:"1/2",backgroundColor:"cloud",children:"Left"}),e(t,{padding:"1/2",backgroundColor:"cloud",children:"Right"})]}),o(O.Center,{gap:"1/4",children:[e(t,{padding:"1/2",backgroundColor:"cloud",flexGrid:1,children:"1"}),e(t,{padding:"1/2",backgroundColor:"cloud",flexGrid:3,children:"3"}),e(t,{padding:"1/2",backgroundColor:"cloud",flexGrid:2,children:"2"})]})]})})]}),o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Sheet"}),e(t,{padding:1,overflow:"auto",children:e(n.Description,{children:`Sheet.open( {
94
+ />`})}),e(t,{padding:2,overflow:"auto",children:o(y,{ssCardBox:!0,padding:1,children:[o(O.Left,{children:[e(t,{padding:"1/2",backgroundColor:"cloud",children:"Left"}),e(t,{padding:"1/2",backgroundColor:"cloud",flexSizing:0,children:"Right"})]}),o(O.Right,{children:[e(t,{padding:"1/2",backgroundColor:"cloud",flexSizing:0,children:"Left"}),e(t,{padding:"1/2",backgroundColor:"cloud",children:"Right"})]}),o(O.Separate,{children:[e(t,{padding:"1/2",backgroundColor:"cloud",children:"Left"}),e(t,{padding:"1/2",backgroundColor:"cloud",children:"Right"})]}),o(O.Center,{gap:"1/4",children:[e(t,{padding:"1/2",backgroundColor:"cloud",flexGrid:1,children:"1"}),e(t,{padding:"1/2",backgroundColor:"cloud",flexGrid:3,children:"3"}),e(t,{padding:"1/2",backgroundColor:"cloud",flexGrid:2,children:"2"})]})]})})]}),o(t,{ssCardBox:!0,children:[e(n.SubTitle,{borderBottom:!0,padding:1,children:"Sheet"}),e(t,{padding:1,overflow:"auto",children:e(n.Description,{children:`Sheet.open( {
95
95
  sheetID: 'sheetID',
96
96
  header: ReactElement | React.FC< { modalClose } >,
97
97
  body: ReactElement | React.FC< { modalClose } >,
98
98
  footer: ReactElement | React.FC< { modalClose } >
99
- } )`})}),o(p,{padding:2,children:[e(r.Button.Border.R,{onClick:a=>{k.open({tipsID:"testTips",parent:a.currentTarget,close_option:{parentBlur:!1,aroundClick:!1,escapeKeyDown:!0},content:()=>e(b.Body,{padding:2,children:e(r.Button.Prime.R,{onClick:()=>{b.open({sheetID:"testSheet",close_option:{aroundClick:!0},type:"normal.middleLeft",content:()=>e(b.Body,{padding:2,children:"END"})})},children:"nest"})})})},children:"Tooltips with nested sheet"}),e(t,{flexCenter:!0,children:o(c,{gridCols:3,gap:1,children:[e(r.Button.Border.R,{onClick:()=>{l("normal.topLeft")},children:"Top Left"}),e(r.Button.Border.R,{onClick:()=>{l("normal.topCenter")},children:"Top Center"}),e(r.Button.Border.R,{onClick:()=>{l("normal.topRight")},children:"Top Right"}),e(r.Button.Border.R,{onClick:()=>{l("normal.middleLeft")},children:"Middle Left"}),e(r.Button.Border.R,{onClick:()=>{l("normal.middleCenter")},children:"Middle Center"}),e(r.Button.Border.R,{onClick:()=>{l("normal.middleRight")},children:"Middle Right"}),e(r.Button.Border.R,{onClick:()=>{l("normal.bottomLeft")},children:"Bottom Left"}),e(r.Button.Border.R,{onClick:()=>{l("normal.bottomCenter")},children:"Bottom Center"}),e(r.Button.Border.R,{onClick:()=>{l("normal.bottomRight")},children:"Bottom Right"}),e(r.Button.Border.R,{onClick:()=>{l("drawer.left")},children:"Drawer Left"}),e(r.Button.Border.R,{onClick:()=>{l("drawer.bottom")},children:"Drawer Bottom"}),e(r.Button.Border.R,{onClick:()=>{l("drawer.right")},children:"Drawer Right"}),e(r.Button.Border.R,{onClick:a=>{k.open({tipsID:"test40",parent:a.currentTarget,content:e(t,{padding:1,border:!0,borderRadius:2,backgroundColor:"dark",fontColor:"white",children:"Content"})})},children:"Open Tooltips"})]})}),o(s.Center,{children:["Image Picker",e(w,{src:i.Images.defaultIcon("user"),ssSphere:6,showExpand:!0})]})]})]})]})},z={index:()=>e(B,{children:o(p,{children:[e(z.Normal,{}),e(z.Data,{}),e(z.Drag,{}),e(z.Spread,{})]})}),Normal:()=>{let l=[];for(var a=0;a<10;a++){let u=[{children:"head_"+a},{children:"data_"+a},{children:"data_"+a}];l.push(u)}return o(B,{children:[e(t,{fontSize:"5.subTitle",children:"Table.Normal"}),e(C.Normal,{colLength:3,head:[{children:"head1"},{children:"head2"},{children:"head3"}],rows:l,ssCardBox:!0,onRowClick:u=>{console.log(u)}})]})},Drag:()=>{let l=[];for(var a=0;a<4;a++){let u=[{children:"head_"+a},{children:"data_"+a},{children:"data_"+a}];u.rowID="rowID-"+a,l.push(u)}return o(B,{children:[e(t,{fontSize:"5.subTitle",children:"Table.Drag"}),e(C.Drag,{colLength:3,head:[{children:"head1"},{children:"head2"},{children:"head3"}],cellStyles:{},cellStylesCallback:()=>({}),rows:l,ssCardBox:!0,onOrderChanged:u=>{console.log(u)}})]})},Data:()=>{let l=[];for(var a=0;a<100;a++){let x=Math.round(Math.random()*50+1),T=Math.round(Math.random()*50+1),L=Math.round(Math.random()*50+1),m="name_"+x,E="data_"+T,I="data_"+L,X=[{type:"th",children:a+":"+m,data:m,orderIndex:a},{type:"td",children:E,data:E},{type:"td",children:I,data:I}];l.push(X)}l[1].checked=!0,l[4].checked=!0,l[10].checked=!0;let u="testDataTable";return o(B,{children:[o(h,{horizontalAlign:"between",children:[e(t,{fontSize:"5.subTitle",children:"Table.Data"}),o(h,{gap:"1/2",backgroundColor:"theme",borderRadius:"1.tone.primary",overflow:"hidden",fontColor:"white",children:[e(r.Button.Clear.R,{color:"white",children:"SubmitButton"}),e(t,{flexSizing:"none",unitWidth:"1/4",backgroundColor:"layer.4.opa.middle",isRounded:!0,margin:["2/3",0]}),e(r.Button.Clear.R,{padding:[0,1],color:"white",onClick:x=>{k.open({tipsID:S.uuid.gen(),parent:x.target,gravityPoint:24,close_option:{aroundClick:!0,parentBlur:!1},content:o(p,{gap:0,padding:["2/3",0],backgroundColor:"layer.1",borderRadius:2,boxShadow:"0.normal",overflow:"hidden",children:[e(r.Button.Clear.S,{borderRadius:0,borderBottom:"1.thin",children:"\u3059\u3079\u3066\u3092\u51FA\u529B"}),e(r.Button.Clear.S,{borderRadius:0,borderBottom:"1.thin",children:"\u3053\u306E\u30DA\u30FC\u30B8\u306E\u307F\u51FA\u529B"}),e(r.Button.Clear.S,{borderRadius:0,children:"\u30C1\u30A7\u30C3\u30AF\u3057\u305F\u884C\u306E\u307F\u51FA\u529B"})]})})},children:e(g.EllipsisV,{})})]})]}),o(s.Separate,{verticalAlign:"bottom",children:[o(s.Left,{verticalAlign:"bottom",children:[e(C.Data.SearchInput,{tableID:u}),e(C.Data.Info,{tableID:u})]}),o(s.Right,{verticalAlign:"unset",children:[e(C.Data.RowLength,{tableID:u,lengthSelect:[30,50,100]}),e(C.Data.Paging,{tableID:u})]})]}),e(C.Data,{tableID:u,colLength:3,head:[{data:"head1"},{data:"head2"},{data:"head3"}],rows:l,pageRowLength:30,ssCardBox:!0,cellStyles:{},cellStylesCallback:()=>({}),filter:[!0],checker:!0})]})},Spread:()=>e(B,{children:e(t,{fontSize:"5.subTitle",children:"Table.Spread"})})},ie=()=>{let[l,a]=D(""),[u,x]=D(""),[T,L]=D("");return e(B,{children:o(t,{children:[o(r.Button.Prime.R,{onClick:()=>{te.openDialogNEdit({use:"square",develops:[{size:"S"},{size:"R"},{size:"L"}],onProcessFinished:m=>A(void 0,null,function*(){a(yield(yield N.fromFile(m[0])).toDataURL()),x(yield(yield N.fromFile(m[1])).toDataURL()),L(yield(yield N.fromFile(m[2])).toDataURL())})})},children:[e(g.Image,{})," \u30A4\u30E1\u30FC\u30B8\u3092\u9078\u629E"]}),o(h,{gap:1,verticalAlign:"top",children:[l&&e(w,{isRounded:!0,src:l,alt:"",showExpand:!0,freeCSS:{maxWidth:12*12}}),u&&e(w,{style:{maxWidth:24*12},src:u,alt:"",showExpand:!0}),T&&e(w,{style:{maxWidth:24*12},src:T,alt:"",showExpand:!0}),e(Z,{border:!0,borderWidth:3,margin:[3,"auto"],freeCSS:{width:12*10},slideIndex:1,options:{loop:!0,onSlideCallback:m=>{}},slides:[e(t,{flexCenter:!0,padding:3,backgroundColor:"nega",children:"test1"}),e(t,{flexCenter:!0,padding:3,backgroundColor:"posi",children:"test2"}),e(t,{flexCenter:!0,padding:3,backgroundColor:"warn",children:"test3"}),e(t,{flexCenter:!0,padding:3,backgroundColor:"theme",children:"test4"})]})]})]})})},q={Darkmode:l=>e(d.Segmented.Cloud,W(M({cellStyles:{flexCenter:!0,padding:["1/4","1/2"],isRounded:!0},cellCheckedStyles:{boxShadow:"2.normal",backgroundColor:"theme",fontColor:"white"},ssCardBox:!0,backgroundColor:"layer.1",isRounded:!0,gap:"1/6",fontColor:"4.thin"},l),{options:[{value:"light",label:"Light"},{value:"dim",label:"Dim"},{value:"dark",label:"Dark"}],value:R.get().darkMode,onUpdateValidValue:({value:a})=>{let u=a;S.setLocalStrageData("prf.darkMode",u),R.update.darkMode(u)}})),ThemeColor:()=>{const l=a=>{let u="themeColorSelector";b.open({sheetID:u,type:"normal.middleCenter",size:"L",close_option:{aroundClick:!0},closeAfter:()=>{re.fn.updateCSSProperty.reset()},content:()=>{let[x,T]=D(a.defaultColor);_(()=>{S.scope(()=>{x!==R.get().themeColor&&(R.update.themeColor(x),S.setLocalStrageData("prf.themeColor",x),b.close(u))})},[x]);let L=Object.entries(J).map(([m,E])=>{let I=m===x;return e(r.Button.Clear.R,{color:"cloud",textAlign:"center",onClick:()=>{T(m)},children:o(p,{gap:"1/2",textAlign:"center",children:[I&&e(n.Supplement,{padding:["1/4","1/2"],borderRadius:"3.tone.tertiary",backgroundColor:m,boxShadow:"2.normal",margin:"auto",fontColor:"white",fontSize:"0.xs",children:"\u8A2D\u5B9A\u4E2D"}),e(t,{position:"relative",margin:"auto",backgroundColor:m,ssSphere:2.5,children:e(t,{ssAbsoluteCovered:!0,border:!0,opacity:I?"max":"low",borderWidth:2,transition:"short",isRounded:!0,freeCSS:{transform:"scale(1.25)"}})}),e(n.Supplement,{ssTextEllipsis:!0,freeCSS:{lineHeight:1.25},children:m.toCapital()})]})},m)});return e(b.Body,{children:o(p,{padding:2,gap:2,children:[o(s.Separate,{children:[e(n.Paragraph,{children:"\u30C6\u30FC\u30DE\u3092\u9078\u629E"}),e(r.Button.Sub.R,{color:"cloud",ssSphere:3,onClick:()=>{b.close(u)},children:e(g.Times,{})})]}),e(c,{gap:"1/4",freeCSS:{gridTemplateColumns:"repeat(auto-fit, minmax(4.5rem, 1fr))"},children:L})]})})}})};return e(r.Button.Border.R,{isRounded:!0,fontColor:"theme",onClick:a=>{l({defaultColor:R.get().themeColor,cb:u=>{}})},children:o(s.Center,{gap:"1/3",children:[e(t,{boxShadow:"2.normal",ssSquare:1,borderRadius:"1/3",backgroundColor:"theme"}),"Theme: ",R.get().themeColor.toCapital()]})})}};let Y=()=>{let[l,a]=D(Number(S.queryParams.get().ti)||0);return _(()=>{S.queryParams.set({ti:String(l)})},[l]),o(B,{children:[e(t,{position:"fixed",bottom:1,left:1,isRounded:!0,freeCSS:{zIndex:20},children:e(q.Darkmode,{})}),e(t,{position:"fixed",bottom:1,right:1,isRounded:!0,freeCSS:{zIndex:20},children:e(q.ThemeColor,{})}),o(p,{gap:0,minHeight:"contentHeight",backgroundColor:"layer.1",position:"relative",freeCSS:{zIndex:1},children:[e(ee,{borderBottom:!0,position:"sticky",backgroundColor:"layer.1",boxShadow:"2.normal",top:"topBase",tabIndex:l,tabs:["Basic","Shadows","Buttons","Inputs","Styling","Effection","Tables","Croppie","PlayGround","Logo"],onTabChange:u=>{localStorage.setItem("designTabHeader",String(u)),a(u)},UnderBreakPointStyles:{position:"static",top:0}}),e(t,{flexSizing:0,position:"relative",freeCSS:{zIndex:1},children:e(Q,{viewIndex:l,views:[e(v.index,{}),e(le.index,{}),e(V.index,{}),e(ne,{}),e(ae,{}),e(P.index,{}),e(z.index,{}),e(ie,{}),"",e(f.index,{})],wrapper:u=>e(oe.FadeIn,{animationTime:200,children:e(H,{children:e(h,{gap:2,padding:2,flexWrap:!0,flexChilds:"auto",children:u})})},l)})})]})]})};export{Y as DesignBook,Y as default};
99
+ } )`})}),o(p,{padding:2,children:[e(r.Button.Border.R,{onClick:a=>{k.open({tipsID:"testTips",parent:a.currentTarget,close_option:{parentBlur:!1,aroundClick:!1,escapeKeyDown:!0},content:()=>e(b.Body,{padding:2,children:e(r.Button.Prime.R,{onClick:()=>{b.open({sheetID:"testSheet",close_option:{aroundClick:!0},type:"normal.middleLeft",content:()=>e(b.Body,{padding:2,children:"END"})})},children:"nest"})})})},children:"Tooltips with nested sheet"}),e(t,{flexCenter:!0,children:o(c,{gridCols:3,gap:1,children:[e(r.Button.Border.R,{onClick:()=>{l("normal.topLeft")},children:"Top Left"}),e(r.Button.Border.R,{onClick:()=>{l("normal.topCenter")},children:"Top Center"}),e(r.Button.Border.R,{onClick:()=>{l("normal.topRight")},children:"Top Right"}),e(r.Button.Border.R,{onClick:()=>{l("normal.middleLeft")},children:"Middle Left"}),e(r.Button.Border.R,{onClick:()=>{l("normal.middleCenter")},children:"Middle Center"}),e(r.Button.Border.R,{onClick:()=>{l("normal.middleRight")},children:"Middle Right"}),e(r.Button.Border.R,{onClick:()=>{l("normal.bottomLeft")},children:"Bottom Left"}),e(r.Button.Border.R,{onClick:()=>{l("normal.bottomCenter")},children:"Bottom Center"}),e(r.Button.Border.R,{onClick:()=>{l("normal.bottomRight")},children:"Bottom Right"}),e(r.Button.Border.R,{onClick:()=>{l("drawer.left")},children:"Drawer Left"}),e(r.Button.Border.R,{onClick:()=>{l("drawer.bottom")},children:"Drawer Bottom"}),e(r.Button.Border.R,{onClick:()=>{l("drawer.right")},children:"Drawer Right"}),e(r.Button.Border.R,{onClick:a=>{k.open({tipsID:"test40",parent:a.currentTarget,content:e(t,{padding:1,border:!0,borderRadius:2,backgroundColor:"dark",fontColor:"white",children:"Content"})})},children:"Open Tooltips"})]})}),o(s.Center,{children:["Image Picker",e(w,{src:i.Images.defaultIcon("user"),ssSphere:6,showExpand:!0})]})]})]})]})},z={index:()=>e(B,{children:o(p,{children:[e(z.Normal,{}),e(z.Data,{}),e(z.Drag,{}),e(z.Spread,{})]})}),Normal:()=>{let l=[];for(var a=0;a<10;a++){let u=[{children:"head_"+a},{children:"data_"+a},{children:"data_"+a}];l.push(u)}return o(B,{children:[e(t,{fontSize:"5.subTitle",children:"Table.Normal"}),e(C.Normal,{colLength:3,head:[{children:"head1"},{children:"head2"},{children:"head3"}],rows:l,ssCardBox:!0,onRowClick:u=>{console.log(u)}})]})},Drag:()=>{let l=[];for(var a=0;a<4;a++){let u=[{children:"head_"+a},{children:"data_"+a},{children:"data_"+a}];u.rowID="rowID-"+a,l.push(u)}return o(B,{children:[e(t,{fontSize:"5.subTitle",children:"Table.Drag"}),e(C.Drag,{colLength:3,head:[{children:"head1"},{children:"head2"},{children:"head3"}],cellStyles:{},cellStylesCallback:()=>({}),rows:l,ssCardBox:!0,onOrderChanged:u=>{console.log(u)}})]})},Data:()=>{let l=[];for(var a=0;a<100;a++){let g=Math.round(Math.random()*50+1),T=Math.round(Math.random()*50+1),L=Math.round(Math.random()*50+1),m="name_"+g,E="data_"+T,I="data_"+L,X=[{type:"th",children:a+":"+m,data:m,orderIndex:a},{type:"td",children:E,data:E},{type:"td",children:I,data:I}];l.push(X)}l[1].checked=!0,l[4].checked=!0,l[10].checked=!0;let u="testDataTable";return o(B,{children:[o(h,{horizontalAlign:"between",children:[e(t,{fontSize:"5.subTitle",children:"Table.Data"}),o(h,{gap:"1/2",backgroundColor:"theme",borderRadius:"1.tone.primary",overflow:"hidden",fontColor:"white",children:[e(r.Button.Clear.R,{color:"white",children:"SubmitButton"}),e(t,{flexSizing:"none",unitWidth:"1/4",backgroundColor:"layer.4.opa.middle",isRounded:!0,margin:["2/3",0]}),e(r.Button.Clear.R,{padding:[0,1],color:"white",onClick:g=>{k.open({tipsID:S.uuid.gen(),parent:g.target,gravityPoint:24,close_option:{aroundClick:!0,parentBlur:!1},content:o(p,{gap:0,padding:["2/3",0],backgroundColor:"layer.1",borderRadius:2,boxShadow:"0.normal",overflow:"hidden",children:[e(r.Button.Clear.S,{borderRadius:0,borderBottom:"1.thin",children:"\u3059\u3079\u3066\u3092\u51FA\u529B"}),e(r.Button.Clear.S,{borderRadius:0,borderBottom:"1.thin",children:"\u3053\u306E\u30DA\u30FC\u30B8\u306E\u307F\u51FA\u529B"}),e(r.Button.Clear.S,{borderRadius:0,children:"\u30C1\u30A7\u30C3\u30AF\u3057\u305F\u884C\u306E\u307F\u51FA\u529B"})]})})},children:e(x.EllipsisV,{})})]})]}),o(s.Separate,{verticalAlign:"bottom",children:[o(s.Left,{verticalAlign:"bottom",children:[e(C.Data.SearchInput,{tableID:u}),e(C.Data.Info,{tableID:u})]}),o(s.Right,{verticalAlign:"unset",children:[e(C.Data.RowLength,{tableID:u,lengthSelect:[30,50,100]}),e(C.Data.Paging,{tableID:u})]})]}),e(C.Data,{tableID:u,colLength:3,head:[{data:"head1"},{data:"head2"},{data:"head3"}],rows:l,pageRowLength:30,ssCardBox:!0,cellStyles:{},cellStylesCallback:()=>({}),filter:[!0],checker:!0})]})},Spread:()=>e(B,{children:e(t,{fontSize:"5.subTitle",children:"Table.Spread"})})},ie=()=>{let[l,a]=D(""),[u,g]=D(""),[T,L]=D("");return e(B,{children:o(t,{children:[o(r.Button.Prime.R,{onClick:()=>{te.openDialogNEdit({use:"square",develops:[{size:"S"},{size:"R"},{size:"L"}],onProcessFinished:m=>A(void 0,null,function*(){a(yield(yield N.fromFile(m[0])).toDataURL()),g(yield(yield N.fromFile(m[1])).toDataURL()),L(yield(yield N.fromFile(m[2])).toDataURL())})})},children:[e(x.Image,{})," \u30A4\u30E1\u30FC\u30B8\u3092\u9078\u629E"]}),o(h,{gap:1,verticalAlign:"top",children:[l&&e(w,{isRounded:!0,src:l,alt:"",showExpand:!0,freeCSS:{maxWidth:12*12}}),u&&e(w,{style:{maxWidth:24*12},src:u,alt:"",showExpand:!0}),T&&e(w,{style:{maxWidth:24*12},src:T,alt:"",showExpand:!0}),e(Z,{border:!0,borderWidth:3,margin:[3,"auto"],freeCSS:{width:12*10},slideIndex:1,options:{loop:!0,onSlideCallback:m=>{}},slides:[e(t,{flexCenter:!0,padding:3,backgroundColor:"nega",children:"test1"}),e(t,{flexCenter:!0,padding:3,backgroundColor:"posi",children:"test2"}),e(t,{flexCenter:!0,padding:3,backgroundColor:"warn",children:"test3"}),e(t,{flexCenter:!0,padding:3,backgroundColor:"theme",children:"test4"})]})]})]})})},q={Darkmode:l=>e(d.Segmented.Cloud,_(M({cellStyles:{flexCenter:!0,padding:["1/4","1/2"],isRounded:!0},cellCheckedStyles:{boxShadow:"2.normal",backgroundColor:"theme",fontColor:"white"},ssCardBox:!0,backgroundColor:"layer.1",isRounded:!0,gap:"1/6",fontColor:"4.thin"},l),{options:[{value:"light",label:"Light"},{value:"dim",label:"Dim"},{value:"dark",label:"Dark"}],value:R.get().darkMode,onUpdateValidValue:({value:a})=>{let u=a;S.setLocalStrageData("prf.darkMode",u),R.update.darkMode(u)}})),ThemeColor:()=>{const l=a=>{let u="themeColorSelector";b.open({sheetID:u,type:"normal.middleCenter",size:"L",close_option:{aroundClick:!0},closeAfter:()=>{re.fn.updateCSSProperty.reset()},content:()=>{let[g,T]=D(a.defaultColor);W(()=>{S.scope(()=>{g!==R.get().themeColor&&(R.update.themeColor(g),S.setLocalStrageData("prf.themeColor",g),b.close(u))})},[g]);let L=Object.entries(J).map(([m,E])=>{let I=m===g;return e(r.Button.Clear.R,{color:"cloud",textAlign:"center",onClick:()=>{T(m)},children:o(p,{gap:"1/2",textAlign:"center",children:[I&&e(n.Supplement,{padding:["1/4","1/2"],borderRadius:"3.tone.tertiary",backgroundColor:m,boxShadow:"2.normal",margin:"auto",fontColor:"white",fontSize:"0.xs",children:"\u8A2D\u5B9A\u4E2D"}),e(t,{position:"relative",margin:"auto",backgroundColor:m,ssSphere:2.5,children:e(t,{ssAbsoluteCovered:!0,border:!0,opacity:I?"max":"low",borderWidth:2,transition:"short",isRounded:!0,freeCSS:{transform:"scale(1.25)"}})}),e(n.Supplement,{ssTextEllipsis:!0,freeCSS:{lineHeight:1.25},children:m.toCapital()})]})},m)});return e(b.Body,{children:o(p,{padding:2,gap:2,children:[o(s.Separate,{children:[e(n.Paragraph,{children:"\u30C6\u30FC\u30DE\u3092\u9078\u629E"}),e(r.Button.Sub.R,{color:"cloud",ssSphere:3,onClick:()=>{b.close(u)},children:e(x.Times,{})})]}),e(c,{gap:"1/4",freeCSS:{gridTemplateColumns:"repeat(auto-fit, minmax(4.5rem, 1fr))"},children:L})]})})}})};return e(r.Button.Border.R,{isRounded:!0,fontColor:"theme",onClick:a=>{l({defaultColor:R.get().themeColor,cb:u=>{}})},children:o(s.Center,{gap:"1/3",children:[e(t,{boxShadow:"2.normal",ssSquare:1,borderRadius:"1/3",backgroundColor:"theme"}),"Theme: ",R.get().themeColor.toCapital()]})})}};let Y=()=>{let[l,a]=D(Number(S.queryParams.get().ti)||0);return W(()=>{S.queryParams.set({ti:String(l)})},[l]),o(B,{children:[e(t,{position:"fixed",bottom:1,left:1,isRounded:!0,freeCSS:{zIndex:20},children:e(q.Darkmode,{})}),e(t,{position:"fixed",bottom:1,right:1,isRounded:!0,freeCSS:{zIndex:20},children:e(q.ThemeColor,{})}),o(p,{gap:0,minHeight:"contentHeight",backgroundColor:"layer.1",position:"relative",freeCSS:{zIndex:1},children:[e(ee,{borderBottom:!0,position:"sticky",backgroundColor:"layer.1",boxShadow:"2.normal",top:"topBase",tabIndex:l,tabs:["Basic","Shadows","Buttons","Inputs","Styling","Effection","Tables","Croppie","PlayGround","Logo"],onTabChange:u=>{localStorage.setItem("designTabHeader",String(u)),a(u)},UnderBreakPointStyles:{position:"static",top:0}}),e(t,{flexSizing:0,position:"relative",freeCSS:{zIndex:1},children:e(Q,{viewIndex:l,views:[e(v.index,{}),e(le.index,{}),e(V.index,{}),e(ne,{}),e(ae,{}),e(F.index,{}),e(z.index,{}),e(ie,{}),"",e(f.index,{})],wrapper:u=>e(oe.FadeIn,{animationTime:200,children:e(H,{children:e(h,{gap:2,padding:2,flexWrap:!0,flexChilds:"auto",children:u})})},l)})})]})]})};export{Y as DesignBook,Y as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amotify",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "UI Component for React,NextJS,esbuild",
5
5
  "scripts": {
6
6
  "start": "run-p clean build:*",
@@ -89,7 +89,7 @@
89
89
  "@fortawesome/free-regular-svg-icons": "^6.5.2",
90
90
  "@fortawesome/free-solid-svg-icons": "^6.5.1",
91
91
  "@fortawesome/react-fontawesome": "^0.2.0",
92
- "@mingoo/jsmin": "^0.0.54",
92
+ "@mingoo/jsmin": "^0.0.55",
93
93
  "react": "^18.3.1"
94
94
  },
95
95
  "devDependencies": {