@weareconceptstudio/account 0.0.0 → 0.0.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 (165) hide show
  1. package/dist/AccountConfig.d.ts +5 -0
  2. package/dist/AccountConfig.js +21 -0
  3. package/dist/components/AccountButton/index.d.ts +3 -0
  4. package/dist/components/AccountButton/index.js +22 -0
  5. package/dist/components/AccountButton/style.d.ts +2 -0
  6. package/dist/components/AccountButton/style.js +249 -0
  7. package/dist/components/AddressForm/index.d.ts +3 -0
  8. package/dist/components/AddressForm/index.js +100 -0
  9. package/dist/components/AddressForm/style.d.ts +2 -0
  10. package/dist/components/AddressForm/style.js +180 -0
  11. package/dist/components/AddressItem/index.d.ts +3 -0
  12. package/dist/components/AddressItem/index.js +41 -0
  13. package/dist/components/AddressItem/style.d.ts +2 -0
  14. package/dist/components/AddressItem/style.js +191 -0
  15. package/dist/components/CustomCheckbox/index.d.ts +7 -0
  16. package/dist/components/CustomCheckbox/index.js +15 -0
  17. package/dist/components/CustomCheckbox/style.d.ts +2 -0
  18. package/dist/components/CustomCheckbox/style.js +85 -0
  19. package/dist/components/EmptyCart/index.d.ts +5 -0
  20. package/dist/components/EmptyCart/index.js +14 -0
  21. package/dist/components/EmptyCart/style.d.ts +2 -0
  22. package/dist/components/EmptyCart/style.js +62 -0
  23. package/dist/components/EmptyOrders/index.d.ts +3 -0
  24. package/dist/components/EmptyOrders/index.js +12 -0
  25. package/dist/components/EmptyOrders/style.d.ts +2 -0
  26. package/dist/components/EmptyOrders/style.js +46 -0
  27. package/dist/components/FormInputCode/index.d.ts +24 -0
  28. package/dist/components/FormInputCode/index.js +145 -0
  29. package/dist/components/FormInputCode/style.d.ts +2 -0
  30. package/dist/components/FormInputCode/style.js +109 -0
  31. package/dist/components/OrderDetails/index.d.ts +3 -0
  32. package/dist/components/OrderDetails/index.js +48 -0
  33. package/dist/components/OrderDetails/style.d.ts +2 -0
  34. package/dist/components/OrderDetails/style.js +90 -0
  35. package/dist/components/OrderedItems/ReviewPopup/index.d.ts +0 -0
  36. package/dist/components/OrderedItems/ReviewPopup/index.js +202 -0
  37. package/dist/components/OrderedItems/ReviewPopup/style.d.ts +2 -0
  38. package/dist/components/OrderedItems/ReviewPopup/style.js +329 -0
  39. package/dist/components/OrderedItems/index.d.ts +7 -0
  40. package/dist/components/OrderedItems/index.js +108 -0
  41. package/dist/components/OrderedItems/style.d.ts +2 -0
  42. package/dist/components/OrderedItems/style.js +783 -0
  43. package/dist/components/OrdersList/OrderItem/index.d.ts +3 -0
  44. package/dist/components/OrdersList/OrderItem/index.js +21 -0
  45. package/dist/components/OrdersList/index.d.ts +10 -0
  46. package/dist/components/OrdersList/index.js +68 -0
  47. package/dist/components/OrdersList/style.d.ts +2 -0
  48. package/dist/components/OrdersList/style.js +373 -0
  49. package/dist/components/Pagination/index.d.ts +3 -0
  50. package/dist/components/Pagination/index.js +18 -0
  51. package/dist/components/Pagination/style.d.ts +2 -0
  52. package/dist/components/Pagination/style.js +72 -0
  53. package/dist/components/SelectShippingBilling/index.d.ts +3 -0
  54. package/dist/components/SelectShippingBilling/index.js +31 -0
  55. package/dist/components/SelectShippingBilling/style.d.ts +2 -0
  56. package/dist/components/SelectShippingBilling/style.js +112 -0
  57. package/dist/components/Sequence/index.d.ts +5 -0
  58. package/dist/components/Sequence/index.js +65 -0
  59. package/dist/components/Sequence/style.d.ts +2 -0
  60. package/dist/components/Sequence/style.js +317 -0
  61. package/dist/components/ShippingBillingForm/index.d.ts +3 -0
  62. package/dist/components/ShippingBillingForm/index.js +96 -0
  63. package/dist/components/ShippingBillingForm/style.d.ts +2 -0
  64. package/dist/components/ShippingBillingForm/style.js +77 -0
  65. package/dist/components/ShippingBillingInfo/index.d.ts +3 -0
  66. package/dist/components/ShippingBillingInfo/index.js +22 -0
  67. package/dist/components/ShippingBillingInfo/style.d.ts +2 -0
  68. package/dist/components/ShippingBillingInfo/style.js +98 -0
  69. package/dist/components/TotalCheckout/index.d.ts +3 -0
  70. package/dist/components/TotalCheckout/index.js +49 -0
  71. package/dist/components/TotalCheckout/style.d.ts +2 -0
  72. package/dist/components/TotalCheckout/style.js +211 -0
  73. package/dist/components/WarningMessage/index.d.ts +3 -0
  74. package/dist/components/WarningMessage/index.js +10 -0
  75. package/dist/components/WarningMessage/style.d.ts +2 -0
  76. package/dist/components/WarningMessage/style.js +34 -0
  77. package/dist/components/WarningMessageForPopup/index.d.ts +3 -0
  78. package/dist/components/WarningMessageForPopup/index.js +31 -0
  79. package/dist/components/WarningMessageForPopup/style.d.ts +2 -0
  80. package/dist/components/WarningMessageForPopup/style.js +82 -0
  81. package/dist/components/index.d.ts +18 -0
  82. package/dist/components/index.js +18 -0
  83. package/dist/index.d.ts +1 -0
  84. package/dist/index.js +2 -0
  85. package/dist/styles/helperClass.d.ts +2 -0
  86. package/dist/styles/helperClass.js +278 -0
  87. package/dist/styles/theme.d.ts +2 -0
  88. package/dist/styles/theme.js +63 -0
  89. package/dist/styles/typography.d.ts +2 -0
  90. package/dist/styles/typography.js +129 -0
  91. package/dist/styles/variables.d.ts +2 -0
  92. package/dist/styles/variables.js +401 -0
  93. package/dist/templates/AccountSettingsTemplate/AccountInfo/index.d.ts +38 -0
  94. package/dist/templates/AccountSettingsTemplate/AccountInfo/index.js +37 -0
  95. package/dist/templates/AccountSettingsTemplate/AccountInfo/style.d.ts +2 -0
  96. package/dist/templates/AccountSettingsTemplate/AccountInfo/style.js +165 -0
  97. package/dist/templates/AccountSettingsTemplate/AccountInfo/utils.d.ts +32 -0
  98. package/dist/templates/AccountSettingsTemplate/AccountInfo/utils.js +45 -0
  99. package/dist/templates/AccountSettingsTemplate/AccountPassword/index.d.ts +15 -0
  100. package/dist/templates/AccountSettingsTemplate/AccountPassword/index.js +36 -0
  101. package/dist/templates/AccountSettingsTemplate/AccountPassword/style.d.ts +2 -0
  102. package/dist/templates/AccountSettingsTemplate/AccountPassword/style.js +141 -0
  103. package/dist/templates/AccountSettingsTemplate/AccountPassword/utils.d.ts +10 -0
  104. package/dist/templates/AccountSettingsTemplate/AccountPassword/utils.js +22 -0
  105. package/dist/templates/AccountSettingsTemplate/index.d.ts +11 -0
  106. package/dist/templates/AccountSettingsTemplate/index.js +10 -0
  107. package/dist/templates/AccountSettingsTemplate/style.d.ts +2 -0
  108. package/dist/templates/AccountSettingsTemplate/style.js +37 -0
  109. package/dist/templates/AccountTemplate/index.d.ts +8 -0
  110. package/dist/templates/AccountTemplate/index.js +32 -0
  111. package/dist/templates/AccountTemplate/style.d.ts +2 -0
  112. package/dist/templates/AccountTemplate/style.js +293 -0
  113. package/dist/templates/AddressesTemplate/index.d.ts +3 -0
  114. package/dist/templates/AddressesTemplate/index.js +21 -0
  115. package/dist/templates/AddressesTemplate/style.d.ts +2 -0
  116. package/dist/templates/AddressesTemplate/style.js +89 -0
  117. package/dist/templates/CartTemplate/index.d.ts +3 -0
  118. package/dist/templates/CartTemplate/index.js +23 -0
  119. package/dist/templates/CartTemplate/style.d.ts +2 -0
  120. package/dist/templates/CartTemplate/style.js +37 -0
  121. package/dist/templates/CheckoutTemplate/index.d.ts +9 -0
  122. package/dist/templates/CheckoutTemplate/index.js +155 -0
  123. package/dist/templates/CheckoutTemplate/style.d.ts +2 -0
  124. package/dist/templates/CheckoutTemplate/style.js +173 -0
  125. package/dist/templates/ForgotPasswordTemplate/index.d.ts +5 -2
  126. package/dist/templates/ForgotPasswordTemplate/index.js +86 -3
  127. package/dist/templates/ForgotPasswordTemplate/style.d.ts +2 -0
  128. package/dist/templates/ForgotPasswordTemplate/style.js +186 -0
  129. package/dist/templates/OrderHistoryTemplate/index.d.ts +7 -0
  130. package/dist/templates/OrderHistoryTemplate/index.js +9 -0
  131. package/dist/templates/OrderHistoryTemplate/style.d.ts +2 -0
  132. package/dist/templates/OrderHistoryTemplate/style.js +3 -0
  133. package/dist/templates/OrderIndividualTemplate/index.d.ts +5 -0
  134. package/dist/templates/OrderIndividualTemplate/index.js +21 -0
  135. package/dist/templates/OrderIndividualTemplate/style.d.ts +2 -0
  136. package/dist/templates/OrderIndividualTemplate/style.js +3 -0
  137. package/dist/templates/ResetPasswordTemplate/index.d.ts +7 -2
  138. package/dist/templates/ResetPasswordTemplate/index.js +35 -2
  139. package/dist/templates/ResetPasswordTemplate/style.d.ts +2 -0
  140. package/dist/templates/ResetPasswordTemplate/style.js +163 -0
  141. package/dist/templates/SignInTemplate/index.d.ts +5 -2
  142. package/dist/templates/SignInTemplate/index.js +27 -2
  143. package/dist/templates/SignInTemplate/style.d.ts +2 -0
  144. package/dist/templates/SignInTemplate/style.js +168 -0
  145. package/dist/templates/SignUpTemplate/defaultFormFields.d.ts +11 -0
  146. package/dist/templates/SignUpTemplate/defaultFormFields.js +42 -0
  147. package/dist/templates/SignUpTemplate/index.d.ts +6 -2
  148. package/dist/templates/SignUpTemplate/index.js +33 -3
  149. package/dist/templates/SignUpTemplate/style.d.ts +2 -0
  150. package/dist/templates/SignUpTemplate/style.js +175 -0
  151. package/dist/templates/VerifyEmailAddressTemplate/index.d.ts +3 -0
  152. package/dist/templates/VerifyEmailAddressTemplate/index.js +105 -0
  153. package/dist/templates/VerifyEmailAddressTemplate/style.d.ts +2 -0
  154. package/dist/templates/VerifyEmailAddressTemplate/style.js +165 -0
  155. package/dist/templates/index.d.ts +8 -0
  156. package/dist/templates/index.js +11 -0
  157. package/dist/translations/en.d.ts +257 -0
  158. package/dist/translations/en.js +256 -0
  159. package/dist/translations/index.d.ts +259 -0
  160. package/dist/translations/index.js +2 -0
  161. package/dist/utils/_functions.d.ts +5 -0
  162. package/dist/utils/_functions.js +28 -0
  163. package/dist/utils/icons.d.ts +3 -0
  164. package/dist/utils/icons.js +27 -0
  165. package/package.json +5 -6
@@ -0,0 +1,401 @@
1
+ import { createGlobalStyle, css } from 'styled-components';
2
+ const AccountVariables = createGlobalStyle `${css `
3
+ :root {
4
+ //! Fonts
5
+ --account_Font: ${(props) => `var(--${props.fontFamily})` || `var(--core_Font)`};
6
+
7
+ //! Transition
8
+ --account_trTime: 0.2s;
9
+
10
+ //! Line heights
11
+ --account_lineHeight: 1.5;
12
+ --account_lineHeightS: 1.3;
13
+
14
+ //! Primary Colors
15
+ --account_primaryColor1: ${(props) => props.theme.account.colors.account_primaryColor1};
16
+ --account_primaryColor2: ${(props) => props.theme.account.colors.account_primaryColor2};
17
+ --account_primaryColor3: ${(props) => props.theme.account.colors.account_primaryColor3};
18
+ --account_primaryColor4: ${(props) => props.theme.account.colors.account_primaryColor4};
19
+ --account_primaryColor5: ${(props) => props.theme.account.colors.account_primaryColor5};
20
+ --account_primaryColor6: ${(props) => props.theme.account.colors.account_primaryColor6};
21
+ --account_primaryColor7: ${(props) => props.theme.account.colors.account_primaryColor7};
22
+ --account_primaryColor8: ${(props) => props.theme.account.colors.account_primaryColor8};
23
+ --account_primaryColor9: ${(props) => props.theme.account.colors.account_primaryColor9};
24
+ --account_primaryColor10: ${(props) => props.theme.account.colors.account_primaryColor10};
25
+ --account_primaryColor11: ${(props) => props.theme.account.colors.account_primaryColor11};
26
+ --account_primaryColor12: ${(props) => props.theme.account.colors.account_primaryColor12};
27
+ --account_primaryColor13: ${(props) => props.theme.account.colors.account_primaryColor13};
28
+ --account_primaryColor14: ${(props) => props.theme.account.colors.account_primaryColor14};
29
+ --account_primaryColor15: ${(props) => props.theme.account.colors.account_primaryColor15};
30
+ --account_primaryColor16: ${(props) => props.theme.account.colors.account_primaryColor16};
31
+ --account_primaryColor17: ${(props) => props.theme.account.colors.account_primaryColor17};
32
+ --account_primaryColor18: ${(props) => props.theme.account.colors.account_primaryColor18};
33
+ --account_primaryColor19: ${(props) => props.theme.account.colors.account_primaryColor19};
34
+ --account_primaryColor20: ${(props) => props.theme.account.colors.account_primaryColor20};
35
+
36
+ //! Secondary Colors
37
+ --account_secondaryColor1: ${(props) => props.theme.account.colors.account_secondaryColor1};
38
+ --account_secondaryColor2: ${(props) => props.theme.account.colors.account_secondaryColor2};
39
+ --account_secondaryColor3: ${(props) => props.theme.account.colors.account_secondaryColor3};
40
+ --account_secondaryColor4: ${(props) => props.theme.account.colors.account_secondaryColor4};
41
+ --account_secondaryColor5: ${(props) => props.theme.account.colors.account_secondaryColor5};
42
+ --account_secondaryColor6: ${(props) => props.theme.account.colors.account_secondaryColor6};
43
+ --account_secondaryColor7: ${(props) => props.theme.account.colors.account_secondaryColor7};
44
+ --account_secondaryColor8: ${(props) => props.theme.account.colors.account_secondaryColor8};
45
+ --account_secondaryColor9: ${(props) => props.theme.account.colors.account_secondaryColor9};
46
+
47
+ //! Background Color
48
+ --account_backgroundColor: ${(props) => props.theme.account.colors.account_backgroundColor};
49
+
50
+ //! Error / Success Colors
51
+ --account_errorColor: ${(props) => props.theme.account.colors.account_errorColor};
52
+ --account_errorColorBg: ${(props) => props.theme.account.colors.account_errorColorBg};
53
+ --account_successColor: ${(props) => props.theme.account.colors.account_successColor};
54
+ --account_successColorBg: ${(props) => props.theme.account.colors.account_successColorBg};
55
+ }
56
+
57
+ /* //! 2560 */
58
+ @media only screen and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXL}) {
59
+ :root {
60
+ --account_h1: 128px;
61
+ --account_h2: 88px;
62
+ --account_h3: 64px;
63
+ --account_h4: 56px;
64
+ --account_h5: 48px;
65
+ --account_h6: 40px;
66
+ --account_p1: 32px;
67
+ --account_p2: 24px;
68
+ --account_p3: 20px;
69
+ --account_p4: 18px;
70
+ --account_p5: 12px;
71
+
72
+ //! Section distance
73
+ --account_sectionDistance: var(--sp23x);
74
+
75
+ //! Grid distance
76
+ --account_colPadding: var(--sp2-5x);
77
+
78
+ //! Container padding
79
+ --account_contPaddingLR: var(--sp14x);
80
+
81
+ //! Large icons size
82
+ --account_largeIconsSize: var(--sp9x);
83
+
84
+ //! Small icons size
85
+ --account_smallIconsSize: var(--sp2-5x);
86
+
87
+ //! Global error sizes
88
+ --account_globalErrorPad: var(--sp4x);
89
+ --account_errorItemMTop: var(--sp1-5x);
90
+ --account_globalErrorWrapMarTB: var(--sp7x);
91
+
92
+ //! Sidebar Small Image Width
93
+ --account_sidebarSmallImageWidth: 6.1718vw;
94
+
95
+ //! Header height size
96
+ --account_headerHeightSize: var(--sp14x);
97
+ }
98
+ }
99
+
100
+ /* //! 2559 - 1920 */
101
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
102
+ :root {
103
+ --account_h1: 96px;
104
+ --account_h2: 64px;
105
+ --account_h3: 56px;
106
+ --account_h4: 48px;
107
+ --account_h5: 40px;
108
+ --account_h6: 32px;
109
+ --account_p1: 24px;
110
+ --account_p2: 20px;
111
+ --account_p3: 16px;
112
+ --account_p4: 16px;
113
+ --account_p5: 10px;
114
+
115
+ //! Section distance
116
+ --account_sectionDistance: var(--sp20x);
117
+
118
+ //! Grid distance
119
+ --account_colPadding: var(--sp2x);
120
+
121
+ //! Container padding
122
+ --account_contPaddingLR: var(--sp11x);
123
+
124
+ //! Large icons size
125
+ --account_largeIconsSize: var(--sp8x);
126
+
127
+ //! Small icons size
128
+ --account_smallIconsSize: var(--sp2x);
129
+
130
+ //! Global error sizes
131
+ --account_globalErrorPad: var(--sp3x);
132
+ --account_errorItemMTop: var(--sp1x);
133
+ --account_globalErrorWrapMarTB: var(--sp5x);
134
+
135
+ //! Sidebar Small Image Width
136
+ --account_sidebarSmallImageWidth: 6.0416vw;
137
+
138
+ //! Header height size
139
+ --account_headerHeightSize: var(--sp11x);
140
+ }
141
+ }
142
+
143
+ /* //! 1910 - 1510 */
144
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
145
+ :root {
146
+ --account_h1: 80px;
147
+ --account_h2: 56px;
148
+ --account_h3: 48px;
149
+ --account_h4: 40px;
150
+ --account_h5: 32px;
151
+ --account_h6: 24px;
152
+ --account_p1: 20px;
153
+ --account_p2: 18px;
154
+ --account_p3: 16px;
155
+ --account_p4: 14px;
156
+ --account_p5: 10px;
157
+
158
+ //! Section distance
159
+ --account_sectionDistance: var(--sp16x);
160
+
161
+ //! Grid distance
162
+ --account_colPadding: var(--sp1-5x);
163
+
164
+ //! Container padding
165
+ --account_contPaddingLR: var(--sp8x);
166
+
167
+ //! Large icons size
168
+ --account_largeIconsSize: var(--sp7x);
169
+
170
+ //! Small icons size
171
+ --account_smallIconsSize: var(--sp1-5x);
172
+
173
+ //! Global error sizes
174
+ --account_globalErrorPad: var(--sp2-5x);
175
+ --account_errorItemMTop: var(--sp1-5x);
176
+ --account_globalErrorWrapMarTB: var(--sp4x);
177
+
178
+ //! Sidebar Small Image Width
179
+ --account_sidebarSmallImageWidth: 6.1589vw;
180
+
181
+ //! Header height size
182
+ --account_headerHeightSize: var(--sp11x);
183
+ }
184
+ }
185
+
186
+ /* //! 1509 - 1440 */
187
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
188
+ :root {
189
+ --account_h1: 72px;
190
+ --account_h2: 48px;
191
+ --account_h3: 40px;
192
+ --account_h4: 32px;
193
+ --account_h5: 24px;
194
+ --account_h6: 24px;
195
+ --account_p1: 20px;
196
+ --account_p2: 18px;
197
+ --account_p3: 16px;
198
+ --account_p4: 14px;
199
+ --account_p5: 10px;
200
+
201
+ //! Section distance
202
+ --account_sectionDistance: var(--sp15x);
203
+
204
+ //! Grid distance
205
+ --account_colPadding: var(--sp1-5x);
206
+
207
+ //! Container padding
208
+ --account_contPaddingLR: var(--sp7x);
209
+
210
+ //! Large icons size
211
+ --account_largeIconsSize: var(--sp7x);
212
+
213
+ //! Small icons size
214
+ --account_smallIconsSize: var(--sp1-5x);
215
+
216
+ //! Global error sizes
217
+ --account_globalErrorPad: var(--sp2x);
218
+ --account_errorItemMTop: var(--sp0-5x);
219
+ --account_globalErrorWrapMarTB: var(--sp4x);
220
+
221
+ //! Sidebar Small Image Width
222
+ --account_sidebarSmallImageWidth: 6.1111vw;
223
+
224
+ //! Header height size
225
+ --account_headerHeightSize: var(--sp10x);
226
+ }
227
+ }
228
+
229
+ /* //! 1439 - 1280 */
230
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
231
+ :root {
232
+ --account_h1: 64px;
233
+ --account_h2: 40px;
234
+ --account_h3: 32px;
235
+ --account_h4: 24px;
236
+ --account_h5: 20px;
237
+ --account_h6: 20px;
238
+ --account_p1: 20px;
239
+ --account_p2: 16px;
240
+ --account_p3: 16px;
241
+ --account_p4: 12px;
242
+ --account_p5: 8px;
243
+
244
+ //! Section distance
245
+ --account_sectionDistance: var(--sp13x);
246
+
247
+ //! Grid distance
248
+ --account_colPadding: var(--sp1-5x);
249
+
250
+ //! Container padding
251
+ --account_contPaddingLR: var(--sp5x);
252
+
253
+ //! Large icons size
254
+ --account_largeIconsSize: var(--sp6x);
255
+
256
+ //! Small icons size
257
+ --account_smallIconsSize: var(--sp1-5x);
258
+
259
+ //! Global error sizes
260
+ --account_globalErrorPad: var(--sp2x);
261
+ --account_errorItemMTop: var(--sp1x);
262
+ --account_globalErrorWrapMarTB: var(--sp3x);
263
+
264
+ //! Sidebar Small Image Width
265
+ --account_sidebarSmallImageWidth: 6.0937vw;
266
+
267
+ //! Header height size
268
+ --account_headerHeightSize: var(--sp8x);
269
+ }
270
+ }
271
+
272
+ /* //! 1279 - 1024 */
273
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
274
+ :root {
275
+ --account_h1: 56px;
276
+ --account_h2: 32px;
277
+ --account_h3: 28px;
278
+ --account_h4: 24px;
279
+ --account_h5: 20px;
280
+ --account_h6: 20px;
281
+ --account_p1: 18px;
282
+ --account_p2: 16px;
283
+ --account_p3: 16px;
284
+ --account_p4: 12px;
285
+ --account_p5: 8px;
286
+
287
+ //! Section distance
288
+ --account_sectionDistance: var(--sp12x);
289
+
290
+ //! Grid distance
291
+ --account_colPadding: var(--sp1-5x);
292
+
293
+ //! Container padding
294
+ --account_contPaddingLR: var(--sp4x);
295
+
296
+ //! Large icons size
297
+ --account_largeIconsSize: var(--sp6x);
298
+
299
+ //! Small icons size
300
+ --account_smallIconsSize: var(--sp1-5x);
301
+
302
+ //! Global error sizes
303
+ --account_globalErrorPad: var(--sp2x);
304
+ --account_errorItemMTop: var(--sp1x);
305
+ --account_globalErrorWrapMarTB: var(--sp3x);
306
+
307
+ //! Sidebar Small Image Width
308
+ --account_sidebarSmallImageWidth: auto;
309
+
310
+ //! Header height size
311
+ --account_headerHeightSize: var(--sp8x);
312
+ }
313
+ }
314
+
315
+ /* //! 1023 - 768 */
316
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
317
+ :root {
318
+ --account_h1: 56px;
319
+ --account_h2: 32px;
320
+ --account_h3: 28px;
321
+ --account_h4: 24px;
322
+ --account_h5: 20px;
323
+ --account_h6: 20px;
324
+ --account_p1: 18px;
325
+ --account_p2: 16px;
326
+ --account_p3: 16px;
327
+ --account_p4: 12px;
328
+ --account_p5: 8px;
329
+
330
+ //! Section distance
331
+ --account_sectionDistance: var(--sp12x);
332
+
333
+ //! Grid distance
334
+ --account_colPadding: var(--sp1x);
335
+
336
+ //! Container padding
337
+ --account_contPaddingLR: var(--sp4x);
338
+
339
+ //! Large icons size
340
+ --account_largeIconsSize: var(--sp6x);
341
+
342
+ //! Small icons size
343
+ --account_smallIconsSize: var(--sp1-5x);
344
+
345
+ //! Global error sizes
346
+ --account_globalErrorPad: var(--sp2x);
347
+ --account_errorItemMTop: var(--sp1x);
348
+ --account_globalErrorWrapMarTB: var(--sp3x);
349
+
350
+ //! Sidebar Small Image Width
351
+ --account_sidebarSmallImageWidth: auto;
352
+
353
+ //! Header height size
354
+ --account_headerHeightSize: var(--sp8x);
355
+ }
356
+ }
357
+
358
+ /* //! Mobile */
359
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
360
+ :root {
361
+ --account_h1: 40px;
362
+ --account_h2: 32px;
363
+ --account_h3: 24px;
364
+ --account_h4: 24px;
365
+ --account_h5: 20px;
366
+ --account_h6: 20px;
367
+ --account_p1: 16px;
368
+ --account_p2: 16px;
369
+ --account_p3: 16px;
370
+ --account_p4: 12px;
371
+ --account_p5: 8px;
372
+
373
+ //! Section distance
374
+ --account_sectionDistance: var(--sp8x);
375
+
376
+ //! Grid distance
377
+ --account_colPadding: var(--sp1x);
378
+
379
+ //! Container padding
380
+ --account_contPaddingLR: var(--sp2x);
381
+
382
+ //! Large icons size
383
+ --account_largeIconsSize: var(--sp5x);
384
+
385
+ //! Small icons size
386
+ --account_smallIconsSize: var(--sp1-5x);
387
+
388
+ //! Global error sizes
389
+ --account_globalErrorPad: var(--sp2x);
390
+ --account_errorItemMTop: var(--sp1x);
391
+ --account_globalErrorWrapMarTB: var(--sp3x);
392
+
393
+ //! Sidebar Small Image Width
394
+ --account_sidebarSmallImageWidth: auto;
395
+
396
+ //! Header height size
397
+ --account_headerHeightSize: var(--sp8x);
398
+ }
399
+ }
400
+ `}`;
401
+ export default AccountVariables;
@@ -0,0 +1,38 @@
1
+ export default AccountInfo;
2
+ declare function AccountInfo({ user, onAccountUpdate, displayFields, formFields }: {
3
+ user: any;
4
+ onAccountUpdate: any;
5
+ displayFields?: {
6
+ label: string;
7
+ value: string;
8
+ }[];
9
+ formFields?: ({
10
+ fieldType: string;
11
+ labelProps: {
12
+ label: string;
13
+ name: string;
14
+ };
15
+ fieldProps: {
16
+ placeholder: string;
17
+ disabled?: undefined;
18
+ };
19
+ } | {
20
+ fieldType: string;
21
+ labelProps: {
22
+ label: string;
23
+ name: string;
24
+ };
25
+ fieldProps?: undefined;
26
+ } | {
27
+ fieldType: string;
28
+ labelProps: {
29
+ label: string;
30
+ name: string;
31
+ };
32
+ fieldProps: {
33
+ disabled: boolean;
34
+ placeholder?: undefined;
35
+ };
36
+ })[];
37
+ }): React.JSX.Element;
38
+ import React from 'react';
@@ -0,0 +1,37 @@
1
+ import React, { useState, useCallback } from 'react';
2
+ import { Text, useUi } from '@weareconceptstudio/core';
3
+ import { FormBuilder } from '@weareconceptstudio/form';
4
+ import { AccountButton, WarningMessageForPopup } from '../../../components';
5
+ import AccountInfoStyle from './style';
6
+ import { defaultDisplayFields, defaultFormFields } from './utils';
7
+ const AccountInfo = ({ user, onAccountUpdate, displayFields = defaultDisplayFields, formFields = defaultFormFields }) => {
8
+ const { openPopup } = useUi();
9
+ //! State
10
+ const [edit, setEdit] = useState(false);
11
+ //! Handle Popup
12
+ const handleSuccessPopup = useCallback(() => {
13
+ openPopup(React.createElement(WarningMessageForPopup, { title: 'Testing success message title', description: 'Testing success message description' }), { className: 'messagePopup' });
14
+ }, []);
15
+ //! On Finish
16
+ const onFinish = useCallback((values) => {
17
+ return onAccountUpdate(values).then(() => {
18
+ setEdit(false);
19
+ handleSuccessPopup();
20
+ });
21
+ }, [edit]);
22
+ return (user && (React.createElement(AccountInfoStyle, { className: `account-info` },
23
+ React.createElement(Text, { text: `accountInformation`, className: `account-p account-p1 account-font-bold account-primary-color1` }),
24
+ !edit ? (React.createElement(React.Fragment, null,
25
+ React.createElement("div", { className: `info-wrap` }, displayFields.map((displayField, index) => (React.createElement("div", { key: index, className: `info-item-wrap` },
26
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: `${displayField.label}:` }),
27
+ "\u00A0",
28
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1`, text: user[displayField.value] || '-' }))))),
29
+ React.createElement(AccountButton, { text: `edit`, btnType: `green-large-text`, onClick: () => setEdit(true) }))) : (React.createElement(React.Fragment, null,
30
+ React.createElement(FormBuilder, { fields: formFields, onSubmit: onFinish, className: 'form-items-wrap', formOptions: {
31
+ initialValues: user,
32
+ } },
33
+ React.createElement("div", { className: `cancel-and-save-and-apply-wrap` },
34
+ React.createElement(AccountButton, { text: `cancel`, btnType: `green-large-text`, onClick: () => setEdit(false) }),
35
+ React.createElement(AccountButton, { type: 'submit', text: `saveAndApply`, btnType: `full-width` }))))))));
36
+ };
37
+ export default AccountInfo;
@@ -0,0 +1,2 @@
1
+ export default AccountInfoStyle;
2
+ declare const AccountInfoStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
@@ -0,0 +1,165 @@
1
+ import styled from 'styled-components';
2
+ const AccountInfoStyle = styled.section `
3
+ --account_infoWrapMTop: var(--sp2x);
4
+ --account_infoItemWrapMTop: var(--sp1x);
5
+ --account_btnWrapMTop: var(--sp5x);
6
+
7
+ --account_accFormWrapperMTop: var(--sp5x);
8
+ --account_horizontalDistance: var(--sp5x);
9
+ --account_verticalDistance: var(--sp4x);
10
+ --account_inputItemWidth: calc(50% - var(--account_horizontalDistance) / 2);
11
+ --account_cancelAndSaveAndApplyWrapMTop: var(--sp7x);
12
+ --account_cancelDistance: var(--sp5x);
13
+
14
+ .info-wrap {
15
+ margin-top: var(--account_infoWrapMTop);
16
+
17
+ .info-item-wrap {
18
+ display: flex;
19
+ align-items: center;
20
+ margin-top: var(--account_infoItemWrapMTop);
21
+ }
22
+ }
23
+
24
+ .btn-wrap {
25
+ margin-top: var(--account_btnWrapMTop);
26
+ }
27
+
28
+ .empty-form-item {
29
+ width: var(--account_inputItemWidth);
30
+ padding: 0 calc(var(--account_horizontalDistance) / 2);
31
+ }
32
+
33
+ form {
34
+ margin-top: var(--account_accFormWrapperMTop);
35
+
36
+ .form-items-wrap {
37
+ display: flex;
38
+ flex-wrap: wrap;
39
+ row-gap: var(--account_verticalDistance);
40
+ column-gap: var(--account_horizontalDistance);
41
+
42
+ .form-item {
43
+ width: var(--account_inputItemWidth);
44
+ }
45
+ }
46
+
47
+ .cancel-and-save-and-apply-wrap {
48
+ display: flex;
49
+ align-items: center;
50
+ justify-content: flex-end;
51
+ margin-top: var(--account_cancelAndSaveAndApplyWrapMTop);
52
+
53
+ .btn-wrap {
54
+ margin-top: 0;
55
+
56
+ &:first-child {
57
+ margin-right: var(--account_cancelDistance);
58
+ }
59
+ }
60
+ }
61
+ }
62
+
63
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
64
+ --account_infoWrapMTop: var(--sp2x);
65
+ --account_infoItemWrapMTop: var(--sp1x);
66
+ --account_btnWrapMTop: var(--sp4x);
67
+
68
+ --account_accFormWrapperMTop: var(--sp4x);
69
+ --account_horizontalDistance: var(--sp4x);
70
+ --account_verticalDistance: var(--sp4x);
71
+ --account_cancelAndSaveAndApplyWrapMTop: var(--sp5x);
72
+ --account_cancelDistance: var(--sp3x);
73
+ }
74
+
75
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
76
+ --account_infoWrapMTop: var(--sp2x);
77
+ --account_infoItemWrapMTop: var(--sp1x);
78
+ --account_btnWrapMTop: var(--sp4x);
79
+
80
+ --account_accFormWrapperMTop: var(--sp4x);
81
+ --account_horizontalDistance: var(--sp3x);
82
+ --account_verticalDistance: var(--sp3x);
83
+ --account_cancelAndSaveAndApplyWrapMTop: var(--sp4x);
84
+ --account_cancelDistance: var(--sp3x);
85
+ }
86
+
87
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
88
+ --account_infoWrapMTop: var(--sp2x);
89
+ --account_infoItemWrapMTop: var(--sp1x);
90
+ --account_btnWrapMTop: var(--sp4x);
91
+
92
+ --account_accFormWrapperMTop: var(--sp4x);
93
+ --account_horizontalDistance: var(--sp3x);
94
+ --account_verticalDistance: var(--sp3x);
95
+ --account_cancelAndSaveAndApplyWrapMTop: var(--sp4x);
96
+ --account_cancelDistance: var(--sp3x);
97
+ }
98
+
99
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
100
+ --account_infoWrapMTop: var(--sp2x);
101
+ --account_infoItemWrapMTop: var(--sp1x);
102
+ --account_btnWrapMTop: var(--sp3x);
103
+
104
+ --account_accFormWrapperMTop: var(--sp3x);
105
+ --account_horizontalDistance: var(--sp3x);
106
+ --account_verticalDistance: var(--sp2-5x);
107
+ --account_cancelAndSaveAndApplyWrapMTop: var(--sp3x);
108
+ --account_cancelDistance: var(--sp2-5x);
109
+ }
110
+
111
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
112
+ --account_infoWrapMTop: var(--sp1-5x);
113
+ --account_infoItemWrapMTop: var(--sp1x);
114
+ --account_btnWrapMTop: var(--sp2x);
115
+
116
+ --account_accFormWrapperMTop: var(--sp3x);
117
+ --account_horizontalDistance: var(--sp3x);
118
+ --account_verticalDistance: var(--sp2-5x);
119
+ --account_cancelAndSaveAndApplyWrapMTop: var(--sp3x);
120
+ --account_cancelDistance: var(--sp2-5x);
121
+ }
122
+
123
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
124
+ --account_infoWrapMTop: var(--sp3x);
125
+ --account_infoItemWrapMTop: var(--sp1x);
126
+ --account_btnWrapMTop: var(--sp2x);
127
+
128
+ --account_accFormWrapperMTop: var(--sp3x);
129
+ --account_horizontalDistance: var(--sp2x);
130
+ --account_verticalDistance: var(--sp2-5x);
131
+ --account_cancelAndSaveAndApplyWrapMTop: var(--sp3x);
132
+ --account_cancelDistance: var(--sp2-5x);
133
+ }
134
+
135
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
136
+ --account_infoWrapMTop: var(--sp3x);
137
+ --account_infoItemWrapMTop: var(--sp1x);
138
+ --account_btnWrapMTop: var(--sp2x);
139
+
140
+ --account_accFormWrapperMTop: var(--sp3x);
141
+ --account_horizontalDistance: 0;
142
+ --account_verticalDistance: var(--sp2x);
143
+ --account_inputItemWidth: 100%;
144
+ --account_cancelAndSaveAndApplyWrapMTop: var(--sp3x);
145
+ --account_cancelDistance: var(--sp2-5x);
146
+
147
+ form {
148
+ .cancel-and-save-and-apply-wrap {
149
+ flex-direction: column-reverse;
150
+
151
+ .btn-wrap {
152
+ &:nth-child(1) {
153
+ margin-right: 0;
154
+ margin-top: var(--sp2x);
155
+ }
156
+
157
+ &:nth-child(2) {
158
+ width: 100%;
159
+ }
160
+ }
161
+ }
162
+ }
163
+ }
164
+ `;
165
+ export default AccountInfoStyle;
@@ -0,0 +1,32 @@
1
+ export declare const defaultDisplayFields: {
2
+ label: string;
3
+ value: string;
4
+ }[];
5
+ export declare const defaultFormFields: ({
6
+ fieldType: string;
7
+ labelProps: {
8
+ label: string;
9
+ name: string;
10
+ };
11
+ fieldProps: {
12
+ placeholder: string;
13
+ disabled?: undefined;
14
+ };
15
+ } | {
16
+ fieldType: string;
17
+ labelProps: {
18
+ label: string;
19
+ name: string;
20
+ };
21
+ fieldProps?: undefined;
22
+ } | {
23
+ fieldType: string;
24
+ labelProps: {
25
+ label: string;
26
+ name: string;
27
+ };
28
+ fieldProps: {
29
+ disabled: boolean;
30
+ placeholder?: undefined;
31
+ };
32
+ })[];