@windstream/react-shared-components 0.2.68 → 0.2.70

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 (35) hide show
  1. package/dist/contentful/index.d.ts +13 -2
  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 +2 -2
  5. package/dist/contentful/index.js.map +1 -1
  6. package/dist/core.d.ts +31 -2
  7. package/dist/index.d.ts +35 -6
  8. package/dist/index.esm.js +8 -8
  9. package/dist/index.esm.js.map +1 -1
  10. package/dist/index.js +8 -8
  11. package/dist/index.js.map +1 -1
  12. package/dist/styles.css +1 -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/rich-text-basic/index.test.tsx +172 -0
  19. package/src/components/rich-text-basic/index.tsx +102 -0
  20. package/src/components/rich-text-basic/types.ts +34 -0
  21. package/src/components/select-plan-button/index.test.tsx +27 -0
  22. package/src/components/select-plan-button/index.tsx +6 -1
  23. package/src/components/video-link/index.tsx +2 -2
  24. package/src/contentful/blocks/cards/product-card/index.test.tsx +36 -0
  25. package/src/contentful/blocks/cards/product-card/index.tsx +23 -24
  26. package/src/contentful/blocks/carousel/index.tsx +1 -1
  27. package/src/contentful/blocks/dynamic-form/field-map.tsx +1 -1
  28. package/src/contentful/blocks/dynamic-form/index.test.tsx +96 -0
  29. package/src/contentful/blocks/dynamic-form/index.tsx +24 -1
  30. package/src/contentful/blocks/dynamic-form/types.ts +13 -2
  31. package/src/contentful/blocks/navigation/index.tsx +4 -1
  32. package/src/contentful/blocks/primary-hero/index.test.tsx +11 -2
  33. package/src/contentful/blocks/primary-hero/index.tsx +3 -2
  34. package/src/hooks/contentful/use-contentful-rich-text.tsx +39 -2
  35. package/src/index.ts +7 -0
package/dist/core.d.ts CHANGED
@@ -22,6 +22,7 @@ import { SeeMoreProps } from '@shared/components/see-more/types';
22
22
  export { SeeMoreProps } from '@shared/components/see-more/types';
23
23
  import { ButtonProps as ButtonProps$3 } from '@shared/contentful/blocks/button/types';
24
24
  import { CheckPlansProps } from '@shared/types/micro-components';
25
+ import { Node } from '@contentful/rich-text-types';
25
26
  import { FormikValues } from 'formik';
26
27
  import * as Yup from 'yup';
27
28
  import { HTMLMotionProps } from 'framer-motion';
@@ -497,6 +498,34 @@ declare namespace Tooltip {
497
498
  var displayName: string;
498
499
  }
499
500
 
501
+ type RichTextBasicTextProps = {
502
+ variant?: string;
503
+ className?: string;
504
+ style?: React.CSSProperties;
505
+ };
506
+ type RichTextBasicOptions = {
507
+ isTargetBlank?: boolean;
508
+ textProps?: RichTextBasicTextProps;
509
+ listItem?: (node: Node, children: ReactNode) => ReactNode;
510
+ props?: any;
511
+ headingClass?: string;
512
+ };
513
+ type RichTextBasicProps = {
514
+ /** Contentful rich text document fields (nodeType/content/data), spread directly. */
515
+ [key: string]: any;
516
+ textProps?: RichTextBasicTextProps;
517
+ className?: string;
518
+ linkClassName?: string;
519
+ isTargetBlank?: boolean;
520
+ headingClass?: string;
521
+ options?: Omit<RichTextBasicOptions, "isTargetBlank" | "textProps" | "headingClass">;
522
+ "data-testid"?: string;
523
+ headerColor?: string;
524
+ enableMaxWidth?: boolean;
525
+ };
526
+
527
+ declare const RichTextBasic: FC<RichTextBasicProps>;
528
+
500
529
  type FiberAddressUnit = {
501
530
  addressLine2: string;
502
531
  dfAddressId?: string;
@@ -756,5 +785,5 @@ declare function useCarouselSwipe(config: CarouselSwipeConfig): CarouselSwipeRet
756
785
  */
757
786
  declare const cx: (...val: ClassValue[]) => string;
758
787
 
759
- export { Accordion, AddressAutocomplete, AlertCard, AnimationWrapper, BrandButton, Button, CallButton, Checkbox, Checklist, Collapse, DEFAULT_BUTTON_ANIMATION_TYPE, Divider, FiberForm, Image, Input, InputField, Link, List, ListItem, MaterialIcon, Modal, NextImage, PageSkeleton, RadioButton, SeeMore, Select, SelectPlanButton, Skeleton, Spinner, Text, Input as TextInput, Tooltip, VideoLink, ViewCartButton, cx, fiberFormAddressCollectionFormSchema, fiberFormInputInitialValues, fiberFormInputList, useBodyScrollLock, useCarouselSwipe };
760
- export type { AddressAutocompleteAddress, AddressAutocompleteProps, AddressAutocompleteResult, AddressAutocompleteSuggestion, AlertCardProps, Animation, AnimationType, AnimationWrapperProps, ButtonProps as BrandButtonProps, ButtonSizeT, ButtonVariantsT, CarouselSwipeConfig, CarouselSwipeReturn, CheckboxProps, CollapsibleProps, DividerProps, FiberAddress, FiberAddressAutocompleteProps, FiberAddressAutocompleteResult, FiberAddressCandidate, FiberAddressUnit, FiberFormInputList, FiberFormProps, FiberFormValues, FilterOptions, IconName, IconProps, ImageComponentProps, ImageProps, InputFieldProps, InputProps, LinkProps, ListItemProps, ListProps, ModalProps, NextImageComponentProps, RadioButtonProps, ResponsiveSize, SelectOption, SelectPlanButtonProps, SelectProps, Shape, Size, SkeletonProps, SpinnerProps, TextProps, TextVariant, ToolTipProps, VideoLinkProps, ViewCartButtonProps };
788
+ export { Accordion, AddressAutocomplete, AlertCard, AnimationWrapper, BrandButton, Button, CallButton, Checkbox, Checklist, Collapse, DEFAULT_BUTTON_ANIMATION_TYPE, Divider, FiberForm, Image, Input, InputField, Link, List, ListItem, MaterialIcon, Modal, NextImage, PageSkeleton, RadioButton, RichTextBasic, SeeMore, Select, SelectPlanButton, Skeleton, Spinner, Text, Input as TextInput, Tooltip, VideoLink, ViewCartButton, cx, fiberFormAddressCollectionFormSchema, fiberFormInputInitialValues, fiberFormInputList, useBodyScrollLock, useCarouselSwipe };
789
+ export type { AddressAutocompleteAddress, AddressAutocompleteProps, AddressAutocompleteResult, AddressAutocompleteSuggestion, AlertCardProps, Animation, AnimationType, AnimationWrapperProps, ButtonProps as BrandButtonProps, ButtonSizeT, ButtonVariantsT, CarouselSwipeConfig, CarouselSwipeReturn, CheckboxProps, CollapsibleProps, DividerProps, FiberAddress, FiberAddressAutocompleteProps, FiberAddressAutocompleteResult, FiberAddressCandidate, FiberAddressUnit, FiberFormInputList, FiberFormProps, FiberFormValues, FilterOptions, IconName, IconProps, ImageComponentProps, ImageProps, InputFieldProps, InputProps, LinkProps, ListItemProps, ListProps, ModalProps, NextImageComponentProps, RadioButtonProps, ResponsiveSize, RichTextBasicOptions, RichTextBasicProps, RichTextBasicTextProps, SelectOption, SelectPlanButtonProps, SelectProps, Shape, Size, SkeletonProps, SpinnerProps, TextProps, TextVariant, ToolTipProps, VideoLinkProps, ViewCartButtonProps };
package/dist/index.d.ts CHANGED
@@ -22,6 +22,7 @@ import { SeeMoreProps } from '@shared/components/see-more/types';
22
22
  export { SeeMoreProps } from '@shared/components/see-more/types';
23
23
  import { ButtonProps as ButtonProps$3 } from '@shared/contentful/blocks/button/types';
24
24
  import { CheckPlansProps } from '@shared/types/micro-components';
25
+ import { Node } from '@contentful/rich-text-types';
25
26
  import { FormikValues } from 'formik';
26
27
  import * as Yup from 'yup';
27
28
  import { HTMLMotionProps } from 'framer-motion';
@@ -66,11 +67,11 @@ type InputFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & {
66
67
 
67
68
  declare const InputField: ForwardRefRenderFunction<HTMLInputElement, InputFieldProps>;
68
69
  declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> & {
69
- state?: "error" | "default" | "focus" | "active" | "hover" | "filled" | undefined;
70
- size?: "medium" | "slim" | "large" | undefined;
70
+ state?: "default" | "focus" | "active" | "hover" | "filled" | "error" | undefined;
71
+ size?: "slim" | "medium" | "large" | undefined;
71
72
  label?: string | undefined;
72
73
  errorText?: string | undefined;
73
- prefixIconName?: "search" | "location_on" | undefined;
74
+ prefixIconName?: "location_on" | "search" | undefined;
74
75
  prefixIconSize?: 20 | 24 | 40 | 48 | undefined;
75
76
  prefixIconFill?: boolean | undefined;
76
77
  suffixIconFill?: boolean | undefined;
@@ -422,7 +423,7 @@ type ButtonAsAnchor = ButtonCustomProps & Omit<AnchorHTMLAttributes<HTMLAnchorEl
422
423
  };
423
424
  type ButtonProps = ButtonAsButton | ButtonAsAnchor;
424
425
 
425
- declare const BrandButton: React__default.ForwardRefExoticComponent<ButtonProps$2 & React__default.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
426
+ declare const BrandButton: React__default.ForwardRefExoticComponent<ButtonProps$2 & React__default.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
426
427
 
427
428
  declare const Checklist: React__default.FC<ChecklistProps>;
428
429
 
@@ -497,6 +498,34 @@ declare namespace Tooltip {
497
498
  var displayName: string;
498
499
  }
499
500
 
501
+ type RichTextBasicTextProps = {
502
+ variant?: string;
503
+ className?: string;
504
+ style?: React.CSSProperties;
505
+ };
506
+ type RichTextBasicOptions = {
507
+ isTargetBlank?: boolean;
508
+ textProps?: RichTextBasicTextProps;
509
+ listItem?: (node: Node, children: ReactNode) => ReactNode;
510
+ props?: any;
511
+ headingClass?: string;
512
+ };
513
+ type RichTextBasicProps = {
514
+ /** Contentful rich text document fields (nodeType/content/data), spread directly. */
515
+ [key: string]: any;
516
+ textProps?: RichTextBasicTextProps;
517
+ className?: string;
518
+ linkClassName?: string;
519
+ isTargetBlank?: boolean;
520
+ headingClass?: string;
521
+ options?: Omit<RichTextBasicOptions, "isTargetBlank" | "textProps" | "headingClass">;
522
+ "data-testid"?: string;
523
+ headerColor?: string;
524
+ enableMaxWidth?: boolean;
525
+ };
526
+
527
+ declare const RichTextBasic: FC<RichTextBasicProps>;
528
+
500
529
  type FiberAddressUnit = {
501
530
  addressLine2: string;
502
531
  dfAddressId?: string;
@@ -756,5 +785,5 @@ declare function useCarouselSwipe(config: CarouselSwipeConfig): CarouselSwipeRet
756
785
  */
757
786
  declare const cx: (...val: ClassValue[]) => string;
758
787
 
759
- export { Accordion, AddressAutocomplete, AlertCard, AnimationWrapper, BrandButton, Button, CallButton, Checkbox, Checklist, Collapse, DEFAULT_BUTTON_ANIMATION_TYPE, Divider, FiberForm, Image, Input, InputField, Link, List, ListItem, MaterialIcon, Modal, NextImage, PageSkeleton, RadioButton, SeeMore, Select, SelectPlanButton, Skeleton, Spinner, Text, Input as TextInput, Tooltip, VideoLink, ViewCartButton, cx, fiberFormAddressCollectionFormSchema, fiberFormInputInitialValues, fiberFormInputList, useBodyScrollLock, useCarouselSwipe };
760
- export type { AddressAutocompleteAddress, AddressAutocompleteProps, AddressAutocompleteResult, AddressAutocompleteSuggestion, AlertCardProps, Animation, AnimationType, AnimationWrapperProps, ButtonProps as BrandButtonProps, ButtonSizeT, ButtonVariantsT, CarouselSwipeConfig, CarouselSwipeReturn, CheckboxProps, CollapsibleProps, DividerProps, FiberAddress, FiberAddressAutocompleteProps, FiberAddressAutocompleteResult, FiberAddressCandidate, FiberAddressUnit, FiberFormInputList, FiberFormProps, FiberFormValues, FilterOptions, IconName, IconProps, ImageComponentProps, ImageProps, InputFieldProps, InputProps, LinkProps, ListItemProps, ListProps, ModalProps, NextImageComponentProps, RadioButtonProps, ResponsiveSize, SelectOption, SelectPlanButtonProps, SelectProps, Shape, Size, SkeletonProps, SpinnerProps, TextProps, TextVariant, ToolTipProps, VideoLinkProps, ViewCartButtonProps };
788
+ export { Accordion, AddressAutocomplete, AlertCard, AnimationWrapper, BrandButton, Button, CallButton, Checkbox, Checklist, Collapse, DEFAULT_BUTTON_ANIMATION_TYPE, Divider, FiberForm, Image, Input, InputField, Link, List, ListItem, MaterialIcon, Modal, NextImage, PageSkeleton, RadioButton, RichTextBasic, SeeMore, Select, SelectPlanButton, Skeleton, Spinner, Text, Input as TextInput, Tooltip, VideoLink, ViewCartButton, cx, fiberFormAddressCollectionFormSchema, fiberFormInputInitialValues, fiberFormInputList, useBodyScrollLock, useCarouselSwipe };
789
+ export type { AddressAutocompleteAddress, AddressAutocompleteProps, AddressAutocompleteResult, AddressAutocompleteSuggestion, AlertCardProps, Animation, AnimationType, AnimationWrapperProps, ButtonProps as BrandButtonProps, ButtonSizeT, ButtonVariantsT, CarouselSwipeConfig, CarouselSwipeReturn, CheckboxProps, CollapsibleProps, DividerProps, FiberAddress, FiberAddressAutocompleteProps, FiberAddressAutocompleteResult, FiberAddressCandidate, FiberAddressUnit, FiberFormInputList, FiberFormProps, FiberFormValues, FilterOptions, IconName, IconProps, ImageComponentProps, ImageProps, InputFieldProps, InputProps, LinkProps, ListItemProps, ListProps, ModalProps, NextImageComponentProps, RadioButtonProps, ResponsiveSize, RichTextBasicOptions, RichTextBasicProps, RichTextBasicTextProps, SelectOption, SelectPlanButtonProps, SelectProps, Shape, Size, SkeletonProps, SpinnerProps, TextProps, TextVariant, ToolTipProps, VideoLinkProps, ViewCartButtonProps };