@lucynam/fashiongo-ui 0.2.7 → 0.2.8
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/index.css +46 -26
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +10 -8
- package/dist/index.d.ts +10 -8
- package/dist/index.js +52 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +62 -27
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -538,50 +538,82 @@ var PdpCta_default = {
|
|
|
538
538
|
"variant-complete": "PdpCta_variant-complete",
|
|
539
539
|
"variant-outline": "PdpCta_variant-outline",
|
|
540
540
|
"variant-disabled": "PdpCta_variant-disabled",
|
|
541
|
+
"variant-link": "PdpCta_variant-link",
|
|
541
542
|
label: "PdpCta_label",
|
|
542
543
|
"label-white": "PdpCta_label-white",
|
|
543
544
|
"label-disabled": "PdpCta_label-disabled",
|
|
544
|
-
|
|
545
|
+
separator: "PdpCta_separator",
|
|
546
|
+
iconWrap: "PdpCta_iconWrap",
|
|
547
|
+
bulletWrap: "PdpCta_bulletWrap",
|
|
545
548
|
spinner: "PdpCta_spinner",
|
|
546
|
-
|
|
549
|
+
pdpCtaSpin: "PdpCta_pdpCtaSpin"
|
|
547
550
|
};
|
|
548
551
|
|
|
549
552
|
// src/components/PdpCta/PdpCta.tsx
|
|
550
|
-
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
553
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
551
554
|
var PdpCta = React11.forwardRef(
|
|
552
555
|
({
|
|
553
556
|
variant = "default",
|
|
554
557
|
label = "Add to Bag",
|
|
555
558
|
price,
|
|
556
559
|
icon,
|
|
560
|
+
bullet,
|
|
557
561
|
onClick,
|
|
558
562
|
className
|
|
559
563
|
}, ref) => {
|
|
560
|
-
const
|
|
561
|
-
const classes = [
|
|
564
|
+
const rootClass = [
|
|
562
565
|
PdpCta_default.cta,
|
|
563
566
|
PdpCta_default[`variant-${variant}`],
|
|
564
|
-
className
|
|
567
|
+
className
|
|
565
568
|
].filter(Boolean).join(" ");
|
|
566
569
|
if (variant === "loading") {
|
|
567
|
-
return /* @__PURE__ */ jsx11("div", { className:
|
|
570
|
+
return /* @__PURE__ */ jsx11("div", { className: rootClass, role: "status", "aria-label": "Loading", "aria-busy": "true", children: /* @__PURE__ */ jsx11("span", { className: PdpCta_default.spinner, "aria-hidden": "true" }) });
|
|
568
571
|
}
|
|
569
|
-
const
|
|
572
|
+
const isDisabled = variant === "disabled";
|
|
573
|
+
const isWhiteText = variant === "default" || variant === "complete";
|
|
574
|
+
const labelClass = [
|
|
575
|
+
PdpCta_default.label,
|
|
576
|
+
isWhiteText ? PdpCta_default["label-white"] : "",
|
|
577
|
+
isDisabled ? PdpCta_default["label-disabled"] : ""
|
|
578
|
+
].filter(Boolean).join(" ");
|
|
570
579
|
if (variant === "complete") {
|
|
571
|
-
return /* @__PURE__ */ jsxs10("div", { className:
|
|
572
|
-
icon && /* @__PURE__ */ jsx11("span", { className: PdpCta_default.
|
|
573
|
-
/* @__PURE__ */ jsx11("span", { className:
|
|
580
|
+
return /* @__PURE__ */ jsxs10("div", { className: rootClass, children: [
|
|
581
|
+
icon && /* @__PURE__ */ jsx11("span", { className: PdpCta_default.iconWrap, "aria-hidden": "true", children: icon }),
|
|
582
|
+
bullet && /* @__PURE__ */ jsx11("span", { className: PdpCta_default.bulletWrap, "aria-hidden": "true", children: bullet }),
|
|
583
|
+
/* @__PURE__ */ jsx11("span", { className: labelClass, children: label })
|
|
574
584
|
] });
|
|
575
585
|
}
|
|
586
|
+
if (variant === "link") {
|
|
587
|
+
return /* @__PURE__ */ jsxs10(
|
|
588
|
+
"button",
|
|
589
|
+
{
|
|
590
|
+
ref,
|
|
591
|
+
className: rootClass,
|
|
592
|
+
onClick,
|
|
593
|
+
type: "button",
|
|
594
|
+
children: [
|
|
595
|
+
icon && /* @__PURE__ */ jsx11("span", { className: PdpCta_default.iconWrap, "aria-hidden": "true", children: icon }),
|
|
596
|
+
/* @__PURE__ */ jsx11("span", { className: PdpCta_default.label, children: label }),
|
|
597
|
+
price && /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
598
|
+
/* @__PURE__ */ jsx11("span", { className: PdpCta_default.separator, "aria-hidden": "true", children: "\xB7" }),
|
|
599
|
+
/* @__PURE__ */ jsx11("span", { className: PdpCta_default.label, children: price })
|
|
600
|
+
] })
|
|
601
|
+
]
|
|
602
|
+
}
|
|
603
|
+
);
|
|
604
|
+
}
|
|
576
605
|
if (variant === "outline") {
|
|
577
|
-
return /* @__PURE__ */
|
|
606
|
+
return /* @__PURE__ */ jsxs10(
|
|
578
607
|
"button",
|
|
579
608
|
{
|
|
580
609
|
ref,
|
|
581
|
-
className:
|
|
610
|
+
className: rootClass,
|
|
582
611
|
onClick,
|
|
583
612
|
type: "button",
|
|
584
|
-
children:
|
|
613
|
+
children: [
|
|
614
|
+
icon && /* @__PURE__ */ jsx11("span", { className: PdpCta_default.iconWrap, "aria-hidden": "true", children: icon }),
|
|
615
|
+
/* @__PURE__ */ jsx11("span", { className: PdpCta_default.label, children: label })
|
|
616
|
+
]
|
|
585
617
|
}
|
|
586
618
|
);
|
|
587
619
|
}
|
|
@@ -589,14 +621,17 @@ var PdpCta = React11.forwardRef(
|
|
|
589
621
|
"button",
|
|
590
622
|
{
|
|
591
623
|
ref,
|
|
592
|
-
className:
|
|
624
|
+
className: rootClass,
|
|
593
625
|
onClick,
|
|
594
626
|
disabled: isDisabled,
|
|
595
627
|
type: "button",
|
|
596
628
|
children: [
|
|
597
|
-
/* @__PURE__ */ jsx11("span", { className:
|
|
598
|
-
|
|
599
|
-
price && /* @__PURE__ */
|
|
629
|
+
icon && /* @__PURE__ */ jsx11("span", { className: PdpCta_default.iconWrap, "aria-hidden": "true", children: icon }),
|
|
630
|
+
/* @__PURE__ */ jsx11("span", { className: labelClass, children: label }),
|
|
631
|
+
price && /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
632
|
+
/* @__PURE__ */ jsx11("span", { className: [PdpCta_default.separator, isWhiteText ? PdpCta_default["label-white"] : "", isDisabled ? PdpCta_default["label-disabled"] : ""].filter(Boolean).join(" "), "aria-hidden": "true", children: "\xB7" }),
|
|
633
|
+
/* @__PURE__ */ jsx11("span", { className: labelClass, children: price })
|
|
634
|
+
] })
|
|
600
635
|
]
|
|
601
636
|
}
|
|
602
637
|
);
|
|
@@ -1586,7 +1621,7 @@ var MobileCTA_default = {
|
|
|
1586
1621
|
};
|
|
1587
1622
|
|
|
1588
1623
|
// src/components/MobileCTA/MobileCTA.tsx
|
|
1589
|
-
import { Fragment as
|
|
1624
|
+
import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1590
1625
|
var CheckIcon = () => /* @__PURE__ */ jsx23("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(
|
|
1591
1626
|
"path",
|
|
1592
1627
|
{
|
|
@@ -1630,11 +1665,11 @@ var MobileCTA = React22.forwardRef(
|
|
|
1630
1665
|
isLoading && /* @__PURE__ */ jsx23("span", { className: MobileCTA_default.spinner, "aria-hidden": "true" }),
|
|
1631
1666
|
isDone && /* @__PURE__ */ jsx23(CheckIcon, {}),
|
|
1632
1667
|
/* @__PURE__ */ jsx23("span", { className: MobileCTA_default.label, children: defaultLabel }),
|
|
1633
|
-
!isLine && !isLoading && !isDone && price && /* @__PURE__ */ jsxs20(
|
|
1668
|
+
!isLine && !isLoading && !isDone && price && /* @__PURE__ */ jsxs20(Fragment3, { children: [
|
|
1634
1669
|
/* @__PURE__ */ jsx23(BulletSeparator, {}),
|
|
1635
1670
|
/* @__PURE__ */ jsx23("span", { className: MobileCTA_default.price, children: price })
|
|
1636
1671
|
] }),
|
|
1637
|
-
isDone && price && /* @__PURE__ */ jsxs20(
|
|
1672
|
+
isDone && price && /* @__PURE__ */ jsxs20(Fragment3, { children: [
|
|
1638
1673
|
/* @__PURE__ */ jsx23(BulletSeparator, {}),
|
|
1639
1674
|
/* @__PURE__ */ jsx23("span", { className: MobileCTA_default.price, children: price })
|
|
1640
1675
|
] })
|
|
@@ -2480,7 +2515,7 @@ var PromoBadge_default = {
|
|
|
2480
2515
|
};
|
|
2481
2516
|
|
|
2482
2517
|
// src/components/PromoBadge/PromoBadge.tsx
|
|
2483
|
-
import { Fragment as
|
|
2518
|
+
import { Fragment as Fragment4, jsx as jsx42, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
2484
2519
|
var PromoBadge = React41.forwardRef(
|
|
2485
2520
|
({ tier = 1, selected = false, discount, className }, ref) => {
|
|
2486
2521
|
const cls = [
|
|
@@ -2489,7 +2524,7 @@ var PromoBadge = React41.forwardRef(
|
|
|
2489
2524
|
selected ? PromoBadge_default.selected : PromoBadge_default.choose,
|
|
2490
2525
|
className ?? ""
|
|
2491
2526
|
].filter(Boolean).join(" ");
|
|
2492
|
-
return /* @__PURE__ */ jsx42("div", { ref, className: cls, children: selected && discount ? /* @__PURE__ */ jsxs35(
|
|
2527
|
+
return /* @__PURE__ */ jsx42("div", { ref, className: cls, children: selected && discount ? /* @__PURE__ */ jsxs35(Fragment4, { children: [
|
|
2493
2528
|
/* @__PURE__ */ jsx42("span", { className: PromoBadge_default.discountIcon, "aria-hidden": "true" }),
|
|
2494
2529
|
/* @__PURE__ */ jsx42("span", { className: PromoBadge_default.discount, children: discount })
|
|
2495
2530
|
] }) : /* @__PURE__ */ jsx42("span", { className: PromoBadge_default.tier, children: tier }) });
|
|
@@ -3133,7 +3168,7 @@ var IcImgCarousel = ({
|
|
|
3133
3168
|
);
|
|
3134
3169
|
|
|
3135
3170
|
// src/components/CountButton/CountButton.tsx
|
|
3136
|
-
import { Fragment as
|
|
3171
|
+
import { Fragment as Fragment5, jsx as jsx88, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
3137
3172
|
var CountButton = ({
|
|
3138
3173
|
type = "plus",
|
|
3139
3174
|
size = 16,
|
|
@@ -3156,7 +3191,7 @@ var CountButton = ({
|
|
|
3156
3191
|
fill: "#333333"
|
|
3157
3192
|
}
|
|
3158
3193
|
),
|
|
3159
|
-
type === "delete" && /* @__PURE__ */ jsxs59(
|
|
3194
|
+
type === "delete" && /* @__PURE__ */ jsxs59(Fragment5, { children: [
|
|
3160
3195
|
/* @__PURE__ */ jsx88("path", { d: "M2 4.09375C6.68629 4.09375 9.31371 4.09375 14 4.09375", stroke: "#333333", strokeWidth: "1.2" }),
|
|
3161
3196
|
/* @__PURE__ */ jsx88("path", { d: "M9.10938 7.03125C9.10938 8.77641 9.10938 9.75484 9.10938 11.5", stroke: "#333333", strokeWidth: "1.2" }),
|
|
3162
3197
|
/* @__PURE__ */ jsx88("path", { d: "M6.89062 7.03125C6.89063 8.77641 6.89063 9.75484 6.89063 11.5", stroke: "#333333", strokeWidth: "1.2" }),
|
|
@@ -3168,7 +3203,7 @@ var CountButton = ({
|
|
|
3168
3203
|
);
|
|
3169
3204
|
|
|
3170
3205
|
// src/components/ToastIcon/ToastIcon.tsx
|
|
3171
|
-
import { Fragment as
|
|
3206
|
+
import { Fragment as Fragment6, jsx as jsx89, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
3172
3207
|
var ToastIcon = ({
|
|
3173
3208
|
type = "alert",
|
|
3174
3209
|
size = 20,
|
|
@@ -3188,7 +3223,7 @@ var ToastIcon = ({
|
|
|
3188
3223
|
d: "M10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0ZM9.2666 12.7607V14.4277H10.7666V12.7607H9.2666ZM9.2666 5.57324V10.5732H10.7666V5.57324H9.2666Z",
|
|
3189
3224
|
fill: "white"
|
|
3190
3225
|
}
|
|
3191
|
-
) : /* @__PURE__ */ jsxs60(
|
|
3226
|
+
) : /* @__PURE__ */ jsxs60(Fragment6, { children: [
|
|
3192
3227
|
/* @__PURE__ */ jsx89("circle", { cx: "10", cy: "10", r: "10", fill: "white" }),
|
|
3193
3228
|
/* @__PURE__ */ jsx89("path", { d: "M5 10L8.5 13.5L15 7", stroke: "#333333", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
3194
3229
|
] })
|