amotify 0.0.4 → 0.0.5
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/package.json +1 -1
- package/public/amotify.js +1 -0
- package/public/amotify.min.css +24 -0
- package/dist/src/@jsminAmotifyExtension/_.d.ts +0 -4
- package/dist/src/@jsminAmotifyExtension/fetch.d.ts +0 -9
- package/dist/src/@jsminAmotifyExtension/formCollect.d.ts +0 -1
- package/dist/src/@jsminAmotifyExtension/spreadSheet.d.ts +0 -4
- package/dist/src/@jsminAmotifyExtension/variables.d.ts +0 -0
- package/dist/src/@types/_.d.ts +0 -6
- package/dist/src/@types/amot.d.ts +0 -260
- package/dist/src/@types/fn.d.ts +0 -1040
- package/dist/src/@types/index.d.ts +0 -62
- package/dist/src/@types/jsminAmotifyExtension.d.ts +0 -134
- package/dist/src/@types/module.d.ts +0 -2
- package/dist/src/@types/state.d.ts +0 -145
- package/dist/src/Atoms/@export.d.ts +0 -4
- package/dist/src/Atoms/FAIcon/parts.d.ts +0 -2
- package/dist/src/Atoms/Logo/parts.d.ts +0 -1
- package/dist/src/Atoms/Various/parts.d.ts +0 -9
- package/dist/src/Functions/@export.d.ts +0 -12
- package/dist/src/Functions/Button/_.d.ts +0 -1
- package/dist/src/Functions/Cropper/parts.d.ts +0 -1
- package/dist/src/Functions/Effects/Fade.d.ts +0 -1
- package/dist/src/Functions/Effects/Ripple.d.ts +0 -1
- package/dist/src/Functions/Effects/_.d.ts +0 -3
- package/dist/src/Functions/Input/Chips/Selector.d.ts +0 -1
- package/dist/src/Functions/Input/Chips/_.d.ts +0 -2
- package/dist/src/Functions/Input/DigitCharacters.d.ts +0 -1
- package/dist/src/Functions/Input/File/_.d.ts +0 -2
- package/dist/src/Functions/Input/Hidden.d.ts +0 -1
- package/dist/src/Functions/Input/List/_.d.ts +0 -1
- package/dist/src/Functions/Input/Segmented/_.d.ts +0 -1
- package/dist/src/Functions/Input/Select/_.d.ts +0 -1
- package/dist/src/Functions/Input/Slider/_.d.ts +0 -1
- package/dist/src/Functions/Input/Switch/_.d.ts +0 -1
- package/dist/src/Functions/Input/Text.d.ts +0 -5
- package/dist/src/Functions/Input/TextArea.d.ts +0 -1
- package/dist/src/Functions/Input/Time/Picker.d.ts +0 -1
- package/dist/src/Functions/Input/Time/_.d.ts +0 -2
- package/dist/src/Functions/Input/_.d.ts +0 -5
- package/dist/src/Functions/Input/core.d.ts +0 -34
- package/dist/src/Functions/Inputs/_.d.ts +0 -3
- package/dist/src/Functions/Inputs/text.d.ts +0 -12
- package/dist/src/Functions/Layout/PageNotFound.d.ts +0 -1
- package/dist/src/Functions/Layout/PageRouter.d.ts +0 -2
- package/dist/src/Functions/Layout/PageViewController/parts.d.ts +0 -1
- package/dist/src/Functions/Layout/Plate.d.ts +0 -1
- package/dist/src/Functions/Layout/RootViewController/parts.d.ts +0 -1
- package/dist/src/Functions/Layout/SwipeView/parts.d.ts +0 -2
- package/dist/src/Functions/Layout/TabBar.d.ts +0 -1
- package/dist/src/Functions/Layout/_.d.ts +0 -2
- package/dist/src/Functions/Loader/corner.d.ts +0 -1
- package/dist/src/Functions/Loader/mini.d.ts +0 -33
- package/dist/src/Functions/Loader/parts.d.ts +0 -3
- package/dist/src/Functions/Loader/top.d.ts +0 -1
- package/dist/src/Functions/Sheet/parts.d.ts +0 -2
- package/dist/src/Functions/SnackBar/parts.d.ts +0 -2
- package/dist/src/Functions/Table/Data/parts.d.ts +0 -3
- package/dist/src/Functions/Table/Drag/parts.d.ts +0 -1
- package/dist/src/Functions/Table/Normal/parts.d.ts +0 -1
- package/dist/src/Functions/Table/_.d.ts +0 -9
- package/dist/src/Functions/Tooltips/parts.d.ts +0 -2
- package/dist/src/Global/@export.d.ts +0 -12
- package/dist/src/Global/LaunchReactApplication.d.ts +0 -1
- package/dist/src/Global/styleConverter.d.ts +0 -2
- package/dist/src/Molecules/@export.d.ts +0 -21
- package/dist/src/Molecules/Accordion/parts.d.ts +0 -2
- package/dist/src/Molecules/LinkifyText/parts.d.ts +0 -1
- package/dist/src/Molecules/List.d.ts +0 -1
- package/dist/src/Organisms/@export.d.ts +0 -2
- package/dist/src/Organisms/DisplayStyleInput/_.d.ts +0 -1
- package/dist/src/Organisms/DisplayStyleInput/darkmode.d.ts +0 -1
- package/dist/src/Organisms/DisplayStyleInput/themeColor.d.ts +0 -27
- package/dist/src/Templates/@export.d.ts +0 -2
- package/dist/src/Templates/PlayGround/parts.d.ts +0 -1
- package/dist/src/config.d.ts +0 -16
- package/dist/src/launch.d.ts +0 -9
- package/dist/src/preload.d.ts +0 -1
- package/src/@jsminAmotifyExtension/_.tsx +0 -4
- package/src/@jsminAmotifyExtension/fetch.tsx +0 -107
- package/src/@jsminAmotifyExtension/formCollect.tsx +0 -89
- package/src/@jsminAmotifyExtension/spreadSheet.tsx +0 -159
- package/src/@jsminAmotifyExtension/variables.tsx +0 -130
- package/src/@styles/@app.scss +0 -4
- package/src/@styles/@variables/customProps.scss +0 -109
- package/src/@styles/@variables/styleSet.scss +0 -38
- package/src/@styles/@variables/themeColor.scss +0 -71
- package/src/@styles/@variables/var.scss +0 -171
- package/src/@styles/UniStyling.scss +0 -996
- package/src/@styles/init.scss +0 -154
- package/src/@types/_.tsx +0 -6
- package/src/@types/amot.tsx +0 -323
- package/src/@types/fn.tsx +0 -1210
- package/src/@types/index.tsx +0 -74
- package/src/@types/jsminAmotifyExtension.tsx +0 -143
- package/src/@types/module.tsx +0 -2
- package/src/@types/state.tsx +0 -199
- package/src/Atoms/@export.tsx +0 -32
- package/src/Atoms/FAIcon/parts.tsx +0 -117
- package/src/Atoms/FAIcon/style.module.scss +0 -9
- package/src/Atoms/Logo/parts.tsx +0 -335
- package/src/Atoms/Logo/style.module.scss +0 -96
- package/src/Atoms/Various/parts.tsx +0 -157
- package/src/Atoms/Various/style.module.scss +0 -40
- package/src/Functions/@export.tsx +0 -29
- package/src/Functions/Button/_.tsx +0 -305
- package/src/Functions/Button/style.module.scss +0 -183
- package/src/Functions/Cropper/parts.tsx +0 -1061
- package/src/Functions/Cropper/style.module.scss +0 -62
- package/src/Functions/Effects/Fade.tsx +0 -81
- package/src/Functions/Effects/Ripple.tsx +0 -141
- package/src/Functions/Effects/_.tsx +0 -33
- package/src/Functions/Effects/style.module.scss +0 -83
- package/src/Functions/Input/Chips/Selector.tsx +0 -451
- package/src/Functions/Input/Chips/_.tsx +0 -286
- package/src/Functions/Input/Chips/style.module.scss +0 -6
- package/src/Functions/Input/DigitCharacters.tsx +0 -241
- package/src/Functions/Input/File/_.tsx +0 -596
- package/src/Functions/Input/File/style.module.scss +0 -34
- package/src/Functions/Input/Hidden.tsx +0 -18
- package/src/Functions/Input/List/_.tsx +0 -383
- package/src/Functions/Input/List/style.module.scss +0 -84
- package/src/Functions/Input/Segmented/_.tsx +0 -238
- package/src/Functions/Input/Segmented/style.module.scss +0 -81
- package/src/Functions/Input/Select/_.tsx +0 -225
- package/src/Functions/Input/Select/style.module.scss +0 -10
- package/src/Functions/Input/Slider/_.tsx +0 -519
- package/src/Functions/Input/Slider/style.module.scss +0 -67
- package/src/Functions/Input/Switch/_.tsx +0 -177
- package/src/Functions/Input/Switch/style.module.scss +0 -18
- package/src/Functions/Input/Text.tsx +0 -437
- package/src/Functions/Input/TextArea.tsx +0 -115
- package/src/Functions/Input/Time/Picker.tsx +0 -950
- package/src/Functions/Input/Time/_.tsx +0 -736
- package/src/Functions/Input/Time/style.module.scss +0 -72
- package/src/Functions/Input/_.tsx +0 -793
- package/src/Functions/Input/core.tsx +0 -461
- package/src/Functions/Input/style.module.scss +0 -43
- package/src/Functions/Inputs/_.tsx +0 -5
- package/src/Functions/Inputs/style.module.scss +0 -15
- package/src/Functions/Inputs/text.tsx +0 -67
- package/src/Functions/Inputs/types.d.ts +0 -1
- package/src/Functions/Layout/PageNotFound.tsx +0 -81
- package/src/Functions/Layout/PageRouter.tsx +0 -107
- package/src/Functions/Layout/PageViewController/parts.tsx +0 -32
- package/src/Functions/Layout/Plate.tsx +0 -30
- package/src/Functions/Layout/RootViewController/parts.tsx +0 -290
- package/src/Functions/Layout/RootViewController/style.module.scss +0 -24
- package/src/Functions/Layout/SwipeView/parts.tsx +0 -380
- package/src/Functions/Layout/SwipeView/style.module.scss +0 -19
- package/src/Functions/Layout/TabBar.tsx +0 -64
- package/src/Functions/Layout/_.tsx +0 -20
- package/src/Functions/Loader/corner.tsx +0 -78
- package/src/Functions/Loader/mini.tsx +0 -117
- package/src/Functions/Loader/parts.tsx +0 -105
- package/src/Functions/Loader/style.module.scss +0 -222
- package/src/Functions/Loader/top.tsx +0 -90
- package/src/Functions/Sheet/parts.tsx +0 -972
- package/src/Functions/Sheet/style.module.scss +0 -235
- package/src/Functions/SnackBar/parts.tsx +0 -215
- package/src/Functions/SnackBar/style.module.scss +0 -25
- package/src/Functions/Table/Data/parts.tsx +0 -955
- package/src/Functions/Table/Drag/parts.tsx +0 -448
- package/src/Functions/Table/Normal/parts.tsx +0 -123
- package/src/Functions/Table/_.tsx +0 -170
- package/src/Functions/Table/style.module.scss +0 -92
- package/src/Functions/Tooltips/parts.tsx +0 -52
- package/src/Global/@export.tsx +0 -138
- package/src/Global/LaunchReactApplication.tsx +0 -30
- package/src/Global/exe.tsx +0 -0
- package/src/Global/styleConverter.tsx +0 -435
- package/src/Molecules/@export.tsx +0 -95
- package/src/Molecules/Accordion/parts.tsx +0 -146
- package/src/Molecules/Accordion/style.module.scss +0 -13
- package/src/Molecules/LinkifyText/parts.tsx +0 -54
- package/src/Molecules/List.tsx +0 -30
- package/src/Organisms/@export.tsx +0 -5
- package/src/Organisms/DisplayStyleInput/_.tsx +0 -18
- package/src/Organisms/DisplayStyleInput/darkmode.tsx +0 -112
- package/src/Organisms/DisplayStyleInput/themeColor.tsx +0 -210
- package/src/Templates/@export.tsx +0 -7
- package/src/Templates/PlayGround/parts.tsx +0 -115
- package/src/Templates/PlayGround/style.module.scss +0 -38
- package/src/config.tsx +0 -132
- package/src/launch.tsx +0 -100
- package/src/preload.tsx +0 -49
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
@use '@uniVar' as *;
|
|
2
|
-
//SheetBase
|
|
3
|
-
:global {
|
|
4
|
-
#SHEET {
|
|
5
|
-
// position: absolute;
|
|
6
|
-
position: sticky;
|
|
7
|
-
top: 0;
|
|
8
|
-
left: 0;
|
|
9
|
-
right: 0;
|
|
10
|
-
height: 0;
|
|
11
|
-
pointer-events: none;
|
|
12
|
-
z-index: 6;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
html {
|
|
16
|
-
&.FixHeight {
|
|
17
|
-
:global {
|
|
18
|
-
#ROOT {
|
|
19
|
-
overflow: hidden !important;
|
|
20
|
-
min-height: 0 !important;
|
|
21
|
-
height: calc($viewHeight);
|
|
22
|
-
width: calc(100vw);
|
|
23
|
-
transition: $animation-time-long;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
&.FloatMainSheet {
|
|
28
|
-
@media (max-width:$breakPoint) {
|
|
29
|
-
&.Type_ {
|
|
30
|
-
&bottom {
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
:global {
|
|
36
|
-
#ROOT {
|
|
37
|
-
opacity: .8 !important;
|
|
38
|
-
pointer-events: none;
|
|
39
|
-
transform-origin: center center;
|
|
40
|
-
transform: scale(.96);
|
|
41
|
-
border-radius: calc(calc(2vw + 2vh) / 2);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
//Sheet
|
|
47
|
-
.Wrap {
|
|
48
|
-
pointer-events: none !important;
|
|
49
|
-
.TapSensor {
|
|
50
|
-
position: sticky;
|
|
51
|
-
top: 0;
|
|
52
|
-
height: 0;
|
|
53
|
-
user-select: none;
|
|
54
|
-
-webkit-user-select: none;
|
|
55
|
-
-webkit-touch-callout: none;
|
|
56
|
-
flex: none;
|
|
57
|
-
.TapContent {
|
|
58
|
-
height: $viewHeight;
|
|
59
|
-
width: 100vw;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
&.Hide {
|
|
63
|
-
display: none !important;
|
|
64
|
-
}
|
|
65
|
-
&.Open {
|
|
66
|
-
&.isNewSheet_ {
|
|
67
|
-
&true {
|
|
68
|
-
.Content {
|
|
69
|
-
pointer-events: all !important;
|
|
70
|
-
background-color: rgba(var(--color-dark-rgb), .25);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
&false {
|
|
74
|
-
.BB {
|
|
75
|
-
pointer-events: all !important;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
&.Tcate_ {
|
|
81
|
-
&normal {
|
|
82
|
-
.TapSensor:active + .BB {
|
|
83
|
-
transform: scale(1.015);
|
|
84
|
-
transition: $animation-time-short;
|
|
85
|
-
.BaseBody {
|
|
86
|
-
transition: $animation-time-short;
|
|
87
|
-
box-shadow: 0 0 0 transparent inset, $shadow4;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
.BB {
|
|
91
|
-
transform: scale(.75);
|
|
92
|
-
padding: $unit1;
|
|
93
|
-
pointer-events: none !important;
|
|
94
|
-
> * {
|
|
95
|
-
pointer-events: all;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
@media (max-width:$breakPoint ) {
|
|
99
|
-
.BB {
|
|
100
|
-
width: 100vw;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
&.Open .BB {
|
|
104
|
-
transform: scale(1);
|
|
105
|
-
opacity: 1;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
&drawer {
|
|
109
|
-
$drawer: left, right;
|
|
110
|
-
@each $type in $drawer {
|
|
111
|
-
&.Tpos_#{ $type } {
|
|
112
|
-
.Content {
|
|
113
|
-
overflow: hidden auto;
|
|
114
|
-
}
|
|
115
|
-
.TapSensor:active + .BB {
|
|
116
|
-
transition: $animation-time-short;
|
|
117
|
-
#{ $type }: calc(-1 * $unit2 );
|
|
118
|
-
}
|
|
119
|
-
.BB {
|
|
120
|
-
max-width: 100vw;
|
|
121
|
-
#{ $type }: -10%;
|
|
122
|
-
@media (max-width : $breakPoint ) {
|
|
123
|
-
min-width: 25rem !important;
|
|
124
|
-
.Footer {
|
|
125
|
-
padding-bottom: $safe-area-top;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
@media (max-width : $breakPoint ) {
|
|
129
|
-
min-width: 0 !important;
|
|
130
|
-
max-width: 85vw !important;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
&.Open .BB {
|
|
134
|
-
#{ $type }: 0;
|
|
135
|
-
opacity: 1;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
&.Tpos_bottom {
|
|
140
|
-
.TapSensor:active + .BB {
|
|
141
|
-
padding-top: 2vh !important;
|
|
142
|
-
transition: $animation-time-short !important;
|
|
143
|
-
}
|
|
144
|
-
.BB {
|
|
145
|
-
padding-top: 10vh;
|
|
146
|
-
.DragBar {
|
|
147
|
-
position: relative;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
&.Open {
|
|
151
|
-
.BB {
|
|
152
|
-
padding-top: 0;
|
|
153
|
-
opacity: 1 !important;
|
|
154
|
-
transition: $animation-time-long;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
&custom {
|
|
160
|
-
.TapSensor:active + .BB {
|
|
161
|
-
transform: scale(1.015);
|
|
162
|
-
transition: $animation-time-short;
|
|
163
|
-
box-shadow: 0 0 0 transparent inset, $shadow4;
|
|
164
|
-
}
|
|
165
|
-
.BB {
|
|
166
|
-
transform: scale(.95);
|
|
167
|
-
&.CustomSheet {
|
|
168
|
-
position: relative;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
.GPT {
|
|
172
|
-
&.Col_1, &.Col_4 {
|
|
173
|
-
&.Row_1, &.Row_4 {
|
|
174
|
-
transform-origin: bottom right;
|
|
175
|
-
}
|
|
176
|
-
&.Row_2, &.Row_5 {
|
|
177
|
-
transform-origin: top right;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
&.Col_2, &.Col_5 {
|
|
181
|
-
&.Row_1, &.Row_4 {
|
|
182
|
-
transform-origin: bottom left;
|
|
183
|
-
}
|
|
184
|
-
&.Row_2, &.Row_5 {
|
|
185
|
-
transform-origin: top left;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
&_ {
|
|
189
|
-
&3, &18 {
|
|
190
|
-
transform-origin: bottom;
|
|
191
|
-
}
|
|
192
|
-
&8, &23 {
|
|
193
|
-
transform-origin: top;
|
|
194
|
-
}
|
|
195
|
-
&11, &14 {
|
|
196
|
-
transform-origin: right;
|
|
197
|
-
}
|
|
198
|
-
&12, &15 {
|
|
199
|
-
transform-origin: left;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
&.Col_ {
|
|
203
|
-
&1, &4 {
|
|
204
|
-
right: 0;
|
|
205
|
-
justify-content: flex-end;
|
|
206
|
-
}
|
|
207
|
-
&2, &5 {
|
|
208
|
-
left: 0;
|
|
209
|
-
}
|
|
210
|
-
&3 {
|
|
211
|
-
align-items: center;
|
|
212
|
-
justify-content: center;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
&.Row_ {
|
|
216
|
-
&1, &4 {
|
|
217
|
-
bottom: 0;
|
|
218
|
-
}
|
|
219
|
-
&2, &5 {
|
|
220
|
-
top: 0;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
// @media (max-width:$breakPoint ) {
|
|
225
|
-
// .BB {
|
|
226
|
-
// width: 100vw;
|
|
227
|
-
// }
|
|
228
|
-
// }
|
|
229
|
-
&.Open .BB {
|
|
230
|
-
transform: scale(1);
|
|
231
|
-
opacity: 1;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
LaunchReactApplication,
|
|
3
|
-
useStore
|
|
4
|
-
} from '@global';
|
|
5
|
-
import {
|
|
6
|
-
Box,
|
|
7
|
-
Flex,
|
|
8
|
-
FAIcon
|
|
9
|
-
} from '@atoms';
|
|
10
|
-
import {
|
|
11
|
-
Row,
|
|
12
|
-
Column
|
|
13
|
-
} from '@mols';
|
|
14
|
-
import {
|
|
15
|
-
Buttons
|
|
16
|
-
} from '@functions';
|
|
17
|
-
const {
|
|
18
|
-
useEffect,
|
|
19
|
-
useState,
|
|
20
|
-
} = React;
|
|
21
|
-
|
|
22
|
-
import style from './style.module.scss';
|
|
23
|
-
|
|
24
|
-
const SnackBar: amotify.fn.SnackBar.Methods = {
|
|
25
|
-
__memoryID: $.uuidGen(),
|
|
26
|
-
add: function ( params ) {
|
|
27
|
-
useStore.get( 'SnackBar',this.__memoryID ).add( params );
|
|
28
|
-
return this;
|
|
29
|
-
},
|
|
30
|
-
remove: function ( val_componentID ) {
|
|
31
|
-
useStore.get( 'SnackBar',this.__memoryID ).remove( val_componentID );
|
|
32
|
-
return this;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
type ElementParams = amotify.fn.SnackBar.AddParams & {
|
|
38
|
-
snackID: string
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const Cell: FNC<ElementParams> = ( props ) => {
|
|
42
|
-
let {
|
|
43
|
-
snackID,
|
|
44
|
-
secondsToClose = 10,
|
|
45
|
-
componentID = $.uuidGen(),
|
|
46
|
-
children: Children,
|
|
47
|
-
customChildren: CustomChildren,
|
|
48
|
-
...others
|
|
49
|
-
} = props;
|
|
50
|
-
|
|
51
|
-
let [ val_componentID ] = useState( componentID );
|
|
52
|
-
let [ val_mouseOn,set_mouseOn ] = useState( false );
|
|
53
|
-
|
|
54
|
-
useEffect( () => {
|
|
55
|
-
let Query = '[data-component-id="' + val_componentID + '"]';
|
|
56
|
-
setTimeout( () => {
|
|
57
|
-
$( Query ).addClass( style.FadeIn );
|
|
58
|
-
},10 );
|
|
59
|
-
|
|
60
|
-
useStore.set( {
|
|
61
|
-
key: 'SnackBar-' + snackID,
|
|
62
|
-
value: {
|
|
63
|
-
remove: () => {
|
|
64
|
-
$( Query ).addClass( style.FadeOut );
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
} );
|
|
68
|
-
},[] );
|
|
69
|
-
|
|
70
|
-
useEffect( () => {
|
|
71
|
-
$.interval.clear( 'SnackBar-' + val_componentID );
|
|
72
|
-
if ( !val_mouseOn ) {
|
|
73
|
-
setTimeout( () => {
|
|
74
|
-
$.interval.standBy(
|
|
75
|
-
'SnackBar-' + val_componentID,
|
|
76
|
-
secondsToClose * 1000,
|
|
77
|
-
() => {
|
|
78
|
-
if ( !val_mouseOn ) SnackBar.remove( snackID );
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
},100 );
|
|
82
|
-
}
|
|
83
|
-
},[ val_mouseOn ] );
|
|
84
|
-
|
|
85
|
-
let Content: ReactElement = <></>;
|
|
86
|
-
if ( CustomChildren ) {
|
|
87
|
-
Content = <CustomChildren
|
|
88
|
-
close={ () => {
|
|
89
|
-
SnackBar.remove( snackID );
|
|
90
|
-
} }
|
|
91
|
-
/>;
|
|
92
|
-
} else {
|
|
93
|
-
Content = <Row.Separate
|
|
94
|
-
verticalAlign='top'
|
|
95
|
-
>
|
|
96
|
-
<Box
|
|
97
|
-
padding={ [ '1/4',0 ] }
|
|
98
|
-
flexSizing={ 0 }
|
|
99
|
-
>
|
|
100
|
-
{ $.is.function( Children ) ? <Children /> : Children }
|
|
101
|
-
</Box>
|
|
102
|
-
<Buttons.Button.Clear.R
|
|
103
|
-
color='layer'
|
|
104
|
-
backgroundColor='lcOpLow'
|
|
105
|
-
ssSphere={ 2.5 }
|
|
106
|
-
onClick={ () => {
|
|
107
|
-
SnackBar.remove( snackID );
|
|
108
|
-
} }
|
|
109
|
-
>
|
|
110
|
-
<FAIcon.Times />
|
|
111
|
-
</Buttons.Button.Clear.R>
|
|
112
|
-
</Row.Separate>
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return <Box
|
|
116
|
-
className={ style.Cell }
|
|
117
|
-
opacity='trans'
|
|
118
|
-
width={ 1 }
|
|
119
|
-
padding={ '2/3' }
|
|
120
|
-
marginBottom={ 1 }
|
|
121
|
-
borderRadius={ '1.tone.primary' }
|
|
122
|
-
fontColor={ 'white' }
|
|
123
|
-
boxShadow={ 2 }
|
|
124
|
-
backgroundColor='dark'
|
|
125
|
-
transition={ 'middle' }
|
|
126
|
-
componentID={ val_componentID }
|
|
127
|
-
onMouseOver={ () => {
|
|
128
|
-
set_mouseOn( true );
|
|
129
|
-
} }
|
|
130
|
-
onMouseOut={ () => {
|
|
131
|
-
set_mouseOn( false );
|
|
132
|
-
} }
|
|
133
|
-
{ ...others }
|
|
134
|
-
>
|
|
135
|
-
{ Content }
|
|
136
|
-
</Box>
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
let SnackBarElements: ElementParams[] = [];
|
|
140
|
-
|
|
141
|
-
const SnackBarsWrap: FNC<{}> = () => {
|
|
142
|
-
let [ val_refresh,set_refresh ] = useState( $.uuidGen() );
|
|
143
|
-
|
|
144
|
-
useEffect( () => {
|
|
145
|
-
useStore.set( {
|
|
146
|
-
key: 'SnackBar',
|
|
147
|
-
privateKey: SnackBar.__memoryID,
|
|
148
|
-
value: {
|
|
149
|
-
add: ( params: amotify.fn.SnackBar.AddParams ) => {
|
|
150
|
-
params.snackID = params.snackID || $.uuidGen();
|
|
151
|
-
let findIndex = SnackBarElements.findIndex( ( el ) => el.snackID == params.snackID );
|
|
152
|
-
|
|
153
|
-
if ( findIndex == -1 ) {
|
|
154
|
-
SnackBarElements.unshift( {
|
|
155
|
-
...params,
|
|
156
|
-
snackID: params.snackID
|
|
157
|
-
} );
|
|
158
|
-
} else {
|
|
159
|
-
let newList = [ ...SnackBarElements ];
|
|
160
|
-
newList[ findIndex ] = {
|
|
161
|
-
...params,
|
|
162
|
-
snackID: params.snackID
|
|
163
|
-
};
|
|
164
|
-
SnackBarElements = newList;
|
|
165
|
-
}
|
|
166
|
-
set_refresh( $.uuidGen() );
|
|
167
|
-
},
|
|
168
|
-
remove: ( snackID: string ) => {
|
|
169
|
-
let component = useStore.get( 'SnackBar-' + snackID );
|
|
170
|
-
if ( component && component.remove ) {
|
|
171
|
-
component.remove();
|
|
172
|
-
setTimeout( () => {
|
|
173
|
-
let findIndex = SnackBarElements.findIndex( ( cell ) => cell.snackID == snackID );
|
|
174
|
-
if ( findIndex != -1 ) {
|
|
175
|
-
let newList = [ ...SnackBarElements ]
|
|
176
|
-
newList.splice( findIndex,1 );
|
|
177
|
-
|
|
178
|
-
SnackBarElements = newList;
|
|
179
|
-
set_refresh( $.uuidGen() );
|
|
180
|
-
}
|
|
181
|
-
},210 );
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
} );
|
|
186
|
-
},[] );
|
|
187
|
-
|
|
188
|
-
let SnackBars = SnackBarElements.map( ( el ) => { return ( <Cell { ...el } key={ el.snackID } /> ); } )
|
|
189
|
-
|
|
190
|
-
return ( <Flex
|
|
191
|
-
className={ style.SnackBarsWrap }
|
|
192
|
-
position='fixed'
|
|
193
|
-
right={ 0 }
|
|
194
|
-
bottom={ 0 }
|
|
195
|
-
paddingLeft={ 0 }
|
|
196
|
-
paddingRight={ 1 }
|
|
197
|
-
paddingBottom={ 'safeAreaBottom' }
|
|
198
|
-
verticalAlign='bottom'
|
|
199
|
-
children={ SnackBars }
|
|
200
|
-
overflow='auto'
|
|
201
|
-
UnderBreakPointStyles={ {
|
|
202
|
-
left: 0,
|
|
203
|
-
paddingLeft: 1,
|
|
204
|
-
width: 'auto'
|
|
205
|
-
} }
|
|
206
|
-
/> );
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
LaunchReactApplication( {
|
|
210
|
-
baseElement: '#SNACKBARS',
|
|
211
|
-
reactElement: <SnackBarsWrap />,
|
|
212
|
-
nonRouter: true
|
|
213
|
-
} );
|
|
214
|
-
|
|
215
|
-
export { SnackBar }
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
@use '@uniVar' as *;
|
|
2
|
-
:global {
|
|
3
|
-
#SNACKBARS {
|
|
4
|
-
z-index: 8;
|
|
5
|
-
position: absolute;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
.SnackBarsWrap {
|
|
9
|
-
max-height: $viewHeight;
|
|
10
|
-
max-width: 100%;
|
|
11
|
-
width: 25rem;
|
|
12
|
-
}
|
|
13
|
-
.Cell {
|
|
14
|
-
transform: scale(.3);
|
|
15
|
-
transform-origin: bottom right;
|
|
16
|
-
&.FadeIn {
|
|
17
|
-
transform: scale(1);
|
|
18
|
-
opacity: 1;
|
|
19
|
-
}
|
|
20
|
-
&.FadeOut {
|
|
21
|
-
transition: .2s !important;
|
|
22
|
-
opacity: 0;
|
|
23
|
-
transform: scale(.3);
|
|
24
|
-
}
|
|
25
|
-
}
|