formica-ui-lib 1.0.96 → 1.0.97

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,8 +1,12 @@
1
- export interface BrandLink {
1
+ export type BrandNavItem = {
2
2
  label: string;
3
3
  href: string;
4
- }
5
- export interface BrandNavBarProps {
6
- brands: BrandLink[];
7
- showProPortalSelector: boolean;
8
- }
4
+ };
5
+ export type CustomerTypeOption = "Commercial" | "Residential";
6
+ export type BrandNavBarProps = {
7
+ brands?: BrandNavItem[];
8
+ showProPortalSelector?: boolean;
9
+ selectedCustomerType?: CustomerTypeOption;
10
+ onBrandClick?: (brand: BrandNavItem) => void;
11
+ onCustomerTypeChange?: (value: CustomerTypeOption) => void;
12
+ };
@@ -0,0 +1,11 @@
1
+ import type { Country, Login, TopNavCartSummary } from "./TopNavBarProps";
2
+ export type TopNavActionsProps = {
3
+ Countries?: Country[];
4
+ Login: Login;
5
+ Cart?: TopNavCartSummary;
6
+ onSearchClick?: () => void;
7
+ onCartClick?: () => void;
8
+ onLoginClick?: () => void;
9
+ onFavoritesClick?: () => void;
10
+ onCountrySelect?: (country: Country) => void;
11
+ };
@@ -1,35 +1,47 @@
1
- import { Country } from "../../molecules/selectors/countryselector/CountrySelectorProps";
2
- export type NavLink = {
1
+ export type Country = {
3
2
  label: string;
3
+ locale: string;
4
4
  href: string;
5
5
  };
6
- export type SubCategory = {
6
+ export type Login = {
7
7
  label: string;
8
- items: NavLink[];
8
+ href: string;
9
+ };
10
+ export type TopNavCartSummary = {
11
+ hasCart: boolean;
12
+ itemCount: number;
13
+ };
14
+ export type NavLinkItem = {
15
+ label: string;
16
+ href: string;
9
17
  };
10
- export type Promo = {
11
- imageSrc: string;
12
- imageAlt: string;
18
+ export type NavSubcategory = {
19
+ label: string;
20
+ items: NavLinkItem[];
21
+ };
22
+ export type NavPromo = {
23
+ imageSrc?: string;
24
+ imageAlt?: string;
13
25
  label?: string;
14
26
  href?: string;
15
27
  };
16
28
  export type NavItem = {
17
29
  label: string;
18
- subcategories: SubCategory[];
19
- promo?: Promo;
20
- };
21
- type TopNavCartSummary = {
22
- hasCart: boolean;
23
- itemCount: number;
30
+ href?: string;
31
+ subcategories?: NavSubcategory[];
32
+ promo?: NavPromo;
24
33
  };
25
34
  export type TopNavBarProps = {
26
35
  NavMenuWithSubItems?: NavItem[];
27
36
  Countries?: Country[];
28
- Login: {
29
- label: string;
30
- href: string;
31
- };
37
+ Login: Login;
32
38
  Cart?: TopNavCartSummary;
33
- onNavigate?: (href: string) => void;
39
+ onNavItemClick?: (item: NavItem) => void;
40
+ onMegaMenuLinkClick?: (link: NavLinkItem) => void;
41
+ onPromoClick?: (promo: NavPromo) => void;
42
+ onSearchClick?: () => void;
43
+ onCartClick?: () => void;
44
+ onLoginClick?: () => void;
45
+ onFavoritesClick?: () => void;
46
+ onCountrySelect?: (country: Country) => void;
34
47
  };
35
- export {};
@@ -0,0 +1,8 @@
1
+ import type { NavItem, NavLinkItem, NavPromo } from "./TopNavBarProps";
2
+ export type TopNavMegaMenuProps = {
3
+ activeItem?: NavItem;
4
+ openSubcategory: string | null;
5
+ setOpenSubcategory: (label: string | null) => void;
6
+ onMegaMenuLinkClick?: (link: NavLinkItem) => void;
7
+ onPromoClick?: (promo: NavPromo) => void;
8
+ };