@caseparts-org/caseblocks 0.0.79 → 0.0.81

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.
@@ -4,7 +4,7 @@ import { default as React } from 'react';
4
4
  */
5
5
  export type ImageImplementation = React.ComponentType<{
6
6
  src: string;
7
- alt?: string;
7
+ alt: string;
8
8
  className?: string;
9
9
  } & Record<string, any>>;
10
10
  export interface UsesImageImplementation {
@@ -1,13 +1,13 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- function g({
3
- implementation: r,
4
- implementationProps: p,
5
- src: m,
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ function s({
3
+ implementation: t,
4
+ implementationProps: n,
5
+ src: f,
6
6
  alt: o,
7
- ...f
7
+ ...r
8
8
  }) {
9
- return r ? /* @__PURE__ */ n(r, { src: m, alt: o, ...f, ...p }) : /* @__PURE__ */ n("img", { src: m, alt: o, ...f });
9
+ return t ? /* @__PURE__ */ m(t, { src: f, alt: o ?? "", ...r, ...n }) : /* @__PURE__ */ m("img", { src: f, alt: o, ...r });
10
10
  }
11
11
  export {
12
- g as Image
12
+ s as Image
13
13
  };
@@ -1,33 +1,33 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { routerOverride as s } from "./configureLink.js";
3
- import { linkClassName as l } from "./linkClassName.js";
4
- function I({
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { routerOverride as i } from "./configureLink.js";
3
+ import { linkClassName as d } from "./linkClassName.js";
4
+ function L({
5
5
  href: f,
6
- disabled: r = !1,
7
- unstyled: c = !1,
8
- hideAt: i,
9
- className: p,
10
- children: a,
11
- implementation: t,
12
- ...o
6
+ disabled: o = !1,
7
+ unstyled: m = !1,
8
+ hideAt: u,
9
+ className: c,
10
+ children: e,
11
+ implementation: a,
12
+ ...r
13
13
  }) {
14
- const u = l({ className: p, unstyled: c, disabled: r, hideAt: i }), e = {
15
- ...o,
16
- href: r ? "#" : f,
17
- className: u,
18
- "aria-disabled": r || void 0,
19
- tabIndex: r ? -1 : o.tabIndex,
20
- role: r ? "link" : o.role
21
- }, n = t || s;
22
- return n ? /* @__PURE__ */ m(
14
+ const p = d({ className: c, unstyled: m, disabled: o, hideAt: u }), t = {
15
+ ...r,
16
+ href: o ? "#" : f,
17
+ className: p,
18
+ "aria-disabled": o || void 0,
19
+ tabIndex: o ? -1 : r.tabIndex,
20
+ role: o ? "link" : r.role
21
+ }, s = typeof globalThis < "u" && globalThis.__CASEBLOCKS_LINK_IMPL || null, n = a || i || s;
22
+ return n ? /* @__PURE__ */ l(
23
23
  n,
24
24
  {
25
- ...e,
26
- "data-router-adapter": t ? "explicit" : "configured",
27
- children: a
25
+ ...t,
26
+ "data-router-adapter": a ? "explicit" : i ? "configured-module" : "configured-global",
27
+ children: e
28
28
  }
29
- ) : /* @__PURE__ */ m("a", { ...e, "data-router-adapter": "anchor", children: a });
29
+ ) : /* @__PURE__ */ l("a", { ...t, "data-router-adapter": "anchor", children: e });
30
30
  }
31
31
  export {
32
- I as Link
32
+ L as Link
33
33
  };
@@ -1,8 +1,8 @@
1
- let r = null;
2
- function n(e) {
3
- r = e;
1
+ let i = null;
2
+ function l(e) {
3
+ i = e, globalThis.__CASEBLOCKS_LINK_IMPL = e;
4
4
  }
5
5
  export {
6
- n as configureLink,
7
- r as routerOverride
6
+ l as configureLink,
7
+ i as routerOverride
8
8
  };
@@ -1,12 +1,12 @@
1
1
  import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
- import { Image as T } from "../../atoms/Image/Image.js";
3
- import { Link as g } from "../../atoms/Link/Link.js";
4
- import { Text as e } from "../../atoms/Text/Text.js";
5
- import { Availability as v } from "../../molecules/Availability/Availability.js";
6
- import { Pricing as x } from "../../molecules/Pricing/Pricing.js";
2
+ import { Image as v } from "../../atoms/Image/Image.js";
3
+ import { Link as x } from "../../atoms/Link/Link.js";
4
+ import { Text as o } from "../../atoms/Text/Text.js";
5
+ import { Availability as w } from "../../molecules/Availability/Availability.js";
6
+ import { Pricing as z } from "../../molecules/Pricing/Pricing.js";
7
7
  import { AddToCart as I } from "../../molecules/AddToCart/AddToCart.js";
8
8
  import { Icon as R } from "../../atoms/Icon/Icon.js";
9
- import { c as w } from "../../clsx-OuTLNxxd.js";
9
+ import { c as B } from "../../clsx-OuTLNxxd.js";
10
10
  import '../../assets/Product.css';const $ = "_productCard_10edn_1", A = "_productInformation_10edn_22", D = "_purchaseInformation_10edn_29", j = "_addToCart_10edn_37", k = "_addToCartButton_10edn_40", y = "_partNumber_10edn_48", q = "_partNumberLabel_10edn_55", E = "_productTile_10edn_59", F = "_topRow_10edn_80", G = "_productData_10edn_111", J = "_purchase_10edn_29", M = "_attributeContainer_10edn_148", t = {
11
11
  productCard: $,
12
12
  productInformation: A,
@@ -22,9 +22,9 @@ import '../../assets/Product.css';const $ = "_productCard_10edn_1", A = "_produc
22
22
  attributeContainer: M
23
23
  };
24
24
  function S({
25
- productView: z,
25
+ productView: L,
26
26
  itemKey: s,
27
- partNumber: o,
27
+ partNumber: e,
28
28
  productDescription: l,
29
29
  availDescription: m,
30
30
  availId: d,
@@ -34,34 +34,34 @@ function S({
34
34
  priceLabel: _,
35
35
  price: n,
36
36
  imgSrc: N,
37
- imageImplementation: B,
38
- imageImplementationProps: L,
37
+ imageImplementation: b,
38
+ imageImplementationProps: f,
39
39
  attributes: c,
40
- className: b,
41
- onAddToCart: f,
42
- onClose: C,
40
+ className: C,
41
+ onAddToCart: T,
42
+ onClose: g,
43
43
  ...P
44
44
  }) {
45
- return z === "Card" ? /* @__PURE__ */ a("div", { className: w(t.productCard, b), children: [
45
+ return L === "Card" ? /* @__PURE__ */ a("div", { className: B(t.productCard, C), children: [
46
46
  /* @__PURE__ */ r(
47
- T,
47
+ v,
48
48
  {
49
49
  src: N,
50
- alt: `${o} product image`,
51
- implementation: B,
52
- implementationProps: L
50
+ alt: `${e} product image`,
51
+ implementation: b,
52
+ implementationProps: f
53
53
  }
54
54
  ),
55
55
  /* @__PURE__ */ a("div", { className: t.productInformation, children: [
56
- /* @__PURE__ */ r(g, { href: h, children: l }),
56
+ /* @__PURE__ */ r(x, { href: h, children: l }),
57
57
  /* @__PURE__ */ a("div", { className: t.partNumber, children: [
58
- /* @__PURE__ */ r(e, { size: "sm", className: t.partNumberLabel, children: "Part #" }),
59
- /* @__PURE__ */ r(e, { size: "sm", weight: "semibold", children: o })
58
+ /* @__PURE__ */ r(o, { size: "sm", className: t.partNumberLabel, children: "Part #" }),
59
+ /* @__PURE__ */ r(o, { size: "sm", weight: "semibold", children: e })
60
60
  ] })
61
61
  ] }),
62
62
  /* @__PURE__ */ a("div", { className: t.purchaseInformation, children: [
63
63
  d && /* @__PURE__ */ r(
64
- v,
64
+ w,
65
65
  {
66
66
  availId: d,
67
67
  availDescription: m,
@@ -69,36 +69,44 @@ function S({
69
69
  contactLinkBehavior: p
70
70
  }
71
71
  ),
72
- n && /* @__PURE__ */ r(x, { pricingLabel: _, price: n })
72
+ n && /* @__PURE__ */ r(z, { pricingLabel: _, price: n })
73
73
  ] }),
74
74
  /* @__PURE__ */ r(
75
75
  I,
76
76
  {
77
77
  itemKey: s,
78
- onAdd: f,
78
+ onAdd: T,
79
79
  className: t.addToCart,
80
80
  addButtonClassName: t.addToCartButton,
81
81
  size: "md",
82
82
  buttonDoneText: ""
83
83
  }
84
84
  )
85
- ] }) : /* @__PURE__ */ a("div", { className: w(t.productTile, b), ...P, children: [
86
- /* @__PURE__ */ r(T, { src: N, alt: `${o} product image` }),
85
+ ] }) : /* @__PURE__ */ a("div", { className: B(t.productTile, C), ...P, children: [
86
+ /* @__PURE__ */ r(
87
+ v,
88
+ {
89
+ src: N,
90
+ alt: `${e} product image`,
91
+ implementation: b,
92
+ implementationProps: f
93
+ }
94
+ ),
87
95
  /* @__PURE__ */ a("div", { className: t.productData, children: [
88
96
  /* @__PURE__ */ a("div", { className: t.topRow, children: [
89
97
  /* @__PURE__ */ a("div", { className: t.productInformation, children: [
90
- /* @__PURE__ */ r(g, { href: h, children: l }),
98
+ /* @__PURE__ */ r(x, { href: h, children: l }),
91
99
  /* @__PURE__ */ a("div", { className: t.partNumber, children: [
92
- /* @__PURE__ */ r(e, { size: "sm", className: t.partNumberLabel, children: "Part #" }),
93
- /* @__PURE__ */ r(e, { size: "sm", weight: "semibold", children: o })
100
+ /* @__PURE__ */ r(o, { size: "sm", className: t.partNumberLabel, children: "Part #" }),
101
+ /* @__PURE__ */ r(o, { size: "sm", weight: "semibold", children: e })
94
102
  ] })
95
103
  ] }),
96
- C && /* @__PURE__ */ r("button", { onClick: () => C(s), children: /* @__PURE__ */ r(R, { size: "sm", iconKey: "fa-light fa-xmark" }) })
104
+ g && /* @__PURE__ */ r("button", { onClick: () => g(s), children: /* @__PURE__ */ r(R, { size: "sm", iconKey: "fa-light fa-xmark" }) })
97
105
  ] }),
98
106
  /* @__PURE__ */ a("div", { className: t.purchase, children: [
99
107
  /* @__PURE__ */ a("div", { className: t.purchaseInformation, children: [
100
108
  d && /* @__PURE__ */ r(
101
- v,
109
+ w,
102
110
  {
103
111
  availId: d,
104
112
  availDescription: m,
@@ -106,16 +114,16 @@ function S({
106
114
  contactLinkBehavior: p
107
115
  }
108
116
  ),
109
- n && /* @__PURE__ */ r(x, { pricingLabel: _, price: n })
117
+ n && /* @__PURE__ */ r(z, { pricingLabel: _, price: n })
110
118
  ] }),
111
- /* @__PURE__ */ r(I, { itemKey: s, onAdd: f, className: t.addToCart, addButtonClassName: t.addToCartButton })
119
+ /* @__PURE__ */ r(I, { itemKey: s, onAdd: T, className: t.addToCart, addButtonClassName: t.addToCartButton })
112
120
  ] }),
113
121
  c && c.length > 0 && /* @__PURE__ */ r("ul", { className: t.attributeContainer, children: c.map((i) => /* @__PURE__ */ a("li", { children: [
114
- /* @__PURE__ */ a(e, { size: "xs", weight: "light", children: [
122
+ /* @__PURE__ */ a(o, { size: "xs", weight: "light", children: [
115
123
  i.label,
116
124
  ":"
117
125
  ] }),
118
- /* @__PURE__ */ r(e, { size: "xs", weight: "semibold", children: i.value })
126
+ /* @__PURE__ */ r(o, { size: "xs", weight: "semibold", children: i.value })
119
127
  ] }, `${i.label}.${i.value}`)) })
120
128
  ] })
121
129
  ] });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.79",
4
+ "version": "0.0.81",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",