@jobber/components 8.6.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 -10
- 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/index.cjs +1 -2
- package/dist/InputDate/index.mjs +1 -2
- 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/InputPhoneNumber/InputMask.d.ts +0 -38
- package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +1 -2
- 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/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/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/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/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/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 -92
- package/dist/docs/InputPassword/InputPassword.md +0 -51
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# Form Field
|
|
2
|
-
|
|
3
|
-
FormField is a helper component that allows other components to use form logic.
|
|
4
|
-
Interacting with a component wrapped in a FormField will automatically update
|
|
5
|
-
the form value for the field used by the component.
|
|
6
|
-
|
|
7
|
-
## Related components
|
|
8
|
-
|
|
9
|
-
Refer to the [Form](../Form/Form.md) documentation to learn more about inputs
|
|
10
|
-
within a form.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Configuration
|
|
14
|
-
|
|
15
|
-
### Mobile
|
|
16
|
-
|
|
17
|
-
FormField should not be used to wrap separate instances of a given input
|
|
18
|
-
component, it should be done at the component level. For example, say you had
|
|
19
|
-
four SpecialInput components on a given form. Instead of the four SpecialInput
|
|
20
|
-
components in FormField, it would be better to go to the SpecialInput component
|
|
21
|
-
where it is exported and wrap it there.
|
|
22
|
-
|
|
23
|
-
```ts
|
|
24
|
-
// The SpecialInput implementation, without any form logic
|
|
25
|
-
function SpecialInputInternal(props) {
|
|
26
|
-
...
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// This is what would be exported and used by other views or components
|
|
30
|
-
export function SpecialInput(props) {
|
|
31
|
-
return (
|
|
32
|
-
<FormField name={props.name}>
|
|
33
|
-
{(field) => {
|
|
34
|
-
return (
|
|
35
|
-
<SpecialInput
|
|
36
|
-
...props
|
|
37
|
-
onChange={field.onChange}
|
|
38
|
-
value={field.value}
|
|
39
|
-
/>
|
|
40
|
-
);
|
|
41
|
-
}}
|
|
42
|
-
</FormField>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
## Props
|
|
49
|
-
|
|
50
|
-
### Web
|
|
51
|
-
|
|
52
|
-
| Prop | Type | Required | Default | Description |
|
|
53
|
-
|------|------|----------|---------|-------------|
|
|
54
|
-
| `actionsRef` | `RefObject<FieldActionsRef>` | No | — | |
|
|
55
|
-
| `align` | `"center" | "right"` | No | — | Determines the alignment of the text inside the input. |
|
|
56
|
-
| `autocomplete` | `AutocompleteTypes | boolean` | No | — | Determines if browser form autocomplete is enabled. Note that "one-time-code" is experimental and should not be used ... |
|
|
57
|
-
| `autofocus` | `boolean` | No | — | Determines if the input should be auto-focused, using the HTML attribute |
|
|
58
|
-
| `children` | `ReactNode` | No | — | If you need to pass in a children. For example, `<options>` inside `<select>`. |
|
|
59
|
-
| `clearable` | `Clearable` | No | — | Add a clear action on the input that clears the value. You should always use `while-editing` if you want the input t... |
|
|
60
|
-
| `defaultValue` | `Date | string` | No | — | Initial value of the input. Only use this when you need to pre-populate the field with a data that is not controlled ... |
|
|
61
|
-
| `description` | `ReactNode` | No | — | Further description of the input, can be used for a hint. |
|
|
62
|
-
| `disabled` | `boolean` | No | — | Disable the input |
|
|
63
|
-
| `id` | `string` | No | — | A unique identifier for the input. |
|
|
64
|
-
| `inline` | `boolean` | No | — | Adjusts the form field to go inline with a content. This also silences the given `validations` prop. You'd have to us... |
|
|
65
|
-
| `inputRef` | `RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>` | No | — | |
|
|
66
|
-
| `invalid` | `boolean` | No | — | Highlights the field red to indicate an error. |
|
|
67
|
-
| `keyboard` | `"decimal" | "numeric"` | No | — | Determines what kind of keyboard appears on mobile web. |
|
|
68
|
-
| `loading` | `boolean` | No | — | Show a spinner to indicate loading |
|
|
69
|
-
| `max` | `number` | No | — | Specifies the maximum numerical or date value that a user can type |
|
|
70
|
-
| `maxLength` | `number` | No | — | Maximum character length for an input. This also changes the width to roughly the same size as the max length. This i... |
|
|
71
|
-
| `min` | `number` | No | — | Specifies the minimum numerical or date value that a user can type |
|
|
72
|
-
| `name` | `string` | No | — | Name of the input. |
|
|
73
|
-
| `onBlur` | `(event?: FocusEvent<Element, Element>) => void` | No | — | Blur callback. |
|
|
74
|
-
| `onChange` | `(newValue: string | number | boolean | Date, event?: ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void` | No | — | onChange handler that provides the new value (or event) @param newValue @param event |
|
|
75
|
-
| `onEnter` | `(event: KeyboardEvent<Element>) => void` | No | — | A callback to handle "Enter" keypress. This will only run if Enter is the only key. Will not run if Shift or Control ... |
|
|
76
|
-
| `onFocus` | `(event?: FocusEvent<Element, Element>) => void` | No | — | Focus callback. |
|
|
77
|
-
| `onKeyUp` | `(event: KeyboardEvent<HTMLInputElement>) => void` | No | — | |
|
|
78
|
-
| `onValidation` | `(message: string) => void` | No | — | Callback to get the the status and message when validating a field @param message |
|
|
79
|
-
| `pattern` | `string` | No | — | Pattern is currently only used for the InputPhone type it is used to determine the format of the phone number and the... |
|
|
80
|
-
| `placeholder` | `string` | No | — | Text that appears inside the input when empty and floats above the value as a mini label once the user enters a value... |
|
|
81
|
-
| `prefix` | `Affix` | No | — | Adds a prefix label and icon to the field |
|
|
82
|
-
| `readonly` | `boolean` | No | — | Prevents users from editing the value. |
|
|
83
|
-
| `rows` | `number` | No | — | Exclusively for textareas. Specifies the visible height of a textarea. |
|
|
84
|
-
| `showMiniLabel` | `boolean` | No | `true` | Controls the visibility of the mini label that appears inside the input when a value is entered. By default, the plac... |
|
|
85
|
-
| `size` | `"large" | "small"` | No | — | Adjusts the interface to either have small or large spacing. |
|
|
86
|
-
| `suffix` | `{ onClick: () => void; readonly ariaLabel: string; readonly icon: IconNames; readonly label?: string; } | { onClick?: never; ariaLabel?: never; readonly label?: string; readonly icon?: IconNames; }` | No | — | Adds a suffix label and icon with an optional action to the field |
|
|
87
|
-
| `toolbar` | `ReactNode` | No | — | Toolbar to render content below the input. |
|
|
88
|
-
| `toolbarVisibility` | `"always" | "while-editing"` | No | — | Determines the visibility of the toolbar. |
|
|
89
|
-
| `type` | `FormFieldTypes` | No | — | Determines what kind of form field should the component give you. |
|
|
90
|
-
| `validations` | `RegisterOptions` | No | — | Show an error message above the field. This also highlights the the field red if an error message shows up. |
|
|
91
|
-
| `value` | `Date | number | string` | No | — | Set the component to the given value. |
|
|
92
|
-
| `wrapperRef` | `RefObject<HTMLDivElement>` | No | — | |
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Input Password
|
|
2
|
-
|
|
3
|
-
InputPassword is used to display a secure password input field.
|
|
4
|
-
|
|
5
|
-
## Design & usage guidelines
|
|
6
|
-
|
|
7
|
-
Use InputPassword for authentication flows where the user is required to enter a
|
|
8
|
-
password.
|
|
9
|
-
|
|
10
|
-
If you are building an experience for authentication that does not require
|
|
11
|
-
character-masking or are looking for more information regarding `validations`,
|
|
12
|
-
refer to [InputText](../InputText/InputText.md).
|
|
13
|
-
|
|
14
|
-
## Clearable
|
|
15
|
-
|
|
16
|
-
* **while-editing**: shows the clear button only while focused and when there is
|
|
17
|
-
a value. When focus leaves the field and its controls, the button is hidden.
|
|
18
|
-
* **always**: shows the clear button whenever there is a value, even when
|
|
19
|
-
blurred. Never shown when the field is empty.
|
|
20
|
-
* The clear button is not shown when the field is `disabled` or `readonly`.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## Props
|
|
24
|
-
|
|
25
|
-
### Web
|
|
26
|
-
|
|
27
|
-
| Prop | Type | Required | Default | Description |
|
|
28
|
-
|------|------|----------|---------|-------------|
|
|
29
|
-
| `align` | `"center" | "right"` | No | — | Determines the alignment of the text inside the input. |
|
|
30
|
-
| `autocomplete` | `AutocompleteTypes | boolean` | No | — | Determines if browser form autocomplete is enabled. Note that "one-time-code" is experimental and should not be used ... |
|
|
31
|
-
| `clearable` | `Clearable` | No | — | Add a clear action on the input that clears the value. You should always use `while-editing` if you want the input t... |
|
|
32
|
-
| `defaultValue` | `Date | string` | No | — | Initial value of the input. Only use this when you need to pre-populate the field with a data that is not controlled ... |
|
|
33
|
-
| `description` | `ReactNode` | No | — | Further description of the input, can be used for a hint. |
|
|
34
|
-
| `disabled` | `boolean` | No | — | Disable the input |
|
|
35
|
-
| `hasVisibility` | `boolean` | No | `false` | Display toggle to change the visibility of the password input |
|
|
36
|
-
| `id` | `string` | No | — | A unique identifier for the input. |
|
|
37
|
-
| `inline` | `boolean` | No | — | Adjusts the form field to go inline with a content. This also silences the given `validations` prop. You'd have to us... |
|
|
38
|
-
| `inputRef` | `RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>` | No | — | |
|
|
39
|
-
| `invalid` | `boolean` | No | — | Highlights the field red to indicate an error. |
|
|
40
|
-
| `loading` | `boolean` | No | — | Show a spinner to indicate loading |
|
|
41
|
-
| `name` | `string` | No | — | Name of the input. |
|
|
42
|
-
| `onBlur` | `(event?: FocusEvent<Element, Element>) => void` | No | — | Blur callback. |
|
|
43
|
-
| `onChange` | `(newValue: string) => void` | No | — | onChange handler that provides the new value (or event) |
|
|
44
|
-
| `onEnter` | `(event: KeyboardEvent<Element>) => void` | No | — | A callback to handle "Enter" keypress. This will only run if Enter is the only key. Will not run if Shift or Control ... |
|
|
45
|
-
| `onFocus` | `(event?: FocusEvent<Element, Element>) => void` | No | — | Focus callback. |
|
|
46
|
-
| `onValidation` | `(message: string) => void` | No | — | Callback to get the the status and message when validating a field @param message |
|
|
47
|
-
| `placeholder` | `string` | No | — | Text that appears inside the input when empty and floats above the value as a mini label once the user enters a value... |
|
|
48
|
-
| `showMiniLabel` | `boolean` | No | `true` | Controls the visibility of the mini label that appears inside the input when a value is entered. By default, the plac... |
|
|
49
|
-
| `size` | `"large" | "small"` | No | — | Adjusts the interface to either have small or large spacing. |
|
|
50
|
-
| `validations` | `RegisterOptions` | No | — | Show an error message above the field. This also highlights the the field red if an error message shows up. |
|
|
51
|
-
| `value` | `string` | No | — | Set the component to the given value. |
|