@expressms/smartapp-ui 1.1.2 → 1.1.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.
@@ -9,6 +9,7 @@ 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";
14
15
  export declare enum FONT_SIZE {
@@ -9,6 +9,7 @@ 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';
14
15
  export var FONT_SIZE;
@@ -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)); };
@@ -21,45 +21,66 @@ $color-lighter-blue: rgba(71, 153, 227, 0.2);
21
21
 
22
22
  $border-color: rgba(85, 85, 85, 0.2);
23
23
 
24
- $popup-background: rgba(0, 0, 0, 0.3);
24
+ $popup-background: rgba(37, 77, 145, 0.2);
25
25
 
26
26
  $box-shadow-light-color: rgba(0, 0, 0, 0.05);
27
27
  $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 {
@@ -741,9 +819,10 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
741
819
  box-sizing: border-box;
742
820
 
743
821
  &::placeholder {
744
- font-weight: 400;
822
+ font-family: Open Sans, 'sans-serif';
745
823
  font-size: 14px;
746
- line-height: 20px;
824
+ font-weight: 400;
825
+ line-height: 19px;
747
826
  color: $color-darker-gray;
748
827
  }
749
828