@jobber/components 6.72.0 → 6.73.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.
- package/dist/Checkbox/Checkbox.rebuilt.d.ts +1 -1
- package/dist/Checkbox/Checkbox.types.d.ts +3 -3
- package/dist/FormField/FormFieldDescription.d.ts +2 -2
- package/dist/FormField/FormFieldTypes.d.ts +1 -1
- package/dist/FormField-cjs.js +2 -2
- package/dist/FormField-es.js +2 -2
- package/dist/InputEmail/hooks/useInputEmailFormField.d.ts +2 -2
- package/dist/InputNumber/InputNumber.rebuilt.types.d.ts +2 -2
- package/dist/InputPhoneNumber/hooks/useInputPhoneFormField.d.ts +2 -2
- package/dist/InputText/InputText.d.ts +2 -2
- package/dist/InputText/useInputTextFormField.d.ts +3 -3
- package/dist/Select/hooks/useSelectFormField.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export declare const CheckboxRebuilt: React.ForwardRefExoticComponent<Omit<import("./Checkbox.types").BaseCheckboxProps, "children" | "onChange" | "label" | "description"> & {
|
|
3
3
|
label?: string | React.ReactElement;
|
|
4
|
-
description?:
|
|
4
|
+
description?: React.ReactNode;
|
|
5
5
|
onChange?(newValue: boolean, event: React.ChangeEvent<HTMLInputElement>): void;
|
|
6
6
|
version: 2;
|
|
7
7
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
2
|
import { XOR } from "ts-xor";
|
|
3
3
|
export interface BaseCheckboxProps {
|
|
4
4
|
/**
|
|
@@ -32,7 +32,7 @@ export interface BaseCheckboxProps {
|
|
|
32
32
|
/**
|
|
33
33
|
* Further description of the label
|
|
34
34
|
*/
|
|
35
|
-
readonly description?:
|
|
35
|
+
readonly description?: ReactNode;
|
|
36
36
|
/**
|
|
37
37
|
* ID for the checkbox input
|
|
38
38
|
*/
|
|
@@ -78,7 +78,7 @@ export type CheckboxRebuiltProps = Omit<BaseCheckboxProps, "label" | "descriptio
|
|
|
78
78
|
* String will be rendered with the default markup.
|
|
79
79
|
* ReactElement will be rendered with provided positioning.
|
|
80
80
|
*/
|
|
81
|
-
description?:
|
|
81
|
+
description?: ReactNode;
|
|
82
82
|
/**
|
|
83
83
|
* Called when the checkbox value changes.
|
|
84
84
|
* Includes the change event as a second argument.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
interface FormFieldDescriptionProps {
|
|
3
3
|
readonly id: string;
|
|
4
|
-
readonly description?:
|
|
4
|
+
readonly description?: ReactNode;
|
|
5
5
|
readonly visible?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare function FormFieldDescription({ id, description, visible, }: FormFieldDescriptionProps): React.JSX.Element | null;
|
package/dist/FormField-cjs.js
CHANGED
|
@@ -69,8 +69,8 @@ function AffixIcon({ icon, onClick, ariaLabel, variation = "prefix", size, }) {
|
|
|
69
69
|
function FormFieldDescription({ id, description, visible = true, }) {
|
|
70
70
|
if (!visible)
|
|
71
71
|
return null;
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
const useStringFormat = !description || typeof description === "string";
|
|
73
|
+
return (React.createElement("div", { id: id, className: styles$1.description }, useStringFormat ? (React.createElement(Text.Text, { size: "small", variation: "subdued" }, description)) : (description)));
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
var styles = {"clearInput":"YmRTd-KeXv4-","spinning":"B25z9B8I3gs-"};
|
package/dist/FormField-es.js
CHANGED
|
@@ -67,8 +67,8 @@ function AffixIcon({ icon, onClick, ariaLabel, variation = "prefix", size, }) {
|
|
|
67
67
|
function FormFieldDescription({ id, description, visible = true, }) {
|
|
68
68
|
if (!visible)
|
|
69
69
|
return null;
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
const useStringFormat = !description || typeof description === "string";
|
|
71
|
+
return (React__default.createElement("div", { id: id, className: styles$1.description }, useStringFormat ? (React__default.createElement(Text, { size: "small", variation: "subdued" }, description)) : (description)));
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
var styles = {"clearInput":"YmRTd-KeXv4-","spinning":"B25z9B8I3gs-"};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEvent, FocusEvent, KeyboardEvent } from "react";
|
|
1
|
+
import { ChangeEvent, FocusEvent, KeyboardEvent, ReactNode } from "react";
|
|
2
2
|
export interface UseInputEmailFormFieldProps {
|
|
3
3
|
readonly id: string;
|
|
4
4
|
readonly name: string;
|
|
@@ -6,7 +6,7 @@ export interface UseInputEmailFormFieldProps {
|
|
|
6
6
|
readonly autofocus?: boolean;
|
|
7
7
|
readonly error?: string;
|
|
8
8
|
readonly inline?: boolean;
|
|
9
|
-
readonly description?:
|
|
9
|
+
readonly description?: ReactNode;
|
|
10
10
|
readonly invalid?: boolean;
|
|
11
11
|
readonly value?: string;
|
|
12
12
|
readonly handleChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import { CommonFormFieldProps, FormFieldProps } from "../FormField";
|
|
3
3
|
export type InputNumberVersion = 1 | 2 | undefined;
|
|
4
4
|
export interface InputNumberRebuiltProps extends Omit<CommonFormFieldProps, "version">, Pick<FormFieldProps, "onFocus" | "onBlur" | "inputRef" | "readonly" | "size"> {
|
|
@@ -6,7 +6,7 @@ export interface InputNumberRebuiltProps extends Omit<CommonFormFieldProps, "ver
|
|
|
6
6
|
readonly autocomplete?: boolean;
|
|
7
7
|
readonly autoFocus?: boolean;
|
|
8
8
|
readonly defaultValue?: number;
|
|
9
|
-
readonly description?:
|
|
9
|
+
readonly description?: ReactNode;
|
|
10
10
|
readonly error?: string;
|
|
11
11
|
readonly formatOptions?: Intl.NumberFormatOptions;
|
|
12
12
|
readonly identifier?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEvent, FocusEvent, KeyboardEvent } from "react";
|
|
1
|
+
import { ChangeEvent, FocusEvent, KeyboardEvent, ReactNode } from "react";
|
|
2
2
|
export interface useInputPhoneFormFieldProps {
|
|
3
3
|
/**
|
|
4
4
|
* The html id for the field
|
|
@@ -22,7 +22,7 @@ export interface useInputPhoneFormFieldProps {
|
|
|
22
22
|
/**
|
|
23
23
|
* Further description of the input, can be used for a hint.
|
|
24
24
|
*/
|
|
25
|
-
readonly description?:
|
|
25
|
+
readonly description?: ReactNode;
|
|
26
26
|
/**
|
|
27
27
|
* Callback for when the field value changes
|
|
28
28
|
*/
|
|
@@ -5,7 +5,7 @@ export declare const InputText: React.ForwardRefExoticComponent<({
|
|
|
5
5
|
readonly rows?: (number | import("./InputText.types").RowRange) | undefined;
|
|
6
6
|
readonly id?: string | undefined;
|
|
7
7
|
readonly align?: ("center" | "right") | undefined;
|
|
8
|
-
readonly description?:
|
|
8
|
+
readonly description?: React.ReactNode;
|
|
9
9
|
readonly disabled?: boolean | undefined;
|
|
10
10
|
readonly showMiniLabel?: boolean | undefined;
|
|
11
11
|
readonly invalid?: boolean | undefined;
|
|
@@ -39,7 +39,7 @@ export declare const InputText: React.ForwardRefExoticComponent<({
|
|
|
39
39
|
multiline?: boolean | undefined;
|
|
40
40
|
readonly id?: string | undefined;
|
|
41
41
|
readonly align?: ("center" | "right") | undefined;
|
|
42
|
-
readonly description?:
|
|
42
|
+
readonly description?: React.ReactNode;
|
|
43
43
|
readonly disabled?: boolean | undefined;
|
|
44
44
|
readonly showMiniLabel?: boolean | undefined;
|
|
45
45
|
readonly invalid?: boolean | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEvent, FocusEvent, KeyboardEvent } from "react";
|
|
1
|
+
import { ChangeEvent, FocusEvent, KeyboardEvent, ReactNode } from "react";
|
|
2
2
|
export interface useInputTextFormFieldProps extends React.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {
|
|
3
3
|
/**
|
|
4
4
|
* The html id for the field
|
|
@@ -22,7 +22,7 @@ export interface useInputTextFormFieldProps extends React.InputHTMLAttributes<HT
|
|
|
22
22
|
/**
|
|
23
23
|
* Further description of the input, can be used for a hint.
|
|
24
24
|
*/
|
|
25
|
-
readonly description?:
|
|
25
|
+
readonly description?: ReactNode;
|
|
26
26
|
/**
|
|
27
27
|
* Callback for when the field value changes
|
|
28
28
|
*/
|
|
@@ -187,7 +187,7 @@ export declare function useInputTextFormField({ id, name, description, inline, h
|
|
|
187
187
|
"aria-valuemin"?: number | undefined;
|
|
188
188
|
"aria-valuenow"?: number | undefined;
|
|
189
189
|
"aria-valuetext"?: string | undefined;
|
|
190
|
-
children?:
|
|
190
|
+
children?: ReactNode | undefined;
|
|
191
191
|
dangerouslySetInnerHTML?: {
|
|
192
192
|
__html: string | TrustedHTML;
|
|
193
193
|
} | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ChangeEvent } from "react";
|
|
1
|
+
import { ChangeEvent, ReactNode } from "react";
|
|
2
2
|
export interface UseSelectFormFieldProps {
|
|
3
3
|
readonly id: string;
|
|
4
4
|
readonly name: string;
|
|
5
5
|
readonly disabled?: boolean;
|
|
6
6
|
readonly autofocus?: boolean;
|
|
7
|
-
readonly description?:
|
|
7
|
+
readonly description?: ReactNode;
|
|
8
8
|
readonly inline?: boolean;
|
|
9
9
|
readonly error?: string;
|
|
10
10
|
readonly invalid?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.73.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -542,5 +542,5 @@
|
|
|
542
542
|
"> 1%",
|
|
543
543
|
"IE 10"
|
|
544
544
|
],
|
|
545
|
-
"gitHead": "
|
|
545
|
+
"gitHead": "7f8481c4a6dbde1cd25aa16cf06e763aea00d9c8"
|
|
546
546
|
}
|