@openlettermarketing/olc-react-sdk 2.1.4 → 2.1.5-beta.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 (230) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.cjs +18 -0
  3. package/.eslintrc.yml +47 -0
  4. package/.github/workflows/publish-beta.yml +154 -0
  5. package/.github/workflows/publish-production.yml +143 -0
  6. package/.prettierignore +3 -0
  7. package/.prettierrc.yml +5 -0
  8. package/CHANGELOG.md +4 -0
  9. package/babel.config.json +10 -0
  10. package/build/index.js +82 -82
  11. package/build/index.js.map +1 -1
  12. package/build/types/version.d.ts +1 -1
  13. package/examples/.eslintrc.yml +4 -0
  14. package/index.html +18 -0
  15. package/package.json +1 -1
  16. package/public/vite.svg +1 -0
  17. package/src/App.tsx +209 -0
  18. package/src/assets/Fonts/Lexi-Regular.ttf +0 -0
  19. package/src/assets/images/create-template/prebuilt.svg +13 -0
  20. package/src/assets/images/create-template/scratch.svg +4 -0
  21. package/src/assets/images/input/cancel.tsx +20 -0
  22. package/src/assets/images/input/search.tsx +20 -0
  23. package/src/assets/images/input/select-cancel.tsx +17 -0
  24. package/src/assets/images/modal-icons/add.tsx +36 -0
  25. package/src/assets/images/modal-icons/cancel-file.tsx +12 -0
  26. package/src/assets/images/modal-icons/cancel-input.tsx +13 -0
  27. package/src/assets/images/modal-icons/cancel.tsx +35 -0
  28. package/src/assets/images/modal-icons/close-new.svg +3 -0
  29. package/src/assets/images/modal-icons/confirm-close-icon.tsx +14 -0
  30. package/src/assets/images/modal-icons/confirm-new.tsx +22 -0
  31. package/src/assets/images/modal-icons/confirm.svg +12 -0
  32. package/src/assets/images/modal-icons/cross.tsx +23 -0
  33. package/src/assets/images/modal-icons/del.tsx +19 -0
  34. package/src/assets/images/modal-icons/design-icon.tsx +22 -0
  35. package/src/assets/images/modal-icons/doc.tsx +43 -0
  36. package/src/assets/images/modal-icons/docx.tsx +43 -0
  37. package/src/assets/images/modal-icons/envelope-icon.tsx +26 -0
  38. package/src/assets/images/modal-icons/info.tsx +19 -0
  39. package/src/assets/images/modal-icons/jpeg.tsx +43 -0
  40. package/src/assets/images/modal-icons/jpg.tsx +43 -0
  41. package/src/assets/images/modal-icons/modal-cros.svg +4 -0
  42. package/src/assets/images/modal-icons/modal-cross.tsx +37 -0
  43. package/src/assets/images/modal-icons/new-cancel.tsx +11 -0
  44. package/src/assets/images/modal-icons/order-download.tsx +42 -0
  45. package/src/assets/images/modal-icons/pdf.tsx +51 -0
  46. package/src/assets/images/modal-icons/png.tsx +43 -0
  47. package/src/assets/images/modal-icons/save.tsx +23 -0
  48. package/src/assets/images/modal-icons/template-copy.tsx +25 -0
  49. package/src/assets/images/modal-icons/tool-cancel.tsx +25 -0
  50. package/src/assets/images/products/bi-new.svg +23 -0
  51. package/src/assets/images/products/left-arrow.svg +17 -0
  52. package/src/assets/images/products/personal-new.tsx +31 -0
  53. package/src/assets/images/products/postcard-new.tsx +27 -0
  54. package/src/assets/images/products/professional-new.tsx +24 -0
  55. package/src/assets/images/products/real-new.tsx +30 -0
  56. package/src/assets/images/products/right-arrow.svg +17 -0
  57. package/src/assets/images/products/snap-new.svg +31 -0
  58. package/src/assets/images/templates/actions.svg +3 -0
  59. package/src/assets/images/templates/address-block-icon.tsx +62 -0
  60. package/src/assets/images/templates/archive.svg +3 -0
  61. package/src/assets/images/templates/arrow-down.tsx +27 -0
  62. package/src/assets/images/templates/back-arrow.tsx +19 -0
  63. package/src/assets/images/templates/bi-fold-self-mailers.tsx +28 -0
  64. package/src/assets/images/templates/check.svg +3 -0
  65. package/src/assets/images/templates/code.svg +10 -0
  66. package/src/assets/images/templates/content-copy-icon.tsx +24 -0
  67. package/src/assets/images/templates/custom-add-on-icon.tsx +18 -0
  68. package/src/assets/images/templates/custom-qr-section-icon.tsx +9 -0
  69. package/src/assets/images/templates/custom-template.tsx +23 -0
  70. package/src/assets/images/templates/designer.tsx +43 -0
  71. package/src/assets/images/templates/dot.tsx +22 -0
  72. package/src/assets/images/templates/download-v2.svg +4 -0
  73. package/src/assets/images/templates/download.svg +4 -0
  74. package/src/assets/images/templates/dummy-template.tsx +76 -0
  75. package/src/assets/images/templates/dynamic-field.tsx +119 -0
  76. package/src/assets/images/templates/edit-pencil-icon.tsx +21 -0
  77. package/src/assets/images/templates/edit.svg +3 -0
  78. package/src/assets/images/templates/epo-icon.tsx +16 -0
  79. package/src/assets/images/templates/field.tsx +29 -0
  80. package/src/assets/images/templates/gsv-icon.tsx +31 -0
  81. package/src/assets/images/templates/info-icon.tsx +37 -0
  82. package/src/assets/images/templates/left-arrow.svg +17 -0
  83. package/src/assets/images/templates/pencil.svg +3 -0
  84. package/src/assets/images/templates/personal-letter.tsx +53 -0
  85. package/src/assets/images/templates/postcard.tsx +32 -0
  86. package/src/assets/images/templates/professional-letter.tsx +53 -0
  87. package/src/assets/images/templates/qr-code.tsx +13 -0
  88. package/src/assets/images/templates/real-penned-letters.tsx +57 -0
  89. package/src/assets/images/templates/right-arrow.svg +17 -0
  90. package/src/assets/images/templates/size-image-lg.tsx +20 -0
  91. package/src/assets/images/templates/size-image-mid.tsx +20 -0
  92. package/src/assets/images/templates/size-image-xl.tsx +20 -0
  93. package/src/assets/images/templates/size-image.tsx +20 -0
  94. package/src/assets/images/templates/snap-pack.tsx +67 -0
  95. package/src/assets/images/templates/template-default-design.tsx +21 -0
  96. package/src/assets/images/templates/trash-upload.svg +3 -0
  97. package/src/assets/images/templates/trash.svg +3 -0
  98. package/src/assets/images/templates/tri-fold-self-mailers.tsx +93 -0
  99. package/src/assets/images/templates/upload-image.svg +10 -0
  100. package/src/assets/images/templates/x.svg +3 -0
  101. package/src/assets/images/thumbnails/one.svg +9 -0
  102. package/src/assets/images/tooltip/tool-arrow.tsx +25 -0
  103. package/src/components/CreateTemplate/V2/index.tsx +525 -0
  104. package/src/components/CreateTemplate/V2/styles.scss +372 -0
  105. package/src/components/CreateTemplate/index.tsx +508 -0
  106. package/src/components/CreateTemplate/styles.scss +404 -0
  107. package/src/components/GenericUIBlocks/Button/index.tsx +54 -0
  108. package/src/components/GenericUIBlocks/Button/styles.scss +43 -0
  109. package/src/components/GenericUIBlocks/CircularProgress/index.tsx +18 -0
  110. package/src/components/GenericUIBlocks/CircularProgress/styles.scss +93 -0
  111. package/src/components/GenericUIBlocks/CustomTooltip/index.tsx +88 -0
  112. package/src/components/GenericUIBlocks/CustomTooltip/styles.scss +19 -0
  113. package/src/components/GenericUIBlocks/Dialog/V2/index.tsx +227 -0
  114. package/src/components/GenericUIBlocks/Dialog/V2/styles.scss +289 -0
  115. package/src/components/GenericUIBlocks/Dialog/index.tsx +185 -0
  116. package/src/components/GenericUIBlocks/Dialog/styles.scss +227 -0
  117. package/src/components/GenericUIBlocks/Divider/index.tsx +12 -0
  118. package/src/components/GenericUIBlocks/Divider/styles.scss +7 -0
  119. package/src/components/GenericUIBlocks/GeneralSelect/index.tsx +114 -0
  120. package/src/components/GenericUIBlocks/GeneralSelect/styles.scss +406 -0
  121. package/src/components/GenericUIBlocks/GeneralTooltip/index.tsx +25 -0
  122. package/src/components/GenericUIBlocks/GeneralTooltip/styles.scss +20 -0
  123. package/src/components/GenericUIBlocks/GenericSnackbar/Toast/index.tsx +91 -0
  124. package/src/components/GenericUIBlocks/GenericSnackbar/Toast/styles.scss +92 -0
  125. package/src/components/GenericUIBlocks/Grid/index.tsx +82 -0
  126. package/src/components/GenericUIBlocks/Input/index.tsx +269 -0
  127. package/src/components/GenericUIBlocks/Input/styles.scss +332 -0
  128. package/src/components/GenericUIBlocks/Tabs/index.tsx +71 -0
  129. package/src/components/GenericUIBlocks/Tabs/styles.scss +42 -0
  130. package/src/components/GenericUIBlocks/Typography/index.tsx +18 -0
  131. package/src/components/GenericUIBlocks/Typography/styles.scss +27 -0
  132. package/src/components/SidePanel/CustomAddOns/index.tsx +342 -0
  133. package/src/components/SidePanel/CustomAddOns/styles.scss +86 -0
  134. package/src/components/SidePanel/CustomBlockColors/index.tsx +211 -0
  135. package/src/components/SidePanel/CustomBlockColors/styles.scss +80 -0
  136. package/src/components/SidePanel/CustomFields/customFieldSection.tsx +547 -0
  137. package/src/components/SidePanel/CustomFields/styles.scss +64 -0
  138. package/src/components/SidePanel/CustomQRCode/V2/QRCodeModal/index.tsx +172 -0
  139. package/src/components/SidePanel/CustomQRCode/V2/QRCodeModal/styles.scss +46 -0
  140. package/src/components/SidePanel/CustomQRCode/index.tsx +1070 -0
  141. package/src/components/SidePanel/CustomQRCode/styles.scss +149 -0
  142. package/src/components/SidePanel/CustomUploads/V2/index.tsx +542 -0
  143. package/src/components/SidePanel/CustomUploads/V2/styles.scss +267 -0
  144. package/src/components/SidePanel/CustomUploads/index.tsx +301 -0
  145. package/src/components/SidePanel/Templates/ModalGallery/HireDesigner/index.tsx +424 -0
  146. package/src/components/SidePanel/Templates/ModalGallery/HireDesigner/styles.scss +180 -0
  147. package/src/components/SidePanel/Templates/ModalGallery/V2/index.tsx +235 -0
  148. package/src/components/SidePanel/Templates/ModalGallery/V2/styles.scss +244 -0
  149. package/src/components/SidePanel/Templates/ModalGallery/index.tsx +231 -0
  150. package/src/components/SidePanel/Templates/SideBarGallery/index.tsx +233 -0
  151. package/src/components/SidePanel/Templates/SideBarGallery/styles.scss +152 -0
  152. package/src/components/SidePanel/Templates/TemplatesCard/V2/index.tsx +149 -0
  153. package/src/components/SidePanel/Templates/TemplatesCard/V2/styles.scss +156 -0
  154. package/src/components/SidePanel/Templates/TemplatesCard/index.tsx +160 -0
  155. package/src/components/SidePanel/Templates/TemplatesCard/styles.scss +98 -0
  156. package/src/components/SidePanel/Templates/customTemplateSection.tsx +793 -0
  157. package/src/components/SidePanel/Templates/styles.scss +244 -0
  158. package/src/components/SidePanel/index.tsx +160 -0
  159. package/src/components/TemplateBuilder/index.tsx +585 -0
  160. package/src/components/TemplateBuilder/styles.scss +100 -0
  161. package/src/components/TemplateTypes/index.tsx +96 -0
  162. package/src/components/TemplateTypes/styles.scss +91 -0
  163. package/src/components/TopNavigation/ConfirmNavigateDialog/index.tsx +81 -0
  164. package/src/components/TopNavigation/ConfirmNavigateDialog/styles.scss +123 -0
  165. package/src/components/TopNavigation/DuplicateTemplateModal.tsx +103 -0
  166. package/src/components/TopNavigation/EditTemplateNameModel/index.tsx +71 -0
  167. package/src/components/TopNavigation/EditTemplateNameModel/styles.scss +88 -0
  168. package/src/components/TopNavigation/SaveTemplateModel/index.tsx +201 -0
  169. package/src/components/TopNavigation/SaveTemplateModel/styles.scss +128 -0
  170. package/src/components/TopNavigation/index.tsx +938 -0
  171. package/src/components/TopNavigation/styles.scss +303 -0
  172. package/src/importMeta.d.ts +31 -0
  173. package/src/index.scss +131 -0
  174. package/src/index.tsx +238 -0
  175. package/src/libs/test.ts +7 -0
  176. package/src/redux/actions/action-types.ts +52 -0
  177. package/src/redux/actions/customQRCodeActions.ts +54 -0
  178. package/src/redux/actions/snackbarActions.ts +16 -0
  179. package/src/redux/actions/templateActions.ts +236 -0
  180. package/src/redux/reducers/customFieldReducer.ts +99 -0
  181. package/src/redux/reducers/customQRCodeReducer.ts +58 -0
  182. package/src/redux/reducers/index.ts +15 -0
  183. package/src/redux/reducers/snackbarReducer.ts +40 -0
  184. package/src/redux/reducers/templateReducer.ts +485 -0
  185. package/src/redux/store.ts +18 -0
  186. package/src/styles/colors.scss +61 -0
  187. package/src/test/mocks.js +89 -0
  188. package/src/test/setupJest.js +1 -0
  189. package/src/utils/api.ts +36 -0
  190. package/src/utils/constants.ts +182 -0
  191. package/src/utils/customStyles.ts +45 -0
  192. package/src/utils/fetchWrapper.ts +73 -0
  193. package/src/utils/fonts.json +1597 -0
  194. package/src/utils/helper.ts +205 -0
  195. package/src/utils/local-storage.ts +15 -0
  196. package/src/utils/message.ts +162 -0
  197. package/src/utils/products.ts +186 -0
  198. package/src/utils/template-builder.ts +328 -0
  199. package/src/utils/templateIdentifierArea/biFold.ts +107 -0
  200. package/src/utils/templateIdentifierArea/index.ts +35 -0
  201. package/src/utils/templateIdentifierArea/personal.ts +107 -0
  202. package/src/utils/templateIdentifierArea/postCards.ts +163 -0
  203. package/src/utils/templateIdentifierArea/professional.ts +125 -0
  204. package/src/utils/templateIdentifierArea/snapPack.ts +107 -0
  205. package/src/utils/templateIdentifierArea/triFold.ts +107 -0
  206. package/src/utils/templateRestrictedArea/biFold.ts +329 -0
  207. package/src/utils/templateRestrictedArea/nonWindowProfessional.ts +90 -0
  208. package/src/utils/templateRestrictedArea/personal.ts +90 -0
  209. package/src/utils/templateRestrictedArea/postCard.ts +334 -0
  210. package/src/utils/templateRestrictedArea/postCardJumbo.tsx +408 -0
  211. package/src/utils/templateRestrictedArea/professional.ts +318 -0
  212. package/src/utils/templateRestrictedArea/realPenned.ts +233 -0
  213. package/src/utils/templateRestrictedArea/snapPack.ts +1009 -0
  214. package/src/utils/templateRestrictedArea/triFold.ts +330 -0
  215. package/src/utils/templateSafetyBorders/biFold.ts +91 -0
  216. package/src/utils/templateSafetyBorders/index.ts +43 -0
  217. package/src/utils/templateSafetyBorders/personal.ts +41 -0
  218. package/src/utils/templateSafetyBorders/postCards.ts +259 -0
  219. package/src/utils/templateSafetyBorders/professional.ts +78 -0
  220. package/src/utils/templateSafetyBorders/snapPack.ts +165 -0
  221. package/src/utils/templateSafetyBorders/triFold.ts +114 -0
  222. package/src/utils/templateSafetyBorders/types.d.ts +68 -0
  223. package/src/utils/types.ts +12 -0
  224. package/src/v2Theme.scss +142 -0
  225. package/tsconfig.json +29 -0
  226. package/tsconfig.node.json +12 -0
  227. package/update-version.js +23 -0
  228. package/version.js +1 -0
  229. package/vite.config.ts +8 -0
  230. package/webpack.config.js +80 -0
@@ -0,0 +1,406 @@
1
+ .select-layout {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: flex-start;
5
+ justify-content: flex-start;
6
+ width: 100%;
7
+ gap: 8px;
8
+
9
+ label {
10
+ color: var(--text-color);
11
+ font-size: 14px;
12
+ font-style: normal;
13
+ font-weight: 400;
14
+ line-height: normal;
15
+ margin-bottom: 5px;
16
+ }
17
+
18
+ .generic-select-container {
19
+ width: 100%;
20
+ cursor: pointer;
21
+ font-size: 16px;
22
+ line-height: 21px;
23
+ .generic-select__control {
24
+ height: 100%;
25
+ min-height: 55px;
26
+ background-color: transparent;
27
+ border: 0.5px solid var(--border-color);
28
+ border-radius: 7px;
29
+ padding-left: 10px;
30
+ font-size: 14px;
31
+ .generic-select__value-container {
32
+ .generic-select__placeholder{
33
+ color: var(--text-color);
34
+ opacity: 0.5;
35
+ }
36
+ .generic-select__input-container{
37
+ color: var(--text-color);
38
+ }
39
+ .generic-select__single-value {
40
+ color: var(--text-color);
41
+ font-size: 14px;
42
+ }
43
+ }
44
+ &:hover {
45
+ border: 0.5px solid var(--border-color);
46
+ }
47
+ &::placeholder {
48
+ opacity: 0.5;
49
+ }
50
+ &.generic-select__control--is-focused {
51
+ border: 0.5px solid var(--border-color);
52
+ box-shadow: none;
53
+ }
54
+ .generic-select__indicators {
55
+ transition: 0.2s ease-in all;
56
+ .generic-select__indicator-separator {
57
+ display: none !important;
58
+ }
59
+ .generic-select__clear-indicator{
60
+ svg{
61
+ width: 22px;
62
+ cursor: pointer;
63
+ }
64
+ }
65
+ }
66
+ }
67
+
68
+ .generic-select__menu {
69
+ .generic-select__menu-list {
70
+ padding: 0px 5px;
71
+ .generic-select__menu-notice{
72
+ cursor: not-allowed;
73
+ color: var(--text-color);
74
+ }
75
+ .generic-select__option {
76
+ font-size: 14px;
77
+ font-weight: 400;
78
+ line-height: 16.94px;
79
+ text-align: left;
80
+ color: var(--text-color);
81
+ padding: auto 10px;
82
+ border-bottom: 0.5px solid var(--border-color);
83
+ cursor: pointer;
84
+ &:last-child {
85
+ border: none;
86
+ }
87
+ &.generic-select__option--is-focused {
88
+ background-color: var(--secondary-color);
89
+ color: var(--text-color);
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ .template-select{
96
+ .generic-select__control{
97
+ .generic-select__value-container{
98
+ .generic-select__placeholder{
99
+ color: #000;
100
+ }
101
+ .generic-select__input-container{
102
+ color: #000;
103
+ }
104
+ .generic-select__single-value {
105
+ color: #000;
106
+ }
107
+ }
108
+ }
109
+
110
+ .generic-select__menu {
111
+ .generic-select__menu-list {
112
+ .generic-select__menu-notice{
113
+ color: #000;
114
+ }
115
+ .generic-select__option {
116
+ color: #000;
117
+ border-bottom: 0.5px solid #303030;
118
+ &:last-child {
119
+ border: none;
120
+ }
121
+ &.generic-select__option--is-focused {
122
+ color: #000;
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+
129
+ .gallery-select{
130
+ .generic-select__control{
131
+ background-color: #fff !important;
132
+ min-height: 40px !important;
133
+ border-radius: 3px !important;
134
+ min-width: 320px !important;
135
+ .generic-select__value-container{
136
+ .generic-select__placeholder{
137
+ color: #000;
138
+ }
139
+ .generic-select__input-container{
140
+ color: #000;
141
+ }
142
+ .generic-select__single-value {
143
+ color: #000;
144
+ }
145
+ }
146
+ }
147
+
148
+ .generic-select__menu {
149
+ box-shadow: 0 0 3px 1px hsla(0, 0%, 0%, 0.1),0 4px 11px hsla(0, 0%, 0%, 0.1) !important;
150
+ .generic-select__menu-list {
151
+ padding: 12px !important;
152
+ .generic-select__menu-notice{
153
+ color: #000;
154
+ }
155
+ .generic-select__option {
156
+ color: #000;
157
+ font-size: 14px !important;
158
+ font-weight: 300 !important;
159
+ border-bottom: 0.5px solid rgba(84, 84, 84, 0.3);
160
+ padding: 12px !important;
161
+ &:last-child {
162
+ border: none;
163
+ }
164
+ &.generic-select__option--is-focused {
165
+ color: #000;
166
+ }
167
+ }
168
+ }
169
+ }
170
+ }
171
+
172
+ .qr-select{
173
+ .generic-select__control{
174
+ min-height: 35px !important;
175
+ border-radius: 3px !important;
176
+ }
177
+ }
178
+ }
179
+
180
+ .select-layout-v2 {
181
+ display: flex;
182
+ flex-direction: column;
183
+ align-items: flex-start;
184
+ justify-content: flex-start;
185
+ width: 100%;
186
+ gap: 8px;
187
+
188
+ label {
189
+ color: var(--text-color);
190
+ font-size: 14px;
191
+ font-style: normal;
192
+ font-weight: 500;
193
+ line-height: normal;
194
+ margin-bottom: 5px;
195
+ }
196
+
197
+ .generic-select-container {
198
+ width: 100%;
199
+ cursor: pointer;
200
+ font-size: 16px;
201
+ line-height: 21px;
202
+ .generic-select__control {
203
+ height: 44px;
204
+ background-color: transparent;
205
+ border: 1px solid #E5E7EB;
206
+ border-radius: 4px;
207
+ padding-left: 10px;
208
+ font-size: 14px;
209
+ .generic-select__value-container {
210
+ .generic-select__placeholder{
211
+ color: var(--text-color);
212
+ opacity: 0.5;
213
+ }
214
+ .generic-select__input-container{
215
+ color: var(--text-color);
216
+ }
217
+ .generic-select__single-value {
218
+ color: var(--text-color);
219
+ font-size: 14px;
220
+ }
221
+ }
222
+ &:hover {
223
+ cursor: pointer;
224
+ }
225
+ &::placeholder {
226
+ opacity: 0.5;
227
+ }
228
+ &.generic-select__control--is-focused {
229
+ box-shadow: none;
230
+ }
231
+ .generic-select__indicators {
232
+ transition: 0.2s ease-in all;
233
+ .generic-select__indicator-separator {
234
+ display: none !important;
235
+ }
236
+ .generic-select__clear-indicator{
237
+ svg{
238
+ width: 22px;
239
+ cursor: pointer;
240
+ }
241
+ }
242
+ }
243
+ }
244
+
245
+ .generic-select__menu {
246
+ .generic-select__menu-list {
247
+ padding: 0px 5px;
248
+ max-height: 160px !important;
249
+ .generic-select__menu-notice{
250
+ cursor: not-allowed;
251
+ color: var(--text-color);
252
+ }
253
+ .generic-select__option {
254
+ font-size: 14px;
255
+ font-weight: 400;
256
+ line-height: 16.94px;
257
+ text-align: left;
258
+ color: var(--text-color);
259
+ padding: auto 10px;
260
+ border-bottom: 0.5px solid var(--border-color);
261
+ cursor: pointer;
262
+ transition: all 0.3s ease;
263
+
264
+ &:last-child {
265
+ border: none;
266
+ }
267
+
268
+ &.generic-select__option--is-focused {
269
+ background-color: var(--secondary-color);
270
+ color: var(--text-color);
271
+ }
272
+ }
273
+ }
274
+ }
275
+ }
276
+ .template-select{
277
+ .generic-select__control{
278
+ .generic-select__value-container{
279
+ .generic-select__placeholder{
280
+ color: #000;
281
+ }
282
+ .generic-select__input-container{
283
+ color: #000;
284
+ }
285
+ .generic-select__single-value {
286
+ color: #000;
287
+ }
288
+ }
289
+ }
290
+
291
+ .generic-select__menu {
292
+ .generic-select__menu-list {
293
+ .generic-select__menu-notice{
294
+ color: #000;
295
+ }
296
+ .generic-select__option {
297
+ color: #000;
298
+ border-bottom: 0.5px solid #303030;
299
+ &:last-child {
300
+ border: none;
301
+ }
302
+ &.generic-select__option--is-focused {
303
+ color: #000;
304
+ }
305
+ }
306
+ }
307
+ }
308
+ }
309
+
310
+ .gallery-select{
311
+ .generic-select__control{
312
+ background-color: #fff !important;
313
+ min-height: 48px !important;
314
+ height: 48px !important;
315
+ border-radius: 8px !important;
316
+ border: 1px solid #E5E5E5 !important;
317
+ padding: 0 12px !important;
318
+ box-shadow: none !important;
319
+
320
+ &:hover {
321
+ border: 1px solid #E5E5E5 !important;
322
+ }
323
+
324
+ &.generic-select__control--is-focused {
325
+ border: 1px solid #E5E5E5 !important;
326
+ box-shadow: none !important;
327
+ }
328
+
329
+ .generic-select__value-container{
330
+ padding: 0 !important;
331
+
332
+ .generic-select__placeholder{
333
+ color: #303030;
334
+ font-size: 14px;
335
+ font-weight: 400;
336
+ margin: 0;
337
+ }
338
+ .generic-select__input-container{
339
+ color: #303030;
340
+ margin: 0;
341
+ padding: 0;
342
+ }
343
+ .generic-select__single-value {
344
+ color: #303030;
345
+ font-size: 14px;
346
+ font-weight: 400;
347
+ margin: 0;
348
+ }
349
+ }
350
+
351
+ .generic-select__indicators {
352
+ .generic-select__dropdown-indicator {
353
+ padding: 0 !important;
354
+ }
355
+ }
356
+ }
357
+
358
+ .generic-select__menu {
359
+ border-radius: 8px !important;
360
+ box-shadow: 0 0 3px 1px hsla(0, 0%, 0%, 0.1),0 4px 11px hsla(0, 0%, 0%, 0.1) !important;
361
+ border: 1px solid #E5E5E5 !important;
362
+ margin-top: 4px !important;
363
+
364
+ .generic-select__menu-list {
365
+ padding: 8px !important;
366
+ border-radius: 8px !important;
367
+
368
+ .generic-select__menu-notice{
369
+ color: #303030;
370
+ font-size: 14px;
371
+ }
372
+ .generic-select__option {
373
+ color: #303030;
374
+ font-size: 14px !important;
375
+ font-weight: 400 !important;
376
+ border-radius: 4px !important;
377
+ padding: 10px 12px !important;
378
+ margin-bottom: 2px !important;
379
+ border: none !important;
380
+
381
+ &:last-child {
382
+ border: none;
383
+ margin-bottom: 0 !important;
384
+ }
385
+
386
+ &.generic-select__option--is-focused {
387
+ background-color: #F5F5F5 !important;
388
+ color: #303030;
389
+ }
390
+
391
+ &.generic-select__option--is-selected {
392
+ // background-color: #F0F0F0 !important;
393
+ color: #303030;
394
+ }
395
+ }
396
+ }
397
+ }
398
+ }
399
+
400
+ .qr-select{
401
+ .generic-select__control{
402
+ min-height: 35px !important;
403
+ border-radius: 3px !important;
404
+ }
405
+ }
406
+ }
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+
3
+ // react-tooltip
4
+ import { Tooltip } from 'react-tooltip';
5
+ import 'react-tooltip/dist/react-tooltip.css';
6
+
7
+ // styles
8
+ import './styles.scss';
9
+
10
+ interface GeneralTooltipProps {
11
+ anchorSelect: string;
12
+ place: 'top' | 'right' | 'bottom' | 'left';
13
+ title: string | React.ReactNode;
14
+ className?: string;
15
+ }
16
+
17
+ const GeneralTooltip: React.FC<GeneralTooltipProps> = ({ anchorSelect, place, title, className }) => {
18
+ return (
19
+ <Tooltip className={`basic-tooltip ${className}`} anchorSelect={anchorSelect} place={place}>
20
+ {title}
21
+ </Tooltip>
22
+ );
23
+ };
24
+
25
+ export default GeneralTooltip;
@@ -0,0 +1,20 @@
1
+ .basic-tooltip {
2
+ width: 90%;
3
+ max-width: fit-content;
4
+ text-align: center !important;
5
+ background-color: #ffffff !important;
6
+ color: #000 !important;
7
+ box-shadow: 0px 0px 12px 0px #989595 !important;
8
+ opacity: 1;
9
+ z-index: 1;
10
+ animation: fadeIn 0.1s ease-in-out !important;
11
+ }
12
+
13
+ @keyframes fadeIn {
14
+ from {
15
+ opacity: 0;
16
+ }
17
+ to {
18
+ opacity: 1 !important;
19
+ }
20
+ }
@@ -0,0 +1,91 @@
1
+ import React, { useEffect, useState } from 'react';
2
+
3
+ // Action
4
+ import { CLEAR_SNACKBAR } from '../../../../redux/actions/action-types';
5
+
6
+ // redux
7
+ import { useDispatch, useSelector } from 'react-redux';
8
+ import { AppDispatch, RootState } from '../../../../redux/store';
9
+
10
+ // utils
11
+ import { MESSAGES } from '../../../../utils/message';
12
+
13
+ // icon
14
+ import Cross from '../../../../assets/images/modal-icons/cross';
15
+
16
+ // styles
17
+ import './styles.scss';
18
+
19
+ const GenericSnackbar = () => {
20
+ const open = useSelector(
21
+ (state: RootState) => state.snackbarReducers.snackbar.open
22
+ );
23
+
24
+ const heading = useSelector(
25
+ (state: RootState) => state.snackbarReducers.snackbar.heading
26
+ );
27
+ const message = useSelector(
28
+ (state: RootState) => state.snackbarReducers.snackbar.message
29
+ );
30
+ const dispatch: AppDispatch = useDispatch();
31
+
32
+ const snackbar = useSelector((state: any) => state.snackbarReducers.snackbar); // Adjust this based on your root reducer
33
+
34
+ const Toast: React.FC<{
35
+ snackMessage: string;
36
+ snackHeading: string;
37
+ type: 'success' | 'error';
38
+ onClose: () => void;
39
+ onPauseHover: boolean;
40
+ }> = ({ snackMessage, snackHeading, type, onClose, onPauseHover }) => {
41
+ const [animateOut, setAnimateOut] = useState(false); // Control when to start exit animation
42
+
43
+ useEffect(() => {
44
+ // Automatically trigger exit after 3 seconds
45
+ const autoCloseTimer = setTimeout(() => {
46
+ setAnimateOut(true); // Start exit animation
47
+ dispatch({ type: CLEAR_SNACKBAR });
48
+ }, 3000);
49
+
50
+ // Fully remove the toast after exit animation finishes
51
+ const removeTimer = setTimeout(() => {
52
+ onClose();
53
+ }, 3500); // 3.5s allows the exit animation to complete
54
+
55
+ return () => {
56
+ clearTimeout(autoCloseTimer);
57
+ clearTimeout(removeTimer);
58
+ };
59
+ }, [open, onClose]);
60
+
61
+ return (
62
+ <div className={`toast ${type} ${animateOut ? 'slideOut' : 'slideIn'}`}>
63
+ <div className="toastContent">
64
+ <span>{snackHeading || 'Notifications'}</span>
65
+ <p>{snackMessage || MESSAGES.GENERAL_ERROR}</p>
66
+ </div>
67
+ <button className="closeIcon" onClick={onClose}>
68
+ <Cross toast={true} />
69
+ </button>
70
+ </div>
71
+ );
72
+ };
73
+
74
+ return (
75
+ <>
76
+ <div className={`toast-container ${!open && 'noToast'}`}>
77
+ {open && (
78
+ <Toast
79
+ snackMessage={message}
80
+ snackHeading={heading}
81
+ type={snackbar.status}
82
+ onClose={() => dispatch({ type: CLEAR_SNACKBAR })}
83
+ onPauseHover={true}
84
+ />
85
+ )}
86
+ </div>
87
+ </>
88
+ );
89
+ };
90
+
91
+ export default GenericSnackbar;
@@ -0,0 +1,92 @@
1
+ .toast-container {
2
+ position: fixed;
3
+ top: 10px;
4
+ right: 10px;
5
+ width: 100%;
6
+ min-width: 370px !important;
7
+ max-width: fit-content;
8
+ height: 100%;
9
+ max-height: 75px;
10
+ z-index: 999999999 !important;
11
+
12
+ .toast {
13
+ display: flex;
14
+ justify-content: space-between;
15
+ align-items: center;
16
+ background-color: var(--notification-background-color);
17
+ padding: 10px 10px 10px 15px;
18
+ height: 100%;
19
+ border-radius: 10px;
20
+ position: relative;
21
+ opacity: 0;
22
+ transform: translateX(100%);
23
+
24
+ &.slideIn{
25
+ animation: slideIn 0.2s ease-in forwards;
26
+ }
27
+
28
+ &.slideOut{
29
+ animation: slideOut 0.2s ease-in forwards;
30
+ }
31
+
32
+ .toastContent {
33
+ display: flex;
34
+ flex-direction: column;
35
+ gap: 5px;
36
+ span {
37
+ font-family: var(--font-family) !important;
38
+ color: var(--notification-text-color);
39
+ font-weight: 600;
40
+ }
41
+ p {
42
+ font-family: var(--font-family) !important;
43
+ color: var(--notification-text-color);
44
+ margin: 0;
45
+ }
46
+ }
47
+
48
+ .closeIcon {
49
+ position: absolute;
50
+ top: 5px;
51
+ right: 0;
52
+ background: none;
53
+ border: none;
54
+ cursor: pointer;
55
+ &:focus{
56
+ outline: none;
57
+ border: none;
58
+ }
59
+ svg{
60
+ width: 25px;
61
+ height: 18px;
62
+ }
63
+ }
64
+ }
65
+
66
+ /* Slide-in from the right */
67
+ @keyframes slideIn {
68
+ 0% {
69
+ opacity: 0;
70
+ transform: translateX(100%);
71
+ }
72
+ 100% {
73
+ opacity: 1;
74
+ transform: translateX(0);
75
+ }
76
+ }
77
+
78
+ /* Slide-out to the right */
79
+ @keyframes slideOut {
80
+ 0% {
81
+ opacity: 1;
82
+ transform: translateX(0);
83
+ }
84
+ 100% {
85
+ opacity: 0;
86
+ transform: translateX(100%);
87
+ }
88
+ }
89
+ }
90
+ .noToast{
91
+ display: none !important;
92
+ }
@@ -0,0 +1,82 @@
1
+ // src/components/Grid.js
2
+ import React from 'react';
3
+
4
+ // styled components
5
+ import styled from 'styled-components';
6
+
7
+ interface GridItemProps {
8
+ xs?: number;
9
+ sm?: number;
10
+ md?: number;
11
+ lg?: number;
12
+ xl?: number;
13
+ }
14
+
15
+ const breakpoints = {
16
+ xs: '0px',
17
+ sm: '600px',
18
+ md: '960px',
19
+ lg: '1280px',
20
+ xl: '1920px',
21
+ };
22
+
23
+ const Container = styled.div`
24
+ display: flex;
25
+ flex-wrap: wrap;
26
+ width: 100%;
27
+ `;
28
+
29
+ const Col = styled.div<GridItemProps>`
30
+ padding: 0 8px;
31
+ box-sizing: border-box;
32
+ ${(props) =>
33
+ props.xs &&
34
+ `flex: 0 0 ${(props.xs / 12) * 100}%;
35
+ max-width: ${
36
+ (props.xs / 12) * 100
37
+ }%;`}
38
+ @media (min-width: ${breakpoints.sm}) {
39
+ ${(props) =>
40
+ props.sm &&
41
+ `flex: 0 0 ${(props.sm / 12) * 100}%;
42
+ max-width: ${
43
+ (props.sm / 12) * 100
44
+ }%;`}
45
+ }
46
+ @media (min-width: ${breakpoints.md}) {
47
+ ${(props) =>
48
+ props.md &&
49
+ `flex: 0 0 ${(props.md / 12) * 100}%;
50
+ max-width: ${
51
+ (props.md / 12) * 100
52
+ }%;`}
53
+ }
54
+ @media (min-width: ${breakpoints.lg}) {
55
+ ${(props) =>
56
+ props.lg &&
57
+ `flex: 0 0 ${(props.lg / 12) * 100}%;
58
+ max-width: ${
59
+ (props.lg / 12) * 100
60
+ }%;`}
61
+ }
62
+ @media (min-width: ${breakpoints.xl}) {
63
+ ${(props) =>
64
+ props.xl &&
65
+ `flex: 0 0 ${(props.xl / 12) * 100}%;
66
+ max-width: ${
67
+ (props.xl / 12) * 100
68
+ }%;`}
69
+ }
70
+ `;
71
+
72
+ export const GridContainer = ({children, style = {}}: any) => {
73
+ return <Container style={style}>{children}</Container>;
74
+ };
75
+
76
+ export const GridItem = ({xs, sm, md, lg, xl, children}: any) => {
77
+ return (
78
+ <Col xs={xs} sm={sm} md={md} lg={lg} xl={xl}>
79
+ {children}
80
+ </Col>
81
+ );
82
+ };