@caseparts-org/caseblocks 0.0.194 → 0.0.195
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/Admonition.css +1 -0
- package/dist/assets/MainNav.css +1 -1
- package/dist/assets/Markdown.css +1 -1
- package/dist/atoms/Markdown/Markdown.js +794 -776
- package/dist/atoms/Markdown/Markdown.stories.d.ts +2 -0
- package/dist/atoms/Markdown/Markdown.stories.js +88 -18
- package/dist/atoms/Markdown/PreprocessedMarkdown.js +6 -6
- package/dist/atoms/Markdown/remarkAdmonition.d.ts +15 -0
- package/dist/atoms/Markdown/remarkAdmonition.js +120 -0
- package/dist/main-client.js +54 -52
- package/dist/main-server.d.ts +2 -0
- package/dist/main-server.js +16 -14
- package/dist/main.d.ts +2 -0
- package/dist/main.js +18 -16
- package/dist/molecules/Admonition/Admonition.d.ts +10 -0
- package/dist/molecules/Admonition/Admonition.js +46 -0
- package/dist/molecules/Admonition/Admonition.stories.d.ts +13 -0
- package/dist/molecules/Admonition/Admonition.stories.js +51 -0
- package/dist/organisms/MainNav/MainNav.js +77 -75
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
type DemoArgs = {
|
|
3
|
+
admonitionType: string;
|
|
4
|
+
variant: "note" | "tip" | "important" | "caution" | "warning" | "unknown";
|
|
5
|
+
title?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
body: string;
|
|
8
|
+
};
|
|
9
|
+
declare const meta: Meta<DemoArgs>;
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<DemoArgs>;
|
|
12
|
+
export declare const Playground: Story;
|
|
13
|
+
export declare const UnknownType: Story;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Admonition as o } from "./Admonition.js";
|
|
3
|
+
const r = {
|
|
4
|
+
title: "Case Parts/Molecules/Admonition",
|
|
5
|
+
component: o,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered"
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
admonitionType: { control: "text" },
|
|
12
|
+
variant: {
|
|
13
|
+
control: { type: "radio" },
|
|
14
|
+
options: ["note", "tip", "important", "caution", "warning", "unknown"]
|
|
15
|
+
},
|
|
16
|
+
title: { control: "text" },
|
|
17
|
+
icon: { control: "text" },
|
|
18
|
+
body: { control: "text" }
|
|
19
|
+
},
|
|
20
|
+
args: {
|
|
21
|
+
admonitionType: "warning",
|
|
22
|
+
variant: "warning",
|
|
23
|
+
title: "Electrical Hazard",
|
|
24
|
+
icon: "fa-solid fa-bolt",
|
|
25
|
+
body: "Disconnect power before servicing this unit."
|
|
26
|
+
}
|
|
27
|
+
}, a = {
|
|
28
|
+
render: (t) => /* @__PURE__ */ n("div", { style: { width: 640 }, children: /* @__PURE__ */ n(
|
|
29
|
+
o,
|
|
30
|
+
{
|
|
31
|
+
admonitionType: t.admonitionType,
|
|
32
|
+
variant: t.variant,
|
|
33
|
+
title: t.title,
|
|
34
|
+
icon: t.icon,
|
|
35
|
+
children: /* @__PURE__ */ n("p", { children: t.body })
|
|
36
|
+
}
|
|
37
|
+
) })
|
|
38
|
+
}, l = {
|
|
39
|
+
args: {
|
|
40
|
+
admonitionType: "custom-alert",
|
|
41
|
+
variant: "unknown",
|
|
42
|
+
title: "Compatibility Note",
|
|
43
|
+
icon: "info",
|
|
44
|
+
body: "This renders neutral styling while preserving the custom type."
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
a as Playground,
|
|
49
|
+
l as UnknownType,
|
|
50
|
+
r as default
|
|
51
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import S from "react";
|
|
3
|
-
import { Text as
|
|
4
|
-
import { Link as
|
|
3
|
+
import { Text as d } from "../../atoms/Text/Text.js";
|
|
4
|
+
import { Link as u } from "../../atoms/Link/Link.js";
|
|
5
5
|
import { Icon as s } from "../../atoms/Icon/Icon.js";
|
|
6
6
|
import { Flex as a } 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";
|
|
9
|
-
import { SearchBox as
|
|
9
|
+
import { SearchBox as w } from "../../molecules/SearchBox/SearchBox.js";
|
|
10
10
|
import { HamburgerMenu as H } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
|
|
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
14
|
import { getHideAtStyles as g } from "../../atoms/HideAt.js";
|
|
15
|
-
import { c as
|
|
16
|
-
import '../../assets/MainNav.css';const P = "
|
|
15
|
+
import { c as o } from "../../clsx-OuTLNxxd.js";
|
|
16
|
+
import '../../assets/MainNav.css';const P = "_main_jwl39_1", Q = "_column_jwl39_8", T = "_topNav_jwl39_13", W = "_logo_jwl39_21", E = "_operations_jwl39_24", J = "_search_jwl39_31", O = "_siteLink_jwl39_34", R = "_accountArea_jwl39_54", V = "_category_jwl39_66", X = "_menuList_jwl39_94", Y = "_menuItemAction_jwl39_112", n = {
|
|
17
17
|
main: P,
|
|
18
18
|
column: Q,
|
|
19
19
|
topNav: T,
|
|
@@ -23,100 +23,101 @@ import '../../assets/MainNav.css';const P = "_main_t25b8_1", Q = "_column_t25b8_
|
|
|
23
23
|
siteLink: O,
|
|
24
24
|
accountArea: R,
|
|
25
25
|
category: V,
|
|
26
|
-
menuList: X
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
menuList: X,
|
|
27
|
+
menuItemAction: Y
|
|
28
|
+
}, ue = S.forwardRef(function({
|
|
29
|
+
account: l,
|
|
29
30
|
categories: t,
|
|
30
|
-
homeRoute:
|
|
31
|
-
faqRoute:
|
|
32
|
-
customPartsRoute:
|
|
33
|
-
aboutUsRoute:
|
|
34
|
-
contactRoute:
|
|
35
|
-
cart:
|
|
36
|
-
open:
|
|
31
|
+
homeRoute: h,
|
|
32
|
+
faqRoute: I,
|
|
33
|
+
customPartsRoute: p,
|
|
34
|
+
aboutUsRoute: v,
|
|
35
|
+
contactRoute: N,
|
|
36
|
+
cart: j,
|
|
37
|
+
open: L,
|
|
37
38
|
// consume external panel control props from CartPropsBase
|
|
38
|
-
className:
|
|
39
|
-
onLoginClick:
|
|
39
|
+
className: x,
|
|
40
|
+
onLoginClick: b,
|
|
40
41
|
onSearch: _,
|
|
41
|
-
onCategoryClick:
|
|
42
|
-
onClickModelSerial:
|
|
43
|
-
onCartClick:
|
|
44
|
-
accountPopoverContent:
|
|
45
|
-
isAccountLoading:
|
|
46
|
-
isCategoriesLoading:
|
|
42
|
+
onCategoryClick: r,
|
|
43
|
+
onClickModelSerial: A,
|
|
44
|
+
onCartClick: y,
|
|
45
|
+
accountPopoverContent: z,
|
|
46
|
+
isAccountLoading: k,
|
|
47
|
+
isCategoriesLoading: K,
|
|
47
48
|
...D
|
|
48
49
|
}, M) {
|
|
49
|
-
return /* @__PURE__ */ e(U, { ...D, gridWrapperClassName:
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ e(U, { ...D, gridWrapperClassName: o(n.main, x), children: /* @__PURE__ */ i(C, { span: 12, className: n.column, children: [
|
|
51
|
+
/* @__PURE__ */ i(
|
|
51
52
|
a,
|
|
52
53
|
{
|
|
53
54
|
flexDirection: "row",
|
|
54
55
|
alignItems: "center",
|
|
55
56
|
justifyContent: "space-between",
|
|
56
|
-
className:
|
|
57
|
+
className: n.topNav,
|
|
57
58
|
children: [
|
|
58
|
-
/* @__PURE__ */ e("div", { className:
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ e("div", { className: n.logo, children: /* @__PURE__ */ e(u, { href: h, children: /* @__PURE__ */ e(F, {}) }) }),
|
|
60
|
+
/* @__PURE__ */ i(
|
|
60
61
|
a,
|
|
61
62
|
{
|
|
62
63
|
flexDirection: "row",
|
|
63
64
|
alignItems: "center",
|
|
64
65
|
justifyContent: "flex-end",
|
|
65
|
-
className:
|
|
66
|
+
className: n.operations,
|
|
66
67
|
children: [
|
|
67
|
-
/* @__PURE__ */ e(a, { flexDirection: "row", hideAt: ["sm"], className:
|
|
68
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
-
/* @__PURE__ */ e(
|
|
71
|
-
/* @__PURE__ */ e("div", { className:
|
|
68
|
+
/* @__PURE__ */ e(a, { flexDirection: "row", hideAt: ["sm"], className: n.search, children: /* @__PURE__ */ e(w, { onSearch: _, inputName: "cpc-search" }) }),
|
|
69
|
+
/* @__PURE__ */ e("button", { onClick: A, className: o(n.siteLink, n.menuItemAction, g(["sm", "md"])), children: "Model/Serial" }),
|
|
70
|
+
/* @__PURE__ */ e(c, { href: p, hideAt: ["sm", "md"], className: n.menuItemAction, children: "Custom Parts" }),
|
|
71
|
+
/* @__PURE__ */ e(c, { href: N, hideAt: ["sm", "md"], className: n.menuItemAction, children: "Contact Us" }),
|
|
72
|
+
/* @__PURE__ */ e("div", { className: n.accountArea, children: /* @__PURE__ */ e(
|
|
72
73
|
B,
|
|
73
74
|
{
|
|
74
|
-
account:
|
|
75
|
-
onLoginClick:
|
|
76
|
-
className:
|
|
77
|
-
popoverContent:
|
|
78
|
-
isAccountLoading:
|
|
75
|
+
account: l,
|
|
76
|
+
onLoginClick: b,
|
|
77
|
+
className: n.avatar,
|
|
78
|
+
popoverContent: z,
|
|
79
|
+
isAccountLoading: k
|
|
79
80
|
}
|
|
80
81
|
) }),
|
|
81
82
|
/* @__PURE__ */ e(
|
|
82
83
|
q,
|
|
83
84
|
{
|
|
84
85
|
ref: M,
|
|
85
|
-
cart:
|
|
86
|
-
open:
|
|
87
|
-
onCartClick:
|
|
86
|
+
cart: j,
|
|
87
|
+
open: L,
|
|
88
|
+
onCartClick: y
|
|
88
89
|
}
|
|
89
90
|
),
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */ e(
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ i(H, { hideAt: ["lg"], children: [
|
|
92
|
+
/* @__PURE__ */ i("section", { children: [
|
|
93
|
+
/* @__PURE__ */ e(d, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
|
|
94
|
+
/* @__PURE__ */ i("ul", { className: n.menuList, children: [
|
|
95
|
+
/* @__PURE__ */ e("li", { className: n.menuItem, children: /* @__PURE__ */ i("button", { onClick: A, className: o(n.siteLink, n.menuItemAction, g(["lg"])), children: [
|
|
95
96
|
/* @__PURE__ */ e(s, { iconKey: "fa-regular fa-book", size: "sm" }),
|
|
96
|
-
/* @__PURE__ */ e("
|
|
97
|
-
] }),
|
|
98
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ e("span", { children: "Model/Serial" })
|
|
98
|
+
] }) }),
|
|
99
|
+
/* @__PURE__ */ e("li", { className: n.menuItem, children: /* @__PURE__ */ i(c, { href: p, className: n.menuItemAction, children: [
|
|
99
100
|
/* @__PURE__ */ e(s, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm" }),
|
|
100
|
-
/* @__PURE__ */ e(
|
|
101
|
-
] }),
|
|
102
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ e("span", { children: "Custom Parts" })
|
|
102
|
+
] }) }),
|
|
103
|
+
/* @__PURE__ */ e("li", { className: n.menuItem, children: /* @__PURE__ */ i(c, { href: N, className: n.menuItemAction, children: [
|
|
103
104
|
/* @__PURE__ */ e(s, { iconKey: "fa-regular fa-envelope", size: "sm" }),
|
|
104
|
-
/* @__PURE__ */ e(
|
|
105
|
-
] }),
|
|
106
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ e("span", { children: "Contact Us" })
|
|
106
|
+
] }) }),
|
|
107
|
+
/* @__PURE__ */ e("li", { className: n.menuItem, children: /* @__PURE__ */ i(c, { href: I, className: n.menuItemAction, children: [
|
|
107
108
|
/* @__PURE__ */ e(s, { iconKey: "fa-solid fa-question", size: "sm" }),
|
|
108
|
-
/* @__PURE__ */ e(
|
|
109
|
-
] }),
|
|
110
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ e("span", { children: "FAQ" })
|
|
110
|
+
] }) }),
|
|
111
|
+
/* @__PURE__ */ e("li", { className: n.menuItem, children: /* @__PURE__ */ i(c, { href: v, className: n.menuItemAction, children: [
|
|
111
112
|
/* @__PURE__ */ e(s, { iconKey: "fa-regular fa-people-group", size: "sm" }),
|
|
112
|
-
/* @__PURE__ */ e(
|
|
113
|
-
] })
|
|
113
|
+
/* @__PURE__ */ e("span", { children: "About Us" })
|
|
114
|
+
] }) })
|
|
114
115
|
] })
|
|
115
116
|
] }),
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */ e(
|
|
118
|
-
/* @__PURE__ */ e("ul", { className:
|
|
119
|
-
/* @__PURE__ */ e(
|
|
117
|
+
/* @__PURE__ */ i("section", { children: [
|
|
118
|
+
/* @__PURE__ */ e(d, { size: "md", weight: "semibold", children: "Shop by category" }),
|
|
119
|
+
/* @__PURE__ */ e("ul", { className: n.menuList, children: t && t.map((m) => /* @__PURE__ */ e("li", { className: n.category, children: /* @__PURE__ */ i(u, { href: m.route, onClick: () => r == null ? void 0 : r(m), children: [
|
|
120
|
+
/* @__PURE__ */ e(d, { size: "sm", children: m.label }),
|
|
120
121
|
/* @__PURE__ */ e(
|
|
121
122
|
s,
|
|
122
123
|
{
|
|
@@ -125,7 +126,7 @@ import '../../assets/MainNav.css';const P = "_main_t25b8_1", Q = "_column_t25b8_
|
|
|
125
126
|
size: "sm"
|
|
126
127
|
}
|
|
127
128
|
)
|
|
128
|
-
] }) },
|
|
129
|
+
] }) }, m.id)) })
|
|
129
130
|
] })
|
|
130
131
|
] })
|
|
131
132
|
]
|
|
@@ -134,24 +135,25 @@ import '../../assets/MainNav.css';const P = "_main_t25b8_1", Q = "_column_t25b8_
|
|
|
134
135
|
]
|
|
135
136
|
}
|
|
136
137
|
),
|
|
137
|
-
/* @__PURE__ */ e(a, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ e(
|
|
138
|
+
/* @__PURE__ */ e(a, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ e(w, { onSearch: _, inputName: "cpc-search", className: n.search }) }),
|
|
138
139
|
/* @__PURE__ */ e(
|
|
139
140
|
G,
|
|
140
141
|
{
|
|
141
142
|
categories: t,
|
|
142
|
-
isCategoriesLoading:
|
|
143
|
-
onCategoryClick:
|
|
143
|
+
isCategoriesLoading: K,
|
|
144
|
+
onCategoryClick: r
|
|
144
145
|
}
|
|
145
146
|
)
|
|
146
147
|
] }) });
|
|
147
148
|
});
|
|
148
|
-
function
|
|
149
|
+
function c({
|
|
149
150
|
href: f,
|
|
150
|
-
children:
|
|
151
|
-
|
|
151
|
+
children: l,
|
|
152
|
+
className: t,
|
|
153
|
+
...h
|
|
152
154
|
}) {
|
|
153
|
-
return /* @__PURE__ */ e(
|
|
155
|
+
return /* @__PURE__ */ e(u, { href: f, className: o(n.siteLink, t), ...h, children: l });
|
|
154
156
|
}
|
|
155
157
|
export {
|
|
156
|
-
|
|
158
|
+
ue as MainNav
|
|
157
159
|
};
|