@windstream/react-shared-components 0.2.48 → 0.2.49
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.esm.js +1 -1
- package/dist/contentful/index.esm.js.map +1 -1
- package/dist/contentful/index.js +1 -1
- package/dist/contentful/index.js.map +1 -1
- package/dist/core.d.ts +48 -6
- package/dist/index.d.ts +48 -6
- package/dist/index.esm.js +6 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/brand-button/index.tsx +2 -2
- package/src/components/precisely-address-autocomplete/PreciselyAddressAutocomplete.stories.tsx +69 -0
- package/src/components/precisely-address-autocomplete/index.test.tsx +159 -0
- package/src/components/precisely-address-autocomplete/index.tsx +219 -0
- package/src/components/precisely-address-autocomplete/types.ts +54 -0
- package/src/contentful/blocks/cards/floating-image-card/index.tsx +4 -3
- package/src/contentful/blocks/cards/simple-card/index.tsx +2 -1
- package/src/index.ts +8 -0
package/dist/core.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ import React__default, { InputHTMLAttributes, ReactNode, ForwardRefRenderFunctio
|
|
|
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';
|
|
6
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
|
+
import { InputFieldProps as InputFieldProps$1 } from '@shared/components/input';
|
|
6
8
|
import { ImageProps as ImageProps$1 } from '@shared/components/image/types';
|
|
7
9
|
import { ImageProps as ImageProps$2 } from 'next/image';
|
|
8
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
10
|
import { CallButtonProps } from '@shared/components/call-button/types';
|
|
10
11
|
export { CallButtonProps } from '@shared/components/call-button/types';
|
|
11
12
|
import { Props } from 'react-modal';
|
|
@@ -64,11 +65,11 @@ type InputFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
|
64
65
|
|
|
65
66
|
declare const InputField: ForwardRefRenderFunction<HTMLInputElement, InputFieldProps>;
|
|
66
67
|
declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
67
|
-
state?: "default" | "
|
|
68
|
-
size?: "
|
|
68
|
+
state?: "default" | "error" | "focus" | "active" | "hover" | "filled" | undefined;
|
|
69
|
+
size?: "medium" | "slim" | "large" | undefined;
|
|
69
70
|
label?: string | undefined;
|
|
70
71
|
errorText?: string | undefined;
|
|
71
|
-
prefixIconName?: "
|
|
72
|
+
prefixIconName?: "search" | "location_on" | undefined;
|
|
72
73
|
prefixIconSize?: 20 | 24 | 40 | 48 | undefined;
|
|
73
74
|
prefixIconFill?: boolean | undefined;
|
|
74
75
|
suffixIconFill?: boolean | undefined;
|
|
@@ -80,6 +81,47 @@ declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAtt
|
|
|
80
81
|
hasError?: boolean | undefined;
|
|
81
82
|
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
82
83
|
|
|
84
|
+
type AddressAutocompleteAddress = {
|
|
85
|
+
addressLine1?: string;
|
|
86
|
+
addressLine2?: string | null;
|
|
87
|
+
city?: string;
|
|
88
|
+
state?: string;
|
|
89
|
+
postalCode?: string;
|
|
90
|
+
};
|
|
91
|
+
type AddressAutocompleteSuggestion<TAddress extends AddressAutocompleteAddress = AddressAutocompleteAddress> = {
|
|
92
|
+
address?: TAddress;
|
|
93
|
+
mainText: string;
|
|
94
|
+
placeId?: string;
|
|
95
|
+
postalCode?: string;
|
|
96
|
+
provider?: string;
|
|
97
|
+
};
|
|
98
|
+
type AddressAutocompleteResult<TAddress extends AddressAutocompleteAddress = AddressAutocompleteAddress> = {
|
|
99
|
+
address: string;
|
|
100
|
+
unit: string;
|
|
101
|
+
addressToSend: TAddress;
|
|
102
|
+
placeId: string;
|
|
103
|
+
};
|
|
104
|
+
type AddressAutocompleteProps<TAddress extends AddressAutocompleteAddress = AddressAutocompleteAddress> = Omit<InputFieldProps$1, "defaultValue" | "loading" | "onChange" | "size" | "value"> & {
|
|
105
|
+
value?: string;
|
|
106
|
+
defaultValue?: string;
|
|
107
|
+
suggestions?: AddressAutocompleteSuggestion<TAddress>[];
|
|
108
|
+
isLoading?: boolean;
|
|
109
|
+
isReady?: boolean;
|
|
110
|
+
focusOnLoad?: boolean;
|
|
111
|
+
minQueryLength?: number;
|
|
112
|
+
mapPinIcon?: boolean;
|
|
113
|
+
fixedPositionedSuggestions?: boolean;
|
|
114
|
+
isIframe?: boolean;
|
|
115
|
+
inputContainerClassName?: string;
|
|
116
|
+
optionsContainerClassName?: string;
|
|
117
|
+
onChange?: (value: string) => void;
|
|
118
|
+
onSelectAddress?: (result?: AddressAutocompleteResult<TAddress>) => void;
|
|
119
|
+
onSuggestionsChange?: (suggestions: AddressAutocompleteSuggestion<TAddress>[]) => void;
|
|
120
|
+
onLoadProvider?: () => void;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
declare const AddressAutocomplete: <TAddress extends AddressAutocompleteAddress = AddressAutocompleteAddress>({ className, containerClassName, defaultValue, errorText, fixedPositionedSuggestions, focusOnLoad, hasError, inputContainerClassName, isIframe, isLoading, isReady, mapPinIcon, minQueryLength, onChange, onFocus, onLoadProvider, onSelectAddress, onSuggestionsChange, optionsContainerClassName, prefixIconClassName, suggestions, value: controlledValue, ...inputProps }: AddressAutocompleteProps<TAddress>) => react_jsx_runtime.JSX.Element;
|
|
124
|
+
|
|
83
125
|
/**
|
|
84
126
|
* Props passed to the custom image component when using the `as` prop.
|
|
85
127
|
* Covers native img attributes plus optional Next.js Image props (fill, sizes, priority, etc.).
|
|
@@ -711,5 +753,5 @@ declare function useCarouselSwipe(config: CarouselSwipeConfig): CarouselSwipeRet
|
|
|
711
753
|
*/
|
|
712
754
|
declare const cx: (...val: ClassValue[]) => string;
|
|
713
755
|
|
|
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 };
|
|
756
|
+
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 };
|
|
757
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ import React__default, { InputHTMLAttributes, ReactNode, ForwardRefRenderFunctio
|
|
|
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';
|
|
6
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
|
+
import { InputFieldProps as InputFieldProps$1 } from '@shared/components/input';
|
|
6
8
|
import { ImageProps as ImageProps$1 } from '@shared/components/image/types';
|
|
7
9
|
import { ImageProps as ImageProps$2 } from 'next/image';
|
|
8
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
10
|
import { CallButtonProps } from '@shared/components/call-button/types';
|
|
10
11
|
export { CallButtonProps } from '@shared/components/call-button/types';
|
|
11
12
|
import { Props } from 'react-modal';
|
|
@@ -64,11 +65,11 @@ type InputFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
|
64
65
|
|
|
65
66
|
declare const InputField: ForwardRefRenderFunction<HTMLInputElement, InputFieldProps>;
|
|
66
67
|
declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
67
|
-
state?: "default" | "focus" | "active" | "hover" | "filled" |
|
|
68
|
-
size?: "
|
|
68
|
+
state?: "error" | "default" | "focus" | "active" | "hover" | "filled" | undefined;
|
|
69
|
+
size?: "medium" | "slim" | "large" | undefined;
|
|
69
70
|
label?: string | undefined;
|
|
70
71
|
errorText?: string | undefined;
|
|
71
|
-
prefixIconName?: "
|
|
72
|
+
prefixIconName?: "search" | "location_on" | undefined;
|
|
72
73
|
prefixIconSize?: 20 | 24 | 40 | 48 | undefined;
|
|
73
74
|
prefixIconFill?: boolean | undefined;
|
|
74
75
|
suffixIconFill?: boolean | undefined;
|
|
@@ -80,6 +81,47 @@ declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAtt
|
|
|
80
81
|
hasError?: boolean | undefined;
|
|
81
82
|
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
82
83
|
|
|
84
|
+
type AddressAutocompleteAddress = {
|
|
85
|
+
addressLine1?: string;
|
|
86
|
+
addressLine2?: string | null;
|
|
87
|
+
city?: string;
|
|
88
|
+
state?: string;
|
|
89
|
+
postalCode?: string;
|
|
90
|
+
};
|
|
91
|
+
type AddressAutocompleteSuggestion<TAddress extends AddressAutocompleteAddress = AddressAutocompleteAddress> = {
|
|
92
|
+
address?: TAddress;
|
|
93
|
+
mainText: string;
|
|
94
|
+
placeId?: string;
|
|
95
|
+
postalCode?: string;
|
|
96
|
+
provider?: string;
|
|
97
|
+
};
|
|
98
|
+
type AddressAutocompleteResult<TAddress extends AddressAutocompleteAddress = AddressAutocompleteAddress> = {
|
|
99
|
+
address: string;
|
|
100
|
+
unit: string;
|
|
101
|
+
addressToSend: TAddress;
|
|
102
|
+
placeId: string;
|
|
103
|
+
};
|
|
104
|
+
type AddressAutocompleteProps<TAddress extends AddressAutocompleteAddress = AddressAutocompleteAddress> = Omit<InputFieldProps$1, "defaultValue" | "loading" | "onChange" | "size" | "value"> & {
|
|
105
|
+
value?: string;
|
|
106
|
+
defaultValue?: string;
|
|
107
|
+
suggestions?: AddressAutocompleteSuggestion<TAddress>[];
|
|
108
|
+
isLoading?: boolean;
|
|
109
|
+
isReady?: boolean;
|
|
110
|
+
focusOnLoad?: boolean;
|
|
111
|
+
minQueryLength?: number;
|
|
112
|
+
mapPinIcon?: boolean;
|
|
113
|
+
fixedPositionedSuggestions?: boolean;
|
|
114
|
+
isIframe?: boolean;
|
|
115
|
+
inputContainerClassName?: string;
|
|
116
|
+
optionsContainerClassName?: string;
|
|
117
|
+
onChange?: (value: string) => void;
|
|
118
|
+
onSelectAddress?: (result?: AddressAutocompleteResult<TAddress>) => void;
|
|
119
|
+
onSuggestionsChange?: (suggestions: AddressAutocompleteSuggestion<TAddress>[]) => void;
|
|
120
|
+
onLoadProvider?: () => void;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
declare const AddressAutocomplete: <TAddress extends AddressAutocompleteAddress = AddressAutocompleteAddress>({ className, containerClassName, defaultValue, errorText, fixedPositionedSuggestions, focusOnLoad, hasError, inputContainerClassName, isIframe, isLoading, isReady, mapPinIcon, minQueryLength, onChange, onFocus, onLoadProvider, onSelectAddress, onSuggestionsChange, optionsContainerClassName, prefixIconClassName, suggestions, value: controlledValue, ...inputProps }: AddressAutocompleteProps<TAddress>) => react_jsx_runtime.JSX.Element;
|
|
124
|
+
|
|
83
125
|
/**
|
|
84
126
|
* Props passed to the custom image component when using the `as` prop.
|
|
85
127
|
* Covers native img attributes plus optional Next.js Image props (fill, sizes, priority, etc.).
|
|
@@ -711,5 +753,5 @@ declare function useCarouselSwipe(config: CarouselSwipeConfig): CarouselSwipeRet
|
|
|
711
753
|
*/
|
|
712
754
|
declare const cx: (...val: ClassValue[]) => string;
|
|
713
755
|
|
|
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 };
|
|
756
|
+
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 };
|
|
757
|
+
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 };
|