@sebgroup/green-react 3.5.6 → 3.7.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.
- package/README.md +1 -1
- package/index.esm.js +2350 -5664
- package/package.json +4 -4
- package/src/index.d.ts +25 -24
- package/src/lib/accordion/accordion-item.d.ts +17 -17
- package/src/lib/accordion/accordion.d.ts +6 -6
- package/src/lib/alert-ribbon/alert-ribbon.d.ts +16 -16
- package/src/lib/badge/badge.d.ts +23 -23
- package/src/lib/breadcrumb/breadcrumb.d.ts +7 -0
- package/src/lib/card/card.d.ts +8 -8
- package/src/lib/context-menu/context-menu.d.ts +9 -9
- package/src/lib/datepicker/datepicker.d.ts +55 -22
- package/src/lib/dropdown/dropdown.d.ts +58 -58
- package/src/lib/filter-chips/filter-chips.d.ts +3 -0
- package/src/lib/form/button/button.d.ts +14 -14
- package/src/lib/form/buttonGroup/buttonGroup.d.ts +13 -13
- package/src/lib/form/checkbox/checkbox.d.ts +15 -15
- package/src/lib/form/form.d.ts +10 -10
- package/src/lib/form/formContext.d.ts +13 -13
- package/src/lib/form/formItems.d.ts +10 -10
- package/src/lib/form/group/group.d.ts +13 -13
- package/src/lib/form/iconButton/iconButton.d.ts +12 -12
- package/src/lib/form/index.d.ts +12 -12
- package/src/lib/form/input/input.d.ts +26 -26
- package/src/lib/form/radioButton/radioButton.d.ts +9 -9
- package/src/lib/form/radioButton/radioGroup.d.ts +16 -16
- package/src/lib/form/text/text.d.ts +6 -6
- package/src/lib/form/textarea/textarea.d.ts +15 -15
- package/src/lib/form/useInput.d.ts +5 -5
- package/src/lib/form/validateInput.d.ts +9 -9
- package/src/lib/formItem/formItem.d.ts +13 -13
- package/src/lib/formItem/index.d.ts +1 -1
- package/src/lib/grouped-list/grouped-list.d.ts +3 -3
- package/src/lib/icons/bankId.d.ts +2 -2
- package/src/lib/icons/check.d.ts +2 -2
- package/src/lib/icons/chevronDown.d.ts +2 -2
- package/src/lib/icons/edit.d.ts +2 -2
- package/src/lib/icons/index.d.ts +8 -8
- package/src/lib/icons/infoCircle.d.ts +2 -2
- package/src/lib/icons/square-exclamation.d.ts +2 -2
- package/src/lib/icons/square-info.d.ts +2 -2
- package/src/lib/icons/times.d.ts +2 -2
- package/src/lib/in-page-wizard/inPageWizardStepCard.d.ts +24 -24
- package/src/lib/in-page-wizard/index.d.ts +1 -1
- package/src/lib/layout/flexbox/flexbox.d.ts +13 -13
- package/src/lib/layout/flexbox/types.d.ts +5 -5
- package/src/lib/layout/index.d.ts +1 -1
- package/src/lib/link/link.d.ts +7 -7
- package/src/lib/list/index.d.ts +2 -2
- package/src/lib/list/list.d.ts +14 -14
- package/src/lib/list/listItem.d.ts +10 -10
- package/src/lib/list/valueList.d.ts +33 -33
- package/src/lib/modal/modal.d.ts +19 -19
- package/src/lib/navbar/navbar.d.ts +12 -12
- package/src/lib/popover/popover.d.ts +2 -0
- package/src/lib/select/index.d.ts +1 -1
- package/src/lib/select/select.d.ts +25 -25
- package/src/lib/slider/index.d.ts +1 -1
- package/src/lib/slider/slider.d.ts +3 -3
- package/src/lib/stepper/stepper.d.ts +15 -15
- package/src/lib/table/components/Table.d.ts +13 -13
- package/src/lib/table/components/context/TableContextProvider.d.ts +19 -19
- package/src/lib/table/components/index.d.ts +9 -9
- package/src/lib/table/components/parts/TableBody/TableBody.d.ts +4 -4
- package/src/lib/table/components/parts/TableBody/index.d.ts +1 -1
- package/src/lib/table/components/parts/TableCell/TableCell.d.ts +3 -3
- package/src/lib/table/components/parts/TableCell/index.d.ts +1 -1
- package/src/lib/table/components/parts/TableHeader/TableHeader.d.ts +4 -4
- package/src/lib/table/components/parts/TableHeader/index.d.ts +1 -1
- package/src/lib/table/components/parts/TableHeaderCell/TableHeaderCell.d.ts +9 -9
- package/src/lib/table/components/parts/TableHeaderCell/index.d.ts +1 -1
- package/src/lib/table/components/parts/TableRow/TableRow.d.ts +15 -15
- package/src/lib/table/components/parts/TableRow/index.d.ts +1 -1
- package/src/lib/table/components/parts/helperFunctions/helperFunctions.d.ts +51 -51
- package/src/lib/table/components/parts/helperFunctions/index.d.ts +1 -1
- package/src/lib/table/components/table-typings.d.ts +14 -14
- package/src/lib/table/story/multiple-story-tables.d.ts +17 -17
- package/src/lib/tabs/tabs.d.ts +26 -26
- package/src/types/index.d.ts +1 -1
- package/src/types/props/index.d.ts +40 -40
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
interface ValueListProps {
|
|
3
|
-
children?: ReactElement<ValueListItemProps> | ReactElement<ValueListItemProps>[];
|
|
4
|
-
inverted?: boolean;
|
|
5
|
-
}
|
|
6
|
-
interface ValueListItemProps {
|
|
7
|
-
children: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated
|
|
11
|
-
* Use `GroupedList` instead.
|
|
12
|
-
*/
|
|
13
|
-
export declare const Label: ({ children }: ValueListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated
|
|
16
|
-
* Use `GroupedList` instead.
|
|
17
|
-
*/
|
|
18
|
-
export declare const Value: ({ children }: ValueListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated
|
|
21
|
-
* Use `GroupedList` instead.
|
|
22
|
-
*/
|
|
23
|
-
export declare const List: ({ children, inverted }: ValueListProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated
|
|
26
|
-
* Use `GroupedList` instead.
|
|
27
|
-
*/
|
|
28
|
-
declare const _default: {
|
|
29
|
-
List: ({ children, inverted }: ValueListProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
Label: ({ children }: ValueListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
Value: ({ children }: ValueListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
};
|
|
33
|
-
export default _default;
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
interface ValueListProps {
|
|
3
|
+
children?: ReactElement<ValueListItemProps> | ReactElement<ValueListItemProps>[];
|
|
4
|
+
inverted?: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface ValueListItemProps {
|
|
7
|
+
children: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated
|
|
11
|
+
* Use `GroupedList` instead.
|
|
12
|
+
*/
|
|
13
|
+
export declare const Label: ({ children }: ValueListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated
|
|
16
|
+
* Use `GroupedList` instead.
|
|
17
|
+
*/
|
|
18
|
+
export declare const Value: ({ children }: ValueListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated
|
|
21
|
+
* Use `GroupedList` instead.
|
|
22
|
+
*/
|
|
23
|
+
export declare const List: ({ children, inverted }: ValueListProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
* Use `GroupedList` instead.
|
|
27
|
+
*/
|
|
28
|
+
declare const _default: {
|
|
29
|
+
List: ({ children, inverted }: ValueListProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
Label: ({ children }: ValueListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
Value: ({ children }: ValueListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
package/src/lib/modal/modal.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ModalType, Size } from '@sebgroup/extract';
|
|
2
|
-
import { MouseEvent, ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
export interface ModalProps {
|
|
5
|
-
type?: ModalType;
|
|
6
|
-
header?: string;
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
confirm?: string;
|
|
9
|
-
dismiss?: string;
|
|
10
|
-
size?: Size;
|
|
11
|
-
id?: string;
|
|
12
|
-
isOpen?: boolean;
|
|
13
|
-
onClose?: ModalEventListener;
|
|
14
|
-
onConfirm?: ModalEventListener;
|
|
15
|
-
onDismiss?: ModalEventListener;
|
|
16
|
-
preventBackdropClose?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare const Modal: ({ type, id, isOpen, size, ...props }: ModalProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
-
export default Modal;
|
|
1
|
+
import { ModalType, Size } from '@sebgroup/extract';
|
|
2
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
3
|
+
type ModalEventListener = (event: MouseEvent<HTMLButtonElement | HTMLDivElement> | null) => unknown;
|
|
4
|
+
export interface ModalProps {
|
|
5
|
+
type?: ModalType;
|
|
6
|
+
header?: string;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
confirm?: string;
|
|
9
|
+
dismiss?: string;
|
|
10
|
+
size?: Size;
|
|
11
|
+
id?: string;
|
|
12
|
+
isOpen?: boolean;
|
|
13
|
+
onClose?: ModalEventListener;
|
|
14
|
+
onConfirm?: ModalEventListener;
|
|
15
|
+
onDismiss?: ModalEventListener;
|
|
16
|
+
preventBackdropClose?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const Modal: ({ type, id, isOpen, size, ...props }: ModalProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
export default Modal;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { NavbarVariant } from '@sebgroup/extract';
|
|
2
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
export interface NavProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
-
title?: string;
|
|
5
|
-
titleLink?: string;
|
|
6
|
-
brandLink?: string;
|
|
7
|
-
brandAriaLabel?: string;
|
|
8
|
-
variant?: NavbarVariant;
|
|
9
|
-
children?: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
export declare const Navbar: ({ children, variant, title, titleLink, brandLink, brandAriaLabel, }: NavProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export default Navbar;
|
|
1
|
+
import { NavbarVariant } from '@sebgroup/extract';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
export interface NavProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
title?: string;
|
|
5
|
+
titleLink?: string;
|
|
6
|
+
brandLink?: string;
|
|
7
|
+
brandAriaLabel?: string;
|
|
8
|
+
variant?: NavbarVariant;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const Navbar: ({ children, variant, title, titleLink, brandLink, brandAriaLabel, }: NavProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Navbar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './select';
|
|
1
|
+
export * from './select';
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IExpandableInformation, ILabelAndLabelInformation, IValidator } from '@sebgroup/extract';
|
|
3
|
-
export interface SelectProps extends IExpandableInformation, ILabelAndLabelInformation, React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> {
|
|
4
|
-
label: string;
|
|
5
|
-
info?: string;
|
|
6
|
-
validator?: IValidator | undefined;
|
|
7
|
-
value?: string;
|
|
8
|
-
testId?: string;
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated
|
|
11
|
-
* Use `info` instead
|
|
12
|
-
*/
|
|
13
|
-
labelInformation?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
|
16
|
-
|
|
17
|
-
export declare const Option: (props: OptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
|
|
19
|
-
export declare const OptionGroup: (props: OptGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
declare const _default: {
|
|
21
|
-
Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
|
22
|
-
Option: (props: OptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
OptionGroup: (props: OptGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
};
|
|
25
|
-
export default _default;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IExpandableInformation, ILabelAndLabelInformation, IValidator } from '@sebgroup/extract';
|
|
3
|
+
export interface SelectProps extends IExpandableInformation, ILabelAndLabelInformation, React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> {
|
|
4
|
+
label: string;
|
|
5
|
+
info?: string;
|
|
6
|
+
validator?: IValidator | undefined;
|
|
7
|
+
value?: string;
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated
|
|
11
|
+
* Use `info` instead
|
|
12
|
+
*/
|
|
13
|
+
labelInformation?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
|
16
|
+
type OptionProps = React.DetailedHTMLProps<React.OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>;
|
|
17
|
+
export declare const Option: (props: OptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
type OptGroupProps = React.DetailedHTMLProps<React.OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>;
|
|
19
|
+
export declare const OptionGroup: (props: OptGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare const _default: {
|
|
21
|
+
Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
|
22
|
+
Option: (props: OptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
OptionGroup: (props: OptGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './slider';
|
|
1
|
+
export * from './slider';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SliderProps } from '../../types';
|
|
2
|
-
export declare function Slider({ name, value, defaultValue, min, max, minMaxFormat, showMinMax, step, label, instruction, errorMessage, hasTextbox, unitLabel, disabled, onChange, enableClamping, onClamp, enterKeyHint, }: SliderProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export default Slider;
|
|
1
|
+
import { SliderProps } from '../../types';
|
|
2
|
+
export declare function Slider({ name, value, defaultValue, min, max, minMaxFormat, showMinMax, step, label, instruction, errorMessage, hasTextbox, unitLabel, disabled, onChange, enableClamping, onClamp, enterKeyHint, }: SliderProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default Slider;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { IValidator } from '@sebgroup/extract';
|
|
2
|
-
import { ChangeEventHandler, DetailedHTMLProps, InputHTMLAttributes } from 'react';
|
|
3
|
-
export interface StepperProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
4
|
-
id?: string;
|
|
5
|
-
value?: string | number;
|
|
6
|
-
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
7
|
-
label?: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
statusMessage?: string;
|
|
10
|
-
validator?: IValidator;
|
|
11
|
-
onIncrease?: () => void;
|
|
12
|
-
onDecrease?: () => void;
|
|
13
|
-
testId?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare function Stepper({ id, label, description, statusMessage, validator, value, onChange, onIncrease, onDecrease, testId, ...props }: StepperProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { IValidator } from '@sebgroup/extract';
|
|
2
|
+
import { ChangeEventHandler, DetailedHTMLProps, InputHTMLAttributes } from 'react';
|
|
3
|
+
export interface StepperProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
4
|
+
id?: string;
|
|
5
|
+
value?: string | number;
|
|
6
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
7
|
+
label?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
statusMessage?: string;
|
|
10
|
+
validator?: IValidator;
|
|
11
|
+
onIncrease?: () => void;
|
|
12
|
+
onDecrease?: () => void;
|
|
13
|
+
testId?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function Stepper({ id, label, description, statusMessage, validator, value, onChange, onIncrease, onDecrease, testId, ...props }: StepperProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SortedColumn } from './context/TableContextProvider';
|
|
3
|
-
export
|
|
4
|
-
/** callback when row is selected */
|
|
5
|
-
onRowSelect?: (event: React.ChangeEvent<HTMLInputElement>, rowKey: string) => void;
|
|
6
|
-
/** callback when row is expanded */
|
|
7
|
-
onRowExpand?: (isExpanded: boolean, rowKey: string) => void;
|
|
8
|
-
/** callback when column is sorted */
|
|
9
|
-
onSort?: (sortedColumn: SortedColumn) => void;
|
|
10
|
-
/** preset sorted column */
|
|
11
|
-
sortedColumn?: SortedColumn | null;
|
|
12
|
-
};
|
|
13
|
-
export declare const Table: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<TableProps, "ref"> & React.RefAttributes<HTMLTableElement>>>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SortedColumn } from './context/TableContextProvider';
|
|
3
|
+
export type TableProps = JSX.IntrinsicElements['table'] & {
|
|
4
|
+
/** callback when row is selected */
|
|
5
|
+
onRowSelect?: (event: React.ChangeEvent<HTMLInputElement>, rowKey: string) => void;
|
|
6
|
+
/** callback when row is expanded */
|
|
7
|
+
onRowExpand?: (isExpanded: boolean, rowKey: string) => void;
|
|
8
|
+
/** callback when column is sorted */
|
|
9
|
+
onSort?: (sortedColumn: SortedColumn) => void;
|
|
10
|
+
/** preset sorted column */
|
|
11
|
+
sortedColumn?: SortedColumn | null;
|
|
12
|
+
};
|
|
13
|
+
export declare const Table: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<TableProps, "ref"> & React.RefAttributes<HTMLTableElement>>>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SortDirection } from '../table-typings';
|
|
3
|
-
export interface SortedColumn<T = any> {
|
|
4
|
-
accessor?: keyof T;
|
|
5
|
-
sortDirection: SortDirection;
|
|
6
|
-
}
|
|
7
|
-
export interface TableState {
|
|
8
|
-
sortedColumn: SortedColumn | null;
|
|
9
|
-
expandedRows: Array<string>;
|
|
10
|
-
}
|
|
11
|
-
export
|
|
12
|
-
tableState: TableState;
|
|
13
|
-
setTableState: (newState: TableState) => void;
|
|
14
|
-
onRowSelect?: (event: React.ChangeEvent<HTMLInputElement>, rowKey: string) => void;
|
|
15
|
-
onRowExpand?: (isExpanded: boolean, rowKey: string) => void;
|
|
16
|
-
onSort?: (sortedColumn: SortedColumn) => void;
|
|
17
|
-
};
|
|
18
|
-
export declare const TableContext: React.Context<TableContextType>;
|
|
19
|
-
export declare const useTableContext: () => TableContextType;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SortDirection } from '../table-typings';
|
|
3
|
+
export interface SortedColumn<T = any> {
|
|
4
|
+
accessor?: keyof T;
|
|
5
|
+
sortDirection: SortDirection;
|
|
6
|
+
}
|
|
7
|
+
export interface TableState {
|
|
8
|
+
sortedColumn: SortedColumn | null;
|
|
9
|
+
expandedRows: Array<string>;
|
|
10
|
+
}
|
|
11
|
+
export type TableContextType = {
|
|
12
|
+
tableState: TableState;
|
|
13
|
+
setTableState: (newState: TableState) => void;
|
|
14
|
+
onRowSelect?: (event: React.ChangeEvent<HTMLInputElement>, rowKey: string) => void;
|
|
15
|
+
onRowExpand?: (isExpanded: boolean, rowKey: string) => void;
|
|
16
|
+
onSort?: (sortedColumn: SortedColumn) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const TableContext: React.Context<TableContextType>;
|
|
19
|
+
export declare const useTableContext: () => TableContextType;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './table-typings';
|
|
2
|
-
export * from './context/TableContextProvider';
|
|
3
|
-
export * from './parts/helperFunctions';
|
|
4
|
-
export * from './parts/TableCell';
|
|
5
|
-
export * from './parts/TableBody';
|
|
6
|
-
export * from './parts/TableHeader';
|
|
7
|
-
export * from './parts/TableHeaderCell';
|
|
8
|
-
export * from './parts/TableRow';
|
|
9
|
-
export * from './Table';
|
|
1
|
+
export * from './table-typings';
|
|
2
|
+
export * from './context/TableContextProvider';
|
|
3
|
+
export * from './parts/helperFunctions';
|
|
4
|
+
export * from './parts/TableCell';
|
|
5
|
+
export * from './parts/TableBody';
|
|
6
|
+
export * from './parts/TableHeader';
|
|
7
|
+
export * from './parts/TableHeaderCell';
|
|
8
|
+
export * from './parts/TableRow';
|
|
9
|
+
export * from './Table';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export
|
|
3
|
-
declare const TableBody: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
-
export { TableBody };
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type TableBodyProps = JSX.IntrinsicElements['tbody'];
|
|
3
|
+
declare const TableBody: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
+
export { TableBody };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './TableBody';
|
|
1
|
+
export * from './TableBody';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export
|
|
3
|
-
export declare const TableCell: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & React.RefAttributes<HTMLTableCellElement>>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type TableCellProps = JSX.IntrinsicElements['td'];
|
|
3
|
+
export declare const TableCell: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & React.RefAttributes<HTMLTableCellElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './TableCell';
|
|
1
|
+
export * from './TableCell';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export
|
|
3
|
-
declare const TableHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
-
export { TableHeader };
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type TableHeaderProps = JSX.IntrinsicElements['thead'];
|
|
3
|
+
declare const TableHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
+
export { TableHeader };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './TableHeader';
|
|
1
|
+
export * from './TableHeader';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SortDirection } from '../../table-typings';
|
|
3
|
-
export
|
|
4
|
-
accessor?: keyof T;
|
|
5
|
-
disableSort?: boolean;
|
|
6
|
-
sortDirection?: SortDirection;
|
|
7
|
-
};
|
|
8
|
-
declare const TableHeaderCell: React.ForwardRefExoticComponent<Omit<TableHeaderCellProps<any>, "ref"> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
|
-
export { TableHeaderCell };
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SortDirection } from '../../table-typings';
|
|
3
|
+
export type TableHeaderCellProps<T = any> = JSX.IntrinsicElements['th'] & {
|
|
4
|
+
accessor?: keyof T;
|
|
5
|
+
disableSort?: boolean;
|
|
6
|
+
sortDirection?: SortDirection;
|
|
7
|
+
};
|
|
8
|
+
declare const TableHeaderCell: React.ForwardRefExoticComponent<Omit<TableHeaderCellProps<any>, "ref"> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
|
+
export { TableHeaderCell };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './TableHeaderCell';
|
|
1
|
+
export * from './TableHeaderCell';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export
|
|
3
|
-
checked?: boolean;
|
|
4
|
-
indeterminate?: boolean;
|
|
5
|
-
isHeaderRow?: boolean;
|
|
6
|
-
hideSelect?: boolean;
|
|
7
|
-
uniqueKey?: string;
|
|
8
|
-
parentKey?: string;
|
|
9
|
-
isExpanded?: boolean;
|
|
10
|
-
isSubRow?: boolean;
|
|
11
|
-
collapseButtonProps?: JSX.IntrinsicElements['button'];
|
|
12
|
-
checkboxProps?: JSX.IntrinsicElements['input'];
|
|
13
|
-
};
|
|
14
|
-
declare const TableRow: React.ForwardRefExoticComponent<Omit<TableRowProps, "ref"> & React.RefAttributes<HTMLTableRowElement>>;
|
|
15
|
-
export { TableRow };
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type TableRowProps = JSX.IntrinsicElements['tr'] & {
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
indeterminate?: boolean;
|
|
5
|
+
isHeaderRow?: boolean;
|
|
6
|
+
hideSelect?: boolean;
|
|
7
|
+
uniqueKey?: string;
|
|
8
|
+
parentKey?: string;
|
|
9
|
+
isExpanded?: boolean;
|
|
10
|
+
isSubRow?: boolean;
|
|
11
|
+
collapseButtonProps?: JSX.IntrinsicElements['button'];
|
|
12
|
+
checkboxProps?: JSX.IntrinsicElements['input'];
|
|
13
|
+
};
|
|
14
|
+
declare const TableRow: React.ForwardRefExoticComponent<Omit<TableRowProps, "ref"> & React.RefAttributes<HTMLTableRowElement>>;
|
|
15
|
+
export { TableRow };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './TableRow';
|
|
1
|
+
export * from './TableRow';
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FilterColumn, GenericTableRow, SortDirection } from '../../table-typings';
|
|
3
|
-
/**
|
|
4
|
-
* sum the total of columns or cols in a row
|
|
5
|
-
* @param colsLength the length of the columns
|
|
6
|
-
* @param useSelection add a column for selection checkboxes
|
|
7
|
-
* @param useShowActionColumn add another column for action columns
|
|
8
|
-
* @param useGroupBy add another columns for groupby
|
|
9
|
-
*/
|
|
10
|
-
export declare function sumCols(colsLength: number, useSelection?: boolean, useShowActionColumn?: boolean, useGroupBy?: boolean): number;
|
|
11
|
-
/**
|
|
12
|
-
* sort array of tabke rows
|
|
13
|
-
* @param items table rows array
|
|
14
|
-
* @param columnName the target column name
|
|
15
|
-
* @param sortDirection the sort direction
|
|
16
|
-
* @return Array of tableRow
|
|
17
|
-
*/
|
|
18
|
-
export declare function sortArray<T>(items: T[] | undefined, columnName: keyof T, sortDirection: SortDirection): Array<T>;
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @param data table data
|
|
22
|
-
* @param filterColumns filter columns
|
|
23
|
-
*/
|
|
24
|
-
export declare function filterArrayByColumns<T>(data: Array<T>, filterColumns: Array<FilterColumn<T>>): Array<T>;
|
|
25
|
-
/**
|
|
26
|
-
* search text in array of table row
|
|
27
|
-
* @param data the array of table rows
|
|
28
|
-
* @param keyword The keyword to search in the array
|
|
29
|
-
* @param searchFields the target field to search
|
|
30
|
-
*/
|
|
31
|
-
export declare function searchTextByColumns<T>(data: Array<T>, keyword: string, searchFields: Array<keyof T>): Array<T>;
|
|
32
|
-
/**
|
|
33
|
-
* paginate data
|
|
34
|
-
* @param data table data
|
|
35
|
-
* @param offset page size
|
|
36
|
-
* @param currentPage current page index
|
|
37
|
-
*/
|
|
38
|
-
export declare function paginate<T = any>(data: Array<T>, offset: number, currentPage: number): T[];
|
|
39
|
-
export interface RowSelectOutput<T = any> {
|
|
40
|
-
data: Array<GenericTableRow<T>>;
|
|
41
|
-
isAllSelected: boolean;
|
|
42
|
-
isIndeterminate: boolean;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* on row select
|
|
46
|
-
* @param event input event
|
|
47
|
-
* @param data rows of data
|
|
48
|
-
* @param rowUniqueAccessor row unique accessor
|
|
49
|
-
* @param rowId row id value
|
|
50
|
-
*/
|
|
51
|
-
export declare function onRowSelect<T = any>(event: React.ChangeEvent<HTMLInputElement>, data: Array<GenericTableRow<T>>, rowUniqueAccessor: keyof GenericTableRow<T>, rowId: string): RowSelectOutput<T>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterColumn, GenericTableRow, SortDirection } from '../../table-typings';
|
|
3
|
+
/**
|
|
4
|
+
* sum the total of columns or cols in a row
|
|
5
|
+
* @param colsLength the length of the columns
|
|
6
|
+
* @param useSelection add a column for selection checkboxes
|
|
7
|
+
* @param useShowActionColumn add another column for action columns
|
|
8
|
+
* @param useGroupBy add another columns for groupby
|
|
9
|
+
*/
|
|
10
|
+
export declare function sumCols(colsLength: number, useSelection?: boolean, useShowActionColumn?: boolean, useGroupBy?: boolean): number;
|
|
11
|
+
/**
|
|
12
|
+
* sort array of tabke rows
|
|
13
|
+
* @param items table rows array
|
|
14
|
+
* @param columnName the target column name
|
|
15
|
+
* @param sortDirection the sort direction
|
|
16
|
+
* @return Array of tableRow
|
|
17
|
+
*/
|
|
18
|
+
export declare function sortArray<T>(items: T[] | undefined, columnName: keyof T, sortDirection: SortDirection): Array<T>;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param data table data
|
|
22
|
+
* @param filterColumns filter columns
|
|
23
|
+
*/
|
|
24
|
+
export declare function filterArrayByColumns<T>(data: Array<T>, filterColumns: Array<FilterColumn<T>>): Array<T>;
|
|
25
|
+
/**
|
|
26
|
+
* search text in array of table row
|
|
27
|
+
* @param data the array of table rows
|
|
28
|
+
* @param keyword The keyword to search in the array
|
|
29
|
+
* @param searchFields the target field to search
|
|
30
|
+
*/
|
|
31
|
+
export declare function searchTextByColumns<T>(data: Array<T>, keyword: string, searchFields: Array<keyof T>): Array<T>;
|
|
32
|
+
/**
|
|
33
|
+
* paginate data
|
|
34
|
+
* @param data table data
|
|
35
|
+
* @param offset page size
|
|
36
|
+
* @param currentPage current page index
|
|
37
|
+
*/
|
|
38
|
+
export declare function paginate<T = any>(data: Array<T>, offset: number, currentPage: number): T[];
|
|
39
|
+
export interface RowSelectOutput<T = any> {
|
|
40
|
+
data: Array<GenericTableRow<T>>;
|
|
41
|
+
isAllSelected: boolean;
|
|
42
|
+
isIndeterminate: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* on row select
|
|
46
|
+
* @param event input event
|
|
47
|
+
* @param data rows of data
|
|
48
|
+
* @param rowUniqueAccessor row unique accessor
|
|
49
|
+
* @param rowId row id value
|
|
50
|
+
*/
|
|
51
|
+
export declare function onRowSelect<T = any>(event: React.ChangeEvent<HTMLInputElement>, data: Array<GenericTableRow<T>>, rowUniqueAccessor: keyof GenericTableRow<T>, rowId: string): RowSelectOutput<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './helperFunctions';
|
|
1
|
+
export * from './helperFunctions';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export declare enum SortDirection {
|
|
2
|
-
ASC = "ASC",
|
|
3
|
-
DESC = "DESC"
|
|
4
|
-
}
|
|
5
|
-
export interface FilterColumn<T = any> {
|
|
6
|
-
accessor: keyof T;
|
|
7
|
-
value: any;
|
|
8
|
-
}
|
|
9
|
-
export
|
|
10
|
-
id?: string;
|
|
11
|
-
checked?: boolean;
|
|
12
|
-
expanded?: boolean;
|
|
13
|
-
indeterminate?: boolean;
|
|
14
|
-
};
|
|
1
|
+
export declare enum SortDirection {
|
|
2
|
+
ASC = "ASC",
|
|
3
|
+
DESC = "DESC"
|
|
4
|
+
}
|
|
5
|
+
export interface FilterColumn<T = any> {
|
|
6
|
+
accessor: keyof T;
|
|
7
|
+
value: any;
|
|
8
|
+
}
|
|
9
|
+
export type GenericTableRow<T = any> = T & {
|
|
10
|
+
id?: string;
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
expanded?: boolean;
|
|
13
|
+
indeterminate?: boolean;
|
|
14
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import { TableHeaderCellProps, GenericTableRow } from '../components';
|
|
3
|
-
interface SuperHeroData {
|
|
4
|
-
id: ReactNode;
|
|
5
|
-
firstName: ReactNode;
|
|
6
|
-
lastName: ReactNode;
|
|
7
|
-
superHero: ReactNode;
|
|
8
|
-
rowContentDetails?: GenericTableRow<SuperHeroData>[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare const columnData: SuperHeroColumnDataT[];
|
|
13
|
-
export declare const rowData: SuperHeroRowData[];
|
|
14
|
-
export declare const SortableTable: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare const SelectableTable: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export declare const ExpandableTable: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export {};
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { TableHeaderCellProps, GenericTableRow } from '../components';
|
|
3
|
+
interface SuperHeroData {
|
|
4
|
+
id: ReactNode;
|
|
5
|
+
firstName: ReactNode;
|
|
6
|
+
lastName: ReactNode;
|
|
7
|
+
superHero: ReactNode;
|
|
8
|
+
rowContentDetails?: GenericTableRow<SuperHeroData>[];
|
|
9
|
+
}
|
|
10
|
+
type SuperHeroRowData = GenericTableRow<SuperHeroData>;
|
|
11
|
+
type SuperHeroColumnDataT = Omit<TableHeaderCellProps<SuperHeroRowData>, 'ref'> & React.RefAttributes<HTMLTableCellElement>;
|
|
12
|
+
export declare const columnData: SuperHeroColumnDataT[];
|
|
13
|
+
export declare const rowData: SuperHeroRowData[];
|
|
14
|
+
export declare const SortableTable: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const SelectableTable: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const ExpandableTable: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|