@caseparts-org/caseblocks 0.0.160 → 0.0.161

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.
@@ -0,0 +1,21 @@
1
+ import './assets/Cart.css';const t = "_cartIconButton_5jpfu_2", e = "_count_5jpfu_9", o = "_cartContainer_5jpfu_24", n = "_headerWrapper_5jpfu_35", _ = "_header_5jpfu_35", c = "_cartItems_5jpfu_53", a = "_cartItem_5jpfu_53", r = "_topRow_5jpfu_79", u = "_itemInfo_5jpfu_85", m = "_purchaseInformation_5jpfu_90", s = "_itemManagement_5jpfu_97", p = "_itemImage_5jpfu_110", I = "_removeItem_5jpfu_113", f = "_noItems_5jpfu_123", j = "_subtotal_5jpfu_130", i = "_checkoutButton_5jpfu_137", h = {
2
+ cartIconButton: t,
3
+ count: e,
4
+ cartContainer: o,
5
+ headerWrapper: n,
6
+ header: _,
7
+ cartItems: c,
8
+ cartItem: a,
9
+ topRow: r,
10
+ itemInfo: u,
11
+ purchaseInformation: m,
12
+ itemManagement: s,
13
+ itemImage: p,
14
+ removeItem: I,
15
+ noItems: f,
16
+ subtotal: j,
17
+ checkoutButton: i
18
+ };
19
+ export {
20
+ h as s
21
+ };
@@ -1 +1 @@
1
- ._cartIconButton_1dh0n_2{position:relative;border:none;padding:0;margin:0;background-color:transparent}._count_1dh0n_9{position:absolute;top:0;left:14px;border-radius:50%;width:18px;height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:var(--color-brand-primary-primary-tangerine);color:var(--color-neutrals-neutral-1);font-weight:var(--font-weight-semibold)}._cartContainer_1dh0n_24{height:100vh;width:100%;min-width:320px;max-width:375px;box-sizing:border-box;display:grid;grid-template-rows:auto 1fr auto auto;gap:var(--spacing-1);padding:var(--spacing-1)}._headerWrapper_1dh0n_35{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._headerWrapper_1dh0n_35>button{padding:0;margin:0;background-color:transparent;border:none}._header_1dh0n_35{display:flex;flex-direction:column;align-items:flex-start;width:100%}._cartItems_1dh0n_53{height:100%;overflow-y:auto;overflow-x:hidden}._cartItems_1dh0n_53 ul{margin:0;padding:0}._cartItems_1dh0n_53 li{display:grid;grid-template-columns:auto 1fr;gap:var(--spacing-0-5);align-items:center;box-sizing:border-box;position:relative;list-style:none;margin:0;padding:var(--spacing-0-5);width:100%;border-bottom:1px solid var(--color-neutrals-neutral-2)}._cartItems_1dh0n_53 li:first-of-type{border-top:1px solid var(--color-neutrals-neutral-2)}._topRow_1dh0n_78{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between}._itemInfo_1dh0n_84{display:flex;flex-direction:column;align-items:flex-start}._purchaseInformation_1dh0n_89{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._itemManagement_1dh0n_96{display:flex;flex-direction:column;align-items:flex-end;gap:var(--spacing-spacing-3xs)}._cartItems_1dh0n_53 li p{margin:0;padding:0;word-wrap:break-word;white-space:normal;overflow-wrap:break-word}._cartItems_1dh0n_53 img{height:40px;width:40px;object-fit:contain}._removeItem_1dh0n_114{border:none;background-color:transparent;padding:0;margin:0;cursor:pointer;width:min-content;height:min-content}._noItems_1dh0n_124{display:flex;flex-direction:row;align-items:center;justify-content:center;height:100%}._subtotal_1dh0n_131{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:var(--spacing-0-5)}._checkoutButton_1dh0n_138{width:100%}
1
+ ._cartIconButton_5jpfu_2{position:relative;border:none;padding:0;margin:0;background-color:transparent}._count_5jpfu_9{position:absolute;top:0;left:14px;border-radius:50%;width:18px;height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:var(--color-brand-primary-primary-tangerine);color:var(--color-neutrals-neutral-1);font-weight:var(--font-weight-semibold)}._cartContainer_5jpfu_24{height:100vh;width:100%;min-width:320px;max-width:375px;box-sizing:border-box;display:grid;grid-template-rows:auto 1fr auto auto;gap:var(--spacing-1);padding:var(--spacing-1)}._headerWrapper_5jpfu_35{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._headerWrapper_5jpfu_35>button{padding:0;margin:0;background-color:transparent;border:none}._header_5jpfu_35{display:flex;flex-direction:column;align-items:flex-start;width:100%}._cartItems_5jpfu_53{height:100%;overflow-y:auto;overflow-x:hidden}._cartItems_5jpfu_53 ul{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-1xs)}._cartItem_5jpfu_53{display:grid;grid-template-columns:auto 1fr;gap:var(--spacing-0-5);align-items:start;box-sizing:border-box;position:relative;list-style:none;margin:0;padding:var(--spacing-0-5);width:100%;border:1px solid var(--color-neutrals-neutral-2);border-radius:var(--border-radius-md)}._topRow_5jpfu_79{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between}._itemInfo_5jpfu_85{display:flex;flex-direction:column;align-items:flex-start}._purchaseInformation_5jpfu_90{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._itemManagement_5jpfu_97{display:flex;flex-direction:column;align-items:flex-end;gap:var(--spacing-spacing-3xs)}._cartItem_5jpfu_53 p{margin:0;padding:0;word-wrap:break-word;white-space:normal;overflow-wrap:break-word}._itemImage_5jpfu_110{object-fit:contain}._removeItem_5jpfu_113{border:none;background-color:transparent;padding:0;margin:0;cursor:pointer;width:min-content;height:min-content}._noItems_5jpfu_123{display:flex;flex-direction:row;align-items:center;justify-content:center;height:100%}._subtotal_5jpfu_130{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:var(--spacing-0-5)}._checkoutButton_5jpfu_137{width:100%}
@@ -19,6 +19,8 @@ export type { ChipProps } from './molecules/Chip/Chip';
19
19
  export { ToggleView } from './molecules/ToggleView/ToggleView';
20
20
  export type { ToggleViewProps, ToggleOptionProps, ToggleOptionBaseProps, } from './molecules/ToggleView/ToggleView';
21
21
  export type { ShoppingCart, CartItem } from './molecules/Cart/Cart';
22
+ export { CartPart } from './molecules/Cart/CartPart';
23
+ export type { CartPartProps } from './molecules/Cart/CartPart';
22
24
  export { CartSlideInPanel } from './molecules/Cart/CartSlideInPanel';
23
25
  export type { CartSlideInPanelProps } from './molecules/Cart/CartSlideInPanel';
24
26
  export type { StatefulButtonProps } from './molecules/StatefulButton/StatefulButton';
@@ -5,9 +5,9 @@ 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 u } from "./atoms/Root/Root.js";
7
7
  import { Separator as s } from "./atoms/Separator/Separator.js";
8
- import { Text as C } from "./atoms/Text/Text.js";
8
+ import { Text as k } from "./atoms/Text/Text.js";
9
9
  import { Input as S } from "./atoms/Input/Input.js";
10
- import { Link as P } from "./atoms/Link/Link.js";
10
+ import { Link as I } from "./atoms/Link/Link.js";
11
11
  import { linkClassName as A } from "./atoms/Link/linkClassName.js";
12
12
  import { configureLink as M, routerOverride as T } from "./atoms/Link/configureLink.js";
13
13
  import { LinkButton as L } from "./atoms/LinkButton/LinkButton.js";
@@ -23,80 +23,82 @@ import { BannerCard as J } from "./molecules/BannerCard/BannerCard.js";
23
23
  import { CardLink as U } from "./molecules/CardLink/CardLink.js";
24
24
  import { Breadcrumbs as X } from "./molecules/Breadcrumbs/Breadcrumbs.js";
25
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 vo } from "./molecules/AddToCart/AddToCart.js";
40
- import { Modal as ho } from "./molecules/Modal/Modal.js";
41
- import { ImageViewer as yo } from "./molecules/ImageViewer/ImageViewer.js";
42
- import { T as Ho } from "./Table-BX4PtCNE.js";
43
- import { Error as Vo } from "./molecules/Error/Error.js";
44
- import { MainNav as Eo } from "./organisms/MainNav/MainNav.js";
45
- import { ChipSelector as Oo } from "./organisms/ChipSelector/ChipSelector.js";
46
- import { Product as Ro } from "./organisms/Product/Product.js";
47
- import { Carousel as jo } from "./organisms/Carousel/Carousel.js";
48
- import { Footer as Do } from "./organisms/Footer/Footer.js";
49
- import { default as Ko } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
26
+ import { HorizontalScroll as rr } from "./atoms/HorizontalScroll/HorizontalScroll.js";
27
+ import { SlideInPanel as er } from "./atoms/SlideInPanel/SlideInPanel.js";
28
+ import { Markdown as pr } from "./atoms/Markdown/Markdown.js";
29
+ import { PreprocessedMarkdown as fr } from "./atoms/Markdown/PreprocessedMarkdown.js";
30
+ import { usePreprocessedMarkdown as ar } from "./atoms/Markdown/usePreprocessedMarkdown.js";
31
+ import { Tooltip as ir } from "./atoms/Tooltip/Tooltip.js";
32
+ import { Popover as dr } from "./atoms/Popover/Popover.js";
33
+ import { Account as cr } from "./molecules/Account/Account.js";
34
+ import { Chip as Cr } from "./molecules/Chip/Chip.js";
35
+ import { ToggleView as gr } from "./molecules/ToggleView/ToggleView.js";
36
+ import { CartPart as Pr } from "./molecules/Cart/CartPart.js";
37
+ import { CartSlideInPanel as wr } from "./molecules/Cart/CartSlideInPanel.js";
38
+ import { StatefulButton as Br } from "./molecules/StatefulButton/StatefulButton.js";
39
+ import { AnimatedCheckMark as Tr } from "./molecules/StatefulButton/AnimatedCheckmark.js";
40
+ import { AddToCart as Lr } from "./molecules/AddToCart/AddToCart.js";
41
+ import { Modal as br } from "./molecules/Modal/Modal.js";
42
+ import { ImageViewer as Fr } from "./molecules/ImageViewer/ImageViewer.js";
43
+ import { T as Nr } from "./Table-BX4PtCNE.js";
44
+ import { Error as zr } from "./molecules/Error/Error.js";
45
+ import { MainNav as Gr } from "./organisms/MainNav/MainNav.js";
46
+ import { ChipSelector as Qr } from "./organisms/ChipSelector/ChipSelector.js";
47
+ import { Product as Zr } from "./organisms/Product/Product.js";
48
+ import { Carousel as qr } from "./organisms/Carousel/Carousel.js";
49
+ import { Footer as Jr } from "./organisms/Footer/Footer.js";
50
+ import { default as Ur } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
50
51
  export {
51
- so as Account,
52
- vo as AddToCart,
53
- Mo as AnimatedCheckMark,
52
+ cr as Account,
53
+ Lr as AddToCart,
54
+ Tr as AnimatedCheckMark,
54
55
  Z as Availability,
55
56
  q as Avatar,
56
57
  J as BannerCard,
57
58
  X as Breadcrumbs,
58
59
  e as Button,
59
60
  U as CardLink,
60
- jo as Carousel,
61
- Po as CartSlideInPanel,
62
- Co as Chip,
63
- Oo as ChipSelector,
61
+ qr as Carousel,
62
+ Pr as CartPart,
63
+ wr as CartSlideInPanel,
64
+ Cr as Chip,
65
+ Qr as ChipSelector,
64
66
  f as Column,
65
- Vo as Error,
67
+ zr as Error,
66
68
  p as Flex,
67
- Do as Footer,
69
+ Jr as Footer,
68
70
  x as Grid,
69
71
  n as Head,
70
- oo as HorizontalScroll,
72
+ rr as HorizontalScroll,
71
73
  l as Icon,
72
- yo as ImageViewer,
74
+ Fr as ImageViewer,
73
75
  S as Input,
74
- P as Link,
76
+ I as Link,
75
77
  L as LinkButton,
76
78
  N as Logo,
77
- Eo as MainNav,
78
- po as Markdown,
79
- ho as Modal,
79
+ Gr as MainNav,
80
+ pr as Markdown,
81
+ br as Modal,
80
82
  _ as NotFound,
81
- uo as Popover,
82
- fo as PreprocessedMarkdown,
83
+ dr as Popover,
84
+ fr as PreprocessedMarkdown,
83
85
  Q as Pricing,
84
- Ro as Product,
86
+ Zr as Product,
85
87
  G as QuantityInput,
86
88
  u as Root,
87
89
  z as SearchBox,
88
90
  s as Separator,
89
- eo as SlideInPanel,
90
- Ko as SpinZoomViewer,
91
- Ao as StatefulButton,
92
- Ho as Table,
93
- C as Text,
94
- So as ToggleView,
95
- io as Tooltip,
91
+ er as SlideInPanel,
92
+ Ur as SpinZoomViewer,
93
+ Br as StatefulButton,
94
+ Nr as Table,
95
+ k as Text,
96
+ gr as ToggleView,
97
+ ir as Tooltip,
96
98
  b as configureImage,
97
99
  M as configureLink,
98
100
  F as getHideAtStyles,
99
101
  A as linkClassName,
100
102
  T as routerOverride,
101
- ao as usePreprocessedMarkdown
103
+ ar as usePreprocessedMarkdown
102
104
  };
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
2
  import l from "react";
3
3
  import { Icon as g } from "../../atoms/Icon/Icon.js";
4
4
  import { Text as p } from "../../atoms/Text/Text.js";
5
- import { s as m } from "../../Cart.module-gkb4IOVS.js";
5
+ import { s as m } from "../../Cart.module-B-yc1ax6.js";
6
6
  const S = l.forwardRef(function({
7
7
  cart: i,
8
8
  open: t = !1,
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ export interface CartPartProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, "title"> {
3
+ imageUrl?: string;
4
+ imageAlt?: string;
5
+ title: React.ReactNode;
6
+ titleHref?: string;
7
+ subtitle?: React.ReactNode;
8
+ topAction?: React.ReactNode;
9
+ purchaseInfo?: React.ReactNode;
10
+ actions?: React.ReactNode;
11
+ }
12
+ export declare function CartPart({ imageUrl, imageAlt, title, titleHref, subtitle, topAction, purchaseInfo, actions, className, ...otherProps }: CartPartProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { jsxs as e, jsx as m } from "react/jsx-runtime";
2
+ import { Link as p } from "../../atoms/Link/Link.js";
3
+ import { Text as o } from "../../atoms/Text/Text.js";
4
+ import { s as i } from "../../Cart.module-B-yc1ax6.js";
5
+ import { Image as g } from "../../atoms/Image/Image.js";
6
+ import { c as N } from "../../clsx-OuTLNxxd.js";
7
+ function z({
8
+ imageUrl: t,
9
+ imageAlt: d = "Product image",
10
+ title: r,
11
+ titleHref: s,
12
+ subtitle: a,
13
+ topAction: l,
14
+ purchaseInfo: c,
15
+ actions: n,
16
+ className: h,
17
+ ...f
18
+ }) {
19
+ return /* @__PURE__ */ e("li", { className: N(i.cartItem, h), ...f, children: [
20
+ /* @__PURE__ */ m(g, { height: 50, width: 50, src: t || "", alt: d, className: i.itemImage }),
21
+ /* @__PURE__ */ e("div", { children: [
22
+ /* @__PURE__ */ e("div", { className: i.topRow, children: [
23
+ /* @__PURE__ */ e("div", { className: i.itemInfo, children: [
24
+ /* @__PURE__ */ m(o, { size: "sm", weight: "semibold", children: s ? /* @__PURE__ */ m(p, { href: s, children: r }) : r }),
25
+ a && /* @__PURE__ */ m(o, { size: "sm", children: a })
26
+ ] }),
27
+ l
28
+ ] }),
29
+ /* @__PURE__ */ e("div", { className: i.itemManagement, children: [
30
+ c && /* @__PURE__ */ m("div", { className: i.purchaseInformation, children: c }),
31
+ n
32
+ ] })
33
+ ] })
34
+ ] });
35
+ }
36
+ export {
37
+ z as CartPart
38
+ };
@@ -0,0 +1,21 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { CartPart } from './CartPart';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof CartPart;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ args: {
11
+ imageUrl: string;
12
+ imageAlt: string;
13
+ title: string;
14
+ titleHref: string;
15
+ subtitle: import("react/jsx-runtime").JSX.Element;
16
+ };
17
+ };
18
+ export default meta;
19
+ type Story = StoryObj<typeof meta>;
20
+ export declare const Basic: Story;
21
+ export declare const CustomSpecs: Story;
@@ -0,0 +1,80 @@
1
+ import { jsxs as e, jsx as t, Fragment as a } from "react/jsx-runtime";
2
+ import { Text as n } from "../../atoms/Text/Text.js";
3
+ import { Icon as s } from "../../atoms/Icon/Icon.js";
4
+ import { Button as l } from "../../atoms/Button/Button.js";
5
+ import { Availability as o } from "../Availability/Availability.js";
6
+ import { Pricing as c } from "../Pricing/Pricing.js";
7
+ import { QuantityInput as d } from "../QuantityInput/QuantityInput.js";
8
+ import { CartPart as r } from "./CartPart.js";
9
+ const v = {
10
+ title: "Case Parts/Molecules/CartPart",
11
+ component: r,
12
+ parameters: {
13
+ layout: "centered"
14
+ },
15
+ tags: ["autodocs"],
16
+ args: {
17
+ imageUrl: "https://m.media-amazon.com/images/I/216+JEttsYL._UF1000,1000_QL80_.jpg",
18
+ imageAlt: "1094-01 product image",
19
+ title: "Kason Door Closer - Flush",
20
+ titleHref: "#",
21
+ subtitle: /* @__PURE__ */ e(a, { children: [
22
+ /* @__PURE__ */ t(n, { colorToken: "quaternary", size: "xs", children: "Part # " }),
23
+ "1094-01"
24
+ ] })
25
+ }
26
+ }, I = {
27
+ args: {
28
+ purchaseInfo: /* @__PURE__ */ e(a, { children: [
29
+ /* @__PURE__ */ t(
30
+ o,
31
+ {
32
+ availId: "available",
33
+ availDescription: "In Stock",
34
+ contactHref: "#",
35
+ contactLinkBehavior: "new-tab"
36
+ }
37
+ ),
38
+ /* @__PURE__ */ t(c, { pricingLabel: "List Price", price: "$99.99" })
39
+ ] }),
40
+ actions: /* @__PURE__ */ t(
41
+ d,
42
+ {
43
+ quantity: 1,
44
+ onQuantityChange: () => {
45
+ },
46
+ size: "sm"
47
+ }
48
+ ),
49
+ topAction: /* @__PURE__ */ t("button", { type: "button", "aria-label": "Remove item", style: { border: "none", background: "transparent", padding: 0 }, children: /* @__PURE__ */ t(s, { iconKey: "fa-regular fa-trash", size: "sm" }) })
50
+ },
51
+ render: (i) => /* @__PURE__ */ t("div", { style: { width: 360 }, children: /* @__PURE__ */ t("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ t(r, { ...i }) }) })
52
+ }, k = {
53
+ args: {
54
+ title: "Custom-Molded Snap-In Magnetic Gasket",
55
+ subtitle: /* @__PURE__ */ e(a, { children: [
56
+ /* @__PURE__ */ t(n, { colorToken: "quaternary", size: "xs", children: "Specs " }),
57
+ 'MG064 36\\" x 79\\" 3-Sided Dart-to-Dart Gasket'
58
+ ] }),
59
+ purchaseInfo: /* @__PURE__ */ e(a, { children: [
60
+ /* @__PURE__ */ t(
61
+ o,
62
+ {
63
+ availId: "contact",
64
+ availDescription: "Contact us for availability",
65
+ contactHref: "#",
66
+ contactLinkBehavior: "new-tab"
67
+ }
68
+ ),
69
+ /* @__PURE__ */ t(c, { pricingLabel: "List Price", price: "$129.99" })
70
+ ] }),
71
+ actions: /* @__PURE__ */ t(l, { type: "button", variant: "secondary", size: "sm", children: "Remove" }),
72
+ topAction: null
73
+ },
74
+ render: (i) => /* @__PURE__ */ t("div", { style: { width: 360 }, children: /* @__PURE__ */ t("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ t(r, { ...i }) }) })
75
+ };
76
+ export {
77
+ I as Basic,
78
+ k as CustomSpecs,
79
+ v as default
80
+ };
@@ -1,31 +1,31 @@
1
- import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
- import { SlideInPanel as y } from "../../atoms/SlideInPanel/SlideInPanel.js";
1
+ import { jsx as e, jsxs as a, Fragment as s } from "react/jsx-runtime";
2
+ import { SlideInPanel as b } from "../../atoms/SlideInPanel/SlideInPanel.js";
3
3
  import { Text as n } from "../../atoms/Text/Text.js";
4
- import { Link as I } from "../../atoms/Link/Link.js";
5
- import { Button as b } from "../../atoms/Button/Button.js";
6
- import { Pricing as N } from "../Pricing/Pricing.js";
7
- import { QuantityInput as z } from "../QuantityInput/QuantityInput.js";
8
- import { Availability as k } from "../Availability/Availability.js";
4
+ import { Button as I } from "../../atoms/Button/Button.js";
5
+ import { Pricing as z } from "../Pricing/Pricing.js";
6
+ import { QuantityInput as k } from "../QuantityInput/QuantityInput.js";
7
+ import { Availability as C } from "../Availability/Availability.js";
9
8
  import { Icon as c } from "../../atoms/Icon/Icon.js";
10
- import { s as r } from "../../Cart.module-gkb4IOVS.js";
11
- function H({
12
- open: o,
9
+ import { CartPart as N } from "./CartPart.js";
10
+ import { s as r } from "../../Cart.module-B-yc1ax6.js";
11
+ function j({
12
+ open: d,
13
13
  onClose: l,
14
14
  cart: t,
15
15
  subtotal: m,
16
- itemPriceLabel: d,
17
- contactHref: h,
18
- contactLinkBehavior: p,
19
- onItemQtyChange: u,
20
- onItemDelete: f,
21
- onCheckout: v
16
+ itemPriceLabel: h,
17
+ contactHref: p,
18
+ contactLinkBehavior: u,
19
+ onItemQtyChange: f,
20
+ onItemDelete: g,
21
+ onCheckout: y
22
22
  }) {
23
- var s;
23
+ var o;
24
24
  return t = t || { items: [] }, /* @__PURE__ */ e(
25
- y,
25
+ b,
26
26
  {
27
27
  side: "right",
28
- open: o,
28
+ open: d,
29
29
  onClose: l,
30
30
  ariaLabel: "Shopping Cart",
31
31
  children: /* @__PURE__ */ a("div", { id: "cart-panel", className: r.cartContainer, children: [
@@ -33,58 +33,56 @@ function H({
33
33
  /* @__PURE__ */ a("div", { className: r.header, children: [
34
34
  /* @__PURE__ */ e(n, { size: "2xl", children: "Cart" }),
35
35
  /* @__PURE__ */ a(n, { size: "xs", colorToken: "quaternary", children: [
36
- (s = t == null ? void 0 : t.items) == null ? void 0 : s.length,
36
+ (o = t == null ? void 0 : t.items) == null ? void 0 : o.length,
37
37
  " items in your cart"
38
38
  ] })
39
39
  ] }),
40
40
  /* @__PURE__ */ e("button", { onClick: l, children: /* @__PURE__ */ e(c, { iconKey: "fa-regular fa-xmark", size: "md" }) })
41
41
  ] }),
42
- /* @__PURE__ */ e("div", { className: r.cartItems, children: t.items.length > 0 ? /* @__PURE__ */ e("ul", { children: t.items.map((i) => /* @__PURE__ */ a("li", { className: r.cartItem, children: [
43
- /* @__PURE__ */ e("img", { src: i.imageUrl, alt: `${i.itemId} product image` }),
44
- /* @__PURE__ */ a("div", { children: [
45
- /* @__PURE__ */ a("div", { className: r.topRow, children: [
46
- /* @__PURE__ */ a("div", { className: r.itemInfo, children: [
47
- /* @__PURE__ */ e(n, { size: "sm", weight: "semibold", children: /* @__PURE__ */ e(I, { href: i.itemHref || `/part/${i.itemId}`, children: i.description }) }),
48
- /* @__PURE__ */ a(n, { size: "sm", children: [
49
- /* @__PURE__ */ e(n, { colorToken: "quaternary", size: "xs", children: i.custom ? "Specs " : "Part # " }),
50
- i.itemId
51
- ] })
52
- ] }),
53
- /* @__PURE__ */ e("button", { onClick: () => f(i), className: r.removeItem, "aria-label": "Remove item", children: /* @__PURE__ */ e(c, { iconKey: "fa-regular fa-trash", size: "sm" }) })
42
+ /* @__PURE__ */ e("div", { className: r.cartItems, children: t.items.length > 0 ? /* @__PURE__ */ e("ul", { children: t.items.map((i) => /* @__PURE__ */ e(
43
+ N,
44
+ {
45
+ imageUrl: i.imageUrl,
46
+ imageAlt: `${i.itemId} product image`,
47
+ title: i.description,
48
+ titleHref: i.itemHref || `/part/${i.itemId}`,
49
+ subtitle: /* @__PURE__ */ a(s, { children: [
50
+ /* @__PURE__ */ e(n, { colorToken: "quaternary", size: "xs", children: i.custom ? "Specs " : "Part # " }),
51
+ i.itemId
54
52
  ] }),
55
- /* @__PURE__ */ a("div", { className: r.itemManagement, children: [
56
- /* @__PURE__ */ a("div", { className: r.purchaseInformation, children: [
57
- /* @__PURE__ */ e(
58
- k,
59
- {
60
- availId: i.availabilityId || "",
61
- availDescription: i.availability || "",
62
- contactHref: h || "",
63
- contactLinkBehavior: p || "new-tab"
64
- }
65
- ),
66
- /* @__PURE__ */ e(N, { pricingLabel: d || "List Price", price: i.price })
67
- ] }),
53
+ topAction: /* @__PURE__ */ e("button", { onClick: () => g(i), className: r.removeItem, "aria-label": "Remove item", children: /* @__PURE__ */ e(c, { iconKey: "fa-regular fa-trash", size: "sm" }) }),
54
+ purchaseInfo: /* @__PURE__ */ a(s, { children: [
68
55
  /* @__PURE__ */ e(
69
- z,
56
+ C,
70
57
  {
71
- quantity: i.quantity,
72
- onQuantityChange: (g) => u(i, g),
73
- size: "sm"
58
+ availId: i.availabilityId || "",
59
+ availDescription: i.availability || "",
60
+ contactHref: p || "",
61
+ contactLinkBehavior: u || "new-tab"
74
62
  }
75
- )
76
- ] })
77
- ] })
78
- ] }, i.id)) }) : /* @__PURE__ */ e("div", { className: r.noItems, children: /* @__PURE__ */ e(n, { as: "p", size: "sm", children: "No items in your cart yet" }) }) }),
63
+ ),
64
+ /* @__PURE__ */ e(z, { pricingLabel: h || "List Price", price: i.price })
65
+ ] }),
66
+ actions: /* @__PURE__ */ e(
67
+ k,
68
+ {
69
+ quantity: i.quantity,
70
+ onQuantityChange: (v) => f(i, v),
71
+ size: "sm"
72
+ }
73
+ )
74
+ },
75
+ i.id
76
+ )) }) : /* @__PURE__ */ e("div", { className: r.noItems, children: /* @__PURE__ */ e(n, { as: "p", size: "sm", children: "No items in your cart yet" }) }) }),
79
77
  m && /* @__PURE__ */ a("div", { className: r.subtotal, children: [
80
78
  /* @__PURE__ */ e(n, { size: "md", weight: "semibold", children: "Subtotal" }),
81
79
  /* @__PURE__ */ e(n, { size: "md", weight: "semibold", children: m })
82
80
  ] }),
83
81
  /* @__PURE__ */ e(
84
- b,
82
+ I,
85
83
  {
86
84
  disabled: t.items.length === 0,
87
- onClick: v,
85
+ onClick: y,
88
86
  variant: "cta-primary",
89
87
  size: "md",
90
88
  className: r.checkoutButton,
@@ -96,5 +94,5 @@ function H({
96
94
  );
97
95
  }
98
96
  export {
99
- H as CartSlideInPanel
97
+ j as CartSlideInPanel
100
98
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.160",
4
+ "version": "0.0.161",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1,19 +0,0 @@
1
- import './assets/Cart.css';const t = "_cartIconButton_1dh0n_2", n = "_count_1dh0n_9", o = "_cartContainer_1dh0n_24", e = "_headerWrapper_1dh0n_35", _ = "_header_1dh0n_35", c = "_cartItems_1dh0n_53", a = "_topRow_1dh0n_78", r = "_itemInfo_1dh0n_84", s = "_purchaseInformation_1dh0n_89", h = "_itemManagement_1dh0n_96", m = "_removeItem_1dh0n_114", d = "_noItems_1dh0n_124", u = "_subtotal_1dh0n_131", I = "_checkoutButton_1dh0n_138", p = {
2
- cartIconButton: t,
3
- count: n,
4
- cartContainer: o,
5
- headerWrapper: e,
6
- header: _,
7
- cartItems: c,
8
- topRow: a,
9
- itemInfo: r,
10
- purchaseInformation: s,
11
- itemManagement: h,
12
- removeItem: m,
13
- noItems: d,
14
- subtotal: u,
15
- checkoutButton: I
16
- };
17
- export {
18
- p as s
19
- };