@caseparts-org/caseblocks 0.0.266 → 0.0.268
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/Cart.module-BKEf4Ylh.js +38 -0
- package/dist/assets/Cart.css +1 -1
- package/dist/molecules/Cart/Cart.d.ts +2 -1
- package/dist/molecules/Cart/Cart.js +1 -1
- package/dist/molecules/Cart/CartPart.js +90 -90
- package/dist/molecules/Cart/CartSlideInPanel.js +5 -4
- package/package.json +1 -1
- package/dist/Cart.module-BCmEDBeq.js +0 -37
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import './assets/Cart.css';const t = "_cartIconButton_fgg8a_2", n = "_count_fgg8a_15", o = "_cartContainer_fgg8a_30", a = "_headerWrapper_fgg8a_42", e = "_header_fgg8a_42", i = "_cartItems_fgg8a_60", _ = "_cartItem_fgg8a_60", c = "_cartItemContent_fgg8a_78", r = "_carItemSeparator_fgg8a_90", g = "_itemContainer_fgg8a_94", m = "_topRow_fgg8a_98", s = "_itemInfo_fgg8a_105", d = "_unitDetails_fgg8a_111", I = "_editUnit_fgg8a_115", f = "_purchaseInformation_fgg8a_131", l = "_availabilitySlot_fgg8a_137", p = "_priceSlot_fgg8a_144", u = "_itemManagement_fgg8a_146", A = "_itemImage_fgg8a_159", C = "_removeItem_fgg8a_162", h = "_cartItemAdmonitionsPanel_fgg8a_171", v = "_admonitionsPanelCollapsed_fgg8a_176", R = "_cartItemAdmonitionsTrigger_fgg8a_181", S = "_cartItemAdmonitionHeader_fgg8a_193", T = "_admonitionsReveal_fgg8a_201", x = "_admonitionsRevealExpanded_fgg8a_206", b = "_cartItemAdmonitions_fgg8a_171", B = "_admonitionTriggerIconExpanded_fgg8a_212", E = "_admonitionTriggerIcon_fgg8a_212", P = "_cartItemAdmonitionContent_fgg8a_225", y = "_noItems_fgg8a_235", k = "_subtotal_fgg8a_242", w = "_checkoutButton_fgg8a_249", D = {
|
|
2
|
+
cartIconButton: t,
|
|
3
|
+
count: n,
|
|
4
|
+
cartContainer: o,
|
|
5
|
+
headerWrapper: a,
|
|
6
|
+
header: e,
|
|
7
|
+
cartItems: i,
|
|
8
|
+
cartItem: _,
|
|
9
|
+
cartItemContent: c,
|
|
10
|
+
carItemSeparator: r,
|
|
11
|
+
itemContainer: g,
|
|
12
|
+
topRow: m,
|
|
13
|
+
itemInfo: s,
|
|
14
|
+
unitDetails: d,
|
|
15
|
+
editUnit: I,
|
|
16
|
+
purchaseInformation: f,
|
|
17
|
+
availabilitySlot: l,
|
|
18
|
+
priceSlot: p,
|
|
19
|
+
itemManagement: u,
|
|
20
|
+
itemImage: A,
|
|
21
|
+
removeItem: C,
|
|
22
|
+
cartItemAdmonitionsPanel: h,
|
|
23
|
+
admonitionsPanelCollapsed: v,
|
|
24
|
+
cartItemAdmonitionsTrigger: R,
|
|
25
|
+
cartItemAdmonitionHeader: S,
|
|
26
|
+
admonitionsReveal: T,
|
|
27
|
+
admonitionsRevealExpanded: x,
|
|
28
|
+
cartItemAdmonitions: b,
|
|
29
|
+
admonitionTriggerIconExpanded: B,
|
|
30
|
+
admonitionTriggerIcon: E,
|
|
31
|
+
cartItemAdmonitionContent: P,
|
|
32
|
+
noItems: y,
|
|
33
|
+
subtotal: k,
|
|
34
|
+
checkoutButton: w
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
D as s
|
|
38
|
+
};
|
package/dist/assets/Cart.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._cartIconButton_fgg8a_2{position:relative;border:none;padding:0;margin:0;background-color:transparent;cursor:pointer;color:#000;transition:color .3s ease,transform .3s ease}._cartIconButton_fgg8a_2:hover{color:var(--color-brand-primary-primary-teal-blue)}._count_fgg8a_15{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_fgg8a_30{background-color:#f9f9f9;height:100vh;width:100%;min-width:320px;max-width:375px;box-sizing:border-box;display:grid;grid-template-rows:auto auto 1fr auto auto;gap:var(--spacing-1);padding:var(--spacing-1)}._headerWrapper_fgg8a_42{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._headerWrapper_fgg8a_42>button{padding:0;margin:0;background-color:transparent;border:none}._header_fgg8a_42{display:flex;flex-direction:column;align-items:flex-start;width:100%}._cartItems_fgg8a_60{height:100%;overflow-y:auto;overflow-x:hidden}._cartItems_fgg8a_60 ul{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-1xs)}._cartItem_fgg8a_60{background-color:#fff;border:1px solid var(--color-neutrals-neutral-2);border-radius:var(--border-radius-sm)}._cartItemContent_fgg8a_78{display:grid;grid-template-columns:auto minmax(0,1fr);gap:var(--spacing-spacing-2xs);align-items:start;box-sizing:border-box;position:relative;list-style:none;margin:0;padding:var(--spacing-spacing-2xs);width:100%}._carItemSeparator_fgg8a_90{width:100%;border-bottom:1px solid var(--border-border-primary)}._itemContainer_fgg8a_94{display:grid;gap:var(--spacing-spacing-3xs)}._topRow_fgg8a_98{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:var(--spacing-spacing-4xs)}._itemInfo_fgg8a_105{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-4xs)}._unitDetails_fgg8a_111{min-width:0;width:100%}._editUnit_fgg8a_115{display:flex;align-items:center;text-align:start;gap:var(--spacing-spacing-3xs);border:none;background-color:transparent;padding:0;margin:0;cursor:pointer;color:var(--text-text-links);word-wrap:break-word;font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold)}._purchaseInformation_fgg8a_131{display:flex;flex-direction:column;align-items:flex-end;gap:var(--spacing-spacing-3xs)}._availabilitySlot_fgg8a_137{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-3xs)}._itemManagement_fgg8a_146{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between}._cartItem_fgg8a_60 p{margin:0;padding:0;word-wrap:break-word;white-space:normal;overflow-wrap:break-word}._itemImage_fgg8a_159{object-fit:contain}._removeItem_fgg8a_162{border:none;background-color:transparent;padding:0;margin:0;cursor:pointer;width:min-content;height:min-content}._cartItemAdmonitionsPanel_fgg8a_171{padding:var(--spacing-spacing-2xs);display:grid;gap:var(--spacing-spacing-2xs)}._admonitionsPanelCollapsed_fgg8a_176{padding-block:var(--spacing-spacing-3xs);gap:0}._cartItemAdmonitionsTrigger_fgg8a_181{border:none;background-color:transparent;outline:none;margin:0;padding:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:space-between}._cartItemAdmonitionHeader_fgg8a_193{display:inline-flex;align-items:center;gap:var(--spacing-spacing-4xs)}._cartItemAdmonitionHeader_fgg8a_193>span{text-align:start}._admonitionsReveal_fgg8a_201{display:grid;grid-template-rows:0fr;transition:grid-template-rows .2s ease-in}._admonitionsRevealExpanded_fgg8a_206{grid-template-rows:1fr}._admonitionsReveal_fgg8a_201>._cartItemAdmonitions_fgg8a_171{overflow:hidden}._admonitionTriggerIconExpanded_fgg8a_212{transform:rotate(180deg)}._admonitionTriggerIcon_fgg8a_212{transition:transform .2s ease-in}._cartItemAdmonitions_fgg8a_171{list-style:none;margin:0;padding:0}._cartItemAdmonitionContent_fgg8a_225{font-size:var(--font-size-xs)}._noItems_fgg8a_235{display:flex;flex-direction:row;align-items:center;justify-content:center;height:100%}._subtotal_fgg8a_242{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:var(--spacing-0-5)}._checkoutButton_fgg8a_249{width:100%;height:fit-content;display:inline-flex;gap:var(--spacing-spacing-2xs)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { AvailabilityId } from '../Availability/Availability';
|
|
2
|
+
import { AvailabilityId, Inventory } from '../Availability/Availability';
|
|
3
3
|
import { MarkdownAdmonition } from '../Markdown/remarkAdmonition';
|
|
4
4
|
export interface CartItem {
|
|
5
5
|
id: string | number;
|
|
@@ -16,6 +16,7 @@ export interface CartItem {
|
|
|
16
16
|
serial?: string;
|
|
17
17
|
availability?: string;
|
|
18
18
|
availabilityId?: AvailabilityId;
|
|
19
|
+
inventory?: Inventory;
|
|
19
20
|
custom?: string;
|
|
20
21
|
admonitions?: MarkdownAdmonition[];
|
|
21
22
|
[key: string]: any;
|
|
@@ -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-
|
|
5
|
+
import { s as m } from "../../Cart.module-BKEf4Ylh.js";
|
|
6
6
|
const S = l.forwardRef(function({
|
|
7
7
|
cart: i,
|
|
8
8
|
open: t = !1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
1
|
+
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import J, { useState as Q, useId as V } from "react";
|
|
3
3
|
import { Link as W } from "../../atoms/Link/Link.js";
|
|
4
4
|
import { Text as t } from "../../atoms/Text/Text.js";
|
|
@@ -6,105 +6,105 @@ import { Image as X } from "../../atoms/Image/Image.js";
|
|
|
6
6
|
import { Availability as Y } from "../Availability/Availability.js";
|
|
7
7
|
import { Pricing as Z } from "../Pricing/Pricing.js";
|
|
8
8
|
import { QuantityInput as $ } from "../QuantityInput/QuantityInput.js";
|
|
9
|
-
import { Icon as
|
|
9
|
+
import { Icon as n } from "../../atoms/Icon/Icon.js";
|
|
10
10
|
import { Pill as ee } from "../../atoms/Pill/Pill.js";
|
|
11
11
|
import { Tooltip as re } from "../../atoms/Tooltip/Tooltip.js";
|
|
12
|
-
import { c as n } from "../../clsx-OuTLNxxd.js";
|
|
13
|
-
import { s as r } from "../../Cart.module-BCmEDBeq.js";
|
|
14
12
|
import { ADMONITION_ICON_COLOR_TOKENS as le, ADMONITION_DEFAULT_ICONS as ae } from "../Admonition/admonitionTokens.js";
|
|
15
13
|
import { Admonition as ce } from "../Admonition/Admonition.js";
|
|
14
|
+
import { c as f } from "../../clsx-OuTLNxxd.js";
|
|
15
|
+
import { s as l } from "../../Cart.module-BKEf4Ylh.js";
|
|
16
16
|
function be({
|
|
17
|
-
imageUrl:
|
|
18
|
-
imageAlt:
|
|
19
|
-
title:
|
|
17
|
+
imageUrl: S,
|
|
18
|
+
imageAlt: _ = "Product image",
|
|
19
|
+
title: o,
|
|
20
20
|
titleHref: u,
|
|
21
|
-
onTitleNavigate:
|
|
21
|
+
onTitleNavigate: d,
|
|
22
22
|
partNumber: I,
|
|
23
|
-
unit:
|
|
24
|
-
make:
|
|
25
|
-
model:
|
|
26
|
-
serial:
|
|
27
|
-
custom:
|
|
28
|
-
availabilityId:
|
|
29
|
-
availability:
|
|
30
|
-
inventory:
|
|
23
|
+
unit: E,
|
|
24
|
+
make: M,
|
|
25
|
+
model: R,
|
|
26
|
+
serial: w,
|
|
27
|
+
custom: g,
|
|
28
|
+
availabilityId: D,
|
|
29
|
+
availability: N,
|
|
30
|
+
inventory: L,
|
|
31
31
|
source: i = "none",
|
|
32
32
|
priceLabel: j = "List Price",
|
|
33
|
-
price:
|
|
34
|
-
quantity:
|
|
33
|
+
price: y,
|
|
34
|
+
quantity: b,
|
|
35
35
|
maxQuantity: h,
|
|
36
|
-
onQuantityChange:
|
|
36
|
+
onQuantityChange: x,
|
|
37
37
|
onRemove: T,
|
|
38
|
-
onUnitEditClick:
|
|
38
|
+
onUnitEditClick: p,
|
|
39
39
|
requiresUnitDetails: F = !1,
|
|
40
40
|
className: q,
|
|
41
41
|
admonitions: e,
|
|
42
|
-
AdmonitionContent:
|
|
42
|
+
AdmonitionContent: z,
|
|
43
43
|
...B
|
|
44
44
|
}) {
|
|
45
|
-
var v,
|
|
46
|
-
const [s, U] = Q(!1),
|
|
45
|
+
var v, C, A, K, P, O;
|
|
46
|
+
const [s, U] = Q(!1), k = V();
|
|
47
47
|
function G(a) {
|
|
48
|
-
a.defaultPrevented || a.button === 0 && (a.metaKey || a.altKey || a.ctrlKey || a.shiftKey || a.currentTarget.target && a.currentTarget.target !== "_self" ||
|
|
48
|
+
a.defaultPrevented || a.button === 0 && (a.metaKey || a.altKey || a.ctrlKey || a.shiftKey || a.currentTarget.target && a.currentTarget.target !== "_self" || d == null || d(a));
|
|
49
49
|
}
|
|
50
|
-
const
|
|
51
|
-
return /* @__PURE__ */ c("li", { className:
|
|
52
|
-
/* @__PURE__ */ c("div", { className:
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */ c("div", { className:
|
|
55
|
-
/* @__PURE__ */ c("div", { className:
|
|
56
|
-
/* @__PURE__ */ c("div", { className:
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
I != null && /* @__PURE__ */ c(t, { size: "sm", children: [
|
|
59
|
-
/* @__PURE__ */
|
|
50
|
+
const m = E || [M, R, w].filter(Boolean).join(" / "), H = typeof h == "number" && Number.isFinite(h) ? h : void 0;
|
|
51
|
+
return /* @__PURE__ */ c("li", { className: f(l.cartItem, q), ...B, children: [
|
|
52
|
+
/* @__PURE__ */ c("div", { className: l.cartItemContent, children: [
|
|
53
|
+
/* @__PURE__ */ r(X, { height: 50, width: 50, src: S || "", alt: _, className: l.itemImage }),
|
|
54
|
+
/* @__PURE__ */ c("div", { className: l.itemContainer, children: [
|
|
55
|
+
/* @__PURE__ */ c("div", { className: l.topRow, children: [
|
|
56
|
+
/* @__PURE__ */ c("div", { className: l.itemInfo, children: [
|
|
57
|
+
/* @__PURE__ */ r(t, { size: "sm", weight: "semibold", children: u ? /* @__PURE__ */ r(W, { href: u, onClick: G, children: o }) : o }),
|
|
58
|
+
I != null && /* @__PURE__ */ c(t, { size: g ? "xs" : "sm", children: [
|
|
59
|
+
/* @__PURE__ */ r(t, { colorToken: "quaternary", size: "xs", children: g ? "Specs " : "Part # " }),
|
|
60
60
|
I
|
|
61
|
-
] })
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
className: r.editUnit,
|
|
70
|
-
"aria-label": "Edit make, model, and serial",
|
|
71
|
-
type: "button",
|
|
72
|
-
children: [
|
|
73
|
-
/* @__PURE__ */ l(m, { iconKey: "fa-light fa-file-pen", size: "sm" }),
|
|
74
|
-
p
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
children: /* @__PURE__ */ l(t, { size: "sm", children: "Requires Make, Model, and Serial" })
|
|
79
|
-
}
|
|
80
|
-
) : /* @__PURE__ */ c(
|
|
61
|
+
] })
|
|
62
|
+
] }),
|
|
63
|
+
T && /* @__PURE__ */ r("button", { onClick: T, className: l.removeItem, "aria-label": "Remove item", type: "button", children: /* @__PURE__ */ r(n, { iconKey: "fa-regular fa-trash", size: "sm" }) })
|
|
64
|
+
] }),
|
|
65
|
+
m && /* @__PURE__ */ r("div", { className: l.unitDetails, children: p ? F ? /* @__PURE__ */ r(
|
|
66
|
+
re,
|
|
67
|
+
{
|
|
68
|
+
trigger: /* @__PURE__ */ c(
|
|
81
69
|
"button",
|
|
82
70
|
{
|
|
83
|
-
onClick:
|
|
84
|
-
className:
|
|
71
|
+
onClick: p,
|
|
72
|
+
className: l.editUnit,
|
|
85
73
|
"aria-label": "Edit make, model, and serial",
|
|
86
74
|
type: "button",
|
|
87
75
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
76
|
+
/* @__PURE__ */ r(n, { iconKey: "fa-light fa-file-pen", size: "sm" }),
|
|
77
|
+
m
|
|
90
78
|
]
|
|
91
79
|
}
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
80
|
+
),
|
|
81
|
+
children: /* @__PURE__ */ r(t, { size: "xs", children: "Requires Make, Model, and Serial" })
|
|
82
|
+
}
|
|
83
|
+
) : /* @__PURE__ */ c(
|
|
84
|
+
"button",
|
|
85
|
+
{
|
|
86
|
+
onClick: p,
|
|
87
|
+
className: l.editUnit,
|
|
88
|
+
"aria-label": "Edit make, model, and serial",
|
|
89
|
+
type: "button",
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ r(n, { iconKey: "fa-light fa-file-pen", size: "sm" }),
|
|
92
|
+
/* @__PURE__ */ r(t, { size: "xs", children: m })
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
) : /* @__PURE__ */ r(t, { size: "xs", children: m }) }),
|
|
96
|
+
/* @__PURE__ */ c("div", { className: l.itemManagement, children: [
|
|
97
|
+
/* @__PURE__ */ c("div", { className: l.availabilitySlot, children: [
|
|
98
|
+
N && /* @__PURE__ */ r(
|
|
99
99
|
Y,
|
|
100
100
|
{
|
|
101
|
-
availId:
|
|
102
|
-
availDescription:
|
|
101
|
+
availId: D || "not-found",
|
|
102
|
+
availDescription: N,
|
|
103
103
|
enableTooltip: !0,
|
|
104
|
-
inventory:
|
|
104
|
+
inventory: L
|
|
105
105
|
}
|
|
106
106
|
),
|
|
107
|
-
i !== "none" && /* @__PURE__ */
|
|
107
|
+
i !== "none" && /* @__PURE__ */ r(
|
|
108
108
|
ee,
|
|
109
109
|
{
|
|
110
110
|
colorToken: i === "cart" ? "neutral" : "success",
|
|
@@ -115,13 +115,13 @@ function be({
|
|
|
115
115
|
}
|
|
116
116
|
)
|
|
117
117
|
] }),
|
|
118
|
-
/* @__PURE__ */ c("div", { className:
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
typeof
|
|
118
|
+
/* @__PURE__ */ c("div", { className: l.purchaseInformation, children: [
|
|
119
|
+
/* @__PURE__ */ r("div", { className: l.priceSlot, children: y && /* @__PURE__ */ r(Z, { pricingLabel: j, price: y }) }),
|
|
120
|
+
typeof b == "number" && x && /* @__PURE__ */ r(
|
|
121
121
|
$,
|
|
122
122
|
{
|
|
123
|
-
quantity:
|
|
124
|
-
onQuantityChange:
|
|
123
|
+
quantity: b,
|
|
124
|
+
onQuantityChange: x,
|
|
125
125
|
max: H,
|
|
126
126
|
size: "sm"
|
|
127
127
|
}
|
|
@@ -131,28 +131,28 @@ function be({
|
|
|
131
131
|
] })
|
|
132
132
|
] }),
|
|
133
133
|
((e == null ? void 0 : e.length) ?? 0) > 0 && /* @__PURE__ */ c(J.Fragment, { children: [
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */ c("div", { className:
|
|
134
|
+
/* @__PURE__ */ r("div", { className: l.carItemSeparator }),
|
|
135
|
+
/* @__PURE__ */ c("div", { className: f(l.cartItemAdmonitionsPanel, !s && l.admonitionsPanelCollapsed), children: [
|
|
136
136
|
/* @__PURE__ */ c(
|
|
137
137
|
"button",
|
|
138
138
|
{
|
|
139
|
-
className:
|
|
139
|
+
className: l.cartItemAdmonitionsTrigger,
|
|
140
140
|
onClick: () => U(!s),
|
|
141
141
|
type: "button",
|
|
142
142
|
"aria-expanded": s,
|
|
143
|
-
"aria-controls":
|
|
143
|
+
"aria-controls": k,
|
|
144
144
|
children: [
|
|
145
|
-
/* @__PURE__ */ c("div", { className:
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
|
|
145
|
+
/* @__PURE__ */ c("div", { className: l.cartItemAdmonitionHeader, children: [
|
|
146
|
+
/* @__PURE__ */ r(
|
|
147
|
+
n,
|
|
148
148
|
{
|
|
149
|
-
iconKey: ((
|
|
149
|
+
iconKey: ((C = (v = e == null ? void 0 : e[0]) == null ? void 0 : v.icon) == null ? void 0 : C.trim()) || ae[(A = e == null ? void 0 : e[0]) == null ? void 0 : A.variant],
|
|
150
150
|
size: "sm",
|
|
151
|
-
colorToken: le[((
|
|
151
|
+
colorToken: le[((K = e == null ? void 0 : e[0]) == null ? void 0 : K.variant) ?? "unknown"] ?? "default"
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
154
|
/* @__PURE__ */ c(t, { size: "sm", children: [
|
|
155
|
-
((
|
|
155
|
+
((P = e == null ? void 0 : e[0]) == null ? void 0 : P.title) ?? ((O = e == null ? void 0 : e[0]) == null ? void 0 : O.variant) ?? "Item",
|
|
156
156
|
/* @__PURE__ */ c(t, { size: "xs", colorToken: "quaternary", children: [
|
|
157
157
|
" · ",
|
|
158
158
|
e == null ? void 0 : e.length,
|
|
@@ -161,16 +161,16 @@ function be({
|
|
|
161
161
|
] })
|
|
162
162
|
] })
|
|
163
163
|
] }),
|
|
164
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ r(n, { className: f(l.admonitionTriggerIcon, s ? l.admonitionTriggerIconExpanded : l.admonitionTriggerIconCollapsed), iconKey: "fa-regular fa-chevron-down", size: "xs", colorToken: "secondary" })
|
|
165
165
|
]
|
|
166
166
|
}
|
|
167
167
|
),
|
|
168
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ r(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
|
-
className:
|
|
172
|
-
id:
|
|
173
|
-
children: /* @__PURE__ */
|
|
171
|
+
className: f(l.admonitionsReveal, s && l.admonitionsRevealExpanded),
|
|
172
|
+
id: k,
|
|
173
|
+
children: /* @__PURE__ */ r("ol", { className: l.cartItemAdmonitions, children: e == null ? void 0 : e.map((a) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
|
|
174
174
|
ce,
|
|
175
175
|
{
|
|
176
176
|
admonitionType: a.type,
|
|
@@ -178,7 +178,7 @@ function be({
|
|
|
178
178
|
size: "sm",
|
|
179
179
|
icon: a.icon,
|
|
180
180
|
title: a.title,
|
|
181
|
-
children:
|
|
181
|
+
children: z ? /* @__PURE__ */ r(z, { admonition: a, className: l.cartItemAdmonitionContent }) : a.content
|
|
182
182
|
}
|
|
183
183
|
) }, a.variant)) })
|
|
184
184
|
}
|
|
@@ -4,7 +4,7 @@ import { Text as l } from "../../atoms/Text/Text.js";
|
|
|
4
4
|
import { Button as h } from "../../atoms/Button/Button.js";
|
|
5
5
|
import { Icon as u } from "../../atoms/Icon/Icon.js";
|
|
6
6
|
import { CartPart as z } from "./CartPart.js";
|
|
7
|
-
import { s as t } from "../../Cart.module-
|
|
7
|
+
import { s as t } from "../../Cart.module-BKEf4Ylh.js";
|
|
8
8
|
function q({
|
|
9
9
|
open: p,
|
|
10
10
|
onClose: m,
|
|
@@ -17,7 +17,7 @@ function q({
|
|
|
17
17
|
onItemNavigate: n,
|
|
18
18
|
requiresUnitDetails: b = !1,
|
|
19
19
|
onCheckout: d,
|
|
20
|
-
AdmonitionContent:
|
|
20
|
+
AdmonitionContent: v
|
|
21
21
|
}) {
|
|
22
22
|
var c;
|
|
23
23
|
return a = a || { items: [] }, /* @__PURE__ */ i(
|
|
@@ -68,16 +68,17 @@ function q({
|
|
|
68
68
|
custom: !!e.custom,
|
|
69
69
|
availabilityId: e.availabilityId,
|
|
70
70
|
availability: e.availability,
|
|
71
|
+
inventory: e.inventory,
|
|
71
72
|
price: e.price,
|
|
72
73
|
priceLabel: y || "List Price",
|
|
73
74
|
quantity: e.quantity,
|
|
74
75
|
maxQuantity: e.maxQuantity,
|
|
75
|
-
onQuantityChange: (
|
|
76
|
+
onQuantityChange: (k) => f(e, k),
|
|
76
77
|
onRemove: () => g(e),
|
|
77
78
|
onUnitEditClick: o ? () => o(e) : void 0,
|
|
78
79
|
requiresUnitDetails: b,
|
|
79
80
|
admonitions: e.admonitions,
|
|
80
|
-
AdmonitionContent:
|
|
81
|
+
AdmonitionContent: v
|
|
81
82
|
},
|
|
82
83
|
`${e.id}-${e.make ?? ""}-${e.model ?? ""}-${e.serial ?? ""}`
|
|
83
84
|
)) }) : /* @__PURE__ */ i("div", { className: t.noItems, children: /* @__PURE__ */ i(l, { as: "p", size: "sm", children: "No items in your cart yet" }) }) }),
|
package/package.json
CHANGED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import './assets/Cart.css';const t = "_cartIconButton_bxnb6_2", n = "_count_bxnb6_15", o = "_cartContainer_bxnb6_30", e = "_headerWrapper_bxnb6_42", a = "_header_bxnb6_42", i = "_cartItems_bxnb6_60", _ = "_cartItem_bxnb6_60", r = "_cartItemContent_bxnb6_78", c = "_carItemSeparator_bxnb6_90", m = "_itemContainer_bxnb6_94", b = "_topRow_bxnb6_98", s = "_itemInfo_bxnb6_105", d = "_editUnit_bxnb6_110", I = "_purchaseInformation_bxnb6_126", x = "_availabilitySlot_bxnb6_132", l = "_priceSlot_bxnb6_139", p = "_itemManagement_bxnb6_141", g = "_itemImage_bxnb6_154", u = "_removeItem_bxnb6_157", A = "_cartItemAdmonitionsPanel_bxnb6_166", C = "_admonitionsPanelCollapsed_bxnb6_171", h = "_cartItemAdmonitionsTrigger_bxnb6_176", v = "_cartItemAdmonitionHeader_bxnb6_188", R = "_admonitionsReveal_bxnb6_196", S = "_admonitionsRevealExpanded_bxnb6_201", T = "_cartItemAdmonitions_bxnb6_166", f = "_admonitionTriggerIconExpanded_bxnb6_207", B = "_admonitionTriggerIcon_bxnb6_207", E = "_cartItemAdmonitionContent_bxnb6_220", P = "_noItems_bxnb6_230", y = "_subtotal_bxnb6_237", k = "_checkoutButton_bxnb6_244", w = {
|
|
2
|
-
cartIconButton: t,
|
|
3
|
-
count: n,
|
|
4
|
-
cartContainer: o,
|
|
5
|
-
headerWrapper: e,
|
|
6
|
-
header: a,
|
|
7
|
-
cartItems: i,
|
|
8
|
-
cartItem: _,
|
|
9
|
-
cartItemContent: r,
|
|
10
|
-
carItemSeparator: c,
|
|
11
|
-
itemContainer: m,
|
|
12
|
-
topRow: b,
|
|
13
|
-
itemInfo: s,
|
|
14
|
-
editUnit: d,
|
|
15
|
-
purchaseInformation: I,
|
|
16
|
-
availabilitySlot: x,
|
|
17
|
-
priceSlot: l,
|
|
18
|
-
itemManagement: p,
|
|
19
|
-
itemImage: g,
|
|
20
|
-
removeItem: u,
|
|
21
|
-
cartItemAdmonitionsPanel: A,
|
|
22
|
-
admonitionsPanelCollapsed: C,
|
|
23
|
-
cartItemAdmonitionsTrigger: h,
|
|
24
|
-
cartItemAdmonitionHeader: v,
|
|
25
|
-
admonitionsReveal: R,
|
|
26
|
-
admonitionsRevealExpanded: S,
|
|
27
|
-
cartItemAdmonitions: T,
|
|
28
|
-
admonitionTriggerIconExpanded: f,
|
|
29
|
-
admonitionTriggerIcon: B,
|
|
30
|
-
cartItemAdmonitionContent: E,
|
|
31
|
-
noItems: P,
|
|
32
|
-
subtotal: y,
|
|
33
|
-
checkoutButton: k
|
|
34
|
-
};
|
|
35
|
-
export {
|
|
36
|
-
w as s
|
|
37
|
-
};
|