@trafilea/afrodita-components 6.16.0 → 6.16.2
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/build/index.d.ts +11 -4
- package/build/index.esm.js +25 -22
- package/build/index.esm.js.map +1 -1
- package/build/index.js +25 -22
- package/build/index.js.map +1 -1
- package/build/theme/revel.theme.d.ts +1 -0
- package/build/theme/revel.theme.js +1 -1
- package/build/theme/shapermint.theme.d.ts +1 -0
- package/build/theme/shapermint.theme.js +1 -1
- package/build/theme/thebodcon.theme.d.ts +1 -0
- package/build/theme/thebodcon.theme.js +1 -1
- package/build/theme/thespadr.theme.d.ts +1 -0
- package/build/theme/thespadr.theme.js +1 -1
- package/build/theme/truekind.theme.d.ts +1 -0
- package/build/theme/truekind.theme.js +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -3096,9 +3096,9 @@ var ThemeProvider = function (_a) {
|
|
|
3096
3096
|
var _b;
|
|
3097
3097
|
var unparsedTheme = _a.theme, isSameOriginIcons = _a.isSameOriginIcons, children = _a.children, config = _a.config;
|
|
3098
3098
|
//TODO Analyze why we are doing this and remove
|
|
3099
|
-
var theme = React$2.useMemo(function () { return
|
|
3100
|
-
var assets = __assign$1(__assign$1({}, theme.assets), { isSameOriginIcons: isSameOriginIcons, cdn:
|
|
3101
|
-
var themeWithOtherVariables = __assign$1(__assign$1({}, theme), { assets: assets });
|
|
3099
|
+
var theme = React$2.useMemo(function () { return applyVariablesIntoTheme(__assign$1({}, unparsedTheme)); }, [unparsedTheme]);
|
|
3100
|
+
var assets = __assign$1(__assign$1({}, theme.assets), { isSameOriginIcons: isSameOriginIcons, cdn: config && config.useTrafileaAssets ? "".concat(config.cdn, "/assets/common") : (_b = theme.assets) === null || _b === void 0 ? void 0 : _b.cdn });
|
|
3101
|
+
var themeWithOtherVariables = __assign$1(__assign$1({}, theme), { assets: assets, config: config });
|
|
3102
3102
|
return (jsxRuntime.jsx(ThemeProvider$1, __assign$1({ theme: themeWithOtherVariables }, { children: jsxRuntime.jsx(AssetsProvider, __assign$1({ assets: assets }, { children: children }), void 0) }), void 0));
|
|
3103
3103
|
};
|
|
3104
3104
|
var useTheme = function () { return useTheme$1(); };
|
|
@@ -3834,6 +3834,8 @@ var EllipsisHorizontal = function (props) { return (jsxRuntime.jsx(Icon$1, __ass
|
|
|
3834
3834
|
|
|
3835
3835
|
var Filters$1 = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "navigation/filters" }), void 0); };
|
|
3836
3836
|
|
|
3837
|
+
var FiltersV2 = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "navigation/filters_v2" }), void 0); };
|
|
3838
|
+
|
|
3837
3839
|
var Hamburger = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "navigation/hamburger" }), void 0); };
|
|
3838
3840
|
|
|
3839
3841
|
var Home = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "navigation/home" }), void 0); };
|
|
@@ -3884,6 +3886,7 @@ var Navigation = /*#__PURE__*/Object.freeze({
|
|
|
3884
3886
|
Ellipsis: Ellipsis,
|
|
3885
3887
|
EllipsisHorizontal: EllipsisHorizontal,
|
|
3886
3888
|
Filters: Filters$1,
|
|
3889
|
+
FiltersV2: FiltersV2,
|
|
3887
3890
|
Hamburger: Hamburger,
|
|
3888
3891
|
Home: Home,
|
|
3889
3892
|
HomeSolid: HomeSolid,
|
|
@@ -4668,22 +4671,18 @@ var Container$19 = newStyled.div(templateObject_1$1R || (templateObject_1$1R = _
|
|
|
4668
4671
|
var _b = _a.height, height = _b === void 0 ? '100%' : _b;
|
|
4669
4672
|
return height;
|
|
4670
4673
|
});
|
|
4671
|
-
var FlexCentered = newStyled.div(templateObject_2$1f || (templateObject_2$1f = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n width:
|
|
4672
|
-
var LeftSide = newStyled.div(templateObject_3$Z || (templateObject_3$Z = __makeTemplateObject(["\n width:
|
|
4673
|
-
var RightSide = newStyled.div(templateObject_4$K || (templateObject_4$K = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items:
|
|
4674
|
+
var FlexCentered = newStyled.div(templateObject_2$1f || (templateObject_2$1f = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 90%;\n height: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 90%;\n height: 100%;\n"])));
|
|
4675
|
+
var LeftSide = newStyled.div(templateObject_3$Z || (templateObject_3$Z = __makeTemplateObject(["\n width: 110px;\n height: 100%;\n flex-shrink: 0;\n resize: vertical;\n"], ["\n width: 110px;\n height: 100%;\n flex-shrink: 0;\n resize: vertical;\n"])));
|
|
4676
|
+
var RightSide = newStyled.div(templateObject_4$K || (templateObject_4$K = __makeTemplateObject(["\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n align-items: center;\n height: 100%;\n"], ["\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n align-items: center;\n height: 100%;\n"])));
|
|
4674
4677
|
var FlexStart = newStyled.div(templateObject_5$w || (templateObject_5$w = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: start;\n gap: 5px;\n width: 100%;\n padding: 12px;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: start;\n gap: 5px;\n width: 100%;\n padding: 12px;\n"])));
|
|
4675
4678
|
var templateObject_1$1R, templateObject_2$1f, templateObject_3$Z, templateObject_4$K, templateObject_5$w;
|
|
4676
4679
|
|
|
4677
4680
|
var _this$1 = undefined;
|
|
4678
4681
|
var Coupon = function (_a) {
|
|
4679
|
-
var imgSrc = _a.imgSrc, title = _a.title, content = _a.content, couponCode = _a.couponCode, offerLink = _a.offerLink, width = _a.width, _b = _a.btnText, btnText = _b === void 0 ? 'Redeem Offer' : _b;
|
|
4682
|
+
var imgSrc = _a.imgSrc, title = _a.title, content = _a.content, couponCode = _a.couponCode, offerLink = _a.offerLink, width = _a.width, height = _a.height, _b = _a.btnText, btnText = _b === void 0 ? 'Redeem Offer' : _b;
|
|
4680
4683
|
var _c = React$2.useState(false), showCoupon = _c[0], setShowCoupon = _c[1];
|
|
4681
|
-
var _d = React$2.useState('176px'), containerHeight = _d[0], setContainerHeight = _d[1];
|
|
4682
4684
|
var handleCopy = React$2.useCallback(function (couponCode) { return (couponCode ? navigator.clipboard.writeText(couponCode) : undefined); }, []);
|
|
4683
|
-
|
|
4684
|
-
setContainerHeight(function (prev) { return (showCoupon ? '220px' : prev); });
|
|
4685
|
-
}, [showCoupon]);
|
|
4686
|
-
return (jsxRuntime.jsxs(Container$19, __assign$1({ height: containerHeight, width: width }, { children: [jsxRuntime.jsx(LeftSide, { children: jsxRuntime.jsx(Image$3, { src: imgSrc, alt: "Product", width: "100%", height: "100%", borderRadius: "8px 0 0 8px" }, void 0) }, void 0), jsxRuntime.jsxs(RightSide, { children: [jsxRuntime.jsxs(FlexStart, { children: [jsxRuntime.jsx(Text$7, __assign$1({ variant: "body", weight: "bold", size: "small" }, { children: title }), void 0), content] }, void 0), jsxRuntime.jsx(FlexCentered, { children: !showCoupon ? (jsxRuntime.jsx(ButtonPrimary, { type: "button", text: btnText, wide: true, size: exports.ComponentSize.Small, onClick: function () { return setShowCoupon(function (prev) { return !prev; }); } }, void 0)) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ButtonSecondaryOutline, { "data-testid": "coupon-code-btn", testId: "coupon-code-btn", type: "button", text: couponCode !== null && couponCode !== void 0 ? couponCode : '', wide: true, size: exports.ComponentSize.Small, icon: {
|
|
4685
|
+
return (jsxRuntime.jsxs(Container$19, __assign$1({ height: height, width: width }, { children: [jsxRuntime.jsx(LeftSide, { children: jsxRuntime.jsx(Image$3, { src: imgSrc, alt: "Product", width: "100%", height: "100%", borderRadius: "8px 0 0 8px" }, void 0) }, void 0), jsxRuntime.jsxs(RightSide, { children: [jsxRuntime.jsxs(FlexStart, { children: [jsxRuntime.jsx(Text$7, __assign$1({ variant: "body", weight: "bold", size: "small" }, { children: title }), void 0), content] }, void 0), jsxRuntime.jsx(FlexCentered, { children: !showCoupon ? (jsxRuntime.jsx(ButtonPrimary, { type: "button", text: btnText, wide: true, size: exports.ComponentSize.Small, onClick: function () { return setShowCoupon(function (prev) { return !prev; }); } }, void 0)) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ButtonSecondaryOutline, { "data-testid": "coupon-code-btn", testId: "coupon-code-btn", type: "button", text: couponCode !== null && couponCode !== void 0 ? couponCode : '', wide: true, size: exports.ComponentSize.Small, icon: {
|
|
4687
4686
|
name: 'actions/copy_outlined',
|
|
4688
4687
|
position: 'right',
|
|
4689
4688
|
margin: '10px',
|
|
@@ -4703,15 +4702,18 @@ var cancellationFlowContentPerKey = {
|
|
|
4703
4702
|
'TheSpaDr-2': CouponDefaultBody('Nourish Antioxidant Serum', '$10 OFF'),
|
|
4704
4703
|
TheBodCon: TheBodConContent(),
|
|
4705
4704
|
};
|
|
4706
|
-
var
|
|
4705
|
+
var couponDimensions = {
|
|
4706
|
+
width: '95%',
|
|
4707
|
+
height: '215px',
|
|
4708
|
+
};
|
|
4707
4709
|
var CancellationFlowAccordionContentPerPartner = {
|
|
4708
4710
|
RevelBeauty: [
|
|
4709
|
-
jsxRuntime.jsx(Coupon, { width:
|
|
4710
|
-
jsxRuntime.jsx(Coupon, { width:
|
|
4711
|
+
jsxRuntime.jsx(Coupon, { width: couponDimensions.width, height: couponDimensions.height, title: REVEL_BEAUTY_TITLE, imgSrc: 'https://cdn.shopify.com/s/files/1/2679/8624/files/Beauty_Lift_and_Tighten_Serum.png?v=1709316823', content: cancellationFlowContentPerKey['RevelBeauty-1'], couponCode: 'CLUBFRIENDS', offerLink: 'https://revelbeauty.com/products/lift-tighten-serum' }, "RevelBeauty-1"),
|
|
4712
|
+
jsxRuntime.jsx(Coupon, { width: couponDimensions.width, height: couponDimensions.height, title: REVEL_BEAUTY_TITLE, imgSrc: 'https://cdn.shopify.com/s/files/1/2679/8624/files/revel-beauty-orders-above-50.png?v=1709326588', content: cancellationFlowContentPerKey['RevelBeauty-2'], couponCode: 'SHIPPINGONUS', offerLink: 'https://revelbeauty.com/' }, "RevelBeauty-2"),
|
|
4711
4713
|
],
|
|
4712
4714
|
TheSpaDr: [
|
|
4713
|
-
jsxRuntime.jsx(Coupon, { width:
|
|
4714
|
-
jsxRuntime.jsx(Coupon, { width:
|
|
4715
|
+
jsxRuntime.jsx(Coupon, { width: couponDimensions.width, height: couponDimensions.height, title: THE_SPA_DR_TITLE, imgSrc: 'https://cdn.shopify.com/s/files/1/2679/8624/files/Daily_Essentials_4-Step_Skin_Care_System.png?v=1709333354', content: cancellationFlowContentPerKey['TheSpaDr-1'], couponCode: 'SHMCLUBFRIENDS', offerLink: 'https://thespadr.com/products/4-step-age-defying-clean-skincare-system-3?variant=42658350727366' }, "TheSpaDr-1"),
|
|
4716
|
+
jsxRuntime.jsx(Coupon, { width: couponDimensions.width, height: couponDimensions.height, title: THE_SPA_DR_TITLE, imgSrc: 'https://cdn.shopify.com/s/files/1/2679/8624/files/Nourish_Antioxidant_Serum.png?v=1709333354', content: cancellationFlowContentPerKey['TheSpaDr-2'], couponCode: 'SHMCLUB10OFF', offerLink: 'https://thespadr.com/products/step-2-age-defying-lift-tight-serum?variant=15992476860510' }, "TheSpaDr-2"),
|
|
4715
4717
|
],
|
|
4716
4718
|
TheBodCon: [cancellationFlowContentPerKey['TheBodCon']],
|
|
4717
4719
|
};
|
|
@@ -19888,6 +19890,7 @@ var templateObject_1$4, templateObject_2$3, templateObject_3$1, templateObject_4
|
|
|
19888
19890
|
var StyledButton = newStyled(Ye.Button)(function (props) { return ({
|
|
19889
19891
|
background: props.bgColor,
|
|
19890
19892
|
height: '100%',
|
|
19893
|
+
width: '100%',
|
|
19891
19894
|
maxHeight: '48px',
|
|
19892
19895
|
border: 'none',
|
|
19893
19896
|
display: 'flex',
|
|
@@ -19917,14 +19920,14 @@ var StyledController = newStyled.div(templateObject_2$2 || (templateObject_2$2 =
|
|
|
19917
19920
|
var templateObject_1$3, templateObject_2$2;
|
|
19918
19921
|
|
|
19919
19922
|
var StyledDisclosure = newStyled(Ye)(function (_a) {
|
|
19920
|
-
var background = _a.background;
|
|
19923
|
+
var background = _a.background, width = _a.width;
|
|
19921
19924
|
return ({
|
|
19922
19925
|
display: 'flex',
|
|
19923
19926
|
flexDirection: 'column',
|
|
19924
19927
|
justifyContent: 'center',
|
|
19925
19928
|
gap: '10px',
|
|
19926
19929
|
background: background !== null && background !== void 0 ? background : '',
|
|
19927
|
-
width: 'auto',
|
|
19930
|
+
width: width !== null && width !== void 0 ? width : 'auto',
|
|
19928
19931
|
borderRadius: '8px',
|
|
19929
19932
|
border: '0.063rem solid',
|
|
19930
19933
|
borderColor: '#e5e5e5',
|
|
@@ -19948,10 +19951,10 @@ var AccordionContent = function (_a) {
|
|
|
19948
19951
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(StyledButton, __assign$1({ "data-testid": "styled-button", disabled: disabled, bgColor: bgColor }, { children: [jsxRuntime.jsx(HeaderContentComponent, { open: open, header: header, headerOnOpen: headerOnOpen }, void 0), jsxRuntime.jsxs(StyledController, { children: [jsxRuntime.jsx(Text$7, __assign$1({ variant: "body", weight: "demi", size: "small", color: fillControlsCollor }, { children: "View Offers" }), void 0), jsxRuntime.jsx("span", __assign$1({ style: { marginTop: '3px' } }, { children: jsxRuntime.jsx(ControlIconComponent, { open: open, openIcon: openIcon, closeIcon: closeIcon, fillControlsCollor: fillControlsCollor }, void 0) }), void 0)] }, void 0)] }), void 0), open && (jsxRuntime.jsx(StyledContent, __assign$1({ width: contentWidth, bgColor: bgColor, onClick: function (e) { return e.stopPropagation(); } }, { children: jsxRuntime.jsx(StyledPanel, { children: children }, void 0) }), void 0))] }, void 0));
|
|
19949
19952
|
};
|
|
19950
19953
|
var BasicAccordion = function (_a) {
|
|
19951
|
-
var children = _a.children, header = _a.header, bgColor = _a.bgColor, headerOnOpen = _a.headerOnOpen, _b = _a.defaultOpen, defaultOpen = _b === void 0 ? false : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, openIcon = _a.openIcon, closeIcon = _a.closeIcon, onClick = _a.onClick, _d = _a.
|
|
19952
|
-
return (jsxRuntime.jsx(StyledDisclosure, __assign$1({ as: "div", background: bgColor, defaultOpen: defaultOpen, disabled: disabled, onClick: onClick }, { children: function (_a) {
|
|
19954
|
+
var children = _a.children, header = _a.header, bgColor = _a.bgColor, headerOnOpen = _a.headerOnOpen, _b = _a.defaultOpen, defaultOpen = _b === void 0 ? false : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, openIcon = _a.openIcon, closeIcon = _a.closeIcon, onClick = _a.onClick, _d = _a.width, width = _d === void 0 ? '100%' : _d, fillControlsCollor = _a.fillControlsCollor;
|
|
19955
|
+
return (jsxRuntime.jsx(StyledDisclosure, __assign$1({ "data-testid": "accordion-container", as: "div", background: bgColor, defaultOpen: defaultOpen, disabled: disabled, onClick: onClick, width: width }, { children: function (_a) {
|
|
19953
19956
|
var open = _a.open;
|
|
19954
|
-
return (jsxRuntime.jsx(AccordionContent, __assign$1({ open: open, disabled: disabled, bgColor: bgColor, fillControlsCollor: fillControlsCollor, header: header, headerOnOpen: headerOnOpen, openIcon: openIcon, closeIcon: closeIcon
|
|
19957
|
+
return (jsxRuntime.jsx(AccordionContent, __assign$1({ open: open, disabled: disabled, bgColor: bgColor, fillControlsCollor: fillControlsCollor, header: header, headerOnOpen: headerOnOpen, openIcon: openIcon, closeIcon: closeIcon }, { children: children }), void 0));
|
|
19955
19958
|
} }), void 0));
|
|
19956
19959
|
};
|
|
19957
19960
|
|