@paygreen/pgui 2.9.2 → 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 (73) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/index.js +6642 -12987
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/Card/index.d.ts +2 -2
  5. package/dist/cjs/types/components/ConfirmMenuItem/index.d.ts +2 -2
  6. package/dist/cjs/types/components/DataList/index.d.ts +5 -5
  7. package/dist/cjs/types/components/DayPicker/index.d.ts +5 -5
  8. package/dist/cjs/types/components/FormGroup/index.d.ts +2 -2
  9. package/dist/cjs/types/components/InputDayPicker/index.d.ts +5 -5
  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 +2 -1
  16. package/dist/cjs/types/components/Select/index.d.ts +4 -4
  17. package/dist/cjs/types/components/Textarea/index.d.ts +2 -2
  18. package/dist/cjs/types/layout/BottomBar/index.d.ts +2 -2
  19. package/dist/cjs/types/layout/LayoutContainer/index.d.ts +2 -2
  20. package/dist/cjs/types/layout/SideNav/index.d.ts +8 -8
  21. package/dist/cjs/types/layout/TopBar/index.d.ts +5 -5
  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 +6647 -12992
  36. package/dist/esm/index.js.map +1 -1
  37. package/dist/esm/types/components/Card/index.d.ts +2 -2
  38. package/dist/esm/types/components/ConfirmMenuItem/index.d.ts +2 -2
  39. package/dist/esm/types/components/DataList/index.d.ts +5 -5
  40. package/dist/esm/types/components/DayPicker/index.d.ts +5 -5
  41. package/dist/esm/types/components/FormGroup/index.d.ts +2 -2
  42. package/dist/esm/types/components/InputDayPicker/index.d.ts +5 -5
  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 +2 -1
  49. package/dist/esm/types/components/Select/index.d.ts +4 -4
  50. package/dist/esm/types/components/Textarea/index.d.ts +2 -2
  51. package/dist/esm/types/layout/BottomBar/index.d.ts +2 -2
  52. package/dist/esm/types/layout/LayoutContainer/index.d.ts +2 -2
  53. package/dist/esm/types/layout/SideNav/index.d.ts +8 -8
  54. package/dist/esm/types/layout/TopBar/index.d.ts +5 -5
  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 +45 -45
  69. package/package.json +16 -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
@@ -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: Record<string, any>;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
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, CardProps, HTMLChakraProps, MenuItemProps, FlexProps, AccordionProps, FormControlProps, InputProps, ModalProps, DrawerProps, StackProps, BoxProps, DrawerContentProps, ButtonProps, TextProps } from '@chakra-ui/react';
3
+ import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
5
4
  import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
6
5
  import * as react_select_dist_declarations_src_useStateManager from 'react-select/dist/declarations/src/useStateManager';
7
6
  import * as react_select_dist_declarations_src_filters from 'react-select/dist/declarations/src/filters';
@@ -15,10 +14,10 @@ type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
15
14
  };
16
15
  declare const ActionsButton: FC<PropsWithChildren<ActionsButtonProps>>;
17
16
 
18
- declare const Card: (props: CardProps) => JSX.Element;
17
+ declare const Card: (props: CardProps) => React.JSX.Element;
19
18
 
20
19
  type StyledMenuItemProps = HTMLChakraProps<'button'>;
21
- declare const MenuItem: _chakra_ui_system.ComponentWithAs<"button", MenuItemProps>;
20
+ declare const MenuItem: _chakra_ui_system_dist_system_types.ComponentWithAs<"button", MenuItemProps>;
22
21
  type ConfirmMenuItemProps = MenuItemProps & {
23
22
  confirmDelay?: number;
24
23
  confirmColorScheme?: string;
@@ -26,7 +25,7 @@ type ConfirmMenuItemProps = MenuItemProps & {
26
25
  confirmText?: React.ReactNode;
27
26
  confirmIcon?: React.FC<React.PropsWithChildren<unknown>>;
28
27
  };
29
- declare const ConfirmMenuItem: _chakra_ui_system.ComponentWithAs<"button", ConfirmMenuItemProps>;
28
+ declare const ConfirmMenuItem: _chakra_ui_system_dist_system_types.ComponentWithAs<"button", ConfirmMenuItemProps>;
30
29
 
31
30
  type DataListColumns = Record<string, DataListCellProps>;
32
31
  type DataListContextValue = {
@@ -41,19 +40,19 @@ type DataListCellProps = FlexProps & {
41
40
  colWidth?: string | number | Record<string, string | number>;
42
41
  isVisible?: boolean | boolean[] | Record<string, boolean>;
43
42
  };
44
- declare const DataListCell: ({ children, colName, colWidth, isVisible, ...rest }: DataListCellProps) => JSX.Element | null;
43
+ declare const DataListCell: ({ children, colName, colWidth, isVisible, ...rest }: DataListCellProps) => React.JSX.Element | null;
45
44
  declare const DataListAccordion: ({ ...rest }: {
46
45
  [x: string]: any;
47
- }) => JSX.Element;
46
+ }) => React.JSX.Element;
48
47
  declare const DataListAccordionButton: ({ ...rest }: {
49
48
  [x: string]: any;
50
- }) => JSX.Element;
49
+ }) => React.JSX.Element;
51
50
  declare const DataListAccordionIcon: ({ ...rest }: {
52
51
  [x: string]: any;
53
- }) => JSX.Element;
52
+ }) => React.JSX.Element;
54
53
  declare const DataListAccordionPanel: ({ ...rest }: {
55
54
  [x: string]: any;
56
- }) => JSX.Element;
55
+ }) => React.JSX.Element;
57
56
  type DataListRowProps = FlexProps & {
58
57
  isVisible?: boolean | boolean[] | Record<string, boolean>;
59
58
  isDisabled?: boolean;
@@ -69,17 +68,17 @@ type DataListProps = AccordionProps & {
69
68
  declare const DataList: FC<PropsWithChildren<DataListProps>>;
70
69
 
71
70
  type DayPickerProps = {
72
- defaultValue?: string | Date;
71
+ defaultValue?: string | Date | undefined;
73
72
  onChange: (e: string | undefined) => void;
74
73
  locale?: string;
75
74
  customFormat?: string;
76
75
  withTime?: boolean;
77
- minDate?: Date | null;
78
- maxDate?: Date | null;
76
+ minDate?: Date | undefined;
77
+ maxDate?: Date | undefined;
79
78
  calendarFunc?: (date: any) => 'after-max-date' | 'before-min-date' | undefined;
80
79
  fieldRef?: any;
81
80
  };
82
- declare const DayPicker: ({ defaultValue, onChange, locale, customFormat, withTime, minDate, maxDate, calendarFunc, fieldRef, ...props }: DayPickerProps) => JSX.Element;
81
+ declare const DayPicker: ({ defaultValue, onChange, locale, customFormat, withTime, minDate, maxDate, calendarFunc, fieldRef, ...props }: DayPickerProps) => React.JSX.Element;
83
82
 
84
83
  type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue' | 'label'> & {
85
84
  children?: ReactNode;
@@ -90,23 +89,23 @@ type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue' | 'labe
90
89
  label?: ReactNode;
91
90
  showError?: boolean;
92
91
  };
93
- declare const FormGroup: ({ children, errorMessage, helper, id, isRequired, label, showError, ...props }: FormGroupProps) => JSX.Element;
92
+ declare const FormGroup: ({ children, errorMessage, helper, id, isRequired, label, showError, ...props }: FormGroupProps) => React.JSX.Element;
94
93
 
95
- type InputDayPickerProps = {
94
+ type InputDayPickerProps = Omit<InputProps, 'minDate' | 'maxDate' | 'defaultValue'> & {
96
95
  name: string;
97
96
  placeholder?: string;
98
97
  onChange: Dispatch<SetStateAction<string | undefined | null>>;
99
98
  value?: string | Date | null;
100
99
  locale?: string;
101
- variant?: 'unstyled' | 'filled' | 'outlined';
100
+ variant?: 'filled' | 'outline';
102
101
  format?: string;
103
102
  withTime?: boolean;
104
103
  minDate?: Date | null | undefined;
105
104
  maxDate?: Date | null | undefined;
106
105
  calendarFunc?: (date: any) => 'after-max-date' | 'before-min-date' | undefined;
107
106
  isDisabled?: boolean;
108
- } & InputProps;
109
- declare const InputDayPicker: ({ name, placeholder, value, onChange, locale, variant, format, withTime, minDate, maxDate, calendarFunc, isDisabled, ...inputProps }: InputDayPickerProps) => JSX.Element;
107
+ };
108
+ declare const InputDayPicker: ({ name, placeholder, value, onChange, locale, variant, format, withTime, minDate, maxDate, calendarFunc, isDisabled, ...inputProps }: InputDayPickerProps) => React.JSX.Element;
110
109
 
111
110
  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
111
  styleInject(css_248z);
@@ -120,7 +119,7 @@ type InputPhoneProps = {
120
119
  };
121
120
  declare const isValidPhone: (val: string) => boolean;
122
121
  declare const formatPhoneIntl: (val: string) => string;
123
- declare const InputPhone: ({ locale, value, placeholder, isDisabled, inputProps, ...props }: InputPhoneProps) => JSX.Element;
122
+ declare const InputPhone: ({ locale, value, placeholder, isDisabled, inputProps, ...props }: InputPhoneProps) => React.JSX.Element;
124
123
 
125
124
  interface ValueProps {
126
125
  from: Date | null | undefined;
@@ -135,12 +134,12 @@ type InputRangePickerProps = {
135
134
  format?: string;
136
135
  value?: ValueProps;
137
136
  withTime?: boolean;
138
- variant?: 'unstyled' | 'filled' | 'outlined';
137
+ variant?: 'filled' | 'outline';
139
138
  };
140
- declare const InputRangePicker: ({ fromLabel, toLabel, value, onChange, minDate, maxDate, withTime, format, variant, ...props }: InputRangePickerProps) => JSX.Element;
139
+ declare const InputRangePicker: ({ fromLabel, toLabel, value, onChange, minDate, maxDate, withTime, format, variant, ...props }: InputRangePickerProps) => React.JSX.Element;
141
140
 
142
141
  type ModalResponsiveProps = ModalProps & DrawerProps;
143
- declare const ModalResponsive: ({ isOpen, onClose, finalFocusRef, children, ...rest }: ModalResponsiveProps) => JSX.Element;
142
+ declare const ModalResponsive: ({ isOpen, onClose, finalFocusRef, children, ...rest }: ModalResponsiveProps) => React.JSX.Element;
144
143
 
145
144
  declare const getPaginationInfo: ({ page, pageSize, totalItems, }: {
146
145
  page?: number | undefined;
@@ -174,7 +173,7 @@ declare const PaginationButtonLastPage: FC<PropsWithChildren<Omit<IconButtonProp
174
173
  declare const PaginationButtonNextPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
175
174
  declare const PaginationInfo: ({ ...rest }: {
176
175
  [x: string]: any;
177
- }) => JSX.Element;
176
+ }) => React.JSX.Element;
178
177
  type PaginationProps = StackProps & {
179
178
  setPage: (page: number) => void;
180
179
  page?: number;
@@ -182,7 +181,7 @@ type PaginationProps = StackProps & {
182
181
  totalItems?: number;
183
182
  isLoadingPage?: boolean;
184
183
  };
185
- declare const Pagination: ({ setPage, page, pageSize, totalItems, isLoadingPage, children, ...rest }: PaginationProps) => JSX.Element;
184
+ declare const Pagination: ({ setPage, page, pageSize, totalItems, isLoadingPage, children, ...rest }: PaginationProps) => React.JSX.Element;
186
185
 
187
186
  type CustomProps = {
188
187
  value?: string;
@@ -190,9 +189,10 @@ type CustomProps = {
190
189
  onChange?(value?: string): void;
191
190
  delay?: number;
192
191
  clearLabel?: string;
192
+ inputProps?: object;
193
193
  };
194
194
  type SearchInputProps = Overwrite<InputProps, CustomProps>;
195
- declare const SearchInput: _chakra_ui_system.ComponentWithAs<"input", SearchInputProps>;
195
+ declare const SearchInput: _chakra_ui_system_dist_system_types.ComponentWithAs<"input", SearchInputProps>;
196
196
 
197
197
  declare module 'react' {
198
198
  function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
@@ -206,7 +206,7 @@ type SelectProps<Option, IsMulti extends boolean = false, Group extends GroupBas
206
206
  loadOptions?: (input: unknown) => TODO;
207
207
  defaultOptions?: unknown | boolean;
208
208
  debounceDelay?: number;
209
- variant?: 'unstyled' | 'filled' | 'outlined';
209
+ variant?: 'filled' | 'outline';
210
210
  } & Props<Option, IsMulti, Group> & Omit<BoxProps, 'defaultValue'>;
211
211
  declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: {
212
212
  isAsync?: boolean | undefined;
@@ -217,8 +217,8 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
217
217
  loadOptions?: ((input: unknown) => TODO) | undefined;
218
218
  defaultOptions?: unknown | boolean;
219
219
  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"> & {
220
+ variant?: "outline" | "filled" | undefined;
221
+ } & Omit<Pick<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"> & {
222
222
  placeholder?: React.ReactNode;
223
223
  tabIndex?: number | undefined;
224
224
  'aria-live'?: "off" | "assertive" | "polite" | undefined;
@@ -264,7 +264,7 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
264
264
  }) => string) | undefined;
265
265
  styles?: react_select.StylesConfig<Option, IsMulti, Group> | undefined;
266
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"> & {
267
+ } & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<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"> & {
268
268
  placeholder?: React.ReactNode;
269
269
  tabIndex?: number | undefined;
270
270
  'aria-live'?: "off" | "assertive" | "polite" | undefined;
@@ -312,9 +312,9 @@ declare const Select: <Option, IsMulti extends boolean = false, Group extends Gr
312
312
  tabSelectsValue?: boolean | undefined;
313
313
  } & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
314
314
 
315
- declare const BottomBar: (props: FlexProps) => JSX.Element;
315
+ declare const BottomBar: (props: FlexProps) => React.JSX.Element;
316
316
 
317
- declare const LayoutContainer: (props: FlexProps) => JSX.Element;
317
+ declare const LayoutContainer: (props: FlexProps) => React.JSX.Element;
318
318
 
319
319
  type SideNavProps = {
320
320
  isMobileMenuOpen: boolean;
@@ -326,24 +326,24 @@ type SideNavMenuItemProps = {
326
326
  type SideNavMenuProps = {
327
327
  textProps?: TextProps;
328
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;
329
+ declare const SideNav: ({ isMobileMenuOpen, onMobileMenuClose, children, ...props }: SideNavProps) => React.JSX.Element;
330
+ declare const SideNavContainer: (props: StackProps) => React.JSX.Element;
331
+ declare const SideNavHeader: ({ children, ...rest }: FlexProps) => React.JSX.Element;
332
+ declare const SideNavBody: ({ children, ...rest }: StackProps) => React.JSX.Element;
333
+ declare const SideNavFooter: ({ children, ...rest }: FlexProps) => React.JSX.Element;
334
+ declare const SideNavMenu: ({ title, children, textProps, ...rest }: SideNavMenuProps) => React.JSX.Element;
335
+ declare const SideNavMenuItem: ({ isActive, children, ...rest }: SideNavMenuItemProps) => React.JSX.Element;
336
336
 
337
337
  type TopBarBackActionProps = {
338
338
  backAction?: () => void;
339
339
  rightInformation?: ReactComponentElement<any>;
340
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;
341
+ declare const TopBar: (props: StackProps) => React.JSX.Element;
342
+ declare const TopBarFirstElement: (props: FlexProps) => React.JSX.Element;
343
+ declare const TopBarLastElement: (props: StackProps) => React.JSX.Element;
344
+ declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => React.JSX.Element;
345
345
 
346
- declare const theme: ThemeConfig;
346
+ declare const theme: Record<string, any>;
347
347
 
348
348
  declare const dateFormat = "dd/MM/yyyy";
349
349
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paygreen/pgui",
3
- "version": "2.9.2",
3
+ "version": "2.10.1",
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,29 @@
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",
52
+ "@chakra-ui/react": "^2.3.5",
53
53
  "@chakra-ui/theme-tools": "^2.0.14",
54
54
  "@emotion/react": "^11.9.3",
55
55
  "@emotion/styled": "^11.9.3",
56
56
  "@rollup/plugin-commonjs": "^22.0.1",
57
57
  "@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",
58
+ "@rollup/plugin-typescript": "11.1.4",
59
+ "@storybook/addon-actions": "^7.4.0",
60
+ "@storybook/addon-docs": "^7.4.0",
61
+ "@storybook/addon-essentials": "^7.4.0",
62
+ "@storybook/addon-interactions": "^7.4.0",
63
+ "@storybook/addon-links": "^7.4.0",
64
+ "@storybook/react": "^7.4.0",
65
+ "@storybook/react-webpack5": "^7.4.0",
66
+ "@storybook/testing-library": "^0.2.1-next.0",
67
+ "@trivago/prettier-plugin-sort-imports": "^4.2.1",
68
68
  "@types/react": "^18.0.26",
69
69
  "@typescript-eslint/eslint-plugin": "^5.30.6",
70
70
  "@typescript-eslint/parser": "^5.30.6",
71
71
  "babel-jest": "^26.6.3",
72
72
  "babel-loader": "^8.1.0",
73
73
  "babel-plugin-import": "^1.13.5",
74
- "babel-plugin-module-resolver": "4.1.0",
74
+ "babel-plugin-module-resolver": "^5.0.0",
75
75
  "css-loader": "^5.0.1",
76
76
  "date-fns": "^2.29.3",
77
77
  "dayjs": "^1.11.7",
@@ -100,7 +100,7 @@
100
100
  "react-input-mask": "^3.0.0-alpha.2",
101
101
  "react-phone-number-input": "^3.2.13",
102
102
  "react-select": "^5.4.0",
103
- "relative-deps": "^1.0.7",
103
+ "relative-deps": "^0.0.2",
104
104
  "rollup": "^2.77.0",
105
105
  "rollup-plugin-dts": "^4.2.2",
106
106
  "rollup-plugin-node-externals": "^4.1.1",
@@ -109,8 +109,9 @@
109
109
  "rollup-plugin-terser": "^7.0.2",
110
110
  "sass": "^1.53.0",
111
111
  "sass-loader": "^12.6.0",
112
- "storybook": "^7.0.0-beta.8",
112
+ "storybook": "^7.4.0",
113
113
  "style-loader": "^2.0.0",
114
+ "tslib": "^2.6.2",
114
115
  "typescript": "^4.7.4"
115
116
  },
116
117
  "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'];