@shipengine/elements 0.37.20 → 0.38.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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { SE } from "@shipengine/alchemy";
3
- import { Templates } from "../components";
3
+ import { ValidationPreference } from "../components/address-preference-context";
4
4
  /**
5
5
  * @internal
6
6
  *
@@ -10,10 +10,10 @@ import { Templates } from "../components";
10
10
  */
11
11
  export declare const useAddressValidation: () => {
12
12
  errors: SE.CodedError[] | null;
13
- setValidationPreference: import("react").Dispatch<import("react").SetStateAction<Templates.ValidationPreference | undefined>>;
13
+ setValidationPreference: import("react").Dispatch<import("react").SetStateAction<ValidationPreference | undefined>>;
14
14
  validate: (addresses: {
15
15
  originAddress: SE.Address;
16
16
  returnAddress?: SE.Address;
17
- }) => Promise<Templates.ValidationPreference>;
18
- validationPreference: Templates.ValidationPreference | undefined;
17
+ }) => Promise<ValidationPreference>;
18
+ validationPreference: ValidationPreference | undefined;
19
19
  };
@@ -6,7 +6,6 @@ export type ElementsErrorHandler = (err: Error, context: {
6
6
  element?: string;
7
7
  }) => void;
8
8
  export interface ElementsContextValue {
9
- brandName?: string;
10
9
  environment: ElementsEnvironment;
11
10
  onError?: ElementsErrorHandler;
12
11
  }
@@ -16,7 +15,6 @@ export interface ElementsContextValue {
16
15
  export declare const ElementsContext: import("react").Context<ElementsContextValue | undefined>;
17
16
  export interface ElementsProviderProps {
18
17
  baseURL?: string;
19
- brandName?: string;
20
18
  children: JSX.Element;
21
19
  environment?: ElementsEnvironment;
22
20
  getToken: ShipEngineProps["getToken"];
@@ -26,7 +24,7 @@ export interface ElementsProviderProps {
26
24
  /**
27
25
  * @category Providers
28
26
  */
29
- export declare const ElementsProvider: ({ baseURL, brandName, children, environment, getToken, onError, }: ElementsProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
27
+ export declare const ElementsProvider: ({ baseURL, children, environment, getToken, onError, }: ElementsProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
30
28
  /**
31
29
  * Must be used within {@link ElementsProvider}
32
30
  *
@@ -567,6 +567,7 @@ declare const _default: {
567
567
  schema: {
568
568
  optionalLabel: string;
569
569
  };
570
+ required: string;
570
571
  schemaErrors: {
571
572
  notAValidPhoneNumber: string;
572
573
  mustAgreeToTerms: string;