@paygreen/pgui 2.1.3 → 2.4.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/dist/cjs/index.js +360 -23
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/ActionsButton/index.d.ts +2 -2
- package/dist/cjs/types/components/Card/index.d.ts +3 -0
- package/dist/cjs/types/components/ConfirmMenuItem/index.d.ts +13 -0
- package/dist/cjs/types/components/DataList/index.d.ts +5 -5
- package/dist/cjs/types/components/Pagination/index.d.ts +5 -5
- package/dist/cjs/types/components/Textarea/index.d.ts +8 -0
- package/dist/cjs/types/components/index.d.ts +2 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/layout/BottomBar/index.d.ts +3 -0
- package/dist/cjs/types/layout/LayoutContainer/index.d.ts +3 -0
- package/dist/cjs/types/layout/SideNav/index.d.ts +19 -0
- package/dist/cjs/types/layout/TopBar/index.d.ts +3 -3
- package/dist/cjs/types/layout/index.d.ts +3 -0
- package/dist/cjs/types/theme/components/checkbox.d.ts +11 -0
- package/dist/cjs/types/theme/components/drawer.d.ts +6 -0
- package/dist/cjs/types/theme/components/index.d.ts +8 -0
- package/dist/cjs/types/theme/components/input.d.ts +0 -2
- package/dist/cjs/types/theme/components/number-input.d.ts +54 -0
- package/dist/cjs/types/theme/components/pin-input.d.ts +31 -0
- package/dist/cjs/types/theme/components/radio.d.ts +6 -0
- package/dist/cjs/types/theme/components/slider.d.ts +6 -0
- package/dist/cjs/types/theme/components/switch.d.ts +6 -0
- package/dist/cjs/types/theme/components/textarea.d.ts +42 -0
- package/dist/cjs/types/theme/foundations/index.d.ts +31 -0
- package/dist/cjs/types/theme/foundations/radius.d.ts +11 -0
- package/dist/cjs/types/theme/foundations/sizes.d.ts +21 -0
- package/dist/cjs/types/theme/rawStyle/chakraStyle.d.ts +2 -0
- package/dist/cjs/types/theme/{externals → rawStyle}/index.d.ts +1 -0
- package/dist/cjs/types/theme/{externals → rawStyle}/reactDayPicker.d.ts +0 -0
- package/dist/cjs/types/utils/index.d.ts +2 -0
- package/dist/cjs/types/utils/responsive.d.ts +1 -0
- package/dist/esm/index.js +351 -28
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/ActionsButton/index.d.ts +2 -2
- package/dist/esm/types/components/Card/index.d.ts +3 -0
- package/dist/esm/types/components/ConfirmMenuItem/index.d.ts +13 -0
- package/dist/esm/types/components/DataList/index.d.ts +5 -5
- package/dist/esm/types/components/Pagination/index.d.ts +5 -5
- package/dist/esm/types/components/Textarea/index.d.ts +8 -0
- package/dist/esm/types/components/index.d.ts +2 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/layout/BottomBar/index.d.ts +3 -0
- package/dist/esm/types/layout/LayoutContainer/index.d.ts +3 -0
- package/dist/esm/types/layout/SideNav/index.d.ts +19 -0
- package/dist/esm/types/layout/TopBar/index.d.ts +3 -3
- package/dist/esm/types/layout/index.d.ts +3 -0
- package/dist/esm/types/theme/components/checkbox.d.ts +11 -0
- package/dist/esm/types/theme/components/drawer.d.ts +6 -0
- package/dist/esm/types/theme/components/index.d.ts +8 -0
- package/dist/esm/types/theme/components/input.d.ts +0 -2
- package/dist/esm/types/theme/components/number-input.d.ts +54 -0
- package/dist/esm/types/theme/components/pin-input.d.ts +31 -0
- package/dist/esm/types/theme/components/radio.d.ts +6 -0
- package/dist/esm/types/theme/components/slider.d.ts +6 -0
- package/dist/esm/types/theme/components/switch.d.ts +6 -0
- package/dist/esm/types/theme/components/textarea.d.ts +42 -0
- package/dist/esm/types/theme/foundations/index.d.ts +31 -0
- package/dist/esm/types/theme/foundations/radius.d.ts +11 -0
- package/dist/esm/types/theme/foundations/sizes.d.ts +21 -0
- package/dist/esm/types/theme/rawStyle/chakraStyle.d.ts +2 -0
- package/dist/esm/types/theme/{externals → rawStyle}/index.d.ts +1 -0
- package/dist/esm/types/theme/{externals → rawStyle}/reactDayPicker.d.ts +0 -0
- package/dist/esm/types/utils/index.d.ts +2 -0
- package/dist/esm/types/utils/responsive.d.ts +1 -0
- package/dist/index.d.ts +54 -15
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { IconButtonProps } from '@chakra-ui/react';
|
|
3
3
|
export declare type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
|
|
4
4
|
label: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const ActionsButton: FC<
|
|
6
|
+
export declare const ActionsButton: FC<PropsWithChildren<ActionsButtonProps>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HTMLChakraProps, MenuItemProps } from '@chakra-ui/react';
|
|
3
|
+
export declare type StyledMenuItemProps = HTMLChakraProps<'button'>;
|
|
4
|
+
export declare const MenuItem: import("@chakra-ui/react").ComponentWithAs<"button", MenuItemProps>;
|
|
5
|
+
declare type ConfirmMenuItemProps = MenuItemProps & {
|
|
6
|
+
confirmDelay?: number;
|
|
7
|
+
confirmColorScheme?: string;
|
|
8
|
+
confirmContent?: React.ReactNode;
|
|
9
|
+
confirmText?: React.ReactNode;
|
|
10
|
+
confirmIcon?: React.FC<React.PropsWithChildren<unknown>>;
|
|
11
|
+
};
|
|
12
|
+
export declare const ConfirmMenuItem: import("@chakra-ui/react").ComponentWithAs<"button", ConfirmMenuItemProps>;
|
|
13
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
1
|
+
import React, { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { AccordionProps, FlexProps } from '@chakra-ui/react';
|
|
3
3
|
declare type DataListColumns = Record<string, DataListCellProps>;
|
|
4
4
|
declare type DataListContextValue = {
|
|
@@ -30,13 +30,13 @@ export declare type DataListRowProps = FlexProps & {
|
|
|
30
30
|
isVisible?: boolean | boolean[] | Record<string, boolean>;
|
|
31
31
|
isDisabled?: boolean;
|
|
32
32
|
};
|
|
33
|
-
export declare const DataListRow: FC<
|
|
33
|
+
export declare const DataListRow: FC<PropsWithChildren<DataListRowProps>>;
|
|
34
34
|
export declare type DataListHeaderProps = DataListRowProps;
|
|
35
|
-
export declare const DataListHeader: FC<
|
|
35
|
+
export declare const DataListHeader: FC<PropsWithChildren<DataListHeaderProps>>;
|
|
36
36
|
export declare type DataListFooterProps = DataListRowProps;
|
|
37
|
-
export declare const DataListFooter: FC<
|
|
37
|
+
export declare const DataListFooter: FC<PropsWithChildren<DataListFooterProps>>;
|
|
38
38
|
export declare type DataListProps = AccordionProps & {
|
|
39
39
|
isHover?: boolean;
|
|
40
40
|
};
|
|
41
|
-
export declare const DataList: FC<
|
|
41
|
+
export declare const DataList: FC<PropsWithChildren<DataListProps>>;
|
|
42
42
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
1
|
+
import React, { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { IconButtonProps, StackProps } from '@chakra-ui/react';
|
|
3
3
|
export declare const getPaginationInfo: ({ page, pageSize, totalItems, }: {
|
|
4
4
|
page?: number | undefined;
|
|
@@ -26,10 +26,10 @@ export declare type PaginationContextValue<PageType = number> = {
|
|
|
26
26
|
lastItemOnPage: number;
|
|
27
27
|
};
|
|
28
28
|
export declare const PaginationContext: React.Context<PaginationContextValue<number>>;
|
|
29
|
-
export declare const PaginationButtonFirstPage: FC<
|
|
30
|
-
export declare const PaginationButtonPrevPage: FC<
|
|
31
|
-
export declare const PaginationButtonLastPage: FC<
|
|
32
|
-
export declare const PaginationButtonNextPage: FC<
|
|
29
|
+
export declare const PaginationButtonFirstPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
30
|
+
export declare const PaginationButtonPrevPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
31
|
+
export declare const PaginationButtonLastPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
32
|
+
export declare const PaginationButtonNextPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
33
33
|
export declare const PaginationInfo: ({ ...rest }: {
|
|
34
34
|
[x: string]: any;
|
|
35
35
|
}) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextareaProps } from '@chakra-ui/react';
|
|
3
|
+
export declare const Textarea: ({ onFocus, onBlur, onMouseEnter, onMouseLeave, variant, borderRadius, ...rest }: TextareaProps & {
|
|
4
|
+
onFocus?: (() => void) | undefined;
|
|
5
|
+
onBlur?: (() => void) | undefined;
|
|
6
|
+
onMouseEnter?: (() => void) | undefined;
|
|
7
|
+
onMouseLeave?: (() => void) | undefined;
|
|
8
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps, DrawerContentProps, FlexProps, StackProps, TextProps } from '@chakra-ui/react';
|
|
3
|
+
export declare type SideNavProps = {
|
|
4
|
+
isMobileMenuOpen: boolean;
|
|
5
|
+
onMobileMenuClose: () => void;
|
|
6
|
+
} & FlexProps & DrawerContentProps;
|
|
7
|
+
export declare type SideNavMenuItemProps = {
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
} & ButtonProps;
|
|
10
|
+
export declare type SideNavMenuProps = {
|
|
11
|
+
textProps?: TextProps;
|
|
12
|
+
} & StackProps;
|
|
13
|
+
export declare const SideNav: ({ isMobileMenuOpen, onMobileMenuClose, children, ...props }: SideNavProps) => JSX.Element;
|
|
14
|
+
export declare const SideNavContainer: (props: StackProps) => JSX.Element;
|
|
15
|
+
export declare const SideNavHeader: ({ children, ...rest }: FlexProps) => JSX.Element;
|
|
16
|
+
export declare const SideNavBody: ({ children, ...rest }: StackProps) => JSX.Element;
|
|
17
|
+
export declare const SideNavFooter: ({ children, ...rest }: FlexProps) => JSX.Element;
|
|
18
|
+
export declare const SideNavMenu: ({ title, children, textProps, ...rest }: SideNavMenuProps) => JSX.Element;
|
|
19
|
+
export declare const SideNavMenuItem: ({ isActive, children, ...rest }: SideNavMenuItemProps) => JSX.Element;
|
|
@@ -4,7 +4,7 @@ export declare type TopBarBackActionProps = {
|
|
|
4
4
|
backAction?: () => void;
|
|
5
5
|
rightInformation?: ReactComponentElement<any>;
|
|
6
6
|
} & FlexProps;
|
|
7
|
-
export declare const TopBar: (
|
|
8
|
-
export declare const TopBarFirstElement: (
|
|
9
|
-
export declare const TopBarLastElement: (
|
|
7
|
+
export declare const TopBar: (props: StackProps) => JSX.Element;
|
|
8
|
+
export declare const TopBarFirstElement: (props: FlexProps) => JSX.Element;
|
|
9
|
+
export declare const TopBarLastElement: (props: StackProps) => JSX.Element;
|
|
10
10
|
export declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => JSX.Element;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export { default as Badge } from './badge';
|
|
2
2
|
export { default as Button } from './button';
|
|
3
|
+
export { default as Checkbox } from './checkbox';
|
|
4
|
+
export { default as Drawer } from './drawer';
|
|
3
5
|
export { default as Input } from './input';
|
|
6
|
+
export { default as NumberInput } from './number-input';
|
|
7
|
+
export { default as PinInput } from './pin-input';
|
|
8
|
+
export { default as Radio } from './radio';
|
|
9
|
+
export { default as Slider } from './slider';
|
|
10
|
+
export { default as Switch } from './switch';
|
|
4
11
|
export { default as Tag } from './tag';
|
|
12
|
+
export { default as Textarea } from './textarea';
|
|
@@ -9,7 +9,6 @@ declare const _default: {
|
|
|
9
9
|
field: {
|
|
10
10
|
bg: string;
|
|
11
11
|
borderColor: string;
|
|
12
|
-
borderRadius: string;
|
|
13
12
|
_focus: {
|
|
14
13
|
borderColor: string;
|
|
15
14
|
};
|
|
@@ -26,7 +25,6 @@ declare const _default: {
|
|
|
26
25
|
bg: string;
|
|
27
26
|
borderWidth: string;
|
|
28
27
|
borderColor: string;
|
|
29
|
-
borderRadius: string;
|
|
30
28
|
_hover: {
|
|
31
29
|
bg: string;
|
|
32
30
|
borderColor: string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
baseStyle: {
|
|
3
|
+
field: {
|
|
4
|
+
borderRadius: string;
|
|
5
|
+
};
|
|
6
|
+
stepperGroup: {
|
|
7
|
+
width: string;
|
|
8
|
+
};
|
|
9
|
+
stepper: {
|
|
10
|
+
paddingRight: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
variants: {
|
|
14
|
+
outline: (props: any) => {
|
|
15
|
+
field: {
|
|
16
|
+
bg: string;
|
|
17
|
+
borderColor: string;
|
|
18
|
+
borderRadius: string;
|
|
19
|
+
_focus: {
|
|
20
|
+
borderColor: string;
|
|
21
|
+
};
|
|
22
|
+
_focusVisible: {
|
|
23
|
+
boxShadow: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
addon: {
|
|
27
|
+
borderRadius: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
filled: (props: any) => {
|
|
31
|
+
field: {
|
|
32
|
+
bg: string;
|
|
33
|
+
borderWidth: string;
|
|
34
|
+
borderColor: string;
|
|
35
|
+
borderRadius: string;
|
|
36
|
+
_hover: {
|
|
37
|
+
bg: string;
|
|
38
|
+
borderColor: string;
|
|
39
|
+
};
|
|
40
|
+
_focus: {
|
|
41
|
+
bg: string;
|
|
42
|
+
borderColor: string;
|
|
43
|
+
};
|
|
44
|
+
_focusVisible: {
|
|
45
|
+
boxShadow: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
addon: {
|
|
49
|
+
borderRadius: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
variants: {
|
|
3
|
+
outline: (props: any) => {
|
|
4
|
+
bg: string;
|
|
5
|
+
borderColor: string;
|
|
6
|
+
_focus: {
|
|
7
|
+
borderColor: string;
|
|
8
|
+
};
|
|
9
|
+
_focusVisible: {
|
|
10
|
+
boxShadow: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
filled: (props: any) => {
|
|
14
|
+
bg: string;
|
|
15
|
+
borderWidth: string;
|
|
16
|
+
borderColor: string;
|
|
17
|
+
_hover: {
|
|
18
|
+
bg: string;
|
|
19
|
+
borderColor: string;
|
|
20
|
+
};
|
|
21
|
+
_focus: {
|
|
22
|
+
bg: string;
|
|
23
|
+
borderColor: string;
|
|
24
|
+
};
|
|
25
|
+
_focusVisible: {
|
|
26
|
+
boxShadow: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
baseStyle: {
|
|
3
|
+
paddingY: string;
|
|
4
|
+
minHeight: string;
|
|
5
|
+
lineHeight: string;
|
|
6
|
+
verticalAlign: string;
|
|
7
|
+
borderRadius: string;
|
|
8
|
+
};
|
|
9
|
+
variants: {
|
|
10
|
+
outline: (props: any) => {
|
|
11
|
+
bg: string;
|
|
12
|
+
borderColor: string;
|
|
13
|
+
_focus: {
|
|
14
|
+
borderColor: string;
|
|
15
|
+
};
|
|
16
|
+
_focusVisible: {
|
|
17
|
+
boxShadow: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
filled: (props: any) => {
|
|
21
|
+
bg: string;
|
|
22
|
+
borderWidth: string;
|
|
23
|
+
borderColor: string;
|
|
24
|
+
_hover: {
|
|
25
|
+
bg: string;
|
|
26
|
+
borderColor: string;
|
|
27
|
+
};
|
|
28
|
+
_focus: {
|
|
29
|
+
bg: string;
|
|
30
|
+
borderColor: string;
|
|
31
|
+
};
|
|
32
|
+
_focusVisible: {
|
|
33
|
+
boxShadow: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
defaultProps: {
|
|
38
|
+
size: string;
|
|
39
|
+
variant: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
declare const foundations: {
|
|
2
|
+
sizes: {
|
|
3
|
+
max: string;
|
|
4
|
+
min: string;
|
|
5
|
+
full: string;
|
|
6
|
+
'3xs': string;
|
|
7
|
+
'2xs': string;
|
|
8
|
+
xs: string;
|
|
9
|
+
nav: string;
|
|
10
|
+
sm: string;
|
|
11
|
+
md: string;
|
|
12
|
+
lg: string;
|
|
13
|
+
xl: string;
|
|
14
|
+
'2xl': string;
|
|
15
|
+
'3xl': string;
|
|
16
|
+
'4xl': string;
|
|
17
|
+
'5xl': string;
|
|
18
|
+
'6xl': string;
|
|
19
|
+
'7xl': string;
|
|
20
|
+
'8xl': string;
|
|
21
|
+
};
|
|
2
22
|
shadows: {
|
|
3
23
|
xs: string;
|
|
4
24
|
sm: string;
|
|
@@ -9,6 +29,17 @@ declare const foundations: {
|
|
|
9
29
|
'2xl': string;
|
|
10
30
|
layout: string;
|
|
11
31
|
};
|
|
32
|
+
radii: {
|
|
33
|
+
none: string;
|
|
34
|
+
sm: string;
|
|
35
|
+
base: string;
|
|
36
|
+
md: string;
|
|
37
|
+
lg: string;
|
|
38
|
+
xl: string;
|
|
39
|
+
'2xl': string;
|
|
40
|
+
'3xl': string;
|
|
41
|
+
full: string;
|
|
42
|
+
};
|
|
12
43
|
fonts: {
|
|
13
44
|
heading: string;
|
|
14
45
|
body: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
max: string;
|
|
3
|
+
min: string;
|
|
4
|
+
full: string;
|
|
5
|
+
'3xs': string;
|
|
6
|
+
'2xs': string;
|
|
7
|
+
xs: string;
|
|
8
|
+
nav: string;
|
|
9
|
+
sm: string;
|
|
10
|
+
md: string;
|
|
11
|
+
lg: string;
|
|
12
|
+
xl: string;
|
|
13
|
+
'2xl': string;
|
|
14
|
+
'3xl': string;
|
|
15
|
+
'4xl': string;
|
|
16
|
+
'5xl': string;
|
|
17
|
+
'6xl': string;
|
|
18
|
+
'7xl': string;
|
|
19
|
+
'8xl': string;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsMobile: (currentBreakpoint: string) => boolean;
|