@luscii-healthtech/web-ui 52.5.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.
- package/dist/index.development.js +23 -15
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/components/Box/Box.d.ts +6 -2
- package/dist/src/components/Stack/Stack.d.ts +6 -2
- package/dist/src/generated/components/Box/Box.d.ts +6 -2
- package/dist/src/generated/components/Stack/Stack.d.ts +6 -2
- package/dist/stories/ActionController.stories.d.ts +2 -0
- package/dist/stories/AsideLayout.stories.d.ts +2 -0
- package/dist/stories/Box.stories.d.ts +31 -1
- package/dist/stories/DetailsDisclosure.stories.d.ts +34 -0
- package/dist/stories/Divider.stories.d.ts +8 -0
- package/dist/stories/HoverIndicatorControl.stories.d.ts +2 -0
- package/dist/stories/PageWithCenteredContentLayout.stories.d.ts +6 -0
- package/dist/stories/SplitViewLayout.stories.d.ts +2 -0
- package/dist/stories/Stack.stories.d.ts +16 -1
- package/dist/stories/Tabs.stories.d.ts +2 -0
- package/dist/stories/TimelineCardLayout.stories.d.ts +4 -0
- package/dist/stories/VerticalMenu.stories.d.ts +2 -0
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
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
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
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
|
|
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);
|