@windstream/react-shared-components 0.2.45 → 0.2.47

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/core.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { InputHTMLAttributes, ReactNode, ForwardRefRenderFunction, ImgHTMLAttributes, ComponentType, ForwardRefExoticComponent, RefAttributes, AnchorHTMLAttributes, MouseEvent, CSSProperties, HTMLAttributes, LiHTMLAttributes, ButtonHTMLAttributes, LabelHTMLAttributes, FC, ReactElement } from 'react';
2
+ import React__default, { InputHTMLAttributes, ReactNode, ForwardRefRenderFunction, ImgHTMLAttributes, ComponentType, ForwardRefExoticComponent, RefAttributes, AnchorHTMLAttributes, MouseEvent, CSSProperties, HTMLAttributes, LiHTMLAttributes, ButtonHTMLAttributes, LabelHTMLAttributes, FC, KeyboardEvent, ReactElement } from 'react';
3
3
  export { ButtonHTMLAttributes, CSSProperties, ReactNode } from 'react';
4
4
  import { ButtonProps as ButtonProps$1 } from '@shared/components/button/types';
5
5
  export { ButtonProps } from '@shared/components/button/types';
@@ -20,6 +20,8 @@ import { SeeMoreProps } from '@shared/components/see-more/types';
20
20
  export { SeeMoreProps } from '@shared/components/see-more/types';
21
21
  import { ButtonProps as ButtonProps$3 } from '@shared/contentful/blocks/button/types';
22
22
  import { CheckPlansProps } from '@shared/types/micro-components';
23
+ import { FormikValues } from 'formik';
24
+ import * as Yup from 'yup';
23
25
  import { HTMLMotionProps } from 'framer-motion';
24
26
  import { ClassValue } from 'clsx';
25
27
  export { ClassValue, clsx } from 'clsx';
@@ -223,6 +225,26 @@ interface TextProps extends HTMLAttributes<HTMLElement> {
223
225
 
224
226
  declare const Text: React__default.ForwardRefExoticComponent<TextProps & React__default.RefAttributes<HTMLElement>>;
225
227
 
228
+ type VideoLinkProps = {
229
+ image?: string;
230
+ videoPopup?: boolean;
231
+ link?: string;
232
+ videoSourceType?: "youtube" | "contentful";
233
+ videoAssetUrl?: string;
234
+ videoAssetType?: string;
235
+ title?: string;
236
+ description?: string;
237
+ };
238
+ type VideoLinkComponentProps = {
239
+ videoLink?: VideoLinkProps;
240
+ imageWidth?: number;
241
+ imageHeight?: number;
242
+ useOriginalImageAspectRatio?: boolean;
243
+ isAboveTheFold?: boolean;
244
+ };
245
+
246
+ declare const VideoLink: React__default.FC<VideoLinkComponentProps>;
247
+
226
248
  declare const CallButton: {
227
249
  (props: CallButtonProps): react_jsx_runtime.JSX.Element;
228
250
  displayName: string;
@@ -430,6 +452,132 @@ declare namespace Tooltip {
430
452
  var displayName: string;
431
453
  }
432
454
 
455
+ type FiberAddressUnit = {
456
+ addressLine2: string;
457
+ dfAddressId?: string;
458
+ };
459
+ type FiberAddress = {
460
+ addressLine1?: string;
461
+ addressLine2?: string | null;
462
+ city?: string;
463
+ state?: string;
464
+ postalCode?: string;
465
+ dfAddressId?: string;
466
+ units?: FiberAddressUnit[];
467
+ [key: string]: unknown;
468
+ };
469
+ type FiberAddressAutocompleteResult = {
470
+ address: string;
471
+ unit?: string;
472
+ addressToSend: FiberAddress;
473
+ placeId?: string;
474
+ };
475
+ type FiberAddressAutocompleteProps = {
476
+ value: string;
477
+ placeholder?: string;
478
+ errorText?: string;
479
+ onChange: (address: string) => void;
480
+ onSelectAddress: (result?: FiberAddressAutocompleteResult) => void;
481
+ onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
482
+ };
483
+ type FiberAddressCandidate = FiberAddress;
484
+ type FiberFormValues = FormikValues & {
485
+ firstName: string;
486
+ lastName: string;
487
+ address: string;
488
+ phone: string;
489
+ email: string;
490
+ unit: string;
491
+ zip: string;
492
+ isManualAddress: boolean;
493
+ isMarketingCom: boolean;
494
+ addressToSend: FiberAddress;
495
+ notes: string;
496
+ referralCode: string;
497
+ hasUnits: boolean;
498
+ };
499
+ type FiberFormInputList = Partial<{
500
+ firstName: {
501
+ placeholder?: string;
502
+ };
503
+ lastName: {
504
+ placeholder?: string;
505
+ };
506
+ address: {
507
+ placeholder?: string;
508
+ };
509
+ phoneNumber: {
510
+ placeholder?: string;
511
+ };
512
+ emailAddress: {
513
+ placeholder?: string;
514
+ };
515
+ unit: {
516
+ placeholder?: string;
517
+ };
518
+ zip: {
519
+ placeholder?: string;
520
+ };
521
+ notes: {
522
+ placeholder?: string;
523
+ };
524
+ referralCode: {
525
+ placeholder?: string;
526
+ };
527
+ }>;
528
+ type FiberFormProps = {
529
+ InputComponent?: ComponentType<any>;
530
+ AddressAutocomplete: ComponentType<FiberAddressAutocompleteProps>;
531
+ initialValues?: FiberFormValues;
532
+ inputList?: FiberFormInputList;
533
+ formSchema?: Yup.AnyObjectSchema;
534
+ onSubmit: (values: FiberFormValues) => Promise<void>;
535
+ lookupAddress?: (address: string, values: FiberFormValues) => Promise<FiberAddressCandidate[]>;
536
+ buttonText?: string;
537
+ buttonClassName?: string;
538
+ bottomTextDisclaimer?: ReactNode;
539
+ hideLegalCopy?: boolean;
540
+ checkBoxEnabled?: boolean;
541
+ copyRightLinks?: Array<{
542
+ title: string;
543
+ href: string;
544
+ }>;
545
+ className?: string;
546
+ onAddressEvent?: (address: string) => void;
547
+ };
548
+
549
+ declare const fiberFormInputInitialValues: FiberFormValues;
550
+ declare const fiberFormInputList: FiberFormInputList;
551
+ declare const fiberFormAddressCollectionFormSchema: Yup.ObjectSchema<{
552
+ firstName: string;
553
+ lastName: string;
554
+ isManualAddress: boolean | undefined;
555
+ isMarketingCom: boolean | undefined;
556
+ hasUnits: boolean | undefined;
557
+ unit: string | undefined;
558
+ zip: string | undefined;
559
+ address: string;
560
+ phone: string;
561
+ email: string;
562
+ notes: string | undefined;
563
+ referralCode: string | undefined;
564
+ }, Yup.AnyObject, {
565
+ firstName: undefined;
566
+ lastName: undefined;
567
+ isManualAddress: undefined;
568
+ isMarketingCom: undefined;
569
+ hasUnits: undefined;
570
+ unit: undefined;
571
+ zip: undefined;
572
+ address: undefined;
573
+ phone: undefined;
574
+ email: undefined;
575
+ notes: undefined;
576
+ referralCode: undefined;
577
+ }, "">;
578
+
579
+ declare const FiberForm: React__default.FC<FiberFormProps>;
580
+
433
581
  type AnimationType = "scale" | "shadow" | "lift" | "opacity" | "grow" | "pop";
434
582
  /**
435
583
  * Single source of truth for the default button animation type.
@@ -563,5 +711,5 @@ declare function useCarouselSwipe(config: CarouselSwipeConfig): CarouselSwipeRet
563
711
  */
564
712
  declare const cx: (...val: ClassValue[]) => string;
565
713
 
566
- export { Accordion, AlertCard, AnimationWrapper, BrandButton, Button, CallButton, Checkbox, Checklist, Collapse, DEFAULT_BUTTON_ANIMATION_TYPE, Divider, Image, Input, InputField, Link, List, ListItem, MaterialIcon, Modal, NextImage, PageSkeleton, RadioButton, SeeMore, Select, SelectPlanButton, Skeleton, Spinner, Text, Input as TextInput, Tooltip, ViewCartButton, cx, useBodyScrollLock, useCarouselSwipe };
567
- export type { AlertCardProps, Animation, AnimationType, AnimationWrapperProps, ButtonProps as BrandButtonProps, ButtonSizeT, ButtonVariantsT, CarouselSwipeConfig, CarouselSwipeReturn, CheckboxProps, CollapsibleProps, DividerProps, FilterOptions, IconName, IconProps, ImageComponentProps, ImageProps, InputFieldProps, InputProps, LinkProps, ListItemProps, ListProps, ModalProps, NextImageComponentProps, RadioButtonProps, ResponsiveSize, SelectOption, SelectPlanButtonProps, SelectProps, Shape, Size, SkeletonProps, SpinnerProps, TextProps, TextVariant, ToolTipProps, ViewCartButtonProps };
714
+ export { Accordion, 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 };
715
+ export type { 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 };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { InputHTMLAttributes, ReactNode, ForwardRefRenderFunction, ImgHTMLAttributes, ComponentType, ForwardRefExoticComponent, RefAttributes, AnchorHTMLAttributes, MouseEvent, CSSProperties, HTMLAttributes, LiHTMLAttributes, ButtonHTMLAttributes, LabelHTMLAttributes, FC, ReactElement } from 'react';
2
+ import React__default, { InputHTMLAttributes, ReactNode, ForwardRefRenderFunction, ImgHTMLAttributes, ComponentType, ForwardRefExoticComponent, RefAttributes, AnchorHTMLAttributes, MouseEvent, CSSProperties, HTMLAttributes, LiHTMLAttributes, ButtonHTMLAttributes, LabelHTMLAttributes, FC, KeyboardEvent, ReactElement } from 'react';
3
3
  export { ButtonHTMLAttributes, CSSProperties, ReactNode } from 'react';
4
4
  import { ButtonProps as ButtonProps$1 } from '@shared/components/button/types';
5
5
  export { ButtonProps } from '@shared/components/button/types';
@@ -20,6 +20,8 @@ import { SeeMoreProps } from '@shared/components/see-more/types';
20
20
  export { SeeMoreProps } from '@shared/components/see-more/types';
21
21
  import { ButtonProps as ButtonProps$3 } from '@shared/contentful/blocks/button/types';
22
22
  import { CheckPlansProps } from '@shared/types/micro-components';
23
+ import { FormikValues } from 'formik';
24
+ import * as Yup from 'yup';
23
25
  import { HTMLMotionProps } from 'framer-motion';
24
26
  import { ClassValue } from 'clsx';
25
27
  export { ClassValue, clsx } from 'clsx';
@@ -66,7 +68,7 @@ declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAtt
66
68
  size?: "slim" | "medium" | "large" | undefined;
67
69
  label?: string | undefined;
68
70
  errorText?: string | undefined;
69
- prefixIconName?: "search" | "location_on" | undefined;
71
+ prefixIconName?: "location_on" | "search" | undefined;
70
72
  prefixIconSize?: 20 | 24 | 40 | 48 | undefined;
71
73
  prefixIconFill?: boolean | undefined;
72
74
  suffixIconFill?: boolean | undefined;
@@ -223,6 +225,26 @@ interface TextProps extends HTMLAttributes<HTMLElement> {
223
225
 
224
226
  declare const Text: React__default.ForwardRefExoticComponent<TextProps & React__default.RefAttributes<HTMLElement>>;
225
227
 
228
+ type VideoLinkProps = {
229
+ image?: string;
230
+ videoPopup?: boolean;
231
+ link?: string;
232
+ videoSourceType?: "youtube" | "contentful";
233
+ videoAssetUrl?: string;
234
+ videoAssetType?: string;
235
+ title?: string;
236
+ description?: string;
237
+ };
238
+ type VideoLinkComponentProps = {
239
+ videoLink?: VideoLinkProps;
240
+ imageWidth?: number;
241
+ imageHeight?: number;
242
+ useOriginalImageAspectRatio?: boolean;
243
+ isAboveTheFold?: boolean;
244
+ };
245
+
246
+ declare const VideoLink: React__default.FC<VideoLinkComponentProps>;
247
+
226
248
  declare const CallButton: {
227
249
  (props: CallButtonProps): react_jsx_runtime.JSX.Element;
228
250
  displayName: string;
@@ -430,6 +452,132 @@ declare namespace Tooltip {
430
452
  var displayName: string;
431
453
  }
432
454
 
455
+ type FiberAddressUnit = {
456
+ addressLine2: string;
457
+ dfAddressId?: string;
458
+ };
459
+ type FiberAddress = {
460
+ addressLine1?: string;
461
+ addressLine2?: string | null;
462
+ city?: string;
463
+ state?: string;
464
+ postalCode?: string;
465
+ dfAddressId?: string;
466
+ units?: FiberAddressUnit[];
467
+ [key: string]: unknown;
468
+ };
469
+ type FiberAddressAutocompleteResult = {
470
+ address: string;
471
+ unit?: string;
472
+ addressToSend: FiberAddress;
473
+ placeId?: string;
474
+ };
475
+ type FiberAddressAutocompleteProps = {
476
+ value: string;
477
+ placeholder?: string;
478
+ errorText?: string;
479
+ onChange: (address: string) => void;
480
+ onSelectAddress: (result?: FiberAddressAutocompleteResult) => void;
481
+ onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
482
+ };
483
+ type FiberAddressCandidate = FiberAddress;
484
+ type FiberFormValues = FormikValues & {
485
+ firstName: string;
486
+ lastName: string;
487
+ address: string;
488
+ phone: string;
489
+ email: string;
490
+ unit: string;
491
+ zip: string;
492
+ isManualAddress: boolean;
493
+ isMarketingCom: boolean;
494
+ addressToSend: FiberAddress;
495
+ notes: string;
496
+ referralCode: string;
497
+ hasUnits: boolean;
498
+ };
499
+ type FiberFormInputList = Partial<{
500
+ firstName: {
501
+ placeholder?: string;
502
+ };
503
+ lastName: {
504
+ placeholder?: string;
505
+ };
506
+ address: {
507
+ placeholder?: string;
508
+ };
509
+ phoneNumber: {
510
+ placeholder?: string;
511
+ };
512
+ emailAddress: {
513
+ placeholder?: string;
514
+ };
515
+ unit: {
516
+ placeholder?: string;
517
+ };
518
+ zip: {
519
+ placeholder?: string;
520
+ };
521
+ notes: {
522
+ placeholder?: string;
523
+ };
524
+ referralCode: {
525
+ placeholder?: string;
526
+ };
527
+ }>;
528
+ type FiberFormProps = {
529
+ InputComponent?: ComponentType<any>;
530
+ AddressAutocomplete: ComponentType<FiberAddressAutocompleteProps>;
531
+ initialValues?: FiberFormValues;
532
+ inputList?: FiberFormInputList;
533
+ formSchema?: Yup.AnyObjectSchema;
534
+ onSubmit: (values: FiberFormValues) => Promise<void>;
535
+ lookupAddress?: (address: string, values: FiberFormValues) => Promise<FiberAddressCandidate[]>;
536
+ buttonText?: string;
537
+ buttonClassName?: string;
538
+ bottomTextDisclaimer?: ReactNode;
539
+ hideLegalCopy?: boolean;
540
+ checkBoxEnabled?: boolean;
541
+ copyRightLinks?: Array<{
542
+ title: string;
543
+ href: string;
544
+ }>;
545
+ className?: string;
546
+ onAddressEvent?: (address: string) => void;
547
+ };
548
+
549
+ declare const fiberFormInputInitialValues: FiberFormValues;
550
+ declare const fiberFormInputList: FiberFormInputList;
551
+ declare const fiberFormAddressCollectionFormSchema: Yup.ObjectSchema<{
552
+ firstName: string;
553
+ lastName: string;
554
+ isManualAddress: boolean | undefined;
555
+ isMarketingCom: boolean | undefined;
556
+ hasUnits: boolean | undefined;
557
+ unit: string | undefined;
558
+ zip: string | undefined;
559
+ address: string;
560
+ phone: string;
561
+ email: string;
562
+ notes: string | undefined;
563
+ referralCode: string | undefined;
564
+ }, Yup.AnyObject, {
565
+ firstName: undefined;
566
+ lastName: undefined;
567
+ isManualAddress: undefined;
568
+ isMarketingCom: undefined;
569
+ hasUnits: undefined;
570
+ unit: undefined;
571
+ zip: undefined;
572
+ address: undefined;
573
+ phone: undefined;
574
+ email: undefined;
575
+ notes: undefined;
576
+ referralCode: undefined;
577
+ }, "">;
578
+
579
+ declare const FiberForm: React__default.FC<FiberFormProps>;
580
+
433
581
  type AnimationType = "scale" | "shadow" | "lift" | "opacity" | "grow" | "pop";
434
582
  /**
435
583
  * Single source of truth for the default button animation type.
@@ -563,5 +711,5 @@ declare function useCarouselSwipe(config: CarouselSwipeConfig): CarouselSwipeRet
563
711
  */
564
712
  declare const cx: (...val: ClassValue[]) => string;
565
713
 
566
- export { Accordion, AlertCard, AnimationWrapper, BrandButton, Button, CallButton, Checkbox, Checklist, Collapse, DEFAULT_BUTTON_ANIMATION_TYPE, Divider, Image, Input, InputField, Link, List, ListItem, MaterialIcon, Modal, NextImage, PageSkeleton, RadioButton, SeeMore, Select, SelectPlanButton, Skeleton, Spinner, Text, Input as TextInput, Tooltip, ViewCartButton, cx, useBodyScrollLock, useCarouselSwipe };
567
- export type { AlertCardProps, Animation, AnimationType, AnimationWrapperProps, ButtonProps as BrandButtonProps, ButtonSizeT, ButtonVariantsT, CarouselSwipeConfig, CarouselSwipeReturn, CheckboxProps, CollapsibleProps, DividerProps, FilterOptions, IconName, IconProps, ImageComponentProps, ImageProps, InputFieldProps, InputProps, LinkProps, ListItemProps, ListProps, ModalProps, NextImageComponentProps, RadioButtonProps, ResponsiveSize, SelectOption, SelectPlanButtonProps, SelectProps, Shape, Size, SkeletonProps, SpinnerProps, TextProps, TextVariant, ToolTipProps, ViewCartButtonProps };
714
+ export { Accordion, 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 };
715
+ export type { 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 };