@jobber/components 6.26.1 → 6.26.2
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/FormField/FormFieldTypes.d.ts +6 -0
- package/dist/FormField/hooks/useAtlantisFormField.d.ts +2 -2
- package/dist/FormField-cjs.js +12 -4
- package/dist/FormField-es.js +12 -4
- package/dist/InputDate/index.cjs +1 -1
- package/dist/InputDate/index.mjs +1 -1
- package/dist/InputEmail-cjs.js +1 -1
- package/dist/InputEmail-es.js +1 -1
- package/dist/InputNumber-cjs.js +1 -1
- package/dist/InputNumber-es.js +1 -1
- package/dist/InputPassword-cjs.js +1 -1
- package/dist/InputPassword-es.js +1 -1
- package/dist/InputPhoneNumber-cjs.js +2 -2
- package/dist/InputPhoneNumber-es.js +2 -2
- package/dist/InputText/index.cjs +1 -1
- package/dist/InputText/index.mjs +1 -1
- package/dist/InputTime-cjs.js +1 -1
- package/dist/InputTime-es.js +1 -1
- package/dist/Option-cjs.js +1 -1
- package/dist/Option-es.js +1 -1
- package/dist/Select/Select.d.ts +1 -1
- package/dist/styles.css +5 -0
- package/package.json +2 -2
|
@@ -202,5 +202,11 @@ export interface FormFieldProps extends CommonFormFieldProps {
|
|
|
202
202
|
* Determines the visibility of the toolbar.
|
|
203
203
|
*/
|
|
204
204
|
readonly toolbarVisibility?: "always" | "while-editing";
|
|
205
|
+
/**
|
|
206
|
+
* Pattern is currently only used for the InputPhone type
|
|
207
|
+
* it is used to determine the format of the phone number
|
|
208
|
+
* and the number of digits to expect.
|
|
209
|
+
*/
|
|
210
|
+
readonly pattern?: string;
|
|
205
211
|
}
|
|
206
212
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeEvent, FocusEvent, KeyboardEvent } from "react";
|
|
2
2
|
import { UseControllerReturn } from "react-hook-form";
|
|
3
3
|
import type { FormFieldProps, KeyBoardTypes } from "../FormFieldTypes";
|
|
4
|
-
export interface useAtlantisFormFieldProps extends Pick<FormFieldProps, "description" | "disabled" | "readonly" | "inline" | "autofocus"> {
|
|
4
|
+
export interface useAtlantisFormFieldProps extends Pick<FormFieldProps, "description" | "disabled" | "readonly" | "inline" | "autofocus" | "pattern" | "type" | "value"> {
|
|
5
5
|
/**
|
|
6
6
|
* The html id for the field
|
|
7
7
|
*/
|
|
@@ -57,7 +57,7 @@ export interface useAtlantisFormFieldProps extends Pick<FormFieldProps, "descrip
|
|
|
57
57
|
/**
|
|
58
58
|
* Provides the props for the html fields rendered by the FormField component
|
|
59
59
|
*/
|
|
60
|
-
export declare function useAtlantisFormField({ id, nameProp, name, useControllerField: useControllerField, description, disabled, readonly, keyboard, autofocus, handleChange, handleBlur, handleFocus, inline, validations, handleKeyDown, handleValidation, errorMessage, }: useAtlantisFormFieldProps): {
|
|
60
|
+
export declare function useAtlantisFormField({ id, nameProp, name, useControllerField: useControllerField, description, disabled, readonly, keyboard, autofocus, pattern, type, value, handleChange, handleBlur, handleFocus, inline, validations, handleKeyDown, handleValidation, errorMessage, }: useAtlantisFormFieldProps): {
|
|
61
61
|
textFieldProps: {
|
|
62
62
|
autoFocus: boolean | undefined;
|
|
63
63
|
onKeyDown: (event: KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
package/dist/FormField-cjs.js
CHANGED
|
@@ -33,7 +33,7 @@ function useShowClear({ clearable, multiline, focused, hasValue, disabled = fals
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
var styles$1 = {"container":"YL-mNv-Bl6g-","wrapper":"_8lhbGTQ-hhg-","horizontalWrapper":"b5mv1x1H7YE-","textarea":"hGr6YW4AeLM-","safari":"QBCWi9GBgMs-","timeInputLabel":"_0pmqVa2zSE4-","miniLabel":"F1t76G6bDKo-","large":"_9tjyT9QUtP8-","text":"QmMiyoAWp-g-","invalid":"XWDSfe6weSY-","disabled":"Tz9LK9ABKMk-","small":"Sw5O4I0lMJg-","inline":"SaORbL7SYWY-","center":"ozy2UoT2vsg-","right":"_3TJdT91YD3c-","maxLength":"W6GrMqLy2qk-","inputWrapper":"-LmjnYRU0r0-","childrenWrapper":"yVXYv6hkuOA-","input":"vtSDcuzNr9Q-","label":"Dgk00tzlODA-","select":"NwQGiWBWIsc-","externalLabel":"Qb8zQ8n-8vc-","postfix":"yTDzs9h1otI-","affixIcon":"m0YpdssD2dY-","suffix":"_-3mMnjSh6ok-","hasAction":"OLE9N3Uem4o-","affixLabel":"-Wzcb0pBh5I-","description":"DHX5ijY3xIw-","toolbar":"AL-2brNI7dk-","spinning":"_8Rzv7CcDW80-"};
|
|
36
|
+
var styles$1 = {"container":"YL-mNv-Bl6g-","wrapper":"_8lhbGTQ-hhg-","horizontalWrapper":"b5mv1x1H7YE-","textarea":"hGr6YW4AeLM-","safari":"QBCWi9GBgMs-","timeInputLabel":"_0pmqVa2zSE4-","miniLabel":"F1t76G6bDKo-","large":"_9tjyT9QUtP8-","text":"QmMiyoAWp-g-","invalid":"XWDSfe6weSY-","disabled":"Tz9LK9ABKMk-","small":"Sw5O4I0lMJg-","inline":"SaORbL7SYWY-","center":"ozy2UoT2vsg-","right":"_3TJdT91YD3c-","maxLength":"W6GrMqLy2qk-","inputWrapper":"-LmjnYRU0r0-","childrenWrapper":"yVXYv6hkuOA-","input":"vtSDcuzNr9Q-","emptyPhoneNumber":"MVhuQuzUBUs-","label":"Dgk00tzlODA-","select":"NwQGiWBWIsc-","externalLabel":"Qb8zQ8n-8vc-","postfix":"yTDzs9h1otI-","affixIcon":"m0YpdssD2dY-","suffix":"_-3mMnjSh6ok-","hasAction":"OLE9N3Uem4o-","affixLabel":"-Wzcb0pBh5I-","description":"DHX5ijY3xIw-","toolbar":"AL-2brNI7dk-","spinning":"_8Rzv7CcDW80-"};
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @internal Reach out to UX Foundations if using this component since it is possible it might change
|
|
@@ -316,14 +316,19 @@ function useAtlantisFormFieldActions({ name, onChange, inputRef, onControllerCha
|
|
|
316
316
|
/**
|
|
317
317
|
* Provides the props for the html fields rendered by the FormField component
|
|
318
318
|
*/
|
|
319
|
-
function useAtlantisFormField({ id, nameProp, name, useControllerField: useControllerField, description, disabled, readonly, keyboard, autofocus, handleChange, handleBlur, handleFocus, inline, validations, handleKeyDown, handleValidation, errorMessage, }) {
|
|
319
|
+
function useAtlantisFormField({ id, nameProp, name, useControllerField: useControllerField, description, disabled, readonly, keyboard, autofocus, pattern, type, value, handleChange, handleBlur, handleFocus, inline, validations, handleKeyDown, handleValidation, errorMessage, }) {
|
|
320
320
|
const descriptionIdentifier = `descriptionUUID--${id}`;
|
|
321
|
-
const fieldProps = Object.assign(Object.assign(Object.assign({}, useControllerField), { id, className: styles$1.input,
|
|
321
|
+
const fieldProps = Object.assign(Object.assign(Object.assign({}, useControllerField), { id, className: classnames(styles$1.input, {
|
|
322
|
+
[styles$1.emptyPhoneNumber]: shouldAddPhoneNumberClass(type, value, pattern),
|
|
323
|
+
}), name: (validations || nameProp) && name, disabled: disabled, readOnly: readonly, inputMode: keyboard, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, autoFocus: autofocus }), (description &&
|
|
322
324
|
!inline && { "aria-describedby": descriptionIdentifier }));
|
|
323
325
|
const textFieldProps = Object.assign(Object.assign({}, fieldProps), { autoFocus: autofocus, onKeyDown: handleKeyDown });
|
|
324
326
|
React.useEffect(() => handleValidation(errorMessage), [errorMessage]);
|
|
325
327
|
return { textFieldProps, fieldProps, descriptionIdentifier };
|
|
326
328
|
}
|
|
329
|
+
function shouldAddPhoneNumberClass(type, value, pattern) {
|
|
330
|
+
return type === "tel" && !value && pattern && pattern[0] === "(";
|
|
331
|
+
}
|
|
327
332
|
|
|
328
333
|
function useAtlantisFormFieldName({ id, nameProp, }) {
|
|
329
334
|
/**
|
|
@@ -397,7 +402,7 @@ function FormField(props) {
|
|
|
397
402
|
return React.createElement(FormFieldInternal, Object.assign({}, props, { id: id }));
|
|
398
403
|
}
|
|
399
404
|
function FormFieldInternal(props) {
|
|
400
|
-
const { actionsRef, autocomplete = true, children, defaultValue, description, disabled, id, inputRef, inline, keyboard, max, maxLength, min, name: nameProp, readonly, rows, loading, type = "text", validations, value, onChange, onEnter, onFocus, onBlur, onValidation, onKeyUp, clearable = "never", autofocus, } = props;
|
|
405
|
+
const { actionsRef, autocomplete = true, children, defaultValue, description, disabled, id, inputRef, inline, keyboard, max, maxLength, min, name: nameProp, pattern, readonly, rows, loading, type = "text", validations, value, onChange, onEnter, onFocus, onBlur, onValidation, onKeyUp, clearable = "never", autofocus, } = props;
|
|
401
406
|
const { name } = useAtlantisFormFieldName({ id, nameProp });
|
|
402
407
|
const { errorMessage, inputRefs, useControllerField, setValue, onControllerBlur, onControllerChange, } = useAtlantisReactHookForm({
|
|
403
408
|
actionsRef,
|
|
@@ -432,6 +437,9 @@ function FormFieldInternal(props) {
|
|
|
432
437
|
readonly,
|
|
433
438
|
keyboard,
|
|
434
439
|
autofocus,
|
|
440
|
+
value,
|
|
441
|
+
type,
|
|
442
|
+
pattern,
|
|
435
443
|
handleChange,
|
|
436
444
|
handleBlur,
|
|
437
445
|
handleFocus,
|
package/dist/FormField-es.js
CHANGED
|
@@ -31,7 +31,7 @@ function useShowClear({ clearable, multiline, focused, hasValue, disabled = fals
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
var styles$1 = {"container":"YL-mNv-Bl6g-","wrapper":"_8lhbGTQ-hhg-","horizontalWrapper":"b5mv1x1H7YE-","textarea":"hGr6YW4AeLM-","safari":"QBCWi9GBgMs-","timeInputLabel":"_0pmqVa2zSE4-","miniLabel":"F1t76G6bDKo-","large":"_9tjyT9QUtP8-","text":"QmMiyoAWp-g-","invalid":"XWDSfe6weSY-","disabled":"Tz9LK9ABKMk-","small":"Sw5O4I0lMJg-","inline":"SaORbL7SYWY-","center":"ozy2UoT2vsg-","right":"_3TJdT91YD3c-","maxLength":"W6GrMqLy2qk-","inputWrapper":"-LmjnYRU0r0-","childrenWrapper":"yVXYv6hkuOA-","input":"vtSDcuzNr9Q-","label":"Dgk00tzlODA-","select":"NwQGiWBWIsc-","externalLabel":"Qb8zQ8n-8vc-","postfix":"yTDzs9h1otI-","affixIcon":"m0YpdssD2dY-","suffix":"_-3mMnjSh6ok-","hasAction":"OLE9N3Uem4o-","affixLabel":"-Wzcb0pBh5I-","description":"DHX5ijY3xIw-","toolbar":"AL-2brNI7dk-","spinning":"_8Rzv7CcDW80-"};
|
|
34
|
+
var styles$1 = {"container":"YL-mNv-Bl6g-","wrapper":"_8lhbGTQ-hhg-","horizontalWrapper":"b5mv1x1H7YE-","textarea":"hGr6YW4AeLM-","safari":"QBCWi9GBgMs-","timeInputLabel":"_0pmqVa2zSE4-","miniLabel":"F1t76G6bDKo-","large":"_9tjyT9QUtP8-","text":"QmMiyoAWp-g-","invalid":"XWDSfe6weSY-","disabled":"Tz9LK9ABKMk-","small":"Sw5O4I0lMJg-","inline":"SaORbL7SYWY-","center":"ozy2UoT2vsg-","right":"_3TJdT91YD3c-","maxLength":"W6GrMqLy2qk-","inputWrapper":"-LmjnYRU0r0-","childrenWrapper":"yVXYv6hkuOA-","input":"vtSDcuzNr9Q-","emptyPhoneNumber":"MVhuQuzUBUs-","label":"Dgk00tzlODA-","select":"NwQGiWBWIsc-","externalLabel":"Qb8zQ8n-8vc-","postfix":"yTDzs9h1otI-","affixIcon":"m0YpdssD2dY-","suffix":"_-3mMnjSh6ok-","hasAction":"OLE9N3Uem4o-","affixLabel":"-Wzcb0pBh5I-","description":"DHX5ijY3xIw-","toolbar":"AL-2brNI7dk-","spinning":"_8Rzv7CcDW80-"};
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* @internal Reach out to UX Foundations if using this component since it is possible it might change
|
|
@@ -314,14 +314,19 @@ function useAtlantisFormFieldActions({ name, onChange, inputRef, onControllerCha
|
|
|
314
314
|
/**
|
|
315
315
|
* Provides the props for the html fields rendered by the FormField component
|
|
316
316
|
*/
|
|
317
|
-
function useAtlantisFormField({ id, nameProp, name, useControllerField: useControllerField, description, disabled, readonly, keyboard, autofocus, handleChange, handleBlur, handleFocus, inline, validations, handleKeyDown, handleValidation, errorMessage, }) {
|
|
317
|
+
function useAtlantisFormField({ id, nameProp, name, useControllerField: useControllerField, description, disabled, readonly, keyboard, autofocus, pattern, type, value, handleChange, handleBlur, handleFocus, inline, validations, handleKeyDown, handleValidation, errorMessage, }) {
|
|
318
318
|
const descriptionIdentifier = `descriptionUUID--${id}`;
|
|
319
|
-
const fieldProps = Object.assign(Object.assign(Object.assign({}, useControllerField), { id, className: styles$1.input,
|
|
319
|
+
const fieldProps = Object.assign(Object.assign(Object.assign({}, useControllerField), { id, className: classnames(styles$1.input, {
|
|
320
|
+
[styles$1.emptyPhoneNumber]: shouldAddPhoneNumberClass(type, value, pattern),
|
|
321
|
+
}), name: (validations || nameProp) && name, disabled: disabled, readOnly: readonly, inputMode: keyboard, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, autoFocus: autofocus }), (description &&
|
|
320
322
|
!inline && { "aria-describedby": descriptionIdentifier }));
|
|
321
323
|
const textFieldProps = Object.assign(Object.assign({}, fieldProps), { autoFocus: autofocus, onKeyDown: handleKeyDown });
|
|
322
324
|
useEffect(() => handleValidation(errorMessage), [errorMessage]);
|
|
323
325
|
return { textFieldProps, fieldProps, descriptionIdentifier };
|
|
324
326
|
}
|
|
327
|
+
function shouldAddPhoneNumberClass(type, value, pattern) {
|
|
328
|
+
return type === "tel" && !value && pattern && pattern[0] === "(";
|
|
329
|
+
}
|
|
325
330
|
|
|
326
331
|
function useAtlantisFormFieldName({ id, nameProp, }) {
|
|
327
332
|
/**
|
|
@@ -395,7 +400,7 @@ function FormField(props) {
|
|
|
395
400
|
return React__default.createElement(FormFieldInternal, Object.assign({}, props, { id: id }));
|
|
396
401
|
}
|
|
397
402
|
function FormFieldInternal(props) {
|
|
398
|
-
const { actionsRef, autocomplete = true, children, defaultValue, description, disabled, id, inputRef, inline, keyboard, max, maxLength, min, name: nameProp, readonly, rows, loading, type = "text", validations, value, onChange, onEnter, onFocus, onBlur, onValidation, onKeyUp, clearable = "never", autofocus, } = props;
|
|
403
|
+
const { actionsRef, autocomplete = true, children, defaultValue, description, disabled, id, inputRef, inline, keyboard, max, maxLength, min, name: nameProp, pattern, readonly, rows, loading, type = "text", validations, value, onChange, onEnter, onFocus, onBlur, onValidation, onKeyUp, clearable = "never", autofocus, } = props;
|
|
399
404
|
const { name } = useAtlantisFormFieldName({ id, nameProp });
|
|
400
405
|
const { errorMessage, inputRefs, useControllerField, setValue, onControllerBlur, onControllerChange, } = useAtlantisReactHookForm({
|
|
401
406
|
actionsRef,
|
|
@@ -430,6 +435,9 @@ function FormFieldInternal(props) {
|
|
|
430
435
|
readonly,
|
|
431
436
|
keyboard,
|
|
432
437
|
autofocus,
|
|
438
|
+
value,
|
|
439
|
+
type,
|
|
440
|
+
pattern,
|
|
433
441
|
handleChange,
|
|
434
442
|
handleBlur,
|
|
435
443
|
handleFocus,
|
package/dist/InputDate/index.cjs
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var omit = require('../omit-cjs.js');
|
|
5
5
|
var FormField = require('../FormField-cjs.js');
|
|
6
|
+
require('classnames');
|
|
6
7
|
require('../tslib.es6-cjs.js');
|
|
7
8
|
require('react-hook-form');
|
|
8
9
|
require('framer-motion');
|
|
9
10
|
require('@jobber/design');
|
|
10
|
-
require('classnames');
|
|
11
11
|
require('../Button-cjs.js');
|
|
12
12
|
var DatePicker = require('../DatePicker-cjs.js');
|
|
13
13
|
var InputText_index = require('../InputText/index.cjs');
|
package/dist/InputDate/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React__default, { useRef, useState, useEffect, forwardRef } from 'react';
|
|
2
2
|
import { o as omit } from '../omit-es.js';
|
|
3
3
|
import { k as FormField } from '../FormField-es.js';
|
|
4
|
+
import 'classnames';
|
|
4
5
|
import '../tslib.es6-es.js';
|
|
5
6
|
import 'react-hook-form';
|
|
6
7
|
import 'framer-motion';
|
|
7
8
|
import '@jobber/design';
|
|
8
|
-
import 'classnames';
|
|
9
9
|
import '../Button-es.js';
|
|
10
10
|
import { D as DatePicker } from '../DatePicker-es.js';
|
|
11
11
|
import { InputText } from '../InputText/index.mjs';
|
package/dist/InputEmail-cjs.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var FormField = require('./FormField-cjs.js');
|
|
5
|
+
require('classnames');
|
|
5
6
|
require('./tslib.es6-cjs.js');
|
|
6
7
|
require('react-hook-form');
|
|
7
8
|
require('framer-motion');
|
|
8
9
|
require('@jobber/design');
|
|
9
|
-
require('classnames');
|
|
10
10
|
require('./Button-cjs.js');
|
|
11
11
|
|
|
12
12
|
const validationMessage = "Please enter a valid email";
|
package/dist/InputEmail-es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { k as FormField } from './FormField-es.js';
|
|
3
|
+
import 'classnames';
|
|
3
4
|
import './tslib.es6-es.js';
|
|
4
5
|
import 'react-hook-form';
|
|
5
6
|
import 'framer-motion';
|
|
6
7
|
import '@jobber/design';
|
|
7
|
-
import 'classnames';
|
|
8
8
|
import './Button-es.js';
|
|
9
9
|
|
|
10
10
|
const validationMessage = "Please enter a valid email";
|
package/dist/InputNumber-cjs.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var FormField = require('./FormField-cjs.js');
|
|
5
|
+
require('classnames');
|
|
5
6
|
require('./tslib.es6-cjs.js');
|
|
6
7
|
require('react-hook-form');
|
|
7
8
|
require('framer-motion');
|
|
8
9
|
require('@jobber/design');
|
|
9
|
-
require('classnames');
|
|
10
10
|
require('./Button-cjs.js');
|
|
11
11
|
|
|
12
12
|
function InputNumberInternal(props, ref) {
|
package/dist/InputNumber-es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React__default, { forwardRef, createRef, useImperativeHandle } from 'react';
|
|
2
2
|
import { k as FormField } from './FormField-es.js';
|
|
3
|
+
import 'classnames';
|
|
3
4
|
import './tslib.es6-es.js';
|
|
4
5
|
import 'react-hook-form';
|
|
5
6
|
import 'framer-motion';
|
|
6
7
|
import '@jobber/design';
|
|
7
|
-
import 'classnames';
|
|
8
8
|
import './Button-es.js';
|
|
9
9
|
|
|
10
10
|
function InputNumberInternal(props, ref) {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var FormField = require('./FormField-cjs.js');
|
|
5
|
+
require('classnames');
|
|
5
6
|
require('./tslib.es6-cjs.js');
|
|
6
7
|
require('react-hook-form');
|
|
7
8
|
require('framer-motion');
|
|
8
9
|
require('@jobber/design');
|
|
9
|
-
require('classnames');
|
|
10
10
|
require('./Button-cjs.js');
|
|
11
11
|
|
|
12
12
|
function InputPassword(props) {
|
package/dist/InputPassword-es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React__default, { useState } from 'react';
|
|
2
2
|
import { k as FormField } from './FormField-es.js';
|
|
3
|
+
import 'classnames';
|
|
3
4
|
import './tslib.es6-es.js';
|
|
4
5
|
import 'react-hook-form';
|
|
5
6
|
import 'framer-motion';
|
|
6
7
|
import '@jobber/design';
|
|
7
|
-
import 'classnames';
|
|
8
8
|
import './Button-es.js';
|
|
9
9
|
|
|
10
10
|
function InputPassword(props) {
|
|
@@ -4,9 +4,9 @@ var tslib_es6 = require('./tslib.es6-cjs.js');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactHookForm = require('react-hook-form');
|
|
6
6
|
var FormField = require('./FormField-cjs.js');
|
|
7
|
+
require('classnames');
|
|
7
8
|
require('framer-motion');
|
|
8
9
|
require('@jobber/design');
|
|
9
|
-
require('classnames');
|
|
10
10
|
require('./Button-cjs.js');
|
|
11
11
|
|
|
12
12
|
var styles = {"mask":"_78-Lxj78xPg-","hiddenValue":"GoiXVXaU1Qs-","spinning":"T3VvmDmzs-4-"};
|
|
@@ -73,7 +73,7 @@ function InputPhoneNumber(_a) {
|
|
|
73
73
|
: // If there isn't a Form Context being provided, get a form for this field.
|
|
74
74
|
reactHookForm.useForm({ mode: "onTouched" });
|
|
75
75
|
return (React.createElement(InputMask, { pattern: pattern, strict: false },
|
|
76
|
-
React.createElement(FormField.FormField, Object.assign({}, props, { type: "tel", validations: Object.assign(Object.assign({ required: {
|
|
76
|
+
React.createElement(FormField.FormField, Object.assign({}, props, { type: "tel", pattern: pattern, validations: Object.assign(Object.assign({ required: {
|
|
77
77
|
value: Boolean(required),
|
|
78
78
|
message: `${errorSubject} is required`,
|
|
79
79
|
} }, validations), { validate: getPhoneNumberValidation }) }))));
|
|
@@ -2,9 +2,9 @@ import { _ as __rest } from './tslib.es6-es.js';
|
|
|
2
2
|
import React__default, { useState, cloneElement } from 'react';
|
|
3
3
|
import { useFormContext, useForm } from 'react-hook-form';
|
|
4
4
|
import { k as FormField } from './FormField-es.js';
|
|
5
|
+
import 'classnames';
|
|
5
6
|
import 'framer-motion';
|
|
6
7
|
import '@jobber/design';
|
|
7
|
-
import 'classnames';
|
|
8
8
|
import './Button-es.js';
|
|
9
9
|
|
|
10
10
|
var styles = {"mask":"_78-Lxj78xPg-","hiddenValue":"GoiXVXaU1Qs-","spinning":"T3VvmDmzs-4-"};
|
|
@@ -71,7 +71,7 @@ function InputPhoneNumber(_a) {
|
|
|
71
71
|
: // If there isn't a Form Context being provided, get a form for this field.
|
|
72
72
|
useForm({ mode: "onTouched" });
|
|
73
73
|
return (React__default.createElement(InputMask, { pattern: pattern, strict: false },
|
|
74
|
-
React__default.createElement(FormField, Object.assign({}, props, { type: "tel", validations: Object.assign(Object.assign({ required: {
|
|
74
|
+
React__default.createElement(FormField, Object.assign({}, props, { type: "tel", pattern: pattern, validations: Object.assign(Object.assign({ required: {
|
|
75
75
|
value: Boolean(required),
|
|
76
76
|
message: `${errorSubject} is required`,
|
|
77
77
|
} }, validations), { validate: getPhoneNumberValidation }) }))));
|
package/dist/InputText/index.cjs
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var useSafeLayoutEffect = require('../useSafeLayoutEffect-cjs.js');
|
|
5
5
|
var FormField = require('../FormField-cjs.js');
|
|
6
|
+
require('classnames');
|
|
6
7
|
var tslib_es6 = require('../tslib.es6-cjs.js');
|
|
7
8
|
require('react-hook-form');
|
|
8
9
|
require('framer-motion');
|
|
9
10
|
require('@jobber/design');
|
|
10
|
-
require('classnames');
|
|
11
11
|
require('../Button-cjs.js');
|
|
12
12
|
var omit = require('../omit-cjs.js');
|
|
13
13
|
require('../Icon-cjs.js');
|
package/dist/InputText/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React__default, { forwardRef, useRef, useImperativeHandle, useId } from 'react';
|
|
2
2
|
import { u as useSafeLayoutEffect_1 } from '../useSafeLayoutEffect-es.js';
|
|
3
3
|
import { k as FormField, s as styles, j as useFormFieldWrapperStyles, b as useAtlantisFormFieldName, f as FormFieldWrapper, l as FormFieldPostFix, m as mergeRefs } from '../FormField-es.js';
|
|
4
|
+
import 'classnames';
|
|
4
5
|
import { _ as __rest } from '../tslib.es6-es.js';
|
|
5
6
|
import 'react-hook-form';
|
|
6
7
|
import 'framer-motion';
|
|
7
8
|
import '@jobber/design';
|
|
8
|
-
import 'classnames';
|
|
9
9
|
import '../Button-es.js';
|
|
10
10
|
import { o as omit } from '../omit-es.js';
|
|
11
11
|
import '../Icon-es.js';
|
package/dist/InputTime-cjs.js
CHANGED
|
@@ -4,10 +4,10 @@ var tslib_es6 = require('./tslib.es6-cjs.js');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var debounce = require('./debounce-cjs.js');
|
|
6
6
|
var FormField = require('./FormField-cjs.js');
|
|
7
|
+
require('classnames');
|
|
7
8
|
require('react-hook-form');
|
|
8
9
|
require('framer-motion');
|
|
9
10
|
require('@jobber/design');
|
|
10
|
-
require('classnames');
|
|
11
11
|
require('./Button-cjs.js');
|
|
12
12
|
|
|
13
13
|
const DEBOUNCE_TIME = 300;
|
package/dist/InputTime-es.js
CHANGED
|
@@ -2,10 +2,10 @@ import { _ as __rest } from './tslib.es6-es.js';
|
|
|
2
2
|
import React__default, { useState, useCallback, useEffect, useRef } from 'react';
|
|
3
3
|
import { d as debounce } from './debounce-es.js';
|
|
4
4
|
import { k as FormField } from './FormField-es.js';
|
|
5
|
+
import 'classnames';
|
|
5
6
|
import 'react-hook-form';
|
|
6
7
|
import 'framer-motion';
|
|
7
8
|
import '@jobber/design';
|
|
8
|
-
import 'classnames';
|
|
9
9
|
import './Button-es.js';
|
|
10
10
|
|
|
11
11
|
const DEBOUNCE_TIME = 300;
|
package/dist/Option-cjs.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var FormField = require('./FormField-cjs.js');
|
|
5
|
+
require('classnames');
|
|
5
6
|
require('./tslib.es6-cjs.js');
|
|
6
7
|
require('react-hook-form');
|
|
7
8
|
require('framer-motion');
|
|
8
9
|
require('@jobber/design');
|
|
9
|
-
require('classnames');
|
|
10
10
|
require('./Button-cjs.js');
|
|
11
11
|
|
|
12
12
|
function Select(props) {
|
package/dist/Option-es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { k as FormField } from './FormField-es.js';
|
|
3
|
+
import 'classnames';
|
|
3
4
|
import './tslib.es6-es.js';
|
|
4
5
|
import 'react-hook-form';
|
|
5
6
|
import 'framer-motion';
|
|
6
7
|
import '@jobber/design';
|
|
7
|
-
import 'classnames';
|
|
8
8
|
import './Button-es.js';
|
|
9
9
|
|
|
10
10
|
function Select(props) {
|
package/dist/Select/Select.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ import { FormFieldProps } from "../FormField";
|
|
|
5
5
|
* Unfortunately Docz doesn't currently support Omit so it has been reduced to
|
|
6
6
|
* its component parts.
|
|
7
7
|
*/
|
|
8
|
-
type SelectProps = Pick<FormFieldProps, Exclude<keyof FormFieldProps, "type" | "rows" | "keyboard" | "actionsRef" | "clearable">>;
|
|
8
|
+
type SelectProps = Pick<FormFieldProps, Exclude<keyof FormFieldProps, "type" | "rows" | "keyboard" | "actionsRef" | "clearable" | "pattern">>;
|
|
9
9
|
export declare function Select(props: SelectProps): JSX.Element;
|
|
10
10
|
export {};
|
package/dist/styles.css
CHANGED
|
@@ -877,6 +877,11 @@
|
|
|
877
877
|
outline: none;
|
|
878
878
|
}
|
|
879
879
|
|
|
880
|
+
.MVhuQuzUBUs- {
|
|
881
|
+
padding-left: calc(var(--field--padding-left) + 4px);
|
|
882
|
+
padding-left: calc(var(--field--padding-left) + var(--space-smaller));
|
|
883
|
+
}
|
|
884
|
+
|
|
880
885
|
.hGr6YW4AeLM- .yVXYv6hkuOA- {
|
|
881
886
|
display: -ms-flexbox;
|
|
882
887
|
display: flex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.26.
|
|
3
|
+
"version": "6.26.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -490,5 +490,5 @@
|
|
|
490
490
|
"> 1%",
|
|
491
491
|
"IE 10"
|
|
492
492
|
],
|
|
493
|
-
"gitHead": "
|
|
493
|
+
"gitHead": "95ecce985fdf89b0a31c3942280a94257d6c2c56"
|
|
494
494
|
}
|