ordering-ui-external 1.2.2 → 1.3.0

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 (97) hide show
  1. package/_bundles/{0.ordering-ui.fc62fe574704c7c4d033.js → 0.ordering-ui.aee3f88f00476e436e39.js} +1 -1
  2. package/_bundles/{1.ordering-ui.fc62fe574704c7c4d033.js → 1.ordering-ui.aee3f88f00476e436e39.js} +1 -1
  3. package/_bundles/{3.ordering-ui.fc62fe574704c7c4d033.js → 3.ordering-ui.aee3f88f00476e436e39.js} +1 -1
  4. package/_bundles/{4.ordering-ui.fc62fe574704c7c4d033.js → 4.ordering-ui.aee3f88f00476e436e39.js} +1 -1
  5. package/_bundles/5.ordering-ui.aee3f88f00476e436e39.js +1 -0
  6. package/_bundles/{6.ordering-ui.fc62fe574704c7c4d033.js → 6.ordering-ui.aee3f88f00476e436e39.js} +1 -1
  7. package/_bundles/7.ordering-ui.aee3f88f00476e436e39.js +2 -0
  8. package/_bundles/{7.ordering-ui.fc62fe574704c7c4d033.js.LICENSE.txt → 7.ordering-ui.aee3f88f00476e436e39.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.fc62fe574704c7c4d033.js → 8.ordering-ui.aee3f88f00476e436e39.js} +1 -1
  10. package/_bundles/{9.ordering-ui.fc62fe574704c7c4d033.js → 9.ordering-ui.aee3f88f00476e436e39.js} +1 -1
  11. package/_bundles/ordering-ui.aee3f88f00476e436e39.js +2 -0
  12. package/_bundles/{ordering-ui.fc62fe574704c7c4d033.js.LICENSE.txt → ordering-ui.aee3f88f00476e436e39.js.LICENSE.txt} +0 -0
  13. package/_modules/components/AutoScroll/styles.js +3 -3
  14. package/_modules/hooks/useIsMounted.js +24 -0
  15. package/_modules/index.js +8 -0
  16. package/_modules/themes/five/index.js +33 -1
  17. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +2 -2
  18. package/_modules/themes/five/src/components/BusinessController/styles.js +42 -42
  19. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +12 -2
  20. package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +5 -2
  21. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +10 -3
  22. package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +7 -3
  23. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +1 -0
  24. package/_modules/themes/five/src/components/MultiCheckout/styles.js +1 -1
  25. package/_modules/themes/five/src/components/MyOrders/index.js +9 -3
  26. package/_modules/themes/five/src/components/NavigationBar/index.js +159 -0
  27. package/_modules/themes/five/src/components/NavigationBar/styles.js +33 -0
  28. package/_modules/themes/five/src/components/OrderDetails/index.js +71 -41
  29. package/_modules/themes/five/src/components/ProfessionalBusinessFilter/index.js +96 -0
  30. package/_modules/themes/five/src/components/ProfessionalBusinessFilter/styles.js +48 -0
  31. package/_modules/themes/five/src/components/ProfessionalFilter/index.js +35 -7
  32. package/_modules/themes/five/src/components/ProfessionalFilter/styles.js +10 -4
  33. package/_modules/themes/five/src/components/ProfessionalInfo/index.js +120 -0
  34. package/_modules/themes/five/src/components/ProfessionalInfo/styles.js +100 -0
  35. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +36 -13
  36. package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +21 -18
  37. package/_modules/themes/five/src/components/ReviewProfessional/index.js +314 -0
  38. package/_modules/themes/five/src/components/ReviewProfessional/styles.js +137 -0
  39. package/_modules/themes/five/src/components/SignUpApproval/index.js +106 -0
  40. package/_modules/themes/five/src/components/SignUpApproval/styles.js +71 -0
  41. package/_modules/themes/five/src/components/SignUpBusiness/index.js +7 -383
  42. package/_modules/themes/five/src/components/SignUpBusiness/layouts/NewSignUpBusiness/index.js +405 -0
  43. package/_modules/themes/five/src/components/SignUpBusiness/layouts/NewSignUpBusiness/styles.js +110 -0
  44. package/_modules/themes/five/src/components/SignUpBusiness/layouts/OldSignUpBusiness/index.js +400 -0
  45. package/_modules/themes/five/src/components/SignUpBusiness/{styles.js → layouts/OldSignUpBusiness/styles.js} +0 -0
  46. package/_modules/themes/five/src/components/SignUpDriver/index.js +7 -383
  47. package/_modules/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/index.js +405 -0
  48. package/_modules/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/styles.js +106 -0
  49. package/_modules/themes/five/src/components/SignUpDriver/layouts/OldSignUpDriver/index.js +400 -0
  50. package/_modules/themes/five/src/components/SignUpDriver/{styles.js → layouts/OldSignUpDriver/styles.js} +0 -0
  51. package/_modules/themes/five/src/components/SingleProductCard/styles.js +1 -1
  52. package/_modules/utils/index.js +103 -0
  53. package/package.json +2 -2
  54. package/src/components/AutoScroll/styles.js +11 -12
  55. package/src/hooks/useIsMounted.js +18 -0
  56. package/src/index.js +2 -0
  57. package/src/themes/five/index.js +9 -1
  58. package/src/themes/five/src/components/BusinessBasicInformation/index.js +1 -1
  59. package/src/themes/five/src/components/BusinessController/styles.js +3 -6
  60. package/src/themes/five/src/components/BusinessProductsCategories/index.js +10 -2
  61. package/src/themes/five/src/components/BusinessProductsCategories/styles.js +5 -0
  62. package/src/themes/five/src/components/BusinessProductsListing/index.js +8 -2
  63. package/src/themes/five/src/components/BusinessProductsListing/styles.js +1 -1
  64. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -0
  65. package/src/themes/five/src/components/MultiCheckout/index.js +1 -0
  66. package/src/themes/five/src/components/MultiCheckout/styles.js +1 -0
  67. package/src/themes/five/src/components/MyOrders/index.js +6 -3
  68. package/src/themes/five/src/components/NavigationBar/index.js +104 -0
  69. package/src/themes/five/src/components/NavigationBar/styles.js +44 -0
  70. package/src/themes/five/src/components/OrderDetails/index.js +19 -11
  71. package/src/themes/five/src/components/ProfessionalBusinessFilter/index.js +82 -0
  72. package/src/themes/five/src/components/ProfessionalBusinessFilter/styles.js +71 -0
  73. package/src/themes/five/src/components/ProfessionalFilter/index.js +30 -7
  74. package/src/themes/five/src/components/ProfessionalFilter/styles.js +15 -2
  75. package/src/themes/five/src/components/ProfessionalInfo/index.js +133 -0
  76. package/src/themes/five/src/components/ProfessionalInfo/styles.js +140 -0
  77. package/src/themes/five/src/components/RenderProductsLayout/index.js +37 -16
  78. package/src/themes/five/src/components/RenderProductsLayout/styles.js +6 -1
  79. package/src/themes/five/src/components/ReviewProfessional/index.js +239 -0
  80. package/src/themes/five/src/components/ReviewProfessional/styles.js +233 -0
  81. package/src/themes/five/src/components/SignUpApproval/index.js +108 -0
  82. package/src/themes/five/src/components/SignUpApproval/styles.js +98 -0
  83. package/src/themes/five/src/components/SignUpBusiness/index.js +10 -374
  84. package/src/themes/five/src/components/SignUpBusiness/layouts/NewSignUpBusiness/index.js +382 -0
  85. package/src/themes/five/src/components/SignUpBusiness/layouts/NewSignUpBusiness/styles.js +256 -0
  86. package/src/themes/five/src/components/SignUpBusiness/layouts/OldSignUpBusiness/index.js +378 -0
  87. package/src/themes/five/src/components/SignUpBusiness/{styles.js → layouts/OldSignUpBusiness/styles.js} +0 -0
  88. package/src/themes/five/src/components/SignUpDriver/index.js +10 -374
  89. package/src/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/index.js +382 -0
  90. package/src/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/styles.js +262 -0
  91. package/src/themes/five/src/components/SignUpDriver/layouts/OldSignUpDriver/index.js +378 -0
  92. package/src/themes/five/src/components/SignUpDriver/{styles.js → layouts/OldSignUpDriver/styles.js} +0 -0
  93. package/src/themes/five/src/components/SingleProductCard/styles.js +3 -1
  94. package/src/utils/index.js +54 -0
  95. package/_bundles/5.ordering-ui.fc62fe574704c7c4d033.js +0 -1
  96. package/_bundles/7.ordering-ui.fc62fe574704c7c4d033.js +0 -2
  97. package/_bundles/ordering-ui.fc62fe574704c7c4d033.js +0 -2
@@ -0,0 +1,382 @@
1
+ import React, { useState, useEffect, useRef } from 'react'
2
+ import { useForm } from 'react-hook-form'
3
+ import Skeleton from 'react-loading-skeleton'
4
+ import { Alert } from '../../../Confirm'
5
+ import { InputPhoneNumber } from '../../../../../../../components/InputPhoneNumber'
6
+ import parsePhoneNumber from 'libphonenumber-js'
7
+ import { useTheme } from 'styled-components'
8
+ import { Input } from '../../../../styles/Inputs'
9
+ import { Button } from '../../../../styles/Buttons'
10
+ import { Checkbox } from '../../../../../../../styles/Checkbox'
11
+ import { sortInputFields } from '../../../../../../../utils'
12
+
13
+ import AiOutlineEye from '@meronex/icons/ai/AiOutlineEye'
14
+ import AiOutlineEyeInvisible from '@meronex/icons/ai/AiOutlineEyeInvisible'
15
+
16
+ import {
17
+ SignupForm as SignUpController,
18
+ useLanguage,
19
+ useConfig,
20
+ ReCaptcha
21
+ } from 'ordering-components-external'
22
+
23
+ import {
24
+ SignupBusinessContainer,
25
+ SignupDescriptionContainer,
26
+ SignupDescriptionTitle,
27
+ SignupDescriptionContent,
28
+ FormInput,
29
+ SignUpTitle,
30
+ WrapperPassword,
31
+ TogglePassword,
32
+ ReCaptchaWrapper,
33
+ TermsConditionWrapper,
34
+ SkeletonWrapper,
35
+ FormSide,
36
+ PhoneNumberWrapper
37
+ } from './styles'
38
+
39
+ const notValidationFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'address_notes']
40
+
41
+ const SignUpBusinessUI = (props) => {
42
+ const {
43
+ handleChangeInput,
44
+ handleButtonSignupClick,
45
+ handleReCaptcha,
46
+ useChekoutFileds,
47
+ validationFields,
48
+ showField,
49
+ isRequiredField,
50
+ formState,
51
+ handleSuccessSignup,
52
+ isPopup,
53
+ externalPhoneNumber,
54
+ saveCustomerUser,
55
+ fieldsNotValid,
56
+ signupData,
57
+ enableReCaptcha
58
+ } = props
59
+
60
+ const theme = useTheme()
61
+ const [, t] = useLanguage()
62
+ const [{ configs }] = useConfig()
63
+ const formMethods = useForm()
64
+ const [alertState, setAlertState] = useState({ open: false, content: [] })
65
+ const emailInput = useRef(null)
66
+
67
+ const [userPhoneNumber, setUserPhoneNumber] = useState('')
68
+ const [isValidPhoneNumber, setIsValidPhoneNumber] = useState(null)
69
+ const [passwordSee, setPasswordSee] = useState(false)
70
+
71
+ const showInputPhoneNumber = (validationFields?.fields?.checkout?.cellphone?.enabled ?? false) || configs?.verification_phone_required?.value === '1'
72
+
73
+ const togglePasswordView = () => {
74
+ setPasswordSee(!passwordSee)
75
+ }
76
+
77
+ const closeAlert = () => {
78
+ setAlertState({
79
+ open: false,
80
+ content: []
81
+ })
82
+ }
83
+
84
+ const onSubmit = () => {
85
+ const isPhoneNumberValid = userPhoneNumber ? isValidPhoneNumber : true
86
+ if (!userPhoneNumber &&
87
+ ((validationFields?.fields?.checkout?.cellphone?.enabled &&
88
+ validationFields?.fields?.checkout?.cellphone?.required) ||
89
+ configs?.verification_phone_required?.value === '1')
90
+ ) {
91
+ setAlertState({
92
+ open: true,
93
+ content: [t('VALIDATION_ERROR_MOBILE_PHONE_REQUIRED', 'The field Mobile phone is required.')]
94
+ })
95
+ return
96
+ }
97
+ if (!isPhoneNumberValid) {
98
+ setAlertState({
99
+ open: true,
100
+ content: [t('INVALID_ERROR_PHONE_NUMBER', 'The Phone Number field is invalid')]
101
+ })
102
+ return
103
+ }
104
+ handleButtonSignupClick && handleButtonSignupClick()
105
+ if (!formState.loading && formState.result.result && !formState.result.error) {
106
+ handleSuccessSignup(formState.result.result)
107
+ }
108
+ }
109
+
110
+ const handleChangePhoneNumber = (number, isValid) => {
111
+ setUserPhoneNumber(number)
112
+
113
+ let phoneNumberParser = null
114
+ let phoneNumber = {
115
+ country_phone_code: {
116
+ name: 'country_phone_code',
117
+ value: ''
118
+ },
119
+ cellphone: {
120
+ name: 'cellphone',
121
+ value: ''
122
+ }
123
+ }
124
+ if (isValid) {
125
+ phoneNumberParser = parsePhoneNumber(number)
126
+ }
127
+ if (phoneNumberParser) {
128
+ phoneNumber = {
129
+ country_phone_code: {
130
+ name: 'country_phone_code',
131
+ value: phoneNumberParser.countryCallingCode
132
+ },
133
+ cellphone: {
134
+ name: 'cellphone',
135
+ value: phoneNumberParser.nationalNumber
136
+ }
137
+ }
138
+ }
139
+ handleChangeInput(phoneNumber, true)
140
+ }
141
+
142
+ const handleChangeInputEmail = (e) => {
143
+ handleChangeInput({ target: { name: 'email', value: e.target.value.toLowerCase().replace(/[&,()%";:ç?<>{}\\[\]\s]/g, '') } })
144
+ formMethods.setValue('email', e.target.value.toLowerCase().replace(/[&,()%";:ç?<>{}\\[\]\s]/g, ''))
145
+ if (emailInput?.current) {
146
+ emailInput.current.value = e.target.value.toLowerCase().replace(/[&,()%";:ç?<>{}\\[\]\s]/g, '')
147
+ }
148
+ }
149
+
150
+ useEffect(() => {
151
+ if (!formState.loading && formState.result?.error) {
152
+ setAlertState({
153
+ open: true,
154
+ content: formState.result?.result || [t('ERROR', 'Error')]
155
+ })
156
+ } else if (!formState.loading && !formState.result?.error && formState.result?.result) {
157
+ saveCustomerUser && saveCustomerUser(formState.result?.result)
158
+ }
159
+ }, [formState])
160
+
161
+ useEffect(() => {
162
+ if (Object.keys(formMethods.errors).length > 0) {
163
+ setAlertState({
164
+ open: true,
165
+ content: Object.values(formMethods.errors).map(error => error.message)
166
+ })
167
+ }
168
+ }, [formMethods.errors])
169
+
170
+ useEffect(() => {
171
+ if (!validationFields.loading) {
172
+ Object.values(validationFields?.fields?.checkout).map(field => !notValidationFields.includes(field.code) && (
173
+ field.code === 'email' ? (
174
+ formMethods.register('email', {
175
+ required: isRequiredField(field.code)
176
+ ? t('VALIDATION_ERROR_EMAIL_REQUIRED', 'The field Email is required').replace('_attribute_', t('EMAIL', 'Email'))
177
+ : null,
178
+ pattern: {
179
+ value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
180
+ message: t('INVALID_ERROR_EMAIL', 'Invalid email address').replace('_attribute_', t('EMAIL', 'Email'))
181
+ }
182
+ })
183
+ ) : (
184
+ formMethods.register(field.code, {
185
+ required: isRequiredField(field.code)
186
+ ? t(`VALIDATION_ERROR_${field.code.toUpperCase()}_REQUIRED`, `${field.name} is required`).replace('_attribute_', t(field.name, field.code))
187
+ : null
188
+ })
189
+ )
190
+ ))
191
+ }
192
+ }, [formMethods])
193
+
194
+ useEffect(() => {
195
+ Object.keys(signupData).map(fieldName => {
196
+ formMethods.setValue(fieldName, signupData[fieldName])
197
+ })
198
+ }, [signupData])
199
+
200
+ useEffect(() => {
201
+ if (externalPhoneNumber) {
202
+ setUserPhoneNumber(externalPhoneNumber)
203
+ handleChangePhoneNumber(externalPhoneNumber, true)
204
+ }
205
+ }, [externalPhoneNumber])
206
+
207
+ useEffect(() => {
208
+ handleChangeInput({
209
+ target: {
210
+ name: 'level',
211
+ value: 2
212
+ }
213
+ })
214
+ }, [])
215
+
216
+ return (
217
+ <SignupBusinessContainer bgImage={theme.images?.general?.businessSignUpBG}>
218
+ <SignupDescriptionContainer>
219
+ <SignupDescriptionTitle>{t('START_SELLING_WITH_US', 'Start Selling with us.')}</SignupDescriptionTitle>
220
+ <SignupDescriptionContent>{t('REGISTER_AS_NEW_BUSINESS_TERMS', 'Register as a new business owner and create your store to sell your products or services in _Domain_or_brand_ Website and Native Apps for iOS & Android.').replace('_Domain_or_brand_', 'test')}</SignupDescriptionContent>
221
+ </SignupDescriptionContainer>
222
+ <FormSide>
223
+ <SignUpTitle>{t('SIGN_UP_NOW', 'Sign up now')}</SignUpTitle>
224
+ <FormInput
225
+ noValidate
226
+ isPopup={isPopup}
227
+ onSubmit={formMethods.handleSubmit(onSubmit)}
228
+ isSkeleton={useChekoutFileds && validationFields?.loading}
229
+ >
230
+ {props.beforeMidElements?.map((BeforeMidElements, i) => (
231
+ <React.Fragment key={i}>
232
+ {BeforeMidElements}
233
+ </React.Fragment>))}
234
+ {props.beforeMidComponents?.map((BeforeMidComponents, i) => (
235
+ <BeforeMidComponents key={i} {...props} />))}
236
+ {
237
+ !(useChekoutFileds && validationFields?.loading) ? (
238
+ <>
239
+ {validationFields?.fields?.checkout &&
240
+ sortInputFields({ values: validationFields?.fields?.checkout }).map(field =>
241
+ showField && showField(field.code) && (
242
+ <React.Fragment key={field.id}>
243
+ {field.code === 'email' ? (
244
+ <Input
245
+ type={field.type}
246
+ name={field.code}
247
+ aria-label={field.code}
248
+ className='form'
249
+ placeholder={t(field.code.toUpperCase(), field.name)}
250
+ onChange={handleChangeInputEmail}
251
+ ref={(e) => {
252
+ emailInput.current = e
253
+ }}
254
+ required={!!field.required}
255
+ autoComplete='off'
256
+ />
257
+ ) : (
258
+ <Input
259
+ type={field.type}
260
+ name={field.code}
261
+ aria-label={field.code}
262
+ className='form'
263
+ placeholder={t(field.code.toUpperCase(), field.name)}
264
+ onChange={handleChangeInput}
265
+ required={field.required}
266
+ autoComplete='off'
267
+ />
268
+ )}
269
+ </React.Fragment>
270
+ )
271
+ )}
272
+ {!!showInputPhoneNumber && (
273
+ <PhoneNumberWrapper className='formStyle'>
274
+ <InputPhoneNumber
275
+ value={userPhoneNumber}
276
+ setValue={handleChangePhoneNumber}
277
+ handleIsValid={setIsValidPhoneNumber}
278
+ />
279
+ </PhoneNumberWrapper>
280
+ )}
281
+
282
+ {(!fieldsNotValid || (fieldsNotValid && !fieldsNotValid.includes('password'))) && (
283
+ <WrapperPassword className='formStyle'>
284
+ <Input
285
+ type={!passwordSee ? 'password' : 'text'}
286
+ name='password'
287
+ aria-label='password'
288
+ className='form'
289
+ placeholder={t('PASSWORD', 'Password')}
290
+ onChange={handleChangeInput}
291
+ required
292
+ ref={formMethods.register({
293
+ required: isRequiredField('password') ? t('VALIDATION_ERROR_PASSWORD_REQUIRED', 'The field Password is required').replace('_attribute_', t('PASSWORD', 'password')) : null,
294
+ minLength: {
295
+ value: 8,
296
+ message: t('VALIDATION_ERROR_PASSWORD_MIN_STRING', 'The Password must be at least 8 characters.').replace('_attribute_', t('PASSWORD', 'Password')).replace('_min_', 8)
297
+ }
298
+ })}
299
+ />
300
+ <TogglePassword onClick={togglePasswordView}>
301
+ {!passwordSee ? <AiOutlineEye /> : <AiOutlineEyeInvisible />}
302
+ </TogglePassword>
303
+ </WrapperPassword>
304
+ )}
305
+
306
+ {props.afterMidElements?.map((MidElement, i) => (
307
+ <React.Fragment key={i}>
308
+ {MidElement}
309
+ </React.Fragment>))}
310
+ {props.afterMidComponents?.map((MidComponent, i) => (
311
+ <MidComponent key={i} {...props} />))}
312
+ </>
313
+ ) : (
314
+ <>
315
+ {[...Array(5)].map((_, i) => (
316
+ <SkeletonWrapper key={i}>
317
+ <Skeleton height={43} />
318
+ </SkeletonWrapper>
319
+ ))}
320
+ </>
321
+ )
322
+ }
323
+ {props.isRecaptchaEnable && enableReCaptcha && (
324
+ <ReCaptchaWrapper>
325
+ <ReCaptcha handleReCaptcha={handleReCaptcha} />
326
+ </ReCaptchaWrapper>
327
+ )}
328
+
329
+ {configs?.terms_and_conditions?.value === 'true' && (
330
+ <TermsConditionWrapper>
331
+ <Checkbox
332
+ name='acceptTerms'
333
+ ref={formMethods.register({
334
+ required: t('ERROR_ACCEPT_TERMS', 'You must accept the Terms & Conditions.')
335
+ })}
336
+ id='acceptTerms'
337
+ />
338
+ <label
339
+ htmlFor='acceptTerms'
340
+ >
341
+ <span>{t('TERMS_AND_CONDITIONS_TEXT', 'I’m agree with')}</span>
342
+ <a
343
+ href={configs?.terms_and_conditions_url?.value}
344
+ target='_blank'
345
+ rel='noopener noreferrer'
346
+ >
347
+ {t('TERMS_AND_CONDITIONS', 'Terms & Conditions')}
348
+ </a>
349
+ </label>
350
+ </TermsConditionWrapper>
351
+ )}
352
+
353
+ <Button
354
+ color='primary'
355
+ type='submit'
356
+ disabled={formState.loading || validationFields?.loading}
357
+ className='formButton'
358
+ >
359
+ {formState.loading ? `${t('LOADING', 'Loading')}...` : t('SUBMIT', 'Submit')}
360
+ </Button>
361
+ </FormInput>
362
+ </FormSide>
363
+ <Alert
364
+ title={t('SIGN_UP_FOR_BUSINESS', 'Sign up for business')}
365
+ content={alertState.content}
366
+ acceptText={t('ACCEPT', 'Accept')}
367
+ open={alertState.open}
368
+ onClose={() => closeAlert()}
369
+ onAccept={() => closeAlert()}
370
+ closeOnBackdrop={false}
371
+ />
372
+ </SignupBusinessContainer>
373
+ )
374
+ }
375
+
376
+ export const SignUpBusiness = (props) => {
377
+ const signUpBusinessProps = {
378
+ ...props,
379
+ UIComponent: SignUpBusinessUI
380
+ }
381
+ return <SignUpController {...signUpBusinessProps} />
382
+ }
@@ -0,0 +1,256 @@
1
+ import styled, { css } from 'styled-components'
2
+ import React from 'react'
3
+
4
+ export const SignupBusinessContainer = styled.div`
5
+ ${({ bgImage }) => bgImage && css`
6
+ background-image: url(${bgImage});
7
+ background-repeat: no-repeat;
8
+ background-size: cover;
9
+ object-fit: cover;
10
+ background-position: center;
11
+ `}
12
+ display: flex;
13
+ justify-content: space-between;
14
+ align-items: center;
15
+ flex-direction: column-reverse;
16
+ padding: 25px 30px 30px;
17
+
18
+ > div {
19
+ width: 100%;
20
+ max-width: 580px;
21
+ box-sizing: border-box;
22
+ }
23
+
24
+ @media (min-width: 993px) {
25
+ flex-direction: row;
26
+ padding: 120px 130px;
27
+ > div {
28
+ width: calc(50% - 12px);
29
+ }
30
+ }
31
+ `
32
+ export const SignupDescriptionContainer = styled.div`
33
+ margin-right: 0;
34
+ margin-top: 45px;
35
+
36
+ @media (min-width: 993px) {
37
+ margin-right: 24px;
38
+ margin-top: 0;
39
+ }
40
+ `
41
+
42
+ export const SignupDescriptionTitle = styled.div`
43
+ font-style: normal;
44
+ font-weight: 600;
45
+ font-size: 28px;
46
+ line-height: 60px;
47
+ color: ${props => props.theme.colors.colorTextSignForm};
48
+
49
+ @media (min-width: 430px) {
50
+ font-size: 37px;
51
+ }
52
+
53
+ @media (min-width: 1275px) {
54
+ font-size: 48px;
55
+ }
56
+ `
57
+
58
+ export const SignupDescriptionContent = styled.div`
59
+ margin-top: 0;
60
+ font-style: normal;
61
+ font-weight: 400;
62
+ font-size: 16px;
63
+ line-height: 36px;
64
+ color: ${props => props.theme.colors.colorTextSignForm};
65
+
66
+ @media (min-width: 430px) {
67
+ font-size: 20px;
68
+ }
69
+
70
+ @media (min-width: 993px) {
71
+ margin-top: 15px;
72
+ }
73
+
74
+ @media (min-width: 1275px) {
75
+ font-size: 24px;
76
+ }
77
+ `
78
+ export const FormInput = styled.form`
79
+ width: 100%;
80
+ display: flex;
81
+ flex-direction: column;
82
+
83
+ div.phone_number {
84
+ margin: 10px 0px;
85
+ width: 100%;
86
+ }
87
+
88
+ input.form:not(:last-child) {
89
+ margin: 10px 0px;
90
+ padding: 8px 20px;
91
+ }
92
+
93
+ button {
94
+ margin-top: 10px;
95
+ padding: 5px;
96
+ }
97
+ > input {
98
+ font-size: 20px;
99
+ box-shadow: 0px 8px 35px rgba(0, 0, 0, 0.16);
100
+ }
101
+ > .formStyle {
102
+ & > .phone_number {
103
+ border-radius: 7.6px;
104
+ font-size: 20px;
105
+ box-shadow: 0px 8px 35px rgba(0, 0, 0, 0.16);
106
+ }
107
+ & > input {
108
+ border-radius: 7.6px;
109
+ font-size: 20px;
110
+ box-shadow: 0px 8px 35px rgba(0, 0, 0, 0.16);
111
+ }
112
+ }
113
+ > .formButton {
114
+ width: 128px;
115
+ padding: 15px 0;
116
+ font-style: normal;
117
+ font-weight: 600;
118
+ font-size: 24px;
119
+ line-height: 30px;
120
+ }
121
+ `
122
+ export const PhoneNumberWrapper = styled.div`
123
+ .PhoneInput {
124
+ border: 1px solid #DEE2E6;
125
+ box-sizing: border-box;
126
+ border-radius: 7.6px;
127
+ background: white;
128
+
129
+ .PhoneInputCountry {
130
+ padding-left: 20px;
131
+ ${props => props.theme.rtl && css`
132
+ padding-left: 0;
133
+ padding-right: 20px;
134
+ `}
135
+ }
136
+
137
+ input {
138
+ border: none;
139
+ }
140
+ }
141
+ `
142
+
143
+ export const ReCaptchaWrapper = styled.div`
144
+ margin: 12px auto;
145
+ `
146
+
147
+ export const WrapperPassword = styled.div`
148
+ position: relative;
149
+ width: 100%;
150
+ input{
151
+ box-sizing: border-box;
152
+ width: 100%;
153
+ padding-right: 40px;
154
+ }
155
+ `
156
+
157
+ export const TogglePassword = styled.span`
158
+ position: absolute;
159
+ font-weight: 300;
160
+ padding: 10px 0;
161
+ color: #333;
162
+ font-size: 26px;
163
+ transform: translate(-150%, 10%);
164
+ max-height: 100%;
165
+ ${props => props.theme?.rtl && css`
166
+ transform: translate(150%, 10%);
167
+ `}
168
+ span{
169
+ cursor: pointer;
170
+ }
171
+ `
172
+
173
+ export const TermsConditionWrapper = styled.div`
174
+ display: flex;
175
+ align-items: center;
176
+ margin: 10px 0;
177
+
178
+ > label {
179
+ font-size: 14px;
180
+ ${props => props.theme?.rtl ? css`
181
+ margin-right: 20px;
182
+ ` : css`
183
+ margin-left: 20px;
184
+ `}
185
+
186
+ > span:first-child {
187
+ font-weight: 500;
188
+ ${props => props.theme?.rtl ? css`
189
+ margin-left: 7px;
190
+ ` : css`
191
+ margin-right: 7px;
192
+ `}
193
+ }
194
+
195
+ > a {
196
+ color: ${props => props.theme.colors.primary} !important;
197
+ }
198
+ }
199
+
200
+ @media (min-width: 768px) {
201
+ > label {
202
+ font-size: 16px;
203
+ }
204
+ }
205
+ `
206
+
207
+ export const SkeletonWrapper = styled.div`
208
+ span{
209
+ margin: 10px 0;
210
+ border-radius: 7.6px;
211
+ }
212
+ `
213
+
214
+ export const FormSide = styled.div`
215
+ background-color: ${props => props.theme.colors.colorTextSignForm};
216
+ box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
217
+ border-radius: 31px;
218
+ display: flex;
219
+ width: 100%;
220
+ flex-direction: column;
221
+ align-items: center;
222
+ margin: auto;
223
+ padding: 25px 30px 25px;
224
+ > h1 {
225
+ width: 100%;
226
+ margin-bottom: 25px;
227
+ margin-top: 15;
228
+ font-weight: 500;
229
+ font-size: 24px;
230
+ }
231
+
232
+ @media (min-width: 769px) {
233
+ padding: 42px 58px 65px;
234
+ ${({ isPopup }) => isPopup && css`
235
+ margin: 20px 0px;
236
+ `}
237
+ }
238
+
239
+ @media (min-width: 992px) {
240
+ width: 45%;
241
+ font-size: ${({ isPopup }) => isPopup ? '12px' : '1em'};
242
+ }
243
+
244
+ @media (min-width: 1200px){
245
+ font-size: ${({ isPopup }) => isPopup ? '0.9em' : '1em'};
246
+ }
247
+ `
248
+ export const SignUpTitle = styled.h1`
249
+ margin-top: 0;
250
+ margin-bottom: 10px !important;
251
+ font-style: normal;
252
+ font-weight: 600;
253
+ font-size: 36px;
254
+ line-height: 65px;
255
+ color: ${props => props.theme.colors.black};
256
+ `