@shipengine/elements 1.1.1 → 1.2.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 +5018 -4293
- package/index.js +5019 -4304
- package/package.json +3 -3
- package/src/components/code-block/code-block.d.ts +6 -0
- package/src/components/code-block/index.d.ts +1 -0
- package/src/components/drawer/drawer.d.ts +9 -0
- package/src/components/drawer/drawer.styles.d.ts +28 -0
- package/src/components/drawer/index.d.ts +1 -0
- package/src/components/field/date-picker/date-picker.d.ts +2 -2
- package/src/components/grid-controller/grid-controller.d.ts +4 -12
- package/src/components/grid-controller/grid-controller.styles.d.ts +2 -52
- package/src/components/index.d.ts +7 -3
- package/src/components/pager/index.d.ts +2 -0
- package/src/components/pager/pager.d.ts +10 -0
- package/src/components/pager/pager.styles.d.ts +44 -0
- package/src/components/pager/usePager.d.ts +10 -0
- package/src/components/tabs/index.d.ts +1 -0
- package/src/components/tabs/tabs.d.ts +7 -0
- package/src/components/tabs/tabs.styles.d.ts +20 -0
- package/src/components/templates/index.d.ts +4 -3
- package/src/components/templates/theme-creator/color-palette-editor/color-palette-editor.d.ts +8 -0
- package/src/components/templates/theme-creator/color-palette-editor/color-palette-editor.styles.d.ts +49 -0
- package/src/components/templates/theme-creator/color-palette-editor/index.d.ts +1 -0
- package/src/components/templates/theme-creator/index.d.ts +3 -0
- package/src/components/templates/theme-creator/theme-creator.d.ts +10 -0
- package/src/components/templates/theme-creator/theme-creator.styles.d.ts +71 -0
- package/src/components/templates/theme-creator/typography-editor/index.d.ts +1 -0
- package/src/components/templates/theme-creator/typography-editor/typography-editor.d.ts +8 -0
- package/src/components/templates/theme-creator/typography-editor/typography-editor.styles.d.ts +36 -0
- package/src/elements/index.d.ts +2 -1
- package/src/elements/shipments-grid/index.d.ts +1 -1
- package/src/elements/shipments-grid/shipments-grid.d.ts +688 -0
- package/src/elements/theme-creator/index.d.ts +2 -0
- package/src/elements/theme-creator/theme-creator-provider.d.ts +12 -0
- package/src/elements/theme-creator/theme-creator.d.ts +694 -0
- package/src/elements/theme-creator/themeData/index.d.ts +1 -0
- package/src/elements/theme-creator/themeData/themeData.d.ts +3 -0
- package/src/utilities/{string.d.ts → formatString.d.ts} +2 -0
- package/src/utilities/index.d.ts +1 -1
- package/src/components/grid-controller/hooks/use-grid.d.ts +0 -43
- package/src/components/templates/shipments-grid/index.d.ts +0 -1
- package/src/components/templates/shipments-grid/shipments-grid.d.ts +0 -14
- package/src/elements/shipments-grid/shipmets-grid.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@shipengine/alchemy": "5.x.x",
|
|
6
6
|
"@emotion/react": "11.x",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@rjsf/validator-ajv8": "5.16.1",
|
|
28
28
|
"@shipengine/giger": "1.0.1",
|
|
29
29
|
"@shipengine/giger-theme": "1.0.1",
|
|
30
|
-
"@shipengine/js-api": "0.48.
|
|
30
|
+
"@shipengine/js-api": "0.48.3",
|
|
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",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"js-base64": "3.7.3",
|
|
46
46
|
"libphonenumber-js": "1.10.14",
|
|
47
47
|
"lodash": "4.17.21",
|
|
48
|
-
"react-datepicker": "4.
|
|
48
|
+
"react-datepicker": "4.25.0",
|
|
49
49
|
"react-hook-form": "7.40.0",
|
|
50
50
|
"rollup-plugin-copy": "3.4.0",
|
|
51
51
|
"zod": "3.19.1"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./code-block";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type DrawerProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
headerContent?: React.ReactNode;
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
toggleDrawer: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const Drawer: ({ children, headerContent, isOpen, toggleDrawer }: DrawerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Theme } from "@emotion/react";
|
|
2
|
+
export declare const styles: {
|
|
3
|
+
container: {
|
|
4
|
+
backgroundColor: "#11003A";
|
|
5
|
+
};
|
|
6
|
+
getChildrenStyles: (isOpen?: boolean) => (theme: Theme) => {
|
|
7
|
+
height: string;
|
|
8
|
+
overflow: "scroll";
|
|
9
|
+
paddingLeft: number;
|
|
10
|
+
};
|
|
11
|
+
getDrawerStyles: (isOpen?: boolean) => (theme: Theme) => {
|
|
12
|
+
backgroundColor: "#11003A";
|
|
13
|
+
bottom: number;
|
|
14
|
+
height: string;
|
|
15
|
+
minWidth: string;
|
|
16
|
+
position: "fixed";
|
|
17
|
+
transformOrigin: string;
|
|
18
|
+
transition: "height 0.5s;";
|
|
19
|
+
};
|
|
20
|
+
header: (theme: Theme) => {
|
|
21
|
+
alignItems: "center";
|
|
22
|
+
color: "#fff";
|
|
23
|
+
display: "flex";
|
|
24
|
+
height: number;
|
|
25
|
+
justifyContent: "space-between";
|
|
26
|
+
padding: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./drawer";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as RDP from "react-datepicker";
|
|
2
2
|
import { ControlledField } from "../create-field-controller";
|
|
3
3
|
export type DatePickerProps = {
|
|
4
4
|
onChange?: (date: string | null) => void;
|
|
5
5
|
translator?: (text: string) => string;
|
|
6
|
-
} & Omit<ReactDatePickerProps, "onChange">;
|
|
6
|
+
} & Omit<RDP.ReactDatePickerProps, "onChange">;
|
|
7
7
|
export declare const DatePicker: ControlledField<DatePickerProps>;
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import { PageableResult } from "@shipengine/alchemy";
|
|
3
2
|
type ColumnProps<T> = {
|
|
4
|
-
columnOrder: number;
|
|
5
3
|
headerContent: ReactNode;
|
|
6
4
|
renderCellContent: (data: T) => ReactNode;
|
|
7
5
|
};
|
|
8
|
-
type ColumnsConfig<T extends object> = {
|
|
9
|
-
[K in keyof T]: ColumnProps<T>;
|
|
10
|
-
};
|
|
11
6
|
type GridProps<T extends object> = {
|
|
12
|
-
columns:
|
|
13
|
-
currentPageSize: number;
|
|
7
|
+
columns: ColumnProps<T>[];
|
|
14
8
|
data: T[];
|
|
15
|
-
|
|
16
|
-
onPageSizeSelect: (rowsPerPage: number) => void;
|
|
9
|
+
footerContent?: ReactNode;
|
|
17
10
|
onRowClick?: (data: T) => void;
|
|
18
|
-
|
|
19
|
-
rowCountSelection?: Array<number>;
|
|
11
|
+
useCheckboxes?: boolean;
|
|
20
12
|
};
|
|
21
|
-
export declare const GridController: <T extends object>({
|
|
13
|
+
export declare const GridController: <T extends object>({ columns, data, footerContent, onRowClick, useCheckboxes, }: GridProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
22
14
|
export {};
|
|
@@ -1,45 +1,6 @@
|
|
|
1
1
|
export declare const styles: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
borderTop: string;
|
|
5
|
-
};
|
|
6
|
-
alignItems: "center";
|
|
7
|
-
display: "flex";
|
|
8
|
-
justifyContent: "space-between";
|
|
9
|
-
};
|
|
10
|
-
leftFooter: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
11
|
-
display: "flex";
|
|
12
|
-
margin: number;
|
|
13
|
-
span: {
|
|
14
|
-
fontWeight: number;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
rowCount: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
18
|
-
alignItems: "center";
|
|
19
|
-
display: "flex";
|
|
20
|
-
marginRight: number;
|
|
21
|
-
whiteSpace: "pre";
|
|
22
|
-
};
|
|
23
|
-
rowCountDropDown: {
|
|
24
|
-
"> * > *": {
|
|
25
|
-
justifyContent: "center !important";
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
rowsActions: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
29
|
-
"#selected-row": {
|
|
30
|
-
":hover": {
|
|
31
|
-
backgroundColor: "transparent";
|
|
32
|
-
};
|
|
33
|
-
borderRadius: string;
|
|
34
|
-
color: string;
|
|
35
|
-
padding: number;
|
|
36
|
-
paddingRight: number;
|
|
37
|
-
};
|
|
38
|
-
alignItems: "baseline";
|
|
39
|
-
display: "flex";
|
|
40
|
-
span: {
|
|
41
|
-
alignSelf: "center";
|
|
42
|
-
};
|
|
2
|
+
checkboxHeader: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
width: number;
|
|
43
4
|
};
|
|
44
5
|
table: {
|
|
45
6
|
"*": {
|
|
@@ -47,15 +8,4 @@ export declare const styles: {
|
|
|
47
8
|
textOverflow: "clip !important";
|
|
48
9
|
};
|
|
49
10
|
};
|
|
50
|
-
tableHeader: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
51
|
-
"> :nth-of-type(1)": {
|
|
52
|
-
width: number;
|
|
53
|
-
};
|
|
54
|
-
"> :nth-of-type(2)": {
|
|
55
|
-
width: number;
|
|
56
|
-
};
|
|
57
|
-
"> :nth-of-type(7)": {
|
|
58
|
-
width: number;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
11
|
};
|
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
export * from "./collapsible-panel";
|
|
2
1
|
export * from "./add-funds-form";
|
|
3
2
|
export * from "./auto-funding-form";
|
|
4
3
|
export * from "./button-group";
|
|
5
4
|
export * from "./carrier-balance";
|
|
6
5
|
export * from "./carrier-icon";
|
|
7
6
|
export * from "./carrier-logo";
|
|
7
|
+
export * from "./code-block";
|
|
8
|
+
export * from "./collapsible-panel";
|
|
8
9
|
export * from "./copy";
|
|
9
10
|
export * from "./cube";
|
|
10
11
|
export * from "./date-range-combo";
|
|
11
12
|
export * from "./date-range-select";
|
|
12
13
|
export * from "./display-term";
|
|
14
|
+
export * from "./drawer";
|
|
13
15
|
export * from "./error-fallback";
|
|
14
|
-
export * from "./field";
|
|
15
16
|
export * from "./field-label";
|
|
17
|
+
export * from "./field";
|
|
16
18
|
export * from "./form-portal";
|
|
17
19
|
export * from "./fund-and-purchase";
|
|
20
|
+
export * from "./grid-controller";
|
|
18
21
|
export * from "./inline-label";
|
|
19
22
|
export * from "./items-breakdown";
|
|
20
23
|
export * from "./link-action";
|
|
21
24
|
export * from "./loader";
|
|
22
25
|
export * from "./manage-funding";
|
|
26
|
+
export * from "./pager";
|
|
23
27
|
export * from "./payment-method-settings";
|
|
24
28
|
export * from "./portal";
|
|
25
29
|
export * from "./powered-by-shipengine";
|
|
@@ -27,4 +31,4 @@ export * from "./section";
|
|
|
27
31
|
export * from "./spacer";
|
|
28
32
|
export * from "./spread";
|
|
29
33
|
export * from "./story-notes";
|
|
30
|
-
export * from "./
|
|
34
|
+
export * from "./tabs";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PageableResult } from "@shipengine/alchemy";
|
|
2
|
+
type PagerProps = {
|
|
3
|
+
currentPageSize: number;
|
|
4
|
+
onPageSelect: (page: number) => void;
|
|
5
|
+
onPageSizeSelect: (rowsPerPage: number) => void;
|
|
6
|
+
pagingData: PageableResult;
|
|
7
|
+
rowCountSelection?: Array<number>;
|
|
8
|
+
};
|
|
9
|
+
export declare const Pager: ({ currentPageSize, pagingData, rowCountSelection, onPageSelect, onPageSizeSelect, }: PagerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
footer: {
|
|
3
|
+
"> *": {
|
|
4
|
+
borderTop: string;
|
|
5
|
+
};
|
|
6
|
+
alignItems: "center";
|
|
7
|
+
display: "flex";
|
|
8
|
+
justifyContent: "space-between";
|
|
9
|
+
};
|
|
10
|
+
leftFooter: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
11
|
+
display: "flex";
|
|
12
|
+
margin: number;
|
|
13
|
+
span: {
|
|
14
|
+
fontWeight: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
rowCount: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
18
|
+
alignItems: "center";
|
|
19
|
+
display: "flex";
|
|
20
|
+
marginRight: number;
|
|
21
|
+
whiteSpace: "pre";
|
|
22
|
+
};
|
|
23
|
+
rowCountDropDown: {
|
|
24
|
+
"> * > *": {
|
|
25
|
+
justifyContent: "center !important";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
rowsActions: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
29
|
+
"#selected-row": {
|
|
30
|
+
":hover": {
|
|
31
|
+
backgroundColor: "transparent";
|
|
32
|
+
};
|
|
33
|
+
borderRadius: string;
|
|
34
|
+
color: string;
|
|
35
|
+
padding: number;
|
|
36
|
+
paddingRight: number;
|
|
37
|
+
};
|
|
38
|
+
alignItems: "baseline";
|
|
39
|
+
display: "flex";
|
|
40
|
+
span: {
|
|
41
|
+
alignSelf: "center";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const usePager: (initialPageSize?: number) => {
|
|
2
|
+
page: number;
|
|
3
|
+
pagerProps: {
|
|
4
|
+
currentPage: number;
|
|
5
|
+
currentPageSize: number;
|
|
6
|
+
onPageSelect: (page: number) => void;
|
|
7
|
+
onPageSizeSelect: (pageSize: number) => void;
|
|
8
|
+
};
|
|
9
|
+
pageSize: number;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./tabs";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
container: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
border: string;
|
|
4
|
+
borderRadius: string;
|
|
5
|
+
display: "flex";
|
|
6
|
+
gap: number;
|
|
7
|
+
padding: number;
|
|
8
|
+
width: string;
|
|
9
|
+
};
|
|
10
|
+
getTabStyles: (selected: boolean) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
11
|
+
backgroundColor: string;
|
|
12
|
+
border: string;
|
|
13
|
+
borderRadius: string;
|
|
14
|
+
color: string;
|
|
15
|
+
cursor: "pointer";
|
|
16
|
+
fontSize: string;
|
|
17
|
+
fontWeight: "normal" | "bold";
|
|
18
|
+
padding: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
export * from "../address-preference-context";
|
|
1
2
|
export * from "./account-settings";
|
|
2
3
|
export * from "./add-carrier-form";
|
|
3
4
|
export * from "./address-display";
|
|
4
5
|
export * from "./address-form";
|
|
5
6
|
export * from "./address-parser";
|
|
6
|
-
export * from "../address-preference-context";
|
|
7
7
|
export * from "./address-preference-display";
|
|
8
8
|
export * from "./address-preference-select";
|
|
9
9
|
export * from "./customs-item-form";
|
|
@@ -11,9 +11,10 @@ export * from "./label";
|
|
|
11
11
|
export * from "./list-carriers";
|
|
12
12
|
export * from "./manage-warehouses";
|
|
13
13
|
export * from "./rate-form";
|
|
14
|
-
export * from "./suspend-sales-order";
|
|
15
14
|
export * from "./shipment-form";
|
|
16
15
|
export * from "./shipment";
|
|
16
|
+
export * from "./suspend-sales-order";
|
|
17
17
|
export * from "./suspend-shipment";
|
|
18
|
-
export * from "./
|
|
18
|
+
export * from "./theme-creator";
|
|
19
19
|
export * from "./wallet-form";
|
|
20
|
+
export * from "./warehouse-form";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CustomThemeData } from "@shipengine/giger-theme";
|
|
2
|
+
type ColorPaletteEditorProps = {
|
|
3
|
+
formatKey: (key: string) => string;
|
|
4
|
+
onUpdatePaletteConfig: (paletteConfig: CustomThemeData["palette"]) => void;
|
|
5
|
+
paletteConfig: CustomThemeData["palette"];
|
|
6
|
+
};
|
|
7
|
+
export declare const ColorPaletteEditor: ({ paletteConfig, onUpdatePaletteConfig, formatKey, }: ColorPaletteEditorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
package/src/components/templates/theme-creator/color-palette-editor/color-palette-editor.styles.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Theme } from "@emotion/react";
|
|
2
|
+
export declare const styles: {
|
|
3
|
+
category: {
|
|
4
|
+
alignItems: "center";
|
|
5
|
+
cursor: "pointer";
|
|
6
|
+
display: "flex";
|
|
7
|
+
flexDirection: "row";
|
|
8
|
+
justifyContent: "space-between";
|
|
9
|
+
};
|
|
10
|
+
colorPicker: (theme: Theme) => {
|
|
11
|
+
"&::-webkit-color-swatch": {
|
|
12
|
+
border: string;
|
|
13
|
+
borderRadius: string;
|
|
14
|
+
padding: number;
|
|
15
|
+
};
|
|
16
|
+
"&::-webkit-color-swatch-wrapper": {
|
|
17
|
+
padding: number;
|
|
18
|
+
};
|
|
19
|
+
alignSelf: "center";
|
|
20
|
+
appearance: "none";
|
|
21
|
+
background: string;
|
|
22
|
+
border: number;
|
|
23
|
+
cursor: "pointer";
|
|
24
|
+
height: number;
|
|
25
|
+
outline: string;
|
|
26
|
+
width: number;
|
|
27
|
+
};
|
|
28
|
+
container: (theme: Theme) => {
|
|
29
|
+
marginBottom: number;
|
|
30
|
+
};
|
|
31
|
+
input: (theme: Theme) => {
|
|
32
|
+
border: string;
|
|
33
|
+
borderRadius: string;
|
|
34
|
+
color: string;
|
|
35
|
+
fontSize: string;
|
|
36
|
+
padding: number;
|
|
37
|
+
};
|
|
38
|
+
inputContainer: (theme: Theme) => {
|
|
39
|
+
alignItems: "center";
|
|
40
|
+
display: "flex";
|
|
41
|
+
flexDirection: "row";
|
|
42
|
+
justifyContent: "space-between";
|
|
43
|
+
padding: string;
|
|
44
|
+
};
|
|
45
|
+
wrapper: (theme: Theme) => {
|
|
46
|
+
display: "flex";
|
|
47
|
+
gap: number;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./color-palette-editor";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CustomThemeData } from "@shipengine/giger-theme";
|
|
2
|
+
export type ThemeCreatorProps = {
|
|
3
|
+
onUpdateThemeConfig: (themeConfig: CustomThemeData) => void;
|
|
4
|
+
presets?: {
|
|
5
|
+
presetName: string;
|
|
6
|
+
themeConfig: CustomThemeData;
|
|
7
|
+
}[];
|
|
8
|
+
themeConfig: CustomThemeData;
|
|
9
|
+
};
|
|
10
|
+
export declare const ThemeCreator: ({ themeConfig, onUpdateThemeConfig, presets }: ThemeCreatorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Theme } from "@emotion/react";
|
|
2
|
+
export declare const styles: {
|
|
3
|
+
container: (theme: Theme) => {
|
|
4
|
+
color: string;
|
|
5
|
+
display: "flex";
|
|
6
|
+
flexDirection: "column";
|
|
7
|
+
flexGrow: number;
|
|
8
|
+
overflow: "hidden";
|
|
9
|
+
position: "relative";
|
|
10
|
+
};
|
|
11
|
+
content: (theme: Theme) => {
|
|
12
|
+
display: "flex";
|
|
13
|
+
flexDirection: "column";
|
|
14
|
+
gap: number;
|
|
15
|
+
padding: number;
|
|
16
|
+
};
|
|
17
|
+
copy: (theme: Theme) => {
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
borderRadius: string;
|
|
20
|
+
padding: number;
|
|
21
|
+
};
|
|
22
|
+
drawerHeader: (theme: Theme) => {
|
|
23
|
+
alignItems: "center";
|
|
24
|
+
display: "flex";
|
|
25
|
+
gap: number;
|
|
26
|
+
justifyContent: "end";
|
|
27
|
+
width: string;
|
|
28
|
+
};
|
|
29
|
+
drawerWrapper: {
|
|
30
|
+
display: "flex";
|
|
31
|
+
justifyContent: "space-between";
|
|
32
|
+
position: "relative";
|
|
33
|
+
};
|
|
34
|
+
header: {
|
|
35
|
+
alignItems: "center";
|
|
36
|
+
display: "flex";
|
|
37
|
+
justifyContent: "space-between";
|
|
38
|
+
};
|
|
39
|
+
popoverWrapper: (theme: Theme) => {
|
|
40
|
+
display: "flex";
|
|
41
|
+
flexDirection: "column";
|
|
42
|
+
gap: number;
|
|
43
|
+
};
|
|
44
|
+
pre: (theme: Theme) => {
|
|
45
|
+
backgroundColor: "#FFFFFF66";
|
|
46
|
+
borderRadius: string;
|
|
47
|
+
fontSize: string;
|
|
48
|
+
padding: number;
|
|
49
|
+
};
|
|
50
|
+
presetOption: (theme: Theme) => {
|
|
51
|
+
"&:hover": {
|
|
52
|
+
backgroundColor: string;
|
|
53
|
+
};
|
|
54
|
+
backgroundColor: "transparent";
|
|
55
|
+
borderRadius: string;
|
|
56
|
+
fontSize: string;
|
|
57
|
+
padding: number;
|
|
58
|
+
};
|
|
59
|
+
presetsButton: (theme: Theme) => {
|
|
60
|
+
"&:hover": {
|
|
61
|
+
backgroundColor: "#d1d4d7";
|
|
62
|
+
};
|
|
63
|
+
backgroundColor: string;
|
|
64
|
+
borderRadius: string;
|
|
65
|
+
cursor: "pointer";
|
|
66
|
+
display: "flex";
|
|
67
|
+
fontSize: string;
|
|
68
|
+
gap: number;
|
|
69
|
+
padding: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./typography-editor";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CustomComponentsVariables } from "@shipengine/giger-theme";
|
|
2
|
+
type TypographyEditorProps = {
|
|
3
|
+
formatKey: (key: string) => string;
|
|
4
|
+
onUpdateTypographyConfig: (typographyConfig: CustomComponentsVariables["Typography"]) => void;
|
|
5
|
+
typographyConfig: CustomComponentsVariables["Typography"];
|
|
6
|
+
};
|
|
7
|
+
export declare const TypographyEditor: ({ onUpdateTypographyConfig, typographyConfig, formatKey, }: TypographyEditorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
package/src/components/templates/theme-creator/typography-editor/typography-editor.styles.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Theme } from "@emotion/react";
|
|
2
|
+
export declare const styles: {
|
|
3
|
+
input: (theme: Theme) => {
|
|
4
|
+
border: string;
|
|
5
|
+
borderRadius: string;
|
|
6
|
+
color: string;
|
|
7
|
+
fontSize: string;
|
|
8
|
+
maxWidth: number;
|
|
9
|
+
padding: number;
|
|
10
|
+
};
|
|
11
|
+
keys: {
|
|
12
|
+
fontSize: string;
|
|
13
|
+
fontWeight: "bold";
|
|
14
|
+
marginTop: string;
|
|
15
|
+
};
|
|
16
|
+
section: (theme: Theme) => {
|
|
17
|
+
"& > div:first-child": {
|
|
18
|
+
flexGrow: number;
|
|
19
|
+
};
|
|
20
|
+
"& > div:last-child": {
|
|
21
|
+
flexShrink: number;
|
|
22
|
+
};
|
|
23
|
+
display: "flex";
|
|
24
|
+
gap: number;
|
|
25
|
+
justifyContent: "space-between";
|
|
26
|
+
};
|
|
27
|
+
sectionContainer: (theme: Theme) => {
|
|
28
|
+
marginBottom: number;
|
|
29
|
+
};
|
|
30
|
+
select: (theme: Theme) => {
|
|
31
|
+
border: string;
|
|
32
|
+
borderRadius: string;
|
|
33
|
+
color: string;
|
|
34
|
+
fontSize: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
package/src/elements/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./account-settings";
|
|
|
2
2
|
export * from "./list-carriers";
|
|
3
3
|
export * from "./manage-warehouses";
|
|
4
4
|
export * from "./purchase-label";
|
|
5
|
+
export * from "./shipengine-workflow";
|
|
6
|
+
export * from "./theme-creator";
|
|
5
7
|
export * from "./view-shipment";
|
|
6
8
|
export * from "./void-label";
|
|
7
|
-
export * from "./shipengine-workflow";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * as ShipmentsGrid from "./
|
|
1
|
+
export * as ShipmentsGrid from "./shipments-grid";
|