amotify 0.1.32 → 0.1.34

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 (98) hide show
  1. package/dist/@declaration/_.js +1 -1
  2. package/dist/@declaration/property.d.ts +2 -2
  3. package/dist/@styles/componentClasses/_.css +66 -65
  4. package/dist/@styles/componentClasses/_.js +39 -39
  5. package/dist/@styles/index.css +66 -65
  6. package/dist/@styles/index.js +39 -39
  7. package/dist/@styles/init.css +1 -1
  8. package/dist/@styles/style.css +96 -65
  9. package/dist/@styles/style.js +39 -39
  10. package/dist/@styles/var.css +1 -1
  11. package/dist/@utils/GenerateClassName.js +1 -470
  12. package/dist/@utils/LaunchReactApp.d.ts +1 -1
  13. package/dist/@utils/LaunchReactApp.js +1 -78
  14. package/dist/@utils/_.js +1 -12
  15. package/dist/@utils/collectForm.js +1 -96
  16. package/dist/@utils/color.js +1 -103
  17. package/dist/@utils/config.js +1 -101
  18. package/dist/@utils/fin.js +1 -39
  19. package/dist/@utils/getElement.js +1 -13
  20. package/dist/@utils/jsminEx.js +1 -172
  21. package/dist/@utils/pageTransit.js +1 -33
  22. package/dist/@utils/useRecycle.js +1 -44
  23. package/dist/@utils/useStore.js +1 -54
  24. package/dist/atoms/Box.js +1 -20
  25. package/dist/atoms/FAI.js +1 -148
  26. package/dist/atoms/Flex.js +1 -34
  27. package/dist/atoms/Grid.js +1 -17
  28. package/dist/atoms/Img.js +1 -65
  29. package/dist/atoms/Logo.js +51 -359
  30. package/dist/atoms/P.js +1 -20
  31. package/dist/atoms/Placeholder.js +1 -44
  32. package/dist/atoms/Span.js +1 -20
  33. package/dist/atoms/_.js +1 -9
  34. package/dist/fn/Button.js +1 -316
  35. package/dist/fn/Cropper.js +1 -1009
  36. package/dist/fn/Effect/Fade.js +1 -88
  37. package/dist/fn/Effect/Pudding.js +1 -22
  38. package/dist/fn/Effect/Ripple.js +3 -117
  39. package/dist/fn/Effect/_.js +1 -14
  40. package/dist/fn/Input/AutoHeightText.js +1 -112
  41. package/dist/fn/Input/Checker.js +1 -36
  42. package/dist/fn/Input/Chips/Selector.js +1 -472
  43. package/dist/fn/Input/Chips/_.js +1 -349
  44. package/dist/fn/Input/Contenteditable.js +1 -160
  45. package/dist/fn/Input/DigitCharacters.js +1 -275
  46. package/dist/fn/Input/Filer.js +1 -619
  47. package/dist/fn/Input/Hidden.js +1 -48
  48. package/dist/fn/Input/List.js +1 -450
  49. package/dist/fn/Input/Parts.js +1 -121
  50. package/dist/fn/Input/Plain.js +1 -12
  51. package/dist/fn/Input/RichSelect.js +1 -279
  52. package/dist/fn/Input/Search.js +1 -53
  53. package/dist/fn/Input/Segmented.js +1 -245
  54. package/dist/fn/Input/Select.js +1 -278
  55. package/dist/fn/Input/Slider.js +1 -538
  56. package/dist/fn/Input/Switch.js +1 -221
  57. package/dist/fn/Input/Text.js +1 -626
  58. package/dist/fn/Input/TextArea.js +1 -151
  59. package/dist/fn/Input/Time/Picker.js +1 -1457
  60. package/dist/fn/Input/Time/_.js +1 -867
  61. package/dist/fn/Input/_.js +1 -48
  62. package/dist/fn/Input/core.js +1 -626
  63. package/dist/fn/Layout/PageNotFound.js +1 -90
  64. package/dist/fn/Layout/PageRouter.js +1 -87
  65. package/dist/fn/Layout/PageViewController.js +1 -29
  66. package/dist/fn/Layout/Plate.js +1 -37
  67. package/dist/fn/Layout/RootViewController.js +1 -315
  68. package/dist/fn/Layout/SwipeView.js +1 -348
  69. package/dist/fn/Layout/TabBar.js +1 -72
  70. package/dist/fn/Layout/_.js +1 -22
  71. package/dist/fn/Loader/_.js +1 -104
  72. package/dist/fn/Loader/corner.js +1 -85
  73. package/dist/fn/Loader/mini.js +1 -125
  74. package/dist/fn/Loader/top.js +1 -73
  75. package/dist/fn/Sheet.d.ts +1 -0
  76. package/dist/fn/Sheet.js +1 -1101
  77. package/dist/fn/Snackbar.js +1 -216
  78. package/dist/fn/Table/Data.js +1 -974
  79. package/dist/fn/Table/Drag.js +1 -435
  80. package/dist/fn/Table/Normal.js +1 -136
  81. package/dist/fn/Table/Parts.js +1 -41
  82. package/dist/fn/Table/Wrapper.js +1 -60
  83. package/dist/fn/Table/_.js +1 -16
  84. package/dist/fn/Table/cellStyling.js +1 -51
  85. package/dist/fn/Tooltips.js +1 -58
  86. package/dist/fn/_.js +1 -10
  87. package/dist/index.js +1 -20
  88. package/dist/mols/Accordion.js +1 -152
  89. package/dist/mols/Column.js +1 -16
  90. package/dist/mols/LinkifyText.js +1 -42
  91. package/dist/mols/List.js +1 -42
  92. package/dist/mols/Row.js +1 -47
  93. package/dist/mols/Text.js +1 -67
  94. package/dist/mols/_.js +1 -6
  95. package/dist/temps/_.js +1 -1
  96. package/dist/temps/designBook.js +20 -3639
  97. package/package.json +1 -1
  98. package/dist/chunk-JJ3PEWPN.js +0 -60
@@ -1,278 +1 @@
1
- import {
2
- __objRest,
3
- __spreadProps,
4
- __spreadValues
5
- } from "../../chunk-JJ3PEWPN.js";
6
- import { Fragment, 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 FAI from "../../atoms/FAI";
15
- import {
16
- Wrapper,
17
- BoxWrapper,
18
- SubmitForm,
19
- CommonEffects,
20
- DefaultStyles
21
- } from "./core";
22
- import Parts from "./Parts";
23
- import {
24
- InputClasses,
25
- InputSelectClasses
26
- } from "../../@styles/componentClasses/_";
27
- function DefaultValidation(props) {
28
- let {
29
- value,
30
- params
31
- } = props;
32
- let {
33
- required,
34
- options
35
- } = params;
36
- let notice = [];
37
- if (required) {
38
- if (!options.length || options.length && $$.is.nullish(JSON.parse(value))) {
39
- notice.push({ type: "invalid", label: "\u5FC5\u9808\u9805\u76EE\u3067\u3059" });
40
- }
41
- }
42
- return {
43
- ok: !notice.filter(({ type }) => type == "invalid").length,
44
- notice
45
- };
46
- }
47
- const Comps = {
48
- Core: (params) => {
49
- var _b;
50
- let _a = params, {
51
- tone,
52
- required,
53
- form,
54
- className,
55
- enableFormSubmit,
56
- enableUnSelected,
57
- checkValidationAtFirst,
58
- onChange,
59
- onKeyDown,
60
- onValidate,
61
- onUpdateValue,
62
- onUpdateValidValue,
63
- value = "",
64
- options,
65
- placeholder,
66
- leftIndicator,
67
- rightIndicator,
68
- leftIcon,
69
- rightIcon,
70
- componentID,
71
- status_id
72
- } = _a, others = __objRest(_a, [
73
- "tone",
74
- "required",
75
- "form",
76
- "className",
77
- "enableFormSubmit",
78
- "enableUnSelected",
79
- "checkValidationAtFirst",
80
- "onChange",
81
- "onKeyDown",
82
- "onValidate",
83
- "onUpdateValue",
84
- "onUpdateValidValue",
85
- "value",
86
- "options",
87
- "placeholder",
88
- "leftIndicator",
89
- "rightIndicator",
90
- "leftIcon",
91
- "rightIcon",
92
- "componentID",
93
- "status_id"
94
- ]);
95
- let Default_Status = {
96
- componentID: params.componentID || "",
97
- dataValue: value,
98
- eventType: "init",
99
- eventID: $$.uuid.gen()
100
- };
101
- let [val_status, set_status] = useState(Default_Status);
102
- let [val_validate, set_validate] = useState({
103
- ok: false,
104
- notice: []
105
- });
106
- CommonEffects({
107
- type: "select",
108
- params,
109
- val_status,
110
- set_status,
111
- ExtraOverrideParams: {
112
- dataValue: value,
113
- formatValue: value
114
- },
115
- val_validate,
116
- set_validate,
117
- DefaultValidation,
118
- onUpdateValue,
119
- onUpdateValidValue
120
- });
121
- let SelectedElement = /* @__PURE__ */ jsx(Box, { fontColor: "4.thin", textAlign: "left", children: placeholder || "\u9078\u629E" });
122
- if (val_status.dataValue) {
123
- let Selected = options.find((option) => option.value == val_status.dataValue);
124
- if (Selected)
125
- SelectedElement = (_b = Selected.displayLabel) != null ? _b : Selected.label;
126
- }
127
- return /* @__PURE__ */ jsx(
128
- BoxWrapper,
129
- {
130
- val_status,
131
- set_status,
132
- val_validate,
133
- params,
134
- children: /* @__PURE__ */ jsxs(
135
- Box,
136
- {
137
- className: [
138
- className,
139
- InputSelectClasses("SelectLegend"),
140
- InputClasses("InputCover")
141
- ].join(" "),
142
- children: [
143
- SelectedElement,
144
- /* @__PURE__ */ jsx(
145
- "select",
146
- __spreadProps(__spreadValues({
147
- "data-form": form,
148
- "data-input-type": "select",
149
- "data-validation": val_validate.ok,
150
- "data-component-id": val_status.componentID,
151
- "data-value": val_status.dataValue,
152
- value: val_status.dataValue,
153
- onKeyDown: (event) => {
154
- if (onKeyDown)
155
- onKeyDown(event);
156
- if (enableFormSubmit)
157
- SubmitForm(event);
158
- },
159
- onChange: (event) => {
160
- let {
161
- value: rawValue
162
- } = event.target;
163
- if (val_validate.ok)
164
- set_validate({ ok: false, notice: [] });
165
- set_status(__spreadProps(__spreadValues({}, val_status), {
166
- dataValue: rawValue,
167
- eventType: "update",
168
- eventID: $$.uuid.gen()
169
- }));
170
- if (onChange)
171
- onChange(event);
172
- }
173
- }, others), {
174
- className: InputSelectClasses("Select"),
175
- children: /* @__PURE__ */ jsx(Comps.Options, __spreadValues({}, params))
176
- })
177
- )
178
- ]
179
- }
180
- )
181
- }
182
- );
183
- },
184
- Options: (params) => {
185
- let {
186
- options = [],
187
- placeholder = "\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",
188
- enableUnSelected = true
189
- } = params;
190
- let Options = options.map((option) => {
191
- let {
192
- value,
193
- label
194
- } = option;
195
- let Value = String(value);
196
- return /* @__PURE__ */ jsx(
197
- "option",
198
- {
199
- value: Value,
200
- children: label
201
- },
202
- Value
203
- );
204
- });
205
- if (enableUnSelected) {
206
- Options.unshift(/* @__PURE__ */ jsx(
207
- "option",
208
- {
209
- value: JSON.stringify(null),
210
- children: placeholder
211
- },
212
- 0
213
- ));
214
- }
215
- return /* @__PURE__ */ jsx(Fragment, { children: Options });
216
- }
217
- };
218
- const SelectInput = (params) => {
219
- let {
220
- value = null,
221
- placeholder,
222
- options = []
223
- } = params;
224
- let SelectedExist = 0;
225
- let SelectedValue = JSON.stringify(value);
226
- let DefaultOptions = options.map((option) => {
227
- let { value: value2, label } = option;
228
- let Value = JSON.stringify(value2);
229
- let Selected = Value == SelectedValue;
230
- SelectedExist |= Number(Selected);
231
- return __spreadProps(__spreadValues({}, option), {
232
- value: Value,
233
- label
234
- });
235
- });
236
- if (!SelectedExist)
237
- value = null;
238
- let DefaultValue = JSON.stringify(value);
239
- return /* @__PURE__ */ jsx(
240
- Comps.Core,
241
- __spreadProps(__spreadValues({}, params), {
242
- value: DefaultValue,
243
- options: DefaultOptions
244
- })
245
- );
246
- };
247
- const Select = (rawParams) => {
248
- var _a, _b;
249
- rawParams = __spreadValues({}, rawParams);
250
- if ($$.is.nullish(rawParams.rightIcon)) {
251
- rawParams.rightIcon = /* @__PURE__ */ jsx(
252
- Parts.RightIcon,
253
- __spreadProps(__spreadValues({
254
- flexType: "col"
255
- }, rawParams.rightIconStyles), {
256
- children: /* @__PURE__ */ jsx(FAI.AngleDown, {})
257
- })
258
- );
259
- }
260
- if (rawParams.rightIcon)
261
- rawParams.paddingRight = (_a = rawParams.paddingRight) != null ? _a : 3;
262
- if (rawParams.leftIcon)
263
- rawParams.paddingLeft = (_b = rawParams.paddingLeft) != null ? _b : 3;
264
- let params = DefaultStyles.Boxish(rawParams);
265
- delete params.rightIconStyles;
266
- return /* @__PURE__ */ jsx(
267
- Wrapper,
268
- {
269
- componentID: rawParams.componentID,
270
- children: SelectInput,
271
- params
272
- }
273
- );
274
- };
275
- export {
276
- Select,
277
- Select as default
278
- };
1
+ import{b as c,c as d,d as T}from"../../chunk-VY3566IV.js";import{Fragment as Q,jsx as l,jsxs as G}from"react/jsx-runtime";import{useState as C}from"react";import{$$ as S}from"../../@utils/_";import E from"../../atoms/Box";import J from"../../atoms/FAI";import{Wrapper as U,BoxWrapper as W,SubmitForm as q,CommonEffects as K,DefaultStyles as M}from"./core";import $ from"./Parts";import{InputClasses as j,InputSelectClasses as N}from"../../@styles/componentClasses/_";function H(e){let{value:t,params:u}=e,{required:n,options:a}=u,o=[];return n&&(!a.length||a.length&&S.is.nullish(JSON.parse(t)))&&o.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!o.filter(({type:r})=>r=="invalid").length,notice:o}}const _={Core:e=>{var O;let x=e,{tone:t,required:u,form:n,className:a,enableFormSubmit:o,enableUnSelected:r,checkValidationAtFirst:f,onChange:p,onKeyDown:I,onValidate:b,onUpdateValue:m,onUpdateValidValue:y,value:h="",options:B,placeholder:F,leftIndicator:X,rightIndicator:Y,leftIcon:Z,rightIcon:P,componentID:w,status_id:ee}=x,L=T(x,["tone","required","form","className","enableFormSubmit","enableUnSelected","checkValidationAtFirst","onChange","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","options","placeholder","leftIndicator","rightIndicator","leftIcon","rightIcon","componentID","status_id"]),A={componentID:e.componentID||"",dataValue:h,eventType:"init",eventID:S.uuid.gen()},[s,v]=C(A),[g,D]=C({ok:!1,notice:[]});K({type:"select",params:e,val_status:s,set_status:v,ExtraOverrideParams:{dataValue:h,formatValue:h},val_validate:g,set_validate:D,DefaultValidation:H,onUpdateValue:m,onUpdateValidValue:y});let R=l(E,{fontColor:"4.thin",textAlign:"left",children:F||"\u9078\u629E"});if(s.dataValue){let i=B.find(V=>V.value==s.dataValue);i&&(R=(O=i.displayLabel)!=null?O:i.label)}return l(W,{val_status:s,set_status:v,val_validate:g,params:e,children:G(E,{className:[a,N("SelectLegend"),j("InputCover")].join(" "),children:[R,l("select",d(c({"data-form":n,"data-input-type":"select","data-validation":g.ok,"data-component-id":s.componentID,"data-value":s.dataValue,value:s.dataValue,onKeyDown:i=>{I&&I(i),o&&q(i)},onChange:i=>{let{value:V}=i.target;g.ok&&D({ok:!1,notice:[]}),v(d(c({},s),{dataValue:V,eventType:"update",eventID:S.uuid.gen()})),p&&p(i)}},L),{className:N("Select"),children:l(_.Options,c({},e))}))]})})},Options:e=>{let{options:t=[],placeholder:u="\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",enableUnSelected:n=!0}=e,a=t.map(o=>{let{value:r,label:f}=o,p=String(r);return l("option",{value:p,children:f},p)});return n&&a.unshift(l("option",{value:JSON.stringify(null),children:u},0)),l(Q,{children:a})}},z=e=>{let{value:t=null,placeholder:u,options:n=[]}=e,a=0,o=JSON.stringify(t),r=n.map(p=>{let{value:I,label:b}=p,m=JSON.stringify(I),y=m==o;return a|=Number(y),d(c({},p),{value:m,label:b})});a||(t=null);let f=JSON.stringify(t);return l(_.Core,d(c({},e),{value:f,options:r}))},k=e=>{var u,n;e=c({},e),S.is.nullish(e.rightIcon)&&(e.rightIcon=l($.RightIcon,d(c({flexType:"col"},e.rightIconStyles),{children:l(J.AngleDown,{})}))),e.rightIcon&&(e.paddingRight=(u=e.paddingRight)!=null?u:3),e.leftIcon&&(e.paddingLeft=(n=e.paddingLeft)!=null?n:3);let t=M.Boxish(e);return delete t.rightIconStyles,l(U,{componentID:e.componentID,children:z,params:t})};export{k as Select,k as default};