@jobber/components 6.103.2-JOB-140609-8386817.45 → 6.103.3

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 (79) hide show
  1. package/dist/Autocomplete/Autocomplete.types.d.ts +1 -12
  2. package/dist/Autocomplete/index.cjs +13 -1
  3. package/dist/Autocomplete/index.mjs +13 -1
  4. package/dist/Checkbox/Checkbox.types.d.ts +9 -2
  5. package/dist/Checkbox/index.cjs +2 -4
  6. package/dist/Checkbox/index.mjs +2 -4
  7. package/dist/Chips/InternalChipDismissible/hooks/index.cjs +2 -2
  8. package/dist/Chips/InternalChipDismissible/hooks/index.mjs +2 -2
  9. package/dist/Chips/InternalChipDismissible/index.cjs +2 -2
  10. package/dist/Chips/InternalChipDismissible/index.mjs +2 -2
  11. package/dist/Chips/index.cjs +2 -2
  12. package/dist/Chips/index.mjs +2 -2
  13. package/dist/DataList/components/DataListSearch/index.cjs +12 -1
  14. package/dist/DataList/components/DataListSearch/index.mjs +12 -1
  15. package/dist/DataList/index.cjs +8 -0
  16. package/dist/DataList/index.mjs +8 -0
  17. package/dist/DataTable/index.cjs +2 -2
  18. package/dist/DataTable/index.mjs +2 -2
  19. package/dist/DatePicker/index.cjs +2 -2
  20. package/dist/DatePicker/index.mjs +2 -2
  21. package/dist/FormField/FormFieldTypes.d.ts +2 -0
  22. package/dist/FormField/hooks/useFormFieldWrapperStyles.d.ts +2 -7
  23. package/dist/FormField-cjs.js +6 -1
  24. package/dist/FormField-es.js +6 -2
  25. package/dist/InputDate/index.cjs +9 -5
  26. package/dist/InputDate/index.mjs +9 -5
  27. package/dist/InputDate/useInputDateActivatorActions.d.ts +8 -4
  28. package/dist/InputEmail/InputEmail.types.d.ts +20 -12
  29. package/dist/InputEmail/hooks/useInputEmailActions.d.ts +1 -1
  30. package/dist/InputEmail/hooks/useInputEmailFormField.d.ts +32 -0
  31. package/dist/InputEmail/index.cjs +44 -8
  32. package/dist/InputEmail/index.mjs +44 -8
  33. package/dist/InputNumber/InputNumber.rebuilt.types.d.ts +3 -20
  34. package/dist/InputNumber/index.cjs +3 -3
  35. package/dist/InputNumber/index.mjs +3 -3
  36. package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +27 -13
  37. package/dist/InputPhoneNumber/hooks/useInputPhoneActions.d.ts +1 -1
  38. package/dist/InputPhoneNumber/hooks/useInputPhoneFormField.d.ts +71 -0
  39. package/dist/InputPhoneNumber/index.cjs +34 -17
  40. package/dist/InputPhoneNumber/index.mjs +34 -17
  41. package/dist/InputText/InputText.types.d.ts +24 -24
  42. package/dist/InputText/index.cjs +54 -54
  43. package/dist/InputText/index.mjs +55 -55
  44. package/dist/InputText/useInputTextActions.d.ts +1 -1
  45. package/dist/InputText/useInputTextFormField.d.ts +352 -0
  46. package/dist/InputTime/InputTime.rebuilt.d.ts +1 -1
  47. package/dist/InputTime/InputTime.types.d.ts +1 -21
  48. package/dist/InputTime/index.cjs +33 -63
  49. package/dist/InputTime/index.d.ts +1 -1
  50. package/dist/InputTime/index.mjs +36 -66
  51. package/dist/List/index.cjs +2 -2
  52. package/dist/List/index.mjs +2 -2
  53. package/dist/RecurringSelect/index.cjs +2 -2
  54. package/dist/RecurringSelect/index.mjs +2 -2
  55. package/dist/Select/Select.rebuilt.d.ts +1 -1
  56. package/dist/Select/Select.types.d.ts +1 -14
  57. package/dist/Select/hooks/useSelectActions.d.ts +5 -5
  58. package/dist/Select/hooks/useSelectFormField.d.ts +34 -0
  59. package/dist/Select/index.cjs +41 -28
  60. package/dist/Select/index.d.ts +5 -7
  61. package/dist/Select/index.mjs +43 -30
  62. package/dist/Tabs-es.js +1 -1
  63. package/dist/_baseEach-cjs.js +12 -12
  64. package/dist/_baseEach-es.js +1 -1
  65. package/dist/_baseFlatten-cjs.js +2 -2
  66. package/dist/_baseFlatten-es.js +1 -1
  67. package/dist/{_getAllKeys-cjs.js → _baseGet-cjs.js} +181 -181
  68. package/dist/{_getAllKeys-es.js → _baseGet-es.js} +182 -182
  69. package/dist/debounce-es.js +1 -1
  70. package/dist/index.cjs +2 -2
  71. package/dist/index.mjs +2 -2
  72. package/dist/omit-cjs.js +14 -14
  73. package/dist/omit-es.js +1 -1
  74. package/dist/sharedHelpers/types.d.ts +0 -235
  75. package/dist/styles.css +18 -20
  76. package/dist/useScrollToActive-cjs.js +3 -3
  77. package/dist/useScrollToActive-es.js +2 -2
  78. package/package.json +2 -2
  79. package/dist/InputTime/hooks/useInputTimeActions.d.ts +0 -16
@@ -0,0 +1,352 @@
1
+ import type { ChangeEvent, FocusEvent, KeyboardEvent, ReactNode } from "react";
2
+ export interface useInputTextFormFieldProps extends React.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {
3
+ /**
4
+ * The html id for the field
5
+ */
6
+ readonly id: string;
7
+ /**
8
+ * The auto-generated name for the html input field if a nameProp is not provided
9
+ */
10
+ readonly name: string;
11
+ /**
12
+ * The error message for the field
13
+ */
14
+ readonly error?: string;
15
+ /**
16
+ * Adjusts the form field to go inline with a content. This also silences the
17
+ * given `validations` prop. You'd have to used the `onValidate` prop to
18
+ * capture the message and render it somewhere else using the
19
+ * `InputValidation` component.
20
+ */
21
+ readonly inline?: boolean;
22
+ /**
23
+ * Further description of the input, can be used for a hint.
24
+ */
25
+ readonly description?: ReactNode;
26
+ /**
27
+ * Callback for when the field value changes
28
+ */
29
+ handleChange: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
30
+ /**
31
+ * Callback for when the field loses focus
32
+ */
33
+ handleBlur: () => void;
34
+ /**
35
+ * Callback for when the field gains focus
36
+ */
37
+ handleFocus: (event: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
38
+ /**
39
+ * Callback for when keydown event is triggered on the field
40
+ */
41
+ handleKeyDown: (event: KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
42
+ readonly invalid?: boolean;
43
+ }
44
+ export interface UseInputTextFormFieldReturn {
45
+ fieldProps: React.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement>;
46
+ }
47
+ /**
48
+ * Provides the props for the html fields rendered by the html input.
49
+ * 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.
50
+ */
51
+ export declare function useInputTextFormField({ id, name, description, inline, handleChange, handleBlur, handleFocus, handleKeyDown, error, ...rest }: useInputTextFormFieldProps): {
52
+ fieldProps: {
53
+ "aria-invalid": boolean | undefined;
54
+ autoFocus: boolean | undefined;
55
+ invalid: string | undefined;
56
+ onKeyDown: (event: KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
57
+ "aria-describedby"?: string | undefined;
58
+ id: string;
59
+ className: string;
60
+ name: string;
61
+ disabled: boolean | undefined;
62
+ inputMode: "none" | "text" | "search" | "email" | "decimal" | "tel" | "url" | "numeric" | undefined;
63
+ onChange: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
64
+ onBlur: () => void;
65
+ onFocus: (event: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
66
+ accept?: string | undefined;
67
+ alt?: string | undefined;
68
+ autoComplete?: import("react").HTMLInputAutoCompleteAttribute | undefined;
69
+ capture?: boolean | "user" | "environment" | undefined;
70
+ checked?: boolean | undefined;
71
+ form?: string | undefined;
72
+ formAction?: string | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS] | undefined;
73
+ formEncType?: string | undefined;
74
+ formMethod?: string | undefined;
75
+ formNoValidate?: boolean | undefined;
76
+ formTarget?: string | undefined;
77
+ height?: number | string | undefined;
78
+ list?: string | undefined;
79
+ max?: number | string | undefined;
80
+ maxLength?: number | undefined;
81
+ min?: number | string | undefined;
82
+ minLength?: number | undefined;
83
+ multiple?: boolean | undefined;
84
+ pattern?: string | undefined;
85
+ placeholder?: string | undefined;
86
+ readOnly?: boolean | undefined;
87
+ required?: boolean | undefined;
88
+ size?: number | undefined;
89
+ src?: string | undefined;
90
+ step?: number | string | undefined;
91
+ type?: import("react").HTMLInputTypeAttribute | undefined;
92
+ value?: string | readonly string[] | number | undefined;
93
+ width?: number | string | undefined;
94
+ defaultChecked?: boolean | undefined;
95
+ defaultValue?: string | number | readonly string[] | undefined;
96
+ suppressContentEditableWarning?: boolean | undefined;
97
+ suppressHydrationWarning?: boolean | undefined;
98
+ accessKey?: string | undefined;
99
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
100
+ contentEditable?: (boolean | "false" | "true") | "inherit" | "plaintext-only" | undefined;
101
+ contextMenu?: string | undefined;
102
+ dir?: string | undefined;
103
+ draggable?: (boolean | "false" | "true") | undefined;
104
+ enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
105
+ hidden?: boolean | undefined;
106
+ lang?: string | undefined;
107
+ nonce?: string | undefined;
108
+ slot?: string | undefined;
109
+ spellCheck?: (boolean | "false" | "true") | undefined;
110
+ style?: import("react").CSSProperties | undefined;
111
+ tabIndex?: number | undefined;
112
+ title?: string | undefined;
113
+ translate?: "yes" | "no" | undefined;
114
+ radioGroup?: string | undefined;
115
+ role?: import("react").AriaRole | undefined;
116
+ about?: string | undefined;
117
+ content?: string | undefined;
118
+ datatype?: string | undefined;
119
+ inlist?: any;
120
+ prefix?: string | undefined;
121
+ property?: string | undefined;
122
+ rel?: string | undefined;
123
+ resource?: string | undefined;
124
+ rev?: string | undefined;
125
+ typeof?: string | undefined;
126
+ vocab?: string | undefined;
127
+ autoCorrect?: string | undefined;
128
+ autoSave?: string | undefined;
129
+ color?: string | undefined;
130
+ itemProp?: string | undefined;
131
+ itemScope?: boolean | undefined;
132
+ itemType?: string | undefined;
133
+ itemID?: string | undefined;
134
+ itemRef?: string | undefined;
135
+ results?: number | undefined;
136
+ security?: string | undefined;
137
+ unselectable?: "on" | "off" | undefined;
138
+ is?: string | undefined;
139
+ exportparts?: string | undefined;
140
+ part?: string | undefined;
141
+ "aria-activedescendant"?: string | undefined;
142
+ "aria-atomic"?: (boolean | "false" | "true") | undefined;
143
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
144
+ "aria-braillelabel"?: string | undefined;
145
+ "aria-brailleroledescription"?: string | undefined;
146
+ "aria-busy"?: (boolean | "false" | "true") | undefined;
147
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
148
+ "aria-colcount"?: number | undefined;
149
+ "aria-colindex"?: number | undefined;
150
+ "aria-colindextext"?: string | undefined;
151
+ "aria-colspan"?: number | undefined;
152
+ "aria-controls"?: string | undefined;
153
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
154
+ "aria-description"?: string | undefined;
155
+ "aria-details"?: string | undefined;
156
+ "aria-disabled"?: (boolean | "false" | "true") | undefined;
157
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
158
+ "aria-errormessage"?: string | undefined;
159
+ "aria-expanded"?: (boolean | "false" | "true") | undefined;
160
+ "aria-flowto"?: string | undefined;
161
+ "aria-grabbed"?: (boolean | "false" | "true") | undefined;
162
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
163
+ "aria-hidden"?: (boolean | "false" | "true") | undefined;
164
+ "aria-keyshortcuts"?: string | undefined;
165
+ "aria-label"?: string | undefined;
166
+ "aria-labelledby"?: string | undefined;
167
+ "aria-level"?: number | undefined;
168
+ "aria-live"?: "off" | "assertive" | "polite" | undefined;
169
+ "aria-modal"?: (boolean | "false" | "true") | undefined;
170
+ "aria-multiline"?: (boolean | "false" | "true") | undefined;
171
+ "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
172
+ "aria-orientation"?: "horizontal" | "vertical" | undefined;
173
+ "aria-owns"?: string | undefined;
174
+ "aria-placeholder"?: string | undefined;
175
+ "aria-posinset"?: number | undefined;
176
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
177
+ "aria-readonly"?: (boolean | "false" | "true") | undefined;
178
+ "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
179
+ "aria-required"?: (boolean | "false" | "true") | undefined;
180
+ "aria-roledescription"?: string | undefined;
181
+ "aria-rowcount"?: number | undefined;
182
+ "aria-rowindex"?: number | undefined;
183
+ "aria-rowindextext"?: string | undefined;
184
+ "aria-rowspan"?: number | undefined;
185
+ "aria-selected"?: (boolean | "false" | "true") | undefined;
186
+ "aria-setsize"?: number | undefined;
187
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
188
+ "aria-valuemax"?: number | undefined;
189
+ "aria-valuemin"?: number | undefined;
190
+ "aria-valuenow"?: number | undefined;
191
+ "aria-valuetext"?: string | undefined;
192
+ children?: ReactNode | undefined;
193
+ dangerouslySetInnerHTML?: {
194
+ __html: string | TrustedHTML;
195
+ } | undefined;
196
+ onCopy?: import("react").ClipboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
197
+ onCopyCapture?: import("react").ClipboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
198
+ onCut?: import("react").ClipboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
199
+ onCutCapture?: import("react").ClipboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
200
+ onPaste?: import("react").ClipboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
201
+ onPasteCapture?: import("react").ClipboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
202
+ onCompositionEnd?: import("react").CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
203
+ onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
204
+ onCompositionStart?: import("react").CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
205
+ onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
206
+ onCompositionUpdate?: import("react").CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
207
+ onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
208
+ onFocusCapture?: import("react").FocusEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
209
+ onBlurCapture?: import("react").FocusEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
210
+ onChangeCapture?: import("react").FormEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
211
+ onBeforeInput?: import("react").InputEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
212
+ onBeforeInputCapture?: import("react").FormEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
213
+ onInput?: import("react").FormEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
214
+ onInputCapture?: import("react").FormEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
215
+ onReset?: import("react").FormEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
216
+ onResetCapture?: import("react").FormEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
217
+ onSubmit?: import("react").FormEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
218
+ onSubmitCapture?: import("react").FormEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
219
+ onInvalid?: import("react").FormEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
220
+ onInvalidCapture?: import("react").FormEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
221
+ onLoad?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
222
+ onLoadCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
223
+ onError?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
224
+ onErrorCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
225
+ onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
226
+ onKeyPress?: import("react").KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
227
+ onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
228
+ onKeyUp?: import("react").KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
229
+ onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
230
+ onAbort?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
231
+ onAbortCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
232
+ onCanPlay?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
233
+ onCanPlayCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
234
+ onCanPlayThrough?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
235
+ onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
236
+ onDurationChange?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
237
+ onDurationChangeCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
238
+ onEmptied?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
239
+ onEmptiedCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
240
+ onEncrypted?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
241
+ onEncryptedCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
242
+ onEnded?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
243
+ onEndedCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
244
+ onLoadedData?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
245
+ onLoadedDataCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
246
+ onLoadedMetadata?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
247
+ onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
248
+ onLoadStart?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
249
+ onLoadStartCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
250
+ onPause?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
251
+ onPauseCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
252
+ onPlay?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
253
+ onPlayCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
254
+ onPlaying?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
255
+ onPlayingCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
256
+ onProgress?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
257
+ onProgressCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
258
+ onRateChange?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
259
+ onRateChangeCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
260
+ onSeeked?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
261
+ onSeekedCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
262
+ onSeeking?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
263
+ onSeekingCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
264
+ onStalled?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
265
+ onStalledCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
266
+ onSuspend?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
267
+ onSuspendCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
268
+ onTimeUpdate?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
269
+ onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
270
+ onVolumeChange?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
271
+ onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
272
+ onWaiting?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
273
+ onWaitingCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
274
+ onAuxClick?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
275
+ onAuxClickCapture?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
276
+ onClick?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
277
+ onClickCapture?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
278
+ onContextMenu?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
279
+ onContextMenuCapture?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
280
+ onDoubleClick?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
281
+ onDoubleClickCapture?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
282
+ onDrag?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
283
+ onDragCapture?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
284
+ onDragEnd?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
285
+ onDragEndCapture?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
286
+ onDragEnter?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
287
+ onDragEnterCapture?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
288
+ onDragExit?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
289
+ onDragExitCapture?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
290
+ onDragLeave?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
291
+ onDragLeaveCapture?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
292
+ onDragOver?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
293
+ onDragOverCapture?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
294
+ onDragStart?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
295
+ onDragStartCapture?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
296
+ onDrop?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
297
+ onDropCapture?: import("react").DragEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
298
+ onMouseDown?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
299
+ onMouseDownCapture?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
300
+ onMouseEnter?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
301
+ onMouseLeave?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
302
+ onMouseMove?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
303
+ onMouseMoveCapture?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
304
+ onMouseOut?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
305
+ onMouseOutCapture?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
306
+ onMouseOver?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
307
+ onMouseOverCapture?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
308
+ onMouseUp?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
309
+ onMouseUpCapture?: import("react").MouseEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
310
+ onSelect?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
311
+ onSelectCapture?: import("react").ReactEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
312
+ onTouchCancel?: import("react").TouchEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
313
+ onTouchCancelCapture?: import("react").TouchEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
314
+ onTouchEnd?: import("react").TouchEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
315
+ onTouchEndCapture?: import("react").TouchEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
316
+ onTouchMove?: import("react").TouchEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
317
+ onTouchMoveCapture?: import("react").TouchEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
318
+ onTouchStart?: import("react").TouchEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
319
+ onTouchStartCapture?: import("react").TouchEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
320
+ onPointerDown?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
321
+ onPointerDownCapture?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
322
+ onPointerMove?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
323
+ onPointerMoveCapture?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
324
+ onPointerUp?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
325
+ onPointerUpCapture?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
326
+ onPointerCancel?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
327
+ onPointerCancelCapture?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
328
+ onPointerEnter?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
329
+ onPointerLeave?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
330
+ onPointerOver?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
331
+ onPointerOverCapture?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
332
+ onPointerOut?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
333
+ onPointerOutCapture?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
334
+ onGotPointerCapture?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
335
+ onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
336
+ onLostPointerCapture?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
337
+ onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
338
+ onScroll?: import("react").UIEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
339
+ onScrollCapture?: import("react").UIEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
340
+ onWheel?: import("react").WheelEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
341
+ onWheelCapture?: import("react").WheelEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
342
+ onAnimationStart?: import("react").AnimationEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
343
+ onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
344
+ onAnimationEnd?: import("react").AnimationEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
345
+ onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
346
+ onAnimationIteration?: import("react").AnimationEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
347
+ onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
348
+ onTransitionEnd?: import("react").TransitionEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
349
+ onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
350
+ };
351
+ descriptionIdentifier: string;
352
+ };
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
2
  import type { InputTimeRebuiltProps } from "./InputTime.types";
3
- export declare const InputTimeRebuilt: React.ForwardRefExoticComponent<InputTimeRebuiltProps & React.RefAttributes<HTMLInputElement>>;
3
+ export declare function InputTimeRebuilt({ value, onChange, ...params }: InputTimeRebuiltProps): React.JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import type { CommonFormFieldProps, FormFieldProps } from "../FormField";
2
- import type { AriaInputProps, FocusEvents, InputConstraintProps, InputLengthConstraint, KeyboardEvents } from "../sharedHelpers/types";
3
2
  export interface InputTimeProps extends Pick<CommonFormFieldProps, "id" | "align" | "description" | "disabled" | "invalid" | "inline" | "loading" | "name" | "onValidation" | "placeholder" | "size" | "clearable">, Pick<FormFieldProps, "maxLength" | "readonly" | "autocomplete" | "max" | "min" | "onEnter" | "onFocus" | "onBlur" | "inputRef" | "validations"> {
4
3
  /**
5
4
  * Intial value of the input. Only use this when you need to prepopulate the
@@ -19,29 +18,10 @@ export interface InputTimeProps extends Pick<CommonFormFieldProps, "id" | "align
19
18
  export interface InputTimeLegacyProps extends InputTimeProps {
20
19
  version?: 1;
21
20
  }
22
- export interface InputTimeRebuiltProps extends Omit<InputTimeProps, "defaultValue" | "version" | "validations" | "onValidation" | "readonly" | "autocomplete" | "inputRef" | "onFocus" | "onBlur" | "onEnter" | "max" | "min" | "maxLength">, AriaInputProps, FocusEvents<HTMLInputElement>, KeyboardEvents<HTMLInputElement>, InputLengthConstraint, InputConstraintProps {
21
+ export interface InputTimeRebuiltProps extends Omit<InputTimeProps, "defaultValue" | "version" | "validations" | "onValidation"> {
23
22
  /**
24
23
  * Version 2 is highly experimental, avoid using it unless you have talked with Atlantis first.
25
24
  */
26
25
  version: 2;
27
- /**
28
- * Error message to display.
29
- */
30
26
  error?: string;
31
- /**
32
- * Whether the input is read-only.
33
- */
34
- readonly readOnly?: boolean;
35
- /**
36
- * HTML autocomplete attribute for browser autofill.
37
- */
38
- readonly autoComplete?: string;
39
- /**
40
- * @deprecated Use `ref` instead. Note: `ref` support requires React 18+ forwardRef.
41
- */
42
- readonly inputRef?: FormFieldProps["inputRef"];
43
- /**
44
- * @deprecated Use `onKeyDown` or `onKeyUp` instead.
45
- */
46
- readonly onEnter?: FormFieldProps["onEnter"];
47
27
  }
@@ -21,7 +21,7 @@ require('../useFormFieldFocus-cjs.js');
21
21
  require('../InputValidation-cjs.js');
22
22
  require('../Spinner-cjs.js');
23
23
  require('react-router-dom');
24
- require('../_getAllKeys-cjs.js');
24
+ require('../_baseGet-cjs.js');
25
25
  require('../isTypedArray-cjs.js');
26
26
  require('../identity-cjs.js');
27
27
  require('../_getTag-cjs.js');
@@ -204,7 +204,23 @@ function timeStringToDate(timeString, baseDate) {
204
204
  }
205
205
  }
206
206
 
207
- function useInputTimeActions({ onChange, value, inputRef, onFocus, onBlur, onKeyDown, }) {
207
+ function InputTimeRebuilt(_a) {
208
+ var _b, _c;
209
+ var { value, onChange } = _a, params = tslib_es6.__rest(_a, ["value", "onChange"]);
210
+ const ref = (_b = params.inputRef) !== null && _b !== void 0 ? _b : React.useRef(null);
211
+ const { setTypedTime } = useTimePredict({
212
+ value,
213
+ handleChange,
214
+ });
215
+ const { inputStyle } = FormField.useFormFieldWrapperStyles(params);
216
+ const wrapperRef = React.useRef(null);
217
+ const id = getId(params);
218
+ return (React.createElement(FormField.FormFieldWrapper, { disabled: params.disabled, size: params.size, align: params.align, inline: params.inline, name: params.name, error: params.error || "", identifier: id, descriptionIdentifier: `descriptionUUID--${id}`, invalid: Boolean(params.invalid), description: params.description, clearable: (_c = params.clearable) !== null && _c !== void 0 ? _c : "never", onClear: handleClear, type: "time", readonly: params.readonly, placeholder: params.placeholder, value: dateToTimeString(value), wrapperRef: wrapperRef },
219
+ React.createElement("input", { ref: ref, type: "time", name: params.name, className: inputStyle, onBlur: handleBlur, id: id, disabled: params.disabled, readOnly: params.readonly, onChange: handleChangeEvent, onFocus: handleFocus, "data-testid": "ATL-InputTime-input", onKeyUp: e => {
220
+ if (params.disabled || params.readonly)
221
+ return;
222
+ !isNaN(parseInt(e.key, 10)) && setTypedTime(prev => prev + e.key);
223
+ }, value: dateToTimeString(value) })));
208
224
  function handleChangeEvent(event) {
209
225
  handleChange(event.target.value);
210
226
  }
@@ -212,76 +228,30 @@ function useInputTimeActions({ onChange, value, inputRef, onFocus, onBlur, onKey
212
228
  onChange === null || onChange === void 0 ? void 0 : onChange(timeStringToDate(newValue, value));
213
229
  }
214
230
  function handleBlur(event) {
215
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
216
- if (inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) {
217
- if (!inputRef.current.checkValidity()) {
218
- inputRef.current.value = "";
231
+ var _a;
232
+ (_a = params.onBlur) === null || _a === void 0 ? void 0 : _a.call(params, event);
233
+ if (ref.current) {
234
+ if (!ref.current.checkValidity()) {
235
+ ref.current.value = "";
219
236
  }
220
237
  }
221
238
  }
222
239
  function handleClear() {
223
240
  var _a;
224
- // Clear the value and refocus without triggering blur event
241
+ handleBlur();
225
242
  onChange === null || onChange === void 0 ? void 0 : onChange(undefined);
226
- (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
243
+ (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
227
244
  }
228
245
  function handleFocus(event) {
229
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
246
+ var _a;
247
+ (_a = params.onFocus) === null || _a === void 0 ? void 0 : _a.call(params, event);
230
248
  }
231
- function handleKeyDown(event) {
232
- onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
249
+ function getId(props) {
250
+ const generatedId = React.useId();
251
+ return props.id || generatedId;
233
252
  }
234
- return {
235
- handleChangeEvent,
236
- handleChange,
237
- handleBlur,
238
- handleClear,
239
- handleFocus,
240
- handleKeyDown,
241
- };
242
253
  }
243
254
 
244
- const InputTimeRebuilt = React.forwardRef(function InputTimeRebuilt(_a, forwardedRef) {
245
- var _b;
246
- var { value, onChange, readOnly, autoComplete,
247
- // Deprecated props
248
- inputRef: deprecatedInputRef } = _a, params = tslib_es6.__rest(_a, ["value", "onChange", "readOnly", "autoComplete", "inputRef"]);
249
- const internalRef = React.useRef(null);
250
- const mergedRef = FormField.mergeRefs([
251
- internalRef,
252
- deprecatedInputRef,
253
- forwardedRef,
254
- ]);
255
- const id = params.id || React.useId();
256
- const wrapperRef = React.useRef(null);
257
- const { inputStyle } = FormField.useFormFieldWrapperStyles(params);
258
- const { handleChangeEvent, handleChange, handleBlur, handleClear, handleFocus, handleKeyDown, } = useInputTimeActions({
259
- onChange,
260
- value,
261
- readOnly,
262
- disabled: params.disabled,
263
- inputRef: internalRef,
264
- onFocus: params.onFocus,
265
- onBlur: params.onBlur,
266
- onKeyDown: params.onKeyDown,
267
- });
268
- const { setTypedTime } = useTimePredict({
269
- value,
270
- handleChange,
271
- });
272
- // Kept outside the useInputTimeActions hook to avoid circular dependency via setTypedTime and handleChange
273
- function handleKeyUp(event) {
274
- var _a;
275
- (_a = params.onKeyUp) === null || _a === void 0 ? void 0 : _a.call(params, event);
276
- if (params.disabled || readOnly)
277
- return;
278
- !isNaN(parseInt(event.key, 10)) && setTypedTime(prev => prev + event.key);
279
- }
280
- const isInvalid = Boolean(params.error || params.invalid);
281
- return (React.createElement(FormField.FormFieldWrapper, { disabled: params.disabled, size: params.size, align: params.align, inline: params.inline, name: params.name, error: params.error || "", identifier: id, descriptionIdentifier: `descriptionUUID--${id}`, invalid: Boolean(params.invalid), description: params.description, maxLength: params.maxLength, clearable: (_b = params.clearable) !== null && _b !== void 0 ? _b : "never", onClear: handleClear, type: "time", readonly: readOnly, placeholder: params.placeholder, value: dateToTimeString(value), wrapperRef: wrapperRef },
282
- React.createElement("input", { ref: mergedRef, type: "time", name: params.name, className: inputStyle, id: id, disabled: params.disabled, readOnly: readOnly, autoComplete: autoComplete, maxLength: params.maxLength, max: params.max, min: params.min, value: dateToTimeString(value), onChange: handleChangeEvent, onBlur: handleBlur, onFocus: handleFocus, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, "data-testid": "ATL-InputTime-input", "aria-label": params.ariaLabel, "aria-describedby": params.ariaDescribedBy, "aria-invalid": isInvalid ? true : undefined, "aria-required": params.ariaRequired })));
283
- });
284
-
285
255
  function InputTime$1(_a) {
286
256
  var { defaultValue, value, onChange } = _a, params = tslib_es6.__rest(_a, ["defaultValue", "value", "onChange"]);
287
257
  const ref = React.useRef(null);
@@ -312,13 +282,13 @@ function InputTime$1(_a) {
312
282
  function isNewInputTimeProps(props) {
313
283
  return props.version === 2;
314
284
  }
315
- const InputTime = React.forwardRef(function InputTimeShim(props, ref) {
285
+ function InputTime(props) {
316
286
  if (isNewInputTimeProps(props)) {
317
- return React.createElement(InputTimeRebuilt, Object.assign({}, props, { ref: ref }));
287
+ return React.createElement(InputTimeRebuilt, Object.assign({}, props));
318
288
  }
319
289
  else {
320
290
  return React.createElement(InputTime$1, Object.assign({}, props));
321
291
  }
322
- });
292
+ }
323
293
 
324
294
  exports.InputTime = InputTime;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import type { InputTimeLegacyProps, InputTimeRebuiltProps } from "./InputTime.types";
3
3
  export type InputTimeShimProps = InputTimeLegacyProps | InputTimeRebuiltProps;
4
- export declare const InputTime: React.ForwardRefExoticComponent<InputTimeShimProps & React.RefAttributes<HTMLInputElement>>;
4
+ export declare function InputTime(props: InputTimeShimProps): React.JSX.Element;