@paygreen/pgui 2.10.0 → 2.10.1
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 +229 -108
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Card/index.d.ts +1 -0
- package/dist/cjs/types/components/ConfirmMenuItem/index.d.ts +12 -3
- package/dist/cjs/types/components/DayPicker/index.d.ts +1 -1
- package/dist/cjs/types/components/InputDayPicker/index.d.ts +2 -2
- package/dist/cjs/types/components/SearchInput/index.d.ts +12 -1
- package/dist/cjs/types/components/Select/index.d.ts +14 -14
- package/dist/cjs/types/components/Textarea/index.d.ts +6 -1
- package/dist/cjs/types/layout/BottomBar/index.d.ts +1 -0
- package/dist/cjs/types/layout/LayoutContainer/index.d.ts +1 -0
- package/dist/cjs/types/layout/TopBar/index.d.ts +1 -1
- package/dist/cjs/types/theme/theme.d.ts +1 -1
- package/dist/esm/index.js +230 -109
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Card/index.d.ts +1 -0
- package/dist/esm/types/components/ConfirmMenuItem/index.d.ts +12 -3
- package/dist/esm/types/components/DayPicker/index.d.ts +1 -1
- package/dist/esm/types/components/InputDayPicker/index.d.ts +2 -2
- package/dist/esm/types/components/SearchInput/index.d.ts +12 -1
- package/dist/esm/types/components/Select/index.d.ts +14 -14
- package/dist/esm/types/components/Textarea/index.d.ts +6 -1
- package/dist/esm/types/layout/BottomBar/index.d.ts +1 -0
- package/dist/esm/types/layout/LayoutContainer/index.d.ts +1 -0
- package/dist/esm/types/layout/TopBar/index.d.ts +1 -1
- package/dist/esm/types/theme/theme.d.ts +1 -1
- package/dist/index.d.ts +51 -34
- package/package.json +2 -1
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HTMLChakraProps, MenuItemProps } from '@chakra-ui/react';
|
|
2
3
|
export type StyledMenuItemProps = HTMLChakraProps<'button'>;
|
|
3
|
-
export declare const MenuItem:
|
|
4
|
-
|
|
4
|
+
export declare const MenuItem: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"button", MenuItemProps>;
|
|
5
|
+
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/system/dist/system.types").ComponentWithAs<"button", ConfirmMenuItemProps>;
|
|
13
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import 'dayjs/locale/en';
|
|
3
3
|
import 'dayjs/locale/fr';
|
|
4
4
|
export type DayPickerProps = {
|
|
5
|
-
defaultValue?: string | Date;
|
|
5
|
+
defaultValue?: string | Date | undefined;
|
|
6
6
|
onChange: (e: string | undefined) => void;
|
|
7
7
|
locale?: string;
|
|
8
8
|
customFormat?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { InputProps } from '@chakra-ui/react';
|
|
3
|
-
export type InputDayPickerProps = {
|
|
3
|
+
export type InputDayPickerProps = Omit<InputProps, 'minDate' | 'maxDate' | 'defaultValue'> & {
|
|
4
4
|
name: string;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
onChange: Dispatch<SetStateAction<string | undefined | null>>;
|
|
@@ -13,5 +13,5 @@ export type InputDayPickerProps = {
|
|
|
13
13
|
maxDate?: Date | null | undefined;
|
|
14
14
|
calendarFunc?: (date: any) => 'after-max-date' | 'before-min-date' | undefined;
|
|
15
15
|
isDisabled?: boolean;
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
17
|
export declare const InputDayPicker: ({ name, placeholder, value, onChange, locale, variant, format, withTime, minDate, maxDate, calendarFunc, isDisabled, ...inputProps }: InputDayPickerProps) => React.JSX.Element;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { InputProps } from '@chakra-ui/react';
|
|
2
|
+
type CustomProps = {
|
|
3
|
+
value?: string;
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
onChange?(value?: string): void;
|
|
6
|
+
delay?: number;
|
|
7
|
+
clearLabel?: string;
|
|
8
|
+
inputProps?: object;
|
|
9
|
+
};
|
|
10
|
+
type SearchInputProps = Overwrite<InputProps, CustomProps>;
|
|
11
|
+
export declare const SearchInput: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"input", SearchInputProps>;
|
|
12
|
+
export {};
|
|
@@ -25,26 +25,28 @@ export declare const Select: <Option, IsMulti extends boolean = false, Group ext
|
|
|
25
25
|
defaultOptions?: unknown | boolean;
|
|
26
26
|
debounceDelay?: number | undefined;
|
|
27
27
|
variant?: "outline" | "filled" | undefined;
|
|
28
|
-
} & Omit<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "aria-label" | "form" | "
|
|
29
|
-
isDisabled?: boolean | undefined;
|
|
28
|
+
} & Omit<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "aria-label" | "form" | "name" | "value" | "autoFocus" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "inputValue" | "theme" | "required" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
30
29
|
placeholder?: React.ReactNode;
|
|
30
|
+
tabIndex?: number | undefined;
|
|
31
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
32
|
+
isLoading?: boolean | undefined;
|
|
33
|
+
isDisabled?: boolean | undefined;
|
|
34
|
+
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
35
|
+
unstyled?: boolean | undefined;
|
|
31
36
|
options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
|
|
32
37
|
pageSize?: number | undefined;
|
|
33
|
-
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
34
38
|
backspaceRemovesValue?: boolean | undefined;
|
|
35
39
|
blurInputOnSelect?: boolean | undefined;
|
|
36
40
|
captureMenuScroll?: boolean | undefined;
|
|
37
41
|
classNames?: import("react-select").ClassNamesConfig<Option, IsMulti, Group> | undefined;
|
|
38
42
|
closeMenuOnSelect?: boolean | undefined;
|
|
39
43
|
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
40
|
-
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
41
44
|
controlShouldRenderValue?: boolean | undefined;
|
|
42
45
|
escapeClearsValue?: boolean | undefined;
|
|
43
46
|
filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
44
47
|
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
45
48
|
getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
|
|
46
49
|
getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
|
|
47
|
-
isLoading?: boolean | undefined;
|
|
48
50
|
isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
|
|
49
51
|
isMulti?: IsMulti | undefined;
|
|
50
52
|
isRtl?: boolean | undefined;
|
|
@@ -68,29 +70,29 @@ export declare const Select: <Option, IsMulti extends boolean = false, Group ext
|
|
|
68
70
|
count: number;
|
|
69
71
|
}) => string) | undefined;
|
|
70
72
|
styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
|
|
71
|
-
tabIndex?: number | undefined;
|
|
72
73
|
tabSelectsValue?: boolean | undefined;
|
|
73
|
-
|
|
74
|
-
} & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "aria-label" | "form" | "value" | "onChange" | "inputValue" | "theme" | "className" | "id" | "name" | "autoFocus" | "onFocus" | "onBlur" | "onKeyDown" | "aria-errormessage" | "aria-invalid" | "aria-labelledby" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom" | "required"> & {
|
|
75
|
-
isDisabled?: boolean | undefined;
|
|
74
|
+
} & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "aria-label" | "form" | "name" | "value" | "autoFocus" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "inputValue" | "theme" | "required" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
76
75
|
placeholder?: React.ReactNode;
|
|
76
|
+
tabIndex?: number | undefined;
|
|
77
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
78
|
+
isLoading?: boolean | undefined;
|
|
79
|
+
isDisabled?: boolean | undefined;
|
|
80
|
+
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
81
|
+
unstyled?: boolean | undefined;
|
|
77
82
|
options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
|
|
78
83
|
pageSize?: number | undefined;
|
|
79
|
-
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
80
84
|
backspaceRemovesValue?: boolean | undefined;
|
|
81
85
|
blurInputOnSelect?: boolean | undefined;
|
|
82
86
|
captureMenuScroll?: boolean | undefined;
|
|
83
87
|
classNames?: import("react-select").ClassNamesConfig<Option, IsMulti, Group> | undefined;
|
|
84
88
|
closeMenuOnSelect?: boolean | undefined;
|
|
85
89
|
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
86
|
-
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
87
90
|
controlShouldRenderValue?: boolean | undefined;
|
|
88
91
|
escapeClearsValue?: boolean | undefined;
|
|
89
92
|
filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
90
93
|
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
91
94
|
getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
|
|
92
95
|
getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
|
|
93
|
-
isLoading?: boolean | undefined;
|
|
94
96
|
isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
|
|
95
97
|
isMulti?: IsMulti | undefined;
|
|
96
98
|
isRtl?: boolean | undefined;
|
|
@@ -114,7 +116,5 @@ export declare const Select: <Option, IsMulti extends boolean = false, Group ext
|
|
|
114
116
|
count: number;
|
|
115
117
|
}) => string) | undefined;
|
|
116
118
|
styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
|
|
117
|
-
tabIndex?: number | undefined;
|
|
118
119
|
tabSelectsValue?: boolean | undefined;
|
|
119
|
-
unstyled?: boolean | undefined;
|
|
120
120
|
} & {}> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextareaProps } from '@chakra-ui/react';
|
|
3
|
-
export declare const Textarea: ({ onFocus, onBlur, onMouseEnter, onMouseLeave, variant, borderRadius, ...rest }:
|
|
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
|
+
}) => React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactComponentElement } from 'react';
|
|
2
|
-
import { FlexProps } from '@chakra-ui/react';
|
|
2
|
+
import { FlexProps, StackProps } from '@chakra-ui/react';
|
|
3
3
|
export type TopBarBackActionProps = {
|
|
4
4
|
backAction?: () => void;
|
|
5
5
|
rightInformation?: ReactComponentElement<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const theme: any
|
|
1
|
+
export declare const theme: Record<string, any>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { FC, PropsWithChildren, ReactNode, Dispatch, SetStateAction, ReactComponentElement } from 'react';
|
|
2
|
-
import { IconButtonProps, HTMLChakraProps,
|
|
2
|
+
import { IconButtonProps, CardProps, HTMLChakraProps, MenuItemProps, FlexProps, AccordionProps, FormControlProps, InputProps, ModalProps, DrawerProps, StackProps, BoxProps, DrawerContentProps, ButtonProps, TextProps } from '@chakra-ui/react';
|
|
3
|
+
import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
|
|
3
4
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
4
5
|
import * as react_select_dist_declarations_src_useStateManager from 'react-select/dist/declarations/src/useStateManager';
|
|
5
6
|
import * as react_select_dist_declarations_src_filters from 'react-select/dist/declarations/src/filters';
|
|
6
|
-
import * as react_select_dist_declarations_src_components from 'react-select/dist/declarations/src/components';
|
|
7
7
|
import * as react_select from 'react-select';
|
|
8
8
|
import { GroupBase, Props } from 'react-select';
|
|
9
|
+
import * as react_select_dist_declarations_src_components from 'react-select/dist/declarations/src/components';
|
|
9
10
|
import * as react_select_dist_declarations_src_Select from 'react-select/dist/declarations/src/Select';
|
|
10
11
|
|
|
11
12
|
type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
|
|
@@ -16,8 +17,15 @@ declare const ActionsButton: FC<PropsWithChildren<ActionsButtonProps>>;
|
|
|
16
17
|
declare const Card: (props: CardProps) => React.JSX.Element;
|
|
17
18
|
|
|
18
19
|
type StyledMenuItemProps = HTMLChakraProps<'button'>;
|
|
19
|
-
declare const MenuItem:
|
|
20
|
-
|
|
20
|
+
declare const MenuItem: _chakra_ui_system_dist_system_types.ComponentWithAs<"button", MenuItemProps>;
|
|
21
|
+
type ConfirmMenuItemProps = MenuItemProps & {
|
|
22
|
+
confirmDelay?: number;
|
|
23
|
+
confirmColorScheme?: string;
|
|
24
|
+
confirmContent?: React.ReactNode;
|
|
25
|
+
confirmText?: React.ReactNode;
|
|
26
|
+
confirmIcon?: React.FC<React.PropsWithChildren<unknown>>;
|
|
27
|
+
};
|
|
28
|
+
declare const ConfirmMenuItem: _chakra_ui_system_dist_system_types.ComponentWithAs<"button", ConfirmMenuItemProps>;
|
|
21
29
|
|
|
22
30
|
type DataListColumns = Record<string, DataListCellProps>;
|
|
23
31
|
type DataListContextValue = {
|
|
@@ -27,7 +35,7 @@ type DataListContextValue = {
|
|
|
27
35
|
};
|
|
28
36
|
declare const DataListContext: React.Context<DataListContextValue>;
|
|
29
37
|
declare const DataListHeaderContext: React.Context<boolean>;
|
|
30
|
-
type DataListCellProps = FlexProps
|
|
38
|
+
type DataListCellProps = FlexProps & {
|
|
31
39
|
colName?: string;
|
|
32
40
|
colWidth?: string | number | Record<string, string | number>;
|
|
33
41
|
isVisible?: boolean | boolean[] | Record<string, boolean>;
|
|
@@ -45,7 +53,7 @@ declare const DataListAccordionIcon: ({ ...rest }: {
|
|
|
45
53
|
declare const DataListAccordionPanel: ({ ...rest }: {
|
|
46
54
|
[x: string]: any;
|
|
47
55
|
}) => React.JSX.Element;
|
|
48
|
-
type DataListRowProps = FlexProps
|
|
56
|
+
type DataListRowProps = FlexProps & {
|
|
49
57
|
isVisible?: boolean | boolean[] | Record<string, boolean>;
|
|
50
58
|
isDisabled?: boolean;
|
|
51
59
|
};
|
|
@@ -60,7 +68,7 @@ type DataListProps = AccordionProps & {
|
|
|
60
68
|
declare const DataList: FC<PropsWithChildren<DataListProps>>;
|
|
61
69
|
|
|
62
70
|
type DayPickerProps = {
|
|
63
|
-
defaultValue?: string | Date;
|
|
71
|
+
defaultValue?: string | Date | undefined;
|
|
64
72
|
onChange: (e: string | undefined) => void;
|
|
65
73
|
locale?: string;
|
|
66
74
|
customFormat?: string;
|
|
@@ -83,7 +91,7 @@ type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue' | 'labe
|
|
|
83
91
|
};
|
|
84
92
|
declare const FormGroup: ({ children, errorMessage, helper, id, isRequired, label, showError, ...props }: FormGroupProps) => React.JSX.Element;
|
|
85
93
|
|
|
86
|
-
type InputDayPickerProps = {
|
|
94
|
+
type InputDayPickerProps = Omit<InputProps, 'minDate' | 'maxDate' | 'defaultValue'> & {
|
|
87
95
|
name: string;
|
|
88
96
|
placeholder?: string;
|
|
89
97
|
onChange: Dispatch<SetStateAction<string | undefined | null>>;
|
|
@@ -96,7 +104,7 @@ type InputDayPickerProps = {
|
|
|
96
104
|
maxDate?: Date | null | undefined;
|
|
97
105
|
calendarFunc?: (date: any) => 'after-max-date' | 'before-min-date' | undefined;
|
|
98
106
|
isDisabled?: boolean;
|
|
99
|
-
}
|
|
107
|
+
};
|
|
100
108
|
declare const InputDayPicker: ({ name, placeholder, value, onChange, locale, variant, format, withTime, minDate, maxDate, calendarFunc, isDisabled, ...inputProps }: InputDayPickerProps) => React.JSX.Element;
|
|
101
109
|
|
|
102
110
|
var css_248z = "/* CSS variables. */\r\n:root {\r\n\t--PhoneInput-color--focus: #03b2cb;\r\n\t--PhoneInputInternationalIconPhone-opacity: 0.8;\r\n\t--PhoneInputInternationalIconGlobe-opacity: 0.65;\r\n\t--PhoneInputCountrySelect-marginRight: 0.35em;\r\n\t--PhoneInputCountrySelectArrow-width: 0.3em;\r\n\t--PhoneInputCountrySelectArrow-marginLeft: var(--PhoneInputCountrySelect-marginRight);\r\n\t--PhoneInputCountrySelectArrow-borderWidth: 1px;\r\n\t--PhoneInputCountrySelectArrow-opacity: 0.45;\r\n\t--PhoneInputCountrySelectArrow-color: currentColor;\r\n\t--PhoneInputCountrySelectArrow-color--focus: var(--PhoneInput-color--focus);\r\n\t--PhoneInputCountrySelectArrow-transform: rotate(45deg);\r\n\t--PhoneInputCountryFlag-aspectRatio: 1.5;\r\n\t--PhoneInputCountryFlag-height: 1em;\r\n\t--PhoneInputCountryFlag-borderWidth: 1px;\r\n\t--PhoneInputCountryFlag-borderColor: rgba(0,0,0,0.5);\r\n\t--PhoneInputCountryFlag-borderColor--focus: var(--PhoneInput-color--focus);\r\n\t--PhoneInputCountryFlag-backgroundColor--loading: rgba(0,0,0,0.1);\r\n}\r\n\r\n.PhoneInput {\r\n\t/* This is done to stretch the contents of this component. */\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.PhoneInputInput {\r\n\t/* The phone number input stretches to fill all empty space */\r\n\tflex: 1;\r\n\t/* The phone number input should shrink\r\n\t to make room for the extension input */\r\n\tmin-width: 0;\r\n}\r\n\r\n.PhoneInputCountryIcon {\r\n\twidth: calc(var(--PhoneInputCountryFlag-height) * var(--PhoneInputCountryFlag-aspectRatio));\r\n\theight: var(--PhoneInputCountryFlag-height);\r\n}\r\n\r\n.PhoneInputCountryIcon--square {\r\n\twidth: var(--PhoneInputCountryFlag-height);\r\n}\r\n\r\n.PhoneInputCountryIcon--border {\r\n\t/* Removed `background-color` because when an `<img/>` was still loading\r\n\t it would show a dark gray rectangle. */\r\n\t/* For some reason the `<img/>` is not stretched to 100% width and height\r\n\t and sometime there can be seen white pixels of the background at top and bottom. */\r\n\tbackground-color: var(--PhoneInputCountryFlag-backgroundColor--loading);\r\n\t/* Border is added via `box-shadow` because `border` interferes with `width`/`height`. */\r\n\t/* For some reason the `<img/>` is not stretched to 100% width and height\r\n\t and sometime there can be seen white pixels of the background at top and bottom,\r\n\t so an additional \"inset\" border is added. */\r\n\tbox-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor),\r\n\t\tinset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor);\r\n}\r\n\r\n.PhoneInputCountryIconImg {\r\n\t/* Fixes weird vertical space above the flag icon. */\r\n\t/* https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/7#note_348586559 */\r\n\tdisplay: block;\r\n\t/* 3rd party <SVG/> flag icons won't stretch if they have `width` and `height`.\r\n\t Also, if an <SVG/> icon's aspect ratio was different, it wouldn't fit too. */\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.PhoneInputInternationalIconPhone {\r\n\topacity: var(--PhoneInputInternationalIconPhone-opacity);\r\n}\r\n\r\n.PhoneInputInternationalIconGlobe {\r\n\topacity: var(--PhoneInputInternationalIconGlobe-opacity);\r\n}\r\n\r\n/* Styling native country `<select/>`. */\r\n\r\n.PhoneInputCountry {\r\n\tposition: relative;\r\n\talign-self: stretch;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tmargin-right: var(--PhoneInputCountrySelect-marginRight);\r\n}\r\n\r\n.PhoneInputCountrySelect {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\tz-index: 1;\r\n\tborder: 0;\r\n\topacity: 0;\r\n\tcursor: pointer;\r\n}\r\n\r\n.PhoneInputCountrySelect[disabled],\r\n.PhoneInputCountrySelect[readonly] {\r\n\tcursor: default;\r\n}\r\n\r\n.PhoneInputCountrySelectArrow {\r\n\tdisplay: block;\r\n\tcontent: '';\r\n\twidth: var(--PhoneInputCountrySelectArrow-width);\r\n\theight: var(--PhoneInputCountrySelectArrow-width);\r\n\tmargin-left: var(--PhoneInputCountrySelectArrow-marginLeft);\r\n\tborder-style: solid;\r\n\tborder-color: var(--PhoneInputCountrySelectArrow-color);\r\n\tborder-top-width: 0;\r\n\tborder-bottom-width: var(--PhoneInputCountrySelectArrow-borderWidth);\r\n\tborder-left-width: 0;\r\n\tborder-right-width: var(--PhoneInputCountrySelectArrow-borderWidth);\r\n\ttransform: var(--PhoneInputCountrySelectArrow-transform);\r\n\topacity: var(--PhoneInputCountrySelectArrow-opacity);\r\n}\r\n\r\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon + .PhoneInputCountrySelectArrow {\r\n\topacity: 1;\r\n\tcolor: var(--PhoneInputCountrySelectArrow-color--focus);\r\n}\r\n\r\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon--border {\r\n\tbox-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus),\r\n\t\tinset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus);\r\n}\r\n\r\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon .PhoneInputInternationalIconGlobe {\r\n\topacity: 1;\r\n\tcolor: var(--PhoneInputCountrySelectArrow-color--focus);\r\n}";
|
|
@@ -166,7 +174,7 @@ declare const PaginationButtonNextPage: FC<PropsWithChildren<Omit<IconButtonProp
|
|
|
166
174
|
declare const PaginationInfo: ({ ...rest }: {
|
|
167
175
|
[x: string]: any;
|
|
168
176
|
}) => React.JSX.Element;
|
|
169
|
-
type PaginationProps = StackProps
|
|
177
|
+
type PaginationProps = StackProps & {
|
|
170
178
|
setPage: (page: number) => void;
|
|
171
179
|
page?: number;
|
|
172
180
|
pageSize?: number;
|
|
@@ -175,7 +183,16 @@ type PaginationProps = StackProps$1 & {
|
|
|
175
183
|
};
|
|
176
184
|
declare const Pagination: ({ setPage, page, pageSize, totalItems, isLoadingPage, children, ...rest }: PaginationProps) => React.JSX.Element;
|
|
177
185
|
|
|
178
|
-
|
|
186
|
+
type CustomProps = {
|
|
187
|
+
value?: string;
|
|
188
|
+
defaultValue?: string;
|
|
189
|
+
onChange?(value?: string): void;
|
|
190
|
+
delay?: number;
|
|
191
|
+
clearLabel?: string;
|
|
192
|
+
inputProps?: object;
|
|
193
|
+
};
|
|
194
|
+
type SearchInputProps = Overwrite<InputProps, CustomProps>;
|
|
195
|
+
declare const SearchInput: _chakra_ui_system_dist_system_types.ComponentWithAs<"input", SearchInputProps>;
|
|
179
196
|
|
|
180
197
|
declare module 'react' {
|
|
181
198
|
function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
|
|
@@ -201,26 +218,28 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
|
|
|
201
218
|
defaultOptions?: unknown | boolean;
|
|
202
219
|
debounceDelay?: number | undefined;
|
|
203
220
|
variant?: "outline" | "filled" | undefined;
|
|
204
|
-
} & Omit<Pick<react_select_dist_declarations_src_Select.Props<Option, IsMulti, Group>, "aria-label" | "form" | "
|
|
205
|
-
isDisabled?: boolean | undefined;
|
|
221
|
+
} & Omit<Pick<react_select_dist_declarations_src_Select.Props<Option, IsMulti, Group>, "aria-label" | "form" | "name" | "value" | "autoFocus" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "inputValue" | "theme" | "required" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
206
222
|
placeholder?: React.ReactNode;
|
|
223
|
+
tabIndex?: number | undefined;
|
|
224
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
225
|
+
isLoading?: boolean | undefined;
|
|
226
|
+
isDisabled?: boolean | undefined;
|
|
227
|
+
components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
228
|
+
unstyled?: boolean | undefined;
|
|
207
229
|
options?: react_select.OptionsOrGroups<Option, Group> | undefined;
|
|
208
230
|
pageSize?: number | undefined;
|
|
209
|
-
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
210
231
|
backspaceRemovesValue?: boolean | undefined;
|
|
211
232
|
blurInputOnSelect?: boolean | undefined;
|
|
212
233
|
captureMenuScroll?: boolean | undefined;
|
|
213
234
|
classNames?: react_select.ClassNamesConfig<Option, IsMulti, Group> | undefined;
|
|
214
235
|
closeMenuOnSelect?: boolean | undefined;
|
|
215
236
|
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
216
|
-
components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
217
237
|
controlShouldRenderValue?: boolean | undefined;
|
|
218
238
|
escapeClearsValue?: boolean | undefined;
|
|
219
239
|
filterOption?: ((option: react_select_dist_declarations_src_filters.FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
220
240
|
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
221
241
|
getOptionLabel?: react_select.GetOptionLabel<Option> | undefined;
|
|
222
242
|
getOptionValue?: react_select.GetOptionValue<Option> | undefined;
|
|
223
|
-
isLoading?: boolean | undefined;
|
|
224
243
|
isOptionDisabled?: ((option: Option, selectValue: react_select.Options<Option>) => boolean) | undefined;
|
|
225
244
|
isMulti?: IsMulti | undefined;
|
|
226
245
|
isRtl?: boolean | undefined;
|
|
@@ -244,29 +263,29 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
|
|
|
244
263
|
count: number;
|
|
245
264
|
}) => string) | undefined;
|
|
246
265
|
styles?: react_select.StylesConfig<Option, IsMulti, Group> | undefined;
|
|
247
|
-
tabIndex?: number | undefined;
|
|
248
266
|
tabSelectsValue?: boolean | undefined;
|
|
249
|
-
|
|
250
|
-
} & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<react_select_dist_declarations_src_Select.Props<Option, IsMulti, Group>, "aria-label" | "form" | "value" | "onChange" | "inputValue" | "theme" | "className" | "id" | "name" | "autoFocus" | "onFocus" | "onBlur" | "onKeyDown" | "aria-errormessage" | "aria-invalid" | "aria-labelledby" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom" | "required"> & {
|
|
251
|
-
isDisabled?: boolean | undefined;
|
|
267
|
+
} & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<react_select_dist_declarations_src_Select.Props<Option, IsMulti, Group>, "aria-label" | "form" | "name" | "value" | "autoFocus" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "inputValue" | "theme" | "required" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
252
268
|
placeholder?: React.ReactNode;
|
|
269
|
+
tabIndex?: number | undefined;
|
|
270
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
271
|
+
isLoading?: boolean | undefined;
|
|
272
|
+
isDisabled?: boolean | undefined;
|
|
273
|
+
components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
274
|
+
unstyled?: boolean | undefined;
|
|
253
275
|
options?: react_select.OptionsOrGroups<Option, Group> | undefined;
|
|
254
276
|
pageSize?: number | undefined;
|
|
255
|
-
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
256
277
|
backspaceRemovesValue?: boolean | undefined;
|
|
257
278
|
blurInputOnSelect?: boolean | undefined;
|
|
258
279
|
captureMenuScroll?: boolean | undefined;
|
|
259
280
|
classNames?: react_select.ClassNamesConfig<Option, IsMulti, Group> | undefined;
|
|
260
281
|
closeMenuOnSelect?: boolean | undefined;
|
|
261
282
|
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
262
|
-
components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
263
283
|
controlShouldRenderValue?: boolean | undefined;
|
|
264
284
|
escapeClearsValue?: boolean | undefined;
|
|
265
285
|
filterOption?: ((option: react_select_dist_declarations_src_filters.FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
266
286
|
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
267
287
|
getOptionLabel?: react_select.GetOptionLabel<Option> | undefined;
|
|
268
288
|
getOptionValue?: react_select.GetOptionValue<Option> | undefined;
|
|
269
|
-
isLoading?: boolean | undefined;
|
|
270
289
|
isOptionDisabled?: ((option: Option, selectValue: react_select.Options<Option>) => boolean) | undefined;
|
|
271
290
|
isMulti?: IsMulti | undefined;
|
|
272
291
|
isRtl?: boolean | undefined;
|
|
@@ -290,9 +309,7 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
|
|
|
290
309
|
count: number;
|
|
291
310
|
}) => string) | undefined;
|
|
292
311
|
styles?: react_select.StylesConfig<Option, IsMulti, Group> | undefined;
|
|
293
|
-
tabIndex?: number | undefined;
|
|
294
312
|
tabSelectsValue?: boolean | undefined;
|
|
295
|
-
unstyled?: boolean | undefined;
|
|
296
313
|
} & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
|
|
297
314
|
|
|
298
315
|
declare const BottomBar: (props: FlexProps) => React.JSX.Element;
|
|
@@ -302,31 +319,31 @@ declare const LayoutContainer: (props: FlexProps) => React.JSX.Element;
|
|
|
302
319
|
type SideNavProps = {
|
|
303
320
|
isMobileMenuOpen: boolean;
|
|
304
321
|
onMobileMenuClose: () => void;
|
|
305
|
-
} & FlexProps
|
|
322
|
+
} & FlexProps & DrawerContentProps;
|
|
306
323
|
type SideNavMenuItemProps = {
|
|
307
324
|
isActive?: boolean;
|
|
308
325
|
} & ButtonProps;
|
|
309
326
|
type SideNavMenuProps = {
|
|
310
327
|
textProps?: TextProps;
|
|
311
|
-
} & StackProps
|
|
328
|
+
} & StackProps;
|
|
312
329
|
declare const SideNav: ({ isMobileMenuOpen, onMobileMenuClose, children, ...props }: SideNavProps) => React.JSX.Element;
|
|
313
|
-
declare const SideNavContainer: (props: StackProps
|
|
314
|
-
declare const SideNavHeader: ({ children, ...rest }: FlexProps
|
|
315
|
-
declare const SideNavBody: ({ children, ...rest }: StackProps
|
|
316
|
-
declare const SideNavFooter: ({ children, ...rest }: FlexProps
|
|
330
|
+
declare const SideNavContainer: (props: StackProps) => React.JSX.Element;
|
|
331
|
+
declare const SideNavHeader: ({ children, ...rest }: FlexProps) => React.JSX.Element;
|
|
332
|
+
declare const SideNavBody: ({ children, ...rest }: StackProps) => React.JSX.Element;
|
|
333
|
+
declare const SideNavFooter: ({ children, ...rest }: FlexProps) => React.JSX.Element;
|
|
317
334
|
declare const SideNavMenu: ({ title, children, textProps, ...rest }: SideNavMenuProps) => React.JSX.Element;
|
|
318
335
|
declare const SideNavMenuItem: ({ isActive, children, ...rest }: SideNavMenuItemProps) => React.JSX.Element;
|
|
319
336
|
|
|
320
337
|
type TopBarBackActionProps = {
|
|
321
338
|
backAction?: () => void;
|
|
322
339
|
rightInformation?: ReactComponentElement<any>;
|
|
323
|
-
} & FlexProps
|
|
340
|
+
} & FlexProps;
|
|
324
341
|
declare const TopBar: (props: StackProps) => React.JSX.Element;
|
|
325
|
-
declare const TopBarFirstElement: (props: FlexProps
|
|
342
|
+
declare const TopBarFirstElement: (props: FlexProps) => React.JSX.Element;
|
|
326
343
|
declare const TopBarLastElement: (props: StackProps) => React.JSX.Element;
|
|
327
344
|
declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => React.JSX.Element;
|
|
328
345
|
|
|
329
|
-
declare const theme: any
|
|
346
|
+
declare const theme: Record<string, any>;
|
|
330
347
|
|
|
331
348
|
declare const dateFormat = "dd/MM/yyyy";
|
|
332
349
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paygreen/pgui",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.1",
|
|
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",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"@babel/preset-env": "^7.18.6",
|
|
50
50
|
"@babel/preset-react": "^7.18.6",
|
|
51
51
|
"@babel/preset-typescript": "^7.18.6",
|
|
52
|
+
"@chakra-ui/react": "^2.3.5",
|
|
52
53
|
"@chakra-ui/theme-tools": "^2.0.14",
|
|
53
54
|
"@emotion/react": "^11.9.3",
|
|
54
55
|
"@emotion/styled": "^11.9.3",
|