@expressms/smartapp-ui 1.1.3 → 1.1.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.
@@ -0,0 +1,10 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_690_22198)">
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9.99991 8.67417L13.9774 4.6967C14.3435 4.33058 14.9371 4.33058 15.3032 4.6967C15.6693 5.06282 15.6693 5.65641 15.3032 6.02252L11.3257 10L15.3032 13.9775C15.6693 14.3436 15.6693 14.9372 15.3032 15.3033C14.9371 15.6694 14.3435 15.6694 13.9774 15.3033L9.99991 11.3258L6.02244 15.3033C5.65632 15.6694 5.06273 15.6694 4.69661 15.3033C4.33049 14.9372 4.33049 14.3436 4.69661 13.9775L8.67409 10L4.69661 6.02252C4.33049 5.65641 4.33049 5.06282 4.69661 4.6967C5.06273 4.33058 5.65632 4.33058 6.02244 4.6967L9.99991 8.67417Z" fill="#4799E3"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_690_22198">
7
+ <rect width="20" height="20" fill="white"/>
8
+ </clipPath>
9
+ </defs>
10
+ </svg>
@@ -9,8 +9,10 @@ export declare const DEFAULT_WHITE_LOADER_BACKGROUND_COLOR = "#FFFFFF";
9
9
  export declare const DEFAULT_GRAY_LOADER_BACKGROUND_COLOR = "#E0E4EC66";
10
10
  export declare const DEFAULT_TEXT_BUTTON_COLOR = "#111111";
11
11
  export declare const DEFAULT_BACKGROUND_BUTTON_COLOR = "#FFFFFF";
12
+ export declare const DEFAULT_POPUP_BACKGROUND_COLOR = "rgba(37, 77, 145, 0.2)";
12
13
  export declare const INPUT_TYPE_PASSWORD = "password";
13
14
  export declare const INPUT_TYPE_TEXT = "text";
15
+ export declare const ENTER_KEY = "Enter";
14
16
  export declare enum FONT_SIZE {
15
17
  small = "14px",
16
18
  default = "16px",
@@ -9,8 +9,10 @@ export var DEFAULT_WHITE_LOADER_BACKGROUND_COLOR = '#FFFFFF';
9
9
  export var DEFAULT_GRAY_LOADER_BACKGROUND_COLOR = '#E0E4EC66';
10
10
  export var DEFAULT_TEXT_BUTTON_COLOR = '#111111';
11
11
  export var DEFAULT_BACKGROUND_BUTTON_COLOR = '#FFFFFF';
12
+ export var DEFAULT_POPUP_BACKGROUND_COLOR = 'rgba(37, 77, 145, 0.2)';
12
13
  export var INPUT_TYPE_PASSWORD = 'password';
13
14
  export var INPUT_TYPE_TEXT = 'text';
15
+ export var ENTER_KEY = 'Enter';
14
16
  export var FONT_SIZE;
15
17
  (function (FONT_SIZE) {
16
18
  FONT_SIZE["small"] = "14px";
@@ -2,3 +2,5 @@ export declare const getColor: (color: string | undefined, defaultColor: string)
2
2
  export declare const isWebPlatform: (platform: string) => boolean;
3
3
  export declare const isIosPlatform: (platform: string) => boolean;
4
4
  export declare const isAndroidPlatform: (platform: string) => boolean;
5
+ export declare const isMobilePlatform: (platform: string) => boolean;
6
+ export declare const getClassNames: (className: string, delimiter: string, platform: string) => string;
@@ -1,3 +1,4 @@
1
+ import classNames from 'classnames';
1
2
  import { PLATFORM } from '../constants';
2
3
  export var getColor = function (color, defaultColor) {
3
4
  return (color && CSS.supports('color', color)) ? color : defaultColor;
@@ -5,3 +6,5 @@ export var getColor = function (color, defaultColor) {
5
6
  export var isWebPlatform = function (platform) { return platform === PLATFORM.web; };
6
7
  export var isIosPlatform = function (platform) { return platform === PLATFORM.ios; };
7
8
  export var isAndroidPlatform = function (platform) { return platform === PLATFORM.android; };
9
+ export var isMobilePlatform = function (platform) { return isAndroidPlatform(platform) || isIosPlatform(platform); };
10
+ export var getClassNames = function (className, delimiter, platform) { return classNames(className, "".concat(className).concat(delimiter).concat(platform)); };
@@ -28,38 +28,59 @@ $box-shadow-color: rgba(0, 0, 0, 0.25);
28
28
  $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
29
29
 
30
30
  .smartapp-action-modal {
31
- padding: 0 20px;
32
31
  width: 100%;
32
+ padding: 0 20px;
33
+
34
+ &__ios,
35
+ &__android {
36
+ padding: 0;
37
+ }
33
38
 
34
39
  &__content {
40
+ box-sizing: border-box;
35
41
  position: relative;
36
42
  display: flex;
37
43
  flex-direction: column;
44
+ width: 100%;
38
45
  background-color: $color-white;
46
+ border-radius: 4px;
39
47
  padding: 24px;
40
- border: 1px solid $border-color;
41
- border-radius: 3px;
42
- width: 100%;
43
- box-sizing: border-box;
44
48
 
45
- &__cancel-cross {
46
- cursor: pointer;
49
+ &--ios,
50
+ &--android {
51
+ border-radius: 12px 12px 0 0;
52
+ padding: 24px 24px 40px 24px;
53
+ }
54
+
55
+ &--cancel-cross {
47
56
  position: absolute;
48
- right: 10px;
49
- top: 10px;
57
+ top: 8px;
58
+ right: 8px;
59
+ cursor: pointer;
50
60
  }
51
61
 
52
62
  &--title {
53
- color: $color-black;
54
- font-weight: 800;
55
- font-size: 18px;
56
- line-height: 20px;
57
- margin-bottom: 16px;
63
+ font-family: Open Sans, 'sans-serif';
64
+ font-size: 16px;
65
+ font-weight: 700;
66
+ line-height: 22px;
58
67
  text-align: center;
68
+ color: $color-black;
69
+ margin: 8px 0 24px 0;
70
+
71
+ &__ios,
72
+ &__android {
73
+ margin-top: 0;
74
+ }
59
75
  }
60
76
 
61
77
  &--input {
62
- margin-bottom: 16px;
78
+ margin-bottom: 24px;
79
+ }
80
+
81
+ &--delimiter {
82
+ border-top: 0.5px solid $color-gray;
83
+ margin: 0 -24px 16px -24px;
63
84
  }
64
85
 
65
86
  &--buttons {
@@ -70,13 +91,27 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
70
91
  }
71
92
  }
72
93
 
73
- .popup-content {
94
+ .action-modal-content {
74
95
  width: 100%;
75
96
  height: 100%;
76
- background: $popup-background;
97
+ background: var(--action-modal-background, $popup-background);
77
98
  display: flex;
78
99
  justify-content: center;
79
100
  align-items: center;
101
+ cursor: pointer;
102
+ }
103
+
104
+ .action-modal-ios-content,
105
+ .action-modal-android-content {
106
+ height: fit-content;
107
+ border-radius: 12px 12px 0 0;
108
+ margin: auto 0 0 !important;
109
+ }
110
+
111
+ .action-modal-ios-overlay,
112
+ .action-modal-android-overlay {
113
+ background: var(--action-modal-background, $popup-background);
114
+ cursor: pointer;
80
115
  }
81
116
 
82
117
  .smartapp-attached-file {
@@ -158,16 +193,25 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
158
193
 
159
194
  .smartapp-button {
160
195
  width: 100%;
196
+
161
197
  &__standard {
162
198
  cursor: pointer;
163
199
  padding: 12px 32px;
164
200
  border-radius: 8px;
201
+
202
+ &:focus-visible {
203
+ outline: none;
204
+ }
165
205
  }
166
206
 
167
207
  &__low {
168
208
  cursor: pointer;
169
209
  padding: 5px 32px;
170
210
  border-radius: 3px;
211
+
212
+ &:focus-visible {
213
+ outline: none;
214
+ }
171
215
  }
172
216
 
173
217
  &__disabled {
@@ -175,32 +219,35 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
175
219
  }
176
220
 
177
221
  &__color--blue {
178
- font-weight: 600;
222
+ font-family: Open Sans, 'sans-serif';
179
223
  font-size: 14px;
180
- line-height: normal;
181
- background: $color-blue;
182
- color: $color-white;
224
+ font-weight: 600;
225
+ line-height: 19px;
183
226
  text-align: center;
227
+ color: $color-white;
228
+ background: $color-blue;
184
229
  border: 0;
185
230
  }
186
231
 
187
232
  &__color--white {
188
- font-weight: 600;
233
+ font-family: Open Sans, 'sans-serif';
189
234
  font-size: 14px;
190
- line-height: normal;
191
- background: $color-white;
192
- color: $color-blue;
235
+ font-weight: 600;
236
+ line-height: 19px;
193
237
  text-align: center;
238
+ color: $color-blue;
239
+ background: $color-white;
194
240
  border: 1px solid $color-blue;
195
241
  }
196
242
 
197
243
  &__color--red {
198
- font-weight: 600;
244
+ font-family: Open Sans, 'sans-serif';
199
245
  font-size: 14px;
200
- line-height: normal;
201
- background: $color-red;
202
- color: $color-white;
246
+ font-weight: 600;
247
+ line-height: 19px;
203
248
  text-align: center;
249
+ color: $color-white;
250
+ background: $color-red;
204
251
  border: 0;
205
252
  }
206
253
  }
@@ -428,48 +475,79 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
428
475
  width: 100%;
429
476
  padding: 0 20px;
430
477
 
478
+ &__ios,
479
+ &__android {
480
+ padding: 0;
481
+ }
482
+
431
483
  &__content {
432
- background-color: $color-white;
433
- padding: 24px;
434
- border: 1px solid $border-color;
435
- border-radius: 3px;
436
484
  box-sizing: border-box;
437
485
  width: 100%;
486
+ background-color: $color-white;
487
+ border-radius: 4px;
488
+ padding: 32px 24px 24px 24px;
489
+
490
+ &--ios,
491
+ &--android {
492
+ border-radius: 12px 12px 0 0;
493
+ padding: 24px 24px 40px 24px;
494
+ }
438
495
 
439
496
  &--title {
440
- color: $color-black;
441
- margin: 0 0 24px 0;
497
+ font-family: Open Sans, 'sans-serif';
498
+ font-size: 16px;
442
499
  font-weight: 700;
443
- font-size: 20px;
444
- line-height: 20px;
500
+ line-height: 22px;
445
501
  text-align: center;
502
+ color: $color-black;
503
+ margin: 0 0 24px 0;
446
504
  }
447
505
 
448
506
  &--text {
449
- color: $color-black;
450
- font-weight: 400;
507
+ font-family: Open Sans, 'sans-serif';
451
508
  font-size: 14px;
509
+ font-weight: 400;
452
510
  line-height: 16px;
453
- margin-bottom: 16px;
454
511
  text-align: center;
512
+ color: $color-black;
513
+ margin: 0 0 24px 0;
514
+ }
515
+
516
+ &--delimiter {
517
+ border-top: 0.5px solid $color-gray;
518
+ margin: 0 -24px 16px -24px;
455
519
  }
456
520
 
457
521
  &--buttons {
458
522
  display: flex;
459
523
  flex-direction: row;
460
524
  justify-content: center;
461
- gap: 16px;
525
+ gap: 8px;
462
526
  }
463
527
  }
464
528
  }
465
529
 
466
- .popup-content {
530
+ .confirmation-modal-content {
467
531
  width: 100%;
468
532
  height: 100%;
469
- background: $popup-background;
533
+ background: var(--confirmation-modal-background, $popup-background);
470
534
  display: flex;
471
535
  justify-content: center;
472
536
  align-items: center;
537
+ cursor: pointer;
538
+ }
539
+
540
+ .confirmation-modal-ios-content,
541
+ .confirmation-modal-android-content {
542
+ height: fit-content;
543
+ border-radius: 12px 12px 0 0;
544
+ margin: auto 0 0 !important;
545
+ }
546
+
547
+ .confirmation-modal-ios-overlay,
548
+ .confirmation-modal-android-overlay {
549
+ background: var(--confirmation-modal-background, $popup-background);
550
+ cursor: pointer;
473
551
  }
474
552
 
475
553
  .smartapp-custom-select {
@@ -730,20 +808,23 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
730
808
  position: relative;
731
809
 
732
810
  &--field {
733
- padding: 12px 16px;
811
+ padding: 13px 16px;
734
812
  border: 1px solid $color-lightest-gray;
735
813
  border-radius: 8px;
736
814
  font-weight: 400;
737
- font-size: 14px;
738
- line-height: 19px;
739
815
  color: $color-black;
740
816
  width: 100%;
741
817
  box-sizing: border-box;
742
818
 
819
+ &__with-clear-button {
820
+ padding-right: 44px;
821
+ }
822
+
743
823
  &::placeholder {
824
+ font-family: Open Sans, 'sans-serif';
825
+ font-size: inherit;
744
826
  font-weight: 400;
745
- font-size: 14px;
746
- line-height: 20px;
827
+ line-height: inherit;
747
828
  color: $color-darker-gray;
748
829
  }
749
830
 
@@ -771,6 +852,15 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
771
852
  transform: scale(0.95);
772
853
  }
773
854
  }
855
+
856
+ &--clear-icon {
857
+ position: absolute;
858
+ top: 0;
859
+ bottom: 0;
860
+ right: 16px;
861
+ margin: auto 0;
862
+ cursor: pointer;
863
+ }
774
864
  }
775
865
 
776
866
  &__error {
@@ -1242,3 +1332,72 @@ input:checked + .smartapp-slider:before {
1242
1332
  transform: rotate(360deg);
1243
1333
  }
1244
1334
  }
1335
+
1336
+ .smartapp-modal {
1337
+ width: 100%;
1338
+ padding: 0 20px;
1339
+ cursor: default;
1340
+
1341
+ &__ios,
1342
+ &__android {
1343
+ padding: 0;
1344
+ }
1345
+
1346
+ &__content {
1347
+ box-sizing: border-box;
1348
+ position: relative;
1349
+ display: flex;
1350
+ flex-direction: column;
1351
+ gap: 24px;
1352
+ width: 100%;
1353
+ background-color: $color-white;
1354
+ border-radius: 4px;
1355
+ padding: 24px;
1356
+
1357
+ &--ios,
1358
+ &--android {
1359
+ border-radius: 12px 12px 0 0;
1360
+ padding: 24px 24px 40px 24px;
1361
+ }
1362
+
1363
+ &--title {
1364
+ font-family: Open Sans, 'sans-serif';
1365
+ font-size: 16px;
1366
+ font-weight: 700;
1367
+ line-height: normal;
1368
+ text-align: center;
1369
+ color: $color-black;
1370
+ margin: 0;
1371
+ }
1372
+
1373
+ &--close-icon {
1374
+ position: absolute;
1375
+ top: 8px;
1376
+ right: 8px;
1377
+ cursor: pointer;
1378
+ }
1379
+ }
1380
+ }
1381
+
1382
+ .modal-content {
1383
+ width: 100%;
1384
+ height: 100%;
1385
+ background: var(--modal-background, $popup-background);
1386
+ display: flex;
1387
+ justify-content: center;
1388
+ align-items: center;
1389
+ cursor: pointer;
1390
+ }
1391
+
1392
+ .modal-ios-content,
1393
+ .modal-android-content {
1394
+ height: fit-content;
1395
+ border-radius: 12px 12px 0 0;
1396
+ margin: auto 0 0 !important;
1397
+ }
1398
+
1399
+ .modal-ios-overlay,
1400
+ .modal-android-overlay {
1401
+ background: var(--modal-background, $popup-background);
1402
+ cursor: pointer;
1403
+ }