@caseparts-org/caseblocks 0.0.98 → 0.0.100
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/Breadcrumbs.css +1 -0
- package/dist/assets/HorizontalScroll.css +1 -1
- package/dist/atoms/HorizontalScroll/HorizontalScroll.d.ts +10 -2
- package/dist/atoms/HorizontalScroll/HorizontalScroll.js +143 -45
- package/dist/atoms/HorizontalScroll/HorizontalScroll.stories.d.ts +4 -0
- package/dist/atoms/HorizontalScroll/HorizontalScroll.stories.js +132 -29
- package/dist/main-client.js +47 -45
- package/dist/main-server.d.ts +2 -0
- package/dist/main-server.js +17 -15
- package/dist/molecules/Breadcrumbs/Breadcrumbs.d.ts +9 -0
- package/dist/molecules/Breadcrumbs/Breadcrumbs.js +29 -0
- package/dist/molecules/Breadcrumbs/Breadcrumbs.stories.d.ts +32 -0
- package/dist/molecules/Breadcrumbs/Breadcrumbs.stories.js +69 -0
- package/dist/molecules/CategoryNav/CategoryNav.js +4 -2
- package/dist/organisms/MainNav/MainNav.stories.js +33 -18
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._nav_5oobe_1{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap}._crumb_5oobe_8{color:var(--color-brand-primary-primary-teal-blue);font-size:var(--font-size-xs)}._final_5oobe_13{pointer-events:none;color:#333}._nav_5oobe_1>span{padding:0 4px;font-size:var(--font-size-xs)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._root_1bnow_1{width:100%}._header_1bnow_5{display:flex;align-items:center;justify-content:space-between;width:100%;gap:var(--spacing-spacing-2xs);margin-bottom:var(--spacing-spacing-2xs)}._controls_1bnow_13{display:flex;align-items:center;gap:var(--spacing-spacing-2xs)}._controlBtn_1bnow_18{cursor:pointer;padding:var(--spacing-spacing-3xs);border:none;background-color:transparent;line-height:1;display:flex;align-items:center;justify-content:center}._controlBtn_1bnow_18:hover{color:var(--color-brand-primary-primary-teal-blue)}._controlBtn_1bnow_18:disabled:hover{cursor:default;color:var(--color-neutrals-neutral-3)}._container_1bnow_37{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;overflow-x:auto;width:100%;-webkit-overflow-scrolling:touch;cursor:grab;-webkit-user-select:none;user-select:none;overscroll-behavior:contain;touch-action:pan-x}._dragging_1bnow_50{cursor:grabbing}._noOverflow_1bnow_53{cursor:default}._scrollVisibility--false_1bnow_58{scrollbar-width:none;-ms-overflow-style:none}._scrollVisibility--false_1bnow_58::-webkit-scrollbar{display:none}._viewport_1bnow_66{position:relative}._indicator_1bnow_69{position:absolute;top:0;bottom:0;width:48px;pointer-events:none;opacity:1;transition:opacity .25s;z-index:1}._left_1bnow_79{left:0;background:linear-gradient(to right,var(--horizontal-scroll-indicator-color, rgba(0,0,0,.15)) 0%,rgba(0,0,0,0) 100%)}._right_1bnow_85{right:0;background:linear-gradient(to left,var(--horizontal-scroll-indicator-color, rgba(0,0,0,.15)) 0%,rgba(0,0,0,0) 100%)}._hidden_1bnow_91{opacity:0}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
export interface HorizontalScrollProps extends PropsWithChildren {
|
|
3
3
|
className?: string;
|
|
4
|
+
childrenSpacing?: number | string;
|
|
4
5
|
showScrollbar?: boolean;
|
|
6
|
+
caption?: ReactNode;
|
|
7
|
+
scrollStep?: number;
|
|
8
|
+
leftButtonContent?: ReactNode;
|
|
9
|
+
rightButtonContent?: ReactNode;
|
|
10
|
+
headerClassName?: string;
|
|
11
|
+
showIndicators?: boolean;
|
|
12
|
+
hideHeader?: boolean;
|
|
5
13
|
}
|
|
6
|
-
export declare function HorizontalScroll({ className, showScrollbar, children }: HorizontalScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function HorizontalScroll({ className, childrenSpacing, showScrollbar, children, caption, scrollStep, leftButtonContent, rightButtonContent, headerClassName, showIndicators, hideHeader, }: HorizontalScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,55 +1,153 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsxs as i, jsx as l, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as g, useState as h, useEffect as b } from "react";
|
|
3
|
+
import { Icon as N } from "../Icon/Icon.js";
|
|
4
|
+
import { Text as j } from "../Text/Text.js";
|
|
5
|
+
import { c as a } from "../../clsx-OuTLNxxd.js";
|
|
6
|
+
import '../../assets/HorizontalScroll.css';const F = "_root_1bnow_1", K = "_header_1bnow_5", q = "_controls_1bnow_13", G = "_controlBtn_1bnow_18", I = "_container_1bnow_37", U = "_dragging_1bnow_50", $ = "_noOverflow_1bnow_53", J = "_viewport_1bnow_66", Q = "_indicator_1bnow_69", Z = "_left_1bnow_79", tt = "_right_1bnow_85", et = "_hidden_1bnow_91", e = {
|
|
7
|
+
root: F,
|
|
8
|
+
header: K,
|
|
9
|
+
controls: q,
|
|
10
|
+
controlBtn: G,
|
|
11
|
+
container: I,
|
|
12
|
+
dragging: U,
|
|
13
|
+
noOverflow: $,
|
|
14
|
+
"scrollVisibility--false": "_scrollVisibility--false_1bnow_58",
|
|
15
|
+
viewport: J,
|
|
16
|
+
indicator: Q,
|
|
17
|
+
left: Z,
|
|
18
|
+
right: tt,
|
|
19
|
+
hidden: et
|
|
8
20
|
};
|
|
9
|
-
function
|
|
10
|
-
className:
|
|
11
|
-
|
|
12
|
-
|
|
21
|
+
function it({
|
|
22
|
+
className: S,
|
|
23
|
+
childrenSpacing: E,
|
|
24
|
+
showScrollbar: C = !1,
|
|
25
|
+
children: D,
|
|
26
|
+
caption: d,
|
|
27
|
+
scrollStep: m = 160,
|
|
28
|
+
leftButtonContent: W,
|
|
29
|
+
rightButtonContent: z,
|
|
30
|
+
headerClassName: O,
|
|
31
|
+
showIndicators: B = !0,
|
|
32
|
+
hideHeader: M = !1
|
|
33
|
+
// new default
|
|
13
34
|
}) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
35
|
+
const n = g(null), [p, w] = h(!1), s = g({ x: 0, scroll: 0 }), f = g(!1), P = 5, [_, R] = h(!0), [v, X] = h(!1), [u, k] = h(!1), c = () => {
|
|
36
|
+
const t = n.current;
|
|
37
|
+
if (!t) return;
|
|
38
|
+
const r = t.scrollWidth - t.clientWidth;
|
|
39
|
+
k(t.scrollWidth > t.clientWidth + 1), R(t.scrollLeft <= 0), X(t.scrollLeft >= r - 1);
|
|
40
|
+
}, A = (t) => {
|
|
41
|
+
!n.current || !u || (w(!0), s.current.x = t.clientX, s.current.scroll = n.current.scrollLeft, f.current = !1);
|
|
42
|
+
}, H = (t) => {
|
|
43
|
+
if (!p || !n.current) return;
|
|
44
|
+
const r = t.clientX - s.current.x;
|
|
45
|
+
n.current.scrollLeft = s.current.scroll - r, Math.abs(t.clientX - s.current.x) > P && (f.current = !0);
|
|
46
|
+
}, x = () => {
|
|
47
|
+
n.current && w(!1);
|
|
48
|
+
}, T = (t) => {
|
|
49
|
+
f.current && (t.preventDefault(), t.stopPropagation(), f.current = !1);
|
|
50
|
+
}, y = (t) => {
|
|
51
|
+
const r = n.current;
|
|
52
|
+
if (!r) return;
|
|
53
|
+
const o = Math.max(0, Math.min(r.scrollLeft + t, r.scrollWidth - r.clientWidth));
|
|
54
|
+
r.scrollTo({ left: o, behavior: "smooth" }), requestAnimationFrame(c);
|
|
24
55
|
};
|
|
25
|
-
|
|
26
|
-
const t =
|
|
56
|
+
b(() => {
|
|
57
|
+
const t = n.current;
|
|
27
58
|
if (!t) return;
|
|
28
|
-
const
|
|
59
|
+
const r = (o) => {
|
|
29
60
|
if (!(t.scrollWidth > t.clientWidth)) return;
|
|
30
|
-
const
|
|
31
|
-
|
|
61
|
+
const L = Math.abs(o.deltaY) >= Math.abs(o.deltaX) && o.deltaY !== 0 ? o.deltaY : o.deltaX;
|
|
62
|
+
L !== 0 ? (o.preventDefault(), t.scrollLeft += L) : o.preventDefault();
|
|
32
63
|
};
|
|
33
|
-
return t.addEventListener("wheel",
|
|
34
|
-
}, []),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
64
|
+
return t.addEventListener("wheel", r, { passive: !1 }), () => t.removeEventListener("wheel", r);
|
|
65
|
+
}, []), b(() => {
|
|
66
|
+
const t = n.current;
|
|
67
|
+
if (t)
|
|
68
|
+
return c(), t.addEventListener("scroll", c), () => t.removeEventListener("scroll", c);
|
|
69
|
+
}, []), b(() => {
|
|
70
|
+
const t = n.current;
|
|
71
|
+
if (!t || typeof ResizeObserver > "u") return;
|
|
72
|
+
const r = new ResizeObserver(() => c());
|
|
73
|
+
return r.observe(t), () => r.disconnect();
|
|
74
|
+
}, []);
|
|
75
|
+
const V = () => d == null ? null : typeof d == "string" ? /* @__PURE__ */ l(j, { variant: "display", size: "2xl", className: e.caption, children: d }) : d;
|
|
76
|
+
return /* @__PURE__ */ i("div", { className: a(e.root, S), children: [
|
|
77
|
+
!M && /* @__PURE__ */ i("div", { className: a(e.header, O), children: [
|
|
78
|
+
V(),
|
|
79
|
+
/* @__PURE__ */ i("div", { className: e.controls, children: [
|
|
80
|
+
/* @__PURE__ */ l(
|
|
81
|
+
"button",
|
|
82
|
+
{
|
|
83
|
+
type: "button",
|
|
84
|
+
className: e.controlBtn,
|
|
85
|
+
onClick: () => y(-m),
|
|
86
|
+
"aria-label": "Scroll left",
|
|
87
|
+
disabled: _,
|
|
88
|
+
"aria-disabled": _,
|
|
89
|
+
children: W ?? /* @__PURE__ */ l(N, { iconKey: "fa-regular fa-chevron-left", size: "sm" })
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
/* @__PURE__ */ l(
|
|
93
|
+
"button",
|
|
94
|
+
{
|
|
95
|
+
type: "button",
|
|
96
|
+
className: e.controlBtn,
|
|
97
|
+
onClick: () => y(m),
|
|
98
|
+
"aria-label": "Scroll right",
|
|
99
|
+
disabled: v,
|
|
100
|
+
"aria-disabled": v,
|
|
101
|
+
children: z ?? /* @__PURE__ */ l(N, { iconKey: "fa-regular fa-chevron-right", size: "sm" })
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
] })
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ i("div", { className: e.viewport, children: [
|
|
107
|
+
/* @__PURE__ */ l(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
ref: n,
|
|
111
|
+
style: { gap: E ?? "var(--spacing-spacing-3xs)" },
|
|
112
|
+
className: a(
|
|
113
|
+
e.container,
|
|
114
|
+
e[`scrollVisibility--${C}`],
|
|
115
|
+
p ? e.dragging : "",
|
|
116
|
+
!u && e.noOverflow
|
|
117
|
+
),
|
|
118
|
+
onPointerDown: A,
|
|
119
|
+
onPointerMove: H,
|
|
120
|
+
onPointerLeave: x,
|
|
121
|
+
onPointerUp: x,
|
|
122
|
+
onClickCapture: T,
|
|
123
|
+
children: D
|
|
124
|
+
}
|
|
43
125
|
),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
126
|
+
B && /* @__PURE__ */ i(Y, { children: [
|
|
127
|
+
/* @__PURE__ */ l(
|
|
128
|
+
"div",
|
|
129
|
+
{
|
|
130
|
+
className: a(
|
|
131
|
+
e.indicator,
|
|
132
|
+
e.left,
|
|
133
|
+
(_ || !u) && e.hidden
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
/* @__PURE__ */ l(
|
|
138
|
+
"div",
|
|
139
|
+
{
|
|
140
|
+
className: a(
|
|
141
|
+
e.indicator,
|
|
142
|
+
e.right,
|
|
143
|
+
(v || !u) && e.hidden
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
] })
|
|
148
|
+
] })
|
|
149
|
+
] });
|
|
52
150
|
}
|
|
53
151
|
export {
|
|
54
|
-
|
|
152
|
+
it as HorizontalScroll
|
|
55
153
|
};
|
|
@@ -7,6 +7,8 @@ interface DemoArgs {
|
|
|
7
7
|
gap: number;
|
|
8
8
|
rounded: boolean;
|
|
9
9
|
gradient: boolean;
|
|
10
|
+
showIndicators: boolean;
|
|
11
|
+
hideHeader: boolean;
|
|
10
12
|
}
|
|
11
13
|
type StoryArgs = DemoArgs;
|
|
12
14
|
declare const meta: Meta<StoryArgs>;
|
|
@@ -16,3 +18,5 @@ export declare const Playground: Story;
|
|
|
16
18
|
export declare const WithScrollbar: Story;
|
|
17
19
|
export declare const DenseSmallItems: Story;
|
|
18
20
|
export declare const LargeCards: Story;
|
|
21
|
+
export declare const WithoutIndicators: Story;
|
|
22
|
+
export declare const HeaderHidden: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { HorizontalScroll as r } from "./HorizontalScroll.js";
|
|
3
|
-
const
|
|
3
|
+
const b = {
|
|
4
4
|
title: "Case Parts/Atoms/HorizontalScroll",
|
|
5
5
|
component: r,
|
|
6
6
|
tags: ["autodocs"],
|
|
@@ -49,6 +49,14 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
49
49
|
gradient: {
|
|
50
50
|
control: { type: "boolean" },
|
|
51
51
|
description: "Use gradient background instead of solid."
|
|
52
|
+
},
|
|
53
|
+
showIndicators: {
|
|
54
|
+
control: { type: "boolean" },
|
|
55
|
+
description: "Show gradient edge scroll affordances."
|
|
56
|
+
},
|
|
57
|
+
hideHeader: {
|
|
58
|
+
control: { type: "boolean" },
|
|
59
|
+
description: "Hide the caption row and arrow controls."
|
|
52
60
|
}
|
|
53
61
|
},
|
|
54
62
|
args: {
|
|
@@ -58,9 +66,13 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
58
66
|
itemHeight: 80,
|
|
59
67
|
gap: 12,
|
|
60
68
|
rounded: !0,
|
|
61
|
-
gradient: !0
|
|
69
|
+
gradient: !0,
|
|
70
|
+
showIndicators: !0,
|
|
71
|
+
// new default
|
|
72
|
+
hideHeader: !1
|
|
73
|
+
// new default
|
|
62
74
|
}
|
|
63
|
-
},
|
|
75
|
+
}, i = /* @__PURE__ */ o("style", { children: `
|
|
64
76
|
.horizontalDemoScroll {
|
|
65
77
|
touch-action: none; /* ensure pointer events for horizontal drag */
|
|
66
78
|
}
|
|
@@ -68,9 +80,9 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
68
80
|
-webkit-user-drag: none; /* Safari/Chrome: prevent ghost dragging of link */
|
|
69
81
|
}
|
|
70
82
|
` }), n = (e) => {
|
|
71
|
-
const { itemCount:
|
|
72
|
-
return Array.from({ length:
|
|
73
|
-
const
|
|
83
|
+
const { itemCount: d, itemWidth: s, itemHeight: a, gap: c, rounded: h, gradient: m } = e;
|
|
84
|
+
return Array.from({ length: d }, (g, p) => {
|
|
85
|
+
const l = p + 1;
|
|
74
86
|
return /* @__PURE__ */ o(
|
|
75
87
|
"a",
|
|
76
88
|
{
|
|
@@ -78,41 +90,61 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
78
90
|
draggable: !1,
|
|
79
91
|
style: {
|
|
80
92
|
flex: "0 0 auto",
|
|
81
|
-
width:
|
|
82
|
-
height:
|
|
83
|
-
marginRight:
|
|
93
|
+
width: s,
|
|
94
|
+
height: a,
|
|
95
|
+
marginRight: c,
|
|
84
96
|
borderRadius: h ? 8 : 0,
|
|
85
97
|
background: m ? "linear-gradient(135deg,#4F46E5,#6366F1)" : "#4F46E5",
|
|
86
98
|
color: "#fff",
|
|
87
99
|
display: "flex",
|
|
88
100
|
alignItems: "center",
|
|
89
101
|
justifyContent: "center",
|
|
90
|
-
fontSize: Math.max(12, Math.min(24,
|
|
102
|
+
fontSize: Math.max(12, Math.min(24, a / 3)),
|
|
91
103
|
fontWeight: 600,
|
|
92
104
|
userSelect: "none",
|
|
93
105
|
boxShadow: "0 2px 6px rgba(0,0,0,0.25)"
|
|
94
106
|
},
|
|
95
|
-
children:
|
|
107
|
+
children: l
|
|
96
108
|
},
|
|
97
|
-
|
|
109
|
+
l
|
|
98
110
|
);
|
|
99
111
|
});
|
|
100
|
-
},
|
|
112
|
+
}, S = {
|
|
101
113
|
name: "Playground",
|
|
102
114
|
render: (e) => /* @__PURE__ */ t("div", { style: { padding: 24 }, children: [
|
|
103
|
-
|
|
115
|
+
i,
|
|
104
116
|
/* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "HorizontalScroll Playground" }),
|
|
105
117
|
/* @__PURE__ */ o("p", { style: { margin: "0 0 16px", fontSize: 14, color: "#555" }, children: "Drag horizontally or use the mouse wheel. Tweak values in Controls." }),
|
|
106
|
-
/* @__PURE__ */ o(
|
|
118
|
+
/* @__PURE__ */ o(
|
|
119
|
+
r,
|
|
120
|
+
{
|
|
121
|
+
className: "horizontalDemoScroll",
|
|
122
|
+
showScrollbar: e.showScrollbar,
|
|
123
|
+
showIndicators: e.showIndicators,
|
|
124
|
+
hideHeader: e.hideHeader,
|
|
125
|
+
caption: `Playground (${e.itemCount} items)`,
|
|
126
|
+
children: n(e)
|
|
127
|
+
}
|
|
128
|
+
)
|
|
107
129
|
] })
|
|
108
|
-
},
|
|
130
|
+
}, y = {
|
|
109
131
|
args: { showScrollbar: !0 },
|
|
110
132
|
render: (e) => /* @__PURE__ */ t("div", { style: { padding: 24 }, children: [
|
|
111
|
-
|
|
133
|
+
i,
|
|
112
134
|
/* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Scrollbar Visible" }),
|
|
113
|
-
/* @__PURE__ */ o(
|
|
135
|
+
/* @__PURE__ */ o(
|
|
136
|
+
r,
|
|
137
|
+
{
|
|
138
|
+
className: "horizontalDemoScroll",
|
|
139
|
+
showScrollbar: !0,
|
|
140
|
+
showIndicators: e.showIndicators,
|
|
141
|
+
hideHeader: e.hideHeader,
|
|
142
|
+
caption: "Scrollbar Visible",
|
|
143
|
+
children: n(e)
|
|
144
|
+
}
|
|
145
|
+
)
|
|
114
146
|
] })
|
|
115
|
-
},
|
|
147
|
+
}, f = {
|
|
116
148
|
args: {
|
|
117
149
|
itemCount: 40,
|
|
118
150
|
itemWidth: 90,
|
|
@@ -121,11 +153,21 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
121
153
|
showScrollbar: !1
|
|
122
154
|
},
|
|
123
155
|
render: (e) => /* @__PURE__ */ t("div", { style: { padding: 24 }, children: [
|
|
124
|
-
|
|
156
|
+
i,
|
|
125
157
|
/* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Dense Small Items" }),
|
|
126
|
-
/* @__PURE__ */ o(
|
|
158
|
+
/* @__PURE__ */ o(
|
|
159
|
+
r,
|
|
160
|
+
{
|
|
161
|
+
className: "horizontalDemoScroll",
|
|
162
|
+
showScrollbar: e.showScrollbar,
|
|
163
|
+
showIndicators: e.showIndicators,
|
|
164
|
+
hideHeader: e.hideHeader,
|
|
165
|
+
caption: `Dense (${e.itemCount} items)`,
|
|
166
|
+
children: n(e)
|
|
167
|
+
}
|
|
168
|
+
)
|
|
127
169
|
] })
|
|
128
|
-
},
|
|
170
|
+
}, H = {
|
|
129
171
|
args: {
|
|
130
172
|
itemCount: 12,
|
|
131
173
|
itemWidth: 260,
|
|
@@ -134,15 +176,76 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
134
176
|
gradient: !1
|
|
135
177
|
},
|
|
136
178
|
render: (e) => /* @__PURE__ */ t("div", { style: { padding: 24 }, children: [
|
|
137
|
-
|
|
179
|
+
i,
|
|
138
180
|
/* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Large Cards" }),
|
|
139
|
-
/* @__PURE__ */ o(
|
|
181
|
+
/* @__PURE__ */ o(
|
|
182
|
+
r,
|
|
183
|
+
{
|
|
184
|
+
className: "horizontalDemoScroll",
|
|
185
|
+
showScrollbar: e.showScrollbar,
|
|
186
|
+
showIndicators: e.showIndicators,
|
|
187
|
+
hideHeader: e.hideHeader,
|
|
188
|
+
caption: "Large Cards",
|
|
189
|
+
children: n(e)
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
] })
|
|
193
|
+
}, x = {
|
|
194
|
+
name: "Without Indicators",
|
|
195
|
+
args: {
|
|
196
|
+
showIndicators: !1,
|
|
197
|
+
itemCount: 16,
|
|
198
|
+
itemWidth: 140,
|
|
199
|
+
itemHeight: 72,
|
|
200
|
+
gap: 12
|
|
201
|
+
},
|
|
202
|
+
render: (e) => /* @__PURE__ */ t("div", { style: { padding: 24 }, children: [
|
|
203
|
+
i,
|
|
204
|
+
/* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Indicators Disabled" }),
|
|
205
|
+
/* @__PURE__ */ o(
|
|
206
|
+
r,
|
|
207
|
+
{
|
|
208
|
+
className: "horizontalDemoScroll",
|
|
209
|
+
showScrollbar: e.showScrollbar,
|
|
210
|
+
showIndicators: !1,
|
|
211
|
+
hideHeader: e.hideHeader,
|
|
212
|
+
caption: "No Edge Indicators",
|
|
213
|
+
children: n(e)
|
|
214
|
+
}
|
|
215
|
+
)
|
|
216
|
+
] })
|
|
217
|
+
}, I = {
|
|
218
|
+
name: "Header Hidden",
|
|
219
|
+
args: {
|
|
220
|
+
hideHeader: !0,
|
|
221
|
+
itemCount: 14,
|
|
222
|
+
itemWidth: 130,
|
|
223
|
+
itemHeight: 70,
|
|
224
|
+
gap: 10,
|
|
225
|
+
showIndicators: !0
|
|
226
|
+
},
|
|
227
|
+
render: (e) => /* @__PURE__ */ t("div", { style: { padding: 24 }, children: [
|
|
228
|
+
i,
|
|
229
|
+
/* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Header Hidden" }),
|
|
230
|
+
/* @__PURE__ */ o(
|
|
231
|
+
r,
|
|
232
|
+
{
|
|
233
|
+
className: "horizontalDemoScroll",
|
|
234
|
+
showScrollbar: e.showScrollbar,
|
|
235
|
+
showIndicators: e.showIndicators,
|
|
236
|
+
hideHeader: !0,
|
|
237
|
+
caption: "(Will not render since header hidden)",
|
|
238
|
+
children: n(e)
|
|
239
|
+
}
|
|
240
|
+
)
|
|
140
241
|
] })
|
|
141
242
|
};
|
|
142
243
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
244
|
+
f as DenseSmallItems,
|
|
245
|
+
I as HeaderHidden,
|
|
246
|
+
H as LargeCards,
|
|
247
|
+
S as Playground,
|
|
248
|
+
y as WithScrollbar,
|
|
249
|
+
x as WithoutIndicators,
|
|
250
|
+
b as default
|
|
148
251
|
};
|
package/dist/main-client.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Button as t } from "./atoms/Button/Button.js";
|
|
2
2
|
import { Flex as p } from "./atoms/Flex/Flex.js";
|
|
3
3
|
import { Column as f, Grid as x } from "./atoms/Grid/Grid.js";
|
|
4
|
-
import { Head as
|
|
4
|
+
import { Head as n } from "./atoms/Root/Head.js";
|
|
5
5
|
import { Icon as l } from "./atoms/Icon/Icon.js";
|
|
6
6
|
import { Root as d } from "./atoms/Root/Root.js";
|
|
7
7
|
import { Separator as C } from "./atoms/Separator/Separator.js";
|
|
8
8
|
import { Text as k } from "./atoms/Text/Text.js";
|
|
9
|
-
import { Input as
|
|
10
|
-
import { Link as
|
|
9
|
+
import { Input as B } from "./atoms/Input/Input.js";
|
|
10
|
+
import { Link as A } from "./atoms/Link/Link.js";
|
|
11
11
|
import { linkClassName as h } from "./atoms/Link/linkClassName.js";
|
|
12
|
-
import { configureLink as
|
|
12
|
+
import { configureLink as v, routerOverride as P } from "./atoms/Link/configureLink.js";
|
|
13
13
|
import { LinkButton as F } from "./atoms/LinkButton/LinkButton.js";
|
|
14
|
-
import { configureImage as
|
|
15
|
-
import { Logo as
|
|
14
|
+
import { configureImage as b } from "./atoms/Image/configureImage.js";
|
|
15
|
+
import { Logo as H } from "./molecules/Logo/Logo.js";
|
|
16
16
|
import { SearchBox as w } from "./molecules/SearchBox/SearchBox.js";
|
|
17
17
|
import { QuantityInput as G } from "./molecules/QuantityInput/QuantityInput.js";
|
|
18
18
|
import { Pricing as Q } from "./molecules/Pricing/Pricing.js";
|
|
@@ -20,61 +20,63 @@ import { Availability as V } from "./molecules/Availability/Availability.js";
|
|
|
20
20
|
import { Avatar as q } from "./molecules/Avatar/Avatar.js";
|
|
21
21
|
import { BannerCard as E } from "./molecules/BannerCard/BannerCard.js";
|
|
22
22
|
import { CardLink as K } from "./molecules/CardLink/CardLink.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
23
|
+
import { Breadcrumbs as W } from "./molecules/Breadcrumbs/Breadcrumbs.js";
|
|
24
|
+
import { NotFound as Y } from "./organisms/NotFound/NotFound.js";
|
|
25
|
+
import { HorizontalScroll as _ } from "./atoms/HorizontalScroll/HorizontalScroll.js";
|
|
26
|
+
import { SlideInPanel as oo } from "./atoms/SlideInPanel/SlideInPanel.js";
|
|
27
|
+
import { Tooltip as to } from "./atoms/Tooltip/Tooltip.js";
|
|
28
|
+
import { Account as po } from "./molecules/Account/Account.js";
|
|
29
|
+
import { Chip as fo } from "./molecules/Chip/Chip.js";
|
|
30
|
+
import { ToggleView as ao } from "./molecules/ToggleView/ToggleView.js";
|
|
31
|
+
import { CartSlideInPanel as io } from "./molecules/Cart/CartSlideInPanel.js";
|
|
32
|
+
import { StatefulButton as uo } from "./molecules/StatefulButton/StatefulButton.js";
|
|
33
|
+
import { AnimatedCheckMark as Co } from "./molecules/StatefulButton/AnimatedCheckmark.js";
|
|
34
|
+
import { AddToCart as ko } from "./molecules/AddToCart/AddToCart.js";
|
|
35
|
+
import { MainNav as Bo } from "./organisms/MainNav/MainNav.js";
|
|
36
|
+
import { ChipSelector as Ao } from "./organisms/ChipSelector/ChipSelector.js";
|
|
37
|
+
import { Product as ho } from "./organisms/Product/Product.js";
|
|
38
|
+
import { Carousel as vo } from "./organisms/Carousel/Carousel.js";
|
|
39
|
+
import { Footer as To } from "./organisms/Footer/Footer.js";
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
po as Account,
|
|
42
|
+
ko as AddToCart,
|
|
43
|
+
Co as AnimatedCheckMark,
|
|
43
44
|
V as Availability,
|
|
44
45
|
q as Avatar,
|
|
45
46
|
E as BannerCard,
|
|
47
|
+
W as Breadcrumbs,
|
|
46
48
|
t as Button,
|
|
47
49
|
K as CardLink,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
vo as Carousel,
|
|
51
|
+
io as CartSlideInPanel,
|
|
52
|
+
fo as Chip,
|
|
53
|
+
Ao as ChipSelector,
|
|
52
54
|
f as Column,
|
|
53
55
|
p as Flex,
|
|
54
|
-
|
|
56
|
+
To as Footer,
|
|
55
57
|
x as Grid,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
n as Head,
|
|
59
|
+
_ as HorizontalScroll,
|
|
58
60
|
l as Icon,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
B as Input,
|
|
62
|
+
A as Link,
|
|
61
63
|
F as LinkButton,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
H as Logo,
|
|
65
|
+
Bo as MainNav,
|
|
66
|
+
Y as NotFound,
|
|
65
67
|
Q as Pricing,
|
|
66
|
-
|
|
68
|
+
ho as Product,
|
|
67
69
|
G as QuantityInput,
|
|
68
70
|
d as Root,
|
|
69
71
|
w as SearchBox,
|
|
70
72
|
C as Separator,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
oo as SlideInPanel,
|
|
74
|
+
uo as StatefulButton,
|
|
73
75
|
k as Text,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
ao as ToggleView,
|
|
77
|
+
to as Tooltip,
|
|
78
|
+
b as configureImage,
|
|
79
|
+
v as configureLink,
|
|
78
80
|
h as linkClassName,
|
|
79
|
-
|
|
81
|
+
P as routerOverride
|
|
80
82
|
};
|
package/dist/main-server.d.ts
CHANGED
|
@@ -37,5 +37,7 @@ export { BannerCard } from './molecules/BannerCard/BannerCard';
|
|
|
37
37
|
export type { BannerCardProps } from './molecules/BannerCard/BannerCard';
|
|
38
38
|
export { CardLink } from './molecules/CardLink/CardLink';
|
|
39
39
|
export type { CardLinkProps } from './molecules/CardLink/CardLink';
|
|
40
|
+
export { Breadcrumbs } from './molecules/Breadcrumbs/Breadcrumbs';
|
|
41
|
+
export type { BreadcrumbProps, Breadcrumb } from './molecules/Breadcrumbs/Breadcrumbs';
|
|
40
42
|
export { NotFound } from './organisms/NotFound/NotFound';
|
|
41
43
|
export type { NotFoundProps } from './organisms/NotFound/NotFound';
|
package/dist/main-server.js
CHANGED
|
@@ -3,14 +3,14 @@ import { Flex as m } from "./atoms/Flex/Flex.js";
|
|
|
3
3
|
import { Column as x, Grid as f } from "./atoms/Grid/Grid.js";
|
|
4
4
|
import { Head as a } from "./atoms/Root/Head.js";
|
|
5
5
|
import { Icon as u } from "./atoms/Icon/Icon.js";
|
|
6
|
-
import { Root as
|
|
6
|
+
import { Root as c } from "./atoms/Root/Root.js";
|
|
7
7
|
import { Separator as g } from "./atoms/Separator/Separator.js";
|
|
8
|
-
import { Text as
|
|
8
|
+
import { Text as B } from "./atoms/Text/Text.js";
|
|
9
9
|
import { Input as C } from "./atoms/Input/Input.js";
|
|
10
|
-
import { Link as
|
|
11
|
-
import { linkClassName as
|
|
12
|
-
import { configureLink as
|
|
13
|
-
import { LinkButton as
|
|
10
|
+
import { Link as s } from "./atoms/Link/Link.js";
|
|
11
|
+
import { linkClassName as b } from "./atoms/Link/linkClassName.js";
|
|
12
|
+
import { configureLink as A, routerOverride as F } from "./atoms/Link/configureLink.js";
|
|
13
|
+
import { LinkButton as S } from "./atoms/LinkButton/LinkButton.js";
|
|
14
14
|
import { configureImage as G } from "./atoms/Image/configureImage.js";
|
|
15
15
|
import { Logo as O } from "./molecules/Logo/Logo.js";
|
|
16
16
|
import { SearchBox as Q } from "./molecules/SearchBox/SearchBox.js";
|
|
@@ -20,11 +20,13 @@ import { Availability as z } from "./molecules/Availability/Availability.js";
|
|
|
20
20
|
import { Avatar as E } from "./molecules/Avatar/Avatar.js";
|
|
21
21
|
import { BannerCard as K } from "./molecules/BannerCard/BannerCard.js";
|
|
22
22
|
import { CardLink as U } from "./molecules/CardLink/CardLink.js";
|
|
23
|
-
import {
|
|
23
|
+
import { Breadcrumbs as W } from "./molecules/Breadcrumbs/Breadcrumbs.js";
|
|
24
|
+
import { NotFound as Y } from "./organisms/NotFound/NotFound.js";
|
|
24
25
|
export {
|
|
25
26
|
z as Availability,
|
|
26
27
|
E as Avatar,
|
|
27
28
|
K as BannerCard,
|
|
29
|
+
W as Breadcrumbs,
|
|
28
30
|
t as Button,
|
|
29
31
|
U as CardLink,
|
|
30
32
|
x as Column,
|
|
@@ -33,18 +35,18 @@ export {
|
|
|
33
35
|
a as Head,
|
|
34
36
|
u as Icon,
|
|
35
37
|
C as Input,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
s as Link,
|
|
39
|
+
S as LinkButton,
|
|
38
40
|
O as Logo,
|
|
39
|
-
|
|
41
|
+
Y as NotFound,
|
|
40
42
|
q as Pricing,
|
|
41
43
|
T as QuantityInput,
|
|
42
|
-
|
|
44
|
+
c as Root,
|
|
43
45
|
Q as SearchBox,
|
|
44
46
|
g as Separator,
|
|
45
|
-
|
|
47
|
+
B as Text,
|
|
46
48
|
G as configureImage,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
A as configureLink,
|
|
50
|
+
b as linkClassName,
|
|
51
|
+
F as routerOverride
|
|
50
52
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface Breadcrumb {
|
|
3
|
+
href: string;
|
|
4
|
+
label: string | React.ReactElement;
|
|
5
|
+
}
|
|
6
|
+
export interface BreadcrumbProps {
|
|
7
|
+
breadcrumbs: Breadcrumb[];
|
|
8
|
+
}
|
|
9
|
+
export declare function Breadcrumbs({ breadcrumbs }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import s from "react";
|
|
3
|
+
import { Link as c } from "../../atoms/Link/Link.js";
|
|
4
|
+
import '../../assets/Breadcrumbs.css';const r = "_nav_5oobe_1", _ = "_crumb_5oobe_8", h = "_final_5oobe_13", l = {
|
|
5
|
+
nav: r,
|
|
6
|
+
crumb: _,
|
|
7
|
+
final: h
|
|
8
|
+
};
|
|
9
|
+
function g({
|
|
10
|
+
breadcrumbs: n
|
|
11
|
+
}) {
|
|
12
|
+
return !n || (n == null ? void 0 : n.length) === 0 ? null : /* @__PURE__ */ t("nav", { className: l.nav, children: n.map((o, e) => {
|
|
13
|
+
const a = e === n.length - 1, i = a && n.length > 1;
|
|
14
|
+
return /* @__PURE__ */ f(s.Fragment, { children: [
|
|
15
|
+
/* @__PURE__ */ t(
|
|
16
|
+
c,
|
|
17
|
+
{
|
|
18
|
+
href: o.href,
|
|
19
|
+
className: `${l.crumb} ${i ? l.final : ""}`,
|
|
20
|
+
children: o.label
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
!a && /* @__PURE__ */ t("span", { children: "/" })
|
|
24
|
+
] }, `breadcrumb.${e}`);
|
|
25
|
+
}) });
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
g as Breadcrumbs
|
|
29
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Breadcrumbs } from './Breadcrumbs';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Breadcrumbs;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
breadcrumbs: {
|
|
12
|
+
control: {
|
|
13
|
+
type: "object";
|
|
14
|
+
};
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
args: {
|
|
19
|
+
breadcrumbs: {
|
|
20
|
+
href: string;
|
|
21
|
+
label: string;
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
export declare const Default: Story;
|
|
28
|
+
export declare const SingleCrumb: Story;
|
|
29
|
+
export declare const Empty: Story;
|
|
30
|
+
export declare const WithElementLabel: Story;
|
|
31
|
+
export declare const ManyCrumbs: Story;
|
|
32
|
+
export declare const Playground: Story;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Breadcrumbs as a } from "./Breadcrumbs.js";
|
|
3
|
+
const l = {
|
|
4
|
+
title: "Case Parts/Molecules/Breadcrumbs",
|
|
5
|
+
component: a,
|
|
6
|
+
parameters: { layout: "centered" },
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
argTypes: {
|
|
9
|
+
breadcrumbs: {
|
|
10
|
+
control: { type: "object" },
|
|
11
|
+
description: "Array of breadcrumb items: { href, label }"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
breadcrumbs: [
|
|
16
|
+
{ href: "/", label: "Home" },
|
|
17
|
+
{ href: "/products", label: "Products" },
|
|
18
|
+
{ href: "/products/widgets", label: "Widgets" }
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}, o = {
|
|
22
|
+
render: (r) => /* @__PURE__ */ e(a, { ...r })
|
|
23
|
+
}, b = {
|
|
24
|
+
args: {
|
|
25
|
+
breadcrumbs: [{ href: "/", label: "Home" }]
|
|
26
|
+
}
|
|
27
|
+
}, c = {
|
|
28
|
+
args: {
|
|
29
|
+
breadcrumbs: []
|
|
30
|
+
},
|
|
31
|
+
name: "Empty"
|
|
32
|
+
}, n = {
|
|
33
|
+
args: {
|
|
34
|
+
breadcrumbs: [
|
|
35
|
+
{ href: "/", label: /* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: "Home" }) },
|
|
36
|
+
{ href: "/team", label: /* @__PURE__ */ e("em", { children: "Team" }) },
|
|
37
|
+
{ href: "/team/engineering", label: /* @__PURE__ */ e("strong", { children: "Engineering" }) }
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}, m = {
|
|
41
|
+
args: {
|
|
42
|
+
breadcrumbs: [
|
|
43
|
+
{ href: "/", label: "Home" },
|
|
44
|
+
{ href: "/section", label: "Section" },
|
|
45
|
+
{ href: "/section/sub", label: "Sub" },
|
|
46
|
+
{ href: "/section/sub/topic", label: "Topic" },
|
|
47
|
+
{ href: "/section/sub/topic/deep", label: "Deep" },
|
|
48
|
+
{ href: "/section/sub/topic/deep/final", label: "Final" }
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}, d = {
|
|
52
|
+
render: (r) => /* @__PURE__ */ e(a, { ...r }),
|
|
53
|
+
args: {
|
|
54
|
+
breadcrumbs: [
|
|
55
|
+
{ href: "/", label: "Home" },
|
|
56
|
+
{ href: "/products", label: "Products" },
|
|
57
|
+
{ href: "/products/widgets", label: "Widgets" }
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
o as Default,
|
|
63
|
+
c as Empty,
|
|
64
|
+
m as ManyCrumbs,
|
|
65
|
+
d as Playground,
|
|
66
|
+
b as SingleCrumb,
|
|
67
|
+
n as WithElementLabel,
|
|
68
|
+
l as default
|
|
69
|
+
};
|
|
@@ -5,10 +5,10 @@ import { Link as s } from "../../atoms/Link/Link.js";
|
|
|
5
5
|
import { Icon as m } from "../../atoms/Icon/Icon.js";
|
|
6
6
|
import { getHideAtStyles as c } from "../../atoms/HideAt.js";
|
|
7
7
|
import { Tooltip as d } from "../../atoms/Tooltip/Tooltip.js";
|
|
8
|
-
import '../../assets/CategoryNav.css';const h = "_categories_1of98_1", f = "_category_1of98_17",
|
|
8
|
+
import '../../assets/CategoryNav.css';const h = "_categories_1of98_1", f = "_category_1of98_17", p = "_submenuTooltip_1of98_43", o = {
|
|
9
9
|
categories: h,
|
|
10
10
|
category: f,
|
|
11
|
-
submenuTooltip:
|
|
11
|
+
submenuTooltip: p
|
|
12
12
|
};
|
|
13
13
|
function z({
|
|
14
14
|
categories: l
|
|
@@ -17,6 +17,8 @@ function z({
|
|
|
17
17
|
(i) => i.children.length > 0 ? /* @__PURE__ */ e(
|
|
18
18
|
d,
|
|
19
19
|
{
|
|
20
|
+
openDelay: 180,
|
|
21
|
+
closeDelay: 0,
|
|
20
22
|
trigger: /* @__PURE__ */ e("li", { className: o.category, tabIndex: 0, children: /* @__PURE__ */ t(s, { href: i.route, children: [
|
|
21
23
|
/* @__PURE__ */ e(n, { size: "sm", weight: "semibold", children: i.label }),
|
|
22
24
|
i.showChevron && /* @__PURE__ */ e(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as u, Fragment as s, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { useState as b } from "react";
|
|
3
3
|
import { MainNav as d } from "./MainNav.js";
|
|
4
4
|
import { CartSlideInPanel as m } from "../../molecules/Cart/CartSlideInPanel.js";
|
|
5
|
-
const
|
|
5
|
+
const I = {
|
|
6
6
|
title: "Case Parts/Organisms/MainNav",
|
|
7
7
|
component: d,
|
|
8
8
|
parameters: {
|
|
@@ -10,7 +10,7 @@ const g = {
|
|
|
10
10
|
layout: "fullscreen"
|
|
11
11
|
}
|
|
12
12
|
// tags: ["autodocs"],
|
|
13
|
-
},
|
|
13
|
+
}, o = [
|
|
14
14
|
{
|
|
15
15
|
id: 0,
|
|
16
16
|
label: "Shop by Brands",
|
|
@@ -38,19 +38,34 @@ const g = {
|
|
|
38
38
|
id: 2,
|
|
39
39
|
label: "Hardware",
|
|
40
40
|
route: "#",
|
|
41
|
-
children: [
|
|
41
|
+
children: [
|
|
42
|
+
{ id: 29, label: "Hardware1", route: "/anthony" },
|
|
43
|
+
{ id: 30, label: "Hardware2", route: "/beverage" },
|
|
44
|
+
{ id: 31, label: "Hardwaren3", route: "/continental" },
|
|
45
|
+
{ id: 32, label: "Hardware4", route: "/delfield" }
|
|
46
|
+
]
|
|
42
47
|
},
|
|
43
48
|
{
|
|
44
49
|
id: 3,
|
|
45
50
|
label: "Refrigeration",
|
|
46
51
|
route: "#",
|
|
47
|
-
children: [
|
|
52
|
+
children: [
|
|
53
|
+
{ id: 33, label: "Refrigeration1", route: "/anthony" },
|
|
54
|
+
{ id: 34, label: "Refrigeration2", route: "/beverage" },
|
|
55
|
+
{ id: 34, label: "Refrigeration3", route: "/continental" },
|
|
56
|
+
{ id: 35, label: "Refrigeration4", route: "/delfield" }
|
|
57
|
+
]
|
|
48
58
|
},
|
|
49
59
|
{
|
|
50
60
|
id: 4,
|
|
51
61
|
label: "Controls",
|
|
52
62
|
route: "#",
|
|
53
|
-
children: [
|
|
63
|
+
children: [
|
|
64
|
+
{ id: 36, label: "Controls1", route: "/anthony" },
|
|
65
|
+
{ id: 37, label: "Controls2", route: "/beverage" },
|
|
66
|
+
{ id: 38, label: "Controls3", route: "/continental" },
|
|
67
|
+
{ id: 39, label: "Controls4", route: "/delfield" }
|
|
68
|
+
]
|
|
54
69
|
},
|
|
55
70
|
{
|
|
56
71
|
id: 5,
|
|
@@ -111,20 +126,20 @@ function y(e) {
|
|
|
111
126
|
).toFixed(2)}`;
|
|
112
127
|
}
|
|
113
128
|
const n = (e) => {
|
|
114
|
-
const [
|
|
115
|
-
return /* @__PURE__ */ s
|
|
129
|
+
const [l, t] = b(!1);
|
|
130
|
+
return /* @__PURE__ */ u(s, { children: [
|
|
116
131
|
/* @__PURE__ */ c(
|
|
117
132
|
d,
|
|
118
133
|
{
|
|
119
134
|
...e,
|
|
120
|
-
open:
|
|
135
|
+
open: l,
|
|
121
136
|
onCartClick: () => t((i) => !i)
|
|
122
137
|
}
|
|
123
138
|
),
|
|
124
139
|
/* @__PURE__ */ c(
|
|
125
140
|
m,
|
|
126
141
|
{
|
|
127
|
-
open:
|
|
142
|
+
open: l,
|
|
128
143
|
onClose: () => t(!1),
|
|
129
144
|
cart: e.cart,
|
|
130
145
|
subtotal: y(e.cart),
|
|
@@ -157,10 +172,10 @@ const n = (e) => {
|
|
|
157
172
|
onCartClick: () => {
|
|
158
173
|
},
|
|
159
174
|
// placeholder required by component
|
|
160
|
-
categories:
|
|
175
|
+
categories: o
|
|
161
176
|
},
|
|
162
177
|
render: n
|
|
163
|
-
},
|
|
178
|
+
}, C = {
|
|
164
179
|
args: {
|
|
165
180
|
account: { name: "Ringo", initials: "RS", number: "123456789012" },
|
|
166
181
|
cart: r,
|
|
@@ -179,10 +194,10 @@ const n = (e) => {
|
|
|
179
194
|
},
|
|
180
195
|
onCartClick: () => {
|
|
181
196
|
},
|
|
182
|
-
categories:
|
|
197
|
+
categories: o
|
|
183
198
|
},
|
|
184
199
|
render: n
|
|
185
|
-
},
|
|
200
|
+
}, f = {
|
|
186
201
|
args: {
|
|
187
202
|
cart: r,
|
|
188
203
|
homeRoute: "/",
|
|
@@ -200,13 +215,13 @@ const n = (e) => {
|
|
|
200
215
|
},
|
|
201
216
|
onCartClick: () => {
|
|
202
217
|
},
|
|
203
|
-
categories:
|
|
218
|
+
categories: o
|
|
204
219
|
},
|
|
205
220
|
render: n
|
|
206
221
|
};
|
|
207
222
|
export {
|
|
208
223
|
S as Authenticated,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
224
|
+
f as Unauthenticated,
|
|
225
|
+
C as WithCartItems,
|
|
226
|
+
I as default
|
|
212
227
|
};
|