@windstream/react-shared-components 0.2.92 → 0.2.94

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.
Files changed (72) hide show
  1. package/dist/contentful/index.d.ts +46 -9
  2. package/dist/contentful/index.esm.js +4 -4
  3. package/dist/contentful/index.esm.js.map +1 -1
  4. package/dist/contentful/index.js +3 -3
  5. package/dist/contentful/index.js.map +1 -1
  6. package/dist/core.d.ts +6 -3
  7. package/dist/index.d.ts +4 -1
  8. package/dist/index.esm.js +2 -2
  9. package/dist/index.esm.js.map +1 -1
  10. package/dist/index.js +2 -2
  11. package/dist/index.js.map +1 -1
  12. package/dist/utils/index.d.ts +2 -1
  13. package/dist/utils/index.esm.js +1 -1
  14. package/dist/utils/index.esm.js.map +1 -1
  15. package/dist/utils/index.js +1 -1
  16. package/dist/utils/index.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/components/checklist/index.test.tsx +18 -1
  19. package/src/components/checklist/index.tsx +25 -21
  20. package/src/components/checklist/types.ts +8 -2
  21. package/src/contentful/blocks/address-input-banner/index.test.tsx +14 -0
  22. package/src/contentful/blocks/address-input-banner/index.tsx +3 -1
  23. package/src/contentful/blocks/address-input-banner/types.ts +1 -1
  24. package/src/contentful/blocks/anchored-bottom-banner/index.test.tsx +91 -0
  25. package/src/contentful/blocks/anchored-bottom-banner/index.tsx +18 -11
  26. package/src/contentful/blocks/anchored-bottom-banner/types.ts +17 -3
  27. package/src/contentful/blocks/blogs-grid/index.test.tsx +21 -1
  28. package/src/contentful/blocks/blogs-grid/index.tsx +1 -0
  29. package/src/contentful/blocks/blogs-grid/types.ts +3 -0
  30. package/src/contentful/blocks/blogs-grid-base/index.test.tsx +49 -3
  31. package/src/contentful/blocks/blogs-grid-base/index.tsx +11 -2
  32. package/src/contentful/blocks/blogs-grid-base/types.ts +7 -1
  33. package/src/contentful/blocks/cards/blog-card/index.test.tsx +29 -0
  34. package/src/contentful/blocks/cards/blog-card/index.tsx +18 -4
  35. package/src/contentful/blocks/cards/blog-card/types.ts +3 -1
  36. package/src/contentful/blocks/cards/product-card/index.test.tsx +43 -0
  37. package/src/contentful/blocks/cards/product-card/index.tsx +37 -9
  38. package/src/contentful/blocks/cards/product-card/types.ts +3 -0
  39. package/src/contentful/blocks/carousel/helper.test.tsx +13 -0
  40. package/src/contentful/blocks/carousel/helper.tsx +1 -0
  41. package/src/contentful/blocks/carousel/types.ts +2 -0
  42. package/src/contentful/blocks/dynamic-form/conditional-fields.tsx +1 -0
  43. package/src/contentful/blocks/dynamic-form/form-field.tsx +1 -0
  44. package/src/contentful/blocks/dynamic-form/index.test.tsx +48 -0
  45. package/src/contentful/blocks/dynamic-form/index.tsx +19 -7
  46. package/src/contentful/blocks/dynamic-form/render.tsx +13 -7
  47. package/src/contentful/blocks/dynamic-form/types.ts +28 -2
  48. package/src/contentful/blocks/dynamic-tabs/index.test.tsx +52 -2
  49. package/src/contentful/blocks/dynamic-tabs/index.tsx +9 -2
  50. package/src/contentful/blocks/dynamic-tabs/ordered-tab-views.tsx +16 -6
  51. package/src/contentful/blocks/dynamic-tabs/tab-views.tsx +10 -6
  52. package/src/contentful/blocks/dynamic-tabs/types.ts +6 -0
  53. package/src/contentful/blocks/email-input-block/index.test.tsx +51 -3
  54. package/src/contentful/blocks/email-input-block/index.tsx +88 -31
  55. package/src/contentful/blocks/email-input-block/types.ts +14 -1
  56. package/src/contentful/blocks/fiber-form/index.test.tsx +40 -2
  57. package/src/contentful/blocks/fiber-form/index.tsx +32 -13
  58. package/src/contentful/blocks/fiber-form/types.ts +18 -0
  59. package/src/contentful/blocks/iframe-embed/index.test.tsx +44 -7
  60. package/src/contentful/blocks/iframe-embed/index.tsx +3 -2
  61. package/src/contentful/blocks/iframe-embed/types.ts +1 -0
  62. package/src/contentful/blocks/navigation/{Navigation.stories.tsx → navigation.stories.tsx} +1 -1
  63. package/src/contentful/blocks/ordered-list/index.test.tsx +54 -4
  64. package/src/contentful/blocks/ordered-list/index.tsx +14 -2
  65. package/src/contentful/blocks/ordered-list/types.ts +15 -2
  66. package/src/contentful/blocks/primary-hero/index.tsx +5 -5
  67. package/src/contentful/blocks/search-block/index.test.tsx +36 -2
  68. package/src/contentful/blocks/search-block/index.tsx +24 -4
  69. package/src/contentful/blocks/search-block/types.ts +10 -0
  70. package/src/utils/index.ts +1 -1
  71. package/src/utils/replace-tokens.test.ts +40 -0
  72. package/src/utils/replace-tokens.ts +13 -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
- tabs: any[];
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;
@@ -768,13 +784,14 @@ interface BlogCardProps$2 {
768
784
  asGrid?: boolean;
769
785
  index?: number;
770
786
  /** Per-field DOM attributes supplied by the consumer or parent Callout item. */
771
- fieldProps?: FieldProps<"title" | "description">;
787
+ fieldProps?: FieldProps<"title" | "description" | "image" | "category" | "date" | "href">;
772
788
  }
773
789
 
774
790
  declare const BlogCard: React__default.FC<BlogCardProps$2>;
775
791
 
776
792
  interface BlogCardProps$1 {
777
793
  slug: string;
794
+ fieldProps?: BlogCardProps$3["fieldProps"];
778
795
  title?: string;
779
796
  shortDescription?: string;
780
797
  blogCreationDate?: string;
@@ -803,6 +820,7 @@ declare function BlogGrid({ paginatedArticles, totalArticles, currentPage, total
803
820
 
804
821
  interface BlogCardProps {
805
822
  slug: string;
823
+ fieldProps?: BlogCardProps$3["fieldProps"];
806
824
  title?: string;
807
825
  shortDescription?: string;
808
826
  blogCreationDate?: string;
@@ -815,6 +833,7 @@ interface BlogCardProps {
815
833
  };
816
834
  }
817
835
  interface BlogGridBaseProps {
836
+ fieldProps?: FieldProps<"title" | "description">;
818
837
  title?: string;
819
838
  description?: string;
820
839
  paginatedArticles: BlogCardProps[];
@@ -836,7 +855,7 @@ interface BlogCategoryOption {
836
855
  label: string;
837
856
  }
838
857
 
839
- 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;
840
859
 
841
860
  type BreadcrumbNavigationProps = {
842
861
  links?: Array<any>;
@@ -850,6 +869,7 @@ type BreadcrumbNavigationProps = {
850
869
  declare const BreadcrumbNavigation: React__default.FC<BreadcrumbNavigationProps>;
851
870
 
852
871
  type SearchBlockProps = {
872
+ fieldProps?: FieldProps<"title" | "subTitle" | "searchDescription" | "searchInputPlaceholder" | "caption" | "basicCaption">;
853
873
  anchorId?: string;
854
874
  title?: string;
855
875
  subTitle?: string;
@@ -876,7 +896,7 @@ interface AddressInputBannerProps {
876
896
  isVisible?: boolean;
877
897
  renderCheckPlans?: (overrides?: CheckPlansProps) => React__default.ReactNode;
878
898
  /** Extra DOM attribute props, spread onto the respective rendered elements. */
879
- fieldProps?: FieldProps<"title">;
899
+ fieldProps?: FieldProps<"title" | "cta">;
880
900
  }
881
901
 
882
902
  declare const AddressInputBanner: FC<AddressInputBannerProps>;
@@ -885,6 +905,8 @@ interface DynamicTabT {
885
905
  tabName: string;
886
906
  anchorId: string;
887
907
  tabContent: ReactNode;
908
+ /** Inspector attributes for this tab's name and content. */
909
+ fieldProps?: FieldProps<"tabName" | "tabContent">;
888
910
  }
889
911
  interface DynamicTabsT {
890
912
  tabs?: {
@@ -902,6 +924,8 @@ interface DynamicTabsT {
902
924
  textColor?: "navy";
903
925
  navigationType?: boolean;
904
926
  mobileSidebarTabType?: boolean;
927
+ /** Inspector attributes for the block heading fields. */
928
+ fieldProps?: FieldProps<"title" | "subTitle">;
905
929
  }
906
930
 
907
931
  declare function DynamicTabs(props: DynamicTabsT): react_jsx_runtime.JSX.Element;
@@ -922,7 +946,7 @@ interface ScheduledMessage {
922
946
  ctaSuffixText?: string;
923
947
  ctaButtonLink?: string;
924
948
  ctaButtonTarget?: string;
925
- fieldProps?: FieldProps<"ctaButtonLabel" | "ctaSuffixText">;
949
+ fieldProps?: FieldProps<"entry" | "iconName" | "countdownEndDateTime" | "buttonLabel" | "ctaButtonLabel" | "ctaSuffixText">;
926
950
  }
927
951
  interface AnchoredBottomBannerProps {
928
952
  ctaSuffixText?: string;
@@ -943,8 +967,8 @@ interface AnchoredBottomBannerProps {
943
967
  activeMessage?: ScheduledMessage;
944
968
  applicableWeekday: string;
945
969
  }) => void;
946
- /** DOM attributes for the rendered CTA label and suffix fields. */
947
- fieldProps?: FieldProps<"ctaButtonLabel" | "ctaSuffixText">;
970
+ /** DOM attributes for the banner entry and rendered content fields. */
971
+ fieldProps?: FieldProps<"entry" | "iconName" | "countdownEndDateTime" | "buttonLabel" | "ctaButtonLabel" | "ctaSuffixText">;
948
972
  }
949
973
 
950
974
  declare const AnchoredBottomBanner: React__default.FC<AnchoredBottomBannerProps>;
@@ -978,6 +1002,8 @@ interface EmailInputBlockProps {
978
1002
  validationErrorMessage?: string;
979
1003
  requiredErrorMessage?: string;
980
1004
  onSubmit: (values: EmailInputFormValues) => void;
1005
+ /** Inspector attributes for rendered content and email form fields. */
1006
+ fieldProps?: FieldProps<"title" | "subTitle" | "emailInputDescription" | "email" | "cta" | "errorMessage" | "successFeedback" | "caption">;
981
1007
  }
982
1008
  interface EmailInputFormValues {
983
1009
  email: string;
@@ -1041,6 +1067,9 @@ type IframeEmbedProps = {
1041
1067
  backgroundColor?: BackgroundColor;
1042
1068
  /** Optional initial/minimum height (in px) for the iframe before postMessage auto-resize kicks in. */
1043
1069
  height?: number;
1070
+ fieldProps?: {
1071
+ iframeUrl?: Record<string, unknown>;
1072
+ };
1044
1073
  };
1045
1074
 
1046
1075
  /**
@@ -1111,6 +1140,8 @@ interface DynamicFormFieldConfig {
1111
1140
  selectPresetValidationsToApply?: string;
1112
1141
  /** When true, a Text field renders the app-injected address autocomplete. */
1113
1142
  enableAddressAutocomplete?: boolean;
1143
+ /** Inspector attributes applied to the field's label/control group. */
1144
+ fieldProps?: FieldProps<"field">;
1114
1145
  }
1115
1146
  interface ConditionalFieldConfig {
1116
1147
  fieldId: string;
@@ -1124,6 +1155,8 @@ interface ConditionalFieldConfig {
1124
1155
  * Injected by the consuming app so the shared package stays route-agnostic.
1125
1156
  */
1126
1157
  grouped?: boolean;
1158
+ /** Inspector attributes applied to the conditional field group. */
1159
+ fieldProps?: FieldProps<"field">;
1127
1160
  }
1128
1161
  interface DynamicFormDividerConfig {
1129
1162
  dividerLength?: boolean;
@@ -1140,10 +1173,12 @@ type DynamicFormItem = ({
1140
1173
  } & ConditionalFieldConfig) | ({
1141
1174
  itemType: "divider";
1142
1175
  fieldId?: string;
1176
+ fieldProps?: FieldProps<"field">;
1143
1177
  } & DynamicFormDividerConfig) | {
1144
1178
  itemType: "custom";
1145
1179
  fieldId?: string;
1146
1180
  content: React__default.ReactNode;
1181
+ fieldProps?: FieldProps<"field">;
1147
1182
  };
1148
1183
  interface DynamicFormPayload {
1149
1184
  submissionId: string;
@@ -1288,6 +1323,8 @@ interface DynamicFormProps {
1288
1323
  submitLabel: string;
1289
1324
  onSubmit: (event: any) => void;
1290
1325
  }) => React__default.ReactNode;
1326
+ /** Inspector attributes for block-level copy and CTA fields. */
1327
+ fieldProps?: FieldProps<"title" | "subTitle" | "formHeading" | "description" | "disclaimer" | "successMessage" | "errorMessage" | "submit">;
1291
1328
  }
1292
1329
 
1293
1330
  declare const DynamicForm: React__default.FC<DynamicFormProps>;