greenole-design-system 1.1.82 → 1.1.84
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/RangeSlider/RangeSlider.stories.d.ts +5 -5
- package/dist/base-components/Toast/Toast.types.d.ts +3 -2
- package/dist/base-components/Toast/ToastProvider.d.ts +1 -1
- package/dist/base-components/Tooltip/Tooltip.types.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +17 -2
- package/dist/components/Card/Card.stories.d.ts +5 -4
- package/dist/components/Card/Card.styles.d.ts +13 -10
- package/dist/components/Card/Card.types.d.ts +28 -19
- package/dist/components/Card/index.d.ts +1 -4
- package/dist/components/Modal/Modal.types.d.ts +2 -1
- package/dist/components/Search/Search.stories.d.ts +2 -0
- package/dist/components/Search/Search.styles.d.ts +3 -0
- package/dist/components/Search/Search.types.d.ts +5 -3
- package/dist/components/Table/Table.styles.d.ts +1 -1
- package/dist/components/Table/Table.types.d.ts +2 -2
- package/dist/components/Timeline/Timeline.stories.d.ts +1 -0
- package/dist/components/Timeline/Timeline.styles.d.ts +1 -0
- package/dist/components/Timeline/Timeline.types.d.ts +1 -0
- package/dist/greenole-design-system.cjs.js +408 -378
- package/dist/greenole-design-system.js +6129 -5991
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/components/Card/CardBody.d.ts +0 -4
- package/dist/components/Card/CardFooter.d.ts +0 -4
- package/dist/components/Card/CardHeader.d.ts +0 -4
|
@@ -3,16 +3,16 @@ import { default as RangeSlider } from './RangeSlider';
|
|
|
3
3
|
declare const meta: Meta<typeof RangeSlider>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof RangeSlider>;
|
|
6
|
-
/**
|
|
6
|
+
/** Editable and controlled base */
|
|
7
7
|
export declare const Playground: Story;
|
|
8
|
-
/**
|
|
8
|
+
/** Without value display */
|
|
9
9
|
export declare const WithoutValue: Story;
|
|
10
|
-
/**
|
|
10
|
+
/** Different colors and values */
|
|
11
11
|
export declare const BlueMid: Story;
|
|
12
12
|
export declare const RedHigh: Story;
|
|
13
13
|
export declare const YellowLow: Story;
|
|
14
14
|
export declare const CustomRange: Story;
|
|
15
|
-
/**
|
|
15
|
+
/** Box with border */
|
|
16
16
|
export declare const WithBorder: Story;
|
|
17
|
-
/**
|
|
17
|
+
/** Plain number only */
|
|
18
18
|
export declare const WithoutBorder: Story;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { THookTypes } from '../../utils/i18n/types';
|
|
3
|
-
export type ToastVariant =
|
|
4
|
-
export type ToastPosition =
|
|
3
|
+
export type ToastVariant = 'success' | 'error' | 'warning' | 'info';
|
|
4
|
+
export type ToastPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
5
5
|
export interface ToastProps {
|
|
6
6
|
id?: string;
|
|
7
7
|
variant?: ToastVariant;
|
|
@@ -12,6 +12,7 @@ export interface ToastProps {
|
|
|
12
12
|
autoDismissTime?: number;
|
|
13
13
|
closable?: boolean;
|
|
14
14
|
className?: string;
|
|
15
|
+
container?: HTMLElement;
|
|
15
16
|
onClose?: () => void;
|
|
16
17
|
t?: THookTypes;
|
|
17
18
|
}
|
|
@@ -10,7 +10,7 @@ type ToastItem = {
|
|
|
10
10
|
autoDismissTime: number;
|
|
11
11
|
};
|
|
12
12
|
type ToastContextType = {
|
|
13
|
-
showToast: (message: string, variant?: ToastVariant, options?: Partial<Omit<ToastItem,
|
|
13
|
+
showToast: (message: string, variant?: ToastVariant, options?: Partial<Omit<ToastItem, 'id' | 'message' | 'variant'>>) => void;
|
|
14
14
|
clearToasts: () => void;
|
|
15
15
|
};
|
|
16
16
|
export declare const ToastProvider: React.FC<{
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CardProps } from './Card.types';
|
|
3
|
-
declare const
|
|
2
|
+
import { CardContentProps, CardDescriptionProps, CardProps, CardSectionProps, CardTitleProps } from './Card.types';
|
|
3
|
+
declare const CardHeader: React.FC<CardSectionProps>;
|
|
4
|
+
declare const CardTitle: React.FC<CardTitleProps>;
|
|
5
|
+
declare const CardDescription: React.FC<CardDescriptionProps>;
|
|
6
|
+
declare const CardAction: React.FC<CardSectionProps>;
|
|
7
|
+
declare const CardContent: React.FC<CardContentProps>;
|
|
8
|
+
declare const CardFooter: React.FC<CardSectionProps>;
|
|
9
|
+
type CardCompound = React.FC<CardProps> & {
|
|
10
|
+
Header: typeof CardHeader;
|
|
11
|
+
Title: typeof CardTitle;
|
|
12
|
+
Description: typeof CardDescription;
|
|
13
|
+
Action: typeof CardAction;
|
|
14
|
+
Content: typeof CardContent;
|
|
15
|
+
Footer: typeof CardFooter;
|
|
16
|
+
};
|
|
17
|
+
declare const Card: CardCompound;
|
|
18
|
+
export { CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, };
|
|
4
19
|
export default Card;
|
|
@@ -3,7 +3,8 @@ import { Card } from './';
|
|
|
3
3
|
declare const meta: Meta<typeof Card>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Card>;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const AlertsWithScroll: Story;
|
|
8
|
+
export declare const InsightsWithScroll: Story;
|
|
9
|
+
export declare const CommandLogsWithFilterAndSearch: Story;
|
|
10
|
+
export declare const AllCardFeatures: Story;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
export declare const CardWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
2
|
$width?: string;
|
|
3
3
|
$height?: string;
|
|
4
|
+
$padding?: string;
|
|
5
|
+
$gap?: string;
|
|
6
|
+
$bordered: boolean;
|
|
7
|
+
$shadow: boolean;
|
|
8
|
+
$dividers: boolean;
|
|
4
9
|
}>> & string;
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
$
|
|
11
|
-
|
|
12
|
-
export declare const CardBodyContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
|
-
export declare const CardFooterWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
14
|
-
$align: "left" | "center" | "right";
|
|
10
|
+
export declare const CardHeaderCompound: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
|
+
export declare const CardTitleCompound: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
+
export declare const CardDescriptionCompound: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
|
+
export declare const CardActionCompound: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
14
|
+
export declare const CardContentCompound: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
15
|
+
$scrollable?: boolean;
|
|
16
|
+
$maxHeight?: string;
|
|
15
17
|
}>> & string;
|
|
18
|
+
export declare const CardFooterCompound: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
className?: string;
|
|
2
|
+
import { TypographyVariant } from '../Typography/Typography';
|
|
3
|
+
export interface CardLayout {
|
|
5
4
|
width?: string | number;
|
|
6
5
|
height?: string | number;
|
|
6
|
+
padding?: string | number;
|
|
7
|
+
gap?: string | number;
|
|
7
8
|
}
|
|
8
|
-
export interface
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
icon?: ReactNode;
|
|
13
|
-
actions?: ReactNode;
|
|
14
|
-
background?: string;
|
|
9
|
+
export interface CardOptions {
|
|
10
|
+
bordered?: boolean;
|
|
11
|
+
shadow?: boolean;
|
|
12
|
+
dividers?: boolean;
|
|
15
13
|
}
|
|
16
|
-
export interface
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
image?: ReactNode;
|
|
14
|
+
export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
15
|
+
layout?: CardLayout;
|
|
16
|
+
options?: CardOptions;
|
|
17
|
+
children?: ReactNode;
|
|
21
18
|
}
|
|
22
|
-
export interface
|
|
23
|
-
children
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
export interface CardSectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export interface CardContentProps extends CardSectionProps {
|
|
23
|
+
scrollable?: boolean;
|
|
24
|
+
maxHeight?: string | number;
|
|
25
|
+
}
|
|
26
|
+
export interface CardTitleProps extends Omit<HTMLAttributes<HTMLHeadingElement>, "title"> {
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
variant?: TypographyVariant;
|
|
29
|
+
color?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface CardDescriptionProps extends Omit<HTMLAttributes<HTMLParagraphElement>, "title"> {
|
|
32
|
+
children?: ReactNode;
|
|
33
|
+
variant?: TypographyVariant;
|
|
34
|
+
color?: string;
|
|
26
35
|
}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export { default as Card } from './Card';
|
|
1
|
+
export { default as Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from './Card';
|
|
2
2
|
export * from './Card.types';
|
|
3
|
-
export { default as CardBody } from './CardBody';
|
|
4
|
-
export { default as CardFooter } from './CardFooter';
|
|
5
|
-
export { default as CardHeader } from './CardHeader';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { THookTypes } from '../../utils/i18n/types';
|
|
3
|
-
export type ModalType =
|
|
3
|
+
export type ModalType = 'success' | 'error' | 'warning';
|
|
4
4
|
export type ModalTypeIcon = {
|
|
5
5
|
[key in ModalType]?: React.ReactNode;
|
|
6
6
|
};
|
|
@@ -15,6 +15,7 @@ export interface ModalProps {
|
|
|
15
15
|
showOverlay?: boolean;
|
|
16
16
|
cancelButton?: ReactNode;
|
|
17
17
|
confirmButton?: ReactNode;
|
|
18
|
+
container?: HTMLElement;
|
|
18
19
|
onCancel?: () => void;
|
|
19
20
|
onConfirm?: () => void;
|
|
20
21
|
onClose?: () => void;
|
|
@@ -22,3 +22,5 @@ export declare const ForceRightAnimation: Story;
|
|
|
22
22
|
export declare const AlignmentRight: Story;
|
|
23
23
|
export declare const AlignmentLeftAndRight: Story;
|
|
24
24
|
export declare const InSmallContainer: Story;
|
|
25
|
+
export declare const clearable: Story;
|
|
26
|
+
export declare const clearableLeft: Story;
|
|
@@ -4,6 +4,8 @@ export declare const SearchWrapper: import('styled-components/dist/types').IStyl
|
|
|
4
4
|
$alignment?: "left" | "right";
|
|
5
5
|
$isMobile?: boolean;
|
|
6
6
|
$expandedWidth?: string;
|
|
7
|
+
$clearable?: boolean;
|
|
8
|
+
$size?: "sm" | "md";
|
|
7
9
|
}>> & string;
|
|
8
10
|
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>, {
|
|
9
11
|
$disabled?: boolean;
|
|
@@ -11,4 +13,5 @@ export declare const SearchIconButton: import('styled-components/dist/types').IS
|
|
|
11
13
|
$iconColor?: string;
|
|
12
14
|
$alignment?: "left" | "right";
|
|
13
15
|
$isMobile?: boolean;
|
|
16
|
+
$clearable?: boolean;
|
|
14
17
|
}>> & string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { THookTypes } from '../../utils/i18n/types';
|
|
2
|
-
export type SearchMode =
|
|
3
|
-
export type SearchAnimationDirection =
|
|
4
|
-
export type SearchAlignment =
|
|
2
|
+
export type SearchMode = 'collapsed' | 'expanded';
|
|
3
|
+
export type SearchAnimationDirection = 'left' | 'right' | 'auto';
|
|
4
|
+
export type SearchAlignment = 'left' | 'right';
|
|
5
5
|
export interface SearchProps {
|
|
6
6
|
mode?: SearchMode;
|
|
7
7
|
alignment?: SearchAlignment;
|
|
@@ -19,4 +19,6 @@ export interface SearchProps {
|
|
|
19
19
|
animationDirection?: SearchAnimationDirection;
|
|
20
20
|
isMobile?: boolean;
|
|
21
21
|
expandedWidth?: string;
|
|
22
|
+
clearable?: boolean;
|
|
23
|
+
size?: 'sm' | 'md';
|
|
22
24
|
}
|
|
@@ -47,6 +47,6 @@ export declare const TableFilterWrapper: import('styled-components/dist/types').
|
|
|
47
47
|
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;
|
|
48
48
|
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;
|
|
49
49
|
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>, {
|
|
50
|
-
$variant?: "default" | "danger" | "warning";
|
|
50
|
+
$variant?: "default" | "danger" | "warning" | "confirm";
|
|
51
51
|
$disabled?: boolean;
|
|
52
52
|
}>> & string;
|
|
@@ -21,9 +21,9 @@ export interface TableColumn<T = any> {
|
|
|
21
21
|
}
|
|
22
22
|
export interface TableRowAction<T = any> {
|
|
23
23
|
key: string;
|
|
24
|
-
label:
|
|
24
|
+
label: ReactNode;
|
|
25
25
|
icon?: ReactNode;
|
|
26
|
-
variant?: 'default' | 'danger' | 'warning';
|
|
26
|
+
variant?: 'default' | 'danger' | 'warning' | 'confirm';
|
|
27
27
|
onClick: (row: T) => void;
|
|
28
28
|
visible?: (row: T) => boolean;
|
|
29
29
|
disabled?: (row: T) => boolean;
|
|
@@ -23,5 +23,6 @@ export declare const Label: import('styled-components/dist/types').IStyledCompon
|
|
|
23
23
|
$isTimeline?: boolean;
|
|
24
24
|
$isFirst?: boolean;
|
|
25
25
|
$isLast?: boolean;
|
|
26
|
+
$centerEdgeLabels?: boolean;
|
|
26
27
|
}>> & string;
|
|
27
28
|
export declare const MessageWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|