@windstream/react-shared-components 0.2.92 → 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.
Files changed (68) hide show
  1. package/dist/contentful/index.d.ts +46 -6
  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 +4 -1
  7. package/dist/index.d.ts +6 -3
  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/blogs-grid/index.test.tsx +21 -1
  25. package/src/contentful/blocks/blogs-grid/index.tsx +1 -0
  26. package/src/contentful/blocks/blogs-grid/types.ts +3 -0
  27. package/src/contentful/blocks/blogs-grid-base/index.test.tsx +49 -3
  28. package/src/contentful/blocks/blogs-grid-base/index.tsx +11 -2
  29. package/src/contentful/blocks/blogs-grid-base/types.ts +7 -1
  30. package/src/contentful/blocks/cards/blog-card/index.test.tsx +29 -0
  31. package/src/contentful/blocks/cards/blog-card/index.tsx +18 -4
  32. package/src/contentful/blocks/cards/blog-card/types.ts +3 -1
  33. package/src/contentful/blocks/cards/product-card/index.test.tsx +43 -0
  34. package/src/contentful/blocks/cards/product-card/index.tsx +37 -9
  35. package/src/contentful/blocks/cards/product-card/types.ts +3 -0
  36. package/src/contentful/blocks/carousel/helper.test.tsx +13 -0
  37. package/src/contentful/blocks/carousel/helper.tsx +1 -0
  38. package/src/contentful/blocks/carousel/types.ts +2 -0
  39. package/src/contentful/blocks/dynamic-form/conditional-fields.tsx +1 -0
  40. package/src/contentful/blocks/dynamic-form/form-field.tsx +1 -0
  41. package/src/contentful/blocks/dynamic-form/index.test.tsx +48 -0
  42. package/src/contentful/blocks/dynamic-form/index.tsx +19 -7
  43. package/src/contentful/blocks/dynamic-form/render.tsx +13 -7
  44. package/src/contentful/blocks/dynamic-form/types.ts +28 -2
  45. package/src/contentful/blocks/dynamic-tabs/index.test.tsx +52 -2
  46. package/src/contentful/blocks/dynamic-tabs/index.tsx +9 -2
  47. package/src/contentful/blocks/dynamic-tabs/ordered-tab-views.tsx +16 -6
  48. package/src/contentful/blocks/dynamic-tabs/tab-views.tsx +10 -6
  49. package/src/contentful/blocks/dynamic-tabs/types.ts +7 -0
  50. package/src/contentful/blocks/email-input-block/index.test.tsx +51 -3
  51. package/src/contentful/blocks/email-input-block/index.tsx +88 -31
  52. package/src/contentful/blocks/email-input-block/types.ts +14 -1
  53. package/src/contentful/blocks/fiber-form/index.test.tsx +40 -2
  54. package/src/contentful/blocks/fiber-form/index.tsx +32 -13
  55. package/src/contentful/blocks/fiber-form/types.ts +18 -0
  56. package/src/contentful/blocks/iframe-embed/index.test.tsx +44 -7
  57. package/src/contentful/blocks/iframe-embed/index.tsx +3 -2
  58. package/src/contentful/blocks/iframe-embed/types.ts +1 -0
  59. package/src/contentful/blocks/ordered-list/index.test.tsx +54 -4
  60. package/src/contentful/blocks/ordered-list/index.tsx +14 -2
  61. package/src/contentful/blocks/ordered-list/types.ts +15 -2
  62. package/src/contentful/blocks/primary-hero/index.tsx +5 -5
  63. package/src/contentful/blocks/search-block/index.test.tsx +36 -2
  64. package/src/contentful/blocks/search-block/index.tsx +24 -4
  65. package/src/contentful/blocks/search-block/types.ts +10 -0
  66. package/src/utils/index.ts +1 -1
  67. package/src/utils/replace-tokens.test.ts +40 -0
  68. 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,15 +896,20 @@ 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>;
883
903
 
884
904
  interface DynamicTabT {
885
905
  tabName: string;
906
+ fieldProps?: {
907
+ tabName?: Record<string, unknown>;
908
+ };
886
909
  anchorId: string;
887
910
  tabContent: ReactNode;
911
+ /** Inspector attributes for this tab's name and content. */
912
+ fieldProps?: FieldProps<"tabName" | "tabContent">;
888
913
  }
889
914
  interface DynamicTabsT {
890
915
  tabs?: {
@@ -902,6 +927,8 @@ interface DynamicTabsT {
902
927
  textColor?: "navy";
903
928
  navigationType?: boolean;
904
929
  mobileSidebarTabType?: boolean;
930
+ /** Inspector attributes for the block heading fields. */
931
+ fieldProps?: FieldProps<"title" | "subTitle">;
905
932
  }
906
933
 
907
934
  declare function DynamicTabs(props: DynamicTabsT): react_jsx_runtime.JSX.Element;
@@ -978,6 +1005,8 @@ interface EmailInputBlockProps {
978
1005
  validationErrorMessage?: string;
979
1006
  requiredErrorMessage?: string;
980
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">;
981
1010
  }
982
1011
  interface EmailInputFormValues {
983
1012
  email: string;
@@ -1041,6 +1070,9 @@ type IframeEmbedProps = {
1041
1070
  backgroundColor?: BackgroundColor;
1042
1071
  /** Optional initial/minimum height (in px) for the iframe before postMessage auto-resize kicks in. */
1043
1072
  height?: number;
1073
+ fieldProps?: {
1074
+ iframeUrl?: Record<string, unknown>;
1075
+ };
1044
1076
  };
1045
1077
 
1046
1078
  /**
@@ -1111,6 +1143,8 @@ interface DynamicFormFieldConfig {
1111
1143
  selectPresetValidationsToApply?: string;
1112
1144
  /** When true, a Text field renders the app-injected address autocomplete. */
1113
1145
  enableAddressAutocomplete?: boolean;
1146
+ /** Inspector attributes applied to the field's label/control group. */
1147
+ fieldProps?: FieldProps<"field">;
1114
1148
  }
1115
1149
  interface ConditionalFieldConfig {
1116
1150
  fieldId: string;
@@ -1124,6 +1158,8 @@ interface ConditionalFieldConfig {
1124
1158
  * Injected by the consuming app so the shared package stays route-agnostic.
1125
1159
  */
1126
1160
  grouped?: boolean;
1161
+ /** Inspector attributes applied to the conditional field group. */
1162
+ fieldProps?: FieldProps<"field">;
1127
1163
  }
1128
1164
  interface DynamicFormDividerConfig {
1129
1165
  dividerLength?: boolean;
@@ -1140,10 +1176,12 @@ type DynamicFormItem = ({
1140
1176
  } & ConditionalFieldConfig) | ({
1141
1177
  itemType: "divider";
1142
1178
  fieldId?: string;
1179
+ fieldProps?: FieldProps<"field">;
1143
1180
  } & DynamicFormDividerConfig) | {
1144
1181
  itemType: "custom";
1145
1182
  fieldId?: string;
1146
1183
  content: React__default.ReactNode;
1184
+ fieldProps?: FieldProps<"field">;
1147
1185
  };
1148
1186
  interface DynamicFormPayload {
1149
1187
  submissionId: string;
@@ -1288,6 +1326,8 @@ interface DynamicFormProps {
1288
1326
  submitLabel: string;
1289
1327
  onSubmit: (event: any) => void;
1290
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">;
1291
1331
  }
1292
1332
 
1293
1333
  declare const DynamicForm: React__default.FC<DynamicFormProps>;