@luscii-healthtech/web-ui 0.2.1 → 0.4.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/ListTable/ListTable.d.ts +6 -4
- 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 +1 -1
- package/dist/components/Text/Text.d.ts +5 -3
- package/dist/index.d.ts +2 -2
- package/dist/web-ui.cjs.development.css +58 -58
- package/dist/web-ui.cjs.development.js +86 -58
- 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 +85 -57
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
- 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 +13 -5
- 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 +30 -11
- 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
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TextProps } from "../Text/Text";
|
|
3
3
|
import { RestPropped } from "../../types/general.types";
|
|
4
|
-
import { Localization, OnPaginationChange } from "../PaginationMenu/PaginationMenu.types";
|
|
4
|
+
import { Localization, OnPaginationChange, PageSize } from "../PaginationMenu/PaginationMenu.types";
|
|
5
5
|
export declare type ListTableItem = RestPropped;
|
|
6
6
|
export interface ListTableProps<ItemType extends ListTableItem, CellType> extends RestPropped {
|
|
7
7
|
items?: ItemType[];
|
|
8
8
|
configuration: ListTablePropsConfiguration<ItemType, CellType>;
|
|
9
9
|
pageCount?: number;
|
|
10
10
|
currentPage?: number;
|
|
11
|
-
onRowClick?: (arg: ItemType) => void;
|
|
12
11
|
onPaginationChange?: OnPaginationChange;
|
|
12
|
+
pageSize?: PageSize;
|
|
13
|
+
localization?: Localization;
|
|
14
|
+
resultCount?: number;
|
|
15
|
+
onRowClick?: (arg: ItemType) => void;
|
|
13
16
|
isLoading?: boolean;
|
|
14
17
|
showHeader?: boolean;
|
|
15
18
|
className?: string;
|
|
16
|
-
localization: Localization;
|
|
17
19
|
}
|
|
18
20
|
export interface ListTablePropsConfiguration<ItemType extends ListTableItem, CellType> {
|
|
19
21
|
emptyValue?: string;
|
|
@@ -28,5 +30,5 @@ export interface ListTablePropsConfigurationField<ItemType extends ListTableItem
|
|
|
28
30
|
field: (arg: ItemType) => string | CellType;
|
|
29
31
|
textProps?: Omit<TextProps, "text">;
|
|
30
32
|
}
|
|
31
|
-
export declare function ListTable<ItemType extends ListTableItem, CellType>({ items, configuration, pageCount, currentPage, onPaginationChange, onRowClick, isLoading, showHeader, className,
|
|
33
|
+
export declare function ListTable<ItemType extends ListTableItem, CellType>({ items, configuration, pageCount, currentPage, onPaginationChange, pageSize, localization, resultCount, onRowClick, isLoading, showHeader, className, ...restProps }: ListTableProps<ItemType, CellType>): JSX.Element;
|
|
32
34
|
export default ListTable;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { SyntheticEvent } from "react";
|
|
2
|
+
import "./SectionItem.scss";
|
|
3
|
+
export interface SectionItemProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
onClick?: (event: SyntheticEvent) => void;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const SectionItem: React.FC<SectionItemProps>;
|
|
9
|
+
export default SectionItem;
|
package/dist/components/{TextListItem/TextListItem.d.ts → Section/SectionItemWithContent.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export default
|
|
2
|
-
declare function
|
|
3
|
-
declare namespace
|
|
1
|
+
export default SectionItemWithContent;
|
|
2
|
+
declare function SectionItemWithContent(props: any): JSX.Element;
|
|
3
|
+
declare namespace SectionItemWithContent {
|
|
4
4
|
export namespace propTypes {
|
|
5
5
|
export const text: PropTypes.Validator<string>;
|
|
6
6
|
export const icon: PropTypes.Requireable<string | object>;
|
|
@@ -13,5 +13,5 @@ export interface TagProps {
|
|
|
13
13
|
size?: TagSize;
|
|
14
14
|
className?: string;
|
|
15
15
|
}
|
|
16
|
-
declare const Tag: ({ text, colorTheme, className, size }: TagProps) => JSX.Element;
|
|
16
|
+
declare const Tag: ({ text, colorTheme, className, size, }: TagProps) => JSX.Element;
|
|
17
17
|
export default Tag;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RestPropped } from "../../types/general.types";
|
|
3
3
|
import "./Text.scss";
|
|
4
|
-
export declare type TextStyle = "sm" | "sm-strong" | "base" | "strong" | "lg" | "lg-strong" | "xl" | "xl-strong"
|
|
5
|
-
export declare type TextColor = "base" | "
|
|
4
|
+
export declare type TextStyle = "sm" | "sm-strong" | "base" | "strong" | "lg" | "lg-strong" | "xl" | "xl-strong";
|
|
5
|
+
export declare type TextColor = "base" | "slate-500" | "slate-200" | "white" | "blue-800" | "red" | "green" | "amber";
|
|
6
|
+
export declare type TextHoverColor = "blue-900" | "white";
|
|
6
7
|
export interface TextProps extends RestPropped {
|
|
7
8
|
text: string;
|
|
8
9
|
type?: TextStyle;
|
|
9
10
|
inline?: boolean;
|
|
10
11
|
color?: TextColor;
|
|
11
|
-
hoverColor?:
|
|
12
|
+
hoverColor?: TextHoverColor;
|
|
13
|
+
hoverInGroup?: boolean;
|
|
12
14
|
className?: string;
|
|
13
15
|
containsDangerousHtml?: boolean;
|
|
14
16
|
truncate?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { default as InfoBlock } from "./components/InfoBlock/InfoBlock";
|
|
|
17
17
|
export { InfoField } from "./components/InfoField/InfoField";
|
|
18
18
|
export { INPUT_TYPES, default as Input } from "./components/Input/Input";
|
|
19
19
|
export { default as Line } from "./components/Line/Line";
|
|
20
|
-
export { default as
|
|
20
|
+
export { default as SectionItem, SectionItemProps, } from "./components/Section/SectionItem";
|
|
21
21
|
export { ListTable, ListTableProps, ListTablePropsConfiguration, ListTablePropsConfigurationField, } from "./components/ListTable/ListTable";
|
|
22
22
|
export { LoadingIndicator, LoadingIndicatorProps, } from "./components/LoadingIndicator/LoadingIndicator";
|
|
23
23
|
export { default as Menu } from "./components/Menu/Menu";
|
|
@@ -45,7 +45,7 @@ export { default as TextArea } from "./components/Textarea/Textarea";
|
|
|
45
45
|
export { default as TextEditor } from "./components/TextEditor/TextEditor";
|
|
46
46
|
export { default as TextEditorV2 } from "./components/TextEditorV2/TextEditorV2";
|
|
47
47
|
export { TextLink, TextLinkProps } from "./components/TextLink/TextLink";
|
|
48
|
-
export { default as
|
|
48
|
+
export { default as SectionItemWithContent } from "./components/Section/SectionItemWithContent";
|
|
49
49
|
export { Title, TitleStyle } from "./components/Title/Title";
|
|
50
50
|
export { ViewItem, ViewItemProps } from "./components/ViewItem/ViewItem";
|
|
51
51
|
export { default as Text } from "./components/Text/Text";
|
|
@@ -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, {
|
|
@@ -2301,7 +2318,7 @@ function ListTableHeader(_ref) {
|
|
|
2301
2318
|
})));
|
|
2302
2319
|
}
|
|
2303
2320
|
|
|
2304
|
-
var _excluded$9 = ["items", "configuration", "pageCount", "currentPage", "onPaginationChange", "onRowClick", "isLoading", "showHeader", "className"
|
|
2321
|
+
var _excluded$9 = ["items", "configuration", "pageCount", "currentPage", "onPaginationChange", "pageSize", "localization", "resultCount", "onRowClick", "isLoading", "showHeader", "className"];
|
|
2305
2322
|
function ListTable(_ref) {
|
|
2306
2323
|
var _ref$items = _ref.items,
|
|
2307
2324
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
@@ -2311,13 +2328,15 @@ function ListTable(_ref) {
|
|
|
2311
2328
|
_ref$currentPage = _ref.currentPage,
|
|
2312
2329
|
currentPage = _ref$currentPage === void 0 ? 1 : _ref$currentPage,
|
|
2313
2330
|
onPaginationChange = _ref.onPaginationChange,
|
|
2331
|
+
pageSize = _ref.pageSize,
|
|
2332
|
+
localization = _ref.localization,
|
|
2333
|
+
resultCount = _ref.resultCount,
|
|
2314
2334
|
onRowClick = _ref.onRowClick,
|
|
2315
2335
|
_ref$isLoading = _ref.isLoading,
|
|
2316
2336
|
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
2317
2337
|
_ref$showHeader = _ref.showHeader,
|
|
2318
2338
|
showHeader = _ref$showHeader === void 0 ? true : _ref$showHeader,
|
|
2319
2339
|
className = _ref.className,
|
|
2320
|
-
localization = _ref.localization,
|
|
2321
2340
|
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
2322
2341
|
|
|
2323
2342
|
// For not displaying empty view at creation
|
|
@@ -2356,17 +2375,20 @@ function ListTable(_ref) {
|
|
|
2356
2375
|
src: SearchNotFoundImage,
|
|
2357
2376
|
alt: "no-image-found"
|
|
2358
2377
|
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
2359
|
-
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",
|
|
2360
2380
|
text: configuration.emptyListText
|
|
2361
2381
|
}))))), !showEmptyView && pageCount > 0 && onPaginationChange && /*#__PURE__*/React__default.createElement("tfoot", null, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("td", {
|
|
2362
2382
|
colSpan: configuration.fields.length
|
|
2363
2383
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2364
2384
|
className: classNames("cweb-list-table-footer", "flex justify-center flex-row items-center", "h-20 py-4 px-4")
|
|
2365
2385
|
}, /*#__PURE__*/React__default.createElement(PaginationMenu, {
|
|
2366
|
-
onChange: onPaginationChange,
|
|
2367
2386
|
pageCount: pageCount,
|
|
2368
2387
|
currentPageNumber: currentPage,
|
|
2369
|
-
|
|
2388
|
+
onChange: onPaginationChange,
|
|
2389
|
+
pageSize: pageSize,
|
|
2390
|
+
localization: localization,
|
|
2391
|
+
resultCount: resultCount
|
|
2370
2392
|
})))))));
|
|
2371
2393
|
}
|
|
2372
2394
|
|
|
@@ -2687,11 +2709,7 @@ var NavMenuItem = function NavMenuItem(props) {
|
|
|
2687
2709
|
currentImg = _useState[0],
|
|
2688
2710
|
setCurrentImg = _useState[1];
|
|
2689
2711
|
|
|
2690
|
-
var
|
|
2691
|
-
textColor = _useState2[0],
|
|
2692
|
-
setTextColor = _useState2[1];
|
|
2693
|
-
|
|
2694
|
-
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"], {
|
|
2695
2713
|
"bg-nav-menu": !props.isSelected,
|
|
2696
2714
|
"bg-gray-600": props.isSelected
|
|
2697
2715
|
});
|
|
@@ -2699,14 +2717,12 @@ var NavMenuItem = function NavMenuItem(props) {
|
|
|
2699
2717
|
var handleOnMouseOver = function handleOnMouseOver() {
|
|
2700
2718
|
if (!props.isSelected) {
|
|
2701
2719
|
setCurrentImg(props.imgOnHover);
|
|
2702
|
-
setTextColor("white");
|
|
2703
2720
|
}
|
|
2704
2721
|
};
|
|
2705
2722
|
|
|
2706
2723
|
var handleOnMouseOut = function handleOnMouseOut() {
|
|
2707
2724
|
if (!props.isSelected) {
|
|
2708
2725
|
setCurrentImg(props.img);
|
|
2709
|
-
setTextColor("gray-200");
|
|
2710
2726
|
}
|
|
2711
2727
|
};
|
|
2712
2728
|
|
|
@@ -2723,7 +2739,9 @@ var NavMenuItem = function NavMenuItem(props) {
|
|
|
2723
2739
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
2724
2740
|
type: "strong",
|
|
2725
2741
|
text: props.title,
|
|
2726
|
-
|
|
2742
|
+
hoverInGroup: true,
|
|
2743
|
+
color: "slate-200",
|
|
2744
|
+
hoverColor: "white"
|
|
2727
2745
|
}));
|
|
2728
2746
|
|
|
2729
2747
|
function handleMenuClick(event) {
|
|
@@ -2816,18 +2834,26 @@ var TextLink = function TextLink(props) {
|
|
|
2816
2834
|
|
|
2817
2835
|
var NotificationBanner = function NotificationBanner(props) {
|
|
2818
2836
|
var classes = classNames("w-full px-6 py-2 flex flex-row items-center border border-solid rounded", props.className, {
|
|
2819
|
-
"bg-slate-
|
|
2820
|
-
"bg-blue-
|
|
2821
|
-
"bg-red-
|
|
2822
|
-
"bg-green-
|
|
2823
|
-
"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"
|
|
2824
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
|
+
};
|
|
2825
2851
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2826
2852
|
className: classes
|
|
2827
2853
|
}, props.icon, /*#__PURE__*/React__default.createElement(Text, {
|
|
2828
|
-
className: "first:ml-0
|
|
2854
|
+
className: "ml-4 first:ml-0",
|
|
2829
2855
|
text: props.text,
|
|
2830
|
-
color: props.color
|
|
2856
|
+
color: props.color ? textColor[props.color] : "base"
|
|
2831
2857
|
}), props.linkProps && /*#__PURE__*/React__default.createElement(TextLink, {
|
|
2832
2858
|
className: "ml-4",
|
|
2833
2859
|
text: props.linkProps.text,
|
|
@@ -2994,7 +3020,7 @@ var Step = function Step(_ref) {
|
|
|
2994
3020
|
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
2995
3021
|
text: localization.step + " " + stepNumber,
|
|
2996
3022
|
type: "strong",
|
|
2997
|
-
color: active ? "blue" : "
|
|
3023
|
+
color: active ? "blue-800" : "slate-500"
|
|
2998
3024
|
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
2999
3025
|
text: title,
|
|
3000
3026
|
type: "strong"
|
|
@@ -3786,24 +3812,26 @@ var TagColorTheme;
|
|
|
3786
3812
|
})(TagColorTheme || (TagColorTheme = {}));
|
|
3787
3813
|
|
|
3788
3814
|
var Tag = function Tag(_ref) {
|
|
3815
|
+
var _textColor;
|
|
3816
|
+
|
|
3789
3817
|
var text = _ref.text,
|
|
3790
3818
|
_ref$colorTheme = _ref.colorTheme,
|
|
3791
3819
|
colorTheme = _ref$colorTheme === void 0 ? TagColorTheme.Gray : _ref$colorTheme,
|
|
3792
3820
|
className = _ref.className,
|
|
3793
3821
|
_ref$size = _ref.size,
|
|
3794
3822
|
size = _ref$size === void 0 ? TagSize.base : _ref$size;
|
|
3795
|
-
var
|
|
3796
|
-
"bg-red-100 text-red-700": colorTheme === TagColorTheme.Red,
|
|
3797
|
-
"bg-orange-100 text-amber-700": colorTheme === TagColorTheme.Amber,
|
|
3798
|
-
"bg-green-100 text-green-800": colorTheme === TagColorTheme.Green,
|
|
3799
|
-
"bg-slate-100 text-slate-600": colorTheme === TagColorTheme.Gray,
|
|
3800
|
-
"bg-blue-50 text-blue-800": colorTheme === TagColorTheme.Blue
|
|
3801
|
-
});
|
|
3823
|
+
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);
|
|
3802
3824
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3803
|
-
className:
|
|
3825
|
+
className: classNames("inline py-1 px-2 rounded-lg", className, {
|
|
3826
|
+
"bg-red-50": colorTheme === TagColorTheme.Red,
|
|
3827
|
+
"bg-orange-50": colorTheme === TagColorTheme.Amber,
|
|
3828
|
+
"bg-green-50": colorTheme === TagColorTheme.Green,
|
|
3829
|
+
"bg-slate-50": colorTheme === TagColorTheme.Gray,
|
|
3830
|
+
"bg-blue-50": colorTheme === TagColorTheme.Blue
|
|
3831
|
+
})
|
|
3804
3832
|
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
3805
3833
|
inline: true,
|
|
3806
|
-
color:
|
|
3834
|
+
color: textColor[colorTheme],
|
|
3807
3835
|
text: text,
|
|
3808
3836
|
type: size === TagSize.small ? "sm" : "base"
|
|
3809
3837
|
}));
|
|
@@ -3997,7 +4025,7 @@ var TextEditorV2 = function TextEditorV2(_ref) {
|
|
|
3997
4025
|
|
|
3998
4026
|
var _excluded$f = ["text", "icon", "className", "iconClass", "onClick"];
|
|
3999
4027
|
|
|
4000
|
-
function
|
|
4028
|
+
function SectionItemWithContent(props) {
|
|
4001
4029
|
var text = props.text,
|
|
4002
4030
|
icon = props.icon,
|
|
4003
4031
|
className = props.className,
|
|
@@ -4005,9 +4033,9 @@ function TextListItem(props) {
|
|
|
4005
4033
|
onClick = props.onClick,
|
|
4006
4034
|
rest = _objectWithoutPropertiesLoose(props, _excluded$f);
|
|
4007
4035
|
|
|
4008
|
-
var mergedClasses = classNames("cweb-text-
|
|
4009
|
-
var iconClasses = classNames("cweb-text-
|
|
4010
|
-
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({
|
|
4011
4039
|
className: mergedClasses,
|
|
4012
4040
|
onClick: onClick
|
|
4013
4041
|
}, rest), icon && /*#__PURE__*/React__default.createElement("img", {
|
|
@@ -4019,7 +4047,7 @@ function TextListItem(props) {
|
|
|
4019
4047
|
}));
|
|
4020
4048
|
}
|
|
4021
4049
|
|
|
4022
|
-
|
|
4050
|
+
SectionItemWithContent.propTypes = {
|
|
4023
4051
|
text: PropTypes.string.isRequired,
|
|
4024
4052
|
icon: /*#__PURE__*/PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
|
4025
4053
|
className: PropTypes.string,
|
|
@@ -4055,7 +4083,7 @@ function ViewItem(_ref) {
|
|
|
4055
4083
|
className: "vitals-view-item-title-line flex justify-start flex-row items-start"
|
|
4056
4084
|
}, titlePropsMerged && /*#__PURE__*/React__default.createElement(Text, Object.assign({
|
|
4057
4085
|
className: classNames(titlePropsMerged.className, "vitals-view-item-title mb-1 mr-2"),
|
|
4058
|
-
color: "
|
|
4086
|
+
color: "slate-500"
|
|
4059
4087
|
}, titlePropsMerged)), titleAccessory), contentPropsMerged && (contentPropsMerged == null ? void 0 : contentPropsMerged.map(function (textProps) {
|
|
4060
4088
|
return /*#__PURE__*/React__default.createElement(Text, Object.assign({}, textProps, {
|
|
4061
4089
|
key: textProps.key || textProps.text
|
|
@@ -4934,7 +4962,6 @@ exports.Input = Input;
|
|
|
4934
4962
|
exports.LeftArrowIcon = LeftArrowIcon;
|
|
4935
4963
|
exports.LightBulbIcon = LightBulbIcon;
|
|
4936
4964
|
exports.Line = Line;
|
|
4937
|
-
exports.ListItem = ListItem;
|
|
4938
4965
|
exports.ListTable = ListTable;
|
|
4939
4966
|
exports.LoadingIndicator = LoadingIndicator;
|
|
4940
4967
|
exports.LockIcon = LockIcon;
|
|
@@ -4958,6 +4985,8 @@ exports.SearchCancelIcon = SearchCancelIcon$1;
|
|
|
4958
4985
|
exports.SearchIcon = SearchIcon$1;
|
|
4959
4986
|
exports.SecondaryButton = SecondaryButton;
|
|
4960
4987
|
exports.Section = Section;
|
|
4988
|
+
exports.SectionItem = SectionItem;
|
|
4989
|
+
exports.SectionItemWithContent = SectionItemWithContent;
|
|
4961
4990
|
exports.SettingsMenuButton = SettingsMenuButton;
|
|
4962
4991
|
exports.SmallCircleIcon = SmallCircleIcon;
|
|
4963
4992
|
exports.SmallDiamondIcon = SmallDiamondIcon;
|
|
@@ -4977,7 +5006,6 @@ exports.TextArea = Textarea;
|
|
|
4977
5006
|
exports.TextEditor = TextEditor;
|
|
4978
5007
|
exports.TextEditorV2 = TextEditorV2;
|
|
4979
5008
|
exports.TextLink = TextLink;
|
|
4980
|
-
exports.TextListItem = TextListItem;
|
|
4981
5009
|
exports.Title = Title;
|
|
4982
5010
|
exports.ViewItem = ViewItem;
|
|
4983
5011
|
//# sourceMappingURL=web-ui.cjs.development.js.map
|