pge-front-common 14.1.37 → 14.1.39

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.
@@ -11,10 +11,12 @@ export interface HeaderProps {
11
11
  name: string;
12
12
  userName: string;
13
13
  handleLogout: () => void;
14
+ handleLogin?: () => void;
14
15
  profile?: string;
15
16
  fullName?: string;
16
17
  firstName?: string;
17
18
  brandLogos?: React.ReactNode;
19
+ showLoginButton?: boolean;
18
20
  }
19
- declare const HeaderPge: ({ isRHDigital, isCASC, isResponsiveCASC, optionSelection, options, name, userName, handleLogout, isPortalServidor, profile, hasGestor, fullName, firstName, brandLogos }: HeaderProps) => React.JSX.Element;
21
+ declare const HeaderPge: ({ isRHDigital, isCASC, isResponsiveCASC, optionSelection, options, name, userName, handleLogout, handleLogin, isPortalServidor, profile, hasGestor, fullName, firstName, brandLogos, showLoginButton, }: HeaderProps) => React.JSX.Element;
20
22
  export default HeaderPge;
@@ -6,3 +6,4 @@ type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
7
  export declare const WithPGERGLogo: Story;
8
8
  export declare const WithCASCLogo: Story;
9
+ export declare const ShowLoginButton: Story;
@@ -8,3 +8,9 @@ export declare const WithCustomCellRendering: Story;
8
8
  export declare const WithActionColumn: Story;
9
9
  export declare const EmptyState: Story;
10
10
  export declare const LargeDataSet: Story;
11
+ export declare const WithCheckboxColumn: Story;
12
+ export declare const WithSwitchColumn: Story;
13
+ export declare const WithBasicSelectColumn: Story;
14
+ export declare const WithSelectColumn: Story;
15
+ export declare const WithMultiSelectColumn: Story;
16
+ export declare const WithHeaderCheckbox: Story;
package/lib/index.d.ts CHANGED
@@ -620,12 +620,14 @@ interface HeaderProps {
620
620
  name: string;
621
621
  userName: string;
622
622
  handleLogout: () => void;
623
+ handleLogin?: () => void;
623
624
  profile?: string;
624
625
  fullName?: string;
625
626
  firstName?: string;
626
627
  brandLogos?: React__default.ReactNode;
628
+ showLoginButton?: boolean;
627
629
  }
628
- declare const HeaderPge: ({ isRHDigital, isCASC, isResponsiveCASC, optionSelection, options, name, userName, handleLogout, isPortalServidor, profile, hasGestor, fullName, firstName, brandLogos }: HeaderProps) => React__default.JSX.Element;
630
+ declare const HeaderPge: ({ isRHDigital, isCASC, isResponsiveCASC, optionSelection, options, name, userName, handleLogout, handleLogin, isPortalServidor, profile, hasGestor, fullName, firstName, brandLogos, showLoginButton, }: HeaderProps) => React__default.JSX.Element;
629
631
 
630
632
  type TitleProps = {
631
633
  title: string;
package/lib/index.esm.js CHANGED
@@ -8782,7 +8782,16 @@ var styles$i = {"separator_background":"header-module__separator_background___Si
8782
8782
  styleInject(css_248z$i);
8783
8783
 
8784
8784
  var HeaderPge = function (_a) {
8785
- var _b = _a.isRHDigital, isRHDigital = _b === void 0 ? false : _b, _c = _a.isCASC, isCASC = _c === void 0 ? false : _c, _d = _a.isResponsiveCASC, isResponsiveCASC = _d === void 0 ? false : _d, optionSelection = _a.optionSelection, options = _a.options, name = _a.name, userName = _a.userName, handleLogout = _a.handleLogout, isPortalServidor = _a.isPortalServidor, profile = _a.profile, _e = _a.hasGestor, hasGestor = _e === void 0 ? true : _e, fullName = _a.fullName, firstName = _a.firstName, brandLogos = _a.brandLogos;
8785
+ var _b = _a.isRHDigital, isRHDigital = _b === void 0 ? false : _b, _c = _a.isCASC, isCASC = _c === void 0 ? false : _c, _d = _a.isResponsiveCASC, isResponsiveCASC = _d === void 0 ? false : _d, optionSelection = _a.optionSelection, options = _a.options, name = _a.name, userName = _a.userName, handleLogout = _a.handleLogout, handleLogin = _a.handleLogin, isPortalServidor = _a.isPortalServidor, profile = _a.profile, _e = _a.hasGestor, hasGestor = _e === void 0 ? true : _e, fullName = _a.fullName, firstName = _a.firstName, brandLogos = _a.brandLogos, _f = _a.showLoginButton, showLoginButton = _f === void 0 ? false : _f;
8786
+ var renderUserArea = function () {
8787
+ if (showLoginButton) {
8788
+ return (React__default.createElement(PgeButton, { variant: "primary", title: "Login", onClick: handleLogin, leftIcon: React__default.createElement(IconProfile, { width: "14", height: "14" }) }));
8789
+ }
8790
+ if (!isCASC) {
8791
+ return (React__default.createElement(UserButton, { name: name, userName: userName, handleLogout: handleLogout, isPortalServidor: isPortalServidor, profile: profile, hasGestor: hasGestor, fullName: fullName, firstName: firstName }));
8792
+ }
8793
+ return (React__default.createElement(UserCascButton, { name: name, userName: userName, handleLogout: handleLogout, isPortalServidor: isPortalServidor, isResponsiveCASC: true, isCASC: isCASC, profile: profile, hasGestor: hasGestor, fullName: fullName, firstName: firstName }));
8794
+ };
8786
8795
  return (React__default.createElement(React__default.Fragment, null,
8787
8796
  React__default.createElement("div", { className: styles$i.separator_background }),
8788
8797
  React__default.createElement("header", { className: "".concat(styles$i.containerHeaderIndex, " ").concat(isRHDigital || isCASC ? "" : styles$i.set_shadow, " ").concat(isResponsiveCASC && isCASC ? styles$i.responsiveCASC : "") },
@@ -8797,8 +8806,7 @@ var HeaderPge = function (_a) {
8797
8806
  React__default.createElement(LogoPGERG, { className: "".concat(styles$i.iconLogo, " ").concat(styles$i.iconLogoPGE) }),
8798
8807
  React__default.createElement("div", { className: styles$i.verticalDivider }),
8799
8808
  React__default.createElement(LogoCASC, { className: "".concat(styles$i.iconLogoCASC) })))),
8800
- !isCASC && (React__default.createElement(UserButton, { name: name, userName: userName, handleLogout: handleLogout, isPortalServidor: isPortalServidor, profile: profile, hasGestor: hasGestor, fullName: fullName, firstName: firstName })),
8801
- isCASC && (React__default.createElement(UserCascButton, { name: name, userName: userName, handleLogout: handleLogout, isPortalServidor: isPortalServidor, isResponsiveCASC: true, isCASC: isCASC, profile: profile, hasGestor: hasGestor, fullName: fullName, firstName: firstName })))))));
8809
+ renderUserArea())))));
8802
8810
  };
8803
8811
 
8804
8812
  var css_248z$h = ".styles-module__title__home___IHOVr {\r\n font-size: 24px;\r\n font-weight: 700;\r\n text-align: left;\r\n color: #005a92;\r\n\r\n @media (max-width: 764px) {\r\n font-size: 16px;\r\n }\r\n}\r\n";
@@ -8853,7 +8861,7 @@ var TableComponent = function (_a) {
8853
8861
  React__default.createElement("td", { colSpan: columns.length + (hasIcon ? 1 : 0), className: styles$g.noRecords }, noRecordsMessage)))))));
8854
8862
  };
8855
8863
 
8856
- var css_248z$f = ".styles-module__textInput___gaz7I {\r\n width: 100%;\r\n height: 48px;\r\n padding: 14px 8px 14px 8px;\r\n border-radius: 8px;\r\n gap: 4px;\r\n font-size: 13px;\r\n border: 1px solid var(--color-border);\r\n color: var(--color-dark-gray);\r\n outline: none;\r\n transition: all 0.5s;\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP {\r\n width: 100%;\r\n color: var(--color-input);\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP input {\r\n border-top-left-radius: 8px;\r\n border-bottom-left-radius: 8px;\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP .p-calendar-disabled {\r\n border-radius: 8px;\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP .p-calendar-disabled,\r\n.styles-module__inputContainer___fmTYP .p-button.p-disabled,\r\n.styles-module__inputContainer___fmTYP input:disabled {\r\n background-color: #eeeeee !important;\r\n cursor: not-allowed;\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP input::placeholder {\r\n font-weight: 700;\r\n color: var(--input-placeholder-color);\r\n font-size: var(--font-size-14, 14px);\r\n line-height: 24px;\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP .p-inputtext {\r\n border-color: var(--color-border);\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP .p-button {\r\n line-height: 22px;\r\n border-color: var(--color-border);\r\n border-top-right-radius: 8px;\r\n border-bottom-right-radius: 8px;\r\n}\r\n\r\n.styles-module__iconWrapper___H3Icv {\r\n position: absolute;\r\n left: 8px;\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.styles-module__labelRequired___4ewKH::after {\r\n content: \" *\";\r\n color: var(--color-danger);\r\n}\r\n\r\n.styles-module__titleLabel___6M8ua {\r\n display: flex;\r\n align-items: center;\r\n margin-bottom: 5px;\r\n justify-content: space-between;\r\n}\r\n\r\n.styles-module__labelInput___wWffN {\r\n color: var(--color-label);\r\n line-height: 24px;\r\n font-size: 16px;\r\n bottom: 5px;\r\n font-weight: 700;\r\n}\r\n\r\n.styles-module__textInput___gaz7I:disabled {\r\n background: var(--background-color-table-primary);\r\n cursor: not-allowed;\r\n}\r\n\r\n.styles-module__textInput___gaz7I:focus {\r\n color: var(--color-gray-medium);\r\n outline: none;\r\n border: 1px solid var(--color-primary);\r\n box-shadow: 0px 0px 0px 2px var(--color-focus-outline);\r\n}\r\n\r\n.styles-module__textInput___gaz7I::placeholder {\r\n font-weight: bold;\r\n color: var(--color-input) 33;\r\n}\r\n\r\n.styles-module__textInputDanger___YqaWP {\r\n border: 1px solid var(--alert-color);\r\n box-shadow: 0px 0px 0px 2px var(--color-red-light);\r\n}\r\n\r\n.styles-module__password-input-container___o0AsP {\r\n position: relative;\r\n width: 360px;\r\n}\r\n\r\n.styles-module__inputTextPswUser___0xWHh:focus {\r\n border-color: var(--color-primary);\r\n box-shadow: none;\r\n}\r\n\r\n.styles-module__inputTextPswUser___0xWHh:disabled {\r\n background-color: var(--light-grey-color);\r\n border: var(--color-border);\r\n}\r\n\r\n.styles-module__inputTextPswUser___0xWHh::placeholder {\r\n font-weight: 587;\r\n color: var(--light-grey-color);\r\n}\r\n\r\n.styles-module__buttonTextPswUser___-UY3m {\r\n position: absolute;\r\n top: 50%;\r\n right: 15px;\r\n transform: translateY(-50%);\r\n cursor: pointer;\r\n background: none;\r\n border: none;\r\n padding: 0;\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.styles-module__buttonTextPswUser___-UY3m.styles-module__error___Uy-55 {\r\n top: 35%;\r\n}\r\n\r\n.styles-module__iconEye___MiJMN {\r\n width: 24px;\r\n height: 24px;\r\n color: var(--light-grey-color);\r\n}\r\n\r\n.styles-module__restrictionMessage___QA5v7 {\r\n color: var(--alert-color);\r\n font-size: 12px;\r\n font-weight: 700;\r\n line-height: 15px;\r\n text-align: left;\r\n margin-left: 8px;\r\n}\r\n\r\n.styles-module__iconWrapperLeft___mzyII {\r\n position: absolute;\r\n left: 8px;\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.styles-module__iconWrapperRight___-s-pG {\r\n position: absolute;\r\n right: 8px;\r\n display: flex;\r\n align-items: center;\r\n background: none;\r\n border: none;\r\n padding: 0;\r\n cursor: pointer;\r\n color: inherit;\r\n}\r\n\r\n#styles-module__inputwrapper___4UacS {\r\n height: 48px;\r\n padding: 14px 8px 14px 8px;\r\n}\r\n\r\n#styles-module__buttonDisplay___tNJLk {\r\n width: 100%;\r\n}\r\n\r\n.styles-module__errorRequired___YsP4q {\r\n font-size: 16px;\r\n font-weight: 700;\r\n line-height: 24px;\r\n text-align: left;\r\n color: var(--color-danger);\r\n}\r\n\r\n.styles-module__calendarWrapper___Txz5G:focus-within {\r\n border: 1px solid #1a95b0;\r\n box-shadow: 0 0 0 0.2rem #0091ea80;\r\n}\r\n\r\n.styles-module__textCalendar___0ZZB- {\r\n width: 100%;\r\n height: 48px;\r\n padding: 14px 8px;\r\n border: none;\r\n border-radius: 0;\r\n}\r\n\r\n.styles-module__calendarWrapper___Txz5G {\r\n display: inline-flex;\r\n align-items: center;\r\n border-radius: 8px;\r\n border: 1px solid var(--color-border);\r\n}\r\n\r\n.styles-module__calendarError___UUWT4 {\r\n border: 1px solid #cb0a0a;\r\n box-shadow: 0 0 0 2px rgba(203, 10, 10, 0.5);\r\n}\r\n\r\n.styles-module__calendarFocus___B899c {\r\n border: 1px solid #1a95b0;\r\n box-shadow: 0 0 0 0.2rem #0091ea80;\r\n}\r\n\r\n.styles-module__textCalendar___0ZZB- {\r\n width: 100%;\r\n height: 48px;\r\n padding: 14px 8px;\r\n border: none;\r\n border-radius: 0;\r\n}\r\n\r\n.p-calendar .p-inputtext,\r\n.p-calendar .p-button-icon-only {\r\n border: none !important;\r\n box-shadow: none !important;\r\n}\r\n\r\n.p-highlight {\r\n background-color: #005a921a;\r\n color: #005a92;\r\n}\r\n";
8864
+ var css_248z$f = ".styles-module__textInput___gaz7I {\r\n width: 100%;\r\n height: 48px;\r\n padding: 14px 8px 14px 8px;\r\n border-radius: 8px;\r\n gap: 4px;\r\n font-size: 13px;\r\n border: 1px solid var(--color-border);\r\n color: var(--color-dark-gray);\r\n outline: none;\r\n transition: all 0.5s;\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP {\r\n width: 100%;\r\n color: var(--color-input);\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP input {\r\n border-top-left-radius: 8px;\r\n border-bottom-left-radius: 8px;\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP .p-calendar-disabled {\r\n border-radius: 8px;\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP .p-calendar-disabled,\r\n.styles-module__inputContainer___fmTYP .p-button.p-disabled,\r\n.styles-module__inputContainer___fmTYP input:disabled {\r\n background-color: #eeeeee !important;\r\n cursor: not-allowed;\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP input::placeholder {\r\n font-weight: 700;\r\n color: var(--input-placeholder-color);\r\n font-size: var(--font-size-14, 14px);\r\n line-height: 24px;\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP .p-inputtext {\r\n border-color: var(--color-border);\r\n}\r\n\r\n.styles-module__inputContainer___fmTYP .p-button {\r\n line-height: 22px;\r\n border-color: var(--color-border);\r\n border-top-right-radius: 8px;\r\n border-bottom-right-radius: 8px;\r\n}\r\n\r\n.styles-module__iconWrapper___H3Icv {\r\n position: absolute;\r\n left: 8px;\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.styles-module__labelRequired___4ewKH::after {\r\n content: \" *\";\r\n color: var(--color-danger);\r\n}\r\n\r\n.styles-module__titleLabel___6M8ua {\r\n display: flex;\r\n align-items: center;\r\n margin-bottom: 5px;\r\n justify-content: space-between;\r\n}\r\n\r\n.styles-module__labelInput___wWffN {\r\n color: var(--color-label);\r\n line-height: 24px;\r\n font-size: 16px;\r\n bottom: 5px;\r\n font-weight: 700;\r\n}\r\n\r\n.styles-module__textInput___gaz7I:disabled {\r\n background: var(--background-color-table-primary);\r\n cursor: not-allowed;\r\n}\r\n\r\n.styles-module__textInput___gaz7I:focus {\r\n color: var(--color-gray-medium);\r\n outline: none;\r\n border: 1px solid var(--color-primary);\r\n box-shadow: 0px 0px 0px 2px var(--color-focus-outline);\r\n}\r\n\r\n.styles-module__textInput___gaz7I::placeholder {\r\n font-weight: bold;\r\n color: var(--color-input) 33;\r\n}\r\n\r\n.styles-module__textInputDanger___YqaWP {\r\n border: 1px solid var(--alert-color);\r\n box-shadow: 0px 0px 0px 2px var(--color-red-light);\r\n}\r\n\r\n.styles-module__password-input-container___o0AsP {\r\n position: relative;\r\n width: 360px;\r\n}\r\n\r\n.styles-module__inputTextPswUser___0xWHh:focus {\r\n border-color: var(--color-primary);\r\n box-shadow: none;\r\n}\r\n\r\n.styles-module__inputTextPswUser___0xWHh:disabled {\r\n background-color: var(--light-grey-color);\r\n border: var(--color-border);\r\n}\r\n\r\n.styles-module__inputTextPswUser___0xWHh::placeholder {\r\n font-weight: 587;\r\n color: var(--light-grey-color);\r\n}\r\n\r\n.styles-module__buttonTextPswUser___-UY3m {\r\n position: absolute;\r\n top: 50%;\r\n right: 15px;\r\n transform: translateY(-50%);\r\n cursor: pointer;\r\n background: none;\r\n border: none;\r\n padding: 0;\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.styles-module__buttonTextPswUser___-UY3m.styles-module__error___Uy-55 {\r\n top: 35%;\r\n}\r\n\r\n.styles-module__iconEye___MiJMN {\r\n width: 24px;\r\n height: 24px;\r\n color: var(--light-grey-color);\r\n}\r\n\r\n.styles-module__restrictionMessage___QA5v7 {\r\n color: var(--alert-color);\r\n font-size: var(--font-size-12, 12px);\r\n font-weight: 700;\r\n line-height: 15px;\r\n text-align: left;\r\n margin-left: 8px;\r\n font-family: var(--font-open-sans-serif);\r\n}\r\n\r\n.styles-module__iconWrapperLeft___mzyII {\r\n position: absolute;\r\n left: 8px;\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.styles-module__iconWrapperRight___-s-pG {\r\n position: absolute;\r\n right: 8px;\r\n display: flex;\r\n align-items: center;\r\n background: none;\r\n border: none;\r\n padding: 0;\r\n cursor: pointer;\r\n color: inherit;\r\n}\r\n\r\n#styles-module__inputwrapper___4UacS {\r\n height: 48px;\r\n padding: 14px 8px 14px 8px;\r\n}\r\n\r\n#styles-module__buttonDisplay___tNJLk {\r\n width: 100%;\r\n}\r\n\r\n.styles-module__errorRequired___YsP4q {\r\n font-size: 16px;\r\n font-weight: 700;\r\n line-height: 24px;\r\n text-align: left;\r\n color: var(--color-danger);\r\n}\r\n\r\n.styles-module__calendarWrapper___Txz5G:focus-within {\r\n border: 1px solid #1a95b0;\r\n box-shadow: 0 0 0 0.2rem #0091ea80;\r\n}\r\n\r\n.styles-module__textCalendar___0ZZB- {\r\n width: 100%;\r\n height: 48px;\r\n padding: 14px 8px;\r\n border: none;\r\n border-radius: 0;\r\n}\r\n\r\n.styles-module__calendarWrapper___Txz5G {\r\n display: inline-flex;\r\n align-items: center;\r\n border-radius: 8px;\r\n border: 1px solid var(--color-border);\r\n}\r\n\r\n.styles-module__calendarError___UUWT4 {\r\n border: 1px solid #cb0a0a;\r\n box-shadow: 0 0 0 2px rgba(203, 10, 10, 0.5);\r\n}\r\n\r\n.styles-module__calendarFocus___B899c {\r\n border: 1px solid #1a95b0;\r\n box-shadow: 0 0 0 0.2rem #0091ea80;\r\n}\r\n\r\n.styles-module__textCalendar___0ZZB- {\r\n width: 100%;\r\n height: 48px;\r\n padding: 14px 8px;\r\n border: none;\r\n border-radius: 0;\r\n}\r\n\r\n.p-calendar .p-inputtext,\r\n.p-calendar .p-button-icon-only {\r\n border: none !important;\r\n box-shadow: none !important;\r\n}\r\n\r\n.p-highlight {\r\n background-color: #005a921a;\r\n color: #005a92;\r\n}\r\n";
8857
8865
  var styles$f = {"textInput":"styles-module__textInput___gaz7I","inputContainer":"styles-module__inputContainer___fmTYP","iconWrapper":"styles-module__iconWrapper___H3Icv","labelRequired":"styles-module__labelRequired___4ewKH","titleLabel":"styles-module__titleLabel___6M8ua","labelInput":"styles-module__labelInput___wWffN","textInputDanger":"styles-module__textInputDanger___YqaWP","password-input-container":"styles-module__password-input-container___o0AsP","inputTextPswUser":"styles-module__inputTextPswUser___0xWHh","buttonTextPswUser":"styles-module__buttonTextPswUser___-UY3m","error":"styles-module__error___Uy-55","iconEye":"styles-module__iconEye___MiJMN","restrictionMessage":"styles-module__restrictionMessage___QA5v7","iconWrapperLeft":"styles-module__iconWrapperLeft___mzyII","iconWrapperRight":"styles-module__iconWrapperRight___-s-pG","inputwrapper":"styles-module__inputwrapper___4UacS","buttonDisplay":"styles-module__buttonDisplay___tNJLk","errorRequired":"styles-module__errorRequired___YsP4q","calendarWrapper":"styles-module__calendarWrapper___Txz5G","textCalendar":"styles-module__textCalendar___0ZZB-","calendarError":"styles-module__calendarError___UUWT4","calendarFocus":"styles-module__calendarFocus___B899c"};
8858
8866
  styleInject(css_248z$f);
8859
8867