@paygreen/pgui 2.10.0 → 2.10.1

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 +229 -108
  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 +14 -14
  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 +230 -109
  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 +14 -14
  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 +51 -34
  28. package/package.json +2 -1
@@ -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,28 @@ 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"> & {
29
- isDisabled?: boolean | undefined;
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"> & {
30
29
  placeholder?: React.ReactNode;
30
+ tabIndex?: number | undefined;
31
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
32
+ isLoading?: boolean | undefined;
33
+ isDisabled?: boolean | undefined;
34
+ components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
35
+ unstyled?: boolean | undefined;
31
36
  options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
32
37
  pageSize?: number | undefined;
33
- 'aria-live'?: "off" | "assertive" | "polite" | undefined;
34
38
  backspaceRemovesValue?: boolean | undefined;
35
39
  blurInputOnSelect?: boolean | undefined;
36
40
  captureMenuScroll?: boolean | undefined;
37
41
  classNames?: import("react-select").ClassNamesConfig<Option, IsMulti, Group> | undefined;
38
42
  closeMenuOnSelect?: boolean | undefined;
39
43
  closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
40
- components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
41
44
  controlShouldRenderValue?: boolean | undefined;
42
45
  escapeClearsValue?: boolean | undefined;
43
46
  filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
44
47
  formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
45
48
  getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
46
49
  getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
47
- isLoading?: boolean | undefined;
48
50
  isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
49
51
  isMulti?: IsMulti | undefined;
50
52
  isRtl?: boolean | undefined;
@@ -68,29 +70,29 @@ export declare const Select: <Option, IsMulti extends boolean = false, Group ext
68
70
  count: number;
69
71
  }) => string) | undefined;
70
72
  styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
71
- tabIndex?: number | undefined;
72
73
  tabSelectsValue?: boolean | undefined;
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"> & {
75
- isDisabled?: 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" | "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"> & {
76
75
  placeholder?: React.ReactNode;
76
+ tabIndex?: number | undefined;
77
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
78
+ isLoading?: boolean | undefined;
79
+ isDisabled?: boolean | undefined;
80
+ components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
81
+ unstyled?: boolean | undefined;
77
82
  options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
78
83
  pageSize?: number | undefined;
79
- 'aria-live'?: "off" | "assertive" | "polite" | undefined;
80
84
  backspaceRemovesValue?: boolean | undefined;
81
85
  blurInputOnSelect?: boolean | undefined;
82
86
  captureMenuScroll?: boolean | undefined;
83
87
  classNames?: import("react-select").ClassNamesConfig<Option, IsMulti, Group> | undefined;
84
88
  closeMenuOnSelect?: boolean | undefined;
85
89
  closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
86
- components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
87
90
  controlShouldRenderValue?: boolean | undefined;
88
91
  escapeClearsValue?: boolean | undefined;
89
92
  filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
90
93
  formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
91
94
  getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
92
95
  getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
93
- isLoading?: boolean | undefined;
94
96
  isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
95
97
  isMulti?: IsMulti | undefined;
96
98
  isRtl?: boolean | undefined;
@@ -114,7 +116,5 @@ export declare const Select: <Option, IsMulti extends boolean = false, Group ext
114
116
  count: number;
115
117
  }) => string) | undefined;
116
118
  styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
117
- tabIndex?: number | undefined;
118
119
  tabSelectsValue?: boolean | undefined;
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>;