@trackunit/react-form-components 1.3.15 → 1.3.16
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 +47 -15
- package/index.esm.js +47 -15
- package/package.json +1 -1
- package/src/components/ActionButton/ActionButton.d.ts +13 -3
- package/src/components/BaseInput/components/GenericActionsRenderer.d.ts +7 -3
- package/src/components/ColorField/ColorField.variants.d.ts +3 -0
- package/src/translation.d.ts +2 -2
package/index.cjs.js
CHANGED
|
@@ -41,8 +41,9 @@ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
|
41
41
|
var defaultTranslations = {
|
|
42
42
|
"baseInput.copyAction.toolTip": "Copy value",
|
|
43
43
|
"clearIndicator.icon.tooltip.clearAll": "Clear all",
|
|
44
|
-
"colorField.error.INVALID_HEX_CODE": "Please enter a valid
|
|
44
|
+
"colorField.error.INVALID_HEX_CODE": "Please enter a valid color before continuing.",
|
|
45
45
|
"colorField.error.REQUIRED": "This field is required",
|
|
46
|
+
"colorField.tooltip": "Select color",
|
|
46
47
|
"dropzone.input.title": "Drag-and-drop file input",
|
|
47
48
|
"dropzone.label.default": "<clickable>Browse</clickable> or drag files here...",
|
|
48
49
|
"emailField.error.INVALID_EMAIL": "Please enter a valid email address",
|
|
@@ -150,7 +151,7 @@ const cvaActionContainer = cssClassVarianceUtilities.cvaMerge(["flex", "items-ce
|
|
|
150
151
|
* @param {ActionButtonProps} props - The props for the ActionButton component
|
|
151
152
|
* @returns {JSX.Element} ActionButton component
|
|
152
153
|
*/
|
|
153
|
-
const ActionButton = ({ type, value, dataTestId, size, disabled, className }) => {
|
|
154
|
+
const ActionButton = ({ type, value, dataTestId, size, disabled, className, onClick }) => {
|
|
154
155
|
const [, copyToClipboard] = usehooksTs.useCopyToClipboard();
|
|
155
156
|
const getIconName = () => {
|
|
156
157
|
switch (type) {
|
|
@@ -160,6 +161,8 @@ const ActionButton = ({ type, value, dataTestId, size, disabled, className }) =>
|
|
|
160
161
|
return "ArrowTopRightOnSquare";
|
|
161
162
|
case "EMAIL":
|
|
162
163
|
return "Envelope";
|
|
164
|
+
case "EDIT":
|
|
165
|
+
return "Pencil";
|
|
163
166
|
case "COPY":
|
|
164
167
|
default:
|
|
165
168
|
return "ClipboardDocument";
|
|
@@ -176,6 +179,8 @@ const ActionButton = ({ type, value, dataTestId, size, disabled, className }) =>
|
|
|
176
179
|
return null;
|
|
177
180
|
case "PHONE_NUMBER":
|
|
178
181
|
return window.open(`tel:${value}`);
|
|
182
|
+
case "EDIT":
|
|
183
|
+
return value?.current?.click();
|
|
179
184
|
case "COPY":
|
|
180
185
|
// Typescript seems to be unable to detect RefObject
|
|
181
186
|
// as one of the members of the union RefObject | string | null which gives access to the `current` property
|
|
@@ -357,14 +362,12 @@ const AddonRenderer = ({ addon, dataTestId, className, fieldSize, position }) =>
|
|
|
357
362
|
return (jsxRuntime.jsx("div", { className: cvaInputAddon({ size: fieldSize, position, className }), "data-testid": dataTestId ? `${dataTestId}-addon${stringTs.titleCase(position)}` : null, children: addon }));
|
|
358
363
|
};
|
|
359
364
|
|
|
360
|
-
|
|
361
|
-
const GenericActionsRenderer = ({ genericAction, fieldSize, innerRef, }) => {
|
|
365
|
+
const GenericActionsRenderer = ({ genericAction, disabled, fieldSize, innerRef, tooltipLabel, }) => {
|
|
362
366
|
const [t] = useTranslation();
|
|
363
367
|
if (!genericAction) {
|
|
364
368
|
return null;
|
|
365
369
|
}
|
|
366
|
-
|
|
367
|
-
return (jsxRuntime.jsx(reactComponents.Tooltip, { label: t("baseInput.copyAction.toolTip"), placement: "top", children: jsxRuntime.jsx(ActionButton, { dataTestId: "copy-value-button", size: fieldSize ?? undefined, type: "COPY", value: innerRef }) }));
|
|
370
|
+
return (jsxRuntime.jsx(reactComponents.Tooltip, { label: tooltipLabel ?? t("baseInput.copyAction.toolTip"), placement: "top", children: jsxRuntime.jsx(ActionButton, { dataTestId: "copy-value-button", disabled: disabled, size: fieldSize ?? undefined, type: genericAction === "edit" ? "EDIT" : "COPY", value: innerRef }) }));
|
|
368
371
|
};
|
|
369
372
|
|
|
370
373
|
/**
|
|
@@ -777,6 +780,32 @@ const validateColorCode = (colorCode, required) => {
|
|
|
777
780
|
return "INVALID_HEX_CODE";
|
|
778
781
|
};
|
|
779
782
|
|
|
783
|
+
const cvaInputColorField = cssClassVarianceUtilities.cvaMerge([
|
|
784
|
+
"ml-3",
|
|
785
|
+
"h-4",
|
|
786
|
+
"w-4",
|
|
787
|
+
"self-center",
|
|
788
|
+
"bg-inherit",
|
|
789
|
+
"disabled:opacity-50",
|
|
790
|
+
"disabled:pointer-events-none",
|
|
791
|
+
"rounded-[4px]",
|
|
792
|
+
], {
|
|
793
|
+
variants: {
|
|
794
|
+
readOnly: {
|
|
795
|
+
true: "pointer-events-none",
|
|
796
|
+
false: "",
|
|
797
|
+
},
|
|
798
|
+
},
|
|
799
|
+
compoundVariants: [
|
|
800
|
+
{
|
|
801
|
+
readOnly: true,
|
|
802
|
+
},
|
|
803
|
+
],
|
|
804
|
+
defaultVariants: {
|
|
805
|
+
readOnly: false,
|
|
806
|
+
},
|
|
807
|
+
});
|
|
808
|
+
|
|
780
809
|
/**
|
|
781
810
|
* Validates if the given value is a valid hex color.
|
|
782
811
|
*
|
|
@@ -792,7 +821,9 @@ const isValidHEXColor = (value) => {
|
|
|
792
821
|
* ColorField validates that user enters a valid color address.
|
|
793
822
|
*
|
|
794
823
|
*/
|
|
795
|
-
const ColorField = React.forwardRef(({ label, id, tip, helpText, errorMessage, helpAddon, className, defaultValue, dataTestId, value: propValue, onChange, isInvalid = false, onBlur, ...rest }, ref) => {
|
|
824
|
+
const ColorField = React.forwardRef(({ label, id, tip, helpText, errorMessage, helpAddon, className, defaultValue, dataTestId, value: propValue, onChange, isInvalid = false, onBlur, fieldSize = "medium", ...rest }, ref) => {
|
|
825
|
+
const renderAsDisabled = Boolean(rest.disabled);
|
|
826
|
+
const renderAsReadonly = Boolean(rest.readOnly);
|
|
796
827
|
const htmlForId = React.useMemo(() => (id ? id : "colorField-" + sharedUtils.uuidv4()), [id]);
|
|
797
828
|
const innerRef = React.useRef(null);
|
|
798
829
|
React.useImperativeHandle(ref, () => innerRef.current, []);
|
|
@@ -815,15 +846,16 @@ const ColorField = React.forwardRef(({ label, id, tip, helpText, errorMessage, h
|
|
|
815
846
|
onChange(event);
|
|
816
847
|
}
|
|
817
848
|
}, [onChange]);
|
|
818
|
-
return (jsxRuntime.jsx(FormGroup, { dataTestId: dataTestId ? `${dataTestId}-FormGroup` : undefined, helpAddon: helpAddon, helpText: (renderAsInvalid && error) || helpText, htmlFor: htmlForId, isInvalid: renderAsInvalid, label: label, required: rest.required ? !(
|
|
819
|
-
|
|
820
|
-
|
|
849
|
+
return (jsxRuntime.jsx(FormGroup, { dataTestId: dataTestId ? `${dataTestId}-FormGroup` : undefined, helpAddon: helpAddon, helpText: (renderAsInvalid && error) || helpText, htmlFor: htmlForId, isInvalid: renderAsInvalid, label: label, required: rest.required ? !(renderAsDisabled || renderAsReadonly) : false, tip: tip, children: jsxRuntime.jsxs("div", { className: cvaInput({
|
|
850
|
+
size: fieldSize,
|
|
851
|
+
disabled: renderAsDisabled,
|
|
852
|
+
invalid: renderAsInvalid,
|
|
821
853
|
className,
|
|
822
|
-
}), "data-testid": dataTestId ? `${dataTestId}-container` : undefined, children: [jsxRuntime.jsx("input", { "aria-labelledby": htmlForId + "-label", className:
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
},
|
|
854
|
+
}), "data-testid": dataTestId ? `${dataTestId}-container` : undefined, children: [jsxRuntime.jsx("input", { "aria-labelledby": htmlForId + "-label", className: cvaInputColorField({ readOnly: renderAsReadonly }), "data-testid": dataTestId, defaultValue: defaultValue, disabled: renderAsDisabled, id: htmlForId, onBlur: handleBlur, onChange: handleChange, readOnly: renderAsReadonly, ref: innerRef, type: "color", value: innerValue }), jsxRuntime.jsx("input", { "aria-labelledby": htmlForId + "-label-text", className: cvaInputField({
|
|
855
|
+
readOnly: renderAsReadonly,
|
|
856
|
+
disabled: renderAsDisabled,
|
|
857
|
+
className: "px-1 focus-visible:outline-none",
|
|
858
|
+
}), "data-testid": dataTestId ? `${dataTestId}-textField` : undefined, disabled: renderAsDisabled, onBlur: handleBlur, onChange: handleChange, readOnly: renderAsReadonly, type: "text", value: innerValue }), jsxRuntime.jsx(GenericActionsRenderer, { disabled: renderAsDisabled || renderAsReadonly, fieldSize: fieldSize, genericAction: "edit", innerRef: innerRef, tooltipLabel: t("colorField.tooltip") })] }) }));
|
|
827
859
|
});
|
|
828
860
|
ColorField.displayName = "ColorField";
|
|
829
861
|
|
package/index.esm.js
CHANGED
|
@@ -22,8 +22,9 @@ import { z } from 'zod';
|
|
|
22
22
|
var defaultTranslations = {
|
|
23
23
|
"baseInput.copyAction.toolTip": "Copy value",
|
|
24
24
|
"clearIndicator.icon.tooltip.clearAll": "Clear all",
|
|
25
|
-
"colorField.error.INVALID_HEX_CODE": "Please enter a valid
|
|
25
|
+
"colorField.error.INVALID_HEX_CODE": "Please enter a valid color before continuing.",
|
|
26
26
|
"colorField.error.REQUIRED": "This field is required",
|
|
27
|
+
"colorField.tooltip": "Select color",
|
|
27
28
|
"dropzone.input.title": "Drag-and-drop file input",
|
|
28
29
|
"dropzone.label.default": "<clickable>Browse</clickable> or drag files here...",
|
|
29
30
|
"emailField.error.INVALID_EMAIL": "Please enter a valid email address",
|
|
@@ -131,7 +132,7 @@ const cvaActionContainer = cvaMerge(["flex", "items-center"], {
|
|
|
131
132
|
* @param {ActionButtonProps} props - The props for the ActionButton component
|
|
132
133
|
* @returns {JSX.Element} ActionButton component
|
|
133
134
|
*/
|
|
134
|
-
const ActionButton = ({ type, value, dataTestId, size, disabled, className }) => {
|
|
135
|
+
const ActionButton = ({ type, value, dataTestId, size, disabled, className, onClick }) => {
|
|
135
136
|
const [, copyToClipboard] = useCopyToClipboard();
|
|
136
137
|
const getIconName = () => {
|
|
137
138
|
switch (type) {
|
|
@@ -141,6 +142,8 @@ const ActionButton = ({ type, value, dataTestId, size, disabled, className }) =>
|
|
|
141
142
|
return "ArrowTopRightOnSquare";
|
|
142
143
|
case "EMAIL":
|
|
143
144
|
return "Envelope";
|
|
145
|
+
case "EDIT":
|
|
146
|
+
return "Pencil";
|
|
144
147
|
case "COPY":
|
|
145
148
|
default:
|
|
146
149
|
return "ClipboardDocument";
|
|
@@ -157,6 +160,8 @@ const ActionButton = ({ type, value, dataTestId, size, disabled, className }) =>
|
|
|
157
160
|
return null;
|
|
158
161
|
case "PHONE_NUMBER":
|
|
159
162
|
return window.open(`tel:${value}`);
|
|
163
|
+
case "EDIT":
|
|
164
|
+
return value?.current?.click();
|
|
160
165
|
case "COPY":
|
|
161
166
|
// Typescript seems to be unable to detect RefObject
|
|
162
167
|
// as one of the members of the union RefObject | string | null which gives access to the `current` property
|
|
@@ -338,14 +343,12 @@ const AddonRenderer = ({ addon, dataTestId, className, fieldSize, position }) =>
|
|
|
338
343
|
return (jsx("div", { className: cvaInputAddon({ size: fieldSize, position, className }), "data-testid": dataTestId ? `${dataTestId}-addon${titleCase(position)}` : null, children: addon }));
|
|
339
344
|
};
|
|
340
345
|
|
|
341
|
-
|
|
342
|
-
const GenericActionsRenderer = ({ genericAction, fieldSize, innerRef, }) => {
|
|
346
|
+
const GenericActionsRenderer = ({ genericAction, disabled, fieldSize, innerRef, tooltipLabel, }) => {
|
|
343
347
|
const [t] = useTranslation();
|
|
344
348
|
if (!genericAction) {
|
|
345
349
|
return null;
|
|
346
350
|
}
|
|
347
|
-
|
|
348
|
-
return (jsx(Tooltip, { label: t("baseInput.copyAction.toolTip"), placement: "top", children: jsx(ActionButton, { dataTestId: "copy-value-button", size: fieldSize ?? undefined, type: "COPY", value: innerRef }) }));
|
|
351
|
+
return (jsx(Tooltip, { label: tooltipLabel ?? t("baseInput.copyAction.toolTip"), placement: "top", children: jsx(ActionButton, { dataTestId: "copy-value-button", disabled: disabled, size: fieldSize ?? undefined, type: genericAction === "edit" ? "EDIT" : "COPY", value: innerRef }) }));
|
|
349
352
|
};
|
|
350
353
|
|
|
351
354
|
/**
|
|
@@ -758,6 +761,32 @@ const validateColorCode = (colorCode, required) => {
|
|
|
758
761
|
return "INVALID_HEX_CODE";
|
|
759
762
|
};
|
|
760
763
|
|
|
764
|
+
const cvaInputColorField = cvaMerge([
|
|
765
|
+
"ml-3",
|
|
766
|
+
"h-4",
|
|
767
|
+
"w-4",
|
|
768
|
+
"self-center",
|
|
769
|
+
"bg-inherit",
|
|
770
|
+
"disabled:opacity-50",
|
|
771
|
+
"disabled:pointer-events-none",
|
|
772
|
+
"rounded-[4px]",
|
|
773
|
+
], {
|
|
774
|
+
variants: {
|
|
775
|
+
readOnly: {
|
|
776
|
+
true: "pointer-events-none",
|
|
777
|
+
false: "",
|
|
778
|
+
},
|
|
779
|
+
},
|
|
780
|
+
compoundVariants: [
|
|
781
|
+
{
|
|
782
|
+
readOnly: true,
|
|
783
|
+
},
|
|
784
|
+
],
|
|
785
|
+
defaultVariants: {
|
|
786
|
+
readOnly: false,
|
|
787
|
+
},
|
|
788
|
+
});
|
|
789
|
+
|
|
761
790
|
/**
|
|
762
791
|
* Validates if the given value is a valid hex color.
|
|
763
792
|
*
|
|
@@ -773,7 +802,9 @@ const isValidHEXColor = (value) => {
|
|
|
773
802
|
* ColorField validates that user enters a valid color address.
|
|
774
803
|
*
|
|
775
804
|
*/
|
|
776
|
-
const ColorField = forwardRef(({ label, id, tip, helpText, errorMessage, helpAddon, className, defaultValue, dataTestId, value: propValue, onChange, isInvalid = false, onBlur, ...rest }, ref) => {
|
|
805
|
+
const ColorField = forwardRef(({ label, id, tip, helpText, errorMessage, helpAddon, className, defaultValue, dataTestId, value: propValue, onChange, isInvalid = false, onBlur, fieldSize = "medium", ...rest }, ref) => {
|
|
806
|
+
const renderAsDisabled = Boolean(rest.disabled);
|
|
807
|
+
const renderAsReadonly = Boolean(rest.readOnly);
|
|
777
808
|
const htmlForId = useMemo(() => (id ? id : "colorField-" + uuidv4()), [id]);
|
|
778
809
|
const innerRef = React__default.useRef(null);
|
|
779
810
|
React__default.useImperativeHandle(ref, () => innerRef.current, []);
|
|
@@ -796,15 +827,16 @@ const ColorField = forwardRef(({ label, id, tip, helpText, errorMessage, helpAdd
|
|
|
796
827
|
onChange(event);
|
|
797
828
|
}
|
|
798
829
|
}, [onChange]);
|
|
799
|
-
return (jsx(FormGroup, { dataTestId: dataTestId ? `${dataTestId}-FormGroup` : undefined, helpAddon: helpAddon, helpText: (renderAsInvalid && error) || helpText, htmlFor: htmlForId, isInvalid: renderAsInvalid, label: label, required: rest.required ? !(
|
|
800
|
-
|
|
801
|
-
|
|
830
|
+
return (jsx(FormGroup, { dataTestId: dataTestId ? `${dataTestId}-FormGroup` : undefined, helpAddon: helpAddon, helpText: (renderAsInvalid && error) || helpText, htmlFor: htmlForId, isInvalid: renderAsInvalid, label: label, required: rest.required ? !(renderAsDisabled || renderAsReadonly) : false, tip: tip, children: jsxs("div", { className: cvaInput({
|
|
831
|
+
size: fieldSize,
|
|
832
|
+
disabled: renderAsDisabled,
|
|
833
|
+
invalid: renderAsInvalid,
|
|
802
834
|
className,
|
|
803
|
-
}), "data-testid": dataTestId ? `${dataTestId}-container` : undefined, children: [jsx("input", { "aria-labelledby": htmlForId + "-label", className:
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
},
|
|
835
|
+
}), "data-testid": dataTestId ? `${dataTestId}-container` : undefined, children: [jsx("input", { "aria-labelledby": htmlForId + "-label", className: cvaInputColorField({ readOnly: renderAsReadonly }), "data-testid": dataTestId, defaultValue: defaultValue, disabled: renderAsDisabled, id: htmlForId, onBlur: handleBlur, onChange: handleChange, readOnly: renderAsReadonly, ref: innerRef, type: "color", value: innerValue }), jsx("input", { "aria-labelledby": htmlForId + "-label-text", className: cvaInputField({
|
|
836
|
+
readOnly: renderAsReadonly,
|
|
837
|
+
disabled: renderAsDisabled,
|
|
838
|
+
className: "px-1 focus-visible:outline-none",
|
|
839
|
+
}), "data-testid": dataTestId ? `${dataTestId}-textField` : undefined, disabled: renderAsDisabled, onBlur: handleBlur, onChange: handleChange, readOnly: renderAsReadonly, type: "text", value: innerValue }), jsx(GenericActionsRenderer, { disabled: renderAsDisabled || renderAsReadonly, fieldSize: fieldSize, genericAction: "edit", innerRef: innerRef, tooltipLabel: t("colorField.tooltip") })] }) }));
|
|
808
840
|
});
|
|
809
841
|
ColorField.displayName = "ColorField";
|
|
810
842
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonCommonProps, CommonProps } from "@trackunit/react-components";
|
|
2
|
-
type ActionType = "PHONE_NUMBER" | "WEB_ADDRESS" | "EMAIL" | "COPY";
|
|
2
|
+
export type ActionType = "PHONE_NUMBER" | "WEB_ADDRESS" | "EMAIL" | "COPY" | "EDIT";
|
|
3
3
|
interface AbstractActionButtonProps extends ButtonCommonProps, CommonProps {
|
|
4
4
|
/**
|
|
5
5
|
* The type of action performed when clicking the button.
|
|
@@ -30,12 +30,22 @@ interface CopyActionButtonProps extends AbstractActionButtonProps {
|
|
|
30
30
|
*/
|
|
31
31
|
value?: React.RefObject<HTMLInputElement>;
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
interface EditActionButtonProps extends AbstractActionButtonProps {
|
|
34
|
+
/**
|
|
35
|
+
* The type of action performed when clicking the button.
|
|
36
|
+
*/
|
|
37
|
+
type: "EDIT";
|
|
38
|
+
/**
|
|
39
|
+
* The value to be passed into the button.
|
|
40
|
+
*/
|
|
41
|
+
value?: React.RefObject<HTMLInputElement>;
|
|
42
|
+
}
|
|
43
|
+
type ActionButtonProps = CopyActionButtonProps | GenericActionButtonProps | EditActionButtonProps;
|
|
34
44
|
/**
|
|
35
45
|
* The ActionButton component is a wrapper over IconButton to perform an action when the onClick event is triggered.
|
|
36
46
|
*
|
|
37
47
|
* @param {ActionButtonProps} props - The props for the ActionButton component
|
|
38
48
|
* @returns {JSX.Element} ActionButton component
|
|
39
49
|
*/
|
|
40
|
-
export declare const ActionButton: ({ type, value, dataTestId, size, disabled, className }: ActionButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare const ActionButton: ({ type, value, dataTestId, size, disabled, className, onClick }: ActionButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
51
|
export {};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
2
|
import { FormComponentSizes } from "../../../types";
|
|
3
|
-
export type BaseInputActionTypes = "copy";
|
|
4
|
-
|
|
3
|
+
export type BaseInputActionTypes = "copy" | "edit";
|
|
4
|
+
type GenericActionsRendererProps = {
|
|
5
5
|
genericAction?: BaseInputActionTypes;
|
|
6
|
+
disabled?: boolean;
|
|
6
7
|
fieldSize?: FormComponentSizes;
|
|
7
8
|
innerRef: RefObject<HTMLInputElement>;
|
|
8
|
-
|
|
9
|
+
tooltipLabel?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const GenericActionsRenderer: ({ genericAction, disabled, fieldSize, innerRef, tooltipLabel, }: GenericActionsRendererProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export {};
|
package/src/translation.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export declare const translations: TranslationResource<TranslationKeys>;
|
|
|
14
14
|
/**
|
|
15
15
|
* Local useTranslation for this specific library
|
|
16
16
|
*/
|
|
17
|
-
export declare const useTranslation: () => [TransForLibs<"baseInput.copyAction.toolTip" | "clearIndicator.icon.tooltip.clearAll" | "colorField.error.INVALID_HEX_CODE" | "colorField.error.REQUIRED" | "dropzone.input.title" | "dropzone.label.default" | "emailField.error.INVALID_EMAIL" | "emailField.error.REQUIRED" | "field.notEditable.tooltip" | "field.required.asterisk.tooltip" | "numberField.error.GREATER_THAN" | "numberField.error.INVALID_NUMBER" | "numberField.error.LESS_THAN" | "numberField.error.NOT_IN_BETWEEN" | "numberField.error.REQUIRED" | "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" | "schedule.label.active" | "schedule.label.allDay" | "schedule.label.day" | "urlField.error.INVALID_URL" | "urlField.error.REQUIRED">, import("i18next").i18n, boolean] & {
|
|
18
|
-
t: TransForLibs<"baseInput.copyAction.toolTip" | "clearIndicator.icon.tooltip.clearAll" | "colorField.error.INVALID_HEX_CODE" | "colorField.error.REQUIRED" | "dropzone.input.title" | "dropzone.label.default" | "emailField.error.INVALID_EMAIL" | "emailField.error.REQUIRED" | "field.notEditable.tooltip" | "field.required.asterisk.tooltip" | "numberField.error.GREATER_THAN" | "numberField.error.INVALID_NUMBER" | "numberField.error.LESS_THAN" | "numberField.error.NOT_IN_BETWEEN" | "numberField.error.REQUIRED" | "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" | "schedule.label.active" | "schedule.label.allDay" | "schedule.label.day" | "urlField.error.INVALID_URL" | "urlField.error.REQUIRED">;
|
|
17
|
+
export declare const useTranslation: () => [TransForLibs<"baseInput.copyAction.toolTip" | "clearIndicator.icon.tooltip.clearAll" | "colorField.error.INVALID_HEX_CODE" | "colorField.error.REQUIRED" | "colorField.tooltip" | "dropzone.input.title" | "dropzone.label.default" | "emailField.error.INVALID_EMAIL" | "emailField.error.REQUIRED" | "field.notEditable.tooltip" | "field.required.asterisk.tooltip" | "numberField.error.GREATER_THAN" | "numberField.error.INVALID_NUMBER" | "numberField.error.LESS_THAN" | "numberField.error.NOT_IN_BETWEEN" | "numberField.error.REQUIRED" | "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" | "schedule.label.active" | "schedule.label.allDay" | "schedule.label.day" | "urlField.error.INVALID_URL" | "urlField.error.REQUIRED">, import("i18next").i18n, boolean] & {
|
|
18
|
+
t: TransForLibs<"baseInput.copyAction.toolTip" | "clearIndicator.icon.tooltip.clearAll" | "colorField.error.INVALID_HEX_CODE" | "colorField.error.REQUIRED" | "colorField.tooltip" | "dropzone.input.title" | "dropzone.label.default" | "emailField.error.INVALID_EMAIL" | "emailField.error.REQUIRED" | "field.notEditable.tooltip" | "field.required.asterisk.tooltip" | "numberField.error.GREATER_THAN" | "numberField.error.INVALID_NUMBER" | "numberField.error.LESS_THAN" | "numberField.error.NOT_IN_BETWEEN" | "numberField.error.REQUIRED" | "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" | "schedule.label.active" | "schedule.label.allDay" | "schedule.label.day" | "urlField.error.INVALID_URL" | "urlField.error.REQUIRED">;
|
|
19
19
|
i18n: import("i18next").i18n;
|
|
20
20
|
ready: boolean;
|
|
21
21
|
};
|