@foris/avocado-suite 1.8.24 → 1.8.26
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.
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import type { FC, ReactNode } from 'react';
|
|
2
2
|
import type { IconTypes } from '../../../../avocado-icons';
|
|
3
3
|
export interface CardAccordionProps {
|
|
4
|
-
/**
|
|
4
|
+
/** Primary call to action, rendered below the header when condensed */
|
|
5
5
|
actionContent?: ReactNode;
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/** Accessible name of the card, required when `title` is not a plain string */
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
/** Collapsible panel content. Without it the card renders no panel */
|
|
9
|
+
children?: ReactNode;
|
|
8
10
|
/** Overwrite className */
|
|
9
11
|
className?: string;
|
|
12
|
+
/** Layout density, defaults to 'expanded'. Mobile always renders condensed */
|
|
13
|
+
density?: 'expanded' | 'condensed';
|
|
10
14
|
/** Description content */
|
|
11
|
-
description?: ReactNode
|
|
15
|
+
description?: ReactNode;
|
|
12
16
|
/** Disabled state */
|
|
13
17
|
disabled?: boolean;
|
|
14
18
|
/** Size Icon */
|
|
@@ -17,10 +21,21 @@ export interface CardAccordionProps {
|
|
|
17
21
|
iconName?: IconTypes;
|
|
18
22
|
/** Gradient Icon */
|
|
19
23
|
iconGradient?: boolean;
|
|
20
|
-
/**
|
|
24
|
+
/** Overflow control, always rendered beside the chevron */
|
|
25
|
+
menuContent?: ReactNode;
|
|
26
|
+
/** Toggle handler, its presence turns the card controlled */
|
|
27
|
+
onToggle?: (opened: boolean) => void;
|
|
28
|
+
/** Open state: initial when uncontrolled, required with `onToggle` */
|
|
21
29
|
opened?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
title:
|
|
30
|
+
/** A string renders in `Heading h3`, other nodes plain, hence `ariaLabel` */
|
|
31
|
+
title: ReactNode;
|
|
32
|
+
/** Cosmetic variant, only radius and panel background. Default 'default' */
|
|
33
|
+
type?: 'default' | 'expressive';
|
|
24
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* A header click landing on one of these belongs to the consumer, not the toggle.
|
|
37
|
+
* Exported so the tests assert against the same list.
|
|
38
|
+
*/
|
|
39
|
+
export declare const INTERACTIVE_SELECTOR: string;
|
|
25
40
|
declare const CardAccordion: FC<CardAccordionProps>;
|
|
26
41
|
export default CardAccordion;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { FC, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { IconTypes } from '../../../../avocado-icons';
|
|
2
3
|
declare enum NotificationState {
|
|
3
4
|
Warning = "warning",
|
|
4
5
|
Error = "error",
|
|
5
6
|
Info = "info",
|
|
6
|
-
Success = "success"
|
|
7
|
+
Success = "success",
|
|
8
|
+
Neutral = "neutral"
|
|
7
9
|
}
|
|
8
10
|
export interface CardNotificationProps {
|
|
9
11
|
/** Content card notification */
|
|
@@ -14,12 +16,17 @@ export interface CardNotificationProps {
|
|
|
14
16
|
dismissible?: boolean;
|
|
15
17
|
/** Extra content to be displayed below the main content of the card */
|
|
16
18
|
extraContent?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Overrides the default state icon, or sets one for `neutral`
|
|
21
|
+
* (which has no default icon).
|
|
22
|
+
*/
|
|
23
|
+
icon?: IconTypes;
|
|
17
24
|
/** Outlined variant */
|
|
18
25
|
outlined?: boolean;
|
|
19
26
|
/** State or variant of the notification */
|
|
20
27
|
state: `${NotificationState}`;
|
|
21
28
|
/** Title of the notification */
|
|
22
|
-
title
|
|
29
|
+
title?: ReactElement | string;
|
|
23
30
|
}
|
|
24
31
|
declare const CardNotification: FC<CardNotificationProps>;
|
|
25
32
|
export default CardNotification;
|