@jobber/components 6.5.4-MIKEpull--7d365c4.31 → 6.5.4

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.
@@ -85,7 +85,10 @@ export interface CommonFormFieldProps {
85
85
  */
86
86
  readonly clearable?: Clearable;
87
87
  /**
88
- * Which version of the Field to use
88
+ * Experimental:
89
+ * Determine which version of the FormField to use.
90
+ * Right now this isn't used but it will be used in the future
91
+ * to allow us to release new versions of our form inputs without breaking existing functionality
89
92
  */
90
93
  version?: 1;
91
94
  }
@@ -1,11 +1,11 @@
1
1
  import { FormFieldProps } from "../FormFieldTypes";
2
- interface useAtlantisReactFormProps extends Pick<FormFieldProps, "actionsRef" | "defaultValue" | "value" | "validations" | "inputRef"> {
2
+ interface useAtlantisReactHookFormProps extends Pick<FormFieldProps, "actionsRef" | "defaultValue" | "value" | "validations" | "inputRef"> {
3
3
  name: string;
4
4
  }
5
5
  /**
6
6
  * Hook used to manage the form state of a field through react-hook-form
7
7
  */
8
- export declare function useAtlantisReactForm({ actionsRef, name, defaultValue, value, validations, inputRef, }: useAtlantisReactFormProps): {
8
+ export declare function useAtlantisReactHookForm({ actionsRef, name, defaultValue, value, validations, inputRef, }: useAtlantisReactHookFormProps): {
9
9
  inputRefs: import("react").RefCallback<any>;
10
10
  useControllerField: {
11
11
  value: any;
@@ -23,5 +23,5 @@ exports.FormFieldWrapper = FormField.FormFieldWrapper;
23
23
  exports.useAtlantisFormField = FormField.useAtlantisFormField;
24
24
  exports.useAtlantisFormFieldActions = FormField.useAtlantisFormFieldActions;
25
25
  exports.useAtlantisFormFieldName = FormField.useAtlantisFormFieldName;
26
- exports.useAtlantisReactForm = FormField.useAtlantisReactForm;
26
+ exports.useAtlantisReactHookForm = FormField.useAtlantisReactHookForm;
27
27
  exports.useFormFieldWrapperStyles = FormField.useFormFieldWrapperStyles;
@@ -3,6 +3,6 @@ export * from "./FormFieldTypes";
3
3
  export { useAtlantisFormField } from "./hooks/useAtlantisFormField";
4
4
  export { useAtlantisFormFieldActions } from "./hooks/useAtlantisFormFieldActions";
5
5
  export { useAtlantisFormFieldName } from "./hooks/useAtlantisFormFieldName";
6
- export { useAtlantisReactForm } from "./hooks/useAtlantisReactHookForm";
6
+ export { useAtlantisReactHookForm } from "./hooks/useAtlantisReactHookForm";
7
7
  export { FormFieldWrapper } from "./FormFieldWrapper";
8
8
  export { useFormFieldWrapperStyles, useFormFieldWrapperStylesProps, } from "./hooks/useFormFieldWrapperStyles";
@@ -1,4 +1,4 @@
1
- export { e as FormField, F as FormFieldWrapper, u as useAtlantisFormField, a as useAtlantisFormFieldActions, b as useAtlantisFormFieldName, c as useAtlantisReactForm, d as useFormFieldWrapperStyles } from '../FormField-es.js';
1
+ export { e as FormField, F as FormFieldWrapper, u as useAtlantisFormField, a as useAtlantisFormFieldActions, b as useAtlantisFormFieldName, c as useAtlantisReactHookForm, d as useFormFieldWrapperStyles } from '../FormField-es.js';
2
2
  import 'react';
3
3
  import 'framer-motion';
4
4
  import '@jobber/design';
@@ -339,7 +339,7 @@ function mergeRefs(refs) {
339
339
  /**
340
340
  * Hook used to manage the form state of a field through react-hook-form
341
341
  */
342
- function useAtlantisReactForm({ actionsRef, name, defaultValue, value, validations, inputRef, }) {
342
+ function useAtlantisReactHookForm({ actionsRef, name, defaultValue, value, validations, inputRef, }) {
343
343
  var _a;
344
344
  const formContext = reactHookForm.useFormContext();
345
345
  // If there isn't a Form Context being provided, get a form for this field.
@@ -382,7 +382,7 @@ function FormField(props) {
382
382
  function FormFieldInternal(props) {
383
383
  const { actionsRef, autocomplete = true, children, defaultValue, description, disabled, id, inputRef, inline, keyboard, max, maxLength, min, name: nameProp, readonly, rows, loading, type = "text", validations, value, onChange, onEnter, onFocus, onBlur, onValidation, onKeyUp, clearable = "never", autofocus, } = props;
384
384
  const { name } = useAtlantisFormFieldName({ id, nameProp });
385
- const { errorMessage, inputRefs, useControllerField, setValue, onControllerBlur, onControllerChange, } = useAtlantisReactForm({
385
+ const { errorMessage, inputRefs, useControllerField, setValue, onControllerBlur, onControllerChange, } = useAtlantisReactHookForm({
386
386
  actionsRef,
387
387
  name,
388
388
  defaultValue,
@@ -455,5 +455,5 @@ exports.FormFieldWrapper = FormFieldWrapper;
455
455
  exports.useAtlantisFormField = useAtlantisFormField;
456
456
  exports.useAtlantisFormFieldActions = useAtlantisFormFieldActions;
457
457
  exports.useAtlantisFormFieldName = useAtlantisFormFieldName;
458
- exports.useAtlantisReactForm = useAtlantisReactForm;
458
+ exports.useAtlantisReactHookForm = useAtlantisReactHookForm;
459
459
  exports.useFormFieldWrapperStyles = useFormFieldWrapperStyles;
@@ -337,7 +337,7 @@ function mergeRefs(refs) {
337
337
  /**
338
338
  * Hook used to manage the form state of a field through react-hook-form
339
339
  */
340
- function useAtlantisReactForm({ actionsRef, name, defaultValue, value, validations, inputRef, }) {
340
+ function useAtlantisReactHookForm({ actionsRef, name, defaultValue, value, validations, inputRef, }) {
341
341
  var _a;
342
342
  const formContext = useFormContext();
343
343
  // If there isn't a Form Context being provided, get a form for this field.
@@ -380,7 +380,7 @@ function FormField(props) {
380
380
  function FormFieldInternal(props) {
381
381
  const { actionsRef, autocomplete = true, children, defaultValue, description, disabled, id, inputRef, inline, keyboard, max, maxLength, min, name: nameProp, readonly, rows, loading, type = "text", validations, value, onChange, onEnter, onFocus, onBlur, onValidation, onKeyUp, clearable = "never", autofocus, } = props;
382
382
  const { name } = useAtlantisFormFieldName({ id, nameProp });
383
- const { errorMessage, inputRefs, useControllerField, setValue, onControllerBlur, onControllerChange, } = useAtlantisReactForm({
383
+ const { errorMessage, inputRefs, useControllerField, setValue, onControllerBlur, onControllerChange, } = useAtlantisReactHookForm({
384
384
  actionsRef,
385
385
  name,
386
386
  defaultValue,
@@ -448,4 +448,4 @@ function setAutocomplete(autocompleteSetting) {
448
448
  return autocompleteSetting;
449
449
  }
450
450
 
451
- export { FormFieldWrapper as F, useAtlantisFormFieldActions as a, useAtlantisFormFieldName as b, useAtlantisReactForm as c, useFormFieldWrapperStyles as d, FormField as e, useAtlantisFormField as u };
451
+ export { FormFieldWrapper as F, useAtlantisFormFieldActions as a, useAtlantisFormFieldName as b, useAtlantisReactHookForm as c, useFormFieldWrapperStyles as d, FormField as e, useAtlantisFormField as u };
package/dist/index.cjs CHANGED
@@ -226,7 +226,7 @@ exports.FormFieldWrapper = FormField.FormFieldWrapper;
226
226
  exports.useAtlantisFormField = FormField.useAtlantisFormField;
227
227
  exports.useAtlantisFormFieldActions = FormField.useAtlantisFormFieldActions;
228
228
  exports.useAtlantisFormFieldName = FormField.useAtlantisFormFieldName;
229
- exports.useAtlantisReactForm = FormField.useAtlantisReactForm;
229
+ exports.useAtlantisReactHookForm = FormField.useAtlantisReactHookForm;
230
230
  exports.useFormFieldWrapperStyles = FormField.useFormFieldWrapperStyles;
231
231
  exports.FormatDate = FormatDate.FormatDate;
232
232
  exports.strFormatDate = FormatDate.strFormatDate;
package/dist/index.mjs CHANGED
@@ -35,7 +35,7 @@ export { E as Emphasis } from './Emphasis-es.js';
35
35
  export { F as FeatureSwitch } from './FeatureSwitch-es.js';
36
36
  export { F as Flex } from './Flex-es.js';
37
37
  export { F as Form } from './Form-es.js';
38
- export { e as FormField, F as FormFieldWrapper, u as useAtlantisFormField, a as useAtlantisFormFieldActions, b as useAtlantisFormFieldName, c as useAtlantisReactForm, d as useFormFieldWrapperStyles } from './FormField-es.js';
38
+ export { e as FormField, F as FormFieldWrapper, u as useAtlantisFormField, a as useAtlantisFormFieldActions, b as useAtlantisFormFieldName, c as useAtlantisReactHookForm, d as useFormFieldWrapperStyles } from './FormField-es.js';
39
39
  export { F as FormatDate, s as strFormatDate } from './FormatDate-es.js';
40
40
  export { F as FormatEmail } from './FormatEmail-es.js';
41
41
  export { F as FormatFile } from './FormatFile-es.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "6.5.4-MIKEpull--7d365c4.31+7d365c4c",
3
+ "version": "6.5.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -487,5 +487,5 @@
487
487
  "> 1%",
488
488
  "IE 10"
489
489
  ],
490
- "gitHead": "7d365c4cbcc3d1916832e726e6c660ac86b9c4ed"
490
+ "gitHead": "d54ef0a961372b9bd79eb11feaae6850ccf1b3a0"
491
491
  }