@luscii-healthtech/web-ui 0.7.0 → 0.8.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/components/Table/Table.types.d.ts +1 -0
- package/dist/components/Timeline/Timeline.d.ts +9 -0
- package/dist/components/Timeline/TimelineStep.d.ts +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/web-ui-tailwind.css +43 -0
- package/dist/web-ui.cjs.development.js +64 -28
- package/dist/web-ui.cjs.development.js.map +1 -1
- package/dist/web-ui.cjs.production.min.js +1 -1
- package/dist/web-ui.cjs.production.min.js.map +1 -1
- package/dist/web-ui.esm.js +64 -29
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ButtonV2/ButtonV2.tsx +6 -1
- package/src/components/Table/Table.types.ts +1 -0
- package/src/components/Table/TableBodyRowDataCell.tsx +5 -3
- package/src/components/Timeline/Timeline.tsx +28 -0
- package/src/components/Timeline/TimelineStep.tsx +41 -0
- package/src/index.tsx +1 -0
|
@@ -10,6 +10,7 @@ export interface TableFieldConfig<Item> {
|
|
|
10
10
|
export declare type TableFieldContent<Item> = TableFieldText | [TableFieldAction<Item>?, TableFieldAction<Item>?];
|
|
11
11
|
export interface TableFieldText {
|
|
12
12
|
text: string;
|
|
13
|
+
breakAllWord?: boolean;
|
|
13
14
|
tag?: {
|
|
14
15
|
text: string;
|
|
15
16
|
color: TagColorTheme;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseButtonProps } from "../ButtonV2/ButtonProps.type";
|
|
3
|
+
import { TimelineStepProps } from "./TimelineStep";
|
|
4
|
+
export interface TimelineProps {
|
|
5
|
+
steps: TimelineStepProps[];
|
|
6
|
+
loadMoreButtonProps?: BaseButtonProps;
|
|
7
|
+
}
|
|
8
|
+
export declare const Timeline: (props: TimelineProps) => JSX.Element;
|
|
9
|
+
export default Timeline;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface TimelineStepProps {
|
|
3
|
+
key: string | number;
|
|
4
|
+
type?: "wide" | "base";
|
|
5
|
+
content: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const TimelineStep: {
|
|
8
|
+
({ content, type, }: TimelineStepProps): JSX.Element;
|
|
9
|
+
defaultProps: {
|
|
10
|
+
type: "wide" | "base" | undefined;
|
|
11
|
+
};
|
|
12
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export { default as TextEditor } from "./components/TextEditor/TextEditor";
|
|
|
49
49
|
export { default as TextEditorV2 } from "./components/TextEditorV2/TextEditorV2";
|
|
50
50
|
export { TextLink, TextLinkProps } from "./components/TextLink/TextLink";
|
|
51
51
|
export { Title, TitleStyle } from "./components/Title/Title";
|
|
52
|
+
export { Timeline } from "./components/Timeline/Timeline";
|
|
52
53
|
export { ViewItem, ViewItemProps } from "./components/ViewItem/ViewItem";
|
|
53
54
|
export { default as Text } from "./components/Text/Text";
|
|
54
55
|
export { IconProps } from "./components/Icons/types/IconProps.type";
|
package/dist/web-ui-tailwind.css
CHANGED
|
@@ -819,6 +819,12 @@ video {
|
|
|
819
819
|
border-color: rgba(8, 128, 236, var(--border-opacity));
|
|
820
820
|
}
|
|
821
821
|
|
|
822
|
+
.border-blue-800 {
|
|
823
|
+
--border-opacity: 1;
|
|
824
|
+
border-color: #0074DD;
|
|
825
|
+
border-color: rgba(0, 116, 221, var(--border-opacity));
|
|
826
|
+
}
|
|
827
|
+
|
|
822
828
|
.border-slate-50 {
|
|
823
829
|
--border-opacity: 1;
|
|
824
830
|
border-color: #f8fafc;
|
|
@@ -972,6 +978,10 @@ video {
|
|
|
972
978
|
border-width: 1px;
|
|
973
979
|
}
|
|
974
980
|
|
|
981
|
+
.border-l-2 {
|
|
982
|
+
border-left-width: 2px;
|
|
983
|
+
}
|
|
984
|
+
|
|
975
985
|
.border-t {
|
|
976
986
|
border-top-width: 1px;
|
|
977
987
|
}
|
|
@@ -1148,6 +1158,10 @@ video {
|
|
|
1148
1158
|
height: 100vh;
|
|
1149
1159
|
}
|
|
1150
1160
|
|
|
1161
|
+
.last\:h-0:last-child {
|
|
1162
|
+
height: 0;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1151
1165
|
.text-xs {
|
|
1152
1166
|
font-size: 0.75rem;
|
|
1153
1167
|
}
|
|
@@ -1225,6 +1239,11 @@ video {
|
|
|
1225
1239
|
margin-bottom: 1.5rem;
|
|
1226
1240
|
}
|
|
1227
1241
|
|
|
1242
|
+
.mx-auto {
|
|
1243
|
+
margin-left: auto;
|
|
1244
|
+
margin-right: auto;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1228
1247
|
.ml-0 {
|
|
1229
1248
|
margin-left: 0;
|
|
1230
1249
|
}
|
|
@@ -1277,6 +1296,10 @@ video {
|
|
|
1277
1296
|
margin-left: 1rem;
|
|
1278
1297
|
}
|
|
1279
1298
|
|
|
1299
|
+
.mt-6 {
|
|
1300
|
+
margin-top: 1.5rem;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1280
1303
|
.mb-6 {
|
|
1281
1304
|
margin-bottom: 1.5rem;
|
|
1282
1305
|
}
|
|
@@ -1309,6 +1332,10 @@ video {
|
|
|
1309
1332
|
margin-left: 0.625rem;
|
|
1310
1333
|
}
|
|
1311
1334
|
|
|
1335
|
+
.-ml-px {
|
|
1336
|
+
margin-left: -1px;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1312
1339
|
.first\:ml-0:first-child {
|
|
1313
1340
|
margin-left: 0;
|
|
1314
1341
|
}
|
|
@@ -1469,6 +1496,10 @@ video {
|
|
|
1469
1496
|
padding-left: 0.25rem;
|
|
1470
1497
|
}
|
|
1471
1498
|
|
|
1499
|
+
.pt-3 {
|
|
1500
|
+
padding-top: 0.75rem;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1472
1503
|
.pl-4 {
|
|
1473
1504
|
padding-left: 1rem;
|
|
1474
1505
|
}
|
|
@@ -1481,6 +1512,10 @@ video {
|
|
|
1481
1512
|
padding-bottom: 1.5rem;
|
|
1482
1513
|
}
|
|
1483
1514
|
|
|
1515
|
+
.pl-6 {
|
|
1516
|
+
padding-left: 1.5rem;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1484
1519
|
.pl-10 {
|
|
1485
1520
|
padding-left: 2.5rem;
|
|
1486
1521
|
}
|
|
@@ -1561,10 +1596,18 @@ video {
|
|
|
1561
1596
|
left: 0;
|
|
1562
1597
|
}
|
|
1563
1598
|
|
|
1599
|
+
.top-3 {
|
|
1600
|
+
top: 0.75rem;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1564
1603
|
.-top-1 {
|
|
1565
1604
|
top: -0.25rem;
|
|
1566
1605
|
}
|
|
1567
1606
|
|
|
1607
|
+
.-left-3 {
|
|
1608
|
+
left: -0.75rem;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1568
1611
|
.-right-54 {
|
|
1569
1612
|
right: -13.5rem;
|
|
1570
1613
|
}
|
|
@@ -370,6 +370,11 @@ var ButtonV2 = function ButtonV2(_ref) {
|
|
|
370
370
|
className = _ref.className,
|
|
371
371
|
otherAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
372
372
|
|
|
373
|
+
function handleClick(event) {
|
|
374
|
+
event.stopPropagation();
|
|
375
|
+
onClick == null ? void 0 : onClick(event);
|
|
376
|
+
}
|
|
377
|
+
|
|
373
378
|
if (!text && !icon) {
|
|
374
379
|
console.error("A text or an icon is required to use this component, please make sure to pass at least one of them as a prop.");
|
|
375
380
|
return /*#__PURE__*/React__default.createElement("span", null, "Invalid props passed to this component.");
|
|
@@ -386,7 +391,7 @@ var ButtonV2 = function ButtonV2(_ref) {
|
|
|
386
391
|
return /*#__PURE__*/React__default.createElement("button", Object.assign({}, otherAttributes, {
|
|
387
392
|
className: buttonClassName,
|
|
388
393
|
type: "button",
|
|
389
|
-
onClick:
|
|
394
|
+
onClick: handleClick,
|
|
390
395
|
disabled: isDisabled,
|
|
391
396
|
"aria-disabled": isDisabled
|
|
392
397
|
}), icon && /*#__PURE__*/React__default.createElement(icon, {
|
|
@@ -2093,7 +2098,10 @@ function TableBodyRowDataCell(props) {
|
|
|
2093
2098
|
text: content.tag.text,
|
|
2094
2099
|
colorTheme: content.tag.color
|
|
2095
2100
|
})), /*#__PURE__*/React__default.createElement(Text, {
|
|
2096
|
-
className: "py-4 text-left leading-5
|
|
2101
|
+
className: classNames("py-4 text-left leading-5", {
|
|
2102
|
+
"break-all": content.breakAllWord,
|
|
2103
|
+
"break-words": !content.breakAllWord
|
|
2104
|
+
}),
|
|
2097
2105
|
text: content.text === "" ? emptyFieldContentText : content.text,
|
|
2098
2106
|
type: "base"
|
|
2099
2107
|
})), isTableFieldAction(content) && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -2106,8 +2114,7 @@ function TableBodyRowDataCell(props) {
|
|
|
2106
2114
|
className: "ml-2 first:ml-0",
|
|
2107
2115
|
key: action.key,
|
|
2108
2116
|
icon: action.icon,
|
|
2109
|
-
onClick: function onClick(
|
|
2110
|
-
event.stopPropagation();
|
|
2117
|
+
onClick: function onClick() {
|
|
2111
2118
|
action.handleClick(props.item);
|
|
2112
2119
|
}
|
|
2113
2120
|
});
|
|
@@ -4178,6 +4185,58 @@ var TextEditorV2 = function TextEditorV2(_ref) {
|
|
|
4178
4185
|
}));
|
|
4179
4186
|
};
|
|
4180
4187
|
|
|
4188
|
+
var SmallCircleIcon = function SmallCircleIcon(props) {
|
|
4189
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
4190
|
+
className: props.className,
|
|
4191
|
+
onClick: props.onClick,
|
|
4192
|
+
role: props.onClick ? "button" : undefined,
|
|
4193
|
+
width: "24",
|
|
4194
|
+
height: "24",
|
|
4195
|
+
viewBox: "0 0 24 24",
|
|
4196
|
+
fill: "none",
|
|
4197
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
4198
|
+
}, /*#__PURE__*/React__default.createElement("circle", {
|
|
4199
|
+
cx: "12",
|
|
4200
|
+
cy: "12",
|
|
4201
|
+
r: "6",
|
|
4202
|
+
fill: "currentColor"
|
|
4203
|
+
}), /*#__PURE__*/React__default.createElement("circle", {
|
|
4204
|
+
cx: "14.5",
|
|
4205
|
+
cy: "9.5",
|
|
4206
|
+
r: "1.5",
|
|
4207
|
+
fill: "white",
|
|
4208
|
+
fillOpacity: "0.1"
|
|
4209
|
+
}));
|
|
4210
|
+
};
|
|
4211
|
+
|
|
4212
|
+
var TimelineStep = function TimelineStep(_ref) {
|
|
4213
|
+
var _classNames;
|
|
4214
|
+
|
|
4215
|
+
var content = _ref.content,
|
|
4216
|
+
type = _ref.type;
|
|
4217
|
+
var isWideStep = type === "wide";
|
|
4218
|
+
var borderClassNames = "ml-4 pl-6 border-blue-800 border-l-2";
|
|
4219
|
+
var containerClassNames = classNames("relative", (_classNames = {}, _classNames[borderClassNames] = !isWideStep, _classNames["pt-3"] = !isWideStep, _classNames["bg-white rounded-lg overflow-hidden"] = isWideStep, _classNames));
|
|
4220
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
4221
|
+
className: containerClassNames
|
|
4222
|
+
}, content, !isWideStep && /*#__PURE__*/React__default.createElement(SmallCircleIcon, {
|
|
4223
|
+
className: "text-blue-800 absolute top-3 -left-3 -ml-px"
|
|
4224
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
4225
|
+
className: classNames(borderClassNames, "h-6 last:h-0")
|
|
4226
|
+
}));
|
|
4227
|
+
};
|
|
4228
|
+
TimelineStep.defaultProps = {
|
|
4229
|
+
type: "base"
|
|
4230
|
+
};
|
|
4231
|
+
|
|
4232
|
+
var Timeline = function Timeline(props) {
|
|
4233
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, props.steps.map(function (step) {
|
|
4234
|
+
return /*#__PURE__*/React__default.createElement(TimelineStep, Object.assign({}, step));
|
|
4235
|
+
})), props.loadMoreButtonProps && /*#__PURE__*/React__default.createElement(SecondaryButton, Object.assign({
|
|
4236
|
+
className: "mt-6 mx-auto"
|
|
4237
|
+
}, props.loadMoreButtonProps)));
|
|
4238
|
+
};
|
|
4239
|
+
|
|
4181
4240
|
var _excluded$g = ["titleProps", "title", "titleAccessory", "contentProps", "content", "defaultContent", "className", "buttons"];
|
|
4182
4241
|
function ViewItem(_ref) {
|
|
4183
4242
|
var titleProps = _ref.titleProps,
|
|
@@ -4887,30 +4946,6 @@ var PinIcon = function PinIcon(props) {
|
|
|
4887
4946
|
}));
|
|
4888
4947
|
};
|
|
4889
4948
|
|
|
4890
|
-
var SmallCircleIcon = function SmallCircleIcon(props) {
|
|
4891
|
-
return /*#__PURE__*/React__default.createElement("svg", {
|
|
4892
|
-
className: props.className,
|
|
4893
|
-
onClick: props.onClick,
|
|
4894
|
-
role: props.onClick ? "button" : undefined,
|
|
4895
|
-
width: "24",
|
|
4896
|
-
height: "24",
|
|
4897
|
-
viewBox: "0 0 24 24",
|
|
4898
|
-
fill: "none",
|
|
4899
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
4900
|
-
}, /*#__PURE__*/React__default.createElement("circle", {
|
|
4901
|
-
cx: "12",
|
|
4902
|
-
cy: "12",
|
|
4903
|
-
r: "6",
|
|
4904
|
-
fill: "currentColor"
|
|
4905
|
-
}), /*#__PURE__*/React__default.createElement("circle", {
|
|
4906
|
-
cx: "14.5",
|
|
4907
|
-
cy: "9.5",
|
|
4908
|
-
r: "1.5",
|
|
4909
|
-
fill: "white",
|
|
4910
|
-
fillOpacity: "0.1"
|
|
4911
|
-
}));
|
|
4912
|
-
};
|
|
4913
|
-
|
|
4914
4949
|
var SmallDiamondIcon = function SmallDiamondIcon(props) {
|
|
4915
4950
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
4916
4951
|
className: props.className,
|
|
@@ -5130,6 +5165,7 @@ exports.TextArea = Textarea;
|
|
|
5130
5165
|
exports.TextEditor = TextEditor;
|
|
5131
5166
|
exports.TextEditorV2 = TextEditorV2;
|
|
5132
5167
|
exports.TextLink = TextLink;
|
|
5168
|
+
exports.Timeline = Timeline;
|
|
5133
5169
|
exports.Title = Title;
|
|
5134
5170
|
exports.ViewItem = ViewItem;
|
|
5135
5171
|
//# sourceMappingURL=web-ui.cjs.development.js.map
|