@shipengine/elements 1.3.2 → 1.5.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.
- package/index.cjs +12553 -8745
- package/index.js +12550 -8752
- package/package.json +5 -4
- package/src/components/carrier-connection-card/carrier-connection-card.d.ts +11 -0
- package/src/components/carrier-connection-card/carrier-connection-card.styles.d.ts +35 -0
- package/src/components/carrier-connection-card/index.d.ts +1 -0
- package/src/components/field/create-field-controller.d.ts +1 -1
- package/src/components/field/input-group/input-group.d.ts +9 -0
- package/src/components/field/input-group/input-group.styles.d.ts +24 -0
- package/src/components/field/rate-card/rate-card.d.ts +4 -1
- package/src/components/field/rate-card/rate-card.styles.d.ts +1 -0
- package/src/components/field/rate-select/rate-select.d.ts +3 -0
- package/src/components/field-label/field-label.d.ts +2 -1
- package/src/components/field-label/field-label.styles.d.ts +9 -0
- package/src/components/fund-and-purchase/fund-and-purchase.d.ts +2 -1
- package/src/components/index.d.ts +3 -0
- package/src/components/modal/index.d.ts +2 -0
- package/src/components/modal/modal-container.d.ts +15 -0
- package/src/components/modal/modal.d.ts +9 -0
- package/src/components/modal/modal.styles.d.ts +17 -0
- package/src/components/pager/pager.styles.d.ts +1 -0
- package/src/components/section/section.d.ts +2 -1
- package/src/components/section/section.styles.d.ts +13 -13
- package/src/components/service-point-display/index.d.ts +1 -0
- package/src/components/service-point-display/service-point-display.d.ts +10 -0
- package/src/components/service-point-display/service-point-display.styles.d.ts +43 -0
- package/src/components/service-points/index.d.ts +1 -0
- package/src/components/service-points/service-points.d.ts +8 -0
- package/src/components/service-points/service-points.styles.d.ts +44 -0
- package/src/components/skeleton/index.d.ts +1 -0
- package/src/components/skeleton/skeleton-carrier-row.d.ts +1 -0
- package/src/components/skeleton/skeleton-carrier-row.styles.d.ts +17 -0
- package/src/components/suspend/index.d.ts +1 -0
- package/src/components/suspend/suspend-text.d.ts +5 -0
- package/src/components/tabs/tabs.d.ts +2 -1
- package/src/components/tabs/tabs.styles.d.ts +3 -3
- package/src/components/templates/account-settings/account-settings.d.ts +5 -1
- package/src/components/templates/add-carrier-form/add-carrier-form-schema.d.ts +12 -3
- package/src/components/templates/address-form/address-form-schema.d.ts +24 -0
- package/src/components/templates/address-form/address-schema.d.ts +3 -0
- package/src/components/templates/available-carriers-list/available-carriers-list.d.ts +10 -0
- package/src/components/templates/available-carriers-list/available-carriers-list.styles.d.ts +6 -0
- package/src/components/templates/available-carriers-list/index.d.ts +1 -0
- package/src/components/templates/connect-carrier-form/connect-carrier-form.d.ts +4 -2
- package/src/components/templates/connect-carrier-form/connect-carrier-form.styles.d.ts +0 -1
- package/src/components/templates/connected-carrier-list/connected-carrier-list.d.ts +8 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-list.styles.d.ts +35 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-row/connected-carrier-row.d.ts +8 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-row/connected-carrier-row.styles.d.ts +36 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-row/index.d.ts +1 -0
- package/src/components/templates/connected-carrier-list/index.d.ts +1 -0
- package/src/components/templates/index.d.ts +1 -1
- package/src/components/templates/list-carriers/list-carriers.d.ts +1 -1
- package/src/components/templates/list-carriers/list-carriers.styles.d.ts +0 -15
- package/src/components/templates/product-form/product-form.d.ts +4 -1
- package/src/components/templates/product-form/product-form.styles.d.ts +9 -0
- package/src/components/templates/products-display/products-display.d.ts +2 -1
- package/src/components/templates/pudo-rate-tabs/index.d.ts +2 -0
- package/src/components/templates/pudo-rate-tabs/pudo-rate-tabs.d.ts +22 -0
- package/src/components/templates/pudo-rate-tabs/service-points-search-bar/index.d.ts +1 -0
- package/src/components/templates/pudo-rate-tabs/service-points-search-bar/service-points-search-bar.d.ts +6 -0
- package/src/components/templates/rate-form/rate-form.d.ts +1 -1
- package/src/components/templates/shipment-form/shipment-form.d.ts +3 -1
- package/src/components/templates/wallet-form/wallet-schema.d.ts +36 -26
- package/src/components/templates/warehouse-form/warehouse-form-schema.d.ts +75 -37
- package/src/components/templates/warehouse-form/warehouse-form.d.ts +2 -1
- package/src/elements/account-settings/account-settings.d.ts +106 -33
- package/src/elements/configure-shipment/configure-shipment.d.ts +1 -0
- package/src/elements/configure-shipment/hooks/use-rates-form.d.ts +1 -1
- package/src/elements/configure-shipment/hooks/use-shipment-form.d.ts +1 -0
- package/src/elements/connect-carrier/connect-carrier.d.ts +141 -3
- package/src/elements/external-carriers/external-carriers.d.ts +34 -0
- package/src/elements/external-carriers/index.d.ts +1 -0
- package/src/elements/index.d.ts +1 -0
- package/src/elements/labels-grid/labels-grid.d.ts +82 -1
- package/src/elements/purchase-label/purchase-label.d.ts +90 -2
- package/src/elements/shipengine-workflow/label-workflow.d.ts +4 -1
- package/src/elements/shipments-grid/shipments-grid.d.ts +82 -1
- package/src/elements/theme-creator/theme-creator.d.ts +82 -1
- package/src/elements/view-shipment/view-shipment.d.ts +82 -1
- package/src/elements/void-label/void-label.d.ts +85 -2
- package/src/factories/shipengine/service-point.d.ts +3 -0
- package/src/hooks/options/index.d.ts +1 -0
- package/src/hooks/options/use-rate-options.d.ts +12 -1
- package/src/hooks/options/use-service-points.d.ts +8 -0
- package/src/hooks/use-nested-form.d.ts +5 -1
- package/src/locales/en/index.d.ts +82 -1
- package/src/utilities/feature-flags.d.ts +16 -1
- package/src/utilities/rates.d.ts +3 -1
- package/src/utilities/shipengine/address.d.ts +9 -0
- package/src/workflows/onboarding/components/carrier-recovery-form/carrier-recovery-form-schema.d.ts +20 -0
- package/src/workflows/onboarding/components/funding-and-carrier-connection-step/use-funding-and-carrier-connection-step.d.ts +1 -0
- package/src/workflows/onboarding/onboarding.d.ts +89 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@shipengine/alchemy": "5.x.x",
|
|
6
6
|
"@emotion/react": "11.x",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"@rjsf/core": "5.16.1",
|
|
26
26
|
"@rjsf/utils": "5.16.1",
|
|
27
27
|
"@rjsf/validator-ajv8": "5.16.1",
|
|
28
|
-
"@shipengine/giger": "1.
|
|
29
|
-
"@shipengine/giger-theme": "1.0
|
|
30
|
-
"@shipengine/js-api": "1.
|
|
28
|
+
"@shipengine/giger": "1.4.2",
|
|
29
|
+
"@shipengine/giger-theme": "1.1.0",
|
|
30
|
+
"@shipengine/js-api": "1.4.1",
|
|
31
31
|
"@storybook/addons": "6.5.16",
|
|
32
32
|
"@storybook/components": "7.0.0-rc.1",
|
|
33
33
|
"@storybook/core-events": "7.0.0-rc.1",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"react-datepicker": "4.25.0",
|
|
49
49
|
"react-hook-form": "7.40.0",
|
|
50
50
|
"rollup-plugin-copy": "3.4.0",
|
|
51
|
+
"use-debounce": "10.0.0",
|
|
51
52
|
"zod": "3.19.1"
|
|
52
53
|
}
|
|
53
54
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WithCommonProps } from "@shipengine/giger";
|
|
2
|
+
export type CarrierConnectionMetadata = {
|
|
3
|
+
carrierName: string;
|
|
4
|
+
description: string;
|
|
5
|
+
iconUrl: string;
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
export type CarrierConnectionCardProps = CarrierConnectionMetadata & WithCommonProps<{
|
|
9
|
+
onClick?: (carrierName: string) => void;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const CarrierConnectionCard: ({ carrierName, className, iconUrl, name, onClick, }: CarrierConnectionCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
article: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
":hover": {
|
|
4
|
+
borderColor: string;
|
|
5
|
+
};
|
|
6
|
+
alignItems: "center";
|
|
7
|
+
border: string;
|
|
8
|
+
borderRadius: number;
|
|
9
|
+
cursor: "pointer";
|
|
10
|
+
display: "flex";
|
|
11
|
+
flexDirection: "row";
|
|
12
|
+
flexWrap: "nowrap";
|
|
13
|
+
paddingBottom: number;
|
|
14
|
+
paddingLeft: number;
|
|
15
|
+
paddingRight: number;
|
|
16
|
+
paddingTop: number;
|
|
17
|
+
position: "relative";
|
|
18
|
+
};
|
|
19
|
+
carrierLogo: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
20
|
+
flex: string;
|
|
21
|
+
marginRight: number;
|
|
22
|
+
maxHeight: string;
|
|
23
|
+
width: string;
|
|
24
|
+
};
|
|
25
|
+
carrierName: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
26
|
+
display: "block";
|
|
27
|
+
flex: string;
|
|
28
|
+
};
|
|
29
|
+
spacer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
30
|
+
display: "block";
|
|
31
|
+
flex: string;
|
|
32
|
+
height: string;
|
|
33
|
+
position: "relative";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./carrier-connection-card";
|
|
@@ -20,7 +20,7 @@ export type FieldControllerProps<NP, TFieldValues extends FieldValues = FieldVal
|
|
|
20
20
|
type FieldControllerOptions = {
|
|
21
21
|
inputOnly?: boolean;
|
|
22
22
|
};
|
|
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;
|
|
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, labelInfo, labelWeight, name, nativeLabel, rules, shouldUnregister, subLabel, ...formInputProps }: FieldControllerProps<P, TFieldValues, TName>) => JSX.Element;
|
|
24
24
|
export type ControlledFieldProps = Parameters<ControlledField>[0];
|
|
25
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;
|
|
26
26
|
export {};
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { UseFormTrigger } from "react-hook-form";
|
|
3
|
+
import { FormFieldProps } from "@shipengine/giger";
|
|
3
4
|
import { FieldLabelProps } from "../../field-label";
|
|
4
5
|
import { ControlledField, ControlledFieldProps } from "../create-field-controller";
|
|
5
6
|
export type InputGroupItem = React.ReactElement<ControlledFieldProps>;
|
|
6
7
|
type InputGroupProps = {
|
|
7
8
|
children: InputGroupItem[];
|
|
9
|
+
/** Removes the spacing between the inputs */
|
|
10
|
+
compact?: boolean;
|
|
11
|
+
/** Disables the group */
|
|
8
12
|
disabled?: boolean;
|
|
13
|
+
/** Adds the string after the input */
|
|
9
14
|
divider?: string[];
|
|
15
|
+
/** FormField message */
|
|
16
|
+
message?: FormFieldProps["message"];
|
|
17
|
+
/** Defines the size for each input instead of split them evenly */
|
|
18
|
+
sizes?: number[];
|
|
10
19
|
trigger: UseFormTrigger<any>;
|
|
11
20
|
};
|
|
12
21
|
export declare const InputGroup: ControlledField<FieldLabelProps, InputGroupProps, "errors" | "shouldDisplayErrors" | "withBottomMargin">;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
getGroupChild: (size?: number) => () => {
|
|
3
|
+
display: "flex";
|
|
4
|
+
flexShrink: number;
|
|
5
|
+
width: string | number;
|
|
6
|
+
};
|
|
7
|
+
getGroupChildInput: ({ compact, index }: {
|
|
8
|
+
compact?: boolean | undefined;
|
|
9
|
+
index: number;
|
|
10
|
+
}) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
11
|
+
flexGrow: number;
|
|
12
|
+
"&& > div > div"?: {
|
|
13
|
+
borderBottomLeftRadius: string | number;
|
|
14
|
+
borderBottomRightRadius: string | number;
|
|
15
|
+
borderTopLeftRadius: string | number;
|
|
16
|
+
borderTopRightRadius: string | number;
|
|
17
|
+
} | undefined;
|
|
18
|
+
};
|
|
19
|
+
getGroupParent: (compact?: boolean) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
20
|
+
display: "flex";
|
|
21
|
+
gap: number;
|
|
22
|
+
width: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import type { SE } from "@shipengine/alchemy";
|
|
1
2
|
import { WithCommonProps } from "@shipengine/giger";
|
|
2
3
|
import { RateOption } from "../../../hooks";
|
|
3
4
|
export type RateCardProps = Partial<RateOption> & WithCommonProps<{
|
|
4
5
|
isAcknowledged?: boolean;
|
|
6
|
+
isLoading?: boolean;
|
|
5
7
|
isPreferredRate?: boolean;
|
|
6
8
|
onClick?: (rateId: string) => void;
|
|
7
9
|
onClickAcknowledgement?: (isAcknowledged: boolean) => void;
|
|
10
|
+
onSelectServicePoint?: (servicePoint?: SE.ServicePoint) => void;
|
|
8
11
|
selected?: boolean;
|
|
9
12
|
selectedRateCost?: number;
|
|
10
13
|
voided?: boolean;
|
|
11
14
|
voidedAt?: string;
|
|
12
15
|
}>;
|
|
13
|
-
export declare const RateCard: ({ carrierCode, carrierFriendlyName, carrierNickname, children, className, confirmationAmount, deliveryDays, insuranceAmount, isAcknowledged, messages, onClick, onClickAcknowledgement, otherAmount, rateId, requiresAcknowledgement, rateAcknowledgementMessage, selected, serviceCode, packageType, serviceType, shippingAmount, taxAmount, voided, voidedAt, isPreferredRate, selectedRateCost, }: RateCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const RateCard: ({ carrierCode, carrierFriendlyName, carrierNickname, children, className, confirmationAmount, deliveryDays, insuranceAmount, isAcknowledged, messages, onClick, onClickAcknowledgement, onSelectServicePoint, otherAmount, rateId, requiresAcknowledgement, rateAcknowledgementMessage, selected, serviceCode, packageType, serviceType, shippingAmount, taxAmount, voided, voidedAt, isLoading: servicePointsLoading, isPreferredRate, selectedRateCost, servicePoints, }: RateCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -20,3 +20,4 @@ export declare const getFooterListItemStyles: (theme: Theme) => SerializedStyles
|
|
|
20
20
|
export declare const getAcknowledgmentStyles: (theme: Theme) => SerializedStyles;
|
|
21
21
|
export declare const getCheckboxWrapperStyles: () => SerializedStyles;
|
|
22
22
|
export declare const getTypographyVoidedStyles: () => SerializedStyles;
|
|
23
|
+
export declare const getServicePointSkeletonStyles: (theme: Theme) => SerializedStyles;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import type { SE } from "@shipengine/alchemy";
|
|
1
2
|
import { RateOption } from "../../../hooks";
|
|
2
3
|
import { RateFormProps } from "../../templates";
|
|
3
4
|
import { ControlledField } from "../create-field-controller";
|
|
4
5
|
type RateSelectProps = {
|
|
6
|
+
isLoading?: boolean;
|
|
5
7
|
nicknameFeature?: boolean;
|
|
8
|
+
onSelectServicePoint?: (servicePoint?: SE.ServicePoint) => void;
|
|
6
9
|
options: RateOption[];
|
|
7
10
|
preferredServiceCodes?: RateFormProps["preferredServiceCodes"];
|
|
8
11
|
};
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
export type FieldLabelProps = {
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
label?: string;
|
|
10
|
+
labelInfo?: React.ReactNode;
|
|
10
11
|
subLabel?: string;
|
|
11
12
|
weight?: "bold" | "normal";
|
|
12
13
|
withInput?: boolean;
|
|
@@ -16,4 +17,4 @@ export type FieldLabelProps = {
|
|
|
16
17
|
*
|
|
17
18
|
* # Field Label Component
|
|
18
19
|
*/
|
|
19
|
-
export declare const FieldLabel: ({ children, label, subLabel, weight, withInput, }: FieldLabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const FieldLabel: ({ children, label, labelInfo, subLabel, weight, withInput, }: FieldLabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -17,6 +17,7 @@ export type FundAndPurchaseProps = {
|
|
|
17
17
|
isFundingEnabled?: boolean;
|
|
18
18
|
isFundingRequired: boolean;
|
|
19
19
|
isPreferredRate?: boolean;
|
|
20
|
+
nickname?: string;
|
|
20
21
|
onPurchase: () => void;
|
|
21
22
|
onSave: () => Promise<void>;
|
|
22
23
|
purchaseAmount: number;
|
|
@@ -32,4 +33,4 @@ export type FundAndPurchaseProps = {
|
|
|
32
33
|
*
|
|
33
34
|
* @see {@link FundAndPurchaseProps | The props that are passed into the `<FundAndPurchase />` component}
|
|
34
35
|
*/
|
|
35
|
-
export declare const FundAndPurchase: ({ balance: uspsBalance, carrierId, className, control, currency, disabled, isFundingEnabled, isFundingRequired, isPreferredRate, purchaseAmount, onSave, onPurchase, }: FundAndPurchaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const FundAndPurchase: ({ balance: uspsBalance, carrierId, className, control, currency, disabled, isFundingEnabled, isFundingRequired, isPreferredRate, nickname, purchaseAmount, onSave, onPurchase, }: FundAndPurchaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./add-funds-form";
|
|
2
|
+
export * from "./carrier-connection-card";
|
|
2
3
|
export * from "./auto-funding-form";
|
|
3
4
|
export * from "./button-group";
|
|
4
5
|
export * from "./carrier-balance";
|
|
@@ -29,5 +30,7 @@ export * from "./powered-by-shipengine";
|
|
|
29
30
|
export * from "./section";
|
|
30
31
|
export * from "./spacer";
|
|
31
32
|
export * from "./spread";
|
|
33
|
+
export * from "./skeleton";
|
|
34
|
+
export * from "./suspend";
|
|
32
35
|
export * from "./story-notes";
|
|
33
36
|
export * from "./tabs";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ModalContextValue = {
|
|
3
|
+
fullScreen?: boolean;
|
|
4
|
+
isContained: boolean;
|
|
5
|
+
parentSelector?: () => HTMLElement;
|
|
6
|
+
} | undefined;
|
|
7
|
+
export declare const ModalContainer: React.FC<{
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const ModalContext: React.Context<ModalContextValue>;
|
|
11
|
+
export declare const useModal: () => {
|
|
12
|
+
fullScreen?: boolean | undefined;
|
|
13
|
+
isContained: boolean;
|
|
14
|
+
parentSelector?: (() => HTMLElement) | undefined;
|
|
15
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ModalProps = {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
closeAriaLabel?: string;
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
title?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const Modal: ({ children, closeAriaLabel, isOpen, onClose, title }: ModalProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
headerClose: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
left: number;
|
|
4
|
+
position: "absolute";
|
|
5
|
+
right: string;
|
|
6
|
+
top: string;
|
|
7
|
+
transform: "translate(0, -50%)";
|
|
8
|
+
};
|
|
9
|
+
headerTitle: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
10
|
+
color: string;
|
|
11
|
+
fontWeight: number;
|
|
12
|
+
lineHeight: number;
|
|
13
|
+
margin: number;
|
|
14
|
+
paddingLeft: number;
|
|
15
|
+
textAlign: "left";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -7,6 +7,7 @@ import { WithChildrenCommonProps } from "@shipengine/giger";
|
|
|
7
7
|
*/
|
|
8
8
|
export type SectionProps = WithChildrenCommonProps<{
|
|
9
9
|
bold?: boolean;
|
|
10
|
+
hideBackground?: boolean;
|
|
10
11
|
/** Element to render at the right part of the summary */
|
|
11
12
|
rightContent?: JSX.Element;
|
|
12
13
|
/** Title to show */
|
|
@@ -17,4 +18,4 @@ export type SectionProps = WithChildrenCommonProps<{
|
|
|
17
18
|
*
|
|
18
19
|
* # Section Component
|
|
19
20
|
*/
|
|
20
|
-
export declare const Section: ({ bold, title, children, rightContent, ...rest }: SectionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const Section: ({ bold, hideBackground, title, children, rightContent, ...rest }: SectionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
export declare const styles: {
|
|
2
|
-
|
|
3
|
-
color: string;
|
|
4
|
-
marginRight: number;
|
|
5
|
-
};
|
|
6
|
-
rightContentWrapper: {
|
|
7
|
-
marginLeft: string;
|
|
8
|
-
};
|
|
9
|
-
section: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
10
|
-
boxSizing: "border-box";
|
|
11
|
-
padding: string;
|
|
12
|
-
width: string;
|
|
13
|
-
};
|
|
14
|
-
summary: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
2
|
+
getSummaryStyle: (hideBackground?: boolean) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
15
3
|
"&::-webkit-details-marker": {
|
|
16
4
|
display: "none";
|
|
17
5
|
};
|
|
@@ -24,6 +12,18 @@ export declare const styles: {
|
|
|
24
12
|
padding: string;
|
|
25
13
|
width: string;
|
|
26
14
|
};
|
|
15
|
+
icon: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
16
|
+
color: string;
|
|
17
|
+
marginRight: number;
|
|
18
|
+
};
|
|
19
|
+
rightContentWrapper: {
|
|
20
|
+
marginLeft: string;
|
|
21
|
+
};
|
|
22
|
+
section: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
23
|
+
boxSizing: "border-box";
|
|
24
|
+
padding: string;
|
|
25
|
+
width: string;
|
|
26
|
+
};
|
|
27
27
|
summaryWrapper: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
28
28
|
alignItems: "center";
|
|
29
29
|
color: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./service-point-display";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
type ServicePointDisplayProps = {
|
|
3
|
+
expanded: boolean;
|
|
4
|
+
onSelect?: (servicePoint: SE.ServicePoint) => void;
|
|
5
|
+
rateSelected?: boolean;
|
|
6
|
+
selectedServicePoint?: SE.ServicePoint;
|
|
7
|
+
servicePoint: SE.ServicePoint;
|
|
8
|
+
};
|
|
9
|
+
export declare const ServicePointDisplay: ({ onSelect, servicePoint, expanded, rateSelected, selectedServicePoint, }: ServicePointDisplayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
closed: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
color: string;
|
|
4
|
+
};
|
|
5
|
+
container: {
|
|
6
|
+
display: "flex";
|
|
7
|
+
flexDirection: "column";
|
|
8
|
+
};
|
|
9
|
+
getHoursOfOperationTextStyles: (isCurrentWeekday: boolean) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
10
|
+
color: string;
|
|
11
|
+
fontSize: string;
|
|
12
|
+
fontWeight: "normal" | "bold";
|
|
13
|
+
lineHeight: string;
|
|
14
|
+
margin: number;
|
|
15
|
+
};
|
|
16
|
+
getSelectedStyles: (isSelected?: boolean) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
17
|
+
alignItems: "center";
|
|
18
|
+
display: "flex";
|
|
19
|
+
gap: number;
|
|
20
|
+
justifyContent: "" | "space-between";
|
|
21
|
+
};
|
|
22
|
+
inlineWrapper: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
23
|
+
alignItems: "center";
|
|
24
|
+
display: "flex";
|
|
25
|
+
gap: number;
|
|
26
|
+
justifyContent: "space-between";
|
|
27
|
+
};
|
|
28
|
+
open: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
29
|
+
color: string;
|
|
30
|
+
};
|
|
31
|
+
selectButton: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
32
|
+
backgroundColor: string;
|
|
33
|
+
borderRadius: string;
|
|
34
|
+
color: string;
|
|
35
|
+
cursor: "pointer";
|
|
36
|
+
padding: string;
|
|
37
|
+
whiteSpace: "nowrap";
|
|
38
|
+
};
|
|
39
|
+
viewMap: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
40
|
+
color: string;
|
|
41
|
+
textDecoration: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./service-points";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
type ServicePointsProps = {
|
|
3
|
+
onSelectServicePoint?: (servicePoint: SE.ServicePoint) => void;
|
|
4
|
+
rateSelected: boolean;
|
|
5
|
+
servicePoints: SE.ServicePoint[];
|
|
6
|
+
};
|
|
7
|
+
export declare const ServicePoints: ({ servicePoints, rateSelected, onSelectServicePoint, }: ServicePointsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
button: {
|
|
3
|
+
alignSelf: "flex-end";
|
|
4
|
+
gridArea: "2 / 2 / 3 / 3";
|
|
5
|
+
justifySelf: "flex-end";
|
|
6
|
+
padding: number;
|
|
7
|
+
};
|
|
8
|
+
getContainerStyles: (theme: any) => {
|
|
9
|
+
display: "grid";
|
|
10
|
+
gridTemplateColumns: string;
|
|
11
|
+
gridTemplateRows: string;
|
|
12
|
+
padding: any;
|
|
13
|
+
};
|
|
14
|
+
getExpandedContainerStyles: (theme: any) => {
|
|
15
|
+
display: "flex";
|
|
16
|
+
flexDirection: "column";
|
|
17
|
+
justifyContent: "center";
|
|
18
|
+
padding: any;
|
|
19
|
+
};
|
|
20
|
+
locationToggle: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
21
|
+
alignItems: "center";
|
|
22
|
+
color: string;
|
|
23
|
+
display: "flex";
|
|
24
|
+
lineHeight: string;
|
|
25
|
+
whiteSpace: "nowrap";
|
|
26
|
+
};
|
|
27
|
+
selectButton: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
28
|
+
backgroundColor: string;
|
|
29
|
+
borderRadius: string;
|
|
30
|
+
color: string;
|
|
31
|
+
cursor: "pointer";
|
|
32
|
+
padding: string;
|
|
33
|
+
whiteSpace: "nowrap";
|
|
34
|
+
};
|
|
35
|
+
servicePointWrapper: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
36
|
+
display: "flex";
|
|
37
|
+
flexDirection: "column";
|
|
38
|
+
gap: number;
|
|
39
|
+
gridArea: "1 / 1 / 3 / 3";
|
|
40
|
+
};
|
|
41
|
+
subText: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
42
|
+
color: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./skeleton-carrier-row";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SkeletonCarrierRow: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
skeletonLogoContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
alignItems: "center";
|
|
4
|
+
columnGap: string;
|
|
5
|
+
display: "flex";
|
|
6
|
+
};
|
|
7
|
+
skeletonRow: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
8
|
+
"&:not(:last-of-type)": {
|
|
9
|
+
borderBottom: string;
|
|
10
|
+
};
|
|
11
|
+
alignItems: "center";
|
|
12
|
+
display: "flex";
|
|
13
|
+
flexDirection: "row";
|
|
14
|
+
justifyContent: "space-between";
|
|
15
|
+
padding: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./suspend-text";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
type TabsProps = {
|
|
2
|
+
fullWidth?: boolean;
|
|
2
3
|
onSelectTab: (tab: string) => void;
|
|
3
4
|
selectedTab: string;
|
|
4
5
|
tabs: string[];
|
|
5
6
|
};
|
|
6
|
-
export declare const Tabs: ({
|
|
7
|
+
export declare const Tabs: ({ fullWidth, onSelectTab, selectedTab, tabs }: TabsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -5,10 +5,9 @@ export declare const styles: {
|
|
|
5
5
|
display: "flex";
|
|
6
6
|
gap: number;
|
|
7
7
|
padding: number;
|
|
8
|
-
width: string;
|
|
9
8
|
};
|
|
10
|
-
getTabStyles: (selected: boolean) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
11
|
-
backgroundColor:
|
|
9
|
+
getTabStyles: (selected: boolean, fullWidth?: boolean) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
10
|
+
backgroundColor: string;
|
|
12
11
|
border: string;
|
|
13
12
|
borderRadius: string;
|
|
14
13
|
color: string;
|
|
@@ -16,5 +15,6 @@ export declare const styles: {
|
|
|
16
15
|
fontSize: string;
|
|
17
16
|
fontWeight: "normal" | "bold";
|
|
18
17
|
padding: number;
|
|
18
|
+
width: string;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
import { ConnectCarrierFeatures } from "../../../elements/connect-carrier/connect-carrier";
|
|
3
|
+
import { ListCarriersFeatures } from "../list-carriers";
|
|
4
|
+
export type AccountSettingsFeatures = ListCarriersFeatures & ConnectCarrierFeatures;
|
|
2
5
|
export type AccountSettingsProps = {
|
|
3
6
|
carriers?: SE.Carrier[];
|
|
4
7
|
currency: SE.Currency;
|
|
8
|
+
features?: AccountSettingsFeatures;
|
|
5
9
|
};
|
|
6
|
-
export declare const AccountSettings: ({ carriers, currency, ...rest }: AccountSettingsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const AccountSettings: ({ features, carriers, currency, ...rest }: AccountSettingsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|