@foris/avocado-suite 1.2.0 → 1.3.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.
@@ -18,5 +18,5 @@ export interface AccessPanelProps {
18
18
  recentProducts?: AccessPanelProduct[];
19
19
  customProducts?: AccessPanelProduct[];
20
20
  }
21
- declare const AccessPanel: ({ className, isOpen, title, productsTitle, recentProductsTitle, customProductsTitle, activePillText, products, recentProducts, customProducts, }: AccessPanelProps) => JSX.Element | null;
21
+ declare const AccessPanel: ({ className, isOpen, title, productsTitle, recentProductsTitle, customProductsTitle, activePillText, products, recentProducts, customProducts, }: AccessPanelProps) => JSX.Element;
22
22
  export default AccessPanel;
@@ -3,6 +3,7 @@ import { AccountDetailsProps } from './components/account-details/AccountDetails
3
3
  import { MenuLocaleDropdownProps } from './components/menu-locale-dropdown/MenuLocaleDropdown';
4
4
  import { SwitchThemeProps } from '../switch-theme/SwitchTheme';
5
5
  export interface AccountMenuProps {
6
+ className?: string;
6
7
  accountDetails?: AccountDetailsProps;
7
8
  localeProps?: MenuLocaleDropdownProps & {
8
9
  showLocale?: boolean;
@@ -7,6 +7,8 @@ export interface ButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAtt
7
7
  children: React.ReactNode | string;
8
8
  /** Overwrite className */
9
9
  className?: string;
10
+ /** Force light mode styles even in dark mode */
11
+ forceLightMode?: boolean;
10
12
  /** Show icon on the left */
11
13
  leftIcon?: IconTypes;
12
14
  /** Loading state */
@@ -0,0 +1,27 @@
1
+ import { FC } from 'react';
2
+ import { AccountDetailsProps } from '../account-menu/components/account-details/AccountDetails';
3
+ import { AccessPanelProps } from '../access-panel/AccessPanel';
4
+ import { LogoProps } from './components/logo/Logo';
5
+ export interface HeaderProps {
6
+ isSticky?: boolean;
7
+ classNames?: {
8
+ header?: string;
9
+ leftContent?: string;
10
+ middleContent?: string;
11
+ rightContent?: string;
12
+ };
13
+ logoProps?: LogoProps;
14
+ accountMenuProps?: {
15
+ accountDetails?: AccountDetailsProps;
16
+ showThemeSwitch?: boolean;
17
+ showLocaleSelector?: boolean;
18
+ onLogout?: () => void;
19
+ };
20
+ accessPanelProps?: Omit<AccessPanelProps, 'isOpen' | 'className'>;
21
+ customContent?: React.ReactNode;
22
+ hasSidebarMenu?: boolean;
23
+ sidebarMenuContent?: React.ReactNode;
24
+ sidebarHeightGap?: number;
25
+ }
26
+ declare const Header: FC<HeaderProps>;
27
+ export default Header;
@@ -0,0 +1,15 @@
1
+ import { FC } from 'react';
2
+ export interface LogoProps {
3
+ alt?: string;
4
+ desktop: {
5
+ src: string;
6
+ srcDark?: string;
7
+ };
8
+ mobile?: {
9
+ src: string;
10
+ srcDark?: string;
11
+ };
12
+ onClick?: () => void;
13
+ }
14
+ declare const Logo: FC<LogoProps>;
15
+ export default Logo;
@@ -0,0 +1,2 @@
1
+ import Logo from './Logo';
2
+ export default Logo;
@@ -8,6 +8,8 @@ interface MenuProps {
8
8
  closeOnClick?: boolean;
9
9
  /** Control if you want to close the list after clicking one of the options or not */
10
10
  disabled?: boolean;
11
+ /** Force light mode styles even in dark mode */
12
+ forceLightMode?: boolean;
11
13
  /** List of the items to render when the menu is open */
12
14
  items: MenuItem[];
13
15
  /** From where to start to render the list */
@@ -6,6 +6,8 @@ export interface RoundButtonProps extends Partial<React.DetailedHTMLProps<React.
6
6
  className?: string;
7
7
  /** Disabled state */
8
8
  disabled?: boolean;
9
+ /** Force light mode styles even in dark mode */
10
+ forceLightMode?: boolean;
9
11
  /** Icon name */
10
12
  icon: IconTypes;
11
13
  /** Loading state */
@@ -1,7 +1,8 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  interface UseClickOutsideProps {
3
3
  ref?: React.MutableRefObject<any>;
4
+ shouldIgnore?: boolean;
4
5
  onClickOutside?: () => void;
5
6
  }
6
- export declare const useClickOutside: ({ ref, onClickOutside }: UseClickOutsideProps) => void;
7
+ export declare const useClickOutside: ({ ref, shouldIgnore, onClickOutside, }: UseClickOutsideProps) => void;
7
8
  export {};
package/dist/index.d.ts CHANGED
@@ -54,8 +54,9 @@ import Banner from './components/banner';
54
54
  import SidebarMenu from './components/sidebar-menu/SidebarMenu';
55
55
  import AccessPanel from './components/access-panel/AccessPanel';
56
56
  import AccountMenu from './components/account-menu/AccountMenu';
57
+ import Header from './components/header/Header';
57
58
  import { toast } from 'react-toastify';
58
- export { Banner, Drawer, AccessPanel, AccountMenu, SidebarMenu, Weekly, WeeklyGroup, Accordion, Box, Breadcrumbs, Button, Card, CardAccordion, CardNotification, Checkbox, DataCard, DataTable, DatePicker, Divider, Donut, DonutLabels, DonutLegend, DropdownButton, Heading, Link, Loading, Menu, Modal, Pager, Pill, PreviewerMarkdown, Processing, ProgressBar, RadioButton, RoundButton, Select, SelectPagination, SkeletonBase, SkeletonCircle, Stepper, Switch, Tabs, Tag, Text, TextField, Textarea, ThemeProvider, ThemeStore, LocaleStore, Timer, Toaster, Tooltip, Table, toast, };
59
+ export { Banner, Header, Drawer, AccessPanel, AccountMenu, SidebarMenu, Weekly, WeeklyGroup, Accordion, Box, Breadcrumbs, Button, Card, CardAccordion, CardNotification, Checkbox, DataCard, DataTable, DatePicker, Divider, Donut, DonutLabels, DonutLegend, DropdownButton, Heading, Link, Loading, Menu, Modal, Pager, Pill, PreviewerMarkdown, Processing, ProgressBar, RadioButton, RoundButton, Select, SelectPagination, SkeletonBase, SkeletonCircle, Stepper, Switch, Tabs, Tag, Text, TextField, Textarea, ThemeProvider, ThemeStore, LocaleStore, Timer, Toaster, Tooltip, Table, toast, };
59
60
  /**
60
61
  * Types
61
62
  */