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.
- package/dist/@declaration/_.js +1 -1
- package/dist/@styles/componentClasses/_.css +68 -65
- package/dist/@styles/componentClasses/_.js +39 -39
- package/dist/@styles/index.css +68 -65
- package/dist/@styles/index.js +39 -39
- package/dist/@styles/init.css +1 -1
- package/dist/@styles/style.css +68 -65
- package/dist/@styles/style.js +39 -39
- package/dist/@styles/var.css +1 -1
- package/dist/@utils/GenerateClassName.js +470 -1
- package/dist/@utils/LaunchReactApp.js +78 -1
- package/dist/@utils/_.js +12 -1
- package/dist/@utils/collectForm.js +96 -1
- package/dist/@utils/color.js +103 -1
- package/dist/@utils/config.js +101 -1
- package/dist/@utils/fin.js +39 -1
- package/dist/@utils/getElement.js +13 -1
- package/dist/@utils/jsminEx.js +172 -1
- package/dist/@utils/pageTransit.js +33 -1
- package/dist/@utils/useRecycle.js +44 -1
- package/dist/@utils/useStore.js +54 -1
- package/dist/atoms/Box.js +20 -1
- package/dist/atoms/FAI.js +148 -1
- package/dist/atoms/Flex.js +34 -1
- package/dist/atoms/Grid.js +17 -1
- package/dist/atoms/Img.js +65 -1
- package/dist/atoms/Logo.js +359 -51
- package/dist/atoms/P.js +20 -1
- package/dist/atoms/Placeholder.js +44 -1
- package/dist/atoms/Span.js +20 -1
- package/dist/atoms/_.js +9 -1
- package/dist/chunk-JJ3PEWPN.js +60 -0
- package/dist/fn/Button.js +316 -1
- package/dist/fn/Cropper.js +1009 -1
- package/dist/fn/Effect/Fade.js +88 -1
- package/dist/fn/Effect/Pudding.js +22 -1
- package/dist/fn/Effect/Ripple.js +117 -3
- package/dist/fn/Effect/_.js +14 -1
- package/dist/fn/Input/AutoHeightText.js +112 -1
- package/dist/fn/Input/Checker.js +36 -1
- package/dist/fn/Input/Chips/Selector.js +472 -1
- package/dist/fn/Input/Chips/_.js +349 -1
- package/dist/fn/Input/Contenteditable.js +160 -1
- package/dist/fn/Input/DigitCharacters.js +275 -1
- package/dist/fn/Input/Filer.js +619 -1
- package/dist/fn/Input/Hidden.js +48 -1
- package/dist/fn/Input/List.js +450 -1
- package/dist/fn/Input/Parts.js +121 -1
- package/dist/fn/Input/Plain.js +12 -1
- package/dist/fn/Input/RichSelect.js +279 -1
- package/dist/fn/Input/Search.js +53 -1
- package/dist/fn/Input/Segmented.js +245 -1
- package/dist/fn/Input/Select.js +278 -1
- package/dist/fn/Input/Slider.js +538 -1
- package/dist/fn/Input/Switch.js +221 -1
- package/dist/fn/Input/Text.js +626 -1
- package/dist/fn/Input/TextArea.js +151 -1
- package/dist/fn/Input/Time/Picker.js +1457 -1
- package/dist/fn/Input/Time/_.js +867 -1
- package/dist/fn/Input/_.js +48 -1
- package/dist/fn/Input/core.js +626 -1
- package/dist/fn/Layout/PageNotFound.js +90 -1
- package/dist/fn/Layout/PageRouter.js +87 -1
- package/dist/fn/Layout/PageViewController.js +29 -1
- package/dist/fn/Layout/Plate.js +37 -1
- package/dist/fn/Layout/RootViewController.js +315 -1
- package/dist/fn/Layout/SwipeView.js +348 -1
- package/dist/fn/Layout/TabBar.js +72 -1
- package/dist/fn/Layout/_.js +22 -1
- package/dist/fn/Loader/_.js +104 -1
- package/dist/fn/Loader/corner.js +85 -1
- package/dist/fn/Loader/mini.js +125 -1
- package/dist/fn/Loader/top.js +73 -1
- package/dist/fn/Sheet.js +1101 -1
- package/dist/fn/Snackbar.js +216 -1
- package/dist/fn/Table/Data.js +974 -1
- package/dist/fn/Table/Drag.js +435 -1
- package/dist/fn/Table/Normal.js +136 -1
- package/dist/fn/Table/Parts.js +41 -1
- package/dist/fn/Table/Wrapper.js +60 -1
- package/dist/fn/Table/_.js +16 -1
- package/dist/fn/Table/cellStyling.js +51 -1
- package/dist/fn/Tooltips.js +58 -1
- package/dist/fn/_.js +10 -1
- package/dist/index.js +20 -1
- package/dist/mols/Accordion.js +152 -1
- package/dist/mols/Column.js +16 -1
- package/dist/mols/LinkifyText.js +42 -1
- package/dist/mols/List.js +42 -1
- package/dist/mols/Row.js +47 -1
- package/dist/mols/Text.js +67 -1
- package/dist/mols/_.js +6 -1
- package/dist/temps/_.js +1 -1
- package/dist/temps/designBook.js +3639 -20
- package/package.json +1 -1
|
@@ -1 +1,348 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "../../chunk-JJ3PEWPN.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import {
|
|
8
|
+
useState,
|
|
9
|
+
useEffect,
|
|
10
|
+
useRef
|
|
11
|
+
} from "react";
|
|
12
|
+
import {
|
|
13
|
+
$$,
|
|
14
|
+
$$fromRoot,
|
|
15
|
+
useStore
|
|
16
|
+
} from "../../@utils/_";
|
|
17
|
+
import Box from "../../atoms/Box";
|
|
18
|
+
import Flex from "../../atoms/Flex";
|
|
19
|
+
import { LayoutClasses } from "../../@styles/componentClasses/_";
|
|
20
|
+
const Core = (params) => {
|
|
21
|
+
let _a = params, {
|
|
22
|
+
options: {
|
|
23
|
+
onSlideCallback,
|
|
24
|
+
visibilitySurroundSlide = true,
|
|
25
|
+
autoSwipems = 0,
|
|
26
|
+
loop = false,
|
|
27
|
+
disableMousedrag = false,
|
|
28
|
+
disableTouch = false
|
|
29
|
+
} = {},
|
|
30
|
+
wrapper = (slide) => slide,
|
|
31
|
+
slides = []
|
|
32
|
+
} = _a, others = __objRest(_a, [
|
|
33
|
+
"options",
|
|
34
|
+
"wrapper",
|
|
35
|
+
"slides"
|
|
36
|
+
]);
|
|
37
|
+
let [val_swipeID] = useState($$.uuid.gen());
|
|
38
|
+
let [val_event, set_event] = useState({
|
|
39
|
+
eventType: "init",
|
|
40
|
+
index: params.slideIndex
|
|
41
|
+
});
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
useStore.set({
|
|
44
|
+
key: "SwipeTimer-" + val_swipeID,
|
|
45
|
+
value: null
|
|
46
|
+
});
|
|
47
|
+
}, []);
|
|
48
|
+
const mounted = useRef(false);
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
set_event({
|
|
51
|
+
eventType: "usr",
|
|
52
|
+
index: params.slideIndex
|
|
53
|
+
});
|
|
54
|
+
if (!mounted.current)
|
|
55
|
+
mounted.current = true;
|
|
56
|
+
}, [params.slideIndex]);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
let Index2 = val_event.index + (loop ? 1 : 0);
|
|
59
|
+
let CopyIndex = [-1, slides.length].includes(val_event.index);
|
|
60
|
+
if (!CopyIndex) {
|
|
61
|
+
if (onSlideCallback)
|
|
62
|
+
setTimeout(() => {
|
|
63
|
+
onSlideCallback(val_event.index);
|
|
64
|
+
}, 300);
|
|
65
|
+
}
|
|
66
|
+
let Base = $$fromRoot("#Swiper-" + val_swipeID);
|
|
67
|
+
if (val_event.eventType == "adjustLoop") {
|
|
68
|
+
Base.await(250).css({
|
|
69
|
+
transition: "0s",
|
|
70
|
+
transform: FNs.TrasformString(Index2)
|
|
71
|
+
}).children().removeClass(LayoutClasses("Display")).parent().children(Index2).addClass([LayoutClasses("Display"), LayoutClasses("LoopAdjusting")]).await(100).removeClass(LayoutClasses("LoopAdjusting"));
|
|
72
|
+
} else if (val_event.eventType == "sys") {
|
|
73
|
+
Base.await(250).css({
|
|
74
|
+
transform: FNs.TrasformString(Index2)
|
|
75
|
+
}).children().removeClass(LayoutClasses("Display")).parent().children(Index2).addClass(LayoutClasses("Display"));
|
|
76
|
+
} else {
|
|
77
|
+
Base.children().removeClass(LayoutClasses("Display")).parent().children(Index2).addClass(LayoutClasses("Display")).parent().css({
|
|
78
|
+
transition: "0.3s",
|
|
79
|
+
transform: FNs.TrasformString(Index2)
|
|
80
|
+
}).await(250).css({ transition: "0s" });
|
|
81
|
+
if (CopyIndex) {
|
|
82
|
+
let ajastIndex = val_event.index == -1 ? slides.length - 1 : 0;
|
|
83
|
+
set_event({
|
|
84
|
+
eventType: "adjustLoop",
|
|
85
|
+
index: ajastIndex
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (autoSwipems && !CopyIndex) {
|
|
90
|
+
$$.interval.clear("SwipeTimer-" + val_swipeID);
|
|
91
|
+
$$.interval.standBy(
|
|
92
|
+
"SwipeTimer-" + val_swipeID,
|
|
93
|
+
autoSwipems - (val_event.eventType == "sys" ? 310 : 0),
|
|
94
|
+
() => {
|
|
95
|
+
let newIndex = val_event.index + 1;
|
|
96
|
+
if (!loop && newIndex > slides.length - 1)
|
|
97
|
+
newIndex = 0;
|
|
98
|
+
set_event({
|
|
99
|
+
eventType: "usr",
|
|
100
|
+
index: newIndex
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
}, [val_event]);
|
|
106
|
+
let Slides = slides.map((slide, index) => /* @__PURE__ */ jsx(
|
|
107
|
+
Box,
|
|
108
|
+
{
|
|
109
|
+
flexSizing: "none",
|
|
110
|
+
width: 1,
|
|
111
|
+
height: 0,
|
|
112
|
+
className: LayoutClasses("Child"),
|
|
113
|
+
children: wrapper(slide)
|
|
114
|
+
},
|
|
115
|
+
index
|
|
116
|
+
));
|
|
117
|
+
if (loop) {
|
|
118
|
+
Slides.push(Slides[0]);
|
|
119
|
+
Slides.unshift(Slides[Slides.length - 2]);
|
|
120
|
+
}
|
|
121
|
+
let info = {
|
|
122
|
+
x: 0,
|
|
123
|
+
y: 0,
|
|
124
|
+
process: false,
|
|
125
|
+
effectStartAt: 0,
|
|
126
|
+
id: val_swipeID,
|
|
127
|
+
loop,
|
|
128
|
+
index: val_event.index,
|
|
129
|
+
minIndex: loop ? -1 : 0,
|
|
130
|
+
maxIndex: slides.length + (loop ? 1 : -1),
|
|
131
|
+
width: 0,
|
|
132
|
+
set_event
|
|
133
|
+
};
|
|
134
|
+
let Index = val_event.index + (loop ? 1 : 0);
|
|
135
|
+
return /* @__PURE__ */ jsx(
|
|
136
|
+
Box,
|
|
137
|
+
__spreadProps(__spreadValues({
|
|
138
|
+
overflow: "hidden",
|
|
139
|
+
position: "relative"
|
|
140
|
+
}, others), {
|
|
141
|
+
className: [
|
|
142
|
+
others.className,
|
|
143
|
+
LayoutClasses("SwipeView")
|
|
144
|
+
].join(" "),
|
|
145
|
+
freeCSS: __spreadValues({
|
|
146
|
+
zIndex: 1
|
|
147
|
+
}, others.freeCSS),
|
|
148
|
+
"data-swipe-id": val_swipeID,
|
|
149
|
+
onMouseDown: (event) => {
|
|
150
|
+
if (disableMousedrag)
|
|
151
|
+
return;
|
|
152
|
+
if (event.buttons != 1)
|
|
153
|
+
return;
|
|
154
|
+
FNs.EffectStart(event, info);
|
|
155
|
+
},
|
|
156
|
+
onTouchStart: (event) => {
|
|
157
|
+
var _a2;
|
|
158
|
+
if (disableTouch)
|
|
159
|
+
return;
|
|
160
|
+
if (((_a2 = event.touches) == null ? void 0 : _a2.length) != 1)
|
|
161
|
+
return;
|
|
162
|
+
FNs.EffectStart(event, info);
|
|
163
|
+
},
|
|
164
|
+
children: /* @__PURE__ */ jsx(
|
|
165
|
+
Flex,
|
|
166
|
+
{
|
|
167
|
+
flexWrap: false,
|
|
168
|
+
gap: 1,
|
|
169
|
+
transition: "long",
|
|
170
|
+
className: [
|
|
171
|
+
LayoutClasses("Rail"),
|
|
172
|
+
LayoutClasses("ShowOther_" + visibilitySurroundSlide)
|
|
173
|
+
].join(" "),
|
|
174
|
+
id: "Swiper-" + val_swipeID,
|
|
175
|
+
freeCSS: __spreadValues({}, !mounted.current ? {
|
|
176
|
+
transform: FNs.TrasformString(Index)
|
|
177
|
+
} : {}),
|
|
178
|
+
children: Slides
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
})
|
|
182
|
+
);
|
|
183
|
+
};
|
|
184
|
+
const FNs = {
|
|
185
|
+
TrasformString: (Index) => `translateX( calc( ${-100 * Index}% - ${12 * Index}px ) )`,
|
|
186
|
+
EffectStart: (event, info) => {
|
|
187
|
+
let {
|
|
188
|
+
x,
|
|
189
|
+
y
|
|
190
|
+
} = $$.getCursor(event);
|
|
191
|
+
let eventTarget = event.currentTarget;
|
|
192
|
+
let target = event.target;
|
|
193
|
+
if (["SELECT", "BUTTON", "LABEL", "INPUT"].includes(target.tagName))
|
|
194
|
+
return;
|
|
195
|
+
info = __spreadProps(__spreadValues({}, info), {
|
|
196
|
+
x: x - info.x + window.scrollX,
|
|
197
|
+
y: y - info.y + window.scrollY,
|
|
198
|
+
effectStartAt: (/* @__PURE__ */ new Date()).getTime(),
|
|
199
|
+
width: $$fromRoot("#Swiper-" + info.id).position().width
|
|
200
|
+
});
|
|
201
|
+
let { swipeId } = eventTarget.dataset;
|
|
202
|
+
if (swipeId == info.id) {
|
|
203
|
+
$$(document).addEvent({
|
|
204
|
+
eventID: "SwipeMouseMove",
|
|
205
|
+
eventType: "mousemove",
|
|
206
|
+
callback: (event2) => {
|
|
207
|
+
FNs.EffectCheck(event2, info);
|
|
208
|
+
},
|
|
209
|
+
options: { passive: false }
|
|
210
|
+
}).addEvent({
|
|
211
|
+
eventID: "SwipeTouchMove",
|
|
212
|
+
eventType: "touchmove",
|
|
213
|
+
callback: (event2) => {
|
|
214
|
+
FNs.EffectCheck(event2, info);
|
|
215
|
+
},
|
|
216
|
+
options: { passive: false }
|
|
217
|
+
}).addEvent({
|
|
218
|
+
eventID: "SwipeMouseUp",
|
|
219
|
+
eventType: "mouseup",
|
|
220
|
+
callback: (event2) => {
|
|
221
|
+
FNs.EffectEnd(event2, info);
|
|
222
|
+
},
|
|
223
|
+
options: { passive: false }
|
|
224
|
+
}).addEvent({
|
|
225
|
+
eventID: "SwipeTouchEnd",
|
|
226
|
+
eventType: "touchend",
|
|
227
|
+
callback: (event2) => {
|
|
228
|
+
FNs.EffectEnd(event2, info);
|
|
229
|
+
},
|
|
230
|
+
options: { passive: false }
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
EffectCheck: (event, info) => {
|
|
235
|
+
if (info.process)
|
|
236
|
+
return;
|
|
237
|
+
let {
|
|
238
|
+
x,
|
|
239
|
+
y
|
|
240
|
+
} = $$.getCursor(event);
|
|
241
|
+
let X = Math.abs(x - info.x + window.scrollX);
|
|
242
|
+
let Y = Math.abs(y - info.y + window.scrollY);
|
|
243
|
+
if (event.touches && event.touches.length > 1)
|
|
244
|
+
return;
|
|
245
|
+
if (Y + X < 15)
|
|
246
|
+
return;
|
|
247
|
+
if (Y > X / 2) {
|
|
248
|
+
$$(document).removeEvent([
|
|
249
|
+
"SwipeMouseMove",
|
|
250
|
+
"SwipeTouchMove"
|
|
251
|
+
]);
|
|
252
|
+
} else {
|
|
253
|
+
info.process = true;
|
|
254
|
+
let Index = info.index + (info.loop ? 1 : 0);
|
|
255
|
+
$$fromRoot("#Swiper-" + info.id).children(Index - 1).addClass(LayoutClasses("Display"));
|
|
256
|
+
$$(document).addEvent({
|
|
257
|
+
eventID: "SwipeCheckMouseMove",
|
|
258
|
+
eventType: "mousemove",
|
|
259
|
+
callback: (event2) => {
|
|
260
|
+
FNs.EffectMove(event2, info);
|
|
261
|
+
},
|
|
262
|
+
options: { passive: false }
|
|
263
|
+
}).addEvent({
|
|
264
|
+
eventID: "SwipeCheckTouchMove",
|
|
265
|
+
eventType: "touchmove",
|
|
266
|
+
callback: (event2) => {
|
|
267
|
+
FNs.EffectMove(event2, info);
|
|
268
|
+
},
|
|
269
|
+
options: { passive: false }
|
|
270
|
+
});
|
|
271
|
+
event.preventDefault();
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
EffectMove: (event, info) => {
|
|
276
|
+
if (event.touches && event.touches.length > 1)
|
|
277
|
+
return;
|
|
278
|
+
let {
|
|
279
|
+
x
|
|
280
|
+
} = $$.getCursor(event);
|
|
281
|
+
let X = x - info.x + window.scrollX;
|
|
282
|
+
let Index = info.index + (info.loop ? 1 : 0);
|
|
283
|
+
let rate = Index - X / info.width;
|
|
284
|
+
if (rate < 0) {
|
|
285
|
+
rate /= 2;
|
|
286
|
+
} else if (rate > info.maxIndex) {
|
|
287
|
+
let excess = rate - info.maxIndex;
|
|
288
|
+
rate = info.maxIndex + excess / 2;
|
|
289
|
+
}
|
|
290
|
+
$$fromRoot("#Swiper-" + info.id).css({
|
|
291
|
+
transition: "0s",
|
|
292
|
+
transform: FNs.TrasformString(rate)
|
|
293
|
+
});
|
|
294
|
+
event.preventDefault();
|
|
295
|
+
return;
|
|
296
|
+
},
|
|
297
|
+
EffectEnd: (event, info) => {
|
|
298
|
+
if (info.process) {
|
|
299
|
+
let cursor = $$.getCursor(event);
|
|
300
|
+
let X = cursor.x - info.x + window.scrollX;
|
|
301
|
+
let current = (/* @__PURE__ */ new Date()).getTime();
|
|
302
|
+
let totalTime = current - info.effectStartAt;
|
|
303
|
+
let Index = info.index + (info.loop ? 1 : 0);
|
|
304
|
+
let newIndex = 0;
|
|
305
|
+
if (totalTime < 400) {
|
|
306
|
+
newIndex = Index - (Number(X > 0) * 2 - 1);
|
|
307
|
+
} else {
|
|
308
|
+
newIndex = Math.round(Index - X / info.width);
|
|
309
|
+
}
|
|
310
|
+
newIndex = Math.max(Math.min(newIndex, info.maxIndex), info.minIndex);
|
|
311
|
+
info.process = false;
|
|
312
|
+
if (Index === newIndex) {
|
|
313
|
+
info.effectStartAt = current;
|
|
314
|
+
$$fromRoot("#Swiper-" + info.id).css({
|
|
315
|
+
transition: ".2s",
|
|
316
|
+
transform: FNs.TrasformString(newIndex)
|
|
317
|
+
}).await(310).css({
|
|
318
|
+
transition: "0s"
|
|
319
|
+
}).children().removeClass(LayoutClasses("Display")).parent().children(Index).addClass(LayoutClasses("Display"));
|
|
320
|
+
} else {
|
|
321
|
+
info.set_event({
|
|
322
|
+
eventType: "usr",
|
|
323
|
+
index: newIndex + info.minIndex
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
$$(document).removeEvent([
|
|
328
|
+
"SwipeMouseMove",
|
|
329
|
+
"SwipeTouchMove",
|
|
330
|
+
"SwipeCheckMouseMove",
|
|
331
|
+
"SwipeCheckTouchMove",
|
|
332
|
+
"SwipeMouseUp",
|
|
333
|
+
"SwipeTouchEnd"
|
|
334
|
+
]);
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
const SwipeView = (params) => {
|
|
338
|
+
return /* @__PURE__ */ jsx(
|
|
339
|
+
Core,
|
|
340
|
+
__spreadProps(__spreadValues({}, params), {
|
|
341
|
+
slideIndex: Math.max(Math.min(params.slideIndex, params.slides.length - 1), 0)
|
|
342
|
+
})
|
|
343
|
+
);
|
|
344
|
+
};
|
|
345
|
+
export {
|
|
346
|
+
SwipeView,
|
|
347
|
+
SwipeView as default
|
|
348
|
+
};
|
package/dist/fn/Layout/TabBar.js
CHANGED
|
@@ -1 +1,72 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "../../chunk-JJ3PEWPN.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import {
|
|
8
|
+
useEffect
|
|
9
|
+
} from "react";
|
|
10
|
+
import Box from "../../atoms/Box";
|
|
11
|
+
import Flex from "../../atoms/Flex";
|
|
12
|
+
import Input from "../Input/_";
|
|
13
|
+
const TabBar = (params) => {
|
|
14
|
+
let _a = params, {
|
|
15
|
+
tabIndex,
|
|
16
|
+
tabs,
|
|
17
|
+
onTabChange,
|
|
18
|
+
componentDidMount
|
|
19
|
+
} = _a, others = __objRest(_a, [
|
|
20
|
+
"tabIndex",
|
|
21
|
+
"tabs",
|
|
22
|
+
"onTabChange",
|
|
23
|
+
"componentDidMount"
|
|
24
|
+
]);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (componentDidMount)
|
|
27
|
+
componentDidMount();
|
|
28
|
+
}, []);
|
|
29
|
+
return /* @__PURE__ */ jsx(
|
|
30
|
+
Flex,
|
|
31
|
+
__spreadProps(__spreadValues({
|
|
32
|
+
position: "relative",
|
|
33
|
+
overflow: "auto",
|
|
34
|
+
flexWrap: false
|
|
35
|
+
}, others), {
|
|
36
|
+
freeCSS: __spreadValues({
|
|
37
|
+
zIndex: 3,
|
|
38
|
+
whiteSpace: "nowrap"
|
|
39
|
+
}, others.freeCSS),
|
|
40
|
+
children: /* @__PURE__ */ jsx(
|
|
41
|
+
Box,
|
|
42
|
+
{
|
|
43
|
+
margin: [0, "auto"],
|
|
44
|
+
children: /* @__PURE__ */ jsx(
|
|
45
|
+
Input.Segmented.BottomLine,
|
|
46
|
+
{
|
|
47
|
+
value: tabIndex,
|
|
48
|
+
fontColor: "inherit",
|
|
49
|
+
override: "force",
|
|
50
|
+
gap: 0,
|
|
51
|
+
options: tabs.map((tab, index) => {
|
|
52
|
+
return {
|
|
53
|
+
value: index,
|
|
54
|
+
label: tab
|
|
55
|
+
};
|
|
56
|
+
}),
|
|
57
|
+
onUpdateValidValue: (args) => {
|
|
58
|
+
let value = args.value[0];
|
|
59
|
+
if (onTabChange)
|
|
60
|
+
onTabChange(value);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
})
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
TabBar,
|
|
71
|
+
TabBar as default
|
|
72
|
+
};
|
package/dist/fn/Layout/_.js
CHANGED
|
@@ -1 +1,22 @@
|
|
|
1
|
-
import"../../chunk-
|
|
1
|
+
import "../../chunk-JJ3PEWPN.js";
|
|
2
|
+
import _SwipeView from "./SwipeView";
|
|
3
|
+
import _PageViewController from "./PageViewController";
|
|
4
|
+
import _TabBar from "./TabBar";
|
|
5
|
+
import _Plate from "./Plate";
|
|
6
|
+
import _PageNotFound from "./PageNotFound";
|
|
7
|
+
import _PageRouter from "./PageRouter";
|
|
8
|
+
import _RootViewController from "./RootViewController";
|
|
9
|
+
var Layout;
|
|
10
|
+
((Layout2) => {
|
|
11
|
+
Layout2.PageViewController = _PageViewController;
|
|
12
|
+
Layout2.TabBar = _TabBar;
|
|
13
|
+
Layout2.Plate = _Plate;
|
|
14
|
+
Layout2.SwipeView = _SwipeView;
|
|
15
|
+
Layout2.PageRouter = _PageRouter;
|
|
16
|
+
Layout2.PageNotFound = _PageNotFound;
|
|
17
|
+
Layout2.RootViewController = _RootViewController;
|
|
18
|
+
})(Layout || (Layout = {}));
|
|
19
|
+
export {
|
|
20
|
+
Layout,
|
|
21
|
+
Layout as default
|
|
22
|
+
};
|
package/dist/fn/Loader/_.js
CHANGED
|
@@ -1 +1,104 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
__spreadValues
|
|
3
|
+
} from "../../chunk-JJ3PEWPN.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import {
|
|
6
|
+
Config,
|
|
7
|
+
useStore,
|
|
8
|
+
$$fromRoot
|
|
9
|
+
} from "../../@utils/_";
|
|
10
|
+
import Box from "../../atoms/Box";
|
|
11
|
+
import { LoaderClasses } from "../../@styles/componentClasses/_";
|
|
12
|
+
import { Top } from "./top";
|
|
13
|
+
import { Mini } from "./mini";
|
|
14
|
+
import { Corner } from "./corner";
|
|
15
|
+
const SizeWrapper = (params) => {
|
|
16
|
+
let color = params.color;
|
|
17
|
+
return {
|
|
18
|
+
S: (params2) => /* @__PURE__ */ jsx(Mini, __spreadValues({ size: "S", color }, params2)),
|
|
19
|
+
R: (params2) => /* @__PURE__ */ jsx(Mini, __spreadValues({ size: "R", color }, params2)),
|
|
20
|
+
L: (params2) => /* @__PURE__ */ jsx(Mini, __spreadValues({ size: "L", color }, params2)),
|
|
21
|
+
XL: (params2) => /* @__PURE__ */ jsx(Mini, __spreadValues({ size: "XL", color }, params2)),
|
|
22
|
+
MAX: (params2) => /* @__PURE__ */ jsx(Mini, __spreadValues({ size: "MAX", color }, params2))
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const Loader = {
|
|
26
|
+
Wrapper: () => {
|
|
27
|
+
return /* @__PURE__ */ jsxs(Box, { className: [
|
|
28
|
+
"AMOTIFY_be",
|
|
29
|
+
LoaderClasses("Wrapper")
|
|
30
|
+
].join(" "), children: [
|
|
31
|
+
/* @__PURE__ */ jsx(Top, {}),
|
|
32
|
+
/* @__PURE__ */ jsx(Corner, {})
|
|
33
|
+
] });
|
|
34
|
+
},
|
|
35
|
+
Theme: SizeWrapper({ color: "theme" }),
|
|
36
|
+
Posi: SizeWrapper({ color: "posi" }),
|
|
37
|
+
Nega: SizeWrapper({ color: "nega" }),
|
|
38
|
+
Warn: SizeWrapper({ color: "warn" }),
|
|
39
|
+
White: SizeWrapper({ color: "white" }),
|
|
40
|
+
Cloud: SizeWrapper({ color: "cloud" }),
|
|
41
|
+
fn: {
|
|
42
|
+
top: {
|
|
43
|
+
active: () => {
|
|
44
|
+
let comp = useStore.get("Loader-top-" + Config.get().sessionUID + "-corner");
|
|
45
|
+
comp && comp.active();
|
|
46
|
+
},
|
|
47
|
+
stop: () => {
|
|
48
|
+
let comp = useStore.get("Loader-top-" + Config.get().sessionUID + "-corner");
|
|
49
|
+
comp && comp.stop();
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
corner: {
|
|
53
|
+
active: () => {
|
|
54
|
+
let comp = useStore.get("Loader-corner-" + Config.get().sessionUID + "-corner");
|
|
55
|
+
comp && comp.active();
|
|
56
|
+
},
|
|
57
|
+
stop: () => {
|
|
58
|
+
let comp = useStore.get("Loader-corner-" + Config.get().sessionUID + "-corner");
|
|
59
|
+
comp && comp.stop();
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
mini: {
|
|
63
|
+
active: (keyCode = "") => {
|
|
64
|
+
$$fromRoot("." + LoaderClasses("MiniLoader")).for((elm) => {
|
|
65
|
+
let { dataset: { componentId } = {} } = elm;
|
|
66
|
+
if (!componentId)
|
|
67
|
+
return;
|
|
68
|
+
let fn = useStore.get(componentId);
|
|
69
|
+
if (fn && fn.active)
|
|
70
|
+
fn.active(keyCode);
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
stop: (keyCode = "") => {
|
|
74
|
+
$$fromRoot("." + LoaderClasses("MiniLoader")).for((elm) => {
|
|
75
|
+
let { dataset: { componentId } = {} } = elm;
|
|
76
|
+
if (!componentId)
|
|
77
|
+
return;
|
|
78
|
+
let fn = useStore.get(componentId);
|
|
79
|
+
if (fn && fn.stop)
|
|
80
|
+
fn.stop(keyCode);
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
stopALL: () => {
|
|
84
|
+
$$fromRoot("." + LoaderClasses("MiniLoader")).for((elm) => {
|
|
85
|
+
let { dataset: { componentId } = {} } = elm;
|
|
86
|
+
if (!componentId)
|
|
87
|
+
return;
|
|
88
|
+
let fn = useStore.get(componentId);
|
|
89
|
+
if (fn && fn.stopForce)
|
|
90
|
+
fn.stopForce();
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
stopALL: () => {
|
|
95
|
+
Loader.fn.top.stop();
|
|
96
|
+
Loader.fn.corner.stop();
|
|
97
|
+
Loader.fn.mini.stopALL();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
export {
|
|
102
|
+
Loader,
|
|
103
|
+
Loader as default
|
|
104
|
+
};
|
package/dist/fn/Loader/corner.js
CHANGED
|
@@ -1 +1,85 @@
|
|
|
1
|
-
import"../../chunk-
|
|
1
|
+
import "../../chunk-JJ3PEWPN.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import {
|
|
4
|
+
Config,
|
|
5
|
+
useStore
|
|
6
|
+
} from "../../@utils/_";
|
|
7
|
+
import {
|
|
8
|
+
useState,
|
|
9
|
+
useEffect
|
|
10
|
+
} from "react";
|
|
11
|
+
import Box from "../../atoms/Box";
|
|
12
|
+
import Flex from "../../atoms/Flex";
|
|
13
|
+
import { LoaderClasses } from "../../@styles/componentClasses/_";
|
|
14
|
+
const Corner = () => {
|
|
15
|
+
let [val_active, set_active] = useState(false);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
useStore.set({
|
|
18
|
+
key: "Loader-corner-" + Config.get().sessionUID + "-corner",
|
|
19
|
+
value: {
|
|
20
|
+
active: () => {
|
|
21
|
+
set_active(true);
|
|
22
|
+
},
|
|
23
|
+
stop: () => {
|
|
24
|
+
set_active(false);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}, []);
|
|
29
|
+
return /* @__PURE__ */ jsxs(
|
|
30
|
+
Flex,
|
|
31
|
+
{
|
|
32
|
+
className: [
|
|
33
|
+
LoaderClasses("CornerLoader"),
|
|
34
|
+
LoaderClasses("Active_" + val_active)
|
|
35
|
+
].join(" "),
|
|
36
|
+
gap: "1/2",
|
|
37
|
+
padding: ["1/2", "3/4"],
|
|
38
|
+
borderRadius: "2/3",
|
|
39
|
+
backgroundColor: "dark",
|
|
40
|
+
position: "fixed",
|
|
41
|
+
boxShadow: "1.remark",
|
|
42
|
+
left: "50%",
|
|
43
|
+
top: 1,
|
|
44
|
+
opacity: "trans",
|
|
45
|
+
transition: "short",
|
|
46
|
+
isRounded: true,
|
|
47
|
+
freeCSS: {
|
|
48
|
+
pointerEvents: "none",
|
|
49
|
+
transform: "translateX(-50%)"
|
|
50
|
+
},
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsxs(
|
|
53
|
+
Flex,
|
|
54
|
+
{
|
|
55
|
+
className: LoaderClasses("Wrap"),
|
|
56
|
+
flexWrap: false,
|
|
57
|
+
verticalAlign: "center",
|
|
58
|
+
horizontalAlign: "center",
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ jsx(Box, { className: LoaderClasses("Ld4") }),
|
|
61
|
+
/* @__PURE__ */ jsx(Box, { className: LoaderClasses("Ld3") }),
|
|
62
|
+
/* @__PURE__ */ jsx(Box, { className: LoaderClasses("Ld2") }),
|
|
63
|
+
/* @__PURE__ */ jsx(Box, { className: LoaderClasses("Ld1") }),
|
|
64
|
+
/* @__PURE__ */ jsx(Box, { className: LoaderClasses("Ld2") }),
|
|
65
|
+
/* @__PURE__ */ jsx(Box, { className: LoaderClasses("Ld3") }),
|
|
66
|
+
/* @__PURE__ */ jsx(Box, { className: LoaderClasses("Ld4") })
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ jsx(
|
|
71
|
+
Box,
|
|
72
|
+
{
|
|
73
|
+
fontColor: "white",
|
|
74
|
+
fontSize: "0.xs",
|
|
75
|
+
isSemiBoldFont: true,
|
|
76
|
+
children: "Loading"
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
Corner
|
|
85
|
+
};
|