@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;