@pagamio/frontend-commons-lib 0.8.187 → 0.8.188

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.
@@ -16,9 +16,8 @@ interface EnvironmentBannerProps {
16
16
  show?: boolean;
17
17
  /**
18
18
  * Text to display in the banner
19
- * @default ''
20
19
  */
21
- text?: string;
20
+ text: string;
22
21
  /**
23
22
  * Background color of the banner
24
23
  * @default 'red'
@@ -103,4 +102,4 @@ declare const AppUserDropdown: React.MemoExoticComponent<({ onLogout, onSelectCh
103
102
  declare const AppDashboardNavbar: React.FC<AppDashboardNavbarProps>;
104
103
  export default AppDashboardNavbar;
105
104
  export { AppSidebarToggleButton, AppDarkThemeToggleWithTooltip, AppUserDropdown, AppDashboardNavbar };
106
- export type { AppDashboardNavbarProps, AppUserDropdownProps };
105
+ export type { AppDashboardNavbarProps, AppUserDropdownProps, EnvironmentBannerProps };
@@ -30,7 +30,7 @@ const AppUserDropdown = React.memo(({ onLogout, onSelectChangePassword, onSelect
30
30
  }, [logout, onLogout]);
31
31
  return (_jsxs(Dropdown, { className: "rounded", arrowIcon: false, inline: true, label: _jsxs("span", { className: navbarTextColors.general, children: [_jsx("span", { className: "sr-only", children: user?.userName }), _jsx(Avatar, { rounded: true, size: "sm", placeholderInitials: initials })] }), children: [_jsx(Dropdown.Header, { className: "px-4 py-3", children: _jsx("span", { className: "block text-sm font-medium capitalize text-primary-500", children: user?.userName }) }), _jsx(Dropdown.Item, { onClick: () => onSelectProfile(), children: _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(HiUser, { className: "text-gray-500", size: 18 }), _jsx("span", { children: tLib('userProfile', 'User Profile') })] }) }), _jsx(Dropdown.Item, { onClick: () => onSelectChangePassword?.(), children: _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(HiLockClosed, { className: "text-gray-500", size: 18 }), _jsx("span", { children: tLib('changePassword', 'Change Password') })] }) }), _jsx(Dropdown.Divider, {}), _jsx(Dropdown.Item, { onClick: handleLogout, children: _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(HiLogout, { className: "text-gray-500", size: 18 }), _jsx("span", { children: tLib('signOut', 'Sign Out') })] }) })] }));
32
32
  });
33
- const EnvironmentBanner = ({ show = false, text = 'UAT', bgColor = 'red', color = 'black', }) => {
33
+ const EnvironmentBanner = ({ show = false, text, bgColor = 'red', color = 'black', }) => {
34
34
  if (!show)
35
35
  return null;
36
36
  return (_jsx("div", { className: "fixed top-0 right-10 z-[110]", style: {
@@ -47,7 +47,7 @@ const EnvironmentBanner = ({ show = false, text = 'UAT', bgColor = 'red', color
47
47
  letterSpacing: '0.1em',
48
48
  }, children: text }) }) }));
49
49
  };
50
- const AppDashboardNavbar = ({ dashboardLink = '/dashboard', brandImage, linkComponent, showThemeToggler = true, appLabel, onSelectChangePassword, onSelectProfile, onLogout, hideSidebarToggle = false, navBarActionComponents = [], showLocaleSwitcher = false, localeNames, environmentBanner = { show: false }, navbarBackground = { light: 'bg-purple', dark: 'dark:bg-gray-800' }, navbarTextColors = { brand: 'text-white', general: 'text-white' }, }) => {
50
+ const AppDashboardNavbar = ({ dashboardLink = '/dashboard', brandImage, linkComponent, showThemeToggler = true, appLabel, onSelectChangePassword, onSelectProfile, onLogout, hideSidebarToggle = false, navBarActionComponents = [], showLocaleSwitcher = false, localeNames, environmentBanner = { show: false, text: '' }, navbarBackground = { light: 'bg-purple', dark: 'dark:bg-gray-800' }, navbarTextColors = { brand: 'text-white', general: 'text-white' }, }) => {
51
51
  const sidebar = useAppSidebarContext();
52
52
  const { isMd } = useMediaQueries();
53
53
  const { t } = useTranslation();
@@ -1,4 +1,4 @@
1
- export { default as AppDashboardNavbar, type AppDashboardNavbarProps, AppDarkThemeToggleWithTooltip, AppSidebarToggleButton, AppUserDropdown, } from './Navbar';
1
+ export { default as AppDashboardNavbar, type AppDashboardNavbarProps, type EnvironmentBannerProps, AppDarkThemeToggleWithTooltip, AppSidebarToggleButton, AppUserDropdown, } from './Navbar';
2
2
  export { default as AuthPageLayout } from './AuthPageLayout';
3
3
  export { default as AppBreadcrumbNav } from './BreadcrumbNav';
4
4
  export { default as AppLayoutContent } from './LayoutContent';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pagamio/frontend-commons-lib",
3
3
  "description": "Pagamio library for Frontend reusable components like the form engine and table container",
4
- "version": "0.8.187",
4
+ "version": "0.8.188",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "provenance": false