formica-ui-lib 1.0.95 → 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.
- package/dist/componentProps/organisms/cart/ordersummarysection/OrderSummarySectionLeftPanelProps.d.ts +2 -0
- package/dist/componentProps/organisms/navigation/BrandNavBarProps.d.ts +10 -6
- package/dist/componentProps/organisms/navigation/TopNavActionsProps.d.ts +11 -0
- package/dist/componentProps/organisms/navigation/TopNavBarProps.d.ts +31 -19
- package/dist/componentProps/organisms/navigation/TopNavMegaMenuProps.d.ts +8 -0
- package/dist/index.cjs +7 -7
- package/dist/index.js +726 -686
- package/dist/stories/organisms/navigation/TopNavBar/TopNavBar.d.ts +1 -1
- package/dist/stories/organisms/navigation/TopNavBar/parts/TopNavActions.d.ts +1 -21
- package/dist/stories/organisms/navigation/TopNavBar/parts/TopNavMegaMenu.d.ts +1 -6
- package/package.json +1 -1
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type BrandNavItem = {
|
|
2
2
|
label: string;
|
|
3
3
|
href: string;
|
|
4
|
-
}
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
2
|
-
export type NavLink = {
|
|
1
|
+
export type Country = {
|
|
3
2
|
label: string;
|
|
3
|
+
locale: string;
|
|
4
4
|
href: string;
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type Login = {
|
|
7
7
|
label: string;
|
|
8
|
-
|
|
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
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
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
|
+
};
|