@paygreen/pgui 2.9.1 → 2.10.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 (73) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/index.js +6439 -12899
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/Card/index.d.ts +2 -3
  5. package/dist/cjs/types/components/ConfirmMenuItem/index.d.ts +3 -12
  6. package/dist/cjs/types/components/DataList/index.d.ts +5 -5
  7. package/dist/cjs/types/components/DayPicker/index.d.ts +4 -4
  8. package/dist/cjs/types/components/FormGroup/index.d.ts +2 -2
  9. package/dist/cjs/types/components/InputDayPicker/index.d.ts +3 -3
  10. package/dist/cjs/types/components/InputPhone/SearchOnList.d.ts +3 -3
  11. package/dist/cjs/types/components/InputPhone/index.d.ts +2 -2
  12. package/dist/cjs/types/components/InputRangePicker/index.d.ts +3 -3
  13. package/dist/cjs/types/components/ModalResponsive/index.d.ts +2 -2
  14. package/dist/cjs/types/components/Pagination/index.d.ts +2 -2
  15. package/dist/cjs/types/components/SearchInput/index.d.ts +1 -11
  16. package/dist/cjs/types/components/Select/index.d.ts +16 -16
  17. package/dist/cjs/types/components/Textarea/index.d.ts +2 -7
  18. package/dist/cjs/types/layout/BottomBar/index.d.ts +2 -3
  19. package/dist/cjs/types/layout/LayoutContainer/index.d.ts +2 -3
  20. package/dist/cjs/types/layout/SideNav/index.d.ts +8 -8
  21. package/dist/cjs/types/layout/TopBar/index.d.ts +6 -6
  22. package/dist/cjs/types/theme/components/button.d.ts +37 -9
  23. package/dist/cjs/types/theme/components/form.d.ts +8 -0
  24. package/dist/cjs/types/theme/components/index.d.ts +2 -0
  25. package/dist/cjs/types/theme/components/input.d.ts +5 -2
  26. package/dist/cjs/types/theme/components/menu.d.ts +8 -0
  27. package/dist/cjs/types/theme/components/number-input.d.ts +4 -1
  28. package/dist/cjs/types/theme/components/pin-input.d.ts +5 -2
  29. package/dist/cjs/types/theme/components/textarea.d.ts +5 -2
  30. package/dist/cjs/types/theme/foundations/colors.d.ts +7 -7
  31. package/dist/cjs/types/theme/foundations/index.d.ts +7 -7
  32. package/dist/cjs/types/theme/index.d.ts +0 -1
  33. package/dist/cjs/types/theme/rawStyle/index.d.ts +0 -1
  34. package/dist/cjs/types/theme/theme.d.ts +1 -2
  35. package/dist/esm/index.js +6443 -12903
  36. package/dist/esm/index.js.map +1 -1
  37. package/dist/esm/types/components/Card/index.d.ts +2 -3
  38. package/dist/esm/types/components/ConfirmMenuItem/index.d.ts +3 -12
  39. package/dist/esm/types/components/DataList/index.d.ts +5 -5
  40. package/dist/esm/types/components/DayPicker/index.d.ts +4 -4
  41. package/dist/esm/types/components/FormGroup/index.d.ts +2 -2
  42. package/dist/esm/types/components/InputDayPicker/index.d.ts +3 -3
  43. package/dist/esm/types/components/InputPhone/SearchOnList.d.ts +3 -3
  44. package/dist/esm/types/components/InputPhone/index.d.ts +2 -2
  45. package/dist/esm/types/components/InputRangePicker/index.d.ts +3 -3
  46. package/dist/esm/types/components/ModalResponsive/index.d.ts +2 -2
  47. package/dist/esm/types/components/Pagination/index.d.ts +2 -2
  48. package/dist/esm/types/components/SearchInput/index.d.ts +1 -11
  49. package/dist/esm/types/components/Select/index.d.ts +16 -16
  50. package/dist/esm/types/components/Textarea/index.d.ts +2 -7
  51. package/dist/esm/types/layout/BottomBar/index.d.ts +2 -3
  52. package/dist/esm/types/layout/LayoutContainer/index.d.ts +2 -3
  53. package/dist/esm/types/layout/SideNav/index.d.ts +8 -8
  54. package/dist/esm/types/layout/TopBar/index.d.ts +6 -6
  55. package/dist/esm/types/theme/components/button.d.ts +37 -9
  56. package/dist/esm/types/theme/components/form.d.ts +8 -0
  57. package/dist/esm/types/theme/components/index.d.ts +2 -0
  58. package/dist/esm/types/theme/components/input.d.ts +5 -2
  59. package/dist/esm/types/theme/components/menu.d.ts +8 -0
  60. package/dist/esm/types/theme/components/number-input.d.ts +4 -1
  61. package/dist/esm/types/theme/components/pin-input.d.ts +5 -2
  62. package/dist/esm/types/theme/components/textarea.d.ts +5 -2
  63. package/dist/esm/types/theme/foundations/colors.d.ts +7 -7
  64. package/dist/esm/types/theme/foundations/index.d.ts +7 -7
  65. package/dist/esm/types/theme/index.d.ts +0 -1
  66. package/dist/esm/types/theme/rawStyle/index.d.ts +0 -1
  67. package/dist/esm/types/theme/theme.d.ts +1 -2
  68. package/dist/index.d.ts +59 -76
  69. package/package.json +15 -15
  70. package/dist/cjs/types/theme/externals-css.d.ts +0 -1
  71. package/dist/cjs/types/theme/rawStyle/reactDayPicker.d.ts +0 -2
  72. package/dist/esm/types/theme/externals-css.d.ts +0 -1
  73. package/dist/esm/types/theme/rawStyle/reactDayPicker.d.ts +0 -2
@@ -11,7 +11,7 @@ export declare const colors: {
11
11
  800: string;
12
12
  900: string;
13
13
  };
14
- gray: {
14
+ green: {
15
15
  50: string;
16
16
  100: string;
17
17
  200: string;
@@ -23,6 +23,9 @@ export declare const colors: {
23
23
  800: string;
24
24
  900: string;
25
25
  };
26
+ gradients: {
27
+ primary: string;
28
+ };
26
29
  red: {
27
30
  50: string;
28
31
  100: string;
@@ -35,7 +38,8 @@ export declare const colors: {
35
38
  800: string;
36
39
  900: string;
37
40
  };
38
- orange: {
41
+ background: string;
42
+ gray: {
39
43
  50: string;
40
44
  100: string;
41
45
  200: string;
@@ -47,7 +51,7 @@ export declare const colors: {
47
51
  800: string;
48
52
  900: string;
49
53
  };
50
- green: {
54
+ orange: {
51
55
  50: string;
52
56
  100: string;
53
57
  200: string;
@@ -59,8 +63,4 @@ export declare const colors: {
59
63
  800: string;
60
64
  900: string;
61
65
  };
62
- gradients: {
63
- primary: string;
64
- };
65
- background: string;
66
66
  };
@@ -61,7 +61,7 @@ declare const foundations: {
61
61
  800: string;
62
62
  900: string;
63
63
  };
64
- gray: {
64
+ green: {
65
65
  50: string;
66
66
  100: string;
67
67
  200: string;
@@ -73,6 +73,9 @@ declare const foundations: {
73
73
  800: string;
74
74
  900: string;
75
75
  };
76
+ gradients: {
77
+ primary: string;
78
+ };
76
79
  red: {
77
80
  50: string;
78
81
  100: string;
@@ -85,7 +88,8 @@ declare const foundations: {
85
88
  800: string;
86
89
  900: string;
87
90
  };
88
- orange: {
91
+ background: string;
92
+ gray: {
89
93
  50: string;
90
94
  100: string;
91
95
  200: string;
@@ -97,7 +101,7 @@ declare const foundations: {
97
101
  800: string;
98
102
  900: string;
99
103
  };
100
- green: {
104
+ orange: {
101
105
  50: string;
102
106
  100: string;
103
107
  200: string;
@@ -109,10 +113,6 @@ declare const foundations: {
109
113
  800: string;
110
114
  900: string;
111
115
  };
112
- gradients: {
113
- primary: string;
114
- };
115
- background: string;
116
116
  };
117
117
  };
118
118
  export default foundations;
@@ -1,2 +1 @@
1
- import './externals-css';
2
1
  export * from './theme';
@@ -1,3 +1,2 @@
1
1
  export { chakraStyle } from './chakraStyle';
2
2
  export { reactCalendar } from './reactCalendar';
3
- export { reactDayPicker } from './reactDayPicker';
@@ -1,2 +1 @@
1
- import { type ThemeConfig } from '@chakra-ui/react';
2
- export declare const theme: ThemeConfig;
1
+ export declare const theme: any;
package/dist/index.d.ts CHANGED
@@ -1,13 +1,11 @@
1
- /// <reference types="react" />
2
1
  import React, { FC, PropsWithChildren, ReactNode, Dispatch, SetStateAction, ReactComponentElement } from 'react';
3
- import { IconButtonProps, CardProps, HTMLChakraProps, MenuItemProps, FlexProps, AccordionProps, FormControlProps, InputProps, ModalProps, DrawerProps, StackProps, BoxProps, DrawerContentProps, ButtonProps, TextProps, ThemeConfig } from '@chakra-ui/react';
4
- import * as _chakra_ui_system from '@chakra-ui/system';
2
+ import { IconButtonProps, HTMLChakraProps, FlexProps as FlexProps$1, AccordionProps, FormControlProps, InputProps, ModalProps, DrawerProps, StackProps as StackProps$1, BoxProps, DrawerContentProps, ButtonProps, TextProps } from '@chakra-ui/react';
5
3
  import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
6
4
  import * as react_select_dist_declarations_src_useStateManager from 'react-select/dist/declarations/src/useStateManager';
7
5
  import * as react_select_dist_declarations_src_filters from 'react-select/dist/declarations/src/filters';
6
+ import * as react_select_dist_declarations_src_components from 'react-select/dist/declarations/src/components';
8
7
  import * as react_select from 'react-select';
9
8
  import { GroupBase, Props } from 'react-select';
10
- import * as react_select_dist_declarations_src_components from 'react-select/dist/declarations/src/components';
11
9
  import * as react_select_dist_declarations_src_Select from 'react-select/dist/declarations/src/Select';
12
10
 
13
11
  type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
@@ -15,18 +13,11 @@ type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
15
13
  };
16
14
  declare const ActionsButton: FC<PropsWithChildren<ActionsButtonProps>>;
17
15
 
18
- declare const Card: (props: CardProps) => JSX.Element;
16
+ declare const Card: (props: CardProps) => React.JSX.Element;
19
17
 
20
18
  type StyledMenuItemProps = HTMLChakraProps<'button'>;
21
- declare const MenuItem: _chakra_ui_system.ComponentWithAs<"button", MenuItemProps>;
22
- 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_system.ComponentWithAs<"button", ConfirmMenuItemProps>;
19
+ declare const MenuItem: any;
20
+ declare const ConfirmMenuItem: any;
30
21
 
31
22
  type DataListColumns = Record<string, DataListCellProps>;
32
23
  type DataListContextValue = {
@@ -36,25 +27,25 @@ type DataListContextValue = {
36
27
  };
37
28
  declare const DataListContext: React.Context<DataListContextValue>;
38
29
  declare const DataListHeaderContext: React.Context<boolean>;
39
- type DataListCellProps = FlexProps & {
30
+ type DataListCellProps = FlexProps$1 & {
40
31
  colName?: string;
41
32
  colWidth?: string | number | Record<string, string | number>;
42
33
  isVisible?: boolean | boolean[] | Record<string, boolean>;
43
34
  };
44
- declare const DataListCell: ({ children, colName, colWidth, isVisible, ...rest }: DataListCellProps) => JSX.Element | null;
35
+ declare const DataListCell: ({ children, colName, colWidth, isVisible, ...rest }: DataListCellProps) => React.JSX.Element | null;
45
36
  declare const DataListAccordion: ({ ...rest }: {
46
37
  [x: string]: any;
47
- }) => JSX.Element;
38
+ }) => React.JSX.Element;
48
39
  declare const DataListAccordionButton: ({ ...rest }: {
49
40
  [x: string]: any;
50
- }) => JSX.Element;
41
+ }) => React.JSX.Element;
51
42
  declare const DataListAccordionIcon: ({ ...rest }: {
52
43
  [x: string]: any;
53
- }) => JSX.Element;
44
+ }) => React.JSX.Element;
54
45
  declare const DataListAccordionPanel: ({ ...rest }: {
55
46
  [x: string]: any;
56
- }) => JSX.Element;
57
- type DataListRowProps = FlexProps & {
47
+ }) => React.JSX.Element;
48
+ type DataListRowProps = FlexProps$1 & {
58
49
  isVisible?: boolean | boolean[] | Record<string, boolean>;
59
50
  isDisabled?: boolean;
60
51
  };
@@ -74,12 +65,12 @@ type DayPickerProps = {
74
65
  locale?: string;
75
66
  customFormat?: string;
76
67
  withTime?: boolean;
77
- minDate?: Date | null;
78
- maxDate?: Date | null;
68
+ minDate?: Date | undefined;
69
+ maxDate?: Date | undefined;
79
70
  calendarFunc?: (date: any) => 'after-max-date' | 'before-min-date' | undefined;
80
71
  fieldRef?: any;
81
72
  };
82
- declare const DayPicker: ({ defaultValue, onChange, locale, customFormat, withTime, minDate, maxDate, calendarFunc, fieldRef, ...props }: DayPickerProps) => JSX.Element;
73
+ declare const DayPicker: ({ defaultValue, onChange, locale, customFormat, withTime, minDate, maxDate, calendarFunc, fieldRef, ...props }: DayPickerProps) => React.JSX.Element;
83
74
 
84
75
  type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue' | 'label'> & {
85
76
  children?: ReactNode;
@@ -90,7 +81,7 @@ type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue' | 'labe
90
81
  label?: ReactNode;
91
82
  showError?: boolean;
92
83
  };
93
- declare const FormGroup: ({ children, errorMessage, helper, id, isRequired, label, showError, ...props }: FormGroupProps) => JSX.Element;
84
+ declare const FormGroup: ({ children, errorMessage, helper, id, isRequired, label, showError, ...props }: FormGroupProps) => React.JSX.Element;
94
85
 
95
86
  type InputDayPickerProps = {
96
87
  name: string;
@@ -98,7 +89,7 @@ type InputDayPickerProps = {
98
89
  onChange: Dispatch<SetStateAction<string | undefined | null>>;
99
90
  value?: string | Date | null;
100
91
  locale?: string;
101
- variant?: 'unstyled' | 'filled' | 'outlined';
92
+ variant?: 'filled' | 'outline';
102
93
  format?: string;
103
94
  withTime?: boolean;
104
95
  minDate?: Date | null | undefined;
@@ -106,7 +97,7 @@ type InputDayPickerProps = {
106
97
  calendarFunc?: (date: any) => 'after-max-date' | 'before-min-date' | undefined;
107
98
  isDisabled?: boolean;
108
99
  } & InputProps;
109
- declare const InputDayPicker: ({ name, placeholder, value, onChange, locale, variant, format, withTime, minDate, maxDate, calendarFunc, isDisabled, ...inputProps }: InputDayPickerProps) => JSX.Element;
100
+ declare const InputDayPicker: ({ name, placeholder, value, onChange, locale, variant, format, withTime, minDate, maxDate, calendarFunc, isDisabled, ...inputProps }: InputDayPickerProps) => React.JSX.Element;
110
101
 
111
102
  var css_248z = "/* CSS variables. */\r\n:root {\r\n\t--PhoneInput-color--focus: #03b2cb;\r\n\t--PhoneInputInternationalIconPhone-opacity: 0.8;\r\n\t--PhoneInputInternationalIconGlobe-opacity: 0.65;\r\n\t--PhoneInputCountrySelect-marginRight: 0.35em;\r\n\t--PhoneInputCountrySelectArrow-width: 0.3em;\r\n\t--PhoneInputCountrySelectArrow-marginLeft: var(--PhoneInputCountrySelect-marginRight);\r\n\t--PhoneInputCountrySelectArrow-borderWidth: 1px;\r\n\t--PhoneInputCountrySelectArrow-opacity: 0.45;\r\n\t--PhoneInputCountrySelectArrow-color: currentColor;\r\n\t--PhoneInputCountrySelectArrow-color--focus: var(--PhoneInput-color--focus);\r\n\t--PhoneInputCountrySelectArrow-transform: rotate(45deg);\r\n\t--PhoneInputCountryFlag-aspectRatio: 1.5;\r\n\t--PhoneInputCountryFlag-height: 1em;\r\n\t--PhoneInputCountryFlag-borderWidth: 1px;\r\n\t--PhoneInputCountryFlag-borderColor: rgba(0,0,0,0.5);\r\n\t--PhoneInputCountryFlag-borderColor--focus: var(--PhoneInput-color--focus);\r\n\t--PhoneInputCountryFlag-backgroundColor--loading: rgba(0,0,0,0.1);\r\n}\r\n\r\n.PhoneInput {\r\n\t/* This is done to stretch the contents of this component. */\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.PhoneInputInput {\r\n\t/* The phone number input stretches to fill all empty space */\r\n\tflex: 1;\r\n\t/* The phone number input should shrink\r\n\t to make room for the extension input */\r\n\tmin-width: 0;\r\n}\r\n\r\n.PhoneInputCountryIcon {\r\n\twidth: calc(var(--PhoneInputCountryFlag-height) * var(--PhoneInputCountryFlag-aspectRatio));\r\n\theight: var(--PhoneInputCountryFlag-height);\r\n}\r\n\r\n.PhoneInputCountryIcon--square {\r\n\twidth: var(--PhoneInputCountryFlag-height);\r\n}\r\n\r\n.PhoneInputCountryIcon--border {\r\n\t/* Removed `background-color` because when an `<img/>` was still loading\r\n\t it would show a dark gray rectangle. */\r\n\t/* For some reason the `<img/>` is not stretched to 100% width and height\r\n\t and sometime there can be seen white pixels of the background at top and bottom. */\r\n\tbackground-color: var(--PhoneInputCountryFlag-backgroundColor--loading);\r\n\t/* Border is added via `box-shadow` because `border` interferes with `width`/`height`. */\r\n\t/* For some reason the `<img/>` is not stretched to 100% width and height\r\n\t and sometime there can be seen white pixels of the background at top and bottom,\r\n\t so an additional \"inset\" border is added. */\r\n\tbox-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor),\r\n\t\tinset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor);\r\n}\r\n\r\n.PhoneInputCountryIconImg {\r\n\t/* Fixes weird vertical space above the flag icon. */\r\n\t/* https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/7#note_348586559 */\r\n\tdisplay: block;\r\n\t/* 3rd party <SVG/> flag icons won't stretch if they have `width` and `height`.\r\n\t Also, if an <SVG/> icon's aspect ratio was different, it wouldn't fit too. */\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.PhoneInputInternationalIconPhone {\r\n\topacity: var(--PhoneInputInternationalIconPhone-opacity);\r\n}\r\n\r\n.PhoneInputInternationalIconGlobe {\r\n\topacity: var(--PhoneInputInternationalIconGlobe-opacity);\r\n}\r\n\r\n/* Styling native country `<select/>`. */\r\n\r\n.PhoneInputCountry {\r\n\tposition: relative;\r\n\talign-self: stretch;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tmargin-right: var(--PhoneInputCountrySelect-marginRight);\r\n}\r\n\r\n.PhoneInputCountrySelect {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\tz-index: 1;\r\n\tborder: 0;\r\n\topacity: 0;\r\n\tcursor: pointer;\r\n}\r\n\r\n.PhoneInputCountrySelect[disabled],\r\n.PhoneInputCountrySelect[readonly] {\r\n\tcursor: default;\r\n}\r\n\r\n.PhoneInputCountrySelectArrow {\r\n\tdisplay: block;\r\n\tcontent: '';\r\n\twidth: var(--PhoneInputCountrySelectArrow-width);\r\n\theight: var(--PhoneInputCountrySelectArrow-width);\r\n\tmargin-left: var(--PhoneInputCountrySelectArrow-marginLeft);\r\n\tborder-style: solid;\r\n\tborder-color: var(--PhoneInputCountrySelectArrow-color);\r\n\tborder-top-width: 0;\r\n\tborder-bottom-width: var(--PhoneInputCountrySelectArrow-borderWidth);\r\n\tborder-left-width: 0;\r\n\tborder-right-width: var(--PhoneInputCountrySelectArrow-borderWidth);\r\n\ttransform: var(--PhoneInputCountrySelectArrow-transform);\r\n\topacity: var(--PhoneInputCountrySelectArrow-opacity);\r\n}\r\n\r\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon + .PhoneInputCountrySelectArrow {\r\n\topacity: 1;\r\n\tcolor: var(--PhoneInputCountrySelectArrow-color--focus);\r\n}\r\n\r\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon--border {\r\n\tbox-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus),\r\n\t\tinset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus);\r\n}\r\n\r\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon .PhoneInputInternationalIconGlobe {\r\n\topacity: 1;\r\n\tcolor: var(--PhoneInputCountrySelectArrow-color--focus);\r\n}";
112
103
  styleInject(css_248z);
@@ -120,7 +111,7 @@ type InputPhoneProps = {
120
111
  };
121
112
  declare const isValidPhone: (val: string) => boolean;
122
113
  declare const formatPhoneIntl: (val: string) => string;
123
- declare const InputPhone: ({ locale, value, placeholder, isDisabled, inputProps, ...props }: InputPhoneProps) => JSX.Element;
114
+ declare const InputPhone: ({ locale, value, placeholder, isDisabled, inputProps, ...props }: InputPhoneProps) => React.JSX.Element;
124
115
 
125
116
  interface ValueProps {
126
117
  from: Date | null | undefined;
@@ -135,12 +126,12 @@ type InputRangePickerProps = {
135
126
  format?: string;
136
127
  value?: ValueProps;
137
128
  withTime?: boolean;
138
- variant?: 'unstyled' | 'filled' | 'outlined';
129
+ variant?: 'filled' | 'outline';
139
130
  };
140
- declare const InputRangePicker: ({ fromLabel, toLabel, value, onChange, minDate, maxDate, withTime, format, variant, ...props }: InputRangePickerProps) => JSX.Element;
131
+ declare const InputRangePicker: ({ fromLabel, toLabel, value, onChange, minDate, maxDate, withTime, format, variant, ...props }: InputRangePickerProps) => React.JSX.Element;
141
132
 
142
133
  type ModalResponsiveProps = ModalProps & DrawerProps;
143
- declare const ModalResponsive: ({ isOpen, onClose, finalFocusRef, children, ...rest }: ModalResponsiveProps) => JSX.Element;
134
+ declare const ModalResponsive: ({ isOpen, onClose, finalFocusRef, children, ...rest }: ModalResponsiveProps) => React.JSX.Element;
144
135
 
145
136
  declare const getPaginationInfo: ({ page, pageSize, totalItems, }: {
146
137
  page?: number | undefined;
@@ -174,25 +165,17 @@ declare const PaginationButtonLastPage: FC<PropsWithChildren<Omit<IconButtonProp
174
165
  declare const PaginationButtonNextPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
175
166
  declare const PaginationInfo: ({ ...rest }: {
176
167
  [x: string]: any;
177
- }) => JSX.Element;
178
- type PaginationProps = StackProps & {
168
+ }) => React.JSX.Element;
169
+ type PaginationProps = StackProps$1 & {
179
170
  setPage: (page: number) => void;
180
171
  page?: number;
181
172
  pageSize?: number;
182
173
  totalItems?: number;
183
174
  isLoadingPage?: boolean;
184
175
  };
185
- declare const Pagination: ({ setPage, page, pageSize, totalItems, isLoadingPage, ...rest }: PaginationProps) => JSX.Element;
176
+ declare const Pagination: ({ setPage, page, pageSize, totalItems, isLoadingPage, children, ...rest }: PaginationProps) => React.JSX.Element;
186
177
 
187
- type CustomProps = {
188
- value?: string;
189
- defaultValue?: string;
190
- onChange?(value?: string): void;
191
- delay?: number;
192
- clearLabel?: string;
193
- };
194
- type SearchInputProps = Overwrite<InputProps, CustomProps>;
195
- declare const SearchInput: _chakra_ui_system.ComponentWithAs<"input", SearchInputProps>;
178
+ declare const SearchInput: any;
196
179
 
197
180
  declare module 'react' {
198
181
  function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
@@ -206,7 +189,7 @@ type SelectProps<Option, IsMulti extends boolean = false, Group extends GroupBas
206
189
  loadOptions?: (input: unknown) => TODO;
207
190
  defaultOptions?: unknown | boolean;
208
191
  debounceDelay?: number;
209
- variant?: 'unstyled' | 'filled' | 'outlined';
192
+ variant?: 'filled' | 'outline';
210
193
  } & Props<Option, IsMulti, Group> & Omit<BoxProps, 'defaultValue'>;
211
194
  declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: {
212
195
  isAsync?: boolean | undefined;
@@ -217,29 +200,27 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
217
200
  loadOptions?: ((input: unknown) => TODO) | undefined;
218
201
  defaultOptions?: unknown | boolean;
219
202
  debounceDelay?: number | undefined;
220
- variant?: "unstyled" | "filled" | "outlined" | undefined;
221
- } & 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" | "inputValue" | "theme" | "required" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
222
- placeholder?: React.ReactNode;
223
- tabIndex?: number | undefined;
224
- 'aria-live'?: "off" | "assertive" | "polite" | undefined;
225
- isLoading?: boolean | undefined;
203
+ variant?: "outline" | "filled" | undefined;
204
+ } & Omit<Pick<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"> & {
226
205
  isDisabled?: boolean | undefined;
227
- components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
228
- unstyled?: boolean | undefined;
206
+ placeholder?: React.ReactNode;
229
207
  options?: react_select.OptionsOrGroups<Option, Group> | undefined;
230
208
  pageSize?: number | undefined;
209
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
231
210
  backspaceRemovesValue?: boolean | undefined;
232
211
  blurInputOnSelect?: boolean | undefined;
233
212
  captureMenuScroll?: boolean | undefined;
234
213
  classNames?: react_select.ClassNamesConfig<Option, IsMulti, Group> | undefined;
235
214
  closeMenuOnSelect?: boolean | undefined;
236
215
  closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
216
+ components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
237
217
  controlShouldRenderValue?: boolean | undefined;
238
218
  escapeClearsValue?: boolean | undefined;
239
219
  filterOption?: ((option: react_select_dist_declarations_src_filters.FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
240
220
  formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
241
221
  getOptionLabel?: react_select.GetOptionLabel<Option> | undefined;
242
222
  getOptionValue?: react_select.GetOptionValue<Option> | undefined;
223
+ isLoading?: boolean | undefined;
243
224
  isOptionDisabled?: ((option: Option, selectValue: react_select.Options<Option>) => boolean) | undefined;
244
225
  isMulti?: IsMulti | undefined;
245
226
  isRtl?: boolean | undefined;
@@ -263,29 +244,29 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
263
244
  count: number;
264
245
  }) => string) | undefined;
265
246
  styles?: react_select.StylesConfig<Option, IsMulti, Group> | undefined;
266
- tabSelectsValue?: boolean | undefined;
267
- } & {}, "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" | "inputValue" | "theme" | "required" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
268
- placeholder?: React.ReactNode;
269
247
  tabIndex?: number | undefined;
270
- 'aria-live'?: "off" | "assertive" | "polite" | undefined;
271
- isLoading?: boolean | undefined;
272
- isDisabled?: boolean | undefined;
273
- components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
248
+ tabSelectsValue?: boolean | undefined;
274
249
  unstyled?: boolean | undefined;
250
+ } & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<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"> & {
251
+ isDisabled?: boolean | undefined;
252
+ placeholder?: React.ReactNode;
275
253
  options?: react_select.OptionsOrGroups<Option, Group> | undefined;
276
254
  pageSize?: number | undefined;
255
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
277
256
  backspaceRemovesValue?: boolean | undefined;
278
257
  blurInputOnSelect?: boolean | undefined;
279
258
  captureMenuScroll?: boolean | undefined;
280
259
  classNames?: react_select.ClassNamesConfig<Option, IsMulti, Group> | undefined;
281
260
  closeMenuOnSelect?: boolean | undefined;
282
261
  closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
262
+ components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
283
263
  controlShouldRenderValue?: boolean | undefined;
284
264
  escapeClearsValue?: boolean | undefined;
285
265
  filterOption?: ((option: react_select_dist_declarations_src_filters.FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
286
266
  formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
287
267
  getOptionLabel?: react_select.GetOptionLabel<Option> | undefined;
288
268
  getOptionValue?: react_select.GetOptionValue<Option> | undefined;
269
+ isLoading?: boolean | undefined;
289
270
  isOptionDisabled?: ((option: Option, selectValue: react_select.Options<Option>) => boolean) | undefined;
290
271
  isMulti?: IsMulti | undefined;
291
272
  isRtl?: boolean | undefined;
@@ -309,41 +290,43 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
309
290
  count: number;
310
291
  }) => string) | undefined;
311
292
  styles?: react_select.StylesConfig<Option, IsMulti, Group> | undefined;
293
+ tabIndex?: number | undefined;
312
294
  tabSelectsValue?: boolean | undefined;
295
+ unstyled?: boolean | undefined;
313
296
  } & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
314
297
 
315
- declare const BottomBar: (props: FlexProps) => JSX.Element;
298
+ declare const BottomBar: (props: FlexProps) => React.JSX.Element;
316
299
 
317
- declare const LayoutContainer: (props: FlexProps) => JSX.Element;
300
+ declare const LayoutContainer: (props: FlexProps) => React.JSX.Element;
318
301
 
319
302
  type SideNavProps = {
320
303
  isMobileMenuOpen: boolean;
321
304
  onMobileMenuClose: () => void;
322
- } & FlexProps & DrawerContentProps;
305
+ } & FlexProps$1 & DrawerContentProps;
323
306
  type SideNavMenuItemProps = {
324
307
  isActive?: boolean;
325
308
  } & ButtonProps;
326
309
  type SideNavMenuProps = {
327
310
  textProps?: TextProps;
328
- } & StackProps;
329
- declare const SideNav: ({ isMobileMenuOpen, onMobileMenuClose, children, ...props }: SideNavProps) => JSX.Element;
330
- declare const SideNavContainer: (props: StackProps) => JSX.Element;
331
- declare const SideNavHeader: ({ children, ...rest }: FlexProps) => JSX.Element;
332
- declare const SideNavBody: ({ children, ...rest }: StackProps) => JSX.Element;
333
- declare const SideNavFooter: ({ children, ...rest }: FlexProps) => JSX.Element;
334
- declare const SideNavMenu: ({ title, children, textProps, ...rest }: SideNavMenuProps) => JSX.Element;
335
- declare const SideNavMenuItem: ({ isActive, children, ...rest }: SideNavMenuItemProps) => JSX.Element;
311
+ } & StackProps$1;
312
+ declare const SideNav: ({ isMobileMenuOpen, onMobileMenuClose, children, ...props }: SideNavProps) => React.JSX.Element;
313
+ declare const SideNavContainer: (props: StackProps$1) => React.JSX.Element;
314
+ declare const SideNavHeader: ({ children, ...rest }: FlexProps$1) => React.JSX.Element;
315
+ declare const SideNavBody: ({ children, ...rest }: StackProps$1) => React.JSX.Element;
316
+ declare const SideNavFooter: ({ children, ...rest }: FlexProps$1) => React.JSX.Element;
317
+ declare const SideNavMenu: ({ title, children, textProps, ...rest }: SideNavMenuProps) => React.JSX.Element;
318
+ declare const SideNavMenuItem: ({ isActive, children, ...rest }: SideNavMenuItemProps) => React.JSX.Element;
336
319
 
337
320
  type TopBarBackActionProps = {
338
321
  backAction?: () => void;
339
322
  rightInformation?: ReactComponentElement<any>;
340
- } & FlexProps;
341
- declare const TopBar: (props: StackProps) => JSX.Element;
342
- declare const TopBarFirstElement: (props: FlexProps) => JSX.Element;
343
- declare const TopBarLastElement: (props: StackProps) => JSX.Element;
344
- declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => JSX.Element;
323
+ } & FlexProps$1;
324
+ declare const TopBar: (props: StackProps) => React.JSX.Element;
325
+ declare const TopBarFirstElement: (props: FlexProps$1) => React.JSX.Element;
326
+ declare const TopBarLastElement: (props: StackProps) => React.JSX.Element;
327
+ declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => React.JSX.Element;
345
328
 
346
- declare const theme: ThemeConfig;
329
+ declare const theme: any;
347
330
 
348
331
  declare const dateFormat = "dd/MM/yyyy";
349
332
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paygreen/pgui",
3
- "version": "2.9.1",
3
+ "version": "2.10.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",
@@ -49,29 +49,28 @@
49
49
  "@babel/preset-env": "^7.18.6",
50
50
  "@babel/preset-react": "^7.18.6",
51
51
  "@babel/preset-typescript": "^7.18.6",
52
- "@chakra-ui/storybook-addon": "^4.0.14",
53
52
  "@chakra-ui/theme-tools": "^2.0.14",
54
53
  "@emotion/react": "^11.9.3",
55
54
  "@emotion/styled": "^11.9.3",
56
55
  "@rollup/plugin-commonjs": "^22.0.1",
57
56
  "@rollup/plugin-node-resolve": "^13.3.0",
58
- "@rollup/plugin-typescript": "8.3.3",
59
- "@storybook/addon-actions": "^7.0.0-beta.8",
60
- "@storybook/addon-essentials": "^7.0.0-beta.8",
61
- "@storybook/addon-interactions": "^7.0.0-beta.8",
62
- "@storybook/addon-links": "^7.0.0-beta.8",
63
- "@storybook/addon-postcss": "^2.0.0",
64
- "@storybook/react": "^7.0.0-beta.8",
65
- "@storybook/react-webpack5": "^7.0.0-beta.8",
66
- "@storybook/testing-library": "^0.0.14-next.1",
67
- "@trivago/prettier-plugin-sort-imports": "^3.3.0",
57
+ "@rollup/plugin-typescript": "11.1.4",
58
+ "@storybook/addon-actions": "^7.4.0",
59
+ "@storybook/addon-docs": "^7.4.0",
60
+ "@storybook/addon-essentials": "^7.4.0",
61
+ "@storybook/addon-interactions": "^7.4.0",
62
+ "@storybook/addon-links": "^7.4.0",
63
+ "@storybook/react": "^7.4.0",
64
+ "@storybook/react-webpack5": "^7.4.0",
65
+ "@storybook/testing-library": "^0.2.1-next.0",
66
+ "@trivago/prettier-plugin-sort-imports": "^4.2.1",
68
67
  "@types/react": "^18.0.26",
69
68
  "@typescript-eslint/eslint-plugin": "^5.30.6",
70
69
  "@typescript-eslint/parser": "^5.30.6",
71
70
  "babel-jest": "^26.6.3",
72
71
  "babel-loader": "^8.1.0",
73
72
  "babel-plugin-import": "^1.13.5",
74
- "babel-plugin-module-resolver": "4.1.0",
73
+ "babel-plugin-module-resolver": "^5.0.0",
75
74
  "css-loader": "^5.0.1",
76
75
  "date-fns": "^2.29.3",
77
76
  "dayjs": "^1.11.7",
@@ -100,7 +99,7 @@
100
99
  "react-input-mask": "^3.0.0-alpha.2",
101
100
  "react-phone-number-input": "^3.2.13",
102
101
  "react-select": "^5.4.0",
103
- "relative-deps": "^1.0.7",
102
+ "relative-deps": "^0.0.2",
104
103
  "rollup": "^2.77.0",
105
104
  "rollup-plugin-dts": "^4.2.2",
106
105
  "rollup-plugin-node-externals": "^4.1.1",
@@ -109,8 +108,9 @@
109
108
  "rollup-plugin-terser": "^7.0.2",
110
109
  "sass": "^1.53.0",
111
110
  "sass-loader": "^12.6.0",
112
- "storybook": "^7.0.0-beta.8",
111
+ "storybook": "^7.4.0",
113
112
  "style-loader": "^2.0.0",
113
+ "tslib": "^2.6.2",
114
114
  "typescript": "^4.7.4"
115
115
  },
116
116
  "relativeDependencies": {}
@@ -1 +0,0 @@
1
- import 'react-day-picker/dist/style.css';
@@ -1,2 +0,0 @@
1
- import { Styles } from '@chakra-ui/theme-tools';
2
- export declare const reactDayPicker: Styles['global'];
@@ -1 +0,0 @@
1
- import 'react-day-picker/dist/style.css';
@@ -1,2 +0,0 @@
1
- import { Styles } from '@chakra-ui/theme-tools';
2
- export declare const reactDayPicker: Styles['global'];