@jobber/components 6.52.0 → 6.53.0

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.
@@ -1,5 +1,11 @@
1
1
  import React, { ReactElement } from "react";
2
2
  import { FormFieldProps } from "../FormField";
3
+ interface MaskElementProps {
4
+ readonly isMasking: boolean;
5
+ readonly formattedValue: string;
6
+ readonly placeholderMask: string;
7
+ }
8
+ export declare function MaskElement({ isMasking, formattedValue, placeholderMask, }: MaskElementProps): JSX.Element | null;
3
9
  export interface InputMaskProps {
4
10
  /**
5
11
  * A string pattern to mask the value. For example:
@@ -36,3 +42,4 @@ export interface InputMaskProps {
36
42
  readonly children: ReactElement<FormFieldProps>;
37
43
  }
38
44
  export declare function InputMask({ children, delimiter, pattern, strict, }: InputMaskProps): React.ReactElement<FormFieldProps, string | React.JSXElementConstructor<any>>;
45
+ export {};
@@ -1,19 +1,2 @@
1
- import { InputMaskProps } from "./InputMask";
2
- import { CommonFormFieldProps, FormFieldProps } from "../FormField";
3
- interface InputPhoneNumberProps extends Omit<CommonFormFieldProps, "align">, Pick<FormFieldProps, "autocomplete" | "onEnter" | "onFocus" | "onBlur" | "validations" | "readonly" | "prefix" | "suffix"> {
4
- readonly value: string;
5
- readonly onChange: (value: string) => void;
6
- /**
7
- * A pattern to specify the format to display the phone number in.
8
- * For example if you want to display the format for [Denmark](https://en.wikipedia.org/wiki/National_conventions_for_writing_telephone_numbers#Denmark)
9
- * you could set it to `** ** ** **`
10
- * @default "(***) ***-****"
11
- */
12
- readonly pattern?: InputMaskProps["pattern"];
13
- /**
14
- * Shows a "required" validation message when the component is left empty.
15
- */
16
- readonly required?: boolean;
17
- }
18
- export declare function InputPhoneNumber({ required, ...props }: InputPhoneNumberProps): JSX.Element;
19
- export {};
1
+ import { InputPhoneNumberLegacyProps } from "./InputPhoneNumber.types";
2
+ export declare function InputPhoneNumber({ required, ...props }: InputPhoneNumberLegacyProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { InputPhoneNumberRebuiltProps } from "./InputPhoneNumber.types";
3
+ export declare const InputPhoneNumberRebuilt: React.ForwardRefExoticComponent<InputPhoneNumberRebuiltProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,56 @@
1
+ import { Clearable } from "@jobber/hooks/useShowClear";
2
+ import { InputMaskProps } from "./InputMask";
3
+ import { CommonFormFieldProps, FormFieldProps } from "../FormField";
4
+ export interface InputPhoneNumberLegacyProps extends Omit<CommonFormFieldProps, "align">, Pick<FormFieldProps, "autocomplete" | "onEnter" | "onFocus" | "onBlur" | "validations" | "readonly" | "prefix" | "suffix"> {
5
+ readonly value: string;
6
+ readonly onChange: (value: string) => void;
7
+ /**
8
+ * A pattern to specify the format to display the phone number in.
9
+ * For example if you want to display the format for [Denmark](https://en.wikipedia.org/wiki/National_conventions_for_writing_telephone_numbers#Denmark)
10
+ * you could set it to `** ** ** **`
11
+ * @default "(***) ***-****"
12
+ */
13
+ readonly pattern?: InputMaskProps["pattern"];
14
+ /**
15
+ * Shows a "required" validation message when the component is left empty.
16
+ */
17
+ readonly required?: boolean;
18
+ }
19
+ export interface InputPhoneNumberRebuiltProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "onBlur" | "size" | "suffix" | "prefix" | "value" | "max" | "min" | "defaultValue" | "readOnly" | "type" | "maxLength" | "minLength"> {
20
+ readonly error?: string;
21
+ readonly invalid?: boolean;
22
+ readonly identifier?: string;
23
+ readonly autocomplete?: boolean | string;
24
+ readonly loading?: boolean;
25
+ readonly onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
26
+ readonly children?: React.ReactNode;
27
+ readonly clearable?: Clearable;
28
+ readonly value: string;
29
+ readonly onChange: (value: string, event?: React.ChangeEvent<HTMLInputElement>) => void;
30
+ readonly onBlur?: (event?: React.FocusEvent<HTMLInputElement>) => void;
31
+ readonly onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
32
+ readonly onFocus?: (event?: React.FocusEvent<HTMLInputElement>) => void;
33
+ /**
34
+ * A pattern to specify the format to display the phone number in.
35
+ * For example if you want to display the format for [Denmark](https://en.wikipedia.org/wiki/National_conventions_for_writing_telephone_numbers#Denmark)
36
+ * you could set it to `** ** ** **`
37
+ * @default "(***) ***-****"
38
+ */
39
+ readonly pattern?: InputMaskProps["pattern"];
40
+ /**
41
+ * Shows a "required" validation message when the component is left empty.
42
+ */
43
+ readonly required?: boolean;
44
+ /**
45
+ * Version 2 is highly experimental, avoid using it unless you have talked with Atlantis first.
46
+ */
47
+ readonly version: 2;
48
+ readonly size?: FormFieldProps["size"];
49
+ readonly inline?: FormFieldProps["inline"];
50
+ readonly align?: FormFieldProps["align"];
51
+ readonly prefix?: FormFieldProps["prefix"];
52
+ readonly suffix?: FormFieldProps["suffix"];
53
+ readonly description?: FormFieldProps["description"];
54
+ readonly readonly?: boolean;
55
+ }
56
+ export declare const DEFAULT_PATTERN = "(***) ***-****";
@@ -0,0 +1,16 @@
1
+ import { ChangeEvent, FocusEvent, KeyboardEvent } from "react";
2
+ import { InputPhoneNumberRebuiltProps } from "../InputPhoneNumber.types";
3
+ export interface useInputPhoneActionsProps extends Pick<InputPhoneNumberRebuiltProps, "onChange" | "onEnter" | "onFocus" | "onBlur" | "onKeyDown"> {
4
+ inputRef?: React.RefObject<HTMLInputElement>;
5
+ }
6
+ /**
7
+ * Combines the actions on the InputPhoneNumber such as onChange, onEnter, onFocus, onBlur, and onClear to forward information to the consumers of the InputPhoneNumber.
8
+ * Do not repeat this pattern. We are doing this as a proof of concept relating to the refactoring of Form inputs to see what can be removed.
9
+ */
10
+ export declare function useInputPhoneActions({ onChange, inputRef, onFocus, onBlur, onKeyDown, onEnter, }: useInputPhoneActionsProps): {
11
+ handleClear: () => void;
12
+ handleChange: (event: ChangeEvent<HTMLInputElement>) => void;
13
+ handleFocus: (event: FocusEvent<HTMLInputElement>) => void;
14
+ handleBlur: (event?: FocusEvent<HTMLInputElement>) => void;
15
+ handleKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
16
+ };
@@ -0,0 +1,71 @@
1
+ import { ChangeEvent, FocusEvent, KeyboardEvent } from "react";
2
+ export interface useInputPhoneFormFieldProps {
3
+ /**
4
+ * The html id for the field
5
+ */
6
+ readonly id: string;
7
+ /**
8
+ * The auto-generated name for the html input field if a nameProp is not provided
9
+ */
10
+ readonly name: string;
11
+ /**
12
+ * The error message for the field
13
+ */
14
+ readonly error?: string;
15
+ /**
16
+ * Adjusts the form field to go inline with a content. This also silences the
17
+ * given `validations` prop. You'd have to used the `onValidate` prop to
18
+ * capture the message and render it somewhere else using the
19
+ * `InputValidation` component.
20
+ */
21
+ readonly inline?: boolean;
22
+ /**
23
+ * Further description of the input, can be used for a hint.
24
+ */
25
+ readonly description?: string;
26
+ /**
27
+ * Callback for when the field value changes
28
+ */
29
+ handleChange: (event: ChangeEvent<HTMLInputElement>) => void;
30
+ /**
31
+ * Callback for when the field loses focus
32
+ */
33
+ handleBlur: () => void;
34
+ /**
35
+ * Callback for when the field gains focus
36
+ */
37
+ handleFocus: (event: FocusEvent<HTMLInputElement>) => void;
38
+ /**
39
+ * Callback for when keydown event is triggered on the field
40
+ */
41
+ handleKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
42
+ readonly invalid?: boolean;
43
+ readonly disabled?: boolean;
44
+ readonly autofocus?: boolean;
45
+ readonly value?: string;
46
+ readonly readonly?: boolean;
47
+ }
48
+ export interface UseInputPhoneFormFieldReturn {
49
+ fieldProps: React.InputHTMLAttributes<HTMLInputElement>;
50
+ }
51
+ /**
52
+ * Provides the props for the html fields rendered by the html input.
53
+ * DO not repeat this pattern. We are doing this as a proof of concept relating to the refactoring of Form inputs to see what can be removed.
54
+ */
55
+ export declare function useInputPhoneFormField({ id, name, description, inline, handleChange, handleBlur, handleFocus, handleKeyDown, error, disabled, autofocus, value, readonly, ...rest }: useInputPhoneFormFieldProps): {
56
+ fieldProps: {
57
+ readOnly: boolean | undefined;
58
+ "aria-describedby"?: string | undefined;
59
+ id: string;
60
+ name: string;
61
+ disabled: boolean | undefined;
62
+ autoFocus: boolean | undefined;
63
+ onChange: (event: ChangeEvent<HTMLInputElement>) => void;
64
+ onBlur: () => void;
65
+ onFocus: (event: FocusEvent<HTMLInputElement>) => void;
66
+ onKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
67
+ value: string | undefined;
68
+ invalid: string | undefined;
69
+ };
70
+ descriptionIdentifier: string;
71
+ };
@@ -1,22 +1,258 @@
1
1
  'use strict';
2
2
 
3
- var InputPhoneNumber = require('../InputPhoneNumber-cjs.js');
4
- require('../tslib.es6-cjs.js');
5
- require('react');
6
- require('react-hook-form');
7
- require('../FormField-cjs.js');
8
- require('framer-motion');
9
- require('@jobber/design');
10
- require('classnames');
3
+ var React = require('react');
4
+ var tslib_es6 = require('../tslib.es6-cjs.js');
5
+ var classnames = require('classnames');
6
+ var FormField = require('../FormField-cjs.js');
7
+ var reactHookForm = require('react-hook-form');
11
8
  require('../Button-cjs.js');
12
- require('react-router-dom');
9
+ require('@jobber/design');
10
+ require('framer-motion');
13
11
  require('../Icon-cjs.js');
14
- require('../Typography-cjs.js');
15
12
  require('../Text-cjs.js');
13
+ require('../Typography-cjs.js');
16
14
  require('../useFormFieldFocus-cjs.js');
17
15
  require('../InputValidation-cjs.js');
18
16
  require('../Spinner-cjs.js');
17
+ require('react-router-dom');
18
+
19
+ var styles = {"mask":"_78-Lxj78xPg-","hiddenValue":"GoiXVXaU1Qs-","emptyValue":"oOrjwubmsVA-","spinning":"T3VvmDmzs-4-"};
20
+
21
+ function useInputMask({ value = "", pattern, delimiter = "*", strict = true, onChange, }) {
22
+ const [isMasking, setIsMasking] = React.useState(!value);
23
+ const patternInfo = React.useMemo(() => {
24
+ const patternChars = pattern.split("");
25
+ const specialChars = patternChars.filter(char => char !== delimiter);
26
+ const maxCleanChars = patternChars.filter(char => char === delimiter).length;
27
+ return {
28
+ patternChars,
29
+ specialChars,
30
+ maxCleanChars,
31
+ };
32
+ }, [pattern, delimiter]);
33
+ const inputValue = React.useMemo(() => {
34
+ return value
35
+ .split("")
36
+ .filter(char => !patternInfo.specialChars.includes(char))
37
+ .join("");
38
+ }, [value, patternInfo.specialChars]);
39
+ const formatValue = React.useCallback((unformattedValue) => {
40
+ const { patternChars, specialChars, maxCleanChars } = patternInfo;
41
+ const cleanValueChars = unformattedValue
42
+ .split("")
43
+ .filter(char => !specialChars.includes(char) && !Number.isNaN(Number(char)));
44
+ const isOverCharLimit = cleanValueChars.length > maxCleanChars;
45
+ if (!strict && isOverCharLimit) {
46
+ return cleanValueChars.join("");
47
+ }
48
+ else {
49
+ const formattedValue = patternChars.reduce(getMaskedValue([...cleanValueChars], specialChars), "");
50
+ return formattedValue;
51
+ }
52
+ }, [patternInfo, strict]);
53
+ const maskedOnChange = React.useCallback((newValue, event) => {
54
+ const formatted = formatValue(newValue);
55
+ onChange === null || onChange === void 0 ? void 0 : onChange(formatted, event);
56
+ }, [formatValue, onChange]);
57
+ const formattedValue = React.useMemo(() => formatValue(value), [formatValue, value]);
58
+ React.useEffect(() => {
59
+ const shouldMask = strict || inputValue.length < patternInfo.maxCleanChars;
60
+ setIsMasking(shouldMask);
61
+ }, [inputValue, patternInfo.maxCleanChars, strict]);
62
+ const placeholderMask = React.useMemo(() => pattern
63
+ .replace(new RegExp(`\\${delimiter}`, "g"), "_")
64
+ .slice(value.length), [pattern, delimiter, value]);
65
+ return {
66
+ formattedValue,
67
+ placeholderMask,
68
+ isMasking,
69
+ maskedOnChange,
70
+ inputValue,
71
+ };
72
+ }
73
+ function getMaskedValue(cleanVal, specialChars) {
74
+ return (result, nextCharacter) => {
75
+ if (!cleanVal.length)
76
+ return result;
77
+ if (specialChars.includes(nextCharacter))
78
+ return result + nextCharacter;
79
+ const nextValue = cleanVal.shift();
80
+ return result + (nextValue !== undefined ? nextValue : "");
81
+ };
82
+ }
83
+
84
+ function MaskElement({ isMasking, formattedValue, placeholderMask, }) {
85
+ if (!isMasking) {
86
+ return null;
87
+ }
88
+ return (React.createElement("div", { className: styles.mask, "aria-hidden": "true" },
89
+ React.createElement("span", { className: styles.hiddenValue }, formattedValue),
90
+ React.createElement("span", null, placeholderMask)));
91
+ }
92
+ function InputMask({ children, delimiter = "*", pattern, strict = true, }) {
93
+ const { value: inputValue, onChange } = children.props;
94
+ const { placeholderMask, isMasking, formattedValue, maskedOnChange } = useInputMask({
95
+ value: String(inputValue || ""),
96
+ pattern,
97
+ delimiter,
98
+ strict,
99
+ onChange: onChange,
100
+ });
101
+ const inputMask = (React.createElement(MaskElement, { isMasking: isMasking, formattedValue: formattedValue, placeholderMask: placeholderMask }));
102
+ return React.cloneElement(children, {
103
+ onChange: maskedOnChange,
104
+ children: isMasking && inputMask,
105
+ });
106
+ }
107
+
108
+ const DEFAULT_PATTERN = "(***) ***-****";
109
+
110
+ /**
111
+ * Combines the actions on the InputPhoneNumber such as onChange, onEnter, onFocus, onBlur, and onClear to forward information to the consumers of the InputPhoneNumber.
112
+ * Do not repeat this pattern. We are doing this as a proof of concept relating to the refactoring of Form inputs to see what can be removed.
113
+ */
114
+ function useInputPhoneActions({ onChange, inputRef, onFocus, onBlur, onKeyDown, onEnter, }) {
115
+ function handleClear() {
116
+ var _a;
117
+ handleBlur();
118
+ onChange && onChange("");
119
+ (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
120
+ }
121
+ function handleChange(event) {
122
+ const newValue = event.currentTarget.value;
123
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue, event);
124
+ }
125
+ function handleFocus(event) {
126
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
127
+ }
128
+ function handleKeyDown(event) {
129
+ onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
130
+ if (!onEnter)
131
+ return;
132
+ if (event.key !== "Enter")
133
+ return;
134
+ if (event.shiftKey || event.ctrlKey)
135
+ return;
136
+ event.preventDefault();
137
+ onEnter === null || onEnter === void 0 ? void 0 : onEnter(event);
138
+ }
139
+ function handleBlur(event) {
140
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
141
+ }
142
+ return {
143
+ handleClear,
144
+ handleChange,
145
+ handleFocus,
146
+ handleBlur,
147
+ handleKeyDown,
148
+ };
149
+ }
150
+
151
+ /**
152
+ * Provides the props for the html fields rendered by the html input.
153
+ * DO not repeat this pattern. We are doing this as a proof of concept relating to the refactoring of Form inputs to see what can be removed.
154
+ */
155
+ function useInputPhoneFormField(_a) {
156
+ var { id, name, description, inline, handleChange, handleBlur, handleFocus, handleKeyDown, error, disabled, autofocus, value, readonly } = _a, rest = tslib_es6.__rest(_a, ["id", "name", "description", "inline", "handleChange", "handleBlur", "handleFocus", "handleKeyDown", "error", "disabled", "autofocus", "value", "readonly"]);
157
+ const descriptionIdentifier = `descriptionUUID--${id}`;
158
+ const fieldProps = Object.assign(Object.assign(Object.assign(Object.assign({}, rest), { id,
159
+ name,
160
+ disabled, autoFocus: autofocus, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, onKeyDown: handleKeyDown, value, invalid: error || rest.invalid ? "true" : undefined }), (description &&
161
+ !inline && { "aria-describedby": descriptionIdentifier })), { readOnly: readonly });
162
+ return { fieldProps, descriptionIdentifier };
163
+ }
164
+
165
+ const InputPhoneNumberRebuilt = React.forwardRef(function InputPhoneNumberInternal(_a, ref) {
166
+ var _b, _c, _d, _e;
167
+ var { pattern = DEFAULT_PATTERN } = _a, props = tslib_es6.__rest(_a, ["pattern"]);
168
+ const inputPhoneNumberRef = (_b = ref) !== null && _b !== void 0 ? _b : React.useRef(null);
169
+ const wrapperRef = React.useRef(null);
170
+ const { inputStyle } = FormField.useFormFieldWrapperStyles(Object.assign(Object.assign({}, props), { type: "tel" }));
171
+ const generatedId = React.useId();
172
+ const id = props.id || generatedId;
173
+ const { name } = FormField.useAtlantisFormFieldName({
174
+ nameProp: props.name,
175
+ id: id,
176
+ });
177
+ const { formattedValue, isMasking, placeholderMask, inputValue, maskedOnChange, } = useInputMask({
178
+ value: props.value,
179
+ pattern,
180
+ strict: false,
181
+ onChange: props.onChange,
182
+ });
183
+ const { handleChange, handleBlur, handleFocus, handleClear, handleKeyDown, } = useInputPhoneActions({
184
+ onChange: maskedOnChange,
185
+ onBlur: props.onBlur,
186
+ onFocus: props.onFocus,
187
+ onEnter: props.onEnter,
188
+ inputRef: inputPhoneNumberRef,
189
+ });
190
+ const { fieldProps, descriptionIdentifier } = useInputPhoneFormField({
191
+ id,
192
+ name,
193
+ handleChange,
194
+ handleBlur,
195
+ handleFocus,
196
+ handleKeyDown,
197
+ autofocus: props.autoFocus,
198
+ disabled: props.disabled,
199
+ readonly: props.readonly,
200
+ invalid: props.invalid,
201
+ error: props.error,
202
+ description: props.description,
203
+ inline: props.inline,
204
+ });
205
+ return (React.createElement(FormField.FormFieldWrapper, { disabled: props.disabled, size: props.size, inline: props.inline, wrapperRef: wrapperRef, error: (_c = props.error) !== null && _c !== void 0 ? _c : "", invalid: Boolean(props.error || props.invalid), identifier: id, descriptionIdentifier: descriptionIdentifier, description: props.description, clearable: (_d = props.clearable) !== null && _d !== void 0 ? _d : "never", onClear: handleClear, type: "tel", placeholder: props.placeholder, value: formattedValue, prefix: props.prefix, suffix: props.suffix, readonly: props.readonly, loading: props.loading },
206
+ React.createElement("input", Object.assign({ type: "tel" }, fieldProps, { ref: inputPhoneNumberRef, className: classnames(inputStyle, {
207
+ [styles.emptyValue]: inputValue.length === 0 && pattern[0] === "(",
208
+ }), value: formattedValue })),
209
+ React.createElement(MaskElement, { isMasking: isMasking, formattedValue: formattedValue, placeholderMask: placeholderMask }),
210
+ React.createElement(FormField.FormFieldPostFix, { variation: "spinner", visible: (_e = props.loading) !== null && _e !== void 0 ? _e : false })));
211
+ });
19
212
 
213
+ function InputPhoneNumber$1(_a) {
214
+ var { required } = _a, props = tslib_es6.__rest(_a, ["required"]);
215
+ const { placeholder, validations, pattern = DEFAULT_PATTERN } = props;
216
+ const errorSubject = placeholder || "Phone number";
217
+ const { getValues } = reactHookForm.useFormContext() != undefined
218
+ ? reactHookForm.useFormContext()
219
+ : // If there isn't a Form Context being provided, get a form for this field.
220
+ reactHookForm.useForm({ mode: "onTouched" });
221
+ return (React.createElement(InputMask, { pattern: pattern, strict: false },
222
+ React.createElement(FormField.FormField, Object.assign({}, props, { type: "tel", pattern: pattern, validations: Object.assign(Object.assign({ required: {
223
+ value: Boolean(required),
224
+ message: `${errorSubject} is required`,
225
+ } }, validations), { validate: getPhoneNumberValidation }) }))));
226
+ function getPhoneNumberValidation(value) {
227
+ // Get unique characters that aren't * in the pattern
228
+ const patternNonDelimterCharacters = pattern
229
+ .split("")
230
+ .filter(char => char !== "*")
231
+ .filter((char, index, arr) => arr.indexOf(char) === index);
232
+ const specialCharacters = patternNonDelimterCharacters.join(" ");
233
+ // Remove special characters from pattern
234
+ const cleanValue = value.replace(new RegExp(`[${specialCharacters}]`, "g"), "");
235
+ const cleanValueRequiredLength = (pattern.match(/\*/g) || []).length;
236
+ if (cleanValue.length > 0 && cleanValue.length < cleanValueRequiredLength) {
237
+ return `${errorSubject} must contain ${cleanValueRequiredLength} or more digits`;
238
+ }
239
+ if (typeof (validations === null || validations === void 0 ? void 0 : validations.validate) === "function") {
240
+ return validations.validate(value, getValues);
241
+ }
242
+ return true;
243
+ }
244
+ }
20
245
 
246
+ function isNewInputPhoneNumberProps(props) {
247
+ return props.version === 2;
248
+ }
249
+ const InputPhoneNumber = React.forwardRef(function InputPhoneNumberShim(props, ref) {
250
+ if (isNewInputPhoneNumberProps(props)) {
251
+ return React.createElement(InputPhoneNumberRebuilt, Object.assign({}, props, { ref: ref }));
252
+ }
253
+ else {
254
+ return React.createElement(InputPhoneNumber$1, Object.assign({}, props));
255
+ }
256
+ });
21
257
 
22
- exports.InputPhoneNumber = InputPhoneNumber.InputPhoneNumber;
258
+ exports.InputPhoneNumber = InputPhoneNumber;
@@ -1 +1,5 @@
1
- export * from "./InputPhoneNumber";
1
+ import React from "react";
2
+ import { InputPhoneNumberLegacyProps, InputPhoneNumberRebuiltProps } from "./InputPhoneNumber.types";
3
+ export type InputPhoneNumberShimProps = InputPhoneNumberLegacyProps | InputPhoneNumberRebuiltProps;
4
+ export declare const InputPhoneNumber: React.ForwardRefExoticComponent<InputPhoneNumberShimProps & React.RefAttributes<HTMLInputElement>>;
5
+ export { InputPhoneNumberLegacyProps, InputPhoneNumberRebuiltProps };