@jobber/components 6.109.1 → 6.109.2

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.
@@ -1,3 +1,4 @@
1
+ import type { Ref } from "react";
1
2
  import type { CommonFormFieldProps, FormFieldProps } from "../FormField";
2
3
  import type { FocusEvents, HTMLInputBaseProps, KeyboardEvents, MouseEvents, RebuiltInputCommonProps } from "../sharedHelpers/types";
3
4
  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"> {
@@ -28,7 +29,7 @@ export interface InputTimeRebuiltProps extends HTMLInputBaseProps, FocusEvents<H
28
29
  * Minimum numerical or date value.
29
30
  */
30
31
  readonly min?: number;
31
- readonly inputRef?: FormFieldProps["inputRef"];
32
+ readonly inputRef?: Ref<HTMLInputElement>;
32
33
  /**
33
34
  * @deprecated Use `onKeyDown` or `onKeyUp` instead.
34
35
  */
@@ -307,10 +307,7 @@ function InputTimeRebuilt(_a) {
307
307
  }
308
308
  function useInputTimeRefs(inputRef) {
309
309
  const internalRef = React.useRef(null);
310
- const mergedRef = FormField.mergeRefs([
311
- internalRef,
312
- inputRef,
313
- ]);
310
+ const mergedRef = FormField.mergeRefs([internalRef, inputRef]);
314
311
  const wrapperRef = React.useRef(null);
315
312
  return { internalRef, mergedRef, wrapperRef };
316
313
  }
@@ -305,11 +305,8 @@ function InputTimeRebuilt(_a) {
305
305
  }
306
306
  function useInputTimeRefs(inputRef) {
307
307
  const internalRef = useRef(null);
308
- const mergedRef = mergeRefs([
309
- internalRef,
310
- inputRef,
311
- ]);
312
- const wrapperRef = React__default.useRef(null);
308
+ const mergedRef = mergeRefs([internalRef, inputRef]);
309
+ const wrapperRef = useRef(null);
313
310
  return { internalRef, mergedRef, wrapperRef };
314
311
  }
315
312
 
@@ -1,3 +1,4 @@
1
+ import type { Ref } from "react";
1
2
  import type { CommonFormFieldProps, FormFieldProps } from "../FormField";
2
3
  import type { FocusEvents, HTMLInputBaseProps, RebuiltInputCommonProps } from "../sharedHelpers/types";
3
4
  export interface SelectLegacyProps extends Pick<CommonFormFieldProps, "id" | "align" | "description" | "disabled" | "invalid" | "inline" | "name" | "onValidation" | "placeholder" | "size" | "value" | "onChange">, Pick<FormFieldProps, "autofocus" | "onEnter" | "onBlur" | "onFocus" | "inputRef" | "wrapperRef" | "validations" | "children" | "prefix" | "suffix" | "defaultValue" | "version"> {
@@ -13,7 +14,7 @@ export interface SelectRebuiltProps extends Omit<HTMLInputBaseProps, "readOnly">
13
14
  defaultValue?: never;
14
15
  readonly value?: string | number;
15
16
  onChange?(newValue?: string | number): void;
16
- readonly inputRef?: FormFieldProps["inputRef"];
17
+ readonly inputRef?: Ref<HTMLSelectElement>;
17
18
  /**
18
19
  * @deprecated Use `onKeyDown` or `onKeyUp` instead.
19
20
  */
@@ -85,10 +85,7 @@ function SelectRebuilt(props) {
85
85
  }
86
86
  function useSelectRefs(inputRef) {
87
87
  const internalRef = React.useRef(null);
88
- const mergedRef = FormField.mergeRefs([
89
- internalRef,
90
- inputRef,
91
- ]);
88
+ const mergedRef = FormField.mergeRefs([internalRef, inputRef]);
92
89
  const wrapperRef = React.useRef(null);
93
90
  return { mergedRef, wrapperRef };
94
91
  }
@@ -83,10 +83,7 @@ function SelectRebuilt(props) {
83
83
  }
84
84
  function useSelectRefs(inputRef) {
85
85
  const internalRef = useRef(null);
86
- const mergedRef = mergeRefs([
87
- internalRef,
88
- inputRef,
89
- ]);
86
+ const mergedRef = mergeRefs([internalRef, inputRef]);
90
87
  const wrapperRef = useRef(null);
91
88
  return { mergedRef, wrapperRef };
92
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "6.109.1",
3
+ "version": "6.109.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -538,5 +538,5 @@
538
538
  "> 1%",
539
539
  "IE 10"
540
540
  ],
541
- "gitHead": "da8eeef3fc89f838d2668cf87aeee9311ce970ad"
541
+ "gitHead": "210d6b515ba31e1f62cfc7ef55633d733952cbd2"
542
542
  }