@paygreen/pgui 2.1.0 → 2.1.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.
@@ -1,6 +1,12 @@
1
1
  import React, { FC } from 'react';
2
2
  import { AccordionProps, FlexProps } from '@chakra-ui/react';
3
- export declare const DataListContext: React.Context<any>;
3
+ declare type DataListColumns = Record<string, DataListCellProps>;
4
+ declare type DataListContextValue = {
5
+ setColumns: React.Dispatch<React.SetStateAction<DataListColumns>>;
6
+ columns: DataListColumns;
7
+ isHover: boolean;
8
+ };
9
+ export declare const DataListContext: React.Context<DataListContextValue>;
4
10
  export declare const DataListHeaderContext: React.Context<boolean>;
5
11
  export declare type DataListCellProps = FlexProps & {
6
12
  colName?: string;
@@ -33,3 +39,4 @@ export declare type DataListProps = AccordionProps & {
33
39
  isHover?: boolean;
34
40
  };
35
41
  export declare const DataList: FC<React.PropsWithChildren<DataListProps>>;
42
+ export {};
@@ -4,7 +4,7 @@ export declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaul
4
4
  children?: ReactNode;
5
5
  errorMessage?: ReactNode;
6
6
  helper?: ReactNode;
7
- id?: string;
7
+ id: string;
8
8
  isRequired?: boolean;
9
9
  label?: ReactNode;
10
10
  showError?: boolean;
package/dist/index.d.ts CHANGED
@@ -6,7 +6,13 @@ declare type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
6
6
  };
7
7
  declare const ActionsButton: FC<React.PropsWithChildren<ActionsButtonProps>>;
8
8
 
9
- declare const DataListContext: React.Context<any>;
9
+ declare type DataListColumns = Record<string, DataListCellProps>;
10
+ declare type DataListContextValue = {
11
+ setColumns: React.Dispatch<React.SetStateAction<DataListColumns>>;
12
+ columns: DataListColumns;
13
+ isHover: boolean;
14
+ };
15
+ declare const DataListContext: React.Context<DataListContextValue>;
10
16
  declare const DataListHeaderContext: React.Context<boolean>;
11
17
  declare type DataListCellProps = FlexProps & {
12
18
  colName?: string;
@@ -44,7 +50,7 @@ declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue'
44
50
  children?: ReactNode;
45
51
  errorMessage?: ReactNode;
46
52
  helper?: ReactNode;
47
- id?: string;
53
+ id: string;
48
54
  isRequired?: boolean;
49
55
  label?: ReactNode;
50
56
  showError?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paygreen/pgui",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "PGUI is the design system coming grom Paygreen.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",