igloo-d2c-components 1.0.34 → 1.0.35
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/cjs/index.js +131 -54
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +131 -54
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/ChildInformationForm/ChildInformationForm.d.ts +26 -0
- package/dist/types/components/ContactDetailsForm/ContactDetailsForm.d.ts +29 -0
- package/dist/types/components/DesktopHeaderMenuBar/DesktopHeaderMenuBar.d.ts +1 -1
- package/dist/types/components/DesktopHeaderMenuBar/index.d.ts +1 -1
- package/dist/types/components/DesktopHeaderMenuBar/types.d.ts +20 -0
- package/dist/types/components/PersonalInformationForm/PersonalInformationForm.d.ts +5 -0
- package/dist/types/components/RecommendationsDrawer/styled.d.ts +3 -0
- package/dist/types/storybook-components/BillingToggle.stories.d.ts +1 -1
- package/package.json +1 -1
|
@@ -33,9 +33,35 @@ export interface ChildInformationFormProps {
|
|
|
33
33
|
fields: {
|
|
34
34
|
full_name: ChildInformationField;
|
|
35
35
|
nric?: ChildInformationField;
|
|
36
|
+
salutation?: ChildInformationField;
|
|
36
37
|
date_of_birth: ChildInformationField;
|
|
37
38
|
gender: ChildInformationField;
|
|
38
39
|
nationality: ChildInformationField;
|
|
40
|
+
place_of_birth?: ChildInformationField;
|
|
41
|
+
marital_status?: ChildInformationField;
|
|
42
|
+
race?: ChildInformationField;
|
|
43
|
+
religion?: ChildInformationField;
|
|
44
|
+
occupation?: ChildInformationField;
|
|
45
|
+
industry?: ChildInformationField;
|
|
46
|
+
crediting_bank_name?: ChildInformationField;
|
|
47
|
+
crediting_bank_account_number?: ChildInformationField;
|
|
48
|
+
annual_income?: ChildInformationField;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Consent checkboxes
|
|
52
|
+
*/
|
|
53
|
+
consents?: {
|
|
54
|
+
bank_account_confirmation?: {
|
|
55
|
+
checked: boolean;
|
|
56
|
+
onChange: (checked: boolean) => void;
|
|
57
|
+
error?: string;
|
|
58
|
+
label?: string;
|
|
59
|
+
};
|
|
60
|
+
marketing_consent?: {
|
|
61
|
+
checked: boolean;
|
|
62
|
+
onChange: (checked: boolean) => void;
|
|
63
|
+
label?: string;
|
|
64
|
+
};
|
|
39
65
|
};
|
|
40
66
|
/**
|
|
41
67
|
* Form submission handler
|
|
@@ -38,16 +38,24 @@ export interface ContactDetailsFormProps {
|
|
|
38
38
|
residential_address_line1: ContactDetailsField;
|
|
39
39
|
residential_address_line2: ContactDetailsField;
|
|
40
40
|
postal_code: ContactDetailsField;
|
|
41
|
+
country?: ContactDetailsField;
|
|
41
42
|
city: ContactDetailsField;
|
|
42
43
|
state: ContactDetailsField;
|
|
43
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Whether this is for a child policy (changes section titles and mailing fields)
|
|
47
|
+
*/
|
|
48
|
+
isForChild?: boolean;
|
|
44
49
|
/**
|
|
45
50
|
* Mailing address fields (optional - only needed when checkbox is checked)
|
|
46
51
|
*/
|
|
47
52
|
mailingFields?: {
|
|
53
|
+
mailing_phone_number?: ContactDetailsField;
|
|
54
|
+
mailing_email_address?: ContactDetailsField;
|
|
48
55
|
mailing_address_line1: ContactDetailsField;
|
|
49
56
|
mailing_address_line2: ContactDetailsField;
|
|
50
57
|
mailing_postal_code: ContactDetailsField;
|
|
58
|
+
mailing_country?: ContactDetailsField;
|
|
51
59
|
mailing_city: ContactDetailsField;
|
|
52
60
|
mailing_state: ContactDetailsField;
|
|
53
61
|
};
|
|
@@ -59,6 +67,27 @@ export interface ContactDetailsFormProps {
|
|
|
59
67
|
onChange: (checked: boolean) => void;
|
|
60
68
|
label?: string;
|
|
61
69
|
};
|
|
70
|
+
/**
|
|
71
|
+
* Child contact details fields (optional - for child checkout flow)
|
|
72
|
+
*/
|
|
73
|
+
childContactFields?: {
|
|
74
|
+
child_phone_number: ContactDetailsField;
|
|
75
|
+
child_email_address: ContactDetailsField;
|
|
76
|
+
child_address_line1: ContactDetailsField;
|
|
77
|
+
child_address_line2: ContactDetailsField;
|
|
78
|
+
child_postal_code: ContactDetailsField;
|
|
79
|
+
child_country?: ContactDetailsField;
|
|
80
|
+
child_city: ContactDetailsField;
|
|
81
|
+
child_state: ContactDetailsField;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Child contact details checkbox
|
|
85
|
+
*/
|
|
86
|
+
childContactNotSame?: {
|
|
87
|
+
checked: boolean;
|
|
88
|
+
onChange: (checked: boolean) => void;
|
|
89
|
+
label?: string;
|
|
90
|
+
};
|
|
62
91
|
/**
|
|
63
92
|
* Form submission handler
|
|
64
93
|
*/
|
|
@@ -39,6 +39,6 @@ import { DesktopHeaderMenuBarProps } from './types';
|
|
|
39
39
|
* @param onLogoClick - Handler for logo click
|
|
40
40
|
* @param formatMessage - i18n function for translations
|
|
41
41
|
*/
|
|
42
|
-
declare function DesktopHeaderMenuBar({ logo, logoAlt, menuItems, showLoginButton, loginButtonText, onLoginClick, showCtaButton, ctaButtonText, onCtaClick, ctaScrollTargetId, onScrollToSection, onLogoClick, formatMessage, className, }: DesktopHeaderMenuBarProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
declare function DesktopHeaderMenuBar({ logo, logoAlt, menuItems, showLoginButton, loginButtonText, onLoginClick, showCtaButton, ctaButtonText, onCtaClick, ctaScrollTargetId, onScrollToSection, onLogoClick, formatMessage, className, languages, currentLocale, onLanguageChange, }: DesktopHeaderMenuBarProps): import("react/jsx-runtime").JSX.Element;
|
|
43
43
|
export default DesktopHeaderMenuBar;
|
|
44
44
|
export { DesktopHeaderMenuBar };
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Based on Figma Design: Tech-Solution-V1.0 (node 1581-22604)
|
|
4
4
|
*/
|
|
5
5
|
export { default, DesktopHeaderMenuBar } from './DesktopHeaderMenuBar';
|
|
6
|
-
export type { DesktopHeaderMenuBarProps, MenuItemWithDropdown, SubMenuItem, } from './types';
|
|
6
|
+
export type { DesktopHeaderMenuBarProps, LanguageOption, MenuItemWithDropdown, SubMenuItem, } from './types';
|
|
7
7
|
export { PurchaseButton } from './styled';
|
|
@@ -60,6 +60,14 @@ export interface SubMenuItem {
|
|
|
60
60
|
*/
|
|
61
61
|
href?: string;
|
|
62
62
|
}
|
|
63
|
+
export interface LanguageOption {
|
|
64
|
+
/** Display label (e.g., 'English', 'Bahasa Malaysia') */
|
|
65
|
+
label: string;
|
|
66
|
+
/** Language code (e.g., 'en-US', 'id-ID') */
|
|
67
|
+
value: string;
|
|
68
|
+
/** Locale shorthand (e.g., 'en', 'id') */
|
|
69
|
+
locale: string;
|
|
70
|
+
}
|
|
63
71
|
export interface DesktopHeaderMenuBarProps {
|
|
64
72
|
/**
|
|
65
73
|
* Logo image source
|
|
@@ -125,4 +133,16 @@ export interface DesktopHeaderMenuBarProps {
|
|
|
125
133
|
* Custom class name for the container
|
|
126
134
|
*/
|
|
127
135
|
className?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Available languages for the language switcher
|
|
138
|
+
*/
|
|
139
|
+
languages?: LanguageOption[];
|
|
140
|
+
/**
|
|
141
|
+
* Current locale (e.g., 'en', 'id')
|
|
142
|
+
*/
|
|
143
|
+
currentLocale?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Language change handler
|
|
146
|
+
*/
|
|
147
|
+
onLanguageChange?: (locale: string, value: string) => void;
|
|
128
148
|
}
|
|
@@ -39,6 +39,11 @@ export interface PersonalInformationFormProps {
|
|
|
39
39
|
gender: PersonalInformationField;
|
|
40
40
|
salutation: PersonalInformationField;
|
|
41
41
|
nationality: PersonalInformationField;
|
|
42
|
+
place_of_birth?: PersonalInformationField;
|
|
43
|
+
marital_status?: PersonalInformationField;
|
|
44
|
+
race?: PersonalInformationField;
|
|
45
|
+
religion?: PersonalInformationField;
|
|
46
|
+
annual_income?: PersonalInformationField;
|
|
42
47
|
occupation: PersonalInformationField;
|
|
43
48
|
industry: PersonalInformationField;
|
|
44
49
|
crediting_bank_name: PersonalInformationField;
|
|
@@ -33,3 +33,6 @@ export declare const PrimaryButton: import("@emotion/styled").StyledComponent<im
|
|
|
33
33
|
export declare const SecondaryButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
34
34
|
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
35
35
|
}, "children" | "style" | "className" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
36
|
+
export declare const BackArrowButton: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
37
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
38
|
+
}, "children" | "style" | "className" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableFocusRipple" | "size" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
2
|
import { BillingToggle } from '../components/BillingToggle';
|
|
3
3
|
declare const _default: ComponentMeta<typeof BillingToggle>;
|
|
4
4
|
export default _default;
|
package/package.json
CHANGED