@shipengine/elements 0.15.0 → 0.16.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.
Files changed (207) hide show
  1. package/components/add-funds-form/add-funds-form.d.ts +22 -0
  2. package/components/add-funds-form/add-funds-form.styles.d.ts +6 -0
  3. package/components/add-funds-form/add-funds-schema.d.ts +37 -0
  4. package/components/add-funds-form/index.d.ts +2 -0
  5. package/components/auto-funding-form/auto-funding-form.d.ts +8 -0
  6. package/components/auto-funding-form/auto-funding-form.styles.d.ts +1 -0
  7. package/components/{organisms/auto-funding-form → auto-funding-form}/auto-funding-schema.d.ts +10 -10
  8. package/components/auto-funding-form/index.d.ts +2 -0
  9. package/components/carrier-balance/carrier-balance.d.ts +4 -0
  10. package/components/carrier-balance/carrier-balance.styles.d.ts +1 -0
  11. package/components/carrier-balance/index.d.ts +1 -0
  12. package/components/field/create-field-controller.d.ts +4 -1
  13. package/components/field/credit-card-input/credit-card-input.d.ts +3 -0
  14. package/components/field/credit-card-input/index.d.ts +1 -0
  15. package/components/field/fields.d.ts +1 -0
  16. package/components/field/money-input/hooks/use-utils.d.ts +1 -1
  17. package/components/field/money-input/money-input.d.ts +1 -1
  18. package/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +1 -1
  19. package/components/form-portal/form-portal.d.ts +18 -0
  20. package/components/form-portal/index.d.ts +1 -0
  21. package/components/fund-and-purchase/fund-and-purchase.d.ts +15 -0
  22. package/components/fund-and-purchase/fund-and-purchase.styles.d.ts +1 -0
  23. package/components/fund-and-purchase/index.d.ts +1 -0
  24. package/components/index.d.ts +10 -0
  25. package/components/inline-label/index.d.ts +1 -0
  26. package/components/inline-label/inline-label.d.ts +6 -0
  27. package/components/items-breakdown/items-breakdown.d.ts +1 -1
  28. package/components/link-action/index.d.ts +1 -0
  29. package/components/link-action/link-action.d.ts +12 -0
  30. package/components/manage-funding/manage-funding.d.ts +4 -0
  31. package/components/portal/portal.d.ts +1 -1
  32. package/components/settings-card/settings-card.d.ts +6 -1
  33. package/components/settings-card/settings-card.styles.d.ts +1 -6
  34. package/components/spread/index.d.ts +1 -0
  35. package/components/spread/spread.d.ts +5 -0
  36. package/components/story-notes/index.d.ts +1 -0
  37. package/components/story-notes/story-notes.d.ts +11 -0
  38. package/components/templates/{billing-form/billing-schema.d.ts → add-carrier-form/add-carrier-form-schema.d.ts} +38 -109
  39. package/components/templates/add-carrier-form/add-carrier-form-test.d.ts +1 -0
  40. package/components/templates/add-carrier-form/add-carrier-form.d.ts +10 -0
  41. package/components/templates/add-carrier-form/index.d.ts +2 -0
  42. package/components/templates/address-display/address-display.d.ts +1 -1
  43. package/components/templates/address-form/address-fields.d.ts +2 -1
  44. package/components/templates/address-form/address-form-schema.d.ts +0 -9
  45. package/components/templates/address-form/address-form.d.ts +2 -2
  46. package/components/templates/address-form/address-schema.d.ts +2 -3
  47. package/components/templates/address-preference-display/address-preference-display.d.ts +1 -1
  48. package/components/templates/carrier-recovery-form/carrier-recovery-form-schema.d.ts +238 -0
  49. package/components/templates/carrier-recovery-form/carrier-recovery-form.d.ts +10 -0
  50. package/components/templates/carrier-recovery-form/carrier-recovery-form.styles.d.ts +1 -0
  51. package/components/templates/carrier-recovery-form/index.d.ts +2 -0
  52. package/components/templates/carrier-terms-form/carrier-terms-form-schema.d.ts +10 -0
  53. package/components/templates/carrier-terms-form/carrier-terms-form.d.ts +6 -0
  54. package/components/templates/carrier-terms-form/carrier-terms-form.styles.d.ts +1 -0
  55. package/components/templates/carrier-terms-form/index.d.ts +1 -0
  56. package/components/templates/customs-item-form/customs-item-form-schema.d.ts +112 -12
  57. package/components/templates/customs-item-form/customs-item-form.d.ts +3 -2
  58. package/components/templates/customs-items-display/customs-items-display.d.ts +1 -1
  59. package/components/templates/display-carrier-terms/display-carrier-terms.d.ts +6 -0
  60. package/components/templates/display-carrier-terms/index.d.ts +1 -0
  61. package/components/templates/edit-billing-form/edit-billing-form.d.ts +6 -0
  62. package/components/templates/edit-billing-form/edit-billing-form.styles.d.ts +1 -0
  63. package/components/templates/edit-billing-form/index.d.ts +1 -0
  64. package/components/templates/index.d.ts +8 -4
  65. package/components/templates/label/label.d.ts +2 -2
  66. package/components/templates/landing-page/index.d.ts +1 -0
  67. package/components/templates/landing-page/landing-page-form-schema.d.ts +10 -0
  68. package/components/templates/landing-page/landing-page-form.d.ts +4 -0
  69. package/components/templates/landing-page/landing-page.d.ts +4 -0
  70. package/components/templates/landing-page/landing-page.styles.d.ts +1 -0
  71. package/components/templates/list-carriers/index.d.ts +1 -0
  72. package/components/templates/list-carriers/list-carriers.d.ts +9 -0
  73. package/components/templates/list-carriers/list-carriers.styles.d.ts +1 -0
  74. package/components/templates/list-carriers-row/index.d.ts +1 -0
  75. package/components/templates/list-carriers-row/list-carriers-row.d.ts +9 -0
  76. package/components/templates/list-carriers-row/list-carriers-row.styles.d.ts +1 -0
  77. package/components/templates/manage-wallet/index.d.ts +1 -0
  78. package/components/templates/manage-wallet/manage-wallet.d.ts +1 -0
  79. package/components/templates/manage-wallet/manage-wallet.styles.d.ts +1 -0
  80. package/components/templates/manage-warehouses/manage-warehouses.d.ts +7 -2
  81. package/components/templates/onboarding/index.d.ts +1 -0
  82. package/components/templates/onboarding/onboarding.d.ts +18 -0
  83. package/components/templates/onboarding/onboarding.styles.d.ts +1 -0
  84. package/components/templates/rate-form/rate-form.d.ts +2 -2
  85. package/components/templates/rate-form/rate-form.styles.d.ts +1 -0
  86. package/components/templates/sales-order/sales-order.d.ts +1 -1
  87. package/components/templates/shipment/shipment.d.ts +1 -1
  88. package/components/templates/shipment-form/shipment-form.d.ts +3 -3
  89. package/components/templates/shipment-form/shipment-schema.d.ts +11 -11
  90. package/components/templates/void-label/void-label.d.ts +1 -1
  91. package/components/templates/wallet-card/index.d.ts +1 -0
  92. package/components/templates/wallet-card/wallet-card.d.ts +4 -0
  93. package/components/templates/wallet-card/wallet-card.styles.d.ts +1 -0
  94. package/components/templates/wallet-form/billing-fields.d.ts +6 -0
  95. package/components/templates/wallet-form/edit-wallet-address-form.d.ts +16 -0
  96. package/components/templates/wallet-form/index.d.ts +4 -0
  97. package/components/templates/wallet-form/wallet-form.d.ts +11 -0
  98. package/components/templates/wallet-form/wallet-form.styles.d.ts +1 -0
  99. package/components/templates/wallet-form/wallet-schema.d.ts +269 -0
  100. package/components/templates/warehouse-display/warehouse-display.d.ts +1 -1
  101. package/components/templates/warehouse-form/index.d.ts +1 -0
  102. package/components/templates/warehouse-form/warehouse-form-schema.d.ts +503 -0
  103. package/components/templates/warehouse-form/warehouse-form.d.ts +10 -0
  104. package/components/templates/warehouse-form/warehouse-form.styles.d.ts +1 -0
  105. package/constants/shipengine/address.d.ts +4 -0
  106. package/elements/components/configure-shipment/configure-shipment.d.ts +1 -1
  107. package/elements/components/configure-shipment/hooks/use-address.d.ts +3 -3
  108. package/elements/components/configure-shipment/hooks/use-customs.d.ts +3 -3
  109. package/elements/components/configure-shipment/hooks/use-presets.d.ts +2 -2
  110. package/elements/components/configure-shipment/hooks/use-rates-form.d.ts +1 -1
  111. package/elements/components/configure-shipment/hooks/use-request-rates.d.ts +2 -2
  112. package/elements/components/configure-shipment/hooks/use-shipment-form.d.ts +6 -6
  113. package/elements/components/index.d.ts +2 -3
  114. package/elements/components/list-carriers/hooks/use-list-connected-carriers.d.ts +11 -0
  115. package/elements/components/list-carriers/index.d.ts +1 -0
  116. package/elements/components/list-carriers/list-carriers.d.ts +1 -0
  117. package/elements/components/onboarding/index.d.ts +1 -0
  118. package/elements/components/onboarding/onboarding.d.ts +4 -0
  119. package/elements/components/sales-order/hooks/use-configure-shipment.d.ts +3 -1
  120. package/elements/components/sales-order/hooks/use-import-sales-order.d.ts +2 -2
  121. package/elements/components/sales-order/hooks/use-pending-shipment.d.ts +1 -1
  122. package/elements/components/sales-order/sales-order.d.ts +1 -1
  123. package/elements/components/shipment/shipment.d.ts +1 -1
  124. package/elements/components/void-label/void-label.d.ts +1 -1
  125. package/elements/index.d.ts +2 -3
  126. package/elements/onboarding.d.ts +1 -0
  127. package/factories/shipengine/address.d.ts +1 -1
  128. package/factories/shipengine/carrier.d.ts +1 -1
  129. package/factories/shipengine/label.d.ts +1 -1
  130. package/factories/shipengine/money.d.ts +1 -1
  131. package/factories/shipengine/order-source.d.ts +10 -2
  132. package/factories/shipengine/package.d.ts +2 -2
  133. package/factories/shipengine/resource.d.ts +1 -1
  134. package/factories/shipengine/sales-order.d.ts +1 -1
  135. package/factories/shipengine/service.d.ts +2 -2
  136. package/factories/shipengine/shipment.d.ts +4 -4
  137. package/factories/shipengine/warehouse.d.ts +1 -1
  138. package/factories/shipengine/weight.d.ts +1 -1
  139. package/hooks/index.d.ts +1 -0
  140. package/hooks/options/use-confirmation-options.d.ts +1 -1
  141. package/hooks/options/use-customs-contents-options.d.ts +1 -1
  142. package/hooks/options/use-customs-non-delivery-options.d.ts +1 -1
  143. package/hooks/options/use-insurance-provider-options.d.ts +2 -2
  144. package/hooks/options/use-package-options.d.ts +2 -2
  145. package/hooks/options/use-rate-options.d.ts +1 -1
  146. package/hooks/options/use-service-code-options.d.ts +1 -1
  147. package/hooks/options/use-warehouse-options.d.ts +1 -1
  148. package/hooks/use-carrier-metadata.d.ts +2 -5
  149. package/hooks/use-nested-form.d.ts +2 -2
  150. package/hooks/use-toggle.d.ts +12 -0
  151. package/index.cjs +20093 -17773
  152. package/index.js +20769 -18460
  153. package/locales/en/index.d.ts +122 -6
  154. package/mocks/browser.d.ts +1 -0
  155. package/mocks/carriers/handlers.d.ts +12 -0
  156. package/mocks/carriers/index.d.ts +1 -0
  157. package/mocks/index.d.ts +2 -0
  158. package/mocks/server.d.ts +2 -0
  159. package/mocks/warehouses/handlers.d.ts +1 -0
  160. package/mocks/warehouses/index.d.ts +1 -0
  161. package/package.json +10 -7
  162. package/register.d.ts +1 -4
  163. package/schemas/shipengine/index.d.ts +0 -1
  164. package/schemas/shipengine/money.d.ts +1 -1
  165. package/testing/index.d.ts +0 -1
  166. package/testing/render.d.ts +5 -0
  167. package/types/carrier-metadata.d.ts +10 -5
  168. package/types/shipping-preset/shipping-preset.d.ts +2 -2
  169. package/utilities/date.d.ts +13 -1
  170. package/utilities/money.d.ts +2 -1
  171. package/utilities/rates.d.ts +2 -2
  172. package/utilities/shipengine/address.d.ts +1 -1
  173. package/utilities/shipengine/dimensions.d.ts +1 -1
  174. package/utilities/shipengine/sales-order.d.ts +1 -1
  175. package/utilities/shipengine/shipment.d.ts +1 -1
  176. package/utilities/shipengine/weight.d.ts +1 -1
  177. package/components/organisms/auto-funding-form/auto-funding-form.d.ts +0 -15
  178. package/components/organisms/auto-funding-form/index.d.ts +0 -1
  179. package/components/organisms/index.d.ts +0 -2
  180. package/components/organisms/manual-funding-form/index.d.ts +0 -2
  181. package/components/organisms/manual-funding-form/manual-funding-form.d.ts +0 -17
  182. package/components/organisms/manual-funding-form/manual-funding-schema.d.ts +0 -27
  183. package/components/templates/add-carriers/add-carriers.d.ts +0 -5
  184. package/components/templates/add-carriers/index.d.ts +0 -1
  185. package/components/templates/agreement-form/agreement-form-schema.d.ts +0 -10
  186. package/components/templates/agreement-form/agreement-form.d.ts +0 -8
  187. package/components/templates/agreement-form/agreement-form.styles.d.ts +0 -1
  188. package/components/templates/agreement-form/index.d.ts +0 -1
  189. package/components/templates/billing-form/billing-form-stories.d.ts +0 -6
  190. package/components/templates/billing-form/billing-form.d.ts +0 -9
  191. package/components/templates/billing-form/index.d.ts +0 -2
  192. package/components/templates/funding-methods/funding-methods.d.ts +0 -17
  193. package/components/templates/funding-methods/index.d.ts +0 -1
  194. package/components/templates/register-wallet/index.d.ts +0 -1
  195. package/components/templates/register-wallet/register-wallet.d.ts +0 -3
  196. package/components/templates/register-wallet/register-wallet.styles.d.ts +0 -6
  197. package/elements/add-carriers.d.ts +0 -1
  198. package/elements/components/add-carriers/add-carriers.d.ts +0 -8
  199. package/elements/components/add-carriers/index.d.ts +0 -1
  200. package/elements/components/manage-funding/manage-funding.d.ts +0 -2
  201. package/elements/components/register-wallet/index.d.ts +0 -1
  202. package/elements/components/register-wallet/register-wallet.d.ts +0 -9
  203. package/elements/register-wallet.d.ts +0 -1
  204. package/schemas/shipengine/address.d.ts +0 -17
  205. package/testing/swr.d.ts +0 -15
  206. /package/{elements/components → components}/manage-funding/index.d.ts +0 -0
  207. /package/elements/{manage-funding.d.ts → list-carriers.d.ts} +0 -0
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ export type AddFundsFormProvider = {
3
+ isCustomAmount?: boolean;
4
+ isSubmitted?: boolean;
5
+ isSubmitting?: boolean;
6
+ isValid?: boolean;
7
+ selectedAmount?: number;
8
+ submit?: () => void;
9
+ };
10
+ export type AddFundsFormProps = {
11
+ carrierId: string;
12
+ children?: (addFundsForm: AddFundsFormProvider) => React.ReactElement;
13
+ minimumAmount?: number;
14
+ onCancel?: () => void;
15
+ onSuccess?: () => void;
16
+ };
17
+ /**
18
+ * Form for adding funds to a carrier's account.
19
+ *
20
+ * If a render child is provided, external control is assumed and the cancel / submit buttons are hidden.
21
+ */
22
+ export declare const AddFundsForm: ({ carrierId, children, onCancel, onSuccess, minimumAmount, }: AddFundsFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ type GetStylesProps = {
2
+ isDisabled?: boolean;
3
+ isSelected?: boolean;
4
+ };
5
+ export declare const getStyles: ({ isDisabled, isSelected }?: GetStylesProps) => Record<"chip" | "chipList" | "fundsInput", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
6
+ export {};
@@ -0,0 +1,37 @@
1
+ import { z } from "zod";
2
+ export declare const getAddFundsSchema: (minimumAmount?: number) => z.ZodEffects<z.ZodObject<{
3
+ funds: z.ZodObject<z.extendShape<{
4
+ amount: z.ZodNumber;
5
+ currency: z.ZodNativeEnum<typeof import("@shipengine/api").Currency>;
6
+ }, {
7
+ amount: z.ZodNumber;
8
+ }>, "strip", z.ZodTypeAny, {
9
+ amount: number;
10
+ currency: import("@shipengine/api").Currency;
11
+ }, {
12
+ amount: number;
13
+ currency: import("@shipengine/api").Currency;
14
+ }>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ funds: {
17
+ amount: number;
18
+ currency: import("@shipengine/api").Currency;
19
+ };
20
+ }, {
21
+ funds: {
22
+ amount: number;
23
+ currency: import("@shipengine/api").Currency;
24
+ };
25
+ }>, {
26
+ amount: number;
27
+ currency: import("@shipengine/api").Currency;
28
+ }, {
29
+ funds: {
30
+ amount: number;
31
+ currency: import("@shipengine/api").Currency;
32
+ };
33
+ }>;
34
+ type AddFundsFormSchema = ReturnType<typeof getAddFundsSchema>;
35
+ export type AddFundsFormFields = z.input<AddFundsFormSchema>;
36
+ export type AddFundsFormPayload = z.output<AddFundsFormSchema>;
37
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./add-funds-form";
2
+ export * from "./add-funds-schema";
@@ -0,0 +1,8 @@
1
+ export type AutoFundingFormProps = {
2
+ carrierId: string;
3
+ };
4
+ /**
5
+ * This form that allows users to enable or disable auto funding, and
6
+ * configure auto funding settings in ShipEngine API.
7
+ */
8
+ export declare const AutoFundingForm: ({ carrierId }: AutoFundingFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const styles: Record<"form", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
@@ -3,50 +3,50 @@ export declare const autoFundingSchema: z.ZodObject<{
3
3
  isEnabled: z.ZodBoolean;
4
4
  lowBalancePurchaseThreshold: z.ZodObject<z.extendShape<{
5
5
  amount: z.ZodNumber;
6
- currency: z.ZodNativeEnum<typeof import("dist/shipengine-types/src").Currency>;
6
+ currency: z.ZodNativeEnum<typeof import("@shipengine/api").Currency>;
7
7
  }, {
8
8
  amount: z.ZodNumber;
9
9
  }>, "strip", z.ZodTypeAny, {
10
10
  amount: number;
11
- currency: import("dist/shipengine-types/src").Currency;
11
+ currency: import("@shipengine/api").Currency;
12
12
  }, {
13
13
  amount: number;
14
- currency: import("dist/shipengine-types/src").Currency;
14
+ currency: import("@shipengine/api").Currency;
15
15
  }>;
16
16
  maximumPurchasesPerDay: z.ZodNumber;
17
17
  purchaseAmount: z.ZodObject<z.extendShape<{
18
18
  amount: z.ZodNumber;
19
- currency: z.ZodNativeEnum<typeof import("dist/shipengine-types/src").Currency>;
19
+ currency: z.ZodNativeEnum<typeof import("@shipengine/api").Currency>;
20
20
  }, {
21
21
  amount: z.ZodNumber;
22
22
  }>, "strip", z.ZodTypeAny, {
23
23
  amount: number;
24
- currency: import("dist/shipengine-types/src").Currency;
24
+ currency: import("@shipengine/api").Currency;
25
25
  }, {
26
26
  amount: number;
27
- currency: import("dist/shipengine-types/src").Currency;
27
+ currency: import("@shipengine/api").Currency;
28
28
  }>;
29
29
  }, "strip", z.ZodTypeAny, {
30
30
  isEnabled: boolean;
31
31
  lowBalancePurchaseThreshold: {
32
32
  amount: number;
33
- currency: import("dist/shipengine-types/src").Currency;
33
+ currency: import("@shipengine/api").Currency;
34
34
  };
35
35
  maximumPurchasesPerDay: number;
36
36
  purchaseAmount: {
37
37
  amount: number;
38
- currency: import("dist/shipengine-types/src").Currency;
38
+ currency: import("@shipengine/api").Currency;
39
39
  };
40
40
  }, {
41
41
  isEnabled: boolean;
42
42
  lowBalancePurchaseThreshold: {
43
43
  amount: number;
44
- currency: import("dist/shipengine-types/src").Currency;
44
+ currency: import("@shipengine/api").Currency;
45
45
  };
46
46
  maximumPurchasesPerDay: number;
47
47
  purchaseAmount: {
48
48
  amount: number;
49
- currency: import("dist/shipengine-types/src").Currency;
49
+ currency: import("@shipengine/api").Currency;
50
50
  };
51
51
  }>;
52
52
  export type AutoFundingFormFields = z.input<typeof autoFundingSchema>;
@@ -0,0 +1,2 @@
1
+ export * from "./auto-funding-form";
2
+ export * from "./auto-funding-schema";
@@ -0,0 +1,4 @@
1
+ export type CarrierBalanceProps = {
2
+ carrierId: string;
3
+ };
4
+ export declare const CarrierBalance: ({ carrierId }: CarrierBalanceProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const getStyles: (balance?: number) => Record<"balanceText", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
@@ -0,0 +1 @@
1
+ export * from "./carrier-balance";
@@ -10,14 +10,17 @@ export type FieldControllerProps<NP, TFieldValues extends FieldValues = FieldVal
10
10
  displayErrors?: boolean;
11
11
  displayLabel?: boolean;
12
12
  errors?: string[];
13
+ hint?: string;
13
14
  inputOnly?: boolean;
15
+ isOptional?: boolean;
14
16
  label: string;
15
17
  labelWeight?: FieldLabelProps["weight"];
18
+ nativeLabel?: boolean;
16
19
  } & Omit<FieldLabelProps, "children" | "weight"> & Omit<UseControllerProps<TFieldValues, TName>, "defaultValue"> & ControlledFormInputProps<NP>;
17
20
  type FieldControllerOptions = {
18
21
  inputOnly?: boolean;
19
22
  };
20
- export declare const createFieldController: <P>(options?: FieldControllerOptions) => <TFieldValues extends FieldValues = FieldValues, TName extends import("react-hook-form").Path<TFieldValues> = import("react-hook-form").Path<TFieldValues>>({ children, control, defaultValue, displayErrors, displayLabel, errors: errorsProp, inputOnly, label, labelWeight, name, rules, shouldUnregister, subLabel, ...formInputProps }: FieldControllerProps<P, TFieldValues, TName>) => JSX.Element;
23
+ export declare const createFieldController: <P>(options?: FieldControllerOptions) => <TFieldValues extends FieldValues = FieldValues, TName extends import("react-hook-form").Path<TFieldValues> = import("react-hook-form").Path<TFieldValues>>({ children, control, defaultValue, displayErrors, displayLabel, errors: errorsProp, hint, inputOnly, isOptional, label, labelWeight, name, nativeLabel, rules, shouldUnregister, subLabel, ...formInputProps }: FieldControllerProps<P, TFieldValues, TName>) => JSX.Element;
21
24
  export type ControlledFieldProps = Parameters<ControlledField>[0];
22
25
  export type ControlledField<NP = object, CP = object, OK extends string = ""> = <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(fieldProps: Omit<FieldControllerProps<NP, TFieldValues, TName>, "children" | OK> & CP) => JSX.Element;
23
26
  export {};
@@ -0,0 +1,3 @@
1
+ import { InputProps as NativeInputProps } from "@packlink/giger";
2
+ import { ControlledField } from "../create-field-controller";
3
+ export declare const CreditCardInput: ControlledField<NativeInputProps>;
@@ -0,0 +1 @@
1
+ export * from "./credit-card-input";
@@ -1,3 +1,4 @@
1
+ export * from "./credit-card-input";
1
2
  export * from "./checkbox-input";
2
3
  export * from "./date-picker";
3
4
  export * from "./input-group";
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  type UseUtils = {
3
3
  getCurrencySymbol: (currency: SE.Currency) => string | undefined;
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { InputProps } from "@packlink/giger";
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  import { ControlledField } from "../create-field-controller";
4
4
  export declare const transform: {
5
5
  in: ({ amount, currency }?: Partial<{
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  export interface CostBreakdownProps {
4
4
  confirmationAmount?: SE.Money;
5
5
  insuranceAmount?: SE.Money;
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { Interpolation, Theme } from "@emotion/react";
3
+ declare const variants: readonly ["well"];
4
+ type FormPortalProps = {
5
+ children: React.ReactNode;
6
+ css?: Interpolation<Theme>;
7
+ id: `${string}-form`;
8
+ onSubmit: (e: React.SyntheticEvent) => Promise<void> | void;
9
+ variant?: typeof variants[number];
10
+ };
11
+ /**
12
+ * A drop-in replacement for the `<form>` tag that allows nested forms.
13
+ *
14
+ * Via portals, the <form> tag is mounted as a sibling of the app root. The form's
15
+ * interface is then mounted back at the point of use.
16
+ */
17
+ export declare const FormPortal: ({ css, children, id, onSubmit, variant }: FormPortalProps) => import("@emotion/react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./form-portal";
@@ -0,0 +1,15 @@
1
+ export type FundAndPurchaseProps = {
2
+ carrierId?: string;
3
+ className?: string;
4
+ disabled?: boolean;
5
+ isFundingRequired: boolean;
6
+ onPurchase: () => void;
7
+ onSave: () => Promise<void>;
8
+ purchaseAmount: number;
9
+ };
10
+ /**
11
+ * Fund and Purchase handles the label purchase submission UX, ensuring that a user
12
+ * has the necessary funds available and can add them if not. It allows a single button
13
+ * to submit the funding form followed by the purchase form.
14
+ */
15
+ export declare const FundAndPurchase: ({ carrierId, className, disabled, isFundingRequired, onSave, purchaseAmount, onPurchase, }: FundAndPurchaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const getStyles: (isCustomAmount?: boolean) => Record<"balanceText" | "container" | "formExtension" | "saveRateButton", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
@@ -0,0 +1 @@
1
+ export * from "./fund-and-purchase";
@@ -1,11 +1,21 @@
1
1
  export * as Templates from "./templates";
2
2
  export * from "./accordion";
3
+ export * from "./add-funds-form";
4
+ export * from "./auto-funding-form";
3
5
  export * from "./button-group";
6
+ export * from "./carrier-balance";
4
7
  export * from "./cube";
5
8
  export * from "./error-boundary";
6
9
  export * from "./field";
7
10
  export * from "./field-label";
11
+ export * from "./form-portal";
12
+ export * from "./fund-and-purchase";
13
+ export * from "./inline-label";
8
14
  export * from "./items-breakdown";
15
+ export * from "./link-action";
9
16
  export * from "./loader";
17
+ export * from "./manage-funding";
10
18
  export * from "./portal";
11
19
  export * from "./spacer";
20
+ export * from "./spread";
21
+ export * from "./story-notes";
@@ -0,0 +1 @@
1
+ export * from "./inline-label";
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export type InlineLabelProps = {
3
+ children: React.ReactElement;
4
+ label: string;
5
+ };
6
+ export declare const InlineLabel: ({ children, label }: InlineLabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  export type Item = {
3
3
  detail: string;
4
4
  name: string;
@@ -0,0 +1 @@
1
+ export * from "./link-action";
@@ -0,0 +1,12 @@
1
+ import { IconNames } from "@packlink/brands";
2
+ import { ILinkProps } from "@packlink/giger";
3
+ declare const icons: {
4
+ readonly add: IconNames.ADD;
5
+ readonly download: IconNames.DOWNLOAD;
6
+ };
7
+ export type LinkActionProps = {
8
+ icon?: keyof typeof icons;
9
+ title: string;
10
+ } & ILinkProps;
11
+ export declare const LinkAction: ({ css, icon, isDisabled, isLoading, title, ...props }: LinkActionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,4 @@
1
+ export type ManageFundingProps = {
2
+ carrierId: string;
3
+ };
4
+ export declare const ManageFunding: ({ carrierId }: ManageFundingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export type PortalProps<T> = {
3
3
  children: React.ReactNode;
4
- target?: React.RefObject<T> | HTMLElement;
4
+ target?: React.RefObject<T> | HTMLElement | null;
5
5
  };
6
6
  /**
7
7
  * A no-frills wrapper around React.createPortal for more elegant DOM composition
@@ -1,5 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  export type SettingsCardProps = {
3
+ accessoryAction?: {
4
+ action: () => void;
5
+ name: string;
6
+ };
3
7
  cardAction: {
4
8
  action: () => void;
5
9
  name: string;
@@ -7,5 +11,6 @@ export type SettingsCardProps = {
7
11
  children?: React.ReactNode;
8
12
  subtitle?: string;
9
13
  title: string | JSX.Element;
14
+ verticallyAligned?: boolean;
10
15
  };
11
- export declare const SettingsCard: ({ cardAction, children, subtitle, title }: SettingsCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
16
+ export declare const SettingsCard: ({ accessoryAction, cardAction, children, subtitle, title, verticallyAligned, }: SettingsCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,6 +1 @@
1
- import { SerializedStyles } from "@emotion/react";
2
- import { Theme } from "@packlink/brands";
3
- export declare const getSettingsCardContainerStyles: (theme: Theme) => SerializedStyles;
4
- export declare const getSettingsCardHeaderStyles: (theme: Theme) => SerializedStyles;
5
- export declare const getSettingsCardTitleStyles: (theme: Theme) => SerializedStyles;
6
- export declare const getSettingsCardBodyStyles: (theme: Theme) => SerializedStyles;
1
+ export declare const styles: Record<"body" | "container" | "header" | "title" | "verticalContainer", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
@@ -0,0 +1 @@
1
+ export * from "./spread";
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export type SpreadProps = {
3
+ children: [React.ReactNode, React.ReactNode];
4
+ };
5
+ export declare const Spread: ({ children }: SpreadProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./story-notes";
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ export type StoryNotesProps = {
3
+ children: React.ReactNode;
4
+ notes: string[];
5
+ };
6
+ /**
7
+ * For relevant notes about Storybook stories
8
+ *
9
+ * Stopgap until we setup https://storybook.js.org/addons/@storybook/addon-docs
10
+ */
11
+ export declare const StoryNotes: ({ children, notes }: StoryNotesProps) => import("@emotion/react/jsx-runtime").JSX.Element;