@jobber/components 6.103.1 → 6.103.2-JOB-140609-f6002b5.12

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.
Files changed (59) hide show
  1. package/dist/Autocomplete/index.cjs +0 -12
  2. package/dist/Autocomplete/index.mjs +0 -12
  3. package/dist/Chips/InternalChipDismissible/hooks/index.cjs +2 -2
  4. package/dist/Chips/InternalChipDismissible/hooks/index.mjs +2 -2
  5. package/dist/Chips/InternalChipDismissible/index.cjs +2 -2
  6. package/dist/Chips/InternalChipDismissible/index.mjs +2 -2
  7. package/dist/Chips/index.cjs +2 -2
  8. package/dist/Chips/index.mjs +2 -2
  9. package/dist/DataList/components/DataListSearch/index.cjs +1 -12
  10. package/dist/DataList/components/DataListSearch/index.mjs +1 -12
  11. package/dist/DataList/index.cjs +0 -8
  12. package/dist/DataList/index.mjs +0 -8
  13. package/dist/DataTable/index.cjs +2 -2
  14. package/dist/DataTable/index.mjs +2 -2
  15. package/dist/DatePicker/index.cjs +2 -2
  16. package/dist/DatePicker/index.mjs +2 -2
  17. package/dist/FormField/FormFieldTypes.d.ts +195 -0
  18. package/dist/FormField-cjs.js +0 -1
  19. package/dist/FormField-es.js +1 -1
  20. package/dist/InputDate/index.cjs +8 -4
  21. package/dist/InputDate/index.mjs +8 -4
  22. package/dist/InputDate/useInputDateActivatorActions.d.ts +2 -2
  23. package/dist/InputEmail/InputEmail.types.d.ts +28 -21
  24. package/dist/InputEmail/hooks/useInputEmailActions.d.ts +1 -1
  25. package/dist/InputEmail/index.cjs +10 -45
  26. package/dist/InputEmail/index.mjs +10 -45
  27. package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +25 -24
  28. package/dist/InputPhoneNumber/hooks/useInputPhoneActions.d.ts +1 -1
  29. package/dist/InputPhoneNumber/index.cjs +24 -36
  30. package/dist/InputPhoneNumber/index.mjs +24 -36
  31. package/dist/InputText/InputText.d.ts +2 -2
  32. package/dist/InputText/InputText.types.d.ts +39 -24
  33. package/dist/InputText/index.cjs +26 -55
  34. package/dist/InputText/index.mjs +27 -56
  35. package/dist/InputText/useInputTextActions.d.ts +1 -1
  36. package/dist/InputTime/index.cjs +1 -1
  37. package/dist/InputTime/index.mjs +1 -1
  38. package/dist/List/index.cjs +2 -2
  39. package/dist/List/index.mjs +2 -2
  40. package/dist/RecurringSelect/index.cjs +2 -2
  41. package/dist/RecurringSelect/index.mjs +2 -2
  42. package/dist/Select/index.cjs +2 -2
  43. package/dist/Select/index.mjs +2 -2
  44. package/dist/_baseEach-cjs.js +12 -12
  45. package/dist/_baseEach-es.js +1 -1
  46. package/dist/_baseFlatten-cjs.js +2 -2
  47. package/dist/_baseFlatten-es.js +1 -1
  48. package/dist/{_baseGet-cjs.js → _getAllKeys-cjs.js} +181 -181
  49. package/dist/{_baseGet-es.js → _getAllKeys-es.js} +182 -182
  50. package/dist/index.cjs +2 -2
  51. package/dist/index.mjs +2 -2
  52. package/dist/omit-cjs.js +14 -14
  53. package/dist/omit-es.js +1 -1
  54. package/dist/useScrollToActive-cjs.js +3 -3
  55. package/dist/useScrollToActive-es.js +1 -1
  56. package/package.json +2 -2
  57. package/dist/InputEmail/hooks/useInputEmailFormField.d.ts +0 -32
  58. package/dist/InputPhoneNumber/hooks/useInputPhoneFormField.d.ts +0 -71
  59. package/dist/InputText/useInputTextFormField.d.ts +0 -352
@@ -20,18 +20,6 @@ require('react-hook-form');
20
20
  require('framer-motion');
21
21
  require('../Button-cjs.js');
22
22
  require('react-router-dom');
23
- require('../omit-cjs.js');
24
- require('../_commonjsHelpers-cjs.js');
25
- require('../_baseGet-cjs.js');
26
- require('../isTypedArray-cjs.js');
27
- require('../isObjectLike-cjs.js');
28
- require('../identity-cjs.js');
29
- require('../_getTag-cjs.js');
30
- require('../isSymbol-cjs.js');
31
- require('../keysIn-cjs.js');
32
- require('../_baseAssignValue-cjs.js');
33
- require('../_baseFlatten-cjs.js');
34
- require('../_setToString-cjs.js');
35
23
  require('../useFormFieldFocus-cjs.js');
36
24
  require('../InputValidation-cjs.js');
37
25
  require('../Spinner-cjs.js');
@@ -18,18 +18,6 @@ import 'react-hook-form';
18
18
  import 'framer-motion';
19
19
  import '../Button-es.js';
20
20
  import 'react-router-dom';
21
- import '../omit-es.js';
22
- import '../_commonjsHelpers-es.js';
23
- import '../_baseGet-es.js';
24
- import '../isTypedArray-es.js';
25
- import '../isObjectLike-es.js';
26
- import '../identity-es.js';
27
- import '../_getTag-es.js';
28
- import '../isSymbol-es.js';
29
- import '../keysIn-es.js';
30
- import '../_baseAssignValue-es.js';
31
- import '../_baseFlatten-es.js';
32
- import '../_setToString-es.js';
33
21
  import '../useFormFieldFocus-es.js';
34
22
  import '../InputValidation-es.js';
35
23
  import '../Spinner-es.js';
@@ -4,12 +4,12 @@ var useScrollToActive = require('../../../useScrollToActive-cjs.js');
4
4
  require('react');
5
5
  require('../../../_commonjsHelpers-cjs.js');
6
6
  require('../../../_baseFlatten-cjs.js');
7
- require('../../../_baseGet-cjs.js');
7
+ require('../../../_getAllKeys-cjs.js');
8
8
  require('../../../isTypedArray-cjs.js');
9
9
  require('../../../isObjectLike-cjs.js');
10
+ require('../../../isSymbol-cjs.js');
10
11
  require('../../../identity-cjs.js');
11
12
  require('../../../_getTag-cjs.js');
12
- require('../../../isSymbol-cjs.js');
13
13
  require('../../../_baseEach-cjs.js');
14
14
  require('../../../_baseFor-cjs.js');
15
15
  require('../../../_isIterateeCall-cjs.js');
@@ -2,12 +2,12 @@ export { b as useInView, u as useInternalChipDismissible, a as useInternalChipDi
2
2
  import 'react';
3
3
  import '../../../_commonjsHelpers-es.js';
4
4
  import '../../../_baseFlatten-es.js';
5
- import '../../../_baseGet-es.js';
5
+ import '../../../_getAllKeys-es.js';
6
6
  import '../../../isTypedArray-es.js';
7
7
  import '../../../isObjectLike-es.js';
8
+ import '../../../isSymbol-es.js';
8
9
  import '../../../identity-es.js';
9
10
  import '../../../_getTag-es.js';
10
- import '../../../isSymbol-es.js';
11
11
  import '../../../_baseEach-es.js';
12
12
  import '../../../_baseFor-es.js';
13
13
  import '../../../_isIterateeCall-es.js';
@@ -5,12 +5,12 @@ require('react');
5
5
  require('../../useScrollToActive-cjs.js');
6
6
  require('../../_commonjsHelpers-cjs.js');
7
7
  require('../../_baseFlatten-cjs.js');
8
- require('../../_baseGet-cjs.js');
8
+ require('../../_getAllKeys-cjs.js');
9
9
  require('../../isTypedArray-cjs.js');
10
10
  require('../../isObjectLike-cjs.js');
11
+ require('../../isSymbol-cjs.js');
11
12
  require('../../identity-cjs.js');
12
13
  require('../../_getTag-cjs.js');
13
- require('../../isSymbol-cjs.js');
14
14
  require('../../_baseEach-cjs.js');
15
15
  require('../../_baseFor-cjs.js');
16
16
  require('../../_isIterateeCall-cjs.js');
@@ -3,12 +3,12 @@ import 'react';
3
3
  import '../../useScrollToActive-es.js';
4
4
  import '../../_commonjsHelpers-es.js';
5
5
  import '../../_baseFlatten-es.js';
6
- import '../../_baseGet-es.js';
6
+ import '../../_getAllKeys-es.js';
7
7
  import '../../isTypedArray-es.js';
8
8
  import '../../isObjectLike-es.js';
9
+ import '../../isSymbol-es.js';
9
10
  import '../../identity-es.js';
10
11
  import '../../_getTag-es.js';
11
- import '../../isSymbol-es.js';
12
12
  import '../../_baseEach-es.js';
13
13
  import '../../_baseFor-es.js';
14
14
  import '../../_isIterateeCall-es.js';
@@ -7,12 +7,12 @@ var Chips = require('../Chips-cjs.js');
7
7
  require('../useScrollToActive-cjs.js');
8
8
  require('../_commonjsHelpers-cjs.js');
9
9
  require('../_baseFlatten-cjs.js');
10
- require('../_baseGet-cjs.js');
10
+ require('../_getAllKeys-cjs.js');
11
11
  require('../isTypedArray-cjs.js');
12
12
  require('../isObjectLike-cjs.js');
13
+ require('../isSymbol-cjs.js');
13
14
  require('../identity-cjs.js');
14
15
  require('../_getTag-cjs.js');
15
- require('../isSymbol-cjs.js');
16
16
  require('../_baseEach-cjs.js');
17
17
  require('../_baseFor-cjs.js');
18
18
  require('../_isIterateeCall-cjs.js');
@@ -5,12 +5,12 @@ export { C as Chips } from '../Chips-es.js';
5
5
  import '../useScrollToActive-es.js';
6
6
  import '../_commonjsHelpers-es.js';
7
7
  import '../_baseFlatten-es.js';
8
- import '../_baseGet-es.js';
8
+ import '../_getAllKeys-es.js';
9
9
  import '../isTypedArray-es.js';
10
10
  import '../isObjectLike-es.js';
11
+ import '../isSymbol-es.js';
11
12
  import '../identity-es.js';
12
13
  import '../_getTag-es.js';
13
- import '../isSymbol-es.js';
14
14
  import '../_baseEach-es.js';
15
15
  import '../_baseFor-es.js';
16
16
  import '../_isIterateeCall-es.js';
@@ -18,20 +18,9 @@ require('../../../useFormFieldFocus-cjs.js');
18
18
  require('../../../InputValidation-cjs.js');
19
19
  require('../../../Spinner-cjs.js');
20
20
  require('react-hook-form');
21
- require('../../../omit-cjs.js');
22
- require('../../../_commonjsHelpers-cjs.js');
23
- require('../../../_baseGet-cjs.js');
24
- require('../../../isTypedArray-cjs.js');
25
- require('../../../isObjectLike-cjs.js');
26
- require('../../../identity-cjs.js');
27
- require('../../../_getTag-cjs.js');
28
- require('../../../isSymbol-cjs.js');
29
- require('../../../keysIn-cjs.js');
30
- require('../../../_baseAssignValue-cjs.js');
31
- require('../../../_baseFlatten-cjs.js');
32
- require('../../../_setToString-cjs.js');
33
21
  require('../../../DataListContext-cjs.js');
34
22
  require('../../../noop-cjs.js');
23
+ require('../../../_commonjsHelpers-cjs.js');
35
24
  require('../../../DataList.const-cjs.js');
36
25
  require('../../../AnimatedSwitcher-cjs.js');
37
26
 
@@ -16,19 +16,8 @@ import '../../../useFormFieldFocus-es.js';
16
16
  import '../../../InputValidation-es.js';
17
17
  import '../../../Spinner-es.js';
18
18
  import 'react-hook-form';
19
- import '../../../omit-es.js';
20
- import '../../../_commonjsHelpers-es.js';
21
- import '../../../_baseGet-es.js';
22
- import '../../../isTypedArray-es.js';
23
- import '../../../isObjectLike-es.js';
24
- import '../../../identity-es.js';
25
- import '../../../_getTag-es.js';
26
- import '../../../isSymbol-es.js';
27
- import '../../../keysIn-es.js';
28
- import '../../../_baseAssignValue-es.js';
29
- import '../../../_baseFlatten-es.js';
30
- import '../../../_setToString-es.js';
31
19
  import '../../../DataListContext-es.js';
32
20
  import '../../../noop-es.js';
21
+ import '../../../_commonjsHelpers-es.js';
33
22
  import '../../../DataList.const-es.js';
34
23
  import '../../../AnimatedSwitcher-es.js';
@@ -81,14 +81,6 @@ require('../InputText/index.cjs');
81
81
  require('../FormField-cjs.js');
82
82
  require('../useFormFieldFocus-cjs.js');
83
83
  require('../InputValidation-cjs.js');
84
- require('../omit-cjs.js');
85
- require('../_baseGet-cjs.js');
86
- require('../identity-cjs.js');
87
- require('../isSymbol-cjs.js');
88
- require('../keysIn-cjs.js');
89
- require('../_baseAssignValue-cjs.js');
90
- require('../_baseFlatten-cjs.js');
91
- require('../_setToString-cjs.js');
92
84
  require('../DataListEmptyState-cjs.js');
93
85
  require('../DataListLoadMore-cjs.js');
94
86
  require('../DataListAction-cjs.js');
@@ -79,14 +79,6 @@ import '../InputText/index.mjs';
79
79
  import '../FormField-es.js';
80
80
  import '../useFormFieldFocus-es.js';
81
81
  import '../InputValidation-es.js';
82
- import '../omit-es.js';
83
- import '../_baseGet-es.js';
84
- import '../identity-es.js';
85
- import '../isSymbol-es.js';
86
- import '../keysIn-es.js';
87
- import '../_baseAssignValue-es.js';
88
- import '../_baseFlatten-es.js';
89
- import '../_setToString-es.js';
90
82
  import '../DataListEmptyState-es.js';
91
83
  import '../DataListLoadMore-es.js';
92
84
  import '../DataListAction-es.js';
@@ -13,12 +13,12 @@ require('../Content-cjs.js');
13
13
  require('../Select/index.cjs');
14
14
  require('../omit-cjs.js');
15
15
  require('../_commonjsHelpers-cjs.js');
16
- require('../_baseGet-cjs.js');
16
+ require('../_getAllKeys-cjs.js');
17
17
  require('../isTypedArray-cjs.js');
18
18
  require('../isObjectLike-cjs.js');
19
+ require('../isSymbol-cjs.js');
19
20
  require('../identity-cjs.js');
20
21
  require('../_getTag-cjs.js');
21
- require('../isSymbol-cjs.js');
22
22
  require('../keysIn-cjs.js');
23
23
  require('../_baseAssignValue-cjs.js');
24
24
  require('../_baseFlatten-cjs.js');
@@ -11,12 +11,12 @@ import '../Content-es.js';
11
11
  import '../Select/index.mjs';
12
12
  import '../omit-es.js';
13
13
  import '../_commonjsHelpers-es.js';
14
- import '../_baseGet-es.js';
14
+ import '../_getAllKeys-es.js';
15
15
  import '../isTypedArray-es.js';
16
16
  import '../isObjectLike-es.js';
17
+ import '../isSymbol-es.js';
17
18
  import '../identity-es.js';
18
19
  import '../_getTag-es.js';
19
- import '../isSymbol-es.js';
20
20
  import '../keysIn-es.js';
21
21
  import '../_baseAssignValue-es.js';
22
22
  import '../_baseFlatten-es.js';
@@ -16,12 +16,12 @@ require('../Icon-cjs.js');
16
16
  require('@jobber/design');
17
17
  require('../omit-cjs.js');
18
18
  require('../_commonjsHelpers-cjs.js');
19
- require('../_baseGet-cjs.js');
19
+ require('../_getAllKeys-cjs.js');
20
20
  require('../isTypedArray-cjs.js');
21
21
  require('../isObjectLike-cjs.js');
22
+ require('../isSymbol-cjs.js');
22
23
  require('../identity-cjs.js');
23
24
  require('../_getTag-cjs.js');
24
- require('../isSymbol-cjs.js');
25
25
  require('../keysIn-cjs.js');
26
26
  require('../_baseAssignValue-cjs.js');
27
27
  require('../_baseFlatten-cjs.js');
@@ -14,12 +14,12 @@ import '../Icon-es.js';
14
14
  import '@jobber/design';
15
15
  import '../omit-es.js';
16
16
  import '../_commonjsHelpers-es.js';
17
- import '../_baseGet-es.js';
17
+ import '../_getAllKeys-es.js';
18
18
  import '../isTypedArray-es.js';
19
19
  import '../isObjectLike-es.js';
20
+ import '../isSymbol-es.js';
20
21
  import '../identity-es.js';
21
22
  import '../_getTag-es.js';
22
- import '../isSymbol-es.js';
23
23
  import '../keysIn-es.js';
24
24
  import '../_baseAssignValue-es.js';
25
25
  import '../_baseFlatten-es.js';
@@ -7,6 +7,201 @@ import type { IconNames } from "../Icon";
7
7
  export type FormFieldTypes = "text" | "password" | "number" | "time" | "textarea" | "select" | "tel" | "email";
8
8
  export type KeyBoardTypes = "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal";
9
9
  export type AutocompleteTypes = "one-time-code" | "address-line1" | "address-line2";
10
+ /**
11
+ * ARIA attributes for accessibility.
12
+ * Common attributes that can be used across input components.
13
+ */
14
+ export interface AriaInputProps {
15
+ /**
16
+ * ARIA label for accessibility.
17
+ */
18
+ readonly "aria-label"?: string;
19
+ /**
20
+ * ARIA described-by for accessibility.
21
+ */
22
+ readonly "aria-describedby"?: string;
23
+ /**
24
+ * ARIA invalid state for accessibility.
25
+ */
26
+ readonly "aria-invalid"?: boolean | "true" | "false";
27
+ /**
28
+ * ARIA controls attribute.
29
+ */
30
+ readonly "aria-controls"?: string;
31
+ /**
32
+ * ARIA expanded state.
33
+ */
34
+ readonly "aria-expanded"?: boolean;
35
+ /**
36
+ * ARIA active descendant.
37
+ */
38
+ readonly "aria-activedescendant"?: string;
39
+ /**
40
+ * ARIA autocomplete attribute.
41
+ */
42
+ readonly "aria-autocomplete"?: "none" | "inline" | "list" | "both";
43
+ /**
44
+ * ARIA required attribute.
45
+ */
46
+ readonly "aria-required"?: boolean;
47
+ }
48
+ /**
49
+ * Focus event handlers for input elements.
50
+ * Generic interface that can be specialized for different element types.
51
+ */
52
+ export interface FocusEvents<Target = HTMLElement> {
53
+ /**
54
+ * Focus event handler.
55
+ */
56
+ readonly onFocus?: (event: React.FocusEvent<Target>) => void;
57
+ /**
58
+ * Blur event handler.
59
+ */
60
+ readonly onBlur?: (event: React.FocusEvent<Target>) => void;
61
+ }
62
+ /**
63
+ * Keyboard event handlers for input elements.
64
+ * Generic interface that can be specialized for different element types.
65
+ */
66
+ export interface KeyboardEvents<Target = HTMLElement> {
67
+ /**
68
+ * Key down event handler.
69
+ */
70
+ readonly onKeyDown?: (event: React.KeyboardEvent<Target>) => void;
71
+ /**
72
+ * Key up event handler.
73
+ */
74
+ readonly onKeyUp?: (event: React.KeyboardEvent<Target>) => void;
75
+ }
76
+ /**
77
+ * Curated set of HTML input attributes for rebuilt input components.
78
+ * This provides a whitelist of standard HTML/React props we want to support,
79
+ * avoiding the issues of extending React.InputHTMLAttributes directly.
80
+ * Note: Event handlers and ARIA attributes are separate - use FocusEvents, KeyboardEvents, and AriaInputProps.
81
+ */
82
+ export interface HTMLInputBaseProps extends AriaInputProps {
83
+ /**
84
+ * The unique identifier for the input element.
85
+ */
86
+ readonly id?: string;
87
+ /**
88
+ * The name attribute for the input element.
89
+ */
90
+ readonly name?: string;
91
+ /**
92
+ * Placeholder text that appears when the input is empty.
93
+ */
94
+ readonly placeholder?: string;
95
+ /**
96
+ * Whether the input is disabled.
97
+ */
98
+ readonly disabled?: boolean;
99
+ /**
100
+ * Whether the input is required.
101
+ */
102
+ readonly required?: boolean;
103
+ /**
104
+ * Whether the input is read-only (HTML standard casing).
105
+ */
106
+ readonly readOnly?: boolean;
107
+ /**
108
+ * Whether the input should be auto-focused (React casing).
109
+ */
110
+ readonly autoFocus?: boolean;
111
+ /**
112
+ * Autocomplete behavior for the input (React casing, string values only).
113
+ * Use standard HTML autocomplete values or "on"/"off".
114
+ */
115
+ readonly autoComplete?: string;
116
+ /**
117
+ * Maximum character length for the input (HTML validation only).
118
+ * Note: In v2, this does NOT affect the visual width of the component.
119
+ * Use CSS or the size prop for width control.
120
+ */
121
+ readonly maxLength?: number;
122
+ /**
123
+ * Minimum character length for the input.
124
+ */
125
+ readonly minLength?: number;
126
+ /**
127
+ * Maximum numerical value (for number inputs).
128
+ */
129
+ readonly max?: number | string;
130
+ /**
131
+ * Minimum numerical value (for number inputs).
132
+ */
133
+ readonly min?: number | string;
134
+ /**
135
+ * Validation pattern (regex) for the input.
136
+ */
137
+ readonly pattern?: string;
138
+ /**
139
+ * Input mode hint for virtual keyboards.
140
+ */
141
+ readonly inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
142
+ /**
143
+ * Role attribute for accessibility.
144
+ */
145
+ readonly role?: string;
146
+ /**
147
+ * Tab index for keyboard navigation.
148
+ */
149
+ readonly tabIndex?: number;
150
+ }
151
+ /**
152
+ * Common props shared across all rebuilt input components.
153
+ * These are Atlantis-specific features not part of standard HTML inputs.
154
+ */
155
+ export interface RebuiltInputCommonProps {
156
+ /**
157
+ * Error message to display. This also highlights the field red.
158
+ */
159
+ readonly error?: string;
160
+ /**
161
+ * Highlights the field red to indicate an error.
162
+ */
163
+ readonly invalid?: boolean;
164
+ /**
165
+ * Show a spinner to indicate loading.
166
+ */
167
+ readonly loading?: boolean;
168
+ /**
169
+ * Add a clear action on the input that clears the value.
170
+ */
171
+ readonly clearable?: Clearable;
172
+ /**
173
+ * Adjusts the interface to either have small or large spacing.
174
+ */
175
+ readonly size?: "small" | "large";
176
+ /**
177
+ * Adjusts the form field to go inline with content.
178
+ */
179
+ readonly inline?: boolean;
180
+ /**
181
+ * Determines the alignment of the text inside the input.
182
+ */
183
+ readonly align?: "center" | "right";
184
+ /**
185
+ * Adds a prefix label and icon to the field.
186
+ */
187
+ readonly prefix?: Affix;
188
+ /**
189
+ * Adds a suffix label and icon with an optional action to the field.
190
+ */
191
+ readonly suffix?: XOR<Affix, Suffix>;
192
+ /**
193
+ * Further description of the input, can be used for a hint.
194
+ */
195
+ readonly description?: ReactNode;
196
+ /**
197
+ * Children elements to render inside the component.
198
+ */
199
+ readonly children?: ReactNode;
200
+ /**
201
+ * Version 2 is highly experimental. Avoid using it unless you have talked with Atlantis first.
202
+ */
203
+ readonly version: 2;
204
+ }
10
205
  export interface FieldActionsRef {
11
206
  setValue(value: string | number): void;
12
207
  }
@@ -467,7 +467,6 @@ exports.FormFieldWrapper = FormFieldWrapper;
467
467
  exports.FormFieldWrapperMain = FormFieldWrapperMain;
468
468
  exports.FormFieldWrapperToolbar = FormFieldWrapperToolbar;
469
469
  exports.mergeRefs = mergeRefs;
470
- exports.styles = styles$1;
471
470
  exports.useAtlantisFormField = useAtlantisFormField;
472
471
  exports.useAtlantisFormFieldActions = useAtlantisFormFieldActions;
473
472
  exports.useAtlantisFormFieldName = useAtlantisFormFieldName;
@@ -454,4 +454,4 @@ function setAutocomplete(autocompleteSetting) {
454
454
  return autocompleteSetting;
455
455
  }
456
456
 
457
- export { AffixIcon as A, FormFieldInputHorizontalWrapper as F, useAtlantisFormFieldActions as a, useAtlantisFormFieldName as b, useAtlantisReactHookForm as c, FormFieldInputWrapperStyles as d, FormFieldLabel as e, FormFieldWrapper as f, FormFieldWrapperMain as g, FormFieldWrapperToolbar as h, AffixLabel as i, useFormFieldWrapperStyles as j, FormField as k, FormFieldPostFix as l, mergeRefs as m, styles$1 as s, useAtlantisFormField as u };
457
+ export { AffixIcon as A, FormFieldInputHorizontalWrapper as F, useAtlantisFormFieldActions as a, useAtlantisFormFieldName as b, useAtlantisReactHookForm as c, FormFieldInputWrapperStyles as d, FormFieldLabel as e, FormFieldWrapper as f, FormFieldWrapperMain as g, FormFieldWrapperToolbar as h, AffixLabel as i, useFormFieldWrapperStyles as j, FormField as k, FormFieldPostFix as l, mergeRefs as m, useAtlantisFormField as u };
@@ -13,12 +13,12 @@ require('../Button-cjs.js');
13
13
  var DatePicker = require('../DatePicker-cjs.js');
14
14
  var InputText_index = require('../InputText/index.cjs');
15
15
  require('../_commonjsHelpers-cjs.js');
16
- require('../_baseGet-cjs.js');
16
+ require('../_getAllKeys-cjs.js');
17
17
  require('../isTypedArray-cjs.js');
18
18
  require('../isObjectLike-cjs.js');
19
+ require('../isSymbol-cjs.js');
19
20
  require('../identity-cjs.js');
20
21
  require('../_getTag-cjs.js');
21
- require('../isSymbol-cjs.js');
22
22
  require('../keysIn-cjs.js');
23
23
  require('../_baseAssignValue-cjs.js');
24
24
  require('../_baseFlatten-cjs.js');
@@ -89,12 +89,16 @@ function useInputDateActivatorActions({ onChange, onBlur, onFocus, }) {
89
89
  onChange === null || onChange === void 0 ? void 0 : onChange(event);
90
90
  }
91
91
  function handleFocus(event) {
92
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
92
+ if (event) {
93
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
94
+ }
93
95
  setIsFocused(true);
94
96
  }
95
97
  function handleBlur(event) {
96
98
  setIsFocused(false);
97
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
99
+ if (event) {
100
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
101
+ }
98
102
  }
99
103
  return {
100
104
  handleBlur,
@@ -11,12 +11,12 @@ import '../Button-es.js';
11
11
  import { D as DatePicker } from '../DatePicker-es.js';
12
12
  import { InputText } from '../InputText/index.mjs';
13
13
  import '../_commonjsHelpers-es.js';
14
- import '../_baseGet-es.js';
14
+ import '../_getAllKeys-es.js';
15
15
  import '../isTypedArray-es.js';
16
16
  import '../isObjectLike-es.js';
17
+ import '../isSymbol-es.js';
17
18
  import '../identity-es.js';
18
19
  import '../_getTag-es.js';
19
- import '../isSymbol-es.js';
20
20
  import '../keysIn-es.js';
21
21
  import '../_baseAssignValue-es.js';
22
22
  import '../_baseFlatten-es.js';
@@ -87,12 +87,16 @@ function useInputDateActivatorActions({ onChange, onBlur, onFocus, }) {
87
87
  onChange === null || onChange === void 0 ? void 0 : onChange(event);
88
88
  }
89
89
  function handleFocus(event) {
90
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
90
+ if (event) {
91
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
92
+ }
91
93
  setIsFocused(true);
92
94
  }
93
95
  function handleBlur(event) {
94
96
  setIsFocused(false);
95
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
97
+ if (event) {
98
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
99
+ }
96
100
  }
97
101
  return {
98
102
  handleBlur,
@@ -9,8 +9,8 @@ export interface useInputDateActivatorActionsProps extends Pick<InputDateRebuilt
9
9
  * DO not repeat this pattern. We are doing this as a proof of concept relating to the refactoring of Form inputs to see what can be removed.
10
10
  */
11
11
  export declare function useInputDateActivatorActions({ onChange, onBlur, onFocus, }: useInputDateActivatorActionsProps): {
12
- handleBlur: (event: FocusEvent<HTMLInputElement>) => void;
12
+ handleBlur: (event?: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
13
13
  handleChange: (_: unknown, event?: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
14
- handleFocus: (event: FocusEvent<HTMLInputElement>) => void;
14
+ handleFocus: (event?: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
15
15
  isFocused: boolean;
16
16
  };
@@ -1,5 +1,4 @@
1
- import type { Clearable } from "@jobber/hooks";
2
- import type { CommonFormFieldProps, FormFieldProps } from "../FormField";
1
+ import type { CommonFormFieldProps, FocusEvents, FormFieldProps, HTMLInputBaseProps, KeyboardEvents, RebuiltInputCommonProps } from "../FormField";
3
2
  export type InputEmailLegacyProps = CommonFormFieldProps & Pick<FormFieldProps, "maxLength" | "readonly" | "validations" | "defaultValue">;
4
3
  export declare const validationMessage = "Please enter a valid email";
5
4
  export type InputEmailVersion = 1 | 2 | undefined;
@@ -7,27 +6,35 @@ export type InputEmailVersion = 1 | 2 | undefined;
7
6
  * Experimental version 2 of the InputEmail component.
8
7
  * Do not use unless you have talked with Atlantis first.
9
8
  */
10
- export interface InputEmailRebuiltProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "onBlur" | "size" | "suffix" | "prefix" | "value" | "max" | "min" | "defaultValue"> {
11
- readonly error?: string;
12
- readonly invalid?: boolean;
13
- readonly identifier?: string;
14
- readonly autocomplete?: boolean | string;
15
- readonly loading?: boolean;
16
- readonly onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
17
- readonly children?: React.ReactNode;
18
- readonly clearable?: Clearable;
9
+ export interface InputEmailRebuiltProps extends HTMLInputBaseProps, FocusEvents<HTMLInputElement>, KeyboardEvents<HTMLInputElement>, RebuiltInputCommonProps {
10
+ /**
11
+ * The current value of the input.
12
+ */
13
+ readonly value?: string;
19
14
  /**
20
- * Version 2 is highly experimental. Avoid using it unless you have talked with Atlantis first.
15
+ * Custom onChange handler that provides the new value as the first argument.
21
16
  */
22
- readonly version: 2;
23
17
  readonly onChange?: (newValue: string, event?: React.ChangeEvent<HTMLInputElement>) => void;
18
+ /**
19
+ * A callback to handle "Enter" keypress. This will only run
20
+ * if Enter is the only key. Will not run if Shift or Control
21
+ * are being held.
22
+ */
24
23
  readonly onEnter?: FormFieldProps["onEnter"];
25
- readonly onBlur?: FormFieldProps["onBlur"];
26
- readonly value?: string;
27
- readonly size?: FormFieldProps["size"];
28
- readonly inline?: FormFieldProps["inline"];
29
- readonly align?: FormFieldProps["align"];
30
- readonly prefix?: FormFieldProps["prefix"];
31
- readonly suffix?: FormFieldProps["suffix"];
32
- readonly description?: FormFieldProps["description"];
24
+ /**
25
+ * @deprecated Use `id` instead. This prop will be removed in a future version.
26
+ */
27
+ readonly identifier?: string;
28
+ /**
29
+ * @deprecated Use `autoComplete` with string values instead. This prop will be removed in a future version.
30
+ */
31
+ readonly autocomplete?: never;
32
+ /**
33
+ * @deprecated Use `aria-label` instead. This prop will be removed in a future version.
34
+ */
35
+ readonly ariaLabel?: never;
36
+ /**
37
+ * @deprecated Use `readOnly` instead. This prop will be removed in a future version.
38
+ */
39
+ readonly readonly?: never;
33
40
  }
@@ -8,5 +8,5 @@ export declare function useInputEmailActions({ onChange, inputRef, onEnter, onFo
8
8
  handleChange: (event: ChangeEvent<HTMLInputElement>) => void;
9
9
  handleKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
10
10
  handleFocus: (event: FocusEvent<HTMLInputElement>) => void;
11
- handleBlur: (event?: FocusEvent) => void;
11
+ handleBlur: (event: FocusEvent<HTMLInputElement>) => void;
12
12
  };