@caseparts-org/caseblocks 0.0.206 → 0.0.208

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.
Files changed (30) hide show
  1. package/dist/assets/Availability.css +1 -1
  2. package/dist/assets/DropdownButton.css +1 -0
  3. package/dist/atoms/DropdownButton/DropdownButton.d.ts +26 -0
  4. package/dist/atoms/DropdownButton/DropdownButton.js +133 -0
  5. package/dist/atoms/DropdownButton/DropdownButton.stories.d.ts +13 -0
  6. package/dist/atoms/DropdownButton/DropdownButton.stories.js +33 -0
  7. package/dist/atoms/Popover/Popover.d.ts +1 -0
  8. package/dist/atoms/Popover/Popover.js +44 -43
  9. package/dist/main-client.d.ts +2 -0
  10. package/dist/main-client.js +51 -49
  11. package/dist/main-server.d.ts +1 -1
  12. package/dist/molecules/Availability/Availability.d.ts +14 -5
  13. package/dist/molecules/Availability/Availability.js +61 -30
  14. package/dist/molecules/Availability/Availability.stories.d.ts +14 -13
  15. package/dist/molecules/Availability/Availability.stories.js +81 -46
  16. package/dist/molecules/Cart/Cart.d.ts +3 -3
  17. package/dist/molecules/Cart/Cart.stories.d.ts +15 -0
  18. package/dist/molecules/Cart/Cart.stories.js +4 -6
  19. package/dist/molecules/Cart/CartPart.d.ts +4 -5
  20. package/dist/molecules/Cart/CartPart.js +41 -42
  21. package/dist/molecules/Cart/CartPart.stories.d.ts +3 -3
  22. package/dist/molecules/Cart/CartPart.stories.js +30 -20
  23. package/dist/molecules/Cart/CartSlideInPanel.d.ts +1 -4
  24. package/dist/molecules/Cart/CartSlideInPanel.js +12 -16
  25. package/dist/organisms/MainNav/MainNav.stories.js +6 -8
  26. package/dist/organisms/Product/Product.d.ts +1 -1
  27. package/dist/organisms/Product/Product.js +76 -77
  28. package/dist/organisms/Product/Product.stories.d.ts +0 -11
  29. package/dist/organisms/Product/Product.stories.js +12 -25
  30. package/package.json +1 -1
@@ -1,36 +1,67 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { c as o } from "../../clsx-OuTLNxxd.js";
3
- import { Text as s } from "../../atoms/Text/Text.js";
4
- import { Link as c } from "../../atoms/Link/Link.js";
5
- import '../../assets/Availability.css';const m = "_availability_jaqg4_1", _ = "_availabilityLink_jaqg4_4", y = "_available_jaqg4_8", f = "_limited_jaqg4_11", d = "_unavailable_jaqg4_14", a = {
6
- availability: m,
7
- availabilityLink: _,
8
- available: y,
9
- limited: f,
10
- unavailable: d
1
+ import { jsx as l, jsxs as s, Fragment as p } from "react/jsx-runtime";
2
+ import { c as _ } from "../../clsx-OuTLNxxd.js";
3
+ import { Text as t } from "../../atoms/Text/Text.js";
4
+ import { Tooltip as f } from "../../atoms/Tooltip/Tooltip.js";
5
+ import '../../assets/Availability.css';const b = "_availability_9rzvh_1", z = "_tooltipContent_9rzvh_5", g = "_available_9rzvh_18", w = "_limited_9rzvh_21", C = "_discontinued_9rzvh_24", c = {
6
+ availability: b,
7
+ tooltipContent: z,
8
+ available: g,
9
+ "in-stock": "_in-stock_9rzvh_18",
10
+ limited: w,
11
+ discontinued: C
11
12
  };
12
- function p({
13
+ function T({
13
14
  availId: i,
14
- availDescription: l,
15
- contactHref: v,
16
- contactLinkBehavior: r,
17
- availClassName: t
15
+ availDescription: e,
16
+ availClassName: d,
17
+ enableTooltip: r = !1,
18
+ inventory: a
18
19
  }) {
19
- const e = r === "new-tab";
20
- if (i === "contact")
21
- return /* @__PURE__ */ n(
22
- c,
23
- {
24
- target: e ? "_blank" : void 0,
25
- rel: e ? "noopener noreferrer" : void 0,
26
- className: o(a.availabilityLink, t),
27
- href: v,
28
- children: l
29
- }
30
- );
31
- const b = i === "available" ? a.available : i === "limited" ? a.limited : a.unavailable;
32
- return /* @__PURE__ */ n(s, { size: "xs", className: o(a.availability, b, t), children: l });
20
+ const o = /* @__PURE__ */ l(t, { size: "xs", className: _(c.availability, c[i], d), children: e });
21
+ return r && a && i !== "not-found" ? /* @__PURE__ */ l(
22
+ f,
23
+ {
24
+ closeDelay: 0,
25
+ openDelay: 250,
26
+ position: "top center",
27
+ trigger: o,
28
+ children: /* @__PURE__ */ l(k, { availabilityId: i, inventory: a })
29
+ }
30
+ ) : o;
31
+ }
32
+ function k({ availabilityId: i, inventory: e }) {
33
+ var r, a, o, n, h, u;
34
+ const d = (((r = e == null ? void 0 : e.MPK) == null ? void 0 : r.Unreserved) ?? 0) + (((a = e == null ? void 0 : e.SEA) == null ? void 0 : a.Unreserved) ?? 0) + (((o = e == null ? void 0 : e.STL) == null ? void 0 : o.Unreserved) ?? 0);
35
+ if (i === "in-stock" || i === "limited") {
36
+ const m = i === "in-stock" ? "Additional quantity will be backordered. If you need more than we have at any one warehouse, a CSR will contact you with options." : "Once our stock is depleted, this item will no longer be available.";
37
+ return /* @__PURE__ */ s("div", { className: c.tooltipContent, children: [
38
+ /* @__PURE__ */ s(t, { size: "sm", children: [
39
+ "We currently have (",
40
+ d,
41
+ ") in stock across our three warehouses:"
42
+ ] }),
43
+ /* @__PURE__ */ s("ul", { children: [
44
+ /* @__PURE__ */ l("li", { children: /* @__PURE__ */ s(t, { size: "sm", children: [
45
+ "(",
46
+ ((n = e == null ? void 0 : e.MPK) == null ? void 0 : n.Unreserved) ?? 0,
47
+ ") Los Angeles"
48
+ ] }) }),
49
+ /* @__PURE__ */ l("li", { children: /* @__PURE__ */ s(t, { size: "sm", children: [
50
+ "(",
51
+ ((h = e == null ? void 0 : e.STL) == null ? void 0 : h.Unreserved) ?? 0,
52
+ ") St. Louis"
53
+ ] }) }),
54
+ /* @__PURE__ */ l("li", { children: /* @__PURE__ */ s(t, { size: "sm", children: [
55
+ "(",
56
+ ((u = e == null ? void 0 : e.SEA) == null ? void 0 : u.Unreserved) ?? 0,
57
+ ") Seattle"
58
+ ] }) })
59
+ ] }),
60
+ /* @__PURE__ */ l(t, { size: "sm", children: m })
61
+ ] });
62
+ }
63
+ return i === "available" ? /* @__PURE__ */ l("div", { className: c.tooltipContent, children: /* @__PURE__ */ l(t, { size: "sm", children: "While this part is not currently in stock, we will arrange to get it to you asap, and your CSR will keep you advised of the lead time." }) }) : i === "discontinued" ? /* @__PURE__ */ l("div", { className: c.tooltipContent, children: /* @__PURE__ */ l(t, { size: "sm", children: "Unfortunately, this item is no longer available to purchase." }) }) : /* @__PURE__ */ l(p, {});
33
64
  }
34
65
  export {
35
- p as Availability
66
+ T as Availability
36
67
  };
@@ -1,5 +1,5 @@
1
1
  import { StoryObj } from '@storybook/react';
2
- import { AvailabilityProps, ContactUsLinkBehavior } from './Availability';
2
+ import { AvailabilityProps } from './Availability';
3
3
  declare const meta: {
4
4
  title: string;
5
5
  component: (props: AvailabilityProps) => import("react/jsx-runtime").JSX.Element;
@@ -18,19 +18,18 @@ declare const meta: {
18
18
  control: "text";
19
19
  description: string;
20
20
  };
21
- contactHref: {
21
+ availClassName: {
22
22
  control: "text";
23
23
  description: string;
24
24
  };
25
- contactLinkBehavior: {
26
- control: {
27
- type: "inline-radio";
28
- };
29
- options: ContactUsLinkBehavior[];
25
+ enableTooltip: {
26
+ control: "boolean";
30
27
  description: string;
31
28
  };
32
- availClassName: {
33
- control: "text";
29
+ inventory: {
30
+ control: {
31
+ type: "object";
32
+ };
34
33
  description: string;
35
34
  };
36
35
  };
@@ -39,8 +38,10 @@ declare const meta: {
39
38
  };
40
39
  export default meta;
41
40
  type Story = StoryObj<typeof meta>;
42
- export declare const Available: Story;
41
+ export declare const InStock: Story;
43
42
  export declare const Limited: Story;
44
- export declare const Unavailable: Story;
45
- export declare const ContactSameTab: Story;
46
- export declare const ContactNewTab: Story;
43
+ export declare const Discontinued: Story;
44
+ export declare const Available: Story;
45
+ export declare const NotFound: Story;
46
+ export declare const InStockWithTooltip: Story;
47
+ export declare const LimitedWithTooltip: Story;
@@ -1,48 +1,51 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { Availability as e } from "./Availability.js";
3
- const i = (a) => /* @__PURE__ */ t(e, { ...a }), c = {
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { Availability as o } from "./Availability.js";
3
+ const a = (e) => /* @__PURE__ */ i(o, { ...e }), t = {
4
+ MPK: { Unreserved: 5, Available: 5 },
5
+ SEA: { Unreserved: 3, Available: 3 },
6
+ STL: { Unreserved: 8, Available: 8 }
7
+ }, r = {
4
8
  title: "Case Parts/Molecules/Availability",
5
- component: i,
9
+ component: a,
6
10
  parameters: {
7
11
  layout: "centered"
8
12
  },
9
13
  argTypes: {
10
14
  availId: {
11
15
  control: { type: "select" },
12
- options: ["available", "limited", "unavailable", "contact"],
16
+ options: ["in-stock", "limited", "discontinued", "available", "not-found"],
13
17
  description: "Determines variant / rendering mode"
14
18
  },
15
19
  availDescription: {
16
20
  control: "text",
17
21
  description: "Displayed text content"
18
22
  },
19
- contactHref: {
20
- control: "text",
21
- description: 'Href for the contact link (used only when id === "contact")'
22
- },
23
- contactLinkBehavior: {
24
- control: { type: "inline-radio" },
25
- options: ["same-tab", "new-tab"],
26
- description: "Whether the contact link opens in the same or new tab"
27
- },
28
23
  availClassName: {
29
24
  control: "text",
30
25
  description: "Optional custom className"
26
+ },
27
+ enableTooltip: {
28
+ control: "boolean",
29
+ description: "Enable tooltip with inventory details"
30
+ },
31
+ inventory: {
32
+ control: { type: "object" },
33
+ description: "Warehouse inventory data for tooltip"
31
34
  }
32
35
  },
33
36
  args: {
34
37
  // Default (can be overridden in each story)
35
- availId: "available",
36
- availDescription: "Available",
37
- contactHref: "/contact",
38
- contactLinkBehavior: "same-tab",
39
- availClassName: ""
38
+ availId: "in-stock",
39
+ availDescription: "In stock",
40
+ availClassName: "",
41
+ enableTooltip: !0,
42
+ inventory: t
40
43
  },
41
44
  tags: ["autodocs"]
42
- }, s = {
43
- name: "Available",
45
+ }, l = {
46
+ name: "In Stock",
44
47
  args: {
45
- availId: "available",
48
+ availId: "in-stock",
46
49
  availDescription: "In stock"
47
50
  },
48
51
  parameters: {
@@ -52,7 +55,7 @@ const i = (a) => /* @__PURE__ */ t(e, { ...a }), c = {
52
55
  }
53
56
  }
54
57
  }
55
- }, r = {
58
+ }, c = {
56
59
  name: "Limited",
57
60
  args: {
58
61
  availId: "limited",
@@ -65,11 +68,11 @@ const i = (a) => /* @__PURE__ */ t(e, { ...a }), c = {
65
68
  }
66
69
  }
67
70
  }
68
- }, l = {
69
- name: "Unavailable",
71
+ }, d = {
72
+ name: "Discontinued",
70
73
  args: {
71
- availId: "unavailable",
72
- availDescription: "Out of stock"
74
+ availId: "discontinued",
75
+ availDescription: "Discontinued"
73
76
  },
74
77
  parameters: {
75
78
  docs: {
@@ -78,42 +81,74 @@ const i = (a) => /* @__PURE__ */ t(e, { ...a }), c = {
78
81
  }
79
82
  }
80
83
  }
84
+ }, v = {
85
+ name: "Available",
86
+ args: {
87
+ availId: "available",
88
+ availDescription: "Available"
89
+ },
90
+ parameters: {
91
+ docs: {
92
+ description: {
93
+ story: "Shows an alternative availability state."
94
+ }
95
+ }
96
+ }
81
97
  }, p = {
82
- name: "Contact (Same Tab)",
98
+ name: "Not Found",
83
99
  args: {
84
- availId: "contact",
85
- availDescription: "Contact us for availability",
86
- contactHref: "/contact",
87
- contactLinkBehavior: "same-tab"
100
+ availId: "not-found",
101
+ availDescription: "Not found"
88
102
  },
89
103
  parameters: {
90
104
  docs: {
91
105
  description: {
92
- story: "Renders a link opening in the current tab."
106
+ story: "Shows the not found / error state."
93
107
  }
94
108
  }
95
109
  }
96
- }, d = {
97
- name: "Contact (New Tab)",
110
+ }, m = {
111
+ name: "In Stock with Tooltip",
98
112
  args: {
99
- availId: "contact",
100
- availDescription: "Contact us (opens new tab)",
101
- contactHref: "https://example.com/contact",
102
- contactLinkBehavior: "new-tab"
113
+ availId: "in-stock",
114
+ availDescription: "In stock",
115
+ enableTooltip: !0,
116
+ inventory: t
117
+ },
118
+ parameters: {
119
+ docs: {
120
+ description: {
121
+ story: "Shows in-stock state with warehouse inventory tooltip on hover."
122
+ }
123
+ }
124
+ }
125
+ }, y = {
126
+ name: "Limited with Tooltip",
127
+ args: {
128
+ availId: "limited",
129
+ availDescription: "Limited stock",
130
+ enableTooltip: !0,
131
+ inventory: {
132
+ MPK: { Unreserved: 1, Available: 1 },
133
+ SEA: { Unreserved: 0, Available: 0 },
134
+ STL: { Unreserved: 2, Available: 2 }
135
+ }
103
136
  },
104
137
  parameters: {
105
138
  docs: {
106
139
  description: {
107
- story: 'Renders a link with target="_blank" and rel="noopener noreferrer".'
140
+ story: "Shows limited-stock state with low inventory tooltip on hover."
108
141
  }
109
142
  }
110
143
  }
111
144
  };
112
145
  export {
113
- s as Available,
114
- d as ContactNewTab,
115
- p as ContactSameTab,
116
- r as Limited,
117
- l as Unavailable,
118
- c as default
146
+ v as Available,
147
+ d as Discontinued,
148
+ l as InStock,
149
+ m as InStockWithTooltip,
150
+ c as Limited,
151
+ y as LimitedWithTooltip,
152
+ p as NotFound,
153
+ r as default
119
154
  };
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { AvailabilityId } from '../Availability/Availability';
2
3
  export interface CartItem {
3
4
  id: string | number;
4
5
  itemId: string | undefined;
@@ -13,7 +14,7 @@ export interface CartItem {
13
14
  model?: string;
14
15
  serial?: string;
15
16
  availability?: string;
16
- availabilityId?: string;
17
+ availabilityId?: AvailabilityId;
17
18
  custom?: string;
18
19
  [key: string]: any;
19
20
  }
@@ -30,7 +31,6 @@ export interface ShoppingCartHandle {
30
31
  close: () => void;
31
32
  toggle: () => void;
32
33
  }
33
- interface CartProps extends CartPropsBase, React.ButtonHTMLAttributes<HTMLButtonElement> {
34
+ export interface CartProps extends CartPropsBase, React.ButtonHTMLAttributes<HTMLButtonElement> {
34
35
  }
35
36
  export declare const ShoppingCart: React.ForwardRefExoticComponent<CartProps & React.RefAttributes<ShoppingCartHandle>>;
36
- export {};
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { StoryObj } from '@storybook/react-vite';
3
+ declare const meta: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<import('./Cart').CartProps & React.RefAttributes<import('./Cart').ShoppingCartHandle>>;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const EmptyCart: Story;
14
+ export declare const LargeCart: Story;
15
+ export declare const SmallCart: Story;
@@ -1,5 +1,5 @@
1
- import { jsxs as d, Fragment as c, jsx as o } from "react/jsx-runtime";
2
- import { useState as s } from "react";
1
+ import { jsxs as d, Fragment as s, jsx as o } from "react/jsx-runtime";
2
+ import { useState as c } from "react";
3
3
  import { ShoppingCart as n } from "./Cart.js";
4
4
  import { CartSlideInPanel as m } from "./CartSlideInPanel.js";
5
5
  const C = {
@@ -39,8 +39,8 @@ function I(a) {
39
39
  ).toFixed(2)}`;
40
40
  }
41
41
  const r = (a) => {
42
- const [l, t] = s(!1);
43
- return /* @__PURE__ */ d(c, { children: [
42
+ const [l, t] = c(!1);
43
+ return /* @__PURE__ */ d(s, { children: [
44
44
  /* @__PURE__ */ o(
45
45
  n,
46
46
  {
@@ -57,8 +57,6 @@ const r = (a) => {
57
57
  cart: a.cart,
58
58
  subtotal: I(a.cart),
59
59
  itemPriceLabel: "List Price",
60
- contactHref: "#",
61
- contactLinkBehavior: "new-tab",
62
60
  onItemDelete: () => alert("Delete"),
63
61
  onItemQtyChange: () => alert("Qty Change"),
64
62
  onUnitEditClick: () => alert("Edit MMS"),
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { ContactUsLinkBehavior } from '../Availability/Availability';
2
+ import { AvailabilityId, Inventory } from '../Availability/Availability';
3
3
  export interface CartPartProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, "title"> {
4
4
  imageUrl?: string;
5
5
  imageAlt?: string;
@@ -12,10 +12,9 @@ export interface CartPartProps extends Omit<React.LiHTMLAttributes<HTMLLIElement
12
12
  model?: string;
13
13
  serial?: string;
14
14
  custom?: boolean;
15
- availabilityId?: string;
15
+ availabilityId?: AvailabilityId;
16
16
  availability?: string;
17
- contactHref?: string;
18
- contactLinkBehavior?: ContactUsLinkBehavior;
17
+ inventory?: Inventory;
19
18
  priceLabel?: string;
20
19
  price?: string;
21
20
  quantity?: number;
@@ -25,4 +24,4 @@ export interface CartPartProps extends Omit<React.LiHTMLAttributes<HTMLLIElement
25
24
  onUnitEditClick?: () => void;
26
25
  requiresUnitDetails?: boolean;
27
26
  }
28
- export declare function CartPart({ imageUrl, imageAlt, title, titleHref, onTitleNavigate, partNumber, unit, make, model, serial, custom, availabilityId, availability, contactHref, contactLinkBehavior, priceLabel, price, quantity, maxQuantity, onQuantityChange, onRemove, onUnitEditClick, requiresUnitDetails, className, ...otherProps }: CartPartProps): import("react/jsx-runtime").JSX.Element;
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;
@@ -1,18 +1,18 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { Link as R } from "../../atoms/Link/Link.js";
3
- import { Text as o } from "../../atoms/Text/Text.js";
4
- import { Image as T } from "../../atoms/Image/Image.js";
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 { Tooltip as F } from "../../atoms/Tooltip/Tooltip.js";
10
- import { c as _ } from "../../clsx-OuTLNxxd.js";
2
+ import { Link as q } from "../../atoms/Link/Link.js";
3
+ import { Text as m } from "../../atoms/Text/Text.js";
4
+ import { Image as v } from "../../atoms/Image/Image.js";
5
+ import { Availability as R } from "../Availability/Availability.js";
6
+ import { Pricing as A } from "../Pricing/Pricing.js";
7
+ import { QuantityInput as B } from "../QuantityInput/QuantityInput.js";
8
+ import { Icon as n } from "../../atoms/Icon/Icon.js";
9
+ import { Tooltip as D } from "../../atoms/Tooltip/Tooltip.js";
10
+ import { c as F } from "../../clsx-OuTLNxxd.js";
11
11
  import { s as i } from "../../Cart.module-CqE2A_OG.js";
12
12
  function $({
13
13
  imageUrl: g,
14
14
  imageAlt: I = "Product image",
15
- title: n,
15
+ title: c,
16
16
  titleHref: d,
17
17
  onTitleNavigate: t,
18
18
  partNumber: f,
@@ -22,47 +22,46 @@ function $({
22
22
  serial: K,
23
23
  custom: x,
24
24
  availabilityId: P,
25
- availability: h,
26
- contactHref: S,
27
- contactLinkBehavior: w = "new-tab",
25
+ availability: u,
26
+ inventory: S,
28
27
  priceLabel: M = "List Price",
29
- price: u,
28
+ price: h,
30
29
  quantity: p,
31
30
  maxQuantity: l,
32
31
  onQuantityChange: b,
33
32
  onRemove: y,
34
- onUnitEditClick: s,
33
+ onUnitEditClick: o,
35
34
  requiresUnitDetails: j = !1,
36
- className: C,
37
- ...L
35
+ className: w,
36
+ ...C
38
37
  }) {
39
- function q(r) {
38
+ function L(r) {
40
39
  r.defaultPrevented || r.button === 0 && (r.metaKey || r.altKey || r.ctrlKey || r.shiftKey || r.currentTarget.target && r.currentTarget.target !== "_self" || t == null || t(r));
41
40
  }
42
- const m = k || [z, N, K].filter(Boolean).join(" / "), v = typeof l == "number" && Number.isFinite(l) ? l : void 0;
43
- return /* @__PURE__ */ a("li", { className: _(i.cartItem, C), ...L, children: [
44
- /* @__PURE__ */ e(T, { height: 50, width: 50, src: g || "", alt: I, className: i.itemImage }),
41
+ const s = k || [z, N, K].filter(Boolean).join(" / "), T = typeof l == "number" && Number.isFinite(l) ? l : void 0;
42
+ return /* @__PURE__ */ a("li", { className: F(i.cartItem, w), ...C, children: [
43
+ /* @__PURE__ */ e(v, { height: 50, width: 50, src: g || "", alt: I, className: i.itemImage }),
45
44
  /* @__PURE__ */ a("div", { children: [
46
45
  /* @__PURE__ */ a("div", { className: i.topRow, children: [
47
46
  /* @__PURE__ */ a("div", { className: i.itemInfo, children: [
48
- /* @__PURE__ */ e(o, { size: "sm", weight: "semibold", children: d ? /* @__PURE__ */ e(R, { href: d, onClick: q, children: n }) : n }),
49
- f != null && /* @__PURE__ */ a(o, { size: "sm", children: [
50
- /* @__PURE__ */ e(o, { colorToken: "quaternary", size: "xs", children: x ? "Specs " : "Part # " }),
47
+ /* @__PURE__ */ e(m, { size: "sm", weight: "semibold", children: d ? /* @__PURE__ */ e(q, { href: d, onClick: L, children: c }) : c }),
48
+ f != null && /* @__PURE__ */ a(m, { size: "sm", children: [
49
+ /* @__PURE__ */ e(m, { colorToken: "quaternary", size: "xs", children: x ? "Specs " : "Part # " }),
51
50
  f
52
51
  ] }),
53
- m && s && (j ? /* @__PURE__ */ e(
54
- F,
52
+ s && o && (j ? /* @__PURE__ */ e(
53
+ D,
55
54
  {
56
55
  trigger: /* @__PURE__ */ a(
57
56
  "button",
58
57
  {
59
- onClick: s,
58
+ onClick: o,
60
59
  className: i.editUnit,
61
60
  "aria-label": "Edit make, model, and serial",
62
61
  type: "button",
63
62
  children: [
64
- /* @__PURE__ */ e(c, { iconKey: "fa-light fa-file-pen", size: "sm" }),
65
- m
63
+ /* @__PURE__ */ e(n, { iconKey: "fa-light fa-file-pen", size: "sm" }),
64
+ s
66
65
  ]
67
66
  }
68
67
  ),
@@ -71,38 +70,38 @@ function $({
71
70
  ) : /* @__PURE__ */ a(
72
71
  "button",
73
72
  {
74
- onClick: s,
73
+ onClick: o,
75
74
  className: i.editUnit,
76
75
  "aria-label": "Edit make, model, and serial",
77
76
  type: "button",
78
77
  children: [
79
- /* @__PURE__ */ e(c, { iconKey: "fa-light fa-file-pen", size: "sm" }),
80
- m
78
+ /* @__PURE__ */ e(n, { iconKey: "fa-light fa-file-pen", size: "sm" }),
79
+ s
81
80
  ]
82
81
  }
83
82
  ))
84
83
  ] }),
85
- 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" }) })
84
+ y && /* @__PURE__ */ e("button", { onClick: y, className: i.removeItem, "aria-label": "Remove item", type: "button", children: /* @__PURE__ */ e(n, { iconKey: "fa-regular fa-trash", size: "sm" }) })
86
85
  ] }),
87
86
  /* @__PURE__ */ a("div", { className: i.itemManagement, children: [
88
87
  /* @__PURE__ */ a("div", { className: i.purchaseInformation, children: [
89
- /* @__PURE__ */ e("div", { className: i.availabilitySlot, children: h && /* @__PURE__ */ e(
90
- A,
88
+ /* @__PURE__ */ e("div", { className: i.availabilitySlot, children: u && /* @__PURE__ */ e(
89
+ R,
91
90
  {
92
- availId: P || "",
93
- availDescription: h,
94
- contactHref: S || "",
95
- contactLinkBehavior: w
91
+ availId: P || "not-found",
92
+ availDescription: u,
93
+ enableTooltip: !0,
94
+ inventory: S
96
95
  }
97
96
  ) }),
98
- /* @__PURE__ */ e("div", { className: i.priceSlot, children: u && /* @__PURE__ */ e(B, { pricingLabel: M, price: u }) })
97
+ /* @__PURE__ */ e("div", { className: i.priceSlot, children: h && /* @__PURE__ */ e(A, { pricingLabel: M, price: h }) })
99
98
  ] }),
100
99
  typeof p == "number" && b && /* @__PURE__ */ e("div", { className: i.quantitySlot, children: /* @__PURE__ */ e(
101
- D,
100
+ B,
102
101
  {
103
102
  quantity: p,
104
103
  onQuantityChange: b,
105
- max: v,
104
+ max: T,
106
105
  size: "sm"
107
106
  }
108
107
  ) })
@@ -1,5 +1,6 @@
1
1
  import { StoryObj } from '@storybook/react-vite';
2
2
  import { CartPart } from './CartPart';
3
+ import { Inventory } from '../Availability/Availability';
3
4
  declare const meta: {
4
5
  title: string;
5
6
  component: typeof CartPart;
@@ -18,10 +19,9 @@ declare const meta: {
18
19
  model: string;
19
20
  serial: string;
20
21
  custom: false;
21
- availabilityId: string;
22
+ availabilityId: "in-stock";
22
23
  availability: string;
23
- contactHref: string;
24
- contactLinkBehavior: "new-tab";
24
+ inventory: Inventory;
25
25
  priceLabel: string;
26
26
  price: string;
27
27
  quantity: number;