@luscii-healthtech/web-ui 48.6.2 → 49.0.0
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 +13 -23
- 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/TableNew/TableNew.d.ts +4 -3
- package/dist/src/generated/components/TableNew/TableNew.d.ts +4 -3
- package/dist/stories/CardTableRecipe.stories.d.ts +37 -0
- package/dist/stories/TableCardRecipe.stories.d.ts +56 -0
- package/dist/stories/TableNew.stories.d.ts +1 -1
- package/dist/web-ui-tailwind.css +3 -0
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -3389,10 +3389,13 @@ function Card(props) {
|
|
|
3389
3389
|
modifier: "hover",
|
|
3390
3390
|
transition: true
|
|
3391
3391
|
});
|
|
3392
|
-
const
|
|
3392
|
+
const outerClasses = classNames__default.default("ui:bg-white", "ui:transition-colors ui:duration-300", className, hoverShadowClassName, "ui:transition-shadow ui:duration-300");
|
|
3393
|
+
const innerClasses = classNames__default.default("ui:bg-white ui:rounded-inherit ui:border ui:border-transparent ui:transition[border-color] ui:duration-300 ui:motion-reduce:duration-[0ms]! ui:overflow-hidden", "ui:relative", "ui:before:contain-strict ui:before:transition[transform, opacity] ui:before:delay-50 ui:before:duration-150 ui:before:motion-reduce:duration-[0ms]!", "ui:before:origin-left ui:before:absolute ui:before:left-0 ui:before:content-[''] ui:before:inset-y-0 ui:before:ease-in-out", {
|
|
3394
|
+
"ui:border-slate-300": border || highlighted,
|
|
3395
|
+
"ui:hover:border-slate-400": hasHoverEffect,
|
|
3393
3396
|
"ui:before:opacity-0 ui:before:scale-x-0": !highlighted,
|
|
3394
3397
|
"ui:before:opacity-100 ui:before:scale-x-100": highlighted,
|
|
3395
|
-
"
|
|
3398
|
+
"ui:before:bg-primary": highlighted,
|
|
3396
3399
|
"ui:before:w-xxxxs": ["none", "xxxxs"].includes(borderRadius),
|
|
3397
3400
|
"ui:before:w-xxxs": borderRadius === "xxxs",
|
|
3398
3401
|
"ui:before:w-xxs": borderRadius === "xxs",
|
|
@@ -3401,10 +3404,7 @@ function Card(props) {
|
|
|
3401
3404
|
"ui:before:w-m": ["m", "l", "xl", "xxl"].includes(borderRadius)
|
|
3402
3405
|
// We cap at `ui:before:w-m` otherwise the bar overlaps the contents of the Card.
|
|
3403
3406
|
});
|
|
3404
|
-
return jsxRuntime.jsx(Box, Object.assign({ as: Element, elevation: highlighted && !elevation ? "large" : elevation, borderRadius }, rest, { className:
|
|
3405
|
-
"ui:border-slate-300": border || highlighted,
|
|
3406
|
-
"ui:hover:border-slate-400": hasHoverEffect
|
|
3407
|
-
}), children: [jsxRuntime.jsx(RenderTopBar, Object.assign({}, props)), padding ? jsxRuntime.jsx(Padding$1, { children }) : children] }) }));
|
|
3407
|
+
return jsxRuntime.jsx(Box, Object.assign({ as: Element, elevation: highlighted && !elevation ? "large" : elevation, borderRadius }, rest, { className: outerClasses, children: jsxRuntime.jsxs(Box, { className: innerClasses, children: [jsxRuntime.jsx(RenderTopBar, Object.assign({}, props)), padding ? jsxRuntime.jsx(Padding$1, { children }) : children] }) }));
|
|
3408
3408
|
}
|
|
3409
3409
|
Card.Title = (props) => jsxRuntime.jsx(Title, Object.assign({ variant: "sm" }, props));
|
|
3410
3410
|
Card.TopBar = TopBar;
|
|
@@ -3991,18 +3991,15 @@ function Table(_a) {
|
|
|
3991
3991
|
const isPlainText = (node) => {
|
|
3992
3992
|
return typeof node === "string" || typeof node === "number";
|
|
3993
3993
|
};
|
|
3994
|
-
const TableRoot = React__namespace.default.forwardRef((_a,
|
|
3994
|
+
const TableRoot = React__namespace.default.forwardRef((_a, ref) => {
|
|
3995
3995
|
var { className, children, sticky, headerBackground = "none", variant = "fit-content", layout = "auto" } = _a, attrs = __rest(_a, ["className", "children", "sticky", "headerBackground", "variant", "layout"]);
|
|
3996
3996
|
const stickyHeader = sticky === "header" || sticky === "header-and-first-column";
|
|
3997
3997
|
const stickyFirstColumn = sticky === "first-column" || sticky === "header-and-first-column";
|
|
3998
|
-
const firstColBg = headerBackground === "first-column" || headerBackground === "first-row-and-column" ? "#f8fafc" : "
|
|
3999
|
-
const firstRowBg = headerBackground === "first-row" || headerBackground === "first-row-and-column" ? "#f8fafc" : "
|
|
4000
|
-
const cornerCellBg = headerBackground !== "none" ? "#f8fafc" : "
|
|
3998
|
+
const firstColBg = headerBackground === "first-column" || headerBackground === "first-row-and-column" ? "#f8fafc" : "unset";
|
|
3999
|
+
const firstRowBg = headerBackground === "first-row" || headerBackground === "first-row-and-column" ? "#f8fafc" : "unset";
|
|
4000
|
+
const cornerCellBg = headerBackground !== "none" ? "#f8fafc" : "unset";
|
|
4001
4001
|
const hasTFoot = React__namespace.default.Children.toArray(children).some((child) => React__namespace.default.isValidElement(child) && child.type === TFoot);
|
|
4002
|
-
return jsxRuntime.
|
|
4003
|
-
"ui:w-fit": variant === "fit-content",
|
|
4004
|
-
"ui:w-full": variant === "full-width"
|
|
4005
|
-
}, className), ref: wrapperRef, children: jsxRuntime.jsxs("table", Object.assign({ className: classNames__default.default({
|
|
4002
|
+
return jsxRuntime.jsxs("table", Object.assign({ ref, className: classNames__default.default(className, {
|
|
4006
4003
|
"ui:w-fit": variant === "fit-content",
|
|
4007
4004
|
"ui:w-full": variant === "full-width",
|
|
4008
4005
|
"ui:table-auto": layout === "auto",
|
|
@@ -4044,7 +4041,7 @@ const TableRoot = React__namespace.default.forwardRef((_a, wrapperRef) => {
|
|
|
4044
4041
|
return jsxRuntime.jsx(Tbody, Object.assign({}, child.props, { hasTFoot, children: child.props.children }));
|
|
4045
4042
|
}
|
|
4046
4043
|
return child;
|
|
4047
|
-
})] }))
|
|
4044
|
+
})] }));
|
|
4048
4045
|
});
|
|
4049
4046
|
function Thead(_a) {
|
|
4050
4047
|
var { className, children, stickyHeader } = _a, attrs = __rest(_a, ["className", "children", "stickyHeader"]);
|
|
@@ -4076,13 +4073,6 @@ function Tbody(_a) {
|
|
|
4076
4073
|
{
|
|
4077
4074
|
"ui:[&>tr:last-child>td]:border-b ui:[&>tr:last-child>th]:border-b": hasTFoot
|
|
4078
4075
|
},
|
|
4079
|
-
// Rounded corners for the first and last row
|
|
4080
|
-
{
|
|
4081
|
-
"ui:[&>tr:first-child>td:first-child]:rounded-tl-2xl": !hasTFoot,
|
|
4082
|
-
"ui:[&>tr:first-child>td:last-child]:rounded-tr-2xl": !hasTFoot,
|
|
4083
|
-
"ui:[&>tr:last-child>td:first-child]:rounded-bl-2xl": !hasTFoot,
|
|
4084
|
-
"ui:[&>tr:last-child>td:last-child]:rounded-br-2xl": !hasTFoot
|
|
4085
|
-
},
|
|
4086
4076
|
className
|
|
4087
4077
|
) }, attrs, { children }));
|
|
4088
4078
|
}
|
|
@@ -4092,7 +4082,7 @@ function TFoot(_a) {
|
|
|
4092
4082
|
}
|
|
4093
4083
|
function Tr(_a) {
|
|
4094
4084
|
var { className, children } = _a, attrs = __rest(_a, ["className", "children"]);
|
|
4095
|
-
return jsxRuntime.jsx(
|
|
4085
|
+
return jsxRuntime.jsx(Box, Object.assign({ as: "tr", className: classNames__default.default(className) }, attrs, { children }));
|
|
4096
4086
|
}
|
|
4097
4087
|
const getCellClasses = (options) => {
|
|
4098
4088
|
return classNames__default.default("ui:align-middle ui:first:pl-l ui:last:pr-l ui:text-left", {
|