@natoora-libs/core 0.2.25 → 0.2.26-dev-doug-1

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.
@@ -79,6 +79,7 @@ type BaseAddressFormFields = {
79
79
  };
80
80
  type AddressFormFieldsProps = {
81
81
  form: UseFormReturn<BaseAddressFormFields>;
82
+ hidePrimaryPhoneNumberField?: boolean;
82
83
  countriesSelectProps: {
83
84
  countries: AddressCountry[];
84
85
  isCountriesFetching: boolean;
@@ -90,7 +91,7 @@ type AddressFormFieldsProps = {
90
91
  };
91
92
  googlePlacesAutocompleteProps?: GooglePlacesAddressAutocompleteProps;
92
93
  };
93
- declare const AddressFormFields: ({ form, countriesSelectProps: { countries, isCountriesFetching, refetchCountries }, statesSelectProps: { addressStates, isAddressStatesFetching }, googlePlacesAutocompleteProps, }: AddressFormFieldsProps) => react_jsx_runtime.JSX.Element;
94
+ declare const AddressFormFields: ({ form, hidePrimaryPhoneNumberField, countriesSelectProps: { countries, isCountriesFetching, refetchCountries }, statesSelectProps: { addressStates, isAddressStatesFetching }, googlePlacesAutocompleteProps, }: AddressFormFieldsProps) => react_jsx_runtime.JSX.Element;
94
95
 
95
96
  interface AlertDialogProps {
96
97
  open: boolean;
@@ -152,6 +153,7 @@ declare const AutocompleteFilterMenuContent: FC<AutocompleteFilterMenuContentPro
152
153
  interface BackHeaderProps {
153
154
  appName: string;
154
155
  onGoBackClick?: () => void;
156
+ sideComponent?: React.ReactElement;
155
157
  }
156
158
  declare const BackHeader: React.FC<BackHeaderProps>;
157
159
 
@@ -79,6 +79,7 @@ type BaseAddressFormFields = {
79
79
  };
80
80
  type AddressFormFieldsProps = {
81
81
  form: UseFormReturn<BaseAddressFormFields>;
82
+ hidePrimaryPhoneNumberField?: boolean;
82
83
  countriesSelectProps: {
83
84
  countries: AddressCountry[];
84
85
  isCountriesFetching: boolean;
@@ -90,7 +91,7 @@ type AddressFormFieldsProps = {
90
91
  };
91
92
  googlePlacesAutocompleteProps?: GooglePlacesAddressAutocompleteProps;
92
93
  };
93
- declare const AddressFormFields: ({ form, countriesSelectProps: { countries, isCountriesFetching, refetchCountries }, statesSelectProps: { addressStates, isAddressStatesFetching }, googlePlacesAutocompleteProps, }: AddressFormFieldsProps) => react_jsx_runtime.JSX.Element;
94
+ declare const AddressFormFields: ({ form, hidePrimaryPhoneNumberField, countriesSelectProps: { countries, isCountriesFetching, refetchCountries }, statesSelectProps: { addressStates, isAddressStatesFetching }, googlePlacesAutocompleteProps, }: AddressFormFieldsProps) => react_jsx_runtime.JSX.Element;
94
95
 
95
96
  interface AlertDialogProps {
96
97
  open: boolean;
@@ -152,6 +153,7 @@ declare const AutocompleteFilterMenuContent: FC<AutocompleteFilterMenuContentPro
152
153
  interface BackHeaderProps {
153
154
  appName: string;
154
155
  onGoBackClick?: () => void;
156
+ sideComponent?: React.ReactElement;
155
157
  }
156
158
  declare const BackHeader: React.FC<BackHeaderProps>;
157
159
 
@@ -833,6 +833,7 @@ var ADDRESS_FORM_FIELDS = [
833
833
  ];
834
834
  var AddressFormFields = ({
835
835
  form,
836
+ hidePrimaryPhoneNumberField = false,
836
837
  countriesSelectProps: { countries, isCountriesFetching, refetchCountries },
837
838
  statesSelectProps: { addressStates, isAddressStatesFetching },
838
839
  googlePlacesAutocompleteProps
@@ -897,7 +898,7 @@ var AddressFormFields = ({
897
898
  helperText: "Name this address for easier reference (e.g. Office, Home, etc.)."
898
899
  }
899
900
  ),
900
- /* @__PURE__ */ jsx6(
901
+ !hidePrimaryPhoneNumberField && /* @__PURE__ */ jsx6(
901
902
  Controller2,
902
903
  {
903
904
  control,
@@ -1883,12 +1884,15 @@ var AutocompleteFilterMenuContent = ({
1883
1884
 
1884
1885
  // src/components/BackHeader/BackHeader.tsx
1885
1886
  import { useNavigate } from "react-router";
1886
- import { KeyboardBackspace as KeyboardBackspaceIcon } from "@mui/icons-material";
1887
+ import KeyboardBackspace from "@mui/icons-material/KeyboardBackspace";
1887
1888
  import { Box as Box14, Button as Button6, Typography as Typography7 } from "@mui/material";
1888
1889
  import { makeStyles as makeStyles5 } from "tss-react/mui";
1889
1890
  import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
1890
1891
  var useStyles5 = makeStyles5()((theme) => ({
1891
1892
  header: {
1893
+ display: "flex",
1894
+ alignItems: "center",
1895
+ justifyContent: "space-between",
1892
1896
  padding: theme.spacing(2, 3),
1893
1897
  borderBottom: `1px solid ${colors.neutral400}`,
1894
1898
  backgroundColor: colors.neutral100
@@ -1909,7 +1913,11 @@ var useStyles5 = makeStyles5()((theme) => ({
1909
1913
  textTransform: "none"
1910
1914
  }
1911
1915
  }));
1912
- var BackHeader = ({ appName, onGoBackClick }) => {
1916
+ var BackHeader = ({
1917
+ appName,
1918
+ onGoBackClick,
1919
+ sideComponent = null
1920
+ }) => {
1913
1921
  const { classes } = useStyles5();
1914
1922
  const navigate = useNavigate();
1915
1923
  const handleBackClick = () => {
@@ -1918,10 +1926,13 @@ var BackHeader = ({ appName, onGoBackClick }) => {
1918
1926
  }
1919
1927
  return navigate(-1);
1920
1928
  };
1921
- return /* @__PURE__ */ jsx18(Box14, { component: "header", className: classes.header, children: /* @__PURE__ */ jsx18(Button6, { className: classes.button, onClick: handleBackClick, children: /* @__PURE__ */ jsxs14(Box14, { component: "span", className: classes.text, children: [
1922
- /* @__PURE__ */ jsx18(KeyboardBackspaceIcon, { className: classes.icon }),
1923
- /* @__PURE__ */ jsx18(Typography7, { variant: "body1", children: appName })
1924
- ] }) }) });
1929
+ return /* @__PURE__ */ jsxs14(Box14, { component: "header", className: classes.header, children: [
1930
+ /* @__PURE__ */ jsx18(Button6, { className: classes.button, onClick: handleBackClick, children: /* @__PURE__ */ jsxs14(Box14, { component: "span", className: classes.text, children: [
1931
+ /* @__PURE__ */ jsx18(KeyboardBackspace, { className: classes.icon }),
1932
+ /* @__PURE__ */ jsx18(Typography7, { variant: "body1", color: "textPrimary", children: appName })
1933
+ ] }) }),
1934
+ sideComponent
1935
+ ] });
1925
1936
  };
1926
1937
  var BackHeader_default = BackHeader;
1927
1938