@expressms/smartapp-ui 1.0.7 → 1.1.1

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 (38) hide show
  1. package/build/main/assets/icons/loader.svg +3 -0
  2. package/build/main/assets/icons/refresh.svg +3 -0
  3. package/build/main/constants/constants.d.ts +20 -0
  4. package/build/main/constants/constants.js +23 -0
  5. package/build/main/helpers/index.d.ts +4 -1
  6. package/build/main/helpers/index.js +6 -2
  7. package/build/main/styles/stories.module.scss +184 -21
  8. package/build/main/styles/styles.min.css +1 -1
  9. package/build/main//321/201omponents/ActionModal/ActionModal.js +2 -2
  10. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +3 -3
  11. package/build/main//321/201omponents/Avatar/Avatar.d.ts +1 -1
  12. package/build/main//321/201omponents/Avatar/Avatar.js +16 -16
  13. package/build/main//321/201omponents/Avatar/types.d.ts +4 -2
  14. package/build/main//321/201omponents/Avatar/types.js +1 -0
  15. package/build/main//321/201omponents/Checkbox/Checkbox.js +2 -2
  16. package/build/main//321/201omponents/Chips/Chips.js +2 -2
  17. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +3 -3
  18. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +2 -2
  19. package/build/main//321/201omponents/Error/Error.js +2 -2
  20. package/build/main//321/201omponents/Header/Header.d.ts +1 -1
  21. package/build/main//321/201omponents/Header/Header.js +18 -4
  22. package/build/main//321/201omponents/Header/types.d.ts +10 -0
  23. package/build/main//321/201omponents/Loader/Loader.d.ts +1 -1
  24. package/build/main//321/201omponents/Loader/Loader.js +17 -2
  25. package/build/main//321/201omponents/Loader/types.d.ts +6 -0
  26. package/build/main//321/201omponents/Profile/Profile.js +4 -4
  27. package/build/main//321/201omponents/Stories/Stories.js +91 -38
  28. package/build/main//321/201omponents/Stories/types.d.ts +23 -7
  29. package/build/main//321/201omponents/Stories/types.js +5 -0
  30. package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +4 -0
  31. package/build/main//321/201omponents/SyncLoader/SyncLoader.js +66 -0
  32. package/build/main//321/201omponents/SyncLoader/index.d.ts +1 -0
  33. package/build/main//321/201omponents/SyncLoader/index.js +1 -0
  34. package/build/main//321/201omponents/SyncLoader/types.d.ts +6 -0
  35. package/build/main//321/201omponents/SyncLoader/types.js +1 -0
  36. package/build/main//321/201omponents/index.d.ts +1 -0
  37. package/build/main//321/201omponents/index.js +1 -0
  38. 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>
@@ -0,0 +1,3 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M3.56794 9.99964C3.56794 8.12635 4.388 6.44602 5.67438 5.2722L7.58787 7.18569V2.36176H2.76395L4.53272 4.13054C2.95691 5.59379 1.95996 7.67612 1.95996 9.99964C1.95996 13.8617 4.6804 17.0832 8.30458 17.8602C8.77703 17.9615 9.19585 17.5803 9.19585 17.0972C9.19585 16.6848 8.88658 16.3426 8.48574 16.2459C5.66795 15.5657 3.56794 13.0229 3.56794 9.99964ZM18.0397 9.99964C18.0397 6.13764 15.3193 2.91614 11.6951 2.1391C11.2226 2.03781 10.8038 2.41894 10.8038 2.90212C10.8038 3.31447 11.1131 3.65666 11.5139 3.75342C14.3317 4.4336 16.4317 6.97643 16.4317 9.99964C16.4317 11.8729 15.6117 13.5533 14.3253 14.7271L12.4118 12.8136V17.6375H17.2357L15.4669 15.8688C17.0428 14.4055 18.0397 12.3232 18.0397 9.99964Z" fill="#111111" fill-opacity="0.3"/>
3
+ </svg>
@@ -3,13 +3,33 @@ export declare const DEFAULT_BLUE_ICON_COLOR = "#4799E3";
3
3
  export declare const DEFAULT_RED_ICON_COLOR = "#EB5545";
4
4
  export declare const DEFAULT_GRAY_ICON_COLOR = "#1111114D";
5
5
  export declare const DEFAULT_BLACK_ICON_COLOR = "#111111";
6
+ export declare const DEFAULT_HEADER_TEXT_COLOR = "#111111";
7
+ export declare const DEFAULT_HEADER_BACKGROUND_COLOR = "#FFFFFF";
8
+ export declare const DEFAULT_WHITE_LOADER_BACKGROUND_COLOR = "#FFFFFF";
9
+ export declare const DEFAULT_GRAY_LOADER_BACKGROUND_COLOR = "#E0E4EC66";
10
+ export declare const DEFAULT_TEXT_BUTTON_COLOR = "#111111";
11
+ export declare const DEFAULT_BACKGROUND_BUTTON_COLOR = "#FFFFFF";
6
12
  export declare const INPUT_TYPE_PASSWORD = "password";
7
13
  export declare const INPUT_TYPE_TEXT = "text";
14
+ export declare enum FONT_SIZE {
15
+ small = "14px",
16
+ default = "16px",
17
+ large = "22px"
18
+ }
19
+ export declare enum LINE_HEIGHT {
20
+ small = "19px",
21
+ default = "22px",
22
+ large = "30px"
23
+ }
8
24
  export declare enum PLATFORM {
9
25
  web = "web",
10
26
  ios = "ios",
11
27
  android = "android"
12
28
  }
29
+ export declare enum THEME {
30
+ default = "default",
31
+ dark = "dark"
32
+ }
13
33
  export declare const BUTTON_PADDING: number;
14
34
  export declare const MAX_PADDING_FOR_IMAGE: number;
15
35
  export declare const DEFAULT_FONT_FAMILY: string;
@@ -3,14 +3,37 @@ export var DEFAULT_BLUE_ICON_COLOR = '#4799E3';
3
3
  export var DEFAULT_RED_ICON_COLOR = '#EB5545';
4
4
  export var DEFAULT_GRAY_ICON_COLOR = '#1111114D';
5
5
  export var DEFAULT_BLACK_ICON_COLOR = '#111111';
6
+ export var DEFAULT_HEADER_TEXT_COLOR = '#111111';
7
+ export var DEFAULT_HEADER_BACKGROUND_COLOR = '#FFFFFF';
8
+ export var DEFAULT_WHITE_LOADER_BACKGROUND_COLOR = '#FFFFFF';
9
+ export var DEFAULT_GRAY_LOADER_BACKGROUND_COLOR = '#E0E4EC66';
10
+ export var DEFAULT_TEXT_BUTTON_COLOR = '#111111';
11
+ export var DEFAULT_BACKGROUND_BUTTON_COLOR = '#FFFFFF';
6
12
  export var INPUT_TYPE_PASSWORD = 'password';
7
13
  export var INPUT_TYPE_TEXT = 'text';
14
+ export var FONT_SIZE;
15
+ (function (FONT_SIZE) {
16
+ FONT_SIZE["small"] = "14px";
17
+ FONT_SIZE["default"] = "16px";
18
+ FONT_SIZE["large"] = "22px";
19
+ })(FONT_SIZE || (FONT_SIZE = {}));
20
+ export var LINE_HEIGHT;
21
+ (function (LINE_HEIGHT) {
22
+ LINE_HEIGHT["small"] = "19px";
23
+ LINE_HEIGHT["default"] = "22px";
24
+ LINE_HEIGHT["large"] = "30px";
25
+ })(LINE_HEIGHT || (LINE_HEIGHT = {}));
8
26
  export var PLATFORM;
9
27
  (function (PLATFORM) {
10
28
  PLATFORM["web"] = "web";
11
29
  PLATFORM["ios"] = "ios";
12
30
  PLATFORM["android"] = "android";
13
31
  })(PLATFORM || (PLATFORM = {}));
32
+ export var THEME;
33
+ (function (THEME) {
34
+ THEME["default"] = "default";
35
+ THEME["dark"] = "dark";
36
+ })(THEME || (THEME = {}));
14
37
  export var BUTTON_PADDING = 32;
15
38
  export var MAX_PADDING_FOR_IMAGE = 200;
16
39
  export var DEFAULT_FONT_FAMILY = 'Open Sans';
@@ -1 +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
+ export declare const isWebPlatform: (platform: string) => boolean;
3
+ export declare const isIosPlatform: (platform: string) => boolean;
4
+ export declare const isAndroidPlatform: (platform: string) => boolean;
@@ -1,3 +1,7 @@
1
- export var getIconColor = function (iconColor, defaultIconColor) {
2
- return (iconColor && CSS.supports('color', iconColor)) ? iconColor : defaultIconColor;
1
+ import { PLATFORM } from '../constants';
2
+ export var getColor = function (color, defaultColor) {
3
+ return (color && CSS.supports('color', color)) ? color : defaultColor;
3
4
  };
5
+ export var isWebPlatform = function (platform) { return platform === PLATFORM.web; };
6
+ export var isIosPlatform = function (platform) { return platform === PLATFORM.ios; };
7
+ export var isAndroidPlatform = function (platform) { return platform === PLATFORM.android; };
@@ -5,24 +5,27 @@ $color-black: rgba(17, 17, 17, 1);
5
5
  $color-dark-gray: rgba(17, 17, 17, 0.5);
6
6
  $color-darker-gray: rgba(17, 17, 17, 0.3);
7
7
  $color-darker-gray-opacity: rgba(0, 0, 0, 0.2);
8
- $color-darkest-gray-opacity: #ccc;
8
+ $color-darkest-gray-opacity: rgba(204, 204, 204, 1);
9
9
  $color-gray: rgba(17, 17, 17, 0.1);
10
10
  $color-light-gray: rgba(239, 242, 244, 1);
11
11
  $color-lighter-gray: rgba(224, 228, 236, 1);
12
12
  $color-lighter-gray-opacity: rgba(224, 228, 236, 0.4);
13
13
  $color-lightest-gray: rgba(0, 0, 0, 0.05);
14
14
  $color-white: rgba(255, 255, 255, 1);
15
+ $color-dark-red: rgba(222, 97, 97, 1);
15
16
  $color-red: rgba(235, 85, 69, 1);
17
+ $color-purple: rgba(130, 98, 223, 1);
16
18
  $color-blue: rgba(71, 153, 227, 1);
17
- $color-light-blue: #cdf4ff;
19
+ $color-light-blue: rgba(205, 244, 255, 1);
18
20
  $color-lighter-blue: rgba(71, 153, 227, 0.2);
19
21
 
20
22
  $border-color: rgba(85, 85, 85, 0.2);
21
23
 
22
24
  $popup-background: rgba(0, 0, 0, 0.3);
23
25
 
26
+ $box-shadow-light-color: rgba(0, 0, 0, 0.05);
24
27
  $box-shadow-color: rgba(0, 0, 0, 0.25);
25
- $box-shadow-dark-color: rgb(0 0 0 / 60%);
28
+ $box-shadow-dark-color: rgba(0, 0, 0, 0.6);
26
29
 
27
30
  .smartapp-action-modal {
28
31
  &__content {
@@ -134,12 +137,19 @@ $box-shadow-dark-color: rgb(0 0 0 / 60%);
134
137
  height: 40px;
135
138
  font-size: 18px;
136
139
  color: $color-white;
137
- background-color: $color-light-blue;
140
+ background: linear-gradient(135deg, $color-purple 0%, $color-dark-red 100%);
138
141
  text-decoration: none;
139
142
  white-space: nowrap;
140
143
  font-weight: 500;
141
144
  border-radius: 50%;
142
145
  cursor: pointer;
146
+
147
+ img {
148
+ width: 100%;
149
+ height: 100%;
150
+ object-fit: contain;
151
+ border-radius: 50%;
152
+ }
143
153
  }
144
154
 
145
155
  .smartapp-button {
@@ -639,13 +649,20 @@ $box-shadow-dark-color: rgb(0 0 0 / 60%);
639
649
  }
640
650
 
641
651
  .smartapp-header {
642
- width: 100%;
643
652
  font-weight: 700;
644
- font-size: 16px;
645
- line-height: 22px;
646
- color: $color-black;
647
653
  display: flex;
648
654
  justify-content: space-between;
655
+ padding: 14.5px 0 14.5px 16px;
656
+
657
+ &__web {
658
+ width: calc(100% - 98px);
659
+ padding-right: 82px;
660
+ }
661
+
662
+ &__ios, &__android {
663
+ width: calc(100% - 125px);
664
+ padding-right: 109px;
665
+ }
649
666
 
650
667
  &__info {
651
668
  display: flex;
@@ -659,6 +676,32 @@ $box-shadow-dark-color: rgb(0 0 0 / 60%);
659
676
  margin: 0;
660
677
  }
661
678
  }
679
+
680
+ &__icons {
681
+ display: flex;
682
+ align-items: center;
683
+ gap: 16px;
684
+
685
+ &--trash {
686
+ display: flex;
687
+ align-items: center;
688
+ }
689
+
690
+ &--refresh {
691
+ cursor: default !important;
692
+ animation: spin 1s linear infinite;
693
+ }
694
+ }
695
+
696
+ svg {
697
+ cursor: pointer;
698
+ }
699
+ }
700
+
701
+ @keyframes spin {
702
+ to {
703
+ transform: rotate(360deg);
704
+ }
662
705
  }
663
706
 
664
707
  .smartapp-input {
@@ -700,6 +743,7 @@ $box-shadow-dark-color: rgb(0 0 0 / 60%);
700
743
  outline: none;
701
744
  }
702
745
  }
746
+
703
747
  &--eye-button {
704
748
  display: flex;
705
749
  align-items: center;
@@ -729,31 +773,33 @@ $box-shadow-dark-color: rgb(0 0 0 / 60%);
729
773
  }
730
774
 
731
775
  .smartapp-loader-wrapper {
732
- position: fixed;
733
- z-index: 100;
734
- top: 0;
735
- right: 0;
736
- bottom: 0;
737
- left: 0;
738
776
  display: flex;
739
777
  align-items: center;
740
778
  justify-content: center;
741
- background: $color-lighter-gray;
779
+
780
+ &__full-screen {
781
+ position: fixed;
782
+ top: 0;
783
+ right: 0;
784
+ bottom: 0;
785
+ left: 0;
786
+ z-index: 100;
787
+ }
742
788
  }
743
789
 
744
790
  .smartapp-loader {
745
791
  display: flex;
746
792
  flex-direction: column;
747
793
  align-items: center;
748
- width: 150px;
794
+ gap: 16px;
795
+ padding: 8px 0;
749
796
 
750
797
  &__title {
751
- margin: 8px 0 0 0;
752
798
  font-weight: 400;
753
- font-size: 14px;
754
- line-height: 19px;
799
+ text-align: center;
755
800
  color: $color-darker-gray;
756
801
  word-break: break-word;
802
+ margin: 0;
757
803
  }
758
804
  }
759
805
 
@@ -941,6 +987,23 @@ input:checked + .smartapp-slider:before {
941
987
  }
942
988
 
943
989
  .smartapp-stories-content {
990
+ &__background-video {
991
+ position: absolute;
992
+ width: 100%;
993
+ height: 100%;
994
+ background: $color-black;
995
+ object-fit: cover;
996
+ -webkit-filter: brightness(0.8) blur(15px);
997
+ filter: brightness(0.8) blur(15px);
998
+ -webkit-transform: scale(1.2, 1.1);
999
+ transform: scale(1.2, 1.1);
1000
+ }
1001
+
1002
+ & > .smartapp-stories-content__background-video:last-child {
1003
+ -webkit-transform: scale(1.1, 1.1);
1004
+ transform: scale(1.1, 1.1);
1005
+ }
1006
+
944
1007
  &::before {
945
1008
  content: '';
946
1009
  position: absolute;
@@ -960,6 +1023,17 @@ input:checked + .smartapp-slider:before {
960
1023
  height: 100%;
961
1024
  position: relative;
962
1025
 
1026
+ & > div > div:nth-child(2) > div {
1027
+ width: 100%;
1028
+ height: 100%;
1029
+
1030
+ & > video:first-child {
1031
+ width: 100% !important;
1032
+ height: 100%;
1033
+ z-index: 2;
1034
+ }
1035
+ }
1036
+
963
1037
  &__web {
964
1038
  width: 400px;
965
1039
  }
@@ -969,6 +1043,10 @@ input:checked + .smartapp-slider:before {
969
1043
  width: 100%;
970
1044
  }
971
1045
 
1046
+ &__video {
1047
+ z-index: 1;
1048
+ }
1049
+
972
1050
  &__story {
973
1051
  color: $color-white;
974
1052
  padding-top: var(--padding);
@@ -1006,8 +1084,6 @@ input:checked + .smartapp-slider:before {
1006
1084
  font-weight: 600;
1007
1085
  line-height: 19px;
1008
1086
  text-align: center;
1009
- color: $color-black;
1010
- background: $color-white;
1011
1087
  border-radius: 8px;
1012
1088
  padding: 12px 32px;
1013
1089
  cursor: pointer;
@@ -1061,3 +1137,90 @@ input:checked + .smartapp-slider:before {
1061
1137
  padding-right: 24px !important;
1062
1138
  }
1063
1139
  }
1140
+
1141
+ .smartapp-sync-loader {
1142
+ position: absolute;
1143
+ left: 0;
1144
+ right: 0;
1145
+ width: fit-content;
1146
+ display: flex;
1147
+ align-items: center;
1148
+ gap: 8px;
1149
+ border-radius: 100px;
1150
+ box-shadow: 0 1px 8px 0 $box-shadow-light-color;
1151
+ padding: 8px 12px;
1152
+ margin: 16px auto 0 auto;
1153
+ z-index: 1000;
1154
+ animation: loader-appear 0.25s linear;
1155
+
1156
+ &__text {
1157
+ font-size: 12px;
1158
+ font-weight: 600;
1159
+ line-height: 16px;
1160
+ display: flex;
1161
+ color: $color-black;
1162
+
1163
+ &--dark {
1164
+ color: $color-white;
1165
+ }
1166
+
1167
+ &--dots {
1168
+ width: 1.5ch;
1169
+ display: flex;
1170
+ justify-content: flex-start;
1171
+
1172
+ &__dot {
1173
+ opacity: 0;
1174
+ animation: dot-appear 1s ease-in 1;
1175
+
1176
+ &:nth-child(1) {
1177
+ animation-delay: 0.2s;
1178
+ }
1179
+
1180
+ &:nth-child(2) {
1181
+ animation-delay: 0.4s;
1182
+ }
1183
+
1184
+ &:nth-child(3) {
1185
+ animation-delay: 0.6s;
1186
+ }
1187
+ }
1188
+ }
1189
+ }
1190
+
1191
+ &__icon {
1192
+ animation: loader-spin 1s linear infinite;
1193
+ }
1194
+ }
1195
+
1196
+ @keyframes loader-appear {
1197
+ from {
1198
+ transform: scale(0);
1199
+ opacity: 0;
1200
+ }
1201
+ to {
1202
+ transform: scale(1);
1203
+ opacity: 1;
1204
+ }
1205
+ }
1206
+
1207
+ @keyframes dot-appear {
1208
+ 0% {
1209
+ opacity: 0;
1210
+ }
1211
+ 25% {
1212
+ opacity: 0.5;
1213
+ }
1214
+ 50% {
1215
+ opacity: 1;
1216
+ }
1217
+ 100% {
1218
+ opacity: 1;
1219
+ }
1220
+ }
1221
+
1222
+ @keyframes loader-spin {
1223
+ to {
1224
+ transform: rotate(360deg);
1225
+ }
1226
+ }