greenole-design-system 1.1.68 → 1.1.70
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/dist/base-components/DropdownMenu/DropdownMenu.styles.d.ts +0 -1
- package/dist/components/Accordion/Accordion.stories.d.ts +2 -0
- package/dist/components/Accordion/Accordion.styles.d.ts +3 -1
- package/dist/components/Accordion/types.d.ts +4 -0
- package/dist/components/Drawer/Drawer.types.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.stories.d.ts +2 -0
- package/dist/components/Table/Table.styles.d.ts +6 -0
- package/dist/components/Table/Table.types.d.ts +12 -0
- package/dist/greenole-design-system.cjs.js +539 -479
- package/dist/greenole-design-system.js +5695 -5518
- package/dist/greenole.css +25 -0
- package/dist/index.css +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,6 @@ export declare const DropdownMenuTriggerButton: import('styled-components/dist/t
|
|
|
4
4
|
export declare const DropdownMenuContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
5
5
|
$position: DropdownMenuPositionProps;
|
|
6
6
|
$limit?: boolean;
|
|
7
|
-
$animate: boolean;
|
|
8
7
|
$usePortal?: boolean;
|
|
9
8
|
}>> & string;
|
|
10
9
|
export declare const DropdownMenuArrow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
@@ -5,6 +5,8 @@ export declare const TitleWrapper: import('styled-components/dist/types').IStyle
|
|
|
5
5
|
export declare const ChevronContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
6
6
|
$isOpen: boolean;
|
|
7
7
|
}>> & string;
|
|
8
|
-
export declare const AccordionContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').
|
|
8
|
+
export declare const AccordionContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
9
|
+
$noPaddingContent: boolean;
|
|
10
|
+
}>> & string;
|
|
9
11
|
export declare const SubtitleContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
12
|
export declare const SubtitleIconContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TableProps } from './Table.types';
|
|
3
|
-
declare const Table: <T extends Record<string, any>>({ columns, data, currentPage, totalItems, headerExtra, actions, isMobile, itemsPerPage, loading, striped, showSearch, showManageColumns, tableKey, fetchData, onPageChange, onItemsPerPageChange, filterConfig, onFilterChange, t: tProp, }: Readonly<TableProps<T>>) => React.JSX.Element;
|
|
3
|
+
declare const Table: <T extends Record<string, any>>({ columns, data, currentPage, totalItems, headerExtra, filterContent, actions, isMobile, itemsPerPage, loading, striped, showSearch, showManageColumns, tableKey, fetchData, onPageChange, onItemsPerPageChange, filterConfig, onFilterChange, rowActions, rowActionsLabel, t: tProp, }: Readonly<TableProps<T>>) => React.JSX.Element;
|
|
4
4
|
export default Table;
|
|
@@ -13,4 +13,6 @@ export declare const WithActionsAndHeaderExtra: Story;
|
|
|
13
13
|
export declare const ColumnFiltersLocalData: Story;
|
|
14
14
|
export declare const ColumnFiltersFetchData: Story;
|
|
15
15
|
export declare const WithFilter: Story;
|
|
16
|
+
export declare const WithFilterAndActions: Story;
|
|
16
17
|
export declare const WithFilterAndFetchData: Story;
|
|
18
|
+
export declare const WithRowActions: Story;
|
|
@@ -42,3 +42,9 @@ export declare const TableColumnManagerItemDrag: import('styled-components/dist/
|
|
|
42
42
|
export declare const TableColumnManagerButtons: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
43
43
|
export declare const TableButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
44
44
|
export declare const TableFilterWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
45
|
+
export declare const TableRowActionsButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
46
|
+
export declare const TableRowActionsDropdownContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
47
|
+
export declare const TableRowActionItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
48
|
+
$variant?: "default" | "danger" | "warning";
|
|
49
|
+
$disabled?: boolean;
|
|
50
|
+
}>> & string;
|
|
@@ -11,6 +11,15 @@ export interface TableColumn<T = any> {
|
|
|
11
11
|
filterable?: boolean;
|
|
12
12
|
filterValueAccessor?: (row: T) => string | string[] | undefined | null;
|
|
13
13
|
}
|
|
14
|
+
export interface TableRowAction<T = any> {
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
icon?: ReactNode;
|
|
18
|
+
variant?: 'default' | 'danger' | 'warning';
|
|
19
|
+
onClick: (row: T) => void;
|
|
20
|
+
visible?: (row: T) => boolean;
|
|
21
|
+
disabled?: (row: T) => boolean;
|
|
22
|
+
}
|
|
14
23
|
interface BaseTableProps<T = any> {
|
|
15
24
|
columns: TableColumn[];
|
|
16
25
|
data?: T[];
|
|
@@ -33,6 +42,7 @@ interface BaseTableProps<T = any> {
|
|
|
33
42
|
loading?: boolean;
|
|
34
43
|
striped?: boolean;
|
|
35
44
|
headerExtra?: ReactNode;
|
|
45
|
+
filterContent?: ReactNode;
|
|
36
46
|
actions?: ReactNode;
|
|
37
47
|
t?: THookTypes;
|
|
38
48
|
filterConfig?: {
|
|
@@ -41,6 +51,8 @@ interface BaseTableProps<T = any> {
|
|
|
41
51
|
label?: string;
|
|
42
52
|
};
|
|
43
53
|
onFilterChange?: (output: FilterOutput) => void;
|
|
54
|
+
rowActions?: TableRowAction<T>[];
|
|
55
|
+
rowActionsLabel?: string;
|
|
44
56
|
}
|
|
45
57
|
interface TableWithoutColumnManagement<T = any> extends BaseTableProps<T> {
|
|
46
58
|
showManageColumns?: false;
|