amotify 0.0.2 → 0.0.4

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 (185) hide show
  1. package/dist/src/@jsminAmotifyExtension/_.d.ts +4 -0
  2. package/dist/src/@jsminAmotifyExtension/fetch.d.ts +9 -0
  3. package/dist/src/@jsminAmotifyExtension/formCollect.d.ts +1 -0
  4. package/dist/src/@jsminAmotifyExtension/spreadSheet.d.ts +4 -0
  5. package/dist/src/@jsminAmotifyExtension/variables.d.ts +0 -0
  6. package/dist/src/@types/_.d.ts +6 -0
  7. package/dist/src/@types/amot.d.ts +260 -0
  8. package/dist/src/@types/fn.d.ts +1040 -0
  9. package/dist/src/@types/index.d.ts +62 -0
  10. package/dist/src/@types/jsminAmotifyExtension.d.ts +134 -0
  11. package/dist/src/@types/module.d.ts +2 -0
  12. package/dist/src/@types/state.d.ts +145 -0
  13. package/dist/src/Atoms/@export.d.ts +4 -0
  14. package/dist/src/Atoms/FAIcon/parts.d.ts +2 -0
  15. package/dist/src/Atoms/Logo/parts.d.ts +1 -0
  16. package/dist/src/Atoms/Various/parts.d.ts +9 -0
  17. package/dist/src/Functions/@export.d.ts +12 -0
  18. package/dist/src/Functions/Button/_.d.ts +1 -0
  19. package/dist/src/Functions/Cropper/parts.d.ts +1 -0
  20. package/dist/src/Functions/Effects/Fade.d.ts +1 -0
  21. package/dist/src/Functions/Effects/Ripple.d.ts +1 -0
  22. package/dist/src/Functions/Effects/_.d.ts +3 -0
  23. package/dist/src/Functions/Input/Chips/Selector.d.ts +1 -0
  24. package/dist/src/Functions/Input/Chips/_.d.ts +2 -0
  25. package/dist/src/Functions/Input/DigitCharacters.d.ts +1 -0
  26. package/dist/src/Functions/Input/File/_.d.ts +2 -0
  27. package/dist/src/Functions/Input/Hidden.d.ts +1 -0
  28. package/dist/src/Functions/Input/List/_.d.ts +1 -0
  29. package/dist/src/Functions/Input/Segmented/_.d.ts +1 -0
  30. package/dist/src/Functions/Input/Select/_.d.ts +1 -0
  31. package/dist/src/Functions/Input/Slider/_.d.ts +1 -0
  32. package/dist/src/Functions/Input/Switch/_.d.ts +1 -0
  33. package/dist/src/Functions/Input/Text.d.ts +5 -0
  34. package/dist/src/Functions/Input/TextArea.d.ts +1 -0
  35. package/dist/src/Functions/Input/Time/Picker.d.ts +1 -0
  36. package/dist/src/Functions/Input/Time/_.d.ts +2 -0
  37. package/dist/src/Functions/Input/_.d.ts +5 -0
  38. package/dist/src/Functions/Input/core.d.ts +34 -0
  39. package/dist/src/Functions/Inputs/_.d.ts +3 -0
  40. package/dist/src/Functions/Inputs/text.d.ts +12 -0
  41. package/dist/src/Functions/Layout/PageNotFound.d.ts +1 -0
  42. package/dist/src/Functions/Layout/PageRouter.d.ts +2 -0
  43. package/dist/src/Functions/Layout/PageViewController/parts.d.ts +1 -0
  44. package/dist/src/Functions/Layout/Plate.d.ts +1 -0
  45. package/dist/src/Functions/Layout/RootViewController/parts.d.ts +1 -0
  46. package/dist/src/Functions/Layout/SwipeView/parts.d.ts +2 -0
  47. package/dist/src/Functions/Layout/TabBar.d.ts +1 -0
  48. package/dist/src/Functions/Layout/_.d.ts +2 -0
  49. package/dist/src/Functions/Loader/corner.d.ts +1 -0
  50. package/dist/src/Functions/Loader/mini.d.ts +33 -0
  51. package/dist/src/Functions/Loader/parts.d.ts +3 -0
  52. package/dist/src/Functions/Loader/top.d.ts +1 -0
  53. package/dist/src/Functions/Sheet/parts.d.ts +2 -0
  54. package/dist/src/Functions/SnackBar/parts.d.ts +2 -0
  55. package/dist/src/Functions/Table/Data/parts.d.ts +3 -0
  56. package/dist/src/Functions/Table/Drag/parts.d.ts +1 -0
  57. package/dist/src/Functions/Table/Normal/parts.d.ts +1 -0
  58. package/dist/src/Functions/Table/_.d.ts +9 -0
  59. package/dist/src/Functions/Tooltips/parts.d.ts +2 -0
  60. package/dist/src/Global/@export.d.ts +12 -0
  61. package/dist/src/Global/LaunchReactApplication.d.ts +1 -0
  62. package/dist/src/Global/styleConverter.d.ts +2 -0
  63. package/dist/src/Molecules/@export.d.ts +21 -0
  64. package/dist/src/Molecules/Accordion/parts.d.ts +2 -0
  65. package/dist/src/Molecules/LinkifyText/parts.d.ts +1 -0
  66. package/dist/src/Molecules/List.d.ts +1 -0
  67. package/dist/src/Organisms/@export.d.ts +2 -0
  68. package/dist/src/Organisms/DisplayStyleInput/_.d.ts +1 -0
  69. package/dist/src/Organisms/DisplayStyleInput/darkmode.d.ts +1 -0
  70. package/dist/src/Organisms/DisplayStyleInput/themeColor.d.ts +27 -0
  71. package/dist/src/Templates/@export.d.ts +2 -0
  72. package/dist/src/Templates/PlayGround/parts.d.ts +1 -0
  73. package/dist/src/config.d.ts +16 -0
  74. package/dist/src/launch.d.ts +9 -0
  75. package/dist/src/preload.d.ts +1 -0
  76. package/package.json +2 -2
  77. package/src/@jsminAmotifyExtension/_.tsx +4 -0
  78. package/src/@jsminAmotifyExtension/fetch.tsx +107 -0
  79. package/src/@jsminAmotifyExtension/formCollect.tsx +89 -0
  80. package/src/@jsminAmotifyExtension/spreadSheet.tsx +159 -0
  81. package/src/@jsminAmotifyExtension/variables.tsx +130 -0
  82. package/src/@styles/@app.scss +4 -0
  83. package/src/@styles/@variables/customProps.scss +109 -0
  84. package/src/@styles/@variables/styleSet.scss +38 -0
  85. package/src/@styles/@variables/themeColor.scss +71 -0
  86. package/src/@styles/@variables/var.scss +171 -0
  87. package/src/@styles/UniStyling.scss +996 -0
  88. package/src/@styles/init.scss +154 -0
  89. package/src/@types/_.tsx +6 -0
  90. package/src/@types/amot.tsx +323 -0
  91. package/src/@types/fn.tsx +1210 -0
  92. package/src/@types/index.tsx +74 -0
  93. package/src/@types/jsminAmotifyExtension.tsx +143 -0
  94. package/src/@types/module.tsx +2 -0
  95. package/src/@types/state.tsx +199 -0
  96. package/src/Atoms/@export.tsx +32 -0
  97. package/src/Atoms/FAIcon/parts.tsx +117 -0
  98. package/src/Atoms/FAIcon/style.module.scss +9 -0
  99. package/src/Atoms/Logo/parts.tsx +335 -0
  100. package/src/Atoms/Logo/style.module.scss +96 -0
  101. package/src/Atoms/Various/parts.tsx +157 -0
  102. package/src/Atoms/Various/style.module.scss +40 -0
  103. package/src/Functions/@export.tsx +29 -0
  104. package/src/Functions/Button/_.tsx +305 -0
  105. package/src/Functions/Button/style.module.scss +183 -0
  106. package/src/Functions/Cropper/parts.tsx +1061 -0
  107. package/src/Functions/Cropper/style.module.scss +62 -0
  108. package/src/Functions/Effects/Fade.tsx +81 -0
  109. package/src/Functions/Effects/Ripple.tsx +141 -0
  110. package/src/Functions/Effects/_.tsx +33 -0
  111. package/src/Functions/Effects/style.module.scss +83 -0
  112. package/src/Functions/Input/Chips/Selector.tsx +451 -0
  113. package/src/Functions/Input/Chips/_.tsx +286 -0
  114. package/src/Functions/Input/Chips/style.module.scss +6 -0
  115. package/src/Functions/Input/DigitCharacters.tsx +241 -0
  116. package/src/Functions/Input/File/_.tsx +596 -0
  117. package/src/Functions/Input/File/style.module.scss +34 -0
  118. package/src/Functions/Input/Hidden.tsx +18 -0
  119. package/src/Functions/Input/List/_.tsx +383 -0
  120. package/src/Functions/Input/List/style.module.scss +84 -0
  121. package/src/Functions/Input/Segmented/_.tsx +238 -0
  122. package/src/Functions/Input/Segmented/style.module.scss +81 -0
  123. package/src/Functions/Input/Select/_.tsx +225 -0
  124. package/src/Functions/Input/Select/style.module.scss +10 -0
  125. package/src/Functions/Input/Slider/_.tsx +519 -0
  126. package/src/Functions/Input/Slider/style.module.scss +67 -0
  127. package/src/Functions/Input/Switch/_.tsx +177 -0
  128. package/src/Functions/Input/Switch/style.module.scss +18 -0
  129. package/src/Functions/Input/Text.tsx +437 -0
  130. package/src/Functions/Input/TextArea.tsx +115 -0
  131. package/src/Functions/Input/Time/Picker.tsx +950 -0
  132. package/src/Functions/Input/Time/_.tsx +736 -0
  133. package/src/Functions/Input/Time/style.module.scss +72 -0
  134. package/src/Functions/Input/_.tsx +793 -0
  135. package/src/Functions/Input/core.tsx +461 -0
  136. package/src/Functions/Input/style.module.scss +43 -0
  137. package/src/Functions/Inputs/_.tsx +5 -0
  138. package/src/Functions/Inputs/style.module.scss +15 -0
  139. package/src/Functions/Inputs/text.tsx +67 -0
  140. package/src/Functions/Inputs/types.d.ts +1 -0
  141. package/src/Functions/Layout/PageNotFound.tsx +81 -0
  142. package/src/Functions/Layout/PageRouter.tsx +107 -0
  143. package/src/Functions/Layout/PageViewController/parts.tsx +32 -0
  144. package/src/Functions/Layout/Plate.tsx +30 -0
  145. package/src/Functions/Layout/RootViewController/parts.tsx +290 -0
  146. package/src/Functions/Layout/RootViewController/style.module.scss +24 -0
  147. package/src/Functions/Layout/SwipeView/parts.tsx +380 -0
  148. package/src/Functions/Layout/SwipeView/style.module.scss +19 -0
  149. package/src/Functions/Layout/TabBar.tsx +64 -0
  150. package/src/Functions/Layout/_.tsx +20 -0
  151. package/src/Functions/Loader/corner.tsx +78 -0
  152. package/src/Functions/Loader/mini.tsx +117 -0
  153. package/src/Functions/Loader/parts.tsx +105 -0
  154. package/src/Functions/Loader/style.module.scss +222 -0
  155. package/src/Functions/Loader/top.tsx +90 -0
  156. package/src/Functions/Sheet/parts.tsx +972 -0
  157. package/src/Functions/Sheet/style.module.scss +235 -0
  158. package/src/Functions/SnackBar/parts.tsx +215 -0
  159. package/src/Functions/SnackBar/style.module.scss +25 -0
  160. package/src/Functions/Table/Data/parts.tsx +955 -0
  161. package/src/Functions/Table/Drag/parts.tsx +448 -0
  162. package/src/Functions/Table/Normal/parts.tsx +123 -0
  163. package/src/Functions/Table/_.tsx +170 -0
  164. package/src/Functions/Table/style.module.scss +92 -0
  165. package/src/Functions/Tooltips/parts.tsx +52 -0
  166. package/src/Global/@export.tsx +138 -0
  167. package/src/Global/LaunchReactApplication.tsx +30 -0
  168. package/src/Global/exe.tsx +0 -0
  169. package/src/Global/styleConverter.tsx +435 -0
  170. package/src/Molecules/@export.tsx +95 -0
  171. package/src/Molecules/Accordion/parts.tsx +146 -0
  172. package/src/Molecules/Accordion/style.module.scss +13 -0
  173. package/src/Molecules/LinkifyText/parts.tsx +54 -0
  174. package/src/Molecules/List.tsx +30 -0
  175. package/src/Organisms/@export.tsx +5 -0
  176. package/src/Organisms/DisplayStyleInput/_.tsx +18 -0
  177. package/src/Organisms/DisplayStyleInput/darkmode.tsx +112 -0
  178. package/src/Organisms/DisplayStyleInput/themeColor.tsx +210 -0
  179. package/src/Templates/@export.tsx +7 -0
  180. package/src/Templates/PlayGround/parts.tsx +115 -0
  181. package/src/Templates/PlayGround/style.module.scss +38 -0
  182. package/src/config.tsx +132 -0
  183. package/src/launch.tsx +100 -0
  184. package/src/preload.tsx +49 -0
  185. package/tsconfig.json +27 -14
@@ -0,0 +1,235 @@
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
+ }
@@ -0,0 +1,215 @@
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 }
@@ -0,0 +1,25 @@
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
+ }