@luscii-healthtech/web-ui 33.1.0 → 34.0.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/dist/index.d.ts CHANGED
@@ -46,7 +46,6 @@ export { List, ListItem, type ListProps, type ListItemProps, type DraggableListP
46
46
  export { CheckboxList, type CheckboxListProps, } from "./components/CheckboxList/CheckboxList";
47
47
  export { CheckboxListModal, type CheckboxListModalProps, } from "./components/CheckBoxListModal/CheckboxListModal";
48
48
  export { NavLayout, type Props as NavLayoutProps, } from "./components/NavMenu/NavLayout";
49
- export { NavMenu } from "./components/NavMenu/NavMenu";
50
49
  export { NotificationBanner, type NotificationBannerColor, type NotificationBannerLinkProps, } from "./components/NotificationBanner/NotificationBanner";
51
50
  export { Page, CRUDPage, type CRUDPageProps } from "./components/Page";
52
51
  export { PaginationMenu } from "./components/PaginationMenu/PaginationMenu";
@@ -3913,8 +3913,8 @@ function TableBody(props) {
3913
3913
  },
3914
3914
  props.isSelectable && React__namespace.default.createElement(
3915
3915
  "td",
3916
- { className: "ui-px-2 first:ui-pl-6 last:ui-pr-6" },
3917
- React__namespace.default.createElement(Checkbox, { isChecked: isItemChecked(index), onClick: (event) => event.stopPropagation(), onChange: (event) => {
3916
+ { className: "ui-px-0" },
3917
+ React__namespace.default.createElement(Checkbox, { className: "ui-ml-4 ui-w-fit", classNameCheckboxLabel: "ui-p-2", isChecked: isItemChecked(index), onClick: (event) => event.stopPropagation(), onChange: (event) => {
3918
3918
  var _a2;
3919
3919
  event.stopPropagation();
3920
3920
  (_a2 = props.onSelectRow) === null || _a2 === void 0 ? void 0 : _a2.call(props, {
@@ -4615,147 +4615,6 @@ const NavLayout = (props) => {
4615
4615
  );
4616
4616
  };
4617
4617
 
4618
- const NavMenuFooter = ({ text, subtext, visible = true }) => {
4619
- if (!visible) {
4620
- return null;
4621
- }
4622
- return React__namespace.default.createElement(
4623
- "div",
4624
- { className: "-ui-mx-1 ui-border-t ui-border-slate-600 ui-bg-nav-menu" },
4625
- React__namespace.default.createElement(
4626
- FlexRow,
4627
- { backgroundColor: "transparent", hasPadding: true, alignItems: "center", spacing: "none" },
4628
- React__namespace.default.createElement(
4629
- FlexColumn,
4630
- { backgroundColor: "transparent", spacing: "none" },
4631
- React__namespace.default.createElement(Text, { text, title: text, color: "white", className: "ui-max-w-50 ui-break-normal" }),
4632
- subtext && React__namespace.default.createElement(Text, { text: subtext, type: "sm", color: "white", truncate: true, className: "ui-max-w-50", title: subtext })
4633
- )
4634
- )
4635
- );
4636
- };
4637
-
4638
- const NavMenuItem = (props) => {
4639
- var _a, _b;
4640
- const [currentImg, setCurrentImg] = React.useState(props.isSelected ? props.imgOnHover : props.img);
4641
- const classes = classNames__default.default([
4642
- "ui-h-11",
4643
- "ui-flex",
4644
- "ui-flex-row",
4645
- "ui-items-center",
4646
- "ui-w-auto",
4647
- "ui-px-4",
4648
- "ui-mb-1",
4649
- "ui-rounded",
4650
- "hover:ui-bg-gray-600",
4651
- "ui-transition",
4652
- "ui-ease-in",
4653
- "ui-duration-150",
4654
- "lg:last:ui-pb-2",
4655
- "focus:ui-outline-primary",
4656
- "ui-group"
4657
- ], {
4658
- "ui-bg-nav-menu": !props.isSelected,
4659
- "ui-bg-gray-600": props.isSelected
4660
- });
4661
- const handleOnMouseOver = () => {
4662
- if (!props.isSelected) {
4663
- setCurrentImg(props.imgOnHover);
4664
- }
4665
- };
4666
- const handleOnMouseOut = () => {
4667
- if (!props.isSelected) {
4668
- setCurrentImg(props.img);
4669
- }
4670
- };
4671
- return React__namespace.createElement(
4672
- "a",
4673
- { href: (_b = (_a = props.href) !== null && _a !== void 0 ? _a : props.linkTo) !== null && _b !== void 0 ? _b : "#", "data-test-id": props.dataTestId, className: classes, onMouseOver: handleOnMouseOver, onMouseOut: handleOnMouseOut, onClick: handleMenuClick },
4674
- React__namespace.createElement("img", { src: currentImg, className: "ui-ml-0 ui-mr-4" }),
4675
- React__namespace.createElement(Text, { type: "strong", text: props.title, hoverInGroup: true, color: "slate-200", hoverColor: "white" })
4676
- );
4677
- function handleMenuClick(event) {
4678
- var _a2;
4679
- if (event.metaKey || event.ctrlKey) {
4680
- return;
4681
- }
4682
- event.preventDefault();
4683
- (_a2 = props.trackEvent) === null || _a2 === void 0 ? void 0 : _a2.call(props);
4684
- if (props.isExternal) {
4685
- window.open(props.href, "_blank");
4686
- } else if (props.href) {
4687
- window.location.assign(props.href);
4688
- } else if (props.linkTo) {
4689
- router.navigate(props.linkTo);
4690
- }
4691
- }
4692
- };
4693
-
4694
- const NavMenuHeader = (props) => {
4695
- const { text, visible = true, onClick, belowHeader } = props;
4696
- if (!visible) {
4697
- return React__namespace.default.createElement("div", { "data-test-id": "separator", className: "ui-mb-1 ui-border-b ui-border-slate-600" });
4698
- }
4699
- const onClickHandler = () => onClick === null || onClick === void 0 ? void 0 : onClick();
4700
- return React__namespace.default.createElement(
4701
- React__namespace.default.Fragment,
4702
- null,
4703
- React__namespace.default.createElement(
4704
- "div",
4705
- { onClick: onClickHandler, className: classNames__default.default({
4706
- "ui-cursor-pointer": onClick
4707
- }), role: "link" },
4708
- React__namespace.default.createElement(Text, { text, type: "xl-strong", color: "white", className: "ui-max-w-55 ui-break-normal ui-pl-4 ui-pt-6", clampLines: true }),
4709
- belowHeader && React__namespace.default.createElement("div", { className: "ui-pl-4 ui-pt-1" }, belowHeader)
4710
- ),
4711
- React__namespace.default.createElement("div", { "data-test-id": "separator", className: "ui-mb-1 ui-mt-5 ui-border-b ui-border-slate-600" })
4712
- );
4713
- };
4714
-
4715
- const NavMenuContent = ({ roleItems, publicItems, authenticationItems, isUserAuthenticated, navMenuHeaderProps: organizationNameWidgetProps, navMenuFooterProps: loggedInUserWidgetProps }) => {
4716
- return React__namespace.default.createElement(
4717
- "div",
4718
- { className: classNames__default.default("ui-flex ui-w-60 ui-flex-col ui-bg-nav-menu ui-px-1 ui-pb-1 ui-shadow-lg lg:ui-relative lg:ui-h-full") },
4719
- React__namespace.default.createElement(NavMenuHeader, Object.assign({}, organizationNameWidgetProps)),
4720
- !isUserAuthenticated && React__namespace.default.createElement(NavMenuItem, Object.assign({}, authenticationItems.login, { key: authenticationItems.login.title })),
4721
- roleItems.map((item) => React__namespace.default.createElement(NavMenuItem, Object.assign({}, item, { key: item.title || item.dataTestId }))),
4722
- React__namespace.default.createElement(Divider, { dark: true }),
4723
- React__namespace.default.createElement("div", { className: "ui-mt-1" }, publicItems.map((item) => React__namespace.default.createElement(NavMenuItem, Object.assign({}, item, { key: item.title || item.dataTestId })))),
4724
- React__namespace.default.createElement(
4725
- "div",
4726
- { className: "ui-mt-auto" },
4727
- isUserAuthenticated && React__namespace.default.createElement(NavMenuItem, Object.assign({}, authenticationItems.logout, { key: authenticationItems.logout.title })),
4728
- React__namespace.default.createElement(NavMenuFooter, Object.assign({}, loggedInUserWidgetProps))
4729
- )
4730
- );
4731
- };
4732
-
4733
- function NavMenu(props) {
4734
- const [isOpen, setIsOpen] = React.useState(false);
4735
- const handleToggleOpen = () => {
4736
- setIsOpen(!isOpen);
4737
- };
4738
- return React__namespace.default.createElement(
4739
- React__namespace.default.Fragment,
4740
- null,
4741
- React__namespace.default.createElement(
4742
- "div",
4743
- { className: "ui-hidden ui-h-screen lg:ui-flex" },
4744
- React__namespace.default.createElement(NavMenuContent, Object.assign({}, props))
4745
- ),
4746
- React__namespace.default.createElement(
4747
- "div",
4748
- { className: "ui-relative ui-flex ui-w-screen ui-items-center ui-bg-nav-header ui-p-2 ui-shadow-lg lg:ui-hidden" },
4749
- React__namespace.default.createElement(Button, { hasIcon: true, role: "secondaryDark", iconName: isOpen ? "close" : "hamburger", onClick: handleToggleOpen })
4750
- ),
4751
- isOpen && React__namespace.default.createElement(
4752
- "div",
4753
- { className: "ui-absolute ui-z-20" },
4754
- React__namespace.default.createElement(NavMenuContent, Object.assign({}, props))
4755
- )
4756
- );
4757
- }
4758
-
4759
4618
  var css_248z$6 = ".cweb-page {\n width: 100%;\n max-width: 1140px;\n margin: 32px auto 0 auto;\n}\n.cweb-page .cweb-page-breadcrumbs {\n margin-bottom: 16px;\n}\n.cweb-page .page-spinner {\n margin-left: 8px;\n margin-bottom: 4px;\n}\n.cweb-page .page-spinner img {\n width: 21px;\n}\n.cweb-page .cweb-page-header {\n display: flex;\n align-items: center;\n width: 100%;\n flex-grow: 0;\n}\n.cweb-page .cweb-page-header .cweb-page-title {\n display: inline;\n}\n.cweb-page .cweb-page-header.accessory-right {\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n.cweb-page .cweb-page-header.accessory-bottom {\n flex-direction: column;\n align-items: flex-start;\n}\n@media screen and (max-width: 426px) {\n .cweb-page .cweb-page-header.accessory-bottom {\n max-width: 75vw;\n }\n .cweb-page .cweb-page-header.accessory-bottom img {\n max-width: 10vw;\n }\n .cweb-page .cweb-page-header.accessory-bottom button p {\n font-size: 4vw;\n }\n}\n.cweb-page .cweb-page-header.accessory-bottom .cweb-page-title {\n margin-bottom: 8px;\n display: inline;\n}";
4760
4619
  styleInject(css_248z$6);
4761
4620
 
@@ -7065,7 +6924,6 @@ exports.Modal = Modal;
7065
6924
  exports.MoreIcon = MoreIcon;
7066
6925
  exports.MouseIcon = MouseIcon;
7067
6926
  exports.NavLayout = NavLayout;
7068
- exports.NavMenu = NavMenu;
7069
6927
  exports.NoteIcon = NoteIcon;
7070
6928
  exports.NotesIcon = NoteIcon;
7071
6929
  exports.NotificationBanner = NotificationBanner;