@expressms/smartapp-ui 1.1.0 → 1.1.2

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 (31) hide show
  1. package/build/main/assets/icons/loader.svg +3 -0
  2. package/build/main/constants/constants.d.ts +4 -0
  3. package/build/main/constants/constants.js +5 -0
  4. package/build/main/helpers/index.d.ts +1 -1
  5. package/build/main/helpers/index.js +2 -2
  6. package/build/main/styles/stories.module.scss +118 -12
  7. package/build/main/styles/styles.min.css +1 -1
  8. package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +1 -1
  9. package/build/main//321/201omponents/ActionModal/ActionModal.js +4 -4
  10. package/build/main//321/201omponents/ActionModal/types.d.ts +2 -0
  11. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +3 -3
  12. package/build/main//321/201omponents/Checkbox/Checkbox.js +2 -2
  13. package/build/main//321/201omponents/Chips/Chips.js +2 -2
  14. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +1 -1
  15. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +2 -2
  16. package/build/main//321/201omponents/Error/Error.js +2 -2
  17. package/build/main//321/201omponents/Header/Header.js +4 -4
  18. package/build/main//321/201omponents/Header/types.d.ts +1 -2
  19. package/build/main//321/201omponents/Loader/Loader.js +2 -2
  20. package/build/main//321/201omponents/Profile/Profile.js +4 -4
  21. package/build/main//321/201omponents/Stories/Stories.js +30 -16
  22. package/build/main//321/201omponents/Stories/types.d.ts +1 -2
  23. package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +4 -0
  24. package/build/main//321/201omponents/SyncLoader/SyncLoader.js +66 -0
  25. package/build/main//321/201omponents/SyncLoader/index.d.ts +1 -0
  26. package/build/main//321/201omponents/SyncLoader/index.js +1 -0
  27. package/build/main//321/201omponents/SyncLoader/types.d.ts +6 -0
  28. package/build/main//321/201omponents/SyncLoader/types.js +1 -0
  29. package/build/main//321/201omponents/index.d.ts +1 -0
  30. package/build/main//321/201omponents/index.js +1 -0
  31. package/package.json +4 -1
@@ -0,0 +1,3 @@
1
+ <svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 8C1.5 4.13401 4.63401 1 8.5 1C12.366 1 15.5 4.13401 15.5 8C15.5 11.866 12.366 15 8.5 15C7.94772 15 7.5 14.5523 7.5 14C7.5 13.4477 7.94772 13 8.5 13C11.2614 13 13.5 10.7614 13.5 8C13.5 5.23858 11.2614 3 8.5 3C5.73858 3 3.5 5.23858 3.5 8C3.5 8.55228 3.05228 9 2.5 9C1.94772 9 1.5 8.55228 1.5 8Z" fill="currentColor"/>
3
+ </svg>
@@ -26,6 +26,10 @@ export declare enum PLATFORM {
26
26
  ios = "ios",
27
27
  android = "android"
28
28
  }
29
+ export declare enum THEME {
30
+ default = "default",
31
+ dark = "dark"
32
+ }
29
33
  export declare const BUTTON_PADDING: number;
30
34
  export declare const MAX_PADDING_FOR_IMAGE: number;
31
35
  export declare const DEFAULT_FONT_FAMILY: string;
@@ -29,6 +29,11 @@ export var PLATFORM;
29
29
  PLATFORM["ios"] = "ios";
30
30
  PLATFORM["android"] = "android";
31
31
  })(PLATFORM || (PLATFORM = {}));
32
+ export var THEME;
33
+ (function (THEME) {
34
+ THEME["default"] = "default";
35
+ THEME["dark"] = "dark";
36
+ })(THEME || (THEME = {}));
32
37
  export var BUTTON_PADDING = 32;
33
38
  export var MAX_PADDING_FOR_IMAGE = 200;
34
39
  export var DEFAULT_FONT_FAMILY = 'Open Sans';
@@ -1,4 +1,4 @@
1
- export declare const getIconColor: (iconColor: string | undefined, defaultIconColor: string) => string;
1
+ export declare const getColor: (color: string | undefined, defaultColor: string) => 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;
@@ -1,6 +1,6 @@
1
1
  import { PLATFORM } from '../constants';
2
- export var getIconColor = function (iconColor, defaultIconColor) {
3
- return (iconColor && CSS.supports('color', iconColor)) ? iconColor : defaultIconColor;
2
+ export var getColor = function (color, defaultColor) {
3
+ return (color && CSS.supports('color', color)) ? color : defaultColor;
4
4
  };
5
5
  export var isWebPlatform = function (platform) { return platform === PLATFORM.web; };
6
6
  export var isIosPlatform = function (platform) { return platform === PLATFORM.ios; };
@@ -23,10 +23,14 @@ $border-color: rgba(85, 85, 85, 0.2);
23
23
 
24
24
  $popup-background: rgba(0, 0, 0, 0.3);
25
25
 
26
+ $box-shadow-light-color: rgba(0, 0, 0, 0.05);
26
27
  $box-shadow-color: rgba(0, 0, 0, 0.25);
27
28
  $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
28
29
 
29
30
  .smartapp-action-modal {
31
+ padding: 0 20px;
32
+ width: 100%;
33
+
30
34
  &__content {
31
35
  position: relative;
32
36
  display: flex;
@@ -35,7 +39,8 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
35
39
  padding: 24px;
36
40
  border: 1px solid $border-color;
37
41
  border-radius: 3px;
38
- width: 320px;
42
+ width: 100%;
43
+ box-sizing: border-box;
39
44
 
40
45
  &__cancel-cross {
41
46
  cursor: pointer;
@@ -170,9 +175,9 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
170
175
  }
171
176
 
172
177
  &__color--blue {
173
- font-weight: 700;
174
- font-size: 16px;
175
- line-height: 22px;
178
+ font-weight: 600;
179
+ font-size: 14px;
180
+ line-height: normal;
176
181
  background: $color-blue;
177
182
  color: $color-white;
178
183
  text-align: center;
@@ -180,9 +185,9 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
180
185
  }
181
186
 
182
187
  &__color--white {
183
- font-weight: 700;
184
- font-size: 16px;
185
- line-height: 22px;
188
+ font-weight: 600;
189
+ font-size: 14px;
190
+ line-height: normal;
186
191
  background: $color-white;
187
192
  color: $color-blue;
188
193
  text-align: center;
@@ -190,9 +195,9 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
190
195
  }
191
196
 
192
197
  &__color--red {
193
- font-weight: 700;
194
- font-size: 16px;
195
- line-height: 22px;
198
+ font-weight: 600;
199
+ font-size: 14px;
200
+ line-height: normal;
196
201
  background: $color-red;
197
202
  color: $color-white;
198
203
  text-align: center;
@@ -420,12 +425,16 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
420
425
  }
421
426
 
422
427
  .smartapp-confirmation-modal {
428
+ width: 100%;
429
+ padding: 0 20px;
430
+
423
431
  &__content {
424
432
  background-color: $color-white;
425
433
  padding: 24px;
426
434
  border: 1px solid $border-color;
427
435
  border-radius: 3px;
428
- width: 320px;
436
+ box-sizing: border-box;
437
+ width: 100%;
429
438
 
430
439
  &--title {
431
440
  color: $color-black;
@@ -658,7 +667,8 @@ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
658
667
  padding-right: 82px;
659
668
  }
660
669
 
661
- &__ios, &__android {
670
+ &__ios,
671
+ &__android {
662
672
  width: calc(100% - 125px);
663
673
  padding-right: 109px;
664
674
  }
@@ -986,6 +996,15 @@ input:checked + .smartapp-slider:before {
986
996
  }
987
997
 
988
998
  .smartapp-stories-content {
999
+ width: 100%;
1000
+ height: 100%;
1001
+ display: flex;
1002
+ justify-content: center;
1003
+ align-items: center;
1004
+ background: $color-black;
1005
+ border: none;
1006
+ padding: 0;
1007
+
989
1008
  &__background-video {
990
1009
  position: absolute;
991
1010
  width: 100%;
@@ -1136,3 +1155,90 @@ input:checked + .smartapp-slider:before {
1136
1155
  padding-right: 24px !important;
1137
1156
  }
1138
1157
  }
1158
+
1159
+ .smartapp-sync-loader {
1160
+ position: absolute;
1161
+ left: 0;
1162
+ right: 0;
1163
+ width: fit-content;
1164
+ display: flex;
1165
+ align-items: center;
1166
+ gap: 8px;
1167
+ border-radius: 100px;
1168
+ box-shadow: 0 1px 8px 0 $box-shadow-light-color;
1169
+ padding: 8px 12px;
1170
+ margin: 16px auto 0 auto;
1171
+ z-index: 1000;
1172
+ animation: loader-appear 0.25s linear;
1173
+
1174
+ &__text {
1175
+ font-size: 12px;
1176
+ font-weight: 600;
1177
+ line-height: 16px;
1178
+ display: flex;
1179
+ color: $color-black;
1180
+
1181
+ &--dark {
1182
+ color: $color-white;
1183
+ }
1184
+
1185
+ &--dots {
1186
+ width: 1.45ch;
1187
+ display: flex;
1188
+ justify-content: flex-start;
1189
+
1190
+ &__dot {
1191
+ opacity: 0;
1192
+ animation: dot-appear 1s ease-in 1;
1193
+
1194
+ &:nth-child(1) {
1195
+ animation-delay: 0.2s;
1196
+ }
1197
+
1198
+ &:nth-child(2) {
1199
+ animation-delay: 0.4s;
1200
+ }
1201
+
1202
+ &:nth-child(3) {
1203
+ animation-delay: 0.6s;
1204
+ }
1205
+ }
1206
+ }
1207
+ }
1208
+
1209
+ &__icon {
1210
+ animation: loader-spin 1s linear infinite;
1211
+ }
1212
+ }
1213
+
1214
+ @keyframes loader-appear {
1215
+ from {
1216
+ transform: scale(0);
1217
+ opacity: 0;
1218
+ }
1219
+ to {
1220
+ transform: scale(1);
1221
+ opacity: 1;
1222
+ }
1223
+ }
1224
+
1225
+ @keyframes dot-appear {
1226
+ 0% {
1227
+ opacity: 0;
1228
+ }
1229
+ 25% {
1230
+ opacity: 0.5;
1231
+ }
1232
+ 50% {
1233
+ opacity: 1;
1234
+ }
1235
+ 100% {
1236
+ opacity: 1;
1237
+ }
1238
+ }
1239
+
1240
+ @keyframes loader-spin {
1241
+ to {
1242
+ transform: rotate(360deg);
1243
+ }
1244
+ }