@caseparts-org/caseblocks 0.0.252 → 0.0.254
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.
- package/dist/Cart.module-ccFxL4YZ.js +25 -0
- package/dist/{Table-f_q_CCA-.js → Table-_UT9976g.js} +63 -63
- package/dist/assets/Cart.css +1 -1
- package/dist/assets/Icon.css +1 -1
- package/dist/assets/Pill.css +1 -1
- package/dist/assets/Table.css +1 -1
- package/dist/atoms/Icon/Icon.d.ts +3 -2
- package/dist/atoms/Icon/Icon.js +33 -29
- package/dist/atoms/Icon/Icon.stories.d.ts +5 -0
- package/dist/atoms/Icon/Icon.stories.js +15 -11
- package/dist/atoms/Pill/Pill.d.ts +6 -1
- package/dist/atoms/Pill/Pill.js +69 -53
- package/dist/main-client.js +1 -1
- package/dist/molecules/Cart/Cart.js +1 -1
- package/dist/molecules/Cart/CartPart.d.ts +2 -1
- package/dist/molecules/Cart/CartPart.js +77 -63
- package/dist/molecules/Cart/CartPart.stories.d.ts +2 -0
- package/dist/molecules/Cart/CartPart.stories.js +18 -6
- package/dist/molecules/Cart/CartSlideInPanel.js +8 -8
- package/dist/molecules/Table/Table.js +1 -1
- package/dist/molecules/Table/Table.stories.js +1 -1
- package/package.json +1 -1
- package/dist/Cart.module-CqE2A_OG.js +0 -25
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import './assets/Cart.css';const t = "_cartIconButton_13798_2", e = "_count_13798_15", o = "_cartContainer_13798_30", n = "_headerWrapper_13798_41", _ = "_header_13798_41", a = "_cartItems_13798_59", c = "_cartItem_13798_59", r = "_itemContainer_13798_85", i = "_topRow_13798_89", s = "_itemInfo_13798_96", m = "_editUnit_13798_101", I = "_purchaseInformation_13798_117", u = "_availabilitySlot_13798_123", l = "_priceSlot_13798_130", p = "_itemManagement_13798_132", h = "_itemImage_13798_145", d = "_removeItem_13798_148", b = "_noItems_13798_158", f = "_subtotal_13798_165", g = "_checkoutButton_13798_172", v = {
|
|
2
|
+
cartIconButton: t,
|
|
3
|
+
count: e,
|
|
4
|
+
cartContainer: o,
|
|
5
|
+
headerWrapper: n,
|
|
6
|
+
header: _,
|
|
7
|
+
cartItems: a,
|
|
8
|
+
cartItem: c,
|
|
9
|
+
itemContainer: r,
|
|
10
|
+
topRow: i,
|
|
11
|
+
itemInfo: s,
|
|
12
|
+
editUnit: m,
|
|
13
|
+
purchaseInformation: I,
|
|
14
|
+
availabilitySlot: u,
|
|
15
|
+
priceSlot: l,
|
|
16
|
+
itemManagement: p,
|
|
17
|
+
itemImage: h,
|
|
18
|
+
removeItem: d,
|
|
19
|
+
noItems: b,
|
|
20
|
+
subtotal: f,
|
|
21
|
+
checkoutButton: g
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
v as s
|
|
25
|
+
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as c, jsxs as V } from "react/jsx-runtime";
|
|
2
|
+
import o from "react";
|
|
3
3
|
import { c as m } from "./clsx-OuTLNxxd.js";
|
|
4
4
|
import { getHideAtStyles as E } from "./atoms/HideAt.js";
|
|
5
5
|
import { Icon as ee } from "./atoms/Icon/Icon.js";
|
|
6
|
-
import './assets/Table.css';const ne = "
|
|
7
|
-
"table-container": "_table-
|
|
6
|
+
import './assets/Table.css';const ne = "_bordered_1cc0a_8", te = "_table_1cc0a_2", le = "_columnContent_1cc0a_40", ae = "_columnLabel_1cc0a_49", ce = "_clickableHeader_1cc0a_69", oe = "_columnsRow_1cc0a_76", se = "_noPaddingRow_1cc0a_127", de = "_clickableRow_1cc0a_138", re = "_clickableCell_1cc0a_139", ie = "_expandedContentCell_1cc0a_141", me = "_expandedContentRow_1cc0a_150", ue = "_expandedRow_1cc0a_155", pe = "_expanded_1cc0a_141", n = {
|
|
7
|
+
"table-container": "_table-container_1cc0a_2",
|
|
8
8
|
bordered: ne,
|
|
9
9
|
table: te,
|
|
10
|
-
"table-alternating": "_table-
|
|
10
|
+
"table-alternating": "_table-alternating_1cc0a_22",
|
|
11
11
|
columnContent: le,
|
|
12
|
-
columnLabel:
|
|
13
|
-
"sorted-column": "_sorted-
|
|
14
|
-
clickableHeader:
|
|
15
|
-
"icon-ascending": "_icon-
|
|
16
|
-
columnsRow:
|
|
12
|
+
columnLabel: ae,
|
|
13
|
+
"sorted-column": "_sorted-column_1cc0a_58",
|
|
14
|
+
clickableHeader: ce,
|
|
15
|
+
"icon-ascending": "_icon-ascending_1cc0a_70",
|
|
16
|
+
columnsRow: oe,
|
|
17
17
|
noPaddingRow: se,
|
|
18
18
|
clickableRow: de,
|
|
19
|
-
clickableCell:
|
|
20
|
-
expandedContentCell:
|
|
19
|
+
clickableCell: re,
|
|
20
|
+
expandedContentCell: ie,
|
|
21
21
|
expandedContentRow: me,
|
|
22
22
|
expandedRow: ue,
|
|
23
23
|
expanded: pe
|
|
@@ -31,45 +31,45 @@ const O = ({ children: u }) => null;
|
|
|
31
31
|
O.displayName = "Table.Row";
|
|
32
32
|
const z = ({ children: u }) => null;
|
|
33
33
|
z.displayName = "Table.Cell";
|
|
34
|
-
const
|
|
34
|
+
const f = ({ children: u, className: D, alternatingRows: q = !1, bordered: G = !0, isSortable: H = !1, sortField: J, sortFieldKey: Q, sortOrder: U = "descending", onSort: F, hideAt: W, ...X }) => {
|
|
35
35
|
const B = [];
|
|
36
36
|
let p, g;
|
|
37
|
-
const
|
|
37
|
+
const i = (t, l) => {
|
|
38
38
|
var e;
|
|
39
|
-
return !!t &&
|
|
40
|
-
}, Y = p ?
|
|
41
|
-
(t) =>
|
|
39
|
+
return !!t && o.isValidElement(t) && ((e = t.type) == null ? void 0 : e.displayName) === l;
|
|
40
|
+
}, Y = p ? o.Children.toArray(p.props.children).map(
|
|
41
|
+
(t) => i(t, "Table.Column") ? t.props.hideAt : void 0
|
|
42
42
|
) : [];
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
o.Children.forEach(u, (t) => {
|
|
44
|
+
i(t, "Table.Columns") ? p = t : i(t, "Table.Body") ? g = t : B.push(t);
|
|
45
45
|
});
|
|
46
46
|
const v = (t) => t.flatMap((l) => {
|
|
47
|
-
if (
|
|
47
|
+
if (o.isValidElement(l) && l.type === o.Fragment) {
|
|
48
48
|
const e = l.props.children;
|
|
49
|
-
return
|
|
49
|
+
return o.Children.toArray(e);
|
|
50
50
|
}
|
|
51
51
|
return [l];
|
|
52
52
|
}), Z = () => {
|
|
53
53
|
if (!p) return null;
|
|
54
|
-
const t =
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
if (
|
|
54
|
+
const t = o.Children.toArray(p.props.children);
|
|
55
|
+
return /* @__PURE__ */ c("thead", { className: n.thead, children: /* @__PURE__ */ c("tr", { ...p.props, className: n.columnsRow, children: t.map((l, e) => {
|
|
56
|
+
if (i(l, "Table.Column")) {
|
|
57
57
|
const d = l, {
|
|
58
|
-
children:
|
|
59
|
-
align:
|
|
58
|
+
children: a,
|
|
59
|
+
align: r,
|
|
60
60
|
colSpan: C,
|
|
61
|
-
width:
|
|
61
|
+
width: x,
|
|
62
62
|
style: k,
|
|
63
63
|
sortField: y,
|
|
64
64
|
sortFieldKey: s,
|
|
65
65
|
hideAt: b,
|
|
66
66
|
...T
|
|
67
67
|
} = d.props, w = {
|
|
68
|
-
textAlign:
|
|
69
|
-
width:
|
|
68
|
+
textAlign: r ?? "left",
|
|
69
|
+
width: x,
|
|
70
70
|
...k
|
|
71
|
-
}, A =
|
|
72
|
-
return /* @__PURE__ */
|
|
71
|
+
}, A = r === "right" ? "flex-end" : r === "center" ? "center" : "flex-start", h = !!y, N = H && h && (h && J === y) && (s !== void 0 ? Q === s : !0), _ = H && h && typeof F == "function";
|
|
72
|
+
return /* @__PURE__ */ c(
|
|
73
73
|
"th",
|
|
74
74
|
{
|
|
75
75
|
className: m(n.th, N && n["sorted-column"], _ && n.clickableHeader, E(b)),
|
|
@@ -78,18 +78,18 @@ const x = ({ children: u, className: D, alternatingRows: q = !1, bordered: G = !
|
|
|
78
78
|
onClick: _ ? () => F(y, s) : void 0,
|
|
79
79
|
...T,
|
|
80
80
|
children: /* @__PURE__ */ V("div", { className: n.columnContent, style: { justifyContent: A }, children: [
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
N && /* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ c("span", { className: n.columnLabel, children: a }),
|
|
82
|
+
N && /* @__PURE__ */ c("span", { className: m(U === "ascending" && n["icon-ascending"]), children: /* @__PURE__ */ c(ee, { iconKey: "fa-solid fa-chevron-down", size: "3xs" }) })
|
|
83
83
|
] })
|
|
84
84
|
},
|
|
85
85
|
e
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ c("th", { className: n.th, children: l }, e);
|
|
89
89
|
}) }) });
|
|
90
|
-
},
|
|
91
|
-
const d =
|
|
92
|
-
if (
|
|
90
|
+
}, R = (t, l, e) => {
|
|
91
|
+
const d = o.Children.toArray(t).map((s, b) => {
|
|
92
|
+
if (i(s, "Table.Cell")) {
|
|
93
93
|
const T = s, {
|
|
94
94
|
children: w,
|
|
95
95
|
align: A,
|
|
@@ -103,7 +103,7 @@ const x = ({ children: u, className: D, alternatingRows: q = !1, bordered: G = !
|
|
|
103
103
|
width: S,
|
|
104
104
|
...K
|
|
105
105
|
}, P = !!(_ && typeof _.onClick == "function");
|
|
106
|
-
return /* @__PURE__ */
|
|
106
|
+
return /* @__PURE__ */ c(
|
|
107
107
|
"td",
|
|
108
108
|
{
|
|
109
109
|
className: m(
|
|
@@ -121,7 +121,7 @@ const x = ({ children: u, className: D, alternatingRows: q = !1, bordered: G = !
|
|
|
121
121
|
b
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
|
-
return
|
|
124
|
+
return o.isValidElement(s) && typeof s.type == "string" && s.type === "td" ? s : /* @__PURE__ */ c(
|
|
125
125
|
"td",
|
|
126
126
|
{
|
|
127
127
|
className: m(
|
|
@@ -133,19 +133,19 @@ const x = ({ children: u, className: D, alternatingRows: q = !1, bordered: G = !
|
|
|
133
133
|
},
|
|
134
134
|
b
|
|
135
135
|
);
|
|
136
|
-
}), { className:
|
|
137
|
-
return /* @__PURE__ */
|
|
136
|
+
}), { className: a, style: r, isExpanded: C, isExpandedContent: x, ...k } = e ?? {}, y = !!(e && typeof e.onClick == "function");
|
|
137
|
+
return /* @__PURE__ */ c(
|
|
138
138
|
"tr",
|
|
139
139
|
{
|
|
140
140
|
className: m(
|
|
141
141
|
n.row,
|
|
142
|
-
|
|
142
|
+
a,
|
|
143
143
|
C && n.expandedRow,
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
x && n.noPaddingRow,
|
|
145
|
+
x && n.expandedContentRow,
|
|
146
146
|
y && n.clickableRow
|
|
147
147
|
),
|
|
148
|
-
style:
|
|
148
|
+
style: r,
|
|
149
149
|
...k,
|
|
150
150
|
children: d
|
|
151
151
|
},
|
|
@@ -153,35 +153,35 @@ const x = ({ children: u, className: D, alternatingRows: q = !1, bordered: G = !
|
|
|
153
153
|
);
|
|
154
154
|
}, $ = () => {
|
|
155
155
|
if (g) {
|
|
156
|
-
const d = v(
|
|
157
|
-
if (
|
|
158
|
-
const C =
|
|
159
|
-
return
|
|
156
|
+
const d = v(o.Children.toArray(g.props.children)).map((a, r) => {
|
|
157
|
+
if (i(a, "Table.Row")) {
|
|
158
|
+
const C = a;
|
|
159
|
+
return R(C.props.children, r, C.props);
|
|
160
160
|
}
|
|
161
|
-
return
|
|
161
|
+
return o.isValidElement(a) && typeof a.type == "string" && a.type === "tr" ? a : R(a, r);
|
|
162
162
|
});
|
|
163
|
-
return /* @__PURE__ */
|
|
163
|
+
return /* @__PURE__ */ c("tbody", { className: n.tbody, children: d });
|
|
164
164
|
}
|
|
165
165
|
const l = v(B).map((e, d) => {
|
|
166
|
-
if (
|
|
167
|
-
const
|
|
168
|
-
return
|
|
166
|
+
if (i(e, "Table.Row")) {
|
|
167
|
+
const a = e;
|
|
168
|
+
return R(a.props.children, d, a.props);
|
|
169
169
|
}
|
|
170
|
-
return
|
|
170
|
+
return o.isValidElement(e) && typeof e.type == "string" && e.type === "tr" ? e : R(e, d);
|
|
171
171
|
});
|
|
172
|
-
return /* @__PURE__ */
|
|
172
|
+
return /* @__PURE__ */ c("tbody", { className: n.tbody, children: l });
|
|
173
173
|
};
|
|
174
|
-
return /* @__PURE__ */
|
|
174
|
+
return /* @__PURE__ */ c("div", { className: m(n["table-container"], G && n.bordered), children: /* @__PURE__ */ V("table", { className: m(n.table, D, q && n["table-alternating"], E(W)), ...X, children: [
|
|
175
175
|
Z(),
|
|
176
176
|
$()
|
|
177
177
|
] }) });
|
|
178
178
|
};
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
f.Columns = L;
|
|
180
|
+
f.Column = j;
|
|
181
|
+
f.Body = M;
|
|
182
|
+
f.Row = O;
|
|
183
|
+
f.Cell = z;
|
|
184
184
|
export {
|
|
185
|
-
|
|
185
|
+
f as T,
|
|
186
186
|
n as s
|
|
187
187
|
};
|
package/dist/assets/Cart.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._cartIconButton_13798_2{position:relative;border:none;padding:0;margin:0;background-color:transparent;cursor:pointer;color:#000;transition:color .3s ease,transform .3s ease}._cartIconButton_13798_2:hover{color:var(--color-brand-primary-primary-teal-blue)}._count_13798_15{position:absolute;top:0;left:14px;border-radius:50%;width:18px;height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:var(--color-brand-primary-primary-tangerine);color:var(--color-neutrals-neutral-1);font-weight:var(--font-weight-semibold)}._cartContainer_13798_30{height:100vh;width:100%;min-width:320px;max-width:375px;box-sizing:border-box;display:grid;grid-template-rows:auto auto 1fr auto auto;gap:var(--spacing-1);padding:var(--spacing-1)}._headerWrapper_13798_41{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._headerWrapper_13798_41>button{padding:0;margin:0;background-color:transparent;border:none}._header_13798_41{display:flex;flex-direction:column;align-items:flex-start;width:100%}._cartItems_13798_59{height:100%;overflow-y:auto;overflow-x:hidden}._cartItems_13798_59 ul{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-1xs)}._cartItem_13798_59{display:grid;grid-template-columns:auto minmax(0,1fr);gap:var(--spacing-0-5);align-items:start;box-sizing:border-box;position:relative;list-style:none;margin:0;padding:var(--spacing-0-5);width:100%;border:1px solid var(--color-neutrals-neutral-2);border-radius:var(--border-radius-md)}._itemContainer_13798_85{display:grid;gap:var(--spacing-spacing-3xs)}._topRow_13798_89{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:var(--spacing-spacing-4xs)}._itemInfo_13798_96{display:flex;flex-direction:column;align-items:flex-start}._editUnit_13798_101{display:flex;align-items:center;text-align:start;gap:var(--spacing-spacing-3xs);border:none;background-color:transparent;padding:0;margin:0;cursor:pointer;color:var(--text-text-links);word-wrap:break-word;font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold)}._purchaseInformation_13798_117{display:flex;flex-direction:column;align-items:flex-end;gap:var(--spacing-spacing-3xs)}._availabilitySlot_13798_123{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-3xs)}._itemManagement_13798_132{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between}._cartItem_13798_59 p{margin:0;padding:0;word-wrap:break-word;white-space:normal;overflow-wrap:break-word}._itemImage_13798_145{object-fit:contain}._removeItem_13798_148{border:none;background-color:transparent;padding:0;margin:0;cursor:pointer;width:min-content;height:min-content}._noItems_13798_158{display:flex;flex-direction:row;align-items:center;justify-content:center;height:100%}._subtotal_13798_165{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:var(--spacing-0-5)}._checkoutButton_13798_172{width:100%;height:fit-content;display:inline-flex;gap:var(--spacing-spacing-2xs)}
|
package/dist/assets/Icon.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._icon-
|
|
1
|
+
._icon-3xs_1hfg4_1{--icon-size: var(--font-size-xxs);--icon-padding: calc(var(--font-size-xxs) / 4)}._icon-2xs_1hfg4_5{--icon-size: var(--font-size-xs);--icon-padding: calc(var(--font-size-xs) / 4)}._icon-xs_1hfg4_9{--icon-size: var(--font-size-sm);--icon-padding: calc(var(--font-size-sm) / 4)}._icon-sm_1hfg4_13{--icon-size: var(--font-size-md);--icon-padding: calc(var(--font-size-md) / 4)}._icon-md_1hfg4_17{--icon-size: var(--font-size-2xl);--icon-padding: calc(var(--font-size-md) / 4)}._icon-lg_1hfg4_21{--icon-size: var(--font-size-3xl);--icon-padding: calc(var(--font-size-lg) / 4)}._wrapper_1hfg4_27{display:inline-flex;box-sizing:border-box;width:calc(var(--icon-size) + (var(--icon-padding) * 2));height:calc(var(--icon-size) + (var(--icon-padding) * 2));aspect-ratio:1 / 1;align-items:center;justify-content:center;line-height:1;padding:var(--icon-padding)}._noPadding_1hfg4_39{--icon-padding: 0rem}._wrapper_1hfg4_27>i,._wrapper_1hfg4_27>svg{font-size:var(--icon-size);width:100%;height:100%;max-width:100%;max-height:100%}._iconColor-inherit_1hfg4_54{color:inherit}._iconColor-default_1hfg4_55{color:var(--icons-icon-default)}._iconColor-default-inverted_1hfg4_56{color:var(--icons-icon-invert)}._iconColor-secondary_1hfg4_57{color:var(--icons-icon-secondary)}._iconColor-caution_1hfg4_58{color:var(--icons-icon-caution-tips)}._iconColor-warning_1hfg4_59{color:var(--icons-icon-warning)}._iconColor-error-warning_1hfg4_60{color:var(--icons-icon-error-warning)}._iconColor-success_1hfg4_61{color:var(--icons-icon-success)}
|
package/dist/assets/Pill.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._pill_h5ujm_1{display:flex;justify-content:center;align-items:center;gap:var(--spacing-spacing-4xs);border-radius:28px;border:1px solid}._pill-xs_h5ujm_19{padding:2px 10px}._pill-sm_h5ujm_27{padding:2px 12px}._pill-md_h5ujm_35{padding:4px 16px}._pill-color-neutral_h5ujm_43{background:var(--color-neutrals-neutral-1)}._pill-color-secondary_h5ujm_51{background:var(--color-brand-secondary-lt-teal-blue)}._pill-color-caution-tips_h5ujm_59{background:var(--color-brand-secondary-lt-yellow)}._pill-color-warning_h5ujm_67{background:var(--color-brand-secondary-lt-orange)}._pill-color-success_h5ujm_75{background:var(--color-brand-secondary-lt-green)}._pill-color-error-warning_h5ujm_83{background:var(--color-brand-secondary-lt-red)}._pill-border-neutral_h5ujm_91{border-color:var(--border-border-primary)}._pill-border-secondary_h5ujm_99{border-color:var(--border-border-primary-chit)}._pill-border-caution-tips_h5ujm_107{border-color:var(--border-border-help)}._pill-border-warning_h5ujm_115{border-color:var(--border-border-warning)}._pill-border-success_h5ujm_123{border-color:var(--border-border-success)}._pill-border-error-warning_h5ujm_131{border-color:var(--border-border-error-warning)}._noBorder_h5ujm_139{border:none}._uppercase_h5ujm_147{text-transform:uppercase;letter-spacing:.03em}
|
package/dist/assets/Table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._table-
|
|
1
|
+
._table-container_1cc0a_2{overflow-x:hidden;width:100%}._bordered_1cc0a_8{border:1px solid var(--border-border-primary)}._table_1cc0a_2{min-width:100%;max-width:1056px;width:max-content;border-collapse:collapse;table-layout:fixed}._table-alternating_1cc0a_22 tr:nth-child(2n){background-color:#f0f0f0}._table_1cc0a_2 th,._table_1cc0a_2 td{max-width:clamp(72px,10vw,180px);min-width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._columnContent_1cc0a_40{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-4xs);width:100%;min-width:0}._columnLabel_1cc0a_49{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._sorted-column_1cc0a_58 svg,._sorted-column_1cc0a_58 i{height:8px;width:8px;transition:transform .3s ease-in-out;vertical-align:middle;padding:0;margin:0 0 0 4px}._table_1cc0a_2 th._clickableHeader_1cc0a_69{cursor:pointer}._icon-ascending_1cc0a_70 svg,._icon-ascending_1cc0a_70 i{transform:rotate(180deg)}._columnsRow_1cc0a_76{background-color:var(--surface-surface-secondary)}._table_1cc0a_2 th{border-bottom:1px solid var(--border-border-primary);cursor:auto;transition:background-color .2s ease-in}._table_1cc0a_2 th:hover{background-color:#f0f0f0}._sorted-column_1cc0a_58{text-align:start;font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);color:var(--text-text-quaternary);row-gap:4px}._table_1cc0a_2 th:not(._sorted-column_1cc0a_58){text-align:start;font-size:var(--font-size-xs);font-weight:var(--font-weight-medium);color:var(--text-text-quaternary)}._table_1cc0a_2 th:last-of-type,._table_1cc0a_2 td:last-of-type{text-align:end;padding-right:.5rem}._table_1cc0a_2 th:first-of-type,._table_1cc0a_2 td:first-of-type{text-align:start;padding:.45rem .5rem}._table_1cc0a_2 th:not(:first-of-type):not(:last-of-type),._table_1cc0a_2 td:not(:first-of-type):not(:last-of-type){padding:.45rem .5rem}._noPaddingRow_1cc0a_127 td{padding:0!important}._table_1cc0a_2 td{text-align:start;cursor:auto}._table_1cc0a_2 ._clickableRow_1cc0a_138 td,._table_1cc0a_2 td._clickableCell_1cc0a_139{cursor:pointer}._table_1cc0a_2 td:not(._expandedContentCell_1cc0a_141){border-bottom:1px solid var(--border-border-primary)}._table_1cc0a_2>tbody tr{transition:background-color .2s linear}._table_1cc0a_2>tbody tr:not(._expandedContentRow_1cc0a_150):hover{background-color:var(--color-neutrals-neutral-1)}._expandedRow_1cc0a_155 td:first-of-type{border-left:1px solid var(--border-border-black-box)}._expandedRow_1cc0a_155 td:last-of-type{border-right:1px solid var(--border-border-black-box)}._expanded_1cc0a_141{border-top:4px solid var(--color-brand-primary-primary-teal-blue)}._expandedContentCell_1cc0a_141{border-left:1px solid var(--border-border-black-box);border-right:1px solid var(--border-border-black-box);border-bottom:1px solid var(--border-border-black-box);border-top:0}._expandedContentRow_1cc0a_150{background-color:transparent}._new-column_1cc0a_182{animation:_highlight_1cc0a_1 2s ease-in-out}@keyframes _highlight_1cc0a_1{0%{background-color:#ff0}to{background-color:transparent}}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { HideAtProps } from '../HideAt';
|
|
2
2
|
export type IconSet = "fa-kit" | "fa-solid" | "fa-regular" | "fa-light" | "fa-thin" | "fa-brands";
|
|
3
3
|
export type IconVariant = "fa-sharp" | "fa-duotone" | "fa-sharp-duotone";
|
|
4
|
-
export type IconColorToken = "inherit" | "default" | "default-inverted" | "secondary" | "warning" | "error-warning" | "success";
|
|
4
|
+
export type IconColorToken = "inherit" | "default" | "default-inverted" | "secondary" | "caution" | "warning" | "error-warning" | "success";
|
|
5
5
|
export interface IconProps extends React.HTMLAttributes<HTMLSpanElement>, HideAtProps {
|
|
6
6
|
iconKey: `${IconSet} ${string}` | `${IconVariant} ${IconSet} ${string}`;
|
|
7
7
|
size?: "3xs" | "2xs" | "xs" | "sm" | "md" | "lg";
|
|
8
8
|
colorToken?: IconColorToken;
|
|
9
|
+
noPadding?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export declare function Icon({ iconKey, size, hideAt, className, colorToken, ...otherProps }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function Icon({ iconKey, size, hideAt, className, colorToken, noPadding, ...otherProps }: IconProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/atoms/Icon/Icon.js
CHANGED
|
@@ -1,45 +1,49 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { getHideAtStyles as
|
|
4
|
-
import '../../assets/Icon.css';const
|
|
5
|
-
"icon-3xs": "_icon-
|
|
6
|
-
"icon-2xs": "_icon-
|
|
7
|
-
"icon-xs": "_icon-
|
|
8
|
-
"icon-sm": "_icon-
|
|
9
|
-
"icon-md": "_icon-
|
|
10
|
-
"icon-lg": "_icon-
|
|
11
|
-
wrapper:
|
|
12
|
-
|
|
13
|
-
"iconColor-
|
|
14
|
-
"iconColor-default
|
|
15
|
-
"iconColor-
|
|
16
|
-
"iconColor-
|
|
17
|
-
"iconColor-
|
|
18
|
-
"iconColor-
|
|
2
|
+
import { c as i } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { getHideAtStyles as g } from "../HideAt.js";
|
|
4
|
+
import '../../assets/Icon.css';const f = "_wrapper_1hfg4_27", t = "_noPadding_1hfg4_39", o = {
|
|
5
|
+
"icon-3xs": "_icon-3xs_1hfg4_1",
|
|
6
|
+
"icon-2xs": "_icon-2xs_1hfg4_5",
|
|
7
|
+
"icon-xs": "_icon-xs_1hfg4_9",
|
|
8
|
+
"icon-sm": "_icon-sm_1hfg4_13",
|
|
9
|
+
"icon-md": "_icon-md_1hfg4_17",
|
|
10
|
+
"icon-lg": "_icon-lg_1hfg4_21",
|
|
11
|
+
wrapper: f,
|
|
12
|
+
noPadding: t,
|
|
13
|
+
"iconColor-inherit": "_iconColor-inherit_1hfg4_54",
|
|
14
|
+
"iconColor-default": "_iconColor-default_1hfg4_55",
|
|
15
|
+
"iconColor-default-inverted": "_iconColor-default-inverted_1hfg4_56",
|
|
16
|
+
"iconColor-secondary": "_iconColor-secondary_1hfg4_57",
|
|
17
|
+
"iconColor-caution": "_iconColor-caution_1hfg4_58",
|
|
18
|
+
"iconColor-warning": "_iconColor-warning_1hfg4_59",
|
|
19
|
+
"iconColor-error-warning": "_iconColor-error-warning_1hfg4_60",
|
|
20
|
+
"iconColor-success": "_iconColor-success_1hfg4_61"
|
|
19
21
|
};
|
|
20
|
-
function
|
|
21
|
-
iconKey:
|
|
22
|
+
function m({
|
|
23
|
+
iconKey: r,
|
|
22
24
|
size: c = "md",
|
|
23
25
|
hideAt: _,
|
|
24
|
-
className:
|
|
25
|
-
colorToken:
|
|
26
|
-
|
|
26
|
+
className: e,
|
|
27
|
+
colorToken: s = "inherit",
|
|
28
|
+
noPadding: l = !1,
|
|
29
|
+
...a
|
|
27
30
|
}) {
|
|
28
31
|
return /* @__PURE__ */ n(
|
|
29
32
|
"span",
|
|
30
33
|
{
|
|
31
|
-
className:
|
|
34
|
+
className: i(
|
|
32
35
|
o.wrapper,
|
|
33
36
|
o[`icon-${c}`],
|
|
34
|
-
o[`iconColor-${
|
|
35
|
-
l
|
|
36
|
-
|
|
37
|
+
o[`iconColor-${s}`],
|
|
38
|
+
l && o.noPadding,
|
|
39
|
+
g(_),
|
|
40
|
+
e
|
|
37
41
|
),
|
|
38
|
-
...
|
|
39
|
-
children: /* @__PURE__ */ n("i", { className: r
|
|
42
|
+
...a,
|
|
43
|
+
children: /* @__PURE__ */ n("i", { className: i(r), "aria-hidden": "true" })
|
|
40
44
|
}
|
|
41
45
|
);
|
|
42
46
|
}
|
|
43
47
|
export {
|
|
44
|
-
|
|
48
|
+
m as Icon
|
|
45
49
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useEffect as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as c, createElement as s } from "react";
|
|
3
3
|
import { Icon as l } from "./Icon.js";
|
|
4
4
|
const d = [
|
|
5
5
|
"fa-kit fa-chat",
|
|
@@ -25,7 +25,10 @@ const d = [
|
|
|
25
25
|
colorToken: {
|
|
26
26
|
name: "color",
|
|
27
27
|
control: { type: "select" },
|
|
28
|
-
options: ["inherit", "default", "default-inverted", "secondary", "warning", "error-warning", "success"]
|
|
28
|
+
options: ["inherit", "default", "default-inverted", "secondary", "caution", "warning", "error-warning", "success"]
|
|
29
|
+
},
|
|
30
|
+
noPadding: {
|
|
31
|
+
control: { type: "boolean" }
|
|
29
32
|
}
|
|
30
33
|
},
|
|
31
34
|
args: {
|
|
@@ -36,14 +39,14 @@ const d = [
|
|
|
36
39
|
}
|
|
37
40
|
}, a = (e) => {
|
|
38
41
|
const { iconKey: t } = e;
|
|
39
|
-
return
|
|
40
|
-
var o,
|
|
42
|
+
return c(() => {
|
|
43
|
+
var o, r, i;
|
|
41
44
|
try {
|
|
42
|
-
(i = (
|
|
45
|
+
(i = (r = (o = window == null ? void 0 : window.FontAwesome) == null ? void 0 : o.dom) == null ? void 0 : r.i2svg) == null || i.call(r);
|
|
43
46
|
} catch {
|
|
44
47
|
console.log();
|
|
45
48
|
}
|
|
46
|
-
}, [t]), /* @__PURE__ */
|
|
49
|
+
}, [t]), /* @__PURE__ */ n("div", { style: { backgroundColor: e.colorToken === "default-inverted" ? "#444" : "white" }, children: /* @__PURE__ */ s(
|
|
47
50
|
l,
|
|
48
51
|
{
|
|
49
52
|
...e,
|
|
@@ -51,19 +54,20 @@ const d = [
|
|
|
51
54
|
}
|
|
52
55
|
) });
|
|
53
56
|
}, y = {
|
|
54
|
-
render: (e) => /* @__PURE__ */
|
|
57
|
+
render: (e) => /* @__PURE__ */ n(a, { ...e })
|
|
55
58
|
}, g = {
|
|
56
|
-
render: (e) => /* @__PURE__ */
|
|
59
|
+
render: (e) => /* @__PURE__ */ n("div", { style: { display: "flex", gap: "0.75rem", alignItems: "center" }, children: ["sm", "md", "lg"].map((t) => /* @__PURE__ */ n(a, { ...e, size: t }, t)) })
|
|
57
60
|
}, h = {
|
|
58
61
|
args: { iconKey: "fa-solid fa-circle-info" },
|
|
59
|
-
render: (e) => /* @__PURE__ */
|
|
62
|
+
render: (e) => /* @__PURE__ */ n("div", { style: { display: "flex", gap: "1rem", alignItems: "center" }, children: [
|
|
60
63
|
"default",
|
|
61
64
|
"default-inverted",
|
|
62
65
|
"secondary",
|
|
66
|
+
"caution",
|
|
63
67
|
"warning",
|
|
64
68
|
"error-warning",
|
|
65
69
|
"success"
|
|
66
|
-
].map((o) => /* @__PURE__ */
|
|
70
|
+
].map((o) => /* @__PURE__ */ n(
|
|
67
71
|
a,
|
|
68
72
|
{
|
|
69
73
|
...e,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { TextColorToken, TextWeight } from '../Text/Text';
|
|
3
|
+
import { IconProps } from '../Icon/Icon';
|
|
3
4
|
import { HideAtProps } from '../HideAt';
|
|
4
5
|
export interface PillProps extends React.HTMLAttributes<HTMLSpanElement>, HideAtProps {
|
|
5
6
|
children: ReactNode;
|
|
@@ -10,6 +11,10 @@ export interface PillProps extends React.HTMLAttributes<HTMLSpanElement>, HideAt
|
|
|
10
11
|
uppercase?: boolean;
|
|
11
12
|
hideBorder?: boolean;
|
|
12
13
|
size?: "xs" | "sm" | "md";
|
|
14
|
+
iconKey?: IconProps["iconKey"];
|
|
15
|
+
iconSize?: IconProps["size"];
|
|
16
|
+
iconColorToken?: IconProps["colorToken"];
|
|
17
|
+
iconNoPadding?: IconProps["noPadding"];
|
|
13
18
|
className?: string;
|
|
14
19
|
}
|
|
15
|
-
export declare function Pill({ colorToken, textColorToken, customColor, weight, uppercase, hideBorder, size, hideAt, className, children, ...otherProps }: PillProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function Pill({ colorToken, textColorToken, customColor, weight, uppercase, hideBorder, size, iconKey, iconSize, iconColorToken, iconNoPadding, hideAt, className, children, ...otherProps }: PillProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/atoms/Pill/Pill.js
CHANGED
|
@@ -1,67 +1,83 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Text as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"pill-
|
|
9
|
-
"pill-
|
|
10
|
-
"pill-
|
|
11
|
-
"pill-color-
|
|
12
|
-
"pill-color-
|
|
13
|
-
"pill-color-
|
|
14
|
-
"pill-color-
|
|
15
|
-
"pill-color-
|
|
16
|
-
"pill-
|
|
17
|
-
"pill-border-
|
|
18
|
-
"pill-border-
|
|
19
|
-
"pill-border-
|
|
20
|
-
"pill-border-
|
|
21
|
-
"pill-border-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsxs as g, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { Text as x } from "../Text/Text.js";
|
|
3
|
+
import { Icon as w } from "../Icon/Icon.js";
|
|
4
|
+
import { c as _ } from "../../clsx-OuTLNxxd.js";
|
|
5
|
+
import { getHideAtStyles as f } from "../HideAt.js";
|
|
6
|
+
import '../../assets/Pill.css';const y = "_pill_h5ujm_1", B = "_noBorder_h5ujm_139", $ = "_uppercase_h5ujm_147", l = {
|
|
7
|
+
pill: y,
|
|
8
|
+
"pill-xs": "_pill-xs_h5ujm_19",
|
|
9
|
+
"pill-sm": "_pill-sm_h5ujm_27",
|
|
10
|
+
"pill-md": "_pill-md_h5ujm_35",
|
|
11
|
+
"pill-color-neutral": "_pill-color-neutral_h5ujm_43",
|
|
12
|
+
"pill-color-secondary": "_pill-color-secondary_h5ujm_51",
|
|
13
|
+
"pill-color-caution-tips": "_pill-color-caution-tips_h5ujm_59",
|
|
14
|
+
"pill-color-warning": "_pill-color-warning_h5ujm_67",
|
|
15
|
+
"pill-color-success": "_pill-color-success_h5ujm_75",
|
|
16
|
+
"pill-color-error-warning": "_pill-color-error-warning_h5ujm_83",
|
|
17
|
+
"pill-border-neutral": "_pill-border-neutral_h5ujm_91",
|
|
18
|
+
"pill-border-secondary": "_pill-border-secondary_h5ujm_99",
|
|
19
|
+
"pill-border-caution-tips": "_pill-border-caution-tips_h5ujm_107",
|
|
20
|
+
"pill-border-warning": "_pill-border-warning_h5ujm_115",
|
|
21
|
+
"pill-border-success": "_pill-border-success_h5ujm_123",
|
|
22
|
+
"pill-border-error-warning": "_pill-border-error-warning_h5ujm_131",
|
|
23
|
+
noBorder: B,
|
|
24
|
+
uppercase: $
|
|
24
25
|
};
|
|
25
|
-
function
|
|
26
|
+
function I({
|
|
26
27
|
colorToken: r = "success",
|
|
27
|
-
textColorToken:
|
|
28
|
-
customColor:
|
|
28
|
+
textColorToken: n,
|
|
29
|
+
customColor: i,
|
|
29
30
|
weight: c = "medium",
|
|
30
|
-
uppercase:
|
|
31
|
-
hideBorder:
|
|
32
|
-
size:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
uppercase: a = !1,
|
|
32
|
+
hideBorder: s = !1,
|
|
33
|
+
size: o = "xs",
|
|
34
|
+
iconKey: e,
|
|
35
|
+
iconSize: u = "3xs",
|
|
36
|
+
iconColorToken: m,
|
|
37
|
+
iconNoPadding: d = !1,
|
|
38
|
+
hideAt: t,
|
|
39
|
+
className: j,
|
|
40
|
+
children: h,
|
|
41
|
+
...b
|
|
37
42
|
}) {
|
|
38
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ g(
|
|
39
44
|
"span",
|
|
40
45
|
{
|
|
41
|
-
className:
|
|
46
|
+
className: _(
|
|
42
47
|
l.pill,
|
|
43
48
|
l[`pill-color-${r}`],
|
|
44
|
-
l[`pill-${
|
|
45
|
-
!
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
l[`pill-${o}`],
|
|
50
|
+
!s && l[`pill-border-${r}`],
|
|
51
|
+
s && l.noBorder,
|
|
52
|
+
f(t),
|
|
53
|
+
j
|
|
49
54
|
),
|
|
50
|
-
style:
|
|
51
|
-
...
|
|
52
|
-
children:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
style: i ? { background: i } : void 0,
|
|
56
|
+
...b,
|
|
57
|
+
children: [
|
|
58
|
+
e && /* @__PURE__ */ p(
|
|
59
|
+
w,
|
|
60
|
+
{
|
|
61
|
+
iconKey: e,
|
|
62
|
+
size: u,
|
|
63
|
+
colorToken: m,
|
|
64
|
+
noPadding: d
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ p(
|
|
68
|
+
x,
|
|
69
|
+
{
|
|
70
|
+
size: o === "xs" ? "xxs" : o === "sm" ? "xs" : "sm",
|
|
71
|
+
weight: c,
|
|
72
|
+
colorToken: n ?? (r === "neutral" ? "primary" : r === "secondary" ? "secondary" : r === "success" ? "success" : r === "error-warning" ? "error-warning" : "warning"),
|
|
73
|
+
className: _(a && l.uppercase),
|
|
74
|
+
children: h
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
]
|
|
62
78
|
}
|
|
63
79
|
);
|
|
64
80
|
}
|
|
65
81
|
export {
|
|
66
|
-
|
|
82
|
+
I as Pill
|
|
67
83
|
};
|
package/dist/main-client.js
CHANGED
|
@@ -49,7 +49,7 @@ import { AnimatedCheckMark as jo } from "./molecules/StatefulButton/AnimatedChec
|
|
|
49
49
|
import { AddToCart as Jo } from "./molecules/AddToCart/AddToCart.js";
|
|
50
50
|
import { Modal as Uo } from "./molecules/Modal/Modal.js";
|
|
51
51
|
import { ImageViewer as Yo } from "./molecules/ImageViewer/ImageViewer.js";
|
|
52
|
-
import { T as $o } from "./Table-
|
|
52
|
+
import { T as $o } from "./Table-_UT9976g.js";
|
|
53
53
|
import { Error as rr } from "./molecules/Error/Error.js";
|
|
54
54
|
import { MainNav as er } from "./organisms/MainNav/MainNav.js";
|
|
55
55
|
import { ChipSelector as pr } from "./organisms/ChipSelector/ChipSelector.js";
|
|
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
|
2
2
|
import l from "react";
|
|
3
3
|
import { Icon as g } from "../../atoms/Icon/Icon.js";
|
|
4
4
|
import { Text as p } from "../../atoms/Text/Text.js";
|
|
5
|
-
import { s as m } from "../../Cart.module-
|
|
5
|
+
import { s as m } from "../../Cart.module-ccFxL4YZ.js";
|
|
6
6
|
const S = l.forwardRef(function({
|
|
7
7
|
cart: i,
|
|
8
8
|
open: t = !1,
|
|
@@ -15,6 +15,7 @@ export interface CartPartProps extends Omit<React.LiHTMLAttributes<HTMLLIElement
|
|
|
15
15
|
availabilityId?: AvailabilityId;
|
|
16
16
|
availability?: string;
|
|
17
17
|
inventory?: Inventory;
|
|
18
|
+
source?: "none" | "cart" | "quote";
|
|
18
19
|
priceLabel?: string;
|
|
19
20
|
price?: string;
|
|
20
21
|
quantity?: number;
|
|
@@ -24,4 +25,4 @@ export interface CartPartProps extends Omit<React.LiHTMLAttributes<HTMLLIElement
|
|
|
24
25
|
onUnitEditClick?: () => void;
|
|
25
26
|
requiresUnitDetails?: boolean;
|
|
26
27
|
}
|
|
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;
|
|
28
|
+
export declare function CartPart({ imageUrl, imageAlt, title, titleHref, onTitleNavigate, partNumber, unit, make, model, serial, custom, availabilityId, availability, inventory, source, priceLabel, price, quantity, maxQuantity, onQuantityChange, onRemove, onUnitEditClick, requiresUnitDetails, className, ...otherProps }: CartPartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,114 +1,128 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Link as q } from "../../atoms/Link/Link.js";
|
|
3
3
|
import { Text as m } from "../../atoms/Text/Text.js";
|
|
4
4
|
import { Image as v } from "../../atoms/Image/Image.js";
|
|
5
|
-
import { Availability as
|
|
6
|
-
import { Pricing as
|
|
7
|
-
import { QuantityInput as
|
|
8
|
-
import { Icon as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
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 { Pill as F } from "../../atoms/Pill/Pill.js";
|
|
10
|
+
import { Tooltip as _ } from "../../atoms/Tooltip/Tooltip.js";
|
|
11
|
+
import { c as E } from "../../clsx-OuTLNxxd.js";
|
|
12
|
+
import { s as i } from "../../Cart.module-ccFxL4YZ.js";
|
|
13
|
+
function ee({
|
|
14
|
+
imageUrl: k,
|
|
14
15
|
imageAlt: I = "Product image",
|
|
15
|
-
title:
|
|
16
|
-
titleHref:
|
|
17
|
-
onTitleNavigate:
|
|
18
|
-
partNumber:
|
|
19
|
-
unit:
|
|
20
|
-
make:
|
|
16
|
+
title: d,
|
|
17
|
+
titleHref: f,
|
|
18
|
+
onTitleNavigate: l,
|
|
19
|
+
partNumber: p,
|
|
20
|
+
unit: z,
|
|
21
|
+
make: K,
|
|
21
22
|
model: N,
|
|
22
|
-
serial:
|
|
23
|
+
serial: P,
|
|
23
24
|
custom: x,
|
|
24
|
-
availabilityId:
|
|
25
|
+
availabilityId: C,
|
|
25
26
|
availability: u,
|
|
26
27
|
inventory: S,
|
|
27
|
-
|
|
28
|
+
source: t = "none",
|
|
29
|
+
priceLabel: T = "List Price",
|
|
28
30
|
price: h,
|
|
29
|
-
quantity:
|
|
30
|
-
maxQuantity:
|
|
31
|
-
onQuantityChange:
|
|
31
|
+
quantity: b,
|
|
32
|
+
maxQuantity: o,
|
|
33
|
+
onQuantityChange: g,
|
|
32
34
|
onRemove: y,
|
|
33
|
-
onUnitEditClick:
|
|
34
|
-
requiresUnitDetails:
|
|
35
|
-
className:
|
|
36
|
-
...
|
|
35
|
+
onUnitEditClick: n,
|
|
36
|
+
requiresUnitDetails: M = !1,
|
|
37
|
+
className: j,
|
|
38
|
+
...w
|
|
37
39
|
}) {
|
|
38
|
-
function L(
|
|
39
|
-
|
|
40
|
+
function L(a) {
|
|
41
|
+
a.defaultPrevented || a.button === 0 && (a.metaKey || a.altKey || a.ctrlKey || a.shiftKey || a.currentTarget.target && a.currentTarget.target !== "_self" || l == null || l(a));
|
|
40
42
|
}
|
|
41
|
-
const s =
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */ e(v, { height: 50, width: 50, src:
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */ e(m, { size: "sm", weight: "semibold", children:
|
|
48
|
-
|
|
43
|
+
const s = z || [K, N, P].filter(Boolean).join(" / "), R = typeof o == "number" && Number.isFinite(o) ? o : void 0;
|
|
44
|
+
return /* @__PURE__ */ r("li", { className: E(i.cartItem, j), ...w, children: [
|
|
45
|
+
/* @__PURE__ */ e(v, { height: 50, width: 50, src: k || "", alt: I, className: i.itemImage }),
|
|
46
|
+
/* @__PURE__ */ r("div", { className: i.itemContainer, children: [
|
|
47
|
+
/* @__PURE__ */ r("div", { className: i.topRow, children: [
|
|
48
|
+
/* @__PURE__ */ r("div", { className: i.itemInfo, children: [
|
|
49
|
+
/* @__PURE__ */ e(m, { size: "sm", weight: "semibold", children: f ? /* @__PURE__ */ e(q, { href: f, onClick: L, children: d }) : d }),
|
|
50
|
+
p != null && /* @__PURE__ */ r(m, { size: "sm", children: [
|
|
49
51
|
/* @__PURE__ */ e(m, { colorToken: "quaternary", size: "xs", children: x ? "Specs " : "Part # " }),
|
|
50
|
-
|
|
52
|
+
p
|
|
51
53
|
] }),
|
|
52
|
-
s &&
|
|
53
|
-
|
|
54
|
+
s && n && (M ? /* @__PURE__ */ e(
|
|
55
|
+
_,
|
|
54
56
|
{
|
|
55
|
-
trigger: /* @__PURE__ */
|
|
57
|
+
trigger: /* @__PURE__ */ r(
|
|
56
58
|
"button",
|
|
57
59
|
{
|
|
58
|
-
onClick:
|
|
60
|
+
onClick: n,
|
|
59
61
|
className: i.editUnit,
|
|
60
62
|
"aria-label": "Edit make, model, and serial",
|
|
61
63
|
type: "button",
|
|
62
64
|
children: [
|
|
63
|
-
/* @__PURE__ */ e(
|
|
65
|
+
/* @__PURE__ */ e(c, { iconKey: "fa-light fa-file-pen", size: "sm" }),
|
|
64
66
|
s
|
|
65
67
|
]
|
|
66
68
|
}
|
|
67
69
|
),
|
|
68
70
|
children: "Requires Make, Model, and Serial"
|
|
69
71
|
}
|
|
70
|
-
) : /* @__PURE__ */
|
|
72
|
+
) : /* @__PURE__ */ r(
|
|
71
73
|
"button",
|
|
72
74
|
{
|
|
73
|
-
onClick:
|
|
75
|
+
onClick: n,
|
|
74
76
|
className: i.editUnit,
|
|
75
77
|
"aria-label": "Edit make, model, and serial",
|
|
76
78
|
type: "button",
|
|
77
79
|
children: [
|
|
78
|
-
/* @__PURE__ */ e(
|
|
80
|
+
/* @__PURE__ */ e(c, { iconKey: "fa-light fa-file-pen", size: "sm" }),
|
|
79
81
|
s
|
|
80
82
|
]
|
|
81
83
|
}
|
|
82
84
|
))
|
|
83
85
|
] }),
|
|
84
|
-
y && /* @__PURE__ */ e("button", { onClick: y, className: i.removeItem, "aria-label": "Remove item", type: "button", children: /* @__PURE__ */ e(
|
|
86
|
+
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" }) })
|
|
85
87
|
] }),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
/* @__PURE__ */ r("div", { className: i.itemManagement, children: [
|
|
89
|
+
/* @__PURE__ */ r("div", { className: i.availabilitySlot, children: [
|
|
90
|
+
u && /* @__PURE__ */ e(
|
|
91
|
+
A,
|
|
90
92
|
{
|
|
91
|
-
availId:
|
|
93
|
+
availId: C || "not-found",
|
|
92
94
|
availDescription: u,
|
|
93
95
|
enableTooltip: !0,
|
|
94
96
|
inventory: S
|
|
95
97
|
}
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
+
),
|
|
99
|
+
t !== "none" && /* @__PURE__ */ e(
|
|
100
|
+
F,
|
|
101
|
+
{
|
|
102
|
+
colorToken: t === "cart" ? "neutral" : "success",
|
|
103
|
+
uppercase: !0,
|
|
104
|
+
iconColorToken: t === "cart" ? "default" : "success",
|
|
105
|
+
iconKey: t === "cart" ? "fa-light fa-cart-shopping" : "fa-light fa-file-lines",
|
|
106
|
+
children: t === "cart" ? "Cart" : "Quote"
|
|
107
|
+
}
|
|
108
|
+
)
|
|
98
109
|
] }),
|
|
99
|
-
|
|
100
|
-
B,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
/* @__PURE__ */ r("div", { className: i.purchaseInformation, children: [
|
|
111
|
+
/* @__PURE__ */ e("div", { className: i.priceSlot, children: h && /* @__PURE__ */ e(B, { pricingLabel: T, price: h }) }),
|
|
112
|
+
typeof b == "number" && g && /* @__PURE__ */ e(
|
|
113
|
+
D,
|
|
114
|
+
{
|
|
115
|
+
quantity: b,
|
|
116
|
+
onQuantityChange: g,
|
|
117
|
+
max: R,
|
|
118
|
+
size: "sm"
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] })
|
|
108
122
|
] })
|
|
109
123
|
] })
|
|
110
124
|
] });
|
|
111
125
|
}
|
|
112
126
|
export {
|
|
113
|
-
|
|
127
|
+
ee as CartPart
|
|
114
128
|
};
|
|
@@ -37,4 +37,6 @@ type Story = StoryObj<typeof meta>;
|
|
|
37
37
|
export declare const Basic: Story;
|
|
38
38
|
export declare const CustomSpecs: Story;
|
|
39
39
|
export declare const WithoutAvailability: Story;
|
|
40
|
+
export declare const CartSource: Story;
|
|
41
|
+
export declare const QuoteSource: Story;
|
|
40
42
|
export declare const MaxQuantityCapped: Story;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { CartPart as t } from "./CartPart.js";
|
|
3
3
|
const a = {
|
|
4
4
|
MPK: { Unreserved: 5, Available: 5 },
|
|
@@ -39,7 +39,7 @@ const a = {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}, d = {
|
|
42
|
-
render: (
|
|
42
|
+
render: (i) => /* @__PURE__ */ e("div", { style: { width: 360 }, children: /* @__PURE__ */ e("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ e(t, { ...i }) }) })
|
|
43
43
|
}, s = {
|
|
44
44
|
args: {
|
|
45
45
|
title: "Custom-Molded Snap-In Magnetic Gasket",
|
|
@@ -50,7 +50,7 @@ const a = {
|
|
|
50
50
|
inventory: {},
|
|
51
51
|
price: "$129.99"
|
|
52
52
|
},
|
|
53
|
-
render: (
|
|
53
|
+
render: (i) => /* @__PURE__ */ e("div", { style: { width: 360 }, children: /* @__PURE__ */ e("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ e(t, { ...i }) }) })
|
|
54
54
|
}, o = {
|
|
55
55
|
args: {
|
|
56
56
|
availabilityId: void 0,
|
|
@@ -58,8 +58,18 @@ const a = {
|
|
|
58
58
|
inventory: {},
|
|
59
59
|
price: "$99.99"
|
|
60
60
|
},
|
|
61
|
-
render: (
|
|
61
|
+
render: (i) => /* @__PURE__ */ e("div", { style: { width: 360 }, children: /* @__PURE__ */ e("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ e(t, { ...i }) }) })
|
|
62
62
|
}, c = {
|
|
63
|
+
args: {
|
|
64
|
+
source: "cart"
|
|
65
|
+
},
|
|
66
|
+
render: (i) => /* @__PURE__ */ e("div", { style: { width: 360 }, children: /* @__PURE__ */ e("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ e(t, { ...i }) }) })
|
|
67
|
+
}, v = {
|
|
68
|
+
args: {
|
|
69
|
+
source: "quote"
|
|
70
|
+
},
|
|
71
|
+
render: (i) => /* @__PURE__ */ e("div", { style: { width: 360 }, children: /* @__PURE__ */ e("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ e(t, { ...i }) }) })
|
|
72
|
+
}, u = {
|
|
63
73
|
args: {
|
|
64
74
|
availabilityId: "limited",
|
|
65
75
|
availability: "Discontinued - limited stock",
|
|
@@ -71,12 +81,14 @@ const a = {
|
|
|
71
81
|
quantity: 2,
|
|
72
82
|
maxQuantity: 2
|
|
73
83
|
},
|
|
74
|
-
render: (
|
|
84
|
+
render: (i) => /* @__PURE__ */ e("div", { style: { width: 360 }, children: /* @__PURE__ */ e("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ e(t, { ...i }) }) })
|
|
75
85
|
};
|
|
76
86
|
export {
|
|
77
87
|
d as Basic,
|
|
88
|
+
c as CartSource,
|
|
78
89
|
s as CustomSpecs,
|
|
79
|
-
|
|
90
|
+
u as MaxQuantityCapped,
|
|
91
|
+
v as QuoteSource,
|
|
80
92
|
o as WithoutAvailability,
|
|
81
93
|
n as default
|
|
82
94
|
};
|
|
@@ -4,12 +4,12 @@ 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
6
|
import { CartPart as x } from "./CartPart.js";
|
|
7
|
-
import { s as t } from "../../Cart.module-
|
|
7
|
+
import { s as t } from "../../Cart.module-ccFxL4YZ.js";
|
|
8
8
|
function S({
|
|
9
9
|
open: p,
|
|
10
|
-
onClose:
|
|
10
|
+
onClose: n,
|
|
11
11
|
cart: a,
|
|
12
|
-
subtotal:
|
|
12
|
+
subtotal: s,
|
|
13
13
|
itemPriceLabel: y,
|
|
14
14
|
onItemQtyChange: f,
|
|
15
15
|
onItemDelete: g,
|
|
@@ -24,7 +24,7 @@ function S({
|
|
|
24
24
|
{
|
|
25
25
|
side: "right",
|
|
26
26
|
open: p,
|
|
27
|
-
onClose:
|
|
27
|
+
onClose: n,
|
|
28
28
|
ariaLabel: "Shopping Cart",
|
|
29
29
|
children: /* @__PURE__ */ r("div", { id: "cart-panel", className: t.cartContainer, children: [
|
|
30
30
|
/* @__PURE__ */ r("div", { className: t.headerWrapper, children: [
|
|
@@ -35,7 +35,7 @@ function S({
|
|
|
35
35
|
" items in your cart"
|
|
36
36
|
] })
|
|
37
37
|
] }),
|
|
38
|
-
/* @__PURE__ */ i("button", { onClick:
|
|
38
|
+
/* @__PURE__ */ i("button", { onClick: n, children: /* @__PURE__ */ i(u, { iconKey: "fa-regular fa-xmark", size: "md" }) })
|
|
39
39
|
] }),
|
|
40
40
|
/* @__PURE__ */ r(
|
|
41
41
|
h,
|
|
@@ -47,7 +47,7 @@ function S({
|
|
|
47
47
|
className: t.checkoutButton,
|
|
48
48
|
children: [
|
|
49
49
|
"Proceed to Checkout",
|
|
50
|
-
/* @__PURE__ */ i(u, { iconKey: "fa-regular fa-arrow-right-long", size: "sm" })
|
|
50
|
+
/* @__PURE__ */ i(u, { iconKey: "fa-regular fa-arrow-right-long", size: "sm", noPadding: !0 })
|
|
51
51
|
]
|
|
52
52
|
}
|
|
53
53
|
),
|
|
@@ -78,9 +78,9 @@ function S({
|
|
|
78
78
|
},
|
|
79
79
|
`${e.id}-${e.make ?? ""}-${e.model ?? ""}-${e.serial ?? ""}`
|
|
80
80
|
)) }) : /* @__PURE__ */ i("div", { className: t.noItems, children: /* @__PURE__ */ i(l, { as: "p", size: "sm", children: "No items in your cart yet" }) }) }),
|
|
81
|
-
|
|
81
|
+
s && /* @__PURE__ */ r("div", { className: t.subtotal, children: [
|
|
82
82
|
/* @__PURE__ */ i(l, { size: "md", weight: "semibold", children: "Subtotal" }),
|
|
83
|
-
/* @__PURE__ */ i(l, { size: "md", weight: "semibold", children:
|
|
83
|
+
/* @__PURE__ */ i(l, { size: "md", weight: "semibold", children: s })
|
|
84
84
|
] }),
|
|
85
85
|
/* @__PURE__ */ i(
|
|
86
86
|
h,
|
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../clsx-OuTLNxxd.js";
|
|
4
4
|
import "../../atoms/HideAt.js";
|
|
5
|
-
import { T as e, T } from "../../Table-
|
|
5
|
+
import { T as e, T } from "../../Table-_UT9976g.js";
|
|
6
6
|
import "../../atoms/Icon/Icon.js";
|
|
7
7
|
export {
|
|
8
8
|
e 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-
|
|
3
|
+
import { T as t, s as x } from "../../Table-_UT9976g.js";
|
|
4
4
|
const v = {
|
|
5
5
|
title: "Case Parts/Molecules/Table",
|
|
6
6
|
component: t,
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import './assets/Cart.css';const t = "_cartIconButton_16z8i_2", o = "_count_16z8i_15", e = "_cartContainer_16z8i_30", n = "_headerWrapper_16z8i_41", _ = "_header_16z8i_41", i = "_cartItems_16z8i_59", a = "_cartItem_16z8i_59", c = "_topRow_16z8i_85", r = "_itemInfo_16z8i_92", s = "_editUnit_16z8i_97", m = "_purchaseInformation_16z8i_113", I = "_availabilitySlot_16z8i_119", u = "_priceSlot_16z8i_122", z = "_itemManagement_16z8i_125", l = "_quantitySlot_16z8i_131", p = "_itemImage_16z8i_141", h = "_removeItem_16z8i_144", d = "_noItems_16z8i_154", S = "_subtotal_16z8i_161", y = "_checkoutButton_16z8i_168", b = {
|
|
2
|
-
cartIconButton: t,
|
|
3
|
-
count: o,
|
|
4
|
-
cartContainer: e,
|
|
5
|
-
headerWrapper: n,
|
|
6
|
-
header: _,
|
|
7
|
-
cartItems: i,
|
|
8
|
-
cartItem: a,
|
|
9
|
-
topRow: c,
|
|
10
|
-
itemInfo: r,
|
|
11
|
-
editUnit: s,
|
|
12
|
-
purchaseInformation: m,
|
|
13
|
-
availabilitySlot: I,
|
|
14
|
-
priceSlot: u,
|
|
15
|
-
itemManagement: z,
|
|
16
|
-
quantitySlot: l,
|
|
17
|
-
itemImage: p,
|
|
18
|
-
removeItem: h,
|
|
19
|
-
noItems: d,
|
|
20
|
-
subtotal: S,
|
|
21
|
-
checkoutButton: y
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
b as s
|
|
25
|
-
};
|