@luscii-healthtech/web-ui 2.40.1 → 2.40.2

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.
@@ -563,32 +563,46 @@ function styleInject(css, ref) {
563
563
  var css_248z = "/* https://stackoverflow.com/a/13924997 */\n\n.text-two-lines-max {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n /* number of lines to show */\n -webkit-line-clamp: 2;\n line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n";
564
564
  styleInject(css_248z);
565
565
 
566
+ /**
567
+ * One might argue that we're duplicating strings in this file.
568
+ * That's how tailwind expects to detect used classes, so please do not make
569
+ * anything dynamic or try to string concat class names.
570
+ * https://v1.tailwindcss.com/docs/controlling-file-size
571
+ */
572
+
573
+ var allowedTextStyles = {
574
+ sm: "text-xs font-medium",
575
+ "sm-strong": "text-xs font-semibold",
576
+ base: "text-sm",
577
+ strong: "text-sm font-semibold",
578
+ lg: "",
579
+ "lg-strong": "font-semibold",
580
+ xl: "text-lg",
581
+ "xl-strong": "font-semibold text-lg"
582
+ }; //Extend with other colors that we want to enable for text
583
+
584
+ var allowedColors = {
585
+ base: "text-slate-800",
586
+ "slate-500": "text-slate-500",
587
+ "slate-200": "text-slate-200",
588
+ red: "text-red-700",
589
+ green: "text-green-700",
590
+ amber: "text-yellow-700",
591
+ white: "text-white",
592
+ "blue-800": "text-blue-800"
593
+ };
594
+ var allowedHoverColors = {
595
+ "blue-900": "hover:text-blue-900",
596
+ white: "hover:text-white"
597
+ }; // What is a group hover? https://v1.tailwindcss.com/docs/pseudo-class-variants#group-hover
598
+
599
+ var allowedGroupHoverColors = {
600
+ "blue-900": "group-hover:text-blue-900",
601
+ white: "group-hover:text-white"
602
+ };
566
603
  var Text = function Text(props) {
567
- /**
568
- * One might argue that we're duplicating strings in this file.
569
- * That's how tailwind expects to detect used classes, so please do not make
570
- * anything dynamic or try to string concat class names.
571
- * https://v1.tailwindcss.com/docs/controlling-file-size
572
- */
573
- var allowedColors = {
574
- base: "text-slate-800",
575
- "slate-500": "text-slate-500",
576
- "slate-200": "text-slate-200",
577
- red: "text-red-700",
578
- green: "text-green-700",
579
- amber: "text-yellow-700",
580
- white: "text-white",
581
- "blue-800": "text-blue-800"
582
- };
583
- var allowedHoverColors = {
584
- "blue-900": "hover:text-blue-900",
585
- white: "hover:text-white"
586
- }; // What is a group hover? https://v1.tailwindcss.com/docs/pseudo-class-variants#group-hover
587
-
588
- var allowedGroupHoverColors = {
589
- "blue-900": "group-hover:text-blue-900",
590
- white: "group-hover:text-white"
591
- };
604
+ var _props$type, _props$color;
605
+
592
606
  var selectedHoverColor = props.hoverColor && !props.hoverInGroup && allowedHoverColors[props.hoverColor];
593
607
  var selectedGroupHoverColor = props.hoverColor && props.hoverInGroup && allowedGroupHoverColors[props.hoverColor];
594
608
  var containerProps = {
@@ -597,21 +611,11 @@ var Text = function Text(props) {
597
611
  className: classNames( // apply different style classes
598
612
  // for now we stick with font-size 16px on the body
599
613
  // so I am adjusting our styles accordingly (one step down)
600
- {
601
- "text-xs font-medium": props.type === "sm",
602
- "text-xs font-semibold": props.type === "sm-strong",
603
- "text-sm": props.type === "base",
604
- "text-sm font-semibold": props.type === "strong",
605
- "": props.type === "lg",
606
- "font-semibold": props.type === "lg-strong",
607
- "text-lg": props.type === "xl",
608
- "font-semibold text-lg": props.type === "xl-strong"
609
- }, {
614
+ allowedTextStyles[(_props$type = props.type) != null ? _props$type : "base"], allowedColors[(_props$color = props.color) != null ? _props$color : "base"], selectedHoverColor, selectedGroupHoverColor, {
610
615
  inline: props.inline,
611
616
  // FIXME: this class doesn't do anything without a max-width
612
617
  truncate: props.truncate,
613
- "text-two-lines-max": props.clampLines
614
- }, allowedColors[props.color || "base"], selectedHoverColor, selectedGroupHoverColor, {
618
+ "text-two-lines-max": props.clampLines,
615
619
  "in-html-link": props.containsDangerousHtml
616
620
  }, //can be used to overwrite other classes like the color
617
621
  props.className)
@@ -956,11 +960,10 @@ var css_248z$2 = ".title {\n font-family: \"AvenirNextLTPro-Bold\", \"Roboto\",
956
960
  styleInject(css_248z$2);
957
961
 
958
962
  var Title = function Title(props) {
959
- var _props$className;
963
+ var _props$color;
960
964
 
961
965
  var containerClassName = classNames("title", //this is used to load the correct font from the css
962
- "font-bold", {
963
- "text-slate-800": !((_props$className = props.className) != null && _props$className.match(/\s(text-)/)),
966
+ "font-bold", allowedColors[(_props$color = props.color) != null ? _props$color : "base"], {
964
967
  "text-base": props.type === "xs",
965
968
  "text-xl": props.type === "sm",
966
969
  "text-2xl": props.type === "base",
@@ -1299,6 +1302,11 @@ var List = function List(_ref) {
1299
1302
  });
1300
1303
  }
1301
1304
 
1305
+ var titleProps = title ? _extends({
1306
+ type: "xs"
1307
+ }, typeof title === "object" ? title : {
1308
+ text: title
1309
+ }) : null;
1302
1310
  return /*#__PURE__*/React__default.createElement("div", {
1303
1311
  "data-test-id": dataTestId != null ? dataTestId : "list-component"
1304
1312
  }, (title || headerButton) && /*#__PURE__*/React__default.createElement("div", {
@@ -1312,10 +1320,7 @@ var List = function List(_ref) {
1312
1320
  "justify-start": title && !headerButton,
1313
1321
  "justify-end": !title && headerButton
1314
1322
  })
1315
- }, title && /*#__PURE__*/React__default.createElement(Title, {
1316
- type: "xs",
1317
- text: title
1318
- }), !!headerButton && /*#__PURE__*/React__default.createElement("div", {
1323
+ }, titleProps && /*#__PURE__*/React__default.createElement(Title, _extends({}, titleProps)), !!headerButton && /*#__PURE__*/React__default.createElement("div", {
1319
1324
  className: "space-x-3"
1320
1325
  }, /*#__PURE__*/React__default.createElement(headerButton.buttonType, headerButton.buttonProps))), /*#__PURE__*/React__default.createElement("ul", {
1321
1326
  ref: listRef
@@ -6443,7 +6448,9 @@ var TimelineStep = function TimelineStep(_ref) {
6443
6448
  className: classNames(borderClassNames, "h-4 first:h-0")
6444
6449
  }), /*#__PURE__*/React__default.createElement("div", {
6445
6450
  className: containerClassNames
6446
- }, content, /*#__PURE__*/React__default.createElement("span", {
6451
+ }, /*#__PURE__*/React__default.createElement("div", {
6452
+ className: "flex flex-col"
6453
+ }, content), /*#__PURE__*/React__default.createElement("span", {
6447
6454
  className: classNames("rounded-lg h-4 w-4 absolute top-6 -left-2 -ml-px -mt-px", {
6448
6455
  hidden: ["wide", "withoutDot"].includes(type),
6449
6456
  "bg-blue-800": "base" === type,