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.
- package/dist/@declaration/_.js +1 -1
- package/dist/@declaration/property.d.ts +2 -2
- package/dist/@styles/componentClasses/_.css +66 -65
- package/dist/@styles/componentClasses/_.js +39 -39
- package/dist/@styles/index.css +66 -65
- package/dist/@styles/index.js +39 -39
- package/dist/@styles/init.css +1 -1
- package/dist/@styles/style.css +96 -65
- package/dist/@styles/style.js +39 -39
- package/dist/@styles/var.css +1 -1
- package/dist/@utils/GenerateClassName.js +1 -470
- package/dist/@utils/LaunchReactApp.d.ts +1 -1
- package/dist/@utils/LaunchReactApp.js +1 -78
- package/dist/@utils/_.js +1 -12
- package/dist/@utils/collectForm.js +1 -96
- package/dist/@utils/color.js +1 -103
- package/dist/@utils/config.js +1 -101
- package/dist/@utils/fin.js +1 -39
- package/dist/@utils/getElement.js +1 -13
- package/dist/@utils/jsminEx.js +1 -172
- package/dist/@utils/pageTransit.js +1 -33
- package/dist/@utils/useRecycle.js +1 -44
- package/dist/@utils/useStore.js +1 -54
- package/dist/atoms/Box.js +1 -20
- package/dist/atoms/FAI.js +1 -148
- package/dist/atoms/Flex.js +1 -34
- package/dist/atoms/Grid.js +1 -17
- package/dist/atoms/Img.js +1 -65
- package/dist/atoms/Logo.js +51 -359
- package/dist/atoms/P.js +1 -20
- package/dist/atoms/Placeholder.js +1 -44
- package/dist/atoms/Span.js +1 -20
- package/dist/atoms/_.js +1 -9
- package/dist/fn/Button.js +1 -316
- package/dist/fn/Cropper.js +1 -1009
- package/dist/fn/Effect/Fade.js +1 -88
- package/dist/fn/Effect/Pudding.js +1 -22
- package/dist/fn/Effect/Ripple.js +3 -117
- package/dist/fn/Effect/_.js +1 -14
- package/dist/fn/Input/AutoHeightText.js +1 -112
- package/dist/fn/Input/Checker.js +1 -36
- package/dist/fn/Input/Chips/Selector.js +1 -472
- package/dist/fn/Input/Chips/_.js +1 -349
- package/dist/fn/Input/Contenteditable.js +1 -160
- package/dist/fn/Input/DigitCharacters.js +1 -275
- package/dist/fn/Input/Filer.js +1 -619
- package/dist/fn/Input/Hidden.js +1 -48
- package/dist/fn/Input/List.js +1 -450
- package/dist/fn/Input/Parts.js +1 -121
- package/dist/fn/Input/Plain.js +1 -12
- package/dist/fn/Input/RichSelect.js +1 -279
- package/dist/fn/Input/Search.js +1 -53
- package/dist/fn/Input/Segmented.js +1 -245
- package/dist/fn/Input/Select.js +1 -278
- package/dist/fn/Input/Slider.js +1 -538
- package/dist/fn/Input/Switch.js +1 -221
- package/dist/fn/Input/Text.js +1 -626
- package/dist/fn/Input/TextArea.js +1 -151
- package/dist/fn/Input/Time/Picker.js +1 -1457
- package/dist/fn/Input/Time/_.js +1 -867
- package/dist/fn/Input/_.js +1 -48
- package/dist/fn/Input/core.js +1 -626
- package/dist/fn/Layout/PageNotFound.js +1 -90
- package/dist/fn/Layout/PageRouter.js +1 -87
- package/dist/fn/Layout/PageViewController.js +1 -29
- package/dist/fn/Layout/Plate.js +1 -37
- package/dist/fn/Layout/RootViewController.js +1 -315
- package/dist/fn/Layout/SwipeView.js +1 -348
- package/dist/fn/Layout/TabBar.js +1 -72
- package/dist/fn/Layout/_.js +1 -22
- package/dist/fn/Loader/_.js +1 -104
- package/dist/fn/Loader/corner.js +1 -85
- package/dist/fn/Loader/mini.js +1 -125
- package/dist/fn/Loader/top.js +1 -73
- package/dist/fn/Sheet.d.ts +1 -0
- package/dist/fn/Sheet.js +1 -1101
- package/dist/fn/Snackbar.js +1 -216
- package/dist/fn/Table/Data.js +1 -974
- package/dist/fn/Table/Drag.js +1 -435
- package/dist/fn/Table/Normal.js +1 -136
- package/dist/fn/Table/Parts.js +1 -41
- package/dist/fn/Table/Wrapper.js +1 -60
- package/dist/fn/Table/_.js +1 -16
- package/dist/fn/Table/cellStyling.js +1 -51
- package/dist/fn/Tooltips.js +1 -58
- package/dist/fn/_.js +1 -10
- package/dist/index.js +1 -20
- package/dist/mols/Accordion.js +1 -152
- package/dist/mols/Column.js +1 -16
- package/dist/mols/LinkifyText.js +1 -42
- package/dist/mols/List.js +1 -42
- package/dist/mols/Row.js +1 -47
- package/dist/mols/Text.js +1 -67
- package/dist/mols/_.js +1 -6
- package/dist/temps/_.js +1 -1
- package/dist/temps/designBook.js +20 -3639
- package/package.json +1 -1
- package/dist/chunk-JJ3PEWPN.js +0 -60
package/dist/fn/Snackbar.js
CHANGED
|
@@ -1,216 +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 { 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
|
-
};
|
|
1
|
+
import{b as m,c,d as C}from"../chunk-VY3566IV.js";import{Fragment as O,jsx as o,jsxs as P}from"react/jsx-runtime";import{createElement as _}from"react";import{$$ as s,Config as S,useStore as p,$$fromRoot as w}from"../@utils/_";import{useState as f,useEffect as D}from"react";import x from"../atoms/Box";import y from"../atoms/Flex";import E from"../atoms/FAI";import R from"../mols/Row";import A from"./Button";import{SnackbarClasses as k}from"../@styles/componentClasses/_";const u={add:function(i){return p.get("Snackbar-"+S.get().sessionUID).add(i),this},remove:function(i){return p.get("Snackbar-"+S.get().sessionUID).remove(i),this},Wrapper:()=>o(B.Wrapper,{})},B={Cell:i=>{let b=i,{snackID:l,secondsToClose:n=10,componentID:g=s.uuid.gen(),children:d,customChildren:e}=b,r=C(b,["snackID","secondsToClose","componentID","children","customChildren"]),[t]=f(g),[a,h]=f(!1);D(()=>{let v=w('[data-component-id="'+t+'"]');setTimeout(()=>{v.addClass(k("FadeIn"))},10),p.set({key:"Snackbar-"+l,value:{remove:()=>{v.addClass(k("FadeOut"))}}})},[]),D(()=>{s.interval.clear("Snackbar-"+t),a||setTimeout(()=>{s.interval.standBy("Snackbar-"+t,n*1e3,()=>{a||u.remove(l)})},100)},[a]);let I=o(O,{});return e?I=o(e,{close:()=>{u.remove(l)}}):I=P(R.Separate,{verticalAlign:"top",children:[o(x,{padding:["1/4",0],flexSizing:0,children:s.is.function(d)?o(d,{}):d}),o(A.Button.Clear.R,{color:"layer",backgroundColor:"lcOpLow",fontColor:"white",ssSphere:2.5,onClick:()=>{u.remove(l)},children:o(E.Times,{})})]}),o(x,c(m({className:k("Cell"),opacity:"trans",width:1,padding:"2/3",marginBottom:1,borderRadius:"1.tone.primary",fontColor:"white",boxShadow:"1.remark",backgroundColor:"dark",transition:"middle",componentID:t,onMouseOver:()=>{h(!0)},onMouseOut:()=>{h(!1)}},r),{children:I}))},Wrapper:()=>{let[i,l]=f(s.uuid.gen()),[n,g]=f([]);p.set({key:"Snackbar-"+S.get().sessionUID,value:{add:e=>{e.snackID=e.snackID||s.uuid.gen();let r=n.findIndex(t=>t.snackID==e.snackID);if(r==-1)n.unshift(c(m({},e),{snackID:e.snackID}));else{let t=[...n];t[r]=c(m({},e),{snackID:e.snackID}),n=t}l(s.uuid.gen())},remove:e=>{let r=p.get("Snackbar-"+e);r&&r.remove&&(r.remove(),setTimeout(()=>{let t=n.findIndex(a=>a.snackID==e);if(t!=-1){let a=[...n];a.splice(t,1),g(a)}},210))}}});let d=n.map(e=>_(B.Cell,c(m({},e),{key:e.snackID})));return o(y,{className:["AMOTIFY_be",k("Wrapper")].join(" "),position:"fixed",right:0,bottom:0,paddingLeft:0,paddingRight:1,paddingBottom:"safeAreaBottom",verticalAlign:"bottom",children:d,overflow:"auto",UnderBreakPointStyles:{left:0,paddingLeft:1,width:"auto"}})}};export{u as Snackbar,u as default};
|