@luscii-healthtech/web-ui 2.41.2 → 2.42.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/NotificationBanner/NotificationBanner.d.ts +2 -1
- package/dist/web-ui-tailwind.css +4 -6
- package/dist/web-ui.cjs.development.js +20 -6
- 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 +20 -6
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,8 @@ export interface NotificationBannerLinkProps {
|
|
|
6
6
|
handleClick?: () => void;
|
|
7
7
|
}
|
|
8
8
|
export interface NotificationBannerProps {
|
|
9
|
-
|
|
9
|
+
title?: string;
|
|
10
|
+
text?: string;
|
|
10
11
|
color?: NotificationBannerColor;
|
|
11
12
|
/**
|
|
12
13
|
* The icon can either be one of our icon components or an image url
|
package/dist/web-ui-tailwind.css
CHANGED
|
@@ -615,12 +615,6 @@ video {
|
|
|
615
615
|
margin-bottom: calc(0.25rem * var(--space-y-reverse));
|
|
616
616
|
}
|
|
617
617
|
|
|
618
|
-
.space-x-1 > :not(template) ~ :not(template) {
|
|
619
|
-
--space-x-reverse: 0;
|
|
620
|
-
margin-right: calc(0.25rem * var(--space-x-reverse));
|
|
621
|
-
margin-left: calc(0.25rem * calc(1 - var(--space-x-reverse)));
|
|
622
|
-
}
|
|
623
|
-
|
|
624
618
|
.space-y-2 > :not(template) ~ :not(template) {
|
|
625
619
|
--space-y-reverse: 0;
|
|
626
620
|
margin-top: calc(0.5rem * calc(1 - var(--space-y-reverse)));
|
|
@@ -1422,6 +1416,10 @@ video {
|
|
|
1422
1416
|
margin-top: 0.25rem;
|
|
1423
1417
|
}
|
|
1424
1418
|
|
|
1419
|
+
.mr-1 {
|
|
1420
|
+
margin-right: 0.25rem;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1425
1423
|
.mb-1 {
|
|
1426
1424
|
margin-bottom: 0.25rem;
|
|
1427
1425
|
}
|
|
@@ -1569,6 +1569,7 @@ var ButtonV2 = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef)
|
|
|
1569
1569
|
"opacity-50": isDisabled,
|
|
1570
1570
|
"pointer-events-none": isDisabled || isPending
|
|
1571
1571
|
}, className);
|
|
1572
|
+
var textColorClass = allowedColors[textColor != null ? textColor : "base"];
|
|
1572
1573
|
return /*#__PURE__*/React__default.createElement("button", _extends({
|
|
1573
1574
|
ref: innerRef
|
|
1574
1575
|
}, otherAttributes, {
|
|
@@ -1577,8 +1578,8 @@ var ButtonV2 = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef)
|
|
|
1577
1578
|
onClick: handleClick,
|
|
1578
1579
|
disabled: isDisabled,
|
|
1579
1580
|
"aria-disabled": isDisabled
|
|
1580
|
-
}), icon && /*#__PURE__*/React__default.createElement(icon, {
|
|
1581
|
-
className: "w-6 h-6"
|
|
1581
|
+
}), icon && !isPending && /*#__PURE__*/React__default.createElement(icon, {
|
|
1582
|
+
className: "w-6 h-6 " + textColorClass
|
|
1582
1583
|
}), isPending && /*#__PURE__*/React__default.createElement("span", {
|
|
1583
1584
|
className: "opacity-100",
|
|
1584
1585
|
// IE11 center translate fix
|
|
@@ -1589,7 +1590,7 @@ var ButtonV2 = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef)
|
|
|
1589
1590
|
transform: "translate(-50%, -50%)"
|
|
1590
1591
|
}
|
|
1591
1592
|
}, /*#__PURE__*/React__default.createElement(Spinner, {
|
|
1592
|
-
className:
|
|
1593
|
+
className: textColorClass
|
|
1593
1594
|
})), text && /*#__PURE__*/React__default.createElement(Text, {
|
|
1594
1595
|
className: classNames({
|
|
1595
1596
|
invisible: isPending,
|
|
@@ -2626,20 +2627,33 @@ var NotificationBanner = function NotificationBanner(props) {
|
|
|
2626
2627
|
className: "w-6 h-6",
|
|
2627
2628
|
icon: props.icon
|
|
2628
2629
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
2629
|
-
className: "flex flex-
|
|
2630
|
-
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
2630
|
+
className: "flex flex-col"
|
|
2631
|
+
}, props.title && /*#__PURE__*/React__default.createElement(Text, {
|
|
2631
2632
|
className: classNames({
|
|
2632
2633
|
"ml-3": props.icon
|
|
2633
2634
|
}),
|
|
2635
|
+
text: props.title,
|
|
2636
|
+
"data-test-id": "notification-title",
|
|
2637
|
+
type: "strong",
|
|
2638
|
+
color: color
|
|
2639
|
+
}), (props.text || props.linkProps) && /*#__PURE__*/React__default.createElement("div", {
|
|
2640
|
+
className: "flex flex-row items-center"
|
|
2641
|
+
}, props.text && /*#__PURE__*/React__default.createElement(Text, {
|
|
2642
|
+
className: classNames({
|
|
2643
|
+
"ml-3": props.icon,
|
|
2644
|
+
"mr-1": props.linkProps
|
|
2645
|
+
}),
|
|
2634
2646
|
text: props.text,
|
|
2647
|
+
"data-test-id": "notification-text",
|
|
2635
2648
|
color: color
|
|
2636
2649
|
}), props.linkProps && /*#__PURE__*/React__default.createElement(TextLink, {
|
|
2637
2650
|
text: props.linkProps.text,
|
|
2651
|
+
"data-test-id": "notification-text-link",
|
|
2638
2652
|
enabled: props.linkProps.enabled,
|
|
2639
2653
|
rel: "noopener",
|
|
2640
2654
|
target: "_blank",
|
|
2641
2655
|
onClick: props.linkProps.handleClick
|
|
2642
|
-
}))));
|
|
2656
|
+
})))));
|
|
2643
2657
|
};
|
|
2644
2658
|
NotificationBanner.defaultProps = {
|
|
2645
2659
|
color: "base",
|