greenole-design-system 1.1.94 → 1.1.95

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.
@@ -14,3 +14,6 @@ export declare const IconCircle: Story;
14
14
  export declare const WithIcons: Story;
15
15
  export declare const LoadingState: Story;
16
16
  export declare const Disabled: Story;
17
+ export declare const VariantMatrix: Story;
18
+ export declare const SizesAndShapes: Story;
19
+ export declare const IconsAndStates: Story;
@@ -1,4 +1,4 @@
1
- export declare const TypographyWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
1
+ export declare const ButtonLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
2
2
  export declare const StyledButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
3
3
  $variant: "primary" | "secondary" | "tertiary" | "link";
4
4
  $size: "sm" | "md" | "lg";
@@ -1,5 +1,4 @@
1
1
  import { ButtonHTMLAttributes, ReactNode } from 'react';
2
- import { TypographyVariant } from '../../components/Typography/Typography';
3
2
  export type ButtonVariant = "primary" | "secondary" | "tertiary" | "link";
4
3
  export type ButtonSize = "sm" | "md" | "lg";
5
4
  export type ButtonColor = "default" | "danger";
@@ -11,7 +10,6 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
11
10
  color?: ButtonColor;
12
11
  shape?: ButtonShape;
13
12
  fullWidth?: boolean;
14
- typography?: TypographyVariant;
15
13
  loading?: boolean;
16
14
  iconLeft?: ReactNode;
17
15
  iconRight?: ReactNode;
@@ -29,3 +29,11 @@ export declare const FilterActionButton: import('styled-components/dist/types').
29
29
  export declare const CaretIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').SVGProps<SVGSVGElement>, {
30
30
  $open: boolean;
31
31
  }>> & string;
32
+ export declare const FilterSortMobileTrigger: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
33
+ export declare const FilterSortMobileSheet: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
34
+ export declare const FilterSortMobileSheetHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
35
+ export declare const FilterSortMobileSheetTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
36
+ export declare const FilterSortMobileList: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
37
+ export declare const FilterSortMobileListItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
38
+ $selected?: boolean;
39
+ }>> & string;
@@ -37,3 +37,18 @@ export interface FilterProps {
37
37
  icon?: ReactNode;
38
38
  borderless?: boolean;
39
39
  }
40
+ export interface FilterSortMobileOption {
41
+ label: string;
42
+ value: string;
43
+ }
44
+ export interface FilterSortMobileProps {
45
+ options: FilterSortMobileOption[];
46
+ value?: string;
47
+ onChange?: (value: string) => void;
48
+ labelPrefix?: string;
49
+ emptyLabel?: string;
50
+ sheetTitle?: string;
51
+ className?: string;
52
+ disabled?: boolean;
53
+ t?: THookTypes;
54
+ }
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { FilterSortMobileProps } from './Filter.types';
3
+ declare const FilterSortMobile: React.FC<FilterSortMobileProps>;
4
+ export default FilterSortMobile;
@@ -1,2 +1,3 @@
1
1
  export { default as Filter } from './Filter';
2
- export type { FilterProps, FilterItem, FilterItemOption, FilterSelectedValues, FilterOutput, } from './Filter.types';
2
+ export { default as FilterSortMobile } from './FilterSortMobile';
3
+ export type { FilterProps, FilterItem, FilterItemOption, FilterSelectedValues, FilterOutput, FilterSortMobileProps, FilterSortMobileOption, } from './Filter.types';
@@ -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, filterContent, actions, isMobile, itemsPerPage, loading, striped, showSearch, showManageColumns, tableKey, fetchData, queryResult, onPageChange, onItemsPerPageChange, onSearchChange, title, filterConfig, onFilterChange, rowActions, rowActionsLabel, enableRowSelection, rowIdKey, rowIdResolver, onSelectionChange, onCurrentPageDataChange, 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, queryResult, onPageChange, onItemsPerPageChange, onSearchChange, sortingMode, filteringMode, enableFilterByColumnsMobile, mobileCentralizedFilter, enableFilterByColumns, desktopIntegratedFilter, desktopCentralizedFilter, initialColumnFilters, title, filterConfig, onFilterChange, rowActions, rowActionsLabel, enableRowSelection, rowIdKey, rowIdResolver, onSelectionChange, onCurrentPageDataChange, t: tProp, }: Readonly<TableProps<T>>) => React.JSX.Element;
4
4
  export default Table;
@@ -23,3 +23,7 @@ export declare const WithFilterAndFetchData: Story;
23
23
  export declare const WithRowActions: Story;
24
24
  export declare const WithRowSelection: Story;
25
25
  export declare const WithRowSelectionUsingResolver: Story;
26
+ export declare const DesktopVisualizationFilterActive: Story;
27
+ export declare const MobileVisualizationClientSide: Story;
28
+ export declare const MobileVisualizationServerSide: Story;
29
+ export declare const MobileVisualizationSelectorAndActions: Story;
@@ -15,14 +15,41 @@ export declare const TableHeaderButtons: import('styled-components/dist/types').
15
15
  $hasTitle?: boolean;
16
16
  }>> & string;
17
17
  export declare const TableHeaderManageColumns: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
18
+ export declare const TableMobileControls: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
19
+ export declare const TableMobileSortDirectionButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
20
+ export declare const TableMobileSortByWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
21
+ export declare const TableMobileFilterButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
22
+ export declare const TableMobileFilterSheet: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
23
+ export declare const TableMobileFilterSheetHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
24
+ export declare const TableMobileFilterSheetTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
25
+ export declare const TableMobileFilterSheetSections: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
26
+ export declare const TableMobileFilterSheetSection: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
27
+ export declare const TableMobileFilterSheetSectionLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
28
+ export declare const TableMobileFilterSheetActions: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
29
+ export declare const TableMobileFilterSheetActionButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
30
+ $variant: "reset" | "apply";
31
+ }>> & string;
18
32
  export declare const TableHead: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
19
33
  export declare const TableHeadDropdown: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
20
34
  export declare const TableContentWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
21
35
  $hasOpenFilter?: boolean;
36
+ $isMobile?: boolean;
22
37
  }>> & string;
23
38
  export declare const TableContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, {
24
39
  $striped?: boolean;
25
40
  }>> & string;
41
+ export declare const MobileTableCards: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
42
+ export declare const MobileTableCard: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
43
+ export declare const MobileTableCardTopBar: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
44
+ $withSelection?: boolean;
45
+ }>> & string;
46
+ export declare const MobileTableCardSelection: 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 MobileTableCardField: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
48
+ export declare const MobileTableCardFieldHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
49
+ export declare const MobileTableCardFieldLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
50
+ export declare const MobileTableCardFieldValue: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
51
+ export declare const MobileTableCardActions: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
52
+ export declare const MobileTableEmpty: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
26
53
  export declare const TableFooter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
27
54
  export declare const LoadingWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
28
55
  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>, {
@@ -30,6 +30,8 @@ export interface TableRowAction<T = any> {
30
30
  visible?: (row: T) => boolean;
31
31
  disabled?: (row: T) => boolean;
32
32
  }
33
+ export type TableSortingMode = 'client' | 'server';
34
+ export type TableFilteringMode = 'client' | 'server';
33
35
  interface BaseTableProps<T = any> {
34
36
  columns: TableColumn[];
35
37
  data?: T[];
@@ -39,6 +41,14 @@ interface BaseTableProps<T = any> {
39
41
  onPageChange: (page: number) => void;
40
42
  onItemsPerPageChange: (items: number) => void;
41
43
  onSearchChange?: (value: string) => void;
44
+ sortingMode?: TableSortingMode;
45
+ filteringMode?: TableFilteringMode;
46
+ enableFilterByColumnsMobile?: boolean;
47
+ mobileCentralizedFilter?: boolean;
48
+ enableFilterByColumns?: boolean;
49
+ desktopIntegratedFilter?: boolean;
50
+ desktopCentralizedFilter?: boolean;
51
+ initialColumnFilters?: Record<string, string[]>;
42
52
  title?: string;
43
53
  searchIconColor?: string;
44
54
  sizeSearch?: SearchSize;
@@ -78,6 +88,8 @@ interface TableWithFetchData<T = any> extends BaseTableProps<T> {
78
88
  itemsPerPage: number;
79
89
  search?: string;
80
90
  filters?: Record<string, string[]>;
91
+ sortBy?: string;
92
+ sortDirection?: 'asc' | 'desc';
81
93
  }) => Promise<{
82
94
  data: T[];
83
95
  count: number;
@@ -1,2 +1,2 @@
1
1
  export { default as Table } from './Table';
2
- export type { TableProps, TableColumn, TableRowAction, TableQueryResult } from './Table.types';
2
+ export type { TableProps, TableColumn, TableRowAction, TableQueryResult, TableSortingMode, TableFilteringMode, } from './Table.types';