@caseparts-org/caseblocks 0.0.138 → 0.0.140
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import { HideAtProps } from '../HideAt';
|
|
3
|
+
export interface HorizontalScrollProps extends PropsWithChildren, HideAtProps {
|
|
3
4
|
className?: string;
|
|
4
5
|
childrenContainerClassName?: string;
|
|
5
6
|
childrenSpacing?: number | string;
|
|
@@ -13,4 +14,5 @@ export interface HorizontalScrollProps extends PropsWithChildren {
|
|
|
13
14
|
showIndicators?: boolean;
|
|
14
15
|
hideHeader?: boolean;
|
|
15
16
|
}
|
|
16
|
-
export declare function HorizontalScroll({ className, childrenContainerClassName, childrenSpacing, showScrollbar, children, caption, scrollStep, leftButtonContent, rightButtonContent, headerContainerClassName, headerClassName, showIndicators, hideHeader,
|
|
17
|
+
export declare function HorizontalScroll({ className, childrenContainerClassName, childrenSpacing, showScrollbar, children, caption, scrollStep, leftButtonContent, rightButtonContent, headerContainerClassName, headerClassName, showIndicators, hideHeader, // new default
|
|
18
|
+
hideAt }: HorizontalScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { jsxs as d, jsx as l, Fragment as
|
|
1
|
+
import { jsxs as d, jsx as l, Fragment as K } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as g, useState as h, useEffect as m } from "react";
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { Text as
|
|
3
|
+
import { Icon as S } from "../Icon/Icon.js";
|
|
4
|
+
import { Text as q } from "../Text/Text.js";
|
|
5
5
|
import { c as i } from "../../clsx-OuTLNxxd.js";
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
import { getHideAtStyles as G } from "../HideAt.js";
|
|
7
|
+
import '../../assets/HorizontalScroll.css';const I = "_root_1565i_1", U = "_header_1565i_5", $ = "_caption_1565i_13", J = "_controls_1565i_21", Q = "_controlBtn_1565i_26", Z = "_container_1565i_45", tt = "_dragging_1565i_58", et = "_noOverflow_1565i_61", rt = "_viewport_1565i_74", nt = "_indicator_1565i_77", ot = "_left_1565i_87", lt = "_right_1565i_93", it = "_hidden_1565i_99", e = {
|
|
8
|
+
root: I,
|
|
9
|
+
header: U,
|
|
10
|
+
caption: $,
|
|
11
|
+
controls: J,
|
|
12
|
+
controlBtn: Q,
|
|
13
|
+
container: Z,
|
|
14
|
+
dragging: tt,
|
|
15
|
+
noOverflow: et,
|
|
15
16
|
"scrollVisibility--false": "_scrollVisibility--false_1565i_66",
|
|
16
|
-
viewport:
|
|
17
|
-
indicator:
|
|
18
|
-
left:
|
|
19
|
-
right:
|
|
20
|
-
hidden:
|
|
17
|
+
viewport: rt,
|
|
18
|
+
indicator: nt,
|
|
19
|
+
left: ot,
|
|
20
|
+
right: lt,
|
|
21
|
+
hidden: it
|
|
21
22
|
};
|
|
22
|
-
function
|
|
23
|
-
className:
|
|
23
|
+
function _t({
|
|
24
|
+
className: N,
|
|
24
25
|
childrenContainerClassName: E,
|
|
25
26
|
childrenSpacing: C,
|
|
26
27
|
showScrollbar: D = !1,
|
|
@@ -31,24 +32,25 @@ function ft({
|
|
|
31
32
|
rightButtonContent: O,
|
|
32
33
|
headerContainerClassName: B,
|
|
33
34
|
headerClassName: M,
|
|
34
|
-
showIndicators:
|
|
35
|
-
hideHeader:
|
|
35
|
+
showIndicators: A = !0,
|
|
36
|
+
hideHeader: P = !1,
|
|
36
37
|
// new default
|
|
38
|
+
hideAt: R
|
|
37
39
|
}) {
|
|
38
|
-
const n = g(null), [b, x] = h(!1), c = g({ x: 0, scroll: 0 }), u = g(!1), X = 5, [_, k] = h(!0), [v,
|
|
40
|
+
const n = g(null), [b, x] = h(!1), c = g({ x: 0, scroll: 0 }), u = g(!1), X = 5, [_, k] = h(!0), [v, H] = h(!1), [s, T] = h(!1), a = () => {
|
|
39
41
|
const t = n.current;
|
|
40
42
|
if (!t) return;
|
|
41
43
|
const r = t.scrollWidth - t.clientWidth;
|
|
42
|
-
|
|
43
|
-
}, T = (t) => {
|
|
44
|
-
!n.current || !s || (x(!0), c.current.x = t.clientX, c.current.scroll = n.current.scrollLeft, u.current = !1);
|
|
44
|
+
T(t.scrollWidth > t.clientWidth + 1), k(t.scrollLeft <= 0), H(t.scrollLeft >= r - 1);
|
|
45
45
|
}, V = (t) => {
|
|
46
|
+
!n.current || !s || (x(!0), c.current.x = t.clientX, c.current.scroll = n.current.scrollLeft, u.current = !1);
|
|
47
|
+
}, Y = (t) => {
|
|
46
48
|
if (!b || !n.current) return;
|
|
47
49
|
const r = t.clientX - c.current.x;
|
|
48
50
|
n.current.scrollLeft = c.current.scroll - r, Math.abs(t.clientX - c.current.x) > X && (u.current = !0);
|
|
49
51
|
}, y = () => {
|
|
50
52
|
n.current && x(!1);
|
|
51
|
-
},
|
|
53
|
+
}, j = (t) => {
|
|
52
54
|
u.current && (t.preventDefault(), t.stopPropagation(), u.current = !1);
|
|
53
55
|
}, w = (t) => {
|
|
54
56
|
const r = n.current;
|
|
@@ -75,10 +77,10 @@ function ft({
|
|
|
75
77
|
const r = new ResizeObserver(() => a());
|
|
76
78
|
return r.observe(t), () => r.disconnect();
|
|
77
79
|
}, []);
|
|
78
|
-
const
|
|
79
|
-
return /* @__PURE__ */ d("div", { className: i(e.root,
|
|
80
|
-
!
|
|
81
|
-
|
|
80
|
+
const F = () => f == null ? null : typeof f == "string" ? /* @__PURE__ */ l(q, { variant: "display", size: "2xl", className: i(M, e.caption), children: f }) : f;
|
|
81
|
+
return /* @__PURE__ */ d("div", { className: i(e.root, N, G(R)), children: [
|
|
82
|
+
!P && /* @__PURE__ */ d("div", { className: i(B, e.header), children: [
|
|
83
|
+
F(),
|
|
82
84
|
s && /* @__PURE__ */ d("div", { className: e.controls, children: [
|
|
83
85
|
/* @__PURE__ */ l(
|
|
84
86
|
"button",
|
|
@@ -89,7 +91,7 @@ function ft({
|
|
|
89
91
|
"aria-label": "Scroll left",
|
|
90
92
|
disabled: _,
|
|
91
93
|
"aria-disabled": _,
|
|
92
|
-
children: z ?? /* @__PURE__ */ l(
|
|
94
|
+
children: z ?? /* @__PURE__ */ l(S, { iconKey: "fa-regular fa-chevron-left", size: "sm" })
|
|
93
95
|
}
|
|
94
96
|
),
|
|
95
97
|
/* @__PURE__ */ l(
|
|
@@ -101,7 +103,7 @@ function ft({
|
|
|
101
103
|
"aria-label": "Scroll right",
|
|
102
104
|
disabled: v,
|
|
103
105
|
"aria-disabled": v,
|
|
104
|
-
children: O ?? /* @__PURE__ */ l(
|
|
106
|
+
children: O ?? /* @__PURE__ */ l(S, { iconKey: "fa-regular fa-chevron-right", size: "sm" })
|
|
105
107
|
}
|
|
106
108
|
)
|
|
107
109
|
] })
|
|
@@ -119,15 +121,15 @@ function ft({
|
|
|
119
121
|
!s && e.noOverflow,
|
|
120
122
|
E
|
|
121
123
|
),
|
|
122
|
-
onPointerDown:
|
|
123
|
-
onPointerMove:
|
|
124
|
+
onPointerDown: V,
|
|
125
|
+
onPointerMove: Y,
|
|
124
126
|
onPointerLeave: y,
|
|
125
127
|
onPointerUp: y,
|
|
126
|
-
onClickCapture:
|
|
128
|
+
onClickCapture: j,
|
|
127
129
|
children: W
|
|
128
130
|
}
|
|
129
131
|
),
|
|
130
|
-
|
|
132
|
+
A && /* @__PURE__ */ d(K, { children: [
|
|
131
133
|
/* @__PURE__ */ l(
|
|
132
134
|
"div",
|
|
133
135
|
{
|
|
@@ -153,5 +155,5 @@ function ft({
|
|
|
153
155
|
] });
|
|
154
156
|
}
|
|
155
157
|
export {
|
|
156
|
-
|
|
158
|
+
_t as HorizontalScroll
|
|
157
159
|
};
|
package/dist/main-client.d.ts
CHANGED
|
@@ -32,7 +32,6 @@ export { Modal } from './molecules/Modal/Modal';
|
|
|
32
32
|
export type { ModalProps } from './molecules/Modal/Modal';
|
|
33
33
|
export { ImageViewer } from './molecules/ImageViewer/ImageViewer';
|
|
34
34
|
export type { ImageViewerProps } from './molecules/ImageViewer/ImageViewer';
|
|
35
|
-
export { getHideAtStyles } from './atoms/HideAt';
|
|
36
35
|
export { MainNav } from './organisms/MainNav/MainNav';
|
|
37
36
|
export type { MainNavProps } from './organisms/MainNav/MainNav';
|
|
38
37
|
export { ChipSelector } from './organisms/ChipSelector/ChipSelector';
|
package/dist/main-client.js
CHANGED
|
@@ -12,33 +12,33 @@ import { linkClassName as A } from "./atoms/Link/linkClassName.js";
|
|
|
12
12
|
import { configureLink as M, routerOverride as v } from "./atoms/Link/configureLink.js";
|
|
13
13
|
import { LinkButton as h } from "./atoms/LinkButton/LinkButton.js";
|
|
14
14
|
import { configureImage as y } from "./atoms/Image/configureImage.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
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 {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
15
|
+
import { getHideAtStyles as H } from "./atoms/HideAt.js";
|
|
16
|
+
import { Logo as V } from "./molecules/Logo/Logo.js";
|
|
17
|
+
import { SearchBox as z } from "./molecules/SearchBox/SearchBox.js";
|
|
18
|
+
import { QuantityInput as O } from "./molecules/QuantityInput/QuantityInput.js";
|
|
19
|
+
import { Pricing as R } from "./molecules/Pricing/Pricing.js";
|
|
20
|
+
import { Availability as j } from "./molecules/Availability/Availability.js";
|
|
21
|
+
import { Avatar as D } from "./molecules/Avatar/Avatar.js";
|
|
22
|
+
import { BannerCard as J } from "./molecules/BannerCard/BannerCard.js";
|
|
23
|
+
import { CardLink as U } from "./molecules/CardLink/CardLink.js";
|
|
24
|
+
import { Breadcrumbs as X } from "./molecules/Breadcrumbs/Breadcrumbs.js";
|
|
25
|
+
import { NotFound as _ } from "./organisms/NotFound/NotFound.js";
|
|
26
|
+
import { HorizontalScroll as oo } from "./atoms/HorizontalScroll/HorizontalScroll.js";
|
|
27
|
+
import { SlideInPanel as eo } from "./atoms/SlideInPanel/SlideInPanel.js";
|
|
28
|
+
import { Markdown as po } from "./atoms/Markdown/Markdown.js";
|
|
29
|
+
import { PreprocessedMarkdown as fo } from "./atoms/Markdown/PreprocessedMarkdown.js";
|
|
30
|
+
import { usePreprocessedMarkdown as ao } from "./atoms/Markdown/usePreprocessedMarkdown.js";
|
|
31
|
+
import { Tooltip as io } from "./atoms/Tooltip/Tooltip.js";
|
|
32
|
+
import { Popover as uo } from "./atoms/Popover/Popover.js";
|
|
33
|
+
import { Account as so } from "./molecules/Account/Account.js";
|
|
34
|
+
import { Chip as Co } from "./molecules/Chip/Chip.js";
|
|
35
|
+
import { ToggleView as So } from "./molecules/ToggleView/ToggleView.js";
|
|
36
|
+
import { CartSlideInPanel as Po } from "./molecules/Cart/CartSlideInPanel.js";
|
|
37
|
+
import { StatefulButton as Ao } from "./molecules/StatefulButton/StatefulButton.js";
|
|
38
|
+
import { AnimatedCheckMark as Mo } from "./molecules/StatefulButton/AnimatedCheckmark.js";
|
|
39
|
+
import { AddToCart as Lo } from "./molecules/AddToCart/AddToCart.js";
|
|
40
|
+
import { Modal as To } from "./molecules/Modal/Modal.js";
|
|
41
|
+
import { ImageViewer as Fo } from "./molecules/ImageViewer/ImageViewer.js";
|
|
42
42
|
import { MainNav as No } from "./organisms/MainNav/MainNav.js";
|
|
43
43
|
import { ChipSelector as bo } from "./organisms/ChipSelector/ChipSelector.js";
|
|
44
44
|
import { Product as Go } from "./organisms/Product/Product.js";
|
|
@@ -46,53 +46,53 @@ import { Carousel as Qo } from "./organisms/Carousel/Carousel.js";
|
|
|
46
46
|
import { Footer as Zo } from "./organisms/Footer/Footer.js";
|
|
47
47
|
import { default as qo } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
|
|
48
48
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
so as Account,
|
|
50
|
+
Lo as AddToCart,
|
|
51
|
+
Mo as AnimatedCheckMark,
|
|
52
|
+
j as Availability,
|
|
53
|
+
D as Avatar,
|
|
54
|
+
J as BannerCard,
|
|
55
|
+
X as Breadcrumbs,
|
|
56
56
|
e as Button,
|
|
57
|
-
|
|
57
|
+
U as CardLink,
|
|
58
58
|
Qo as Carousel,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
Po as CartSlideInPanel,
|
|
60
|
+
Co as Chip,
|
|
61
61
|
bo as ChipSelector,
|
|
62
62
|
f as Column,
|
|
63
63
|
p as Flex,
|
|
64
64
|
Zo as Footer,
|
|
65
65
|
x as Grid,
|
|
66
66
|
n as Head,
|
|
67
|
-
|
|
67
|
+
oo as HorizontalScroll,
|
|
68
68
|
d as Icon,
|
|
69
|
-
|
|
69
|
+
Fo as ImageViewer,
|
|
70
70
|
S as Input,
|
|
71
71
|
P as Link,
|
|
72
72
|
h as LinkButton,
|
|
73
|
-
|
|
73
|
+
V as Logo,
|
|
74
74
|
No as MainNav,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
po as Markdown,
|
|
76
|
+
To as Modal,
|
|
77
|
+
_ as NotFound,
|
|
78
|
+
uo as Popover,
|
|
79
|
+
fo as PreprocessedMarkdown,
|
|
80
|
+
R as Pricing,
|
|
81
81
|
Go as Product,
|
|
82
|
-
|
|
82
|
+
O as QuantityInput,
|
|
83
83
|
u as Root,
|
|
84
|
-
|
|
84
|
+
z as SearchBox,
|
|
85
85
|
s as Separator,
|
|
86
|
-
|
|
86
|
+
eo as SlideInPanel,
|
|
87
87
|
qo as SpinZoomViewer,
|
|
88
|
-
|
|
88
|
+
Ao as StatefulButton,
|
|
89
89
|
C as Text,
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
So as ToggleView,
|
|
91
|
+
io as Tooltip,
|
|
92
92
|
y as configureImage,
|
|
93
93
|
M as configureLink,
|
|
94
|
-
|
|
94
|
+
H as getHideAtStyles,
|
|
95
95
|
A as linkClassName,
|
|
96
96
|
v as routerOverride,
|
|
97
|
-
|
|
97
|
+
ao as usePreprocessedMarkdown
|
|
98
98
|
};
|
package/dist/main-server.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export type { LinkButtonProps } from './atoms/LinkButton/LinkButton';
|
|
|
22
22
|
export { configureImage } from './atoms/Image/configureImage';
|
|
23
23
|
export type { ImageProps, ImageImplementation } from './atoms/Image/Image';
|
|
24
24
|
export type { HideAtProps, HideAtProp, HideAtValue } from './atoms/HideAt';
|
|
25
|
+
export { getHideAtStyles } from './atoms/HideAt';
|
|
25
26
|
export { Logo } from './molecules/Logo/Logo';
|
|
26
27
|
export type { LogoProps } from './molecules/Logo/Logo';
|
|
27
28
|
export { SearchBox } from './molecules/SearchBox/SearchBox';
|
package/dist/main-server.js
CHANGED
|
@@ -3,50 +3,52 @@ 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 l } from "./atoms/Root/Root.js";
|
|
7
7
|
import { Separator as g } from "./atoms/Separator/Separator.js";
|
|
8
8
|
import { Text as B } from "./atoms/Text/Text.js";
|
|
9
|
-
import { Input as
|
|
10
|
-
import { Link as
|
|
11
|
-
import { linkClassName as
|
|
12
|
-
import { configureLink as
|
|
13
|
-
import { LinkButton as
|
|
14
|
-
import { configureImage as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
9
|
+
import { Input as s } from "./atoms/Input/Input.js";
|
|
10
|
+
import { Link as I } from "./atoms/Link/Link.js";
|
|
11
|
+
import { linkClassName as y } from "./atoms/Link/linkClassName.js";
|
|
12
|
+
import { configureLink as S, routerOverride as b } from "./atoms/Link/configureLink.js";
|
|
13
|
+
import { LinkButton as H } from "./atoms/LinkButton/LinkButton.js";
|
|
14
|
+
import { configureImage as h } from "./atoms/Image/configureImage.js";
|
|
15
|
+
import { getHideAtStyles as O } from "./atoms/HideAt.js";
|
|
16
|
+
import { Logo as Q } from "./molecules/Logo/Logo.js";
|
|
17
|
+
import { SearchBox as T } from "./molecules/SearchBox/SearchBox.js";
|
|
18
|
+
import { QuantityInput as q } from "./molecules/QuantityInput/QuantityInput.js";
|
|
19
|
+
import { Pricing as z } from "./molecules/Pricing/Pricing.js";
|
|
20
|
+
import { Availability as E } from "./molecules/Availability/Availability.js";
|
|
21
|
+
import { Avatar as K } from "./molecules/Avatar/Avatar.js";
|
|
22
|
+
import { BannerCard as U } from "./molecules/BannerCard/BannerCard.js";
|
|
23
|
+
import { CardLink as W } from "./molecules/CardLink/CardLink.js";
|
|
24
|
+
import { Breadcrumbs as Y } from "./molecules/Breadcrumbs/Breadcrumbs.js";
|
|
25
|
+
import { NotFound as _ } from "./organisms/NotFound/NotFound.js";
|
|
25
26
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
E as Availability,
|
|
28
|
+
K as Avatar,
|
|
29
|
+
U as BannerCard,
|
|
30
|
+
Y as Breadcrumbs,
|
|
30
31
|
t as Button,
|
|
31
|
-
|
|
32
|
+
W as CardLink,
|
|
32
33
|
x as Column,
|
|
33
34
|
m as Flex,
|
|
34
35
|
f as Grid,
|
|
35
36
|
a as Head,
|
|
36
37
|
u as Icon,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
s as Input,
|
|
39
|
+
I as Link,
|
|
40
|
+
H as LinkButton,
|
|
41
|
+
Q as Logo,
|
|
42
|
+
_ as NotFound,
|
|
43
|
+
z as Pricing,
|
|
44
|
+
q as QuantityInput,
|
|
45
|
+
l as Root,
|
|
46
|
+
T as SearchBox,
|
|
46
47
|
g as Separator,
|
|
47
48
|
B as Text,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
h as configureImage,
|
|
50
|
+
S as configureLink,
|
|
51
|
+
O as getHideAtStyles,
|
|
52
|
+
y as linkClassName,
|
|
53
|
+
b as routerOverride
|
|
52
54
|
};
|