@getsoren/design-system 4.44.0 → 4.45.1
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/main.cjs +49 -49
- package/dist/main.js +2067 -1923
- package/dist/src/components/DataDisplay/Icons/EmptyStateIcon.d.ts +2 -0
- package/dist/src/components/DataDisplay/Kanban/types.d.ts +2 -2
- package/dist/src/components/Feedback/EmptyState/EmptyState.d.ts +24 -0
- package/dist/src/main.d.ts +2 -0
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ export declare const defaultKanbanChip: Record<string, KanbanChipFormat>;
|
|
|
14
14
|
/**
|
|
15
15
|
* Props for configuring the empty state of the Kanban component.
|
|
16
16
|
*/
|
|
17
|
-
export interface
|
|
17
|
+
export interface KanbanEmptyStateProps {
|
|
18
18
|
title: string;
|
|
19
19
|
description?: string;
|
|
20
20
|
buttonText?: string;
|
|
@@ -127,5 +127,5 @@ export interface KanbanProps {
|
|
|
127
127
|
/**
|
|
128
128
|
* Optional empty state configuration.
|
|
129
129
|
*/
|
|
130
|
-
emptyState?: ReactElement |
|
|
130
|
+
emptyState?: ReactElement | KanbanEmptyStateProps;
|
|
131
131
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps } from '../../Inputs/Button';
|
|
3
|
+
export interface EmptyStateProps<RootComponent extends ElementType = "button"> {
|
|
4
|
+
/** Illustration displayed above the description. Defaults to the empty state illustration. */
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
/** Main message explaining the empty state */
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
/** Label of the action button. The button is only rendered when provided. */
|
|
9
|
+
actionLabel?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Props forwarded to the action button. Polymorphic like the Button component:
|
|
12
|
+
* pass a routing component via `component` (e.g. `{ component: Link, to: "/home" }`).
|
|
13
|
+
*/
|
|
14
|
+
actionProps?: ButtonProps<RootComponent>;
|
|
15
|
+
/** Free slot rendered below the action button for fully custom content */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Centered empty state with an illustration, a description and an optional action button.
|
|
20
|
+
* The action button accepts any root component, so consumers can plug their router link
|
|
21
|
+
* without coupling the design system to a routing library.
|
|
22
|
+
*/
|
|
23
|
+
declare const EmptyState: <RootComponent extends ElementType = "button">({ icon, description, actionLabel, actionProps, children, }: EmptyStateProps<RootComponent>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default EmptyState;
|
package/dist/src/main.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ export * from './components/Feedback/Dialog/DialogPopper';
|
|
|
39
39
|
export { default as DialogPopper } from './components/Feedback/Dialog/DialogPopper';
|
|
40
40
|
export * from './components/Feedback/Dialog/DialogValidation/DialogValidation';
|
|
41
41
|
export { default as DialogValidation } from './components/Feedback/Dialog/DialogValidation/DialogValidation';
|
|
42
|
+
export type { EmptyStateProps } from './components/Feedback/EmptyState/EmptyState';
|
|
43
|
+
export { default as EmptyState } from './components/Feedback/EmptyState/EmptyState';
|
|
42
44
|
export * from './components/Feedback/Lightbox';
|
|
43
45
|
export { default as Lightbox } from './components/Feedback/Lightbox';
|
|
44
46
|
export * from './components/Inputs/ActionAppBar';
|