@caseparts-org/caseblocks 0.0.149 → 0.0.151

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,6 +1,6 @@
1
1
  import { jsxs as S, jsx as s } from "react/jsx-runtime";
2
2
  import d from "react";
3
- import { c as p } from "./clsx-OuTLNxxd.js";
3
+ import { c as u } from "./clsx-OuTLNxxd.js";
4
4
  import { Icon as Y } from "./atoms/Icon/Icon.js";
5
5
  import './assets/Table.css';const Z = "_table_14k11_2", $ = "_noPaddingRow_14k11_71", I = "_clickableRow_14k11_82", P = "_clickableCell_14k11_83", ee = "_expandedContentCell_14k11_85", ne = "_expandedContentRow_14k11_94", te = "_expandedRow_14k11_99", le = "_expanded_14k11_85", ae = "_columnContent_14k11_135", oe = "_clickableHeader_14k11_155", n = {
6
6
  "table-container": "_table-container_14k11_2",
@@ -17,25 +17,25 @@ import './assets/Table.css';const Z = "_table_14k11_2", $ = "_noPaddingRow_14k11
17
17
  columnContent: ae,
18
18
  clickableHeader: oe,
19
19
  "icon-ascending": "_icon-ascending_14k11_156"
20
- }, V = ({ children: r }) => null;
20
+ }, V = ({ children: i }) => null;
21
21
  V.displayName = "Table.Columns";
22
- const v = ({ children: r }) => null;
22
+ const v = ({ children: i }) => null;
23
23
  v.displayName = "Table.Column";
24
- const j = ({ children: r }) => null;
24
+ const j = ({ children: i }) => null;
25
25
  j.displayName = "Table.Body";
26
- const M = ({ children: r }) => null;
26
+ const M = ({ children: i }) => null;
27
27
  M.displayName = "Table.Row";
28
- const O = ({ children: r }) => null;
28
+ const O = ({ children: i }) => null;
29
29
  O.displayName = "Table.Cell";
30
- const _ = ({ children: r, className: z, alternatingRows: D = !1, isSortable: w = !1, sortField: q, sortFieldKey: G, sortOrder: J = "descending", onSort: F, ...L }) => {
30
+ const f = ({ children: i, className: z, alternatingRows: D = !1, isSortable: w = !1, sortField: q, sortFieldKey: G, sortOrder: J = "descending", onSort: F, ...L }) => {
31
31
  const B = [];
32
32
  let R, g;
33
- const i = (t, l) => {
33
+ const m = (t, l) => {
34
34
  var e;
35
35
  return !!t && d.isValidElement(t) && ((e = t.type) == null ? void 0 : e.displayName) === l;
36
36
  };
37
- d.Children.forEach(r, (t) => {
38
- i(t, "Table.Columns") ? R = t : i(t, "Table.Body") ? g = t : B.push(t);
37
+ d.Children.forEach(i, (t) => {
38
+ m(t, "Table.Columns") ? R = t : m(t, "Table.Body") ? g = t : B.push(t);
39
39
  });
40
40
  const A = (t) => t.flatMap((l) => {
41
41
  if (d.isValidElement(l) && l.type === d.Fragment) {
@@ -47,32 +47,32 @@ const _ = ({ children: r, className: z, alternatingRows: D = !1, isSortable: w =
47
47
  if (!R) return null;
48
48
  const t = d.Children.toArray(R.props.children);
49
49
  return /* @__PURE__ */ s("thead", { className: n.thead, children: /* @__PURE__ */ s("tr", { children: t.map((l, e) => {
50
- if (i(l, "Table.Column")) {
50
+ if (m(l, "Table.Column")) {
51
51
  const c = l, {
52
52
  children: a,
53
- align: m,
53
+ align: r,
54
54
  colSpan: C,
55
55
  width: b,
56
56
  style: N,
57
- sortField: u,
57
+ sortField: y,
58
58
  sortFieldKey: o,
59
- ...f
59
+ ...k
60
60
  } = c.props, E = {
61
- textAlign: m ?? "left",
61
+ textAlign: r ?? "left",
62
62
  width: b,
63
63
  ...N
64
- }, y = !!u, k = w && y && (y && q === u) && (o !== void 0 ? G === o : !0), x = w && y && typeof F == "function";
64
+ }, T = r === "right" ? "flex-end" : r === "center" ? "center" : "flex-start", _ = !!y, x = w && _ && (_ && q === y) && (o !== void 0 ? G === o : !0), p = w && _ && typeof F == "function";
65
65
  return /* @__PURE__ */ s(
66
66
  "th",
67
67
  {
68
- className: p(n.th, k && n["sorted-column"], x && n.clickableHeader),
68
+ className: u(n.th, x && n["sorted-column"], p && n.clickableHeader),
69
69
  style: E,
70
70
  colSpan: C,
71
- onClick: x ? () => F(u, o) : void 0,
72
- ...f,
73
- children: /* @__PURE__ */ S("div", { className: n.columnContent, children: [
71
+ onClick: p ? () => F(y, o) : void 0,
72
+ ...k,
73
+ children: /* @__PURE__ */ S("div", { className: n.columnContent, style: { justifyContent: T }, children: [
74
74
  a,
75
- k && /* @__PURE__ */ s("span", { className: p(J === "ascending" && n["icon-ascending"]), children: /* @__PURE__ */ s(Y, { iconKey: "fa-solid fa-chevron-down", size: "3xs" }) })
75
+ x && /* @__PURE__ */ s("span", { className: u(J === "ascending" && n["icon-ascending"]), children: /* @__PURE__ */ s(Y, { iconKey: "fa-solid fa-chevron-down", size: "3xs" }) })
76
76
  ] })
77
77
  },
78
78
  e
@@ -81,62 +81,62 @@ const _ = ({ children: r, className: z, alternatingRows: D = !1, isSortable: w =
81
81
  return /* @__PURE__ */ s("th", { className: n.th, children: l }, e);
82
82
  }) }) });
83
83
  }, h = (t, l, e) => {
84
- const c = d.Children.toArray(t).map((o, f) => {
85
- if (i(o, "Table.Cell")) {
84
+ const c = d.Children.toArray(t).map((o, k) => {
85
+ if (m(o, "Table.Cell")) {
86
86
  const E = o, {
87
- children: y,
88
- align: H,
89
- colSpan: K,
90
- width: k,
87
+ children: T,
88
+ align: _,
89
+ colSpan: H,
90
+ width: K,
91
91
  style: x,
92
- ...T
92
+ ...p
93
93
  } = E.props, W = {
94
- textAlign: H ?? "left",
95
- width: k,
94
+ textAlign: _ ?? "left",
95
+ width: K,
96
96
  ...x
97
- }, X = !!(T && typeof T.onClick == "function");
97
+ }, X = !!(p && typeof p.onClick == "function");
98
98
  return /* @__PURE__ */ s(
99
99
  "td",
100
100
  {
101
- className: p(
101
+ className: u(
102
102
  n.cell,
103
103
  (e == null ? void 0 : e.isExpanded) && n.expanded,
104
104
  (e == null ? void 0 : e.isExpandedContent) && n.expandedContentCell,
105
105
  X && n.clickableCell
106
106
  ),
107
107
  style: W,
108
- colSpan: K,
109
- ...T,
110
- children: y
108
+ colSpan: H,
109
+ ...p,
110
+ children: T
111
111
  },
112
- f
112
+ k
113
113
  );
114
114
  }
115
115
  return d.isValidElement(o) && typeof o.type == "string" && o.type === "td" ? o : /* @__PURE__ */ s(
116
116
  "td",
117
117
  {
118
- className: p(
118
+ className: u(
119
119
  n.cell,
120
120
  (e == null ? void 0 : e.isExpanded) && n.expanded,
121
121
  (e == null ? void 0 : e.isExpandedContent) && n.expandedContentCell
122
122
  ),
123
123
  children: o
124
124
  },
125
- f
125
+ k
126
126
  );
127
- }), { className: a, style: m, isExpanded: C, isExpandedContent: b, ...N } = e ?? {}, u = !!(e && typeof e.onClick == "function");
127
+ }), { className: a, style: r, isExpanded: C, isExpandedContent: b, ...N } = e ?? {}, y = !!(e && typeof e.onClick == "function");
128
128
  return /* @__PURE__ */ s(
129
129
  "tr",
130
130
  {
131
- className: p(
131
+ className: u(
132
132
  n.row,
133
133
  a,
134
134
  C && n.expandedRow,
135
135
  b && n.noPaddingRow,
136
136
  b && n.expandedContentRow,
137
- u && n.clickableRow
137
+ y && n.clickableRow
138
138
  ),
139
- style: m,
139
+ style: r,
140
140
  ...N,
141
141
  children: c
142
142
  },
@@ -144,17 +144,17 @@ const _ = ({ children: r, className: z, alternatingRows: D = !1, isSortable: w =
144
144
  );
145
145
  }, U = () => {
146
146
  if (g) {
147
- const c = A(d.Children.toArray(g.props.children)).map((a, m) => {
148
- if (i(a, "Table.Row")) {
147
+ const c = A(d.Children.toArray(g.props.children)).map((a, r) => {
148
+ if (m(a, "Table.Row")) {
149
149
  const C = a;
150
- return h(C.props.children, m, C.props);
150
+ return h(C.props.children, r, C.props);
151
151
  }
152
- return d.isValidElement(a) && typeof a.type == "string" && a.type === "tr" ? a : h(a, m);
152
+ return d.isValidElement(a) && typeof a.type == "string" && a.type === "tr" ? a : h(a, r);
153
153
  });
154
154
  return /* @__PURE__ */ s("tbody", { className: n.tbody, children: c });
155
155
  }
156
156
  const l = A(B).map((e, c) => {
157
- if (i(e, "Table.Row")) {
157
+ if (m(e, "Table.Row")) {
158
158
  const a = e;
159
159
  return h(a.props.children, c, a.props);
160
160
  }
@@ -162,17 +162,17 @@ const _ = ({ children: r, className: z, alternatingRows: D = !1, isSortable: w =
162
162
  });
163
163
  return /* @__PURE__ */ s("tbody", { className: n.tbody, children: l });
164
164
  };
165
- return /* @__PURE__ */ S("table", { className: p(n.table, z, D && n["table-alternating"]), ...L, children: [
165
+ return /* @__PURE__ */ S("table", { className: u(n.table, z, D && n["table-alternating"]), ...L, children: [
166
166
  Q(),
167
167
  U()
168
168
  ] });
169
169
  };
170
- _.Columns = V;
171
- _.Column = v;
172
- _.Body = j;
173
- _.Row = M;
174
- _.Cell = O;
170
+ f.Columns = V;
171
+ f.Column = v;
172
+ f.Body = j;
173
+ f.Row = M;
174
+ f.Cell = O;
175
175
  export {
176
- _ as T,
176
+ f as T,
177
177
  n as s
178
178
  };
@@ -1 +1 @@
1
- ._productCard_tpx1r_3{box-sizing:border-box;background:var(--surface-surface-primary, #FFF);display:flex;width:232px;height:296px;padding:var(--spacing-spacing-default, 16px) var(--spacing-spacing-sm, 20px);flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._productCard_tpx1r_3._sm_tpx1r_15{width:180px;height:230px}._productCard_tpx1r_3>img{width:78px;height:78px;object-fit:contain;flex-shrink:0;margin:0 auto}._productCard_tpx1r_3 ._productInformation_tpx1r_27{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-top:auto}._productCard_tpx1r_3 ._purchaseInformation_tpx1r_34{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._productCard_tpx1r_3 ._addToCart_tpx1r_42,._productCard_tpx1r_3 ._addToCartButton_tpx1r_45{width:100%}._productInformation_tpx1r_27>a{font-weight:var(--font-weight-semibold)}._partNumber_tpx1r_53{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._partNumberLabel_tpx1r_60{color:var(--text-text-quaternary)}._productTile_tpx1r_64{box-sizing:border-box;width:100%;max-width:1072px;display:flex;flex-direction:row;align-items:flex-start;background:var(--surface-surface-primary, #FFF);padding:var(--spacing-spacing-default, 16px) var(--spacing-spacing-sm, 20px);gap:var(--spacing-spacing-1xs)}._productTile_tpx1r_64>img{width:108px;height:108px;object-fit:contain}._productTile_tpx1r_64 ._topRow_tpx1r_83{display:grid;grid-template-columns:1fr auto;width:100%}._productTile_tpx1r_64 ._topRow_tpx1r_83 button{background-color:transparent;padding:0;margin:0;outline:none;border:none;height:min-content;width:min-content}._productTile_tpx1r_64 ._topRow_tpx1r_83 path{fill:var(--icons-icon-search)}._productTile_tpx1r_64 ._topRow_tpx1r_83 svg{padding:0}._productTile_tpx1r_64 ._productInformation_tpx1r_27{display:flex;flex-direction:column;align-items:flex-start;gap:2px}._productTile_tpx1r_64 ._productData_tpx1r_114{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:var(--spacing-spacing-2xs)}._productTile_tpx1r_64 ._purchase_tpx1r_34{display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;width:100%}@media (max-width: 480px){._productTile_tpx1r_64 ._purchase_tpx1r_34{flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-3xs)}}._productTile_tpx1r_64 ._purchaseInformation_tpx1r_34{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}@media (max-width: 480px){._productTile_tpx1r_64 ._purchaseInformation_tpx1r_34{flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%;gap:0px}}._productTile_tpx1r_64 ._attributeContainer_tpx1r_151{margin:0;padding:0;padding-top:var(--spacing-spacing-1xs);border-top:1px solid var(--border-border-primary);width:100%;list-style:none;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;column-gap:var(--spacing-spacing-lg);row-gap:var(--spacing-spacing-3xs)}@media (max-width: 640px){._productTile_tpx1r_64 ._attributeContainer_tpx1r_151{display:none}}._productTile_tpx1r_64 ._attributeContainer_tpx1r_151 li{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._productTile_tpx1r_64 ._addToCart_tpx1r_42{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-md)}@media (max-width: 480px){._productTile_tpx1r_64 ._addToCart_tpx1r_42{gap:var(--spacing-spacing-2xs);width:100%}}._productTile_tpx1r_64 ._addToCartButton_tpx1r_45{width:96px;font-size:var(--font-size-md);font-weight:var(--font-weight-semibold)}@media (max-width: 640px){._productTile_tpx1r_64 ._addToCartButton_tpx1r_45{width:100%}}._elevated_tpx1r_199{border:1px solid var(--border-border-primary, #DFDFDF);box-shadow:2px 4px 12px #00000026}._noImage_tpx1r_205 ._productInformation_tpx1r_27{margin-top:0}._sm_tpx1r_15{padding:var(--spacing-spacing-1xs)}
1
+ ._productCard_12y5l_3{box-sizing:border-box;background:var(--surface-surface-primary, #FFF);display:flex;width:232px;height:296px;padding:var(--spacing-spacing-default, 16px) var(--spacing-spacing-sm, 20px);flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._productCard_12y5l_3._sm_12y5l_15{width:180px;height:230px}._productCard_12y5l_3>img{width:78px;height:78px;object-fit:contain;flex-shrink:0;margin:0 auto}._productCard_12y5l_3 ._productInformation_12y5l_27{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-top:auto}._productCard_12y5l_3 ._purchaseInformation_12y5l_34{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._productCard_12y5l_3 ._addToCart_12y5l_42,._productCard_12y5l_3 ._addToCartButton_12y5l_45{width:100%}._productInformation_12y5l_27>a{font-weight:var(--font-weight-semibold)}._partNumber_12y5l_53{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._partNumberLabel_12y5l_60{color:var(--text-text-quaternary)}._productTile_12y5l_64{box-sizing:border-box;width:100%;max-width:1072px;display:flex;flex-direction:row;align-items:flex-start;background:var(--surface-surface-primary, #FFF);padding:var(--spacing-spacing-default, 16px) var(--spacing-spacing-sm, 20px);gap:var(--spacing-spacing-1xs)}._productTile_12y5l_64>img{object-fit:contain}._productTile_12y5l_64 ._topRow_12y5l_83{display:grid;grid-template-columns:1fr auto;width:100%}._productTile_12y5l_64 ._topRow_12y5l_83 button{background-color:transparent;padding:0;margin:0;outline:none;border:none;height:min-content;width:min-content}._productTile_12y5l_64 ._topRow_12y5l_83 path{fill:var(--icons-icon-search)}._productTile_12y5l_64 ._topRow_12y5l_83 svg{padding:0}._productTile_12y5l_64 ._productInformation_12y5l_27{display:flex;flex-direction:column;align-items:flex-start;gap:2px}._productTile_12y5l_64 ._productData_12y5l_114{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:var(--spacing-spacing-2xs)}._productTile_12y5l_64 ._purchase_12y5l_34{display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;width:100%}@media (max-width: 480px){._productTile_12y5l_64 ._purchase_12y5l_34{flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-3xs)}}._productTile_12y5l_64 ._purchaseInformation_12y5l_34{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}@media (max-width: 480px){._productTile_12y5l_64 ._purchaseInformation_12y5l_34{flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%;gap:0px}}._productTile_12y5l_64 ._attributeContainer_12y5l_151{margin:0;padding:0;padding-top:var(--spacing-spacing-1xs);border-top:1px solid var(--border-border-primary);width:100%;list-style:none;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;column-gap:var(--spacing-spacing-lg);row-gap:var(--spacing-spacing-3xs)}@media (max-width: 640px){._productTile_12y5l_64 ._attributeContainer_12y5l_151{display:none}}._productTile_12y5l_64 ._attributeContainer_12y5l_151 li{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._productTile_12y5l_64 ._addToCart_12y5l_42{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-md)}@media (max-width: 480px){._productTile_12y5l_64 ._addToCart_12y5l_42{gap:var(--spacing-spacing-2xs);width:100%}}._productTile_12y5l_64 ._addToCartButton_12y5l_45{width:96px;font-size:var(--font-size-md);font-weight:var(--font-weight-semibold)}@media (max-width: 640px){._productTile_12y5l_64 ._addToCartButton_12y5l_45{width:100%}}._elevated_12y5l_199{border:1px solid var(--border-border-primary, #DFDFDF);box-shadow:2px 4px 12px #00000026}._noImage_12y5l_205 ._productInformation_12y5l_27{margin-top:0}._sm_12y5l_15{padding:var(--spacing-spacing-1xs)}
@@ -39,7 +39,7 @@ import { AnimatedCheckMark as Mo } from "./molecules/StatefulButton/AnimatedChec
39
39
  import { AddToCart as vo } from "./molecules/AddToCart/AddToCart.js";
40
40
  import { Modal as ho } from "./molecules/Modal/Modal.js";
41
41
  import { ImageViewer as yo } from "./molecules/ImageViewer/ImageViewer.js";
42
- import { T as Ho } from "./Table-CPyc7fHI.js";
42
+ import { T as Ho } from "./Table-BX4PtCNE.js";
43
43
  import { MainNav as Vo } from "./organisms/MainNav/MainNav.js";
44
44
  import { ChipSelector as Go } from "./organisms/ChipSelector/ChipSelector.js";
45
45
  import { Product as Qo } from "./organisms/Product/Product.js";
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../clsx-OuTLNxxd.js";
4
- import { T as i, T as e } from "../../Table-CPyc7fHI.js";
4
+ import { T as i, T as e } from "../../Table-BX4PtCNE.js";
5
5
  import "../../atoms/Icon/Icon.js";
6
6
  export {
7
7
  i as Table,
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
2
  import R, { useState as d, useEffect as P } from "react";
3
- import { T as t, s as x } from "../../Table-CPyc7fHI.js";
3
+ import { T as t, s as x } from "../../Table-BX4PtCNE.js";
4
4
  const v = {
5
5
  title: "Case Parts/Molecules/Table",
6
6
  component: t,
@@ -1,157 +1,160 @@
1
- import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
- import { Image as I } from "../../atoms/Image/Image.js";
1
+ import { jsxs as o, jsx as a } from "react/jsx-runtime";
2
+ import { Image as x } from "../../atoms/Image/Image.js";
3
3
  import { Link as w } from "../../atoms/Link/Link.js";
4
- import { Text as n } from "../../atoms/Text/Text.js";
4
+ import { Text as d } from "../../atoms/Text/Text.js";
5
5
  import { Availability as B } from "../../molecules/Availability/Availability.js";
6
6
  import { Pricing as L } from "../../molecules/Pricing/Pricing.js";
7
7
  import { AddToCart as A } from "../../molecules/AddToCart/AddToCart.js";
8
8
  import { Icon as D } from "../../atoms/Icon/Icon.js";
9
9
  import { c as R } from "../../clsx-OuTLNxxd.js";
10
- import '../../assets/Product.css';const P = "_productCard_tpx1r_3", j = "_sm_tpx1r_15", k = "_productInformation_tpx1r_27", z = "_purchaseInformation_tpx1r_34", y = "_addToCart_tpx1r_42", V = "_addToCartButton_tpx1r_45", q = "_partNumber_tpx1r_53", E = "_partNumberLabel_tpx1r_60", F = "_productTile_tpx1r_64", G = "_topRow_tpx1r_83", J = "_productData_tpx1r_114", M = "_purchase_tpx1r_34", O = "_attributeContainer_tpx1r_151", U = "_elevated_tpx1r_199", W = "_noImage_tpx1r_205", t = {
10
+ import '../../assets/Product.css';const P = "_productCard_12y5l_3", j = "_sm_12y5l_15", k = "_productInformation_12y5l_27", V = "_purchaseInformation_12y5l_34", q = "_addToCart_12y5l_42", E = "_addToCartButton_12y5l_45", F = "_partNumber_12y5l_53", G = "_partNumberLabel_12y5l_60", J = "_productTile_12y5l_64", M = "_topRow_12y5l_83", O = "_productData_12y5l_114", U = "_purchase_12y5l_34", W = "_attributeContainer_12y5l_151", X = "_elevated_12y5l_199", Y = "_noImage_12y5l_205", t = {
11
11
  productCard: P,
12
12
  sm: j,
13
13
  productInformation: k,
14
- purchaseInformation: z,
15
- addToCart: y,
16
- addToCartButton: V,
17
- partNumber: q,
18
- partNumberLabel: E,
19
- productTile: F,
20
- topRow: G,
21
- productData: J,
22
- purchase: M,
23
- attributeContainer: O,
24
- elevated: U,
25
- noImage: W
14
+ purchaseInformation: V,
15
+ addToCart: q,
16
+ addToCartButton: E,
17
+ partNumber: F,
18
+ partNumberLabel: G,
19
+ productTile: J,
20
+ topRow: M,
21
+ productData: O,
22
+ purchase: U,
23
+ attributeContainer: W,
24
+ elevated: X,
25
+ noImage: Y
26
26
  };
27
- function at({
27
+ function ot({
28
28
  productView: $,
29
- itemKey: m,
30
- partNumber: c,
31
- productDescription: u,
32
- availDescription: _,
33
- availId: s,
34
- contactHref: h,
35
- contactLinkBehavior: x,
36
- productHref: b,
37
- priceLabel: N,
38
- price: i,
39
- imgSrc: d,
40
- attributes: l,
41
- className: f,
42
- onAddToCart: C,
43
- onClose: T,
44
- flat: g,
45
- size: o = "md",
29
+ itemKey: i,
30
+ partNumber: n,
31
+ productDescription: _,
32
+ availDescription: h,
33
+ availId: l,
34
+ contactHref: b,
35
+ contactLinkBehavior: N,
36
+ productHref: f,
37
+ priceLabel: C,
38
+ price: c,
39
+ imgSrc: e,
40
+ attributes: u,
41
+ className: T,
42
+ onAddToCart: y,
43
+ onClose: g,
44
+ flat: v,
45
+ size: r = "md",
46
46
  showQuantity: p = !0,
47
- ...v
47
+ ...I
48
48
  }) {
49
- if ($ === "Card") {
50
- const e = o === "sm" ? "xs" : "sm";
51
- return /* @__PURE__ */ a(
52
- "div",
53
- {
54
- className: R(
55
- t.productCard,
56
- o && t[o],
57
- f,
58
- !g && t.elevated,
59
- !d && t.noImage
49
+ const s = r === "sm" ? "xs" : "sm";
50
+ return $ === "Card" ? /* @__PURE__ */ o(
51
+ "div",
52
+ {
53
+ className: R(
54
+ t.productCard,
55
+ r && t[r],
56
+ T,
57
+ !v && t.elevated,
58
+ !e && t.noImage
59
+ ),
60
+ ...I,
61
+ children: [
62
+ e && /* @__PURE__ */ a(
63
+ x,
64
+ {
65
+ src: e,
66
+ alt: `${n} product image`,
67
+ height: r === "sm" ? 78 : 96,
68
+ width: r === "sm" ? 78 : 96
69
+ }
60
70
  ),
61
- ...v,
62
- children: [
63
- d && /* @__PURE__ */ r(
64
- I,
71
+ /* @__PURE__ */ o("div", { className: t.productInformation, children: [
72
+ /* @__PURE__ */ a(w, { size: r, href: f, children: _ }),
73
+ /* @__PURE__ */ o("div", { className: t.partNumber, children: [
74
+ /* @__PURE__ */ a(d, { size: s, className: t.partNumberLabel, children: "Part #" }),
75
+ /* @__PURE__ */ a(d, { size: s, weight: "semibold", children: n })
76
+ ] })
77
+ ] }),
78
+ /* @__PURE__ */ o("div", { className: t.purchaseInformation, children: [
79
+ l && /* @__PURE__ */ a(
80
+ B,
65
81
  {
66
- src: d,
67
- alt: `${c} product image`,
68
- height: o === "sm" ? 78 : 96,
69
- width: o === "sm" ? 78 : 96
82
+ availId: l,
83
+ availDescription: h,
84
+ contactHref: b,
85
+ contactLinkBehavior: N
70
86
  }
71
87
  ),
72
- /* @__PURE__ */ a("div", { className: t.productInformation, children: [
73
- /* @__PURE__ */ r(w, { size: o, href: b, children: u }),
74
- /* @__PURE__ */ a("div", { className: t.partNumber, children: [
75
- /* @__PURE__ */ r(n, { size: e, className: t.partNumberLabel, children: "Part #" }),
76
- /* @__PURE__ */ r(n, { size: e, weight: "semibold", children: c })
77
- ] })
78
- ] }),
79
- /* @__PURE__ */ a("div", { className: t.purchaseInformation, children: [
80
- s && /* @__PURE__ */ r(
81
- B,
82
- {
83
- availId: s,
84
- availDescription: _,
85
- contactHref: h,
86
- contactLinkBehavior: x
87
- }
88
- ),
89
- i && /* @__PURE__ */ r(L, { pricingLabel: N, price: i })
90
- ] }),
91
- /* @__PURE__ */ r(
92
- A,
93
- {
94
- itemKey: m,
95
- onAdd: C,
96
- className: t.addToCart,
97
- addButtonClassName: t.addToCartButton,
98
- addButtonVariant: p ? "cta-primary" : "secondary",
99
- size: o,
100
- buttonDoneText: "",
101
- buttonText: p ? "Add" : "Add to Cart",
102
- showQuantity: p
103
- }
104
- )
105
- ]
106
- }
107
- );
108
- }
109
- return /* @__PURE__ */ a("div", { className: R(t.productTile, f, !g && t.elevated, !d && t.noImage), ...v, children: [
110
- d && /* @__PURE__ */ r(
111
- I,
88
+ c && /* @__PURE__ */ a(L, { pricingLabel: C, price: c })
89
+ ] }),
90
+ /* @__PURE__ */ a(
91
+ A,
92
+ {
93
+ itemKey: i,
94
+ onAdd: y,
95
+ className: t.addToCart,
96
+ addButtonClassName: t.addToCartButton,
97
+ addButtonVariant: p ? "cta-primary" : "secondary",
98
+ size: r,
99
+ buttonDoneText: "",
100
+ buttonText: p ? "Add" : "Add to Cart",
101
+ showQuantity: p
102
+ }
103
+ )
104
+ ]
105
+ }
106
+ ) : /* @__PURE__ */ o("div", { className: R(
107
+ t.productTile,
108
+ T,
109
+ r && t[r],
110
+ !v && t.elevated,
111
+ !e && t.noImage
112
+ ), ...I, children: [
113
+ e && /* @__PURE__ */ a(
114
+ x,
112
115
  {
113
- src: d,
114
- alt: `${c} product image`,
115
- height: 108,
116
- width: 108
116
+ src: e,
117
+ alt: `${n} product image`,
118
+ height: r === "sm" ? 86 : 108,
119
+ width: r === "sm" ? 86 : 108
117
120
  }
118
121
  ),
119
- /* @__PURE__ */ a("div", { className: t.productData, children: [
120
- /* @__PURE__ */ a("div", { className: t.topRow, children: [
121
- /* @__PURE__ */ a("div", { className: t.productInformation, children: [
122
- /* @__PURE__ */ r(w, { href: b, children: u }),
123
- /* @__PURE__ */ a("div", { className: t.partNumber, children: [
124
- /* @__PURE__ */ r(n, { size: "sm", className: t.partNumberLabel, children: "Part #" }),
125
- /* @__PURE__ */ r(n, { size: "sm", weight: "semibold", children: c })
122
+ /* @__PURE__ */ o("div", { className: t.productData, children: [
123
+ /* @__PURE__ */ o("div", { className: t.topRow, children: [
124
+ /* @__PURE__ */ o("div", { className: t.productInformation, children: [
125
+ /* @__PURE__ */ a(w, { size: r, href: f, children: _ }),
126
+ /* @__PURE__ */ o("div", { className: t.partNumber, children: [
127
+ /* @__PURE__ */ a(d, { size: s, className: t.partNumberLabel, children: "Part #" }),
128
+ /* @__PURE__ */ a(d, { size: s, weight: "semibold", children: n })
126
129
  ] })
127
130
  ] }),
128
- T && /* @__PURE__ */ r("button", { onClick: () => T(m), children: /* @__PURE__ */ r(D, { size: "sm", iconKey: "fa-light fa-xmark" }) })
131
+ g && /* @__PURE__ */ a("button", { onClick: () => g(i), children: /* @__PURE__ */ a(D, { size: "sm", iconKey: "fa-light fa-xmark" }) })
129
132
  ] }),
130
- /* @__PURE__ */ a("div", { className: t.purchase, children: [
131
- /* @__PURE__ */ a("div", { className: t.purchaseInformation, children: [
132
- s && /* @__PURE__ */ r(
133
+ /* @__PURE__ */ o("div", { className: t.purchase, children: [
134
+ /* @__PURE__ */ o("div", { className: t.purchaseInformation, children: [
135
+ l && /* @__PURE__ */ a(
133
136
  B,
134
137
  {
135
- availId: s,
136
- availDescription: _,
137
- contactHref: h,
138
- contactLinkBehavior: x
138
+ availId: l,
139
+ availDescription: h,
140
+ contactHref: b,
141
+ contactLinkBehavior: N
139
142
  }
140
143
  ),
141
- i && /* @__PURE__ */ r(L, { pricingLabel: N, price: i })
144
+ c && /* @__PURE__ */ a(L, { pricingLabel: C, price: c })
142
145
  ] }),
143
- /* @__PURE__ */ r(A, { itemKey: m, onAdd: C, className: t.addToCart, addButtonClassName: t.addToCartButton })
146
+ /* @__PURE__ */ a(A, { size: r, itemKey: i, onAdd: y, className: t.addToCart, addButtonClassName: t.addToCartButton })
144
147
  ] }),
145
- l && l.length > 0 && /* @__PURE__ */ r("ul", { className: t.attributeContainer, children: l.map((e) => /* @__PURE__ */ a("li", { children: [
146
- /* @__PURE__ */ a(n, { size: "xs", weight: "light", children: [
147
- e.label,
148
+ u && u.length > 0 && /* @__PURE__ */ a("ul", { className: t.attributeContainer, children: u.map((m) => /* @__PURE__ */ o("li", { children: [
149
+ /* @__PURE__ */ o(d, { size: "xs", weight: "light", children: [
150
+ m.label,
148
151
  ":"
149
152
  ] }),
150
- /* @__PURE__ */ r(n, { size: "xs", weight: "semibold", children: e.value })
151
- ] }, `${e.label}.${e.value}`)) })
153
+ /* @__PURE__ */ a(d, { size: "xs", weight: "semibold", children: m.value })
154
+ ] }, `${m.label}.${m.value}`)) })
152
155
  ] })
153
156
  ] });
154
157
  }
155
158
  export {
156
- at as Product
159
+ ot as Product
157
160
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.149",
4
+ "version": "0.0.151",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",