@digital-ai/dot-components 4.9.1 → 4.10.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "4.9.1",
3
+ "version": "4.10.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -43,7 +43,9 @@ export interface AppToolbarProps extends CommonProps {
43
43
  navItems?: Array<AppToolbarIconButtons>;
44
44
  /** Event callback when leaving menu via tab or clicking away */
45
45
  onClickAway?: (event: KeyboardEvent | MouseEvent) => void;
46
+ /** JSX Element that is displayed before the nav items */
47
+ preNavItem?: ReactNode;
46
48
  /** URL of the page the primary logo link will go to */
47
49
  primaryLogoHref?: string;
48
50
  }
49
- export declare const DotAppToolbar: ({ ariaLabel, appLogo, appLogoHref, appLogoSmall, avatar, borderColor, children, className, closeMenuOnItemClick, customLogo, "data-testid": dataTestId, dense, mainMenu, mainMenuItems, mainMenuWidth, menuCloseOnClickAway, navItems, onClickAway, primaryLogoHref, }: AppToolbarProps) => import("react/jsx-runtime").JSX.Element;
51
+ export declare const DotAppToolbar: ({ ariaLabel, appLogo, appLogoHref, appLogoSmall, avatar, borderColor, children, className, closeMenuOnItemClick, customLogo, "data-testid": dataTestId, dense, mainMenu, mainMenuItems, mainMenuWidth, menuCloseOnClickAway, navItems, onClickAway, preNavItem, primaryLogoHref, }: AppToolbarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { CommonProps } from '../CommonProps';
2
+ import { MouseEvent, ReactNode } from 'react';
3
+ export interface DraggableWindowProps extends CommonProps {
4
+ /** Element that draggable window is attached to. */
5
+ anchorEl?: Element;
6
+ /** The content for draggable window component. */
7
+ children: ReactNode;
8
+ /** Maximum height of the draggable window component. */
9
+ maxHeight?: string;
10
+ /** Maximum width of the draggable window component. */
11
+ maxWidth?: string;
12
+ /** Callback fired when the close button is clicked. If not defined, then close button is not rendered. */
13
+ onClose?: (event: MouseEvent<HTMLButtonElement>) => void;
14
+ /** The title for draggable window component. */
15
+ title: string;
16
+ }
17
+ export declare const DotDraggableWindow: ({ ariaLabel, anchorEl, "data-pendoid": dataPendoId, "data-testid": dataTestId, className, children, maxHeight, maxWidth, onClose, title, }: DraggableWindowProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export declare const rootClassName = "dot-draggable-window";
2
+ interface StyledPaperProps {
3
+ $maxHeight?: string;
4
+ $maxWidth?: string;
5
+ }
6
+ export declare const StyledPaper: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").PaperTypeMap<{}, "div">>, any, StyledPaperProps, never>;
7
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { CommonProps } from '../CommonProps';
2
- import { TooltipPlacement } from '../tooltip/Tooltip';
2
+ import { TooltipPlacement } from '../tooltip';
3
3
  import { ThemeOptions } from '../../theme-provider/ThemeProvider';
4
4
  export interface IllustrationProps extends CommonProps {
5
5
  /** Alternative text for the illustration image **/
@@ -34,6 +34,7 @@ export type { DividerOrientation, DividerProps, DividerVariant, } from './divide
34
34
  export type { BadgeProps, BadgeOverlap, BadgeVariant } from './badge';
35
35
  export type { TruncateWithTooltipProps } from './truncate-with-tooltip';
36
36
  export type { DraggableItem, DraggableListChangeHandler, } from './draggable-list';
37
+ export type { DraggableWindowProps } from './draggable-window/DraggableWindow';
37
38
  export type { SnackbarProps, SnackbarSeverity, SnackbarOrigin, SnackbarPrimaryAction, SnackbarSecondaryAction, } from './snackbar';
38
39
  export type { CharactersLimit, InlineEditProps } from './inline-edit';
39
40
  export type { progressColorOptions, progressVariantOptions, ProgressProps, } from './progress';
@@ -45,7 +46,7 @@ export type { ClickAwayListenerProps } from './click-away-listener';
45
46
  export type { StepProps } from './stepper/Stepper';
46
47
  export type { CarouselAnimationVariant, CarouselNavigationButtonDisplayOption, CarouselProps, } from './carousel/Carousel';
47
48
  export type { StickyWithBorderProps } from './sticky-with-border';
48
- export type { TooltipProps, TooltipHoverVisibility, TooltipPlacement, } from './tooltip';
49
+ export type { SlotProps, TooltipProps, TooltipHoverVisibility, TooltipPlacement, } from './tooltip';
49
50
  export type { DashboardHeaderProps } from './analytics/dashboard-header/DashboardHeader';
50
51
  export { DotAccordion } from './accordion/Accordion';
51
52
  export { DotActionToolbar } from './action-toolbar/ActionToolbar';
@@ -122,6 +123,7 @@ export { DotDivider } from './divider';
122
123
  export { DotPopper } from './popper';
123
124
  export { DotTruncateWithTooltip } from './truncate-with-tooltip';
124
125
  export { DotDraggableList } from './draggable-list';
126
+ export { DotDraggableWindow } from './draggable-window/DraggableWindow';
125
127
  export { DotLinearProgress } from './linear-progress';
126
128
  export { DatePickerKeydownContext, DotDatePicker, checkIfValidDate, } from './date-picker';
127
129
  export { Daytime, DotTimePicker, mockScrollIntoView } from './time-picker';
@@ -1,22 +1,40 @@
1
- import { ReactNode, ReactElement, ChangeEvent } from 'react';
1
+ import { ChangeEvent, HTMLProps, ReactElement, ReactNode } from 'react';
2
+ import { PopperProps, Theme } from '@mui/material';
3
+ import { TransitionProps } from '@mui/material/transitions/transition';
4
+ import { MUIStyledCommonProps } from '@mui/system';
2
5
  import { CommonProps } from '../CommonProps';
3
6
  export type TooltipHoverVisibility = 'always' | 'overflow' | 'never';
4
7
  export type TooltipPlacement = 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';
8
+ export interface SlotProps {
9
+ arrow?: HTMLProps<HTMLSpanElement> & MUIStyledCommonProps<Theme>;
10
+ popper?: Partial<PopperProps>;
11
+ tooltip?: HTMLProps<HTMLDivElement> & MUIStyledCommonProps<Theme>;
12
+ transition?: TransitionProps;
13
+ }
5
14
  export interface TooltipProps extends CommonProps {
6
15
  /** If true, adds an arrow to the tooltip indicating which element it refers to. */
7
16
  arrow?: boolean;
8
17
  children: ReactElement;
18
+ /** The display style property for the inner span element of the tooltip's children */
19
+ childrenDisplayStyle?: string;
20
+ /** If true, makes a tooltip not interactive, so it will close when the user hovers over the tooltip before the leaveDelay is expired. */
21
+ disableInteractive?: boolean;
9
22
  /** Disable the portal behavior. If true, children stay within parent DOM hierarchy. */
10
23
  disablePortal?: boolean;
24
+ /** The number of milliseconds to wait before showing the tooltip. */
11
25
  enterDelay?: number;
26
+ /** The number of milliseconds to wait before showing the tooltip when one was already recently opened. */
12
27
  enterNextDelay?: number;
13
28
  followCursor?: boolean;
14
29
  hoverVisibility?: TooltipHoverVisibility;
30
+ /** The number of milliseconds to wait before hiding the tooltip. */
15
31
  leaveDelay?: number;
16
32
  onClose?: (event: ChangeEvent) => void;
17
33
  open?: boolean;
18
34
  placement?: TooltipPlacement;
19
35
  popperClassName?: string;
36
+ /** The extra props for the slot components, like popper. It allows to override the existing props or add new ones. */
37
+ slotProps?: SlotProps;
20
38
  title?: ReactNode | string | number;
21
39
  }
22
- export declare const DotTooltip: ({ ariaLabel, ariaRole, arrow, children, className, "data-testid": dataTestId, disablePortal, followCursor, enterDelay, enterNextDelay, hoverVisibility, leaveDelay, onClose, open, placement, popperClassName, title, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
40
+ export declare const DotTooltip: ({ ariaLabel, ariaRole, arrow, children, className, "data-testid": dataTestId, disablePortal, disableInteractive, followCursor, enterDelay, enterNextDelay, hoverVisibility, leaveDelay, onClose, open, placement, popperClassName, slotProps, title, childrenDisplayStyle, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
- export type { TooltipProps, TooltipHoverVisibility, TooltipPlacement, } from './Tooltip';
1
+ export type { SlotProps, TooltipProps, TooltipHoverVisibility, TooltipPlacement, } from './Tooltip';
2
2
  export { DotTooltip } from './Tooltip';