hasting-swatchcart-module 1.0.29 → 1.0.31
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/assets/index.css +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/cdn/main.js +68 -61
- package/dist/cdn/src/app/main.d.ts +0 -1
- package/dist/main.cjs +15 -15
- package/dist/main.cjs.map +1 -1
- package/dist/main.js +68 -61
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -826,7 +826,7 @@ Uu({
|
|
|
826
826
|
});
|
|
827
827
|
const Be = Hi.withTypes(), se = zu.withTypes(), hr = (e) => e.swatches.allMaterialsValues, An = (e) => e.swatches.materialSelectState, Zh = (e) => e.swatches.productElementOptions, Kt = (e) => e.swatches.selectedMaterials, sl = (e) => e.swatches.isLoadingSelectedProduct, Jh = (e) => e.swatches.isOpenMultiProductCart, sa = (e) => e.swatches.selectedProduct, ul = 6.5, ll = ({
|
|
828
828
|
materials: e,
|
|
829
|
-
containerStyles: t = "flex flex-col gap-[8px] text-
|
|
829
|
+
containerStyles: t = "flex flex-col gap-[8px] text-xs/snug p-[var(--sm-padding)] border-t border-solid border-[var(--border)] sm:gap-[12px] shadow-[0_-2px_10px_rgba(40,40,40,0.10)]"
|
|
830
830
|
}) => {
|
|
831
831
|
const n = "flex flex-row justify-between items-center", r = We(() => e.reduce((a, i) => a + (i.count ?? 0), 0) * ul, [e]);
|
|
832
832
|
return /* @__PURE__ */ M("div", { className: t, children: [
|
|
@@ -5357,8 +5357,8 @@ const Ji = ({ item: e }) => {
|
|
|
5357
5357
|
/* @__PURE__ */ p("div", { children: /* @__PURE__ */ p(Fp, { val: e }) }),
|
|
5358
5358
|
/* @__PURE__ */ M("div", { className: "flex flex-col justify-between", children: [
|
|
5359
5359
|
/* @__PURE__ */ M("div", { className: "flex flex-col", children: [
|
|
5360
|
-
/* @__PURE__ */ p("span", { className: "mb-[4px] font-semibold text-
|
|
5361
|
-
/* @__PURE__ */ p("span", { className: "mb-[4px] font-bold text-[
|
|
5360
|
+
/* @__PURE__ */ p("span", { className: "mb-[4px] font-semibold text-xs", children: e.metadata?.label }),
|
|
5361
|
+
/* @__PURE__ */ p("span", { className: "mb-[4px] font-bold text-[1rem]", children: e.parentName })
|
|
5362
5362
|
] }),
|
|
5363
5363
|
/* @__PURE__ */ p(
|
|
5364
5364
|
Yp,
|
|
@@ -5371,7 +5371,7 @@ const Ji = ({ item: e }) => {
|
|
|
5371
5371
|
}
|
|
5372
5372
|
)
|
|
5373
5373
|
] }),
|
|
5374
|
-
/* @__PURE__ */ M("div", { className: " absolute text-
|
|
5374
|
+
/* @__PURE__ */ M("div", { className: " absolute text-xs top-0 right-0 font-bold", children: [
|
|
5375
5375
|
"$",
|
|
5376
5376
|
e.count * ul
|
|
5377
5377
|
] })
|
|
@@ -5417,7 +5417,7 @@ const Ji = ({ item: e }) => {
|
|
|
5417
5417
|
/* @__PURE__ */ p("h2", { className: "m-0! text-base leading-[1.6] font-medium ", children: "Your cart" })
|
|
5418
5418
|
] }),
|
|
5419
5419
|
e >= De ? /* @__PURE__ */ M($e, { children: [
|
|
5420
|
-
/* @__PURE__ */ M("span", { className: "text-[var(--main-accent-color)] hidden text-
|
|
5420
|
+
/* @__PURE__ */ M("span", { className: "text-[var(--main-accent-color)] hidden text-xs sm:block", children: [
|
|
5421
5421
|
"(",
|
|
5422
5422
|
De,
|
|
5423
5423
|
") You reached maximum amount of swatches"
|
|
@@ -5495,7 +5495,7 @@ const Ji = ({ item: e }) => {
|
|
|
5495
5495
|
ll,
|
|
5496
5496
|
{
|
|
5497
5497
|
materials: a,
|
|
5498
|
-
containerStyles: "flex flex-col gap-[8px] text-
|
|
5498
|
+
containerStyles: "flex flex-col gap-[8px] text-xs/snug p-[var(--sm-padding)] border-t border-solid border-[var(--border)] sm:gap-[12px] sm:border-none s"
|
|
5499
5499
|
}
|
|
5500
5500
|
) }),
|
|
5501
5501
|
/* @__PURE__ */ p("div", { className: "p-[var(--sm-padding)] border-t border-solid border-[var(--border)] shrink-0 sm:w-[50%] sm:border-none sm:flex flex-row sm:justify-end sm:items-end sm:h-full", children: /* @__PURE__ */ p("div", { className: "sm:w-[50%]", children: /* @__PURE__ */ p(
|
|
@@ -22022,14 +22022,14 @@ const wu = {}, gf = ({
|
|
|
22022
22022
|
"aria-haspopup": "listbox",
|
|
22023
22023
|
"aria-expanded": m,
|
|
22024
22024
|
className: Le(
|
|
22025
|
-
"inline-flex flex-row items-center justify-between gap-[8px] rounded-full bg-[var(--label-bg, #f5f5f5)] px-
|
|
22025
|
+
"inline-flex flex-row items-center justify-between gap-[8px] rounded-full bg-[var(--label-bg, #f5f5f5)] px-[8px] py-[8px] text-xs font-medium h-[36px] text-blackborder border-transparent hover:bg-gray-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--main-accent-color)]sm:w-[102px]",
|
|
22026
22026
|
i
|
|
22027
22027
|
),
|
|
22028
22028
|
children: [
|
|
22029
22029
|
/* @__PURE__ */ p(
|
|
22030
22030
|
"span",
|
|
22031
22031
|
{
|
|
22032
|
-
className: Le(!g && "text-
|
|
22032
|
+
className: Le(!g && "text-xs text-gray-700 ms:text-sm"),
|
|
22033
22033
|
children: g?.label ?? r
|
|
22034
22034
|
}
|
|
22035
22035
|
),
|
|
@@ -22269,7 +22269,7 @@ const Ef = ({
|
|
|
22269
22269
|
]
|
|
22270
22270
|
}
|
|
22271
22271
|
) }),
|
|
22272
|
-
document.
|
|
22272
|
+
document.querySelector("#root-container")
|
|
22273
22273
|
);
|
|
22274
22274
|
}, Tf = ({
|
|
22275
22275
|
val: e,
|
|
@@ -22444,8 +22444,8 @@ const Ef = ({
|
|
|
22444
22444
|
}
|
|
22445
22445
|
) }),
|
|
22446
22446
|
/* @__PURE__ */ M("header", { className: "flex flex-col border-b border-[var(--border)] lg:flex-row lg:justify-between", children: [
|
|
22447
|
-
/* @__PURE__ */ p("h1", { className: "m-0! p-[var(--sm-padding)] text-
|
|
22448
|
-
/* @__PURE__ */ p("div", { className: "flex flex-row justify-center items-center border-t border-[var(--border)] p-[var(--sm-padding)] text-
|
|
22447
|
+
/* @__PURE__ */ p("h1", { className: "m-0! p-[var(--sm-padding)] text-base font-medium", children: "Swatches store" }),
|
|
22448
|
+
/* @__PURE__ */ p("div", { className: "flex flex-row justify-center items-center border-t border-[var(--border)] p-[var(--sm-padding)] text-xs font-medium leading-[24px] lg:border-none", children: /* @__PURE__ */ M("span", { children: [
|
|
22449
22449
|
"Choose 5 free swatches to curate your perfect design. Plus get",
|
|
22450
22450
|
" ",
|
|
22451
22451
|
/* @__PURE__ */ p("span", { className: "text-[var(--main-accent-color)] underline", children: "free design advice" }),
|
|
@@ -22492,7 +22492,7 @@ const Ef = ({
|
|
|
22492
22492
|
values: SC,
|
|
22493
22493
|
value: f,
|
|
22494
22494
|
onValueChange: m,
|
|
22495
|
-
className: "shrink-0 w-[90px] xxs:w-[100px] bg-[var(--label-bg)] sm:py-
|
|
22495
|
+
className: "shrink-0 w-[90px] xxs:w-[100px] bg-[var(--label-bg)] sm:py-8px sm:px-16px sm:w-[102px]",
|
|
22496
22496
|
dropdownWidth: "w-64"
|
|
22497
22497
|
}
|
|
22498
22498
|
)
|
|
@@ -22835,7 +22835,7 @@ const xr = _.forwardRef(
|
|
|
22835
22835
|
flex-none flex flex-row justify-center items-center
|
|
22836
22836
|
w-[20px] h-5 rounded-full
|
|
22837
22837
|
bg-[var(--main-accent-color)] text-white
|
|
22838
|
-
text-[
|
|
22838
|
+
text-[1rem] leading-none
|
|
22839
22839
|
select-none pointer-events-none
|
|
22840
22840
|
overflow-hidden
|
|
22841
22841
|
`,
|
|
@@ -22854,7 +22854,7 @@ const xr = _.forwardRef(
|
|
|
22854
22854
|
a
|
|
22855
22855
|
),
|
|
22856
22856
|
children: [
|
|
22857
|
-
/* @__PURE__ */ p("div", { className: "w-full text-
|
|
22857
|
+
/* @__PURE__ */ p("div", { className: "w-full text-xs truncate text-left leading-[20px] sm:text-sm", children: A }),
|
|
22858
22858
|
/* @__PURE__ */ p(
|
|
22859
22859
|
jl,
|
|
22860
22860
|
{
|
|
@@ -23112,7 +23112,7 @@ const wf = ({
|
|
|
23112
23112
|
dropdownWidth: "w-80"
|
|
23113
23113
|
}
|
|
23114
23114
|
);
|
|
23115
|
-
}, kf = () => /* @__PURE__ */ M("div", { className: "flex flex-row items-center gap-[16px] p-[var(--sm-padding)]
|
|
23115
|
+
}, kf = () => /* @__PURE__ */ M("div", { className: "flex flex-row items-center gap-[16px] p-[var(--sm-padding)]", children: [
|
|
23116
23116
|
/* @__PURE__ */ p(LC, {}),
|
|
23117
23117
|
/* @__PURE__ */ p(PC, {}),
|
|
23118
23118
|
/* @__PURE__ */ p(DC, {})
|
|
@@ -23126,7 +23126,7 @@ const wf = ({
|
|
|
23126
23126
|
/* @__PURE__ */ p(
|
|
23127
23127
|
wf,
|
|
23128
23128
|
{
|
|
23129
|
-
containerStyles: `flex flex-row justify-between items-center gap-[8px] p-[var(--sm-padding)] w-full text-
|
|
23129
|
+
containerStyles: `flex flex-row justify-between items-center gap-[8px] p-[var(--sm-padding)] w-full text-xs
|
|
23130
23130
|
border-b border-[var(--border)]
|
|
23131
23131
|
sm:max-w-[360px] sm:text-sm sm:border-none
|
|
23132
23132
|
`,
|
|
@@ -23741,11 +23741,11 @@ const GC = (e) => /* @__PURE__ */ p(
|
|
|
23741
23741
|
e.assetId
|
|
23742
23742
|
),
|
|
23743
23743
|
/* @__PURE__ */ M("div", { className: "mb-[12px] flex flex-col", children: [
|
|
23744
|
-
/* @__PURE__ */ M("span", { className: "mb-[4px] text-
|
|
23744
|
+
/* @__PURE__ */ M("span", { className: "mb-[4px] text-sm font-semibold leading-[16px]", children: [
|
|
23745
23745
|
e.metadata?.label || e.label,
|
|
23746
23746
|
" "
|
|
23747
23747
|
] }),
|
|
23748
|
-
/* @__PURE__ */ M("span", { className: "text-
|
|
23748
|
+
/* @__PURE__ */ M("span", { className: "text-xs font-medium leading-[14px]", children: [
|
|
23749
23749
|
e.parentName,
|
|
23750
23750
|
" "
|
|
23751
23751
|
] })
|
|
@@ -23803,7 +23803,7 @@ const GC = (e) => /* @__PURE__ */ p(
|
|
|
23803
23803
|
]
|
|
23804
23804
|
}
|
|
23805
23805
|
) }),
|
|
23806
|
-
document.
|
|
23806
|
+
document.querySelector("#root-container")
|
|
23807
23807
|
) : null;
|
|
23808
23808
|
}, Lf = ({
|
|
23809
23809
|
isOpen: e,
|
|
@@ -23997,7 +23997,7 @@ const GC = (e) => /* @__PURE__ */ p(
|
|
|
23997
23997
|
)
|
|
23998
23998
|
}
|
|
23999
23999
|
),
|
|
24000
|
-
document.
|
|
24000
|
+
document.querySelector("#root-container")
|
|
24001
24001
|
) : null;
|
|
24002
24002
|
};
|
|
24003
24003
|
class rA {
|
|
@@ -24132,7 +24132,7 @@ const aA = () => /* @__PURE__ */ p(
|
|
|
24132
24132
|
selectStyles: "min-w-[auto] max-w-[154px] sm:max-w-[auto] sm:min-w-[250px]"
|
|
24133
24133
|
}
|
|
24134
24134
|
),
|
|
24135
|
-
/* @__PURE__ */ p(kf, {}),
|
|
24135
|
+
/* @__PURE__ */ p("div", { className: "w-full border-b border-b-border", children: /* @__PURE__ */ p(kf, {}) }),
|
|
24136
24136
|
/* @__PURE__ */ p(sA, {}),
|
|
24137
24137
|
/* @__PURE__ */ p(oA, {}),
|
|
24138
24138
|
/* @__PURE__ */ p("div", { className: "p-[var(--sm-padding)] border-t border-solid border-[var(--border)] shrink-0", children: /* @__PURE__ */ p(
|
|
@@ -24167,7 +24167,7 @@ const aA = () => /* @__PURE__ */ p(
|
|
|
24167
24167
|
/* @__PURE__ */ p("h2", { className: "m-0! text-base leading-[1.6] font-medium ", children: "Your cart" })
|
|
24168
24168
|
] }),
|
|
24169
24169
|
r >= De ? /* @__PURE__ */ M($e, { children: [
|
|
24170
|
-
/* @__PURE__ */ M("span", { className: "text-[var(--main-accent-color)] hidden text-
|
|
24170
|
+
/* @__PURE__ */ M("span", { className: "text-[var(--main-accent-color)] hidden text-xs sm:block", children: [
|
|
24171
24171
|
"(",
|
|
24172
24172
|
De,
|
|
24173
24173
|
") You reached maximum amount of swatches"
|
|
@@ -24201,7 +24201,7 @@ const aA = () => /* @__PURE__ */ p(
|
|
|
24201
24201
|
(e) => e > 0
|
|
24202
24202
|
), hA = () => {
|
|
24203
24203
|
const e = Be(), t = se(Kt) ?? [], n = se(fA), r = (o) => {
|
|
24204
|
-
|
|
24204
|
+
e(Hh({ selectedMaterial: o })), e(
|
|
24205
24205
|
oa({
|
|
24206
24206
|
selectedMaterial: o,
|
|
24207
24207
|
materialCount: 1,
|
|
@@ -24333,44 +24333,51 @@ const yA = ({
|
|
|
24333
24333
|
console.error("Failed to load product", d);
|
|
24334
24334
|
}
|
|
24335
24335
|
})();
|
|
24336
|
-
}, [t, n, r]), /* @__PURE__ */
|
|
24337
|
-
|
|
24338
|
-
|
|
24339
|
-
|
|
24340
|
-
|
|
24341
|
-
|
|
24342
|
-
|
|
24343
|
-
|
|
24344
|
-
|
|
24345
|
-
|
|
24346
|
-
|
|
24347
|
-
|
|
24348
|
-
|
|
24349
|
-
|
|
24350
|
-
|
|
24351
|
-
|
|
24352
|
-
|
|
24353
|
-
|
|
24354
|
-
|
|
24355
|
-
|
|
24356
|
-
|
|
24357
|
-
|
|
24358
|
-
|
|
24359
|
-
|
|
24360
|
-
|
|
24361
|
-
|
|
24362
|
-
|
|
24363
|
-
|
|
24364
|
-
|
|
24365
|
-
|
|
24366
|
-
|
|
24367
|
-
|
|
24368
|
-
|
|
24369
|
-
|
|
24370
|
-
|
|
24371
|
-
|
|
24372
|
-
|
|
24373
|
-
|
|
24336
|
+
}, [t, n, r]), /* @__PURE__ */ p(
|
|
24337
|
+
"div",
|
|
24338
|
+
{
|
|
24339
|
+
id: "root-container",
|
|
24340
|
+
className: "relative flex flex-col h-full min-h-0 w-full",
|
|
24341
|
+
children: /* @__PURE__ */ M(Df, { children: [
|
|
24342
|
+
/* @__PURE__ */ p(
|
|
24343
|
+
Lh,
|
|
24344
|
+
{
|
|
24345
|
+
position: "top-center",
|
|
24346
|
+
autoClose: 5e3,
|
|
24347
|
+
hideProgressBar: !0,
|
|
24348
|
+
newestOnTop: !1,
|
|
24349
|
+
closeOnClick: !1,
|
|
24350
|
+
rtl: !1,
|
|
24351
|
+
pauseOnFocusLoss: !0,
|
|
24352
|
+
draggable: !0,
|
|
24353
|
+
pauseOnHover: !0,
|
|
24354
|
+
theme: "dark",
|
|
24355
|
+
transition: Ju
|
|
24356
|
+
}
|
|
24357
|
+
),
|
|
24358
|
+
e ? /* @__PURE__ */ M($e, { children: [
|
|
24359
|
+
s ? null : /* @__PURE__ */ p(
|
|
24360
|
+
ZC,
|
|
24361
|
+
{
|
|
24362
|
+
onSendData: i,
|
|
24363
|
+
onToggleSidebar: a
|
|
24364
|
+
}
|
|
24365
|
+
),
|
|
24366
|
+
s ? /* @__PURE__ */ p(
|
|
24367
|
+
pA,
|
|
24368
|
+
{
|
|
24369
|
+
isOpen: e,
|
|
24370
|
+
uiDataType: t,
|
|
24371
|
+
data: n,
|
|
24372
|
+
assetId: r,
|
|
24373
|
+
onToggleSidebar: a,
|
|
24374
|
+
onSendData: i
|
|
24375
|
+
}
|
|
24376
|
+
) : null
|
|
24377
|
+
] }) : null
|
|
24378
|
+
] })
|
|
24379
|
+
}
|
|
24380
|
+
);
|
|
24374
24381
|
};
|
|
24375
24382
|
function _A(e) {
|
|
24376
24383
|
const t = (n) => /* @__PURE__ */ p(Df, { children: /* @__PURE__ */ p(e, { ...n }) });
|