@paygreen/pgui 2.0.0 → 2.1.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/README.md +94 -0
- package/dist/cjs/index.js +3142 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/components/ActionsButton/index.d.ts +6 -0
- package/dist/cjs/types/components/DataList/index.d.ts +35 -0
- package/dist/cjs/types/components/FormGroup/index.d.ts +12 -0
- package/dist/cjs/types/components/Pagination/index.d.ts +43 -0
- package/dist/cjs/types/components/index.d.ts +4 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/theme/components/Badge.d.ts +7 -0
- package/dist/cjs/types/theme/components/Button.d.ts +140 -0
- package/dist/cjs/types/theme/components/Input.d.ts +47 -0
- package/dist/cjs/types/theme/components/Tag.d.ts +8 -0
- package/dist/cjs/types/theme/foundations/colors.d.ts +65 -0
- package/dist/cjs/types/theme/foundations/shadows.d.ts +10 -0
- package/dist/cjs/types/theme/foundations/typography.d.ts +10 -0
- package/dist/cjs/types/theme/index.d.ts +1 -0
- package/dist/esm/index.js +3118 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/components/ActionsButton/index.d.ts +6 -0
- package/dist/esm/types/components/DataList/index.d.ts +35 -0
- package/dist/esm/types/components/FormGroup/index.d.ts +12 -0
- package/dist/esm/types/components/Pagination/index.d.ts +43 -0
- package/dist/esm/types/components/index.d.ts +4 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/theme/components/Badge.d.ts +7 -0
- package/dist/esm/types/theme/components/Button.d.ts +140 -0
- package/dist/esm/types/theme/components/Input.d.ts +47 -0
- package/dist/esm/types/theme/components/Tag.d.ts +8 -0
- package/dist/esm/types/theme/foundations/colors.d.ts +65 -0
- package/dist/esm/types/theme/foundations/shadows.d.ts +10 -0
- package/dist/esm/types/theme/foundations/typography.d.ts +10 -0
- package/dist/esm/types/theme/index.d.ts +1 -0
- package/dist/index.d.ts +96 -0
- package/package.json +79 -5
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { IconButtonProps } from '@chakra-ui/react';
|
|
3
|
+
export declare type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const ActionsButton: FC<React.PropsWithChildren<ActionsButtonProps>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { AccordionProps, FlexProps } from '@chakra-ui/react';
|
|
3
|
+
export declare const DataListContext: React.Context<any>;
|
|
4
|
+
export declare const DataListHeaderContext: React.Context<boolean>;
|
|
5
|
+
export declare type DataListCellProps = FlexProps & {
|
|
6
|
+
colName?: string;
|
|
7
|
+
colWidth?: string | number | Record<string, string | number>;
|
|
8
|
+
isVisible?: boolean | boolean[] | Record<string, boolean>;
|
|
9
|
+
};
|
|
10
|
+
export declare const DataListCell: ({ children, colName, colWidth, isVisible, ...rest }: DataListCellProps) => JSX.Element | null;
|
|
11
|
+
export declare const DataListAccordion: ({ ...rest }: {
|
|
12
|
+
[x: string]: any;
|
|
13
|
+
}) => JSX.Element;
|
|
14
|
+
export declare const DataListAccordionButton: ({ ...rest }: {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
}) => JSX.Element;
|
|
17
|
+
export declare const DataListAccordionIcon: ({ ...rest }: {
|
|
18
|
+
[x: string]: any;
|
|
19
|
+
}) => JSX.Element;
|
|
20
|
+
export declare const DataListAccordionPanel: ({ ...rest }: {
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
}) => JSX.Element;
|
|
23
|
+
export declare type DataListRowProps = FlexProps & {
|
|
24
|
+
isVisible?: boolean | boolean[] | Record<string, boolean>;
|
|
25
|
+
isDisabled?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare const DataListRow: FC<React.PropsWithChildren<DataListRowProps>>;
|
|
28
|
+
export declare type DataListHeaderProps = DataListRowProps;
|
|
29
|
+
export declare const DataListHeader: FC<React.PropsWithChildren<DataListHeaderProps>>;
|
|
30
|
+
export declare type DataListFooterProps = DataListRowProps;
|
|
31
|
+
export declare const DataListFooter: FC<React.PropsWithChildren<DataListFooterProps>>;
|
|
32
|
+
export declare type DataListProps = AccordionProps & {
|
|
33
|
+
isHover?: boolean;
|
|
34
|
+
};
|
|
35
|
+
export declare const DataList: FC<React.PropsWithChildren<DataListProps>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FormControlProps } from '@chakra-ui/react';
|
|
3
|
+
export declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue' | 'label'> & {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
errorMessage?: ReactNode;
|
|
6
|
+
helper?: ReactNode;
|
|
7
|
+
id?: string;
|
|
8
|
+
isRequired?: boolean;
|
|
9
|
+
label?: ReactNode;
|
|
10
|
+
showError?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const FormGroup: ({ children, errorMessage, helper, id, isRequired, label, showError, ...props }: FormGroupProps) => JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { IconButtonProps, StackProps } from '@chakra-ui/react';
|
|
3
|
+
export declare const getPaginationInfo: ({ page, pageSize, totalItems, }: {
|
|
4
|
+
page?: number | undefined;
|
|
5
|
+
pageSize?: number | undefined;
|
|
6
|
+
totalItems?: number | undefined;
|
|
7
|
+
}) => {
|
|
8
|
+
firstPage: number;
|
|
9
|
+
lastPage: number;
|
|
10
|
+
firstItemOnPage: number;
|
|
11
|
+
lastItemOnPage: number;
|
|
12
|
+
isFirstPage: boolean;
|
|
13
|
+
isLastPage: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare type PaginationContextValue<PageType = number> = {
|
|
16
|
+
page: PageType;
|
|
17
|
+
setPage: (page: PageType) => void;
|
|
18
|
+
firstPage: PageType;
|
|
19
|
+
isFirstPage: boolean;
|
|
20
|
+
lastPage: PageType;
|
|
21
|
+
isLastPage: boolean;
|
|
22
|
+
totalItems: number;
|
|
23
|
+
isLoadingPage: boolean;
|
|
24
|
+
pageSize: number;
|
|
25
|
+
firstItemOnPage: number;
|
|
26
|
+
lastItemOnPage: number;
|
|
27
|
+
};
|
|
28
|
+
export declare const PaginationContext: React.Context<PaginationContextValue<number>>;
|
|
29
|
+
export declare const PaginationButtonFirstPage: FC<React.PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
30
|
+
export declare const PaginationButtonPrevPage: FC<React.PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
31
|
+
export declare const PaginationButtonLastPage: FC<React.PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
32
|
+
export declare const PaginationButtonNextPage: FC<React.PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
33
|
+
export declare const PaginationInfo: ({ ...rest }: {
|
|
34
|
+
[x: string]: any;
|
|
35
|
+
}) => JSX.Element;
|
|
36
|
+
export declare type PaginationProps = StackProps & {
|
|
37
|
+
setPage: (page: number) => void;
|
|
38
|
+
page?: number;
|
|
39
|
+
pageSize?: number;
|
|
40
|
+
totalItems?: number;
|
|
41
|
+
isLoadingPage?: boolean;
|
|
42
|
+
};
|
|
43
|
+
export declare const Pagination: ({ setPage, page, pageSize, totalItems, isLoadingPage, ...rest }: PaginationProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
export declare const Button: {
|
|
2
|
+
baseStyle: {
|
|
3
|
+
borderRadius: string;
|
|
4
|
+
fontWeight: string;
|
|
5
|
+
};
|
|
6
|
+
variants: {
|
|
7
|
+
'@primary': (props: any) => {
|
|
8
|
+
bg: string;
|
|
9
|
+
color: string;
|
|
10
|
+
_focus: {
|
|
11
|
+
boxShadow: string;
|
|
12
|
+
};
|
|
13
|
+
_hover: {
|
|
14
|
+
bg: string;
|
|
15
|
+
color: string;
|
|
16
|
+
_disabled: {
|
|
17
|
+
bg: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
_active: {
|
|
21
|
+
bg: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
'@secondary': (props: any) => {
|
|
25
|
+
bg: string;
|
|
26
|
+
color: string;
|
|
27
|
+
_focus: {
|
|
28
|
+
boxShadow: string;
|
|
29
|
+
};
|
|
30
|
+
_hover: {
|
|
31
|
+
bg: string;
|
|
32
|
+
color: string;
|
|
33
|
+
_disabled: {
|
|
34
|
+
bg: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
_active: {
|
|
38
|
+
bg: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
'@danger': (props: any) => {
|
|
42
|
+
bg: string;
|
|
43
|
+
color: string;
|
|
44
|
+
_focus: {
|
|
45
|
+
boxShadow: string;
|
|
46
|
+
};
|
|
47
|
+
_hover: {
|
|
48
|
+
bg: string;
|
|
49
|
+
color: string;
|
|
50
|
+
_disabled: {
|
|
51
|
+
bg: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
_active: {
|
|
55
|
+
bg: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
'@link': (props: any) => {
|
|
59
|
+
height: string;
|
|
60
|
+
margin: number;
|
|
61
|
+
padding: number;
|
|
62
|
+
_hover: {
|
|
63
|
+
textDecoration: string;
|
|
64
|
+
color: string;
|
|
65
|
+
};
|
|
66
|
+
_active: {
|
|
67
|
+
textDecoration: string;
|
|
68
|
+
color: string;
|
|
69
|
+
};
|
|
70
|
+
bg: string;
|
|
71
|
+
color: string;
|
|
72
|
+
_focus: {
|
|
73
|
+
boxShadow: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
'@linkNeutral': (props: any) => {
|
|
77
|
+
height: string;
|
|
78
|
+
margin: number;
|
|
79
|
+
padding: number;
|
|
80
|
+
_hover: {
|
|
81
|
+
textDecoration: string;
|
|
82
|
+
color: string;
|
|
83
|
+
};
|
|
84
|
+
bg: string;
|
|
85
|
+
color: string;
|
|
86
|
+
_focus: {
|
|
87
|
+
boxShadow: string;
|
|
88
|
+
};
|
|
89
|
+
_active: {
|
|
90
|
+
bg: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
'@white': (props: any) => {
|
|
94
|
+
borderWidth: string;
|
|
95
|
+
borderStyle: string;
|
|
96
|
+
borderColor: string;
|
|
97
|
+
bg: string;
|
|
98
|
+
color: string;
|
|
99
|
+
_focus: {
|
|
100
|
+
boxShadow: string;
|
|
101
|
+
};
|
|
102
|
+
_hover: {
|
|
103
|
+
bg: string;
|
|
104
|
+
color: string;
|
|
105
|
+
_disabled: {
|
|
106
|
+
bg: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
_active: {
|
|
110
|
+
bg: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
'@whiteNeutral': (props: any) => {
|
|
114
|
+
borderWidth: string;
|
|
115
|
+
borderStyle: string;
|
|
116
|
+
borderColor: string;
|
|
117
|
+
bg: string;
|
|
118
|
+
color: string;
|
|
119
|
+
_focus: {
|
|
120
|
+
boxShadow: string;
|
|
121
|
+
};
|
|
122
|
+
_hover: {
|
|
123
|
+
bg: string;
|
|
124
|
+
color: string;
|
|
125
|
+
_disabled: {
|
|
126
|
+
bg: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
_active: {
|
|
130
|
+
bg: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
ghost: (props: any) => {
|
|
134
|
+
bg: string;
|
|
135
|
+
_hover: {
|
|
136
|
+
bg: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare const Input: {
|
|
2
|
+
baseStyle: {
|
|
3
|
+
field: {
|
|
4
|
+
borderRadius: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
variants: {
|
|
8
|
+
outline: (props: any) => {
|
|
9
|
+
field: {
|
|
10
|
+
bg: string;
|
|
11
|
+
borderColor: string;
|
|
12
|
+
borderRadius: string;
|
|
13
|
+
_focus: {
|
|
14
|
+
borderColor: string;
|
|
15
|
+
};
|
|
16
|
+
_focusVisible: {
|
|
17
|
+
boxShadow: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
addon: {
|
|
21
|
+
borderRadius: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
filled: (props: any) => {
|
|
25
|
+
field: {
|
|
26
|
+
bg: string;
|
|
27
|
+
borderWidth: string;
|
|
28
|
+
borderColor: string;
|
|
29
|
+
borderRadius: string;
|
|
30
|
+
_hover: {
|
|
31
|
+
bg: string;
|
|
32
|
+
borderColor: string;
|
|
33
|
+
};
|
|
34
|
+
_focus: {
|
|
35
|
+
bg: string;
|
|
36
|
+
borderColor: string;
|
|
37
|
+
};
|
|
38
|
+
_focusVisible: {
|
|
39
|
+
boxShadow: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
addon: {
|
|
43
|
+
borderRadius: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export declare const colors: {
|
|
2
|
+
brand: {
|
|
3
|
+
50: string;
|
|
4
|
+
100: string;
|
|
5
|
+
200: string;
|
|
6
|
+
300: string;
|
|
7
|
+
400: string;
|
|
8
|
+
500: string;
|
|
9
|
+
600: string;
|
|
10
|
+
700: string;
|
|
11
|
+
800: string;
|
|
12
|
+
900: string;
|
|
13
|
+
};
|
|
14
|
+
gray: {
|
|
15
|
+
50: string;
|
|
16
|
+
100: string;
|
|
17
|
+
200: string;
|
|
18
|
+
300: string;
|
|
19
|
+
400: string;
|
|
20
|
+
500: string;
|
|
21
|
+
600: string;
|
|
22
|
+
700: string;
|
|
23
|
+
800: string;
|
|
24
|
+
900: string;
|
|
25
|
+
};
|
|
26
|
+
red: {
|
|
27
|
+
50: string;
|
|
28
|
+
100: string;
|
|
29
|
+
200: string;
|
|
30
|
+
300: string;
|
|
31
|
+
400: string;
|
|
32
|
+
500: string;
|
|
33
|
+
600: string;
|
|
34
|
+
700: string;
|
|
35
|
+
800: string;
|
|
36
|
+
900: string;
|
|
37
|
+
};
|
|
38
|
+
orange: {
|
|
39
|
+
50: string;
|
|
40
|
+
100: string;
|
|
41
|
+
200: string;
|
|
42
|
+
300: string;
|
|
43
|
+
400: string;
|
|
44
|
+
500: string;
|
|
45
|
+
600: string;
|
|
46
|
+
700: string;
|
|
47
|
+
800: string;
|
|
48
|
+
900: string;
|
|
49
|
+
};
|
|
50
|
+
green: {
|
|
51
|
+
50: string;
|
|
52
|
+
100: string;
|
|
53
|
+
200: string;
|
|
54
|
+
300: string;
|
|
55
|
+
400: string;
|
|
56
|
+
500: string;
|
|
57
|
+
600: string;
|
|
58
|
+
700: string;
|
|
59
|
+
800: string;
|
|
60
|
+
900: string;
|
|
61
|
+
};
|
|
62
|
+
gradients: {
|
|
63
|
+
primary: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const theme: unknown;
|