amotify 0.1.48 → 0.1.49

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.
Files changed (163) hide show
  1. package/bundler_style.ts +1 -1
  2. package/dist/@declaration/property.d.ts +10 -10
  3. package/dist/@styles/componentClasses/{_.css → index.css} +3 -3
  4. package/dist/@styles/componentClasses/{_.js → index.js} +3 -4
  5. package/dist/@styles/index.css +3 -3
  6. package/dist/@styles/index.d.ts +1 -1
  7. package/dist/@styles/index.js +3 -4
  8. package/dist/@styles/init.css +1 -1
  9. package/dist/@styles/style.css +3 -3
  10. package/dist/@styles/style.d.ts +1 -1
  11. package/dist/@styles/style.js +3 -4
  12. package/dist/@styles/var.css +1 -1
  13. package/dist/@utils/GenerateClassName.d.ts +2 -2
  14. package/dist/@utils/GenerateClassName.js +1 -1
  15. package/dist/@utils/LaunchReactApp.d.ts +3 -3
  16. package/dist/@utils/LaunchReactApp.js +1 -1
  17. package/dist/@utils/color.d.ts +1 -1
  18. package/dist/@utils/color.js +1 -1
  19. package/dist/@utils/config.d.ts +1 -1
  20. package/dist/@utils/config.js +1 -1
  21. package/dist/@utils/fin.js +1 -1
  22. package/dist/@utils/{_.d.ts → index.d.ts} +1 -1
  23. package/dist/@utils/index.js +1 -0
  24. package/dist/@utils/jsminEx.d.ts +5 -5
  25. package/dist/@utils/useRecycle.js +1 -1
  26. package/dist/@utils/useStore.d.ts +2 -2
  27. package/dist/@utils/useStore.js +1 -1
  28. package/dist/atoms/Box.d.ts +1 -1
  29. package/dist/atoms/Box.js +1 -1
  30. package/dist/atoms/FAI.d.ts +1 -1
  31. package/dist/atoms/Flex.d.ts +1 -1
  32. package/dist/atoms/Img.d.ts +1 -1
  33. package/dist/atoms/Img.js +1 -1
  34. package/dist/atoms/Logo.d.ts +15 -15
  35. package/dist/atoms/Logo.js +2 -2
  36. package/dist/atoms/P.d.ts +1 -1
  37. package/dist/atoms/P.js +1 -1
  38. package/dist/atoms/Placeholder.js +1 -1
  39. package/dist/atoms/Span.d.ts +1 -1
  40. package/dist/atoms/Span.js +1 -1
  41. package/dist/fn/Button.d.ts +5 -5
  42. package/dist/fn/Button.js +1 -1
  43. package/dist/fn/Cropper.d.ts +4 -4
  44. package/dist/fn/Cropper.js +1 -1
  45. package/dist/fn/Effect/Fade.js +1 -1
  46. package/dist/fn/Effect/Pudding.d.ts +1 -1
  47. package/dist/fn/Effect/Pudding.js +1 -1
  48. package/dist/fn/Effect/Ripple.d.ts +1 -1
  49. package/dist/fn/Effect/Ripple.js +1 -1
  50. package/dist/fn/Input/AutoHeightText.d.ts +1 -1
  51. package/dist/fn/Input/AutoHeightText.js +1 -1
  52. package/dist/fn/Input/Checker.d.ts +5 -5
  53. package/dist/fn/Input/Chips/Selector.d.ts +6 -6
  54. package/dist/fn/Input/Chips/Selector.js +1 -1
  55. package/dist/fn/Input/Chips/{_.d.ts → index.d.ts} +2 -2
  56. package/dist/fn/Input/Chips/index.js +1 -0
  57. package/dist/fn/Input/Contenteditable.d.ts +2 -2
  58. package/dist/fn/Input/Contenteditable.js +1 -1
  59. package/dist/fn/Input/DigitCharacters.d.ts +3 -3
  60. package/dist/fn/Input/DigitCharacters.js +1 -1
  61. package/dist/fn/Input/Filer.d.ts +5 -5
  62. package/dist/fn/Input/Filer.js +1 -1
  63. package/dist/fn/Input/Hidden.d.ts +1 -1
  64. package/dist/fn/Input/Hidden.js +1 -1
  65. package/dist/fn/Input/List.d.ts +7 -7
  66. package/dist/fn/Input/List.js +1 -1
  67. package/dist/fn/Input/Parts.d.ts +3 -3
  68. package/dist/fn/Input/Parts.js +1 -1
  69. package/dist/fn/Input/Plain.d.ts +3 -3
  70. package/dist/fn/Input/Plain.js +1 -1
  71. package/dist/fn/Input/RichSelect.d.ts +5 -5
  72. package/dist/fn/Input/RichSelect.js +1 -1
  73. package/dist/fn/Input/Search.d.ts +2 -2
  74. package/dist/fn/Input/Search.js +1 -1
  75. package/dist/fn/Input/Segmented.d.ts +8 -8
  76. package/dist/fn/Input/Segmented.js +1 -1
  77. package/dist/fn/Input/Select.d.ts +3 -3
  78. package/dist/fn/Input/Select.js +1 -1
  79. package/dist/fn/Input/Slider.d.ts +2 -2
  80. package/dist/fn/Input/Slider.js +1 -1
  81. package/dist/fn/Input/Switch.d.ts +2 -2
  82. package/dist/fn/Input/Switch.js +1 -1
  83. package/dist/fn/Input/Text.d.ts +2 -2
  84. package/dist/fn/Input/Text.js +1 -1
  85. package/dist/fn/Input/TextArea.d.ts +2 -2
  86. package/dist/fn/Input/TextArea.js +1 -1
  87. package/dist/fn/Input/Time/Picker.d.ts +1 -1
  88. package/dist/fn/Input/Time/Picker.js +1 -1
  89. package/dist/fn/Input/Time/{_.d.ts → index.d.ts} +3 -3
  90. package/dist/fn/Input/Time/index.js +1 -0
  91. package/dist/fn/Input/core.d.ts +11 -11
  92. package/dist/fn/Input/core.js +1 -1
  93. package/dist/fn/Input/{_.d.ts → index.d.ts} +7 -7
  94. package/dist/fn/Input/index.js +1 -0
  95. package/dist/fn/Layout/PageRouter.d.ts +1 -1
  96. package/dist/fn/Layout/PageRouter.js +1 -1
  97. package/dist/fn/Layout/PageViewController.d.ts +1 -1
  98. package/dist/fn/Layout/PageViewController.js +1 -1
  99. package/dist/fn/Layout/RootViewController.d.ts +3 -3
  100. package/dist/fn/Layout/RootViewController.js +1 -1
  101. package/dist/fn/Layout/SwipeView.d.ts +2 -2
  102. package/dist/fn/Layout/SwipeView.js +1 -1
  103. package/dist/fn/Layout/TabBar.d.ts +1 -1
  104. package/dist/fn/Layout/TabBar.js +1 -1
  105. package/dist/fn/Loader/corner.js +1 -1
  106. package/dist/fn/Loader/{_.d.ts → index.d.ts} +2 -2
  107. package/dist/fn/Loader/index.js +1 -0
  108. package/dist/fn/Loader/mini.d.ts +2 -2
  109. package/dist/fn/Loader/mini.js +1 -1
  110. package/dist/fn/Loader/top.js +1 -1
  111. package/dist/fn/Sheet.d.ts +13 -13
  112. package/dist/fn/Sheet.js +1 -1
  113. package/dist/fn/Snackbar.d.ts +4 -4
  114. package/dist/fn/Snackbar.js +1 -1
  115. package/dist/fn/Table/Data.d.ts +4 -4
  116. package/dist/fn/Table/Data.js +1 -1
  117. package/dist/fn/Table/Drag.d.ts +2 -2
  118. package/dist/fn/Table/Drag.js +1 -1
  119. package/dist/fn/Table/Normal.d.ts +2 -2
  120. package/dist/fn/Table/Normal.js +1 -1
  121. package/dist/fn/Table/Parts.d.ts +2 -2
  122. package/dist/fn/Table/Parts.js +1 -1
  123. package/dist/fn/Table/Wrapper.d.ts +2 -2
  124. package/dist/fn/Table/Wrapper.js +1 -1
  125. package/dist/fn/Table/cellStyling.d.ts +4 -4
  126. package/dist/fn/Table/{_.d.ts → index.d.ts} +4 -4
  127. package/dist/fn/Tooltips.d.ts +4 -4
  128. package/dist/fn/Tooltips.js +1 -1
  129. package/dist/fn/index.d.ts +10 -0
  130. package/dist/fn/index.js +1 -0
  131. package/dist/index.d.ts +13 -13
  132. package/dist/index.js +1 -1
  133. package/dist/mols/Accordion.d.ts +1 -1
  134. package/dist/mols/Accordion.js +1 -1
  135. package/dist/mols/LinkifyText.d.ts +1 -1
  136. package/dist/mols/List.d.ts +1 -1
  137. package/dist/mols/Row.d.ts +1 -1
  138. package/dist/mols/Text.d.ts +1 -1
  139. package/dist/temps/designBook.js +1 -1
  140. package/package.json +15 -15
  141. package/dist/@utils/_.js +0 -1
  142. package/dist/fn/Input/Chips/_.js +0 -1
  143. package/dist/fn/Input/Time/_.js +0 -1
  144. package/dist/fn/Input/_.js +0 -1
  145. package/dist/fn/Loader/_.js +0 -1
  146. package/dist/fn/_.d.ts +0 -10
  147. package/dist/fn/_.js +0 -1
  148. /package/dist/@declaration/{_.d.ts → index.d.ts} +0 -0
  149. /package/dist/@declaration/{_.js → index.js} +0 -0
  150. /package/dist/@styles/componentClasses/{_.d.ts → index.d.ts} +0 -0
  151. /package/dist/atoms/{_.d.ts → index.d.ts} +0 -0
  152. /package/dist/atoms/{_.js → index.js} +0 -0
  153. /package/dist/fn/Effect/{_.d.ts → index.d.ts} +0 -0
  154. /package/dist/fn/Effect/{_.js → index.js} +0 -0
  155. /package/dist/fn/Layout/{_.d.ts → index.d.ts} +0 -0
  156. /package/dist/fn/Layout/{_.js → index.js} +0 -0
  157. /package/dist/fn/Table/{_.js → index.js} +0 -0
  158. /package/dist/mols/{_.d.ts → index.d.ts} +0 -0
  159. /package/dist/mols/{_.js → index.js} +0 -0
  160. /package/dist/orgs/{_.d.ts → index.d.ts} +0 -0
  161. /package/dist/orgs/{_.js → index.js} +0 -0
  162. /package/dist/temps/{_.d.ts → index.d.ts} +0 -0
  163. /package/dist/temps/{_.js → index.js} +0 -0
@@ -1 +1 @@
1
- import{b as r,c as a,d as t}from"../chunk-VY3566IV.js";import{jsx as d}from"react/jsx-runtime";import c from"./Box";import{PlaceholderClasses as o}from"../@styles/componentClasses/_";const s=e=>{let l=e,{color:n="cloud"}=l,p=t(l,["color"]);return d(c,a(r({className:[o("Placeholder"),e.className].join(" "),flexCenter:!0,position:"relative",ssCardBox:!0,border:"unset",overflow:"hidden",backgroundColor:"layer.3"},p),{children:d(c,{className:[o("Body"),o("Color_"+n)].join(" ")})}))};export{s as Placeholder,s as default};
1
+ import{b as r,c as a,d as t}from"../chunk-VY3566IV.js";import{jsx as d}from"react/jsx-runtime";import s from"./Box";import{PlaceholderClasses as o}from"../@styles/componentClasses";const c=e=>{let l=e,{color:n="cloud"}=l,p=t(l,["color"]);return d(s,a(r({className:[o("Placeholder"),e.className].join(" "),flexCenter:!0,position:"relative",ssCardBox:!0,border:"unset",overflow:"hidden",backgroundColor:"layer.3"},p),{children:d(s,{className:[o("Body"),o("Color_"+n)].join(" ")})}))};export{c as Placeholder,c as default};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { TagProperty, ReactElement } from '../@declaration/_';
2
+ import { TagProperty, ReactElement } from '../@declaration';
3
3
  declare namespace Span {
4
4
  type Input = TagProperty.BasicElement & {
5
5
  children?: ReactElement;
@@ -1 +1 @@
1
- import{b as t,d as a}from"../chunk-VY3566IV.js";import{jsx as o}from"react/jsx-runtime";import{GenerateClassName as m}from"../@utils/_";const n=p=>{let e=m(p),{freeCSS:l}=e,r=a(e,["freeCSS"]);return o("span",t({},r))};export{n as Span,n as default};
1
+ import{b as t,d as a}from"../chunk-VY3566IV.js";import{jsx as o}from"react/jsx-runtime";import{GenerateClassName as m}from"../@utils";const n=p=>{let e=m(p),{freeCSS:l}=e,r=a(e,["freeCSS"]);return o("span",t({},r))};export{n as Span,n as default};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { TagProperty, ThemeColor, ReactElement } from '../@declaration/_';
2
+ import { TagProperty, ThemeColor, ReactElement } from '../@declaration';
3
3
  declare namespace Button {
4
4
  type Methods = Seed & {};
5
5
  type Seeds = 'Button' | 'Label' | 'Anchor';
@@ -49,7 +49,7 @@ declare namespace Button {
49
49
  color?: Colors;
50
50
  };
51
51
  }
52
- type UniParams = TagProperty.BasicElement & {
52
+ type UniPara = TagProperty.BasicElement & {
53
53
  tabIndex?: number;
54
54
  children?: ReactElement;
55
55
  'aria-label'?: string;
@@ -59,7 +59,7 @@ declare namespace Button {
59
59
  isActiveClassName?: string;
60
60
  };
61
61
  type delegateClickEventProps = 'auxEnter' | 'enter' | 'space';
62
- type ButtonInput = UniParams & {
62
+ type ButtonInput = UniPara & {
63
63
  submitOption?: {
64
64
  formName: string;
65
65
  acceptInvalidForm?: boolean;
@@ -67,10 +67,10 @@ declare namespace Button {
67
67
  callback(form: plainObject, ok: boolean): void;
68
68
  };
69
69
  } & React.ButtonHTMLAttributes<HTMLButtonElement>;
70
- type LabelInput = UniParams & {
70
+ type LabelInput = UniPara & {
71
71
  htmlFor?: string;
72
72
  } & React.LabelHTMLAttributes<HTMLLabelElement>;
73
- type AnchorInput = UniParams & {
73
+ type AnchorInput = UniPara & {
74
74
  href?: string;
75
75
  newTab?: boolean;
76
76
  sync?: boolean;
package/dist/fn/Button.js CHANGED
@@ -1 +1 @@
1
- import{b as o,c as i,d as B,e as P}from"../chunk-VY3566IV.js";import{jsx as d}from"react/jsx-runtime";import{$$ as g,pageTransit as x,ReadStyleSet as N,collectForm as I,GenerateClassName as E}from"../@utils/_";import{ButtonClasses as c}from"../@styles/componentClasses/_";const v={Size:(r,t,n,l)=>{let e={fontSize:"inherit"};return n=n||"R",["Plain","Link"].includes(t)?{}:(n=="XS"?e=i(o({},e),{padding:["1/3","2/3"],fontSize:"0.xs",borderRadius:"3.tone.tertiary"}):n=="S"?e=i(o({},e),{padding:["1/2","3/4"],fontSize:"1.mini",borderRadius:"3.tone.tertiary"}):n=="R"?(e.padding=["3/4",1],t=="Prime"&&(e.padding=["3/4",2])):n=="L"&&(e.padding=[1,3],e.fontSize="3.paragraph",e.isSemiBoldFont=!0),e=o({borderRadius:"2.tone.secondary",transition:"middle",position:"relative",textAlign:"center"},e),e)},Tone:(r,t,n,l)=>{let e={display:"inlineBlock",fontWeight:"inherit",fontColor:"inherit",border:"unset"};return t=="Plain"||(t=="Link"?(e.fontColor="theme",e.textAlign="left",e.backgroundColor="trans"):t=="Normal"?e=i(o({},e),{backgroundColor:"trans"}):t=="Border"?e=i(o({},e),{backgroundColor:"layer.1",border:"2.normal",borderStyle:"solid",boxShadow:"0.thin"}):t=="Prime"?(e=i(o({},e),{isSemiBoldFont:!0,fontColor:"white",backgroundColor:l,boxShadow:"0.normal",ssEffectsOnActive:["shrink","push","ripple.white"]}),l=="white"&&(e=i(o({},e),{fontColor:"theme",ssEffectsOnActive:["shrink","push","ripple.cloud"]}))):t=="Sub"?e=i(o({},e),{fontColor:l,ssEffectsOnActive:["shrink","ripple.cloud"]}):t=="Clear"?e=i(o({},e),{fontColor:l,backgroundColor:"trans",ssEffectsOnActive:["shrink","ripple.cloud"]}):t=="FillToBorder"?e=i(o({},e),{boxShadow:"0.normal",border:"2.normal",borderWidth:2,borderColor:l,fontColor:l,backgroundColor:l}):t=="BorderToFill"&&(e=i(o({},e),{fontColor:l,boxShadow:"0.normal",border:"2.normal",borderWidth:2,borderColor:l,backgroundColor:l})),l=="cloud"&&(e.fontColor="3.blur"),t!="Link"&&(e=o({position:"relative",ssEffectsOnActive:["shrink","push"]},e))),e}},m=r=>{let t=N(o({isLocked:!1,isActive:!1,isActiveStyles:{},isActiveClassName:"",tabIndex:0,className:"",color:"theme","aria-label":g.uuid.gen()},r)),n=t.seed;{let{isLocked:b=!1,isActive:f=!1,isActiveStyles:S={},isActiveClassName:T="",tone:a="border",color:s="theme",className:u=""}=t;t=o(o(o({},v.Size(r.seed,r.tone,r.size,s)),v.Tone(r.seed,r.tone,r.size,s)),t),t.className=[u,c("Wrap"),c("isNeutral_"+!f),c("isLocked_"+b),c("Tone_"+a),c("Color_"+s),c("Tone_"+a+"_Color_"+s)].join(" "),f&&(t=o(o({className:[t.className,T].join(" ")},t),S)),t=E(t)}if(n=="Button"){let l=t,{isLocked:b,isActive:f,isActiveClassName:S,isActiveStyles:T,submitOption:a,onClick:s}=l,u=B(l,["isLocked","isActive","isActiveClassName","isActiveStyles","submitOption","onClick"]);return a&&(a=o({acceptInvalidForm:!1,submitDelegationKey:"auxEnter"},a),u=i(o({},u),{"data-form-submit-button":a.formName,"data-sdfike":g.flatArray(a.submitDelegationKey).join(",")})),d("button",o({onClick:C=>P(void 0,null,function*(){if(s&&s(C),!a)return;let y=yield I(a.formName);!a.acceptInvalidForm&&!y.valid||a.callback(y.data,y.valid)})},u))}else if(n=="Label"){let e=t,{isLocked:b,isActive:f,isActiveClassName:S,isActiveStyles:T}=e,a=B(e,["isLocked","isActive","isActiveClassName","isActiveStyles"]);return d("label",o({},a))}else if(n=="Anchor"){let A=t,{isLocked:b,isActive:f,isActiveClassName:S,isActiveStyles:T,href:a="",newTab:s,sync:u,shiftQueryParams:C}=A,y=B(A,["isLocked","isActive","isActiveClassName","isActiveStyles","href","newTab","sync","shiftQueryParams"]);return d("button",o({onClick:L=>{let z=L.ctrlKey||L.metaKey,R=s||!!z,h=a;C&&(h+=location.search),u?x.pushSync(h):x.push(h,!!R)}},y))}return null},p=(r,t)=>({XS:n=>d(m,i(o({},n),{seed:r,tone:t,size:"S"})),S:n=>d(m,i(o({},n),{seed:r,tone:t,size:"S"})),R:n=>d(m,i(o({},n),{seed:r,tone:t,size:"R"})),L:n=>d(m,i(o({},n),{seed:r,tone:t,size:"L"}))}),k=r=>({Plain:t=>d(m,i(o({},t),{seed:r,tone:"Plain",size:"R"})),Link:t=>d(m,i(o({},t),{seed:r,tone:"Link",size:"R"})),Normal:p(r,"Normal"),Border:p(r,"Border"),Prime:p(r,"Prime"),Sub:p(r,"Sub"),Clear:p(r,"Clear"),FillToBorder:p(r,"FillToBorder"),BorderToFill:p(r,"BorderToFill")}),F={Button:k("Button"),Label:k("Label"),Anchor:k("Anchor")};export{F as Button,F as default};
1
+ import{b as o,c as i,d as B,e as P}from"../chunk-VY3566IV.js";import{jsx as d}from"react/jsx-runtime";import{$$ as g,pageTransit as x,ReadStyleSet as N,collectForm as I,GenerateClassName as E}from"../@utils";import{ButtonClasses as c}from"../@styles/componentClasses";const v={Size:(r,t,n,l)=>{let e={fontSize:"inherit"};return n=n||"R",["Plain","Link"].includes(t)?{}:(n=="XS"?e=i(o({},e),{padding:["1/3","2/3"],fontSize:"0.xs",borderRadius:"3.tone.tertiary"}):n=="S"?e=i(o({},e),{padding:["1/2","3/4"],fontSize:"1.mini",borderRadius:"3.tone.tertiary"}):n=="R"?(e.padding=["3/4",1],t=="Prime"&&(e.padding=["3/4",2])):n=="L"&&(e.padding=[1,3],e.fontSize="3.paragraph",e.isSemiBoldFont=!0),e=o({borderRadius:"2.tone.secondary",transition:"middle",position:"relative",textAlign:"center"},e),e)},Tone:(r,t,n,l)=>{let e={display:"inlineBlock",fontWeight:"inherit",fontColor:"inherit",border:"unset"};return t=="Plain"||(t=="Link"?(e.fontColor="theme",e.textAlign="left",e.backgroundColor="trans"):t=="Normal"?e=i(o({},e),{backgroundColor:"trans"}):t=="Border"?e=i(o({},e),{backgroundColor:"layer.1",border:"2.normal",borderStyle:"solid",boxShadow:"0.thin"}):t=="Prime"?(e=i(o({},e),{isSemiBoldFont:!0,fontColor:"white",backgroundColor:l,boxShadow:"0.normal",ssEffectsOnActive:["shrink","push","ripple.white"]}),l=="white"&&(e=i(o({},e),{fontColor:"theme",ssEffectsOnActive:["shrink","push","ripple.cloud"]}))):t=="Sub"?e=i(o({},e),{fontColor:l,ssEffectsOnActive:["shrink","ripple.cloud"]}):t=="Clear"?e=i(o({},e),{fontColor:l,backgroundColor:"trans",ssEffectsOnActive:["shrink","ripple.cloud"]}):t=="FillToBorder"?e=i(o({},e),{boxShadow:"0.normal",border:"2.normal",borderWidth:2,borderColor:l,fontColor:l,backgroundColor:l}):t=="BorderToFill"&&(e=i(o({},e),{fontColor:l,boxShadow:"0.normal",border:"2.normal",borderWidth:2,borderColor:l,backgroundColor:l})),l=="cloud"&&(e.fontColor="3.blur"),t!="Link"&&(e=o({position:"relative",ssEffectsOnActive:["shrink","push"]},e))),e}},m=r=>{let t=N(o({isLocked:!1,isActive:!1,isActiveStyles:{},isActiveClassName:"",tabIndex:0,className:"",color:"theme","aria-label":g.uuid.gen()},r)),n=t.seed;{let{isLocked:b=!1,isActive:f=!1,isActiveStyles:S={},isActiveClassName:T="",tone:a="border",color:s="theme",className:u=""}=t;t=o(o(o({},v.Size(r.seed,r.tone,r.size,s)),v.Tone(r.seed,r.tone,r.size,s)),t),t.className=[u,c("Wrap"),c("isNeutral_"+!f),c("isLocked_"+b),c("Tone_"+a),c("Color_"+s),c("Tone_"+a+"_Color_"+s)].join(" "),f&&(t=o(o({className:[t.className,T].join(" ")},t),S)),t=E(t)}if(n=="Button"){let l=t,{isLocked:b,isActive:f,isActiveClassName:S,isActiveStyles:T,submitOption:a,onClick:s}=l,u=B(l,["isLocked","isActive","isActiveClassName","isActiveStyles","submitOption","onClick"]);return a&&(a=o({acceptInvalidForm:!1,submitDelegationKey:"auxEnter"},a),u=i(o({},u),{"data-form-submit-button":a.formName,"data-sdfike":g.flatArray(a.submitDelegationKey).join(",")})),d("button",o({onClick:C=>P(void 0,null,function*(){if(s&&s(C),!a)return;let y=yield I(a.formName);!a.acceptInvalidForm&&!y.valid||a.callback(y.data,y.valid)})},u))}else if(n=="Label"){let e=t,{isLocked:b,isActive:f,isActiveClassName:S,isActiveStyles:T}=e,a=B(e,["isLocked","isActive","isActiveClassName","isActiveStyles"]);return d("label",o({},a))}else if(n=="Anchor"){let A=t,{isLocked:b,isActive:f,isActiveClassName:S,isActiveStyles:T,href:a="",newTab:s,sync:u,shiftQueryParams:C}=A,y=B(A,["isLocked","isActive","isActiveClassName","isActiveStyles","href","newTab","sync","shiftQueryParams"]);return d("button",o({onClick:L=>{let z=L.ctrlKey||L.metaKey,R=s||!!z,h=a;C&&(h+=location.search),u?x.pushSync(h):x.push(h,!!R)}},y))}return null},p=(r,t)=>({XS:n=>d(m,i(o({},n),{seed:r,tone:t,size:"S"})),S:n=>d(m,i(o({},n),{seed:r,tone:t,size:"S"})),R:n=>d(m,i(o({},n),{seed:r,tone:t,size:"R"})),L:n=>d(m,i(o({},n),{seed:r,tone:t,size:"L"}))}),k=r=>({Plain:t=>d(m,i(o({},t),{seed:r,tone:"Plain",size:"R"})),Link:t=>d(m,i(o({},t),{seed:r,tone:"Link",size:"R"})),Normal:p(r,"Normal"),Border:p(r,"Border"),Prime:p(r,"Prime"),Sub:p(r,"Sub"),Clear:p(r,"Clear"),FillToBorder:p(r,"FillToBorder"),BorderToFill:p(r,"BorderToFill")}),F={Button:k("Button"),Label:k("Label"),Anchor:k("Anchor")};export{F as Button,F as default};
@@ -1,19 +1,19 @@
1
- import Input from './Input/_';
1
+ import Input from './Input';
2
2
  declare namespace Cropper {
3
3
  type Use = 'square' | 'wallpaper.horizontal' | 'wallpaper.vertical';
4
4
  type Input = {
5
5
  use: Use;
6
- develops: DevelopParams[];
6
+ develops: Develop[];
7
7
  onProcessFinished: {
8
8
  (files: Input.Filer.CustomFile[]): void;
9
9
  };
10
10
  };
11
- type DevelopParams = {
11
+ type Develop = {
12
12
  size: 'S' | 'R' | 'L';
13
13
  maxSize?: number;
14
14
  };
15
15
  type Methods = {
16
- open(params: Input): void;
16
+ open(para: Input): void;
17
17
  };
18
18
  type CoreProps = {
19
19
  val_file: Input.Filer.CustomFile;
@@ -1 +1 @@
1
- import{b as X,c as O,e as P}from"../chunk-VY3566IV.js";import{Fragment as $,jsx as m,jsxs as y}from"react/jsx-runtime";import{$$ as b,$$fromRoot as j,useStore as M}from"../@utils/_";import{useState as z,useEffect as H}from"react";import V from"../atoms/Flex";import D from"../atoms/Box";import B from"../atoms/FAI";import T from"../mols/Column";import q from"../mols/Row";import Y from"./Button";import A from"./Sheet";import k from"./Loader/_";import W from"./Input/_";import{faPalette as K}from"@fortawesome/free-solid-svg-icons/faPalette";import{faBarsStaggered as Z}from"@fortawesome/free-solid-svg-icons/faBarsStaggered";import{faRotateLeft as J}from"@fortawesome/free-solid-svg-icons/faRotateLeft";import{faRotateRight as Q}from"@fortawesome/free-solid-svg-icons/faRotateRight";import{CropperClasses as L}from"../@styles/componentClasses/_";class ee{constructor(i){this.set_scale=i.set_scale,this.val_file=i.val_file,this.develops=i.develops,this.use=i.use,this.componentID=i.componentID,this.scale={current:i.scale.default,default:i.scale.default,min:i.scale.min,max:i.scale.max};let e=i.canvas,{width:l,height:t}=e,a=i.picture.image,{width:h,height:s}=a,c=h/s;this.Canvas={elm:e,ctx:e.getContext("2d")};let o=0,r=0;this.use=="square"?(o=e.width/3*2,r=e.height/3*2):this.use=="wallpaper.horizontal"?(o=e.width*(7/9),r=o/3):this.use=="wallpaper.vertical"&&(r=e.height*(7/9),o=r/2);let n=(e.width-o)/2,d=(e.height-r)/2,g=o/r;this.Picture={elm:a,originDataUrl:a.src,aspect:c,revisedAspect:g>c?o/h:r/s,rotate:i.picture.rotate,grayScale:i.picture.grayScale,tone:i.picture.tone},this.pst={frame:{x:n,y:d,w:o,h:r,aspect:g},outImage:{x:0,y:0,w:0,h:0},imageX:h/2,imageY:s/2,centerX:l/2,centerY:t/2},this.dragEffectInfo={origin:{x:0,y:0},frameExpandRate:{x:0,y:0}},this.pinchEffectInfo={origin:{x:0,y:0,scale:this.scale.current}},this.modifyImage()}dragEffect(i){let{eventType:e,x:l,y:t}=i;if(e=="start"){let a=this.Canvas.elm.position();this.dragEffectInfo={origin:{x:l,y:t},frameExpandRate:{x:this.Canvas.elm.width/a.width,y:this.Canvas.elm.height/a.height}}}else{let{origin:a,frameExpandRate:h}=this.dragEffectInfo,s=a.x-l,c=a.y-t,o=this.scale.current*this.Picture.revisedAspect/100,r=s/o*h.x,n=c/o*h.y;e=="move"?this.drawImage(this.pst.imageX+r,this.pst.imageY+n):e=="end"&&this.drawImage(this.pst.imageX+=r,this.pst.imageY+=n)}}pinchEffect(i){let{eventType:e,event:l}=i,{x:t,y:a}=b.getCursor(l.touches[0]),{x:h,y:s}=b.getCursor(l.touches[1]),c=h-t,o=s-a;if(e=="start")this.pinchEffectInfo.origin={x:c,y:o,scale:this.scale.current};else if(e=="move"){let{origin:r}=this.pinchEffectInfo,n=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)),g=Math.sqrt(Math.pow(c,2)+Math.pow(o,2))/n,C=Number(r.scale*g);this.set_scale(C)}}updateScale(i){let e=i;e=Math.max(e,this.scale.min),e=Math.min(e,this.scale.max),this.scale.current=e,this.drawImage()}updateFilter(i){this.Picture.grayScale=i.grayScale,this.Picture.tone=i.tone,this.Picture.rotate=i.rotate,this.modifyImage()}modifyImage(){return P(this,null,function*(){let{grayScale:i,tone:e,rotate:l}=this.Picture;const t=document.createElement("canvas");let a=t.getContext("2d"),h=yield b.ImageLoader(this.Picture.originDataUrl),s=h.width,c=h.height;(l==90||l==270)&&(s=h.height,c=h.width),t.width=s,t.height=c,i&&(a.filter="grayscale("+i+"%)"),l&&(a.translate(s/2,c/2),a.rotate(l*Math.PI/180),[90,270].includes(l)?a.translate(-c/2,-s/2):a.translate(-s/2,-c/2)),a.drawImage(h,0,0,h.width,h.height);let o=a.getImageData(0,0,t.width,t.height),r=o.data;{i/=100;let C=[[255,255,255],[255,200,100],[170,170,255],[240,200,145],[128,255,255],[255,128,255],[255,255,128],[128,158,169],[128,112,162],[50,192,87],[246,100,140]][e],x=C[0]/255,S=C[1]/255,p=C[2]/255;for(let u=0;u<c;u++)for(let v=0;v<s;v++){var n=(u*s+v)*4;if(i){let w=.3*r[n]+.59*r[n+1]+.11*r[n+2];for(var d=0;d<3;d++){let E=r[n+d];r[n+d]=E+(w-E)*i}}r[n]*=x,r[n+1]*=S,r[n+2]*=p}}a.putImageData(o,0,0);let g=t.toDataURL("image/jpeg");{let C=yield b.ImageLoader(g),{width:x,height:S}=C,p=x/S;this.Picture=O(X({},this.Picture),{elm:C,aspect:p,revisedAspect:this.pst.frame.aspect>p?this.pst.frame.w/x:this.pst.frame.h/S})}this.drawImage()})}drawImage(i,e){let{use:l,Canvas:{ctx:t},pst:{frame:a}}=this,h=i||this.pst.imageX,s=e||this.pst.imageY;{let c=this.scale.current/100,o=this.Picture.revisedAspect*c,r=this.pst.centerX-h*o,n=this.pst.centerY-s*o,d=this.Picture.elm.width*o,g=this.Picture.elm.height*o;{let C=this.pst.frame.x+this.pst.frame.w-d,x=this.pst.frame.x,S=this.pst.frame.y+this.pst.frame.h-g,p=this.pst.frame.y,u=0;r<C&&(u=r-C),r>x&&(u=r-x);let v=0;n<S&&(v=n-S),n>p&&(v=n-p),this.dragEffectInfo.origin.x+=u/2/this.dragEffectInfo.frameExpandRate.x,this.dragEffectInfo.origin.y+=v/2/this.dragEffectInfo.frameExpandRate.y,r=Math.min(Math.max(r,C),x),n=Math.min(Math.max(n,S),p)}this.pst.outImage={x:r,y:n,w:d,h:g},t.clearRect(0,0,this.Canvas.elm.width,this.Canvas.elm.height),t.drawImage(this.Picture.elm,0,0,this.Picture.elm.width,this.Picture.elm.height,r,n,d,g)}{l=="square"?(t.fillStyle="rgba( 20,24,20,.3 )",t.beginPath(),t.arc(this.Canvas.elm.width/2,this.Canvas.elm.height/2,this.Canvas.elm.width,0,Math.PI*2,!0),t.arc(this.Canvas.elm.width/2,this.Canvas.elm.height/2,this.Canvas.elm.width/3*2/2,0,Math.PI*2,!1),t.closePath(),t.fill()):(l=="wallpaper.horizontal"||l=="wallpaper.vertical")&&(t.fillStyle="rgba( 20,24,20,.3 )"),t.beginPath(),t.moveTo(0,0),t.lineTo(this.Canvas.elm.width,0),t.lineTo(this.Canvas.elm.width,this.Canvas.elm.height),t.lineTo(0,this.Canvas.elm.height),t.lineTo(0,0),t.closePath(),t.lineTo(a.x,a.y),t.lineTo(a.x,a.y+a.h),t.lineTo(a.x+a.w,a.y+a.h),t.lineTo(a.x+a.w,a.y),t.lineTo(a.x,a.y),t.fill();let o=b(document.body).getStyleProperty("--color-theme-hsl");t.lineWidth=this.Canvas.elm.width/200,t.strokeStyle=`hsla( ${o},1 )`,t.strokeRect(a.x,a.y,a.w,a.h)}}export(){return P(this,null,function*(){let{develops:i,Picture:e,pst:{outImage:l,frame:t}}=this,a=l.w/e.elm.width,h=l.h/e.elm.height,s=(t.x-l.x)/a,c=(t.x-l.x+t.w)/a,o=(t.y-l.y)/h,r=(t.y-l.y+t.h)/h,n=Array.from({length:i.length}),d="image/jpeg";for(let g=0;g<i.length;g++){let{size:C,maxSize:x}=i[g];x=x||{S:1024*20,R:1024*100,L:1024*350}[C];let S={S:144,R:576,L:1152}[C],p=S;this.use=="wallpaper.horizontal"?p=S/3*2:this.use=="wallpaper.vertical"&&(p=S*2);let u=document.createElement("canvas");u.width=S,u.height=p;let v=u.getContext("2d");if(!v)return;v.clearRect(0,0,S,p),v.drawImage(this.Picture.elm,s,o,c-s,r-o,0,0,S,p);let w=u.toDataURL(d),E=yield w.toBlob(d);if(!E)return;if(E.size>=x){let F=x/E.size;if(w=u.toDataURL(d,F*.92),E=yield w.toBlob(d),!E)return}let U=new File([E],this.val_file.name,{type:d});n[g]=U}return n})}}const G={Core:f=>{let{val_file:i,options:e,finishedCallback:l,abortCallback:t}=f,{use:a,develops:h=[]}=e,[s]=z(b.uuid.gen(32));const c={scale:{default:125,min:100,max:300},rotate:0,grayScale:0,tone:0};let[o,r]=z(c.scale.default),[n,d]=z(c.rotate),[g,C]=z(c.grayScale),[x,S]=z(c.tone);return H(()=>{M.set({key:s,value:{}}),P(void 0,null,function*(){k.fn.corner.active();let{target:p}=yield i.read();if(!p)return;let u=p.result,v=j("#Canvas-"+s)[0];if(!v)return;let w=new ee({set_scale:r,val_file:i,develops:h,use:a,scale:c.scale,componentID:s,canvas:v,picture:{image:yield b.ImageLoader(u),grayScale:c.grayScale,tone:c.tone,rotate:c.rotate}});M.set({key:s,value:{Instance:w}});const E=function(I){if(I.preventDefault(),I.touches&&I.touches.length>1)w.pinchEffect({eventType:"start",event:I}),b(document).addEvent({eventType:"touchmove",eventID:"CropperEffectMove",options:{passive:!1},callback:R=>{R.preventDefault(),w.pinchEffect({eventType:"move",event:R})}}).addEvent({eventType:"touchend",eventID:"CropperEffectEnd",options:{passive:!1},callback:F});else{w.dragEffect(X({eventType:"start"},b.getCursor(I)));let{type:R}=I;b(document).addEvent({eventType:R=="touchstart"?"touchmove":"mousemove",eventID:"CropperEffectMove",options:{passive:!1},callback:_=>{U("move",_)}}).addEvent({eventType:R=="touchstart"?"touchend":"mouseup",eventID:"CropperEffectEnd",options:{passive:!1},callback:_=>{U("end",_),F(_)}})}},U=function(I,R){R.preventDefault(),w.dragEffect(X({eventType:I},b.getCursor(R)))},F=function(I){I.preventDefault(),b(document).removeEvent(["CropperEffectMove","CropperEffectEnd"])};b(v).removeEvent(["CropperMouseWheel","CropperTouchStart","CropperMouseDown"]).addEvent({eventID:"CropperMouseWheel",eventType:"wheel",callback:I=>{I.preventDefault();let R=Number(I.wheelDelta*.04),_=w.scale.current+R;_=Math.max(_,w.scale.min),_=Math.min(_,w.scale.max),r(_)},options:{passive:!1}}).addEvent({eventType:"touchstart",eventID:"CropperTouchStart",callback:E,options:{passive:!1}}).addEvent({eventType:"mousedown",eventID:"CropperMouseDown",callback:E,options:{passive:!1}}),setTimeout(()=>{k.fn.corner.stop()},1e3)})},[i.id]),H(()=>{var u;let p=(u=M.get(s))==null?void 0:u.Instance;p&&p.updateScale(o)},[o]),H(()=>{var u;let p=(u=M.get(s))==null?void 0:u.Instance;p&&p.updateFilter({grayScale:g,tone:x,rotate:n})},[g,x,n]),m(A.Comps.Body,{children:y(V,{className:[L("Wrap"),L("Use_"+a)].join(" "),flexWrap:!1,position:"relative",overflow:"hidden",borderRadius:"inherit",boxShadow:"3.remark",UnderBreakPointStyles:{flexType:"col"},children:[m(D,{flexGrid:3,UnderBreakPointStyles:{width:1,padding:2},children:m(D,{overflow:"hidden",position:"relative",backgroundColor:"layer.4",freeCSS:{zIndex:1},UnderBreakPointStyles:{borderRadius:"1.tone.primary"},children:m("canvas",{width:"2400",height:a=="wallpaper.horizontal"?"1800":a=="wallpaper.vertical"?"3200":"2400",className:L("Canvas"),id:"Canvas-"+s})})}),y(T,{gap:0,flexGrid:2,boxShadow:"3.remark",UnderBreakPointStyles:{width:1,maxWidth:"unset"},freeCSS:{maxWidth:12*28},children:[y(T,{gap:1,flexSizing:0,overflow:"auto",padding:1.5,UnderBreakPointStyles:{flexSizing:"none"},children:[m(D,{flexSizing:"none",fontSize:"4.thirdTitle",isSemiBoldFont:!0,children:"\u30D5\u30A3\u30EB\u30BF\u30FC"}),m(G.SettingRegion,{DefaultOptions:c,val_scale:o,set_scale:r,val_tone:x,set_tone:S,val_grayScale:g,set_grayScale:C,val_rotate:n,set_rotate:d})]}),y(V,{padding:1.5,flexSizing:"none",gap:1,borderTop:!0,children:[m(Y.Button.Border.R,{onClick:()=>{t()},children:"\u30AD\u30E3\u30F3\u30BB\u30EB"}),m(Y.Button.Prime.R,{flexSizing:0,onClick:()=>P(void 0,null,function*(){var v;let p=(v=M.get(s))==null?void 0:v.Instance;if(!p)return;k.fn.mini.active("CropperExportation");let u=yield p.export();setTimeout(()=>{k.fn.mini.stop("CropperExportation"),l(u)},3e3)}),children:y(q.Center,{gap:"1/2",children:[m(k.White.R,{loaderID:"CropperExportation"}),"\u6C7A\u5B9A"]})})]})]})]})})},SettingRegion:f=>{let i=[];for(let e=1;e<=10;e++)i.push({value:e,label:y($,{children:[m(D,{className:[L("ToneBall"),L("ToneBall_"+e)].join(" ")}),m(D,{textAlign:"center",flexSizing:"auto",children:["","\u6696\u8272","\u5BD2\u8272","\u30BB\u30D4\u30A2","\u30B7\u30A2\u30F3","\u30DE\u30BC\u30F3\u30BF","\u30A4\u30A8\u30ED\u30FC","\u30AA\u30EA\u30B8\u30CA\u30EB1","\u30AA\u30EA\u30B8\u30CA\u30EB2","\u30AA\u30EA\u30B8\u30CA\u30EB3","\u30AA\u30EA\u30B8\u30CA\u30EB4"][e]})]})});return y($,{children:[y(T,{gap:"1/3",children:[y(D,{children:[m(B.Rotate,{fontSize:"3.paragraph",fontColor:"4.thin"})," Rotate"]}),y(q.Separate,{flexChilds:"even",paddingLeft:2,children:[y(Y.Button.Border.S,{onClick:()=>{let e=f.val_rotate-90;e<0&&(e+=360),f.set_rotate(e)},children:[m(B,{icon:J})," \u5DE6\u306B\u56DE\u8EE2"]}),y(Y.Button.Border.S,{onClick:()=>{f.set_rotate((f.val_rotate+90)%360)},children:["\u53F3\u306B\u56DE\u8EE2 ",m(B,{icon:Q})]})]})]}),y(T,{gap:"1/3",children:[y(D,{children:[m(B.Search,{fontSize:"3.paragraph",fontColor:"4.thin"})," Zoom"]}),m(D,{paddingLeft:2,children:m(W.Slider,{override:"force",value:f.val_scale-100,min:f.DefaultOptions.scale.min-100,max:f.DefaultOptions.scale.max-100,step:25,onUpdateValidValue:({eventType:e,value:l})=>{b.interval.clear("Cropper.UpdateScale"),b.interval.standBy("Cropper.UpdateScale",400,()=>{f.set_scale(l+100)})},legends:{enable:!0,custom:e=>"x"+Math.round(100+e)/100}})})]}),y(T,{gap:"1/3",children:[y(D,{children:[m(B,{icon:K,fontSize:"3.paragraph",fontColor:"4.thin"})," Gray Scale"]}),m(D,{paddingLeft:2,children:m(W.Slider,{value:f.val_grayScale,min:0,max:100,step:10,onUpdateValidValue:({value:e})=>{b.interval.clear("Cropper.GrayScale"),b.interval.standBy("Cropper.GrayScale",400,()=>{f.set_grayScale(e)})},legends:{enable:!0,custom:e=>e+"%"}})})]}),y(T,{gap:"1/3",children:[y(D,{children:[m(B,{icon:Z,fontSize:"3.paragraph",fontColor:"4.thin"})," Tone"]}),m(D,{paddingLeft:2,children:m(W.Radio,{value:f.val_tone,gap:"1/2",cellStyles:{isRounded:!0,borderWidth:2,borderColor:"1.thin",padding:"1/2",paddingRight:1,fontSize:"1.mini",gap:"1/3",flexSizing:"auto"},options:[{value:0,label:"\u306A\u3057",padding:["1/2",1],flexCenter:!0},...i],onUpdateValidValue:({value:e})=>{f.set_tone(e[0])}})})]})]})}},N={open:f=>P(void 0,null,function*(){let i=yield W.Filer.fn.openDialog({accept:"image",multiple:!1}),e="CropperImage";A.open({sheetID:e,type:"normal.middleCenter",size:"3L",freeCSS:{width:f.use=="wallpaper.horizontal"?12*100:12*80},content:m(G.Core,{val_file:i[0],options:f,finishedCallback:l=>{A.close(e),f.onProcessFinished(l)},abortCallback:()=>{A.close(e)}}),close_option:{escapeKeyDown:!1}})})};export{N as Cropper,N as default};
1
+ import{b as X,c as O,e as B}from"../chunk-VY3566IV.js";import{Fragment as $,jsx as p,jsxs as y}from"react/jsx-runtime";import{$$ as b,$$fromRoot as j,useStore as M}from"../@utils";import{useState as z,useEffect as H}from"react";import V from"../atoms/Flex";import D from"../atoms/Box";import P from"../atoms/FAI";import T from"../mols/Column";import q from"../mols/Row";import Y from"./Button";import A from"./Sheet";import k from"./Loader";import W from"./Input";import{faPalette as K}from"@fortawesome/free-solid-svg-icons/faPalette";import{faBarsStaggered as Z}from"@fortawesome/free-solid-svg-icons/faBarsStaggered";import{faRotateLeft as J}from"@fortawesome/free-solid-svg-icons/faRotateLeft";import{faRotateRight as Q}from"@fortawesome/free-solid-svg-icons/faRotateRight";import{CropperClasses as L}from"../@styles/componentClasses";class ee{constructor(i){this.set_scale=i.set_scale,this.val_file=i.val_file,this.develops=i.develops,this.use=i.use,this.componentID=i.componentID,this.scale={current:i.scale.default,default:i.scale.default,min:i.scale.min,max:i.scale.max};let e=i.canvas,{width:l,height:t}=e,a=i.picture.image,{width:h,height:s}=a,c=h/s;this.Canvas={elm:e,ctx:e.getContext("2d")};let o=0,r=0;this.use=="square"?(o=e.width/3*2,r=e.height/3*2):this.use=="wallpaper.horizontal"?(o=e.width*(7/9),r=o/3):this.use=="wallpaper.vertical"&&(r=e.height*(7/9),o=r/2);let n=(e.width-o)/2,d=(e.height-r)/2,g=o/r;this.Picture={elm:a,originDataUrl:a.src,aspect:c,revisedAspect:g>c?o/h:r/s,rotate:i.picture.rotate,grayScale:i.picture.grayScale,tone:i.picture.tone},this.pst={frame:{x:n,y:d,w:o,h:r,aspect:g},outImage:{x:0,y:0,w:0,h:0},imageX:h/2,imageY:s/2,centerX:l/2,centerY:t/2},this.dragEffectInfo={origin:{x:0,y:0},frameExpandRate:{x:0,y:0}},this.pinchEffectInfo={origin:{x:0,y:0,scale:this.scale.current}},this.modifyImage()}dragEffect(i){let{eventType:e,x:l,y:t}=i;if(e=="start"){let a=this.Canvas.elm.position();this.dragEffectInfo={origin:{x:l,y:t},frameExpandRate:{x:this.Canvas.elm.width/a.width,y:this.Canvas.elm.height/a.height}}}else{let{origin:a,frameExpandRate:h}=this.dragEffectInfo,s=a.x-l,c=a.y-t,o=this.scale.current*this.Picture.revisedAspect/100,r=s/o*h.x,n=c/o*h.y;e=="move"?this.drawImage(this.pst.imageX+r,this.pst.imageY+n):e=="end"&&this.drawImage(this.pst.imageX+=r,this.pst.imageY+=n)}}pinchEffect(i){let{eventType:e,event:l}=i,{x:t,y:a}=b.getCursor(l.touches[0]),{x:h,y:s}=b.getCursor(l.touches[1]),c=h-t,o=s-a;if(e=="start")this.pinchEffectInfo.origin={x:c,y:o,scale:this.scale.current};else if(e=="move"){let{origin:r}=this.pinchEffectInfo,n=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)),g=Math.sqrt(Math.pow(c,2)+Math.pow(o,2))/n,C=Number(r.scale*g);this.set_scale(C)}}updateScale(i){let e=i;e=Math.max(e,this.scale.min),e=Math.min(e,this.scale.max),this.scale.current=e,this.drawImage()}updateFilter(i){this.Picture.grayScale=i.grayScale,this.Picture.tone=i.tone,this.Picture.rotate=i.rotate,this.modifyImage()}modifyImage(){return B(this,null,function*(){let{grayScale:i,tone:e,rotate:l}=this.Picture;const t=document.createElement("canvas");let a=t.getContext("2d"),h=yield b.ImageLoader(this.Picture.originDataUrl),s=h.width,c=h.height;(l==90||l==270)&&(s=h.height,c=h.width),t.width=s,t.height=c,i&&(a.filter="grayscale("+i+"%)"),l&&(a.translate(s/2,c/2),a.rotate(l*Math.PI/180),[90,270].includes(l)?a.translate(-c/2,-s/2):a.translate(-s/2,-c/2)),a.drawImage(h,0,0,h.width,h.height);let o=a.getImageData(0,0,t.width,t.height),r=o.data;{i/=100;let C=[[255,255,255],[255,200,100],[170,170,255],[240,200,145],[128,255,255],[255,128,255],[255,255,128],[128,158,169],[128,112,162],[50,192,87],[246,100,140]][e],x=C[0]/255,S=C[1]/255,m=C[2]/255;for(let u=0;u<c;u++)for(let v=0;v<s;v++){var n=(u*s+v)*4;if(i){let w=.3*r[n]+.59*r[n+1]+.11*r[n+2];for(var d=0;d<3;d++){let E=r[n+d];r[n+d]=E+(w-E)*i}}r[n]*=x,r[n+1]*=S,r[n+2]*=m}}a.putImageData(o,0,0);let g=t.toDataURL("image/jpeg");{let C=yield b.ImageLoader(g),{width:x,height:S}=C,m=x/S;this.Picture=O(X({},this.Picture),{elm:C,aspect:m,revisedAspect:this.pst.frame.aspect>m?this.pst.frame.w/x:this.pst.frame.h/S})}this.drawImage()})}drawImage(i,e){let{use:l,Canvas:{ctx:t},pst:{frame:a}}=this,h=i||this.pst.imageX,s=e||this.pst.imageY;{let c=this.scale.current/100,o=this.Picture.revisedAspect*c,r=this.pst.centerX-h*o,n=this.pst.centerY-s*o,d=this.Picture.elm.width*o,g=this.Picture.elm.height*o;{let C=this.pst.frame.x+this.pst.frame.w-d,x=this.pst.frame.x,S=this.pst.frame.y+this.pst.frame.h-g,m=this.pst.frame.y,u=0;r<C&&(u=r-C),r>x&&(u=r-x);let v=0;n<S&&(v=n-S),n>m&&(v=n-m),this.dragEffectInfo.origin.x+=u/2/this.dragEffectInfo.frameExpandRate.x,this.dragEffectInfo.origin.y+=v/2/this.dragEffectInfo.frameExpandRate.y,r=Math.min(Math.max(r,C),x),n=Math.min(Math.max(n,S),m)}this.pst.outImage={x:r,y:n,w:d,h:g},t.clearRect(0,0,this.Canvas.elm.width,this.Canvas.elm.height),t.drawImage(this.Picture.elm,0,0,this.Picture.elm.width,this.Picture.elm.height,r,n,d,g)}{l=="square"?(t.fillStyle="rgba( 20,24,20,.3 )",t.beginPath(),t.arc(this.Canvas.elm.width/2,this.Canvas.elm.height/2,this.Canvas.elm.width,0,Math.PI*2,!0),t.arc(this.Canvas.elm.width/2,this.Canvas.elm.height/2,this.Canvas.elm.width/3*2/2,0,Math.PI*2,!1),t.closePath(),t.fill()):(l=="wallpaper.horizontal"||l=="wallpaper.vertical")&&(t.fillStyle="rgba( 20,24,20,.3 )"),t.beginPath(),t.moveTo(0,0),t.lineTo(this.Canvas.elm.width,0),t.lineTo(this.Canvas.elm.width,this.Canvas.elm.height),t.lineTo(0,this.Canvas.elm.height),t.lineTo(0,0),t.closePath(),t.lineTo(a.x,a.y),t.lineTo(a.x,a.y+a.h),t.lineTo(a.x+a.w,a.y+a.h),t.lineTo(a.x+a.w,a.y),t.lineTo(a.x,a.y),t.fill();let o=b(document.body).getStyleProperty("--color-theme-hsl");t.lineWidth=this.Canvas.elm.width/200,t.strokeStyle=`hsla( ${o},1 )`,t.strokeRect(a.x,a.y,a.w,a.h)}}export(){return B(this,null,function*(){let{develops:i,Picture:e,pst:{outImage:l,frame:t}}=this,a=l.w/e.elm.width,h=l.h/e.elm.height,s=(t.x-l.x)/a,c=(t.x-l.x+t.w)/a,o=(t.y-l.y)/h,r=(t.y-l.y+t.h)/h,n=Array.from({length:i.length}),d="image/jpeg";for(let g=0;g<i.length;g++){let{size:C,maxSize:x}=i[g];x=x||{S:1024*20,R:1024*100,L:1024*350}[C];let S={S:144,R:576,L:1152}[C],m=S;this.use=="wallpaper.horizontal"?m=S/3*2:this.use=="wallpaper.vertical"&&(m=S*2);let u=document.createElement("canvas");u.width=S,u.height=m;let v=u.getContext("2d");if(!v)return;v.clearRect(0,0,S,m),v.drawImage(this.Picture.elm,s,o,c-s,r-o,0,0,S,m);let w=u.toDataURL(d),E=yield w.toBlob(d);if(!E)return;if(E.size>=x){let F=x/E.size;if(w=u.toDataURL(d,F*.92),E=yield w.toBlob(d),!E)return}let U=new File([E],this.val_file.name,{type:d});n[g]=U}return n})}}const G={Core:f=>{let{val_file:i,options:e,finishedCallback:l,abortCallback:t}=f,{use:a,develops:h=[]}=e,[s]=z(b.uuid.gen(32));const c={scale:{default:125,min:100,max:300},rotate:0,grayScale:0,tone:0};let[o,r]=z(c.scale.default),[n,d]=z(c.rotate),[g,C]=z(c.grayScale),[x,S]=z(c.tone);return H(()=>{M.set({key:s,value:{}}),B(void 0,null,function*(){k.fn.corner.active();let{target:m}=yield i.read();if(!m)return;let u=m.result,v=j("#Canvas-"+s)[0];if(!v)return;let w=new ee({set_scale:r,val_file:i,develops:h,use:a,scale:c.scale,componentID:s,canvas:v,picture:{image:yield b.ImageLoader(u),grayScale:c.grayScale,tone:c.tone,rotate:c.rotate}});M.set({key:s,value:{Instance:w}});const E=function(I){if(I.preventDefault(),I.touches&&I.touches.length>1)w.pinchEffect({eventType:"start",event:I}),b(document).addEvent({eventType:"touchmove",eventID:"CropperEffectMove",options:{passive:!1},callback:R=>{R.preventDefault(),w.pinchEffect({eventType:"move",event:R})}}).addEvent({eventType:"touchend",eventID:"CropperEffectEnd",options:{passive:!1},callback:F});else{w.dragEffect(X({eventType:"start"},b.getCursor(I)));let{type:R}=I;b(document).addEvent({eventType:R=="touchstart"?"touchmove":"mousemove",eventID:"CropperEffectMove",options:{passive:!1},callback:_=>{U("move",_)}}).addEvent({eventType:R=="touchstart"?"touchend":"mouseup",eventID:"CropperEffectEnd",options:{passive:!1},callback:_=>{U("end",_),F(_)}})}},U=function(I,R){R.preventDefault(),w.dragEffect(X({eventType:I},b.getCursor(R)))},F=function(I){I.preventDefault(),b(document).removeEvent(["CropperEffectMove","CropperEffectEnd"])};b(v).removeEvent(["CropperMouseWheel","CropperTouchStart","CropperMouseDown"]).addEvent({eventID:"CropperMouseWheel",eventType:"wheel",callback:I=>{I.preventDefault();let R=Number(I.wheelDelta*.04),_=w.scale.current+R;_=Math.max(_,w.scale.min),_=Math.min(_,w.scale.max),r(_)},options:{passive:!1}}).addEvent({eventType:"touchstart",eventID:"CropperTouchStart",callback:E,options:{passive:!1}}).addEvent({eventType:"mousedown",eventID:"CropperMouseDown",callback:E,options:{passive:!1}}),setTimeout(()=>{k.fn.corner.stop()},1e3)})},[i.id]),H(()=>{var u;let m=(u=M.get(s))==null?void 0:u.Instance;m&&m.updateScale(o)},[o]),H(()=>{var u;let m=(u=M.get(s))==null?void 0:u.Instance;m&&m.updateFilter({grayScale:g,tone:x,rotate:n})},[g,x,n]),p(A.Comps.Body,{children:y(V,{className:[L("Wrap"),L("Use_"+a)].join(" "),flexWrap:!1,position:"relative",overflow:"hidden",borderRadius:"inherit",boxShadow:"3.remark",UnderBreakPointStyles:{flexType:"col"},children:[p(D,{flexGrid:3,UnderBreakPointStyles:{width:1,padding:2},children:p(D,{overflow:"hidden",position:"relative",backgroundColor:"layer.4",freeCSS:{zIndex:1},UnderBreakPointStyles:{borderRadius:"1.tone.primary"},children:p("canvas",{width:"2400",height:a=="wallpaper.horizontal"?"1800":a=="wallpaper.vertical"?"3200":"2400",className:L("Canvas"),id:"Canvas-"+s})})}),y(T,{gap:0,flexGrid:2,boxShadow:"3.remark",UnderBreakPointStyles:{width:1,maxWidth:"unset"},freeCSS:{maxWidth:12*28},children:[y(T,{gap:1,flexSizing:0,overflow:"auto",padding:1.5,UnderBreakPointStyles:{flexSizing:"none"},children:[p(D,{flexSizing:"none",fontSize:"4.thirdTitle",isSemiBoldFont:!0,children:"\u30D5\u30A3\u30EB\u30BF\u30FC"}),p(G.SettingRegion,{DefaultOptions:c,val_scale:o,set_scale:r,val_tone:x,set_tone:S,val_grayScale:g,set_grayScale:C,val_rotate:n,set_rotate:d})]}),y(V,{padding:1.5,flexSizing:"none",gap:1,borderTop:!0,children:[p(Y.Button.Border.R,{onClick:()=>{t()},children:"\u30AD\u30E3\u30F3\u30BB\u30EB"}),p(Y.Button.Prime.R,{flexSizing:0,onClick:()=>B(void 0,null,function*(){var v;let m=(v=M.get(s))==null?void 0:v.Instance;if(!m)return;k.fn.mini.active("CropperExportation");let u=yield m.export();setTimeout(()=>{k.fn.mini.stop("CropperExportation"),l(u)},3e3)}),children:y(q.Center,{gap:"1/2",children:[p(k.White.R,{loaderID:"CropperExportation"}),"\u6C7A\u5B9A"]})})]})]})]})})},SettingRegion:f=>{let i=[];for(let e=1;e<=10;e++)i.push({value:e,label:y($,{children:[p(D,{className:[L("ToneBall"),L("ToneBall_"+e)].join(" ")}),p(D,{textAlign:"center",flexSizing:"auto",children:["","\u6696\u8272","\u5BD2\u8272","\u30BB\u30D4\u30A2","\u30B7\u30A2\u30F3","\u30DE\u30BC\u30F3\u30BF","\u30A4\u30A8\u30ED\u30FC","\u30AA\u30EA\u30B8\u30CA\u30EB1","\u30AA\u30EA\u30B8\u30CA\u30EB2","\u30AA\u30EA\u30B8\u30CA\u30EB3","\u30AA\u30EA\u30B8\u30CA\u30EB4"][e]})]})});return y($,{children:[y(T,{gap:"1/3",children:[y(D,{children:[p(P.Rotate,{fontSize:"3.paragraph",fontColor:"4.thin"})," Rotate"]}),y(q.Separate,{flexChilds:"even",paddingLeft:2,children:[y(Y.Button.Border.S,{onClick:()=>{let e=f.val_rotate-90;e<0&&(e+=360),f.set_rotate(e)},children:[p(P,{icon:J})," \u5DE6\u306B\u56DE\u8EE2"]}),y(Y.Button.Border.S,{onClick:()=>{f.set_rotate((f.val_rotate+90)%360)},children:["\u53F3\u306B\u56DE\u8EE2 ",p(P,{icon:Q})]})]})]}),y(T,{gap:"1/3",children:[y(D,{children:[p(P.Search,{fontSize:"3.paragraph",fontColor:"4.thin"})," Zoom"]}),p(D,{paddingLeft:2,children:p(W.Slider,{override:"force",value:f.val_scale-100,min:f.DefaultOptions.scale.min-100,max:f.DefaultOptions.scale.max-100,step:25,onUpdateValidValue:({eventType:e,value:l})=>{b.interval.clear("Cropper.UpdateScale"),b.interval.standBy("Cropper.UpdateScale",400,()=>{f.set_scale(l+100)})},legends:{enable:!0,custom:e=>"x"+Math.round(100+e)/100}})})]}),y(T,{gap:"1/3",children:[y(D,{children:[p(P,{icon:K,fontSize:"3.paragraph",fontColor:"4.thin"})," Gray Scale"]}),p(D,{paddingLeft:2,children:p(W.Slider,{value:f.val_grayScale,min:0,max:100,step:10,onUpdateValidValue:({value:e})=>{b.interval.clear("Cropper.GrayScale"),b.interval.standBy("Cropper.GrayScale",400,()=>{f.set_grayScale(e)})},legends:{enable:!0,custom:e=>e+"%"}})})]}),y(T,{gap:"1/3",children:[y(D,{children:[p(P,{icon:Z,fontSize:"3.paragraph",fontColor:"4.thin"})," Tone"]}),p(D,{paddingLeft:2,children:p(W.Radio,{value:f.val_tone,gap:"1/2",cellStyles:{isRounded:!0,borderWidth:2,borderColor:"1.thin",padding:"1/2",paddingRight:1,fontSize:"1.mini",gap:"1/3",flexSizing:"auto"},options:[{value:0,label:"\u306A\u3057",padding:["1/2",1],flexCenter:!0},...i],onUpdateValidValue:({value:e})=>{f.set_tone(e[0])}})})]})]})}},N={open:f=>B(void 0,null,function*(){let i=yield W.Filer.fn.openDialog({accept:"image",multiple:!1}),e="CropperImage";A.open({sheetID:e,type:"normal.middleCenter",size:"3L",freeCSS:{width:f.use=="wallpaper.horizontal"?12*100:12*80},content:p(G.Core,{val_file:i[0],options:f,finishedCallback:l=>{A.close(e),f.onProcessFinished(l)},abortCallback:()=>{A.close(e)}}),close_option:{escapeKeyDown:!1}})})};export{N as Cropper,N as default};
@@ -1 +1 @@
1
- import{b as a,c as i,d as s}from"../../chunk-VY3566IV.js";import{jsx as y}from"react/jsx-runtime";import{$$ as u,$$fromRoot as d}from"../../@utils/_";import{useState as I,useEffect as l}from"react";import f from"../../atoms/Box";const D=m=>{let n=m,{animationDelay:p=100,animationTime:r=300,componentID:c=u.uuid.gen()}=n,e=s(n,["animationDelay","animationTime","componentID"]),[t]=I(c);return l(()=>{setTimeout(()=>{let o=d('[data-component-id="'+t+'"]');o[0]&&o.css({transition:r+"ms"}).await(1).css({opacity:1})},p)},[]),y(f,i(a({},e),{freeCSS:i(a({},e.freeCSS),{opacity:0}),componentID:t}))},S=m=>{let n=m,{animationDelay:p=100,animationTime:r=300,componentID:c=u.uuid.gen()}=n,e=s(n,["animationDelay","animationTime","componentID"]),[t]=I(c);return l(()=>{setTimeout(()=>{let o=d('[data-component-id="'+t+'"]');o[0]&&o.css({transition:r+"ms"}).await(1).css({opacity:1,paddingTop:0})},p)},[]),y(f,i(a({paddingTop:2},e),{freeCSS:i(a({},e.freeCSS),{opacity:0}),componentID:t}))};export{D as FadeIn,S as FadeUp};
1
+ import{b as a,c as i,d as s}from"../../chunk-VY3566IV.js";import{jsx as y}from"react/jsx-runtime";import{$$ as u,$$fromRoot as d}from"../../@utils";import{useState as I,useEffect as l}from"react";import f from"../../atoms/Box";const D=m=>{let n=m,{animationDelay:p=100,animationTime:r=300,componentID:c=u.uuid.gen()}=n,e=s(n,["animationDelay","animationTime","componentID"]),[t]=I(c);return l(()=>{setTimeout(()=>{let o=d('[data-component-id="'+t+'"]');o[0]&&o.css({transition:r+"ms"}).await(1).css({opacity:1})},p)},[]),y(f,i(a({},e),{freeCSS:i(a({},e.freeCSS),{opacity:0}),componentID:t}))},S=m=>{let n=m,{animationDelay:p=100,animationTime:r=300,componentID:c=u.uuid.gen()}=n,e=s(n,["animationDelay","animationTime","componentID"]),[t]=I(c);return l(()=>{setTimeout(()=>{let o=d('[data-component-id="'+t+'"]');o[0]&&o.css({transition:r+"ms"}).await(1).css({opacity:1,paddingTop:0})},p)},[]),y(f,i(a({paddingTop:2},e),{freeCSS:i(a({},e.freeCSS),{opacity:0}),componentID:t}))};export{D as FadeIn,S as FadeUp};
@@ -1,4 +1,4 @@
1
- import { ReactElement } from '../../@declaration/_';
1
+ import { ReactElement } from '../../@declaration';
2
2
  declare namespace Pudding {
3
3
  type Methods = {
4
4
  Wrapper(): ReactElement;
@@ -1 +1 @@
1
- import"../../chunk-VY3566IV.js";import{$$ as t,Config as n}from"../../@utils/_";import{EffectClasses as e}from"../../@styles/componentClasses/_";const a={Wrapper:()=>(t(n.get().appRoot).addEvent({eventType:"click",target:".eff_pudding",callback:function(d){t(d.target).removeClass(e("PuddingEffect")).await(1).addClass(e("PuddingEffect")).await(510).removeClass(e("PuddingEffect"))}}),null)};export{a as Pudding,a as default};
1
+ import"../../chunk-VY3566IV.js";import{$$ as t,Config as n}from"../../@utils";import{EffectClasses as e}from"../../@styles/componentClasses";const a={Wrapper:()=>(t(n.get().appRoot).addEvent({eventType:"click",target:".eff_pudding",callback:function(d){t(d.target).removeClass(e("PuddingEffect")).await(1).addClass(e("PuddingEffect")).await(510).removeClass(e("PuddingEffect"))}}),null)};export{a as Pudding,a as default};
@@ -1,4 +1,4 @@
1
- import { ReactElement } from '../../@declaration/_';
1
+ import { ReactElement } from '../../@declaration';
2
2
  declare namespace Ripple {
3
3
  type Methods = {
4
4
  Wrapper(): ReactElement;
@@ -1,3 +1,3 @@
1
- import"../../chunk-VY3566IV.js";import{$$ as e,Config as u}from"../../@utils/_";import{EffectClasses as a}from"../../@styles/componentClasses/_";let f="eff_ripple";const n={Start:t=>{let l=e.Time().ms,s=t.target,p=e(s);if(!p[0])return;let o=p.findClass(/^eff_ripple-/)[0];if(!o)return;let r=o.split("-")[1],i="RippleWrap-"+e.uuid.gen(),{left:d,top:E,height:b,width:h}=p.position(),{pageXOffset:R,pageYOffset:g}=e.getScreenSize(),{x:T,y}=e.getCursor(t),c=Math.min(h*1.5,300),M=Math.max(T-(d+R),0),C=Math.max(y-(E+g),0),m={RippleElement:p,startedAt:l,size:c};e(document).addEvent({eventID:"RippleMouseUp",eventType:"mouseup",callback:()=>{n.End(m)}}).addEvent({eventID:"RippleTouchEnd",eventType:"touchend",callback:()=>{setTimeout(()=>{n.End(m)},20)}}),e(p).addClass([a("RippleElement"),a("Color_"+r)]).append(`<div class="${a("RippleWrap")}" id="${i}">
1
+ import"../../chunk-VY3566IV.js";import{$$ as e,Config as u}from"../../@utils";import{EffectClasses as a}from"../../@styles/componentClasses";let f="eff_ripple";const n={Start:t=>{let l=e.Time().ms,s=t.target,p=e(s);if(!p[0])return;let o=p.findClass(/^eff_ripple-/)[0];if(!o)return;let r=o.split("-")[1],i="RippleWrap-"+e.uuid.gen(),{left:d,top:E,height:b,width:h}=p.position(),{pageXOffset:R,pageYOffset:g}=e.getScreenSize(),{x:T,y}=e.getCursor(t),c=Math.min(h*1.5,300),M=Math.max(T-(d+R),0),C=Math.max(y-(E+g),0),m={RippleElement:p,startedAt:l,size:c};e(document).addEvent({eventID:"RippleMouseUp",eventType:"mouseup",callback:()=>{n.End(m)}}).addEvent({eventID:"RippleTouchEnd",eventType:"touchend",callback:()=>{setTimeout(()=>{n.End(m)},20)}}),e(p).addClass([a("RippleElement"),a("Color_"+r)]).append(`<div class="${a("RippleWrap")}" id="${i}">
2
2
  <div class="${a("Wave")}" />
3
3
  </div>`).addEvent({eventID:"RippleMouseOut",eventType:"mouseout",callback:I=>{n.End(m)}}).find("#"+i).find("."+a("Wave")).css({left:M,top:C}).await(10).css({height:c,width:c,opacity:".3",transition:".25s"})},End:t=>{let{RippleElement:l,startedAt:s,size:p}=t,r=e.Time().ms-s<=400?".75s":".55s",i=p*2.5;e(document).removeEvent(["RippleMouseUp","RippleTouchMove","RippleTouchEnd","RippleMouseOut"]),l.removeEvent(["RippleMouseOut"]).find("."+a("Wave")).css({height:i,width:i,opacity:"0",transition:r}).await(750).parent().callback(d=>{d.remove()})}},v={Wrapper:()=>(e(u.get().appRoot).addEvent({eventType:"touchstart",target:"."+f,callback:t=>{n.Start(t)}}).addEvent({eventType:"mousedown",target:"."+f,callback:t=>{u.get().isTouchDevice||n.Start(t)}}),null)};export{v as Ripple,v as default};
@@ -2,5 +2,5 @@ import TextArea from './TextArea';
2
2
  declare namespace AutoHeightText {
3
3
  type Input = TextArea.Input;
4
4
  }
5
- declare const AutoHeightText: (params: TextArea.Input) => import("react/jsx-runtime").JSX.Element;
5
+ declare const AutoHeightText: (para: TextArea.Input) => import("react/jsx-runtime").JSX.Element;
6
6
  export { AutoHeightText, AutoHeightText as default };
@@ -1 +1 @@
1
- import{b as n,c as o,e as u}from"../../chunk-VY3566IV.js";import{jsx as g,jsxs as w}from"react/jsx-runtime";import{useEffect as m,useState as h}from"react";import{$$ as r}from"../../@utils/_";import T from"./TextArea";import v from"../../mols/Text";import H from"../../atoms/Box";import{InputAutoHeightClasses as s}from"../../@styles/componentClasses/_";const f=e=>{let[t]=h(r.uuid.gen()),[l,c]=h(String(e.value||""));m(()=>{r.scope(()=>u(void 0,null,function*(){let i=r('[data-id="origin_'+t+'"]')[0],a=r('[data-id="shallow_'+t+'"]')[0];if(!i||!a)return;let d=a.getClientRects()[0];if(!d)return;let{width:A,height:S}=d;i.style.height=S+"px"}))},[l]);let x=!!l.match(/\n$/),p=l||e.placeholder;return x&&(p+="d"),w(H,{position:"relative",className:s("Wrapper"),children:[g(v.Description,o(n({padding:1,fontSize:"inherit"},e),{className:[e.className,s("Shallow")].join(" "),id:"shallow_"+t,position:"absolute",left:0,right:0,top:0,opacity:"trans",border:"0.trans",freeCSS:o(n({minHeight:16*1,resize:"none"},e.freeCSS),{color:"transparent",zIndex:3,pointerEvents:"none",lineHeight:"1.25",letterSpacing:"1px"}),"data-id":"shallow_"+t,children:p})),g(T,o(n({padding:1,fontSize:"inherit",overflow:"hidden"},e),{className:[e.className,s("Origin")].join(" "),freeCSS:o(n({minHeight:16*1,resize:"none"},e.freeCSS),{lineHeight:"1.25",letterSpacing:"1px"}),value:l,"data-id":"origin_"+t,onUpdateValue:i=>{let a=i.value;c(a),e.onUpdateValue&&e.onUpdateValue(i)}}))]})};export{f as AutoHeightText,f as default};
1
+ import{b as a,c as n,e as d}from"../../chunk-VY3566IV.js";import{jsx as h,jsxs as A}from"react/jsx-runtime";import{useEffect as I,useState as r}from"react";import{$$ as l}from"../../@utils";import H from"./TextArea";import y from"../../mols/Text";import{BoxWrapper as w}from"./core";import{InputAutoHeightClasses as m}from"../../@styles/componentClasses";const f=e=>{let[t]=r(l.uuid.gen()),[o,g]=r(String(e.value||""));I(()=>{l.scope(()=>d(void 0,null,function*(){let i=l('[data-id="origin_'+t+'"]')[0],s=l('[data-id="shallow_'+t+'"]')[0];if(!i||!s)return;let p=s.getClientRects()[0];if(!p)return;let{width:C,height:_}=p;i.style.height=_+"px"}))},[o]);let c={componentID:e.componentID,dataValue:e.value,eventType:"init",eventID:l.uuid.gen()},[x,v]=r(c),[S,D]=r({ok:!1,notice:[]}),T=!!o.match(/\n$/),u=o||e.placeholder;return T&&(u+="d"),A(w,{val_status:x,set_status:v,val_validate:S,para:e,children:[h(y.Description,n(a({padding:1,fontSize:"inherit"},e),{className:[e.className,m("Shallow")].join(" "),id:"shallow_"+t,position:"absolute",left:0,right:0,top:0,minHeight:1,border:"0.trans",opacity:"trans",freeCSS:n(a({minHeight:16*2,resize:"none"},e.freeCSS),{color:"transparent",zIndex:3,pointerEvents:"none",lineHeight:"1.25",letterSpacing:"1px"}),"data-id":"shallow_"+t,children:u})),h(H,n(a({padding:1,fontSize:"inherit",overflow:"hidden"},e),{className:[e.className,m("Origin")].join(" "),freeCSS:n(a({minHeight:16*1,resize:"none"},e.freeCSS),{lineHeight:"1.25",letterSpacing:"1px"}),value:o,"data-id":"origin_"+t,onUpdateValue:i=>{let s=i.value;g(s),e.onUpdateValue&&e.onUpdateValue(i)}}))]})};export{f as AutoHeightText,f as default};
@@ -1,5 +1,5 @@
1
- import { TagProperty, ReactElement } from '../../@declaration/_';
2
- import { InputTypes } from './_';
1
+ import { TagProperty, ReactElement } from '../../@declaration';
2
+ import { InputTypes } from '.';
3
3
  declare namespace Checker {
4
4
  type Input = InputTypes.CoreInput & {
5
5
  label: ReactElement;
@@ -7,11 +7,11 @@ declare namespace Checker {
7
7
  tabIndex?: number;
8
8
  disabled?: boolean;
9
9
  value?: boolean;
10
- cellStyles?: TagProperty.Params;
10
+ cellStyles?: TagProperty.Para;
11
11
  cellClassName?: string;
12
- cellCheckedStyles?: TagProperty.Params;
12
+ cellCheckedStyles?: TagProperty.Para;
13
13
  cellCheckedClassName?: string;
14
14
  };
15
15
  }
16
- declare const Checker: (params: Checker.Input) => import("react/jsx-runtime").JSX.Element;
16
+ declare const Checker: (para: Checker.Input) => import("react/jsx-runtime").JSX.Element;
17
17
  export { Checker, Checker as default };
@@ -1,6 +1,6 @@
1
- import { ReactElement } from '../../../@declaration/_';
2
- import { $$ } from '../../../@utils/_';
3
- import { Types } from './_';
1
+ import { ReactElement } from '../../../@declaration';
2
+ import { $$ } from '../../../@utils';
3
+ import { Types } from '.';
4
4
  declare namespace Selector {
5
5
  type Input = {
6
6
  selectorID: string;
@@ -9,7 +9,7 @@ declare namespace Selector {
9
9
  limit?: number;
10
10
  selected: Types.ChipsOptions[];
11
11
  SelectorCellComponent: Types.SelectorCellComponentInput;
12
- onUpdated(params: {
12
+ onUpdated(para: {
13
13
  values: any[];
14
14
  }): void;
15
15
  onDynamicSearch?: Types.onDynamicSearch;
@@ -27,14 +27,14 @@ declare namespace Selector {
27
27
  options: Types.ChipsOptions[];
28
28
  }>;
29
29
  };
30
- onUpdated(params: {
30
+ onUpdated(para: {
31
31
  values: any[];
32
32
  }): void;
33
33
  onClosed(): void;
34
34
  SelectorCellComponent?: Types.SelectorCellComponentInput;
35
35
  };
36
36
  type Methods = {
37
- openSelector(params: OpenSelectorInput): void;
37
+ openSelector(para: OpenSelectorInput): void;
38
38
  closeSelector(selectorID: string): void;
39
39
  updateOptions(selectorID: string, options: Types.ChipsOptions[]): void;
40
40
  updateSelected(selectorID: string, selected: Types.ChipsOptions[]): void;
@@ -1 +1 @@
1
- import{b as E,c as J,d as W,e as K}from"../../../chunk-VY3566IV.js";import{Fragment as j,jsx as n,jsxs as O}from"react/jsx-runtime";import{useState as I,useEffect as R,useRef as L}from"react";import{$$ as w,$$fromRoot as P,useStore as U}from"../../../@utils/_";import $ from"../../../atoms/Box";import _ from"../../../atoms/FAI";import z from"../../../atoms/Span";import H from"../../../mols/Column";import b from"../../../mols/Row";import V from"../../Button";import k from"../../Sheet";import G from"../../Loader/_";import Q from"../Text";import X from"../Parts";import{InputChipsClasses as Y}from"../../../@styles/componentClasses/_";const Z=e=>{let[h,r]=I("show"),[y,N]=I(""),[u]=I(w.uuid.gen()),[l,g]=I(e.options),[o,C]=I(l[0]||null),[S,x]=I(e.selected),[D,T]=I("init");R(()=>{U.set({key:e.selectorID,value:{updateOptions:t=>{g(t)},updateSelected:t=>{x(t)}}})},[]);const B=L(!1);R(()=>{B.current?k.reposition(e.selectorID):B.current=!0},[l]);const F=L(!1);R(()=>{F.current?(r("interlude"),C(l[0]||null),e.onDynamicSearch?(w.interval.clear(u+"-dynamicSearch"),w.interval.standBy(u+"-dynamicSearch",400,()=>K(void 0,null,function*(){let{options:t}=yield e.onDynamicSearch(y);g(t),r("show")}))):(w.interval.clear(u+"-staticSearch"),w.interval.standBy(u+"-staticSearch",400,()=>K(void 0,null,function*(){let t=new RegExp(y,"ig"),p=[];[...e.options].forEach(a=>{var c;!!(!y||((c=String(a.label))!=null?c:String(a.value)).match(t))&&p.push(a)}),g(p),r("show")})))):F.current=!0},[y]);const M=L(!1);R(()=>{M.current?e.onUpdated({values:S}):M.current=!0},[S]),R(()=>{w.scope(()=>{if(w.is.nullish(o)||D=="MouseEvent")return;let t=P("#"+u+"-Selector-Cell-Wrap");if(!t[0])return;let p=P('[data-chips-selector-cell="'+u+"-"+JSON.stringify((o==null?void 0:o.value)||"").replace(/\"/ig,"")+'"]');if(!p[0])return;let{top:a,height:v}=t.position(),{top:c,height:d}=p.position();if(a<=c&&c+d<=a+v)return;let i=t[0].scrollTop+(c-a);D=="ArrowDown"?i-=v-d-20:D=="ArrowUp"&&(i-=20),t[0].scrollTop=i})},[o]);let A=[];return h=="interlude"?A=[O(b.Center,{padding:2,gap:0,children:[n(G.Theme.R,{showInitial:!0}),n($,{padding:[0,1],fontSize:"1.mini",fontColor:"4.thin",children:"\u691C\u7D22\u4E2D..."})]})]:A=[l.map((t,p)=>{let{value:a,label:v}=t,c=String(JSON.stringify(a)),d=S.findIndex(f=>JSON.stringify(f.value)==c),i=d!=-1,s=JSON.stringify((o==null?void 0:o.value)||"")==c,m={};return(i||s)&&(m={fontColor:"theme",isSemiBoldFont:!0}),s&&(m.backgroundColor="cloud"),i&&(m.backgroundColor="theme.opa.few"),n(V.Button.Clear.R,J(E({borderRadius:"3.tone.tertiary",color:"cloud",padding:"1/3",tabIndex:-1,textAlign:"left","data-chips-selector-cell":u+"-"+c.replace(/\"/ig,""),isActive:i||s,isActiveStyles:m},m),{onMouseOver:()=>{T("MouseEvent"),C(t)},onClick:()=>{let f=[...S];i?f.splice(d,1):(f=[...f,t],e.limit&&f.length>e.limit&&f.shift()),x(f)},children:n(e.SelectorCellComponent,{isSelected:i,isFocused:s,value:a,label:v})}),p)})],O(j,{children:[O(H,{padding:"2/3",gap:"2/3",borderBottom:!0,children:[O(b.Separate,{children:[n(Q.Normal,{value:y,onUpdateValidValue:({value:t})=>{N(t)},id:e.selectorID+"-KeywordInput",padding:"2/3",placeholder:"\u691C\u7D22...",leftIcon:n(X.LeftIcon,{right:"2/3",fontSize:"1.mini",fontColor:"3.blur",children:n(_.Search,{})}),onKeyDown:t=>{let{key:p,metaKey:a,ctrlKey:v}=t,c=a||v;if(["ArrowDown","ArrowUp"].includes(p)){let d=+(p=="ArrowDown")*2-1;if(c){let i=l[d==1?l.length-1:0];C(i)}else{let i=l.findIndex(s=>JSON.stringify(s.value)==JSON.stringify((o==null?void 0:o.value)||""))+d;l[i]?C(l[i]):C(l[d==1?0:l.length-1]||null)}}else if(p=="Enter"){let d=S.findIndex(m=>JSON.stringify(m.value)==JSON.stringify((o==null?void 0:o.value)||"")),i=d!=-1,s=[...S];if(i)s.splice(d,1);else{let m=l.findIndex(f=>JSON.stringify(f.value)==JSON.stringify((o==null?void 0:o.value)||""));if(m==-1)return;s=[...s,l[m]],e.limit&&s.length>e.limit&&s.shift()}x(s)}T(p)}}),n(V.Button.Border.S,{marginRight:"1/3",ssSphere:2,backgroundColor:"cloud",borderRadius:"2.tone.secondary",onClick:()=>{k.close(e.selectorID)},children:n(_.Times,{})})]}),O(b.Separate,{children:[O(b.Left,{gap:"1/2",verticalAlign:"baseline",children:[n(z,{fontColor:"theme",children:l.length}),n($,{fontSize:"1.mini",fontColor:"3.blur",children:"\u4EF6\u306E\u30D2\u30C3\u30C8"})]}),n(b.Right,{children:!!e.limit&&O(z,{fontColor:"3.blur",fontSize:"1.mini",children:[n(z,{fontSize:"3.paragraph",fontColor:"theme",isSemiBoldFont:!0,children:S.length})," / ",e.limit," \u4EF6"]})})]})]}),n(H,{gap:"1/4",padding:"1/2",overflow:"auto",freeCSS:{maxHeight:12*26,maxWidth:12*26},id:u+"-Selector-Cell-Wrap",className:Y("SelectorWrapper"),children:A}),e.bottomContent]})},q={openSelector:e=>{let T=e,{selectorID:h,options:r,selected:y,limit:N,bottomContent:u,onDynamicSearch:l,SelectorCellComponent:g,onUpdated:o,onClosed:C,parent:S}=T,x=W(T,["selectorID","options","selected","limit","bottomContent","onDynamicSearch","SelectorCellComponent","onUpdated","onClosed","parent"]),D=h;g=g||(B=>n(b.Left,{children:B.label})),k.open(J(E({parent:S,sheetID:D,type:"custom",gravityPoint:22,padding:[1,0],hold_state:!0,close_option:{aroundClick:!0,escapeKeyDown:!0}},x),{content:n($,{borderRadius:"2.tone.secondary",backgroundColor:"layer.1",border:!0,boxShadow:"1.normal",overflow:"hidden",children:n(Z,{selectorID:h,options:r,limit:N,selected:y,onUpdated:o,SelectorCellComponent:g,bottomContent:u,onDynamicSearch:l},JSON.stringify(y))}),openAfter:()=>{P("#"+e.selectorID+"-KeywordInput").focus()},closeAfter:()=>{C()}}))},closeSelector:e=>{k.close(e)},updateOptions:(e,h)=>{let r=U.get(e);r&&r.updateOptions&&r.updateOptions(h)},updateSelected:(e,h)=>{let r=U.get(e);r&&r.updateSelected&&r.updateSelected(h)}};export{q as Selector,q as default};
1
+ import{b as E,c as J,d as W,e as K}from"../../../chunk-VY3566IV.js";import{Fragment as j,jsx as n,jsxs as O}from"react/jsx-runtime";import{useState as I,useEffect as R,useRef as L}from"react";import{$$ as w,$$fromRoot as P,useStore as U}from"../../../@utils";import $ from"../../../atoms/Box";import _ from"../../../atoms/FAI";import z from"../../../atoms/Span";import H from"../../../mols/Column";import b from"../../../mols/Row";import V from"../../Button";import k from"../../Sheet";import G from"../../Loader";import Q from"../Text";import X from"../Parts";import{InputChipsClasses as Y}from"../../../@styles/componentClasses";const Z=e=>{let[h,r]=I("show"),[y,N]=I(""),[u]=I(w.uuid.gen()),[l,g]=I(e.options),[o,C]=I(l[0]||null),[S,x]=I(e.selected),[D,T]=I("init");R(()=>{U.set({key:e.selectorID,value:{updateOptions:t=>{g(t)},updateSelected:t=>{x(t)}}})},[]);const B=L(!1);R(()=>{B.current?k.reposition(e.selectorID):B.current=!0},[l]);const F=L(!1);R(()=>{F.current?(r("interlude"),C(l[0]||null),e.onDynamicSearch?(w.interval.clear(u+"-dynamicSearch"),w.interval.standBy(u+"-dynamicSearch",400,()=>K(void 0,null,function*(){let{options:t}=yield e.onDynamicSearch(y);g(t),r("show")}))):(w.interval.clear(u+"-staticSearch"),w.interval.standBy(u+"-staticSearch",400,()=>K(void 0,null,function*(){let t=new RegExp(y,"ig"),p=[];[...e.options].forEach(a=>{var c;!!(!y||((c=String(a.label))!=null?c:String(a.value)).match(t))&&p.push(a)}),g(p),r("show")})))):F.current=!0},[y]);const M=L(!1);R(()=>{M.current?e.onUpdated({values:S}):M.current=!0},[S]),R(()=>{w.scope(()=>{if(w.is.nullish(o)||D=="MouseEvent")return;let t=P("#"+u+"-Selector-Cell-Wrap");if(!t[0])return;let p=P('[data-chips-selector-cell="'+u+"-"+JSON.stringify((o==null?void 0:o.value)||"").replace(/\"/ig,"")+'"]');if(!p[0])return;let{top:a,height:v}=t.position(),{top:c,height:d}=p.position();if(a<=c&&c+d<=a+v)return;let i=t[0].scrollTop+(c-a);D=="ArrowDown"?i-=v-d-20:D=="ArrowUp"&&(i-=20),t[0].scrollTop=i})},[o]);let A=[];return h=="interlude"?A=[O(b.Center,{padding:2,gap:0,children:[n(G.Theme.R,{showInitial:!0}),n($,{padding:[0,1],fontSize:"1.mini",fontColor:"4.thin",children:"\u691C\u7D22\u4E2D..."})]})]:A=[l.map((t,p)=>{let{value:a,label:v}=t,c=String(JSON.stringify(a)),d=S.findIndex(f=>JSON.stringify(f.value)==c),i=d!=-1,s=JSON.stringify((o==null?void 0:o.value)||"")==c,m={};return(i||s)&&(m={fontColor:"theme",isSemiBoldFont:!0}),s&&(m.backgroundColor="cloud"),i&&(m.backgroundColor="theme.opa.few"),n(V.Button.Clear.R,J(E({borderRadius:"3.tone.tertiary",color:"cloud",padding:"1/3",tabIndex:-1,textAlign:"left","data-chips-selector-cell":u+"-"+c.replace(/\"/ig,""),isActive:i||s,isActiveStyles:m},m),{onMouseOver:()=>{T("MouseEvent"),C(t)},onClick:()=>{let f=[...S];i?f.splice(d,1):(f=[...f,t],e.limit&&f.length>e.limit&&f.shift()),x(f)},children:n(e.SelectorCellComponent,{isSelected:i,isFocused:s,value:a,label:v})}),p)})],O(j,{children:[O(H,{padding:"2/3",gap:"2/3",borderBottom:!0,children:[O(b.Separate,{children:[n(Q.Normal,{value:y,onUpdateValidValue:({value:t})=>{N(t)},id:e.selectorID+"-KeywordInput",padding:"2/3",placeholder:"\u691C\u7D22...",leftIcon:n(X.LeftIcon,{right:"2/3",fontSize:"1.mini",fontColor:"3.blur",children:n(_.Search,{})}),onKeyDown:t=>{let{key:p,metaKey:a,ctrlKey:v}=t,c=a||v;if(["ArrowDown","ArrowUp"].includes(p)){let d=+(p=="ArrowDown")*2-1;if(c){let i=l[d==1?l.length-1:0];C(i)}else{let i=l.findIndex(s=>JSON.stringify(s.value)==JSON.stringify((o==null?void 0:o.value)||""))+d;l[i]?C(l[i]):C(l[d==1?0:l.length-1]||null)}}else if(p=="Enter"){let d=S.findIndex(m=>JSON.stringify(m.value)==JSON.stringify((o==null?void 0:o.value)||"")),i=d!=-1,s=[...S];if(i)s.splice(d,1);else{let m=l.findIndex(f=>JSON.stringify(f.value)==JSON.stringify((o==null?void 0:o.value)||""));if(m==-1)return;s=[...s,l[m]],e.limit&&s.length>e.limit&&s.shift()}x(s)}T(p)}}),n(V.Button.Border.S,{marginRight:"1/3",ssSphere:2,backgroundColor:"cloud",borderRadius:"2.tone.secondary",onClick:()=>{k.close(e.selectorID)},children:n(_.Times,{})})]}),O(b.Separate,{children:[O(b.Left,{gap:"1/2",verticalAlign:"baseline",children:[n(z,{fontColor:"theme",children:l.length}),n($,{fontSize:"1.mini",fontColor:"3.blur",children:"\u4EF6\u306E\u30D2\u30C3\u30C8"})]}),n(b.Right,{children:!!e.limit&&O(z,{fontColor:"3.blur",fontSize:"1.mini",children:[n(z,{fontSize:"3.paragraph",fontColor:"theme",isSemiBoldFont:!0,children:S.length})," / ",e.limit," \u4EF6"]})})]})]}),n(H,{gap:"1/4",padding:"1/2",overflow:"auto",freeCSS:{maxHeight:12*26,maxWidth:12*26},id:u+"-Selector-Cell-Wrap",className:Y("SelectorWrapper"),children:A}),e.bottomContent]})},q={openSelector:e=>{let T=e,{selectorID:h,options:r,selected:y,limit:N,bottomContent:u,onDynamicSearch:l,SelectorCellComponent:g,onUpdated:o,onClosed:C,parent:S}=T,x=W(T,["selectorID","options","selected","limit","bottomContent","onDynamicSearch","SelectorCellComponent","onUpdated","onClosed","parent"]),D=h;g=g||(B=>n(b.Left,{children:B.label})),k.open(J(E({parent:S,sheetID:D,type:"custom",gravityPoint:22,padding:[1,0],hold_state:!0,close_option:{aroundClick:!0,escapeKeyDown:!0}},x),{content:n($,{borderRadius:"2.tone.secondary",backgroundColor:"layer.1",border:!0,boxShadow:"1.normal",overflow:"hidden",children:n(Z,{selectorID:h,options:r,limit:N,selected:y,onUpdated:o,SelectorCellComponent:g,bottomContent:u,onDynamicSearch:l},JSON.stringify(y))}),openAfter:()=>{P("#"+e.selectorID+"-KeywordInput").focus()},closeAfter:()=>{C()}}))},closeSelector:e=>{k.close(e)},updateOptions:(e,h)=>{let r=U.get(e);r&&r.updateOptions&&r.updateOptions(h)},updateSelected:(e,h)=>{let r=U.get(e);r&&r.updateSelected&&r.updateSelected(h)}};export{q as Selector,q as default};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ReactElement } from '../../../@declaration/_';
3
- import { InputTypes } from '../_';
2
+ import { ReactElement } from '../../../@declaration';
3
+ import { InputTypes } from '..';
4
4
  export declare namespace Types {
5
5
  type ChipsOptions = {
6
6
  value: any;
@@ -0,0 +1 @@
1
+ import{b as u,c as h,d as N}from"../../../chunk-VY3566IV.js";import{jsx as a,jsxs as b}from"react/jsx-runtime";import{useState as v,useEffect as L,useRef as H}from"react";import{$$ as B,$$fromRoot as T}from"../../../@utils";import Q from"../../../atoms/Box";import P from"../../../atoms/FAI";import X from"../../../mols/Row";import U from"../../Button";import Y from"../../Sheet";import{Wrapper as Z,BoxWrapper as j,CommonEffects as ee,DefaultStyles as te}from"../core";import ne from"../Hidden";import W from"./Selector";function oe(e){let{value:r,para:s}=e,{required:o}=s,c=[];return o&&!r.length&&c.push({type:"invalid",label:"\u4E00\u3064\u4EE5\u4E0A\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044"}),{ok:!c.filter(({type:f})=>f=="invalid").length,notice:c}}const le=e=>{let $=e,{required:r,form:s,name:o,checkValidationAtFirst:c,onValidate:f,onUpdateValue:O,onUpdateValidValue:M,value:F=[],limit:A,leftIndicator:ie,rightIndicator:pe,leftIcon:ue,rightIcon:re,SelectedCellComponent:g,AddButtonComponent:x,componentID:se,defaultOptions:ce,enableFormSubmit:de,onDynamicSearch:me}=$,q=N($,["required","form","name","checkValidationAtFirst","onValidate","onUpdateValue","onUpdateValidValue","value","limit","leftIndicator","rightIndicator","leftIcon","rightIcon","SelectedCellComponent","AddButtonComponent","componentID","defaultOptions","enableFormSubmit","onDynamicSearch"]);x=x;let[p]=v(B.uuid.gen()),[d,R]=v({componentID:e.componentID||"",dataValue:F.map(t=>t),eventID:B.uuid.gen(),eventType:"init"}),[D,z]=v({ok:!1,notice:[]}),[n,G]=v([...F]);ee({para:e,val_status:d,set_status:R,val_validate:D,set_validate:z,DefaultValidation:oe,onUpdateValue:O,onUpdateValidValue:M,ExtraOverrideParams:{formatValue:n,dataValue:n.map(t=>t)},ExtraStoreParams:{searchTimer:null}});const C=t=>{G(t),R(h(u({},d),{dataValue:t.map(i=>i),eventID:B.uuid.gen(),eventType:"update"}))};let E=`[data-chips-input-wrapper="${p}"]`;const y=()=>{W.openSelector({parent:E,gravityPoint:e.selectorGravityPoint,SelectorCellComponent:e.SelectorCellComponent,selectorID:p,options:e.defaultOptions||[],selected:n,limit:e.limit,onDynamicSearch:e.onDynamicSearch,onUpdated:t=>{C(t.values)},onClosed:()=>{T(E).focus()}})};let S=A&&A<=n.length;const _=H(!1);L(()=>{_.current?S&&(Y.close(p),T(`[data-chips-input-wrapper="${p}"]`).focus()):_.current=!0},[n]);let J=n.map(t=>{let{value:i,label:k}=t;g=g;const I=()=>{let l=n.findIndex(w=>w.value==i);if(l==-1)return;let m=[...n];m.splice(l,1),C(m),m.length||setTimeout(()=>{T(`[data-chips-input-wrapper="${p}"]`).focus()},200)};return a(g,{value:i,label:k,removeCallback:I,defaultRemoveButton:a(U.Button.Sub.S,{flexSizing:"none",color:"cloud",backgroundColor:"cloud",flexCenter:!0,isRounded:!0,freeCSS:{aspectRatio:"1/1"},onClick:()=>{I()},children:a(P.Times,{})}),openCallback:()=>{y()}},JSON.stringify(i))});return b(j,{val_status:d,set_status:R,val_validate:D,para:e,children:[a(ne,{"data-value":JSON.stringify(d.dataValue.map(t=>t.value)),name:o,form:s,"data-input-type":"chips-"+["single","multi"][+(e.limit!=1)],"data-validation":D.ok,componentID:d.componentID,"data-focusor":p}),b("button",h(u({"data-chips-input-wrapper":p,onKeyDown:t=>{let{key:i,ctrlKey:k,metaKey:I,keyCode:l}=t,m=k||I;if(l>=48&&l<=57||l>=65&&l<=90||l>=96&&l<=105){if(S)return;y()}else if(i!="Tab"){if(i=="Backspace"){if(!n.length)return;if(m)C([]);else{let K=[...n];K.pop(),C(K)}}}},onClick:()=>{S||y()}},q),{children:[!S&&a(x,{selected:n,openCallback:y}),J]}))]})},ae=e=>{let s=[...e.value||[]].splice(0,e.limit||65535);return a(le,h(u({SelectedCellComponent:o=>{let{value:c,label:f,removeCallback:O}=o;return b(X.Left,{ssCardBox:!0,padding:"1/3",gap:0,isRounded:!0,textAlign:"left",children:[a(Q,{padding:[0,"1/2"],children:f}),o.defaultRemoveButton]})},AddButtonComponent:o=>e.limit&&e.limit<=o.selected.length?null:b(U.Button.Sub.R,{color:"cloud",padding:"1/2",onClick:()=>{o.openCallback()},children:[a(P.Plus,{}),"\u8FFD\u52A0\u3059\u308B"]})},e),{value:s}))},V=e=>{e=u({},e),e=u({gap:1,display:"flex",horizontalAlign:"left",verticalAlign:"center",flexWrap:!0},e);let r=te.Boxish(e);return a(Z,{componentID:e.componentID,children:ae,para:r})};V.fn=W;export{V as Chips,V as default};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ReactElement } from '../../@declaration/_';
3
- import { InputTypes } from './_';
2
+ import { ReactElement } from '../../@declaration';
3
+ import { InputTypes } from '.';
4
4
  declare namespace Contenteditable {
5
5
  type Input = InputTypes.CoreInput & React.TextareaHTMLAttributes<HTMLDivElement> & {
6
6
  tone?: InputTypes.BoxTone;
@@ -1 +1 @@
1
- import{b as n,c as u,d as y}from"../../chunk-VY3566IV.js";import{jsx as s}from"react/jsx-runtime";import{useState as T}from"react";import{$$ as g}from"../../@utils/_";import{Wrapper as _,BoxWrapper as k,SubmitForm as L,CommonEffects as F,DefaultStyles as B}from"./core";function H(t){let{value:e,params:o}=t,{required:a}=o,i=[];return a&&!e&&i.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!i.filter(({type:c})=>c=="invalid").length,notice:i}}const M=t=>{let v=t,{componentID:e,tone:o,required:a,form:i,value:c,enableFormSubmit:b,checkValidationAtFirst:W,onInput:f,onKeyDown:I,onValidate:q,onUpdateValue:D,onUpdateValidValue:R,children:C="",leftIndicator:A,rightIndicator:K,leftIcon:U,rightIcon:$}=v,V=y(v,["componentID","tone","required","form","value","enableFormSubmit","checkValidationAtFirst","onInput","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","children","leftIndicator","rightIndicator","leftIcon","rightIcon"]),E={componentID:e,dataValue:c,eventType:"init",eventID:g.uuid.gen()},[l,r]=T(E),[d,m]=T({ok:!1,notice:[]});return F({params:t,val_status:l,set_status:r,val_validate:d,set_validate:m,onUpdateValue:D,onUpdateValidValue:R,DefaultValidation:H}),s(k,{val_status:l,set_status:r,val_validate:d,params:t,children:s("div",u(n({contentEditable:!0,"data-form":i,"data-name":t.name,"data-input-type":"contenteditable","data-validation":d.ok,"data-value":l.dataValue,"data-component-id":l.componentID,onKeyDown:p=>{I&&I(p),b&&L(p)},onInput:p=>{let S=p.currentTarget,{innerHTML:N,innerText:x}=S;d.ok&&m({ok:!1,notice:[]}),r(u(n({},l),{dataValue:x,eventType:"update",eventID:g.uuid.gen()})),f&&f(p)}},V),{children:C}))})},h=t=>{var o,a;t=n({},t),t.rightIcon&&(t.paddingRight=(o=t.paddingRight)!=null?o:3),t.leftIcon&&(t.paddingLeft=(a=t.paddingLeft)!=null?a:3),t=u(n({},t),{freeCSS:n({whiteSpace:"pre-wrap"},t.freeCSS)});let e=B.Boxish(t);return e.rows=e.rows||5,s(_,{componentID:t.componentID,children:M,params:e})};export{h as Contenteditable,h as default};
1
+ import{b as n,c as u,d as y}from"../../chunk-VY3566IV.js";import{jsx as r}from"react/jsx-runtime";import{useState as T}from"react";import{$$ as g}from"../../@utils";import{Wrapper as _,BoxWrapper as k,SubmitForm as L,CommonEffects as F,DefaultStyles as B}from"./core";function H(t){let{value:e,para:o}=t,{required:a}=o,i=[];return a&&!e&&i.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!i.filter(({type:s})=>s=="invalid").length,notice:i}}const M=t=>{let v=t,{componentID:e,tone:o,required:a,form:i,value:s,enableFormSubmit:b,checkValidationAtFirst:W,onInput:m,onKeyDown:f,onValidate:q,onUpdateValue:D,onUpdateValidValue:R,children:C="",leftIndicator:A,rightIndicator:K,leftIcon:U,rightIcon:$}=v,V=y(v,["componentID","tone","required","form","value","enableFormSubmit","checkValidationAtFirst","onInput","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","children","leftIndicator","rightIndicator","leftIcon","rightIcon"]),E={componentID:e,dataValue:s,eventType:"init",eventID:g.uuid.gen()},[l,c]=T(E),[d,I]=T({ok:!1,notice:[]});return F({para:t,val_status:l,set_status:c,val_validate:d,set_validate:I,onUpdateValue:D,onUpdateValidValue:R,DefaultValidation:H}),r(k,{val_status:l,set_status:c,val_validate:d,para:t,children:r("div",u(n({contentEditable:!0,"data-form":i,"data-name":t.name,"data-input-type":"contenteditable","data-validation":d.ok,"data-value":l.dataValue,"data-component-id":l.componentID,onKeyDown:p=>{f&&f(p),b&&L(p)},onInput:p=>{let S=p.currentTarget,{innerHTML:N,innerText:x}=S;d.ok&&I({ok:!1,notice:[]}),c(u(n({},l),{dataValue:x,eventType:"update",eventID:g.uuid.gen()})),m&&m(p)}},V),{children:C}))})},h=t=>{var o,a;t=n({},t),t.rightIcon&&(t.paddingRight=(o=t.paddingRight)!=null?o:3),t.leftIcon&&(t.paddingLeft=(a=t.paddingLeft)!=null?a:3),t=u(n({},t),{freeCSS:n({whiteSpace:"pre-wrap"},t.freeCSS)});let e=B.Boxish(t);return e.rows=e.rows||5,r(_,{componentID:t.componentID,children:M,para:e})};export{h as Contenteditable,h as default};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { TagProperty } from '../../@declaration/_';
3
- import { InputTypes } from './_';
2
+ import { TagProperty } from '../../@declaration';
3
+ import { InputTypes } from '.';
4
4
  declare namespace DigitCharacters {
5
5
  type Input = InputTypes.CoreInput & React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
6
6
  tone?: InputTypes.BoxTone;
@@ -10,7 +10,7 @@ declare namespace DigitCharacters {
10
10
  tabIndex?: number;
11
11
  id?: string;
12
12
  value?: string | number;
13
- listStyles?: TagProperty.Params;
13
+ listStyles?: TagProperty.Para;
14
14
  };
15
15
  }
16
16
  declare const DigitCharacters: React.FC<DigitCharacters.Input>;
@@ -1 +1 @@
1
- import{b as t,c as s,d as S}from"../../chunk-VY3566IV.js";import{jsx as I,jsxs as Z}from"react/jsx-runtime";import{useState as V}from"react";import{$$ as y,$$fromRoot as O}from"../../@utils/_";import{Wrapper as q,BoxWrapper as w,SubmitForm as U,CommonEffects as j,DefaultStyles as z}from"./core";import G from"../../atoms/Flex";import J from"./Hidden";import{InputClasses as R}from"../../@styles/componentClasses/_";function Q(e){let{value:n,params:u}=e,{required:p,numericOnly:l=!1,digits:m}=u,r=[];return p&&!n&&r.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),n&&(l&&n.match(/\D/)&&r.push({type:"invalid",label:"\u6570\u5B57\u306E\u307F\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"}),n.length!=m&&r.push({type:"warn",label:"\u6700\u5F8C\u307E\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"})),{ok:!r.filter(({type:d})=>d=="invalid"||d=="warn").length,notice:r}}const X=(e,n="")=>{let u=String(n),p=[];for(let l=0;l<e;l++)p[l]=u[l]||"";return{formatValue:p,dataValue:u}},F=(e="")=>{let n=e,u=n.join("");return{formatValue:n,dataValue:u}},Y=e=>{let b=e,{tone:n,required:u,form:p,name:l,className:m="",digits:r,numericOnly:d=!1,enableFormSubmit:_,checkValidationAtFirst:P,onChange:ee,onKeyDown:te,onValidate:ne,onUpdateValue:k,onUpdateValidValue:A,value:N="",override:ie,componentID:ae,listStyles:B}=b,E=S(b,["tone","required","form","name","className","digits","numericOnly","enableFormSubmit","checkValidationAtFirst","onChange","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","override","componentID","listStyles"]);d&&(e.inputMode=e.inputMode||"numeric");let H=s(t({componentID:e.componentID||""},X(r,N)),{eventType:"init",eventID:y.uuid.gen()}),[i,f]=V(H),[h,L]=V({ok:!1,notice:[]});j({params:e,val_status:i,set_status:f,val_validate:h,set_validate:L,onUpdateValue:k,onUpdateValidValue:A,DefaultValidation:Q});let v=[];for(let a=0;a<r;a++){let W=i.formatValue[a],$={},x=m;e.combineInput&&(x=[m,R("DigitCharacterCell"),R("Combined")].join(" ")),v.push(I("input",{type:"text",inputMode:e.inputMode||"text",value:W,"data-form-name":p,id:"Digit-"+a+"-"+i.componentID,className:x,style:t(t({},e.style),$),onKeyDown:D=>{let{key:g,code:K}=D;if(g=="Tab")return;D.preventDefault();let c=null;if(g=="Backspace"){let o=i.formatValue;o[a]="",f(s(t(t({},i),F(o)),{eventType:"update",eventID:y.uuid.gen()})),c=a-1}else if(["ArrowLeft","ArrowRight"].includes(g)){let o=+(g=="ArrowRight")*2-1;c=a+o}else _&&U(D),(()=>{let o=K.match(/^(Key(.)|Digit(\d)|Numpad(\d))/);if(!o)return;let C=o[2]||o[3]||o[4];if(d&&!C.match(/\d/)||!C)return;let T=i.formatValue;T[a]=C,f(s(t(t({},i),F(T)),{eventType:"update",eventID:y.uuid.gen()})),c=a+1})();y.is.exist(c)&&O("#Digit-"+c+"-"+i.componentID).focus()},onChange:()=>{}},a))}return Z(w,{val_status:i,set_status:f,val_validate:h,params:e,children:[I(J,t({name:l,"data-input-type":"digitCharacters","data-form":p,"data-validation":h.ok,componentID:i.componentID,"data-value":i.dataValue},E)),I(G,s(t({gap:"1/2",flexChilds:"even",flexWrap:!1,flexSizing:"auto"},B),{children:v}))]})},M=e=>{e=t({},e),e=t({textAlign:"center",width:0},e),e.combineInput&&(e=s(t({textAlign:"center",width:0},e),{freeCSS:t({minWidth:12*2,marginRight:-1},e.freeCSS),listStyles:t({borderRadius:"2.tone.secondary",border:"unset",gap:0},e.listStyles)}));let n=z.Boxish(e);return I(q,{componentID:e.componentID,children:Y,params:n})};export{M as DigitCharacters,M as default};
1
+ import{b as t,c as p,d as S}from"../../chunk-VY3566IV.js";import{jsx as I,jsxs as Z}from"react/jsx-runtime";import{useState as V}from"react";import{$$ as y,$$fromRoot as O}from"../../@utils";import{Wrapper as q,BoxWrapper as w,SubmitForm as U,CommonEffects as j,DefaultStyles as z}from"./core";import G from"../../atoms/Flex";import J from"./Hidden";import{InputClasses as R}from"../../@styles/componentClasses";function Q(e){let{value:n,para:u}=e,{required:s,numericOnly:l=!1,digits:c}=u,r=[];return s&&!n&&r.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),n&&(l&&n.match(/\D/)&&r.push({type:"invalid",label:"\u6570\u5B57\u306E\u307F\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"}),n.length!=c&&r.push({type:"warn",label:"\u6700\u5F8C\u307E\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"})),{ok:!r.filter(({type:m})=>m=="invalid"||m=="warn").length,notice:r}}const X=(e,n="")=>{let u=String(n),s=[];for(let l=0;l<e;l++)s[l]=u[l]||"";return{formatValue:s,dataValue:u}},F=(e="")=>{let n=e,u=n.join("");return{formatValue:n,dataValue:u}},Y=e=>{let b=e,{tone:n,required:u,form:s,name:l,className:c="",digits:r,numericOnly:m=!1,enableFormSubmit:_,checkValidationAtFirst:P,onChange:ee,onKeyDown:te,onValidate:ne,onUpdateValue:k,onUpdateValidValue:A,value:N="",override:ie,componentID:ae,listStyles:B}=b,E=S(b,["tone","required","form","name","className","digits","numericOnly","enableFormSubmit","checkValidationAtFirst","onChange","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","override","componentID","listStyles"]);m&&(e.inputMode=e.inputMode||"numeric");let H=p(t({componentID:e.componentID||""},X(r,N)),{eventType:"init",eventID:y.uuid.gen()}),[i,f]=V(H),[h,L]=V({ok:!1,notice:[]});j({para:e,val_status:i,set_status:f,val_validate:h,set_validate:L,onUpdateValue:k,onUpdateValidValue:A,DefaultValidation:Q});let v=[];for(let a=0;a<r;a++){let W=i.formatValue[a],$={},x=c;e.combineInput&&(x=[c,R("DigitCharacterCell"),R("Combined")].join(" ")),v.push(I("input",{type:"text",inputMode:e.inputMode||"text",value:W,"data-form-name":s,id:"Digit-"+a+"-"+i.componentID,className:x,style:t(t({},e.style),$),onKeyDown:D=>{let{key:g,code:K}=D;if(g=="Tab")return;D.preventDefault();let d=null;if(g=="Backspace"){let o=i.formatValue;o[a]="",f(p(t(t({},i),F(o)),{eventType:"update",eventID:y.uuid.gen()})),d=a-1}else if(["ArrowLeft","ArrowRight"].includes(g)){let o=+(g=="ArrowRight")*2-1;d=a+o}else _&&U(D),(()=>{let o=K.match(/^(Key(.)|Digit(\d)|Numpad(\d))/);if(!o)return;let C=o[2]||o[3]||o[4];if(m&&!C.match(/\d/)||!C)return;let T=i.formatValue;T[a]=C,f(p(t(t({},i),F(T)),{eventType:"update",eventID:y.uuid.gen()})),d=a+1})();y.is.exist(d)&&O("#Digit-"+d+"-"+i.componentID).focus()},onChange:()=>{}},a))}return Z(w,{val_status:i,set_status:f,val_validate:h,para:e,children:[I(J,t({name:l,"data-input-type":"digitCharacters","data-form":s,"data-validation":h.ok,componentID:i.componentID,"data-value":i.dataValue},E)),I(G,p(t({gap:"1/2",flexChilds:"even",flexWrap:!1,flexSizing:"auto"},B),{children:v}))]})},M=e=>{e=t({},e),e=t({textAlign:"center",width:0},e),e.combineInput&&(e=p(t({textAlign:"center",width:0},e),{freeCSS:t({minWidth:12*2,marginRight:-1},e.freeCSS),listStyles:t({borderRadius:"2.tone.secondary",border:"unset",gap:0},e.listStyles)}));let n=z.Boxish(e);return I(q,{componentID:e.componentID,children:Y,para:n})};export{M as DigitCharacters,M as default};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { TagProperty } from '../../@declaration/_';
3
- import { InputTypes } from './_';
2
+ import { TagProperty } from '../../@declaration';
3
+ import { InputTypes } from '.';
4
4
  declare namespace Filer {
5
5
  type Methods = React.FC<Input> & FNs;
6
6
  type Input = InputTypes.CoreInput & React.DOMAttributes<HTMLInputElement> & {
@@ -13,7 +13,7 @@ declare namespace Filer {
13
13
  fileNameEdit?: boolean;
14
14
  systemOnly?: boolean;
15
15
  accept?: Accept;
16
- cellStyles?: TagProperty.Params;
16
+ cellStyles?: TagProperty.Para;
17
17
  cellClassName?: string;
18
18
  };
19
19
  type CustomFile = File & {
@@ -22,7 +22,7 @@ declare namespace Filer {
22
22
  type Accept = 'image' | string;
23
23
  type ListInput = {
24
24
  files: File[];
25
- params: Filer.Input;
25
+ para: Filer.Input;
26
26
  val_status: InputTypes.Status.Plain;
27
27
  set_status: React.Dispatch<React.SetStateAction<InputTypes.Status.Plain>>;
28
28
  };
@@ -36,7 +36,7 @@ declare namespace Filer {
36
36
  };
37
37
  type FNs = {
38
38
  fn: {
39
- openDialog(params: {
39
+ openDialog(para: {
40
40
  accept?: Accept;
41
41
  multiple?: boolean;
42
42
  }): Promise<File[]>;
@@ -1 +1 @@
1
- import{b as g,c as x,d as Z,e as $}from"../../chunk-VY3566IV.js";import{Fragment as ee,jsx as n,jsxs as d}from"react/jsx-runtime";import{useState as q,useEffect as te}from"react";import{$$ as h,$$fromRoot as P,useStore as Q,GenerateClassName as ae}from"../../@utils/_";import y from"../../atoms/Box";import L from"../../atoms/FAI";import W from"../../atoms/Flex";import X from"../../mols/Column";import le from"../../mols/Row";import M from"../Button";import H from"../Snackbar";import{Wrapper as ne,BoxWrapper as ie,CommonEffects as oe,DefaultStyles as se}from"./core";import re from"./Text";import{InputFilerClasses as c}from"../../@styles/componentClasses/_";import{faCloudArrowUp as pe}from"@fortawesome/free-solid-svg-icons/faCloudArrowUp";function ue(e){let{value:t,params:a}=e,{required:s}=a,l=[];return s&&!t.length&&l.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!l.filter(({type:p})=>p=="invalid").length,notice:l}}const Y={List:e=>{let{files:t,params:a,val_status:s,set_status:l}=e,p=(a.limit||1)-s.dataValue.length,m=t.map((u,S)=>n(Y.Cell,{index:S,file:u,className:a.cellClassName,val_status:s,set_status:l,fileNameEdit:a.fileNameEdit},u.name));return p>0&&m.push(n("label",{className:[a.cellClassName,c("AddButton")].join(" "),"data-component-id":s.componentID,htmlFor:a.id,tabIndex:a.tabIndex,onKeyDown:u=>{let{key:S}=u;a.tabIndex!=-1&&[" ","Enter"].includes(S)&&P("#"+a.id).click()},children:d(le.Center,{padding:["1/3",0],children:[n(y,{isRounded:!0,className:c("AddIcon"),children:n(L,{icon:pe,className:c("Icon"),fontColor:"theme",fontSize:"4.thirdTitle",backgroundColor:"theme.opa.low",ssSphere:3,padding:"1/2"})}),d(y,{children:[n(y,{children:`\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\uFF08${p}\uFF09`,fontColor:"theme",fontSize:"2.normal",isSemiBoldFont:!0}),n(y,{isSemiBoldFont:!0,fontColor:"4.thin",fontSize:"0.xs",children:"\u30D5\u30A1\u30A4\u30EB\u3092\u30C9\u30ED\u30C3\u30D7"})]})]})},"AddButton")),n(X,{flexSizing:"auto",className:a.className,children:m})},Cell:e=>{let{index:t,file:a,className:s,val_status:l,set_status:p,fileNameEdit:m=!0}=e,{name:u,size:S,type:i}=a,[V,b]=q(!1),N=h.uuid.gen(),_=S.rank(),[G,O]=u.replace(/\s/,"").replace(/(.*)\.(.*)$/,"$1 $2").split(" "),o="\u30D5\u30A1\u30A4\u30EB";return i.match(/image/)?o=i.replace(/image\//,""):i.match(/pdf/)?o="PDF":i.match(/csv/)?o="CSV":i.match(/spreadsheet/)?o="SpreadSheet":i.match(/presentation/)?o="PowerPoint":i.match(/word/)?o="Word":i.match(/zip/)?o="Zip":i.match(/powerpoint/)?o="PowerPoint":i.match(/html/)?o="HTML":i.match(/js/)?o="JavaScript":i.match(/css/)?o="CSS":i.match(/text\/plain/)&&(o="\u30C6\u30AD\u30B9\u30C8"),te(()=>{V&&setTimeout(()=>{P("#"+N).focus()},100)},[V]),d(W,{verticalAlign:"center",flexWrap:!1,gap:1,className:s,children:[n(L.File,{fontSize:"4.thirdTitle",fontColor:"4.thin"}),d(y,{flexSizing:0,children:[n(y,{children:n(W,{verticalAlign:"center",gap:"2/3",flexWrap:!1,className:c("FileName"),children:V?n(ee,{children:d(X,{gap:"1/2",flexSizing:0,children:[d(W,{gap:"2/3",verticalAlign:"center",children:[n(re.Normal,{tone:"border",wrapStyles:{flexSizing:"auto"},restrict:"fileName",name:"name",required:!0,id:N,form:"form-"+N,enableFormSubmit:!0,value:G,onKeyDown:f=>{let{key:k}=f;k=="Escape"&&b(!1)}}),d(y,{children:[". ",O]})]}),d(W,{gap:"2/3",horizontalAlign:"right",flexWrap:!1,children:[n(M.Button.Sub.R,{padding:["2/3",1],children:"\u9589\u3058\u308B",onClick:()=>{b(!1)}}),n(M.Button.Prime.R,{padding:["2/3",1],submitOption:{formName:"form-"+N,callback:f=>$(void 0,null,function*(){let{name:k}=f,w=[...l.dataValue],T=w[t],U=T.id;if(!T)return;let{target:r}=yield T.read();if(!r)return;let D=yield String(r.result).toBlob(a.type);if(!D)return;let z=new File([D],k+"."+O,{type:T.type});z.id=U,w[t]=z,p(x(g({},l),{dataValue:w,eventType:"update",eventID:h.uuid.gen()})),b(!1)})},children:"\u6C7A\u5B9A"})]})]})}):d(ee,{children:[u,!!m&&n(M.Button.Clear.R,{ssSphere:2.5,flexSizing:"none",color:"cloud",fontColor:"4.thin",padding:"1/3",ssEffectsOnActive:"expand",onClick:()=>{b(!0)},children:n(L.Pen,{})})]})})}),!V&&n(y,{fontSize:"1.mini",fontColor:"4.thin",flexSizing:0,children:o+"\u30D5\u30A1\u30A4\u30EB / "+_+"B"})]}),n(M.Button.Sub.R,{color:"cloud",fontColor:"4.thin",ssSphere:3,onClick:()=>{let f=[...l.dataValue];f[t]&&(f.splice(t,1),p(x(g({},l),{dataValue:f,eventType:"update",eventID:h.uuid.gen()})))},children:n(L.Times,{})})]})}},me=e=>{let J=e,{tone:t,required:a,form:s,fileNameEdit:l=!0,systemOnly:p=!1,accept:m="*",limit:u=1,checkValidationAtFirst:S,onChange:i,onValidate:V,onUpdateValue:b,onUpdateValidValue:N,value:_=[],className:G,cellStyles:O,cellClassName:o,componentID:f,status_id:k,enableFormSubmit:w}=J,T=Z(J,["tone","required","form","fileNameEdit","systemOnly","accept","limit","checkValidationAtFirst","onChange","onValidate","onUpdateValue","onUpdateValidValue","value","className","cellStyles","cellClassName","componentID","status_id","enableFormSubmit"]),U={componentID:e.componentID||"",dataValue:_,eventType:"init",eventID:h.uuid.gen()},[r,B]=q(U),[D,z]=q({ok:!1,notice:[]});oe({type:"file",params:e,val_status:r,set_status:B,val_validate:D,set_validate:z,DefaultValidation:ue,onUpdateValue:b,onUpdateValidValue:N,ExtraOverrideParams:{dataValue:_,formatValue:_},ExtraStoreParams:{AddFiles:A=>$(void 0,null,function*(){let R=Q.get(r.componentID).Files,v=[];for(var F=0;F<(A==null?void 0:A.length);F++){let I=A[F],{type:E,name:C}=I;if(F+1+R.length>u){H.add({componentID:C,secondsToClose:12e3,children:`\u30D5\u30A1\u30A4\u30EB\u9078\u629E\u4E0A\u9650\u3092\u8D85\u3048\u305F\u305F\u3081\u3001${C}}\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002`,backgroundColor:"nega"});continue}if(m&&m=="image"&&!E.match(/image/)){H.add({componentID:C,secondsToClose:12e3,children:`\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u304C\u7570\u306A\u308B\u305F\u3081\u3001${C} \u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002`,backgroundColor:"nega"});continue}v.push(I)}B(x(g({},r),{dataValue:[...R,...v],eventType:"update",eventID:h.uuid.gen()}))})}});let j="";return m&&(m=="image"?j="image/png,image/jpeg":j=m),d(ie,{val_status:r,set_status:B,val_validate:D,params:e,children:[n("input",x(g({type:"file",className:c("Input"),"data-form":s,"data-input-type":"file","data-component-id":r.componentID,"data-validation":D.ok,accept:j,multiple:u!=1,onChange:A=>$(void 0,null,function*(){let R=A.target,v=R.files,F=[];for(var I=0;I<(v==null?void 0:v.length);I++){let E=v[I],C=E.name;if(E.id=h.uuid.gen(),I+1+r.dataValue.length>u){H.add({componentID:C,secondsToClose:12e3,children:`\u30D5\u30A1\u30A4\u30EB\u767B\u9332\u6570\u3092\u8D85\u3048\u305F\u305F\u3081\u3001${C}}\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002`,backgroundColor:"nega"});continue}F.push(E)}B(x(g({},r),{dataValue:[...r.dataValue,...F],eventType:"update",eventID:h.uuid.gen()})),R.value=""})},T),{tabIndex:-1,value:""})),!p&&n(Y.List,{files:r.dataValue,params:e,val_status:r,set_status:B})]})};h(document).addEvent({eventType:"dragover",callback:e=>{e.preventDefault(),P("."+c("AddButton")).addClass(c("Draggable"))},options:{passive:!1}}).addEvent({eventType:"drop",callback:e=>{e.preventDefault(),P("."+c("AddButton")).removeClass(c("Draggable"));let t=e.dataTransfer.files;if(t.length){let a=e.target;if(P(a).hasClass(c("AddButton"))){let{componentId:s}=a.dataset,l=Q.get(s);l&&l.AddFiles&&l.AddFiles(t)}}},options:{passive:!1}});const K=e=>{e=g({},e),e.override="force";let t=ae(e);return t.cellClassName=[t.cellClassName,se.Boxish(x(g({},t.cellStyles),{tone:t.tone})).className].join(" "),n(ne,{componentID:e.componentID,children:me,params:t})};K.fn={openDialog:e=>{let{multiple:t,accept:a}=e;return new Promise(s=>{const l=document.createElement("input");l.type="file",l.multiple=t!=null?t:!0,a&&(a=="image"?l.accept="image/png,image/jpeg":l.accept=a),l.onchange=p=>{s(p.target.files)},l.click()})}};export{K as Filer,K as default};
1
+ import{b as g,c as x,d as Z,e as $}from"../../chunk-VY3566IV.js";import{Fragment as ee,jsx as n,jsxs as m}from"react/jsx-runtime";import{useState as q,useEffect as te}from"react";import{$$ as h,$$fromRoot as P,useStore as Q,GenerateClassName as ae}from"../../@utils";import y from"../../atoms/Box";import L from"../../atoms/FAI";import W from"../../atoms/Flex";import X from"../../mols/Column";import le from"../../mols/Row";import M from"../Button";import H from"../Snackbar";import{Wrapper as ne,BoxWrapper as ie,CommonEffects as oe,DefaultStyles as se}from"./core";import re from"./Text";import{InputFilerClasses as d}from"../../@styles/componentClasses";import{faCloudArrowUp as pe}from"@fortawesome/free-solid-svg-icons/faCloudArrowUp";function ue(e){let{value:t,para:a}=e,{required:s}=a,l=[];return s&&!t.length&&l.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!l.filter(({type:p})=>p=="invalid").length,notice:l}}const Y={List:e=>{let{files:t,para:a,val_status:s,set_status:l}=e,p=(a.limit||1)-s.dataValue.length,c=t.map((u,S)=>n(Y.Cell,{index:S,file:u,className:a.cellClassName,val_status:s,set_status:l,fileNameEdit:a.fileNameEdit},u.name));return p>0&&c.push(n("label",{className:[a.cellClassName,d("AddButton")].join(" "),"data-component-id":s.componentID,htmlFor:a.id,tabIndex:a.tabIndex,onKeyDown:u=>{let{key:S}=u;a.tabIndex!=-1&&[" ","Enter"].includes(S)&&P("#"+a.id).click()},children:m(le.Center,{padding:["1/3",0],children:[n(y,{isRounded:!0,className:d("AddIcon"),children:n(L,{icon:pe,className:d("Icon"),fontColor:"theme",fontSize:"4.thirdTitle",backgroundColor:"theme.opa.low",ssSphere:3,padding:"1/2"})}),m(y,{children:[n(y,{children:`\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\uFF08${p}\uFF09`,fontColor:"theme",fontSize:"2.normal",isSemiBoldFont:!0}),n(y,{isSemiBoldFont:!0,fontColor:"4.thin",fontSize:"0.xs",children:"\u30D5\u30A1\u30A4\u30EB\u3092\u30C9\u30ED\u30C3\u30D7"})]})]})},"AddButton")),n(X,{flexSizing:"auto",className:a.className,children:c})},Cell:e=>{let{index:t,file:a,className:s,val_status:l,set_status:p,fileNameEdit:c=!0}=e,{name:u,size:S,type:i}=a,[V,b]=q(!1),N=h.uuid.gen(),_=S.rank(),[G,O]=u.replace(/\s/,"").replace(/(.*)\.(.*)$/,"$1 $2").split(" "),o="\u30D5\u30A1\u30A4\u30EB";return i.match(/image/)?o=i.replace(/image\//,""):i.match(/pdf/)?o="PDF":i.match(/csv/)?o="CSV":i.match(/spreadsheet/)?o="SpreadSheet":i.match(/presentation/)?o="PowerPoint":i.match(/word/)?o="Word":i.match(/zip/)?o="Zip":i.match(/powerpoint/)?o="PowerPoint":i.match(/html/)?o="HTML":i.match(/js/)?o="JavaScript":i.match(/css/)?o="CSS":i.match(/text\/plain/)&&(o="\u30C6\u30AD\u30B9\u30C8"),te(()=>{V&&setTimeout(()=>{P("#"+N).focus()},100)},[V]),m(W,{verticalAlign:"center",flexWrap:!1,gap:1,className:s,children:[n(L.File,{fontSize:"4.thirdTitle",fontColor:"4.thin"}),m(y,{flexSizing:0,children:[n(y,{children:n(W,{verticalAlign:"center",gap:"2/3",flexWrap:!1,className:d("FileName"),children:V?n(ee,{children:m(X,{gap:"1/2",flexSizing:0,children:[m(W,{gap:"2/3",verticalAlign:"center",children:[n(re.Normal,{tone:"border",wrapStyles:{flexSizing:"auto"},restrict:"fileName",name:"name",required:!0,id:N,form:"form-"+N,enableFormSubmit:!0,value:G,onKeyDown:f=>{let{key:k}=f;k=="Escape"&&b(!1)}}),m(y,{children:[". ",O]})]}),m(W,{gap:"2/3",horizontalAlign:"right",flexWrap:!1,children:[n(M.Button.Sub.R,{padding:["2/3",1],children:"\u9589\u3058\u308B",onClick:()=>{b(!1)}}),n(M.Button.Prime.R,{padding:["2/3",1],submitOption:{formName:"form-"+N,callback:f=>$(void 0,null,function*(){let{name:k}=f,w=[...l.dataValue],T=w[t],U=T.id;if(!T)return;let{target:r}=yield T.read();if(!r)return;let D=yield String(r.result).toBlob(a.type);if(!D)return;let z=new File([D],k+"."+O,{type:T.type});z.id=U,w[t]=z,p(x(g({},l),{dataValue:w,eventType:"update",eventID:h.uuid.gen()})),b(!1)})},children:"\u6C7A\u5B9A"})]})]})}):m(ee,{children:[u,!!c&&n(M.Button.Clear.R,{ssSphere:2.5,flexSizing:"none",color:"cloud",fontColor:"4.thin",padding:"1/3",ssEffectsOnActive:"expand",onClick:()=>{b(!0)},children:n(L.Pen,{})})]})})}),!V&&n(y,{fontSize:"1.mini",fontColor:"4.thin",flexSizing:0,children:o+"\u30D5\u30A1\u30A4\u30EB / "+_+"B"})]}),n(M.Button.Sub.R,{color:"cloud",fontColor:"4.thin",ssSphere:3,onClick:()=>{let f=[...l.dataValue];f[t]&&(f.splice(t,1),p(x(g({},l),{dataValue:f,eventType:"update",eventID:h.uuid.gen()})))},children:n(L.Times,{})})]})}},ce=e=>{let J=e,{tone:t,required:a,form:s,fileNameEdit:l=!0,systemOnly:p=!1,accept:c="*",limit:u=1,checkValidationAtFirst:S,onChange:i,onValidate:V,onUpdateValue:b,onUpdateValidValue:N,value:_=[],className:G,cellStyles:O,cellClassName:o,componentID:f,status_id:k,enableFormSubmit:w}=J,T=Z(J,["tone","required","form","fileNameEdit","systemOnly","accept","limit","checkValidationAtFirst","onChange","onValidate","onUpdateValue","onUpdateValidValue","value","className","cellStyles","cellClassName","componentID","status_id","enableFormSubmit"]),U={componentID:e.componentID||"",dataValue:_,eventType:"init",eventID:h.uuid.gen()},[r,B]=q(U),[D,z]=q({ok:!1,notice:[]});oe({type:"file",para:e,val_status:r,set_status:B,val_validate:D,set_validate:z,DefaultValidation:ue,onUpdateValue:b,onUpdateValidValue:N,ExtraOverrideParams:{dataValue:_,formatValue:_},ExtraStoreParams:{AddFiles:A=>$(void 0,null,function*(){let R=Q.get(r.componentID).Files,v=[];for(var F=0;F<(A==null?void 0:A.length);F++){let I=A[F],{type:E,name:C}=I;if(F+1+R.length>u){H.add({componentID:C,secondsToClose:12e3,children:`\u30D5\u30A1\u30A4\u30EB\u9078\u629E\u4E0A\u9650\u3092\u8D85\u3048\u305F\u305F\u3081\u3001${C}}\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002`,backgroundColor:"nega"});continue}if(c&&c=="image"&&!E.match(/image/)){H.add({componentID:C,secondsToClose:12e3,children:`\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u304C\u7570\u306A\u308B\u305F\u3081\u3001${C} \u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002`,backgroundColor:"nega"});continue}v.push(I)}B(x(g({},r),{dataValue:[...R,...v],eventType:"update",eventID:h.uuid.gen()}))})}});let j="";return c&&(c=="image"?j="image/png,image/jpeg":j=c),m(ie,{val_status:r,set_status:B,val_validate:D,para:e,children:[n("input",x(g({type:"file",className:d("Input"),"data-form":s,"data-input-type":"file","data-component-id":r.componentID,"data-validation":D.ok,accept:j,multiple:u!=1,onChange:A=>$(void 0,null,function*(){let R=A.target,v=R.files,F=[];for(var I=0;I<(v==null?void 0:v.length);I++){let E=v[I],C=E.name;if(E.id=h.uuid.gen(),I+1+r.dataValue.length>u){H.add({componentID:C,secondsToClose:12e3,children:`\u30D5\u30A1\u30A4\u30EB\u767B\u9332\u6570\u3092\u8D85\u3048\u305F\u305F\u3081\u3001${C}}\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002`,backgroundColor:"nega"});continue}F.push(E)}B(x(g({},r),{dataValue:[...r.dataValue,...F],eventType:"update",eventID:h.uuid.gen()})),R.value=""})},T),{tabIndex:-1,value:""})),!p&&n(Y.List,{files:r.dataValue,para:e,val_status:r,set_status:B})]})};h(document).addEvent({eventType:"dragover",callback:e=>{e.preventDefault(),P("."+d("AddButton")).addClass(d("Draggable"))},options:{passive:!1}}).addEvent({eventType:"drop",callback:e=>{e.preventDefault(),P("."+d("AddButton")).removeClass(d("Draggable"));let t=e.dataTransfer.files;if(t.length){let a=e.target;if(P(a).hasClass(d("AddButton"))){let{componentId:s}=a.dataset,l=Q.get(s);l&&l.AddFiles&&l.AddFiles(t)}}},options:{passive:!1}});const K=e=>{e=g({},e),e.override="force";let t=ae(e);return t.cellClassName=[t.cellClassName,se.Boxish(x(g({},t.cellStyles),{tone:t.tone})).className].join(" "),n(ne,{componentID:e.componentID,children:ce,para:t})};K.fn={openDialog:e=>{let{multiple:t,accept:a}=e;return new Promise(s=>{const l=document.createElement("input");l.type="file",l.multiple=t!=null?t:!0,a&&(a=="image"?l.accept="image/png,image/jpeg":l.accept=a),l.onchange=p=>{s(p.target.files)},l.click()})}};export{K as Filer,K as default};
@@ -9,5 +9,5 @@ declare namespace Hidden {
9
9
  value?: string | number | plainObject;
10
10
  };
11
11
  }
12
- declare const Hidden: (params: Hidden.Input) => import("react/jsx-runtime").JSX.Element;
12
+ declare const Hidden: (para: Hidden.Input) => import("react/jsx-runtime").JSX.Element;
13
13
  export { Hidden, Hidden as default };
@@ -1 +1 @@
1
- import{b as i,c as o,d as r}from"../../chunk-VY3566IV.js";import{jsx as d}from"react/jsx-runtime";import{Wrapper as l}from"./core";const s=n=>{let e=n,{componentID:p="",enableFormSubmit:c,form:m,value:t=""}=e,u=r(e,["componentID","enableFormSubmit","form","value"]);return d("input",o(i({value:JSON.stringify(t),"data-input-type":"hidden","data-form":m,"data-component-id":p,"data-value":JSON.stringify(t)},u),{type:"hidden"}))},a=n=>d(l,{componentID:n.componentID,children:s,params:n});export{a as Hidden,a as default};
1
+ import{b as i,c as o,d as r}from"../../chunk-VY3566IV.js";import{jsx as d}from"react/jsx-runtime";import{Wrapper as l}from"./core";const s=n=>{let e=n,{componentID:p="",enableFormSubmit:c,form:m,value:t=""}=e,u=r(e,["componentID","enableFormSubmit","form","value"]);return d("input",o(i({value:JSON.stringify(t),"data-input-type":"hidden","data-form":m,"data-component-id":p,"data-value":JSON.stringify(t)},u),{type:"hidden"}))},a=n=>d(l,{componentID:n.componentID,children:s,para:n});export{a as Hidden,a as default};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { TagProperty, ReactElement } from '../../@declaration/_';
3
- import { InputTypes } from './_';
2
+ import { TagProperty, ReactElement } from '../../@declaration';
3
+ import { InputTypes } from '.';
4
4
  declare namespace List {
5
5
  type Tone = 'border' | 'cloud' | 'vivid' | 'normal' | 'plain';
6
6
  type Input = InputTypes.CoreInput & {
@@ -16,9 +16,9 @@ declare namespace List {
16
16
  hideInput?: boolean;
17
17
  leftIndicator?: ReactElement | false;
18
18
  rightIndicator?: ReactElement | false;
19
- cellStyles?: TagProperty.Params;
19
+ cellStyles?: TagProperty.Para;
20
20
  cellClassName?: string;
21
- cellCheckedStyles?: TagProperty.Params;
21
+ cellCheckedStyles?: TagProperty.Para;
22
22
  cellCheckedClassName?: string;
23
23
  defaultActiveStyling?: boolean;
24
24
  };
@@ -31,11 +31,11 @@ declare namespace List {
31
31
  label: ReactElement;
32
32
  disabled?: boolean;
33
33
  className?: string;
34
- checkedStyles?: TagProperty.Params;
34
+ checkedStyles?: TagProperty.Para;
35
35
  checkedClassName?: string;
36
- } & TagProperty.Params;
36
+ } & TagProperty.Para;
37
37
  type ListInput = {
38
- params: List.Plain;
38
+ para: List.Plain;
39
39
  val_status: InputTypes.Status.Plain;
40
40
  set_status: React.Dispatch<React.SetStateAction<InputTypes.Status.Plain>>;
41
41
  };