@caseparts-org/caseblocks 0.0.11 → 0.0.15
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/assets/Account.css +1 -1
- package/dist/assets/Avatar.css +1 -1
- package/dist/assets/Cart.css +1 -0
- package/dist/assets/HamburgerMenu.css +1 -0
- package/dist/assets/Icon.css +1 -1
- package/dist/assets/MainNav.css +1 -1
- package/dist/assets/Root.css +1 -1
- package/dist/assets/SearchBox.css +1 -1
- package/dist/assets/Tooltip.css +1 -0
- package/dist/atoms/Icon/Icon.js +17 -17
- package/dist/atoms/Input/Input.d.ts +1 -1
- package/dist/atoms/Input/Input.js +12 -10
- package/dist/atoms/Input/Input.stories.d.ts +1 -2
- package/dist/molecules/Account/Account.d.ts +3 -0
- package/dist/molecules/Account/Account.js +56 -33
- package/dist/molecules/Account/Account.stories.js +12 -5
- package/dist/molecules/Avatar/Avatar.d.ts +2 -1
- package/dist/molecules/Avatar/Avatar.js +26 -24
- package/dist/molecules/Avatar/Avatar.stories.js +4 -1
- package/dist/molecules/Cart/Cart.d.ts +7 -0
- package/dist/molecules/Cart/Cart.js +23 -0
- package/dist/molecules/Cart/Cart.stories.d.ts +14 -0
- package/dist/molecules/Cart/Cart.stories.js +24 -0
- package/dist/molecules/HamburgerMenu/HamburgerMenu.d.ts +7 -0
- package/dist/molecules/HamburgerMenu/HamburgerMenu.js +63 -0
- package/dist/molecules/Logo/Logo.js +13 -44
- package/dist/molecules/SearchBox/SearchBox.js +16 -16
- package/dist/molecules/Tooltip/Tooltip.d.ts +11 -0
- package/dist/molecules/Tooltip/Tooltip.js +19417 -0
- package/dist/molecules/Tooltip/Tooltip.stories.d.ts +46 -0
- package/dist/molecules/Tooltip/Tooltip.stories.js +142 -0
- package/dist/organisms/MainNav/MainNav.d.ts +19 -1
- package/dist/organisms/MainNav/MainNav.js +118 -95
- package/dist/organisms/MainNav/MainNav.stories.d.ts +2 -1
- package/dist/organisms/MainNav/MainNav.stories.js +134 -11
- package/dist/styles/tokens.css +1 -0
- package/package.json +4 -2
- package/dist/assets/Logo.css +0 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Tooltip } from './Tooltip';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import('react').FC<import('./Tooltip').TooltipProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
position: {
|
|
12
|
+
control: "select";
|
|
13
|
+
options: string[];
|
|
14
|
+
};
|
|
15
|
+
mouseEnterDelay: {
|
|
16
|
+
control: "number";
|
|
17
|
+
};
|
|
18
|
+
mouseLeaveDelay: {
|
|
19
|
+
control: "number";
|
|
20
|
+
};
|
|
21
|
+
arrow: {
|
|
22
|
+
control: "boolean";
|
|
23
|
+
};
|
|
24
|
+
className: {
|
|
25
|
+
table: {
|
|
26
|
+
disable: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
tooltipClassName: {
|
|
30
|
+
table: {
|
|
31
|
+
disable: true;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
contentClassName: {
|
|
35
|
+
table: {
|
|
36
|
+
disable: true;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export default meta;
|
|
42
|
+
type Story = StoryObj<typeof Tooltip>;
|
|
43
|
+
export declare const OnHover: Story;
|
|
44
|
+
export declare const OnClick: Story;
|
|
45
|
+
export declare const PositionRight: Story;
|
|
46
|
+
export declare const PositionLeft: Story;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip as t } from "./Tooltip.js";
|
|
3
|
+
import { Button as o } from "../../atoms/Button/Button.js";
|
|
4
|
+
const s = {
|
|
5
|
+
title: "Case Parts/Molecules/Tooltip",
|
|
6
|
+
component: t,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered"
|
|
9
|
+
},
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
argTypes: {
|
|
12
|
+
position: {
|
|
13
|
+
control: "select",
|
|
14
|
+
options: [
|
|
15
|
+
"top left",
|
|
16
|
+
"top center",
|
|
17
|
+
"top right",
|
|
18
|
+
"right top",
|
|
19
|
+
"right center",
|
|
20
|
+
"right bottom",
|
|
21
|
+
"bottom left",
|
|
22
|
+
"bottom center",
|
|
23
|
+
"bottom right",
|
|
24
|
+
"left top",
|
|
25
|
+
"left center",
|
|
26
|
+
"left bottom",
|
|
27
|
+
"center center"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
mouseEnterDelay: { control: "number" },
|
|
31
|
+
mouseLeaveDelay: { control: "number" },
|
|
32
|
+
arrow: { control: "boolean" },
|
|
33
|
+
className: { table: { disable: !0 } },
|
|
34
|
+
tooltipClassName: { table: { disable: !0 } },
|
|
35
|
+
contentClassName: { table: { disable: !0 } }
|
|
36
|
+
}
|
|
37
|
+
}, c = {
|
|
38
|
+
args: {
|
|
39
|
+
position: "top center",
|
|
40
|
+
arrow: !0,
|
|
41
|
+
mouseEnterDelay: 0,
|
|
42
|
+
mouseLeaveDelay: 0
|
|
43
|
+
},
|
|
44
|
+
render: (r) => /* @__PURE__ */ e(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
style: {
|
|
48
|
+
height: "10vh",
|
|
49
|
+
width: "100%",
|
|
50
|
+
display: "flex",
|
|
51
|
+
flexDirection: "row",
|
|
52
|
+
alignItems: "center",
|
|
53
|
+
justifyContent: "center"
|
|
54
|
+
},
|
|
55
|
+
children: /* @__PURE__ */ e(
|
|
56
|
+
t,
|
|
57
|
+
{
|
|
58
|
+
trigger: /* @__PURE__ */ e("div", { className: "tooltip-story", children: /* @__PURE__ */ e(o, { size: "md", variant: "primary", children: "Hover me" }) }),
|
|
59
|
+
on: "hover",
|
|
60
|
+
...r,
|
|
61
|
+
children: "This tooltip appears on hover (top center)."
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
}, a = {
|
|
67
|
+
render: () => /* @__PURE__ */ e(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
style: {
|
|
71
|
+
height: "10vh",
|
|
72
|
+
width: "100%",
|
|
73
|
+
display: "flex",
|
|
74
|
+
flexDirection: "row",
|
|
75
|
+
alignItems: "center",
|
|
76
|
+
justifyContent: "center"
|
|
77
|
+
},
|
|
78
|
+
children: /* @__PURE__ */ e(
|
|
79
|
+
t,
|
|
80
|
+
{
|
|
81
|
+
trigger: /* @__PURE__ */ e("div", { className: "tooltip-story", children: /* @__PURE__ */ e(o, { size: "md", variant: "secondary", children: "Click me" }) }),
|
|
82
|
+
on: "click",
|
|
83
|
+
position: "bottom center",
|
|
84
|
+
children: "This tooltip appears on click (bottom center)."
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
}, h = {
|
|
90
|
+
render: () => /* @__PURE__ */ e(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
style: {
|
|
94
|
+
height: "10vh",
|
|
95
|
+
width: "100%",
|
|
96
|
+
display: "flex",
|
|
97
|
+
flexDirection: "row",
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
justifyContent: "center"
|
|
100
|
+
},
|
|
101
|
+
children: /* @__PURE__ */ e(
|
|
102
|
+
t,
|
|
103
|
+
{
|
|
104
|
+
trigger: /* @__PURE__ */ e("div", { className: "tooltip-story", children: /* @__PURE__ */ e(o, { size: "md", variant: "cta-primary", children: "Hover right" }) }),
|
|
105
|
+
on: "hover",
|
|
106
|
+
position: "right center",
|
|
107
|
+
children: "Tooltip on the right."
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
}, d = {
|
|
113
|
+
render: () => /* @__PURE__ */ e(
|
|
114
|
+
"div",
|
|
115
|
+
{
|
|
116
|
+
style: {
|
|
117
|
+
height: "10vh",
|
|
118
|
+
width: "100%",
|
|
119
|
+
display: "flex",
|
|
120
|
+
flexDirection: "row",
|
|
121
|
+
alignItems: "center",
|
|
122
|
+
justifyContent: "center"
|
|
123
|
+
},
|
|
124
|
+
children: /* @__PURE__ */ e(
|
|
125
|
+
t,
|
|
126
|
+
{
|
|
127
|
+
trigger: /* @__PURE__ */ e("div", { className: "tooltip-story", children: /* @__PURE__ */ e(o, { size: "md", variant: "tertiary", children: "Hover left" }) }),
|
|
128
|
+
on: "hover",
|
|
129
|
+
position: "left center",
|
|
130
|
+
children: "Tooltip on the left."
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
};
|
|
136
|
+
export {
|
|
137
|
+
a as OnClick,
|
|
138
|
+
c as OnHover,
|
|
139
|
+
d as PositionLeft,
|
|
140
|
+
h as PositionRight,
|
|
141
|
+
s as default
|
|
142
|
+
};
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import { AccountProps } from '../../molecules/Account/Account';
|
|
2
2
|
export interface MainNavProps extends React.HTMLAttributes<HTMLDivElement>, Pick<AccountProps, "account"> {
|
|
3
|
+
categories?: MainCategory[];
|
|
4
|
+
faqRoute: string;
|
|
5
|
+
customPartsRoute: string;
|
|
6
|
+
aboutUsRoute: string;
|
|
7
|
+
accountRoute: string;
|
|
8
|
+
contactRoute: string;
|
|
9
|
+
cartItemCount: number;
|
|
10
|
+
onLoginClick: () => void;
|
|
11
|
+
onCartClick: () => void;
|
|
3
12
|
}
|
|
4
|
-
export
|
|
13
|
+
export interface Category {
|
|
14
|
+
id: string | number;
|
|
15
|
+
label: string;
|
|
16
|
+
route: string;
|
|
17
|
+
}
|
|
18
|
+
export interface MainCategory extends Category {
|
|
19
|
+
children: Category[];
|
|
20
|
+
showChevron?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function MainNav({ account, categories, faqRoute, customPartsRoute, aboutUsRoute, accountRoute, contactRoute, cartItemCount, onLoginClick, onCartClick, }: MainNavProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,103 +1,126 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { Flex as t } from "../../atoms/Flex/Flex.js";
|
|
4
|
-
import { Text as r } from "../../atoms/Text/Text.js";
|
|
5
|
-
import { Logo as m } from "../../molecules/Logo/Logo.js";
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Text as l } from "../../atoms/Text/Text.js";
|
|
6
3
|
import { Link as a } from "../../atoms/Link/Link.js";
|
|
7
|
-
import { Icon as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
4
|
+
import { Icon as p } from "../../atoms/Icon/Icon.js";
|
|
5
|
+
import { Flex as s } from "../../atoms/Flex/Flex.js";
|
|
6
|
+
import { Grid as v, Column as x } from "../../atoms/Grid/Grid.js";
|
|
7
|
+
import { Logo as L } from "../../molecules/Logo/Logo.js";
|
|
8
|
+
import { SearchBox as u } from "../../molecules/SearchBox/SearchBox.js";
|
|
9
|
+
import { HamburgerMenu as w } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
|
|
10
|
+
import { Cart as C } from "../../molecules/Cart/Cart.js";
|
|
11
|
+
import { Tooltip as k } from "../../molecules/Tooltip/Tooltip.js";
|
|
12
|
+
import { Account as y } from "../../molecules/Account/Account.js";
|
|
13
|
+
import { getHideAtStyles as z } from "../../atoms/HideAt.js";
|
|
14
|
+
import { c as T } from "../../clsx-OuTLNxxd.js";
|
|
15
|
+
import '../../assets/MainNav.css';const j = "_topNav_c5ei0_1", D = "_operations_c5ei0_9", F = "_search_c5ei0_16", I = "_siteLink_c5ei0_19", U = "_accountArea_c5ei0_23", H = "_cart_c5ei0_29", K = "_categories_c5ei0_36", M = "_category_c5ei0_50", Q = "_submenuTooltip_c5ei0_72", S = "_menuList_c5ei0_79", i = {
|
|
16
|
+
topNav: j,
|
|
17
|
+
operations: D,
|
|
18
|
+
search: F,
|
|
19
|
+
siteLink: I,
|
|
20
|
+
accountArea: U,
|
|
21
|
+
cart: H,
|
|
22
|
+
categories: K,
|
|
23
|
+
category: M,
|
|
24
|
+
submenuTooltip: Q,
|
|
25
|
+
menuList: S
|
|
20
26
|
};
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
27
|
+
function ee({
|
|
28
|
+
account: m,
|
|
29
|
+
categories: n,
|
|
30
|
+
faqRoute: c,
|
|
31
|
+
customPartsRoute: h,
|
|
32
|
+
aboutUsRoute: _,
|
|
33
|
+
accountRoute: N,
|
|
34
|
+
contactRoute: d,
|
|
35
|
+
cartItemCount: g = 0,
|
|
36
|
+
onLoginClick: A,
|
|
37
|
+
onCartClick: b
|
|
38
|
+
// chat,
|
|
39
|
+
}) {
|
|
40
|
+
return /* @__PURE__ */ e(v, { children: /* @__PURE__ */ o(x, { span: 12, children: [
|
|
41
|
+
/* @__PURE__ */ o(
|
|
42
|
+
s,
|
|
43
|
+
{
|
|
44
|
+
flexDirection: "row",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
justifyContent: "space-between",
|
|
47
|
+
className: i.topNav,
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ e("div", { className: i.logo, children: /* @__PURE__ */ e(L, {}) }),
|
|
50
|
+
/* @__PURE__ */ o(
|
|
51
|
+
s,
|
|
52
|
+
{
|
|
53
|
+
flexDirection: "row",
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
justifyContent: "flex-end",
|
|
56
|
+
className: i.operations,
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ e(s, { flexDirection: "row", hideAt: ["sm"], className: i.search, children: /* @__PURE__ */ e(u, { action: "/search" }) }),
|
|
59
|
+
/* @__PURE__ */ e(t, { href: h, hideAt: ["sm", "md"], children: "Custom Parts" }),
|
|
60
|
+
/* @__PURE__ */ e(t, { href: c, hideAt: ["sm", "md"], children: "FAQ" }),
|
|
61
|
+
/* @__PURE__ */ e(t, { href: d, hideAt: ["sm", "md"], children: "Contact Us" }),
|
|
62
|
+
/* @__PURE__ */ e("div", { className: i.accountArea, children: /* @__PURE__ */ e(
|
|
63
|
+
y,
|
|
64
|
+
{
|
|
65
|
+
account: m,
|
|
66
|
+
accountRoute: N,
|
|
67
|
+
onLoginClick: A,
|
|
68
|
+
className: i.avatar
|
|
69
|
+
}
|
|
70
|
+
) }),
|
|
71
|
+
/* @__PURE__ */ e(C, { onClick: b, cartItemCount: g }),
|
|
72
|
+
/* @__PURE__ */ e(w, { hideAt: ["lg"], children: /* @__PURE__ */ o("ul", { className: i.menuList, children: [
|
|
73
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(t, { href: h, children: "Custom Parts" }) }),
|
|
74
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(t, { href: c, children: "FAQ" }) }),
|
|
75
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(t, { href: d, children: "Contact Us" }) }),
|
|
76
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(t, { href: _, children: "About Us" }) }),
|
|
77
|
+
n && n.map((r) => /* @__PURE__ */ e("li", { className: i.category, children: /* @__PURE__ */ o(a, { href: r.route, children: [
|
|
78
|
+
/* @__PURE__ */ e(l, { size: "sm", weight: "semibold", children: r.label }),
|
|
55
79
|
/* @__PURE__ */ e(
|
|
56
|
-
|
|
57
|
-
{
|
|
58
|
-
iconKey: "fa-kit fa-chat",
|
|
59
|
-
className: n.chatIcon,
|
|
60
|
-
title: "Live Chat",
|
|
61
|
-
size: "lg"
|
|
62
|
-
}
|
|
63
|
-
),
|
|
64
|
-
/* @__PURE__ */ e(a, { href: "#", className: n.siteLink, hideAt: ["sm", "md"], children: /* @__PURE__ */ e(r, { size: "md", variant: "display", children: "Live Chat" }) }),
|
|
65
|
-
/* @__PURE__ */ i(
|
|
66
|
-
t,
|
|
80
|
+
p,
|
|
67
81
|
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
children: [
|
|
72
|
-
/* @__PURE__ */ e(a, { href: "#", className: n.siteLink, children: /* @__PURE__ */ e(r, { size: "md", variant: "display", children: "Custom Parts" }) }),
|
|
73
|
-
/* @__PURE__ */ e(a, { href: "#", className: n.siteLink, children: /* @__PURE__ */ e(r, { size: "md", variant: "display", children: "FAQ" }) }),
|
|
74
|
-
/* @__PURE__ */ e(a, { href: "#", className: n.siteLink, children: /* @__PURE__ */ e(r, { size: "md", variant: "display", children: "About Us" }) })
|
|
75
|
-
]
|
|
82
|
+
iconKey: "fa-solid fa-chevron-right",
|
|
83
|
+
title: "Navigate",
|
|
84
|
+
size: "sm"
|
|
76
85
|
}
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
86
|
+
)
|
|
87
|
+
] }) }, r.id))
|
|
88
|
+
] }) })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ e(s, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ e(u, { action: "/search", className: i.search }) }),
|
|
96
|
+
n && n.length > 0 && /* @__PURE__ */ e("ul", { className: T(i.categories, z(["sm"])), children: n.map((r) => /* @__PURE__ */ e(
|
|
97
|
+
k,
|
|
98
|
+
{
|
|
99
|
+
trigger: /* @__PURE__ */ e("li", { className: i.category, children: /* @__PURE__ */ o(a, { href: r.route, children: [
|
|
100
|
+
/* @__PURE__ */ e(l, { size: "sm", weight: "semibold", children: r.label }),
|
|
101
|
+
r.showChevron && /* @__PURE__ */ e(
|
|
102
|
+
p,
|
|
103
|
+
{
|
|
104
|
+
iconKey: "fa-regular fa-angle-down",
|
|
105
|
+
title: "Expand",
|
|
106
|
+
size: "sm"
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
] }) }, r.id),
|
|
110
|
+
on: "hover",
|
|
111
|
+
position: "bottom center",
|
|
112
|
+
children: /* @__PURE__ */ e("ul", { className: i.submenuTooltip, children: r.children.map((f) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(a, { href: f.route, children: /* @__PURE__ */ e(l, { size: "sm", weight: "semibold", children: f.label }) }) })) })
|
|
113
|
+
}
|
|
114
|
+
)) })
|
|
115
|
+
] }) });
|
|
116
|
+
}
|
|
117
|
+
function t({
|
|
118
|
+
href: m,
|
|
119
|
+
children: n,
|
|
120
|
+
...c
|
|
121
|
+
}) {
|
|
122
|
+
return /* @__PURE__ */ e(a, { href: m, className: i.siteLink, ...c, children: /* @__PURE__ */ e(l, { size: "md", variant: "display", children: n }) });
|
|
100
123
|
}
|
|
101
124
|
export {
|
|
102
|
-
|
|
125
|
+
ee as MainNav
|
|
103
126
|
};
|
|
@@ -9,5 +9,6 @@ declare const meta: {
|
|
|
9
9
|
};
|
|
10
10
|
export default meta;
|
|
11
11
|
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const Unauthenticated: Story;
|
|
13
12
|
export declare const Authenticated: Story;
|
|
13
|
+
export declare const WithCartItems: Story;
|
|
14
|
+
export declare const Unauthenticated: Story;
|
|
@@ -1,24 +1,147 @@
|
|
|
1
|
-
import { MainNav as
|
|
2
|
-
const
|
|
1
|
+
import { MainNav as e } from "./MainNav.js";
|
|
2
|
+
const o = {
|
|
3
3
|
title: "Case Parts/Organisms/MainNav",
|
|
4
|
-
component:
|
|
4
|
+
component: e,
|
|
5
5
|
parameters: {
|
|
6
6
|
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
|
7
|
-
layout: "
|
|
7
|
+
layout: "fullscreen"
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
// tags: ["autodocs"],
|
|
10
|
+
}, t = [
|
|
11
|
+
{
|
|
12
|
+
id: 0,
|
|
13
|
+
label: "Shop by Brands",
|
|
14
|
+
route: "#",
|
|
15
|
+
children: [
|
|
16
|
+
{ id: 20, label: "Anthony", route: "/anthony" },
|
|
17
|
+
{ id: 21, label: "Beverage Air", route: "/beverage" },
|
|
18
|
+
{ id: 22, label: "Continental", route: "/continental" },
|
|
19
|
+
{ id: 23, label: "Delfield", route: "/delfield" }
|
|
20
|
+
],
|
|
21
|
+
showChevron: !0
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: 1,
|
|
25
|
+
label: "Gaskets",
|
|
26
|
+
route: "#",
|
|
27
|
+
children: []
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 2,
|
|
31
|
+
label: "Hardware",
|
|
32
|
+
route: "#",
|
|
33
|
+
children: []
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 3,
|
|
37
|
+
label: "Refrigeration",
|
|
38
|
+
route: "#",
|
|
39
|
+
children: []
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 4,
|
|
43
|
+
label: "Controls",
|
|
44
|
+
route: "#",
|
|
45
|
+
children: []
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 5,
|
|
49
|
+
label: "Electrical",
|
|
50
|
+
route: "#",
|
|
51
|
+
children: []
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: 6,
|
|
55
|
+
label: "Heaters / Pans",
|
|
56
|
+
route: "#",
|
|
57
|
+
children: []
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 7,
|
|
61
|
+
label: "Shelving",
|
|
62
|
+
route: "#",
|
|
63
|
+
children: []
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 8,
|
|
67
|
+
label: "Doors",
|
|
68
|
+
route: "#",
|
|
69
|
+
children: []
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 9,
|
|
73
|
+
label: "Walk-In",
|
|
74
|
+
route: "#",
|
|
75
|
+
children: []
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: 10,
|
|
79
|
+
label: "Accessories",
|
|
80
|
+
route: "#",
|
|
81
|
+
children: []
|
|
82
|
+
}
|
|
83
|
+
], n = {
|
|
12
84
|
args: {
|
|
13
85
|
account: {
|
|
14
86
|
name: "Ringo",
|
|
15
87
|
initials: "RS",
|
|
16
88
|
number: "123456789012"
|
|
17
|
-
}
|
|
89
|
+
},
|
|
90
|
+
cartItemCount: 0,
|
|
91
|
+
customPartsRoute: "/custom",
|
|
92
|
+
accountRoute: "/account",
|
|
93
|
+
faqRoute: "/faq",
|
|
94
|
+
aboutUsRoute: "/about",
|
|
95
|
+
contactRoute: "/contact",
|
|
96
|
+
onLoginClick: () => {
|
|
97
|
+
alert("Login ");
|
|
98
|
+
},
|
|
99
|
+
onCartClick: () => {
|
|
100
|
+
alert("Cart");
|
|
101
|
+
},
|
|
102
|
+
categories: t
|
|
103
|
+
}
|
|
104
|
+
}, r = {
|
|
105
|
+
args: {
|
|
106
|
+
account: {
|
|
107
|
+
name: "Ringo",
|
|
108
|
+
initials: "RS",
|
|
109
|
+
number: "123456789012"
|
|
110
|
+
},
|
|
111
|
+
cartItemCount: 10,
|
|
112
|
+
customPartsRoute: "/custom",
|
|
113
|
+
accountRoute: "/account",
|
|
114
|
+
faqRoute: "/faq",
|
|
115
|
+
aboutUsRoute: "/about",
|
|
116
|
+
contactRoute: "/contact",
|
|
117
|
+
onLoginClick: () => {
|
|
118
|
+
alert("Login ");
|
|
119
|
+
},
|
|
120
|
+
onCartClick: () => {
|
|
121
|
+
alert("Cart");
|
|
122
|
+
},
|
|
123
|
+
categories: t
|
|
124
|
+
}
|
|
125
|
+
}, l = {
|
|
126
|
+
args: {
|
|
127
|
+
cartItemCount: 0,
|
|
128
|
+
customPartsRoute: "/custom",
|
|
129
|
+
accountRoute: "/account",
|
|
130
|
+
faqRoute: "/faq",
|
|
131
|
+
aboutUsRoute: "/about",
|
|
132
|
+
contactRoute: "/contact",
|
|
133
|
+
onLoginClick: () => {
|
|
134
|
+
alert("Login ");
|
|
135
|
+
},
|
|
136
|
+
onCartClick: () => {
|
|
137
|
+
alert("Cart");
|
|
138
|
+
},
|
|
139
|
+
categories: t
|
|
18
140
|
}
|
|
19
141
|
};
|
|
20
142
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
143
|
+
n as Authenticated,
|
|
144
|
+
l as Unauthenticated,
|
|
145
|
+
r as WithCartItems,
|
|
146
|
+
o as default
|
|
24
147
|
};
|
package/dist/styles/tokens.css
CHANGED
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
--surface-surface-tertiary-btn: var(--color-brand-primary-primary-black);
|
|
162
162
|
--surface-surface-tertiary-btn-focus: var(--color-brand-primary-white);
|
|
163
163
|
--surface-surface-text-links: var(--color-brand-primary-white);
|
|
164
|
+
--surface-surface-searchBar: var(--color-neutrals-neutral-1);
|
|
164
165
|
--text-text-caution: var(--color-brand-primary-primary-tangerine);
|
|
165
166
|
--text-text-disabled: var(--color-neutrals-text-disabled);
|
|
166
167
|
--text-text-error-warning: var(--color-alerts-error-warning);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caseparts-org/caseblocks",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.15",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/main.js",
|
|
7
7
|
"types": "dist/main.d.ts",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": "^18.3.1",
|
|
31
|
-
"react-dom": "^18.3.1"
|
|
31
|
+
"react-dom": "^18.3.1",
|
|
32
|
+
"reactjs-popup": ">=2.0.0 <3.0.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@chromatic-com/storybook": "^3.2.2",
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"husky": "^9.1.7",
|
|
55
56
|
"lint-staged": "^15.2.10",
|
|
56
57
|
"prettier": "3.4.2",
|
|
58
|
+
"reactjs-popup": "^2.0.6",
|
|
57
59
|
"storybook": "^8.4.5",
|
|
58
60
|
"typescript": "~5.6.2",
|
|
59
61
|
"typescript-eslint": "^8.11.0",
|
package/dist/assets/Logo.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._container_sgvuc_1{gap:var(--spacing-1);flex-shrink:0}._wordmark_sgvuc_6{margin-bottom:var(--spacing-0-25)}._tagline_sgvuc_10{color:var(--color-brand-primary-primary-black)}
|