@luscii-healthtech/web-ui 11.1.1 → 11.3.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.
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -17,6 +17,7 @@ export { default as EditIcon } from "./EditIcon";
17
17
  export { default as EmptyIcon } from "./EmptyIcon";
18
18
  export { default as EmptyStateDashboardIcon } from "./EmptyStateDashboardIcon";
19
19
  export { default as ExclamationMarkIcon } from "./ExclamationMarkIcon";
20
+ export { default as ExportIcon } from "./ExportIcon";
20
21
  export { default as EyeIconSlashed } from "./EyeIconSlashed";
21
22
  export { default as EyeIcon } from "./EyeIcon";
22
23
  export { default as GearColoredIcon } from "./GearColoredIcon";
@@ -1,20 +1,35 @@
1
1
  import React from "react";
2
- export interface NavMenuLayoutProps {
2
+ export interface Props extends React.ComponentPropsWithoutRef<"div"> {
3
3
  menu: React.ReactNode;
4
- children: JSX.Element | JSX.Element[];
5
- patientSidebar?: JSX.Element;
4
+ /**
5
+ * This property is used everywhere BUT in PatientPages.js, because the layout there works very differently than
6
+ * in the other pages. With JavaScript calculations for heights, etc to make sure everything fits.
7
+ */
8
+ pageHeader?: JSX.Element;
9
+ /**
10
+ * Rendered as the main page content.
11
+ */
12
+ children: React.ReactNode;
13
+ /**
14
+ * If passed will show the patients sidebar.
15
+ */
16
+ patientSidebar?: JSX.Element | null;
17
+ /**
18
+ * Don't show any navigation, for instance when constrained to a single patient.
19
+ */
6
20
  isNavDisabled?: boolean;
21
+ /**
22
+ * The patient overview page has some challenges we want to overcome in regards to the multiple scrollable
23
+ * content (the charts and the action bar with alerts, etc).
24
+ *
25
+ * In order to have the setup working on the patient overview page and the rest of the application, we have to
26
+ * programmatically disable/enable if that location will have a normal scrolling mechanism with specific margin/padding,
27
+ * or we will need to let the components take care of that.
28
+ */
7
29
  disableScrolling?: boolean;
30
+ /**
31
+ * Whether the layout is rendering in the viewer. Usually the result of the `useInViewer` hook.
32
+ */
33
+ isInViewer?: boolean;
8
34
  }
9
- /**
10
- *
11
- * @param props {NavMenuLayoutProps} - explaining specifically the `disableScrolling` prop:
12
- *
13
- * The patient overview page has some challenges we want to overcome in regards to the multiple scrollable
14
- * content (the charts and the action bar with alerts, etc).
15
- *
16
- * In order to have the setup working on the patient overview page and the rest of the application, we have to
17
- * progamatically disable/enable if that location will have a normal scrolling mechanism with specific margin/padding,
18
- * or we will need to let the components take care of that.
19
- */
20
- export declare const NavLayout: (props: NavMenuLayoutProps) => JSX.Element;
35
+ export declare const NavLayout: React.FC<Props>;
package/dist/index.d.ts CHANGED
@@ -32,7 +32,7 @@ export { default as Menu } from "./components/Menu/Menu";
32
32
  export { List, ListItem, ListProps, ListItemProps, DraggableListProps, SortableListProps, SortableListItemProps, OnAssetLoadErrorPayload, getDndListItemProps, } from "./components/List";
33
33
  export { CheckboxList, CheckboxListProps, } from "./components/CheckboxList/CheckboxList";
34
34
  export { CheckboxListModal, CheckboxListModalProps, } from "./components/CheckBoxListModal/CheckboxListModal";
35
- export { NavLayout, NavMenuLayoutProps } from "./components/NavMenu/NavLayout";
35
+ export { NavLayout, Props as NavLayoutProps, } from "./components/NavMenu/NavLayout";
36
36
  export { NavMenu } from "./components/NavMenu/NavMenu";
37
37
  export { NotificationBanner, NotificationBannerColor, NotificationBannerLinkProps, } from "./components/NotificationBanner/NotificationBanner";
38
38
  export { Page, CRUDPage, CRUDPageProps } from "./components/Page";
@@ -450,6 +450,13 @@ const SvgExclamationMarkIcon = (props) => React__namespace.default.createElement
450
450
  );
451
451
  var ExclamationMarkIcon = IconWrapper(SvgExclamationMarkIcon);
452
452
 
453
+ const SvgExportIcon = (props) => React__namespace.default.createElement(
454
+ "svg",
455
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "none", viewBox: "0 0 24 24" }, props),
456
+ React__namespace.default.createElement("path", { fill: "currentColor", d: "M6 23c-.55 0-1.02-.196-1.412-.588A1.926 1.926 0 0 1 4 21V10c0-.55.196-1.02.588-1.413A1.926 1.926 0 0 1 6 8h2c.283 0 .52.096.713.287.191.192.287.43.287.713s-.096.52-.287.712A.968.968 0 0 1 8 10H6v11h12V10h-2a.968.968 0 0 1-.713-.288A.967.967 0 0 1 15 9c0-.283.096-.52.287-.713A.968.968 0 0 1 16 8h2c.55 0 1.02.196 1.413.587.391.392.587.863.587 1.413v11c0 .55-.196 1.02-.587 1.412A1.926 1.926 0 0 1 18 23H6Zm5-18.175-.9.9c-.2.2-.433.296-.7.287a1.006 1.006 0 0 1-.7-.312c-.183-.2-.28-.433-.287-.7a.916.916 0 0 1 .287-.7l2.6-2.6c.2-.2.433-.3.7-.3.267 0 .5.1.7.3l2.6 2.6a.933.933 0 0 1 .275.687c0 .275-.092.513-.275.713-.2.2-.438.3-.713.3a.973.973 0 0 1-.712-.3L13 4.825V15a.97.97 0 0 1-.287.712A.968.968 0 0 1 12 16a.968.968 0 0 1-.713-.288A.968.968 0 0 1 11 15V4.825Z" })
457
+ );
458
+ var ExportIcon = IconWrapper(SvgExportIcon);
459
+
453
460
  const SvgEyeIconSlashed = (props) => React__namespace.default.createElement(
454
461
  "svg",
455
462
  Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: 22, height: 20, fill: "none", viewBox: "0 0 22 20" }, props),
@@ -693,6 +700,7 @@ var Icons = /*#__PURE__*/Object.freeze({
693
700
  EmptyIcon: EmptyIcon,
694
701
  EmptyStateDashboardIcon: EmptyStateDashboardIcon,
695
702
  ExclamationMarkIcon: ExclamationMarkIcon,
703
+ ExportIcon: ExportIcon,
696
704
  EyeIcon: EyeIcon,
697
705
  EyeIconSlashed: EyeIconSlashed,
698
706
  GearColoredIcon: GearColoredIcon,
@@ -3670,21 +3678,34 @@ const CheckboxListModal = ({ texts, initialItems, isLoadingInitialItems, isOpen,
3670
3678
  };
3671
3679
 
3672
3680
  const NavLayout = (props) => {
3681
+ const { patientSidebar = null, isNavDisabled, menu, disableScrolling, pageHeader, children, isInViewer } = props, rest = __rest(props, ["patientSidebar", "isNavDisabled", "menu", "disableScrolling", "pageHeader", "children", "isInViewer"]);
3682
+ const inViewer = isInViewer;
3673
3683
  return React__namespace.default.createElement(
3674
3684
  "div",
3675
- { className: "ui-mb-3 ui-flex ui-h-full ui-w-full ui-flex-col lg:ui-mb-0 lg:ui-flex-row" },
3676
- !props.isNavDisabled && React__namespace.default.createElement(
3685
+ Object.assign({ "data-test-id": "nav-layout", "data-in-viewer": inViewer, className: "ui-mb-3 ui-flex ui-h-full ui-w-full ui-flex-col lg:ui-mb-0 lg:ui-flex-row" }, rest),
3686
+ !isNavDisabled && React__namespace.default.createElement(
3677
3687
  React__namespace.default.Fragment,
3678
3688
  null,
3679
- props.menu,
3680
- props.patientSidebar && props.patientSidebar
3689
+ menu,
3690
+ patientSidebar
3681
3691
  ),
3682
- React__namespace.default.createElement("div", { "data-test-id": "page-main-content", className: classNames__default.default([
3683
- "ui-w-full",
3684
- {
3685
- "ui-max-h-screen ui-overflow-y-auto ui-px-4 lg:ui-px-8": !props.disableScrolling
3686
- }
3687
- ]) }, props.children)
3692
+ React__namespace.default.createElement(
3693
+ "div",
3694
+ { "data-test-id": "page-main-content", className: classNames__default.default([
3695
+ "ui-w-full",
3696
+ {
3697
+ "ui-overflow-y-auto": !disableScrolling,
3698
+ "ui-max-h-screen": !inViewer,
3699
+ "ui-h-screen": inViewer
3700
+ }
3701
+ ]) },
3702
+ pageHeader && React__namespace.default.createElement("div", { "data-test-id": "page-header" }, pageHeader),
3703
+ React__namespace.default.createElement("div", { "data-test-id": "page-body", className: classNames__default.default({
3704
+ "ui-px-4": !!pageHeader,
3705
+ "ui-h-full": inViewer
3706
+ // this allows extra spacing in the small viewport of hix specially when dealing with dropdowns
3707
+ }) }, children)
3708
+ )
3688
3709
  );
3689
3710
  };
3690
3711
 
@@ -5539,6 +5560,7 @@ exports.EmptyIcon = EmptyIcon;
5539
5560
  exports.EmptyListMessage = EmptyListMessage;
5540
5561
  exports.EmptyStateDashboardIcon = EmptyStateDashboardIcon;
5541
5562
  exports.ExclamationMarkIcon = ExclamationMarkIcon;
5563
+ exports.ExportIcon = ExportIcon;
5542
5564
  exports.EyeIcon = EyeIcon;
5543
5565
  exports.EyeIconSlashed = EyeIconSlashed;
5544
5566
  exports.FilterBar = FilterBar;