@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,8 +1,12 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { CartPart as a } from "./CartPart.js";
3
- const r = {
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { CartPart as t } from "./CartPart.js";
3
+ const a = {
4
+ MPK: { Unreserved: 5, Available: 5 },
5
+ SEA: { Unreserved: 3, Available: 3 },
6
+ STL: { Unreserved: 8, Available: 8 }
7
+ }, n = {
4
8
  title: "Case Parts/Molecules/CartPart",
5
- component: a,
9
+ component: t,
6
10
  parameters: {
7
11
  layout: "centered"
8
12
  },
@@ -18,10 +22,9 @@ const r = {
18
22
  model: "SP-48-12-SM",
19
23
  serial: "1-85266899",
20
24
  custom: !1,
21
- availabilityId: "available",
25
+ availabilityId: "in-stock",
22
26
  availability: "In Stock",
23
- contactHref: "#",
24
- contactLinkBehavior: "new-tab",
27
+ inventory: a,
25
28
  priceLabel: "List Price",
26
29
  price: "$99.99",
27
30
  quantity: 1,
@@ -35,38 +38,45 @@ const r = {
35
38
  alert("Edit Unit");
36
39
  }
37
40
  }
38
- }, n = {
39
- render: (i) => /* @__PURE__ */ t("div", { style: { width: 360 }, children: /* @__PURE__ */ t("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ t(a, { ...i }) }) })
40
41
  }, d = {
42
+ render: (e) => /* @__PURE__ */ i("div", { style: { width: 360 }, children: /* @__PURE__ */ i("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ i(t, { ...e }) }) })
43
+ }, s = {
41
44
  args: {
42
45
  title: "Custom-Molded Snap-In Magnetic Gasket",
43
46
  partNumber: 'MG064 36" x 79" 3-Sided Dart-to-Dart Gasket',
44
47
  custom: !0,
45
- availabilityId: "contact",
48
+ availabilityId: "discontinued",
46
49
  availability: "Contact us for availability",
50
+ inventory: {},
47
51
  price: "$129.99"
48
52
  },
49
- render: (i) => /* @__PURE__ */ t("div", { style: { width: 360 }, children: /* @__PURE__ */ t("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ t(a, { ...i }) }) })
50
- }, s = {
53
+ render: (e) => /* @__PURE__ */ i("div", { style: { width: 360 }, children: /* @__PURE__ */ i("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ i(t, { ...e }) }) })
54
+ }, o = {
51
55
  args: {
52
56
  availabilityId: void 0,
53
57
  availability: void 0,
58
+ inventory: {},
54
59
  price: "$99.99"
55
60
  },
56
- render: (i) => /* @__PURE__ */ t("div", { style: { width: 360 }, children: /* @__PURE__ */ t("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ t(a, { ...i }) }) })
57
- }, o = {
61
+ render: (e) => /* @__PURE__ */ i("div", { style: { width: 360 }, children: /* @__PURE__ */ i("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ i(t, { ...e }) }) })
62
+ }, c = {
58
63
  args: {
59
64
  availabilityId: "limited",
60
65
  availability: "Discontinued - limited stock",
66
+ inventory: {
67
+ MPK: { Unreserved: 1, Available: 1 },
68
+ SEA: { Unreserved: 0, Available: 0 },
69
+ STL: { Unreserved: 1, Available: 1 }
70
+ },
61
71
  quantity: 2,
62
72
  maxQuantity: 2
63
73
  },
64
- render: (i) => /* @__PURE__ */ t("div", { style: { width: 360 }, children: /* @__PURE__ */ t("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ t(a, { ...i }) }) })
74
+ render: (e) => /* @__PURE__ */ i("div", { style: { width: 360 }, children: /* @__PURE__ */ i("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ i(t, { ...e }) }) })
65
75
  };
66
76
  export {
67
- n as Basic,
68
- d as CustomSpecs,
69
- o as MaxQuantityCapped,
70
- s as WithoutAvailability,
71
- r as default
77
+ d as Basic,
78
+ s as CustomSpecs,
79
+ c as MaxQuantityCapped,
80
+ o as WithoutAvailability,
81
+ n as default
72
82
  };
@@ -1,4 +1,3 @@
1
- import { ContactUsLinkBehavior } from '../Availability/Availability';
2
1
  import { CartItem, ShoppingCart } from './Cart';
3
2
  export interface CartSlideInPanelProps {
4
3
  open: boolean;
@@ -6,8 +5,6 @@ export interface CartSlideInPanelProps {
6
5
  cart: ShoppingCart;
7
6
  subtotal?: string;
8
7
  itemPriceLabel?: string;
9
- contactHref?: string;
10
- contactLinkBehavior?: ContactUsLinkBehavior;
11
8
  onItemQtyChange: (_item: CartItem, _newQty: number) => void;
12
9
  onItemDelete: (_item: CartItem) => void;
13
10
  onUnitEditClick?: (_item: CartItem) => void;
@@ -15,4 +12,4 @@ export interface CartSlideInPanelProps {
15
12
  requiresUnitDetails?: boolean;
16
13
  onCheckout: () => void;
17
14
  }
18
- export declare function CartSlideInPanel({ open, onClose, cart, subtotal, itemPriceLabel, contactHref, contactLinkBehavior, onItemQtyChange, onItemDelete, onUnitEditClick, onItemNavigate, requiresUnitDetails, onCheckout }: CartSlideInPanelProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function CartSlideInPanel({ open, onClose, cart, subtotal, itemPriceLabel, onItemQtyChange, onItemDelete, onUnitEditClick, onItemNavigate, requiresUnitDetails, onCheckout }: CartSlideInPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -1,28 +1,26 @@
1
1
  import { jsx as i, jsxs as r } from "react/jsx-runtime";
2
- import { SlideInPanel as z } from "../../atoms/SlideInPanel/SlideInPanel.js";
2
+ import { SlideInPanel as v } from "../../atoms/SlideInPanel/SlideInPanel.js";
3
3
  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
- import { CartPart as C } from "./CartPart.js";
6
+ import { CartPart as x } from "./CartPart.js";
7
7
  import { s as t } from "../../Cart.module-CqE2A_OG.js";
8
- function w({
8
+ function S({
9
9
  open: p,
10
10
  onClose: s,
11
11
  cart: a,
12
12
  subtotal: n,
13
13
  itemPriceLabel: y,
14
- contactHref: f,
15
- contactLinkBehavior: g,
16
- onItemQtyChange: b,
17
- onItemDelete: k,
14
+ onItemQtyChange: f,
15
+ onItemDelete: g,
18
16
  onUnitEditClick: d,
19
17
  onItemNavigate: m,
20
- requiresUnitDetails: v = !1,
18
+ requiresUnitDetails: b = !1,
21
19
  onCheckout: o
22
20
  }) {
23
21
  var c;
24
22
  return a = a || { items: [] }, /* @__PURE__ */ i(
25
- z,
23
+ v,
26
24
  {
27
25
  side: "right",
28
26
  open: p,
@@ -54,7 +52,7 @@ function w({
54
52
  }
55
53
  ),
56
54
  /* @__PURE__ */ i("div", { className: t.cartItems, children: a.items.length > 0 ? /* @__PURE__ */ i("ul", { children: a.items.map((e) => /* @__PURE__ */ i(
57
- C,
55
+ x,
58
56
  {
59
57
  imageUrl: e.imageUrl,
60
58
  imageAlt: `${e.itemId} product image`,
@@ -69,16 +67,14 @@ function w({
69
67
  custom: !!e.custom,
70
68
  availabilityId: e.availabilityId,
71
69
  availability: e.availability,
72
- contactHref: f,
73
- contactLinkBehavior: g,
74
70
  price: e.price,
75
71
  priceLabel: y || "List Price",
76
72
  quantity: e.quantity,
77
73
  maxQuantity: e.maxQuantity,
78
- onQuantityChange: (x) => b(e, x),
79
- onRemove: () => k(e),
74
+ onQuantityChange: (k) => f(e, k),
75
+ onRemove: () => g(e),
80
76
  onUnitEditClick: d ? () => d(e) : void 0,
81
- requiresUnitDetails: v
77
+ requiresUnitDetails: b
82
78
  },
83
79
  `${e.id}-${e.make ?? ""}-${e.model ?? ""}-${e.serial ?? ""}`
84
80
  )) }) : /* @__PURE__ */ i("div", { className: t.noItems, children: /* @__PURE__ */ i(l, { as: "p", size: "sm", children: "No items in your cart yet" }) }) }),
@@ -102,5 +98,5 @@ function w({
102
98
  );
103
99
  }
104
100
  export {
105
- w as CartSlideInPanel
101
+ S as CartSlideInPanel
106
102
  };
@@ -3,8 +3,8 @@ import { useState as y } from "react";
3
3
  import { MainNav as m } from "./MainNav.js";
4
4
  import { Text as s } from "../../atoms/Text/Text.js";
5
5
  import { Link as u } from "../../atoms/Link/Link.js";
6
- import { Button as h } from "../../atoms/Button/Button.js";
7
- import { CartSlideInPanel as p } from "../../molecules/Cart/CartSlideInPanel.js";
6
+ import { Button as p } from "../../atoms/Button/Button.js";
7
+ import { CartSlideInPanel as h } from "../../molecules/Cart/CartSlideInPanel.js";
8
8
  const q = {
9
9
  title: "Case Parts/Organisms/MainNav",
10
10
  component: m,
@@ -122,7 +122,7 @@ const q = {
122
122
  { id: 12, itemId: "1092-02", description: "Kason Door Closer - Offset", price: "$99.99", quantity: 1, imageUrl: a, availability: "In Stock", availabilityId: "available" }
123
123
  ]
124
124
  };
125
- function v(e) {
125
+ function C(e) {
126
126
  return `$${e.items.reduce(
127
127
  (i, o) => i + (parseFloat(o.price.replace(/[^0-9.]/g, "")) || 0) * o.quantity,
128
128
  0
@@ -133,7 +133,7 @@ const d = /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "c
133
133
  /* @__PURE__ */ t(s, { size: "xs", children: "Signed in as Ringo" }),
134
134
  /* @__PURE__ */ t(u, { href: "/account", "data-popover-close": "true", children: "View Account" }),
135
135
  /* @__PURE__ */ t(u, { href: "/orders", "data-popover-close": "true", children: "Order History" }),
136
- /* @__PURE__ */ t(h, { size: "sm", variant: "secondary", "data-popover-close": "true", onClick: () => alert("Sign out"), children: "Sign Out" })
136
+ /* @__PURE__ */ t(p, { size: "sm", variant: "secondary", "data-popover-close": "true", onClick: () => alert("Sign out"), children: "Sign Out" })
137
137
  ] }), n = (e) => {
138
138
  const [c, i] = y(!1);
139
139
  return /* @__PURE__ */ b(g, { children: [
@@ -146,15 +146,13 @@ const d = /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "c
146
146
  }
147
147
  ),
148
148
  /* @__PURE__ */ t(
149
- p,
149
+ h,
150
150
  {
151
151
  open: c,
152
152
  onClose: () => i(!1),
153
153
  cart: e.cart,
154
- subtotal: v(e.cart),
154
+ subtotal: C(e.cart),
155
155
  itemPriceLabel: "List Price",
156
- contactHref: e.contactRoute,
157
- contactLinkBehavior: "new-tab",
158
156
  onItemQtyChange: () => alert("Qty Change"),
159
157
  onItemDelete: () => alert("Delete"),
160
158
  onCheckout: () => alert("checkout")
@@ -25,4 +25,4 @@ export interface ProductProps extends AvailabilityProps {
25
25
  requiresUnitDetails?: boolean;
26
26
  maxQuantity?: number;
27
27
  }
28
- export declare function Product({ productView, itemKey, partNumber, productDescription, availDescription, availId, contactHref, contactLinkBehavior, productHref, priceLabel, price, imgSrc, attributes, className, onAddToCart, onClose, flat, size, showQuantity, onLinkClicked, requiresUnitDetails, maxQuantity, ...otherProps }: ProductProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function Product({ productView, itemKey, partNumber, productDescription, availDescription, availId, inventory, productHref, priceLabel, price, imgSrc, attributes, className, onAddToCart, onClose, flat, size, showQuantity, onLinkClicked, requiresUnitDetails, maxQuantity, ...otherProps }: ProductProps): import("react/jsx-runtime").JSX.Element;
@@ -1,101 +1,100 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import { Image as R } from "../../atoms/Image/Image.js";
3
- import { Link as $ } from "../../atoms/Link/Link.js";
4
- import { Text as n } from "../../atoms/Text/Text.js";
5
- import { Availability as P } from "../../molecules/Availability/Availability.js";
6
- import { Pricing as j } from "../../molecules/Pricing/Pricing.js";
7
- import { AddToCart as D } from "../../molecules/AddToCart/AddToCart.js";
8
- import { Icon as F } from "../../atoms/Icon/Icon.js";
9
- import { c as V } from "../../clsx-OuTLNxxd.js";
10
- import '../../assets/Product.css';const G = "_productCard_nx8r7_3", J = "_sm_nx8r7_15", M = "_productInformation_nx8r7_25", O = "_purchaseInformation_nx8r7_32", W = "_addToCart_nx8r7_40", X = "_addToCartButton_nx8r7_43", Y = "_partNumber_nx8r7_53", Z = "_partNumberLabel_nx8r7_60", q = "_productTile_nx8r7_64", U = "_topRow_nx8r7_83", y = "_productData_nx8r7_114", H = "_purchase_nx8r7_32", K = "_attributeContainer_nx8r7_151", L = "_elevated_nx8r7_199", Q = "_noImage_nx8r7_205", r = {
11
- productCard: G,
12
- sm: J,
13
- productInformation: M,
14
- purchaseInformation: O,
15
- addToCart: W,
16
- addToCartButton: X,
17
- partNumber: Y,
18
- partNumberLabel: Z,
19
- productTile: q,
20
- topRow: U,
21
- productData: y,
22
- purchase: H,
23
- attributeContainer: K,
24
- elevated: L,
25
- noImage: Q
2
+ import { Image as A } from "../../atoms/Image/Image.js";
3
+ import { Link as R } from "../../atoms/Link/Link.js";
4
+ import { Text as d } from "../../atoms/Text/Text.js";
5
+ import { Availability as $ } from "../../molecules/Availability/Availability.js";
6
+ import { Pricing as P } from "../../molecules/Pricing/Pricing.js";
7
+ import { AddToCart as j } from "../../molecules/AddToCart/AddToCart.js";
8
+ import { Icon as E } from "../../atoms/Icon/Icon.js";
9
+ import { c as D } from "../../clsx-OuTLNxxd.js";
10
+ import '../../assets/Product.css';const F = "_productCard_nx8r7_3", G = "_sm_nx8r7_15", J = "_productInformation_nx8r7_25", M = "_purchaseInformation_nx8r7_32", O = "_addToCart_nx8r7_40", W = "_addToCartButton_nx8r7_43", X = "_partNumber_nx8r7_53", Y = "_partNumberLabel_nx8r7_60", Z = "_productTile_nx8r7_64", q = "_topRow_nx8r7_83", H = "_productData_nx8r7_114", U = "_purchase_nx8r7_32", L = "_attributeContainer_nx8r7_151", y = "_elevated_nx8r7_199", K = "_noImage_nx8r7_205", r = {
11
+ productCard: F,
12
+ sm: G,
13
+ productInformation: J,
14
+ purchaseInformation: M,
15
+ addToCart: O,
16
+ addToCartButton: W,
17
+ partNumber: X,
18
+ partNumberLabel: Y,
19
+ productTile: Z,
20
+ topRow: q,
21
+ productData: H,
22
+ purchase: U,
23
+ attributeContainer: L,
24
+ elevated: y,
25
+ noImage: K
26
26
  };
27
27
  function nr({
28
- productView: E,
28
+ productView: V,
29
29
  itemKey: c,
30
30
  partNumber: s,
31
31
  productDescription: h,
32
32
  availDescription: x,
33
33
  availId: m,
34
- contactHref: b,
35
- contactLinkBehavior: N,
36
- productHref: f,
37
- priceLabel: T,
34
+ inventory: b,
35
+ productHref: N,
36
+ priceLabel: f,
38
37
  price: l,
39
- imgSrc: d,
38
+ imgSrc: e,
40
39
  attributes: p,
41
- className: g,
42
- onAddToCart: C,
43
- onClose: v,
44
- flat: I,
40
+ className: T,
41
+ onAddToCart: g,
42
+ onClose: C,
43
+ flat: v,
45
44
  size: a = "md",
46
45
  showQuantity: _ = !0,
47
- onLinkClicked: e,
48
- requiresUnitDetails: w = !1,
49
- maxQuantity: B,
50
- ...A
46
+ onLinkClicked: n,
47
+ requiresUnitDetails: I = !1,
48
+ maxQuantity: w,
49
+ ...B
51
50
  }) {
52
51
  const u = a === "sm" ? "xs" : "sm";
53
- return E === "Card" ? /* @__PURE__ */ o(
52
+ return V === "Card" ? /* @__PURE__ */ o(
54
53
  "div",
55
54
  {
56
- className: V(
55
+ className: D(
57
56
  r.productCard,
58
57
  a && r[a],
59
- g,
60
- !I && r.elevated,
61
- !d && r.noImage
58
+ T,
59
+ !v && r.elevated,
60
+ !e && r.noImage
62
61
  ),
63
- ...A,
62
+ ...B,
64
63
  children: [
65
- d && /* @__PURE__ */ t(
66
- R,
64
+ e && /* @__PURE__ */ t(
65
+ A,
67
66
  {
68
- src: d,
67
+ src: e,
69
68
  alt: `${s} product image`,
70
69
  height: a === "sm" ? 78 : 96,
71
70
  width: a === "sm" ? 78 : 96
72
71
  }
73
72
  ),
74
73
  /* @__PURE__ */ o("div", { className: r.productInformation, children: [
75
- /* @__PURE__ */ t($, { onClick: () => e == null ? void 0 : e(c), size: a, href: f || "#", children: h }),
74
+ /* @__PURE__ */ t(R, { onClick: () => n == null ? void 0 : n(c), size: a, href: N || "#", children: h }),
76
75
  /* @__PURE__ */ o("div", { className: r.partNumber, children: [
77
- /* @__PURE__ */ t(n, { size: u, className: r.partNumberLabel, children: "Part #" }),
78
- /* @__PURE__ */ t(n, { size: u, weight: "semibold", children: s })
76
+ /* @__PURE__ */ t(d, { size: u, className: r.partNumberLabel, children: "Part #" }),
77
+ /* @__PURE__ */ t(d, { size: u, weight: "semibold", children: s })
79
78
  ] })
80
79
  ] }),
81
80
  /* @__PURE__ */ o("div", { className: r.purchaseInformation, children: [
82
81
  m && /* @__PURE__ */ t(
83
- P,
82
+ $,
84
83
  {
85
84
  availId: m,
86
85
  availDescription: x,
87
- contactHref: b,
88
- contactLinkBehavior: N
86
+ inventory: b,
87
+ enableTooltip: !0
89
88
  }
90
89
  ),
91
- l && /* @__PURE__ */ t(j, { pricingLabel: T, price: l })
90
+ l && /* @__PURE__ */ t(P, { pricingLabel: f, price: l })
92
91
  ] }),
93
92
  /* @__PURE__ */ t(
94
- D,
93
+ j,
95
94
  {
96
95
  itemKey: c,
97
- onAdd: C,
98
- max: B,
96
+ onAdd: g,
97
+ max: w,
99
98
  className: r.addToCart,
100
99
  addButtonClassName: r.addToCartButton,
101
100
  addButtonVariant: _ ? "cta-primary" : "secondary",
@@ -103,22 +102,22 @@ function nr({
103
102
  buttonDoneText: "",
104
103
  buttonText: _ ? "Add" : "Add to Cart",
105
104
  showQuantity: _,
106
- requiresUnitDetails: w
105
+ requiresUnitDetails: I
107
106
  }
108
107
  )
109
108
  ]
110
109
  }
111
- ) : /* @__PURE__ */ o("div", { className: V(
110
+ ) : /* @__PURE__ */ o("div", { className: D(
112
111
  r.productTile,
113
- g,
112
+ T,
114
113
  a && r[a],
115
- !I && r.elevated,
116
- !d && r.noImage
117
- ), ...A, children: [
118
- d && /* @__PURE__ */ t(
119
- R,
114
+ !v && r.elevated,
115
+ !e && r.noImage
116
+ ), ...B, children: [
117
+ e && /* @__PURE__ */ t(
118
+ A,
120
119
  {
121
- src: d,
120
+ src: e,
122
121
  alt: `${s} product image`,
123
122
  height: a === "sm" ? 86 : 108,
124
123
  width: a === "sm" ? 86 : 108
@@ -127,35 +126,35 @@ function nr({
127
126
  /* @__PURE__ */ o("div", { className: r.productData, children: [
128
127
  /* @__PURE__ */ o("div", { className: r.topRow, children: [
129
128
  /* @__PURE__ */ o("div", { className: r.productInformation, children: [
130
- /* @__PURE__ */ t($, { onClick: () => e == null ? void 0 : e(c), size: a, href: f || "#", children: h }),
129
+ /* @__PURE__ */ t(R, { onClick: () => n == null ? void 0 : n(c), size: a, href: N || "#", children: h }),
131
130
  /* @__PURE__ */ o("div", { className: r.partNumber, children: [
132
- /* @__PURE__ */ t(n, { size: u, className: r.partNumberLabel, children: "Part #" }),
133
- /* @__PURE__ */ t(n, { size: u, weight: "semibold", children: s })
131
+ /* @__PURE__ */ t(d, { size: u, className: r.partNumberLabel, children: "Part #" }),
132
+ /* @__PURE__ */ t(d, { size: u, weight: "semibold", children: s })
134
133
  ] })
135
134
  ] }),
136
- v && /* @__PURE__ */ t("button", { onClick: () => v(c), children: /* @__PURE__ */ t(F, { size: "sm", iconKey: "fa-light fa-xmark" }) })
135
+ C && /* @__PURE__ */ t("button", { onClick: () => C(c), children: /* @__PURE__ */ t(E, { size: "sm", iconKey: "fa-light fa-xmark" }) })
137
136
  ] }),
138
137
  /* @__PURE__ */ o("div", { className: r.purchase, children: [
139
138
  /* @__PURE__ */ o("div", { className: r.purchaseInformation, children: [
140
139
  m && /* @__PURE__ */ t(
141
- P,
140
+ $,
142
141
  {
143
142
  availId: m,
144
143
  availDescription: x,
145
- contactHref: b,
146
- contactLinkBehavior: N
144
+ inventory: b,
145
+ enableTooltip: !0
147
146
  }
148
147
  ),
149
- l && /* @__PURE__ */ t(j, { pricingLabel: T, price: l })
148
+ l && /* @__PURE__ */ t(P, { pricingLabel: f, price: l })
150
149
  ] }),
151
- /* @__PURE__ */ t(D, { size: a, itemKey: c, onAdd: C, max: B, className: r.addToCart, addButtonClassName: r.addToCartButton, requiresUnitDetails: w })
150
+ /* @__PURE__ */ t(j, { size: a, itemKey: c, onAdd: g, max: w, className: r.addToCart, addButtonClassName: r.addToCartButton, requiresUnitDetails: I })
152
151
  ] }),
153
152
  p && p.length > 0 && /* @__PURE__ */ t("ul", { className: r.attributeContainer, children: p.map((i) => /* @__PURE__ */ o("li", { children: [
154
- /* @__PURE__ */ o(n, { size: "xs", weight: "light", children: [
153
+ /* @__PURE__ */ o(d, { size: "xs", weight: "light", children: [
155
154
  i.label,
156
155
  ":"
157
156
  ] }),
158
- /* @__PURE__ */ t(n, { size: "xs", weight: "semibold", children: i.value })
157
+ /* @__PURE__ */ t(d, { size: "xs", weight: "semibold", children: i.value })
159
158
  ] }, `${i.label}.${i.value}`)) })
160
159
  ] })
161
160
  ] });
@@ -29,17 +29,6 @@ declare const meta: {
29
29
  control: "text";
30
30
  description: string;
31
31
  };
32
- contactHref: {
33
- control: "text";
34
- description: string;
35
- };
36
- contactLinkBehavior: {
37
- control: {
38
- type: "inline-radio";
39
- };
40
- options: string[];
41
- description: string;
42
- };
43
32
  productDescription: {
44
33
  control: "text";
45
34
  };
@@ -23,22 +23,13 @@ const i = [
23
23
  },
24
24
  availId: {
25
25
  control: { type: "select" },
26
- options: ["available", "limited", "unavailable", "contact"],
26
+ options: ["in-stock", "available", "limited", "discontinued", "not-found"],
27
27
  description: "Availability variant"
28
28
  },
29
29
  availDescription: {
30
30
  control: "text",
31
31
  description: "Availability text"
32
32
  },
33
- contactHref: {
34
- control: "text",
35
- description: "Contact link (only for contact variant)"
36
- },
37
- contactLinkBehavior: {
38
- control: { type: "inline-radio" },
39
- options: ["same-tab", "new-tab"],
40
- description: "Contact link target behavior"
41
- },
42
33
  productDescription: { control: "text" },
43
34
  productHref: { control: "text" },
44
35
  partNumber: { control: "text" },
@@ -65,8 +56,6 @@ const i = [
65
56
  productHref: "https://mobiledev.caseparts.com/part/1092-01/Kason-1092-Hydraulic-Door-Closer",
66
57
  availId: "available",
67
58
  availDescription: "In stock",
68
- contactHref: "https://dev.caseparts.com/account/contactus",
69
- contactLinkBehavior: "new-tab",
70
59
  priceLabel: "List Price",
71
60
  price: "$129.99",
72
61
  imgSrc: "https://dev.caseparts.com/graphics/photos/R-23_IMG_2009.png",
@@ -90,18 +79,16 @@ const i = [
90
79
  availId: "limited",
91
80
  availDescription: "Limited stock"
92
81
  }
93
- }, c = {
82
+ }, s = {
94
83
  args: {
95
- availId: "unavailable",
84
+ availId: "not-found",
96
85
  availDescription: "Out of stock",
97
86
  priceLabel: "Last Known"
98
87
  }
99
- }, s = {
88
+ }, c = {
100
89
  args: {
101
- availId: "contact",
102
- availDescription: "Contact for availability",
103
- contactLinkBehavior: "new-tab",
104
- contactHref: "https://dev.caseparts.com/account/contactus"
90
+ availId: "available",
91
+ availDescription: "Contact for availability"
105
92
  }
106
93
  }, d = {
107
94
  args: {
@@ -118,12 +105,12 @@ const i = [
118
105
  productView: "Card",
119
106
  imgSrc: void 0
120
107
  }
121
- }, v = {
108
+ }, m = {
122
109
  args: {
123
110
  productView: "Tile",
124
111
  flat: !0
125
112
  }
126
- }, m = {
113
+ }, v = {
127
114
  args: {
128
115
  productView: "Card",
129
116
  imgSrc: void 0,
@@ -145,16 +132,16 @@ const i = [
145
132
  }
146
133
  };
147
134
  export {
148
- s as ContactForAvailability,
135
+ c as ContactForAvailability,
149
136
  l as Default,
150
137
  p as DifferentPriceLabel,
151
- v as FlatTile,
138
+ m as FlatTile,
152
139
  n as LimitedStock,
153
140
  b as MaxQuantityCard,
154
141
  y as MaxQuantityTile,
155
142
  u as NoImageCard,
156
- m as NoImageFlatCard,
143
+ v as NoImageFlatCard,
157
144
  d as TileView,
158
- c as Unavailable,
145
+ s as Unavailable,
159
146
  r as default
160
147
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.206",
4
+ "version": "0.0.208",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",