amotify 0.1.31 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/@declaration/_.js +1 -1
  2. package/dist/@styles/componentClasses/_.css +68 -65
  3. package/dist/@styles/componentClasses/_.js +39 -39
  4. package/dist/@styles/index.css +68 -65
  5. package/dist/@styles/index.js +39 -39
  6. package/dist/@styles/init.css +1 -1
  7. package/dist/@styles/style.css +68 -65
  8. package/dist/@styles/style.js +39 -39
  9. package/dist/@styles/var.css +1 -1
  10. package/dist/@utils/GenerateClassName.js +470 -1
  11. package/dist/@utils/LaunchReactApp.js +78 -1
  12. package/dist/@utils/_.js +12 -1
  13. package/dist/@utils/collectForm.js +96 -1
  14. package/dist/@utils/color.js +103 -1
  15. package/dist/@utils/config.js +101 -1
  16. package/dist/@utils/fin.js +39 -1
  17. package/dist/@utils/getElement.js +13 -1
  18. package/dist/@utils/jsminEx.js +172 -1
  19. package/dist/@utils/pageTransit.js +33 -1
  20. package/dist/@utils/useRecycle.js +44 -1
  21. package/dist/@utils/useStore.js +54 -1
  22. package/dist/atoms/Box.js +20 -1
  23. package/dist/atoms/FAI.js +148 -1
  24. package/dist/atoms/Flex.js +34 -1
  25. package/dist/atoms/Grid.js +17 -1
  26. package/dist/atoms/Img.js +65 -1
  27. package/dist/atoms/Logo.js +359 -51
  28. package/dist/atoms/P.js +20 -1
  29. package/dist/atoms/Placeholder.js +44 -1
  30. package/dist/atoms/Span.js +20 -1
  31. package/dist/atoms/_.js +9 -1
  32. package/dist/chunk-JJ3PEWPN.js +60 -0
  33. package/dist/fn/Button.js +316 -1
  34. package/dist/fn/Cropper.js +1009 -1
  35. package/dist/fn/Effect/Fade.js +88 -1
  36. package/dist/fn/Effect/Pudding.js +22 -1
  37. package/dist/fn/Effect/Ripple.js +117 -3
  38. package/dist/fn/Effect/_.js +14 -1
  39. package/dist/fn/Input/AutoHeightText.js +112 -1
  40. package/dist/fn/Input/Checker.js +36 -1
  41. package/dist/fn/Input/Chips/Selector.js +472 -1
  42. package/dist/fn/Input/Chips/_.js +349 -1
  43. package/dist/fn/Input/Contenteditable.js +160 -1
  44. package/dist/fn/Input/DigitCharacters.js +275 -1
  45. package/dist/fn/Input/Filer.js +619 -1
  46. package/dist/fn/Input/Hidden.js +48 -1
  47. package/dist/fn/Input/List.js +450 -1
  48. package/dist/fn/Input/Parts.js +121 -1
  49. package/dist/fn/Input/Plain.js +12 -1
  50. package/dist/fn/Input/RichSelect.js +279 -1
  51. package/dist/fn/Input/Search.js +53 -1
  52. package/dist/fn/Input/Segmented.js +245 -1
  53. package/dist/fn/Input/Select.js +278 -1
  54. package/dist/fn/Input/Slider.js +538 -1
  55. package/dist/fn/Input/Switch.js +221 -1
  56. package/dist/fn/Input/Text.js +626 -1
  57. package/dist/fn/Input/TextArea.js +151 -1
  58. package/dist/fn/Input/Time/Picker.js +1457 -1
  59. package/dist/fn/Input/Time/_.js +867 -1
  60. package/dist/fn/Input/_.js +48 -1
  61. package/dist/fn/Input/core.js +626 -1
  62. package/dist/fn/Layout/PageNotFound.js +90 -1
  63. package/dist/fn/Layout/PageRouter.js +87 -1
  64. package/dist/fn/Layout/PageViewController.js +29 -1
  65. package/dist/fn/Layout/Plate.js +37 -1
  66. package/dist/fn/Layout/RootViewController.js +315 -1
  67. package/dist/fn/Layout/SwipeView.js +348 -1
  68. package/dist/fn/Layout/TabBar.js +72 -1
  69. package/dist/fn/Layout/_.js +22 -1
  70. package/dist/fn/Loader/_.js +104 -1
  71. package/dist/fn/Loader/corner.js +85 -1
  72. package/dist/fn/Loader/mini.js +125 -1
  73. package/dist/fn/Loader/top.js +73 -1
  74. package/dist/fn/Sheet.js +1101 -1
  75. package/dist/fn/Snackbar.js +216 -1
  76. package/dist/fn/Table/Data.js +974 -1
  77. package/dist/fn/Table/Drag.js +435 -1
  78. package/dist/fn/Table/Normal.js +136 -1
  79. package/dist/fn/Table/Parts.js +41 -1
  80. package/dist/fn/Table/Wrapper.js +60 -1
  81. package/dist/fn/Table/_.js +16 -1
  82. package/dist/fn/Table/cellStyling.js +51 -1
  83. package/dist/fn/Tooltips.js +58 -1
  84. package/dist/fn/_.js +10 -1
  85. package/dist/index.js +20 -1
  86. package/dist/mols/Accordion.js +152 -1
  87. package/dist/mols/Column.js +16 -1
  88. package/dist/mols/LinkifyText.js +42 -1
  89. package/dist/mols/List.js +42 -1
  90. package/dist/mols/Row.js +47 -1
  91. package/dist/mols/Text.js +67 -1
  92. package/dist/mols/_.js +6 -1
  93. package/dist/temps/_.js +1 -1
  94. package/dist/temps/designBook.js +3639 -20
  95. package/package.json +1 -1
@@ -1 +1,221 @@
1
- import{b as l,c as f,d as V}from"../../chunk-VY3566IV.js";import{jsx as a,jsxs as w}from"react/jsx-runtime";import{useState as g}from"react";import{$$ as x}from"../../@utils/_";import s from"../../atoms/Box";import F from"../../mols/Row";import N from"../Button";import{Wrapper as L,BoxWrapper as q,SubmitForm as H,CommonEffects as O}from"./core";import{InputSwitchClasses as c}from"../../@styles/componentClasses/_";function U(e){let{value:I,params:o}=e,{required:y}=o,n=[];return y&&!I&&n.push({type:"invalid",label:"ON\u306B\u306A\u3063\u3066\u3044\u307E\u305B\u3093"}),{ok:!n.filter(({type:r})=>r=="invalid").length,notice:n}}const W=e=>{let k=e,{componentID:I,color:o="posi",required:y,form:n,id:r,enableFormSubmit:R,checkValidationAtFirst:A,onChange:b,onKeyDown:v,onValidate:K,onUpdateValue:T,onUpdateValidValue:B,value:m="",icon:C="",appearance:p="material"}=k,_=V(k,["componentID","color","required","form","id","enableFormSubmit","checkValidationAtFirst","onChange","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","icon","appearance"]),E={componentID:e.componentID||"",dataValue:m,eventType:"init",eventID:x.uuid.gen()},[t,h]=g(E),[u,S]=g({ok:!1,notice:[]}),d=!!t.dataValue;return O({params:e,val_status:t,set_status:h,val_validate:u,set_validate:S,DefaultValidation:U,onUpdateValue:T,onUpdateValidValue:B,ExtraOverrideParams:{dataValue:m,formatValue:m}}),w(q,{val_status:t,set_status:h,val_validate:u,params:e,children:[a("input",l({type:"checkbox","data-form":n,"data-input-type":"switch","data-validation":u.ok,"data-component-id":t.componentID,"data-value":t.dataValue,checked:t.dataValue,className:c("Input"),id:r,onKeyDown:i=>{v&&v(i),R&&H(i)},onChange:i=>{u.ok&&S({ok:!1,notice:[]}),h(f(l({},t),{dataValue:i.target.checked,eventType:"update",eventID:x.uuid.gen()})),b&&b(i)}},_)),a(N.Label.Plain,{tabIndex:-1,htmlFor:r,padding:"1/3",transition:"middle",borderRadius:"1.tone.primary",className:c("Label"),children:a(s,f(l({},p=="applely"?{padding:"1/4",isRounded:!0,backgroundColor:d?o:"5.layer.darker"}:{}),{children:w(F.Center,{unitHeight:2.5,position:"relative",freeCSS:{width:12*4.5},children:[p=="material"?a(s,{position:"absolute",backgroundColor:d?o:"5.layer.darker",borderRadius:"sphere",unitHeight:1,transition:"middle",width:1,className:c("Bar"),opacity:"middle"}):null,a(s,{position:"absolute",top:0,left:0,backgroundColor:p=="material"&&d?o:"white",transition:"middle",ssSphere:2.5,boxShadow:"1.remark",className:c("Dot"),children:C?a(s,{transition:"middle",ssSquare:2,flexCenter:!0,fontColor:p=="applely"&&d?o:"white",children:C}):null})]})}))})]})},D=e=>(e=l({},e),e.color=e.color||"theme",a(L,{componentID:e.componentID,children:W,params:e}));export{D as Switch,D as default};
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "../../chunk-JJ3PEWPN.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import {
8
+ useState
9
+ } from "react";
10
+ import {
11
+ $$
12
+ } from "../../@utils/_";
13
+ import Box from "../../atoms/Box";
14
+ import Row from "../../mols/Row";
15
+ import Button from "../Button";
16
+ import {
17
+ Wrapper,
18
+ BoxWrapper,
19
+ SubmitForm,
20
+ CommonEffects
21
+ } from "./core";
22
+ import { InputSwitchClasses } from "../../@styles/componentClasses/_";
23
+ function DefaultValidation(props) {
24
+ let { value, params } = props;
25
+ let { required } = params;
26
+ let notice = [];
27
+ if (required && !value) {
28
+ notice.push({ type: "invalid", label: "ON\u306B\u306A\u3063\u3066\u3044\u307E\u305B\u3093" });
29
+ }
30
+ return {
31
+ ok: !notice.filter(({ type }) => type == "invalid").length,
32
+ notice
33
+ };
34
+ }
35
+ const SwitchInput = (params) => {
36
+ let _a = params, {
37
+ componentID,
38
+ color = "posi",
39
+ required,
40
+ form,
41
+ id,
42
+ enableFormSubmit,
43
+ checkValidationAtFirst,
44
+ onChange,
45
+ onKeyDown,
46
+ onValidate,
47
+ onUpdateValue,
48
+ onUpdateValidValue,
49
+ value = "",
50
+ icon = "",
51
+ appearance = "material"
52
+ } = _a, others = __objRest(_a, [
53
+ "componentID",
54
+ "color",
55
+ "required",
56
+ "form",
57
+ "id",
58
+ "enableFormSubmit",
59
+ "checkValidationAtFirst",
60
+ "onChange",
61
+ "onKeyDown",
62
+ "onValidate",
63
+ "onUpdateValue",
64
+ "onUpdateValidValue",
65
+ "value",
66
+ "icon",
67
+ "appearance"
68
+ ]);
69
+ let Default_Status = {
70
+ componentID: params.componentID || "",
71
+ dataValue: value,
72
+ eventType: "init",
73
+ eventID: $$.uuid.gen()
74
+ };
75
+ let [val_status, set_status] = useState(Default_Status);
76
+ let [val_validate, set_validate] = useState({
77
+ ok: false,
78
+ notice: []
79
+ });
80
+ let isChecked = !!val_status.dataValue;
81
+ CommonEffects({
82
+ params,
83
+ val_status,
84
+ set_status,
85
+ val_validate,
86
+ set_validate,
87
+ DefaultValidation,
88
+ onUpdateValue,
89
+ onUpdateValidValue,
90
+ ExtraOverrideParams: {
91
+ dataValue: value,
92
+ formatValue: value
93
+ }
94
+ });
95
+ return /* @__PURE__ */ jsxs(
96
+ BoxWrapper,
97
+ {
98
+ val_status,
99
+ set_status,
100
+ val_validate,
101
+ params,
102
+ children: [
103
+ /* @__PURE__ */ jsx(
104
+ "input",
105
+ __spreadValues({
106
+ type: "checkbox",
107
+ "data-form": form,
108
+ "data-input-type": "switch",
109
+ "data-validation": val_validate.ok,
110
+ "data-component-id": val_status.componentID,
111
+ "data-value": val_status.dataValue,
112
+ checked: val_status.dataValue,
113
+ className: InputSwitchClasses("Input"),
114
+ id,
115
+ onKeyDown: (event) => {
116
+ if (onKeyDown)
117
+ onKeyDown(event);
118
+ if (enableFormSubmit)
119
+ SubmitForm(event);
120
+ },
121
+ onChange: (event) => {
122
+ if (val_validate.ok)
123
+ set_validate({ ok: false, notice: [] });
124
+ set_status(__spreadProps(__spreadValues({}, val_status), {
125
+ dataValue: event.target.checked,
126
+ eventType: "update",
127
+ eventID: $$.uuid.gen()
128
+ }));
129
+ if (onChange)
130
+ onChange(event);
131
+ }
132
+ }, others)
133
+ ),
134
+ /* @__PURE__ */ jsx(
135
+ Button.Label.Plain,
136
+ {
137
+ tabIndex: -1,
138
+ htmlFor: id,
139
+ padding: "1/3",
140
+ transition: "middle",
141
+ borderRadius: "1.tone.primary",
142
+ className: InputSwitchClasses("Label"),
143
+ children: /* @__PURE__ */ jsx(
144
+ Box,
145
+ __spreadProps(__spreadValues({}, appearance == "applely" ? {
146
+ padding: "1/4",
147
+ isRounded: true,
148
+ backgroundColor: isChecked ? color : "5.layer.darker"
149
+ } : {}), {
150
+ children: /* @__PURE__ */ jsxs(
151
+ Row.Center,
152
+ {
153
+ unitHeight: 2.5,
154
+ position: "relative",
155
+ freeCSS: {
156
+ width: 12 * 4.5
157
+ },
158
+ children: [
159
+ appearance == "material" && /* @__PURE__ */ jsx(
160
+ Box,
161
+ {
162
+ position: "absolute",
163
+ backgroundColor: isChecked ? color : "5.layer.darker",
164
+ borderRadius: "sphere",
165
+ unitHeight: 1,
166
+ transition: "middle",
167
+ width: 1,
168
+ className: InputSwitchClasses("Bar"),
169
+ opacity: "middle"
170
+ }
171
+ ),
172
+ /* @__PURE__ */ jsx(
173
+ Box,
174
+ {
175
+ position: "absolute",
176
+ top: 0,
177
+ left: 0,
178
+ backgroundColor: appearance == "material" && isChecked ? color : "white",
179
+ transition: "middle",
180
+ ssSphere: 2.5,
181
+ boxShadow: "1.remark",
182
+ className: InputSwitchClasses("Dot"),
183
+ children: icon && /* @__PURE__ */ jsx(
184
+ Box,
185
+ {
186
+ transition: "middle",
187
+ ssSquare: 2,
188
+ flexCenter: true,
189
+ fontColor: appearance == "applely" && isChecked ? color : "white",
190
+ children: icon
191
+ }
192
+ )
193
+ }
194
+ )
195
+ ]
196
+ }
197
+ )
198
+ })
199
+ )
200
+ }
201
+ )
202
+ ]
203
+ }
204
+ );
205
+ };
206
+ const Switch = (rawParams) => {
207
+ rawParams = __spreadValues({}, rawParams);
208
+ rawParams.color = rawParams.color || "theme";
209
+ return /* @__PURE__ */ jsx(
210
+ Wrapper,
211
+ {
212
+ componentID: rawParams.componentID,
213
+ children: SwitchInput,
214
+ params: rawParams
215
+ }
216
+ );
217
+ };
218
+ export {
219
+ Switch,
220
+ Switch as default
221
+ };