@caseparts-org/caseblocks 0.0.199 → 0.0.201
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/MainNav.css +1 -1
- package/dist/molecules/Markdown/Markdown.d.ts +3 -2
- package/dist/molecules/Markdown/Markdown.js +17 -15
- package/dist/molecules/Markdown/Markdown.stories.js +35 -32
- package/dist/molecules/Markdown/usePreprocessedMarkdown.d.ts +3 -3
- package/dist/molecules/Markdown/usePreprocessedMarkdown.js +63 -54
- package/dist/organisms/MainNav/MainNav.js +56 -53
- package/package.json +1 -1
package/dist/assets/MainNav.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._main_14nx2_1{box-shadow:#bbb3 0 8px 24px;padding:var(--spacing-0-5) 0;z-index:1;position:relative}._column_14nx2_8{box-sizing:border-box;padding:0 var(--spacing-1)}._topNav_14nx2_13{padding-bottom:var(--spacing-0-5);gap:var(--spacing-1-5)}@media (max-width: 1281px){._topNav_14nx2_13{gap:var(--spacing-1);padding-bottom:0}}._logo_14nx2_21{cursor:pointer}._operations_14nx2_24{gap:var(--spacing-1-5);width:100%}@media (max-width: 1281px){._operations_14nx2_24{gap:var(--spacing-1)}}._search_14nx2_31{flex:1}._siteLink_14nx2_34{color:var(--color-brand-primary-primary-black);cursor:default;border:none;background-color:transparent;padding:0;margin:0;font-family:var(--font-family-display);font-size:var(--font-size-md);cursor:pointer;display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-4xs)}._siteLink_14nx2_34:hover{text-decoration:underline;color:var(--text-text-links)}@media (max-width:1280px){._siteLink_14nx2_34{font-family:var(--font-family-body);font-size:var(--font-size-sm)}}._siteLink_14nx2_34 path{fill:var(--color-brand-primary-primary-teal-blue)}._accountArea_14nx2_61{width:145px}@media (max-width: 1281px){._accountArea_14nx2_61{width:min-content}}._cart_14nx2_67{border:none;padding:0;margin:0;background-color:transparent}._category_14nx2_73{list-style:none;min-height:42px;display:flex;flex-direction:row;align-items:stretch;padding:0}._categoryLink_14nx2_81{color:var(--text-text-primary);text-decoration:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%}._categoryLink_14nx2_81:hover{color:var(--color-brand-primary-primary-teal-blue);text-decoration:none}._categoryLink_14nx2_81 path{fill:var(--color-brand-primary-primary-teal-blue)}._menuList_14nx2_97{list-style:none;padding:0;margin:0;height:min-content;display:flex;flex-direction:column;gap:var(--spacing-spacing-3xs)}._menuList_14nx2_97>li{width:100%;min-height:42px;padding:var(--spacing-spacing-2xs);border:1px solid var(--border-border-primary, #dfdfdf);box-sizing:border-box;display:flex;flex-direction:row;align-items:center;border-radius:var(--border-radius-md);color:var(--text-text-links)}._menuItemAction_14nx2_120{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-4xs);color:var(--color-brand-primary-primary-black)}._shortcutIcon_14nx2_129{color:var(--text-text-links)}
|
|
@@ -4,9 +4,10 @@ export type MarkdownProps = {
|
|
|
4
4
|
children?: string | null;
|
|
5
5
|
className?: string;
|
|
6
6
|
components?: Components;
|
|
7
|
-
|
|
7
|
+
partUrl?: LinkTarget;
|
|
8
|
+
relativePathUrl?: LinkTarget;
|
|
8
9
|
validate?: ValidateToken;
|
|
9
10
|
batchValidate?: BatchValidateTokens;
|
|
10
11
|
debug?: boolean;
|
|
11
12
|
};
|
|
12
|
-
export declare function Markdown({ children, className, components,
|
|
13
|
+
export declare function Markdown({ children, className, components, partUrl, relativePathUrl, validate, batchValidate, debug, }: MarkdownProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -8679,28 +8679,30 @@ function zf({
|
|
|
8679
8679
|
children: e,
|
|
8680
8680
|
className: t,
|
|
8681
8681
|
components: n,
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8682
|
+
partUrl: r,
|
|
8683
|
+
relativePathUrl: i,
|
|
8684
|
+
validate: o,
|
|
8685
|
+
batchValidate: l,
|
|
8686
|
+
debug: a = !1
|
|
8686
8687
|
}) {
|
|
8687
|
-
const
|
|
8688
|
-
|
|
8688
|
+
const u = e ?? "", { output: s } = Ti(
|
|
8689
|
+
u,
|
|
8689
8690
|
r,
|
|
8690
8691
|
i,
|
|
8691
|
-
|
|
8692
|
-
|
|
8692
|
+
o,
|
|
8693
|
+
a,
|
|
8694
|
+
l
|
|
8693
8695
|
);
|
|
8694
|
-
if (!
|
|
8695
|
-
const
|
|
8696
|
-
a: ({ node:
|
|
8697
|
-
} : {},
|
|
8698
|
-
return /* @__PURE__ */ je("div", { className:
|
|
8696
|
+
if (!u) return null;
|
|
8697
|
+
const f = r || i ? {
|
|
8698
|
+
a: ({ node: h, ...d }) => /* @__PURE__ */ je("a", { ...d, target: "_blank", rel: "noopener noreferrer" })
|
|
8699
|
+
} : {}, c = t ? `${or.markdown} ${t}` : or.markdown, p = { ...Ef, ...f, ...n };
|
|
8700
|
+
return /* @__PURE__ */ je("div", { className: c, children: /* @__PURE__ */ je(
|
|
8699
8701
|
os,
|
|
8700
8702
|
{
|
|
8701
8703
|
remarkPlugins: [xf, Sf, Ii],
|
|
8702
|
-
components:
|
|
8703
|
-
children:
|
|
8704
|
+
components: p,
|
|
8705
|
+
children: s
|
|
8704
8706
|
}
|
|
8705
8707
|
) });
|
|
8706
8708
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { useState as m, useEffect as p } from "react";
|
|
3
|
-
import { Markdown as
|
|
4
|
-
const
|
|
3
|
+
import { Markdown as l } from "./Markdown.js";
|
|
4
|
+
const w = {
|
|
5
5
|
title: "Case Parts/Molecules/Markdown",
|
|
6
|
-
component:
|
|
6
|
+
component: l,
|
|
7
7
|
parameters: { layout: "padded" },
|
|
8
8
|
tags: ["autodocs"]
|
|
9
9
|
}, r = `Kason 171 Latch
|
|
@@ -12,50 +12,51 @@ const f = {
|
|
|
12
12
|
Fits only selected revisions.
|
|
13
13
|
:::
|
|
14
14
|
|
|
15
|
-
This fits part [171]
|
|
15
|
+
This fits part [171], an invalid token [bad], and a help page at [FAQ](/faq).
|
|
16
16
|
Already linked should remain: [171](https://example.com/should-stay).
|
|
17
17
|
`;
|
|
18
|
-
function
|
|
19
|
-
const [
|
|
18
|
+
function h(e) {
|
|
19
|
+
const [i, o] = m(e.children ?? r);
|
|
20
20
|
return p(() => {
|
|
21
|
-
|
|
21
|
+
o(e.children ?? r);
|
|
22
22
|
}, [e.children]), /* @__PURE__ */ c("div", { style: { display: "grid", gap: 12 }, children: [
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ a("label", { style: { fontWeight: 600 }, children: "Edit Markdown (preprocess + admonitions live):" }),
|
|
24
|
+
/* @__PURE__ */ a(
|
|
25
25
|
"textarea",
|
|
26
26
|
{
|
|
27
|
-
value:
|
|
28
|
-
onChange: (t) =>
|
|
27
|
+
value: i,
|
|
28
|
+
onChange: (t) => o(t.target.value),
|
|
29
29
|
rows: 14,
|
|
30
30
|
style: { width: "100%", fontFamily: "monospace" }
|
|
31
31
|
}
|
|
32
32
|
),
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
|
|
33
|
+
/* @__PURE__ */ a(
|
|
34
|
+
l,
|
|
35
35
|
{
|
|
36
36
|
...e,
|
|
37
|
-
|
|
37
|
+
partUrl: (t) => `https://example.com/parts/${encodeURIComponent(t)}`,
|
|
38
|
+
relativePathUrl: "https://example.com",
|
|
38
39
|
validate: async (t) => {
|
|
39
|
-
if (await new Promise((
|
|
40
|
+
if (await new Promise((n) => setTimeout(n, 50)), /^\d+$/.test(t)) return !0;
|
|
40
41
|
throw new Error("invalid");
|
|
41
42
|
},
|
|
42
43
|
debug: !0,
|
|
43
|
-
children:
|
|
44
|
+
children: i
|
|
44
45
|
}
|
|
45
46
|
)
|
|
46
47
|
] });
|
|
47
48
|
}
|
|
48
|
-
const
|
|
49
|
+
const v = {
|
|
49
50
|
name: "Live Playground",
|
|
50
51
|
args: {
|
|
51
52
|
children: r
|
|
52
53
|
},
|
|
53
|
-
render: (e) => /* @__PURE__ */
|
|
54
|
-
},
|
|
54
|
+
render: (e) => /* @__PURE__ */ a(h, { ...e })
|
|
55
|
+
}, y = {
|
|
55
56
|
args: {
|
|
56
57
|
children: `# Heading 1
|
|
57
58
|
|
|
58
|
-
Paragraph with a [link](https://example.com).
|
|
59
|
+
Paragraph with a [link](https://example.com) and a relative help path [FAQ](/faq).
|
|
59
60
|
|
|
60
61
|
## Heading 2
|
|
61
62
|
|
|
@@ -86,25 +87,27 @@ export default greet;
|
|
|
86
87
|
|
|
87
88
|
| Col A | Col B |
|
|
88
89
|
|------:|:------|
|
|
89
|
-
| 123 | text
|
|
90
|
+
| 123 | text |`,
|
|
91
|
+
relativePathUrl: "https://example.com"
|
|
90
92
|
}
|
|
91
93
|
}, x = {
|
|
92
94
|
name: "Item Description Variant",
|
|
93
|
-
render: (e) => /* @__PURE__ */
|
|
94
|
-
|
|
95
|
+
render: (e) => /* @__PURE__ */ a(({ text: s }) => /* @__PURE__ */ a(
|
|
96
|
+
l,
|
|
95
97
|
{
|
|
96
98
|
...e,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
partUrl: (n) => `https://example.com/parts/${encodeURIComponent(n)}`,
|
|
100
|
+
relativePathUrl: "https://example.com",
|
|
101
|
+
validate: async (n) => {
|
|
102
|
+
if (await new Promise((d) => setTimeout(d, 50)), /^\d+$/.test(n)) return !0;
|
|
100
103
|
throw new Error("invalid");
|
|
101
104
|
},
|
|
102
105
|
debug: !0,
|
|
103
|
-
children:
|
|
106
|
+
children: s
|
|
104
107
|
}
|
|
105
108
|
), { text: `Kason 171 Latch
|
|
106
109
|
|
|
107
|
-
This fits part [171]
|
|
110
|
+
This fits part [171], an invalid token [bad], and the installation guide at [FAQ](/faq). Already linked should remain: [171](https://example.com/should-stay).
|
|
108
111
|
|
|
109
112
|
Another valid numeric: [172].` })
|
|
110
113
|
}, b = {
|
|
@@ -141,8 +144,8 @@ This block should not be transformed.
|
|
|
141
144
|
};
|
|
142
145
|
export {
|
|
143
146
|
b as Admonitions,
|
|
144
|
-
|
|
147
|
+
y as Basic,
|
|
145
148
|
x as ItemDescription,
|
|
146
|
-
|
|
147
|
-
|
|
149
|
+
v as Playground,
|
|
150
|
+
w as default
|
|
148
151
|
};
|
|
@@ -7,7 +7,7 @@ export type PreprocessedMarkdownResult = {
|
|
|
7
7
|
tokens: string[];
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* Validates bare bracketed part tokens and rewrites relative markdown links using
|
|
11
|
+
* the configured URL targets.
|
|
12
12
|
*/
|
|
13
|
-
export declare function usePreprocessedMarkdown(input: string | null | undefined,
|
|
13
|
+
export declare function usePreprocessedMarkdown(input: string | null | undefined, partUrl?: LinkTarget, relativePathUrl?: LinkTarget, validate?: ValidateToken, debug?: boolean, batchValidate?: BatchValidateTokens): PreprocessedMarkdownResult;
|
|
@@ -1,86 +1,95 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
`, Math.max(0,
|
|
5
|
-
`,
|
|
6
|
-
return e.slice(
|
|
1
|
+
import { useState as N, useRef as L, useEffect as I, useMemo as x } from "react";
|
|
2
|
+
const H = /\[(.+?)\](?!\()/g, p = /\[([^\]]+?)\]\((\/[^)\s]*)\)/g, W = (e, n) => typeof e == "function" ? e(n) : e, X = (e, n) => typeof e == "function" ? e(n) : `${e}${n}`, E = (e, n) => {
|
|
3
|
+
const a = e.lastIndexOf(`
|
|
4
|
+
`, Math.max(0, n - 1)) + 1, l = e.indexOf(`
|
|
5
|
+
`, n), w = l === -1 ? e.length : l;
|
|
6
|
+
return e.slice(a, w).trimStart().startsWith(":::");
|
|
7
7
|
};
|
|
8
|
-
function
|
|
9
|
-
const [
|
|
10
|
-
|
|
8
|
+
function j(e, n, a, l, w = !1, y) {
|
|
9
|
+
const [q, S] = N(e ?? ""), [v, m] = N(!1), o = L(/* @__PURE__ */ new Map()), O = L(l), M = L(
|
|
10
|
+
y
|
|
11
11
|
);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, [
|
|
15
|
-
const
|
|
16
|
-
if (!e || !
|
|
17
|
-
const f = Array.from(e.matchAll(
|
|
18
|
-
(
|
|
19
|
-
).map((
|
|
12
|
+
I(() => {
|
|
13
|
+
O.current = l, M.current = y;
|
|
14
|
+
}, [l, y]);
|
|
15
|
+
const d = x(() => H, []), h = x(() => {
|
|
16
|
+
if (!e || !n) return [];
|
|
17
|
+
const f = Array.from(e.matchAll(d)).filter(
|
|
18
|
+
(u) => typeof u.index == "number" ? !E(e, u.index) : !0
|
|
19
|
+
).map((u) => u[1]);
|
|
20
20
|
return Array.from(new Set(f));
|
|
21
|
-
}, [e,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
}, [e, d, n]), T = x(() => {
|
|
22
|
+
if (!e || !a) return [];
|
|
23
|
+
const f = Array.from(e.matchAll(p)).filter(
|
|
24
|
+
(t) => typeof t.index == "number" ? !E(e, t.index) : !0
|
|
25
|
+
).map((t) => t[0]);
|
|
26
|
+
return Array.from(new Set(f));
|
|
27
|
+
}, [e, a]), _ = (f) => {
|
|
28
|
+
const t = f.split(/\r?\n/);
|
|
29
|
+
if (t.length === 0) return f;
|
|
30
|
+
const u = t[0];
|
|
31
|
+
return /^\s*#\s/.test(u) || (t[0] = `# ${u.trim()}`), t.join(`
|
|
26
32
|
`);
|
|
27
33
|
};
|
|
28
|
-
return
|
|
34
|
+
return I(() => {
|
|
29
35
|
if (!e) {
|
|
30
|
-
|
|
36
|
+
S(""), m(!1);
|
|
31
37
|
return;
|
|
32
38
|
}
|
|
33
|
-
if (!
|
|
34
|
-
|
|
39
|
+
if (!n && !a) {
|
|
40
|
+
S(e), m(!1);
|
|
35
41
|
return;
|
|
36
42
|
}
|
|
37
|
-
if (!
|
|
38
|
-
|
|
43
|
+
if (!h.length && !T.length) {
|
|
44
|
+
S(_(e)), m(!1);
|
|
39
45
|
return;
|
|
40
46
|
}
|
|
41
47
|
let f = !1;
|
|
42
48
|
m(!0);
|
|
43
|
-
const
|
|
49
|
+
const t = h.filter((g) => !o.current.has(g));
|
|
44
50
|
return (async () => {
|
|
45
|
-
if (
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
51
|
+
if (t.length) {
|
|
52
|
+
const r = M.current, c = O.current;
|
|
53
|
+
if (r)
|
|
48
54
|
try {
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
const s = await r(t), i = s instanceof Set ? s : new Set(s);
|
|
56
|
+
t.forEach((R) => {
|
|
57
|
+
o.current.set(R, i.has(R));
|
|
52
58
|
});
|
|
53
59
|
} catch {
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
t.forEach((s) => {
|
|
61
|
+
o.current.set(s, !1);
|
|
56
62
|
});
|
|
57
63
|
}
|
|
58
|
-
else
|
|
59
|
-
|
|
64
|
+
else c ? (await Promise.allSettled(
|
|
65
|
+
t.map(async (i) => {
|
|
60
66
|
try {
|
|
61
|
-
await
|
|
67
|
+
await c(i), o.current.set(i, !0);
|
|
62
68
|
} catch {
|
|
63
|
-
|
|
69
|
+
o.current.set(i, !1);
|
|
64
70
|
}
|
|
65
71
|
})
|
|
66
|
-
)).forEach((i,
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
}) :
|
|
70
|
-
|
|
72
|
+
)).forEach((i, R) => {
|
|
73
|
+
const K = t[R];
|
|
74
|
+
o.current.has(K) || o.current.set(K, i.status === "fulfilled");
|
|
75
|
+
}) : t.forEach((s) => {
|
|
76
|
+
o.current.set(s, !0);
|
|
71
77
|
});
|
|
72
78
|
}
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
),
|
|
76
|
-
|
|
77
|
-
),
|
|
78
|
-
|
|
79
|
+
const g = new Set(
|
|
80
|
+
h.filter((r) => o.current.get(r) === !0)
|
|
81
|
+
), C = new Set(
|
|
82
|
+
h.filter((r) => o.current.get(r) === !1)
|
|
83
|
+
), A = e.replace(d, (r, c, s) => E(e, s) ? r : g.has(c) && n ? `**[${c}](${W(n, c)})**` : r), $ = a ? A.replace(
|
|
84
|
+
p,
|
|
85
|
+
(r, c, s, i) => E(A, i) ? r : `[${c}](${X(a, s)})`
|
|
86
|
+
) : A, D = w ? $.replace(d, (r, c, s) => E($, s) ? r : C.has(c) ? `[${c}]⚠️` : r) : $, G = _(D);
|
|
87
|
+
f || (S(G), m(!1));
|
|
79
88
|
})(), () => {
|
|
80
89
|
f = !0;
|
|
81
90
|
};
|
|
82
|
-
}, [e,
|
|
91
|
+
}, [e, h, T, w, n, a, d]), { output: q, loading: v, tokens: h };
|
|
83
92
|
}
|
|
84
93
|
export {
|
|
85
|
-
|
|
94
|
+
j as usePreprocessedMarkdown
|
|
86
95
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import S from "react";
|
|
3
3
|
import { Text as h } from "../../atoms/Text/Text.js";
|
|
4
4
|
import { Link as u } from "../../atoms/Link/Link.js";
|
|
5
|
-
import { Icon as
|
|
5
|
+
import { Icon as i } from "../../atoms/Icon/Icon.js";
|
|
6
6
|
import { Flex as m } from "../../atoms/Flex/Flex.js";
|
|
7
7
|
import { Grid as U, Column as C } from "../../atoms/Grid/Grid.js";
|
|
8
8
|
import { Logo as F } from "../../molecules/Logo/Logo.js";
|
|
@@ -11,9 +11,9 @@ import { HamburgerMenu as H } from "../../molecules/HamburgerMenu/HamburgerMenu.
|
|
|
11
11
|
import { ShoppingCart as q } from "../../molecules/Cart/Cart.js";
|
|
12
12
|
import { Account as B } from "../../molecules/Account/Account.js";
|
|
13
13
|
import { CategoryNav as G } from "../../molecules/CategoryNav/CategoryNav.js";
|
|
14
|
-
import { getHideAtStyles as
|
|
15
|
-
import { c as
|
|
16
|
-
import '../../assets/MainNav.css';const P = "
|
|
14
|
+
import { getHideAtStyles as x } from "../../atoms/HideAt.js";
|
|
15
|
+
import { c as t } from "../../clsx-OuTLNxxd.js";
|
|
16
|
+
import '../../assets/MainNav.css';const P = "_main_14nx2_1", Q = "_column_14nx2_8", T = "_topNav_14nx2_13", W = "_logo_14nx2_21", E = "_operations_14nx2_24", J = "_search_14nx2_31", O = "_siteLink_14nx2_34", R = "_accountArea_14nx2_61", V = "_category_14nx2_73", X = "_categoryLink_14nx2_81", Y = "_menuList_14nx2_97", Z = "_menuItemAction_14nx2_120", $ = "_shortcutIcon_14nx2_129", e = {
|
|
17
17
|
main: P,
|
|
18
18
|
column: Q,
|
|
19
19
|
topNav: T,
|
|
@@ -29,19 +29,19 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
|
|
|
29
29
|
shortcutIcon: $
|
|
30
30
|
}, pe = S.forwardRef(function({
|
|
31
31
|
account: l,
|
|
32
|
-
categories:
|
|
33
|
-
homeRoute:
|
|
34
|
-
faqRoute:
|
|
32
|
+
categories: r,
|
|
33
|
+
homeRoute: I,
|
|
34
|
+
faqRoute: L,
|
|
35
35
|
customPartsRoute: f,
|
|
36
|
-
aboutUsRoute:
|
|
36
|
+
aboutUsRoute: A,
|
|
37
37
|
contactRoute: p,
|
|
38
|
-
cart:
|
|
39
|
-
open:
|
|
38
|
+
cart: v,
|
|
39
|
+
open: k,
|
|
40
40
|
// consume external panel control props from CartPropsBase
|
|
41
|
-
className:
|
|
41
|
+
className: y,
|
|
42
42
|
onLoginClick: b,
|
|
43
43
|
onSearch: N,
|
|
44
|
-
onCategoryClick:
|
|
44
|
+
onCategoryClick: o,
|
|
45
45
|
onClickModelSerial: _,
|
|
46
46
|
onCartClick: w,
|
|
47
47
|
accountPopoverContent: z,
|
|
@@ -49,8 +49,8 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
|
|
|
49
49
|
isCategoriesLoading: j,
|
|
50
50
|
...D
|
|
51
51
|
}, M) {
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ n(U, { ...D, gridWrapperClassName: t(e.main, y), children: /* @__PURE__ */ s(C, { span: 12, className: e.column, children: [
|
|
53
|
+
/* @__PURE__ */ s(
|
|
54
54
|
m,
|
|
55
55
|
{
|
|
56
56
|
flexDirection: "row",
|
|
@@ -58,8 +58,8 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
|
|
|
58
58
|
justifyContent: "space-between",
|
|
59
59
|
className: e.topNav,
|
|
60
60
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ n("div", { className: e.logo, children: /* @__PURE__ */ n(u, { href: I, children: /* @__PURE__ */ n(F, {}) }) }),
|
|
62
|
+
/* @__PURE__ */ s(
|
|
63
63
|
m,
|
|
64
64
|
{
|
|
65
65
|
flexDirection: "row",
|
|
@@ -67,11 +67,14 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
|
|
|
67
67
|
justifyContent: "flex-end",
|
|
68
68
|
className: e.operations,
|
|
69
69
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */ s("button", { onClick: _, className:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
/* @__PURE__ */ n(m, { flexDirection: "row", hideAt: ["sm"], className: e.search, children: /* @__PURE__ */ n(g, { onSearch: N, inputName: "cpc-search" }) }),
|
|
71
|
+
/* @__PURE__ */ s("button", { onClick: _, className: t(e.siteLink, x(["sm", "md"])), children: [
|
|
72
|
+
/* @__PURE__ */ n(i, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
|
|
73
|
+
"Model/Serial"
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ n(c, { href: f, hideAt: ["sm", "md"], children: "Custom Parts" }),
|
|
76
|
+
/* @__PURE__ */ n(c, { href: p, hideAt: ["sm", "md"], children: "Contact Us" }),
|
|
77
|
+
/* @__PURE__ */ n("div", { className: e.accountArea, children: /* @__PURE__ */ n(
|
|
75
78
|
B,
|
|
76
79
|
{
|
|
77
80
|
account: l,
|
|
@@ -81,61 +84,61 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
|
|
|
81
84
|
isAccountLoading: K
|
|
82
85
|
}
|
|
83
86
|
) }),
|
|
84
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ n(
|
|
85
88
|
q,
|
|
86
89
|
{
|
|
87
90
|
ref: M,
|
|
88
|
-
cart:
|
|
89
|
-
open:
|
|
91
|
+
cart: v,
|
|
92
|
+
open: k,
|
|
90
93
|
onCartClick: w
|
|
91
94
|
}
|
|
92
95
|
),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ s(H, { hideAt: ["lg"], children: [
|
|
97
|
+
/* @__PURE__ */ s("section", { children: [
|
|
98
|
+
/* @__PURE__ */ n(h, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
|
|
99
|
+
/* @__PURE__ */ s("ul", { className: e.menuList, children: [
|
|
100
|
+
/* @__PURE__ */ n("li", { className: e.menuItem, children: /* @__PURE__ */ s(
|
|
98
101
|
"button",
|
|
99
102
|
{
|
|
100
103
|
onClick: _,
|
|
101
104
|
"data-hamburger-close": "true",
|
|
102
|
-
className:
|
|
105
|
+
className: t(e.siteLink, e.menuItemAction, x(["lg"])),
|
|
103
106
|
children: [
|
|
104
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ n(i, { iconKey: "fa-regular fa-sparkles", size: "sm", className: e.shortcutIcon }),
|
|
105
108
|
"Model/Serial"
|
|
106
109
|
]
|
|
107
110
|
}
|
|
108
111
|
) }),
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ n("li", { className: e.menuItem, children: /* @__PURE__ */ s(c, { href: f, className: t(e.siteLink, e.menuItemAction), children: [
|
|
113
|
+
/* @__PURE__ */ n(i, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: e.shortcutIcon }),
|
|
111
114
|
"Custom Parts"
|
|
112
115
|
] }) }),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ n("li", { className: e.menuItem, children: /* @__PURE__ */ s(c, { href: p, className: t(e.siteLink, e.menuItemAction), children: [
|
|
117
|
+
/* @__PURE__ */ n(i, { iconKey: "fa-regular fa-envelope", size: "sm", className: e.shortcutIcon }),
|
|
115
118
|
"Contact Us"
|
|
116
119
|
] }) }),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ n("li", { className: e.menuItem, children: /* @__PURE__ */ s(c, { href: L, className: t(e.siteLink, e.menuItemAction), children: [
|
|
121
|
+
/* @__PURE__ */ n(i, { iconKey: "fa-solid fa-question", size: "sm", className: e.shortcutIcon }),
|
|
119
122
|
"FAQ"
|
|
120
123
|
] }) }),
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ n("li", { className: e.menuItem, children: /* @__PURE__ */ s(c, { href: A, className: t(e.siteLink, e.menuItemAction), children: [
|
|
125
|
+
/* @__PURE__ */ n(i, { iconKey: "fa-regular fa-people-group", size: "sm", className: e.shortcutIcon }),
|
|
123
126
|
"About Us"
|
|
124
127
|
] }) })
|
|
125
128
|
] })
|
|
126
129
|
] }),
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ s("section", { children: [
|
|
131
|
+
/* @__PURE__ */ n(h, { size: "md", weight: "semibold", children: "Shop by category" }),
|
|
132
|
+
/* @__PURE__ */ n("ul", { className: e.menuList, children: r && r.map((a) => /* @__PURE__ */ n("li", { className: e.category, children: /* @__PURE__ */ s(
|
|
130
133
|
u,
|
|
131
134
|
{
|
|
132
135
|
href: a.route,
|
|
133
136
|
className: e.categoryLink,
|
|
134
|
-
onClick: () =>
|
|
137
|
+
onClick: () => o == null ? void 0 : o(a),
|
|
135
138
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
|
|
139
|
+
/* @__PURE__ */ n(h, { size: "sm", children: a.label }),
|
|
140
|
+
/* @__PURE__ */ n(
|
|
141
|
+
i,
|
|
139
142
|
{
|
|
140
143
|
iconKey: "fa-solid fa-chevron-right",
|
|
141
144
|
title: "Navigate",
|
|
@@ -153,13 +156,13 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
|
|
|
153
156
|
]
|
|
154
157
|
}
|
|
155
158
|
),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ n(m, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ n(g, { onSearch: N, inputName: "cpc-search", className: e.search }) }),
|
|
160
|
+
/* @__PURE__ */ n(
|
|
158
161
|
G,
|
|
159
162
|
{
|
|
160
|
-
categories:
|
|
163
|
+
categories: r,
|
|
161
164
|
isCategoriesLoading: j,
|
|
162
|
-
onCategoryClick:
|
|
165
|
+
onCategoryClick: o
|
|
163
166
|
}
|
|
164
167
|
)
|
|
165
168
|
] }) });
|
|
@@ -167,9 +170,9 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
|
|
|
167
170
|
function c({
|
|
168
171
|
href: d,
|
|
169
172
|
children: l,
|
|
170
|
-
...
|
|
173
|
+
...r
|
|
171
174
|
}) {
|
|
172
|
-
return /* @__PURE__ */
|
|
175
|
+
return /* @__PURE__ */ n(u, { href: d, className: e.siteLink, ...r, children: l });
|
|
173
176
|
}
|
|
174
177
|
export {
|
|
175
178
|
pe as MainNav
|