@luscii-healthtech/web-ui 58.4.0 → 58.5.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 +27 -0
- 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/ActionCardDetailed/ActionCardDetailed.d.ts +94 -0
- package/dist/src/generated/components/ActionCardDetailed/ActionCardDetailed.d.ts +94 -0
- package/dist/src/generated/index.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/stories/ActionCardDetailed.stories.d.ts +72 -0
- package/dist/web-ui-tailwind.css +10 -0
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -5121,6 +5121,32 @@ const ActionCard = ({ type, title, metadata, instruments, actions, draggable = f
|
|
|
5121
5121
|
}) })] }), actions && jsxRuntime.jsx(Box, { className: "ui:relative ui:z-[1] ui:shrink-0 ui:self-center", children: actions })] }) });
|
|
5122
5122
|
};
|
|
5123
5123
|
|
|
5124
|
+
const actionIcons = {
|
|
5125
|
+
information: ActionInformationColoredIcon,
|
|
5126
|
+
contact: ActionContactColoredIcon,
|
|
5127
|
+
lesson: ActionLessonColoredIcon,
|
|
5128
|
+
calculation: ActionCalculationColoredIcon,
|
|
5129
|
+
measurement: ActionBloodPressureColoredIcon
|
|
5130
|
+
};
|
|
5131
|
+
const ScheduleItem = ({ icon, label, value, detail }) => jsxRuntime.jsxs(Stack, { axis: "x", align: "start", _gap: "base", children: [jsxRuntime.jsx(Box, { "aria-hidden": true, _p: "s", className: "ui:size-[var(--ui-semantic-size-xl)] ui:shrink-0 ui:[border-radius:var(--ui-semantic-radius-s)]", children: icon }), jsxRuntime.jsxs(Stack, { _gap: "none", className: "ui:min-w-0", children: [jsxRuntime.jsxs(Stack, { axis: "x", align: "baseline", _gap: "s", wrap: true, children: [jsxRuntime.jsx(Text, { variant: "body-base-light", color: "neutral-secondary", children: label }), jsxRuntime.jsx(Text, { variant: "body-base-regular", color: "neutral-secondary", children: value })] }), detail && jsxRuntime.jsx(Text, { variant: "body-small-regular", color: "neutral-secondary", children: detail })] })] });
|
|
5132
|
+
const ActionCardDetailed = ({ type, title, category, metadata, schedule, scheduleHeading = "Schedule settings", instruments, instrumentsHeading = "Instruments in this action", onEdit, onDelete, onClose, className }) => {
|
|
5133
|
+
const ActionIcon = actionIcons[type];
|
|
5134
|
+
const hasActions = onEdit || onDelete || onClose;
|
|
5135
|
+
return jsxRuntime.jsx(Card, { border: true, borderRadius: "m", elevation: "medium", className: classNames__default.default("ui:w-full ui:max-w-[600px]", className), children: jsxRuntime.jsxs(Stack, { _gap: "xl", width: "full", children: [jsxRuntime.jsxs(Stack, { axis: "x", align: "start", justify: "between", _gap: "base", width: "full", children: [jsxRuntime.jsxs(Stack, { axis: "x", align: "start", _gap: "base", className: "ui:min-w-0", children: [jsxRuntime.jsx(ActionIcon, { "aria-hidden": true, width: 24, height: 24, className: "ui:shrink-0" }), jsxRuntime.jsxs(Stack, { _gap: "none", className: "ui:min-w-0", children: [jsxRuntime.jsx(Heading, { variant: "h3", children: title }), category && jsxRuntime.jsx(Text, { variant: "body-base-regular", color: "neutral-secondary", children: category })] })] }), hasActions && jsxRuntime.jsxs(Stack, { axis: "x", align: "center", _gap: "base", className: "ui:shrink-0", children: [onEdit && jsxRuntime.jsx(TertiaryIconButton, { label: "Edit action", onClick: onEdit, children: jsxRuntime.jsx(PencilIcon, { "aria-hidden": true }) }), onDelete && jsxRuntime.jsx(TertiaryIconButton, { label: "Delete action", onClick: onDelete, children: jsxRuntime.jsx(TrashBinIcon, { "aria-hidden": true }) }), onClose && jsxRuntime.jsx(TertiaryIconButton, { label: "Close action details", onClick: onClose, children: jsxRuntime.jsx(CrossIcon, { "aria-hidden": true }) })] })] }), metadata && metadata.length > 0 && jsxRuntime.jsx(Stack, { axis: "x", _gap: "base", wrap: true, children: metadata.map((item, index) => jsxRuntime.jsx(
|
|
5136
|
+
Tag,
|
|
5137
|
+
{ _size: "large", _type: "neutral", _variant: "flat", children: item },
|
|
5138
|
+
`${index}-${item}`
|
|
5139
|
+
)) }), schedule && schedule.length > 0 && jsxRuntime.jsxs(Stack, { _gap: "base", width: "full", children: [jsxRuntime.jsx(Heading, { variant: "h4", children: scheduleHeading }), jsxRuntime.jsx(Stack, { _gap: "l", width: "full", children: schedule.map((row, index) => jsxRuntime.jsx(
|
|
5140
|
+
ScheduleItem,
|
|
5141
|
+
Object.assign({}, row),
|
|
5142
|
+
index
|
|
5143
|
+
)) })] }), instruments && instruments.length > 0 && jsxRuntime.jsxs(Stack, { _gap: "base", width: "full", children: [jsxRuntime.jsx(Heading, { variant: "h4", children: instrumentsHeading }), jsxRuntime.jsx(Stack, { _gap: "base", width: "full", children: instruments.map((instrument, index) => jsxRuntime.jsx(
|
|
5144
|
+
InstrumentCard,
|
|
5145
|
+
Object.assign({}, instrument, { variant: "detailed" }),
|
|
5146
|
+
index
|
|
5147
|
+
)) })] })] }) });
|
|
5148
|
+
};
|
|
5149
|
+
|
|
5124
5150
|
var css_248z$1 = "/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */\n.cweb-textarea {\n resize: none;\n background-color: field;\n}\n.cweb-textarea.has-icon {\n background-size: 24px;\n background-position: 10px 10px;\n background-repeat: no-repeat;\n padding-left: 44px;\n}\n.cweb-textarea.resizable {\n resize: both;\n}\n.cweb-textarea.resizable-x {\n resize: horizontal;\n}\n.cweb-textarea.resizable-y {\n resize: vertical;\n}\n.cweb-textarea:focus {\n border-color: var(--color-primary);\n}\n.cweb-textarea:disabled {\n cursor: not-allowed;\n}\n.cweb-textarea.has-error {\n border: 1px solid #b91c1c;\n color: #991b1b;\n}";
|
|
5125
5151
|
styleInject(css_248z$1);
|
|
5126
5152
|
|
|
@@ -7212,6 +7238,7 @@ exports.AccordionTemporary = Accordion;
|
|
|
7212
7238
|
exports.ActionBloodPressureColoredIcon = ActionBloodPressureColoredIcon;
|
|
7213
7239
|
exports.ActionCalculationColoredIcon = ActionCalculationColoredIcon;
|
|
7214
7240
|
exports.ActionCard = ActionCard;
|
|
7241
|
+
exports.ActionCardDetailed = ActionCardDetailed;
|
|
7215
7242
|
exports.ActionContactColoredIcon = ActionContactColoredIcon;
|
|
7216
7243
|
exports.ActionController = ActionController;
|
|
7217
7244
|
exports.ActionHeartRateColoredIcon = ActionHeartRateColoredIcon;
|