pge-front-common 14.1.12 → 14.1.14

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.
@@ -1,9 +1,9 @@
1
- import { HtmlHTMLAttributes } from "react";
2
- export interface InformativeBoxProps extends HtmlHTMLAttributes<HTMLDivElement> {
3
- infoType: 'success' | 'alert' | 'warning' | 'informative';
4
- widthType?: 'fitContent' | 'fullWidth';
5
- title: string;
6
- message: string;
1
+ import { HtmlHTMLAttributes, ReactNode } from "react";
2
+ export interface InformativeBoxProps extends Omit<HtmlHTMLAttributes<HTMLDivElement>, "title"> {
3
+ infoType: "success" | "alert" | "warning" | "informative";
4
+ widthType?: "fitContent" | "fullWidth";
5
+ title: string | ReactNode;
6
+ message: string | ReactNode;
7
7
  hasDismissButton?: boolean;
8
8
  onClose?: () => void;
9
9
  }
package/lib/index.d.ts CHANGED
@@ -28,11 +28,11 @@ interface InputBaseProps$1 extends InputHTMLAttributes<HTMLInputElement> {
28
28
  }
29
29
  declare const InputBase: ({ customClass, restrictionMessage, label, leftIcon, rightIcon, onRightIconClick, style, required, error, helperText, disabled, readOnly, className, showCounter, value, ...props }: InputBaseProps$1) => React__default.JSX.Element;
30
30
 
31
- interface InformativeBoxProps extends HtmlHTMLAttributes<HTMLDivElement> {
32
- infoType: 'success' | 'alert' | 'warning' | 'informative';
33
- widthType?: 'fitContent' | 'fullWidth';
34
- title: string;
35
- message: string;
31
+ interface InformativeBoxProps extends Omit<HtmlHTMLAttributes<HTMLDivElement>, "title"> {
32
+ infoType: "success" | "alert" | "warning" | "informative";
33
+ widthType?: "fitContent" | "fullWidth";
34
+ title: string | ReactNode;
35
+ message: string | ReactNode;
36
36
  hasDismissButton?: boolean;
37
37
  onClose?: () => void;
38
38
  }
package/lib/index.esm.js CHANGED
@@ -8468,10 +8468,27 @@ var Blanket = function (props) { return (React__default.createElement("div", __a
8468
8468
  } }, props))); };
8469
8469
  var Dropdown = function (_a) {
8470
8470
  var children = _a.children, isOpen = _a.isOpen, target = _a.target, onClose = _a.onClose;
8471
- return (React__default.createElement("div", { style: { position: "relative", width: "100%" } },
8471
+ var dropdownRef = useRef(null);
8472
+ useEffect(function () {
8473
+ var handleClickOutside = function (event) {
8474
+ if (dropdownRef.current &&
8475
+ !dropdownRef.current.contains(event.target)) {
8476
+ onClose();
8477
+ }
8478
+ };
8479
+ if (isOpen) {
8480
+ document.addEventListener("mousedown", handleClickOutside);
8481
+ }
8482
+ else {
8483
+ document.removeEventListener("mousedown", handleClickOutside);
8484
+ }
8485
+ return function () {
8486
+ document.removeEventListener("mousedown", handleClickOutside);
8487
+ };
8488
+ }, [isOpen, onClose]);
8489
+ return (React__default.createElement("div", { ref: dropdownRef, style: { position: "relative", width: "100%" } },
8472
8490
  target,
8473
- isOpen ? React__default.createElement(Menu, null, children) : null,
8474
- isOpen ? React__default.createElement(Blanket, { onClick: onClose }) : null));
8491
+ isOpen ? React__default.createElement(Menu, null, children) : null));
8475
8492
  };
8476
8493
  function isArrayContained(subset, superset) {
8477
8494
  return subset.every(function (subItem) {
@@ -8775,7 +8792,7 @@ var Title$1 = function (_a) {
8775
8792
  return React__default.createElement("h1", { className: styles$d.title__home }, title);
8776
8793
  };
8777
8794
 
8778
- var css_248z$c = ".styles-module__tableResponsive___X3Pht {\r\n overflow-x: auto;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 0;\r\n border-top-left-radius: 0.75rem;\r\n border-top-right-radius: 0.75rem;\r\n}\r\n\r\n.styles-module__tableResponsive___X3Pht.styles-module__hadBottomRounded___DUWJQ {\r\n border-bottom-left-radius: 0.75rem;\r\n border-bottom-right-radius: 0.75rem;\r\n}\r\n\r\n.styles-module__tableResponse__setBorderRadius___KbRux {\r\n border-radius: 0;\r\n border-top-left-radius: 0.75rem;\r\n border-top-right-radius: 0.75rem;\r\n}\r\n\r\n.styles-module__table___u86d0 {\r\n width: 100%;\r\n border-collapse: collapse;\r\n border-radius: 8px 8px 0px 0px;\r\n}\r\n\r\n.styles-module__thead___31Y6o {\r\n background-color: var(--color-primary);\r\n color: #fff;\r\n border-radius: 8px 8px 0px 0px;\r\n height: 40px;\r\n}\r\n\r\n.styles-module__th___HfMyp {\r\n padding: 16px 30px 16px 24px;\r\n position: relative;\r\n font-size: var(--font-size-14, 14px);\r\n font-weight: 700;\r\n line-height: 19.07px;\r\n text-align: left;\r\n white-space: nowrap;\r\n}\r\n\r\n.styles-module__th___HfMyp.styles-module__sortableTh___qUpBb {\r\n cursor: pointer;\r\n}\r\n\r\n.styles-module__th___HfMyp.styles-module__left___aIlAN {\r\n text-align: left;\r\n}\r\n\r\n.styles-module__th___HfMyp.styles-module__center___ATHmE {\r\n text-align: center;\r\n}\r\n\r\n.styles-module__th___HfMyp.styles-module__right___gFq1h {\r\n text-align: right;\r\n}\r\n\r\n.styles-module__tableHeadContainer___npyid.styles-module__left___aIlAN {\r\n justify-content: left;\r\n}\r\n\r\n.styles-module__tableHeadContainer___npyid.styles-module__center___ATHmE {\r\n justify-content: center;\r\n}\r\n\r\n.styles-module__tableHeadContainer___npyid.styles-module__right___gFq1h {\r\n justify-content: right;\r\n}\r\n\r\n.styles-module__tableHeadContainer___npyid {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 8px;\r\n}\r\n\r\n.styles-module__sortIndicator___TCKlV {\r\n display: inline-flex;\r\n align-items: center;\r\n margin-left: 8px;\r\n}\r\n\r\n.styles-module__sortAsc___FSCqV,\r\n.styles-module__sortDesc___gqFDu {\r\n margin: 0 2px;\r\n}\r\n\r\n.styles-module__tbody___gl0AK {\r\n border-top: 1px solid #e0e0e0;\r\n}\r\n\r\n.styles-module__rowWhite___ANenF {\r\n background-color: var(--background-color-table-primary);\r\n color: var(--foreground);\r\n}\r\n\r\n.styles-module__rowGray___Fq6QZ {\r\n background-color: var(--background-color-table-secondary);\r\n color: var(--foreground);\r\n}\r\n\r\n.styles-module__tr___0ZMLo:hover {\r\n background-color: #e0f7fa;\r\n}\r\n\r\n.styles-module__td___qg16D {\r\n text-align: start;\r\n padding: 8px 24px;\r\n white-space: nowrap;\r\n}\r\n\r\n.styles-module__td___qg16D.styles-module__left___aIlAN {\r\n text-align: left;\r\n}\r\n\r\n.styles-module__td___qg16D.styles-module__center___ATHmE {\r\n text-align: center;\r\n}\r\n\r\n.styles-module__td___qg16D.styles-module__right___gFq1h {\r\n text-align: right;\r\n}\r\n\r\n.styles-module__noRecords___rkZTs {\r\n padding: 28px;\r\n text-align: center;\r\n color: #777;\r\n}\r\n\r\n.styles-module__actionHeader___GMevA {\r\n text-align: center;\r\n}\r\n\r\n.styles-module__actionCell___kijis {\r\n text-align: center;\r\n}\r\n\r\n.styles-module__actionCell___kijis.styles-module__left___aIlAN {\r\n text-align: left;\r\n}\r\n\r\n.styles-module__actionCell___kijis.styles-module__center___ATHmE {\r\n text-align: center;\r\n}\r\n\r\n.styles-module__actionCell___kijis.styles-module__right___gFq1h {\r\n text-align: right;\r\n}\r\n\r\n.styles-module__actionIcon___knjpp {\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n color: #ff0000;\r\n font-size: var(--font-size-16, 16px);\r\n padding: 0;\r\n margin: 0;\r\n}\r\n";
8795
+ var css_248z$c = ".styles-module__tableResponsive___X3Pht {\r\n overflow-x: auto;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 0;\r\n border-top-left-radius: 0.75rem;\r\n border-top-right-radius: 0.75rem;\r\n}\r\n\r\n.styles-module__tableResponsive___X3Pht.styles-module__hadBottomRounded___DUWJQ {\r\n border-bottom-left-radius: 0.75rem;\r\n border-bottom-right-radius: 0.75rem;\r\n}\r\n\r\n.styles-module__tableResponse__setBorderRadius___KbRux {\r\n border-radius: 0;\r\n border-top-left-radius: 0.75rem;\r\n border-top-right-radius: 0.75rem;\r\n}\r\n\r\n.styles-module__table___u86d0 {\r\n width: 100%;\r\n border-collapse: collapse;\r\n border-radius: 8px 8px 0px 0px;\r\n}\r\n\r\n.styles-module__thead___31Y6o {\r\n background-color: var(--color-primary);\r\n color: #fff;\r\n border-radius: 8px 8px 0px 0px;\r\n height: 40px;\r\n}\r\n\r\n.styles-module__th___HfMyp {\r\n padding: 0px 30px 0px 24px;\r\n position: relative;\r\n font-size: var(--font-size-14, 14px);\r\n font-weight: 700;\r\n line-height: 19.07px;\r\n text-align: left;\r\n white-space: nowrap;\r\n}\r\n\r\n.styles-module__th___HfMyp.styles-module__sortableTh___qUpBb {\r\n cursor: pointer;\r\n}\r\n\r\n.styles-module__th___HfMyp.styles-module__left___aIlAN {\r\n text-align: left;\r\n}\r\n\r\n.styles-module__th___HfMyp.styles-module__center___ATHmE {\r\n text-align: center;\r\n}\r\n\r\n.styles-module__th___HfMyp.styles-module__right___gFq1h {\r\n text-align: right;\r\n}\r\n\r\n.styles-module__tableHeadContainer___npyid.styles-module__left___aIlAN {\r\n justify-content: left;\r\n}\r\n\r\n.styles-module__tableHeadContainer___npyid.styles-module__center___ATHmE {\r\n justify-content: center;\r\n}\r\n\r\n.styles-module__tableHeadContainer___npyid.styles-module__right___gFq1h {\r\n justify-content: right;\r\n}\r\n\r\n.styles-module__tableHeadContainer___npyid {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 8px;\r\n}\r\n\r\n.styles-module__sortIndicator___TCKlV {\r\n display: inline-flex;\r\n align-items: center;\r\n margin-left: 8px;\r\n}\r\n\r\n.styles-module__sortAsc___FSCqV,\r\n.styles-module__sortDesc___gqFDu {\r\n margin: 0 2px;\r\n}\r\n\r\n.styles-module__tbody___gl0AK {\r\n border-top: 1px solid #e0e0e0;\r\n}\r\n\r\n.styles-module__rowWhite___ANenF {\r\n background-color: var(--background-color-table-primary);\r\n color: var(--foreground);\r\n}\r\n\r\n.styles-module__rowGray___Fq6QZ {\r\n background-color: var(--background-color-table-secondary);\r\n color: var(--foreground);\r\n}\r\n\r\n.styles-module__tr___0ZMLo:hover {\r\n background-color: #e0f7fa;\r\n}\r\n\r\n.styles-module__td___qg16D {\r\n text-align: start;\r\n padding: 8px 24px;\r\n white-space: nowrap;\r\n}\r\n\r\n.styles-module__td___qg16D.styles-module__left___aIlAN {\r\n text-align: left;\r\n}\r\n\r\n.styles-module__td___qg16D.styles-module__center___ATHmE {\r\n text-align: center;\r\n}\r\n\r\n.styles-module__td___qg16D.styles-module__right___gFq1h {\r\n text-align: right;\r\n}\r\n\r\n.styles-module__noRecords___rkZTs {\r\n padding: 28px;\r\n text-align: center;\r\n color: #777;\r\n}\r\n\r\n.styles-module__actionHeader___GMevA {\r\n text-align: center;\r\n}\r\n\r\n.styles-module__actionCell___kijis {\r\n text-align: center;\r\n}\r\n\r\n.styles-module__actionCell___kijis.styles-module__left___aIlAN {\r\n text-align: left;\r\n}\r\n\r\n.styles-module__actionCell___kijis.styles-module__center___ATHmE {\r\n text-align: center;\r\n}\r\n\r\n.styles-module__actionCell___kijis.styles-module__right___gFq1h {\r\n text-align: right;\r\n}\r\n\r\n.styles-module__actionIcon___knjpp {\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n color: #ff0000;\r\n font-size: var(--font-size-16, 16px);\r\n padding: 0;\r\n margin: 0;\r\n}\r\n";
8779
8796
  var styles$c = {"tableResponsive":"styles-module__tableResponsive___X3Pht","hadBottomRounded":"styles-module__hadBottomRounded___DUWJQ","tableResponse__setBorderRadius":"styles-module__tableResponse__setBorderRadius___KbRux","table":"styles-module__table___u86d0","thead":"styles-module__thead___31Y6o","th":"styles-module__th___HfMyp","sortableTh":"styles-module__sortableTh___qUpBb","left":"styles-module__left___aIlAN","center":"styles-module__center___ATHmE","right":"styles-module__right___gFq1h","tableHeadContainer":"styles-module__tableHeadContainer___npyid","sortIndicator":"styles-module__sortIndicator___TCKlV","sortAsc":"styles-module__sortAsc___FSCqV","sortDesc":"styles-module__sortDesc___gqFDu","tbody":"styles-module__tbody___gl0AK","rowWhite":"styles-module__rowWhite___ANenF","rowGray":"styles-module__rowGray___Fq6QZ","tr":"styles-module__tr___0ZMLo","td":"styles-module__td___qg16D","noRecords":"styles-module__noRecords___rkZTs","actionHeader":"styles-module__actionHeader___GMevA","actionCell":"styles-module__actionCell___kijis","actionIcon":"styles-module__actionIcon___knjpp"};
8780
8797
  styleInject(css_248z$c);
8781
8798