aio-popup 1.0.0 → 2.0.0

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 (3) hide show
  1. package/index.css +374 -0
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/index.css ADDED
@@ -0,0 +1,374 @@
1
+ .aio-popup-backdrop {
2
+ position: fixed;
3
+ display: flex;
4
+ width: 100%;
5
+ height: 100%;
6
+ left: 0;
7
+ top: 0;
8
+ align-items: center;
9
+ justify-content: center;
10
+ z-index: 10000;
11
+ background:rgba(0,0,0,0.1);
12
+ transition:0.3s;
13
+ pointer-events: all;
14
+ }
15
+ .aio-popup.not-mounted{
16
+ transition:0.3s;
17
+ }
18
+ .aio-popup-position-fullscreen > .aio-popup.not-mounted{
19
+ transform:scale(0);
20
+
21
+ }
22
+ .aio-popup-position-popover > .aio-popup.not-mounted{
23
+ opacity:0;
24
+ }
25
+ .aio-popup-position-top > .aio-popup.not-mounted{
26
+ top:-500px;
27
+ }
28
+ .aio-popup-position-bottom > .aio-popup.not-mounted{
29
+ bottom:-500px;
30
+ opacity:0;
31
+ }
32
+ .aio-popup-position-right > .aio-popup.not-mounted{
33
+ right:-500px;
34
+ }
35
+ .aio-popup-position-left > .aio-popup.not-mounted{
36
+ left:-500px;
37
+ }
38
+ .aio-popup-position-center > .aio-popup.not-mounted{
39
+ transform:translateY(500px);
40
+ opacity:0;
41
+ }
42
+
43
+ .aio-popup-position-fullscreen > .aio-popup{
44
+ width:100%;
45
+ height:100%;
46
+ }
47
+ .aio-popup-position-popover{
48
+ opacity:1;
49
+ }
50
+ .aio-popup-position-top{
51
+ align-items: flex-start;
52
+ }
53
+ .aio-popup-position-top > .aio-popup{
54
+ width:100%;
55
+ max-height:90vh;
56
+ top:0;
57
+ }
58
+ .aio-popup-position-bottom{
59
+ align-items: flex-end;
60
+ }
61
+ .aio-popup-position-bottom > .aio-popup{
62
+ width:100%;
63
+ max-height:90vh;
64
+ bottom:0;
65
+ opacity:1;
66
+ }
67
+ .aio-popup-backdrop.not-mounted{
68
+ background:none !important;
69
+ transition:0.3s;
70
+ }
71
+ .aio-popup-position-right{
72
+ justify-content:right;
73
+ }
74
+ .aio-popup-position-right .aio-popup{
75
+ height:100%;
76
+ max-width:90vh;
77
+ right:0;
78
+ }
79
+ .aio-popup-position-left{
80
+ justify-content:left;
81
+ }
82
+ .aio-popup-position-left > .aio-popup{
83
+ height:100%;
84
+ max-width:90vh;
85
+ left:0;
86
+ }
87
+ .aio-popup-position-center > .aio-popup{
88
+ max-width: 100vw;
89
+ width:100%;
90
+ opacity:1;
91
+ max-height:100vh;
92
+ }
93
+
94
+ .aio-popup {
95
+ background:#fff;
96
+ border-radius: 4px;
97
+ font-size:14px;
98
+ transition:0.3s;
99
+ max-width:100vw;
100
+ max-height:100vh;
101
+ pointer-events: auto;
102
+ }
103
+
104
+ .aio-popup.rtl {
105
+ direction: rtl;
106
+ }
107
+
108
+ .aio-popup-header {
109
+ border-bottom:1px solid #e7e9ec;
110
+ color: #323130;
111
+ padding:6px 12px;
112
+ font-size: 16px;
113
+ font-weight: bold;
114
+ min-height:48px;
115
+ }
116
+ .aio-popup-subtitle{
117
+ font-size:85%;
118
+ opacity:0.5;
119
+ }
120
+ .aio-popup-body {
121
+ flex: 1;
122
+ width: 100%;
123
+ overflow-y:auto;
124
+ }
125
+ .aio-popup-footer{
126
+ padding:12px;
127
+ border-top:1px solid #f2f4f7;
128
+ justify-content: flex-end;
129
+ }
130
+ .aio-popup-header-button{
131
+ padding:0 6px;
132
+ background:none;
133
+ border:none;
134
+ cursor:pointer;
135
+ }
136
+ .aio-popup-header-close-button{
137
+ width:36px;
138
+ }
139
+ .aio-popup-footer-button {
140
+ height: 30px;
141
+ background: dodgerblue;
142
+ border: none;
143
+ padding: 0 24px;
144
+ color: #fff;
145
+ font-family: inherit;
146
+ border-radius: 4px;
147
+ }
148
+ .aio-popup-footer-button:disabled{
149
+ opacity:0.7;
150
+ background:#ddd;
151
+ cursor:not-allowed;
152
+ }
153
+
154
+ .aio-popup-blur {
155
+ filter: blur(5px);
156
+ }
157
+
158
+
159
+
160
+
161
+
162
+ .aio-popup-alert-container {
163
+ position: fixed;
164
+ z-index: 1000000000000000000000000000000;
165
+ width: 100%;
166
+ height: 100%;
167
+ background: rgba(0, 0, 0, 0.2);
168
+ left: 0;
169
+ top: 0;
170
+ display: flex;
171
+ align-items: center;
172
+ justify-content: center;
173
+ font-family: inherit;
174
+ }
175
+
176
+ .aio-popup-alert {
177
+ position: relative;
178
+ background: #fff;
179
+ width: 90%;
180
+ max-width: 360px;
181
+ border-radius: 4px;
182
+ box-shadow: 5px 8px 11px 0 rgb(0 0 0 / 17%);
183
+ display:flex;
184
+ flex-direction: column;
185
+ overflow:hidden;
186
+ }
187
+ .aio-popup-alert-error .aio-popup-alert-header svg{
188
+ fill:red;
189
+ }
190
+ .aio-popup-alert-warning .aio-popup-alert-header svg{
191
+ fill:orange;
192
+ }
193
+ .aio-popup-alert-info .aio-popup-alert-header svg{
194
+ fill:dodgerblue;
195
+ }
196
+ .aio-popup-alert-success .aio-popup-alert-header svg{
197
+ fill:green;
198
+ }
199
+
200
+ .aio-popup-alert-header {
201
+ display: flex;
202
+ padding: 12px;
203
+ box-sizing: border-box;
204
+ align-items: center;
205
+ justify-content: center;
206
+ }
207
+
208
+ .aio-popup-alert-body {
209
+ padding: 0 12px;
210
+ max-height:400px;
211
+ overflow-y:auto;
212
+ }
213
+
214
+ .aio-popup-alert-text {
215
+ display: flex;
216
+ align-items: center;
217
+ justify-content: center;
218
+ font-size: 14px;
219
+ font-weight: bold;
220
+ margin-bottom: 12px;
221
+ }
222
+
223
+ .aio-popup-alert-subtext {
224
+ font-size: 12px;
225
+
226
+ }
227
+
228
+ .aio-popup-alert-footer {
229
+ height: 48px;
230
+ display: flex;
231
+ align-items: center;
232
+ box-sizing: border-box;
233
+ padding: 0 12px;
234
+ }
235
+
236
+ .aio-popup-time {
237
+ position: absolute;
238
+ height: 3px;
239
+ width: calc(100% - 24px);
240
+ left: 12px;
241
+ bottom:0;
242
+ }
243
+
244
+ .aio-popup-time-bar {
245
+ position: absolute;
246
+ background: red;
247
+ height: 100%;
248
+ left: 0;
249
+ }
250
+ .aio-popup-alert-error .aio-popup-time-bar{
251
+ background:red;
252
+ }
253
+ .aio-popup-alert-warning .aio-popup-time-bar{
254
+ background:orange;
255
+ }
256
+ .aio-popup-alert-info .aio-popup-time-bar{
257
+ background:dodgerblue;
258
+ }
259
+ .aio-popup-alert-success .aio-popup-time-bar{
260
+ background:green;
261
+ }
262
+ .aio-popup-alert-footer button {
263
+ border: none;
264
+ font-family: inherit;
265
+ background: dodgerblue;
266
+ color: #fff;
267
+ font-size: 14px;
268
+ box-sizing: border-box;
269
+ padding: 3px 12px;
270
+ border-radius: 3px;
271
+ }
272
+
273
+ .aio-popup-snakebar-item-container{
274
+ font-size:12px;
275
+ height: fit-content;
276
+ color: #fff;
277
+ width: 100%;
278
+ left: 0;
279
+ position: fixed;
280
+ transition: 0.2s;
281
+ padding:0 24px;
282
+ display:flex;
283
+ align-items: center;
284
+ box-sizing: border-box;
285
+ justify-content: center;
286
+ z-index:1000000;
287
+ }
288
+ .aio-popup-snakebar-item{
289
+ background: rgb(24 28 41 / 95%);
290
+ padding:12px;
291
+ right:100%;
292
+ position: relative;
293
+ width:100%;
294
+ height: fit-content;
295
+ box-sizing: border-box;
296
+ display: flex;
297
+ align-items: center;
298
+ transition: 0.2s;
299
+ overflow:hidden;
300
+ }
301
+ .aio-popup-snakebar-item-container.mounted .aio-popup-snakebar-item{
302
+ transition:0.5s;
303
+ right:0;
304
+ }
305
+ .aio-popup-snakebar-item-text{
306
+ flex:1;
307
+ }
308
+ .aio-popup-snakebar-item-subtext{
309
+ font-size:85%;
310
+ opacity:0.67;
311
+ }
312
+ .aio-popup-snakebar-item-text svg{
313
+ flex:1;
314
+ }
315
+ .aio-popup-snakebar-item-remove{
316
+ display:flex;
317
+ align-items:center;
318
+ justify-content: center;
319
+ border-radius: 100%;
320
+ }
321
+ .aio-popup-snakebar-item-icon{
322
+ display: flex;
323
+ align-items: center;
324
+ justify-content: center;
325
+ margin-inline-end:6px;
326
+ border-radius:100%;
327
+ padding:3px;
328
+ }
329
+ .aio-popup-snakebar-item-success .aio-popup-snakebar-item-icon{
330
+ color:#5ba427;
331
+ }
332
+ .aio-popup-snakebar-item-error .aio-popup-snakebar-item-icon{
333
+ color:#e83232;
334
+ }
335
+ .aio-popup-snakebar-item-warning .aio-popup-snakebar-item-icon{
336
+ color:#ffb300;
337
+ }
338
+ .aio-popup-snakebar-item-info .aio-popup-snakebar-item-icon{
339
+ color:#00bcff;
340
+ }
341
+
342
+ .aio-popup-snakebar-item-container .aio-popup-snakebar-bar{
343
+ position:absolute;
344
+ left:0;
345
+ bottom:2px;
346
+ width:0%;
347
+ height:3px;
348
+ }
349
+ .aio-popup-snakebar-item-container.mounted .aio-popup-snakebar-bar{
350
+ width:100%;
351
+ }
352
+ /* .aio-popup-snakebar-container.mounted .aio-popup-snakebar-bar{
353
+ width:50%;
354
+ } */
355
+
356
+ .aio-popup-snakebar-item-success .aio-popup-snakebar-bar{
357
+ background:#5ba427;
358
+ }
359
+ .aio-popup-snakebar-item-error .aio-popup-snakebar-bar{
360
+ background:#e83232;
361
+ }
362
+ .aio-popup-snakebar-item-warning .aio-popup-snakebar-bar{
363
+ background:#ffb300;
364
+ }
365
+ .aio-popup-snakebar-item-info .aio-popup-snakebar-bar{
366
+ background:#00bcff;
367
+ }
368
+ .aio-popup-snakebar-item-action{
369
+ color:dodgerblue;
370
+ border:none;
371
+ background:none;
372
+ }
373
+
374
+
package/index.js CHANGED
@@ -8,7 +8,7 @@ import { Icon } from '@mdi/react';
8
8
  import { mdiClose, mdiChevronRight, mdiChevronLeft } from '@mdi/js';
9
9
  import RVD from 'react-virtual-dom';
10
10
  import $ from 'jquery';
11
- import './aio-popup.css';
11
+ import './index.css';
12
12
  export default class AIOPopup {
13
13
  constructor(_obj = {}) {
14
14
  _defineProperty(this, "render", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aio-popup",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "handle all types of popup and modals in react",
5
5
  "main": "index.js",
6
6
  "scripts": {