@paygreen/pgui 2.1.2 → 2.3.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 (68) hide show
  1. package/dist/cjs/index.js +8844 -135
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/ActionsButton/index.d.ts +2 -2
  4. package/dist/cjs/types/components/Card/index.d.ts +3 -0
  5. package/dist/cjs/types/components/ConfirmMenuItem/index.d.ts +13 -0
  6. package/dist/cjs/types/components/DataList/index.d.ts +5 -5
  7. package/dist/cjs/types/components/DayPicker/index.d.ts +3 -0
  8. package/dist/cjs/types/components/InputDayPicker/index.d.ts +16 -0
  9. package/dist/cjs/types/components/Pagination/index.d.ts +5 -5
  10. package/dist/cjs/types/components/Select/index.d.ts +2 -0
  11. package/dist/cjs/types/components/index.d.ts +4 -0
  12. package/dist/cjs/types/index.d.ts +2 -0
  13. package/dist/cjs/types/layout/BottomBar/index.d.ts +3 -0
  14. package/dist/cjs/types/layout/LayoutContainer/index.d.ts +3 -0
  15. package/dist/cjs/types/layout/SideNav/index.d.ts +19 -0
  16. package/dist/cjs/types/layout/TopBar/index.d.ts +10 -0
  17. package/dist/cjs/types/layout/index.d.ts +4 -0
  18. package/dist/cjs/types/theme/components/button.d.ts +0 -6
  19. package/dist/cjs/types/theme/components/drawer.d.ts +6 -0
  20. package/dist/cjs/types/theme/components/index.d.ts +1 -0
  21. package/dist/cjs/types/theme/externals-css.d.ts +1 -0
  22. package/dist/cjs/types/theme/foundations/colors.d.ts +1 -0
  23. package/dist/cjs/types/theme/foundations/index.d.ts +32 -0
  24. package/dist/cjs/types/theme/foundations/radius.d.ts +11 -0
  25. package/dist/cjs/types/theme/foundations/sizes.d.ts +21 -0
  26. package/dist/cjs/types/theme/index.d.ts +1 -0
  27. package/dist/cjs/types/theme/rawStyle/chakraStyle.d.ts +2 -0
  28. package/dist/cjs/types/theme/rawStyle/index.d.ts +2 -0
  29. package/dist/cjs/types/theme/rawStyle/reactDayPicker.d.ts +2 -0
  30. package/dist/cjs/types/theme/styles.d.ts +2 -0
  31. package/dist/cjs/types/utils/date.d.ts +1 -0
  32. package/dist/cjs/types/utils/index.d.ts +2 -0
  33. package/dist/cjs/types/utils/responsive.d.ts +1 -0
  34. package/dist/esm/index.js +8827 -138
  35. package/dist/esm/index.js.map +1 -1
  36. package/dist/esm/types/components/ActionsButton/index.d.ts +2 -2
  37. package/dist/esm/types/components/Card/index.d.ts +3 -0
  38. package/dist/esm/types/components/ConfirmMenuItem/index.d.ts +13 -0
  39. package/dist/esm/types/components/DataList/index.d.ts +5 -5
  40. package/dist/esm/types/components/DayPicker/index.d.ts +3 -0
  41. package/dist/esm/types/components/InputDayPicker/index.d.ts +16 -0
  42. package/dist/esm/types/components/Pagination/index.d.ts +5 -5
  43. package/dist/esm/types/components/Select/index.d.ts +2 -0
  44. package/dist/esm/types/components/index.d.ts +4 -0
  45. package/dist/esm/types/index.d.ts +2 -0
  46. package/dist/esm/types/layout/BottomBar/index.d.ts +3 -0
  47. package/dist/esm/types/layout/LayoutContainer/index.d.ts +3 -0
  48. package/dist/esm/types/layout/SideNav/index.d.ts +19 -0
  49. package/dist/esm/types/layout/TopBar/index.d.ts +10 -0
  50. package/dist/esm/types/layout/index.d.ts +4 -0
  51. package/dist/esm/types/theme/components/button.d.ts +0 -6
  52. package/dist/esm/types/theme/components/drawer.d.ts +6 -0
  53. package/dist/esm/types/theme/components/index.d.ts +1 -0
  54. package/dist/esm/types/theme/externals-css.d.ts +1 -0
  55. package/dist/esm/types/theme/foundations/colors.d.ts +1 -0
  56. package/dist/esm/types/theme/foundations/index.d.ts +32 -0
  57. package/dist/esm/types/theme/foundations/radius.d.ts +11 -0
  58. package/dist/esm/types/theme/foundations/sizes.d.ts +21 -0
  59. package/dist/esm/types/theme/index.d.ts +1 -0
  60. package/dist/esm/types/theme/rawStyle/chakraStyle.d.ts +2 -0
  61. package/dist/esm/types/theme/rawStyle/index.d.ts +2 -0
  62. package/dist/esm/types/theme/rawStyle/reactDayPicker.d.ts +2 -0
  63. package/dist/esm/types/theme/styles.d.ts +2 -0
  64. package/dist/esm/types/utils/date.d.ts +1 -0
  65. package/dist/esm/types/utils/index.d.ts +2 -0
  66. package/dist/esm/types/utils/responsive.d.ts +1 -0
  67. package/dist/index.d.ts +80 -12
  68. package/package.json +3 -2
@@ -1,6 +1,6 @@
1
- import React, { FC } from 'react';
1
+ import { FC, PropsWithChildren } from 'react';
2
2
  import { IconButtonProps } from '@chakra-ui/react';
3
3
  export declare type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
4
4
  label: string;
5
5
  };
6
- export declare const ActionsButton: FC<React.PropsWithChildren<ActionsButtonProps>>;
6
+ export declare const ActionsButton: FC<PropsWithChildren<ActionsButtonProps>>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { FlexProps } from '@chakra-ui/react';
3
+ export declare const Card: (props: FlexProps) => JSX.Element;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { HTMLChakraProps, MenuItemProps } from '@chakra-ui/react';
3
+ export declare type StyledMenuItemProps = HTMLChakraProps<'button'>;
4
+ export declare const MenuItem: import("@chakra-ui/react").ComponentWithAs<"button", MenuItemProps>;
5
+ declare 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/react").ComponentWithAs<"button", ConfirmMenuItemProps>;
13
+ export {};
@@ -1,4 +1,4 @@
1
- import React, { FC } from 'react';
1
+ import React, { FC, PropsWithChildren } from 'react';
2
2
  import { AccordionProps, FlexProps } from '@chakra-ui/react';
3
3
  declare type DataListColumns = Record<string, DataListCellProps>;
4
4
  declare type DataListContextValue = {
@@ -30,13 +30,13 @@ export declare type DataListRowProps = FlexProps & {
30
30
  isVisible?: boolean | boolean[] | Record<string, boolean>;
31
31
  isDisabled?: boolean;
32
32
  };
33
- export declare const DataListRow: FC<React.PropsWithChildren<DataListRowProps>>;
33
+ export declare const DataListRow: FC<PropsWithChildren<DataListRowProps>>;
34
34
  export declare type DataListHeaderProps = DataListRowProps;
35
- export declare const DataListHeader: FC<React.PropsWithChildren<DataListHeaderProps>>;
35
+ export declare const DataListHeader: FC<PropsWithChildren<DataListHeaderProps>>;
36
36
  export declare type DataListFooterProps = DataListRowProps;
37
- export declare const DataListFooter: FC<React.PropsWithChildren<DataListFooterProps>>;
37
+ export declare const DataListFooter: FC<PropsWithChildren<DataListFooterProps>>;
38
38
  export declare type DataListProps = AccordionProps & {
39
39
  isHover?: boolean;
40
40
  };
41
- export declare const DataList: FC<React.PropsWithChildren<DataListProps>>;
41
+ export declare const DataList: FC<PropsWithChildren<DataListProps>>;
42
42
  export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DayPickerProps } from 'react-day-picker';
3
+ export declare const DayPicker: (props: DayPickerProps) => JSX.Element;
@@ -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;
@@ -1,4 +1,4 @@
1
- import React, { FC } from 'react';
1
+ import React, { FC, PropsWithChildren } from 'react';
2
2
  import { IconButtonProps, StackProps } from '@chakra-ui/react';
3
3
  export declare const getPaginationInfo: ({ page, pageSize, totalItems, }: {
4
4
  page?: number | undefined;
@@ -26,10 +26,10 @@ export declare type PaginationContextValue<PageType = number> = {
26
26
  lastItemOnPage: number;
27
27
  };
28
28
  export declare const PaginationContext: React.Context<PaginationContextValue<number>>;
29
- export declare const PaginationButtonFirstPage: FC<React.PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
30
- export declare const PaginationButtonPrevPage: FC<React.PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
31
- export declare const PaginationButtonLastPage: FC<React.PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
32
- export declare const PaginationButtonNextPage: FC<React.PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
29
+ export declare const PaginationButtonFirstPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
30
+ export declare const PaginationButtonPrevPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
31
+ export declare const PaginationButtonLastPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
32
+ export declare const PaginationButtonNextPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
33
33
  export declare const PaginationInfo: ({ ...rest }: {
34
34
  [x: string]: any;
35
35
  }) => 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;
@@ -1,6 +1,10 @@
1
1
  export * from './ActionsButton';
2
+ export * from './Card';
3
+ export * from './ConfirmMenuItem';
2
4
  export * from './DataList';
5
+ export * from './DayPicker';
3
6
  export * from './FormGroup';
7
+ export * from './InputDayPicker';
4
8
  export * from './Pagination';
5
9
  export * from './SearchInput';
6
10
  export * from './Select';
@@ -1,2 +1,4 @@
1
1
  export * from './components';
2
+ export * from './layout';
2
3
  export * from './theme';
4
+ export * from './utils';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { FlexProps } from '@chakra-ui/react';
3
+ export declare const BottomBar: (props: FlexProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { FlexProps } from '@chakra-ui/react';
3
+ export declare const LayoutContainer: (props: FlexProps) => JSX.Element;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { ButtonProps, DrawerContentProps, FlexProps, StackProps, TextProps } from '@chakra-ui/react';
3
+ export declare type SideNavProps = {
4
+ isMobileMenuOpen: boolean;
5
+ onMobileMenuClose: () => void;
6
+ } & FlexProps & DrawerContentProps;
7
+ export declare type SideNavMenuItemProps = {
8
+ isActive?: boolean;
9
+ } & ButtonProps;
10
+ export declare type SideNavMenuProps = {
11
+ textProps?: TextProps;
12
+ } & StackProps;
13
+ export declare const SideNav: ({ isMobileMenuOpen, onMobileMenuClose, children, ...props }: SideNavProps) => JSX.Element;
14
+ export declare const SideNavContainer: (props: StackProps) => JSX.Element;
15
+ export declare const SideNavHeader: ({ children, ...rest }: FlexProps) => JSX.Element;
16
+ export declare const SideNavBody: ({ children, ...rest }: StackProps) => JSX.Element;
17
+ export declare const SideNavFooter: ({ children, ...rest }: FlexProps) => JSX.Element;
18
+ export declare const SideNavMenu: ({ title, children, textProps, ...rest }: SideNavMenuProps) => JSX.Element;
19
+ export declare const SideNavMenuItem: ({ isActive, children, ...rest }: SideNavMenuItemProps) => JSX.Element;
@@ -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,4 @@
1
+ export * from './BottomBar';
2
+ export * from './LayoutContainer';
3
+ export * from './SideNav';
4
+ 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,6 @@
1
+ declare const _default: {
2
+ sizes: {
3
+ nav: Partial<Record<"body" | "dialog" | "footer" | "header" | "overlay" | "dialogContainer" | "closeButton", import("@chakra-ui/styled-system").CSSObject>>;
4
+ };
5
+ };
6
+ export default _default;
@@ -1,4 +1,5 @@
1
1
  export { default as Badge } from './badge';
2
2
  export { default as Button } from './button';
3
+ export { default as Drawer } from './drawer';
3
4
  export { default as Input } from './input';
4
5
  export { default as Tag } from './tag';
@@ -0,0 +1 @@
1
+ import 'react-day-picker/dist/style.css';
@@ -62,4 +62,5 @@ export declare const colors: {
62
62
  gradients: {
63
63
  primary: string;
64
64
  };
65
+ background: string;
65
66
  };
@@ -1,4 +1,24 @@
1
1
  declare const foundations: {
2
+ sizes: {
3
+ max: string;
4
+ min: string;
5
+ full: string;
6
+ '3xs': string;
7
+ '2xs': string;
8
+ xs: string;
9
+ nav: string;
10
+ sm: string;
11
+ md: string;
12
+ lg: string;
13
+ xl: string;
14
+ '2xl': string;
15
+ '3xl': string;
16
+ '4xl': string;
17
+ '5xl': string;
18
+ '6xl': string;
19
+ '7xl': string;
20
+ '8xl': string;
21
+ };
2
22
  shadows: {
3
23
  xs: string;
4
24
  sm: string;
@@ -9,6 +29,17 @@ declare const foundations: {
9
29
  '2xl': string;
10
30
  layout: string;
11
31
  };
32
+ radii: {
33
+ none: string;
34
+ sm: string;
35
+ base: string;
36
+ md: string;
37
+ lg: string;
38
+ xl: string;
39
+ '2xl': string;
40
+ '3xl': string;
41
+ full: string;
42
+ };
12
43
  fonts: {
13
44
  heading: string;
14
45
  body: string;
@@ -81,6 +112,7 @@ declare const foundations: {
81
112
  gradients: {
82
113
  primary: string;
83
114
  };
115
+ background: string;
84
116
  };
85
117
  };
86
118
  export default foundations;
@@ -0,0 +1,11 @@
1
+ export declare const radii: {
2
+ none: string;
3
+ sm: string;
4
+ base: string;
5
+ md: string;
6
+ lg: string;
7
+ xl: string;
8
+ '2xl': string;
9
+ '3xl': string;
10
+ full: string;
11
+ };
@@ -0,0 +1,21 @@
1
+ declare const _default: {
2
+ max: string;
3
+ min: string;
4
+ full: string;
5
+ '3xs': string;
6
+ '2xs': string;
7
+ xs: string;
8
+ nav: string;
9
+ sm: string;
10
+ md: string;
11
+ lg: string;
12
+ xl: string;
13
+ '2xl': string;
14
+ '3xl': string;
15
+ '4xl': string;
16
+ '5xl': string;
17
+ '6xl': string;
18
+ '7xl': string;
19
+ '8xl': string;
20
+ };
21
+ export default _default;
@@ -1 +1,2 @@
1
+ import './externals-css';
1
2
  export * from './theme';
@@ -0,0 +1,2 @@
1
+ import { Styles } from '@chakra-ui/theme-tools';
2
+ export declare const chakraStyle: Styles['global'];
@@ -0,0 +1,2 @@
1
+ export { chakraStyle } from './chakraStyle';
2
+ export { reactDayPicker } from './reactDayPicker';
@@ -0,0 +1,2 @@
1
+ import { Styles } from '@chakra-ui/theme-tools';
2
+ export declare const reactDayPicker: Styles['global'];
@@ -0,0 +1,2 @@
1
+ import { Styles } from '@chakra-ui/theme-tools';
2
+ export declare const styles: Styles;
@@ -0,0 +1 @@
1
+ export declare const dateFormat = "dd/MM/yyyy";
@@ -0,0 +1,2 @@
1
+ export * from './date';
2
+ export * from './responsive';
@@ -0,0 +1 @@
1
+ export declare const useIsMobile: (currentBreakpoint: string) => boolean;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
- import React, { FC, ReactNode } from 'react';
1
+ /// <reference types="react" />
2
+ import React, { FC, PropsWithChildren, ReactNode, Dispatch, SetStateAction, ReactComponentElement } from 'react';
2
3
  import * as _chakra_ui_react from '@chakra-ui/react';
3
- import { IconButtonProps, FlexProps, AccordionProps, FormControlProps, StackProps, InputProps, BoxProps } from '@chakra-ui/react';
4
+ import { IconButtonProps, FlexProps, HTMLChakraProps, MenuItemProps, AccordionProps, FormControlProps, PopoverProps, InputProps, StackProps, BoxProps, DrawerContentProps, ButtonProps, TextProps } 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';
@@ -11,7 +13,20 @@ import * as react_select_dist_declarations_src_Select from 'react-select/dist/de
11
13
  declare type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
12
14
  label: string;
13
15
  };
14
- declare const ActionsButton: FC<React.PropsWithChildren<ActionsButtonProps>>;
16
+ declare const ActionsButton: FC<PropsWithChildren<ActionsButtonProps>>;
17
+
18
+ declare const Card: (props: FlexProps) => JSX.Element;
19
+
20
+ declare type StyledMenuItemProps = HTMLChakraProps<'button'>;
21
+ declare const MenuItem: _chakra_ui_react.ComponentWithAs<"button", MenuItemProps>;
22
+ declare type ConfirmMenuItemProps = MenuItemProps & {
23
+ confirmDelay?: number;
24
+ confirmColorScheme?: string;
25
+ confirmContent?: React.ReactNode;
26
+ confirmText?: React.ReactNode;
27
+ confirmIcon?: React.FC<React.PropsWithChildren<unknown>>;
28
+ };
29
+ declare const ConfirmMenuItem: _chakra_ui_react.ComponentWithAs<"button", ConfirmMenuItemProps>;
15
30
 
16
31
  declare type DataListColumns = Record<string, DataListCellProps>;
17
32
  declare type DataListContextValue = {
@@ -43,15 +58,17 @@ declare type DataListRowProps = FlexProps & {
43
58
  isVisible?: boolean | boolean[] | Record<string, boolean>;
44
59
  isDisabled?: boolean;
45
60
  };
46
- declare const DataListRow: FC<React.PropsWithChildren<DataListRowProps>>;
61
+ declare const DataListRow: FC<PropsWithChildren<DataListRowProps>>;
47
62
  declare type DataListHeaderProps = DataListRowProps;
48
- declare const DataListHeader: FC<React.PropsWithChildren<DataListHeaderProps>>;
63
+ declare const DataListHeader: FC<PropsWithChildren<DataListHeaderProps>>;
49
64
  declare type DataListFooterProps = DataListRowProps;
50
- declare const DataListFooter: FC<React.PropsWithChildren<DataListFooterProps>>;
65
+ declare const DataListFooter: FC<PropsWithChildren<DataListFooterProps>>;
51
66
  declare type DataListProps = AccordionProps & {
52
67
  isHover?: boolean;
53
68
  };
54
- declare const DataList: FC<React.PropsWithChildren<DataListProps>>;
69
+ declare const DataList: FC<PropsWithChildren<DataListProps>>;
70
+
71
+ declare const DayPicker: (props: DayPickerProps) => JSX.Element;
55
72
 
56
73
  declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue' | 'label'> & {
57
74
  children?: ReactNode;
@@ -64,6 +81,20 @@ declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue'
64
81
  };
65
82
  declare const FormGroup: ({ children, errorMessage, helper, id, isRequired, label, showError, ...props }: FormGroupProps) => JSX.Element;
66
83
 
84
+ declare type SingleDayPickerProps = {
85
+ mode?: DaySelectionMode;
86
+ } & DayPickerSingleProps;
87
+ declare type InputDayPickerProps = {
88
+ isDisabled?: boolean;
89
+ popoverProps?: PopoverProps;
90
+ inputProps?: InputProps;
91
+ dayPickerProps?: SingleDayPickerProps;
92
+ dateFormat?: string;
93
+ value?: string | '';
94
+ onChange?: Dispatch<SetStateAction<string | undefined>>;
95
+ };
96
+ declare const InputDayPicker: ({ isDisabled, popoverProps, inputProps, dayPickerProps, dateFormat, value, onChange, }: InputDayPickerProps) => JSX.Element;
97
+
67
98
  declare const getPaginationInfo: ({ page, pageSize, totalItems, }: {
68
99
  page?: number | undefined;
69
100
  pageSize?: number | undefined;
@@ -90,10 +121,10 @@ declare type PaginationContextValue<PageType = number> = {
90
121
  lastItemOnPage: number;
91
122
  };
92
123
  declare const PaginationContext: React.Context<PaginationContextValue<number>>;
93
- declare const PaginationButtonFirstPage: FC<React.PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
94
- declare const PaginationButtonPrevPage: FC<React.PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
95
- declare const PaginationButtonLastPage: FC<React.PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
96
- declare const PaginationButtonNextPage: FC<React.PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
124
+ declare const PaginationButtonFirstPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
125
+ declare const PaginationButtonPrevPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
126
+ declare const PaginationButtonLastPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
127
+ declare const PaginationButtonNextPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
97
128
  declare const PaginationInfo: ({ ...rest }: {
98
129
  [x: string]: any;
99
130
  }) => JSX.Element;
@@ -128,6 +159,7 @@ declare type SelectProps<Option, IsMulti extends boolean = false, Group extends
128
159
  loadOptions?: (input: unknown) => TODO;
129
160
  defaultOptions?: unknown | boolean;
130
161
  debounceDelay?: number;
162
+ variant?: 'unstyled' | 'filled' | 'outlined';
131
163
  } & Props<Option, IsMulti, Group> & Omit<BoxProps, 'defaultValue'>;
132
164
  declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: {
133
165
  isAsync?: boolean | undefined;
@@ -138,6 +170,7 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
138
170
  loadOptions?: ((input: unknown) => TODO) | undefined;
139
171
  defaultOptions?: unknown | boolean;
140
172
  debounceDelay?: number | undefined;
173
+ variant?: "unstyled" | "filled" | "outlined" | undefined;
141
174
  } & 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
175
  placeholder?: React.ReactNode;
143
176
  tabIndex?: number | undefined;
@@ -228,6 +261,41 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
228
261
  tabSelectsValue?: boolean | undefined;
229
262
  } & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
230
263
 
264
+ declare const BottomBar: (props: FlexProps) => JSX.Element;
265
+
266
+ declare const LayoutContainer: (props: FlexProps) => JSX.Element;
267
+
268
+ declare type SideNavProps = {
269
+ isMobileMenuOpen: boolean;
270
+ onMobileMenuClose: () => void;
271
+ } & FlexProps & DrawerContentProps;
272
+ declare type SideNavMenuItemProps = {
273
+ isActive?: boolean;
274
+ } & ButtonProps;
275
+ declare type SideNavMenuProps = {
276
+ textProps?: TextProps;
277
+ } & StackProps;
278
+ declare const SideNav: ({ isMobileMenuOpen, onMobileMenuClose, children, ...props }: SideNavProps) => JSX.Element;
279
+ declare const SideNavContainer: (props: StackProps) => JSX.Element;
280
+ declare const SideNavHeader: ({ children, ...rest }: FlexProps) => JSX.Element;
281
+ declare const SideNavBody: ({ children, ...rest }: StackProps) => JSX.Element;
282
+ declare const SideNavFooter: ({ children, ...rest }: FlexProps) => JSX.Element;
283
+ declare const SideNavMenu: ({ title, children, textProps, ...rest }: SideNavMenuProps) => JSX.Element;
284
+ declare const SideNavMenuItem: ({ isActive, children, ...rest }: SideNavMenuItemProps) => JSX.Element;
285
+
286
+ declare type TopBarBackActionProps = {
287
+ backAction?: () => void;
288
+ rightInformation?: ReactComponentElement<any>;
289
+ } & FlexProps;
290
+ declare const TopBar: (props: StackProps) => JSX.Element;
291
+ declare const TopBarFirstElement: (props: FlexProps) => JSX.Element;
292
+ declare const TopBarLastElement: (props: StackProps) => JSX.Element;
293
+ declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => JSX.Element;
294
+
231
295
  declare const theme: any;
232
296
 
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 };
297
+ declare const dateFormat = "dd/MM/yyyy";
298
+
299
+ declare const useIsMobile: (currentBreakpoint: string) => boolean;
300
+
301
+ export { ActionsButton, ActionsButtonProps, BottomBar, Card, ConfirmMenuItem, DataList, DataListAccordion, DataListAccordionButton, DataListAccordionIcon, DataListAccordionPanel, DataListCell, DataListCellProps, DataListContext, DataListFooter, DataListFooterProps, DataListHeader, DataListHeaderContext, DataListHeaderProps, DataListProps, DataListRow, DataListRowProps, DayPicker, FormGroup, FormGroupProps, InputDayPicker, InputDayPickerProps, LayoutContainer, MenuItem, Pagination, PaginationButtonFirstPage, PaginationButtonLastPage, PaginationButtonNextPage, PaginationButtonPrevPage, PaginationContext, PaginationContextValue, PaginationInfo, PaginationProps, SearchInput, Select, SelectProps, SideNav, SideNavBody, SideNavContainer, SideNavFooter, SideNavHeader, SideNavMenu, SideNavMenuItem, SideNavMenuItemProps, SideNavMenuProps, SideNavProps, SingleDayPickerProps, StyledMenuItemProps, TopBar, TopBarBackAction, TopBarBackActionProps, TopBarFirstElement, TopBarLastElement, dateFormat, getPaginationInfo, theme, useIsMobile };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paygreen/pgui",
3
- "version": "2.1.2",
3
+ "version": "2.3.0",
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
- "dayjs": "^1.11.4",
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",