@caseparts-org/caseblocks 0.0.253 → 0.0.254
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-ccFxL4YZ.js +25 -0
- package/dist/assets/Cart.css +1 -1
- package/dist/assets/Pill.css +1 -1
- package/dist/atoms/Pill/Pill.d.ts +6 -1
- package/dist/atoms/Pill/Pill.js +69 -53
- package/dist/molecules/Cart/Cart.js +1 -1
- package/dist/molecules/Cart/CartPart.d.ts +2 -1
- package/dist/molecules/Cart/CartPart.js +77 -63
- package/dist/molecules/Cart/CartPart.stories.d.ts +2 -0
- package/dist/molecules/Cart/CartPart.stories.js +18 -6
- package/dist/molecules/Cart/CartSlideInPanel.js +1 -1
- package/package.json +1 -1
- package/dist/Cart.module-CV0POv9_.js +0 -25
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import './assets/Cart.css';const t = "_cartIconButton_13798_2", e = "_count_13798_15", o = "_cartContainer_13798_30", n = "_headerWrapper_13798_41", _ = "_header_13798_41", a = "_cartItems_13798_59", c = "_cartItem_13798_59", r = "_itemContainer_13798_85", i = "_topRow_13798_89", s = "_itemInfo_13798_96", m = "_editUnit_13798_101", I = "_purchaseInformation_13798_117", u = "_availabilitySlot_13798_123", l = "_priceSlot_13798_130", p = "_itemManagement_13798_132", h = "_itemImage_13798_145", d = "_removeItem_13798_148", b = "_noItems_13798_158", f = "_subtotal_13798_165", g = "_checkoutButton_13798_172", v = {
|
|
2
|
+
cartIconButton: t,
|
|
3
|
+
count: e,
|
|
4
|
+
cartContainer: o,
|
|
5
|
+
headerWrapper: n,
|
|
6
|
+
header: _,
|
|
7
|
+
cartItems: a,
|
|
8
|
+
cartItem: c,
|
|
9
|
+
itemContainer: r,
|
|
10
|
+
topRow: i,
|
|
11
|
+
itemInfo: s,
|
|
12
|
+
editUnit: m,
|
|
13
|
+
purchaseInformation: I,
|
|
14
|
+
availabilitySlot: u,
|
|
15
|
+
priceSlot: l,
|
|
16
|
+
itemManagement: p,
|
|
17
|
+
itemImage: h,
|
|
18
|
+
removeItem: d,
|
|
19
|
+
noItems: b,
|
|
20
|
+
subtotal: f,
|
|
21
|
+
checkoutButton: g
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
v as s
|
|
25
|
+
};
|
package/dist/assets/Cart.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._cartIconButton_13798_2{position:relative;border:none;padding:0;margin:0;background-color:transparent;cursor:pointer;color:#000;transition:color .3s ease,transform .3s ease}._cartIconButton_13798_2:hover{color:var(--color-brand-primary-primary-teal-blue)}._count_13798_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_13798_30{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_13798_41{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._headerWrapper_13798_41>button{padding:0;margin:0;background-color:transparent;border:none}._header_13798_41{display:flex;flex-direction:column;align-items:flex-start;width:100%}._cartItems_13798_59{height:100%;overflow-y:auto;overflow-x:hidden}._cartItems_13798_59 ul{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-1xs)}._cartItem_13798_59{display:grid;grid-template-columns:auto minmax(0,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)}._itemContainer_13798_85{display:grid;gap:var(--spacing-spacing-3xs)}._topRow_13798_89{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:var(--spacing-spacing-4xs)}._itemInfo_13798_96{display:flex;flex-direction:column;align-items:flex-start}._editUnit_13798_101{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_13798_117{display:flex;flex-direction:column;align-items:flex-end;gap:var(--spacing-spacing-3xs)}._availabilitySlot_13798_123{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-3xs)}._itemManagement_13798_132{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between}._cartItem_13798_59 p{margin:0;padding:0;word-wrap:break-word;white-space:normal;overflow-wrap:break-word}._itemImage_13798_145{object-fit:contain}._removeItem_13798_148{border:none;background-color:transparent;padding:0;margin:0;cursor:pointer;width:min-content;height:min-content}._noItems_13798_158{display:flex;flex-direction:row;align-items:center;justify-content:center;height:100%}._subtotal_13798_165{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:var(--spacing-0-5)}._checkoutButton_13798_172{width:100%;height:fit-content;display:inline-flex;gap:var(--spacing-spacing-2xs)}
|
package/dist/assets/Pill.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._pill_h5ujm_1{display:flex;justify-content:center;align-items:center;gap:var(--spacing-spacing-4xs);border-radius:28px;border:1px solid}._pill-xs_h5ujm_19{padding:2px 10px}._pill-sm_h5ujm_27{padding:2px 12px}._pill-md_h5ujm_35{padding:4px 16px}._pill-color-neutral_h5ujm_43{background:var(--color-neutrals-neutral-1)}._pill-color-secondary_h5ujm_51{background:var(--color-brand-secondary-lt-teal-blue)}._pill-color-caution-tips_h5ujm_59{background:var(--color-brand-secondary-lt-yellow)}._pill-color-warning_h5ujm_67{background:var(--color-brand-secondary-lt-orange)}._pill-color-success_h5ujm_75{background:var(--color-brand-secondary-lt-green)}._pill-color-error-warning_h5ujm_83{background:var(--color-brand-secondary-lt-red)}._pill-border-neutral_h5ujm_91{border-color:var(--border-border-primary)}._pill-border-secondary_h5ujm_99{border-color:var(--border-border-primary-chit)}._pill-border-caution-tips_h5ujm_107{border-color:var(--border-border-help)}._pill-border-warning_h5ujm_115{border-color:var(--border-border-warning)}._pill-border-success_h5ujm_123{border-color:var(--border-border-success)}._pill-border-error-warning_h5ujm_131{border-color:var(--border-border-error-warning)}._noBorder_h5ujm_139{border:none}._uppercase_h5ujm_147{text-transform:uppercase;letter-spacing:.03em}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { TextColorToken, TextWeight } from '../Text/Text';
|
|
3
|
+
import { IconProps } from '../Icon/Icon';
|
|
3
4
|
import { HideAtProps } from '../HideAt';
|
|
4
5
|
export interface PillProps extends React.HTMLAttributes<HTMLSpanElement>, HideAtProps {
|
|
5
6
|
children: ReactNode;
|
|
@@ -10,6 +11,10 @@ export interface PillProps extends React.HTMLAttributes<HTMLSpanElement>, HideAt
|
|
|
10
11
|
uppercase?: boolean;
|
|
11
12
|
hideBorder?: boolean;
|
|
12
13
|
size?: "xs" | "sm" | "md";
|
|
14
|
+
iconKey?: IconProps["iconKey"];
|
|
15
|
+
iconSize?: IconProps["size"];
|
|
16
|
+
iconColorToken?: IconProps["colorToken"];
|
|
17
|
+
iconNoPadding?: IconProps["noPadding"];
|
|
13
18
|
className?: string;
|
|
14
19
|
}
|
|
15
|
-
export declare function Pill({ colorToken, textColorToken, customColor, weight, uppercase, hideBorder, size, hideAt, className, children, ...otherProps }: PillProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function Pill({ colorToken, textColorToken, customColor, weight, uppercase, hideBorder, size, iconKey, iconSize, iconColorToken, iconNoPadding, hideAt, className, children, ...otherProps }: PillProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/atoms/Pill/Pill.js
CHANGED
|
@@ -1,67 +1,83 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Text as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"pill-
|
|
9
|
-
"pill-
|
|
10
|
-
"pill-
|
|
11
|
-
"pill-color-
|
|
12
|
-
"pill-color-
|
|
13
|
-
"pill-color-
|
|
14
|
-
"pill-color-
|
|
15
|
-
"pill-color-
|
|
16
|
-
"pill-
|
|
17
|
-
"pill-border-
|
|
18
|
-
"pill-border-
|
|
19
|
-
"pill-border-
|
|
20
|
-
"pill-border-
|
|
21
|
-
"pill-border-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsxs as g, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { Text as x } from "../Text/Text.js";
|
|
3
|
+
import { Icon as w } from "../Icon/Icon.js";
|
|
4
|
+
import { c as _ } from "../../clsx-OuTLNxxd.js";
|
|
5
|
+
import { getHideAtStyles as f } from "../HideAt.js";
|
|
6
|
+
import '../../assets/Pill.css';const y = "_pill_h5ujm_1", B = "_noBorder_h5ujm_139", $ = "_uppercase_h5ujm_147", l = {
|
|
7
|
+
pill: y,
|
|
8
|
+
"pill-xs": "_pill-xs_h5ujm_19",
|
|
9
|
+
"pill-sm": "_pill-sm_h5ujm_27",
|
|
10
|
+
"pill-md": "_pill-md_h5ujm_35",
|
|
11
|
+
"pill-color-neutral": "_pill-color-neutral_h5ujm_43",
|
|
12
|
+
"pill-color-secondary": "_pill-color-secondary_h5ujm_51",
|
|
13
|
+
"pill-color-caution-tips": "_pill-color-caution-tips_h5ujm_59",
|
|
14
|
+
"pill-color-warning": "_pill-color-warning_h5ujm_67",
|
|
15
|
+
"pill-color-success": "_pill-color-success_h5ujm_75",
|
|
16
|
+
"pill-color-error-warning": "_pill-color-error-warning_h5ujm_83",
|
|
17
|
+
"pill-border-neutral": "_pill-border-neutral_h5ujm_91",
|
|
18
|
+
"pill-border-secondary": "_pill-border-secondary_h5ujm_99",
|
|
19
|
+
"pill-border-caution-tips": "_pill-border-caution-tips_h5ujm_107",
|
|
20
|
+
"pill-border-warning": "_pill-border-warning_h5ujm_115",
|
|
21
|
+
"pill-border-success": "_pill-border-success_h5ujm_123",
|
|
22
|
+
"pill-border-error-warning": "_pill-border-error-warning_h5ujm_131",
|
|
23
|
+
noBorder: B,
|
|
24
|
+
uppercase: $
|
|
24
25
|
};
|
|
25
|
-
function
|
|
26
|
+
function I({
|
|
26
27
|
colorToken: r = "success",
|
|
27
|
-
textColorToken:
|
|
28
|
-
customColor:
|
|
28
|
+
textColorToken: n,
|
|
29
|
+
customColor: i,
|
|
29
30
|
weight: c = "medium",
|
|
30
|
-
uppercase:
|
|
31
|
-
hideBorder:
|
|
32
|
-
size:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
uppercase: a = !1,
|
|
32
|
+
hideBorder: s = !1,
|
|
33
|
+
size: o = "xs",
|
|
34
|
+
iconKey: e,
|
|
35
|
+
iconSize: u = "3xs",
|
|
36
|
+
iconColorToken: m,
|
|
37
|
+
iconNoPadding: d = !1,
|
|
38
|
+
hideAt: t,
|
|
39
|
+
className: j,
|
|
40
|
+
children: h,
|
|
41
|
+
...b
|
|
37
42
|
}) {
|
|
38
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ g(
|
|
39
44
|
"span",
|
|
40
45
|
{
|
|
41
|
-
className:
|
|
46
|
+
className: _(
|
|
42
47
|
l.pill,
|
|
43
48
|
l[`pill-color-${r}`],
|
|
44
|
-
l[`pill-${
|
|
45
|
-
!
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
l[`pill-${o}`],
|
|
50
|
+
!s && l[`pill-border-${r}`],
|
|
51
|
+
s && l.noBorder,
|
|
52
|
+
f(t),
|
|
53
|
+
j
|
|
49
54
|
),
|
|
50
|
-
style:
|
|
51
|
-
...
|
|
52
|
-
children:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
style: i ? { background: i } : void 0,
|
|
56
|
+
...b,
|
|
57
|
+
children: [
|
|
58
|
+
e && /* @__PURE__ */ p(
|
|
59
|
+
w,
|
|
60
|
+
{
|
|
61
|
+
iconKey: e,
|
|
62
|
+
size: u,
|
|
63
|
+
colorToken: m,
|
|
64
|
+
noPadding: d
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ p(
|
|
68
|
+
x,
|
|
69
|
+
{
|
|
70
|
+
size: o === "xs" ? "xxs" : o === "sm" ? "xs" : "sm",
|
|
71
|
+
weight: c,
|
|
72
|
+
colorToken: n ?? (r === "neutral" ? "primary" : r === "secondary" ? "secondary" : r === "success" ? "success" : r === "error-warning" ? "error-warning" : "warning"),
|
|
73
|
+
className: _(a && l.uppercase),
|
|
74
|
+
children: h
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
]
|
|
62
78
|
}
|
|
63
79
|
);
|
|
64
80
|
}
|
|
65
81
|
export {
|
|
66
|
-
|
|
82
|
+
I as Pill
|
|
67
83
|
};
|
|
@@ -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-ccFxL4YZ.js";
|
|
6
6
|
const S = l.forwardRef(function({
|
|
7
7
|
cart: i,
|
|
8
8
|
open: t = !1,
|
|
@@ -15,6 +15,7 @@ export interface CartPartProps extends Omit<React.LiHTMLAttributes<HTMLLIElement
|
|
|
15
15
|
availabilityId?: AvailabilityId;
|
|
16
16
|
availability?: string;
|
|
17
17
|
inventory?: Inventory;
|
|
18
|
+
source?: "none" | "cart" | "quote";
|
|
18
19
|
priceLabel?: string;
|
|
19
20
|
price?: string;
|
|
20
21
|
quantity?: number;
|
|
@@ -24,4 +25,4 @@ export interface CartPartProps extends Omit<React.LiHTMLAttributes<HTMLLIElement
|
|
|
24
25
|
onUnitEditClick?: () => void;
|
|
25
26
|
requiresUnitDetails?: boolean;
|
|
26
27
|
}
|
|
27
|
-
export declare function CartPart({ imageUrl, imageAlt, title, titleHref, onTitleNavigate, partNumber, unit, make, model, serial, custom, availabilityId, availability, inventory, priceLabel, price, quantity, maxQuantity, onQuantityChange, onRemove, onUnitEditClick, requiresUnitDetails, className, ...otherProps }: CartPartProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function CartPart({ imageUrl, imageAlt, title, titleHref, onTitleNavigate, partNumber, unit, make, model, serial, custom, availabilityId, availability, inventory, source, priceLabel, price, quantity, maxQuantity, onQuantityChange, onRemove, onUnitEditClick, requiresUnitDetails, className, ...otherProps }: CartPartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,114 +1,128 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Link as q } from "../../atoms/Link/Link.js";
|
|
3
3
|
import { Text as m } from "../../atoms/Text/Text.js";
|
|
4
4
|
import { Image as v } from "../../atoms/Image/Image.js";
|
|
5
|
-
import { Availability as
|
|
6
|
-
import { Pricing as
|
|
7
|
-
import { QuantityInput as
|
|
8
|
-
import { Icon as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
import { Availability as A } from "../Availability/Availability.js";
|
|
6
|
+
import { Pricing as B } from "../Pricing/Pricing.js";
|
|
7
|
+
import { QuantityInput as D } from "../QuantityInput/QuantityInput.js";
|
|
8
|
+
import { Icon as c } from "../../atoms/Icon/Icon.js";
|
|
9
|
+
import { Pill as F } from "../../atoms/Pill/Pill.js";
|
|
10
|
+
import { Tooltip as _ } from "../../atoms/Tooltip/Tooltip.js";
|
|
11
|
+
import { c as E } from "../../clsx-OuTLNxxd.js";
|
|
12
|
+
import { s as i } from "../../Cart.module-ccFxL4YZ.js";
|
|
13
|
+
function ee({
|
|
14
|
+
imageUrl: k,
|
|
14
15
|
imageAlt: I = "Product image",
|
|
15
|
-
title:
|
|
16
|
-
titleHref:
|
|
17
|
-
onTitleNavigate:
|
|
18
|
-
partNumber:
|
|
19
|
-
unit:
|
|
20
|
-
make:
|
|
16
|
+
title: d,
|
|
17
|
+
titleHref: f,
|
|
18
|
+
onTitleNavigate: l,
|
|
19
|
+
partNumber: p,
|
|
20
|
+
unit: z,
|
|
21
|
+
make: K,
|
|
21
22
|
model: N,
|
|
22
|
-
serial:
|
|
23
|
+
serial: P,
|
|
23
24
|
custom: x,
|
|
24
|
-
availabilityId:
|
|
25
|
+
availabilityId: C,
|
|
25
26
|
availability: u,
|
|
26
27
|
inventory: S,
|
|
27
|
-
|
|
28
|
+
source: t = "none",
|
|
29
|
+
priceLabel: T = "List Price",
|
|
28
30
|
price: h,
|
|
29
|
-
quantity:
|
|
30
|
-
maxQuantity:
|
|
31
|
-
onQuantityChange:
|
|
31
|
+
quantity: b,
|
|
32
|
+
maxQuantity: o,
|
|
33
|
+
onQuantityChange: g,
|
|
32
34
|
onRemove: y,
|
|
33
|
-
onUnitEditClick:
|
|
34
|
-
requiresUnitDetails:
|
|
35
|
-
className:
|
|
36
|
-
...
|
|
35
|
+
onUnitEditClick: n,
|
|
36
|
+
requiresUnitDetails: M = !1,
|
|
37
|
+
className: j,
|
|
38
|
+
...w
|
|
37
39
|
}) {
|
|
38
|
-
function L(
|
|
39
|
-
|
|
40
|
+
function L(a) {
|
|
41
|
+
a.defaultPrevented || a.button === 0 && (a.metaKey || a.altKey || a.ctrlKey || a.shiftKey || a.currentTarget.target && a.currentTarget.target !== "_self" || l == null || l(a));
|
|
40
42
|
}
|
|
41
|
-
const s =
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */ e(v, { height: 50, width: 50, src:
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */ e(m, { size: "sm", weight: "semibold", children:
|
|
48
|
-
|
|
43
|
+
const s = z || [K, N, P].filter(Boolean).join(" / "), R = typeof o == "number" && Number.isFinite(o) ? o : void 0;
|
|
44
|
+
return /* @__PURE__ */ r("li", { className: E(i.cartItem, j), ...w, children: [
|
|
45
|
+
/* @__PURE__ */ e(v, { height: 50, width: 50, src: k || "", alt: I, className: i.itemImage }),
|
|
46
|
+
/* @__PURE__ */ r("div", { className: i.itemContainer, children: [
|
|
47
|
+
/* @__PURE__ */ r("div", { className: i.topRow, children: [
|
|
48
|
+
/* @__PURE__ */ r("div", { className: i.itemInfo, children: [
|
|
49
|
+
/* @__PURE__ */ e(m, { size: "sm", weight: "semibold", children: f ? /* @__PURE__ */ e(q, { href: f, onClick: L, children: d }) : d }),
|
|
50
|
+
p != null && /* @__PURE__ */ r(m, { size: "sm", children: [
|
|
49
51
|
/* @__PURE__ */ e(m, { colorToken: "quaternary", size: "xs", children: x ? "Specs " : "Part # " }),
|
|
50
|
-
|
|
52
|
+
p
|
|
51
53
|
] }),
|
|
52
|
-
s &&
|
|
53
|
-
|
|
54
|
+
s && n && (M ? /* @__PURE__ */ e(
|
|
55
|
+
_,
|
|
54
56
|
{
|
|
55
|
-
trigger: /* @__PURE__ */
|
|
57
|
+
trigger: /* @__PURE__ */ r(
|
|
56
58
|
"button",
|
|
57
59
|
{
|
|
58
|
-
onClick:
|
|
60
|
+
onClick: n,
|
|
59
61
|
className: i.editUnit,
|
|
60
62
|
"aria-label": "Edit make, model, and serial",
|
|
61
63
|
type: "button",
|
|
62
64
|
children: [
|
|
63
|
-
/* @__PURE__ */ e(
|
|
65
|
+
/* @__PURE__ */ e(c, { iconKey: "fa-light fa-file-pen", size: "sm" }),
|
|
64
66
|
s
|
|
65
67
|
]
|
|
66
68
|
}
|
|
67
69
|
),
|
|
68
70
|
children: "Requires Make, Model, and Serial"
|
|
69
71
|
}
|
|
70
|
-
) : /* @__PURE__ */
|
|
72
|
+
) : /* @__PURE__ */ r(
|
|
71
73
|
"button",
|
|
72
74
|
{
|
|
73
|
-
onClick:
|
|
75
|
+
onClick: n,
|
|
74
76
|
className: i.editUnit,
|
|
75
77
|
"aria-label": "Edit make, model, and serial",
|
|
76
78
|
type: "button",
|
|
77
79
|
children: [
|
|
78
|
-
/* @__PURE__ */ e(
|
|
80
|
+
/* @__PURE__ */ e(c, { iconKey: "fa-light fa-file-pen", size: "sm" }),
|
|
79
81
|
s
|
|
80
82
|
]
|
|
81
83
|
}
|
|
82
84
|
))
|
|
83
85
|
] }),
|
|
84
|
-
y && /* @__PURE__ */ e("button", { onClick: y, className: i.removeItem, "aria-label": "Remove item", type: "button", children: /* @__PURE__ */ e(
|
|
86
|
+
y && /* @__PURE__ */ e("button", { onClick: y, className: i.removeItem, "aria-label": "Remove item", type: "button", children: /* @__PURE__ */ e(c, { iconKey: "fa-regular fa-trash", size: "sm" }) })
|
|
85
87
|
] }),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
/* @__PURE__ */ r("div", { className: i.itemManagement, children: [
|
|
89
|
+
/* @__PURE__ */ r("div", { className: i.availabilitySlot, children: [
|
|
90
|
+
u && /* @__PURE__ */ e(
|
|
91
|
+
A,
|
|
90
92
|
{
|
|
91
|
-
availId:
|
|
93
|
+
availId: C || "not-found",
|
|
92
94
|
availDescription: u,
|
|
93
95
|
enableTooltip: !0,
|
|
94
96
|
inventory: S
|
|
95
97
|
}
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
+
),
|
|
99
|
+
t !== "none" && /* @__PURE__ */ e(
|
|
100
|
+
F,
|
|
101
|
+
{
|
|
102
|
+
colorToken: t === "cart" ? "neutral" : "success",
|
|
103
|
+
uppercase: !0,
|
|
104
|
+
iconColorToken: t === "cart" ? "default" : "success",
|
|
105
|
+
iconKey: t === "cart" ? "fa-light fa-cart-shopping" : "fa-light fa-file-lines",
|
|
106
|
+
children: t === "cart" ? "Cart" : "Quote"
|
|
107
|
+
}
|
|
108
|
+
)
|
|
98
109
|
] }),
|
|
99
|
-
|
|
100
|
-
B,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
/* @__PURE__ */ r("div", { className: i.purchaseInformation, children: [
|
|
111
|
+
/* @__PURE__ */ e("div", { className: i.priceSlot, children: h && /* @__PURE__ */ e(B, { pricingLabel: T, price: h }) }),
|
|
112
|
+
typeof b == "number" && g && /* @__PURE__ */ e(
|
|
113
|
+
D,
|
|
114
|
+
{
|
|
115
|
+
quantity: b,
|
|
116
|
+
onQuantityChange: g,
|
|
117
|
+
max: R,
|
|
118
|
+
size: "sm"
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] })
|
|
108
122
|
] })
|
|
109
123
|
] })
|
|
110
124
|
] });
|
|
111
125
|
}
|
|
112
126
|
export {
|
|
113
|
-
|
|
127
|
+
ee as CartPart
|
|
114
128
|
};
|
|
@@ -37,4 +37,6 @@ type Story = StoryObj<typeof meta>;
|
|
|
37
37
|
export declare const Basic: Story;
|
|
38
38
|
export declare const CustomSpecs: Story;
|
|
39
39
|
export declare const WithoutAvailability: Story;
|
|
40
|
+
export declare const CartSource: Story;
|
|
41
|
+
export declare const QuoteSource: Story;
|
|
40
42
|
export declare const MaxQuantityCapped: Story;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { CartPart as t } from "./CartPart.js";
|
|
3
3
|
const a = {
|
|
4
4
|
MPK: { Unreserved: 5, Available: 5 },
|
|
@@ -39,7 +39,7 @@ const a = {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}, d = {
|
|
42
|
-
render: (
|
|
42
|
+
render: (i) => /* @__PURE__ */ e("div", { style: { width: 360 }, children: /* @__PURE__ */ e("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ e(t, { ...i }) }) })
|
|
43
43
|
}, s = {
|
|
44
44
|
args: {
|
|
45
45
|
title: "Custom-Molded Snap-In Magnetic Gasket",
|
|
@@ -50,7 +50,7 @@ const a = {
|
|
|
50
50
|
inventory: {},
|
|
51
51
|
price: "$129.99"
|
|
52
52
|
},
|
|
53
|
-
render: (
|
|
53
|
+
render: (i) => /* @__PURE__ */ e("div", { style: { width: 360 }, children: /* @__PURE__ */ e("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ e(t, { ...i }) }) })
|
|
54
54
|
}, o = {
|
|
55
55
|
args: {
|
|
56
56
|
availabilityId: void 0,
|
|
@@ -58,8 +58,18 @@ const a = {
|
|
|
58
58
|
inventory: {},
|
|
59
59
|
price: "$99.99"
|
|
60
60
|
},
|
|
61
|
-
render: (
|
|
61
|
+
render: (i) => /* @__PURE__ */ e("div", { style: { width: 360 }, children: /* @__PURE__ */ e("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ e(t, { ...i }) }) })
|
|
62
62
|
}, c = {
|
|
63
|
+
args: {
|
|
64
|
+
source: "cart"
|
|
65
|
+
},
|
|
66
|
+
render: (i) => /* @__PURE__ */ e("div", { style: { width: 360 }, children: /* @__PURE__ */ e("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ e(t, { ...i }) }) })
|
|
67
|
+
}, v = {
|
|
68
|
+
args: {
|
|
69
|
+
source: "quote"
|
|
70
|
+
},
|
|
71
|
+
render: (i) => /* @__PURE__ */ e("div", { style: { width: 360 }, children: /* @__PURE__ */ e("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ e(t, { ...i }) }) })
|
|
72
|
+
}, u = {
|
|
63
73
|
args: {
|
|
64
74
|
availabilityId: "limited",
|
|
65
75
|
availability: "Discontinued - limited stock",
|
|
@@ -71,12 +81,14 @@ const a = {
|
|
|
71
81
|
quantity: 2,
|
|
72
82
|
maxQuantity: 2
|
|
73
83
|
},
|
|
74
|
-
render: (
|
|
84
|
+
render: (i) => /* @__PURE__ */ e("div", { style: { width: 360 }, children: /* @__PURE__ */ e("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ e(t, { ...i }) }) })
|
|
75
85
|
};
|
|
76
86
|
export {
|
|
77
87
|
d as Basic,
|
|
88
|
+
c as CartSource,
|
|
78
89
|
s as CustomSpecs,
|
|
79
|
-
|
|
90
|
+
u as MaxQuantityCapped,
|
|
91
|
+
v as QuoteSource,
|
|
80
92
|
o as WithoutAvailability,
|
|
81
93
|
n as default
|
|
82
94
|
};
|
|
@@ -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 x } from "./CartPart.js";
|
|
7
|
-
import { s as t } from "../../Cart.module-
|
|
7
|
+
import { s as t } from "../../Cart.module-ccFxL4YZ.js";
|
|
8
8
|
function S({
|
|
9
9
|
open: p,
|
|
10
10
|
onClose: n,
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import './assets/Cart.css';const t = "_cartIconButton_bce5j_2", e = "_count_bce5j_15", o = "_cartContainer_bce5j_30", c = "_headerWrapper_bce5j_41", n = "_header_bce5j_41", _ = "_cartItems_bce5j_59", a = "_cartItem_bce5j_59", r = "_topRow_bce5j_85", s = "_itemInfo_bce5j_92", i = "_editUnit_bce5j_97", m = "_purchaseInformation_bce5j_113", b = "_availabilitySlot_bce5j_119", I = "_priceSlot_bce5j_122", u = "_itemManagement_bce5j_125", j = "_quantitySlot_bce5j_131", l = "_itemImage_bce5j_141", p = "_removeItem_bce5j_144", h = "_noItems_bce5j_154", d = "_subtotal_bce5j_161", S = "_checkoutButton_bce5j_168", y = {
|
|
2
|
-
cartIconButton: t,
|
|
3
|
-
count: e,
|
|
4
|
-
cartContainer: o,
|
|
5
|
-
headerWrapper: c,
|
|
6
|
-
header: n,
|
|
7
|
-
cartItems: _,
|
|
8
|
-
cartItem: a,
|
|
9
|
-
topRow: r,
|
|
10
|
-
itemInfo: s,
|
|
11
|
-
editUnit: i,
|
|
12
|
-
purchaseInformation: m,
|
|
13
|
-
availabilitySlot: b,
|
|
14
|
-
priceSlot: I,
|
|
15
|
-
itemManagement: u,
|
|
16
|
-
quantitySlot: j,
|
|
17
|
-
itemImage: l,
|
|
18
|
-
removeItem: p,
|
|
19
|
-
noItems: h,
|
|
20
|
-
subtotal: d,
|
|
21
|
-
checkoutButton: S
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
y as s
|
|
25
|
-
};
|