@caseparts-org/caseblocks 0.0.99 → 0.0.101
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/HorizontalScroll.css +1 -1
- package/dist/atoms/HorizontalScroll/HorizontalScroll.d.ts +3 -1
- package/dist/atoms/HorizontalScroll/HorizontalScroll.js +79 -75
- package/dist/atoms/HorizontalScroll/HorizontalScroll.stories.d.ts +1 -1
- package/dist/atoms/HorizontalScroll/HorizontalScroll.stories.js +59 -56
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._root_12m2a_1{width:100%}._header_12m2a_5{display:flex;align-items:center;justify-content:space-between;width:100%;gap:var(--spacing-spacing-2xs);margin-bottom:var(--spacing-spacing-2xs)}._controls_12m2a_13{display:flex;align-items:center;gap:var(--spacing-spacing-2xs)}._controlBtn_12m2a_18{cursor:pointer;padding:0;border:none;background-color:transparent;line-height:1;display:flex;align-items:center;justify-content:center}._controlBtn_12m2a_18:hover{color:var(--color-brand-primary-primary-teal-blue)}._controlBtn_12m2a_18:disabled:hover{cursor:default;color:var(--color-neutrals-neutral-3)}._container_12m2a_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_12m2a_50{cursor:grabbing}._noOverflow_12m2a_53{cursor:default}._scrollVisibility--false_12m2a_58{scrollbar-width:none;-ms-overflow-style:none}._scrollVisibility--false_12m2a_58::-webkit-scrollbar{display:none}._viewport_12m2a_66{position:relative}._indicator_12m2a_69{position:absolute;top:0;bottom:0;width:48px;pointer-events:none;opacity:1;transition:opacity .25s;z-index:1}._left_12m2a_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_12m2a_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_12m2a_91{opacity:0}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
export interface HorizontalScrollProps extends PropsWithChildren {
|
|
3
3
|
className?: string;
|
|
4
|
+
childrenContainerClassName?: string;
|
|
5
|
+
childrenSpacing?: number | string;
|
|
4
6
|
showScrollbar?: boolean;
|
|
5
7
|
caption?: ReactNode;
|
|
6
8
|
scrollStep?: number;
|
|
@@ -10,4 +12,4 @@ export interface HorizontalScrollProps extends PropsWithChildren {
|
|
|
10
12
|
showIndicators?: boolean;
|
|
11
13
|
hideHeader?: boolean;
|
|
12
14
|
}
|
|
13
|
-
export declare function HorizontalScroll({ className, showScrollbar, children, caption, scrollStep, leftButtonContent, rightButtonContent, headerClassName, showIndicators, hideHeader, }: HorizontalScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function HorizontalScroll({ className, childrenContainerClassName, childrenSpacing, showScrollbar, children, caption, scrollStep, leftButtonContent, rightButtonContent, headerClassName, showIndicators, hideHeader, }: HorizontalScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,58 +1,60 @@
|
|
|
1
|
-
import { jsxs as i, jsx as l, Fragment as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsxs as i, jsx as l, Fragment as j } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as v, useState as h, useEffect as g } from "react";
|
|
3
3
|
import { Icon as N } from "../Icon/Icon.js";
|
|
4
|
-
import { Text as
|
|
5
|
-
import { c as
|
|
6
|
-
import '../../assets/HorizontalScroll.css';const
|
|
7
|
-
root:
|
|
8
|
-
header:
|
|
9
|
-
controls:
|
|
10
|
-
controlBtn:
|
|
11
|
-
container:
|
|
12
|
-
dragging:
|
|
13
|
-
noOverflow:
|
|
14
|
-
"scrollVisibility--false": "_scrollVisibility--
|
|
15
|
-
viewport:
|
|
16
|
-
indicator:
|
|
17
|
-
left:
|
|
18
|
-
right:
|
|
19
|
-
hidden:
|
|
4
|
+
import { Text as F } from "../Text/Text.js";
|
|
5
|
+
import { c as d } from "../../clsx-OuTLNxxd.js";
|
|
6
|
+
import '../../assets/HorizontalScroll.css';const K = "_root_12m2a_1", q = "_header_12m2a_5", G = "_controls_12m2a_13", I = "_controlBtn_12m2a_18", U = "_container_12m2a_37", $ = "_dragging_12m2a_50", J = "_noOverflow_12m2a_53", Q = "_viewport_12m2a_66", Z = "_indicator_12m2a_69", tt = "_left_12m2a_79", et = "_right_12m2a_85", rt = "_hidden_12m2a_91", e = {
|
|
7
|
+
root: K,
|
|
8
|
+
header: q,
|
|
9
|
+
controls: G,
|
|
10
|
+
controlBtn: I,
|
|
11
|
+
container: U,
|
|
12
|
+
dragging: $,
|
|
13
|
+
noOverflow: J,
|
|
14
|
+
"scrollVisibility--false": "_scrollVisibility--false_12m2a_58",
|
|
15
|
+
viewport: Q,
|
|
16
|
+
indicator: Z,
|
|
17
|
+
left: tt,
|
|
18
|
+
right: et,
|
|
19
|
+
hidden: rt
|
|
20
20
|
};
|
|
21
|
-
function
|
|
21
|
+
function it({
|
|
22
22
|
className: S,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
childrenContainerClassName: E,
|
|
24
|
+
childrenSpacing: C,
|
|
25
|
+
showScrollbar: D = !1,
|
|
26
|
+
children: W,
|
|
27
|
+
caption: f,
|
|
28
|
+
scrollStep: p = 160,
|
|
29
|
+
leftButtonContent: z,
|
|
30
|
+
rightButtonContent: O,
|
|
31
|
+
headerClassName: B,
|
|
32
|
+
showIndicators: M = !0,
|
|
33
|
+
hideHeader: P = !1
|
|
32
34
|
// new default
|
|
33
35
|
}) {
|
|
34
|
-
const n =
|
|
36
|
+
const n = v(null), [b, x] = h(!1), s = v({ x: 0, scroll: 0 }), u = v(!1), R = 5, [m, X] = h(!0), [_, k] = h(!1), [c, A] = h(!1), a = () => {
|
|
35
37
|
const t = n.current;
|
|
36
38
|
if (!t) return;
|
|
37
39
|
const r = t.scrollWidth - t.clientWidth;
|
|
38
|
-
|
|
39
|
-
}, k = (t) => {
|
|
40
|
-
!n.current || !u || (p(!0), c.current.x = t.clientX, c.current.scroll = n.current.scrollLeft, f.current = !1);
|
|
41
|
-
}, A = (t) => {
|
|
42
|
-
if (!w || !n.current) return;
|
|
43
|
-
const r = t.clientX - c.current.x;
|
|
44
|
-
n.current.scrollLeft = c.current.scroll - r, Math.abs(t.clientX - c.current.x) > M && (f.current = !0);
|
|
45
|
-
}, x = () => {
|
|
46
|
-
n.current && p(!1);
|
|
40
|
+
A(t.scrollWidth > t.clientWidth + 1), X(t.scrollLeft <= 0), k(t.scrollLeft >= r - 1);
|
|
47
41
|
}, H = (t) => {
|
|
48
|
-
|
|
49
|
-
},
|
|
42
|
+
!n.current || !c || (x(!0), s.current.x = t.clientX, s.current.scroll = n.current.scrollLeft, u.current = !1);
|
|
43
|
+
}, T = (t) => {
|
|
44
|
+
if (!b || !n.current) return;
|
|
45
|
+
const r = t.clientX - s.current.x;
|
|
46
|
+
n.current.scrollLeft = s.current.scroll - r, Math.abs(t.clientX - s.current.x) > R && (u.current = !0);
|
|
47
|
+
}, y = () => {
|
|
48
|
+
n.current && x(!1);
|
|
49
|
+
}, V = (t) => {
|
|
50
|
+
u.current && (t.preventDefault(), t.stopPropagation(), u.current = !1);
|
|
51
|
+
}, w = (t) => {
|
|
50
52
|
const r = n.current;
|
|
51
53
|
if (!r) return;
|
|
52
54
|
const o = Math.max(0, Math.min(r.scrollLeft + t, r.scrollWidth - r.clientWidth));
|
|
53
|
-
r.scrollTo({ left: o, behavior: "smooth" }), requestAnimationFrame(
|
|
55
|
+
r.scrollTo({ left: o, behavior: "smooth" }), requestAnimationFrame(a);
|
|
54
56
|
};
|
|
55
|
-
|
|
57
|
+
g(() => {
|
|
56
58
|
const t = n.current;
|
|
57
59
|
if (!t) return;
|
|
58
60
|
const r = (o) => {
|
|
@@ -61,31 +63,31 @@ function st({
|
|
|
61
63
|
L !== 0 ? (o.preventDefault(), t.scrollLeft += L) : o.preventDefault();
|
|
62
64
|
};
|
|
63
65
|
return t.addEventListener("wheel", r, { passive: !1 }), () => t.removeEventListener("wheel", r);
|
|
64
|
-
}, []),
|
|
66
|
+
}, []), g(() => {
|
|
65
67
|
const t = n.current;
|
|
66
68
|
if (t)
|
|
67
|
-
return
|
|
68
|
-
}, []),
|
|
69
|
+
return a(), t.addEventListener("scroll", a), () => t.removeEventListener("scroll", a);
|
|
70
|
+
}, []), g(() => {
|
|
69
71
|
const t = n.current;
|
|
70
72
|
if (!t || typeof ResizeObserver > "u") return;
|
|
71
|
-
const r = new ResizeObserver(() =>
|
|
73
|
+
const r = new ResizeObserver(() => a());
|
|
72
74
|
return r.observe(t), () => r.disconnect();
|
|
73
75
|
}, []);
|
|
74
|
-
const
|
|
75
|
-
return /* @__PURE__ */ i("div", { className:
|
|
76
|
-
!
|
|
77
|
-
|
|
78
|
-
/* @__PURE__ */ i("div", { className: e.controls, children: [
|
|
76
|
+
const Y = () => f == null ? null : typeof f == "string" ? /* @__PURE__ */ l(F, { variant: "display", size: "2xl", className: e.caption, children: f }) : f;
|
|
77
|
+
return /* @__PURE__ */ i("div", { className: d(e.root, S), children: [
|
|
78
|
+
!P && /* @__PURE__ */ i("div", { className: d(e.header, B), children: [
|
|
79
|
+
Y(),
|
|
80
|
+
c && /* @__PURE__ */ i("div", { className: e.controls, children: [
|
|
79
81
|
/* @__PURE__ */ l(
|
|
80
82
|
"button",
|
|
81
83
|
{
|
|
82
84
|
type: "button",
|
|
83
85
|
className: e.controlBtn,
|
|
84
|
-
onClick: () =>
|
|
86
|
+
onClick: () => w(-p),
|
|
85
87
|
"aria-label": "Scroll left",
|
|
86
|
-
disabled:
|
|
87
|
-
"aria-disabled":
|
|
88
|
-
children:
|
|
88
|
+
disabled: m,
|
|
89
|
+
"aria-disabled": m,
|
|
90
|
+
children: z ?? /* @__PURE__ */ l(N, { iconKey: "fa-regular fa-chevron-left", size: "sm" })
|
|
89
91
|
}
|
|
90
92
|
),
|
|
91
93
|
/* @__PURE__ */ l(
|
|
@@ -93,11 +95,11 @@ function st({
|
|
|
93
95
|
{
|
|
94
96
|
type: "button",
|
|
95
97
|
className: e.controlBtn,
|
|
96
|
-
onClick: () =>
|
|
98
|
+
onClick: () => w(p),
|
|
97
99
|
"aria-label": "Scroll right",
|
|
98
|
-
disabled:
|
|
99
|
-
"aria-disabled":
|
|
100
|
-
children:
|
|
100
|
+
disabled: _,
|
|
101
|
+
"aria-disabled": _,
|
|
102
|
+
children: O ?? /* @__PURE__ */ l(N, { iconKey: "fa-regular fa-chevron-right", size: "sm" })
|
|
101
103
|
}
|
|
102
104
|
)
|
|
103
105
|
] })
|
|
@@ -107,38 +109,40 @@ function st({
|
|
|
107
109
|
"div",
|
|
108
110
|
{
|
|
109
111
|
ref: n,
|
|
110
|
-
|
|
112
|
+
style: { gap: C ?? "var(--spacing-spacing-3xs)" },
|
|
113
|
+
className: d(
|
|
111
114
|
e.container,
|
|
112
|
-
e[`scrollVisibility--${
|
|
113
|
-
|
|
114
|
-
!
|
|
115
|
+
e[`scrollVisibility--${D}`],
|
|
116
|
+
b ? e.dragging : "",
|
|
117
|
+
!c && e.noOverflow,
|
|
118
|
+
E
|
|
115
119
|
),
|
|
116
|
-
onPointerDown:
|
|
117
|
-
onPointerMove:
|
|
118
|
-
onPointerLeave:
|
|
119
|
-
onPointerUp:
|
|
120
|
-
onClickCapture:
|
|
121
|
-
children:
|
|
120
|
+
onPointerDown: H,
|
|
121
|
+
onPointerMove: T,
|
|
122
|
+
onPointerLeave: y,
|
|
123
|
+
onPointerUp: y,
|
|
124
|
+
onClickCapture: V,
|
|
125
|
+
children: W
|
|
122
126
|
}
|
|
123
127
|
),
|
|
124
|
-
|
|
128
|
+
M && /* @__PURE__ */ i(j, { children: [
|
|
125
129
|
/* @__PURE__ */ l(
|
|
126
130
|
"div",
|
|
127
131
|
{
|
|
128
|
-
className:
|
|
132
|
+
className: d(
|
|
129
133
|
e.indicator,
|
|
130
134
|
e.left,
|
|
131
|
-
(
|
|
135
|
+
(m || !c) && e.hidden
|
|
132
136
|
)
|
|
133
137
|
}
|
|
134
138
|
),
|
|
135
139
|
/* @__PURE__ */ l(
|
|
136
140
|
"div",
|
|
137
141
|
{
|
|
138
|
-
className:
|
|
142
|
+
className: d(
|
|
139
143
|
e.indicator,
|
|
140
144
|
e.right,
|
|
141
|
-
(
|
|
145
|
+
(_ || !c) && e.hidden
|
|
142
146
|
)
|
|
143
147
|
}
|
|
144
148
|
)
|
|
@@ -147,5 +151,5 @@ function st({
|
|
|
147
151
|
] });
|
|
148
152
|
}
|
|
149
153
|
export {
|
|
150
|
-
|
|
154
|
+
it as HorizontalScroll
|
|
151
155
|
};
|
|
@@ -4,11 +4,11 @@ interface DemoArgs {
|
|
|
4
4
|
itemCount: number;
|
|
5
5
|
itemWidth: number;
|
|
6
6
|
itemHeight: number;
|
|
7
|
-
gap: number;
|
|
8
7
|
rounded: boolean;
|
|
9
8
|
gradient: boolean;
|
|
10
9
|
showIndicators: boolean;
|
|
11
10
|
hideHeader: boolean;
|
|
11
|
+
childrenSpacing: number;
|
|
12
12
|
}
|
|
13
13
|
type StoryArgs = DemoArgs;
|
|
14
14
|
declare const meta: Meta<StoryArgs>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { HorizontalScroll as r } from "./HorizontalScroll.js";
|
|
3
|
-
const
|
|
3
|
+
const u = {
|
|
4
4
|
title: "Case Parts/Atoms/HorizontalScroll",
|
|
5
5
|
component: r,
|
|
6
6
|
tags: ["autodocs"],
|
|
@@ -38,10 +38,6 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
38
38
|
control: { type: "number", min: 30, max: 240, step: 5 },
|
|
39
39
|
description: "Height of each item (px)."
|
|
40
40
|
},
|
|
41
|
-
gap: {
|
|
42
|
-
control: { type: "number", min: 0, max: 48, step: 2 },
|
|
43
|
-
description: "Gap between items (px)."
|
|
44
|
-
},
|
|
45
41
|
rounded: {
|
|
46
42
|
control: { type: "boolean" },
|
|
47
43
|
description: "Apply border radius to items."
|
|
@@ -57,6 +53,10 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
57
53
|
hideHeader: {
|
|
58
54
|
control: { type: "boolean" },
|
|
59
55
|
description: "Hide the caption row and arrow controls."
|
|
56
|
+
},
|
|
57
|
+
childrenSpacing: {
|
|
58
|
+
control: { type: "number", min: 0, max: 64, step: 2 },
|
|
59
|
+
description: "Gap between direct children (flex gap)."
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
args: {
|
|
@@ -64,25 +64,26 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
64
64
|
itemCount: 20,
|
|
65
65
|
itemWidth: 120,
|
|
66
66
|
itemHeight: 80,
|
|
67
|
-
gap: 12,
|
|
68
67
|
rounded: !0,
|
|
69
68
|
gradient: !0,
|
|
70
69
|
showIndicators: !0,
|
|
71
70
|
// new default
|
|
72
|
-
hideHeader: !1
|
|
71
|
+
hideHeader: !1,
|
|
72
|
+
// new default
|
|
73
|
+
childrenSpacing: 12
|
|
73
74
|
// new default
|
|
74
75
|
}
|
|
75
|
-
},
|
|
76
|
+
}, n = /* @__PURE__ */ o("style", { children: `
|
|
76
77
|
.horizontalDemoScroll {
|
|
77
78
|
touch-action: none; /* ensure pointer events for horizontal drag */
|
|
78
79
|
}
|
|
79
80
|
.horizontalDemoScroll a {
|
|
80
81
|
-webkit-user-drag: none; /* Safari/Chrome: prevent ghost dragging of link */
|
|
81
82
|
}
|
|
82
|
-
` }),
|
|
83
|
-
const { itemCount: d, itemWidth:
|
|
84
|
-
return Array.from({ length: d }, (
|
|
85
|
-
const
|
|
83
|
+
` }), t = (e) => {
|
|
84
|
+
const { itemCount: d, itemWidth: c, itemHeight: l, rounded: s, gradient: h } = e;
|
|
85
|
+
return Array.from({ length: d }, (p, m) => {
|
|
86
|
+
const a = m + 1;
|
|
86
87
|
return /* @__PURE__ */ o(
|
|
87
88
|
"a",
|
|
88
89
|
{
|
|
@@ -90,29 +91,28 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
90
91
|
draggable: !1,
|
|
91
92
|
style: {
|
|
92
93
|
flex: "0 0 auto",
|
|
93
|
-
width:
|
|
94
|
-
height:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
background: m ? "linear-gradient(135deg,#4F46E5,#6366F1)" : "#4F46E5",
|
|
94
|
+
width: c,
|
|
95
|
+
height: l,
|
|
96
|
+
borderRadius: s ? 8 : 0,
|
|
97
|
+
background: h ? "linear-gradient(135deg,#4F46E5,#6366F1)" : "#4F46E5",
|
|
98
98
|
color: "#fff",
|
|
99
99
|
display: "flex",
|
|
100
100
|
alignItems: "center",
|
|
101
101
|
justifyContent: "center",
|
|
102
|
-
fontSize: Math.max(12, Math.min(24,
|
|
102
|
+
fontSize: Math.max(12, Math.min(24, l / 3)),
|
|
103
103
|
fontWeight: 600,
|
|
104
104
|
userSelect: "none",
|
|
105
105
|
boxShadow: "0 2px 6px rgba(0,0,0,0.25)"
|
|
106
106
|
},
|
|
107
|
-
children:
|
|
107
|
+
children: a
|
|
108
108
|
},
|
|
109
|
-
|
|
109
|
+
a
|
|
110
110
|
);
|
|
111
111
|
});
|
|
112
|
-
},
|
|
112
|
+
}, w = {
|
|
113
113
|
name: "Playground",
|
|
114
|
-
render: (e) => /* @__PURE__ */
|
|
115
|
-
|
|
114
|
+
render: (e) => /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
|
|
115
|
+
n,
|
|
116
116
|
/* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "HorizontalScroll Playground" }),
|
|
117
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." }),
|
|
118
118
|
/* @__PURE__ */ o(
|
|
@@ -122,15 +122,16 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
122
122
|
showScrollbar: e.showScrollbar,
|
|
123
123
|
showIndicators: e.showIndicators,
|
|
124
124
|
hideHeader: e.hideHeader,
|
|
125
|
+
childrenSpacing: e.childrenSpacing,
|
|
125
126
|
caption: `Playground (${e.itemCount} items)`,
|
|
126
|
-
children:
|
|
127
|
+
children: t(e)
|
|
127
128
|
}
|
|
128
129
|
)
|
|
129
130
|
] })
|
|
130
|
-
},
|
|
131
|
+
}, b = {
|
|
131
132
|
args: { showScrollbar: !0 },
|
|
132
|
-
render: (e) => /* @__PURE__ */
|
|
133
|
-
|
|
133
|
+
render: (e) => /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
|
|
134
|
+
n,
|
|
134
135
|
/* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Scrollbar Visible" }),
|
|
135
136
|
/* @__PURE__ */ o(
|
|
136
137
|
r,
|
|
@@ -139,21 +140,21 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
139
140
|
showScrollbar: !0,
|
|
140
141
|
showIndicators: e.showIndicators,
|
|
141
142
|
hideHeader: e.hideHeader,
|
|
143
|
+
childrenSpacing: e.childrenSpacing,
|
|
142
144
|
caption: "Scrollbar Visible",
|
|
143
|
-
children:
|
|
145
|
+
children: t(e)
|
|
144
146
|
}
|
|
145
147
|
)
|
|
146
148
|
] })
|
|
147
|
-
},
|
|
149
|
+
}, y = {
|
|
148
150
|
args: {
|
|
149
151
|
itemCount: 40,
|
|
150
152
|
itemWidth: 90,
|
|
151
153
|
itemHeight: 60,
|
|
152
|
-
gap: 8,
|
|
153
154
|
showScrollbar: !1
|
|
154
155
|
},
|
|
155
|
-
render: (e) => /* @__PURE__ */
|
|
156
|
-
|
|
156
|
+
render: (e) => /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
|
|
157
|
+
n,
|
|
157
158
|
/* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Dense Small Items" }),
|
|
158
159
|
/* @__PURE__ */ o(
|
|
159
160
|
r,
|
|
@@ -162,21 +163,21 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
162
163
|
showScrollbar: e.showScrollbar,
|
|
163
164
|
showIndicators: e.showIndicators,
|
|
164
165
|
hideHeader: e.hideHeader,
|
|
166
|
+
childrenSpacing: e.childrenSpacing,
|
|
165
167
|
caption: `Dense (${e.itemCount} items)`,
|
|
166
|
-
children:
|
|
168
|
+
children: t(e)
|
|
167
169
|
}
|
|
168
170
|
)
|
|
169
171
|
] })
|
|
170
|
-
},
|
|
172
|
+
}, f = {
|
|
171
173
|
args: {
|
|
172
174
|
itemCount: 12,
|
|
173
175
|
itemWidth: 260,
|
|
174
176
|
itemHeight: 160,
|
|
175
|
-
gap: 16,
|
|
176
177
|
gradient: !1
|
|
177
178
|
},
|
|
178
|
-
render: (e) => /* @__PURE__ */
|
|
179
|
-
|
|
179
|
+
render: (e) => /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
|
|
180
|
+
n,
|
|
180
181
|
/* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Large Cards" }),
|
|
181
182
|
/* @__PURE__ */ o(
|
|
182
183
|
r,
|
|
@@ -185,22 +186,23 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
185
186
|
showScrollbar: e.showScrollbar,
|
|
186
187
|
showIndicators: e.showIndicators,
|
|
187
188
|
hideHeader: e.hideHeader,
|
|
189
|
+
childrenSpacing: e.childrenSpacing,
|
|
188
190
|
caption: "Large Cards",
|
|
189
|
-
children:
|
|
191
|
+
children: t(e)
|
|
190
192
|
}
|
|
191
193
|
)
|
|
192
194
|
] })
|
|
193
|
-
},
|
|
195
|
+
}, H = {
|
|
194
196
|
name: "Without Indicators",
|
|
195
197
|
args: {
|
|
196
198
|
showIndicators: !1,
|
|
197
199
|
itemCount: 16,
|
|
198
200
|
itemWidth: 140,
|
|
199
201
|
itemHeight: 72,
|
|
200
|
-
|
|
202
|
+
childrenSpacing: 12
|
|
201
203
|
},
|
|
202
|
-
render: (e) => /* @__PURE__ */
|
|
203
|
-
|
|
204
|
+
render: (e) => /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
|
|
205
|
+
n,
|
|
204
206
|
/* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Indicators Disabled" }),
|
|
205
207
|
/* @__PURE__ */ o(
|
|
206
208
|
r,
|
|
@@ -209,23 +211,23 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
209
211
|
showScrollbar: e.showScrollbar,
|
|
210
212
|
showIndicators: !1,
|
|
211
213
|
hideHeader: e.hideHeader,
|
|
214
|
+
childrenSpacing: e.childrenSpacing,
|
|
212
215
|
caption: "No Edge Indicators",
|
|
213
|
-
children:
|
|
216
|
+
children: t(e)
|
|
214
217
|
}
|
|
215
218
|
)
|
|
216
219
|
] })
|
|
217
|
-
},
|
|
220
|
+
}, x = {
|
|
218
221
|
name: "Header Hidden",
|
|
219
222
|
args: {
|
|
220
223
|
hideHeader: !0,
|
|
221
224
|
itemCount: 14,
|
|
222
225
|
itemWidth: 130,
|
|
223
226
|
itemHeight: 70,
|
|
224
|
-
gap: 10,
|
|
225
227
|
showIndicators: !0
|
|
226
228
|
},
|
|
227
|
-
render: (e) => /* @__PURE__ */
|
|
228
|
-
|
|
229
|
+
render: (e) => /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
|
|
230
|
+
n,
|
|
229
231
|
/* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Header Hidden" }),
|
|
230
232
|
/* @__PURE__ */ o(
|
|
231
233
|
r,
|
|
@@ -234,18 +236,19 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
|
|
|
234
236
|
showScrollbar: e.showScrollbar,
|
|
235
237
|
showIndicators: e.showIndicators,
|
|
236
238
|
hideHeader: !0,
|
|
239
|
+
childrenSpacing: e.childrenSpacing,
|
|
237
240
|
caption: "(Will not render since header hidden)",
|
|
238
|
-
children:
|
|
241
|
+
children: t(e)
|
|
239
242
|
}
|
|
240
243
|
)
|
|
241
244
|
] })
|
|
242
245
|
};
|
|
243
246
|
export {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
y as DenseSmallItems,
|
|
248
|
+
x as HeaderHidden,
|
|
249
|
+
f as LargeCards,
|
|
250
|
+
w as Playground,
|
|
251
|
+
b as WithScrollbar,
|
|
252
|
+
H as WithoutIndicators,
|
|
253
|
+
u as default
|
|
251
254
|
};
|