@caseparts-org/caseblocks 0.0.120 → 0.0.122
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/Product.css +1 -1
- package/dist/assets/Root.css +1 -1
- package/dist/atoms/Popover/Popover.d.ts +1 -1
- package/dist/atoms/Popover/Popover.js +1 -1
- package/dist/atoms/Root/Root.d.ts +2 -2
- package/dist/atoms/SlideInPanel/SlideInPanel.js +1 -1
- package/dist/atoms/Text/Text.d.ts +1 -0
- package/dist/atoms/Tooltip/Tooltip.d.ts +1 -1
- package/dist/atoms/Tooltip/Tooltip.js +1 -1
- package/dist/{index-B4KbmMH3.js → index-BkF-BQ3Q.js} +2 -2
- package/dist/main-client.d.ts +2 -0
- package/dist/main-client.js +47 -45
- package/dist/molecules/Logo/Logo.stories.d.ts +28 -0
- package/dist/molecules/ToggleView/ToggleView.d.ts +1 -1
- package/dist/organisms/Product/Product.d.ts +3 -2
- package/dist/organisms/Product/Product.js +88 -85
- package/dist/organisms/Product/Product.stories.d.ts +7 -0
- package/dist/organisms/Product/Product.stories.js +27 -6
- package/dist/organisms/SpinZoomViewer/SpinZoomViewer.d.ts +3 -2
- package/dist/organisms/SpinZoomViewer/SpinZoomViewer.js +1 -0
- package/package.json +7 -7
|
@@ -7,7 +7,7 @@ export type PopoverAPI = {
|
|
|
7
7
|
type PositionKeyword = "top" | "right" | "bottom" | "left";
|
|
8
8
|
type Position = "top left" | "top center" | "top right" | "right top" | "right center" | "right bottom" | "bottom left" | "bottom center" | "bottom right" | "left top" | "left center" | "left bottom" | PositionKeyword;
|
|
9
9
|
export type PopoverProps = {
|
|
10
|
-
trigger: React.ReactElement
|
|
10
|
+
trigger: React.ReactElement<any>;
|
|
11
11
|
children: React.ReactNode | ((_api: PopoverAPI) => React.ReactNode);
|
|
12
12
|
position?: Position;
|
|
13
13
|
popoverClassName?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as F, Fragment as H, jsx as k } from "react/jsx-runtime";
|
|
2
2
|
import * as f from "react";
|
|
3
|
-
import { r as N } from "../../index-
|
|
3
|
+
import { r as N } from "../../index-BkF-BQ3Q.js";
|
|
4
4
|
import { c as z } from "../../clsx-OuTLNxxd.js";
|
|
5
5
|
import '../../assets/Popover.css';const W = "_popover_vlr81_1", q = "_content_vlr81_7", P = {
|
|
6
6
|
popover: W,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as k, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
import { r as A } from "../../index-
|
|
3
|
+
import { r as A } from "../../index-BkF-BQ3Q.js";
|
|
4
4
|
import { c } from "../../clsx-OuTLNxxd.js";
|
|
5
5
|
import { getHideAtStyles as N } from "../HideAt.js";
|
|
6
6
|
import '../../assets/SlideInPanel.css';const q = "_root_12lt6_1", P = "_overlay_12lt6_8", R = "_panel_12lt6_16", j = "_active_12lt6_52", o = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HideAtProps } from '../HideAt';
|
|
2
|
+
import { JSX } from 'react';
|
|
2
3
|
type ElementType = keyof Pick<JSX.IntrinsicElements, "span" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div">;
|
|
3
4
|
/** A text element. */
|
|
4
5
|
export type TextProps<T extends ElementType = "span"> = HideAtProps & {
|
|
@@ -3,7 +3,7 @@ type PositionKeyword = "top" | "right" | "bottom" | "left";
|
|
|
3
3
|
type Position = "top left" | "top center" | "top right" | "right top" | "right center" | "right bottom" | "bottom left" | "bottom center" | "bottom right" | "left top" | "left center" | "left bottom" | PositionKeyword;
|
|
4
4
|
export type TooltipProps = {
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
-
trigger: React.ReactElement
|
|
6
|
+
trigger: React.ReactElement<any>;
|
|
7
7
|
tooltipClassName?: string;
|
|
8
8
|
contentClassName?: string;
|
|
9
9
|
position?: Position;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as W, Fragment as X, jsx as O } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
3
|
import { c as S } from "../../clsx-OuTLNxxd.js";
|
|
4
|
-
import { r as Y } from "../../index-
|
|
4
|
+
import { r as Y } from "../../index-BkF-BQ3Q.js";
|
|
5
5
|
import '../../assets/Tooltip.css';const A = "_tooltip_17o7a_1", D = "_content_17o7a_11", j = {
|
|
6
6
|
tooltip: A,
|
|
7
7
|
content: D
|
|
@@ -140,7 +140,7 @@ function R() {
|
|
|
140
140
|
return y.H.useFormState(n, r, a);
|
|
141
141
|
}, c.useFormStatus = function() {
|
|
142
142
|
return y.H.useHostTransitionStatus();
|
|
143
|
-
}, c.version = "19.
|
|
143
|
+
}, c.version = "19.2.3", c;
|
|
144
144
|
}
|
|
145
145
|
var s = {};
|
|
146
146
|
/**
|
|
@@ -362,7 +362,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
362
362
|
return y().useFormState(t, e, i);
|
|
363
363
|
}, s.useFormStatus = function() {
|
|
364
364
|
return y().useHostTransitionStatus();
|
|
365
|
-
}, s.version = "19.
|
|
365
|
+
}, s.version = "19.2.3", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
366
366
|
}()), s;
|
|
367
367
|
}
|
|
368
368
|
function E() {
|
package/dist/main-client.d.ts
CHANGED
|
@@ -36,3 +36,5 @@ export { Carousel } from './organisms/Carousel/Carousel';
|
|
|
36
36
|
export type { CarouselProps } from './organisms/Carousel/Carousel';
|
|
37
37
|
export { Footer } from './organisms/Footer/Footer';
|
|
38
38
|
export type { FooterProps } from './organisms/Footer/Footer';
|
|
39
|
+
export { SpinZoomViewer } from './organisms/SpinZoomViewer/SpinZoomViewer';
|
|
40
|
+
export type { SpinZoomViewerProps } from './organisms/SpinZoomViewer/SpinZoomViewer';
|
package/dist/main-client.js
CHANGED
|
@@ -5,23 +5,23 @@ 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
|
-
import { Text as
|
|
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 { Logo as
|
|
16
|
-
import { SearchBox as
|
|
8
|
+
import { Text as S } from "./atoms/Text/Text.js";
|
|
9
|
+
import { Input as I } from "./atoms/Input/Input.js";
|
|
10
|
+
import { Link as s } from "./atoms/Link/Link.js";
|
|
11
|
+
import { linkClassName as A } from "./atoms/Link/linkClassName.js";
|
|
12
|
+
import { configureLink as P, routerOverride as h } from "./atoms/Link/configureLink.js";
|
|
13
|
+
import { LinkButton as w } from "./atoms/LinkButton/LinkButton.js";
|
|
14
|
+
import { configureImage as M } from "./atoms/Image/configureImage.js";
|
|
15
|
+
import { Logo as V } from "./molecules/Logo/Logo.js";
|
|
16
|
+
import { SearchBox as y } from "./molecules/SearchBox/SearchBox.js";
|
|
17
17
|
import { QuantityInput as z } from "./molecules/QuantityInput/QuantityInput.js";
|
|
18
18
|
import { Pricing as O } from "./molecules/Pricing/Pricing.js";
|
|
19
19
|
import { Availability as R } from "./molecules/Availability/Availability.js";
|
|
20
|
-
import { Avatar as
|
|
21
|
-
import { BannerCard as
|
|
22
|
-
import { CardLink as
|
|
23
|
-
import { Breadcrumbs as
|
|
24
|
-
import { NotFound as
|
|
20
|
+
import { Avatar as j } from "./molecules/Avatar/Avatar.js";
|
|
21
|
+
import { BannerCard as D } from "./molecules/BannerCard/BannerCard.js";
|
|
22
|
+
import { CardLink as J } from "./molecules/CardLink/CardLink.js";
|
|
23
|
+
import { Breadcrumbs as U } from "./molecules/Breadcrumbs/Breadcrumbs.js";
|
|
24
|
+
import { NotFound as X } from "./organisms/NotFound/NotFound.js";
|
|
25
25
|
import { HorizontalScroll as _ } from "./atoms/HorizontalScroll/HorizontalScroll.js";
|
|
26
26
|
import { SlideInPanel as oo } from "./atoms/SlideInPanel/SlideInPanel.js";
|
|
27
27
|
import { Tooltip as eo } from "./atoms/Tooltip/Tooltip.js";
|
|
@@ -31,58 +31,60 @@ import { Chip as ao } from "./molecules/Chip/Chip.js";
|
|
|
31
31
|
import { ToggleView as io } from "./molecules/ToggleView/ToggleView.js";
|
|
32
32
|
import { CartSlideInPanel as uo } from "./molecules/Cart/CartSlideInPanel.js";
|
|
33
33
|
import { StatefulButton as Co } from "./molecules/StatefulButton/StatefulButton.js";
|
|
34
|
-
import { AnimatedCheckMark as
|
|
35
|
-
import { AddToCart as
|
|
36
|
-
import { Modal as
|
|
37
|
-
import { ImageViewer as
|
|
38
|
-
import { MainNav as
|
|
34
|
+
import { AnimatedCheckMark as So } from "./molecules/StatefulButton/AnimatedCheckmark.js";
|
|
35
|
+
import { AddToCart as Io } from "./molecules/AddToCart/AddToCart.js";
|
|
36
|
+
import { Modal as so } from "./molecules/Modal/Modal.js";
|
|
37
|
+
import { ImageViewer as Ao } from "./molecules/ImageViewer/ImageViewer.js";
|
|
38
|
+
import { MainNav as Po } from "./organisms/MainNav/MainNav.js";
|
|
39
39
|
import { ChipSelector as To } from "./organisms/ChipSelector/ChipSelector.js";
|
|
40
|
-
import { Product as
|
|
41
|
-
import { Carousel as
|
|
42
|
-
import { Footer as
|
|
40
|
+
import { Product as Fo } from "./organisms/Product/Product.js";
|
|
41
|
+
import { Carousel as No } from "./organisms/Carousel/Carousel.js";
|
|
42
|
+
import { Footer as bo } from "./organisms/Footer/Footer.js";
|
|
43
|
+
import { default as Ho } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
|
|
43
44
|
export {
|
|
44
45
|
fo as Account,
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
Io as AddToCart,
|
|
47
|
+
So as AnimatedCheckMark,
|
|
47
48
|
R as Availability,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
j as Avatar,
|
|
50
|
+
D as BannerCard,
|
|
51
|
+
U as Breadcrumbs,
|
|
51
52
|
e as Button,
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
J as CardLink,
|
|
54
|
+
No as Carousel,
|
|
54
55
|
uo as CartSlideInPanel,
|
|
55
56
|
ao as Chip,
|
|
56
57
|
To as ChipSelector,
|
|
57
58
|
f as Column,
|
|
58
59
|
p as Flex,
|
|
59
|
-
|
|
60
|
+
bo as Footer,
|
|
60
61
|
x as Grid,
|
|
61
62
|
n as Head,
|
|
62
63
|
_ as HorizontalScroll,
|
|
63
64
|
l as Icon,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
Ao as ImageViewer,
|
|
66
|
+
I as Input,
|
|
67
|
+
s as Link,
|
|
68
|
+
w as LinkButton,
|
|
69
|
+
V as Logo,
|
|
70
|
+
Po as MainNav,
|
|
71
|
+
so as Modal,
|
|
72
|
+
X as NotFound,
|
|
72
73
|
po as Popover,
|
|
73
74
|
O as Pricing,
|
|
74
|
-
|
|
75
|
+
Fo as Product,
|
|
75
76
|
z as QuantityInput,
|
|
76
77
|
d as Root,
|
|
77
|
-
|
|
78
|
+
y as SearchBox,
|
|
78
79
|
C as Separator,
|
|
79
80
|
oo as SlideInPanel,
|
|
81
|
+
Ho as SpinZoomViewer,
|
|
80
82
|
Co as StatefulButton,
|
|
81
|
-
|
|
83
|
+
S as Text,
|
|
82
84
|
io as ToggleView,
|
|
83
85
|
eo as Tooltip,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
M as configureImage,
|
|
87
|
+
P as configureLink,
|
|
88
|
+
A as linkClassName,
|
|
89
|
+
h as routerOverride
|
|
88
90
|
};
|
|
@@ -59,6 +59,10 @@ declare const meta: {
|
|
|
59
59
|
results?: number | undefined;
|
|
60
60
|
security?: string | undefined;
|
|
61
61
|
unselectable?: "on" | "off" | undefined;
|
|
62
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
63
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
64
|
+
popoverTarget?: string | undefined;
|
|
65
|
+
inert?: boolean | undefined;
|
|
62
66
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
63
67
|
is?: string | undefined;
|
|
64
68
|
exportparts?: string | undefined;
|
|
@@ -268,6 +272,8 @@ declare const meta: {
|
|
|
268
272
|
onLostPointerCaptureCapture?: import('react').PointerEventHandler<HTMLDivElement> | undefined;
|
|
269
273
|
onScroll?: import('react').UIEventHandler<HTMLDivElement> | undefined;
|
|
270
274
|
onScrollCapture?: import('react').UIEventHandler<HTMLDivElement> | undefined;
|
|
275
|
+
onScrollEnd?: import('react').UIEventHandler<HTMLDivElement> | undefined;
|
|
276
|
+
onScrollEndCapture?: import('react').UIEventHandler<HTMLDivElement> | undefined;
|
|
271
277
|
onWheel?: import('react').WheelEventHandler<HTMLDivElement> | undefined;
|
|
272
278
|
onWheelCapture?: import('react').WheelEventHandler<HTMLDivElement> | undefined;
|
|
273
279
|
onAnimationStart?: import('react').AnimationEventHandler<HTMLDivElement> | undefined;
|
|
@@ -276,8 +282,16 @@ declare const meta: {
|
|
|
276
282
|
onAnimationEndCapture?: import('react').AnimationEventHandler<HTMLDivElement> | undefined;
|
|
277
283
|
onAnimationIteration?: import('react').AnimationEventHandler<HTMLDivElement> | undefined;
|
|
278
284
|
onAnimationIterationCapture?: import('react').AnimationEventHandler<HTMLDivElement> | undefined;
|
|
285
|
+
onToggle?: import('react').ToggleEventHandler<HTMLDivElement> | undefined;
|
|
286
|
+
onBeforeToggle?: import('react').ToggleEventHandler<HTMLDivElement> | undefined;
|
|
287
|
+
onTransitionCancel?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
288
|
+
onTransitionCancelCapture?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
279
289
|
onTransitionEnd?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
280
290
|
onTransitionEndCapture?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
291
|
+
onTransitionRun?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
292
|
+
onTransitionRunCapture?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
293
|
+
onTransitionStart?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
294
|
+
onTransitionStartCapture?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
281
295
|
}>, context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
|
|
282
296
|
variant?: ("color" | "white") | undefined;
|
|
283
297
|
defaultChecked?: boolean | undefined;
|
|
@@ -327,6 +341,10 @@ declare const meta: {
|
|
|
327
341
|
results?: number | undefined;
|
|
328
342
|
security?: string | undefined;
|
|
329
343
|
unselectable?: "on" | "off" | undefined;
|
|
344
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
345
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
346
|
+
popoverTarget?: string | undefined;
|
|
347
|
+
inert?: boolean | undefined;
|
|
330
348
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
331
349
|
is?: string | undefined;
|
|
332
350
|
exportparts?: string | undefined;
|
|
@@ -536,6 +554,8 @@ declare const meta: {
|
|
|
536
554
|
onLostPointerCaptureCapture?: import('react').PointerEventHandler<HTMLDivElement> | undefined;
|
|
537
555
|
onScroll?: import('react').UIEventHandler<HTMLDivElement> | undefined;
|
|
538
556
|
onScrollCapture?: import('react').UIEventHandler<HTMLDivElement> | undefined;
|
|
557
|
+
onScrollEnd?: import('react').UIEventHandler<HTMLDivElement> | undefined;
|
|
558
|
+
onScrollEndCapture?: import('react').UIEventHandler<HTMLDivElement> | undefined;
|
|
539
559
|
onWheel?: import('react').WheelEventHandler<HTMLDivElement> | undefined;
|
|
540
560
|
onWheelCapture?: import('react').WheelEventHandler<HTMLDivElement> | undefined;
|
|
541
561
|
onAnimationStart?: import('react').AnimationEventHandler<HTMLDivElement> | undefined;
|
|
@@ -544,8 +564,16 @@ declare const meta: {
|
|
|
544
564
|
onAnimationEndCapture?: import('react').AnimationEventHandler<HTMLDivElement> | undefined;
|
|
545
565
|
onAnimationIteration?: import('react').AnimationEventHandler<HTMLDivElement> | undefined;
|
|
546
566
|
onAnimationIterationCapture?: import('react').AnimationEventHandler<HTMLDivElement> | undefined;
|
|
567
|
+
onToggle?: import('react').ToggleEventHandler<HTMLDivElement> | undefined;
|
|
568
|
+
onBeforeToggle?: import('react').ToggleEventHandler<HTMLDivElement> | undefined;
|
|
569
|
+
onTransitionCancel?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
570
|
+
onTransitionCancelCapture?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
547
571
|
onTransitionEnd?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
548
572
|
onTransitionEndCapture?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
573
|
+
onTransitionRun?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
574
|
+
onTransitionRunCapture?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
575
|
+
onTransitionStart?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
576
|
+
onTransitionStartCapture?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
|
|
549
577
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
550
578
|
};
|
|
551
579
|
export default meta;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { HideAtProps } from '../../atoms/HideAt';
|
|
3
|
-
export interface ToggleViewProps extends React.HTMLAttributes<HTMLDivElement>, HideAtProps {
|
|
3
|
+
export interface ToggleViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onToggle">, HideAtProps {
|
|
4
4
|
selectedId: string | number;
|
|
5
5
|
onToggle: (id: string | number) => void;
|
|
6
6
|
className?: string;
|
|
@@ -9,7 +9,7 @@ export interface ProductProps extends AvailabilityProps {
|
|
|
9
9
|
partNumber: string;
|
|
10
10
|
priceLabel: string;
|
|
11
11
|
price: string;
|
|
12
|
-
imgSrc
|
|
12
|
+
imgSrc?: string;
|
|
13
13
|
attributes?: {
|
|
14
14
|
label: string;
|
|
15
15
|
value: string;
|
|
@@ -17,5 +17,6 @@ export interface ProductProps extends AvailabilityProps {
|
|
|
17
17
|
className?: string;
|
|
18
18
|
onAddToCart: (_itemKey: number, _quantity: number) => void;
|
|
19
19
|
onClose?: (_itemKey: number) => void;
|
|
20
|
+
flat?: boolean;
|
|
20
21
|
}
|
|
21
|
-
export declare function Product({ productView, itemKey, partNumber, productDescription, availDescription, availId, contactHref, contactLinkBehavior, productHref, priceLabel, price, imgSrc, attributes, className, onAddToCart, onClose, ...otherProps }: ProductProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function Product({ productView, itemKey, partNumber, productDescription, availDescription, availId, contactHref, contactLinkBehavior, productHref, priceLabel, price, imgSrc, attributes, className, onAddToCart, onClose, flat, ...otherProps }: ProductProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,131 +1,134 @@
|
|
|
1
1
|
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { Image as
|
|
3
|
-
import { Link as
|
|
2
|
+
import { Image as v } from "../../atoms/Image/Image.js";
|
|
3
|
+
import { Link as I } from "../../atoms/Link/Link.js";
|
|
4
4
|
import { Text as o } from "../../atoms/Text/Text.js";
|
|
5
|
-
import { Availability as
|
|
6
|
-
import { Pricing as
|
|
7
|
-
import { AddToCart as
|
|
8
|
-
import { Icon as
|
|
9
|
-
import { c as
|
|
10
|
-
import '../../assets/Product.css';const
|
|
11
|
-
productCard:
|
|
12
|
-
productInformation:
|
|
13
|
-
purchaseInformation:
|
|
14
|
-
addToCart:
|
|
15
|
-
addToCartButton:
|
|
16
|
-
partNumber:
|
|
17
|
-
partNumberLabel:
|
|
18
|
-
productTile:
|
|
19
|
-
topRow:
|
|
20
|
-
productData:
|
|
21
|
-
purchase:
|
|
22
|
-
attributeContainer:
|
|
5
|
+
import { Availability as w } from "../../molecules/Availability/Availability.js";
|
|
6
|
+
import { Pricing as x } from "../../molecules/Pricing/Pricing.js";
|
|
7
|
+
import { AddToCart as z } from "../../molecules/AddToCart/AddToCart.js";
|
|
8
|
+
import { Icon as R } from "../../atoms/Icon/Icon.js";
|
|
9
|
+
import { c as B } from "../../clsx-OuTLNxxd.js";
|
|
10
|
+
import '../../assets/Product.css';const $ = "_productCard_179ie_1", A = "_productInformation_179ie_20", D = "_purchaseInformation_179ie_27", P = "_addToCart_179ie_35", j = "_addToCartButton_179ie_38", k = "_partNumber_179ie_46", y = "_partNumberLabel_179ie_53", q = "_productTile_179ie_57", E = "_topRow_179ie_76", F = "_productData_179ie_107", G = "_purchase_179ie_27", J = "_attributeContainer_179ie_144", M = "_elevated_179ie_192", O = "_noImage_179ie_198", e = {
|
|
11
|
+
productCard: $,
|
|
12
|
+
productInformation: A,
|
|
13
|
+
purchaseInformation: D,
|
|
14
|
+
addToCart: P,
|
|
15
|
+
addToCartButton: j,
|
|
16
|
+
partNumber: k,
|
|
17
|
+
partNumberLabel: y,
|
|
18
|
+
productTile: q,
|
|
19
|
+
topRow: E,
|
|
20
|
+
productData: F,
|
|
21
|
+
purchase: G,
|
|
22
|
+
attributeContainer: J,
|
|
23
|
+
elevated: M,
|
|
24
|
+
noImage: O
|
|
23
25
|
};
|
|
24
|
-
function
|
|
25
|
-
productView:
|
|
26
|
-
itemKey:
|
|
27
|
-
partNumber:
|
|
28
|
-
productDescription:
|
|
29
|
-
availDescription:
|
|
30
|
-
availId:
|
|
31
|
-
contactHref:
|
|
32
|
-
contactLinkBehavior:
|
|
33
|
-
productHref:
|
|
34
|
-
priceLabel:
|
|
35
|
-
price:
|
|
36
|
-
imgSrc:
|
|
37
|
-
attributes:
|
|
26
|
+
function S({
|
|
27
|
+
productView: L,
|
|
28
|
+
itemKey: c,
|
|
29
|
+
partNumber: i,
|
|
30
|
+
productDescription: m,
|
|
31
|
+
availDescription: u,
|
|
32
|
+
availId: d,
|
|
33
|
+
contactHref: h,
|
|
34
|
+
contactLinkBehavior: p,
|
|
35
|
+
productHref: _,
|
|
36
|
+
priceLabel: N,
|
|
37
|
+
price: n,
|
|
38
|
+
imgSrc: r,
|
|
39
|
+
attributes: l,
|
|
38
40
|
className: b,
|
|
39
41
|
onAddToCart: f,
|
|
40
42
|
onClose: C,
|
|
41
|
-
|
|
43
|
+
flat: T,
|
|
44
|
+
...g
|
|
42
45
|
}) {
|
|
43
|
-
return
|
|
44
|
-
/* @__PURE__ */ t(
|
|
45
|
-
|
|
46
|
+
return L === "Card" ? /* @__PURE__ */ a("div", { className: B(e.productCard, b, !T && e.elevated, !r && e.noImage), ...g, children: [
|
|
47
|
+
r && /* @__PURE__ */ t(
|
|
48
|
+
v,
|
|
46
49
|
{
|
|
47
|
-
src:
|
|
48
|
-
alt: `${
|
|
50
|
+
src: r,
|
|
51
|
+
alt: `${i} product image`,
|
|
49
52
|
height: 96,
|
|
50
53
|
width: 96
|
|
51
54
|
}
|
|
52
55
|
),
|
|
53
|
-
/* @__PURE__ */ a("div", { className:
|
|
54
|
-
/* @__PURE__ */ t(
|
|
55
|
-
/* @__PURE__ */ a("div", { className:
|
|
56
|
-
/* @__PURE__ */ t(o, { size: "sm", className:
|
|
57
|
-
/* @__PURE__ */ t(o, { size: "sm", weight: "semibold", children:
|
|
56
|
+
/* @__PURE__ */ a("div", { className: e.productInformation, children: [
|
|
57
|
+
/* @__PURE__ */ t(I, { href: _, children: m }),
|
|
58
|
+
/* @__PURE__ */ a("div", { className: e.partNumber, children: [
|
|
59
|
+
/* @__PURE__ */ t(o, { size: "sm", className: e.partNumberLabel, children: "Part #" }),
|
|
60
|
+
/* @__PURE__ */ t(o, { size: "sm", weight: "semibold", children: i })
|
|
58
61
|
] })
|
|
59
62
|
] }),
|
|
60
|
-
/* @__PURE__ */ a("div", { className:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
/* @__PURE__ */ a("div", { className: e.purchaseInformation, children: [
|
|
64
|
+
d && /* @__PURE__ */ t(
|
|
65
|
+
w,
|
|
63
66
|
{
|
|
64
|
-
availId:
|
|
65
|
-
availDescription:
|
|
66
|
-
contactHref:
|
|
67
|
-
contactLinkBehavior:
|
|
67
|
+
availId: d,
|
|
68
|
+
availDescription: u,
|
|
69
|
+
contactHref: h,
|
|
70
|
+
contactLinkBehavior: p
|
|
68
71
|
}
|
|
69
72
|
),
|
|
70
|
-
|
|
73
|
+
n && /* @__PURE__ */ t(x, { pricingLabel: N, price: n })
|
|
71
74
|
] }),
|
|
72
75
|
/* @__PURE__ */ t(
|
|
73
|
-
|
|
76
|
+
z,
|
|
74
77
|
{
|
|
75
|
-
itemKey:
|
|
78
|
+
itemKey: c,
|
|
76
79
|
onAdd: f,
|
|
77
|
-
className:
|
|
78
|
-
addButtonClassName:
|
|
80
|
+
className: e.addToCart,
|
|
81
|
+
addButtonClassName: e.addToCartButton,
|
|
79
82
|
size: "md",
|
|
80
83
|
buttonDoneText: ""
|
|
81
84
|
}
|
|
82
85
|
)
|
|
83
|
-
] }) : /* @__PURE__ */ a("div", { className:
|
|
84
|
-
/* @__PURE__ */ t(
|
|
85
|
-
|
|
86
|
+
] }) : /* @__PURE__ */ a("div", { className: B(e.productTile, b, !T && e.elevated, !r && e.noImage), ...g, children: [
|
|
87
|
+
r && /* @__PURE__ */ t(
|
|
88
|
+
v,
|
|
86
89
|
{
|
|
87
|
-
src:
|
|
88
|
-
alt: `${
|
|
90
|
+
src: r,
|
|
91
|
+
alt: `${i} product image`,
|
|
89
92
|
height: 108,
|
|
90
93
|
width: 108
|
|
91
94
|
}
|
|
92
95
|
),
|
|
93
|
-
/* @__PURE__ */ a("div", { className:
|
|
94
|
-
/* @__PURE__ */ a("div", { className:
|
|
95
|
-
/* @__PURE__ */ a("div", { className:
|
|
96
|
-
/* @__PURE__ */ t(
|
|
97
|
-
/* @__PURE__ */ a("div", { className:
|
|
98
|
-
/* @__PURE__ */ t(o, { size: "sm", className:
|
|
99
|
-
/* @__PURE__ */ t(o, { size: "sm", weight: "semibold", children:
|
|
96
|
+
/* @__PURE__ */ a("div", { className: e.productData, children: [
|
|
97
|
+
/* @__PURE__ */ a("div", { className: e.topRow, children: [
|
|
98
|
+
/* @__PURE__ */ a("div", { className: e.productInformation, children: [
|
|
99
|
+
/* @__PURE__ */ t(I, { href: _, children: m }),
|
|
100
|
+
/* @__PURE__ */ a("div", { className: e.partNumber, children: [
|
|
101
|
+
/* @__PURE__ */ t(o, { size: "sm", className: e.partNumberLabel, children: "Part #" }),
|
|
102
|
+
/* @__PURE__ */ t(o, { size: "sm", weight: "semibold", children: i })
|
|
100
103
|
] })
|
|
101
104
|
] }),
|
|
102
|
-
C && /* @__PURE__ */ t("button", { onClick: () => C(
|
|
105
|
+
C && /* @__PURE__ */ t("button", { onClick: () => C(c), children: /* @__PURE__ */ t(R, { size: "sm", iconKey: "fa-light fa-xmark" }) })
|
|
103
106
|
] }),
|
|
104
|
-
/* @__PURE__ */ a("div", { className:
|
|
105
|
-
/* @__PURE__ */ a("div", { className:
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
/* @__PURE__ */ a("div", { className: e.purchase, children: [
|
|
108
|
+
/* @__PURE__ */ a("div", { className: e.purchaseInformation, children: [
|
|
109
|
+
d && /* @__PURE__ */ t(
|
|
110
|
+
w,
|
|
108
111
|
{
|
|
109
|
-
availId:
|
|
110
|
-
availDescription:
|
|
111
|
-
contactHref:
|
|
112
|
-
contactLinkBehavior:
|
|
112
|
+
availId: d,
|
|
113
|
+
availDescription: u,
|
|
114
|
+
contactHref: h,
|
|
115
|
+
contactLinkBehavior: p
|
|
113
116
|
}
|
|
114
117
|
),
|
|
115
|
-
|
|
118
|
+
n && /* @__PURE__ */ t(x, { pricingLabel: N, price: n })
|
|
116
119
|
] }),
|
|
117
|
-
/* @__PURE__ */ t(
|
|
120
|
+
/* @__PURE__ */ t(z, { itemKey: c, onAdd: f, className: e.addToCart, addButtonClassName: e.addToCartButton })
|
|
118
121
|
] }),
|
|
119
|
-
|
|
122
|
+
l && l.length > 0 && /* @__PURE__ */ t("ul", { className: e.attributeContainer, children: l.map((s) => /* @__PURE__ */ a("li", { children: [
|
|
120
123
|
/* @__PURE__ */ a(o, { size: "xs", weight: "light", children: [
|
|
121
|
-
|
|
124
|
+
s.label,
|
|
122
125
|
":"
|
|
123
126
|
] }),
|
|
124
|
-
/* @__PURE__ */ t(o, { size: "xs", weight: "semibold", children:
|
|
125
|
-
] }, `${
|
|
127
|
+
/* @__PURE__ */ t(o, { size: "xs", weight: "semibold", children: s.value })
|
|
128
|
+
] }, `${s.label}.${s.value}`)) })
|
|
126
129
|
] })
|
|
127
130
|
] });
|
|
128
131
|
}
|
|
129
132
|
export {
|
|
130
|
-
|
|
133
|
+
S as Product
|
|
131
134
|
};
|
|
@@ -65,6 +65,10 @@ declare const meta: {
|
|
|
65
65
|
action: string;
|
|
66
66
|
description: string;
|
|
67
67
|
};
|
|
68
|
+
flat: {
|
|
69
|
+
control: "boolean";
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
68
72
|
};
|
|
69
73
|
args: ProductProps;
|
|
70
74
|
tags: string[];
|
|
@@ -77,3 +81,6 @@ export declare const Unavailable: Story;
|
|
|
77
81
|
export declare const ContactForAvailability: Story;
|
|
78
82
|
export declare const TileView: Story;
|
|
79
83
|
export declare const DifferentPriceLabel: Story;
|
|
84
|
+
export declare const NoImageCard: Story;
|
|
85
|
+
export declare const FlatTile: Story;
|
|
86
|
+
export declare const NoImageFlatCard: Story;
|
|
@@ -46,7 +46,8 @@ const o = [
|
|
|
46
46
|
price: { control: "text" },
|
|
47
47
|
imgSrc: { control: "text" },
|
|
48
48
|
itemKey: { control: "number" },
|
|
49
|
-
onAddToCart: { action: "addToCart", description: "(itemKey, quantity)" }
|
|
49
|
+
onAddToCart: { action: "addToCart", description: "(itemKey, quantity)" },
|
|
50
|
+
flat: { control: "boolean", description: "Removes border and shadow" }
|
|
50
51
|
},
|
|
51
52
|
args: {
|
|
52
53
|
productView: "Card",
|
|
@@ -69,7 +70,8 @@ const o = [
|
|
|
69
70
|
},
|
|
70
71
|
onClose: (t) => {
|
|
71
72
|
alert(`On close clicked ${t}`);
|
|
72
|
-
}
|
|
73
|
+
},
|
|
74
|
+
flat: !1
|
|
73
75
|
},
|
|
74
76
|
tags: ["autodocs"]
|
|
75
77
|
}, l = {}, c = {
|
|
@@ -90,23 +92,42 @@ const o = [
|
|
|
90
92
|
contactLinkBehavior: "new-tab",
|
|
91
93
|
contactHref: "https://dev.caseparts.com/account/contactus"
|
|
92
94
|
}
|
|
93
|
-
},
|
|
95
|
+
}, d = {
|
|
94
96
|
args: {
|
|
95
97
|
productView: "Tile",
|
|
96
98
|
productDescription: "Tile View Product"
|
|
97
99
|
}
|
|
98
|
-
},
|
|
100
|
+
}, p = {
|
|
99
101
|
args: {
|
|
100
102
|
priceLabel: "Member",
|
|
101
103
|
price: "$118.49"
|
|
102
104
|
}
|
|
105
|
+
}, u = {
|
|
106
|
+
args: {
|
|
107
|
+
productView: "Card",
|
|
108
|
+
imgSrc: void 0
|
|
109
|
+
}
|
|
110
|
+
}, v = {
|
|
111
|
+
args: {
|
|
112
|
+
productView: "Tile",
|
|
113
|
+
flat: !0
|
|
114
|
+
}
|
|
115
|
+
}, b = {
|
|
116
|
+
args: {
|
|
117
|
+
productView: "Card",
|
|
118
|
+
imgSrc: void 0,
|
|
119
|
+
flat: !0
|
|
120
|
+
}
|
|
103
121
|
};
|
|
104
122
|
export {
|
|
105
123
|
s as ContactForAvailability,
|
|
106
124
|
l as Default,
|
|
107
|
-
|
|
125
|
+
p as DifferentPriceLabel,
|
|
126
|
+
v as FlatTile,
|
|
108
127
|
c as LimitedStock,
|
|
109
|
-
|
|
128
|
+
u as NoImageCard,
|
|
129
|
+
b as NoImageFlatCard,
|
|
130
|
+
d as TileView,
|
|
110
131
|
n as Unavailable,
|
|
111
132
|
r as default
|
|
112
133
|
};
|