@luscii-healthtech/web-ui 52.6.0 → 52.6.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/dist/index.development.js +41 -33
- 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/components/TableNew/TableNew.d.ts +6 -13
- package/dist/src/generated/components/Box/Box.d.ts +6 -2
- package/dist/src/generated/components/Stack/Stack.d.ts +6 -2
- package/dist/src/generated/components/TableNew/TableNew.d.ts +6 -13
- 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/TableNew.stories.d.ts +6 -6
- 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);
|
|
@@ -3714,9 +3722,9 @@ const TableRoot = React__namespace.default.forwardRef((_a, ref) => {
|
|
|
3714
3722
|
return child;
|
|
3715
3723
|
})] }));
|
|
3716
3724
|
});
|
|
3717
|
-
|
|
3725
|
+
const Thead = React__namespace.default.forwardRef((_a, ref) => {
|
|
3718
3726
|
var { className, children, stickyHeader } = _a, attrs = __rest(_a, ["className", "children", "stickyHeader"]);
|
|
3719
|
-
return jsxRuntime.jsx("thead", Object.assign({ className: classNames__default.default(
|
|
3727
|
+
return jsxRuntime.jsx("thead", Object.assign({ ref, className: classNames__default.default(
|
|
3720
3728
|
// Styles for all <th>
|
|
3721
3729
|
"ui:[&>tr>th]:border-neutral-border-high-contrast ui:[&>tr>th]:border-b",
|
|
3722
3730
|
// Styles for the first <th> in the header row
|
|
@@ -3731,10 +3739,10 @@ function Thead(_a) {
|
|
|
3731
3739
|
},
|
|
3732
3740
|
className
|
|
3733
3741
|
) }, attrs, { children }));
|
|
3734
|
-
}
|
|
3735
|
-
|
|
3742
|
+
});
|
|
3743
|
+
const Tbody = React__namespace.default.forwardRef((_a, ref) => {
|
|
3736
3744
|
var { className, children, hasTFoot } = _a, attrs = __rest(_a, ["className", "children", "hasTFoot"]);
|
|
3737
|
-
return jsxRuntime.jsx("tbody", Object.assign({ className: classNames__default.default(
|
|
3745
|
+
return jsxRuntime.jsx("tbody", Object.assign({ ref, className: classNames__default.default(
|
|
3738
3746
|
// setting border color across all cells
|
|
3739
3747
|
"ui:[&>tr>td]:border-neutral-border-high-contrast ui:[&>tr>th]:border-neutral-border-high-contrast",
|
|
3740
3748
|
// Top border for all rows except the first one
|
|
@@ -3746,30 +3754,30 @@ function Tbody(_a) {
|
|
|
3746
3754
|
},
|
|
3747
3755
|
className
|
|
3748
3756
|
) }, attrs, { children }));
|
|
3749
|
-
}
|
|
3750
|
-
|
|
3757
|
+
});
|
|
3758
|
+
const TFoot = React__namespace.default.forwardRef((_a, ref) => {
|
|
3751
3759
|
var { className, children } = _a, attrs = __rest(_a, ["className", "children"]);
|
|
3752
|
-
return jsxRuntime.jsx("tfoot", Object.assign({ className: classNames__default.default(className) }, attrs, { children }));
|
|
3753
|
-
}
|
|
3754
|
-
|
|
3760
|
+
return jsxRuntime.jsx("tfoot", Object.assign({ ref, className: classNames__default.default(className) }, attrs, { children }));
|
|
3761
|
+
});
|
|
3762
|
+
const Tr = React__namespace.default.forwardRef((_a, ref) => {
|
|
3755
3763
|
var { className, children } = _a, attrs = __rest(_a, ["className", "children"]);
|
|
3756
|
-
return jsxRuntime.jsx(Box, Object.assign({ as: "tr", className: classNames__default.default(className) }, attrs, { children }));
|
|
3757
|
-
}
|
|
3764
|
+
return jsxRuntime.jsx(Box, Object.assign({ as: "tr", ref, className: classNames__default.default(className) }, attrs, { children }));
|
|
3765
|
+
});
|
|
3758
3766
|
const getCellClasses = (options) => {
|
|
3759
3767
|
return classNames__default.default("ui:first:pl-l ui:last:pr-l ui:text-left", {
|
|
3760
3768
|
"ui:px-xxs ui:py-m": !options.omitPadding
|
|
3761
3769
|
}, options.className);
|
|
3762
3770
|
};
|
|
3763
|
-
|
|
3771
|
+
const Th = React__namespace.default.forwardRef((_a, ref) => {
|
|
3764
3772
|
var { className, children, omitPadding = false } = _a, attrs = __rest(_a, ["className", "children", "omitPadding"]);
|
|
3765
3773
|
const content = isPlainText(children) ? jsxRuntime.jsx(Text, { as: "span", variant: "strong", children }) : children;
|
|
3766
|
-
return jsxRuntime.jsx("th", Object.assign({ className: getCellClasses({ omitPadding, className }) }, attrs, { children: content }));
|
|
3767
|
-
}
|
|
3768
|
-
|
|
3774
|
+
return jsxRuntime.jsx("th", Object.assign({ ref, className: getCellClasses({ omitPadding, className }) }, attrs, { children: content }));
|
|
3775
|
+
});
|
|
3776
|
+
const Td = React__namespace.default.forwardRef((_a, ref) => {
|
|
3769
3777
|
var { className, children, omitPadding = false } = _a, attrs = __rest(_a, ["className", "children", "omitPadding"]);
|
|
3770
3778
|
const content = isPlainText(children) ? jsxRuntime.jsx(Text, { as: "span", children }) : children;
|
|
3771
|
-
return jsxRuntime.jsx("td", Object.assign({ className: getCellClasses({ omitPadding, className }) }, attrs, { children: content }));
|
|
3772
|
-
}
|
|
3779
|
+
return jsxRuntime.jsx("td", Object.assign({ ref, className: getCellClasses({ omitPadding, className }) }, attrs, { children: content }));
|
|
3780
|
+
});
|
|
3773
3781
|
const TableNew = Object.assign(TableRoot, {
|
|
3774
3782
|
Thead,
|
|
3775
3783
|
Tbody,
|