@paygreen/pgui 2.1.3 → 2.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/dist/cjs/index.js +235 -16
- 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/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 +16 -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/drawer.d.ts +6 -0
- package/dist/cjs/types/theme/components/index.d.ts +1 -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 +224 -19
- 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/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 +16 -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/drawer.d.ts +6 -0
- package/dist/esm/types/theme/components/index.d.ts +1 -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 +51 -15
- package/package.json +1 -1
|
@@ -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,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps, DrawerContentProps, FlexProps, StackProps } 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 const SideNav: ({ isMobileMenuOpen, onMobileMenuClose, children, ...props }: SideNavProps) => JSX.Element;
|
|
11
|
+
export declare const SideNavContainer: (props: StackProps) => JSX.Element;
|
|
12
|
+
export declare const SideNavHeader: ({ children, ...rest }: FlexProps) => JSX.Element;
|
|
13
|
+
export declare const SideNavBody: ({ children, ...rest }: StackProps) => JSX.Element;
|
|
14
|
+
export declare const SideNavFooter: ({ children, ...rest }: FlexProps) => JSX.Element;
|
|
15
|
+
export declare const SideNavMenu: ({ title, children, ...rest }: StackProps) => JSX.Element;
|
|
16
|
+
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,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;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import React, { FC, ReactNode, Dispatch, SetStateAction, ReactComponentElement } from 'react';
|
|
2
|
+
import React, { FC, PropsWithChildren, ReactNode, Dispatch, SetStateAction, ReactComponentElement } from 'react';
|
|
3
3
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
|
4
|
-
import { IconButtonProps, FlexProps, AccordionProps, FormControlProps, PopoverProps, InputProps, StackProps, BoxProps } from '@chakra-ui/react';
|
|
4
|
+
import { IconButtonProps, FlexProps, HTMLChakraProps, MenuItemProps, AccordionProps, FormControlProps, PopoverProps, InputProps, StackProps, BoxProps, DrawerContentProps, ButtonProps } from '@chakra-ui/react';
|
|
5
5
|
import { DayPickerProps, DaySelectionMode, DayPickerSingleProps } from 'react-day-picker';
|
|
6
6
|
import * as react_select_dist_declarations_src_useStateManager from 'react-select/dist/declarations/src/useStateManager';
|
|
7
7
|
import * as react_select from 'react-select';
|
|
@@ -13,7 +13,20 @@ import * as react_select_dist_declarations_src_Select from 'react-select/dist/de
|
|
|
13
13
|
declare type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
|
|
14
14
|
label: string;
|
|
15
15
|
};
|
|
16
|
-
declare const ActionsButton: FC<
|
|
16
|
+
declare const ActionsButton: FC<PropsWithChildren<ActionsButtonProps>>;
|
|
17
|
+
|
|
18
|
+
declare const Card: (props: FlexProps) => JSX.Element;
|
|
19
|
+
|
|
20
|
+
declare type StyledMenuItemProps = HTMLChakraProps<'button'>;
|
|
21
|
+
declare const MenuItem: _chakra_ui_react.ComponentWithAs<"button", MenuItemProps>;
|
|
22
|
+
declare type ConfirmMenuItemProps = MenuItemProps & {
|
|
23
|
+
confirmDelay?: number;
|
|
24
|
+
confirmColorScheme?: string;
|
|
25
|
+
confirmContent?: React.ReactNode;
|
|
26
|
+
confirmText?: React.ReactNode;
|
|
27
|
+
confirmIcon?: React.FC<React.PropsWithChildren<unknown>>;
|
|
28
|
+
};
|
|
29
|
+
declare const ConfirmMenuItem: _chakra_ui_react.ComponentWithAs<"button", ConfirmMenuItemProps>;
|
|
17
30
|
|
|
18
31
|
declare type DataListColumns = Record<string, DataListCellProps>;
|
|
19
32
|
declare type DataListContextValue = {
|
|
@@ -45,15 +58,15 @@ declare type DataListRowProps = FlexProps & {
|
|
|
45
58
|
isVisible?: boolean | boolean[] | Record<string, boolean>;
|
|
46
59
|
isDisabled?: boolean;
|
|
47
60
|
};
|
|
48
|
-
declare const DataListRow: FC<
|
|
61
|
+
declare const DataListRow: FC<PropsWithChildren<DataListRowProps>>;
|
|
49
62
|
declare type DataListHeaderProps = DataListRowProps;
|
|
50
|
-
declare const DataListHeader: FC<
|
|
63
|
+
declare const DataListHeader: FC<PropsWithChildren<DataListHeaderProps>>;
|
|
51
64
|
declare type DataListFooterProps = DataListRowProps;
|
|
52
|
-
declare const DataListFooter: FC<
|
|
65
|
+
declare const DataListFooter: FC<PropsWithChildren<DataListFooterProps>>;
|
|
53
66
|
declare type DataListProps = AccordionProps & {
|
|
54
67
|
isHover?: boolean;
|
|
55
68
|
};
|
|
56
|
-
declare const DataList: FC<
|
|
69
|
+
declare const DataList: FC<PropsWithChildren<DataListProps>>;
|
|
57
70
|
|
|
58
71
|
declare const DayPicker: (props: DayPickerProps) => JSX.Element;
|
|
59
72
|
|
|
@@ -108,10 +121,10 @@ declare type PaginationContextValue<PageType = number> = {
|
|
|
108
121
|
lastItemOnPage: number;
|
|
109
122
|
};
|
|
110
123
|
declare const PaginationContext: React.Context<PaginationContextValue<number>>;
|
|
111
|
-
declare const PaginationButtonFirstPage: FC<
|
|
112
|
-
declare const PaginationButtonPrevPage: FC<
|
|
113
|
-
declare const PaginationButtonLastPage: FC<
|
|
114
|
-
declare const PaginationButtonNextPage: FC<
|
|
124
|
+
declare const PaginationButtonFirstPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
125
|
+
declare const PaginationButtonPrevPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
126
|
+
declare const PaginationButtonLastPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
127
|
+
declare const PaginationButtonNextPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
115
128
|
declare const PaginationInfo: ({ ...rest }: {
|
|
116
129
|
[x: string]: any;
|
|
117
130
|
}) => JSX.Element;
|
|
@@ -248,15 +261,38 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
|
|
|
248
261
|
tabSelectsValue?: boolean | undefined;
|
|
249
262
|
} & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
|
|
250
263
|
|
|
264
|
+
declare const BottomBar: (props: FlexProps) => JSX.Element;
|
|
265
|
+
|
|
266
|
+
declare const LayoutContainer: (props: FlexProps) => JSX.Element;
|
|
267
|
+
|
|
268
|
+
declare type SideNavProps = {
|
|
269
|
+
isMobileMenuOpen: boolean;
|
|
270
|
+
onMobileMenuClose: () => void;
|
|
271
|
+
} & FlexProps & DrawerContentProps;
|
|
272
|
+
declare type SideNavMenuItemProps = {
|
|
273
|
+
isActive?: boolean;
|
|
274
|
+
} & ButtonProps;
|
|
275
|
+
declare const SideNav: ({ isMobileMenuOpen, onMobileMenuClose, children, ...props }: SideNavProps) => JSX.Element;
|
|
276
|
+
declare const SideNavContainer: (props: StackProps) => JSX.Element;
|
|
277
|
+
declare const SideNavHeader: ({ children, ...rest }: FlexProps) => JSX.Element;
|
|
278
|
+
declare const SideNavBody: ({ children, ...rest }: StackProps) => JSX.Element;
|
|
279
|
+
declare const SideNavFooter: ({ children, ...rest }: FlexProps) => JSX.Element;
|
|
280
|
+
declare const SideNavMenu: ({ title, children, ...rest }: StackProps) => JSX.Element;
|
|
281
|
+
declare const SideNavMenuItem: ({ isActive, children, ...rest }: SideNavMenuItemProps) => JSX.Element;
|
|
282
|
+
|
|
251
283
|
declare type TopBarBackActionProps = {
|
|
252
284
|
backAction?: () => void;
|
|
253
285
|
rightInformation?: ReactComponentElement<any>;
|
|
254
286
|
} & FlexProps;
|
|
255
|
-
declare const TopBar: (
|
|
256
|
-
declare const TopBarFirstElement: (
|
|
257
|
-
declare const TopBarLastElement: (
|
|
287
|
+
declare const TopBar: (props: StackProps) => JSX.Element;
|
|
288
|
+
declare const TopBarFirstElement: (props: FlexProps) => JSX.Element;
|
|
289
|
+
declare const TopBarLastElement: (props: StackProps) => JSX.Element;
|
|
258
290
|
declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => JSX.Element;
|
|
259
291
|
|
|
260
292
|
declare const theme: any;
|
|
261
293
|
|
|
262
|
-
|
|
294
|
+
declare const dateFormat = "dd/MM/yyyy";
|
|
295
|
+
|
|
296
|
+
declare const useIsMobile: (currentBreakpoint: string) => boolean;
|
|
297
|
+
|
|
298
|
+
export { ActionsButton, ActionsButtonProps, BottomBar, Card, ConfirmMenuItem, DataList, DataListAccordion, DataListAccordionButton, DataListAccordionIcon, DataListAccordionPanel, DataListCell, DataListCellProps, DataListContext, DataListFooter, DataListFooterProps, DataListHeader, DataListHeaderContext, DataListHeaderProps, DataListProps, DataListRow, DataListRowProps, DayPicker, FormGroup, FormGroupProps, InputDayPicker, InputDayPickerProps, LayoutContainer, MenuItem, Pagination, PaginationButtonFirstPage, PaginationButtonLastPage, PaginationButtonNextPage, PaginationButtonPrevPage, PaginationContext, PaginationContextValue, PaginationInfo, PaginationProps, SearchInput, Select, SelectProps, SideNav, SideNavBody, SideNavContainer, SideNavFooter, SideNavHeader, SideNavMenu, SideNavMenuItem, SideNavMenuItemProps, SideNavProps, SingleDayPickerProps, StyledMenuItemProps, TopBar, TopBarBackAction, TopBarBackActionProps, TopBarFirstElement, TopBarLastElement, dateFormat, getPaginationInfo, theme, useIsMobile };
|