@jobber/components 8.5.0 → 8.7.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/Autocomplete/index.cjs +1 -2
- package/dist/Autocomplete/index.mjs +1 -2
- package/dist/Autocomplete-cjs.js +1 -3
- package/dist/Autocomplete-es.js +1 -3
- package/dist/DataList/components/DataListSearch/index.cjs +1 -2
- package/dist/DataList/components/DataListSearch/index.mjs +1 -2
- package/dist/DataList/index.cjs +1 -2
- package/dist/DataList/index.mjs +1 -2
- package/dist/DataTable/index.cjs +1 -2
- package/dist/DataTable/index.mjs +1 -2
- package/dist/FormField/FormFieldTypes.d.ts +1 -17
- package/dist/FormField/index.cjs +4 -13
- package/dist/FormField/index.d.ts +0 -4
- package/dist/FormField/index.mjs +4 -9
- package/dist/InputDate/InputDate.types.d.ts +1 -1
- package/dist/InputDate/index.cjs +1 -2
- package/dist/InputDate/index.mjs +1 -2
- package/dist/InputEmail/InputEmail.types.d.ts +1 -1
- package/dist/InputEmail/index.cjs +0 -1
- package/dist/InputEmail/index.mjs +0 -1
- package/dist/InputEmail-cjs.js +1 -3
- package/dist/InputEmail-es.js +1 -3
- package/dist/InputNumber/InputNumber.types.d.ts +1 -1
- package/dist/InputPhoneNumber/InputMask.d.ts +0 -38
- package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +2 -3
- package/dist/InputPhoneNumber/index.cjs +1 -2
- package/dist/InputPhoneNumber/index.mjs +1 -2
- package/dist/InputPhoneNumber-cjs.js +11 -12
- package/dist/InputPhoneNumber-es.js +11 -12
- package/dist/InputText/InputText.types.d.ts +1 -5
- package/dist/InputText/index.cjs +1 -2
- package/dist/InputText/index.mjs +1 -2
- package/dist/InputText-cjs.js +3 -5
- package/dist/InputText-es.js +3 -5
- package/dist/InputTime/InputTime.types.d.ts +1 -1
- package/dist/InputTime/index.cjs +0 -1
- package/dist/InputTime/index.mjs +0 -1
- package/dist/InputTime-cjs.js +1 -2
- package/dist/InputTime-es.js +1 -2
- package/dist/Select/OptionGroup.d.ts +2 -2
- package/dist/Select/Select.types.d.ts +1 -1
- package/dist/Select/index.cjs +1 -2
- package/dist/Select/index.mjs +1 -2
- package/dist/Select-cjs.js +3 -5
- package/dist/Select-es.js +3 -5
- package/dist/docs/Button/Button.md +1 -1
- package/dist/docs/errors/errors.md +1 -1
- package/dist/docs/index.md +0 -3
- package/dist/docs/usage-guidelines/usage-guidelines.md +6 -35
- package/dist/index.cjs +2 -12
- package/dist/index.d.mts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.mjs +2 -6
- package/dist/sharedHelpers/types.d.ts +0 -4
- package/dist/useAtlantisFormFieldName-cjs.js +3 -3
- package/dist/useAtlantisFormFieldName-es.js +3 -3
- package/dist/utils/meta/meta.json +0 -3
- package/package.json +3 -15
- package/rollup.config.mjs +0 -1
- package/Form.d.ts +0 -1
- package/Form.js +0 -17
- package/InputPassword.d.ts +0 -1
- package/InputPassword.js +0 -17
- package/dist/Form/Form.d.ts +0 -18
- package/dist/Form/index.cjs +0 -10
- package/dist/Form/index.d.ts +0 -1
- package/dist/Form/index.mjs +0 -4
- package/dist/Form-cjs.js +0 -43
- package/dist/Form-es.js +0 -41
- package/dist/FormField/FormField.d.ts +0 -3
- package/dist/FormField/hooks/useAtlantisFormField.d.ts +0 -91
- package/dist/FormField/hooks/useAtlantisFormFieldActions.d.ts +0 -22
- package/dist/FormField/hooks/useAtlantisReactHookForm.d.ts +0 -20
- package/dist/FormField-cjs.js +0 -209
- package/dist/FormField-es.js +0 -204
- package/dist/InputPassword/InputPassword.d.ts +0 -13
- package/dist/InputPassword/index.cjs +0 -27
- package/dist/InputPassword/index.d.ts +0 -1
- package/dist/InputPassword/index.mjs +0 -21
- package/dist/InputPassword-cjs.js +0 -28
- package/dist/InputPassword-es.js +0 -26
- package/dist/docs/Form/Form.md +0 -106
- package/dist/docs/FormField/FormField.md +0 -93
- package/dist/docs/InputPassword/InputPassword.md +0 -52
|
@@ -20,6 +20,7 @@ require('../Glimmer-cjs.js');
|
|
|
20
20
|
require('../tslib.es6-cjs.js');
|
|
21
21
|
require('../Content-cjs.js');
|
|
22
22
|
require('../InputText-cjs.js');
|
|
23
|
+
require('../useAtlantisFormFieldName-cjs.js');
|
|
23
24
|
require('../FormFieldWrapper-cjs.js');
|
|
24
25
|
require('framer-motion');
|
|
25
26
|
require('../Button-cjs.js');
|
|
@@ -28,8 +29,6 @@ require('../useFormFieldFocus-cjs.js');
|
|
|
28
29
|
require('../InputValidation-cjs.js');
|
|
29
30
|
require('../FormFieldPostFix-cjs.js');
|
|
30
31
|
require('../Spinner-cjs.js');
|
|
31
|
-
require('../useAtlantisFormFieldName-cjs.js');
|
|
32
|
-
require('react-hook-form');
|
|
33
32
|
require('../mergeRefs-cjs.js');
|
|
34
33
|
require('../filterDataAttributes-cjs.js');
|
|
35
34
|
|
|
@@ -18,6 +18,7 @@ import '../Glimmer-es.js';
|
|
|
18
18
|
import '../tslib.es6-es.js';
|
|
19
19
|
import '../Content-es.js';
|
|
20
20
|
import '../InputText-es.js';
|
|
21
|
+
import '../useAtlantisFormFieldName-es.js';
|
|
21
22
|
import '../FormFieldWrapper-es.js';
|
|
22
23
|
import 'framer-motion';
|
|
23
24
|
import '../Button-es.js';
|
|
@@ -26,8 +27,6 @@ import '../useFormFieldFocus-es.js';
|
|
|
26
27
|
import '../InputValidation-es.js';
|
|
27
28
|
import '../FormFieldPostFix-es.js';
|
|
28
29
|
import '../Spinner-es.js';
|
|
29
|
-
import '../useAtlantisFormFieldName-es.js';
|
|
30
|
-
import 'react-hook-form';
|
|
31
30
|
import '../mergeRefs-es.js';
|
|
32
31
|
import '../filterDataAttributes-es.js';
|
|
33
32
|
|
package/dist/Autocomplete-cjs.js
CHANGED
|
@@ -14,10 +14,8 @@ var Icon = require('./Icon-cjs.js');
|
|
|
14
14
|
var Glimmer = require('./Glimmer-cjs.js');
|
|
15
15
|
var InputText = require('./InputText-cjs.js');
|
|
16
16
|
var FormFieldWrapper = require('./FormFieldWrapper-cjs.js');
|
|
17
|
-
require('./tslib.es6-cjs.js');
|
|
18
|
-
require('react-hook-form');
|
|
19
|
-
var mergeRefs = require('./mergeRefs-cjs.js');
|
|
20
17
|
require('./Button-cjs.js');
|
|
18
|
+
var mergeRefs = require('./mergeRefs-cjs.js');
|
|
21
19
|
var filterDataAttributes = require('./filterDataAttributes-cjs.js');
|
|
22
20
|
|
|
23
21
|
/** Stable empty array for cleared/empty selection state. Reuse to avoid reference churn. */
|
package/dist/Autocomplete-es.js
CHANGED
|
@@ -12,10 +12,8 @@ import { I as Icon } from './Icon-es.js';
|
|
|
12
12
|
import { G as Glimmer } from './Glimmer-es.js';
|
|
13
13
|
import { I as InputText } from './InputText-es.js';
|
|
14
14
|
import { c as FormFieldWrapper } from './FormFieldWrapper-es.js';
|
|
15
|
-
import './tslib.es6-es.js';
|
|
16
|
-
import 'react-hook-form';
|
|
17
|
-
import { m as mergeRefs } from './mergeRefs-es.js';
|
|
18
15
|
import './Button-es.js';
|
|
16
|
+
import { m as mergeRefs } from './mergeRefs-es.js';
|
|
19
17
|
import { f as filterDataAttributes } from './filterDataAttributes-es.js';
|
|
20
18
|
|
|
21
19
|
/** Stable empty array for cleared/empty selection state. Reuse to avoid reference churn. */
|
|
@@ -6,6 +6,7 @@ require('classnames');
|
|
|
6
6
|
require('@jobber/design');
|
|
7
7
|
require('@jobber/hooks');
|
|
8
8
|
require('../../../InputText-cjs.js');
|
|
9
|
+
require('../../../useAtlantisFormFieldName-cjs.js');
|
|
9
10
|
require('../../../FormFieldWrapper-cjs.js');
|
|
10
11
|
require('framer-motion');
|
|
11
12
|
require('../../../Button-cjs.js');
|
|
@@ -18,8 +19,6 @@ require('../../../useFormFieldFocus-cjs.js');
|
|
|
18
19
|
require('../../../InputValidation-cjs.js');
|
|
19
20
|
require('../../../FormFieldPostFix-cjs.js');
|
|
20
21
|
require('../../../Spinner-cjs.js');
|
|
21
|
-
require('../../../useAtlantisFormFieldName-cjs.js');
|
|
22
|
-
require('react-hook-form');
|
|
23
22
|
require('../../../mergeRefs-cjs.js');
|
|
24
23
|
require('../../../filterDataAttributes-cjs.js');
|
|
25
24
|
require('../../../DataListContext-cjs.js');
|
|
@@ -4,6 +4,7 @@ import 'classnames';
|
|
|
4
4
|
import '@jobber/design';
|
|
5
5
|
import '@jobber/hooks';
|
|
6
6
|
import '../../../InputText-es.js';
|
|
7
|
+
import '../../../useAtlantisFormFieldName-es.js';
|
|
7
8
|
import '../../../FormFieldWrapper-es.js';
|
|
8
9
|
import 'framer-motion';
|
|
9
10
|
import '../../../Button-es.js';
|
|
@@ -16,8 +17,6 @@ import '../../../useFormFieldFocus-es.js';
|
|
|
16
17
|
import '../../../InputValidation-es.js';
|
|
17
18
|
import '../../../FormFieldPostFix-es.js';
|
|
18
19
|
import '../../../Spinner-es.js';
|
|
19
|
-
import '../../../useAtlantisFormFieldName-es.js';
|
|
20
|
-
import 'react-hook-form';
|
|
21
20
|
import '../../../mergeRefs-es.js';
|
|
22
21
|
import '../../../filterDataAttributes-es.js';
|
|
23
22
|
import '../../../DataListContext-es.js';
|
package/dist/DataList/index.cjs
CHANGED
|
@@ -80,12 +80,11 @@ require('../DataListOverflowFade-cjs.js');
|
|
|
80
80
|
require('../DataListStickyHeader-cjs.js');
|
|
81
81
|
require('../DataListSearch-cjs.js');
|
|
82
82
|
require('../InputText-cjs.js');
|
|
83
|
+
require('../useAtlantisFormFieldName-cjs.js');
|
|
83
84
|
require('../FormFieldWrapper-cjs.js');
|
|
84
85
|
require('../useFormFieldFocus-cjs.js');
|
|
85
86
|
require('../InputValidation-cjs.js');
|
|
86
87
|
require('../FormFieldPostFix-cjs.js');
|
|
87
|
-
require('../useAtlantisFormFieldName-cjs.js');
|
|
88
|
-
require('react-hook-form');
|
|
89
88
|
require('../mergeRefs-cjs.js');
|
|
90
89
|
require('../DataListEmptyState-cjs.js');
|
|
91
90
|
require('../DataListLoadMore-cjs.js');
|
package/dist/DataList/index.mjs
CHANGED
|
@@ -78,12 +78,11 @@ import '../DataListOverflowFade-es.js';
|
|
|
78
78
|
import '../DataListStickyHeader-es.js';
|
|
79
79
|
import '../DataListSearch-es.js';
|
|
80
80
|
import '../InputText-es.js';
|
|
81
|
+
import '../useAtlantisFormFieldName-es.js';
|
|
81
82
|
import '../FormFieldWrapper-es.js';
|
|
82
83
|
import '../useFormFieldFocus-es.js';
|
|
83
84
|
import '../InputValidation-es.js';
|
|
84
85
|
import '../FormFieldPostFix-es.js';
|
|
85
|
-
import '../useAtlantisFormFieldName-es.js';
|
|
86
|
-
import 'react-hook-form';
|
|
87
86
|
import '../mergeRefs-es.js';
|
|
88
87
|
import '../DataListEmptyState-es.js';
|
|
89
88
|
import '../DataListLoadMore-es.js';
|
package/dist/DataTable/index.cjs
CHANGED
|
@@ -11,6 +11,7 @@ require('../Glimmer-cjs.js');
|
|
|
11
11
|
require('../tslib.es6-cjs.js');
|
|
12
12
|
require('../Content-cjs.js');
|
|
13
13
|
require('../Select-cjs.js');
|
|
14
|
+
require('../useAtlantisFormFieldName-cjs.js');
|
|
14
15
|
require('../FormFieldWrapper-cjs.js');
|
|
15
16
|
require('framer-motion');
|
|
16
17
|
require('@jobber/design');
|
|
@@ -23,8 +24,6 @@ require('../useFormFieldFocus-cjs.js');
|
|
|
23
24
|
require('../InputValidation-cjs.js');
|
|
24
25
|
require('../FormFieldPostFix-cjs.js');
|
|
25
26
|
require('../Spinner-cjs.js');
|
|
26
|
-
require('../useAtlantisFormFieldName-cjs.js');
|
|
27
|
-
require('react-hook-form');
|
|
28
27
|
require('../mergeRefs-cjs.js');
|
|
29
28
|
require('../filterDataAttributes-cjs.js');
|
|
30
29
|
|
package/dist/DataTable/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import '../Glimmer-es.js';
|
|
|
9
9
|
import '../tslib.es6-es.js';
|
|
10
10
|
import '../Content-es.js';
|
|
11
11
|
import '../Select-es.js';
|
|
12
|
+
import '../useAtlantisFormFieldName-es.js';
|
|
12
13
|
import '../FormFieldWrapper-es.js';
|
|
13
14
|
import 'framer-motion';
|
|
14
15
|
import '@jobber/design';
|
|
@@ -21,7 +22,5 @@ import '../useFormFieldFocus-es.js';
|
|
|
21
22
|
import '../InputValidation-es.js';
|
|
22
23
|
import '../FormFieldPostFix-es.js';
|
|
23
24
|
import '../Spinner-es.js';
|
|
24
|
-
import '../useAtlantisFormFieldName-es.js';
|
|
25
|
-
import 'react-hook-form';
|
|
26
25
|
import '../mergeRefs-es.js';
|
|
27
26
|
import '../filterDataAttributes-es.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ChangeEvent, ReactNode, RefObject } from "react";
|
|
2
2
|
import type React from "react";
|
|
3
|
-
import type { RegisterOptions } from "react-hook-form";
|
|
4
3
|
import type { XOR } from "ts-xor";
|
|
5
4
|
import type { Clearable } from "@jobber/hooks";
|
|
6
5
|
import type { IconNames } from "../Icon";
|
|
@@ -52,10 +51,7 @@ export interface CommonFormFieldProps {
|
|
|
52
51
|
*/
|
|
53
52
|
readonly invalid?: boolean;
|
|
54
53
|
/**
|
|
55
|
-
* Adjusts the form field to go inline with
|
|
56
|
-
* given `validations` prop. You'd have to used the `onValidate` prop to
|
|
57
|
-
* capture the message and render it somewhere else using the
|
|
58
|
-
* `InputValidation` component.
|
|
54
|
+
* Adjusts the form field to go inline with content.
|
|
59
55
|
*/
|
|
60
56
|
readonly inline?: boolean;
|
|
61
57
|
/**
|
|
@@ -100,13 +96,6 @@ export interface CommonFormFieldProps {
|
|
|
100
96
|
* set it to `always`.
|
|
101
97
|
*/
|
|
102
98
|
readonly clearable?: Clearable;
|
|
103
|
-
/**
|
|
104
|
-
* Experimental:
|
|
105
|
-
* Determine which version of the FormField to use.
|
|
106
|
-
* Right now this isn't used but it will be used in the future
|
|
107
|
-
* to allow us to release new versions of our form inputs without breaking existing functionality.
|
|
108
|
-
*/
|
|
109
|
-
version?: 1;
|
|
110
99
|
}
|
|
111
100
|
export interface FormFieldProps extends CommonFormFieldProps {
|
|
112
101
|
actionsRef?: RefObject<FieldActionsRef | null>;
|
|
@@ -190,11 +179,6 @@ export interface FormFieldProps extends CommonFormFieldProps {
|
|
|
190
179
|
* Determines what kind of form field should the component give you.
|
|
191
180
|
*/
|
|
192
181
|
readonly type?: FormFieldTypes;
|
|
193
|
-
/**
|
|
194
|
-
* Show an error message above the field. This also
|
|
195
|
-
* highlights the the field red if an error message shows up.
|
|
196
|
-
*/
|
|
197
|
-
readonly validations?: RegisterOptions;
|
|
198
182
|
/**
|
|
199
183
|
* Toolbar to render content below the input.
|
|
200
184
|
*/
|
package/dist/FormField/index.cjs
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var FormField = require('../FormField-cjs.js');
|
|
4
3
|
var useAtlantisFormFieldName = require('../useAtlantisFormFieldName-cjs.js');
|
|
5
4
|
var FormFieldWrapper = require('../FormFieldWrapper-cjs.js');
|
|
6
5
|
require('react');
|
|
7
|
-
require('../FormFieldPostFix-cjs.js');
|
|
8
|
-
require('classnames');
|
|
9
|
-
require('../Icon-cjs.js');
|
|
10
|
-
require('@jobber/design');
|
|
11
|
-
require('../Spinner-cjs.js');
|
|
12
|
-
require('../tslib.es6-cjs.js');
|
|
13
|
-
require('react-hook-form');
|
|
14
|
-
require('../mergeRefs-cjs.js');
|
|
15
6
|
require('@jobber/hooks');
|
|
16
7
|
require('framer-motion');
|
|
8
|
+
require('@jobber/design');
|
|
9
|
+
require('classnames');
|
|
17
10
|
require('../Button-cjs.js');
|
|
11
|
+
require('../tslib.es6-cjs.js');
|
|
18
12
|
require('react-router-dom');
|
|
13
|
+
require('../Icon-cjs.js');
|
|
19
14
|
require('../Typography-cjs.js');
|
|
20
15
|
require('../Text-cjs.js');
|
|
21
16
|
require('../useFormFieldFocus-cjs.js');
|
|
@@ -23,10 +18,6 @@ require('../InputValidation-cjs.js');
|
|
|
23
18
|
|
|
24
19
|
|
|
25
20
|
|
|
26
|
-
exports.FormField = FormField.FormField;
|
|
27
|
-
exports.useAtlantisFormField = FormField.useAtlantisFormField;
|
|
28
|
-
exports.useAtlantisFormFieldActions = FormField.useAtlantisFormFieldActions;
|
|
29
|
-
exports.useAtlantisReactHookForm = FormField.useAtlantisReactHookForm;
|
|
30
21
|
exports.useAtlantisFormFieldName = useAtlantisFormFieldName.useAtlantisFormFieldName;
|
|
31
22
|
exports.AffixIcon = FormFieldWrapper.AffixIcon;
|
|
32
23
|
exports.AffixLabel = FormFieldWrapper.AffixLabel;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
export * from "./FormField";
|
|
2
1
|
export type * from "./FormFieldTypes";
|
|
3
|
-
export { useAtlantisFormField } from "./hooks/useAtlantisFormField";
|
|
4
|
-
export { useAtlantisFormFieldActions } from "./hooks/useAtlantisFormFieldActions";
|
|
5
2
|
export { useAtlantisFormFieldName } from "./hooks/useAtlantisFormFieldName";
|
|
6
|
-
export { useAtlantisReactHookForm } from "./hooks/useAtlantisReactHookForm";
|
|
7
3
|
export { FormFieldInputHorizontalWrapper, FormFieldInputWrapperStyles, FormFieldLabel, FormFieldWrapper, FormFieldWrapperMain, FormFieldWrapperToolbar, type FormFieldWrapperProps, } from "./FormFieldWrapper";
|
|
8
4
|
export { AffixIcon, AffixLabel } from "./FormFieldAffix";
|
|
9
5
|
export { useFormFieldWrapperStyles, type useFormFieldWrapperStylesProps, } from "./hooks/useFormFieldWrapperStyles";
|
package/dist/FormField/index.mjs
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
export { F as FormField, u as useAtlantisFormField, a as useAtlantisFormFieldActions, b as useAtlantisReactHookForm } from '../FormField-es.js';
|
|
2
1
|
export { u as useAtlantisFormFieldName } from '../useAtlantisFormFieldName-es.js';
|
|
3
2
|
export { A as AffixIcon, f as AffixLabel, F as FormFieldInputHorizontalWrapper, a as FormFieldInputWrapperStyles, b as FormFieldLabel, c as FormFieldWrapper, d as FormFieldWrapperMain, e as FormFieldWrapperToolbar, u as useFormFieldWrapperStyles } from '../FormFieldWrapper-es.js';
|
|
4
3
|
import 'react';
|
|
5
|
-
import '../FormFieldPostFix-es.js';
|
|
6
|
-
import 'classnames';
|
|
7
|
-
import '../Icon-es.js';
|
|
8
|
-
import '@jobber/design';
|
|
9
|
-
import '../Spinner-es.js';
|
|
10
|
-
import '../tslib.es6-es.js';
|
|
11
|
-
import 'react-hook-form';
|
|
12
|
-
import '../mergeRefs-es.js';
|
|
13
4
|
import '@jobber/hooks';
|
|
14
5
|
import 'framer-motion';
|
|
6
|
+
import '@jobber/design';
|
|
7
|
+
import 'classnames';
|
|
15
8
|
import '../Button-es.js';
|
|
9
|
+
import '../tslib.es6-es.js';
|
|
16
10
|
import 'react-router-dom';
|
|
11
|
+
import '../Icon-es.js';
|
|
17
12
|
import '../Typography-es.js';
|
|
18
13
|
import '../Text-es.js';
|
|
19
14
|
import '../useFormFieldFocus-es.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FormFieldProps } from "../FormField";
|
|
2
2
|
import type { FocusEvents, HTMLInputBaseProps, KeyboardEvents, RebuiltInputCommonProps } from "../sharedHelpers/types";
|
|
3
|
-
export interface InputDateProps extends Omit<HTMLInputBaseProps, "maxLength">, FocusEvents<HTMLInputElement | HTMLTextAreaElement>, KeyboardEvents<HTMLInputElement | HTMLTextAreaElement>, Omit<RebuiltInputCommonProps, "clearable" | "prefix" | "suffix" | "showMiniLabel"
|
|
3
|
+
export interface InputDateProps extends Omit<HTMLInputBaseProps, "maxLength">, FocusEvents<HTMLInputElement | HTMLTextAreaElement>, KeyboardEvents<HTMLInputElement | HTMLTextAreaElement>, Omit<RebuiltInputCommonProps, "clearable" | "prefix" | "suffix" | "showMiniLabel"> {
|
|
4
4
|
/**
|
|
5
5
|
* A Date object value
|
|
6
6
|
* (e.g., `new Date("11/11/2011")`)
|
package/dist/InputDate/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ require('../_baseFlatten-cjs.js');
|
|
|
31
31
|
require('../_setToString-cjs.js');
|
|
32
32
|
require('../AtlantisContext-cjs.js');
|
|
33
33
|
require('../InputText-cjs.js');
|
|
34
|
+
require('../useAtlantisFormFieldName-cjs.js');
|
|
34
35
|
require('../FormFieldWrapper-cjs.js');
|
|
35
36
|
require('framer-motion');
|
|
36
37
|
require('../Text-cjs.js');
|
|
@@ -38,8 +39,6 @@ require('../useFormFieldFocus-cjs.js');
|
|
|
38
39
|
require('../InputValidation-cjs.js');
|
|
39
40
|
require('../FormFieldPostFix-cjs.js');
|
|
40
41
|
require('../Spinner-cjs.js');
|
|
41
|
-
require('../useAtlantisFormFieldName-cjs.js');
|
|
42
|
-
require('react-hook-form');
|
|
43
42
|
require('../mergeRefs-cjs.js');
|
|
44
43
|
require('../filterDataAttributes-cjs.js');
|
|
45
44
|
|
package/dist/InputDate/index.mjs
CHANGED
|
@@ -29,6 +29,7 @@ import '../_baseFlatten-es.js';
|
|
|
29
29
|
import '../_setToString-es.js';
|
|
30
30
|
import '../AtlantisContext-es.js';
|
|
31
31
|
import '../InputText-es.js';
|
|
32
|
+
import '../useAtlantisFormFieldName-es.js';
|
|
32
33
|
import '../FormFieldWrapper-es.js';
|
|
33
34
|
import 'framer-motion';
|
|
34
35
|
import '../Text-es.js';
|
|
@@ -36,7 +37,5 @@ import '../useFormFieldFocus-es.js';
|
|
|
36
37
|
import '../InputValidation-es.js';
|
|
37
38
|
import '../FormFieldPostFix-es.js';
|
|
38
39
|
import '../Spinner-es.js';
|
|
39
|
-
import '../useAtlantisFormFieldName-es.js';
|
|
40
|
-
import 'react-hook-form';
|
|
41
40
|
import '../mergeRefs-es.js';
|
|
42
41
|
import '../filterDataAttributes-es.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FormFieldProps } from "../FormField";
|
|
2
2
|
import type { FocusEvents, HTMLInputBaseProps, KeyboardEvents, MouseEvents, RebuiltInputCommonProps } from "../sharedHelpers/types";
|
|
3
|
-
export interface InputEmailProps extends HTMLInputBaseProps, FocusEvents<HTMLInputElement>, KeyboardEvents<HTMLInputElement>, MouseEvents<HTMLInputElement>, Omit<RebuiltInputCommonProps, "showMiniLabel"
|
|
3
|
+
export interface InputEmailProps extends HTMLInputBaseProps, FocusEvents<HTMLInputElement>, KeyboardEvents<HTMLInputElement>, MouseEvents<HTMLInputElement>, Omit<RebuiltInputCommonProps, "showMiniLabel"> {
|
|
4
4
|
/**
|
|
5
5
|
* The current value of the input.
|
|
6
6
|
*/
|
package/dist/InputEmail-cjs.js
CHANGED
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var mergeRefs = require('./mergeRefs-cjs.js');
|
|
5
5
|
var FormFieldWrapper = require('./FormFieldWrapper-cjs.js');
|
|
6
|
-
var FormFieldPostFix = require('./FormFieldPostFix-cjs.js');
|
|
7
6
|
require('classnames');
|
|
8
|
-
require('./tslib.es6-cjs.js');
|
|
9
|
-
require('react-hook-form');
|
|
10
7
|
require('./Button-cjs.js');
|
|
11
8
|
require('@jobber/design');
|
|
9
|
+
var FormFieldPostFix = require('./FormFieldPostFix-cjs.js');
|
|
12
10
|
var filterDataAttributes = require('./filterDataAttributes-cjs.js');
|
|
13
11
|
|
|
14
12
|
function useInputEmailActions({ onChange, inputRef, onEnter, onFocus, onBlur, onKeyDown, onKeyUp, onClick, onMouseDown, onMouseUp, onPointerDown, onPointerUp, }) {
|
package/dist/InputEmail-es.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React__default, { useRef, forwardRef, useId } from 'react';
|
|
2
2
|
import { m as mergeRefs } from './mergeRefs-es.js';
|
|
3
3
|
import { c as FormFieldWrapper, g as formFieldStyles } from './FormFieldWrapper-es.js';
|
|
4
|
-
import { F as FormFieldPostFix } from './FormFieldPostFix-es.js';
|
|
5
4
|
import 'classnames';
|
|
6
|
-
import './tslib.es6-es.js';
|
|
7
|
-
import 'react-hook-form';
|
|
8
5
|
import './Button-es.js';
|
|
9
6
|
import '@jobber/design';
|
|
7
|
+
import { F as FormFieldPostFix } from './FormFieldPostFix-es.js';
|
|
10
8
|
import { f as filterDataAttributes } from './filterDataAttributes-es.js';
|
|
11
9
|
|
|
12
10
|
function useInputEmailActions({ onChange, inputRef, onEnter, onFocus, onBlur, onKeyDown, onKeyUp, onClick, onMouseDown, onMouseUp, onPointerDown, onPointerUp, }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
2
|
import type { FocusEvents, HTMLInputBaseProps, KeyboardEvents, MouseEvents, RebuiltInputCommonProps } from "../sharedHelpers/types";
|
|
3
|
-
export interface InputNumberProps extends HTMLInputBaseProps, FocusEvents<HTMLInputElement>, KeyboardEvents<HTMLInputElement>, MouseEvents<HTMLInputElement>, Omit<RebuiltInputCommonProps, "clearable" | "suffix" | "prefix"
|
|
3
|
+
export interface InputNumberProps extends HTMLInputBaseProps, FocusEvents<HTMLInputElement>, KeyboardEvents<HTMLInputElement>, MouseEvents<HTMLInputElement>, Omit<RebuiltInputCommonProps, "clearable" | "suffix" | "prefix"> {
|
|
4
4
|
readonly defaultValue?: number;
|
|
5
5
|
readonly formatOptions?: Intl.NumberFormatOptions;
|
|
6
6
|
readonly maxValue?: number;
|
|
@@ -1,46 +1,8 @@
|
|
|
1
|
-
import type { ReactElement } from "react";
|
|
2
1
|
import React from "react";
|
|
3
|
-
import type { FormFieldProps } from "../FormField";
|
|
4
2
|
interface MaskElementProps {
|
|
5
3
|
readonly isMasking: boolean;
|
|
6
4
|
readonly formattedValue: string;
|
|
7
5
|
readonly placeholderMask: string;
|
|
8
6
|
}
|
|
9
7
|
export declare function MaskElement({ isMasking, formattedValue, placeholderMask, }: MaskElementProps): React.JSX.Element | null;
|
|
10
|
-
export interface InputMaskProps {
|
|
11
|
-
/**
|
|
12
|
-
* A string pattern to mask the value. For example:
|
|
13
|
-
*
|
|
14
|
-
* - Phone number: `(***) ***-*****` = `(555) 123-3456`
|
|
15
|
-
* - Hours and minutes: `**:**` = `01:20`
|
|
16
|
-
*
|
|
17
|
-
* By default, a `*` is used to indicate where a value would be in place. To
|
|
18
|
-
* change that, use the `delimiter` prop.
|
|
19
|
-
*/
|
|
20
|
-
readonly pattern: string;
|
|
21
|
-
/**
|
|
22
|
-
* Change the delimiter when you need to have a `*` as a value that the input
|
|
23
|
-
* returns. For example, you want your pattern to have a `*` in it.
|
|
24
|
-
*
|
|
25
|
-
* ```
|
|
26
|
-
* <InputMask pattern="n*n=n" delimiter="n" />
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* It would now replace `n` with the value you type and end up with `1*2=2` if
|
|
30
|
-
* you give a value of `122`.
|
|
31
|
-
*
|
|
32
|
-
* @default "*"
|
|
33
|
-
*/
|
|
34
|
-
readonly delimiter?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Allow/prevent users adding from more value than the desired pattern.
|
|
37
|
-
* For example, your pattern could accept 10 characters. If it's strict, your
|
|
38
|
-
* users can only type 10 characters.
|
|
39
|
-
*
|
|
40
|
-
* @default true
|
|
41
|
-
*/
|
|
42
|
-
readonly strict?: boolean;
|
|
43
|
-
readonly children: ReactElement<FormFieldProps>;
|
|
44
|
-
}
|
|
45
|
-
export declare function InputMask({ children, delimiter, pattern, strict, }: InputMaskProps): ReactElement<FormFieldProps, string | React.JSXElementConstructor<any>>;
|
|
46
8
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { InputMaskProps } from "./InputMask";
|
|
2
1
|
import type { FormFieldProps } from "../FormField";
|
|
3
2
|
import type { FocusEvents, HTMLInputBaseProps, KeyboardEvents, MouseEvents, RebuiltInputCommonProps } from "../sharedHelpers/types";
|
|
4
|
-
export interface InputPhoneNumberProps extends Omit<HTMLInputBaseProps, "type" | "maxLength" | "minLength">, FocusEvents<HTMLInputElement>, KeyboardEvents<HTMLInputElement>, MouseEvents<HTMLInputElement>, Omit<RebuiltInputCommonProps, "showMiniLabel"
|
|
3
|
+
export interface InputPhoneNumberProps extends Omit<HTMLInputBaseProps, "type" | "maxLength" | "minLength">, FocusEvents<HTMLInputElement>, KeyboardEvents<HTMLInputElement>, MouseEvents<HTMLInputElement>, Omit<RebuiltInputCommonProps, "showMiniLabel"> {
|
|
5
4
|
/**
|
|
6
5
|
* The current value of the input.
|
|
7
6
|
*/
|
|
@@ -20,6 +19,6 @@ export interface InputPhoneNumberProps extends Omit<HTMLInputBaseProps, "type" |
|
|
|
20
19
|
* you could set it to `** ** ** **`
|
|
21
20
|
* @default "(***) ***-****"
|
|
22
21
|
*/
|
|
23
|
-
readonly pattern?:
|
|
22
|
+
readonly pattern?: string;
|
|
24
23
|
}
|
|
25
24
|
export declare const DEFAULT_PATTERN = "(***) ***-****";
|
|
@@ -4,6 +4,7 @@ var InputPhoneNumber = require('../InputPhoneNumber-cjs.js');
|
|
|
4
4
|
require('../tslib.es6-cjs.js');
|
|
5
5
|
require('react');
|
|
6
6
|
require('classnames');
|
|
7
|
+
require('../useAtlantisFormFieldName-cjs.js');
|
|
7
8
|
require('../FormFieldWrapper-cjs.js');
|
|
8
9
|
require('@jobber/hooks');
|
|
9
10
|
require('framer-motion');
|
|
@@ -17,8 +18,6 @@ require('../useFormFieldFocus-cjs.js');
|
|
|
17
18
|
require('../InputValidation-cjs.js');
|
|
18
19
|
require('../FormFieldPostFix-cjs.js');
|
|
19
20
|
require('../Spinner-cjs.js');
|
|
20
|
-
require('../useAtlantisFormFieldName-cjs.js');
|
|
21
|
-
require('react-hook-form');
|
|
22
21
|
require('../filterDataAttributes-cjs.js');
|
|
23
22
|
|
|
24
23
|
|
|
@@ -2,6 +2,7 @@ export { I as InputPhoneNumber } from '../InputPhoneNumber-es.js';
|
|
|
2
2
|
import '../tslib.es6-es.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'classnames';
|
|
5
|
+
import '../useAtlantisFormFieldName-es.js';
|
|
5
6
|
import '../FormFieldWrapper-es.js';
|
|
6
7
|
import '@jobber/hooks';
|
|
7
8
|
import 'framer-motion';
|
|
@@ -15,6 +16,4 @@ import '../useFormFieldFocus-es.js';
|
|
|
15
16
|
import '../InputValidation-es.js';
|
|
16
17
|
import '../FormFieldPostFix-es.js';
|
|
17
18
|
import '../Spinner-es.js';
|
|
18
|
-
import '../useAtlantisFormFieldName-es.js';
|
|
19
|
-
import 'react-hook-form';
|
|
20
19
|
import '../filterDataAttributes-es.js';
|
|
@@ -3,16 +3,24 @@
|
|
|
3
3
|
var tslib_es6 = require('./tslib.es6-cjs.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var classnames = require('classnames');
|
|
6
|
-
var FormFieldWrapper = require('./FormFieldWrapper-cjs.js');
|
|
7
|
-
var FormFieldPostFix = require('./FormFieldPostFix-cjs.js');
|
|
8
6
|
var useAtlantisFormFieldName = require('./useAtlantisFormFieldName-cjs.js');
|
|
9
|
-
require('
|
|
7
|
+
var FormFieldWrapper = require('./FormFieldWrapper-cjs.js');
|
|
10
8
|
require('./Button-cjs.js');
|
|
11
9
|
require('@jobber/design');
|
|
10
|
+
var FormFieldPostFix = require('./FormFieldPostFix-cjs.js');
|
|
12
11
|
var filterDataAttributes = require('./filterDataAttributes-cjs.js');
|
|
13
12
|
|
|
14
13
|
var styles = {"mask":"_78-Lxj78xPg-","hiddenValue":"GoiXVXaU1Qs-","emptyValue":"oOrjwubmsVA-","spinning":"T3VvmDmzs-4-"};
|
|
15
14
|
|
|
15
|
+
function MaskElement({ isMasking, formattedValue, placeholderMask, }) {
|
|
16
|
+
if (!isMasking) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return (React.createElement("div", { className: styles.mask, "aria-hidden": "true" },
|
|
20
|
+
React.createElement("span", { className: styles.hiddenValue }, formattedValue),
|
|
21
|
+
React.createElement("span", null, placeholderMask)));
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
function useInputMask({ value = "", pattern, delimiter = "*", strict = true, onChange, }) {
|
|
17
25
|
const [isMasking, setIsMasking] = React.useState(!value);
|
|
18
26
|
const patternInfo = React.useMemo(() => {
|
|
@@ -76,15 +84,6 @@ function getMaskedValue(cleanVal, specialChars) {
|
|
|
76
84
|
};
|
|
77
85
|
}
|
|
78
86
|
|
|
79
|
-
function MaskElement({ isMasking, formattedValue, placeholderMask, }) {
|
|
80
|
-
if (!isMasking) {
|
|
81
|
-
return null;
|
|
82
|
-
}
|
|
83
|
-
return (React.createElement("div", { className: styles.mask, "aria-hidden": "true" },
|
|
84
|
-
React.createElement("span", { className: styles.hiddenValue }, formattedValue),
|
|
85
|
-
React.createElement("span", null, placeholderMask)));
|
|
86
|
-
}
|
|
87
|
-
|
|
88
87
|
const DEFAULT_PATTERN = "(***) ***-****";
|
|
89
88
|
|
|
90
89
|
/**
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import { _ as __rest } from './tslib.es6-es.js';
|
|
2
2
|
import React__default, { useState, useMemo, useCallback, useEffect, forwardRef, useId } from 'react';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import { c as FormFieldWrapper, g as formFieldStyles } from './FormFieldWrapper-es.js';
|
|
5
|
-
import { F as FormFieldPostFix } from './FormFieldPostFix-es.js';
|
|
6
4
|
import { u as useAtlantisFormFieldName } from './useAtlantisFormFieldName-es.js';
|
|
7
|
-
import '
|
|
5
|
+
import { c as FormFieldWrapper, g as formFieldStyles } from './FormFieldWrapper-es.js';
|
|
8
6
|
import './Button-es.js';
|
|
9
7
|
import '@jobber/design';
|
|
8
|
+
import { F as FormFieldPostFix } from './FormFieldPostFix-es.js';
|
|
10
9
|
import { f as filterDataAttributes } from './filterDataAttributes-es.js';
|
|
11
10
|
|
|
12
11
|
var styles = {"mask":"_78-Lxj78xPg-","hiddenValue":"GoiXVXaU1Qs-","emptyValue":"oOrjwubmsVA-","spinning":"T3VvmDmzs-4-"};
|
|
13
12
|
|
|
13
|
+
function MaskElement({ isMasking, formattedValue, placeholderMask, }) {
|
|
14
|
+
if (!isMasking) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return (React__default.createElement("div", { className: styles.mask, "aria-hidden": "true" },
|
|
18
|
+
React__default.createElement("span", { className: styles.hiddenValue }, formattedValue),
|
|
19
|
+
React__default.createElement("span", null, placeholderMask)));
|
|
20
|
+
}
|
|
21
|
+
|
|
14
22
|
function useInputMask({ value = "", pattern, delimiter = "*", strict = true, onChange, }) {
|
|
15
23
|
const [isMasking, setIsMasking] = useState(!value);
|
|
16
24
|
const patternInfo = useMemo(() => {
|
|
@@ -74,15 +82,6 @@ function getMaskedValue(cleanVal, specialChars) {
|
|
|
74
82
|
};
|
|
75
83
|
}
|
|
76
84
|
|
|
77
|
-
function MaskElement({ isMasking, formattedValue, placeholderMask, }) {
|
|
78
|
-
if (!isMasking) {
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
return (React__default.createElement("div", { className: styles.mask, "aria-hidden": "true" },
|
|
82
|
-
React__default.createElement("span", { className: styles.hiddenValue }, formattedValue),
|
|
83
|
-
React__default.createElement("span", null, placeholderMask)));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
85
|
const DEFAULT_PATTERN = "(***) ***-****";
|
|
87
86
|
|
|
88
87
|
/**
|
|
@@ -15,11 +15,7 @@ interface InputLengthConstraint {
|
|
|
15
15
|
*/
|
|
16
16
|
readonly maxLength?: number;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
* Experimental version 2 of the InputText component.
|
|
20
|
-
* Do not use unless you have talked with Atlantis first.
|
|
21
|
-
*/
|
|
22
|
-
export interface InputTextProps extends HTMLInputBaseProps, MouseEvents<HTMLInputElement | HTMLTextAreaElement>, FocusEvents<HTMLInputElement | HTMLTextAreaElement>, KeyboardEvents<HTMLInputElement | HTMLTextAreaElement>, Omit<RebuiltInputCommonProps, "version">, InputLengthConstraint {
|
|
18
|
+
export interface InputTextProps extends HTMLInputBaseProps, MouseEvents<HTMLInputElement | HTMLTextAreaElement>, FocusEvents<HTMLInputElement | HTMLTextAreaElement>, KeyboardEvents<HTMLInputElement | HTMLTextAreaElement>, RebuiltInputCommonProps, InputLengthConstraint {
|
|
23
19
|
/**
|
|
24
20
|
* When false, the placeholder text only serves as a standard placeholder and
|
|
25
21
|
* disappears when the user types, instead of floating above the value as a
|
package/dist/InputText/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var InputText = require('../InputText-cjs.js');
|
|
4
4
|
require('react');
|
|
5
5
|
require('@jobber/hooks');
|
|
6
|
+
require('../useAtlantisFormFieldName-cjs.js');
|
|
6
7
|
require('../FormFieldWrapper-cjs.js');
|
|
7
8
|
require('framer-motion');
|
|
8
9
|
require('@jobber/design');
|
|
@@ -17,8 +18,6 @@ require('../useFormFieldFocus-cjs.js');
|
|
|
17
18
|
require('../InputValidation-cjs.js');
|
|
18
19
|
require('../FormFieldPostFix-cjs.js');
|
|
19
20
|
require('../Spinner-cjs.js');
|
|
20
|
-
require('../useAtlantisFormFieldName-cjs.js');
|
|
21
|
-
require('react-hook-form');
|
|
22
21
|
require('../mergeRefs-cjs.js');
|
|
23
22
|
require('../filterDataAttributes-cjs.js');
|
|
24
23
|
|
package/dist/InputText/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { I as InputText } from '../InputText-es.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@jobber/hooks';
|
|
4
|
+
import '../useAtlantisFormFieldName-es.js';
|
|
4
5
|
import '../FormFieldWrapper-es.js';
|
|
5
6
|
import 'framer-motion';
|
|
6
7
|
import '@jobber/design';
|
|
@@ -15,7 +16,5 @@ import '../useFormFieldFocus-es.js';
|
|
|
15
16
|
import '../InputValidation-es.js';
|
|
16
17
|
import '../FormFieldPostFix-es.js';
|
|
17
18
|
import '../Spinner-es.js';
|
|
18
|
-
import '../useAtlantisFormFieldName-es.js';
|
|
19
|
-
import 'react-hook-form';
|
|
20
19
|
import '../mergeRefs-es.js';
|
|
21
20
|
import '../filterDataAttributes-es.js';
|
package/dist/InputText-cjs.js
CHANGED
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var jobberHooks = require('@jobber/hooks');
|
|
5
|
+
var useAtlantisFormFieldName = require('./useAtlantisFormFieldName-cjs.js');
|
|
5
6
|
var FormFieldWrapper = require('./FormFieldWrapper-cjs.js');
|
|
6
|
-
var FormFieldPostFix = require('./FormFieldPostFix-cjs.js');
|
|
7
7
|
require('classnames');
|
|
8
|
-
var useAtlantisFormFieldName = require('./useAtlantisFormFieldName-cjs.js');
|
|
9
|
-
require('./tslib.es6-cjs.js');
|
|
10
|
-
require('react-hook-form');
|
|
11
|
-
var mergeRefs = require('./mergeRefs-cjs.js');
|
|
12
8
|
require('./Button-cjs.js');
|
|
13
9
|
require('@jobber/design');
|
|
10
|
+
var FormFieldPostFix = require('./FormFieldPostFix-cjs.js');
|
|
11
|
+
var mergeRefs = require('./mergeRefs-cjs.js');
|
|
14
12
|
var filterDataAttributes = require('./filterDataAttributes-cjs.js');
|
|
15
13
|
|
|
16
14
|
/**
|