@luscii-healthtech/web-ui 52.6.0 → 52.6.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.
@@ -1258,7 +1258,7 @@ const createSpacingClassNames = (keys, spacingPropsArg) => {
1258
1258
  const underscored = keys.filter((key) => spacingPropsArg[key] && underscoredPropKeys.includes(key)).map((key) => `ui:${key.replace("_", "")}-f_${spacingPropsArg[key]}`).join(" ");
1259
1259
  return `${current} ${underscored}`;
1260
1260
  };
1261
- const Box = (props) => {
1261
+ const BoxInner = (props, ref) => {
1262
1262
  const { as: Element = "div", borderRadius, borderRadiusLeft, borderRadiusRight, className, elevation, width, backgroundColor, hoverBackgroundColor, cursor } = props, attributes = __rest(props, ["as", "borderRadius", "borderRadiusLeft", "borderRadiusRight", "className", "elevation", "width", "backgroundColor", "hoverBackgroundColor", "cursor"]);
1263
1263
  const spacingClasses = createSpacingClassNames(allSpacingPropNames, props);
1264
1264
  const shadowClassName = createShadowClassName(elevation);
@@ -1311,11 +1311,12 @@ const Box = (props) => {
1311
1311
  "ui:cursor-grab": cursor === "grab",
1312
1312
  "ui:cursor-grabbing": cursor === "grabbing"
1313
1313
  }, shadowClassName, borderRadiusClassName, borderRadiusLeftClassName, borderRadiusRightClassName);
1314
- return jsxRuntime.jsx(Element, Object.assign({ className: tailwindMerge.twMerge(boxClasses, className) }, attributesWithoutSpacingKeys));
1314
+ return jsxRuntime.jsx(Element, Object.assign({ ref, className: tailwindMerge.twMerge(boxClasses, className) }, attributesWithoutSpacingKeys));
1315
1315
  };
1316
+ const Box = React__namespace.default.forwardRef(BoxInner);
1316
1317
 
1317
- const Stack = (props) => {
1318
- const { children, gap, _gap, align = "start", justify = "normal", axis = "y", className, reverse, wrap = false, divider } = props, attributes = __rest(props, ["children", "gap", "_gap", "align", "justify", "axis", "className", "reverse", "wrap", "divider"]);
1318
+ const StackInner = (props, ref) => {
1319
+ const { children, gap, _gap, align = "start", justify = "normal", axis = "y", className, reverse, wrap = false, divider, as } = props, attributes = __rest(props, ["children", "gap", "_gap", "align", "justify", "axis", "className", "reverse", "wrap", "divider", "as"]);
1319
1320
  const stackClasses = classNames__default.default(`ui:flex`, {
1320
1321
  "ui:flex-row": axis === "x",
1321
1322
  "ui:flex-col": axis === "y",
@@ -1364,19 +1365,26 @@ const Stack = (props) => {
1364
1365
  const classes = tailwindMerge.twMerge(stackClasses, className);
1365
1366
  if (divider) {
1366
1367
  const numberOfChildNodes = React__namespace.default.Children.toArray(children).length;
1367
- return jsxRuntime.jsx(Box, Object.assign({ className: classes }, attributes, { children: React__namespace.default.Children.map(children, (child, index) => {
1368
- const isLastItem = index >= numberOfChildNodes - 1;
1369
- if (React__namespace.default.isValidElement(child) === false) {
1370
- return null;
1371
- }
1372
- if (isLastItem) {
1373
- return child;
1374
- }
1375
- return jsxRuntime.jsxs(React__namespace.default.Fragment, { children: [child, divider] });
1376
- }) }));
1368
+ return (
1369
+ // @ts-expect-error - Complex polymorphic type intersection between Stack and Box props
1370
+ jsxRuntime.jsx(Box, Object.assign({ as, ref, className: classes }, attributes, { children: React__namespace.default.Children.map(children, (child, index) => {
1371
+ const isLastItem = index >= numberOfChildNodes - 1;
1372
+ if (React__namespace.default.isValidElement(child) === false) {
1373
+ return null;
1374
+ }
1375
+ if (isLastItem) {
1376
+ return child;
1377
+ }
1378
+ return jsxRuntime.jsxs(React__namespace.default.Fragment, { children: [child, divider] });
1379
+ }) }))
1380
+ );
1377
1381
  }
1378
- return jsxRuntime.jsx(Box, Object.assign({ className: classes }, attributes, { children }));
1382
+ return (
1383
+ // @ts-expect-error - Complex polymorphic type intersection between Stack and Box props
1384
+ jsxRuntime.jsx(Box, Object.assign({ as, ref, className: classes }, attributes, { children }))
1385
+ );
1379
1386
  };
1387
+ const Stack = React__namespace.default.forwardRef(StackInner);
1380
1388
 
1381
1389
  const BaseListHeader = ({ title, subtitle, button, headerAccessory, transparent, withBorder }) => {
1382
1390
  const hasHeaderComponent = Boolean(button || headerAccessory);