@luscii-healthtech/web-ui 42.13.2 → 43.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 +39 -13
- 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/Page/CRUDPage.types.d.ts +5 -4
- package/dist/src/components/PageWithCenteredContentLayout/PageWithCenteredContentLayout.d.ts +5 -0
- package/dist/src/components/Stack/Stack.d.ts +1 -1
- package/dist/src/components/Steps/Steps.d.ts +10 -8
- package/dist/src/components/Steps/subcomponents/Step.d.ts +7 -0
- package/dist/stories/Divider.stories.d.ts +2 -2
- package/dist/stories/PageWithCenteredContentLayout.stories.d.ts +2 -0
- package/dist/stories/Steps.stories.d.ts +20 -8
- package/dist/stories/TimelineCardLayout.stories.d.ts +1 -1
- package/dist/web-ui-tailwind.css +2 -9
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/components/Steps/Step.d.ts +0 -9
- package/dist/stories/Step.stories.d.ts +0 -25
|
@@ -1259,6 +1259,7 @@ const Stack = (props) => {
|
|
|
1259
1259
|
"ui:justify-between": justify === "between",
|
|
1260
1260
|
"ui:justify-around": justify === "around",
|
|
1261
1261
|
"ui:justify-evenly": justify === "evenly",
|
|
1262
|
+
"ui:justify-stretch": justify === "stretch",
|
|
1262
1263
|
"ui:items-center": align === "center",
|
|
1263
1264
|
"ui:items-start": align === "start",
|
|
1264
1265
|
"ui:items-end": align === "end",
|
|
@@ -4099,19 +4100,32 @@ Page.propTypes = {
|
|
|
4099
4100
|
navLayoutProps: PropTypes__default.default.object
|
|
4100
4101
|
};
|
|
4101
4102
|
|
|
4102
|
-
const Step = ({ title,
|
|
4103
|
-
|
|
4104
|
-
|
|
4103
|
+
const Step = ({ title, subtitle, state = "completed" }) => {
|
|
4104
|
+
let barColor = "ui:bg-slate-200";
|
|
4105
|
+
let titleColor = "slate-500";
|
|
4106
|
+
switch (state) {
|
|
4107
|
+
case "completed":
|
|
4108
|
+
case "current":
|
|
4109
|
+
barColor = "ui:bg-primary";
|
|
4110
|
+
titleColor = "blue-800";
|
|
4111
|
+
break;
|
|
4112
|
+
}
|
|
4113
|
+
return jsxRuntime.jsxs(Box, { width: "full", children: [jsxRuntime.jsx(Box, { mb: "xxs", width: "full", className: classNames__default.default("ui:h-1 ui:rounded", barColor) }), jsxRuntime.jsx(Text, { variant: "strong", color: titleColor, children: title }), subtitle && jsxRuntime.jsx(Text, { variant: "strong", color: "base", children: subtitle })] });
|
|
4105
4114
|
};
|
|
4106
4115
|
|
|
4107
|
-
const Steps = (
|
|
4108
|
-
const
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4116
|
+
const Steps = (props) => {
|
|
4117
|
+
const { children, className } = props;
|
|
4118
|
+
return jsxRuntime.jsx(Stack, { axis: "x", justify: "stretch", gap: "l", className, children: React__namespace.default.Children.map(children, (child) => {
|
|
4119
|
+
if (!React__namespace.default.isValidElement(child)) {
|
|
4120
|
+
return null;
|
|
4121
|
+
}
|
|
4122
|
+
if (child.type === Step) {
|
|
4123
|
+
return jsxRuntime.jsx(Step, Object.assign({}, child.props));
|
|
4124
|
+
}
|
|
4125
|
+
return child;
|
|
4126
|
+
}) });
|
|
4114
4127
|
};
|
|
4128
|
+
Steps.Step = Step;
|
|
4115
4129
|
|
|
4116
4130
|
const isBreadcrumbDividerProps = (subject) => {
|
|
4117
4131
|
if (!subject || typeof subject !== "object") {
|
|
@@ -4260,7 +4274,16 @@ const CRUDPage = ({ submitButtonProps, cancelButtonProps, className, children, i
|
|
|
4260
4274
|
* since the spacing needed will be occupied by the `belowHeader` component itself.
|
|
4261
4275
|
*/
|
|
4262
4276
|
{ "ui:mt-xl": !belowHeader }
|
|
4263
|
-
), children: [steps && jsxRuntime.jsx(Steps, { className: "ui:mb-4",
|
|
4277
|
+
), children: [steps && jsxRuntime.jsx(Steps, { className: "ui:mb-4", children: steps.titles.map((stepTitle, index) => {
|
|
4278
|
+
const stepNumber = index + 1;
|
|
4279
|
+
let state = "upcoming";
|
|
4280
|
+
if (stepNumber < steps.currentStep) {
|
|
4281
|
+
state = "completed";
|
|
4282
|
+
} else if (stepNumber === steps.currentStep) {
|
|
4283
|
+
state = "current";
|
|
4284
|
+
}
|
|
4285
|
+
return jsxRuntime.jsx(Steps.Step, { title: `${steps.localization.step} ${stepNumber}`, subtitle: stepTitle, state }, stepTitle);
|
|
4286
|
+
}) }), children, jsxRuntime.jsx(Line, { left: accessory ? accessoriesToRender : [submitButton, cancelButton], className: classNames__default.default("cweb-crud-page-button-line", "ui:mt-4 ui:border-t ui:border-solid ui:border-color-divider ui:pt-4") })] }) })] }) });
|
|
4264
4287
|
};
|
|
4265
4288
|
const PageHeaderBlock = ({ header, title }) => {
|
|
4266
4289
|
if (!title && !header) {
|
|
@@ -6358,8 +6381,11 @@ const Aside = (props) => {
|
|
|
6358
6381
|
SplitViewLayout.Aside = Aside;
|
|
6359
6382
|
|
|
6360
6383
|
const Header = (props) => {
|
|
6361
|
-
const { children, className, leftActionSlot, rightActionSlot } = props, restProps = __rest(props, ["children", "className", "leftActionSlot", "rightActionSlot"]);
|
|
6362
|
-
const classes = classNames__default.default(className, "ui:max-w-[100vw]
|
|
6384
|
+
const { children, className, leftActionSlot, rightActionSlot, slotsAlignment = "center" } = props, restProps = __rest(props, ["children", "className", "leftActionSlot", "rightActionSlot", "slotsAlignment"]);
|
|
6385
|
+
const classes = classNames__default.default(className, "ui:max-w-[100vw]", {
|
|
6386
|
+
"ui:items-center": slotsAlignment === "center",
|
|
6387
|
+
"ui:items-start": slotsAlignment === "start"
|
|
6388
|
+
});
|
|
6363
6389
|
return jsxRuntime.jsxs(Stack, Object.assign({ as: "header", p: "xl", axis: "x", className: classes, gap: "xxl", align: "center", justify: "center", backgroundColor: "background" }, restProps, { children: [(leftActionSlot || rightActionSlot) && jsxRuntime.jsx(Box, { className: "ui:w-[--spacing(9)] ui:h-[--spacing(9)]", children: leftActionSlot }), jsxRuntime.jsx(Stack, { axis: "x", justify: "center", width: "full", className: "ui:lg:max-w-[--spacing(310)]", children: jsxRuntime.jsx(Box, { width: "full", children }) }), (leftActionSlot || rightActionSlot) && jsxRuntime.jsx(Box, { className: "ui:w-[--spacing(9)] ui:h-[--spacing(9)]", children: rightActionSlot })] }));
|
|
6364
6390
|
};
|
|
6365
6391
|
Header.displayName = "PageWithCenteredContentLayout.Header";
|