greenole-design-system 1.1.79 → 1.1.81
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/Checkbox/Checkbox.styles.d.ts +1 -0
- package/dist/base-components/Checkbox/Checkbox.types.d.ts +2 -0
- package/dist/base-components/Toast/Toast.types.d.ts +4 -2
- package/dist/components/Accordion/types.d.ts +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +2 -0
- package/dist/components/Calendar/Calendar.d.ts +0 -2
- package/dist/components/Calendar/Calendar.types.d.ts +2 -0
- package/dist/components/Calendar/DateRangePicker.d.ts +3 -1
- package/dist/components/Drawer/Drawer.types.d.ts +4 -1
- package/dist/components/Filter/Filter.stories.d.ts +1 -0
- package/dist/components/Filter/Filter.types.d.ts +2 -0
- package/dist/components/Modal/Modal.types.d.ts +3 -1
- package/dist/components/Search/Search.styles.d.ts +5 -5
- package/dist/components/Search/Search.types.d.ts +7 -3
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.stories.d.ts +4 -0
- package/dist/components/Table/Table.styles.d.ts +0 -1
- package/dist/components/Table/Table.types.d.ts +4 -0
- package/dist/greenole-design-system.cjs.js +582 -569
- package/dist/greenole-design-system.js +6317 -6212
- package/dist/greenole.css +20 -0
- package/dist/index.css +1 -1
- package/package.json +4 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const HiddenInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
2
2
|
export declare const Box: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
3
3
|
$checked: boolean;
|
|
4
|
+
$indeterminate?: boolean;
|
|
4
5
|
$color: string;
|
|
5
6
|
$disabled?: boolean;
|
|
6
7
|
}>> & string;
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
export type CheckboxProps = {
|
|
3
3
|
checked?: boolean;
|
|
4
4
|
defaultChecked?: boolean;
|
|
5
|
+
indeterminate?: boolean;
|
|
5
6
|
onChange?: (checked: boolean) => void;
|
|
6
7
|
color?: string;
|
|
7
8
|
disabled?: boolean;
|
|
@@ -10,4 +11,5 @@ export type CheckboxProps = {
|
|
|
10
11
|
name?: string;
|
|
11
12
|
value?: string;
|
|
12
13
|
label?: ReactNode;
|
|
14
|
+
ariaLabel?: string;
|
|
13
15
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export type
|
|
2
|
+
import { THookTypes } from '../../utils/i18n/types';
|
|
3
|
+
export type ToastVariant = "success" | "error" | "warning" | "info";
|
|
4
|
+
export type ToastPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
4
5
|
export interface ToastProps {
|
|
5
6
|
id?: string;
|
|
6
7
|
variant?: ToastVariant;
|
|
@@ -12,4 +13,5 @@ export interface ToastProps {
|
|
|
12
13
|
closable?: boolean;
|
|
13
14
|
className?: string;
|
|
14
15
|
onClose?: () => void;
|
|
16
|
+
t?: THookTypes;
|
|
15
17
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { THookTypes } from '../../utils/i18n/types';
|
|
2
3
|
export interface AccordionProps {
|
|
3
4
|
title: ReactNode;
|
|
4
5
|
subtitle?: string;
|
|
@@ -10,4 +11,5 @@ export interface AccordionProps {
|
|
|
10
11
|
noPaddingContent?: boolean;
|
|
11
12
|
contentMaxHeight?: number | string;
|
|
12
13
|
children: ReactNode;
|
|
14
|
+
t?: THookTypes;
|
|
13
15
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { THookTypes } from '../../utils/i18n/types';
|
|
2
3
|
export interface BreadcrumbItem {
|
|
3
4
|
label: string;
|
|
4
5
|
href?: string;
|
|
@@ -14,4 +15,5 @@ export interface BreadcrumbProps {
|
|
|
14
15
|
homeIcon?: ReactNode;
|
|
15
16
|
isMobile?: boolean;
|
|
16
17
|
onHomeClick?: () => void;
|
|
18
|
+
t?: THookTypes;
|
|
17
19
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { InputProps } from '../../base-components/Input/Input.types';
|
|
3
|
-
import { THookTypes } from '../../utils/i18n/types';
|
|
4
3
|
import { CalendarProps } from './Calendar.types';
|
|
5
4
|
interface ExtendedCalendarProps extends CalendarProps {
|
|
6
5
|
inputProps?: InputProps;
|
|
7
6
|
autoClose?: boolean;
|
|
8
|
-
t?: THookTypes;
|
|
9
7
|
clearable?: boolean;
|
|
10
8
|
placeholder?: string;
|
|
11
9
|
dropdownLimit?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
|
+
import { THookTypes } from '../../utils/i18n/types';
|
|
2
3
|
export type DateRange = {
|
|
3
4
|
start: Dayjs | null;
|
|
4
5
|
end: Dayjs | null;
|
|
@@ -16,4 +17,5 @@ export interface CalendarProps {
|
|
|
16
17
|
showPresets?: boolean;
|
|
17
18
|
isMobile?: boolean;
|
|
18
19
|
rangeSinglePanel?: boolean;
|
|
20
|
+
t?: THookTypes;
|
|
19
21
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { DateRange } from './Calendar.types';
|
|
4
|
+
import { THookTypes } from '../../utils/i18n/types';
|
|
4
5
|
interface Props {
|
|
5
|
-
mode:
|
|
6
|
+
mode: "single" | "range";
|
|
6
7
|
selectedDate?: Dayjs | null;
|
|
7
8
|
selectedRange?: DateRange;
|
|
8
9
|
onChange: (date: Dayjs | null, range?: DateRange) => void;
|
|
@@ -13,6 +14,7 @@ interface Props {
|
|
|
13
14
|
rangeSinglePanel?: boolean;
|
|
14
15
|
/** Ativa espaçamento/tamanhos mais confortáveis */
|
|
15
16
|
isMobile?: boolean;
|
|
17
|
+
t?: THookTypes;
|
|
16
18
|
}
|
|
17
19
|
export declare const DateRangePicker: React.FC<Props>;
|
|
18
20
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { THookTypes } from '../../utils/i18n/types';
|
|
2
3
|
import { LinearStepperStep } from '../Timeline/Timeline.types';
|
|
3
4
|
export interface DrawerProps {
|
|
4
5
|
show: boolean;
|
|
@@ -10,13 +11,15 @@ export interface DrawerProps {
|
|
|
10
11
|
showOverlay?: boolean;
|
|
11
12
|
cancelButtonText?: string;
|
|
12
13
|
confirmButtonText?: string;
|
|
13
|
-
direction?:
|
|
14
|
+
direction?: "left" | "right";
|
|
14
15
|
cancelButton?: ReactNode;
|
|
15
16
|
confirmButton?: ReactNode;
|
|
16
17
|
steps?: LinearStepperStep[];
|
|
17
18
|
activeStep?: number;
|
|
19
|
+
container?: HTMLElement;
|
|
18
20
|
onStepChange?: (step: number) => void;
|
|
19
21
|
onCancel?: () => void;
|
|
20
22
|
onConfirm?: () => void;
|
|
21
23
|
onClose?: () => void;
|
|
24
|
+
t?: THookTypes;
|
|
22
25
|
}
|
|
@@ -5,6 +5,7 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof Filter>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const WithCheckboxes: Story;
|
|
8
|
+
export declare const WithDisabledItems: Story;
|
|
8
9
|
export declare const MixedFilters: Story;
|
|
9
10
|
export declare const WithInitialValues: Story;
|
|
10
11
|
export declare const CompleteExample: Story;
|
|
@@ -11,6 +11,8 @@ export interface FilterItem {
|
|
|
11
11
|
value: string | string[];
|
|
12
12
|
options: FilterItemOption[];
|
|
13
13
|
multiple?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
onClear?: (output: FilterOutput) => void;
|
|
14
16
|
}
|
|
15
17
|
export interface FilterSelectedValues {
|
|
16
18
|
[key: string]: string | string[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import { THookTypes } from '../../utils/i18n/types';
|
|
3
|
+
export type ModalType = "success" | "error" | "warning";
|
|
3
4
|
export type ModalTypeIcon = {
|
|
4
5
|
[key in ModalType]?: React.ReactNode;
|
|
5
6
|
};
|
|
@@ -17,4 +18,5 @@ export interface ModalProps {
|
|
|
17
18
|
onCancel?: () => void;
|
|
18
19
|
onConfirm?: () => void;
|
|
19
20
|
onClose?: () => void;
|
|
21
|
+
t?: THookTypes;
|
|
20
22
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export declare const SearchWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
|
-
$
|
|
2
|
+
$visible: boolean;
|
|
3
3
|
$disabled?: boolean;
|
|
4
4
|
$alignment?: "left" | "right";
|
|
5
|
+
$isMobile?: boolean;
|
|
6
|
+
$expandedWidth?: string;
|
|
5
7
|
}>> & string;
|
|
6
8
|
export declare const SearchIconButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
7
9
|
$disabled?: boolean;
|
|
8
10
|
$visible?: boolean;
|
|
9
11
|
$iconColor?: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
$expanded: boolean;
|
|
13
|
-
$direction?: "left" | "right";
|
|
12
|
+
$alignment?: "left" | "right";
|
|
13
|
+
$isMobile?: boolean;
|
|
14
14
|
}>> & string;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
1
|
+
import { THookTypes } from '../../utils/i18n/types';
|
|
2
|
+
export type SearchMode = "collapsed" | "expanded";
|
|
3
|
+
export type SearchAnimationDirection = "left" | "right" | "auto";
|
|
4
|
+
export type SearchAlignment = "left" | "right";
|
|
4
5
|
export interface SearchProps {
|
|
5
6
|
mode?: SearchMode;
|
|
6
7
|
alignment?: SearchAlignment;
|
|
7
8
|
iconColor?: string;
|
|
8
9
|
placeholder?: string;
|
|
10
|
+
t?: THookTypes;
|
|
9
11
|
defaultValue?: string;
|
|
10
12
|
value?: string;
|
|
11
13
|
disabled?: boolean;
|
|
@@ -15,4 +17,6 @@ export interface SearchProps {
|
|
|
15
17
|
onSubmit?: (value: string) => void;
|
|
16
18
|
className?: string;
|
|
17
19
|
animationDirection?: SearchAnimationDirection;
|
|
20
|
+
isMobile?: boolean;
|
|
21
|
+
expandedWidth?: string;
|
|
18
22
|
}
|
|
@@ -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, 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, title, filterConfig, onFilterChange, rowActions, rowActionsLabel, enableRowSelection, rowIdKey, onSelectionChange, t: tProp, }: Readonly<TableProps<T>>) => React.JSX.Element;
|
|
4
4
|
export default Table;
|
|
@@ -4,6 +4,9 @@ declare const meta: Meta<typeof Table>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Table>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
+
export declare const WithTitle: Story;
|
|
8
|
+
export declare const WithTitleAndSearch: Story;
|
|
9
|
+
export declare const WithTitleSearchAndActions: Story;
|
|
7
10
|
export declare const ManageColumns: Story;
|
|
8
11
|
export declare const SortableWithRenderContent: Story;
|
|
9
12
|
export declare const FetchData: Story;
|
|
@@ -17,3 +20,4 @@ export declare const WithFilter: Story;
|
|
|
17
20
|
export declare const WithFilterAndActions: Story;
|
|
18
21
|
export declare const WithFilterAndFetchData: Story;
|
|
19
22
|
export declare const WithRowActions: Story;
|
|
23
|
+
export declare const WithRowSelection: Story;
|
|
@@ -10,7 +10,6 @@ export declare const TableHeaderSearchInputWrapper: import('styled-components/di
|
|
|
10
10
|
$visible: boolean;
|
|
11
11
|
$isMobile: boolean;
|
|
12
12
|
}>> & string;
|
|
13
|
-
export declare const TableHeaderSearchRightSlot: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
14
13
|
export declare const TableHeaderButtons: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
15
14
|
$isMobile?: boolean;
|
|
16
15
|
$hasTitle?: boolean;
|
|
@@ -38,6 +38,7 @@ interface BaseTableProps<T = any> {
|
|
|
38
38
|
onItemsPerPageChange: (items: number) => void;
|
|
39
39
|
onSearchChange?: (value: string) => void;
|
|
40
40
|
title?: string;
|
|
41
|
+
searchIconColor?: string;
|
|
41
42
|
showSearch?: boolean;
|
|
42
43
|
isMobile?: boolean;
|
|
43
44
|
loading?: boolean;
|
|
@@ -46,6 +47,9 @@ interface BaseTableProps<T = any> {
|
|
|
46
47
|
filterContent?: ReactNode;
|
|
47
48
|
actions?: ReactNode;
|
|
48
49
|
t?: THookTypes;
|
|
50
|
+
enableRowSelection?: boolean;
|
|
51
|
+
rowIdKey?: keyof T | string;
|
|
52
|
+
onSelectionChange?: (selectedRowIds: string[]) => void;
|
|
49
53
|
filterConfig?: {
|
|
50
54
|
items: FilterItem[];
|
|
51
55
|
initialValues?: FilterSelectedValues;
|