@stenajs-webui/panels 17.34.0 → 18.0.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/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # v18.0.0 (Mon Feb 13 2023)
2
+
3
+ #### 💥 Breaking Change
4
+
5
+ - Add Toast and remake Notification [#549](https://github.com/StenaIT/stenajs-webui/pull/549) ([@juiceit](https://github.com/juiceit) [@lindskogen](https://github.com/lindskogen))
6
+
7
+ #### Authors: 2
8
+
9
+ - Johan Lindskogen ([@lindskogen](https://github.com/lindskogen))
10
+ - Josefina Andreasson ([@juiceit](https://github.com/juiceit))
11
+
12
+ ---
13
+
1
14
  # v17.23.0 (Mon Oct 24 2022)
2
15
 
3
16
  #### 🚀 Enhancement
@@ -1,16 +1,6 @@
1
- import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
1
+ import { BoxProps } from "@stenajs-webui/core";
2
2
  import * as React from "react";
3
- import { ReactNode } from "react";
4
- import { NotificationTheme } from "./NotificationTheme";
5
- export interface NotificationProps {
6
- title?: string;
7
- text?: string;
8
- content?: ReactNode;
9
- dismissed?: boolean;
10
- date?: Date;
11
- icon?: IconDefinition;
12
- iconColor?: string;
13
- onClick?: () => void;
14
- theme?: NotificationTheme;
3
+ import { NotificationHeaderProps } from "./NotificationHeader";
4
+ export interface NotificationProps extends Pick<BoxProps, "children" | "background">, NotificationHeaderProps {
15
5
  }
16
6
  export declare const Notification: React.FC<NotificationProps>;
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
3
+ export interface NotificationHeaderProps {
4
+ /** Text. */
5
+ text: string;
6
+ /** Timestamp. */
7
+ timestamp?: string;
8
+ /** Icon. */
9
+ icon?: IconDefinition;
10
+ /** Icon description for accessibility. */
11
+ iconAriaLabel?: string;
12
+ /** Icon colour. */
13
+ iconColor?: string;
14
+ /** Left content instead of icon. */
15
+ contentLeft?: React.ReactNode;
16
+ /** Right content. */
17
+ contentRight?: React.ReactNode;
18
+ /** What happens on clicking close. */
19
+ onClose?: () => void;
20
+ }
21
+ export declare const NotificationHeader: React.FC<NotificationHeaderProps>;
@@ -0,0 +1,10 @@
1
+ import { BoxProps } from "@stenajs-webui/core";
2
+ import * as React from "react";
3
+ import { NotificationHeaderProps } from "./NotificationHeader";
4
+ export interface ToastProps extends Pick<BoxProps, "children" | "width" | "maxWidth">, Omit<NotificationHeaderProps, "contentRight"> {
5
+ /** What happens on clicking the toast. */
6
+ onClick?: () => void;
7
+ /** Description of what happens on clicking the toast for accessibility. */
8
+ onClickAriaLabel?: string;
9
+ }
10
+ export declare const Toast: React.FC<ToastProps>;
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ export * from "./components/nav-bar/NavBarNotificationButton";
10
10
  export * from "./components/nav-bar/NavBarSearchField";
11
11
  export * from "./components/nav-bar/NavBarUserButton";
12
12
  export * from "./components/notifications/Notification";
13
- export * from "./components/notifications/NotificationTheme";
13
+ export * from "./components/notifications/Toast";
14
14
  export * from "./components/collapsible/Collapsible";
15
15
  export * from "./components/collapsible/CollapsibleWithCheckbox";
16
16
  export * from "./components/collapsible/CollapsibleContent";