@jobber/components 6.103.2-JOB-140609-fafe469.18 → 6.103.2-JOB-135467-8ed574a.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.
Files changed (77) hide show
  1. package/dist/Autocomplete/Autocomplete.types.d.ts +1 -12
  2. package/dist/Autocomplete/index.cjs +12 -0
  3. package/dist/Autocomplete/index.mjs +12 -0
  4. package/dist/Button/Button.d.ts +757 -6
  5. package/dist/Button-cjs.js +15 -9
  6. package/dist/Button-es.js +16 -10
  7. package/dist/Checkbox/Checkbox.types.d.ts +9 -2
  8. package/dist/Checkbox/index.cjs +2 -3
  9. package/dist/Checkbox/index.mjs +2 -3
  10. package/dist/Chips/InternalChipDismissible/hooks/index.cjs +2 -2
  11. package/dist/Chips/InternalChipDismissible/hooks/index.mjs +2 -2
  12. package/dist/Chips/InternalChipDismissible/index.cjs +2 -2
  13. package/dist/Chips/InternalChipDismissible/index.mjs +2 -2
  14. package/dist/Chips/index.cjs +2 -2
  15. package/dist/Chips/index.mjs +2 -2
  16. package/dist/DataList/components/DataListSearch/index.cjs +12 -1
  17. package/dist/DataList/components/DataListSearch/index.mjs +12 -1
  18. package/dist/DataList/index.cjs +8 -0
  19. package/dist/DataList/index.mjs +8 -0
  20. package/dist/DataTable/index.cjs +2 -2
  21. package/dist/DataTable/index.mjs +2 -2
  22. package/dist/DatePicker/index.cjs +2 -2
  23. package/dist/DatePicker/index.mjs +2 -2
  24. package/dist/FormField/FormFieldTypes.d.ts +0 -195
  25. package/dist/FormField-cjs.js +1 -0
  26. package/dist/FormField-es.js +1 -1
  27. package/dist/InputDate/index.cjs +4 -8
  28. package/dist/InputDate/index.mjs +4 -8
  29. package/dist/InputDate/useInputDateActivatorActions.d.ts +2 -2
  30. package/dist/InputEmail/InputEmail.types.d.ts +21 -28
  31. package/dist/InputEmail/hooks/useInputEmailActions.d.ts +1 -1
  32. package/dist/InputEmail/hooks/useInputEmailFormField.d.ts +32 -0
  33. package/dist/InputEmail/index.cjs +45 -10
  34. package/dist/InputEmail/index.mjs +45 -10
  35. package/dist/InputNumber/InputNumber.rebuilt.types.d.ts +1 -30
  36. package/dist/InputNumber/index.cjs +2 -10
  37. package/dist/InputNumber/index.mjs +2 -10
  38. package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +24 -25
  39. package/dist/InputPhoneNumber/hooks/useInputPhoneActions.d.ts +1 -1
  40. package/dist/InputPhoneNumber/hooks/useInputPhoneFormField.d.ts +71 -0
  41. package/dist/InputPhoneNumber/index.cjs +36 -24
  42. package/dist/InputPhoneNumber/index.mjs +36 -24
  43. package/dist/InputText/InputText.d.ts +2 -2
  44. package/dist/InputText/InputText.types.d.ts +24 -39
  45. package/dist/InputText/index.cjs +55 -26
  46. package/dist/InputText/index.mjs +56 -27
  47. package/dist/InputText/useInputTextActions.d.ts +1 -1
  48. package/dist/InputText/useInputTextFormField.d.ts +352 -0
  49. package/dist/InputTime/InputTime.rebuilt.d.ts +1 -1
  50. package/dist/InputTime/InputTime.types.d.ts +1 -29
  51. package/dist/InputTime/index.cjs +25 -32
  52. package/dist/InputTime/index.d.ts +1 -1
  53. package/dist/InputTime/index.mjs +27 -34
  54. package/dist/List/index.cjs +2 -2
  55. package/dist/List/index.mjs +2 -2
  56. package/dist/RecurringSelect/index.cjs +2 -2
  57. package/dist/RecurringSelect/index.mjs +2 -2
  58. package/dist/Select/Select.rebuilt.d.ts +1 -1
  59. package/dist/Select/Select.types.d.ts +1 -18
  60. package/dist/Select/hooks/useSelectActions.d.ts +5 -5
  61. package/dist/Select/hooks/useSelectFormField.d.ts +34 -0
  62. package/dist/Select/index.cjs +41 -27
  63. package/dist/Select/index.d.ts +5 -7
  64. package/dist/Select/index.mjs +43 -29
  65. package/dist/_baseEach-cjs.js +12 -12
  66. package/dist/_baseEach-es.js +1 -1
  67. package/dist/_baseFlatten-cjs.js +2 -2
  68. package/dist/_baseFlatten-es.js +1 -1
  69. package/dist/{_getAllKeys-cjs.js → _baseGet-cjs.js} +181 -181
  70. package/dist/{_getAllKeys-es.js → _baseGet-es.js} +182 -182
  71. package/dist/index.cjs +2 -2
  72. package/dist/index.mjs +2 -2
  73. package/dist/omit-cjs.js +14 -14
  74. package/dist/omit-es.js +1 -1
  75. package/dist/useScrollToActive-cjs.js +3 -3
  76. package/dist/useScrollToActive-es.js +1 -1
  77. package/package.json +2 -2
@@ -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, KeyboardEvents } from "../FormField/FormFieldTypes";
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,37 +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">, AriaInputProps, FocusEvents<HTMLInputElement>, KeyboardEvents<HTMLInputElement> {
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
- * @deprecated Use `readOnly` (camelCase) instead.
33
- */
34
- readonly readonly?: boolean;
35
- /**
36
- * Whether the input is read-only.
37
- */
38
- readonly readOnly?: boolean;
39
- /**
40
- * @deprecated Use `autoComplete` (camelCase) instead.
41
- */
42
- readonly autocomplete?: boolean;
43
- /**
44
- * HTML autocomplete attribute for browser autofill.
45
- */
46
- readonly autoComplete?: string;
47
- /**
48
- * @deprecated Use `ref` instead. Note: `ref` support requires React 18+ forwardRef.
49
- */
50
- readonly inputRef?: FormFieldProps["inputRef"];
51
- /**
52
- * @deprecated Use `onKeyDown` or `onKeyUp` instead.
53
- */
54
- readonly onEnter?: FormFieldProps["onEnter"];
55
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,34 +204,23 @@ function timeStringToDate(timeString, baseDate) {
204
204
  }
205
205
  }
206
206
 
207
- const InputTimeRebuilt = React.forwardRef(function InputTimeRebuilt(_a, forwardedRef) {
208
- var _b;
209
- var { value, onChange,
210
- // Support both old and new prop names
211
- readonly, readOnly = readonly, autocomplete, autoComplete = typeof autocomplete === "string" ? autocomplete : undefined,
212
- // Deprecated props
213
- inputRef: deprecatedInputRef } = _a, params = tslib_es6.__rest(_a, ["value", "onChange", "readonly", "readOnly", "autocomplete", "autoComplete", "inputRef"]);
214
- const internalRef = React.useRef(null);
215
- const mergedRef = FormField.mergeRefs([
216
- internalRef,
217
- deprecatedInputRef,
218
- forwardedRef,
219
- ]);
220
- const id = params.id || React.useId();
221
- const wrapperRef = React.useRef(null);
222
- const { inputStyle } = FormField.useFormFieldWrapperStyles(params);
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);
223
211
  const { setTypedTime } = useTimePredict({
224
212
  value,
225
213
  handleChange,
226
214
  });
227
- 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: (_b = params.clearable) !== null && _b !== void 0 ? _b : "never", onClear: handleClear, type: "time", readonly: readOnly, placeholder: params.placeholder, value: dateToTimeString(value), wrapperRef: wrapperRef },
228
- React.createElement("input", { ref: mergedRef, type: "time", name: params.name, className: inputStyle, onBlur: handleBlur, id: id, disabled: params.disabled, readOnly: readOnly, autoComplete: autoComplete, onChange: handleChangeEvent, onFocus: handleFocus, onKeyDown: params.onKeyDown, onKeyUp: e => {
229
- var _a;
230
- (_a = params.onKeyUp) === null || _a === void 0 ? void 0 : _a.call(params, e);
231
- if (params.disabled || readOnly)
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)
232
221
  return;
233
222
  !isNaN(parseInt(e.key, 10)) && setTypedTime(prev => prev + e.key);
234
- }, "data-testid": "ATL-InputTime-input", value: dateToTimeString(value), "aria-label": params["aria-label"], "aria-describedby": params["aria-describedby"], "aria-invalid": params["aria-invalid"], "aria-required": params["aria-required"] })));
223
+ }, value: dateToTimeString(value) })));
235
224
  function handleChangeEvent(event) {
236
225
  handleChange(event.target.value);
237
226
  }
@@ -241,23 +230,27 @@ const InputTimeRebuilt = React.forwardRef(function InputTimeRebuilt(_a, forwarde
241
230
  function handleBlur(event) {
242
231
  var _a;
243
232
  (_a = params.onBlur) === null || _a === void 0 ? void 0 : _a.call(params, event);
244
- if (internalRef.current) {
245
- if (!internalRef.current.checkValidity()) {
246
- internalRef.current.value = "";
233
+ if (ref.current) {
234
+ if (!ref.current.checkValidity()) {
235
+ ref.current.value = "";
247
236
  }
248
237
  }
249
238
  }
250
239
  function handleClear() {
251
240
  var _a;
252
- // Clear the value and refocus without triggering blur event
241
+ handleBlur();
253
242
  onChange === null || onChange === void 0 ? void 0 : onChange(undefined);
254
- (_a = internalRef.current) === null || _a === void 0 ? void 0 : _a.focus();
243
+ (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
255
244
  }
256
245
  function handleFocus(event) {
257
246
  var _a;
258
247
  (_a = params.onFocus) === null || _a === void 0 ? void 0 : _a.call(params, event);
259
248
  }
260
- });
249
+ function getId(props) {
250
+ const generatedId = React.useId();
251
+ return props.id || generatedId;
252
+ }
253
+ }
261
254
 
262
255
  function InputTime$1(_a) {
263
256
  var { defaultValue, value, onChange } = _a, params = tslib_es6.__rest(_a, ["defaultValue", "value", "onChange"]);
@@ -289,13 +282,13 @@ function InputTime$1(_a) {
289
282
  function isNewInputTimeProps(props) {
290
283
  return props.version === 2;
291
284
  }
292
- const InputTime = React.forwardRef(function InputTimeShim(props, ref) {
285
+ function InputTime(props) {
293
286
  if (isNewInputTimeProps(props)) {
294
- return React.createElement(InputTimeRebuilt, Object.assign({}, props, { ref: ref }));
287
+ return React.createElement(InputTimeRebuilt, Object.assign({}, props));
295
288
  }
296
289
  else {
297
290
  return React.createElement(InputTime$1, Object.assign({}, props));
298
291
  }
299
- });
292
+ }
300
293
 
301
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;