@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,404 @@
1
+ @mixin errorField() {
2
+ font-size: 14px;
3
+ font-weight: 400;
4
+ color: var(--error-color);
5
+ line-height: 16.94px;
6
+ }
7
+
8
+ .hideTemplateBuilder {
9
+ display: none;
10
+ @media (width <= 600px) {
11
+ display: block;
12
+ text-align: center;
13
+ }
14
+ }
15
+
16
+ .createTemplateMaindiv {
17
+ @media (width <= 600px) {
18
+ display: none;
19
+ }
20
+ .createTemplateMainBox {
21
+ position: relative;
22
+ height: 100%;
23
+
24
+ .tempTypeRadioWrapper {
25
+ padding: 20px 0px 30px 0px;
26
+ border-left: none;
27
+ border-right: none;
28
+ margin-left: 40px;
29
+
30
+ .tempTypeRadioHeading {
31
+ p {
32
+ color: var(--text-color);
33
+ font-size: 14px;
34
+ font-style: normal;
35
+ font-weight: 500;
36
+ line-height: normal;
37
+ }
38
+ }
39
+
40
+ .tempTypeRadioBox {
41
+ margin-top: 20px;
42
+ margin-bottom: 10px;
43
+ display: flex;
44
+ justify-content: flex-start;
45
+ align-items: flex-start;
46
+ gap: 25px;
47
+
48
+ .tempRadio {
49
+ cursor: pointer;
50
+ input {
51
+ &:checked {
52
+ accent-color: var(--primary-color);
53
+ }
54
+
55
+ &:focus {
56
+ outline: none !important;
57
+ }
58
+ }
59
+
60
+ label {
61
+ cursor: pointer;
62
+ color: var(--text-color);
63
+ font-size: 14px;
64
+ font-style: normal;
65
+ font-weight: 500;
66
+ line-height: normal;
67
+ }
68
+ }
69
+ }
70
+
71
+ & .error-field {
72
+ @include errorField;
73
+ margin-left: 5px;
74
+ }
75
+ }
76
+ }
77
+ .createTemplateHeader {
78
+ padding-bottom: 15px;
79
+ margin: 0px 40px;
80
+
81
+ p {
82
+ color: var(--primary-color);
83
+ font-size: 24px;
84
+ font-style: normal;
85
+ font-weight: 700;
86
+ line-height: normal;
87
+ margin-bottom: 20px;
88
+ }
89
+
90
+ .templateInputWrapper {
91
+ p {
92
+ color: var(--text-color);
93
+ font-size: 14px;
94
+ font-style: normal;
95
+ font-weight: 500;
96
+ line-height: normal;
97
+ margin-bottom: 16px;
98
+ }
99
+
100
+ & .error-field {
101
+ @include errorField;
102
+ margin-top: 10px !important;
103
+ }
104
+ }
105
+ }
106
+
107
+ .templateSelectWrapper {
108
+ padding-bottom: 15px;
109
+ margin: 20px 40px 80px 40px;
110
+ p {
111
+ color: var(--text-color);
112
+ font-size: 14px;
113
+ font-style: normal;
114
+ font-weight: 500;
115
+ line-height: normal;
116
+ margin-bottom: 16px;
117
+ }
118
+
119
+ & .error-field {
120
+ @include errorField;
121
+ margin-top: 10px !important;
122
+ font-weight: 400;
123
+ }
124
+ }
125
+
126
+ .productTypeWrapper {
127
+ padding: 20px 0px;
128
+ margin: 0px 40px;
129
+
130
+ .productHeading {
131
+ p {
132
+ &:first-child {
133
+ color: var(--text-color);
134
+ font-size: 14px;
135
+ font-style: normal;
136
+ font-weight: 500;
137
+ line-height: normal;
138
+ }
139
+
140
+ &:last-child {
141
+ color: var(--primary-color);
142
+ font-size: 10px;
143
+ font-style: normal;
144
+ font-weight: 400;
145
+ line-height: 18px;
146
+ text-decoration-line: underline;
147
+ }
148
+ }
149
+ }
150
+
151
+ .productsWrapper {
152
+ margin-top: 20px;
153
+ display: flex;
154
+ justify-content: flex-start;
155
+ align-items: center;
156
+ flex-wrap: wrap;
157
+ gap: 25px;
158
+
159
+ .productCard {
160
+ display: flex;
161
+ justify-content: center;
162
+ align-items: center;
163
+ flex-direction: column;
164
+ border-radius: 6.299px;
165
+ border: 0.45px solid var(--border-color);
166
+ width: 100%;
167
+ max-width: 185px;
168
+ height: 100%;
169
+ min-height: 135px;
170
+ cursor: pointer;
171
+ transition: 0.1s ease-in all;
172
+ gap: 17px;
173
+ position: relative;
174
+
175
+ &.active,
176
+ &:hover {
177
+ background: var(--secondary-color);
178
+ border-color: var(--primary-color);
179
+ }
180
+
181
+ p {
182
+ color: var(--primary-color);
183
+ font-size: 16px;
184
+ font-style: normal;
185
+ font-weight: 500;
186
+ line-height: normal;
187
+ margin: 0;
188
+ }
189
+
190
+ &:last-child {
191
+ img {
192
+ margin-bottom: 5px !important;
193
+ }
194
+ }
195
+
196
+ &.error {
197
+ border: 0.45px solid var(--error-color);
198
+ }
199
+
200
+ .productTooltip {
201
+ position: absolute;
202
+ top: 5px;
203
+ right: 5px;
204
+ z-index: 1 !important;
205
+
206
+ svg{
207
+ &:focus{
208
+ outline: none !important;
209
+ }
210
+ }
211
+
212
+ .customTooltipClass{
213
+ padding: 8px !important;
214
+ .react-tooltip-arrow{
215
+ border-color: var(--border-color) !important;
216
+ }
217
+ }
218
+
219
+
220
+ .productTooltipContent {
221
+ display: flex;
222
+ flex-direction: column;
223
+ width: 170px;
224
+ border-radius: 5px;
225
+ font-size: 12px;
226
+ font-weight: 500;
227
+ line-height: normal;
228
+ display: flex;
229
+ justify-content: flex-start;
230
+ align-items: flex-start;
231
+ .heading{
232
+ font-weight: 500 !important;
233
+ font-size: 16px;
234
+ line-height: normal;
235
+ color: var(--text-color);
236
+ margin-bottom: 10px;
237
+ }
238
+
239
+ .contentWrapper{
240
+ display: flex;
241
+ justify-content: flex-start;
242
+ align-items: flex-start;
243
+ flex-direction: column;
244
+ gap: 5px;
245
+ p {
246
+ color: var(--text-color) !important;
247
+ font-weight: 400;
248
+ font-size: 14px;
249
+ text-align: left;
250
+ span{
251
+ font-weight: 600;
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }
257
+ }
258
+ }
259
+
260
+ & .error-field {
261
+ margin-top: 10px;
262
+ @include errorField;
263
+ }
264
+ }
265
+
266
+ .postCardSizeWrapper {
267
+ padding: 20px 0px;
268
+ margin: 0px 40px 80px 40px;
269
+
270
+ .postCardHeading {
271
+ p {
272
+ color: var(--text-color);
273
+ font-size: 14px;
274
+ font-style: normal;
275
+ font-weight: 500;
276
+ line-height: normal;
277
+ }
278
+ }
279
+
280
+ .postCardWrapper {
281
+ margin-top: 20px;
282
+ display: flex;
283
+ justify-content: flex-start;
284
+ align-items: flex-start;
285
+ flex-wrap: wrap;
286
+ gap: 25px;
287
+
288
+ .postCard {
289
+ display: flex;
290
+ justify-content: center;
291
+ align-items: center;
292
+ gap: 20px;
293
+ flex-direction: column;
294
+ border-radius: 6.299px;
295
+ border: 0.45px solid var(--border-color);
296
+ cursor: pointer;
297
+ padding: 13px 20px;
298
+ transition: 0.1s ease-in all;
299
+
300
+ svg {
301
+ &:nth-child(2) {
302
+ margin-bottom: 20px;
303
+ }
304
+
305
+ &:last-child {
306
+ margin-bottom: 20px;
307
+ }
308
+ }
309
+
310
+ svg {
311
+ path:has(.rplSubCards) {
312
+ fill: var(--svg-color-not-active);
313
+ }
314
+ }
315
+
316
+ &.active,
317
+ &:hover {
318
+ background: var(--secondary-color);
319
+ border-color: var(--primary-color);
320
+
321
+ svg {
322
+ &:nth-child(2) {
323
+ margin-bottom: 20px;
324
+ }
325
+
326
+ &:last-child {
327
+ margin-bottom: 20px;
328
+ }
329
+
330
+ path:has(.rplSubCards) {
331
+ fill: var(--svg-color);
332
+
333
+ &:hover:has(.rplSubCards) {
334
+ fill: var(--svg-color);
335
+ }
336
+ }
337
+ }
338
+ }
339
+
340
+ p {
341
+ color: var(--primary-color);
342
+ font-size: 16px;
343
+ font-style: normal;
344
+ font-weight: 500;
345
+ line-height: normal;
346
+ margin: 0;
347
+ }
348
+ }
349
+
350
+ .postCard-small {
351
+ width: 100%;
352
+ max-width: 150px;
353
+ height: 100%;
354
+ min-height: 148px;
355
+ }
356
+
357
+ .postCard-mid {
358
+ width: 100%;
359
+ max-width: 196px;
360
+ height: 100%;
361
+ min-height: 182px;
362
+ }
363
+
364
+ .postCard-large {
365
+ width: 100%;
366
+ max-width: 248px;
367
+ height: 100%;
368
+ min-height: 226px;
369
+ }
370
+ }
371
+
372
+ & .error-field {
373
+ margin-top: 10px;
374
+ @include errorField;
375
+ }
376
+ }
377
+
378
+ .footerBtns {
379
+ position: fixed;
380
+ width: 100%;
381
+ bottom: 0;
382
+ border-top: 0.5px solid var(--border-color);
383
+ background-color: #fff;
384
+
385
+ .createTemplateBtns {
386
+ display: flex;
387
+ justify-content: flex-end;
388
+ align-items: center;
389
+ gap: 20px;
390
+ padding: 14px 95px 14px 35px;
391
+ }
392
+ }
393
+ .error {
394
+ border: 1.5px solid var(--error-color);
395
+ }
396
+ }
397
+
398
+ .rplSubCards {
399
+ display: flex;
400
+ justify-content: center;
401
+ align-items: center;
402
+ min-width: 150px;
403
+ min-height: 100px;
404
+ }
@@ -0,0 +1,54 @@
1
+ import React, { CSSProperties, ReactNode, MouseEventHandler } from 'react';
2
+
3
+ // styles
4
+ import './styles.scss';
5
+
6
+ interface ButtonProps {
7
+ children?: ReactNode;
8
+ style?: CSSProperties;
9
+ onClick?: MouseEventHandler<HTMLDivElement>;
10
+ className?: string;
11
+ disabled?: boolean;
12
+ backdrop?: boolean;
13
+ currentTheme?: string | null | undefined;
14
+ }
15
+
16
+ const Button: React.FC<ButtonProps> = ({
17
+ children = '',
18
+ style = {},
19
+ onClick,
20
+ className = '',
21
+ disabled = false,
22
+ backdrop = true,
23
+ currentTheme = 'default'
24
+ }) => {
25
+ return (
26
+ <>
27
+ {
28
+ currentTheme === 'v2' ? (
29
+ <div
30
+ className={`basic-button ${currentTheme === 'v2' && 'new-theme-button'} ${className} ${disabled ? 'disabled' : ''}`}
31
+ onClick={disabled ? undefined : onClick}
32
+ style={style}
33
+ >
34
+ {children}
35
+ {/* {backdrop && <span className="backdrop" />} */}
36
+ </div>
37
+ )
38
+ :
39
+ (
40
+ <div
41
+ className={`basic-button ${className} ${disabled ? 'disabled' : ''}`}
42
+ onClick={disabled ? undefined : onClick}
43
+ style={style}
44
+ >
45
+ {children}
46
+ {backdrop && <span className="backdrop" />}
47
+ </div>
48
+ )
49
+ }
50
+ </>
51
+ );
52
+ };
53
+
54
+ export default Button;
@@ -0,0 +1,43 @@
1
+ .basic-button {
2
+ background-color: var(--primary-color);
3
+ color: white;
4
+ width: 100%;
5
+ max-width: fit-content;
6
+ padding: 0px 10px;
7
+ font-size: 16px;
8
+ cursor: pointer;
9
+ height: 100%;
10
+ border-radius: 4px;
11
+ display: flex;
12
+ justify-content: center;
13
+ align-items: center;
14
+ font-weight: 600;
15
+ position: relative;
16
+
17
+ &.disabled{
18
+ opacity: 0.5;
19
+ cursor: not-allowed;
20
+ }
21
+ .backdrop{
22
+ opacity: 0;
23
+ transition: opacity 0.1s ease-in !important;
24
+ background: #00000012 !important;
25
+ position: absolute !important;
26
+ top: 0px !important;
27
+ left: 0px !important;
28
+ width: 100% !important;
29
+ height: 100% !important;
30
+ border-radius: 3px !important;
31
+ }
32
+ &:hover{
33
+ .backdrop{
34
+ opacity: 1 !important;
35
+ }
36
+ }
37
+ }
38
+
39
+ // new theme button
40
+ .new-theme-button{
41
+ height: 50px;
42
+ border-radius: 8px;
43
+ }
@@ -0,0 +1,18 @@
1
+ import React, { useState, useEffect, CSSProperties } from 'react';
2
+
3
+ // styles
4
+ import './styles.scss';
5
+
6
+ interface CircularProgressProps {
7
+ style?: CSSProperties;
8
+ }
9
+
10
+ const CircularProgress: React.FC<CircularProgressProps> = ({ style = {} }) => {
11
+ return (
12
+ <div className={'basic-progress'}>
13
+ <div className="loader" style={style} />
14
+ </div>
15
+ );
16
+ }
17
+
18
+ export default CircularProgress;
@@ -0,0 +1,93 @@
1
+ .basic-progress {
2
+ .loader {
3
+ width: 50px;
4
+ aspect-ratio: 1;
5
+ border-radius: 50%;
6
+ animation: l20-1 0.8s infinite linear alternate, l20-2 1.6s infinite linear;
7
+ }
8
+ @keyframes l20-1 {
9
+ 0% {
10
+ clip-path: polygon(50% 50%, 0 0, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%);
11
+ }
12
+ 12.5% {
13
+ clip-path: polygon(
14
+ 50% 50%,
15
+ 0 0,
16
+ 50% 0%,
17
+ 100% 0%,
18
+ 100% 0%,
19
+ 100% 0%,
20
+ 100% 0%
21
+ );
22
+ }
23
+ 25% {
24
+ clip-path: polygon(
25
+ 50% 50%,
26
+ 0 0,
27
+ 50% 0%,
28
+ 100% 0%,
29
+ 100% 100%,
30
+ 100% 100%,
31
+ 100% 100%
32
+ );
33
+ }
34
+ 50% {
35
+ clip-path: polygon(
36
+ 50% 50%,
37
+ 0 0,
38
+ 50% 0%,
39
+ 100% 0%,
40
+ 100% 100%,
41
+ 50% 100%,
42
+ 0% 100%
43
+ );
44
+ }
45
+ 62.5% {
46
+ clip-path: polygon(
47
+ 50% 50%,
48
+ 100% 0,
49
+ 100% 0%,
50
+ 100% 0%,
51
+ 100% 100%,
52
+ 50% 100%,
53
+ 0% 100%
54
+ );
55
+ }
56
+ 75% {
57
+ clip-path: polygon(
58
+ 50% 50%,
59
+ 100% 100%,
60
+ 100% 100%,
61
+ 100% 100%,
62
+ 100% 100%,
63
+ 50% 100%,
64
+ 0% 100%
65
+ );
66
+ }
67
+ 100% {
68
+ clip-path: polygon(
69
+ 50% 50%,
70
+ 50% 100%,
71
+ 50% 100%,
72
+ 50% 100%,
73
+ 50% 100%,
74
+ 50% 100%,
75
+ 0% 100%
76
+ );
77
+ }
78
+ }
79
+ @keyframes l20-2 {
80
+ 0% {
81
+ transform: scaleY(1) rotate(0deg);
82
+ }
83
+ 49.99% {
84
+ transform: scaleY(1) rotate(135deg);
85
+ }
86
+ 50% {
87
+ transform: scaleY(-1) rotate(0deg);
88
+ }
89
+ 100% {
90
+ transform: scaleY(-1) rotate(-135deg);
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,88 @@
1
+ import React, {useEffect, useRef} from 'react';
2
+
3
+ // Icons
4
+ import ToolArrow from '../../../assets/images/tooltip/tool-arrow';
5
+
6
+ // Styles
7
+ import './styles.scss';
8
+
9
+ interface TooltipProps {
10
+ place: 'top' | 'right' | 'bottom' | 'left' | 'top-start';
11
+ children?: React.ReactNode;
12
+ open?: boolean;
13
+ handleClose?: () => void;
14
+ }
15
+
16
+ const CustomTooltip: React.FC<TooltipProps> = ({
17
+ place,
18
+ children,
19
+ open,
20
+ handleClose,
21
+ }) => {
22
+ const tooltipRef = useRef<HTMLDivElement>(null);
23
+ const handleClickAway = (event: MouseEvent) => {
24
+ if (
25
+ tooltipRef.current &&
26
+ !tooltipRef.current.contains(event.target as Node)
27
+ ) {
28
+ handleClose?.();
29
+ }
30
+ };
31
+
32
+ useEffect(() => {
33
+ if (open) {
34
+ document.addEventListener('mousedown', handleClickAway);
35
+ } else {
36
+ document.removeEventListener('mousedown', handleClickAway);
37
+ }
38
+
39
+ return () => {
40
+ document.removeEventListener('mousedown', handleClickAway);
41
+ };
42
+ }, [open]);
43
+
44
+ // positions
45
+ const positions = (place: string) => {
46
+ switch (place) {
47
+ case 'top':
48
+ return {inset: '-98px 0px auto 10%'};
49
+ case 'bottom':
50
+ return {inset: 'auto 0px -17px 9.3%'};
51
+ default:
52
+ return {top: '0', left: '0'};
53
+ }
54
+ };
55
+
56
+ const arrowPosition = (place: string) => {
57
+ switch (place) {
58
+ case 'top':
59
+ return {
60
+ inset: 'auto auto -8px 15px',
61
+ };
62
+ case 'bottom':
63
+ return {
64
+ inset: '-10px auto auto 15px',
65
+ transform: 'rotate(180deg)',
66
+ };
67
+ default:
68
+ return {top: '0', left: '0'};
69
+ }
70
+ };
71
+
72
+ return (
73
+ <>
74
+ {open && (
75
+ <div
76
+ className="custom-tooltip"
77
+ ref={tooltipRef}
78
+ style={positions(place)}
79
+ >
80
+ {children}
81
+ <ToolArrow className="arrow" style={arrowPosition(place)} />
82
+ </div>
83
+ )}
84
+ </>
85
+ );
86
+ };
87
+
88
+ export default CustomTooltip;
@@ -0,0 +1,19 @@
1
+ .custom-tooltip {
2
+ width: 90% !important;
3
+ max-width: fit-content !important;
4
+ text-align: center !important;
5
+ background-color: #ffffff !important;
6
+ color: #000 !important;
7
+ box-shadow: 0px 2px 6px #989595 !important;
8
+ opacity: 1 !important;
9
+ z-index: 9999999 !important;
10
+ padding: 10px;
11
+ position: absolute;
12
+ border-radius: 5px;
13
+ .arrow {
14
+ position: absolute;
15
+ width: 14px;
16
+ height: 14px;
17
+ filter: drop-shadow(0px 5px 1px rgba(0, 0, 0, 0.155));
18
+ }
19
+ }