@paygreen/pgui 2.10.0 → 2.11.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.
Files changed (28) hide show
  1. package/dist/cjs/index.js +318 -117
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/Card/index.d.ts +1 -0
  4. package/dist/cjs/types/components/ConfirmMenuItem/index.d.ts +12 -3
  5. package/dist/cjs/types/components/DayPicker/index.d.ts +1 -1
  6. package/dist/cjs/types/components/InputDayPicker/index.d.ts +2 -2
  7. package/dist/cjs/types/components/SearchInput/index.d.ts +12 -1
  8. package/dist/cjs/types/components/Select/index.d.ts +10 -10
  9. package/dist/cjs/types/components/Textarea/index.d.ts +6 -1
  10. package/dist/cjs/types/layout/BottomBar/index.d.ts +1 -0
  11. package/dist/cjs/types/layout/LayoutContainer/index.d.ts +1 -0
  12. package/dist/cjs/types/layout/TopBar/index.d.ts +1 -1
  13. package/dist/cjs/types/theme/theme.d.ts +1 -1
  14. package/dist/esm/index.js +319 -118
  15. package/dist/esm/index.js.map +1 -1
  16. package/dist/esm/types/components/Card/index.d.ts +1 -0
  17. package/dist/esm/types/components/ConfirmMenuItem/index.d.ts +12 -3
  18. package/dist/esm/types/components/DayPicker/index.d.ts +1 -1
  19. package/dist/esm/types/components/InputDayPicker/index.d.ts +2 -2
  20. package/dist/esm/types/components/SearchInput/index.d.ts +12 -1
  21. package/dist/esm/types/components/Select/index.d.ts +10 -10
  22. package/dist/esm/types/components/Textarea/index.d.ts +6 -1
  23. package/dist/esm/types/layout/BottomBar/index.d.ts +1 -0
  24. package/dist/esm/types/layout/LayoutContainer/index.d.ts +1 -0
  25. package/dist/esm/types/layout/TopBar/index.d.ts +1 -1
  26. package/dist/esm/types/theme/theme.d.ts +1 -1
  27. package/dist/index.d.ts +47 -30
  28. package/package.json +52 -51
@@ -1,2 +1,3 @@
1
1
  import React from 'react';
2
+ import { CardProps } from '@chakra-ui/react';
2
3
  export declare const Card: (props: CardProps) => React.JSX.Element;
@@ -1,4 +1,13 @@
1
- import { HTMLChakraProps } from '@chakra-ui/react';
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: any;
4
- export declare const ConfirmMenuItem: any;
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
- } & InputProps;
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
- export declare const SearchInput: any;
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,27 @@ 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" | "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"> & {
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"> & {
29
+ tabIndex?: number | undefined;
30
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
31
+ isLoading?: boolean | undefined;
29
32
  isDisabled?: boolean | undefined;
33
+ components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
30
34
  placeholder?: React.ReactNode;
31
35
  options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
32
36
  pageSize?: number | undefined;
33
- 'aria-live'?: "off" | "assertive" | "polite" | undefined;
34
37
  backspaceRemovesValue?: boolean | undefined;
35
38
  blurInputOnSelect?: boolean | undefined;
36
39
  captureMenuScroll?: boolean | undefined;
37
40
  classNames?: import("react-select").ClassNamesConfig<Option, IsMulti, Group> | undefined;
38
41
  closeMenuOnSelect?: boolean | undefined;
39
42
  closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
40
- components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
41
43
  controlShouldRenderValue?: boolean | undefined;
42
44
  escapeClearsValue?: boolean | undefined;
43
45
  filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
44
46
  formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
45
47
  getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
46
48
  getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
47
- isLoading?: boolean | undefined;
48
49
  isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
49
50
  isMulti?: IsMulti | undefined;
50
51
  isRtl?: boolean | undefined;
@@ -68,29 +69,29 @@ export declare const Select: <Option, IsMulti extends boolean = false, Group ext
68
69
  count: number;
69
70
  }) => string) | undefined;
70
71
  styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
71
- tabIndex?: number | undefined;
72
72
  tabSelectsValue?: boolean | undefined;
73
73
  unstyled?: 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" | "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"> & {
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"> & {
75
+ tabIndex?: number | undefined;
76
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
77
+ isLoading?: boolean | undefined;
75
78
  isDisabled?: boolean | undefined;
79
+ components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
76
80
  placeholder?: React.ReactNode;
77
81
  options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
78
82
  pageSize?: number | undefined;
79
- 'aria-live'?: "off" | "assertive" | "polite" | undefined;
80
83
  backspaceRemovesValue?: boolean | undefined;
81
84
  blurInputOnSelect?: boolean | undefined;
82
85
  captureMenuScroll?: boolean | undefined;
83
86
  classNames?: import("react-select").ClassNamesConfig<Option, IsMulti, Group> | undefined;
84
87
  closeMenuOnSelect?: boolean | undefined;
85
88
  closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
86
- components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
87
89
  controlShouldRenderValue?: boolean | undefined;
88
90
  escapeClearsValue?: boolean | undefined;
89
91
  filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
90
92
  formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
91
93
  getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
92
94
  getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
93
- isLoading?: boolean | undefined;
94
95
  isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
95
96
  isMulti?: IsMulti | undefined;
96
97
  isRtl?: boolean | undefined;
@@ -114,7 +115,6 @@ export declare const Select: <Option, IsMulti extends boolean = false, Group ext
114
115
  count: number;
115
116
  }) => string) | undefined;
116
117
  styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
117
- tabIndex?: number | undefined;
118
118
  tabSelectsValue?: boolean | undefined;
119
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 }: any) => React.JSX.Element;
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,2 +1,3 @@
1
1
  import React from 'react';
2
+ import { FlexProps } from '@chakra-ui/react';
2
3
  export declare const BottomBar: (props: FlexProps) => React.JSX.Element;
@@ -1,2 +1,3 @@
1
1
  import React from 'react';
2
+ import { FlexProps } from '@chakra-ui/react';
2
3
  export declare const LayoutContainer: (props: FlexProps) => 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>;