@digital-ai/dot-components 3.18.1 → 3.20.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/index.esm.js CHANGED
@@ -52,6 +52,7 @@ const DotTooltip = ({
52
52
  disablePortal = false,
53
53
  followCursor = false,
54
54
  enterDelay = 0,
55
+ enterNextDelay = 0,
55
56
  hoverVisibility = 'always',
56
57
  leaveDelay,
57
58
  onClose,
@@ -90,6 +91,7 @@ const DotTooltip = ({
90
91
  disableHoverListener: hoverVisibility === 'never' || hoverVisibility === 'overflow' && !hasTooltipOnHover,
91
92
  leaveDelay: leaveDelay,
92
93
  enterDelay: enterDelay,
94
+ enterNextDelay: enterNextDelay,
93
95
  onClose: onClose,
94
96
  open: open,
95
97
  placement: placement,
@@ -4264,7 +4266,7 @@ const DotList = ({
4264
4266
  width: listWidth
4265
4267
  },
4266
4268
  children: [items.map((item, index) => {
4267
- var _a;
4269
+ var _a, _b;
4268
4270
  const handleListItemClick = e => {
4269
4271
  var _a;
4270
4272
  const target = e.target;
@@ -4306,7 +4308,7 @@ const DotList = ({
4306
4308
  "data-testid": `${dataTestId}-item-${index}`,
4307
4309
  endIcon: item.endIcon,
4308
4310
  href: item.href,
4309
- isOpened: item.isOpened ? item.isOpened : listItemIndex === index,
4311
+ isOpened: (_b = item.isOpened) !== null && _b !== void 0 ? _b : listItemIndex === index,
4310
4312
  items: item.items,
4311
4313
  menuPlacement: menuPlacement,
4312
4314
  nestedDrawerLeftSpacing: nestedDrawerLeftSpacing,
@@ -11867,6 +11869,15 @@ const StyledDashboardHeader = styled(DotActionToolbar)`
11867
11869
  padding: ${theme.spacing(0, 2)};
11868
11870
  `}
11869
11871
  `;
11872
+ const StyledDashboardHeaderTitleSection = styled.div`
11873
+ ${({
11874
+ theme
11875
+ }) => css`
11876
+ display: flex;
11877
+ align-items: center;
11878
+ gap: ${theme.spacing(2)};
11879
+ `}
11880
+ `;
11870
11881
 
11871
11882
  function DotDashboardHeader({
11872
11883
  accountId,
@@ -11878,7 +11889,8 @@ function DotDashboardHeader({
11878
11889
  onStatusChanged,
11879
11890
  onDeleted,
11880
11891
  onDuplicated,
11881
- onViewMode
11892
+ onViewMode,
11893
+ showStatus = false
11882
11894
  }) {
11883
11895
  const {
11884
11896
  applications,
@@ -11896,10 +11908,14 @@ function DotDashboardHeader({
11896
11908
  loadApplications(accountId);
11897
11909
  }, []);
11898
11910
  return jsxs(StyledDashboardHeader, {
11899
- children: [jsx(DotTypography, {
11900
- component: "h2",
11901
- variant: "h2",
11902
- children: dashboard === null || dashboard === void 0 ? void 0 : dashboard.name
11911
+ children: [jsxs(StyledDashboardHeaderTitleSection, {
11912
+ children: [jsx(DotTypography, {
11913
+ component: "h2",
11914
+ variant: "h2",
11915
+ children: dashboard === null || dashboard === void 0 ? void 0 : dashboard.name
11916
+ }), showStatus && jsx(DotDashboardStatusPill, {
11917
+ status: dashboard.lifecycle_state
11918
+ })]
11903
11919
  }), jsx(DotDashboardActions, {
11904
11920
  applications: applications,
11905
11921
  canEdit: canEdit,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "3.18.1",
3
+ "version": "3.20.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -1,6 +1,7 @@
1
1
  import { DashboardActionsCommonProps } from '../dashboard-actions/DashboardActions';
2
2
  interface DashboardHeaderProps extends DashboardActionsCommonProps {
3
3
  accountId?: string;
4
+ showStatus?: boolean;
4
5
  }
5
- declare function DotDashboardHeader({ accountId, dashboard, isEdit, canEdit, onClose, onFavorite, onStatusChanged, onDeleted, onDuplicated, onViewMode, }: DashboardHeaderProps): import("react/jsx-runtime").JSX.Element;
6
+ declare function DotDashboardHeader({ accountId, dashboard, isEdit, canEdit, onClose, onFavorite, onStatusChanged, onDeleted, onDuplicated, onViewMode, showStatus, }: DashboardHeaderProps): import("react/jsx-runtime").JSX.Element;
6
7
  export { DashboardHeaderProps, DotDashboardHeader };
@@ -1 +1,2 @@
1
1
  export declare const StyledDashboardHeader: import("styled-components").StyledComponent<({ ariaLabel, children, className, "data-testid": dataTestId, variant, }: import("../../action-toolbar/ActionToolbar").DotActionBarProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
2
+ export declare const StyledDashboardHeaderTitleSection: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -9,6 +9,7 @@ export interface TooltipProps extends CommonProps {
9
9
  /** Disable the portal behavior. If true, children stay within parent DOM hierarchy. */
10
10
  disablePortal?: boolean;
11
11
  enterDelay?: number;
12
+ enterNextDelay?: number;
12
13
  followCursor?: boolean;
13
14
  hoverVisibility?: TooltipHoverVisibility;
14
15
  leaveDelay?: number;
@@ -18,4 +19,4 @@ export interface TooltipProps extends CommonProps {
18
19
  popperClassName?: string;
19
20
  title?: ReactNode | string | number;
20
21
  }
21
- export declare const DotTooltip: ({ ariaLabel, ariaRole, arrow, children, className, "data-testid": dataTestId, disablePortal, followCursor, enterDelay, hoverVisibility, leaveDelay, onClose, open, placement, popperClassName, title, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
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;