@weareconceptstudio/account 2.1.11 → 2.1.13
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.
- package/dist/components/CartPageDetector.d.ts.map +1 -1
- package/dist/components/CartPageDetector.js +28 -16
- package/dist/components/CartPageDetector.js.map +1 -1
- package/dist/components/TotalCheckout/index.js +1 -1
- package/dist/components/TotalCheckout/index.js.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/Subscription/index.d.ts +5 -1
- package/dist/modules/account/AccountSettingsTemplate/Subscription/index.d.ts.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/Subscription/index.js +31 -14
- package/dist/modules/account/AccountSettingsTemplate/Subscription/index.js.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/index.d.ts +9 -1
- package/dist/modules/account/AccountSettingsTemplate/index.d.ts.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/index.js +5 -2
- package/dist/modules/account/AccountSettingsTemplate/index.js.map +1 -1
- package/dist/modules/address/AddressProvider.js +1 -1
- package/dist/modules/address/AddressProvider.js.map +1 -1
- package/dist/modules/address/ShippingBillingForm/index.d.ts.map +1 -1
- package/dist/modules/address/ShippingBillingForm/index.js +5 -1
- package/dist/modules/address/ShippingBillingForm/index.js.map +1 -1
- package/dist/modules/cart/CartTemplate/index.d.ts +2 -1
- package/dist/modules/cart/CartTemplate/index.d.ts.map +1 -1
- package/dist/modules/cart/CartTemplate/index.js +2 -2
- package/dist/modules/cart/CartTemplate/index.js.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepShipping/index.d.ts +9 -0
- package/dist/modules/checkout/CheckoutTemplate/StepShipping/index.d.ts.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepShipping/index.js +12 -11
- package/dist/modules/checkout/CheckoutTemplate/StepShipping/index.js.map +1 -1
- package/dist/modules/guest/GuestAddressForm/index.d.ts.map +1 -1
- package/dist/modules/guest/GuestAddressForm/index.js +56 -27
- package/dist/modules/guest/GuestAddressForm/index.js.map +1 -1
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.js +1 -0
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/payment/CardForm/index.d.ts.map +1 -1
- package/dist/modules/payment/CardForm/index.js +4 -0
- package/dist/modules/payment/CardForm/index.js.map +1 -1
- package/dist/modules/unsubscribe/UnsubscribeMessage.d.ts +8 -0
- package/dist/modules/unsubscribe/UnsubscribeMessage.d.ts.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeMessage.js +16 -0
- package/dist/modules/unsubscribe/UnsubscribeMessage.js.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeMessageStyle.d.ts +3 -0
- package/dist/modules/unsubscribe/UnsubscribeMessageStyle.d.ts.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeMessageStyle.js +40 -0
- package/dist/modules/unsubscribe/UnsubscribeMessageStyle.js.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplate.d.ts +14 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplate.d.ts.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplate.js +86 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplate.js.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplateStyle.d.ts +3 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplateStyle.d.ts.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplateStyle.js +86 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplateStyle.js.map +1 -0
- package/dist/modules/unsubscribe/icons.d.ts +9 -0
- package/dist/modules/unsubscribe/icons.d.ts.map +1 -0
- package/dist/modules/unsubscribe/icons.js +34 -0
- package/dist/modules/unsubscribe/icons.js.map +1 -0
- package/dist/modules/unsubscribe/illustrationTheme.d.ts +2 -0
- package/dist/modules/unsubscribe/illustrationTheme.d.ts.map +1 -0
- package/dist/modules/unsubscribe/illustrationTheme.js +8 -0
- package/dist/modules/unsubscribe/illustrationTheme.js.map +1 -0
- package/dist/modules/unsubscribe/index.d.ts +3 -0
- package/dist/modules/unsubscribe/index.d.ts.map +1 -0
- package/dist/modules/unsubscribe/index.js +3 -0
- package/dist/modules/unsubscribe/index.js.map +1 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.d.ts.map +1 -1
- package/dist/translations/en.js +8 -0
- package/dist/translations/en.js.map +1 -1
- package/dist/translations/hy.d.ts +8 -0
- package/dist/translations/hy.d.ts.map +1 -1
- package/dist/translations/hy.js +8 -0
- package/dist/translations/hy.js.map +1 -1
- package/dist/translations/index.d.ts +32 -0
- package/dist/translations/index.d.ts.map +1 -1
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.d.ts.map +1 -1
- package/dist/translations/it.js +8 -0
- package/dist/translations/it.js.map +1 -1
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.d.ts.map +1 -1
- package/dist/translations/ru.js +8 -0
- package/dist/translations/ru.js.map +1 -1
- package/dist/utils/config.d.ts +2 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +4 -0
- package/dist/utils/config.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,16 +1,32 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useRef } from 'react';
|
|
1
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { Text } from '@weareconceptstudio/core';
|
|
3
3
|
import { FormBuilder } from '@weareconceptstudio/form';
|
|
4
|
+
import { CustomCheckbox } from '../../../components';
|
|
4
5
|
import { useAddressContext } from '../../address';
|
|
5
6
|
import { useCart } from '@weareconceptstudio/cart';
|
|
6
7
|
import { checkoutFormsRegistry } from '../../checkout/formsRegistry';
|
|
7
8
|
import GuestAddressFormStyle from './style';
|
|
9
|
+
/** Same as ShippingBillingForm: lets custom address fields call setValue on the guest form ref. */
|
|
10
|
+
const applyGuestFormFields = (formRef, fields) => {
|
|
11
|
+
const form = formRef?.current;
|
|
12
|
+
if (!form?.setValue || !fields)
|
|
13
|
+
return;
|
|
14
|
+
fields.forEach(({ name, value }) => form.setValue(name, value, {
|
|
15
|
+
shouldValidate: false,
|
|
16
|
+
shouldDirty: true,
|
|
17
|
+
shouldTouch: true,
|
|
18
|
+
}));
|
|
19
|
+
};
|
|
8
20
|
const GuestAddressForm = () => {
|
|
9
|
-
const { formFields, hasAddresses, hasAddressType, getFormFieldsByType, shippingFormFields, billingFormFields, } = useAddressContext();
|
|
21
|
+
const { formFields, hasAddresses, hasAddressType, getFormFieldsByType, shippingFormFields, billingFormFields, addresses, } = useAddressContext();
|
|
10
22
|
const { updateCheckoutData } = useCart();
|
|
11
23
|
const formRef = useRef(null);
|
|
12
24
|
const shippingFormRef = useRef(null);
|
|
13
25
|
const billingFormRef = useRef(null);
|
|
26
|
+
const [useSameAddress, setUseSameAddress] = useState(false);
|
|
27
|
+
const setGuestAddressFields = useCallback((fields) => applyGuestFormFields(formRef, fields), []);
|
|
28
|
+
const setGuestShippingFields = useCallback((fields) => applyGuestFormFields(shippingFormRef, fields), []);
|
|
29
|
+
const setGuestBillingFields = useCallback((fields) => applyGuestFormFields(billingFormRef, fields), []);
|
|
14
30
|
useEffect(() => {
|
|
15
31
|
if (!hasAddresses) {
|
|
16
32
|
return undefined;
|
|
@@ -41,7 +57,7 @@ const GuestAddressForm = () => {
|
|
|
41
57
|
if (shippingForm) {
|
|
42
58
|
validators.push(submitAndCheck(shippingForm, 'guest_shipping_address_invalid'));
|
|
43
59
|
}
|
|
44
|
-
if (billingForm) {
|
|
60
|
+
if (!useSameAddress && billingForm) {
|
|
45
61
|
validators.push(submitAndCheck(billingForm, 'guest_billing_address_invalid'));
|
|
46
62
|
}
|
|
47
63
|
if (!validators.length)
|
|
@@ -49,17 +65,25 @@ const GuestAddressForm = () => {
|
|
|
49
65
|
return Promise.all(validators);
|
|
50
66
|
});
|
|
51
67
|
return unregister;
|
|
52
|
-
}, [hasAddressType, hasAddresses]);
|
|
68
|
+
}, [hasAddressType, hasAddresses, useSameAddress]);
|
|
53
69
|
const handleSubmit = useCallback((values) => {
|
|
54
70
|
updateCheckoutData({
|
|
55
71
|
address: values,
|
|
56
72
|
});
|
|
57
73
|
}, [updateCheckoutData]);
|
|
58
74
|
const handleShippingSubmit = useCallback((values) => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
75
|
+
if (useSameAddress) {
|
|
76
|
+
updateCheckoutData({
|
|
77
|
+
shipping_address: values,
|
|
78
|
+
billing_address: values,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
updateCheckoutData({
|
|
83
|
+
shipping_address: values,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}, [updateCheckoutData, useSameAddress]);
|
|
63
87
|
const handleBillingSubmit = useCallback((values) => {
|
|
64
88
|
updateCheckoutData({
|
|
65
89
|
billing_address: values,
|
|
@@ -67,31 +91,36 @@ const GuestAddressForm = () => {
|
|
|
67
91
|
}, [updateCheckoutData]);
|
|
68
92
|
if (!hasAddresses || !formFields || formFields.length === 0)
|
|
69
93
|
return null;
|
|
94
|
+
const shippingFields = (getFormFieldsByType && getFormFieldsByType('shipping')) || shippingFormFields || formFields;
|
|
95
|
+
const billingFields = (getFormFieldsByType && getFormFieldsByType('billing')) || billingFormFields || formFields;
|
|
96
|
+
const showSameAddressCheckbox = hasAddressType && !(addresses?.billing?.length > 0 || addresses?.shipping?.length > 0);
|
|
70
97
|
return (React.createElement(GuestAddressFormStyle, { className: 'guest-address-form checkout-mt' }, !hasAddressType ? (React.createElement(React.Fragment, null,
|
|
71
98
|
React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 title`, text: 'account.guest_checkout.address' }),
|
|
72
99
|
React.createElement(FormBuilder, { className: 'form-wrapper', fields: formFields, onSubmit: handleSubmit, formOptions: {
|
|
73
100
|
ref: formRef,
|
|
74
101
|
mode: 'onSubmit',
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
102
|
+
}, customFieldInjectProps: {
|
|
103
|
+
formRef,
|
|
104
|
+
setFields: setGuestAddressFields,
|
|
105
|
+
} }))) : (React.createElement(React.Fragment, null,
|
|
106
|
+
React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 title`, text: 'account.address_management.shippingAddress' }),
|
|
107
|
+
React.createElement(FormBuilder, { className: 'form-wrapper shipping-address-form', fields: shippingFields, onSubmit: handleShippingSubmit, formOptions: {
|
|
108
|
+
ref: shippingFormRef,
|
|
109
|
+
mode: 'onSubmit',
|
|
110
|
+
}, customFieldInjectProps: {
|
|
111
|
+
formRef: shippingFormRef,
|
|
112
|
+
setFields: setGuestShippingFields,
|
|
113
|
+
} }),
|
|
114
|
+
showSameAddressCheckbox ? (React.createElement(CustomCheckbox, { hide: useSameAddress, setHide: (next) => setUseSameAddress(next), isText: 'account.order_balance.useAlsoBillingAddress' })) : null,
|
|
115
|
+
!useSameAddress ? (React.createElement("div", { className: 'billing-address-section' },
|
|
116
|
+
React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 title`, text: 'account.address_management.billingAddress' }),
|
|
117
|
+
React.createElement(FormBuilder, { className: 'form-wrapper billing-address-form', fields: billingFields, onSubmit: handleBillingSubmit, formOptions: {
|
|
118
|
+
ref: billingFormRef,
|
|
86
119
|
mode: 'onSubmit',
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
ref: billingFormRef,
|
|
92
|
-
mode: 'onSubmit',
|
|
93
|
-
} }))));
|
|
94
|
-
})()))));
|
|
120
|
+
}, customFieldInjectProps: {
|
|
121
|
+
formRef: billingFormRef,
|
|
122
|
+
setFields: setGuestBillingFields,
|
|
123
|
+
} }))) : null))));
|
|
95
124
|
};
|
|
96
125
|
export default GuestAddressForm;
|
|
97
126
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/guest/GuestAddressForm/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/guest/GuestAddressForm/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,qBAAqB,MAAM,SAAS,CAAC;AAE5C,mGAAmG;AACnG,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;IAChD,MAAM,IAAI,GAAG,OAAO,EAAE,OAAO,CAAC;IAC9B,IAAI,CAAC,IAAI,EAAE,QAAQ,IAAI,CAAC,MAAM;QAAE,OAAO;IACvC,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAClC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE;QAC1B,cAAc,EAAE,KAAK;QACrB,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,IAAI;KACjB,CAAC,CACF,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC7B,MAAM,EACL,UAAU,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,EAAE,cAAc;oBACnB,IAAI,EAAE,UAAU;iBAChB,EACD,sBAAsB,EAAE;oBACvB,OAAO,EAAE,cAAc;oBACvB,SAAS,EAAE,qBAAqB;iBAChC,GACA,CACG,CACN,CAAC,CAAC,CAAC,IAAI,CACN,CACH,CACsB,CACxB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
package/dist/modules/index.d.ts
CHANGED
package/dist/modules/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.js"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,iEAAiE;AACjE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC5D,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.js"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,iEAAiE;AACjE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC5D,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/payment/CardForm/index.js"],"names":[],"mappings":";AAOA,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/payment/CardForm/index.js"],"names":[],"mappings":";AAOA,+CA8HC;kBArIqD,OAAO"}
|
|
@@ -39,6 +39,7 @@ const CardForm = () => {
|
|
|
39
39
|
},
|
|
40
40
|
fieldProps: {
|
|
41
41
|
placeholder: 'account.payment_management.cardNamePlaceholder',
|
|
42
|
+
autoComplete: 'cc-name',
|
|
42
43
|
},
|
|
43
44
|
},
|
|
44
45
|
{
|
|
@@ -53,6 +54,7 @@ const CardForm = () => {
|
|
|
53
54
|
},
|
|
54
55
|
fieldProps: {
|
|
55
56
|
placeholder: 'account.payment_management.cardNumberPlaceholder',
|
|
57
|
+
autoComplete: 'cc-number',
|
|
56
58
|
maxLength: 19,
|
|
57
59
|
onChange: (e, form) => {
|
|
58
60
|
const value = formatCreditCardNumber(e.target.value);
|
|
@@ -76,6 +78,7 @@ const CardForm = () => {
|
|
|
76
78
|
},
|
|
77
79
|
fieldProps: {
|
|
78
80
|
placeholder: 'account.payment_management.cardExpiryPlaceholder',
|
|
81
|
+
autoComplete: 'cc-exp',
|
|
79
82
|
onChange: (e, form) => {
|
|
80
83
|
const value = formatExpirationDate(e.target.value);
|
|
81
84
|
form.setValue('expiry', value);
|
|
@@ -96,6 +99,7 @@ const CardForm = () => {
|
|
|
96
99
|
fieldProps: {
|
|
97
100
|
type: 'password',
|
|
98
101
|
placeholder: 'account.payment_management.cardCVCPlaceholder',
|
|
102
|
+
autoComplete: 'cc-csc',
|
|
99
103
|
onChange: (e, form) => {
|
|
100
104
|
const value = formatCVC(e.target.value);
|
|
101
105
|
form.setValue('security_code', value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/payment/CardForm/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,aAAa,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,SA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ACd,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE;gBACZ,GAAG,EAAE,OAAO;gBACZ,IAAI,EAAE,UAAU;aAChB,GACA,CACa,CAChB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default UnsubscribeMessage;
|
|
2
|
+
declare function UnsubscribeMessage({ status, homeUrl, resultIllustration }: {
|
|
3
|
+
status: any;
|
|
4
|
+
homeUrl: any;
|
|
5
|
+
resultIllustration: any;
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
import React from 'react';
|
|
8
|
+
//# sourceMappingURL=UnsubscribeMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsubscribeMessage.d.ts","sourceRoot":"","sources":["../../../src/modules/unsubscribe/UnsubscribeMessage.js"],"names":[],"mappings":";AAQA;;;;sBAqBC;kBA3BiB,OAAO"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Text } from '@weareconceptstudio/core';
|
|
4
|
+
import AccountButton from '../../components/AccountButton';
|
|
5
|
+
import UnsubscribeMessageStyle from './UnsubscribeMessageStyle';
|
|
6
|
+
import { unsubscribeSuccessIllustration } from './icons';
|
|
7
|
+
const UnsubscribeMessage = ({ status, homeUrl, resultIllustration }) => {
|
|
8
|
+
const isDone = status === 'done' || status === 'success';
|
|
9
|
+
return (React.createElement(UnsubscribeMessageStyle, null,
|
|
10
|
+
React.createElement("div", { className: 'account-unsubscribe-result-illustration' }, resultIllustration ?? unsubscribeSuccessIllustration),
|
|
11
|
+
React.createElement(Text, { className: 'account-unsubscribe-msg-text account-p account-h4 account-font-medium account-primary-color1', text: isDone ? 'account.unsubscribe.thankYou' : 'account.unsubscribe.alreadyUnsubscribed' }),
|
|
12
|
+
React.createElement("div", { className: 'account-unsubscribe-msg-button' },
|
|
13
|
+
React.createElement(AccountButton, { url: homeUrl, btnType: 'full-width', text: 'account.unsubscribe.returnHome' }))));
|
|
14
|
+
};
|
|
15
|
+
export default UnsubscribeMessage;
|
|
16
|
+
//# sourceMappingURL=UnsubscribeMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsubscribeMessage.js","sourceRoot":"","sources":["../../../src/modules/unsubscribe/UnsubscribeMessage.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AAEzD,MAAM,kBAAkB,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,SAAS,CAAC;IAEzD,OAAO,CACN,oBAAC,uBAAuB;QACvB,6BAAK,SAAS,EAAC,yCAAyC,IACtD,kBAAkB,IAAI,8BAA8B,CAChD;QACN,oBAAC,IAAI,IACJ,SAAS,EAAC,8FAA8F,EACxG,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,yCAAyC,GACxF;QACF,6BAAK,SAAS,EAAC,gCAAgC;YAC9C,oBAAC,aAAa,IACb,GAAG,EAAE,OAAO,EACZ,OAAO,EAAC,YAAY,EACpB,IAAI,EAAC,gCAAgC,GACpC,CACG,CACmB,CAC1B,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export default UnsubscribeMessageStyle;
|
|
2
|
+
declare const UnsubscribeMessageStyle: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
3
|
+
//# sourceMappingURL=UnsubscribeMessageStyle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsubscribeMessageStyle.d.ts","sourceRoot":"","sources":["../../../src/modules/unsubscribe/UnsubscribeMessageStyle.js"],"names":[],"mappings":";AAIA,sPAmCE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
const UnsubscribeMessageStyle = styled.div `
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: center;
|
|
7
|
+
text-align: center;
|
|
8
|
+
max-width: 560px;
|
|
9
|
+
margin: 0 auto;
|
|
10
|
+
|
|
11
|
+
.account-unsubscribe-result-illustration {
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
margin: 0 auto var(--sp5x);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Size matches form hero; illustration colors use CSS vars from parent .account-unsubscribe-page */
|
|
19
|
+
.account-unsubscribe-result-illustration svg {
|
|
20
|
+
width: 100%;
|
|
21
|
+
max-width: min(22rem, 100%);
|
|
22
|
+
min-width: 12rem;
|
|
23
|
+
height: auto;
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.account-unsubscribe-msg-button {
|
|
28
|
+
margin-top: var(--sp5x);
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
33
|
+
.account-unsubscribe-result-illustration svg {
|
|
34
|
+
min-width: 10rem;
|
|
35
|
+
max-width: min(20rem, 100%);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
export default UnsubscribeMessageStyle;
|
|
40
|
+
//# sourceMappingURL=UnsubscribeMessageStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsubscribeMessageStyle.js","sourceRoot":"","sources":["../../../src/modules/unsubscribe/UnsubscribeMessageStyle.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCA6BJ,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB;;;;;;CAMrG,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default UnsubscribeTemplate;
|
|
2
|
+
/**
|
|
3
|
+
* Marketing unsubscribe flow (tokenless link with email query param).
|
|
4
|
+
* Calls `POST unsubscribe` with `{ email, unsubscribe: 'email' | 'phone' | 'both' }` — same contract as demo-murakami.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} email — recipient email from the link query string
|
|
7
|
+
* @param {string} homeUrl — return link after success (e.g. `/`)
|
|
8
|
+
* @param {{ email?: boolean, sms?: boolean }} [channels] — override visible channels; when omitted, uses AccountProvider `globalSettings.hasSubscriptionEmail` / `hasSubscriptionSms` when available
|
|
9
|
+
* @param {React.ReactNode} [formIllustration] — optional hero above the title (default: built-in mail illustration)
|
|
10
|
+
* @param {React.ReactNode} [resultIllustration] — optional art on success screen (default: built-in check illustration)
|
|
11
|
+
*/
|
|
12
|
+
declare function UnsubscribeTemplate({ email, homeUrl, channels: channelsProp, formIllustration, resultIllustration }: string): React.JSX.Element;
|
|
13
|
+
import React from 'react';
|
|
14
|
+
//# sourceMappingURL=UnsubscribeTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsubscribeTemplate.d.ts","sourceRoot":"","sources":["../../../src/modules/unsubscribe/UnsubscribeTemplate.js"],"names":[],"mappings":";AAkBA;;;;;;;;;GASG;AACH,uHANW,MAAM,qBA+GhB;kBAnIwC,OAAO"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { useMemo, useState } from 'react';
|
|
3
|
+
import { api, Text } from '@weareconceptstudio/core';
|
|
4
|
+
import CustomCheckbox from '../../components/CustomCheckbox';
|
|
5
|
+
import AccountButton from '../../components/AccountButton';
|
|
6
|
+
import { useAccountContext } from '../../AccountProvider';
|
|
7
|
+
import UnsubscribeTemplateStyle from './UnsubscribeTemplateStyle';
|
|
8
|
+
import UnsubscribeMessage from './UnsubscribeMessage';
|
|
9
|
+
import { unsubscribeFormIllustration } from './icons';
|
|
10
|
+
const scopeFromChecks = (emailOn, smsOn) => {
|
|
11
|
+
if (emailOn && smsOn)
|
|
12
|
+
return 'both';
|
|
13
|
+
if (emailOn)
|
|
14
|
+
return 'email';
|
|
15
|
+
if (smsOn)
|
|
16
|
+
return 'phone';
|
|
17
|
+
return null;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Marketing unsubscribe flow (tokenless link with email query param).
|
|
21
|
+
* Calls `POST unsubscribe` with `{ email, unsubscribe: 'email' | 'phone' | 'both' }` — same contract as demo-murakami.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} email — recipient email from the link query string
|
|
24
|
+
* @param {string} homeUrl — return link after success (e.g. `/`)
|
|
25
|
+
* @param {{ email?: boolean, sms?: boolean }} [channels] — override visible channels; when omitted, uses AccountProvider `globalSettings.hasSubscriptionEmail` / `hasSubscriptionSms` when available
|
|
26
|
+
* @param {React.ReactNode} [formIllustration] — optional hero above the title (default: built-in mail illustration)
|
|
27
|
+
* @param {React.ReactNode} [resultIllustration] — optional art on success screen (default: built-in check illustration)
|
|
28
|
+
*/
|
|
29
|
+
const UnsubscribeTemplate = ({ email, homeUrl, channels: channelsProp, formIllustration, resultIllustration }) => {
|
|
30
|
+
const accountCtx = useAccountContext();
|
|
31
|
+
const globalSettings = accountCtx?.globalSettings;
|
|
32
|
+
const { showEmail, showSms } = useMemo(() => {
|
|
33
|
+
const ch = channelsProp ?? {
|
|
34
|
+
email: globalSettings?.hasSubscriptionEmail !== false,
|
|
35
|
+
sms: globalSettings?.hasSubscriptionSms !== false,
|
|
36
|
+
};
|
|
37
|
+
return {
|
|
38
|
+
showEmail: ch.email !== false,
|
|
39
|
+
showSms: ch.sms !== false,
|
|
40
|
+
};
|
|
41
|
+
}, [channelsProp, globalSettings?.hasSubscriptionEmail, globalSettings?.hasSubscriptionSms]);
|
|
42
|
+
const [emailChecked, setEmailChecked] = useState(false);
|
|
43
|
+
const [smsChecked, setSmsChecked] = useState(false);
|
|
44
|
+
const [status, setStatus] = useState(false);
|
|
45
|
+
const submitDisabled = useMemo(() => {
|
|
46
|
+
if (showEmail && showSms)
|
|
47
|
+
return !emailChecked && !smsChecked;
|
|
48
|
+
if (showEmail)
|
|
49
|
+
return !emailChecked;
|
|
50
|
+
if (showSms)
|
|
51
|
+
return !smsChecked;
|
|
52
|
+
return true;
|
|
53
|
+
}, [showEmail, showSms, emailChecked, smsChecked]);
|
|
54
|
+
const handleUnsubscribe = () => {
|
|
55
|
+
if (status)
|
|
56
|
+
return;
|
|
57
|
+
const unsubscribe = scopeFromChecks(showEmail ? emailChecked : false, showSms ? smsChecked : false);
|
|
58
|
+
if (!unsubscribe)
|
|
59
|
+
return;
|
|
60
|
+
api
|
|
61
|
+
.post('unsubscribe', { email, unsubscribe })
|
|
62
|
+
.then((data) => {
|
|
63
|
+
setStatus(data?.subscribe_status || data?.message || 'done');
|
|
64
|
+
})
|
|
65
|
+
.catch((err) => {
|
|
66
|
+
setStatus(err?.message || 'error');
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
if (!email) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
return (React.createElement(UnsubscribeTemplateStyle, { className: 'account-unsubscribe-page' },
|
|
73
|
+
React.createElement("div", { className: 'account-unsubscribe-inner' }, !status ? (React.createElement(React.Fragment, null,
|
|
74
|
+
React.createElement("div", { className: 'account-unsubscribe-illustration' }, formIllustration ?? unsubscribeFormIllustration),
|
|
75
|
+
React.createElement(Text, { className: 'account-unsubscribe-title account-p account-h3 account-font-bold account-primary-color1', tag: 'h1', text: 'account.unsubscribe.title' }),
|
|
76
|
+
React.createElement(Text, { className: 'account-unsubscribe-description account-p account-p3 account-font-regular account-primary-color1', text: 'account.unsubscribe.description' }),
|
|
77
|
+
React.createElement("div", { className: 'account-unsubscribe-checkboxes' },
|
|
78
|
+
showEmail ? (React.createElement("div", { className: 'account-unsubscribe-checkbox-wrap' },
|
|
79
|
+
React.createElement(CustomCheckbox, { isText: 'account.subscription.email', hide: emailChecked, setHide: setEmailChecked }))) : null,
|
|
80
|
+
showSms ? (React.createElement("div", { className: 'account-unsubscribe-checkbox-wrap' },
|
|
81
|
+
React.createElement(CustomCheckbox, { isText: 'account.subscription.sms', hide: smsChecked, setHide: setSmsChecked }))) : null),
|
|
82
|
+
React.createElement("div", { className: 'account-unsubscribe-submit' },
|
|
83
|
+
React.createElement(AccountButton, { btnType: 'full-width', text: 'account.unsubscribe.submit', onClick: handleUnsubscribe, disabled: submitDisabled })))) : (React.createElement(UnsubscribeMessage, { status: status, homeUrl: homeUrl, resultIllustration: resultIllustration })))));
|
|
84
|
+
};
|
|
85
|
+
export default UnsubscribeTemplate;
|
|
86
|
+
//# sourceMappingURL=UnsubscribeTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsubscribeTemplate.js","sourceRoot":"","sources":["../../../src/modules/unsubscribe/UnsubscribeTemplate.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,0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,3 @@
|
|
|
1
|
+
export default UnsubscribeTemplateStyle;
|
|
2
|
+
declare const UnsubscribeTemplateStyle: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>>;
|
|
3
|
+
//# sourceMappingURL=UnsubscribeTemplateStyle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsubscribeTemplateStyle.d.ts","sourceRoot":"","sources":["../../../src/modules/unsubscribe/UnsubscribeTemplateStyle.js"],"names":[],"mappings":";AAsCA,iPAyDE"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
const pick = (c, key, fb) => c?.[key] ?? fb;
|
|
4
|
+
/** Semantic illustration tokens → `theme.account.colors` (override `--account-ill-*` in app CSS to tune). */
|
|
5
|
+
const illVars = (p) => {
|
|
6
|
+
const c = p.theme.account?.colors ?? {};
|
|
7
|
+
return `
|
|
8
|
+
--account-ill-envelope-shadow: ${pick(c, 'account_primaryColor5', '#D9DED8')};
|
|
9
|
+
--account-ill-envelope-back: ${pick(c, 'account_primaryColor4', '#B2BDB1')};
|
|
10
|
+
--account-ill-paper: ${pick(c, 'account_primaryColor7', '#F5F6F5')};
|
|
11
|
+
--account-ill-envelope-front: ${pick(c, 'account_primaryColor5', '#D9DED8')};
|
|
12
|
+
--account-ill-flap: ${pick(c, 'account_primaryColor3', '#8C9B8B')};
|
|
13
|
+
--account-ill-flap-shade: ${pick(c, 'account_primaryColor4', '#B2BDB1')};
|
|
14
|
+
--account-ill-seal-fill: ${pick(c, 'account_primaryColor2', '#657A64')};
|
|
15
|
+
--account-ill-seal-mark: ${pick(c, 'account_primaryColor7', '#F5F6F5')};
|
|
16
|
+
--account-ill-deco-1: ${pick(c, 'account_primaryColor3', '#8C9B8B')};
|
|
17
|
+
--account-ill-deco-2: ${pick(c, 'account_primaryColor2', '#657A64')};
|
|
18
|
+
--account-ill-deco-3: ${pick(c, 'account_primaryColor4', '#B2BDB1')};
|
|
19
|
+
--account-ill-halo: ${pick(c, 'account_primaryColor6', '#ECEFEC')};
|
|
20
|
+
--account-ill-badge-fill: ${pick(c, 'account_statusCompletedColor', pick(c, 'account_successColor', '#509558'))};
|
|
21
|
+
--account-ill-badge-ring: ${pick(c, 'account_primaryColor7', '#F5F6F5')};
|
|
22
|
+
--account-ill-badge-check: ${pick(c, 'account_backgroundColor', '#FFFFFB')};
|
|
23
|
+
--account-ill-success-deco-a: ${pick(c, 'account_statusCompletedColor', pick(c, 'account_successColor', '#509558'))};
|
|
24
|
+
--account-ill-success-deco-b: ${pick(c, 'account_primaryColor3', '#8C9B8B')};
|
|
25
|
+
`;
|
|
26
|
+
};
|
|
27
|
+
const UnsubscribeTemplateStyle = styled.section `
|
|
28
|
+
${(p) => illVars(p)}
|
|
29
|
+
|
|
30
|
+
width: 100%;
|
|
31
|
+
min-height: 80vh;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
padding: var(--sp5x) var(--sp3x);
|
|
36
|
+
|
|
37
|
+
.account-unsubscribe-inner {
|
|
38
|
+
width: 100%;
|
|
39
|
+
max-width: 560px;
|
|
40
|
+
margin: 0 auto;
|
|
41
|
+
text-align: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.account-unsubscribe-illustration {
|
|
45
|
+
display: flex;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
align-items: center;
|
|
48
|
+
margin: 0 auto var(--sp5x);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.account-unsubscribe-illustration svg {
|
|
52
|
+
width: 100%;
|
|
53
|
+
max-width: min(22rem, 100%);
|
|
54
|
+
min-width: 12rem;
|
|
55
|
+
height: auto;
|
|
56
|
+
display: block;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.account-unsubscribe-checkboxes {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: var(--sp4x);
|
|
65
|
+
margin-top: var(--sp4x);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.account-unsubscribe-checkbox-wrap .custom-checkbox-container {
|
|
69
|
+
--account_checkboxMarTopSize: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.account-unsubscribe-submit {
|
|
73
|
+
margin-top: var(--sp5x);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
77
|
+
padding: var(--sp4x) var(--sp2x);
|
|
78
|
+
|
|
79
|
+
.account-unsubscribe-illustration svg {
|
|
80
|
+
min-width: 10rem;
|
|
81
|
+
max-width: min(20rem, 100%);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
`;
|
|
85
|
+
export default UnsubscribeTemplateStyle;
|
|
86
|
+
//# sourceMappingURL=UnsubscribeTemplateStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsubscribeTemplateStyle.js","sourceRoot":"","sources":["../../../src/modules/unsubscribe/UnsubscribeTemplateStyle.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,IAAI,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;AAE5C,6GAA6G;AAC7G,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE;IACrB,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,CAAC;IACxC,OAAO;mCAC2B,IAAI,CAAC,CAAC,EAAE,uBAAuB,EAAE,SAAS,CAAC;iCAC7C,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AC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB;;;;;;;;CAQrG,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fills/strokes use `--account-ill-*` from `.account-unsubscribe-page` (see `UnsubscribeTemplateStyle.js`).
|
|
3
|
+
*/
|
|
4
|
+
/** Hero — envelope + seal + deco dots. */
|
|
5
|
+
export const unsubscribeFormIllustration: React.JSX.Element;
|
|
6
|
+
/** Success — envelope + halo + badge (all slots use `--account-ill-*`). */
|
|
7
|
+
export const unsubscribeSuccessIllustration: React.JSX.Element;
|
|
8
|
+
import React from 'react';
|
|
9
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/modules/unsubscribe/icons.js"],"names":[],"mappings":"AAGA;;GAEG;AAEH,0CAA0C;AAC1C,4DA+DE;AAEF,2EAA2E;AAC3E,+DAkFE;kBA5JgB,OAAO"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ill } from './illustrationTheme';
|
|
3
|
+
/**
|
|
4
|
+
* Fills/strokes use `--account-ill-*` from `.account-unsubscribe-page` (see `UnsubscribeTemplateStyle.js`).
|
|
5
|
+
*/
|
|
6
|
+
/** Hero — envelope + seal + deco dots. */
|
|
7
|
+
export const unsubscribeFormIllustration = (React.createElement("svg", { className: 'account-unsubscribe-svg', xmlns: 'http://www.w3.org/2000/svg', width: '160', height: '172', viewBox: '0 0 130 140', "aria-hidden": 'true' },
|
|
8
|
+
React.createElement("ellipse", { cx: '65', cy: '128', rx: '52', ry: '8', fill: ill('envelope-shadow', '#D9DED8') }),
|
|
9
|
+
React.createElement("path", { d: 'M22 78 L22 118 C22 124.627 27.3726 130 34 130 L96 130 C102.627 130 108 124.627 108 118 L108 78 L65 52 Z', fill: ill('envelope-back', '#B2BDB1') }),
|
|
10
|
+
React.createElement("path", { d: 'M32 82 L32 112 C32 117.523 36.4772 122 42 122 L88 122 C93.5228 122 98 117.523 98 112 L98 82 L65 60 Z', fill: ill('paper', '#F5F6F5') }),
|
|
11
|
+
React.createElement("path", { d: 'M18 76 L18 116 C18 122.627 23.3726 128 30 128 L100 128 C106.627 128 112 122.627 112 116 L112 76 L65 48 L18 76 Z', fill: ill('envelope-front', '#D9DED8') }),
|
|
12
|
+
React.createElement("path", { d: 'M18 76 L65 48 L112 76 L65 100 Z', fill: ill('flap', '#8C9B8B') }),
|
|
13
|
+
React.createElement("path", { d: 'M18 76 L65 48 L112 76 L65 92 Z', fill: ill('flap-shade', '#B2BDB1'), opacity: '0.45' }),
|
|
14
|
+
React.createElement("circle", { cx: '65', cy: '72', r: '14', fill: ill('seal-fill', '#657A64') }),
|
|
15
|
+
React.createElement("path", { d: 'M58 72 L63 77 L74 65', fill: 'none', stroke: ill('seal-mark', '#F5F6F5'), strokeWidth: '3', strokeLinecap: 'round', strokeLinejoin: 'round' }),
|
|
16
|
+
React.createElement("path", { d: 'M48 38.5C48 35.4624 50.4624 33 53.5 33C56.5376 33 59 35.4624 59 38.5C59 41.5376 56.5376 44 53.5 44C50.4624 44 48 41.5376 48 38.5Z', fill: ill('deco-1', '#8C9B8B') }),
|
|
17
|
+
React.createElement("path", { d: 'M71 28.5C71 25.4624 73.4624 23 76.5 23C79.5376 23 82 25.4624 82 28.5C82 31.5376 79.5376 34 76.5 34C73.4624 34 71 31.5376 71 28.5Z', fill: ill('deco-2', '#657A64') }),
|
|
18
|
+
React.createElement("path", { d: 'M88 40.5C88 37.4624 90.4624 35 93.5 35C96.5376 35 99 37.4624 99 40.5C99 43.5376 96.5376 46 93.5 46C90.4624 46 88 43.5376 88 40.5Z', fill: ill('deco-3', '#B2BDB1') })));
|
|
19
|
+
/** Success — envelope + halo + badge (all slots use `--account-ill-*`). */
|
|
20
|
+
export const unsubscribeSuccessIllustration = (React.createElement("svg", { className: 'account-unsubscribe-svg', xmlns: 'http://www.w3.org/2000/svg', width: '160', height: '172', viewBox: '0 0 130 140', "aria-hidden": 'true' },
|
|
21
|
+
React.createElement("ellipse", { cx: '65', cy: '128', rx: '52', ry: '8', fill: ill('envelope-shadow', '#D9DED8') }),
|
|
22
|
+
React.createElement("circle", { cx: '58', cy: '58', r: '44', fill: ill('halo', '#ECEFEC'), opacity: '0.35' }),
|
|
23
|
+
React.createElement("g", { transform: 'translate(0, 6)' },
|
|
24
|
+
React.createElement("path", { d: 'M22 78 L22 118 C22 124.627 27.3726 130 34 130 L96 130 C102.627 130 108 124.627 108 118 L108 78 L65 52 Z', fill: ill('envelope-back', '#B2BDB1') }),
|
|
25
|
+
React.createElement("path", { d: 'M32 82 L32 112 C32 117.523 36.4772 122 42 122 L88 122 C93.5228 122 98 117.523 98 112 L98 82 L65 60 Z', fill: ill('paper', '#F5F6F5') }),
|
|
26
|
+
React.createElement("path", { d: 'M18 76 L18 116 C18 122.627 23.3726 128 30 128 L100 128 C106.627 128 112 122.627 112 116 L112 76 L65 48 L18 76 Z', fill: ill('envelope-front', '#D9DED8') }),
|
|
27
|
+
React.createElement("path", { d: 'M18 76 L65 48 L112 76 L65 100 Z', fill: ill('flap', '#8C9B8B') }),
|
|
28
|
+
React.createElement("path", { d: 'M18 76 L65 48 L112 76 L65 92 Z', fill: ill('flap-shade', '#B2BDB1'), opacity: '0.45' })),
|
|
29
|
+
React.createElement("circle", { cx: '28', cy: '36', r: '6', fill: ill('success-deco-a', '#509558'), opacity: '0.85' }),
|
|
30
|
+
React.createElement("circle", { cx: '102', cy: '28', r: '5', fill: ill('success-deco-b', '#8C9B8B') }),
|
|
31
|
+
React.createElement("circle", { cx: '96', cy: '62', r: '26', fill: ill('badge-fill', '#509558') }),
|
|
32
|
+
React.createElement("circle", { cx: '96', cy: '62', r: '22', fill: 'none', stroke: ill('badge-ring', '#F5F6F5'), strokeWidth: '2', opacity: '0.55' }),
|
|
33
|
+
React.createElement("path", { d: 'M84 62 L92 71 L110 48', fill: 'none', stroke: ill('badge-check', '#FFFFFB'), strokeWidth: '4', strokeLinecap: 'round', strokeLinejoin: 'round' })));
|
|
34
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/modules/unsubscribe/icons.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAE1C;;GAEG;AAEH,0CAA0C;AAC1C,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAC1C,6BACC,SAAS,EAAC,yBAAyB,EACnC,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,KAAK,EACX,MAAM,EAAC,KAAK,EACZ,OAAO,EAAC,aAAa,iBACT,MAAM;IAClB,iCACC,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,GAAG,EACN,IAAI,EAAE,GAAG,CAAC,iBAAiB,EAAE,SAAS,CAAC,GACtC;IACF,8BACC,CAAC,EAAC,yGAAyG,EAC3G,IAAI,EAAE,GAAG,CAAC,eAAe,EAAE,SAAS,CAAC,GACpC;IACF,8BACC,CAAC,EAAC,sGAAsG,EACxG,IAAI,EAAE,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,GAC5B;IACF,8BACC,CAAC,EAAC,iHAAiH,EACnH,IAAI,EAAE,GAAG,CAAC,gBAAgB,EAAE,SAAS,CAAC,GACrC;IACF,8BACC,CAAC,EAAC,iCAAiC,EACnC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,GAC3B;IACF,8BACC,CAAC,EAAC,gCAAgC,EAClC,IAAI,EAAE,GAAG,CAAC,YAAY,EAAE,SAAS,CAAC,EAClC,OAAO,EAAC,MAAM,GACb;IACF,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ACrB,CACG,CACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"illustrationTheme.d.ts","sourceRoot":"","sources":["../../../src/modules/unsubscribe/illustrationTheme.js"],"names":[],"mappings":"AAOO,qDAAuE"}
|