@luscii-healthtech/web-ui 54.5.0 → 54.5.2

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/README.md CHANGED
@@ -8,6 +8,7 @@ The `web-ui` repository contains the UI components for Luscii's frontend project
8
8
  - 📖 [Fonts](#fonts)
9
9
  - 📦 [How to use](#how-to-use)
10
10
  - 🤝 [Contributing](#contributing)
11
+ - 📐 [Coding standards & AI guidance](#coding-standards--ai-guidance)
11
12
 
12
13
  ## Getting started
13
14
 
@@ -176,6 +177,19 @@ Great to have you help making WebUI better! We have a few guidelines and tips
176
177
  to make sure we can keep the library consistent and easy to use. You can find
177
178
  them in our [contributing guide](CONTRIBUTING.md).
178
179
 
180
+ ### Coding standards & AI guidance
181
+
182
+ AI-agent guidance (including the Design System governance policy) lives in
183
+ [`CLAUDE.md`](CLAUDE.md).
184
+
185
+ Org-wide standards are kept in a separate repository and cloned into a local,
186
+ git-ignored `.coding-standards/` folder. Pull them in with:
187
+
188
+ ```bash
189
+ yarn add-coding-standards # first-time clone
190
+ yarn pull-coding-standards # update to latest
191
+ ```
192
+
179
193
  ### Reporting bugs
180
194
 
181
195
  If you find a bug, please report it by sending us a message in the [#design-system-circle channel](https://luscii.slack.com/archives/C03507ZKRCY). It helps us a lot knowing of anything that is not working as expected.
@@ -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 = () => {