@stenajs-webui/panels 19.0.0-next.9 → 19.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.
Files changed (32) hide show
  1. package/dist/components/action-menu-button/ActionMenuButton.d.ts +2 -1
  2. package/dist/components/collapsible/Collapsible.d.ts +2 -9
  3. package/dist/components/collapsible/CollapsibleGroupHeading.d.ts +2 -3
  4. package/dist/components/collapsible/CollapsibleList.d.ts +6 -0
  5. package/dist/components/error-panel/ErrorPanel.d.ts +8 -1
  6. package/dist/components/nav-bar/NavBarSearchField.d.ts +4 -2
  7. package/dist/components/notifications/Notification.d.ts +1 -0
  8. package/dist/components/notifications/NotificationHeader.d.ts +9 -4
  9. package/dist/components/notifications/NotificationList.d.ts +6 -0
  10. package/dist/components/notifications/UnreadDot.d.ts +6 -0
  11. package/dist/components/page-header/PageHeading.d.ts +2 -2
  12. package/dist/components/sidebar-menu/SidebarMenu.d.ts +5 -1
  13. package/dist/components/sidebar-menu/SidebarMenuPinButton.d.ts +8 -0
  14. package/dist/components/sidebar-menu/items/RailMenuButton.d.ts +6 -0
  15. package/dist/components/sidebar-menu/items/RailMenuCollapsible.d.ts +11 -0
  16. package/dist/components/sidebar-menu/items/RailMenuLink.d.ts +6 -0
  17. package/dist/components/sidebar-menu/{SidebarMenuLink.d.ts → items/SidebarMenuLink.d.ts} +3 -1
  18. package/dist/components/sidebar-menu/rail/RailContext.d.ts +3 -0
  19. package/dist/components/sidebar-menu/rail/SidebarRailMenu.d.ts +6 -4
  20. package/dist/index.d.ts +8 -8
  21. package/dist/index.es.js +743 -834
  22. package/dist/index.es.js.map +1 -1
  23. package/dist/index.js +2 -2
  24. package/dist/index.js.map +1 -1
  25. package/package.json +7 -7
  26. package/dist/components/collapsible/CollapsibleClickableContent.d.ts +0 -6
  27. package/dist/components/collapsible/CollapsibleContent.d.ts +0 -7
  28. package/dist/components/sidebar-menu/rail/renderer/RailRenderer.d.ts +0 -8
  29. package/dist/components/sidebar-menu/rail/renderer/types.d.ts +0 -19
  30. /package/dist/components/sidebar-menu/{SidebarMenuCollapsible.d.ts → items/SidebarMenuCollapsible.d.ts} +0 -0
  31. /package/dist/components/sidebar-menu/{SidebarMenuHeading.d.ts → items/SidebarMenuHeading.d.ts} +0 -0
  32. /package/dist/components/sidebar-menu/{SidebarMenuSeparator.d.ts → items/SidebarMenuSeparator.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { ReactNode } from "react";
2
+ import { ReactNode, RefObject } from "react";
3
3
  import { ActionMenuProps, FlatButton, PrimaryButton, PrimaryButtonProps, SecondaryButton } from "@stenajs-webui/elements";
4
4
  import { PopoverProps } from "@stenajs-webui/tooltip";
5
5
  export interface ActionMenuButtonProps extends Omit<PrimaryButtonProps, "variant" | "loading" | "loadingLabel" | "success" | "successLabel"> {
@@ -15,5 +15,6 @@ export interface ActionMenuButtonProps extends Omit<PrimaryButtonProps, "variant
15
15
  menuTop?: ActionMenuProps["top"];
16
16
  buttonComponent: typeof PrimaryButton | typeof SecondaryButton | typeof FlatButton;
17
17
  disableArrow?: boolean;
18
+ buttonRef?: RefObject<HTMLButtonElement>;
18
19
  }
19
20
  export declare const ActionMenuButton: React.FC<ActionMenuButtonProps>;
@@ -1,18 +1,11 @@
1
- import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
2
- import { ClickableProps, DivProps } from "@stenajs-webui/core";
1
+ import { ButtonElementProps } from "@stenajs-webui/core";
3
2
  import * as React from "react";
4
- export interface CollapsibleProps extends Omit<DivProps, "onClick">, Pick<ClickableProps, "onClick"> {
3
+ export interface CollapsibleProps extends Omit<ButtonElementProps, "value"> {
5
4
  label: string;
6
5
  contentLeft?: React.ReactNode;
7
6
  contentRight?: React.ReactNode;
8
7
  collapsed?: boolean;
9
8
  disabled?: boolean;
10
- unmountOnCollapse?: boolean;
11
- mountOnEnter?: boolean;
12
- icon?: IconDefinition;
13
- iconCollapsed?: IconDefinition;
14
- iconSize?: number;
15
9
  autoFocus?: boolean;
16
10
  }
17
- export declare const mapCSSTime: (value: string) => number;
18
11
  export declare const Collapsible: React.ForwardRefExoticComponent<CollapsibleProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,6 +1,5 @@
1
- import { DivProps } from "@stenajs-webui/core";
2
1
  import * as React from "react";
3
- import { CollapsibleSimpleContentProps } from "./CollapsibleContent";
4
- export interface CollapsibleGroupHeadingProps extends CollapsibleSimpleContentProps, DivProps {
2
+ export interface CollapsibleGroupHeadingProps {
3
+ children: string;
5
4
  }
6
5
  export declare const CollapsibleGroupHeading: React.FC<CollapsibleGroupHeadingProps>;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import { ReactNode } from "react";
3
+ export interface CollapsibleListProps {
4
+ children?: ReactNode;
5
+ }
6
+ export declare const CollapsibleList: React.FC<CollapsibleListProps>;
@@ -1,5 +1,12 @@
1
+ import { HeadingProps } from "@stenajs-webui/core";
2
+ import { CardProps, XlIcon } from "@stenajs-webui/elements";
1
3
  import * as React from "react";
2
- export interface ErrorPanelProps {
4
+ import { PropsWithChildren, ReactNode } from "react";
5
+ export interface ErrorPanelProps extends CardProps, PropsWithChildren {
3
6
  text?: string;
7
+ heading?: string;
8
+ buttons?: ReactNode;
9
+ icon?: XlIcon;
10
+ headingLevel?: HeadingProps["as"];
4
11
  }
5
12
  export declare const ErrorPanel: React.FC<ErrorPanelProps>;
@@ -1,6 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { TextInputProps } from "@stenajs-webui/forms";
3
- interface NavBarSearchFieldProps extends TextInputProps {
3
+ import { ButtonElementProps } from "@stenajs-webui/core";
4
+ export interface NavBarSearchFieldProps extends TextInputProps {
5
+ showClearButton?: boolean;
6
+ onClickClearButton?: ButtonElementProps["onClick"];
4
7
  }
5
8
  export declare const NavBarSearchField: React.FC<NavBarSearchFieldProps>;
6
- export {};
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { ReactNode } from "react";
3
3
  import { NotificationHeaderProps } from "./NotificationHeader";
4
+ export declare type NotificationVariant = "standard" | "danger";
4
5
  export interface NotificationProps extends NotificationHeaderProps {
5
6
  children?: ReactNode;
6
7
  }
@@ -1,21 +1,26 @@
1
1
  import * as React from "react";
2
- import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
2
+ import { MediumIcon } from "@stenajs-webui/elements";
3
+ import { CssPropColor } from "@stenajs-webui/theme";
4
+ import { NotificationVariant } from "./Notification";
3
5
  export interface NotificationHeaderProps {
4
6
  /** Text. */
5
7
  text: string;
6
8
  /** Timestamp. */
7
9
  timestamp?: string;
8
10
  /** Icon. */
9
- icon?: IconDefinition;
11
+ icon?: MediumIcon;
10
12
  /** Icon description for accessibility. */
11
13
  iconAriaLabel?: string;
12
- /** Icon colour. */
13
- iconColor?: string;
14
14
  /** Left content instead of icon. */
15
15
  contentLeft?: React.ReactNode;
16
16
  /** Right content. */
17
17
  contentRight?: React.ReactNode;
18
18
  /** What happens on clicking close. */
19
19
  onClose?: () => void;
20
+ /** Mark the notification as unread */
21
+ unread?: boolean;
22
+ /** Notification variant. Will affect icon bg color */
23
+ variant: NotificationVariant;
20
24
  }
21
25
  export declare const NotificationHeader: React.FC<NotificationHeaderProps>;
26
+ export declare const getIconBgColor: (unread: boolean, variant: NotificationVariant) => CssPropColor | undefined;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import { ReactNode } from "react";
3
+ export interface NotificationListProps {
4
+ children?: ReactNode;
5
+ }
6
+ export declare const NotificationList: React.FC<NotificationListProps>;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import { ReactNode } from "react";
3
+ export interface UnreadDotProps {
4
+ children: ReactNode;
5
+ }
6
+ export declare const UnreadDot: React.FC<UnreadDotProps>;
@@ -1,10 +1,10 @@
1
1
  import * as React from "react";
2
2
  import { ReactNode } from "react";
3
3
  import { HeadingVariant } from "@stenajs-webui/core";
4
- import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
4
+ import { MediumIcon } from "@stenajs-webui/elements";
5
5
  export declare type PageHeadingVariant = "compact" | "standard" | "relaxed";
6
6
  interface PageHeadingProps {
7
- icon?: IconDefinition;
7
+ icon?: MediumIcon;
8
8
  contentLeft?: ReactNode;
9
9
  contentRight?: ReactNode;
10
10
  heading: string;
@@ -1,11 +1,15 @@
1
1
  import { BoxProps } from "@stenajs-webui/core";
2
2
  import * as React from "react";
3
+ import { ReactNode } from "react";
3
4
  import { SidebarMenuCloseButtonRowProps } from "./SidebarMenuCloseButtonRow";
4
5
  import { NavBarVariant } from "../nav-bar/NavBar";
5
6
  export declare type SidebarMenuVariant = NavBarVariant;
6
7
  export interface SidebarMenuProps extends BoxProps {
7
8
  onCloseClick?: SidebarMenuCloseButtonRowProps["onClick"];
8
- collapsed?: boolean;
9
9
  variant?: SidebarMenuVariant;
10
+ pinButtonVisible?: boolean;
11
+ isPinned?: boolean;
12
+ bottomItems?: ReactNode;
13
+ onClickPinButton?: () => void;
10
14
  }
11
15
  export declare const SidebarMenu: React.FC<SidebarMenuProps>;
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { MenuButtonProps } from "@stenajs-webui/elements";
3
+ export interface SidebarMenuPinButtonProps {
4
+ isPinned?: boolean;
5
+ label?: string;
6
+ onClick?: MenuButtonProps["onClick"];
7
+ }
8
+ export declare const SidebarMenuPinButton: React.FC<SidebarMenuPinButtonProps>;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import { IconMenuButtonProps } from "@stenajs-webui/elements";
3
+ export declare type RailMenuButtonProps = IconMenuButtonProps & {
4
+ label: string;
5
+ };
6
+ export declare const RailMenuButton: React.FC<RailMenuButtonProps>;
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { ReactNode } from "react";
3
+ import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
4
+ export interface RailMenuCollapsibleProps {
5
+ label: string;
6
+ collapsed?: boolean;
7
+ icon: IconDefinition;
8
+ children?: ReactNode;
9
+ popupMinWidth?: string;
10
+ }
11
+ export declare const RailMenuCollapsible: React.FC<RailMenuCollapsibleProps>;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import { MenuButtonLinkNotSelectedProps, MenuButtonLinkWithRenderLinkProps, MenuButtonLinkWithSelectedProps } from "@stenajs-webui/elements";
3
+ export declare type RailMenuLinkProps = (MenuButtonLinkNotSelectedProps | MenuButtonLinkWithSelectedProps | MenuButtonLinkWithRenderLinkProps) & {
4
+ label: string;
5
+ };
6
+ export declare const RailMenuLink: React.FC<RailMenuLinkProps>;
@@ -1,4 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { MenuButtonLinkNotSelectedProps, MenuButtonLinkWithRenderLinkProps, MenuButtonLinkWithSelectedProps } from "@stenajs-webui/elements";
3
- export declare type SidebarMenuLinkProps = MenuButtonLinkNotSelectedProps | MenuButtonLinkWithSelectedProps | MenuButtonLinkWithRenderLinkProps;
3
+ export declare type SidebarMenuLinkProps = (MenuButtonLinkNotSelectedProps | MenuButtonLinkWithSelectedProps | MenuButtonLinkWithRenderLinkProps) & {
4
+ label: string;
5
+ };
4
6
  export declare const SidebarMenuLink: React.FC<SidebarMenuLinkProps>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const RailContext: import("react").Context<boolean | undefined>;
3
+ export declare const useRailContext: () => boolean | undefined;
@@ -1,10 +1,12 @@
1
1
  import * as React from "react";
2
- import { SidebarMenuVariant } from "../SidebarMenu";
3
2
  import { ReactNode } from "react";
4
- interface RailMenuProps {
5
- variant?: SidebarMenuVariant;
3
+ interface SidebarRailMenuProps {
4
+ closeButtonVisible?: boolean;
5
+ onClickCloseButton?: () => void;
6
6
  onClickMenuButton?: () => void;
7
7
  children?: ReactNode;
8
+ bottomItems?: ReactNode;
9
+ closeButtonTitle?: string;
8
10
  }
9
- export declare const SidebarRailMenu: React.FC<RailMenuProps>;
11
+ export declare const SidebarRailMenu: React.FC<SidebarRailMenuProps>;
10
12
  export {};
package/dist/index.d.ts CHANGED
@@ -10,11 +10,13 @@ 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/NotificationHeader";
14
+ export * from "./components/notifications/NotificationList";
15
+ export * from "./components/notifications/UnreadDot";
13
16
  export * from "./components/notifications/Toast";
14
17
  export * from "./components/collapsible/Collapsible";
18
+ export * from "./components/collapsible/CollapsibleList";
15
19
  export * from "./components/collapsible/CollapsibleWithCheckbox";
16
- export * from "./components/collapsible/CollapsibleContent";
17
- export * from "./components/collapsible/CollapsibleClickableContent";
18
20
  export * from "./components/collapsible/CollapsibleGroupHeading";
19
21
  export * from "./components/collapsible/CollapsibleEmptyContent";
20
22
  export * from "./components/error-panel/ErrorPanel";
@@ -26,10 +28,8 @@ export * from "./components/page-header/PageHeaderRow";
26
28
  export * from "./components/page-header/PageHeading";
27
29
  export * from "./components/sidebar-menu/SidebarMenu";
28
30
  export * from "./components/sidebar-menu/rail/SidebarRailMenu";
29
- export * from "./components/sidebar-menu/rail/renderer/RailRenderer";
30
- export * from "./components/sidebar-menu/rail/renderer/types";
31
- export * from "./components/sidebar-menu/SidebarMenuHeading";
32
- export * from "./components/sidebar-menu/SidebarMenuLink";
33
- export * from "./components/sidebar-menu/SidebarMenuCollapsible";
34
- export * from "./components/sidebar-menu/SidebarMenuSeparator";
31
+ export * from "./components/sidebar-menu/items/SidebarMenuHeading";
32
+ export * from "./components/sidebar-menu/items/SidebarMenuLink";
33
+ export * from "./components/sidebar-menu/items/SidebarMenuCollapsible";
34
+ export * from "./components/sidebar-menu/items/SidebarMenuSeparator";
35
35
  export * from "./components/selected-items-actions-panel/SelectedItemsActionsPanel";