@trackunit/react-form-components 0.0.296 → 0.0.297
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/index.cjs.js
CHANGED
|
@@ -44,6 +44,7 @@ var ReactAsyncSelect__default = /*#__PURE__*/_interopDefaultLegacy(ReactAsyncSel
|
|
|
44
44
|
var parsePhoneNumberFromString__default = /*#__PURE__*/_interopDefaultLegacy(parsePhoneNumberFromString);
|
|
45
45
|
|
|
46
46
|
var defaultTranslations = {
|
|
47
|
+
"clearIndicator.icon.tooltip.clearAll": "Clear all",
|
|
47
48
|
"phoneField.error.INVALID_COUNTRY": "The country code is not valid",
|
|
48
49
|
"phoneField.error.INVALID_LENGTH": "The phone number is not valid",
|
|
49
50
|
"phoneField.error.INVALID_NUMBER": "The phone number is not valid",
|
|
@@ -616,6 +617,7 @@ const TagsContainer = ({ items, width = "100%", itemsGap = 5, postFix, disabled
|
|
|
616
617
|
* @returns {Partial<SelectComponents<Option, boolean, GroupBase<Option>>> | undefined} components object to override react-select default components
|
|
617
618
|
*/
|
|
618
619
|
const useCustomComponents = (componentsProps, disabled, menuIsOpen, refMenuIsEnabled, dataTestId, maxSelectedDisplayCount, dropdownIcon) => {
|
|
620
|
+
const [t] = useTranslation();
|
|
619
621
|
// perhaps it should not be wrap in memo (causing some issues with opening and closing on mobiles)
|
|
620
622
|
const customComponents = React__namespace.useMemo(() => {
|
|
621
623
|
return Object.assign({ ValueContainer: props => {
|
|
@@ -660,7 +662,7 @@ const useCustomComponents = (componentsProps, disabled, menuIsOpen, refMenuIsEna
|
|
|
660
662
|
if (disabled) {
|
|
661
663
|
return null;
|
|
662
664
|
}
|
|
663
|
-
return (jsxRuntime.jsx(ReactSelect.components.ClearIndicator, Object.assign({}, props, { children: jsxRuntime.jsx("div", { className: cvaSelectXIcon(), onClick: props.clearValue, "data-testid": dataTestId && `${dataTestId}-XMarkIcon`, children: jsxRuntime.jsx(reactComponents.Icon, { name: "XCircle", size: "medium" }) }) })));
|
|
665
|
+
return (jsxRuntime.jsx(ReactSelect.components.ClearIndicator, Object.assign({}, props, { children: jsxRuntime.jsx("div", { className: cvaSelectXIcon(), onClick: props.clearValue, "data-testid": dataTestId && `${dataTestId}-XMarkIcon`, children: jsxRuntime.jsx(reactComponents.Icon, { title: t("clearIndicator.icon.tooltip.clearAll"), name: "XCircle", size: "medium" }) }) })));
|
|
664
666
|
}, Control: props => {
|
|
665
667
|
return jsxRuntime.jsx(ReactSelect.components.Control, Object.assign({}, props, { className: props.isDisabled ? "bg-slate-100" : "" }));
|
|
666
668
|
}, SingleValue: props => {
|
|
@@ -697,13 +699,13 @@ const useCustomComponents = (componentsProps, disabled, menuIsOpen, refMenuIsEna
|
|
|
697
699
|
* @param {StylesConfig<Option, IsMulti, Group> | undefined} styles a optional object to override styles of react-select
|
|
698
700
|
* @returns {StylesConfig<Option, boolean>} styles to override in select
|
|
699
701
|
*/
|
|
700
|
-
const useCustomStyles = (refContainer, refPrefix, maxSelectedDisplayCount, styles) => {
|
|
702
|
+
const useCustomStyles = (refContainer, refPrefix, maxSelectedDisplayCount, styles, disabled) => {
|
|
701
703
|
const customStyles = React__namespace.useMemo(() => {
|
|
702
704
|
return Object.assign({ control: base => {
|
|
703
705
|
return Object.assign(Object.assign({}, base), { border: "0", boxShadow: "0", "&:hover": {
|
|
704
706
|
border: "0",
|
|
705
707
|
}, marginRight: "2px", backgroundColor: "" });
|
|
706
|
-
}, singleValue: base => (Object.assign({}, base)), multiValue: base => (Object.assign({}, base)), multiValueLabel: base => (Object.assign({}, base)), indicatorsContainer: base => (Object.assign({}, base)), indicatorSeparator: () => ({
|
|
708
|
+
}, singleValue: base => (Object.assign({}, base)), multiValue: base => (Object.assign({}, base)), multiValueLabel: base => (Object.assign({}, base)), indicatorsContainer: base => (Object.assign(Object.assign({}, base), (disabled && { display: "none" }))), indicatorSeparator: () => ({
|
|
707
709
|
width: "0px",
|
|
708
710
|
}), menu: base => {
|
|
709
711
|
return Object.assign(Object.assign({}, base), { width: "100%", marginTop: "4px", marginBottom: "18px", transition: "all 1s ease-in-out" });
|
|
@@ -730,7 +732,7 @@ const useSelect = (_a) => {
|
|
|
730
732
|
var { id, className, dataTestId = "select", prefix, async, dropdownIcon, maxMenuHeight = 200, label, hasError, disabled, isMulti, components, value, options, onChange, isLoading, classNamePrefix = "", onMenuOpen, onMenuClose, maxSelectedDisplayCount = undefined, isClearable = false, isSearchable = true, onMenuScrollToBottom, styles, filterOption, onInputChange } = _a, props = __rest(_a, ["id", "className", "dataTestId", "prefix", "async", "dropdownIcon", "maxMenuHeight", "label", "hasError", "disabled", "isMulti", "components", "value", "options", "onChange", "isLoading", "classNamePrefix", "onMenuOpen", "onMenuClose", "maxSelectedDisplayCount", "isClearable", "isSearchable", "onMenuScrollToBottom", "styles", "filterOption", "onInputChange"]);
|
|
731
733
|
const refContainer = React__default["default"].useRef(null);
|
|
732
734
|
const refPrefix = React__default["default"].useRef(null);
|
|
733
|
-
const { customStyles } = useCustomStyles(refContainer, refPrefix, maxSelectedDisplayCount, styles);
|
|
735
|
+
const { customStyles } = useCustomStyles(refContainer, refPrefix, maxSelectedDisplayCount, styles, disabled);
|
|
734
736
|
const [menuIsOpen, setMenuIsOpen] = React__default["default"].useState((_b = props.menuIsOpen) !== null && _b !== void 0 ? _b : false);
|
|
735
737
|
const refMenuIsEnabled = React__default["default"].useRef(true);
|
|
736
738
|
const customComponents = useCustomComponents(components, disabled || false, menuIsOpen, refMenuIsEnabled, dataTestId, maxSelectedDisplayCount, dropdownIcon);
|
|
@@ -824,7 +826,7 @@ const CreatableSelect = (props) => {
|
|
|
824
826
|
*/
|
|
825
827
|
const Select = (props) => {
|
|
826
828
|
const { className } = props, propsNoClassName = __rest(props, ["className"]);
|
|
827
|
-
const { id, dataTestId = "select", prefix, async, maxMenuHeight = 200, label, hasError, disabled, isMulti, value, options, onChange, isLoading, classNamePrefix = dataTestId ? dataTestId : "select", onMenuScrollToBottom, filterOption, onInputChange, isSearchable, isClearable = false, readOnly, } = props;
|
|
829
|
+
const { id, dataTestId = "select", prefix, async, maxMenuHeight = 200, label, hasError, disabled, isMulti, value, options, onChange, isLoading, classNamePrefix = dataTestId ? dataTestId : "select", onMenuScrollToBottom, filterOption, onInputChange, isSearchable, isClearable = false, readOnly, openMenuOnClick = !disabled, openMenuOnFocus = !disabled, } = props;
|
|
828
830
|
const { refContainer, refPrefix, customStyles, menuIsOpen, customComponents, menuPlacement, openMenuHandler, closeMenuHandler, orderedOptions, } = useSelect(props);
|
|
829
831
|
const selectProps = {
|
|
830
832
|
value,
|
|
@@ -841,9 +843,9 @@ const Select = (props) => {
|
|
|
841
843
|
isSearchable: disabled || readOnly ? false : isSearchable,
|
|
842
844
|
menuShouldBlockScroll: true,
|
|
843
845
|
menuShouldScrollIntoView: true,
|
|
844
|
-
openMenuOnFocus
|
|
846
|
+
openMenuOnFocus,
|
|
845
847
|
menuIsOpen: !readOnly ? menuIsOpen : false,
|
|
846
|
-
openMenuOnClick
|
|
848
|
+
openMenuOnClick,
|
|
847
849
|
closeMenuOnSelect: false,
|
|
848
850
|
isMulti,
|
|
849
851
|
classNamePrefix,
|
|
@@ -1303,7 +1305,7 @@ const OptionCard = React.forwardRef((_a, ref) => {
|
|
|
1303
1305
|
*
|
|
1304
1306
|
* NOTE: If shown with a label, please use the `PasswordField` component instead.
|
|
1305
1307
|
*/
|
|
1306
|
-
const PasswordInput = React.forwardRef((props, ref) => (jsxRuntime.jsx(BaseInput, Object.assign({ ref: ref
|
|
1308
|
+
const PasswordInput = React.forwardRef((props, ref) => (jsxRuntime.jsx(BaseInput, Object.assign({ ref: ref }, props))));
|
|
1307
1309
|
|
|
1308
1310
|
/**
|
|
1309
1311
|
* Password fields enter a password or other confidential information. Characters are masked as they are typed.
|
|
@@ -1320,7 +1322,7 @@ const PasswordField = React.forwardRef((_a, ref) => {
|
|
|
1320
1322
|
const handleChange = React.useCallback((event) => {
|
|
1321
1323
|
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
1322
1324
|
}, [onChange]);
|
|
1323
|
-
return (jsxRuntime.jsx(FormGroup, { htmlFor: htmlFor, label: label, tip: tip, isInvalid: renderAsInvalid, helpText: (renderAsInvalid && errorMessage) || helpText, helpAddon: helpAddon, dataTestId: dataTestId && `${dataTestId}-FormGroup`, children: jsxRuntime.jsx(PasswordInput, Object.assign({}, rest, {
|
|
1325
|
+
return (jsxRuntime.jsx(FormGroup, { htmlFor: htmlFor, label: label, tip: tip, isInvalid: renderAsInvalid, helpText: (renderAsInvalid && errorMessage) || helpText, helpAddon: helpAddon, dataTestId: dataTestId && `${dataTestId}-FormGroup`, children: jsxRuntime.jsx(PasswordInput, Object.assign({}, rest, { type: showPassword ? "text" : "password", disabled: rest.readOnly, id: htmlFor, "aria-labelledby": htmlFor + "-label", ref: ref, maxLength: maxLength, value: value, isInvalid: renderAsInvalid, className: className, onChange: handleChange, dataTestId: dataTestId, actions: jsxRuntime.jsx(reactComponents.Icon, { className: "absolute top-0 bottom-0 right-2 h-full content-center", name: showPassword ? "EyeSlash" : "Eye", size: "small", color: "neutral", onClick: () => setShowPassword(prevState => !prevState) }) })) }));
|
|
1324
1326
|
});
|
|
1325
1327
|
|
|
1326
1328
|
/**
|
package/index.esm.js
CHANGED
|
@@ -14,6 +14,7 @@ import { format } from 'date-fns';
|
|
|
14
14
|
import parsePhoneNumberFromString, { isSupportedCountry, getCountries, getCountryCallingCode, isValidPhoneNumber, parsePhoneNumberFromString as parsePhoneNumberFromString$1 } from 'libphonenumber-js';
|
|
15
15
|
|
|
16
16
|
var defaultTranslations = {
|
|
17
|
+
"clearIndicator.icon.tooltip.clearAll": "Clear all",
|
|
17
18
|
"phoneField.error.INVALID_COUNTRY": "The country code is not valid",
|
|
18
19
|
"phoneField.error.INVALID_LENGTH": "The phone number is not valid",
|
|
19
20
|
"phoneField.error.INVALID_NUMBER": "The phone number is not valid",
|
|
@@ -586,6 +587,7 @@ const TagsContainer = ({ items, width = "100%", itemsGap = 5, postFix, disabled
|
|
|
586
587
|
* @returns {Partial<SelectComponents<Option, boolean, GroupBase<Option>>> | undefined} components object to override react-select default components
|
|
587
588
|
*/
|
|
588
589
|
const useCustomComponents = (componentsProps, disabled, menuIsOpen, refMenuIsEnabled, dataTestId, maxSelectedDisplayCount, dropdownIcon) => {
|
|
590
|
+
const [t] = useTranslation();
|
|
589
591
|
// perhaps it should not be wrap in memo (causing some issues with opening and closing on mobiles)
|
|
590
592
|
const customComponents = React.useMemo(() => {
|
|
591
593
|
return Object.assign({ ValueContainer: props => {
|
|
@@ -630,7 +632,7 @@ const useCustomComponents = (componentsProps, disabled, menuIsOpen, refMenuIsEna
|
|
|
630
632
|
if (disabled) {
|
|
631
633
|
return null;
|
|
632
634
|
}
|
|
633
|
-
return (jsx(components.ClearIndicator, Object.assign({}, props, { children: jsx("div", { className: cvaSelectXIcon(), onClick: props.clearValue, "data-testid": dataTestId && `${dataTestId}-XMarkIcon`, children: jsx(Icon, { name: "XCircle", size: "medium" }) }) })));
|
|
635
|
+
return (jsx(components.ClearIndicator, Object.assign({}, props, { children: jsx("div", { className: cvaSelectXIcon(), onClick: props.clearValue, "data-testid": dataTestId && `${dataTestId}-XMarkIcon`, children: jsx(Icon, { title: t("clearIndicator.icon.tooltip.clearAll"), name: "XCircle", size: "medium" }) }) })));
|
|
634
636
|
}, Control: props => {
|
|
635
637
|
return jsx(components.Control, Object.assign({}, props, { className: props.isDisabled ? "bg-slate-100" : "" }));
|
|
636
638
|
}, SingleValue: props => {
|
|
@@ -667,13 +669,13 @@ const useCustomComponents = (componentsProps, disabled, menuIsOpen, refMenuIsEna
|
|
|
667
669
|
* @param {StylesConfig<Option, IsMulti, Group> | undefined} styles a optional object to override styles of react-select
|
|
668
670
|
* @returns {StylesConfig<Option, boolean>} styles to override in select
|
|
669
671
|
*/
|
|
670
|
-
const useCustomStyles = (refContainer, refPrefix, maxSelectedDisplayCount, styles) => {
|
|
672
|
+
const useCustomStyles = (refContainer, refPrefix, maxSelectedDisplayCount, styles, disabled) => {
|
|
671
673
|
const customStyles = React.useMemo(() => {
|
|
672
674
|
return Object.assign({ control: base => {
|
|
673
675
|
return Object.assign(Object.assign({}, base), { border: "0", boxShadow: "0", "&:hover": {
|
|
674
676
|
border: "0",
|
|
675
677
|
}, marginRight: "2px", backgroundColor: "" });
|
|
676
|
-
}, singleValue: base => (Object.assign({}, base)), multiValue: base => (Object.assign({}, base)), multiValueLabel: base => (Object.assign({}, base)), indicatorsContainer: base => (Object.assign({}, base)), indicatorSeparator: () => ({
|
|
678
|
+
}, singleValue: base => (Object.assign({}, base)), multiValue: base => (Object.assign({}, base)), multiValueLabel: base => (Object.assign({}, base)), indicatorsContainer: base => (Object.assign(Object.assign({}, base), (disabled && { display: "none" }))), indicatorSeparator: () => ({
|
|
677
679
|
width: "0px",
|
|
678
680
|
}), menu: base => {
|
|
679
681
|
return Object.assign(Object.assign({}, base), { width: "100%", marginTop: "4px", marginBottom: "18px", transition: "all 1s ease-in-out" });
|
|
@@ -700,7 +702,7 @@ const useSelect = (_a) => {
|
|
|
700
702
|
var { id, className, dataTestId = "select", prefix, async, dropdownIcon, maxMenuHeight = 200, label, hasError, disabled, isMulti, components, value, options, onChange, isLoading, classNamePrefix = "", onMenuOpen, onMenuClose, maxSelectedDisplayCount = undefined, isClearable = false, isSearchable = true, onMenuScrollToBottom, styles, filterOption, onInputChange } = _a, props = __rest(_a, ["id", "className", "dataTestId", "prefix", "async", "dropdownIcon", "maxMenuHeight", "label", "hasError", "disabled", "isMulti", "components", "value", "options", "onChange", "isLoading", "classNamePrefix", "onMenuOpen", "onMenuClose", "maxSelectedDisplayCount", "isClearable", "isSearchable", "onMenuScrollToBottom", "styles", "filterOption", "onInputChange"]);
|
|
701
703
|
const refContainer = React__default.useRef(null);
|
|
702
704
|
const refPrefix = React__default.useRef(null);
|
|
703
|
-
const { customStyles } = useCustomStyles(refContainer, refPrefix, maxSelectedDisplayCount, styles);
|
|
705
|
+
const { customStyles } = useCustomStyles(refContainer, refPrefix, maxSelectedDisplayCount, styles, disabled);
|
|
704
706
|
const [menuIsOpen, setMenuIsOpen] = React__default.useState((_b = props.menuIsOpen) !== null && _b !== void 0 ? _b : false);
|
|
705
707
|
const refMenuIsEnabled = React__default.useRef(true);
|
|
706
708
|
const customComponents = useCustomComponents(components, disabled || false, menuIsOpen, refMenuIsEnabled, dataTestId, maxSelectedDisplayCount, dropdownIcon);
|
|
@@ -794,7 +796,7 @@ const CreatableSelect = (props) => {
|
|
|
794
796
|
*/
|
|
795
797
|
const Select = (props) => {
|
|
796
798
|
const { className } = props, propsNoClassName = __rest(props, ["className"]);
|
|
797
|
-
const { id, dataTestId = "select", prefix, async, maxMenuHeight = 200, label, hasError, disabled, isMulti, value, options, onChange, isLoading, classNamePrefix = dataTestId ? dataTestId : "select", onMenuScrollToBottom, filterOption, onInputChange, isSearchable, isClearable = false, readOnly, } = props;
|
|
799
|
+
const { id, dataTestId = "select", prefix, async, maxMenuHeight = 200, label, hasError, disabled, isMulti, value, options, onChange, isLoading, classNamePrefix = dataTestId ? dataTestId : "select", onMenuScrollToBottom, filterOption, onInputChange, isSearchable, isClearable = false, readOnly, openMenuOnClick = !disabled, openMenuOnFocus = !disabled, } = props;
|
|
798
800
|
const { refContainer, refPrefix, customStyles, menuIsOpen, customComponents, menuPlacement, openMenuHandler, closeMenuHandler, orderedOptions, } = useSelect(props);
|
|
799
801
|
const selectProps = {
|
|
800
802
|
value,
|
|
@@ -811,9 +813,9 @@ const Select = (props) => {
|
|
|
811
813
|
isSearchable: disabled || readOnly ? false : isSearchable,
|
|
812
814
|
menuShouldBlockScroll: true,
|
|
813
815
|
menuShouldScrollIntoView: true,
|
|
814
|
-
openMenuOnFocus
|
|
816
|
+
openMenuOnFocus,
|
|
815
817
|
menuIsOpen: !readOnly ? menuIsOpen : false,
|
|
816
|
-
openMenuOnClick
|
|
818
|
+
openMenuOnClick,
|
|
817
819
|
closeMenuOnSelect: false,
|
|
818
820
|
isMulti,
|
|
819
821
|
classNamePrefix,
|
|
@@ -1273,7 +1275,7 @@ const OptionCard = forwardRef((_a, ref) => {
|
|
|
1273
1275
|
*
|
|
1274
1276
|
* NOTE: If shown with a label, please use the `PasswordField` component instead.
|
|
1275
1277
|
*/
|
|
1276
|
-
const PasswordInput = forwardRef((props, ref) => (jsx(BaseInput, Object.assign({ ref: ref
|
|
1278
|
+
const PasswordInput = forwardRef((props, ref) => (jsx(BaseInput, Object.assign({ ref: ref }, props))));
|
|
1277
1279
|
|
|
1278
1280
|
/**
|
|
1279
1281
|
* Password fields enter a password or other confidential information. Characters are masked as they are typed.
|
|
@@ -1290,7 +1292,7 @@ const PasswordField = forwardRef((_a, ref) => {
|
|
|
1290
1292
|
const handleChange = useCallback((event) => {
|
|
1291
1293
|
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
1292
1294
|
}, [onChange]);
|
|
1293
|
-
return (jsx(FormGroup, { htmlFor: htmlFor, label: label, tip: tip, isInvalid: renderAsInvalid, helpText: (renderAsInvalid && errorMessage) || helpText, helpAddon: helpAddon, dataTestId: dataTestId && `${dataTestId}-FormGroup`, children: jsx(PasswordInput, Object.assign({}, rest, {
|
|
1295
|
+
return (jsx(FormGroup, { htmlFor: htmlFor, label: label, tip: tip, isInvalid: renderAsInvalid, helpText: (renderAsInvalid && errorMessage) || helpText, helpAddon: helpAddon, dataTestId: dataTestId && `${dataTestId}-FormGroup`, children: jsx(PasswordInput, Object.assign({}, rest, { type: showPassword ? "text" : "password", disabled: rest.readOnly, id: htmlFor, "aria-labelledby": htmlFor + "-label", ref: ref, maxLength: maxLength, value: value, isInvalid: renderAsInvalid, className: className, onChange: handleChange, dataTestId: dataTestId, actions: jsx(Icon, { className: "absolute top-0 bottom-0 right-2 h-full content-center", name: showPassword ? "EyeSlash" : "Eye", size: "small", color: "neutral", onClick: () => setShowPassword(prevState => !prevState) }) })) }));
|
|
1294
1296
|
});
|
|
1295
1297
|
|
|
1296
1298
|
/**
|
package/package.json
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
import { BaseInputProps } from "../BaseInput/BaseInput";
|
|
3
3
|
type BaseInputExposedProps = Omit<BaseInputProps, "type">;
|
|
4
4
|
export interface PasswordInputProps extends BaseInputExposedProps {
|
|
5
|
-
|
|
6
|
-
* If false the field will show password as plain text.
|
|
7
|
-
*/
|
|
8
|
-
obfuscate?: boolean;
|
|
5
|
+
type?: "password" | "text";
|
|
9
6
|
}
|
|
10
7
|
/**
|
|
11
8
|
* A thin wrapper around the `BaseInput` component for password input fields.
|
|
@@ -9,6 +9,6 @@ import { GroupBase, StylesConfig } from "react-select";
|
|
|
9
9
|
* @param {StylesConfig<Option, IsMulti, Group> | undefined} styles a optional object to override styles of react-select
|
|
10
10
|
* @returns {StylesConfig<Option, boolean>} styles to override in select
|
|
11
11
|
*/
|
|
12
|
-
export declare const useCustomStyles: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(refContainer: React.RefObject<HTMLDivElement>, refPrefix: React.RefObject<HTMLDivElement>, maxSelectedDisplayCount: number | undefined, styles: StylesConfig<Option, IsMulti, Group> | undefined) => {
|
|
12
|
+
export declare const useCustomStyles: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(refContainer: React.RefObject<HTMLDivElement>, refPrefix: React.RefObject<HTMLDivElement>, maxSelectedDisplayCount: number | undefined, styles: StylesConfig<Option, IsMulti, Group> | undefined, disabled: boolean | undefined) => {
|
|
13
13
|
customStyles: StylesConfig<Option, IsMulti, Group>;
|
|
14
14
|
};
|
package/src/translation.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ export declare const translations: TranslationResource<TranslationKeys>;
|
|
|
15
15
|
/**
|
|
16
16
|
* Local useTranslation for this specific library
|
|
17
17
|
*/
|
|
18
|
-
export declare const useTranslation: () => [TransForLibs<"phoneField.error.INVALID_COUNTRY" | "phoneField.error.INVALID_LENGTH" | "phoneField.error.INVALID_NUMBER" | "phoneField.error.NOT_A_NUMBER" | "phoneField.error.REQUIRED" | "phoneField.error.REQUIRED_COUNTRY" | "phoneField.error.TOO_LONG" | "phoneField.error.TOO_SHORT" | "phoneField.error.undefined">, import("i18next").i18n, boolean] & {
|
|
19
|
-
t: TransForLibs<"phoneField.error.INVALID_COUNTRY" | "phoneField.error.INVALID_LENGTH" | "phoneField.error.INVALID_NUMBER" | "phoneField.error.NOT_A_NUMBER" | "phoneField.error.REQUIRED" | "phoneField.error.REQUIRED_COUNTRY" | "phoneField.error.TOO_LONG" | "phoneField.error.TOO_SHORT" | "phoneField.error.undefined">;
|
|
18
|
+
export declare const useTranslation: () => [TransForLibs<"clearIndicator.icon.tooltip.clearAll" | "phoneField.error.INVALID_COUNTRY" | "phoneField.error.INVALID_LENGTH" | "phoneField.error.INVALID_NUMBER" | "phoneField.error.NOT_A_NUMBER" | "phoneField.error.REQUIRED" | "phoneField.error.REQUIRED_COUNTRY" | "phoneField.error.TOO_LONG" | "phoneField.error.TOO_SHORT" | "phoneField.error.undefined">, import("i18next").i18n, boolean] & {
|
|
19
|
+
t: TransForLibs<"clearIndicator.icon.tooltip.clearAll" | "phoneField.error.INVALID_COUNTRY" | "phoneField.error.INVALID_LENGTH" | "phoneField.error.INVALID_NUMBER" | "phoneField.error.NOT_A_NUMBER" | "phoneField.error.REQUIRED" | "phoneField.error.REQUIRED_COUNTRY" | "phoneField.error.TOO_LONG" | "phoneField.error.TOO_SHORT" | "phoneField.error.undefined">;
|
|
20
20
|
i18n: import("i18next").i18n;
|
|
21
21
|
ready: boolean;
|
|
22
22
|
};
|