@windstream/react-shared-components 0.2.11 → 0.2.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/contentful/index.d.ts +43 -2
- package/dist/contentful/index.esm.js +2 -2
- package/dist/contentful/index.esm.js.map +1 -1
- package/dist/contentful/index.js +3 -3
- package/dist/contentful/index.js.map +1 -1
- package/dist/core.d.ts +4 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/brand-button/index.tsx +4 -0
- package/src/contentful/blocks/iframe-embed/index.test.tsx +105 -0
- package/src/contentful/blocks/iframe-embed/index.tsx +79 -0
- package/src/contentful/blocks/iframe-embed/types.ts +18 -0
- package/src/contentful/blocks/image-promo-bar/index.tsx +1 -0
- package/src/contentful/index.ts +3 -0
|
@@ -826,6 +826,47 @@ declare const CartRetentionBanner: React.FC<{
|
|
|
826
826
|
onBannerShown?: () => void;
|
|
827
827
|
}>;
|
|
828
828
|
|
|
829
|
+
declare const bgColorMap: {
|
|
830
|
+
readonly gray90: "#464646";
|
|
831
|
+
readonly green: "#24A76A";
|
|
832
|
+
readonly white: "#FFFFFF";
|
|
833
|
+
};
|
|
834
|
+
type BackgroundColor = keyof typeof bgColorMap;
|
|
835
|
+
type IframeEmbedProps = {
|
|
836
|
+
/** The full URL of the third-party iframe to embed (e.g., Brand Featured badge URL). */
|
|
837
|
+
iframeUrl: string;
|
|
838
|
+
/** Optional HTML `id` for the wrapping `<section>`, useful for anchor linking or scroll-to navigation. */
|
|
839
|
+
anchorId?: string;
|
|
840
|
+
/** Optional background color applied behind the iframe. Defaults to `"transparent"` when not provided. */
|
|
841
|
+
backgroundColor?: BackgroundColor;
|
|
842
|
+
/** Optional initial/minimum height (in px) for the iframe before postMessage auto-resize kicks in. */
|
|
843
|
+
height?: number;
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* IframeEmbed — A generic, responsive iframe component for embedding third-party content
|
|
848
|
+
* such as Brand Featured badges, widgets, or any external HTML page.
|
|
849
|
+
*
|
|
850
|
+
* Features:
|
|
851
|
+
* - **Auto-resize:** Listens for `postMessage` events with an `{ iframeHeight: number }` payload
|
|
852
|
+
* from the embedded page and adjusts the iframe height dynamically.
|
|
853
|
+
* - **Background color:** Supports predefined background colors (`gray90`, `green`, `white`)
|
|
854
|
+
* behind the iframe, defaulting to transparent.
|
|
855
|
+
* - **Lazy loading:** The iframe uses `loading="lazy"` for performance.
|
|
856
|
+
* - **Anchor support:** An optional `anchorId` is applied to the wrapping `<section>` for
|
|
857
|
+
* deep-linking or scroll-to navigation.
|
|
858
|
+
*
|
|
859
|
+
* @example
|
|
860
|
+
* ```tsx
|
|
861
|
+
* <IframeEmbed
|
|
862
|
+
* iframeUrl="https://api.brandfeatured.com/badges/badge-news_dark.html?id=123"
|
|
863
|
+
* backgroundColor="green"
|
|
864
|
+
* anchorId="brand-badge"
|
|
865
|
+
* />
|
|
866
|
+
* ```
|
|
867
|
+
*/
|
|
868
|
+
declare const IframeEmbed: React__default.FC<IframeEmbedProps>;
|
|
869
|
+
|
|
829
870
|
declare const toDocument: (v: unknown | null | undefined) => Document | null;
|
|
830
871
|
|
|
831
872
|
/**
|
|
@@ -850,5 +891,5 @@ interface ProcessedChecklistItem {
|
|
|
850
891
|
}
|
|
851
892
|
declare function useProcessedChecklist<T extends boolean = false>(checklistData?: any, titlesOnly?: T, richTextOptions?: Options, richTextClassName?: string): T extends true ? string[] : ProcessedChecklistItem[];
|
|
852
893
|
|
|
853
|
-
export { Accordion, AddressInputBanner, AnchoredBottomBanner, BlogCard, BlogGrid, BlogGridBase, BreadcrumbNavigation, Button, Callout, Cards, Carousel, CartRetentionBanner, ComparisonTable, CookieBanner, CtaCallout, DynamicTabs, EmailInputBlock, FindKinetic, FloatingBanner, Footer, ImagePromoBar, Modal, Navigation, PrimaryHero, ProductCard, SearchBlock, ShapeBackgroundWrapper, SimpleCard, TestimonialCard, Text, label1BoldOptions, renderContentfulRichText, renderContentfulRichTextTable, toDocument, useContentfulRichText, useProcessedChecklist };
|
|
854
|
-
export type { AccordionProps, AddressInputBannerProps, AnchoredBottomBannerProps, BlogCardProps$2 as BlogCardProps, BlogGridBaseProps, BlogGridProps, BreadcrumbNavigationProps, ButtonProps, CalloutProps, CardsProps, CarouselProps, TypeCartRetentionBannerFields as CartRetentionBannerProps, ComparisonTableProps, TypeComponentRichTextFields as CookieBannerProps, CtaCalloutProps, DynamicTabsT, EmailInputBlockProps, FindKineticProps, FloatingBannerProps, FooterProps, ImagePromoBarProps, ModalProps, NavigationProps, PrimaryHeroProps, ProcessedChecklistItem, ProductCardProps, SearchBlockProps, ShapeBackgroundWrapperProps, SimpleCardProps, TestimonialCardProps, TextProps };
|
|
894
|
+
export { Accordion, AddressInputBanner, AnchoredBottomBanner, BlogCard, BlogGrid, BlogGridBase, BreadcrumbNavigation, Button, Callout, Cards, Carousel, CartRetentionBanner, ComparisonTable, CookieBanner, CtaCallout, DynamicTabs, EmailInputBlock, FindKinetic, FloatingBanner, Footer, IframeEmbed, ImagePromoBar, Modal, Navigation, PrimaryHero, ProductCard, SearchBlock, ShapeBackgroundWrapper, SimpleCard, TestimonialCard, Text, label1BoldOptions, renderContentfulRichText, renderContentfulRichTextTable, toDocument, useContentfulRichText, useProcessedChecklist };
|
|
895
|
+
export type { AccordionProps, AddressInputBannerProps, AnchoredBottomBannerProps, BlogCardProps$2 as BlogCardProps, BlogGridBaseProps, BlogGridProps, BreadcrumbNavigationProps, ButtonProps, CalloutProps, CardsProps, CarouselProps, TypeCartRetentionBannerFields as CartRetentionBannerProps, ComparisonTableProps, TypeComponentRichTextFields as CookieBannerProps, CtaCalloutProps, DynamicTabsT, EmailInputBlockProps, FindKineticProps, FloatingBannerProps, FooterProps, IframeEmbedProps, ImagePromoBarProps, ModalProps, NavigationProps, PrimaryHeroProps, ProcessedChecklistItem, ProductCardProps, SearchBlockProps, ShapeBackgroundWrapperProps, SimpleCardProps, TestimonialCardProps, TextProps };
|