igloo-d2c-components 1.0.12 → 1.0.14
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/README.md +1153 -341
- package/dist/cjs/index.js +256 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +256 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/BenefitsSummary/BenefitsSummary.d.ts +22 -0
- package/dist/types/components/BenefitsSummary/index.d.ts +2 -0
- package/dist/types/components/BenefitsSummary/styled.d.ts +29 -0
- package/dist/types/components/BenefitsSummary/types.d.ts +58 -0
- package/dist/types/components/FAQAccordion/FAQAccordion.d.ts +22 -0
- package/dist/types/components/FAQAccordion/index.d.ts +2 -0
- package/dist/types/components/FAQAccordion/styled.d.ts +37 -0
- package/dist/types/components/FAQAccordion/types.d.ts +57 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/storybook-components/BenefitsSummary.stories.d.ts +37 -0
- package/dist/types/storybook-components/FAQAccordion.stories.d.ts +37 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Benefits Summary Component
|
|
3
|
+
* A reusable, tenant-aware benefits summary component
|
|
4
|
+
*/
|
|
5
|
+
import { BenefitsSummaryProps } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* BenefitsSummary - Displays a list of product benefits
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const benefits = [
|
|
12
|
+
* { id: 'benefit-1', icon: '/icons/health.svg', title: 'Death Benefit', description: '100% of Sum Assured' },
|
|
13
|
+
* { id: 'benefit-2', icon: <HealthIcon />, title: 'TPD Coverage', description: 'Total & Permanent Disability' },
|
|
14
|
+
* ]
|
|
15
|
+
*
|
|
16
|
+
* <BenefitsSummary
|
|
17
|
+
* benefits={benefits}
|
|
18
|
+
* title="Benefits Summary"
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function BenefitsSummary({ benefits, title, formatMessage, backgroundColor, maxWidth, className, iconSize, }: BenefitsSummaryProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Benefits Summary Styled Components
|
|
3
|
+
* MUI styled components for the Benefits Summary
|
|
4
|
+
*/
|
|
5
|
+
/// <reference types="react" />
|
|
6
|
+
export declare const SectionContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
9
|
+
export declare const SectionTitle: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
10
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
11
|
+
}, "fontFamily" | "children" | "p" | "style" | "fontSize" | "fontStyle" | "fontWeight" | "lineHeight" | "border" | "className" | "classes" | "sx" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
12
|
+
export declare const BenefitsList: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
13
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
14
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
15
|
+
export declare const BenefitItemContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
16
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
17
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
18
|
+
export declare const BenefitIcon: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
20
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
21
|
+
export declare const BenefitContent: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
22
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
23
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
24
|
+
export declare const BenefitTitle: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
25
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
26
|
+
}, "fontFamily" | "children" | "p" | "style" | "fontSize" | "fontStyle" | "fontWeight" | "lineHeight" | "border" | "className" | "classes" | "sx" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
27
|
+
export declare const BenefitDescription: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
28
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
29
|
+
}, "fontFamily" | "children" | "p" | "style" | "fontSize" | "fontStyle" | "fontWeight" | "lineHeight" | "border" | "className" | "classes" | "sx" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Benefits Summary Types
|
|
3
|
+
* Type definitions for the Benefits Summary component
|
|
4
|
+
*/
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
export interface BenefitItem {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier for the benefit
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Icon for the benefit - can be a URL string or React node
|
|
13
|
+
*/
|
|
14
|
+
icon: string | React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Title of the benefit
|
|
17
|
+
*/
|
|
18
|
+
title: string;
|
|
19
|
+
/**
|
|
20
|
+
* Description of the benefit (supports newline characters for multi-line text)
|
|
21
|
+
*/
|
|
22
|
+
description: string;
|
|
23
|
+
}
|
|
24
|
+
export interface BenefitsSummaryProps {
|
|
25
|
+
/**
|
|
26
|
+
* Array of benefits to display
|
|
27
|
+
*/
|
|
28
|
+
benefits: BenefitItem[];
|
|
29
|
+
/**
|
|
30
|
+
* Title for the benefits section
|
|
31
|
+
*/
|
|
32
|
+
title?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Optional format message function for i18n support
|
|
35
|
+
*/
|
|
36
|
+
formatMessage?: (descriptor: {
|
|
37
|
+
id: string;
|
|
38
|
+
defaultMessage?: string;
|
|
39
|
+
}) => string;
|
|
40
|
+
/**
|
|
41
|
+
* Custom background color for the container
|
|
42
|
+
*/
|
|
43
|
+
backgroundColor?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Maximum width for the content area
|
|
46
|
+
* @default '1128px'
|
|
47
|
+
*/
|
|
48
|
+
maxWidth?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Custom class name for additional styling
|
|
51
|
+
*/
|
|
52
|
+
className?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Size of the benefit icons
|
|
55
|
+
* @default 24
|
|
56
|
+
*/
|
|
57
|
+
iconSize?: number;
|
|
58
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FAQ Accordion Component
|
|
3
|
+
* A reusable, tenant-aware FAQ accordion component
|
|
4
|
+
*/
|
|
5
|
+
import { FAQAccordionProps } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* FAQAccordion - Displays a list of frequently asked questions in an accordion format
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const faqs = [
|
|
12
|
+
* { id: 'faq-1', question: 'What is this product?', answer: 'This is a great product.' },
|
|
13
|
+
* { id: 'faq-2', question: 'How does it work?', answer: 'It works seamlessly.' },
|
|
14
|
+
* ]
|
|
15
|
+
*
|
|
16
|
+
* <FAQAccordion
|
|
17
|
+
* faqs={faqs}
|
|
18
|
+
* title="Frequently Asked Questions"
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function FAQAccordion({ faqs, title, formatMessage, backgroundColor, maxWidth, className, defaultExpanded, onAccordionChange, }: FAQAccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FAQ Accordion Styled Components
|
|
3
|
+
* MUI styled components for the FAQ Accordion
|
|
4
|
+
*/
|
|
5
|
+
/// <reference types="react" />
|
|
6
|
+
export declare const FAQContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
9
|
+
export declare const FAQTitle: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
10
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
11
|
+
}, "fontFamily" | "children" | "p" | "style" | "fontSize" | "fontStyle" | "fontWeight" | "lineHeight" | "border" | "className" | "classes" | "sx" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
12
|
+
export declare const StyledAccordion: import("@emotion/styled").StyledComponent<{
|
|
13
|
+
children: NonNullable<import("react").ReactNode>;
|
|
14
|
+
classes?: Partial<import("@mui/material").AccordionClasses> | undefined;
|
|
15
|
+
defaultExpanded?: boolean | undefined;
|
|
16
|
+
disabled?: boolean | undefined;
|
|
17
|
+
disableGutters?: boolean | undefined;
|
|
18
|
+
expanded?: boolean | undefined;
|
|
19
|
+
onChange?: ((event: import("react").SyntheticEvent<Element, Event>, expanded: boolean) => void) | undefined;
|
|
20
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
21
|
+
TransitionComponent?: import("react").JSXElementConstructor<import("@mui/material/transitions").TransitionProps & {
|
|
22
|
+
children?: import("react").ReactElement<any, any> | undefined;
|
|
23
|
+
}> | undefined;
|
|
24
|
+
TransitionProps?: import("@mui/material/transitions").TransitionProps | undefined;
|
|
25
|
+
} & import("@mui/material").AccordionSlotsAndSlotProps & Omit<import("@mui/material").PaperOwnProps, "classes" | "onChange"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
26
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
27
|
+
}, "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "disabled" | "sx" | "variant" | "onChange" | "expanded" | "square" | "elevation" | "disableGutters" | "TransitionComponent" | "TransitionProps" | "defaultExpanded" | keyof import("@mui/material").AccordionSlotsAndSlotProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
28
|
+
export declare const StyledAccordionSummary: import("@emotion/styled").StyledComponent<import("@mui/material").AccordionSummaryOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
29
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
30
|
+
}, "children" | "style" | "className" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "expandIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
31
|
+
export declare const FAQQuestion: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
32
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
33
|
+
}, "fontFamily" | "children" | "p" | "style" | "fontSize" | "fontStyle" | "fontWeight" | "lineHeight" | "border" | "className" | "classes" | "sx" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
34
|
+
export declare const StyledAccordionDetails: import("@emotion/styled").StyledComponent<import("@mui/material").AccordionDetailsProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
35
|
+
export declare const FAQContentWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
36
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
37
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FAQ Accordion Types
|
|
3
|
+
* Type definitions for the FAQ Accordion component
|
|
4
|
+
*/
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
export interface FAQItem {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier for the FAQ item
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* The question text
|
|
13
|
+
*/
|
|
14
|
+
question: string;
|
|
15
|
+
/**
|
|
16
|
+
* The answer text or React node
|
|
17
|
+
*/
|
|
18
|
+
answer: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export interface FAQAccordionProps {
|
|
21
|
+
/**
|
|
22
|
+
* Array of FAQ items to display
|
|
23
|
+
*/
|
|
24
|
+
faqs: FAQItem[];
|
|
25
|
+
/**
|
|
26
|
+
* Title for the FAQ section
|
|
27
|
+
*/
|
|
28
|
+
title?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Optional format message function for i18n support
|
|
31
|
+
*/
|
|
32
|
+
formatMessage?: (descriptor: {
|
|
33
|
+
id: string;
|
|
34
|
+
defaultMessage?: string;
|
|
35
|
+
}) => string;
|
|
36
|
+
/**
|
|
37
|
+
* Custom background color for the container
|
|
38
|
+
*/
|
|
39
|
+
backgroundColor?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Maximum width for the content area
|
|
42
|
+
* @default '1128px'
|
|
43
|
+
*/
|
|
44
|
+
maxWidth?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Custom class name for additional styling
|
|
47
|
+
*/
|
|
48
|
+
className?: string;
|
|
49
|
+
/**
|
|
50
|
+
* ID of the accordion panel that should be expanded by default
|
|
51
|
+
*/
|
|
52
|
+
defaultExpanded?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Callback when an accordion panel is expanded/collapsed
|
|
55
|
+
*/
|
|
56
|
+
onAccordionChange?: (panelId: string, isExpanded: boolean) => void;
|
|
57
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -54,6 +54,10 @@ export { HealthInformationForm } from './components/HealthInformationForm';
|
|
|
54
54
|
export type { HealthInformationField, HealthInformationFormProps, HealthQuestion } from './components/HealthInformationForm';
|
|
55
55
|
export { ChildInformationForm } from './components/ChildInformationForm';
|
|
56
56
|
export type { ChildInformationField, ChildInformationFormProps } from './components/ChildInformationForm';
|
|
57
|
+
export { FAQAccordion } from './components/FAQAccordion';
|
|
58
|
+
export type { FAQAccordionProps, FAQItem } from './components/FAQAccordion';
|
|
59
|
+
export { BenefitsSummary } from './components/BenefitsSummary';
|
|
60
|
+
export type { BenefitItem, BenefitsSummaryProps } from './components/BenefitsSummary';
|
|
57
61
|
export { getTenantAssetPath, getTenantLogoPath, useTenantAsset, useTenantFavicon, useTenantLogo } from './utils/assets';
|
|
58
62
|
export { createThemeCSSVariables, getThemeColor, mergeTenantTheme } from './utils/theme';
|
|
59
63
|
export * from './assets';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { BenefitsSummary } from '../components/BenefitsSummary';
|
|
3
|
+
declare const meta: Meta<typeof BenefitsSummary>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof BenefitsSummary>;
|
|
6
|
+
/**
|
|
7
|
+
* Default Benefits Summary with sample data
|
|
8
|
+
*/
|
|
9
|
+
export declare const Default: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Benefits Summary with custom title
|
|
12
|
+
*/
|
|
13
|
+
export declare const CustomTitle: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Benefits Summary with custom background color
|
|
16
|
+
*/
|
|
17
|
+
export declare const CustomBackground: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Benefits Summary with larger icons
|
|
20
|
+
*/
|
|
21
|
+
export declare const LargeIcons: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Benefits Summary with minimal benefits
|
|
24
|
+
*/
|
|
25
|
+
export declare const MinimalBenefits: Story;
|
|
26
|
+
/**
|
|
27
|
+
* Benefits Summary with AmMetLife theme
|
|
28
|
+
*/
|
|
29
|
+
export declare const AmMetLifeTheme: Story;
|
|
30
|
+
/**
|
|
31
|
+
* Benefits Summary with CIMB theme
|
|
32
|
+
*/
|
|
33
|
+
export declare const CIMBTheme: Story;
|
|
34
|
+
/**
|
|
35
|
+
* Benefits Summary with Igloo theme
|
|
36
|
+
*/
|
|
37
|
+
export declare const IglooTheme: Story;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { FAQAccordion } from '../components/FAQAccordion';
|
|
3
|
+
declare const meta: Meta<typeof FAQAccordion>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof FAQAccordion>;
|
|
6
|
+
/**
|
|
7
|
+
* Default FAQ Accordion with sample data
|
|
8
|
+
*/
|
|
9
|
+
export declare const Default: Story;
|
|
10
|
+
/**
|
|
11
|
+
* FAQ Accordion with custom title
|
|
12
|
+
*/
|
|
13
|
+
export declare const CustomTitle: Story;
|
|
14
|
+
/**
|
|
15
|
+
* FAQ Accordion with custom background color
|
|
16
|
+
*/
|
|
17
|
+
export declare const CustomBackground: Story;
|
|
18
|
+
/**
|
|
19
|
+
* FAQ Accordion with a default expanded item
|
|
20
|
+
*/
|
|
21
|
+
export declare const DefaultExpanded: Story;
|
|
22
|
+
/**
|
|
23
|
+
* FAQ Accordion with minimal FAQs
|
|
24
|
+
*/
|
|
25
|
+
export declare const MinimalFAQs: Story;
|
|
26
|
+
/**
|
|
27
|
+
* FAQ Accordion with AmMetLife theme
|
|
28
|
+
*/
|
|
29
|
+
export declare const AmMetLifeTheme: Story;
|
|
30
|
+
/**
|
|
31
|
+
* FAQ Accordion with CIMB theme
|
|
32
|
+
*/
|
|
33
|
+
export declare const CIMBTheme: Story;
|
|
34
|
+
/**
|
|
35
|
+
* FAQ Accordion with Igloo theme
|
|
36
|
+
*/
|
|
37
|
+
export declare const IglooTheme: Story;
|
package/package.json
CHANGED