@paygreen/pgui 2.1.1 → 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/README.md +38 -22
- package/dist/cjs/index.js +50946 -2674
- 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/FormGroup/index.d.ts +1 -1
- 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/SearchInput/index.d.ts +11 -0
- package/dist/cjs/types/components/Select/index.d.ts +116 -0
- package/dist/cjs/types/components/index.d.ts +6 -0
- package/dist/cjs/types/index.d.ts +3 -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 +10 -0
- package/dist/cjs/types/layout/index.d.ts +4 -0
- package/dist/cjs/types/theme/components/{Badge.d.ts → badge.d.ts} +2 -1
- package/dist/{esm/types/theme/components/Button.d.ts → cjs/types/theme/components/button.d.ts} +2 -7
- package/dist/cjs/types/theme/components/drawer.d.ts +6 -0
- package/dist/cjs/types/theme/components/index.d.ts +5 -0
- package/dist/{esm/types/theme/components/Input.d.ts → cjs/types/theme/components/input.d.ts} +2 -1
- package/dist/{esm/types/theme/components/Tag.d.ts → cjs/types/theme/components/tag.d.ts} +2 -1
- 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 +118 -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 +2 -1
- 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/theme/theme.d.ts +1 -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 +50902 -2675
- 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/FormGroup/index.d.ts +1 -1
- 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/SearchInput/index.d.ts +11 -0
- package/dist/esm/types/components/Select/index.d.ts +116 -0
- package/dist/esm/types/components/index.d.ts +6 -0
- package/dist/esm/types/index.d.ts +3 -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 +10 -0
- package/dist/esm/types/layout/index.d.ts +4 -0
- package/dist/esm/types/theme/components/{Badge.d.ts → badge.d.ts} +2 -1
- package/dist/{cjs/types/theme/components/Button.d.ts → esm/types/theme/components/button.d.ts} +2 -7
- package/dist/esm/types/theme/components/drawer.d.ts +6 -0
- package/dist/esm/types/theme/components/index.d.ts +5 -0
- package/dist/{cjs/types/theme/components/Input.d.ts → esm/types/theme/components/input.d.ts} +2 -1
- package/dist/{cjs/types/theme/components/Tag.d.ts → esm/types/theme/components/tag.d.ts} +2 -1
- 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 +118 -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 +2 -1
- 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/theme/theme.d.ts +1 -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 +209 -13
- package/package.json +14 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React, { FC, PropsWithChildren, ReactNode, Dispatch, SetStateAction, ReactComponentElement } from 'react';
|
|
3
|
+
import * as _chakra_ui_react from '@chakra-ui/react';
|
|
4
|
+
import { IconButtonProps, FlexProps, HTMLChakraProps, MenuItemProps, AccordionProps, FormControlProps, PopoverProps, InputProps, StackProps, BoxProps, DrawerContentProps, ButtonProps } from '@chakra-ui/react';
|
|
5
|
+
import { DayPickerProps, DaySelectionMode, DayPickerSingleProps } from 'react-day-picker';
|
|
6
|
+
import * as react_select_dist_declarations_src_useStateManager from 'react-select/dist/declarations/src/useStateManager';
|
|
7
|
+
import * as react_select from 'react-select';
|
|
8
|
+
import { GroupBase, Props } from 'react-select';
|
|
9
|
+
import * as react_select_dist_declarations_src_filters from 'react-select/dist/declarations/src/filters';
|
|
10
|
+
import * as react_select_dist_declarations_src_components from 'react-select/dist/declarations/src/components';
|
|
11
|
+
import * as react_select_dist_declarations_src_Select from 'react-select/dist/declarations/src/Select';
|
|
3
12
|
|
|
4
13
|
declare type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
|
|
5
14
|
label: string;
|
|
6
15
|
};
|
|
7
|
-
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>;
|
|
8
30
|
|
|
9
31
|
declare type DataListColumns = Record<string, DataListCellProps>;
|
|
10
32
|
declare type DataListContextValue = {
|
|
@@ -36,27 +58,43 @@ declare type DataListRowProps = FlexProps & {
|
|
|
36
58
|
isVisible?: boolean | boolean[] | Record<string, boolean>;
|
|
37
59
|
isDisabled?: boolean;
|
|
38
60
|
};
|
|
39
|
-
declare const DataListRow: FC<
|
|
61
|
+
declare const DataListRow: FC<PropsWithChildren<DataListRowProps>>;
|
|
40
62
|
declare type DataListHeaderProps = DataListRowProps;
|
|
41
|
-
declare const DataListHeader: FC<
|
|
63
|
+
declare const DataListHeader: FC<PropsWithChildren<DataListHeaderProps>>;
|
|
42
64
|
declare type DataListFooterProps = DataListRowProps;
|
|
43
|
-
declare const DataListFooter: FC<
|
|
65
|
+
declare const DataListFooter: FC<PropsWithChildren<DataListFooterProps>>;
|
|
44
66
|
declare type DataListProps = AccordionProps & {
|
|
45
67
|
isHover?: boolean;
|
|
46
68
|
};
|
|
47
|
-
declare const DataList: FC<
|
|
69
|
+
declare const DataList: FC<PropsWithChildren<DataListProps>>;
|
|
70
|
+
|
|
71
|
+
declare const DayPicker: (props: DayPickerProps) => JSX.Element;
|
|
48
72
|
|
|
49
73
|
declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue' | 'label'> & {
|
|
50
74
|
children?: ReactNode;
|
|
51
75
|
errorMessage?: ReactNode;
|
|
52
76
|
helper?: ReactNode;
|
|
53
|
-
id
|
|
77
|
+
id?: string;
|
|
54
78
|
isRequired?: boolean;
|
|
55
79
|
label?: ReactNode;
|
|
56
80
|
showError?: boolean;
|
|
57
81
|
};
|
|
58
82
|
declare const FormGroup: ({ children, errorMessage, helper, id, isRequired, label, showError, ...props }: FormGroupProps) => JSX.Element;
|
|
59
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
|
+
|
|
60
98
|
declare const getPaginationInfo: ({ page, pageSize, totalItems, }: {
|
|
61
99
|
page?: number | undefined;
|
|
62
100
|
pageSize?: number | undefined;
|
|
@@ -83,10 +121,10 @@ declare type PaginationContextValue<PageType = number> = {
|
|
|
83
121
|
lastItemOnPage: number;
|
|
84
122
|
};
|
|
85
123
|
declare const PaginationContext: React.Context<PaginationContextValue<number>>;
|
|
86
|
-
declare const PaginationButtonFirstPage: FC<
|
|
87
|
-
declare const PaginationButtonPrevPage: FC<
|
|
88
|
-
declare const PaginationButtonLastPage: FC<
|
|
89
|
-
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'>>>;
|
|
90
128
|
declare const PaginationInfo: ({ ...rest }: {
|
|
91
129
|
[x: string]: any;
|
|
92
130
|
}) => JSX.Element;
|
|
@@ -99,4 +137,162 @@ declare type PaginationProps = StackProps & {
|
|
|
99
137
|
};
|
|
100
138
|
declare const Pagination: ({ setPage, page, pageSize, totalItems, isLoadingPage, ...rest }: PaginationProps) => JSX.Element;
|
|
101
139
|
|
|
102
|
-
|
|
140
|
+
declare type CustomProps = {
|
|
141
|
+
value?: string;
|
|
142
|
+
defaultValue?: string;
|
|
143
|
+
onChange?(value?: string): void;
|
|
144
|
+
delay?: number;
|
|
145
|
+
clearLabel?: string;
|
|
146
|
+
};
|
|
147
|
+
declare type SearchInputProps = Overwrite<InputProps, CustomProps>;
|
|
148
|
+
declare const SearchInput: _chakra_ui_react.ComponentWithAs<"input", SearchInputProps>;
|
|
149
|
+
|
|
150
|
+
declare module 'react' {
|
|
151
|
+
function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
|
|
152
|
+
}
|
|
153
|
+
declare type SelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = {
|
|
154
|
+
isAsync?: boolean;
|
|
155
|
+
isCreatable?: boolean;
|
|
156
|
+
isError?: boolean;
|
|
157
|
+
size?: string;
|
|
158
|
+
formatCreateLabel?: (inputValue: string) => ReactNode;
|
|
159
|
+
loadOptions?: (input: unknown) => TODO;
|
|
160
|
+
defaultOptions?: unknown | boolean;
|
|
161
|
+
debounceDelay?: number;
|
|
162
|
+
variant?: 'unstyled' | 'filled' | 'outlined';
|
|
163
|
+
} & Props<Option, IsMulti, Group> & Omit<BoxProps, 'defaultValue'>;
|
|
164
|
+
declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: {
|
|
165
|
+
isAsync?: boolean | undefined;
|
|
166
|
+
isCreatable?: boolean | undefined;
|
|
167
|
+
isError?: boolean | undefined;
|
|
168
|
+
size?: string | undefined;
|
|
169
|
+
formatCreateLabel?: ((inputValue: string) => ReactNode) | undefined;
|
|
170
|
+
loadOptions?: ((input: unknown) => TODO) | undefined;
|
|
171
|
+
defaultOptions?: unknown | boolean;
|
|
172
|
+
debounceDelay?: number | undefined;
|
|
173
|
+
variant?: "unstyled" | "filled" | "outlined" | undefined;
|
|
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"> & {
|
|
175
|
+
placeholder?: React.ReactNode;
|
|
176
|
+
tabIndex?: number | undefined;
|
|
177
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
178
|
+
isLoading?: boolean | undefined;
|
|
179
|
+
isDisabled?: boolean | undefined;
|
|
180
|
+
components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
181
|
+
pageSize?: number | undefined;
|
|
182
|
+
backspaceRemovesValue?: boolean | undefined;
|
|
183
|
+
blurInputOnSelect?: boolean | undefined;
|
|
184
|
+
captureMenuScroll?: boolean | undefined;
|
|
185
|
+
closeMenuOnSelect?: boolean | undefined;
|
|
186
|
+
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
187
|
+
controlShouldRenderValue?: boolean | undefined;
|
|
188
|
+
escapeClearsValue?: boolean | undefined;
|
|
189
|
+
filterOption?: ((option: react_select_dist_declarations_src_filters.FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
190
|
+
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
191
|
+
getOptionLabel?: react_select.GetOptionLabel<Option> | undefined;
|
|
192
|
+
getOptionValue?: react_select.GetOptionValue<Option> | undefined;
|
|
193
|
+
isOptionDisabled?: ((option: Option, selectValue: react_select.Options<Option>) => boolean) | undefined;
|
|
194
|
+
isMulti?: IsMulti | undefined;
|
|
195
|
+
isRtl?: boolean | undefined;
|
|
196
|
+
isSearchable?: boolean | undefined;
|
|
197
|
+
loadingMessage?: ((obj: {
|
|
198
|
+
inputValue: string;
|
|
199
|
+
}) => React.ReactNode) | undefined;
|
|
200
|
+
minMenuHeight?: number | undefined;
|
|
201
|
+
maxMenuHeight?: number | undefined;
|
|
202
|
+
menuIsOpen?: boolean | undefined;
|
|
203
|
+
menuPlacement?: react_select.MenuPlacement | undefined;
|
|
204
|
+
menuPosition?: react_select.MenuPosition | undefined;
|
|
205
|
+
menuShouldBlockScroll?: boolean | undefined;
|
|
206
|
+
menuShouldScrollIntoView?: boolean | undefined;
|
|
207
|
+
noOptionsMessage?: ((obj: {
|
|
208
|
+
inputValue: string;
|
|
209
|
+
}) => React.ReactNode) | undefined;
|
|
210
|
+
openMenuOnFocus?: boolean | undefined;
|
|
211
|
+
openMenuOnClick?: boolean | undefined;
|
|
212
|
+
options?: react_select.OptionsOrGroups<Option, Group> | undefined;
|
|
213
|
+
screenReaderStatus?: ((obj: {
|
|
214
|
+
count: number;
|
|
215
|
+
}) => string) | undefined;
|
|
216
|
+
styles?: react_select.StylesConfig<Option, IsMulti, Group> | undefined;
|
|
217
|
+
tabSelectsValue?: boolean | undefined;
|
|
218
|
+
} & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<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"> & {
|
|
219
|
+
placeholder?: React.ReactNode;
|
|
220
|
+
tabIndex?: number | undefined;
|
|
221
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
222
|
+
isLoading?: boolean | undefined;
|
|
223
|
+
isDisabled?: boolean | undefined;
|
|
224
|
+
components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
225
|
+
pageSize?: number | undefined;
|
|
226
|
+
backspaceRemovesValue?: boolean | undefined;
|
|
227
|
+
blurInputOnSelect?: boolean | undefined;
|
|
228
|
+
captureMenuScroll?: boolean | undefined;
|
|
229
|
+
closeMenuOnSelect?: boolean | undefined;
|
|
230
|
+
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
231
|
+
controlShouldRenderValue?: boolean | undefined;
|
|
232
|
+
escapeClearsValue?: boolean | undefined;
|
|
233
|
+
filterOption?: ((option: react_select_dist_declarations_src_filters.FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
234
|
+
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
235
|
+
getOptionLabel?: react_select.GetOptionLabel<Option> | undefined;
|
|
236
|
+
getOptionValue?: react_select.GetOptionValue<Option> | undefined;
|
|
237
|
+
isOptionDisabled?: ((option: Option, selectValue: react_select.Options<Option>) => boolean) | undefined;
|
|
238
|
+
isMulti?: IsMulti | undefined;
|
|
239
|
+
isRtl?: boolean | undefined;
|
|
240
|
+
isSearchable?: boolean | undefined;
|
|
241
|
+
loadingMessage?: ((obj: {
|
|
242
|
+
inputValue: string;
|
|
243
|
+
}) => React.ReactNode) | undefined;
|
|
244
|
+
minMenuHeight?: number | undefined;
|
|
245
|
+
maxMenuHeight?: number | undefined;
|
|
246
|
+
menuIsOpen?: boolean | undefined;
|
|
247
|
+
menuPlacement?: react_select.MenuPlacement | undefined;
|
|
248
|
+
menuPosition?: react_select.MenuPosition | undefined;
|
|
249
|
+
menuShouldBlockScroll?: boolean | undefined;
|
|
250
|
+
menuShouldScrollIntoView?: boolean | undefined;
|
|
251
|
+
noOptionsMessage?: ((obj: {
|
|
252
|
+
inputValue: string;
|
|
253
|
+
}) => React.ReactNode) | undefined;
|
|
254
|
+
openMenuOnFocus?: boolean | undefined;
|
|
255
|
+
openMenuOnClick?: boolean | undefined;
|
|
256
|
+
options?: react_select.OptionsOrGroups<Option, Group> | undefined;
|
|
257
|
+
screenReaderStatus?: ((obj: {
|
|
258
|
+
count: number;
|
|
259
|
+
}) => string) | undefined;
|
|
260
|
+
styles?: react_select.StylesConfig<Option, IsMulti, Group> | undefined;
|
|
261
|
+
tabSelectsValue?: boolean | undefined;
|
|
262
|
+
} & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
|
|
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
|
+
|
|
283
|
+
declare type TopBarBackActionProps = {
|
|
284
|
+
backAction?: () => void;
|
|
285
|
+
rightInformation?: ReactComponentElement<any>;
|
|
286
|
+
} & FlexProps;
|
|
287
|
+
declare const TopBar: (props: StackProps) => JSX.Element;
|
|
288
|
+
declare const TopBarFirstElement: (props: FlexProps) => JSX.Element;
|
|
289
|
+
declare const TopBarLastElement: (props: StackProps) => JSX.Element;
|
|
290
|
+
declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => JSX.Element;
|
|
291
|
+
|
|
292
|
+
declare const theme: any;
|
|
293
|
+
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paygreen/pgui",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "PGUI is the design system coming
|
|
3
|
+
"version": "2.2.0",
|
|
4
|
+
"description": "PGUI is the design system coming from Paygreen.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
7
7
|
"files": [
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
],
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "rollup -c rollup.config.js",
|
|
12
|
+
"build": "rm -rf ./dist && rollup -c rollup.config.js",
|
|
13
13
|
"lint": "eslint src/**/*.{js,jsx,ts,tsx,json} --max-warnings=0",
|
|
14
14
|
"lint:fix": "eslint --fix 'src/**/*.{js,jsx,ts,tsx,json}'",
|
|
15
15
|
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc.json",
|
|
16
|
-
"link-local-lib": "npm link
|
|
16
|
+
"link-local-lib": "npm link @chakra-ui/react react",
|
|
17
17
|
"storybook": "start-storybook -p 6006",
|
|
18
18
|
"build-storybook": "build-storybook",
|
|
19
19
|
"prepare": "husky install"
|
|
@@ -65,7 +65,10 @@
|
|
|
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
|
+
"date-fns": "^2.29.1",
|
|
68
69
|
"eslint": "^8.20.0",
|
|
70
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
71
|
+
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
69
72
|
"eslint-config-prettier": "^8.5.0",
|
|
70
73
|
"eslint-import-resolver-typescript": "^3.2.7",
|
|
71
74
|
"eslint-plugin-import": "^2.26.0",
|
|
@@ -79,15 +82,18 @@
|
|
|
79
82
|
"lint-staged": "^13.0.3",
|
|
80
83
|
"prettier": "^2.7.1",
|
|
81
84
|
"react": "^18.2.0",
|
|
85
|
+
"react-day-picker": "^8.0.7",
|
|
82
86
|
"react-dom": "^18.2.0",
|
|
87
|
+
"react-focus-lock": "^2.9.1",
|
|
83
88
|
"react-icons": "^4.4.0",
|
|
89
|
+
"react-select": "^5.4.0",
|
|
84
90
|
"rollup": "^2.77.0",
|
|
85
91
|
"rollup-plugin-dts": "^4.2.2",
|
|
86
92
|
"rollup-plugin-node-externals": "^4.1.1",
|
|
87
93
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
94
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
88
95
|
"rollup-plugin-terser": "^7.0.2",
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"eslint-config-airbnb-typescript": "^17.0.0"
|
|
96
|
+
"sass": "^1.53.0",
|
|
97
|
+
"typescript": "^4.7.4"
|
|
92
98
|
}
|
|
93
|
-
}
|
|
99
|
+
}
|