@luscii-healthtech/web-ui 0.3.0 → 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.
@@ -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;
@@ -1,6 +1,6 @@
1
- export default TextListItem;
2
- declare function TextListItem(props: any): JSX.Element;
3
- declare namespace TextListItem {
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>;
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 ListItem, ListItemProps, } from "./components/ListItem/ListItem";
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 TextListItem } from "./components/TextListItem/TextListItem";
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";
@@ -190,6 +190,18 @@
190
190
  .cweb-checkbox.type-switch.is-checked .cweb-checkbox-icon-container:after {
191
191
  left: 32px; }
192
192
 
193
+ .vitals-confirmation-dialog {
194
+ margin-top: 4rem !important; }
195
+ .vitals-confirmation-dialog .vitals-confirmation-dialog-content {
196
+ padding: 24px; }
197
+ .vitals-confirmation-dialog .vitals-confirmation-dialog-content .vitals-confirmation-dialog-action-container {
198
+ display: flex;
199
+ justify-content: space-between;
200
+ flex-direction: row;
201
+ align-items: center;
202
+ width: 100%;
203
+ margin-top: 16px; }
204
+
193
205
  .cweb-box-shadow-default {
194
206
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.24), 0 0 2px 0 rgba(0, 0, 0, 0.12); }
195
207
  @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
@@ -432,18 +444,6 @@
432
444
  .cweb-datepicker-calendar .react-datepicker__day.react-datepicker__day--outside-month {
433
445
  color: #cccccc; }
434
446
 
435
- .vitals-confirmation-dialog {
436
- margin-top: 4rem !important; }
437
- .vitals-confirmation-dialog .vitals-confirmation-dialog-content {
438
- padding: 24px; }
439
- .vitals-confirmation-dialog .vitals-confirmation-dialog-content .vitals-confirmation-dialog-action-container {
440
- display: flex;
441
- justify-content: space-between;
442
- flex-direction: row;
443
- align-items: center;
444
- width: 100%;
445
- margin-top: 16px; }
446
-
447
447
  .cweb-box-shadow-default {
448
448
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.24), 0 0 2px 0 rgba(0, 0, 0, 0.12); }
449
449
  @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
@@ -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");
@@ -1898,7 +1898,7 @@ Line.propTypes = {
1898
1898
  };
1899
1899
 
1900
1900
  var _excluded$7 = ["children", "className", "onClick"];
1901
- var ListItem = function ListItem(props) {
1901
+ var SectionItem = function SectionItem(props) {
1902
1902
  var children = props.children,
1903
1903
  className = props.className,
1904
1904
  onClick = props.onClick,
@@ -4025,7 +4025,7 @@ var TextEditorV2 = function TextEditorV2(_ref) {
4025
4025
 
4026
4026
  var _excluded$f = ["text", "icon", "className", "iconClass", "onClick"];
4027
4027
 
4028
- function TextListItem(props) {
4028
+ function SectionItemWithContent(props) {
4029
4029
  var text = props.text,
4030
4030
  icon = props.icon,
4031
4031
  className = props.className,
@@ -4033,9 +4033,9 @@ function TextListItem(props) {
4033
4033
  onClick = props.onClick,
4034
4034
  rest = _objectWithoutPropertiesLoose(props, _excluded$f);
4035
4035
 
4036
- var mergedClasses = classNames("cweb-text-list-item", className);
4037
- var iconClasses = classNames("cweb-text-list-item-icon", iconClass);
4038
- return /*#__PURE__*/React__default.createElement(ListItem, _extends({
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({
4039
4039
  className: mergedClasses,
4040
4040
  onClick: onClick
4041
4041
  }, rest), icon && /*#__PURE__*/React__default.createElement("img", {
@@ -4047,7 +4047,7 @@ function TextListItem(props) {
4047
4047
  }));
4048
4048
  }
4049
4049
 
4050
- TextListItem.propTypes = {
4050
+ SectionItemWithContent.propTypes = {
4051
4051
  text: PropTypes.string.isRequired,
4052
4052
  icon: /*#__PURE__*/PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
4053
4053
  className: PropTypes.string,
@@ -4962,7 +4962,6 @@ exports.Input = Input;
4962
4962
  exports.LeftArrowIcon = LeftArrowIcon;
4963
4963
  exports.LightBulbIcon = LightBulbIcon;
4964
4964
  exports.Line = Line;
4965
- exports.ListItem = ListItem;
4966
4965
  exports.ListTable = ListTable;
4967
4966
  exports.LoadingIndicator = LoadingIndicator;
4968
4967
  exports.LockIcon = LockIcon;
@@ -4986,6 +4985,8 @@ exports.SearchCancelIcon = SearchCancelIcon$1;
4986
4985
  exports.SearchIcon = SearchIcon$1;
4987
4986
  exports.SecondaryButton = SecondaryButton;
4988
4987
  exports.Section = Section;
4988
+ exports.SectionItem = SectionItem;
4989
+ exports.SectionItemWithContent = SectionItemWithContent;
4989
4990
  exports.SettingsMenuButton = SettingsMenuButton;
4990
4991
  exports.SmallCircleIcon = SmallCircleIcon;
4991
4992
  exports.SmallDiamondIcon = SmallDiamondIcon;
@@ -5005,7 +5006,6 @@ exports.TextArea = Textarea;
5005
5006
  exports.TextEditor = TextEditor;
5006
5007
  exports.TextEditorV2 = TextEditorV2;
5007
5008
  exports.TextLink = TextLink;
5008
- exports.TextListItem = TextListItem;
5009
5009
  exports.Title = Title;
5010
5010
  exports.ViewItem = ViewItem;
5011
5011
  //# sourceMappingURL=web-ui.cjs.development.js.map