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
package/dist/fn/Snackbar.js
CHANGED
|
@@ -1 +1,216 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "../chunk-JJ3PEWPN.js";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { createElement } from "react";
|
|
8
|
+
import {
|
|
9
|
+
$$,
|
|
10
|
+
Config,
|
|
11
|
+
useStore,
|
|
12
|
+
$$fromRoot
|
|
13
|
+
} from "../@utils/_";
|
|
14
|
+
import {
|
|
15
|
+
useState,
|
|
16
|
+
useEffect
|
|
17
|
+
} from "react";
|
|
18
|
+
import Box from "../atoms/Box";
|
|
19
|
+
import Flex from "../atoms/Flex";
|
|
20
|
+
import FAI from "../atoms/FAI";
|
|
21
|
+
import Row from "../mols/Row";
|
|
22
|
+
import Button from "./Button";
|
|
23
|
+
import { SnackbarClasses } from "../@styles/componentClasses/_";
|
|
24
|
+
const Snackbar = {
|
|
25
|
+
add: function(params) {
|
|
26
|
+
useStore.get("Snackbar-" + Config.get().sessionUID).add(params);
|
|
27
|
+
return this;
|
|
28
|
+
},
|
|
29
|
+
remove: function(val_componentID) {
|
|
30
|
+
useStore.get("Snackbar-" + Config.get().sessionUID).remove(val_componentID);
|
|
31
|
+
return this;
|
|
32
|
+
},
|
|
33
|
+
Wrapper: () => {
|
|
34
|
+
return /* @__PURE__ */ jsx(Comps.Wrapper, {});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const Comps = {
|
|
38
|
+
Cell: (props) => {
|
|
39
|
+
let _a = props, {
|
|
40
|
+
snackID,
|
|
41
|
+
secondsToClose = 10,
|
|
42
|
+
componentID = $$.uuid.gen(),
|
|
43
|
+
children: Children,
|
|
44
|
+
customChildren: CustomChildren
|
|
45
|
+
} = _a, others = __objRest(_a, [
|
|
46
|
+
"snackID",
|
|
47
|
+
"secondsToClose",
|
|
48
|
+
"componentID",
|
|
49
|
+
"children",
|
|
50
|
+
"customChildren"
|
|
51
|
+
]);
|
|
52
|
+
let [val_componentID] = useState(componentID);
|
|
53
|
+
let [val_mouseOn, set_mouseOn] = useState(false);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
let Wrapper = $$fromRoot('[data-component-id="' + val_componentID + '"]');
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
Wrapper.addClass(SnackbarClasses("FadeIn"));
|
|
58
|
+
}, 10);
|
|
59
|
+
useStore.set({
|
|
60
|
+
key: "Snackbar-" + snackID,
|
|
61
|
+
value: {
|
|
62
|
+
remove: () => {
|
|
63
|
+
Wrapper.addClass(SnackbarClasses("FadeOut"));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}, []);
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
$$.interval.clear("Snackbar-" + val_componentID);
|
|
70
|
+
if (!val_mouseOn) {
|
|
71
|
+
setTimeout(() => {
|
|
72
|
+
$$.interval.standBy(
|
|
73
|
+
"Snackbar-" + val_componentID,
|
|
74
|
+
secondsToClose * 1e3,
|
|
75
|
+
() => {
|
|
76
|
+
if (!val_mouseOn)
|
|
77
|
+
Snackbar.remove(snackID);
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}, 100);
|
|
81
|
+
}
|
|
82
|
+
}, [val_mouseOn]);
|
|
83
|
+
let Content = /* @__PURE__ */ jsx(Fragment, {});
|
|
84
|
+
if (CustomChildren) {
|
|
85
|
+
Content = /* @__PURE__ */ jsx(
|
|
86
|
+
CustomChildren,
|
|
87
|
+
{
|
|
88
|
+
close: () => {
|
|
89
|
+
Snackbar.remove(snackID);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
} else {
|
|
94
|
+
Content = /* @__PURE__ */ jsxs(
|
|
95
|
+
Row.Separate,
|
|
96
|
+
{
|
|
97
|
+
verticalAlign: "top",
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ jsx(
|
|
100
|
+
Box,
|
|
101
|
+
{
|
|
102
|
+
padding: ["1/4", 0],
|
|
103
|
+
flexSizing: 0,
|
|
104
|
+
children: $$.is.function(Children) ? /* @__PURE__ */ jsx(Children, {}) : Children
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ jsx(
|
|
108
|
+
Button.Button.Clear.R,
|
|
109
|
+
{
|
|
110
|
+
color: "layer",
|
|
111
|
+
backgroundColor: "lcOpLow",
|
|
112
|
+
fontColor: "white",
|
|
113
|
+
ssSphere: 2.5,
|
|
114
|
+
onClick: () => {
|
|
115
|
+
Snackbar.remove(snackID);
|
|
116
|
+
},
|
|
117
|
+
children: /* @__PURE__ */ jsx(FAI.Times, {})
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
return /* @__PURE__ */ jsx(
|
|
125
|
+
Box,
|
|
126
|
+
__spreadProps(__spreadValues({
|
|
127
|
+
className: SnackbarClasses("Cell"),
|
|
128
|
+
opacity: "trans",
|
|
129
|
+
width: 1,
|
|
130
|
+
padding: "2/3",
|
|
131
|
+
marginBottom: 1,
|
|
132
|
+
borderRadius: "1.tone.primary",
|
|
133
|
+
fontColor: "white",
|
|
134
|
+
boxShadow: "1.remark",
|
|
135
|
+
backgroundColor: "dark",
|
|
136
|
+
transition: "middle",
|
|
137
|
+
componentID: val_componentID,
|
|
138
|
+
onMouseOver: () => {
|
|
139
|
+
set_mouseOn(true);
|
|
140
|
+
},
|
|
141
|
+
onMouseOut: () => {
|
|
142
|
+
set_mouseOn(false);
|
|
143
|
+
}
|
|
144
|
+
}, others), {
|
|
145
|
+
children: Content
|
|
146
|
+
})
|
|
147
|
+
);
|
|
148
|
+
},
|
|
149
|
+
Wrapper: () => {
|
|
150
|
+
let [val_refresh, set_refresh] = useState($$.uuid.gen());
|
|
151
|
+
let [val_elements, set_elements] = useState([]);
|
|
152
|
+
useStore.set({
|
|
153
|
+
key: "Snackbar-" + Config.get().sessionUID,
|
|
154
|
+
value: {
|
|
155
|
+
add: (params) => {
|
|
156
|
+
params.snackID = params.snackID || $$.uuid.gen();
|
|
157
|
+
let findIndex = val_elements.findIndex((el) => el.snackID == params.snackID);
|
|
158
|
+
if (findIndex == -1) {
|
|
159
|
+
val_elements.unshift(__spreadProps(__spreadValues({}, params), {
|
|
160
|
+
snackID: params.snackID
|
|
161
|
+
}));
|
|
162
|
+
} else {
|
|
163
|
+
let newList = [...val_elements];
|
|
164
|
+
newList[findIndex] = __spreadProps(__spreadValues({}, params), {
|
|
165
|
+
snackID: params.snackID
|
|
166
|
+
});
|
|
167
|
+
val_elements = newList;
|
|
168
|
+
}
|
|
169
|
+
set_refresh($$.uuid.gen());
|
|
170
|
+
},
|
|
171
|
+
remove: (snackID) => {
|
|
172
|
+
let component = useStore.get("Snackbar-" + snackID);
|
|
173
|
+
if (component && component.remove) {
|
|
174
|
+
component.remove();
|
|
175
|
+
setTimeout(() => {
|
|
176
|
+
let findIndex = val_elements.findIndex((cell) => cell.snackID == snackID);
|
|
177
|
+
if (findIndex != -1) {
|
|
178
|
+
let newList = [...val_elements];
|
|
179
|
+
newList.splice(findIndex, 1);
|
|
180
|
+
set_elements(newList);
|
|
181
|
+
}
|
|
182
|
+
}, 210);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
let Snackbars = val_elements.map((el) => /* @__PURE__ */ createElement(Comps.Cell, __spreadProps(__spreadValues({}, el), { key: el.snackID })));
|
|
188
|
+
return /* @__PURE__ */ jsx(
|
|
189
|
+
Flex,
|
|
190
|
+
{
|
|
191
|
+
className: [
|
|
192
|
+
"AMOTIFY_be",
|
|
193
|
+
SnackbarClasses("Wrapper")
|
|
194
|
+
].join(" "),
|
|
195
|
+
position: "fixed",
|
|
196
|
+
right: 0,
|
|
197
|
+
bottom: 0,
|
|
198
|
+
paddingLeft: 0,
|
|
199
|
+
paddingRight: 1,
|
|
200
|
+
paddingBottom: "safeAreaBottom",
|
|
201
|
+
verticalAlign: "bottom",
|
|
202
|
+
children: Snackbars,
|
|
203
|
+
overflow: "auto",
|
|
204
|
+
UnderBreakPointStyles: {
|
|
205
|
+
left: 0,
|
|
206
|
+
paddingLeft: 1,
|
|
207
|
+
width: "auto"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
export {
|
|
214
|
+
Snackbar,
|
|
215
|
+
Snackbar as default
|
|
216
|
+
};
|