@paygreen/pgui 2.1.2 → 2.1.3
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 +8571 -81
- package/dist/cjs/index.js.map +1 -1
- 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/Select/index.d.ts +2 -0
- package/dist/cjs/types/components/index.d.ts +2 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/layout/TopBar/index.d.ts +10 -0
- package/dist/cjs/types/layout/index.d.ts +1 -0
- package/dist/cjs/types/theme/components/button.d.ts +0 -6
- package/dist/cjs/types/theme/externals/index.d.ts +1 -0
- package/dist/cjs/types/theme/externals/reactDayPicker.d.ts +2 -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 +1 -0
- package/dist/cjs/types/theme/index.d.ts +1 -0
- package/dist/cjs/types/theme/styles.d.ts +2 -0
- package/dist/cjs/types/utils/date.d.ts +1 -0
- package/dist/esm/index.js +8568 -84
- package/dist/esm/index.js.map +1 -1
- 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/Select/index.d.ts +2 -0
- package/dist/esm/types/components/index.d.ts +2 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/layout/TopBar/index.d.ts +10 -0
- package/dist/esm/types/layout/index.d.ts +1 -0
- package/dist/esm/types/theme/components/button.d.ts +0 -6
- package/dist/esm/types/theme/externals/index.d.ts +1 -0
- package/dist/esm/types/theme/externals/reactDayPicker.d.ts +2 -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 +1 -0
- package/dist/esm/types/theme/index.d.ts +1 -0
- package/dist/esm/types/theme/styles.d.ts +2 -0
- package/dist/esm/types/utils/date.d.ts +1 -0
- package/dist/index.d.ts +32 -3
- package/package.json +3 -2
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TopBar';
|
|
@@ -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
|
+
export { reactDayPicker } from './reactDayPicker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'react-day-picker/dist/style.css';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dateFormat = "dd/MM/yyyy";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React, { FC, 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, AccordionProps, FormControlProps, PopoverProps, InputProps, StackProps, BoxProps } 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';
|
|
@@ -53,6 +55,8 @@ declare type DataListProps = AccordionProps & {
|
|
|
53
55
|
};
|
|
54
56
|
declare const DataList: FC<React.PropsWithChildren<DataListProps>>;
|
|
55
57
|
|
|
58
|
+
declare const DayPicker: (props: DayPickerProps) => JSX.Element;
|
|
59
|
+
|
|
56
60
|
declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue' | 'label'> & {
|
|
57
61
|
children?: ReactNode;
|
|
58
62
|
errorMessage?: ReactNode;
|
|
@@ -64,6 +68,20 @@ declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue'
|
|
|
64
68
|
};
|
|
65
69
|
declare const FormGroup: ({ children, errorMessage, helper, id, isRequired, label, showError, ...props }: FormGroupProps) => JSX.Element;
|
|
66
70
|
|
|
71
|
+
declare type SingleDayPickerProps = {
|
|
72
|
+
mode?: DaySelectionMode;
|
|
73
|
+
} & DayPickerSingleProps;
|
|
74
|
+
declare type InputDayPickerProps = {
|
|
75
|
+
isDisabled?: boolean;
|
|
76
|
+
popoverProps?: PopoverProps;
|
|
77
|
+
inputProps?: InputProps;
|
|
78
|
+
dayPickerProps?: SingleDayPickerProps;
|
|
79
|
+
dateFormat?: string;
|
|
80
|
+
value?: string | '';
|
|
81
|
+
onChange?: Dispatch<SetStateAction<string | undefined>>;
|
|
82
|
+
};
|
|
83
|
+
declare const InputDayPicker: ({ isDisabled, popoverProps, inputProps, dayPickerProps, dateFormat, value, onChange, }: InputDayPickerProps) => JSX.Element;
|
|
84
|
+
|
|
67
85
|
declare const getPaginationInfo: ({ page, pageSize, totalItems, }: {
|
|
68
86
|
page?: number | undefined;
|
|
69
87
|
pageSize?: number | undefined;
|
|
@@ -128,6 +146,7 @@ declare type SelectProps<Option, IsMulti extends boolean = false, Group extends
|
|
|
128
146
|
loadOptions?: (input: unknown) => TODO;
|
|
129
147
|
defaultOptions?: unknown | boolean;
|
|
130
148
|
debounceDelay?: number;
|
|
149
|
+
variant?: 'unstyled' | 'filled' | 'outlined';
|
|
131
150
|
} & Props<Option, IsMulti, Group> & Omit<BoxProps, 'defaultValue'>;
|
|
132
151
|
declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: {
|
|
133
152
|
isAsync?: boolean | undefined;
|
|
@@ -138,6 +157,7 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
|
|
|
138
157
|
loadOptions?: ((input: unknown) => TODO) | undefined;
|
|
139
158
|
defaultOptions?: unknown | boolean;
|
|
140
159
|
debounceDelay?: number | undefined;
|
|
160
|
+
variant?: "unstyled" | "filled" | "outlined" | undefined;
|
|
141
161
|
} & 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
162
|
placeholder?: React.ReactNode;
|
|
143
163
|
tabIndex?: number | undefined;
|
|
@@ -228,6 +248,15 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
|
|
|
228
248
|
tabSelectsValue?: boolean | undefined;
|
|
229
249
|
} & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
|
|
230
250
|
|
|
251
|
+
declare type TopBarBackActionProps = {
|
|
252
|
+
backAction?: () => void;
|
|
253
|
+
rightInformation?: ReactComponentElement<any>;
|
|
254
|
+
} & FlexProps;
|
|
255
|
+
declare const TopBar: ({ ...props }: StackProps) => JSX.Element;
|
|
256
|
+
declare const TopBarFirstElement: ({ ...props }: FlexProps) => JSX.Element;
|
|
257
|
+
declare const TopBarLastElement: ({ ...props }: StackProps) => JSX.Element;
|
|
258
|
+
declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => JSX.Element;
|
|
259
|
+
|
|
231
260
|
declare const theme: any;
|
|
232
261
|
|
|
233
|
-
export { ActionsButton, ActionsButtonProps, DataList, DataListAccordion, DataListAccordionButton, DataListAccordionIcon, DataListAccordionPanel, DataListCell, DataListCellProps, DataListContext, DataListFooter, DataListFooterProps, DataListHeader, DataListHeaderContext, DataListHeaderProps, DataListProps, DataListRow, DataListRowProps, FormGroup, FormGroupProps, Pagination, PaginationButtonFirstPage, PaginationButtonLastPage, PaginationButtonNextPage, PaginationButtonPrevPage, PaginationContext, PaginationContextValue, PaginationInfo, PaginationProps, SearchInput, Select, SelectProps, getPaginationInfo, theme };
|
|
262
|
+
export { ActionsButton, ActionsButtonProps, DataList, DataListAccordion, DataListAccordionButton, DataListAccordionIcon, DataListAccordionPanel, DataListCell, DataListCellProps, DataListContext, DataListFooter, DataListFooterProps, DataListHeader, DataListHeaderContext, DataListHeaderProps, DataListProps, DataListRow, DataListRowProps, DayPicker, FormGroup, FormGroupProps, InputDayPicker, InputDayPickerProps, Pagination, PaginationButtonFirstPage, PaginationButtonLastPage, PaginationButtonNextPage, PaginationButtonPrevPage, PaginationContext, PaginationContextValue, PaginationInfo, PaginationProps, SearchInput, Select, SelectProps, SingleDayPickerProps, TopBar, TopBarBackAction, TopBarBackActionProps, TopBarFirstElement, TopBarLastElement, getPaginationInfo, theme };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paygreen/pgui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
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",
|