@paygreen/pgui 2.1.2 → 2.3.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 +8844 -135
- 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/DayPicker/index.d.ts +3 -0
- package/dist/cjs/types/components/InputDayPicker/index.d.ts +16 -0
- package/dist/cjs/types/components/Pagination/index.d.ts +5 -5
- package/dist/cjs/types/components/Select/index.d.ts +2 -0
- package/dist/cjs/types/components/index.d.ts +4 -0
- package/dist/cjs/types/index.d.ts +2 -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 +10 -0
- package/dist/cjs/types/layout/index.d.ts +4 -0
- package/dist/cjs/types/theme/components/button.d.ts +0 -6
- 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/externals-css.d.ts +1 -0
- package/dist/cjs/types/theme/foundations/colors.d.ts +1 -0
- package/dist/cjs/types/theme/foundations/index.d.ts +32 -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/index.d.ts +1 -0
- package/dist/cjs/types/theme/rawStyle/chakraStyle.d.ts +2 -0
- package/dist/cjs/types/theme/rawStyle/index.d.ts +2 -0
- package/dist/cjs/types/theme/rawStyle/reactDayPicker.d.ts +2 -0
- package/dist/cjs/types/theme/styles.d.ts +2 -0
- package/dist/cjs/types/utils/date.d.ts +1 -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 +8827 -138
- 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/DayPicker/index.d.ts +3 -0
- package/dist/esm/types/components/InputDayPicker/index.d.ts +16 -0
- package/dist/esm/types/components/Pagination/index.d.ts +5 -5
- package/dist/esm/types/components/Select/index.d.ts +2 -0
- package/dist/esm/types/components/index.d.ts +4 -0
- package/dist/esm/types/index.d.ts +2 -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 +10 -0
- package/dist/esm/types/layout/index.d.ts +4 -0
- package/dist/esm/types/theme/components/button.d.ts +0 -6
- 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/externals-css.d.ts +1 -0
- package/dist/esm/types/theme/foundations/colors.d.ts +1 -0
- package/dist/esm/types/theme/foundations/index.d.ts +32 -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/index.d.ts +1 -0
- package/dist/esm/types/theme/rawStyle/chakraStyle.d.ts +2 -0
- package/dist/esm/types/theme/rawStyle/index.d.ts +2 -0
- package/dist/esm/types/theme/rawStyle/reactDayPicker.d.ts +2 -0
- package/dist/esm/types/theme/styles.d.ts +2 -0
- package/dist/esm/types/utils/date.d.ts +1 -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 +80 -12
- package/package.json +3 -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 {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { InputProps, PopoverProps } from '@chakra-ui/react';
|
|
3
|
+
import { DayPickerSingleProps, DaySelectionMode } from 'react-day-picker';
|
|
4
|
+
export declare type SingleDayPickerProps = {
|
|
5
|
+
mode?: DaySelectionMode;
|
|
6
|
+
} & DayPickerSingleProps;
|
|
7
|
+
export declare type InputDayPickerProps = {
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
popoverProps?: PopoverProps;
|
|
10
|
+
inputProps?: InputProps;
|
|
11
|
+
dayPickerProps?: SingleDayPickerProps;
|
|
12
|
+
dateFormat?: string;
|
|
13
|
+
value?: string | '';
|
|
14
|
+
onChange?: Dispatch<SetStateAction<string | undefined>>;
|
|
15
|
+
};
|
|
16
|
+
export declare const InputDayPicker: ({ isDisabled, popoverProps, inputProps, dayPickerProps, dateFormat, value, onChange, }: InputDayPickerProps) => JSX.Element;
|
|
@@ -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;
|
|
@@ -13,6 +13,7 @@ export declare type SelectProps<Option, IsMulti extends boolean = false, Group e
|
|
|
13
13
|
loadOptions?: (input: unknown) => TODO;
|
|
14
14
|
defaultOptions?: unknown | boolean;
|
|
15
15
|
debounceDelay?: number;
|
|
16
|
+
variant?: 'unstyled' | 'filled' | 'outlined';
|
|
16
17
|
} & Props<Option, IsMulti, Group> & Omit<BoxProps, 'defaultValue'>;
|
|
17
18
|
export declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: {
|
|
18
19
|
isAsync?: boolean | undefined;
|
|
@@ -23,6 +24,7 @@ export declare const Select: <Option, IsMulti extends boolean = false, Group ext
|
|
|
23
24
|
loadOptions?: ((input: unknown) => TODO) | undefined;
|
|
24
25
|
defaultOptions?: unknown | boolean;
|
|
25
26
|
debounceDelay?: number | undefined;
|
|
27
|
+
variant?: "unstyled" | "filled" | "outlined" | undefined;
|
|
26
28
|
} & Omit<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "aria-label" | "form" | "autoFocus" | "name" | "value" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom" | "theme"> & {
|
|
27
29
|
placeholder?: React.ReactNode;
|
|
28
30
|
tabIndex?: number | undefined;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export * from './ActionsButton';
|
|
2
|
+
export * from './Card';
|
|
3
|
+
export * from './ConfirmMenuItem';
|
|
2
4
|
export * from './DataList';
|
|
5
|
+
export * from './DayPicker';
|
|
3
6
|
export * from './FormGroup';
|
|
7
|
+
export * from './InputDayPicker';
|
|
4
8
|
export * from './Pagination';
|
|
5
9
|
export * from './SearchInput';
|
|
6
10
|
export * from './Select';
|
|
@@ -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;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactComponentElement } from 'react';
|
|
2
|
+
import { FlexProps, StackProps } from '@chakra-ui/react';
|
|
3
|
+
export declare type TopBarBackActionProps = {
|
|
4
|
+
backAction?: () => void;
|
|
5
|
+
rightInformation?: ReactComponentElement<any>;
|
|
6
|
+
} & FlexProps;
|
|
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
|
+
export declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => JSX.Element;
|
|
@@ -91,9 +91,6 @@ declare const _default: {
|
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
93
|
'@white': (props: any) => {
|
|
94
|
-
borderWidth: string;
|
|
95
|
-
borderStyle: string;
|
|
96
|
-
borderColor: string;
|
|
97
94
|
bg: string;
|
|
98
95
|
color: string;
|
|
99
96
|
_focus: {
|
|
@@ -111,9 +108,6 @@ declare const _default: {
|
|
|
111
108
|
};
|
|
112
109
|
};
|
|
113
110
|
'@whiteNeutral': (props: any) => {
|
|
114
|
-
borderWidth: string;
|
|
115
|
-
borderStyle: string;
|
|
116
|
-
borderColor: string;
|
|
117
111
|
bg: string;
|
|
118
112
|
color: string;
|
|
119
113
|
_focus: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'react-day-picker/dist/style.css';
|
|
@@ -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;
|
|
@@ -81,6 +112,7 @@ declare const foundations: {
|
|
|
81
112
|
gradients: {
|
|
82
113
|
primary: string;
|
|
83
114
|
};
|
|
115
|
+
background: string;
|
|
84
116
|
};
|
|
85
117
|
};
|
|
86
118
|
export default foundations;
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dateFormat = "dd/MM/yyyy";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsMobile: (currentBreakpoint: string) => boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React, { FC, PropsWithChildren, ReactNode, Dispatch, SetStateAction, ReactComponentElement } from 'react';
|
|
2
3
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
|
3
|
-
import { IconButtonProps, FlexProps, AccordionProps, FormControlProps,
|
|
4
|
+
import { IconButtonProps, FlexProps, HTMLChakraProps, MenuItemProps, AccordionProps, FormControlProps, PopoverProps, InputProps, StackProps, BoxProps, DrawerContentProps, ButtonProps, TextProps } from '@chakra-ui/react';
|
|
5
|
+
import { DayPickerProps, DaySelectionMode, DayPickerSingleProps } from 'react-day-picker';
|
|
4
6
|
import * as react_select_dist_declarations_src_useStateManager from 'react-select/dist/declarations/src/useStateManager';
|
|
5
7
|
import * as react_select from 'react-select';
|
|
6
8
|
import { GroupBase, Props } from 'react-select';
|
|
@@ -11,7 +13,20 @@ import * as react_select_dist_declarations_src_Select from 'react-select/dist/de
|
|
|
11
13
|
declare type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
|
|
12
14
|
label: string;
|
|
13
15
|
};
|
|
14
|
-
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>;
|
|
15
30
|
|
|
16
31
|
declare type DataListColumns = Record<string, DataListCellProps>;
|
|
17
32
|
declare type DataListContextValue = {
|
|
@@ -43,15 +58,17 @@ declare type DataListRowProps = FlexProps & {
|
|
|
43
58
|
isVisible?: boolean | boolean[] | Record<string, boolean>;
|
|
44
59
|
isDisabled?: boolean;
|
|
45
60
|
};
|
|
46
|
-
declare const DataListRow: FC<
|
|
61
|
+
declare const DataListRow: FC<PropsWithChildren<DataListRowProps>>;
|
|
47
62
|
declare type DataListHeaderProps = DataListRowProps;
|
|
48
|
-
declare const DataListHeader: FC<
|
|
63
|
+
declare const DataListHeader: FC<PropsWithChildren<DataListHeaderProps>>;
|
|
49
64
|
declare type DataListFooterProps = DataListRowProps;
|
|
50
|
-
declare const DataListFooter: FC<
|
|
65
|
+
declare const DataListFooter: FC<PropsWithChildren<DataListFooterProps>>;
|
|
51
66
|
declare type DataListProps = AccordionProps & {
|
|
52
67
|
isHover?: boolean;
|
|
53
68
|
};
|
|
54
|
-
declare const DataList: FC<
|
|
69
|
+
declare const DataList: FC<PropsWithChildren<DataListProps>>;
|
|
70
|
+
|
|
71
|
+
declare const DayPicker: (props: DayPickerProps) => JSX.Element;
|
|
55
72
|
|
|
56
73
|
declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue' | 'label'> & {
|
|
57
74
|
children?: ReactNode;
|
|
@@ -64,6 +81,20 @@ declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue'
|
|
|
64
81
|
};
|
|
65
82
|
declare const FormGroup: ({ children, errorMessage, helper, id, isRequired, label, showError, ...props }: FormGroupProps) => JSX.Element;
|
|
66
83
|
|
|
84
|
+
declare type SingleDayPickerProps = {
|
|
85
|
+
mode?: DaySelectionMode;
|
|
86
|
+
} & DayPickerSingleProps;
|
|
87
|
+
declare type InputDayPickerProps = {
|
|
88
|
+
isDisabled?: boolean;
|
|
89
|
+
popoverProps?: PopoverProps;
|
|
90
|
+
inputProps?: InputProps;
|
|
91
|
+
dayPickerProps?: SingleDayPickerProps;
|
|
92
|
+
dateFormat?: string;
|
|
93
|
+
value?: string | '';
|
|
94
|
+
onChange?: Dispatch<SetStateAction<string | undefined>>;
|
|
95
|
+
};
|
|
96
|
+
declare const InputDayPicker: ({ isDisabled, popoverProps, inputProps, dayPickerProps, dateFormat, value, onChange, }: InputDayPickerProps) => JSX.Element;
|
|
97
|
+
|
|
67
98
|
declare const getPaginationInfo: ({ page, pageSize, totalItems, }: {
|
|
68
99
|
page?: number | undefined;
|
|
69
100
|
pageSize?: number | undefined;
|
|
@@ -90,10 +121,10 @@ declare type PaginationContextValue<PageType = number> = {
|
|
|
90
121
|
lastItemOnPage: number;
|
|
91
122
|
};
|
|
92
123
|
declare const PaginationContext: React.Context<PaginationContextValue<number>>;
|
|
93
|
-
declare const PaginationButtonFirstPage: FC<
|
|
94
|
-
declare const PaginationButtonPrevPage: FC<
|
|
95
|
-
declare const PaginationButtonLastPage: FC<
|
|
96
|
-
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'>>>;
|
|
97
128
|
declare const PaginationInfo: ({ ...rest }: {
|
|
98
129
|
[x: string]: any;
|
|
99
130
|
}) => JSX.Element;
|
|
@@ -128,6 +159,7 @@ declare type SelectProps<Option, IsMulti extends boolean = false, Group extends
|
|
|
128
159
|
loadOptions?: (input: unknown) => TODO;
|
|
129
160
|
defaultOptions?: unknown | boolean;
|
|
130
161
|
debounceDelay?: number;
|
|
162
|
+
variant?: 'unstyled' | 'filled' | 'outlined';
|
|
131
163
|
} & Props<Option, IsMulti, Group> & Omit<BoxProps, 'defaultValue'>;
|
|
132
164
|
declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: {
|
|
133
165
|
isAsync?: boolean | undefined;
|
|
@@ -138,6 +170,7 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
|
|
|
138
170
|
loadOptions?: ((input: unknown) => TODO) | undefined;
|
|
139
171
|
defaultOptions?: unknown | boolean;
|
|
140
172
|
debounceDelay?: number | undefined;
|
|
173
|
+
variant?: "unstyled" | "filled" | "outlined" | undefined;
|
|
141
174
|
} & Omit<Pick<react_select_dist_declarations_src_Select.Props<Option, IsMulti, Group>, "aria-label" | "form" | "autoFocus" | "name" | "value" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom" | "theme"> & {
|
|
142
175
|
placeholder?: React.ReactNode;
|
|
143
176
|
tabIndex?: number | undefined;
|
|
@@ -228,6 +261,41 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
|
|
|
228
261
|
tabSelectsValue?: boolean | undefined;
|
|
229
262
|
} & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
|
|
230
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 type SideNavMenuProps = {
|
|
276
|
+
textProps?: TextProps;
|
|
277
|
+
} & StackProps;
|
|
278
|
+
declare const SideNav: ({ isMobileMenuOpen, onMobileMenuClose, children, ...props }: SideNavProps) => JSX.Element;
|
|
279
|
+
declare const SideNavContainer: (props: StackProps) => JSX.Element;
|
|
280
|
+
declare const SideNavHeader: ({ children, ...rest }: FlexProps) => JSX.Element;
|
|
281
|
+
declare const SideNavBody: ({ children, ...rest }: StackProps) => JSX.Element;
|
|
282
|
+
declare const SideNavFooter: ({ children, ...rest }: FlexProps) => JSX.Element;
|
|
283
|
+
declare const SideNavMenu: ({ title, children, textProps, ...rest }: SideNavMenuProps) => JSX.Element;
|
|
284
|
+
declare const SideNavMenuItem: ({ isActive, children, ...rest }: SideNavMenuItemProps) => JSX.Element;
|
|
285
|
+
|
|
286
|
+
declare type TopBarBackActionProps = {
|
|
287
|
+
backAction?: () => void;
|
|
288
|
+
rightInformation?: ReactComponentElement<any>;
|
|
289
|
+
} & FlexProps;
|
|
290
|
+
declare const TopBar: (props: StackProps) => JSX.Element;
|
|
291
|
+
declare const TopBarFirstElement: (props: FlexProps) => JSX.Element;
|
|
292
|
+
declare const TopBarLastElement: (props: StackProps) => JSX.Element;
|
|
293
|
+
declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => JSX.Element;
|
|
294
|
+
|
|
231
295
|
declare const theme: any;
|
|
232
296
|
|
|
233
|
-
|
|
297
|
+
declare const dateFormat = "dd/MM/yyyy";
|
|
298
|
+
|
|
299
|
+
declare const useIsMobile: (currentBreakpoint: string) => boolean;
|
|
300
|
+
|
|
301
|
+
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, SideNavMenuProps, SideNavProps, SingleDayPickerProps, StyledMenuItemProps, TopBar, TopBarBackAction, TopBarBackActionProps, TopBarFirstElement, TopBarLastElement, dateFormat, getPaginationInfo, theme, useIsMobile };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paygreen/pgui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "PGUI is the design system coming from Paygreen.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@typescript-eslint/eslint-plugin": "^5.30.6",
|
|
66
66
|
"@typescript-eslint/parser": "^5.30.6",
|
|
67
67
|
"babel-loader": "^8.2.5",
|
|
68
|
-
"
|
|
68
|
+
"date-fns": "^2.29.1",
|
|
69
69
|
"eslint": "^8.20.0",
|
|
70
70
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
71
71
|
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"lint-staged": "^13.0.3",
|
|
83
83
|
"prettier": "^2.7.1",
|
|
84
84
|
"react": "^18.2.0",
|
|
85
|
+
"react-day-picker": "^8.0.7",
|
|
85
86
|
"react-dom": "^18.2.0",
|
|
86
87
|
"react-focus-lock": "^2.9.1",
|
|
87
88
|
"react-icons": "^4.4.0",
|