@luscii-healthtech/web-ui 54.5.0 → 54.5.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.
@@ -5738,6 +5738,7 @@ Summary.OpenIndicator = OpenIndicator;
5738
5738
  Summary.DefaultOpenIndicator = () => jsxRuntime.jsx(OpenIndicator, { component: DefaultOpenIndicator });
5739
5739
 
5740
5740
  const DEFAULT_TEXT_CLASS_NAME = "ui:text-[#162130]";
5741
+ const COLLAPSED_WIDTH_CLASS_NAME = "ui:w-min ui:min-w-[96px] ui:max-w-[120px]";
5741
5742
  const context$1 = React.createContext({
5742
5743
  variant: "primary"
5743
5744
  });
@@ -5748,8 +5749,10 @@ const VerticalMenu = (props) => {
5748
5749
  const shouldShowCollapseButton = localization && Boolean(onCollapseButtonClick);
5749
5750
  const hasHeaderContent = title || shouldShowCollapseButton;
5750
5751
  const contextValue = React.useMemo(() => ({ variant }), [variant]);
5751
- return jsxRuntime.jsx(context$1.Provider, { value: contextValue, children: jsxRuntime.jsxs(Stack, Object.assign({ as: "div", px: "xxs", py: "m", align: "normal", className: classNames__default.default("ui:max-w-full", "ui:max-h-full", {
5752
- [DEFAULT_TEXT_CLASS_NAME]: isCollapsed
5752
+ return jsxRuntime.jsx(context$1.Provider, { value: contextValue, children: jsxRuntime.jsxs(Stack, Object.assign({ as: "div", px: "xxs", py: "m", align: "normal", className: classNames__default.default("ui:max-h-full", {
5753
+ "ui:max-w-full": !isCollapsed,
5754
+ [DEFAULT_TEXT_CLASS_NAME]: isCollapsed,
5755
+ [COLLAPSED_WIDTH_CLASS_NAME]: isCollapsed
5753
5756
  }, className) }, rest, { children: [jsxRuntime.jsxs(Stack, { width: "full", children: [header && jsxRuntime.jsx(Box, { width: "full", children: header }), jsxRuntime.jsxs(Stack, { axis: "x", gap: "xxs", p: hasHeaderContent ? "m" : void 0, align: "start", justify: "between", width: "full", children: [title && jsxRuntime.jsx(Box, { children: jsxRuntime.jsx(Text, { variant: "lg-strong", children: title }) }), shouldShowCollapseButton && jsxRuntime.jsx(
5754
5757
  Box,
5755
5758
  {
@@ -5788,7 +5791,6 @@ VerticalMenu.SectionTitle = SectionTitle;
5788
5791
  function MenuItemText(props) {
5789
5792
  const { variant: menuVariant } = React.useContext(context$1);
5790
5793
  const isCollapsed = menuVariant === "primary-collapsed";
5791
- const shouldTruncate = isCollapsed || Boolean(props.truncate);
5792
5794
  const getMenuVariant = () => {
5793
5795
  switch (menuVariant) {
5794
5796
  case "primary":
@@ -5799,11 +5801,11 @@ function MenuItemText(props) {
5799
5801
  return props.variant;
5800
5802
  }
5801
5803
  };
5802
- return jsxRuntime.jsx(Text, Object.assign({ as: "span", color: "current", variant: getMenuVariant(), truncate: shouldTruncate }, props, { className: classNames__default.default({
5804
+ return jsxRuntime.jsx(Text, Object.assign({ as: "span", color: "current", variant: getMenuVariant(), truncate: Boolean(props.truncate), clampLines: isCollapsed }, props, { className: classNames__default.default({
5803
5805
  "ui:sm:leading-[16px]": isCollapsed,
5804
5806
  "ui:sm:leading-[24px]": !isCollapsed
5805
5807
  }, {
5806
- "ui:max-w-18": isCollapsed
5808
+ "ui:w-full ui:text-center": isCollapsed
5807
5809
  }, props.className) }));
5808
5810
  }
5809
5811
  const useGetClassName = () => {