@paygreen/pgui 2.1.1 → 2.1.2

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.
Files changed (33) hide show
  1. package/README.md +38 -22
  2. package/dist/cjs/index.js +42232 -2669
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/FormGroup/index.d.ts +1 -1
  5. package/dist/cjs/types/components/SearchInput/index.d.ts +11 -0
  6. package/dist/cjs/types/components/Select/index.d.ts +114 -0
  7. package/dist/cjs/types/components/index.d.ts +2 -0
  8. package/dist/cjs/types/index.d.ts +1 -0
  9. package/dist/cjs/types/theme/components/{Badge.d.ts → badge.d.ts} +2 -1
  10. package/dist/{esm/types/theme/components/Button.d.ts → cjs/types/theme/components/button.d.ts} +2 -1
  11. package/dist/cjs/types/theme/components/index.d.ts +4 -0
  12. package/dist/{esm/types/theme/components/Input.d.ts → cjs/types/theme/components/input.d.ts} +2 -1
  13. package/dist/{esm/types/theme/components/Tag.d.ts → cjs/types/theme/components/tag.d.ts} +2 -1
  14. package/dist/cjs/types/theme/foundations/index.d.ts +86 -0
  15. package/dist/cjs/types/theme/index.d.ts +1 -1
  16. package/dist/cjs/types/theme/theme.d.ts +1 -0
  17. package/dist/esm/index.js +42209 -2671
  18. package/dist/esm/index.js.map +1 -1
  19. package/dist/esm/types/components/FormGroup/index.d.ts +1 -1
  20. package/dist/esm/types/components/SearchInput/index.d.ts +11 -0
  21. package/dist/esm/types/components/Select/index.d.ts +114 -0
  22. package/dist/esm/types/components/index.d.ts +2 -0
  23. package/dist/esm/types/index.d.ts +1 -0
  24. package/dist/esm/types/theme/components/{Badge.d.ts → badge.d.ts} +2 -1
  25. package/dist/{cjs/types/theme/components/Button.d.ts → esm/types/theme/components/button.d.ts} +2 -1
  26. package/dist/esm/types/theme/components/index.d.ts +4 -0
  27. package/dist/{cjs/types/theme/components/Input.d.ts → esm/types/theme/components/input.d.ts} +2 -1
  28. package/dist/{cjs/types/theme/components/Tag.d.ts → esm/types/theme/components/tag.d.ts} +2 -1
  29. package/dist/esm/types/theme/foundations/index.d.ts +86 -0
  30. package/dist/esm/types/theme/index.d.ts +1 -1
  31. package/dist/esm/types/theme/theme.d.ts +1 -0
  32. package/dist/index.d.ts +134 -3
  33. package/package.json +13 -8
@@ -4,7 +4,7 @@ export declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaul
4
4
  children?: ReactNode;
5
5
  errorMessage?: ReactNode;
6
6
  helper?: ReactNode;
7
- id: string;
7
+ id?: string;
8
8
  isRequired?: boolean;
9
9
  label?: ReactNode;
10
10
  showError?: boolean;
@@ -0,0 +1,11 @@
1
+ import { InputProps } from '@chakra-ui/react';
2
+ declare type CustomProps = {
3
+ value?: string;
4
+ defaultValue?: string;
5
+ onChange?(value?: string): void;
6
+ delay?: number;
7
+ clearLabel?: string;
8
+ };
9
+ declare type SearchInputProps = Overwrite<InputProps, CustomProps>;
10
+ export declare const SearchInput: import("@chakra-ui/react").ComponentWithAs<"input", SearchInputProps>;
11
+ export {};
@@ -0,0 +1,114 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { BoxProps } from '@chakra-ui/react';
3
+ import { GroupBase, Props } from 'react-select';
4
+ declare module 'react' {
5
+ function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
6
+ }
7
+ export declare type SelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = {
8
+ isAsync?: boolean;
9
+ isCreatable?: boolean;
10
+ isError?: boolean;
11
+ size?: string;
12
+ formatCreateLabel?: (inputValue: string) => ReactNode;
13
+ loadOptions?: (input: unknown) => TODO;
14
+ defaultOptions?: unknown | boolean;
15
+ debounceDelay?: number;
16
+ } & Props<Option, IsMulti, Group> & Omit<BoxProps, 'defaultValue'>;
17
+ export declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: {
18
+ isAsync?: boolean | undefined;
19
+ isCreatable?: boolean | undefined;
20
+ isError?: boolean | undefined;
21
+ size?: string | undefined;
22
+ formatCreateLabel?: ((inputValue: string) => ReactNode) | undefined;
23
+ loadOptions?: ((input: unknown) => TODO) | undefined;
24
+ defaultOptions?: unknown | boolean;
25
+ debounceDelay?: number | undefined;
26
+ } & 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
+ placeholder?: React.ReactNode;
28
+ tabIndex?: number | undefined;
29
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
30
+ isLoading?: boolean | undefined;
31
+ isDisabled?: boolean | undefined;
32
+ components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
33
+ pageSize?: number | undefined;
34
+ backspaceRemovesValue?: boolean | undefined;
35
+ blurInputOnSelect?: boolean | undefined;
36
+ captureMenuScroll?: boolean | undefined;
37
+ closeMenuOnSelect?: boolean | undefined;
38
+ closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
39
+ controlShouldRenderValue?: boolean | undefined;
40
+ escapeClearsValue?: boolean | undefined;
41
+ filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
42
+ formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
43
+ getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
44
+ getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
45
+ isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
46
+ isMulti?: IsMulti | undefined;
47
+ isRtl?: boolean | undefined;
48
+ isSearchable?: boolean | undefined;
49
+ loadingMessage?: ((obj: {
50
+ inputValue: string;
51
+ }) => React.ReactNode) | undefined;
52
+ minMenuHeight?: number | undefined;
53
+ maxMenuHeight?: number | undefined;
54
+ menuIsOpen?: boolean | undefined;
55
+ menuPlacement?: import("react-select").MenuPlacement | undefined;
56
+ menuPosition?: import("react-select").MenuPosition | undefined;
57
+ menuShouldBlockScroll?: boolean | undefined;
58
+ menuShouldScrollIntoView?: boolean | undefined;
59
+ noOptionsMessage?: ((obj: {
60
+ inputValue: string;
61
+ }) => React.ReactNode) | undefined;
62
+ openMenuOnFocus?: boolean | undefined;
63
+ openMenuOnClick?: boolean | undefined;
64
+ options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
65
+ screenReaderStatus?: ((obj: {
66
+ count: number;
67
+ }) => string) | undefined;
68
+ styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
69
+ tabSelectsValue?: boolean | undefined;
70
+ } & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<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"> & {
71
+ placeholder?: React.ReactNode;
72
+ tabIndex?: number | undefined;
73
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
74
+ isLoading?: boolean | undefined;
75
+ isDisabled?: boolean | undefined;
76
+ components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
77
+ pageSize?: number | undefined;
78
+ backspaceRemovesValue?: boolean | undefined;
79
+ blurInputOnSelect?: boolean | undefined;
80
+ captureMenuScroll?: boolean | undefined;
81
+ closeMenuOnSelect?: boolean | undefined;
82
+ closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
83
+ controlShouldRenderValue?: boolean | undefined;
84
+ escapeClearsValue?: boolean | undefined;
85
+ filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
86
+ formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
87
+ getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
88
+ getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
89
+ isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
90
+ isMulti?: IsMulti | undefined;
91
+ isRtl?: boolean | undefined;
92
+ isSearchable?: boolean | undefined;
93
+ loadingMessage?: ((obj: {
94
+ inputValue: string;
95
+ }) => React.ReactNode) | undefined;
96
+ minMenuHeight?: number | undefined;
97
+ maxMenuHeight?: number | undefined;
98
+ menuIsOpen?: boolean | undefined;
99
+ menuPlacement?: import("react-select").MenuPlacement | undefined;
100
+ menuPosition?: import("react-select").MenuPosition | undefined;
101
+ menuShouldBlockScroll?: boolean | undefined;
102
+ menuShouldScrollIntoView?: boolean | undefined;
103
+ noOptionsMessage?: ((obj: {
104
+ inputValue: string;
105
+ }) => React.ReactNode) | undefined;
106
+ openMenuOnFocus?: boolean | undefined;
107
+ openMenuOnClick?: boolean | undefined;
108
+ options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
109
+ screenReaderStatus?: ((obj: {
110
+ count: number;
111
+ }) => string) | undefined;
112
+ styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
113
+ tabSelectsValue?: boolean | undefined;
114
+ } & {}> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
@@ -2,3 +2,5 @@ export * from './ActionsButton';
2
2
  export * from './DataList';
3
3
  export * from './FormGroup';
4
4
  export * from './Pagination';
5
+ export * from './SearchInput';
6
+ export * from './Select';
@@ -1 +1,2 @@
1
1
  export * from './components';
2
+ export * from './theme';
@@ -1,7 +1,8 @@
1
- export declare const Badge: {
1
+ declare const _default: {
2
2
  baseStyle: {
3
3
  borderRadius: string;
4
4
  fontWeight: string;
5
5
  paddingX: number;
6
6
  };
7
7
  };
8
+ export default _default;
@@ -1,4 +1,4 @@
1
- export declare const Button: {
1
+ declare const _default: {
2
2
  baseStyle: {
3
3
  borderRadius: string;
4
4
  fontWeight: string;
@@ -138,3 +138,4 @@ export declare const Button: {
138
138
  };
139
139
  };
140
140
  };
141
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export { default as Badge } from './badge';
2
+ export { default as Button } from './button';
3
+ export { default as Input } from './input';
4
+ export { default as Tag } from './tag';
@@ -1,4 +1,4 @@
1
- export declare const Input: {
1
+ declare const _default: {
2
2
  baseStyle: {
3
3
  field: {
4
4
  borderRadius: string;
@@ -45,3 +45,4 @@ export declare const Input: {
45
45
  };
46
46
  };
47
47
  };
48
+ export default _default;
@@ -1,4 +1,4 @@
1
- export declare const Tag: {
1
+ declare const _default: {
2
2
  baseStyle: {
3
3
  container: {
4
4
  borderRadius: string;
@@ -6,3 +6,4 @@ export declare const Tag: {
6
6
  };
7
7
  };
8
8
  };
9
+ export default _default;
@@ -0,0 +1,86 @@
1
+ declare const foundations: {
2
+ shadows: {
3
+ xs: string;
4
+ sm: string;
5
+ base: string;
6
+ md: string;
7
+ lg: string;
8
+ xl: string;
9
+ '2xl': string;
10
+ layout: string;
11
+ };
12
+ fonts: {
13
+ heading: string;
14
+ body: string;
15
+ mono: string;
16
+ };
17
+ fontSizes: {
18
+ '2xs': string;
19
+ };
20
+ colors: {
21
+ brand: {
22
+ 50: string;
23
+ 100: string;
24
+ 200: string;
25
+ 300: string;
26
+ 400: string;
27
+ 500: string;
28
+ 600: string;
29
+ 700: string;
30
+ 800: string;
31
+ 900: string;
32
+ };
33
+ gray: {
34
+ 50: string;
35
+ 100: string;
36
+ 200: string;
37
+ 300: string;
38
+ 400: string;
39
+ 500: string;
40
+ 600: string;
41
+ 700: string;
42
+ 800: string;
43
+ 900: string;
44
+ };
45
+ red: {
46
+ 50: string;
47
+ 100: string;
48
+ 200: string;
49
+ 300: string;
50
+ 400: string;
51
+ 500: string;
52
+ 600: string;
53
+ 700: string;
54
+ 800: string;
55
+ 900: string;
56
+ };
57
+ orange: {
58
+ 50: string;
59
+ 100: string;
60
+ 200: string;
61
+ 300: string;
62
+ 400: string;
63
+ 500: string;
64
+ 600: string;
65
+ 700: string;
66
+ 800: string;
67
+ 900: string;
68
+ };
69
+ green: {
70
+ 50: string;
71
+ 100: string;
72
+ 200: string;
73
+ 300: string;
74
+ 400: string;
75
+ 500: string;
76
+ 600: string;
77
+ 700: string;
78
+ 800: string;
79
+ 900: string;
80
+ };
81
+ gradients: {
82
+ primary: string;
83
+ };
84
+ };
85
+ };
86
+ export default foundations;
@@ -1 +1 @@
1
- export declare const theme: unknown;
1
+ export * from './theme';
@@ -0,0 +1 @@
1
+ export declare const theme: any;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,12 @@
1
1
  import React, { FC, ReactNode } from 'react';
2
- import { IconButtonProps, FlexProps, AccordionProps, FormControlProps, StackProps } from '@chakra-ui/react';
2
+ import * as _chakra_ui_react from '@chakra-ui/react';
3
+ import { IconButtonProps, FlexProps, AccordionProps, FormControlProps, StackProps, InputProps, BoxProps } from '@chakra-ui/react';
4
+ import * as react_select_dist_declarations_src_useStateManager from 'react-select/dist/declarations/src/useStateManager';
5
+ import * as react_select from 'react-select';
6
+ import { GroupBase, Props } from 'react-select';
7
+ import * as react_select_dist_declarations_src_filters from 'react-select/dist/declarations/src/filters';
8
+ import * as react_select_dist_declarations_src_components from 'react-select/dist/declarations/src/components';
9
+ import * as react_select_dist_declarations_src_Select from 'react-select/dist/declarations/src/Select';
3
10
 
4
11
  declare type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
5
12
  label: string;
@@ -50,7 +57,7 @@ declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue'
50
57
  children?: ReactNode;
51
58
  errorMessage?: ReactNode;
52
59
  helper?: ReactNode;
53
- id: string;
60
+ id?: string;
54
61
  isRequired?: boolean;
55
62
  label?: ReactNode;
56
63
  showError?: boolean;
@@ -99,4 +106,128 @@ declare type PaginationProps = StackProps & {
99
106
  };
100
107
  declare const Pagination: ({ setPage, page, pageSize, totalItems, isLoadingPage, ...rest }: PaginationProps) => JSX.Element;
101
108
 
102
- 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, getPaginationInfo };
109
+ declare type CustomProps = {
110
+ value?: string;
111
+ defaultValue?: string;
112
+ onChange?(value?: string): void;
113
+ delay?: number;
114
+ clearLabel?: string;
115
+ };
116
+ declare type SearchInputProps = Overwrite<InputProps, CustomProps>;
117
+ declare const SearchInput: _chakra_ui_react.ComponentWithAs<"input", SearchInputProps>;
118
+
119
+ declare module 'react' {
120
+ function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
121
+ }
122
+ declare type SelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = {
123
+ isAsync?: boolean;
124
+ isCreatable?: boolean;
125
+ isError?: boolean;
126
+ size?: string;
127
+ formatCreateLabel?: (inputValue: string) => ReactNode;
128
+ loadOptions?: (input: unknown) => TODO;
129
+ defaultOptions?: unknown | boolean;
130
+ debounceDelay?: number;
131
+ } & Props<Option, IsMulti, Group> & Omit<BoxProps, 'defaultValue'>;
132
+ declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: {
133
+ isAsync?: boolean | undefined;
134
+ isCreatable?: boolean | undefined;
135
+ isError?: boolean | undefined;
136
+ size?: string | undefined;
137
+ formatCreateLabel?: ((inputValue: string) => ReactNode) | undefined;
138
+ loadOptions?: ((input: unknown) => TODO) | undefined;
139
+ defaultOptions?: unknown | boolean;
140
+ debounceDelay?: number | undefined;
141
+ } & 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
+ placeholder?: React.ReactNode;
143
+ tabIndex?: number | undefined;
144
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
145
+ isLoading?: boolean | undefined;
146
+ isDisabled?: boolean | undefined;
147
+ components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
148
+ pageSize?: number | undefined;
149
+ backspaceRemovesValue?: boolean | undefined;
150
+ blurInputOnSelect?: boolean | undefined;
151
+ captureMenuScroll?: boolean | undefined;
152
+ closeMenuOnSelect?: boolean | undefined;
153
+ closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
154
+ controlShouldRenderValue?: boolean | undefined;
155
+ escapeClearsValue?: boolean | undefined;
156
+ filterOption?: ((option: react_select_dist_declarations_src_filters.FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
157
+ formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
158
+ getOptionLabel?: react_select.GetOptionLabel<Option> | undefined;
159
+ getOptionValue?: react_select.GetOptionValue<Option> | undefined;
160
+ isOptionDisabled?: ((option: Option, selectValue: react_select.Options<Option>) => boolean) | undefined;
161
+ isMulti?: IsMulti | undefined;
162
+ isRtl?: boolean | undefined;
163
+ isSearchable?: boolean | undefined;
164
+ loadingMessage?: ((obj: {
165
+ inputValue: string;
166
+ }) => React.ReactNode) | undefined;
167
+ minMenuHeight?: number | undefined;
168
+ maxMenuHeight?: number | undefined;
169
+ menuIsOpen?: boolean | undefined;
170
+ menuPlacement?: react_select.MenuPlacement | undefined;
171
+ menuPosition?: react_select.MenuPosition | undefined;
172
+ menuShouldBlockScroll?: boolean | undefined;
173
+ menuShouldScrollIntoView?: boolean | undefined;
174
+ noOptionsMessage?: ((obj: {
175
+ inputValue: string;
176
+ }) => React.ReactNode) | undefined;
177
+ openMenuOnFocus?: boolean | undefined;
178
+ openMenuOnClick?: boolean | undefined;
179
+ options?: react_select.OptionsOrGroups<Option, Group> | undefined;
180
+ screenReaderStatus?: ((obj: {
181
+ count: number;
182
+ }) => string) | undefined;
183
+ styles?: react_select.StylesConfig<Option, IsMulti, Group> | undefined;
184
+ tabSelectsValue?: boolean | undefined;
185
+ } & {}, "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"> & {
186
+ placeholder?: React.ReactNode;
187
+ tabIndex?: number | undefined;
188
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
189
+ isLoading?: boolean | undefined;
190
+ isDisabled?: boolean | undefined;
191
+ components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
192
+ pageSize?: number | undefined;
193
+ backspaceRemovesValue?: boolean | undefined;
194
+ blurInputOnSelect?: boolean | undefined;
195
+ captureMenuScroll?: boolean | undefined;
196
+ closeMenuOnSelect?: boolean | undefined;
197
+ closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
198
+ controlShouldRenderValue?: boolean | undefined;
199
+ escapeClearsValue?: boolean | undefined;
200
+ filterOption?: ((option: react_select_dist_declarations_src_filters.FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
201
+ formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
202
+ getOptionLabel?: react_select.GetOptionLabel<Option> | undefined;
203
+ getOptionValue?: react_select.GetOptionValue<Option> | undefined;
204
+ isOptionDisabled?: ((option: Option, selectValue: react_select.Options<Option>) => boolean) | undefined;
205
+ isMulti?: IsMulti | undefined;
206
+ isRtl?: boolean | undefined;
207
+ isSearchable?: boolean | undefined;
208
+ loadingMessage?: ((obj: {
209
+ inputValue: string;
210
+ }) => React.ReactNode) | undefined;
211
+ minMenuHeight?: number | undefined;
212
+ maxMenuHeight?: number | undefined;
213
+ menuIsOpen?: boolean | undefined;
214
+ menuPlacement?: react_select.MenuPlacement | undefined;
215
+ menuPosition?: react_select.MenuPosition | undefined;
216
+ menuShouldBlockScroll?: boolean | undefined;
217
+ menuShouldScrollIntoView?: boolean | undefined;
218
+ noOptionsMessage?: ((obj: {
219
+ inputValue: string;
220
+ }) => React.ReactNode) | undefined;
221
+ openMenuOnFocus?: boolean | undefined;
222
+ openMenuOnClick?: boolean | undefined;
223
+ options?: react_select.OptionsOrGroups<Option, Group> | undefined;
224
+ screenReaderStatus?: ((obj: {
225
+ count: number;
226
+ }) => string) | undefined;
227
+ styles?: react_select.StylesConfig<Option, IsMulti, Group> | undefined;
228
+ tabSelectsValue?: boolean | undefined;
229
+ } & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
230
+
231
+ declare const theme: any;
232
+
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 };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@paygreen/pgui",
3
- "version": "2.1.1",
4
- "description": "PGUI is the design system coming grom Paygreen.",
3
+ "version": "2.1.2",
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 /home/philippe.chevreul@paygreen.ad/Documents/paygreen/app.paygreen.fr/node_modules/@chakra-ui/react",
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
+ "dayjs": "^1.11.4",
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",
@@ -80,14 +83,16 @@
80
83
  "prettier": "^2.7.1",
81
84
  "react": "^18.2.0",
82
85
  "react-dom": "^18.2.0",
86
+ "react-focus-lock": "^2.9.1",
83
87
  "react-icons": "^4.4.0",
88
+ "react-select": "^5.4.0",
84
89
  "rollup": "^2.77.0",
85
90
  "rollup-plugin-dts": "^4.2.2",
86
91
  "rollup-plugin-node-externals": "^4.1.1",
87
92
  "rollup-plugin-peer-deps-external": "^2.2.4",
93
+ "rollup-plugin-postcss": "^4.0.2",
88
94
  "rollup-plugin-terser": "^7.0.2",
89
- "typescript": "^4.7.4",
90
- "eslint-config-airbnb-base": "^15.0.0",
91
- "eslint-config-airbnb-typescript": "^17.0.0"
95
+ "sass": "^1.53.0",
96
+ "typescript": "^4.7.4"
92
97
  }
93
- }
98
+ }