@windstream/react-shared-components 0.2.91 → 0.2.93
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 +54 -10
- package/dist/contentful/index.esm.js +4 -4
- 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 +6 -3
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/checklist/index.test.tsx +18 -1
- package/src/components/checklist/index.tsx +25 -21
- package/src/components/checklist/types.ts +8 -2
- package/src/contentful/blocks/address-input-banner/index.test.tsx +14 -0
- package/src/contentful/blocks/address-input-banner/index.tsx +3 -1
- package/src/contentful/blocks/address-input-banner/types.ts +1 -1
- package/src/contentful/blocks/blogs-grid/index.test.tsx +21 -1
- package/src/contentful/blocks/blogs-grid/index.tsx +1 -0
- package/src/contentful/blocks/blogs-grid/types.ts +3 -0
- package/src/contentful/blocks/blogs-grid-base/index.test.tsx +49 -3
- package/src/contentful/blocks/blogs-grid-base/index.tsx +11 -2
- package/src/contentful/blocks/blogs-grid-base/types.ts +7 -1
- package/src/contentful/blocks/callout/{callout.stories.tsx → Callout.stories.tsx} +1 -1
- package/src/contentful/blocks/cards/blog-card/index.test.tsx +29 -0
- package/src/contentful/blocks/cards/blog-card/index.tsx +18 -4
- package/src/contentful/blocks/cards/blog-card/types.ts +3 -1
- package/src/contentful/blocks/cards/product-card/index.test.tsx +61 -0
- package/src/contentful/blocks/cards/product-card/index.tsx +38 -9
- package/src/contentful/blocks/cards/product-card/types.ts +11 -1
- package/src/contentful/blocks/carousel/helper.test.tsx +13 -0
- package/src/contentful/blocks/carousel/helper.tsx +1 -0
- package/src/contentful/blocks/carousel/types.ts +2 -0
- package/src/contentful/blocks/dynamic-form/conditional-fields.tsx +1 -0
- package/src/contentful/blocks/dynamic-form/form-field.tsx +1 -0
- package/src/contentful/blocks/dynamic-form/index.test.tsx +48 -0
- package/src/contentful/blocks/dynamic-form/index.tsx +19 -7
- package/src/contentful/blocks/dynamic-form/render.tsx +13 -7
- package/src/contentful/blocks/dynamic-form/types.ts +28 -2
- package/src/contentful/blocks/dynamic-tabs/index.test.tsx +52 -2
- package/src/contentful/blocks/dynamic-tabs/index.tsx +9 -2
- package/src/contentful/blocks/dynamic-tabs/ordered-tab-views.tsx +16 -6
- package/src/contentful/blocks/dynamic-tabs/tab-views.tsx +10 -6
- package/src/contentful/blocks/dynamic-tabs/types.ts +7 -0
- package/src/contentful/blocks/email-input-block/index.test.tsx +51 -3
- package/src/contentful/blocks/email-input-block/index.tsx +88 -31
- package/src/contentful/blocks/email-input-block/types.ts +14 -1
- package/src/contentful/blocks/fiber-form/index.test.tsx +40 -2
- package/src/contentful/blocks/fiber-form/index.tsx +32 -13
- package/src/contentful/blocks/fiber-form/types.ts +18 -0
- package/src/contentful/blocks/iframe-embed/index.test.tsx +44 -7
- package/src/contentful/blocks/iframe-embed/index.tsx +3 -2
- package/src/contentful/blocks/iframe-embed/types.ts +1 -0
- package/src/contentful/blocks/navigation/{navigation.stories.tsx → Navigation.stories.tsx} +1 -1
- package/src/contentful/blocks/ordered-list/index.test.tsx +54 -4
- package/src/contentful/blocks/ordered-list/index.tsx +14 -2
- package/src/contentful/blocks/ordered-list/types.ts +15 -2
- package/src/contentful/blocks/primary-hero/index.test.tsx +2 -2
- package/src/contentful/blocks/primary-hero/index.tsx +5 -5
- package/src/contentful/blocks/search-block/index.test.tsx +36 -2
- package/src/contentful/blocks/search-block/index.tsx +24 -4
- package/src/contentful/blocks/search-block/types.ts +10 -0
- package/src/utils/index.ts +1 -1
- package/src/utils/replace-tokens.test.ts +40 -0
- package/src/utils/replace-tokens.ts +13 -0
- /package/src/contentful/blocks/carousel/{carousel.stories.tsx → Carousel.stories.tsx} +0 -0
|
@@ -8,7 +8,7 @@ import { CheckPlansProps, Asset, Button as Button$1, ButtonGroup } from '@shared
|
|
|
8
8
|
import { VideoLinkProps, VideoAnalyticsHandler } from '@shared/components/video-link';
|
|
9
9
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
10
|
import { ButtonProps as ButtonProps$1 } from '@shared/contentful/blocks/button/types';
|
|
11
|
-
import { BlogCardImageProps as BlogCardImageProps$1 } from '@shared/contentful/blocks/cards/blog-card/types';
|
|
11
|
+
import { BlogCardProps as BlogCardProps$3, BlogCardImageProps as BlogCardImageProps$1 } from '@shared/contentful/blocks/cards/blog-card/types';
|
|
12
12
|
import { Document } from '@contentful/rich-text-types';
|
|
13
13
|
import { Options } from '@contentful/rich-text-react-renderer';
|
|
14
14
|
|
|
@@ -290,6 +290,8 @@ interface ProductCardFields {
|
|
|
290
290
|
};
|
|
291
291
|
speed?: string;
|
|
292
292
|
price?: string;
|
|
293
|
+
/** Regular (pre-promo) price shown struck through on the card when truthy. */
|
|
294
|
+
strikethroughPrice?: string;
|
|
293
295
|
priceSuffix?: string;
|
|
294
296
|
priceSuffixBottom?: string;
|
|
295
297
|
techType?: string;
|
|
@@ -557,10 +559,21 @@ interface OrderedListProps {
|
|
|
557
559
|
backgroundColor?: "white" | "cream";
|
|
558
560
|
title: ReactNode;
|
|
559
561
|
description: ReactNode;
|
|
560
|
-
|
|
562
|
+
fieldProps?: FieldProps<"title" | "description">;
|
|
563
|
+
tabs: {
|
|
564
|
+
items: {
|
|
565
|
+
tabName: string;
|
|
566
|
+
fieldProps?: FieldProps<"tabName">;
|
|
567
|
+
tabContent: {
|
|
568
|
+
itemName: string;
|
|
569
|
+
itemSlug?: string;
|
|
570
|
+
fieldProps?: FieldProps<"itemName" | "itemSlug">;
|
|
571
|
+
}[];
|
|
572
|
+
};
|
|
573
|
+
}[];
|
|
561
574
|
}
|
|
562
575
|
|
|
563
|
-
declare const OrderedList: ({ anchorId, backgroundColor, title, description, tabs, }: OrderedListProps) => react_jsx_runtime.JSX.Element;
|
|
576
|
+
declare const OrderedList: ({ anchorId, backgroundColor, title, description, tabs, fieldProps, }: OrderedListProps) => react_jsx_runtime.JSX.Element;
|
|
564
577
|
|
|
565
578
|
type TextProps = {};
|
|
566
579
|
|
|
@@ -693,6 +706,9 @@ interface ProductCardProps {
|
|
|
693
706
|
techType?: string;
|
|
694
707
|
ismaxSpeed?: boolean;
|
|
695
708
|
price?: string;
|
|
709
|
+
/** Regular (pre-promo) price rendered struck through under the price unit.
|
|
710
|
+
* Rendered only when truthy; a leading `$` is added if missing. */
|
|
711
|
+
strikethroughPrice?: string;
|
|
696
712
|
/** The price unit rendered after the cents, e.g. "/mo" or "/mo*". Defaults
|
|
697
713
|
* to "/mo". Lets Contentful control a trailing disclaimer star. */
|
|
698
714
|
priceUnit?: string;
|
|
@@ -700,10 +716,14 @@ interface ProductCardProps {
|
|
|
700
716
|
description: string;
|
|
701
717
|
bestValue?: boolean;
|
|
702
718
|
bestValueText?: string;
|
|
703
|
-
giftBadge?: [
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
719
|
+
giftBadge?: [
|
|
720
|
+
{
|
|
721
|
+
title: ReactNode;
|
|
722
|
+
icon: string;
|
|
723
|
+
/** Extra DOM attribute props, spread onto this gift row. */
|
|
724
|
+
fieldProps?: Record<string, unknown>;
|
|
725
|
+
}
|
|
726
|
+
];
|
|
707
727
|
innerBadge?: {
|
|
708
728
|
badgeText: string;
|
|
709
729
|
badgeIcon: string;
|
|
@@ -764,13 +784,14 @@ interface BlogCardProps$2 {
|
|
|
764
784
|
asGrid?: boolean;
|
|
765
785
|
index?: number;
|
|
766
786
|
/** Per-field DOM attributes supplied by the consumer or parent Callout item. */
|
|
767
|
-
fieldProps?: FieldProps<"title" | "description">;
|
|
787
|
+
fieldProps?: FieldProps<"title" | "description" | "image" | "category" | "date" | "href">;
|
|
768
788
|
}
|
|
769
789
|
|
|
770
790
|
declare const BlogCard: React__default.FC<BlogCardProps$2>;
|
|
771
791
|
|
|
772
792
|
interface BlogCardProps$1 {
|
|
773
793
|
slug: string;
|
|
794
|
+
fieldProps?: BlogCardProps$3["fieldProps"];
|
|
774
795
|
title?: string;
|
|
775
796
|
shortDescription?: string;
|
|
776
797
|
blogCreationDate?: string;
|
|
@@ -799,6 +820,7 @@ declare function BlogGrid({ paginatedArticles, totalArticles, currentPage, total
|
|
|
799
820
|
|
|
800
821
|
interface BlogCardProps {
|
|
801
822
|
slug: string;
|
|
823
|
+
fieldProps?: BlogCardProps$3["fieldProps"];
|
|
802
824
|
title?: string;
|
|
803
825
|
shortDescription?: string;
|
|
804
826
|
blogCreationDate?: string;
|
|
@@ -811,6 +833,7 @@ interface BlogCardProps {
|
|
|
811
833
|
};
|
|
812
834
|
}
|
|
813
835
|
interface BlogGridBaseProps {
|
|
836
|
+
fieldProps?: FieldProps<"title" | "description">;
|
|
814
837
|
title?: string;
|
|
815
838
|
description?: string;
|
|
816
839
|
paginatedArticles: BlogCardProps[];
|
|
@@ -832,7 +855,7 @@ interface BlogCategoryOption {
|
|
|
832
855
|
label: string;
|
|
833
856
|
}
|
|
834
857
|
|
|
835
|
-
declare function BlogGridBase({ title, description, paginatedArticles, totalArticles, currentPage, totalPages, selectedCategory, categoryOptions, onCategoryChange, onPageChange, getPageHref, asList, imageComponent, }: BlogGridBaseProps): react_jsx_runtime.JSX.Element;
|
|
858
|
+
declare function BlogGridBase({ title, description, paginatedArticles, totalArticles, currentPage, totalPages, selectedCategory, categoryOptions, onCategoryChange, onPageChange, getPageHref, asList, imageComponent, fieldProps, }: BlogGridBaseProps): react_jsx_runtime.JSX.Element;
|
|
836
859
|
|
|
837
860
|
type BreadcrumbNavigationProps = {
|
|
838
861
|
links?: Array<any>;
|
|
@@ -846,6 +869,7 @@ type BreadcrumbNavigationProps = {
|
|
|
846
869
|
declare const BreadcrumbNavigation: React__default.FC<BreadcrumbNavigationProps>;
|
|
847
870
|
|
|
848
871
|
type SearchBlockProps = {
|
|
872
|
+
fieldProps?: FieldProps<"title" | "subTitle" | "searchDescription" | "searchInputPlaceholder" | "caption" | "basicCaption">;
|
|
849
873
|
anchorId?: string;
|
|
850
874
|
title?: string;
|
|
851
875
|
subTitle?: string;
|
|
@@ -872,15 +896,20 @@ interface AddressInputBannerProps {
|
|
|
872
896
|
isVisible?: boolean;
|
|
873
897
|
renderCheckPlans?: (overrides?: CheckPlansProps) => React__default.ReactNode;
|
|
874
898
|
/** Extra DOM attribute props, spread onto the respective rendered elements. */
|
|
875
|
-
fieldProps?: FieldProps<"title">;
|
|
899
|
+
fieldProps?: FieldProps<"title" | "cta">;
|
|
876
900
|
}
|
|
877
901
|
|
|
878
902
|
declare const AddressInputBanner: FC<AddressInputBannerProps>;
|
|
879
903
|
|
|
880
904
|
interface DynamicTabT {
|
|
881
905
|
tabName: string;
|
|
906
|
+
fieldProps?: {
|
|
907
|
+
tabName?: Record<string, unknown>;
|
|
908
|
+
};
|
|
882
909
|
anchorId: string;
|
|
883
910
|
tabContent: ReactNode;
|
|
911
|
+
/** Inspector attributes for this tab's name and content. */
|
|
912
|
+
fieldProps?: FieldProps<"tabName" | "tabContent">;
|
|
884
913
|
}
|
|
885
914
|
interface DynamicTabsT {
|
|
886
915
|
tabs?: {
|
|
@@ -898,6 +927,8 @@ interface DynamicTabsT {
|
|
|
898
927
|
textColor?: "navy";
|
|
899
928
|
navigationType?: boolean;
|
|
900
929
|
mobileSidebarTabType?: boolean;
|
|
930
|
+
/** Inspector attributes for the block heading fields. */
|
|
931
|
+
fieldProps?: FieldProps<"title" | "subTitle">;
|
|
901
932
|
}
|
|
902
933
|
|
|
903
934
|
declare function DynamicTabs(props: DynamicTabsT): react_jsx_runtime.JSX.Element;
|
|
@@ -974,6 +1005,8 @@ interface EmailInputBlockProps {
|
|
|
974
1005
|
validationErrorMessage?: string;
|
|
975
1006
|
requiredErrorMessage?: string;
|
|
976
1007
|
onSubmit: (values: EmailInputFormValues) => void;
|
|
1008
|
+
/** Inspector attributes for rendered content and email form fields. */
|
|
1009
|
+
fieldProps?: FieldProps<"title" | "subTitle" | "emailInputDescription" | "email" | "cta" | "errorMessage" | "successFeedback" | "caption">;
|
|
977
1010
|
}
|
|
978
1011
|
interface EmailInputFormValues {
|
|
979
1012
|
email: string;
|
|
@@ -1037,6 +1070,9 @@ type IframeEmbedProps = {
|
|
|
1037
1070
|
backgroundColor?: BackgroundColor;
|
|
1038
1071
|
/** Optional initial/minimum height (in px) for the iframe before postMessage auto-resize kicks in. */
|
|
1039
1072
|
height?: number;
|
|
1073
|
+
fieldProps?: {
|
|
1074
|
+
iframeUrl?: Record<string, unknown>;
|
|
1075
|
+
};
|
|
1040
1076
|
};
|
|
1041
1077
|
|
|
1042
1078
|
/**
|
|
@@ -1107,6 +1143,8 @@ interface DynamicFormFieldConfig {
|
|
|
1107
1143
|
selectPresetValidationsToApply?: string;
|
|
1108
1144
|
/** When true, a Text field renders the app-injected address autocomplete. */
|
|
1109
1145
|
enableAddressAutocomplete?: boolean;
|
|
1146
|
+
/** Inspector attributes applied to the field's label/control group. */
|
|
1147
|
+
fieldProps?: FieldProps<"field">;
|
|
1110
1148
|
}
|
|
1111
1149
|
interface ConditionalFieldConfig {
|
|
1112
1150
|
fieldId: string;
|
|
@@ -1120,6 +1158,8 @@ interface ConditionalFieldConfig {
|
|
|
1120
1158
|
* Injected by the consuming app so the shared package stays route-agnostic.
|
|
1121
1159
|
*/
|
|
1122
1160
|
grouped?: boolean;
|
|
1161
|
+
/** Inspector attributes applied to the conditional field group. */
|
|
1162
|
+
fieldProps?: FieldProps<"field">;
|
|
1123
1163
|
}
|
|
1124
1164
|
interface DynamicFormDividerConfig {
|
|
1125
1165
|
dividerLength?: boolean;
|
|
@@ -1136,10 +1176,12 @@ type DynamicFormItem = ({
|
|
|
1136
1176
|
} & ConditionalFieldConfig) | ({
|
|
1137
1177
|
itemType: "divider";
|
|
1138
1178
|
fieldId?: string;
|
|
1179
|
+
fieldProps?: FieldProps<"field">;
|
|
1139
1180
|
} & DynamicFormDividerConfig) | {
|
|
1140
1181
|
itemType: "custom";
|
|
1141
1182
|
fieldId?: string;
|
|
1142
1183
|
content: React__default.ReactNode;
|
|
1184
|
+
fieldProps?: FieldProps<"field">;
|
|
1143
1185
|
};
|
|
1144
1186
|
interface DynamicFormPayload {
|
|
1145
1187
|
submissionId: string;
|
|
@@ -1284,6 +1326,8 @@ interface DynamicFormProps {
|
|
|
1284
1326
|
submitLabel: string;
|
|
1285
1327
|
onSubmit: (event: any) => void;
|
|
1286
1328
|
}) => React__default.ReactNode;
|
|
1329
|
+
/** Inspector attributes for block-level copy and CTA fields. */
|
|
1330
|
+
fieldProps?: FieldProps<"title" | "subTitle" | "formHeading" | "description" | "disclaimer" | "successMessage" | "errorMessage" | "submit">;
|
|
1287
1331
|
}
|
|
1288
1332
|
|
|
1289
1333
|
declare const DynamicForm: React__default.FC<DynamicFormProps>;
|