@caseparts-org/caseblocks 0.0.211 → 0.0.212

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.
@@ -1 +1 @@
1
- ._availability_9rzvh_1{font-style:italic}._tooltipContent_9rzvh_5{max-width:370px}._tooltipContent_9rzvh_5>ul{padding:0;margin:var(--spacing-spacing-2xs) 0}._tooltipContent_9rzvh_5 li{list-style:none}._available_9rzvh_18,._in-stock_9rzvh_18{color:var(--color-alerts-success)}._limited_9rzvh_21{color:var(--color-alerts-warning)}._discontinued_9rzvh_24{color:var(--color-alerts-error-warning)}
1
+ ._availability_kb59t_1{font-style:italic}._pointer_kb59t_5{cursor:pointer}._tooltip_kb59t_9{background-color:#fafafa}._tooltipContent_kb59t_13{max-width:370px}._tooltipContent_kb59t_13>ul{padding:0;margin:var(--spacing-spacing-2xs) 0}._tooltipContent_kb59t_13 li{list-style:none}._available_kb59t_26,._in-stock_kb59t_26{color:var(--color-alerts-success)}._limited_kb59t_29{color:var(--color-alerts-warning)}._discontinued_kb59t_32{color:var(--color-alerts-error-warning)}
@@ -1,67 +1,70 @@
1
- import { jsx as l, jsxs as s, Fragment as p } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as o, Fragment as m } from "react/jsx-runtime";
2
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
3
+ import { Text as l } from "../../atoms/Text/Text.js";
4
+ import { Tooltip as b } from "../../atoms/Tooltip/Tooltip.js";
5
+ import '../../assets/Availability.css';const k = "_availability_kb59t_1", f = "_pointer_kb59t_5", C = "_tooltip_kb59t_9", g = "_tooltipContent_kb59t_13", w = "_available_kb59t_26", z = "_limited_kb59t_29", S = "_discontinued_kb59t_32", s = {
6
+ availability: k,
7
+ pointer: f,
8
+ tooltip: C,
9
+ tooltipContent: g,
10
+ available: w,
11
+ "in-stock": "_in-stock_kb59t_26",
12
+ limited: z,
13
+ discontinued: S
12
14
  };
13
- function T({
15
+ function L({
14
16
  availId: i,
15
- availDescription: e,
17
+ availDescription: t,
16
18
  availClassName: d,
17
- enableTooltip: r = !1,
19
+ enableTooltip: n = !1,
18
20
  inventory: a
19
21
  }) {
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,
22
+ const c = n && a && i !== "not-found", r = /* @__PURE__ */ e(l, { size: "xs", className: _(s.availability, s[i], c ? s.pointer : null, d), children: t });
23
+ return c ? /* @__PURE__ */ e(
24
+ b,
23
25
  {
24
26
  closeDelay: 0,
25
27
  openDelay: 250,
26
28
  position: "top center",
27
- trigger: o,
28
- children: /* @__PURE__ */ l(k, { availabilityId: i, inventory: a })
29
+ trigger: r,
30
+ contentClassName: s.tooltip,
31
+ children: /* @__PURE__ */ e(A, { availabilityId: i, inventory: a })
29
32
  }
30
- ) : o;
33
+ ) : r;
31
34
  }
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
+ function A({ availabilityId: i, inventory: t }) {
36
+ var n, a, c, r, p, u;
37
+ const d = (((n = t == null ? void 0 : t.MPK) == null ? void 0 : n.Unreserved) ?? 0) + (((a = t == null ? void 0 : t.SEA) == null ? void 0 : a.Unreserved) ?? 0) + (((c = t == null ? void 0 : t.STL) == null ? void 0 : c.Unreserved) ?? 0);
35
38
  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
+ const h = 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.";
40
+ return /* @__PURE__ */ o("div", { className: s.tooltipContent, children: [
41
+ /* @__PURE__ */ o(l, { size: "sm", children: [
39
42
  "We currently have (",
40
43
  d,
41
44
  ") in stock across our three warehouses:"
42
45
  ] }),
43
- /* @__PURE__ */ s("ul", { children: [
44
- /* @__PURE__ */ l("li", { children: /* @__PURE__ */ s(t, { size: "sm", children: [
46
+ /* @__PURE__ */ o("ul", { children: [
47
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(l, { size: "sm", children: [
45
48
  "(",
46
- ((n = e == null ? void 0 : e.MPK) == null ? void 0 : n.Unreserved) ?? 0,
49
+ ((r = t == null ? void 0 : t.MPK) == null ? void 0 : r.Unreserved) ?? 0,
47
50
  ") Los Angeles"
48
51
  ] }) }),
49
- /* @__PURE__ */ l("li", { children: /* @__PURE__ */ s(t, { size: "sm", children: [
52
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(l, { size: "sm", children: [
50
53
  "(",
51
- ((h = e == null ? void 0 : e.STL) == null ? void 0 : h.Unreserved) ?? 0,
54
+ ((p = t == null ? void 0 : t.STL) == null ? void 0 : p.Unreserved) ?? 0,
52
55
  ") St. Louis"
53
56
  ] }) }),
54
- /* @__PURE__ */ l("li", { children: /* @__PURE__ */ s(t, { size: "sm", children: [
57
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(l, { size: "sm", children: [
55
58
  "(",
56
- ((u = e == null ? void 0 : e.SEA) == null ? void 0 : u.Unreserved) ?? 0,
59
+ ((u = t == null ? void 0 : t.SEA) == null ? void 0 : u.Unreserved) ?? 0,
57
60
  ") Seattle"
58
61
  ] }) })
59
62
  ] }),
60
- /* @__PURE__ */ l(t, { size: "sm", children: m })
63
+ /* @__PURE__ */ e(l, { size: "sm", children: h })
61
64
  ] });
62
65
  }
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, {});
66
+ return i === "available" ? /* @__PURE__ */ e("div", { className: s.tooltipContent, children: /* @__PURE__ */ e(l, { 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__ */ e("div", { className: s.tooltipContent, children: /* @__PURE__ */ e(l, { size: "sm", children: "Unfortunately, this item is no longer available to purchase." }) }) : /* @__PURE__ */ e(m, {});
64
67
  }
65
68
  export {
66
- T as Availability
69
+ L as Availability
67
70
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.211",
4
+ "version": "0.0.212",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",