@luscii-healthtech/web-ui 0.2.2 → 0.4.1
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/Section/SectionItem.d.ts +9 -0
- package/dist/components/{TextListItem/TextListItem.d.ts → Section/SectionItemWithContent.d.ts} +3 -3
- package/dist/components/Steps/Step.d.ts +1 -1
- package/dist/components/Tag/Tag.d.ts +2 -2
- package/dist/components/Tag/Tag.utils.d.ts +4 -0
- package/dist/components/Tag/TagGroup.d.ts +2 -5
- package/dist/components/Text/Text.d.ts +5 -3
- package/dist/index.d.ts +2 -2
- package/dist/web-ui-tailwind.css +2111 -0
- package/dist/web-ui.cjs.development.css +58 -58
- package/dist/web-ui.cjs.development.js +99 -75
- package/dist/web-ui.cjs.development.js.map +1 -1
- package/dist/web-ui.cjs.production.min.css +58 -58
- 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.css +58 -58
- package/dist/web-ui.esm.js +98 -74
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +13 -5
- package/src/components/Checkbox/Checkbox.tsx +27 -13
- package/src/components/Dropdown/Dropdown.js +89 -37
- package/src/components/InfoField/InfoField.tsx +12 -4
- package/src/components/ListTable/ListTable.tsx +2 -1
- package/src/components/ListTable/ListTableCell.tsx +15 -4
- package/src/components/NavMenu/NavMenuItem.tsx +12 -6
- package/src/components/NotificationBanner/NotificationBanner.tsx +29 -9
- package/src/components/PaginationMenu/PaginationMenuLarge.tsx +1 -1
- package/src/components/PaginationMenu/PaginationMenuSmall.tsx +1 -1
- package/src/components/{ListItem/ListItem.scss → Section/SectionItem.scss} +0 -0
- package/src/components/{ListItem/ListItem.tsx → Section/SectionItem.tsx} +7 -7
- package/src/components/{TextListItem/TextListItem.js → Section/SectionItemWithContent.js} +10 -9
- package/src/components/{TextListItem/TextListItem.scss → Section/SectionItemWithContent.scss} +2 -2
- package/src/components/Steps/Step.tsx +12 -3
- package/src/components/Tag/Tag.tsx +31 -12
- package/src/components/Tag/Tag.utils.ts +4 -0
- package/src/components/Tag/TagGroup.tsx +12 -8
- package/src/components/Text/Text.tsx +87 -37
- package/src/components/ViewItem/ViewItem.tsx +21 -9
- package/src/index.tsx +4 -4
- package/dist/components/ListItem/ListItem.d.ts +0 -9
|
@@ -546,6 +546,64 @@
|
|
|
546
546
|
.cweb-list-item.cweb-list-item-clickable:hover {
|
|
547
547
|
background-color: #f2fafd; }
|
|
548
548
|
|
|
549
|
+
.cweb-section .cweb-button:last-of-type {
|
|
550
|
+
margin-right: 24px; }
|
|
551
|
+
|
|
552
|
+
.cweb-section .cweb-button:not(:last-of-type) {
|
|
553
|
+
margin-right: 8px; }
|
|
554
|
+
|
|
555
|
+
.cweb-section .cweb-button.add-button, .cweb-section .cweb-button.edit-button, .cweb-section .cweb-button.delete-button {
|
|
556
|
+
margin-left: auto;
|
|
557
|
+
width: 32px;
|
|
558
|
+
height: 32px; }
|
|
559
|
+
|
|
560
|
+
.cweb-section .cweb-button.add-button {
|
|
561
|
+
background: url("../../assets/add.svg") no-repeat center;
|
|
562
|
+
background-size: contain; }
|
|
563
|
+
.cweb-section .cweb-button.add-button:hover, .cweb-section .cweb-button.add-button:active, .cweb-section .cweb-button.add-button:focus {
|
|
564
|
+
background: url("../../assets/add_hover.svg") no-repeat center;
|
|
565
|
+
background-size: contain; }
|
|
566
|
+
|
|
567
|
+
.cweb-section .cweb-button.edit-button {
|
|
568
|
+
background: url("../../assets/edit.svg") no-repeat center;
|
|
569
|
+
background-size: contain; }
|
|
570
|
+
.cweb-section .cweb-button.edit-button:hover, .cweb-section .cweb-button.edit-button:active, .cweb-section .cweb-button.edit-button:focus {
|
|
571
|
+
background: url("../../assets/edit_hover.svg") no-repeat center;
|
|
572
|
+
background-size: contain; }
|
|
573
|
+
|
|
574
|
+
.cweb-section .cweb-button.delete-button {
|
|
575
|
+
background: url("../../assets/delete.svg") no-repeat center;
|
|
576
|
+
background-size: contain; }
|
|
577
|
+
.cweb-section .cweb-button.delete-button:hover, .cweb-section .cweb-button.delete-button:active, .cweb-section .cweb-button.delete-button:focus {
|
|
578
|
+
background: url("../../assets/delete_hover.svg") no-repeat center;
|
|
579
|
+
background-size: contain; }
|
|
580
|
+
|
|
581
|
+
.cweb-section > .cweb-section-header {
|
|
582
|
+
display: flex;
|
|
583
|
+
justify-content: space-between;
|
|
584
|
+
flex-direction: row;
|
|
585
|
+
align-items: center;
|
|
586
|
+
border-bottom: 1px solid #eeeeee;
|
|
587
|
+
width: 100%;
|
|
588
|
+
padding: 18px 24px; }
|
|
589
|
+
|
|
590
|
+
.cweb-section > .cweb-section-footer {
|
|
591
|
+
display: flex;
|
|
592
|
+
justify-content: space-between;
|
|
593
|
+
flex-direction: row;
|
|
594
|
+
align-items: center;
|
|
595
|
+
border-top: 1px solid #eeeeee;
|
|
596
|
+
width: 100%;
|
|
597
|
+
padding: 1rem 24px 1rem 24px; }
|
|
598
|
+
.cweb-section > .cweb-section-footer img {
|
|
599
|
+
width: 32px;
|
|
600
|
+
height: 32px; }
|
|
601
|
+
|
|
602
|
+
.cweb-section-text-item .cweb-section-text-item-icon {
|
|
603
|
+
width: 24px;
|
|
604
|
+
height: 24px;
|
|
605
|
+
margin-right: 16px; }
|
|
606
|
+
|
|
549
607
|
.cweb-loading {
|
|
550
608
|
display: flex;
|
|
551
609
|
justify-content: center;
|
|
@@ -745,59 +803,6 @@
|
|
|
745
803
|
.cweb-radio-group.hasError > .cweb-radio .cweb-radio-icon-container {
|
|
746
804
|
border: 1px solid #ff6266 !important; }
|
|
747
805
|
|
|
748
|
-
.cweb-section .cweb-button:last-of-type {
|
|
749
|
-
margin-right: 24px; }
|
|
750
|
-
|
|
751
|
-
.cweb-section .cweb-button:not(:last-of-type) {
|
|
752
|
-
margin-right: 8px; }
|
|
753
|
-
|
|
754
|
-
.cweb-section .cweb-button.add-button, .cweb-section .cweb-button.edit-button, .cweb-section .cweb-button.delete-button {
|
|
755
|
-
margin-left: auto;
|
|
756
|
-
width: 32px;
|
|
757
|
-
height: 32px; }
|
|
758
|
-
|
|
759
|
-
.cweb-section .cweb-button.add-button {
|
|
760
|
-
background: url("../../assets/add.svg") no-repeat center;
|
|
761
|
-
background-size: contain; }
|
|
762
|
-
.cweb-section .cweb-button.add-button:hover, .cweb-section .cweb-button.add-button:active, .cweb-section .cweb-button.add-button:focus {
|
|
763
|
-
background: url("../../assets/add_hover.svg") no-repeat center;
|
|
764
|
-
background-size: contain; }
|
|
765
|
-
|
|
766
|
-
.cweb-section .cweb-button.edit-button {
|
|
767
|
-
background: url("../../assets/edit.svg") no-repeat center;
|
|
768
|
-
background-size: contain; }
|
|
769
|
-
.cweb-section .cweb-button.edit-button:hover, .cweb-section .cweb-button.edit-button:active, .cweb-section .cweb-button.edit-button:focus {
|
|
770
|
-
background: url("../../assets/edit_hover.svg") no-repeat center;
|
|
771
|
-
background-size: contain; }
|
|
772
|
-
|
|
773
|
-
.cweb-section .cweb-button.delete-button {
|
|
774
|
-
background: url("../../assets/delete.svg") no-repeat center;
|
|
775
|
-
background-size: contain; }
|
|
776
|
-
.cweb-section .cweb-button.delete-button:hover, .cweb-section .cweb-button.delete-button:active, .cweb-section .cweb-button.delete-button:focus {
|
|
777
|
-
background: url("../../assets/delete_hover.svg") no-repeat center;
|
|
778
|
-
background-size: contain; }
|
|
779
|
-
|
|
780
|
-
.cweb-section > .cweb-section-header {
|
|
781
|
-
display: flex;
|
|
782
|
-
justify-content: space-between;
|
|
783
|
-
flex-direction: row;
|
|
784
|
-
align-items: center;
|
|
785
|
-
border-bottom: 1px solid #eeeeee;
|
|
786
|
-
width: 100%;
|
|
787
|
-
padding: 18px 24px; }
|
|
788
|
-
|
|
789
|
-
.cweb-section > .cweb-section-footer {
|
|
790
|
-
display: flex;
|
|
791
|
-
justify-content: space-between;
|
|
792
|
-
flex-direction: row;
|
|
793
|
-
align-items: center;
|
|
794
|
-
border-top: 1px solid #eeeeee;
|
|
795
|
-
width: 100%;
|
|
796
|
-
padding: 1rem 24px 1rem 24px; }
|
|
797
|
-
.cweb-section > .cweb-section-footer img {
|
|
798
|
-
width: 32px;
|
|
799
|
-
height: 32px; }
|
|
800
|
-
|
|
801
806
|
.cweb-textarea {
|
|
802
807
|
border: 1px solid #cccccc;
|
|
803
808
|
border-radius: 4px;
|
|
@@ -917,11 +922,6 @@
|
|
|
917
922
|
.editor .rdw-editor .rdw-editor-main .DraftEditor-root {
|
|
918
923
|
margin: 0 12px; }
|
|
919
924
|
|
|
920
|
-
.cweb-text-list-item .cweb-text-list-item-icon {
|
|
921
|
-
width: 24px;
|
|
922
|
-
height: 24px;
|
|
923
|
-
margin-right: 16px; }
|
|
924
|
-
|
|
925
925
|
@font-face {
|
|
926
926
|
font-family: "AvenirNextLTPro-Regular";
|
|
927
927
|
src: url("../../styles/fonts/avenir/3A0AF8_1_0.eot");
|
|
@@ -27,6 +27,33 @@ var htmlToDraft = _interopDefault(require('html-to-draftjs'));
|
|
|
27
27
|
require('react-draft-wysiwyg/dist/react-draft-wysiwyg.css');
|
|
28
28
|
|
|
29
29
|
var Text = function Text(props) {
|
|
30
|
+
/**
|
|
31
|
+
* One might argue that we're duplicating strings in this file.
|
|
32
|
+
* That's how tailwind expects to detect used classes, so please do not make
|
|
33
|
+
* anything dynamic or try to string concat class names.
|
|
34
|
+
* https://v1.tailwindcss.com/docs/controlling-file-size
|
|
35
|
+
*/
|
|
36
|
+
var allowedColors = {
|
|
37
|
+
base: "text-slate-700",
|
|
38
|
+
"slate-500": "text-slate-500",
|
|
39
|
+
"slate-200": "text-slate-200",
|
|
40
|
+
red: "text-red-700",
|
|
41
|
+
green: "text-green-700",
|
|
42
|
+
amber: "text-yellow-700",
|
|
43
|
+
white: "text-white",
|
|
44
|
+
"blue-800": "text-blue-800"
|
|
45
|
+
};
|
|
46
|
+
var allowedHoverColors = {
|
|
47
|
+
"blue-900": "hover:text-blue-900",
|
|
48
|
+
white: "hover:text-white"
|
|
49
|
+
}; // What is a group hover? https://v1.tailwindcss.com/docs/pseudo-class-variants#group-hover
|
|
50
|
+
|
|
51
|
+
var allowedGroupHoverColors = {
|
|
52
|
+
"blue-900": "group-hover:text-blue-900",
|
|
53
|
+
white: "group-hover:text-white"
|
|
54
|
+
};
|
|
55
|
+
var selectedHoverColor = props.hoverColor && !props.hoverInGroup && allowedHoverColors[props.hoverColor];
|
|
56
|
+
var selectedGroupHoverColor = props.hoverColor && props.hoverInGroup && allowedGroupHoverColors[props.hoverColor];
|
|
30
57
|
var containerProps = {
|
|
31
58
|
"data-test-id": props["data-test-id"],
|
|
32
59
|
className: classNames( // apply different style classes
|
|
@@ -45,17 +72,7 @@ var Text = function Text(props) {
|
|
|
45
72
|
inline: props.inline,
|
|
46
73
|
// FIXME: this class doesn't do anything without a max-width
|
|
47
74
|
truncate: props.truncate
|
|
48
|
-
}, {
|
|
49
|
-
"text-slate-700": props.color === "base",
|
|
50
|
-
"text-slate-500": props.color === "gray-500",
|
|
51
|
-
"text-slate-200": props.color === "gray-200",
|
|
52
|
-
"text-red-700": props.color === "red",
|
|
53
|
-
"text-green-700": props.color === "green",
|
|
54
|
-
"text-yellow-700": props.color === "amber",
|
|
55
|
-
"text-blue-700": props.color === "blue",
|
|
56
|
-
"text-white": props.color === "white",
|
|
57
|
-
"text-primary-dark": props.color === "blue"
|
|
58
|
-
}, {
|
|
75
|
+
}, allowedColors[props.color || "base"], selectedHoverColor, selectedGroupHoverColor, {
|
|
59
76
|
"in-html-link": props.containsDangerousHtml
|
|
60
77
|
}, //can be used to overwrite other classes like the color
|
|
61
78
|
props.className)
|
|
@@ -956,13 +973,13 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
956
973
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
957
974
|
className: "flex flex-col"
|
|
958
975
|
}, text && /*#__PURE__*/React__default.createElement(Text, {
|
|
959
|
-
className: "ml-2 select-none
|
|
976
|
+
className: "ml-2 text-left select-none",
|
|
960
977
|
text: text,
|
|
961
978
|
"data-test-id": "checkbox-text"
|
|
962
979
|
}), explanation && /*#__PURE__*/React__default.createElement(Text, {
|
|
963
|
-
className: "ml-2 select-none
|
|
980
|
+
className: "ml-2 text-left select-none",
|
|
964
981
|
text: explanation,
|
|
965
|
-
color: "
|
|
982
|
+
color: "slate-500",
|
|
966
983
|
"data-test-id": "checkbox-explanation"
|
|
967
984
|
}))));
|
|
968
985
|
};
|
|
@@ -1437,7 +1454,7 @@ var Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
1437
1454
|
"data-test-id": item.text,
|
|
1438
1455
|
text: item.title,
|
|
1439
1456
|
type: "sm",
|
|
1440
|
-
color: "
|
|
1457
|
+
color: "slate-500",
|
|
1441
1458
|
truncate: true
|
|
1442
1459
|
})), item.subItems.map(function (subItem) {
|
|
1443
1460
|
return _this.renderIndividualItem(subItem);
|
|
@@ -1706,7 +1723,7 @@ var InfoField = function InfoField(props) {
|
|
|
1706
1723
|
}, containerProps), /*#__PURE__*/React__default.createElement(Text, {
|
|
1707
1724
|
text: props.label,
|
|
1708
1725
|
type: "sm",
|
|
1709
|
-
color: "
|
|
1726
|
+
color: "slate-500",
|
|
1710
1727
|
className: classNames({
|
|
1711
1728
|
"break-words": props.supportsMultiline
|
|
1712
1729
|
}, {
|
|
@@ -1881,7 +1898,7 @@ Line.propTypes = {
|
|
|
1881
1898
|
};
|
|
1882
1899
|
|
|
1883
1900
|
var _excluded$7 = ["children", "className", "onClick"];
|
|
1884
|
-
var
|
|
1901
|
+
var SectionItem = function SectionItem(props) {
|
|
1885
1902
|
var children = props.children,
|
|
1886
1903
|
className = props.className,
|
|
1887
1904
|
onClick = props.onClick,
|
|
@@ -1912,7 +1929,7 @@ var PaginationMenuSmall = function PaginationMenuSmall(props) {
|
|
|
1912
1929
|
className: "ml-4",
|
|
1913
1930
|
text: props.currentPageNumber + " / " + props.pageCount,
|
|
1914
1931
|
type: "sm",
|
|
1915
|
-
color: "
|
|
1932
|
+
color: "slate-500"
|
|
1916
1933
|
}), /*#__PURE__*/React__default.createElement(TertiaryButton, {
|
|
1917
1934
|
className: "ml-4",
|
|
1918
1935
|
"data-test-id": "next-button",
|
|
@@ -2120,7 +2137,7 @@ var PaginationMenuLarge = function PaginationMenuLarge(props) {
|
|
|
2120
2137
|
className: "ml-4 flex flex-row items-center"
|
|
2121
2138
|
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
2122
2139
|
text: getSummaryText(props.pageCount, props.currentPageNumber, props.localization, props.pageSize, props.resultCount),
|
|
2123
|
-
color: "
|
|
2140
|
+
color: "slate-500"
|
|
2124
2141
|
}), /*#__PURE__*/React__default.createElement(SecondaryButton, {
|
|
2125
2142
|
"data-test-id": "prev-button",
|
|
2126
2143
|
text: props.localization.previous,
|
|
@@ -2224,7 +2241,7 @@ function ListTableCell(_ref) {
|
|
|
2224
2241
|
text: emptyValue
|
|
2225
2242
|
}, textProps, {
|
|
2226
2243
|
className: textClassName,
|
|
2227
|
-
color: "
|
|
2244
|
+
color: "slate-500"
|
|
2228
2245
|
})), hasValue && isString(value) && /*#__PURE__*/React__default.createElement(Text, Object.assign({
|
|
2229
2246
|
text: value
|
|
2230
2247
|
}, textProps, {
|
|
@@ -2358,7 +2375,8 @@ function ListTable(_ref) {
|
|
|
2358
2375
|
src: SearchNotFoundImage,
|
|
2359
2376
|
alt: "no-image-found"
|
|
2360
2377
|
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
2361
|
-
className: classNames("no-item-found-text", "w-56 text-base text-
|
|
2378
|
+
className: classNames("no-item-found-text", "w-56 text-base text-center whitespace-pre-wrap"),
|
|
2379
|
+
color: "slate-500",
|
|
2362
2380
|
text: configuration.emptyListText
|
|
2363
2381
|
}))))), !showEmptyView && pageCount > 0 && onPaginationChange && /*#__PURE__*/React__default.createElement("tfoot", null, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("td", {
|
|
2364
2382
|
colSpan: configuration.fields.length
|
|
@@ -2691,11 +2709,7 @@ var NavMenuItem = function NavMenuItem(props) {
|
|
|
2691
2709
|
currentImg = _useState[0],
|
|
2692
2710
|
setCurrentImg = _useState[1];
|
|
2693
2711
|
|
|
2694
|
-
var
|
|
2695
|
-
textColor = _useState2[0],
|
|
2696
|
-
setTextColor = _useState2[1];
|
|
2697
|
-
|
|
2698
|
-
var classes = classNames(["flex", "flex-row", "items-center", "w-auto", "rounded", "px-2", "py-1", "my-2", "mx-2", "hover:bg-gray-600", "transition", "ease-in", "duration-150", "lg:last:pb-2", "focus:outline-primary"], {
|
|
2712
|
+
var classes = classNames(["flex", "flex-row", "items-center", "w-auto", "rounded", "px-2", "py-1", "my-2", "mx-2", "hover:bg-gray-600", "transition", "ease-in", "duration-150", "lg:last:pb-2", "focus:outline-primary", "group"], {
|
|
2699
2713
|
"bg-nav-menu": !props.isSelected,
|
|
2700
2714
|
"bg-gray-600": props.isSelected
|
|
2701
2715
|
});
|
|
@@ -2703,14 +2717,12 @@ var NavMenuItem = function NavMenuItem(props) {
|
|
|
2703
2717
|
var handleOnMouseOver = function handleOnMouseOver() {
|
|
2704
2718
|
if (!props.isSelected) {
|
|
2705
2719
|
setCurrentImg(props.imgOnHover);
|
|
2706
|
-
setTextColor("white");
|
|
2707
2720
|
}
|
|
2708
2721
|
};
|
|
2709
2722
|
|
|
2710
2723
|
var handleOnMouseOut = function handleOnMouseOut() {
|
|
2711
2724
|
if (!props.isSelected) {
|
|
2712
2725
|
setCurrentImg(props.img);
|
|
2713
|
-
setTextColor("gray-200");
|
|
2714
2726
|
}
|
|
2715
2727
|
};
|
|
2716
2728
|
|
|
@@ -2727,7 +2739,9 @@ var NavMenuItem = function NavMenuItem(props) {
|
|
|
2727
2739
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
2728
2740
|
type: "strong",
|
|
2729
2741
|
text: props.title,
|
|
2730
|
-
|
|
2742
|
+
hoverInGroup: true,
|
|
2743
|
+
color: "slate-200",
|
|
2744
|
+
hoverColor: "white"
|
|
2731
2745
|
}));
|
|
2732
2746
|
|
|
2733
2747
|
function handleMenuClick(event) {
|
|
@@ -2820,18 +2834,26 @@ var TextLink = function TextLink(props) {
|
|
|
2820
2834
|
|
|
2821
2835
|
var NotificationBanner = function NotificationBanner(props) {
|
|
2822
2836
|
var classes = classNames("w-full px-6 py-2 flex flex-row items-center border border-solid rounded", props.className, {
|
|
2823
|
-
"bg-slate-
|
|
2824
|
-
"bg-blue-
|
|
2825
|
-
"bg-red-
|
|
2826
|
-
"bg-green-
|
|
2827
|
-
"bg-yellow-
|
|
2837
|
+
"bg-slate-50 border-slate-700": props.color === "base",
|
|
2838
|
+
"bg-blue-50 border-blue-700": props.color === "blue",
|
|
2839
|
+
"bg-red-50 border-red-700": props.color === "red",
|
|
2840
|
+
"bg-green-50 border-green-700": props.color === "green",
|
|
2841
|
+
"bg-yellow-50 border-yellow-700": props.color === "amber"
|
|
2828
2842
|
});
|
|
2843
|
+
var textColor = {
|
|
2844
|
+
red: "red",
|
|
2845
|
+
amber: "amber",
|
|
2846
|
+
green: "green",
|
|
2847
|
+
base: "base",
|
|
2848
|
+
// Blue must be 800 here to pass the contrast test
|
|
2849
|
+
blue: "blue-800"
|
|
2850
|
+
};
|
|
2829
2851
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2830
2852
|
className: classes
|
|
2831
2853
|
}, props.icon, /*#__PURE__*/React__default.createElement(Text, {
|
|
2832
|
-
className: "first:ml-0
|
|
2854
|
+
className: "ml-4 first:ml-0",
|
|
2833
2855
|
text: props.text,
|
|
2834
|
-
color: props.color
|
|
2856
|
+
color: props.color ? textColor[props.color] : "base"
|
|
2835
2857
|
}), props.linkProps && /*#__PURE__*/React__default.createElement(TextLink, {
|
|
2836
2858
|
className: "ml-4",
|
|
2837
2859
|
text: props.linkProps.text,
|
|
@@ -2998,7 +3020,7 @@ var Step = function Step(_ref) {
|
|
|
2998
3020
|
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
2999
3021
|
text: localization.step + " " + stepNumber,
|
|
3000
3022
|
type: "strong",
|
|
3001
|
-
color: active ? "blue" : "
|
|
3023
|
+
color: active ? "blue-800" : "slate-500"
|
|
3002
3024
|
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
3003
3025
|
text: title,
|
|
3004
3026
|
type: "strong"
|
|
@@ -3523,7 +3545,7 @@ var SettingsMenuButton = function SettingsMenuButton(props) {
|
|
|
3523
3545
|
SwitcherItem.propTypes = {
|
|
3524
3546
|
name: PropTypes.string,
|
|
3525
3547
|
icon: /*#__PURE__*/PropTypes.shape({
|
|
3526
|
-
|
|
3548
|
+
default: /*#__PURE__*/PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
3527
3549
|
active: /*#__PURE__*/PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
3528
3550
|
showBadge: PropTypes.bool
|
|
3529
3551
|
}),
|
|
@@ -3552,7 +3574,7 @@ function SwitcherItem(_ref) {
|
|
|
3552
3574
|
});
|
|
3553
3575
|
var calculatedIcon;
|
|
3554
3576
|
|
|
3555
|
-
if (icon && typeof icon
|
|
3577
|
+
if (icon && typeof icon.default === "string") {
|
|
3556
3578
|
calculatedIcon = isSelected ? /*#__PURE__*/React__default.createElement("img", {
|
|
3557
3579
|
alt: "",
|
|
3558
3580
|
className: "",
|
|
@@ -3560,10 +3582,10 @@ function SwitcherItem(_ref) {
|
|
|
3560
3582
|
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
3561
3583
|
alt: "",
|
|
3562
3584
|
className: "",
|
|
3563
|
-
src: icon
|
|
3585
|
+
src: icon.default
|
|
3564
3586
|
});
|
|
3565
3587
|
} else if (icon) {
|
|
3566
|
-
calculatedIcon = isSelected ? icon.active : icon
|
|
3588
|
+
calculatedIcon = isSelected ? icon.active : icon.default;
|
|
3567
3589
|
}
|
|
3568
3590
|
|
|
3569
3591
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
@@ -3619,7 +3641,7 @@ Switcher.propTypes = {
|
|
|
3619
3641
|
items: /*#__PURE__*/PropTypes.arrayOf( /*#__PURE__*/PropTypes.shape({
|
|
3620
3642
|
name: PropTypes.string,
|
|
3621
3643
|
icon: /*#__PURE__*/PropTypes.shape({
|
|
3622
|
-
|
|
3644
|
+
default: /*#__PURE__*/PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
3623
3645
|
active: /*#__PURE__*/PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
3624
3646
|
showBadge: PropTypes.bool
|
|
3625
3647
|
}),
|
|
@@ -3763,22 +3785,6 @@ var TagSize;
|
|
|
3763
3785
|
TagSize["base"] = "base";
|
|
3764
3786
|
})(TagSize || (TagSize = {}));
|
|
3765
3787
|
|
|
3766
|
-
var TagGroup = function TagGroup(_ref) {
|
|
3767
|
-
var tags = _ref.tags,
|
|
3768
|
-
_ref$tagSize = _ref.tagSize,
|
|
3769
|
-
tagSize = _ref$tagSize === void 0 ? TagSize.base : _ref$tagSize,
|
|
3770
|
-
className = _ref.className;
|
|
3771
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
3772
|
-
className: classNames("flex flex-row flex-wrap", className)
|
|
3773
|
-
}, tags.map(function (tag) {
|
|
3774
|
-
return /*#__PURE__*/React__default.createElement(Tag, Object.assign({
|
|
3775
|
-
size: tagSize
|
|
3776
|
-
}, tag, {
|
|
3777
|
-
className: classNames("mr-2 last:mr-0 mb-2")
|
|
3778
|
-
}));
|
|
3779
|
-
}));
|
|
3780
|
-
};
|
|
3781
|
-
|
|
3782
3788
|
var TagColorTheme;
|
|
3783
3789
|
|
|
3784
3790
|
(function (TagColorTheme) {
|
|
@@ -3790,29 +3796,47 @@ var TagColorTheme;
|
|
|
3790
3796
|
})(TagColorTheme || (TagColorTheme = {}));
|
|
3791
3797
|
|
|
3792
3798
|
var Tag = function Tag(_ref) {
|
|
3799
|
+
var _textColor;
|
|
3800
|
+
|
|
3793
3801
|
var text = _ref.text,
|
|
3794
3802
|
_ref$colorTheme = _ref.colorTheme,
|
|
3795
3803
|
colorTheme = _ref$colorTheme === void 0 ? TagColorTheme.Gray : _ref$colorTheme,
|
|
3796
3804
|
className = _ref.className,
|
|
3797
3805
|
_ref$size = _ref.size,
|
|
3798
3806
|
size = _ref$size === void 0 ? TagSize.base : _ref$size;
|
|
3799
|
-
var
|
|
3800
|
-
"bg-red-100 text-red-700": colorTheme === TagColorTheme.Red,
|
|
3801
|
-
"bg-orange-100 text-amber-700": colorTheme === TagColorTheme.Amber,
|
|
3802
|
-
"bg-green-100 text-green-800": colorTheme === TagColorTheme.Green,
|
|
3803
|
-
"bg-slate-100 text-slate-600": colorTheme === TagColorTheme.Gray,
|
|
3804
|
-
"bg-blue-50 text-blue-800": colorTheme === TagColorTheme.Blue
|
|
3805
|
-
});
|
|
3807
|
+
var textColor = (_textColor = {}, _textColor[TagColorTheme.Red] = "red", _textColor[TagColorTheme.Amber] = "amber", _textColor[TagColorTheme.Green] = "green", _textColor[TagColorTheme.Gray] = "base", _textColor[TagColorTheme.Blue] = "blue-800", _textColor);
|
|
3806
3808
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3807
|
-
className:
|
|
3809
|
+
className: classNames("inline py-1 px-2 rounded-lg", className, {
|
|
3810
|
+
"bg-red-50": colorTheme === TagColorTheme.Red,
|
|
3811
|
+
"bg-orange-50": colorTheme === TagColorTheme.Amber,
|
|
3812
|
+
"bg-green-50": colorTheme === TagColorTheme.Green,
|
|
3813
|
+
"bg-slate-50": colorTheme === TagColorTheme.Gray,
|
|
3814
|
+
"bg-blue-50": colorTheme === TagColorTheme.Blue
|
|
3815
|
+
})
|
|
3808
3816
|
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
3809
3817
|
inline: true,
|
|
3810
|
-
color:
|
|
3818
|
+
color: textColor[colorTheme],
|
|
3811
3819
|
text: text,
|
|
3812
3820
|
type: size === TagSize.small ? "sm" : "base"
|
|
3813
3821
|
}));
|
|
3814
3822
|
};
|
|
3815
3823
|
|
|
3824
|
+
var TagGroup = function TagGroup(_ref) {
|
|
3825
|
+
var tags = _ref.tags,
|
|
3826
|
+
_ref$tagSize = _ref.tagSize,
|
|
3827
|
+
tagSize = _ref$tagSize === void 0 ? TagSize.base : _ref$tagSize,
|
|
3828
|
+
className = _ref.className;
|
|
3829
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3830
|
+
className: classNames("flex flex-row flex-wrap", className)
|
|
3831
|
+
}, tags.map(function (tag) {
|
|
3832
|
+
return /*#__PURE__*/React__default.createElement(Tag, Object.assign({
|
|
3833
|
+
size: tagSize
|
|
3834
|
+
}, tag, {
|
|
3835
|
+
className: classNames("mr-2 last:mr-0 mb-2")
|
|
3836
|
+
}));
|
|
3837
|
+
}));
|
|
3838
|
+
};
|
|
3839
|
+
|
|
3816
3840
|
var _excluded$e = ["className", "value", "name", "placeholder", "maxLength", "rows", "resizable", "isDisabled", "icon", "onChange", "onBlur", "onFocus", "onKeyPress", "onKeyDown", "onCtrlEnter"];
|
|
3817
3841
|
var RESIZE_TYPES = {
|
|
3818
3842
|
NONE: "none",
|
|
@@ -4001,7 +4025,7 @@ var TextEditorV2 = function TextEditorV2(_ref) {
|
|
|
4001
4025
|
|
|
4002
4026
|
var _excluded$f = ["text", "icon", "className", "iconClass", "onClick"];
|
|
4003
4027
|
|
|
4004
|
-
function
|
|
4028
|
+
function SectionItemWithContent(props) {
|
|
4005
4029
|
var text = props.text,
|
|
4006
4030
|
icon = props.icon,
|
|
4007
4031
|
className = props.className,
|
|
@@ -4009,9 +4033,9 @@ function TextListItem(props) {
|
|
|
4009
4033
|
onClick = props.onClick,
|
|
4010
4034
|
rest = _objectWithoutPropertiesLoose(props, _excluded$f);
|
|
4011
4035
|
|
|
4012
|
-
var mergedClasses = classNames("cweb-text-
|
|
4013
|
-
var iconClasses = classNames("cweb-text-
|
|
4014
|
-
return /*#__PURE__*/React__default.createElement(
|
|
4036
|
+
var mergedClasses = classNames("cweb-section-text-item", className);
|
|
4037
|
+
var iconClasses = classNames("cweb-section-text-item-icon", iconClass);
|
|
4038
|
+
return /*#__PURE__*/React__default.createElement(SectionItem, _extends({
|
|
4015
4039
|
className: mergedClasses,
|
|
4016
4040
|
onClick: onClick
|
|
4017
4041
|
}, rest), icon && /*#__PURE__*/React__default.createElement("img", {
|
|
@@ -4023,7 +4047,7 @@ function TextListItem(props) {
|
|
|
4023
4047
|
}));
|
|
4024
4048
|
}
|
|
4025
4049
|
|
|
4026
|
-
|
|
4050
|
+
SectionItemWithContent.propTypes = {
|
|
4027
4051
|
text: PropTypes.string.isRequired,
|
|
4028
4052
|
icon: /*#__PURE__*/PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
|
4029
4053
|
className: PropTypes.string,
|
|
@@ -4059,7 +4083,7 @@ function ViewItem(_ref) {
|
|
|
4059
4083
|
className: "vitals-view-item-title-line flex justify-start flex-row items-start"
|
|
4060
4084
|
}, titlePropsMerged && /*#__PURE__*/React__default.createElement(Text, Object.assign({
|
|
4061
4085
|
className: classNames(titlePropsMerged.className, "vitals-view-item-title mb-1 mr-2"),
|
|
4062
|
-
color: "
|
|
4086
|
+
color: "slate-500"
|
|
4063
4087
|
}, titlePropsMerged)), titleAccessory), contentPropsMerged && (contentPropsMerged == null ? void 0 : contentPropsMerged.map(function (textProps) {
|
|
4064
4088
|
return /*#__PURE__*/React__default.createElement(Text, Object.assign({}, textProps, {
|
|
4065
4089
|
key: textProps.key || textProps.text
|
|
@@ -4938,7 +4962,6 @@ exports.Input = Input;
|
|
|
4938
4962
|
exports.LeftArrowIcon = LeftArrowIcon;
|
|
4939
4963
|
exports.LightBulbIcon = LightBulbIcon;
|
|
4940
4964
|
exports.Line = Line;
|
|
4941
|
-
exports.ListItem = ListItem;
|
|
4942
4965
|
exports.ListTable = ListTable;
|
|
4943
4966
|
exports.LoadingIndicator = LoadingIndicator;
|
|
4944
4967
|
exports.LockIcon = LockIcon;
|
|
@@ -4962,6 +4985,8 @@ exports.SearchCancelIcon = SearchCancelIcon$1;
|
|
|
4962
4985
|
exports.SearchIcon = SearchIcon$1;
|
|
4963
4986
|
exports.SecondaryButton = SecondaryButton;
|
|
4964
4987
|
exports.Section = Section;
|
|
4988
|
+
exports.SectionItem = SectionItem;
|
|
4989
|
+
exports.SectionItemWithContent = SectionItemWithContent;
|
|
4965
4990
|
exports.SettingsMenuButton = SettingsMenuButton;
|
|
4966
4991
|
exports.SmallCircleIcon = SmallCircleIcon;
|
|
4967
4992
|
exports.SmallDiamondIcon = SmallDiamondIcon;
|
|
@@ -4981,7 +5006,6 @@ exports.TextArea = Textarea;
|
|
|
4981
5006
|
exports.TextEditor = TextEditor;
|
|
4982
5007
|
exports.TextEditorV2 = TextEditorV2;
|
|
4983
5008
|
exports.TextLink = TextLink;
|
|
4984
|
-
exports.TextListItem = TextListItem;
|
|
4985
5009
|
exports.Title = Title;
|
|
4986
5010
|
exports.ViewItem = ViewItem;
|
|
4987
5011
|
//# sourceMappingURL=web-ui.cjs.development.js.map
|