@trafilea/afrodita-components 6.39.9 → 6.39.11
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 -10
- package/build/index.esm.js +62 -56
- package/build/index.esm.js.map +1 -1
- package/build/index.js +62 -56
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -151,15 +151,15 @@ declare type StyledIconProps = {
|
|
|
151
151
|
|
|
152
152
|
declare type Actions$1 = 'actions/add' | 'actions/check_box_empty' | 'actions/check_box_light' | 'actions/check_box_solid' | 'actions/check' | 'actions/circle_check' | 'actions/circle_clear' | 'actions/circle_info' | 'actions/circle_minus' | 'actions/circle_plus' | 'actions/circle_question' | 'actions/circle_solid_check' | 'actions/circle_solid_clear' | 'actions/circle_solid_info' | 'actions/circle_solid_minus' | 'actions/circle_solid_plus' | 'actions/circle_solid_question' | 'actions/circle_solid_styled_check' | 'actions/circle_solid_warning' | 'actions/circle_solid_reload' | 'actions/circle_warning' | 'actions/clear_light' | 'actions/close' | 'actions/copy_outlined' | 'actions/copy' | 'actions/edit' | 'actions/light_check' | 'actions/light_exclamation' | 'actions/like_solid' | 'actions/like' | 'actions/minus' | 'actions/not_allowed' | 'actions/question' | 'actions/radio_empty' | 'actions/radio_filled' | 'actions/settings_solid' | 'actions/settings' | 'actions/share' | 'actions/signout' | 'actions/signout_light' | 'actions/trash' | 'actions/warning' | 'actions/navigate' | 'actions/camera';
|
|
153
153
|
declare type Arrows$1 = 'arrows/chevron_down' | 'arrows/chevron_down_variant' | 'arrows/chevron_left' | 'arrows/chevron_left_lite' | 'arrows/chevron_left_variant' | 'arrows/chevron_right' | 'arrows/chevron_right_lite' | 'arrows/chevron_right_variant' | 'arrows/chevron_up' | 'arrows/chevron_up_solid' | 'arrows/chevron_up_variant' | 'arrows/circle_chevron_down' | 'arrows/circle_chevron_left' | 'arrows/circle_chevron_right' | 'arrows/circle_chevron_up' | 'arrows/circle_line_down' | 'arrows/circle_line_left' | 'arrows/circle_line_right' | 'arrows/circle_line_up' | 'arrows/circle_up' | 'arrows/double_arrow_up' | 'arrows/chevron_right_grey' | 'arrows/circle_round' | 'arrows/circle_round_grayed';
|
|
154
|
-
declare type Custom$1 = 'custom/atom' | 'custom/avatar_placeholder' | 'custom/bra' | 'custom/bubbles' | 'custom/bullet_one' | 'custom/bullet_three' | 'custom/bullet_two' | 'custom/certified' | 'custom/clinically_tested' | 'custom/cruelty_free' | 'custom/fair_advantages' | 'custom/frown' | 'custom/money_flow' | 'custom/new_sixty_days_guarantee' | 'custom/packs_and_bundles' | 'custom/seamless_support_bra' | 'custom/sixty_days_bold' | 'custom/sixty_days_guarantee' | 'custom/smiling' | 'custom/subscription' | 'custom/thumbs_down' | 'custom/thumbs_up' | 'custom/underwear' | 'custom/wire_free_comfort' | 'custom/wire_free_comfort_bold' | 'custom/tk_sixty_days_bold' | 'custom/free_shipping_truck' | 'custom/higher_discounts' | 'custom/zoom' | 'custom/focus' | 'custom/beauty_face' | 'custom/bar' | 'custom/ears' | 'custom/pain' | 'custom/rociar' | 'custom/star' | 'custom/time' | 'custom/winter_light' | 'custom/priority_support' | 'custom/sound_on' | 'custom/sound_off' | 'custom/gift_thin' | 'custom/returns' | 'custom/paint_brush' | 'custom/savings';
|
|
154
|
+
declare type Custom$1 = 'custom/atom' | 'custom/avatar_placeholder' | 'custom/bra' | 'custom/bubbles' | 'custom/bullet_one' | 'custom/bullet_three' | 'custom/bullet_two' | 'custom/certified' | 'custom/clinically_tested' | 'custom/cruelty_free' | 'custom/fair_advantages' | 'custom/frown' | 'custom/money_flow' | 'custom/new_sixty_days_guarantee' | 'custom/packs_and_bundles' | 'custom/seamless_support_bra' | 'custom/sixty_days_bold' | 'custom/sixty_days_guarantee' | 'custom/smiling' | 'custom/subscription' | 'custom/thumbs_down' | 'custom/thumbs_up' | 'custom/underwear' | 'custom/wire_free_comfort' | 'custom/wire_free_comfort_bold' | 'custom/tk_sixty_days_bold' | 'custom/free_shipping_truck' | 'custom/higher_discounts' | 'custom/zoom' | 'custom/focus' | 'custom/beauty_face' | 'custom/bar' | 'custom/ears' | 'custom/pain' | 'custom/rociar' | 'custom/star' | 'custom/time' | 'custom/winter_light' | 'custom/priority_support' | 'custom/sound_on' | 'custom/sound_off' | 'custom/gift_thin' | 'custom/returns' | 'custom/paint_brush' | 'custom/savings' | 'custom/unhappy' | 'custom/no_trial_time' | 'custom/expensive_wallet' | 'custom/product_usage';
|
|
155
155
|
declare type Download$1 = 'download/apple_store' | 'download/google_play';
|
|
156
156
|
declare type Emoji$1 = 'emoji/blowing_kiss' | 'emoji/frowning' | 'emoji/grinning' | 'emoji/grinning_with_sweat' | 'emoji/relieved' | 'emoji/smiling_v2' | 'emoji/smiling_v3' | 'emoji/thinking';
|
|
157
157
|
declare type Messaging$1 = 'messaging/ada_chat' | 'messaging/comment' | 'messaging/comment_dots' | 'messaging/comment_light' | 'messaging/comment_money' | 'messaging/community' | 'messaging/light' | 'messaging/light_bulb' | 'messaging/light_bulb_solid' | 'messaging/mail' | 'messaging/messenger' | 'messaging/question_circle' | 'messaging/quote_left' | 'messaging/quote_right' | 'messaging/quote_solid_left' | 'messaging/quote_solid_right' | 'messaging/question_circle_light';
|
|
158
|
-
declare type MyAccount$1 = 'myaccount/birthday_gifts' | 'myaccount/community' | 'myaccount/deals_offers' | 'myaccount/free_returns' | 'myaccount/free_shipping' | 'myaccount/guard' | 'myaccount/members_only_discount' | 'myaccount/members_only_discount_opposite' | 'myaccount/personal_stylist' | 'myaccount/priority_shipping' | 'myaccount/profile' | 'myaccount/place_image' | 'myaccount/sale_tag' | 'myaccount/style_fashion_content' | 'myaccount/cart' | 'myaccount/vip' | 'myaccount/calendar';
|
|
158
|
+
declare type MyAccount$1 = 'myaccount/birthday_gifts' | 'myaccount/community' | 'myaccount/deals_offers' | 'myaccount/free_returns' | 'myaccount/free_shipping' | 'myaccount/guard' | 'myaccount/members_only_discount' | 'myaccount/members_only_discount_opposite' | 'myaccount/personal_stylist' | 'myaccount/priority_shipping' | 'myaccount/profile' | 'myaccount/place_image' | 'myaccount/sale_tag' | 'myaccount/style_fashion_content' | 'myaccount/cart' | 'myaccount/vip' | 'myaccount/calendar' | 'myaccount/skin_type' | 'myaccount/magnify' | 'myaccount/beauty_products' | 'myaccount/email' | 'myaccount/contact';
|
|
159
159
|
declare type Navigation$1 = 'navigation/address_information' | 'navigation/benefits' | 'navigation/club_membership' | 'navigation/ellipsis' | 'navigation/ellipsis_horizontal' | 'navigation/filters' | 'navigation/hamburger' | 'navigation/home' | 'navigation/home_solid' | 'navigation/loading' | 'navigation/lock' | 'navigation/lock_solid' | 'navigation/map_marker' | 'navigation/map_marker_light' | 'navigation/map_solid' | 'navigation/menu_lines' | 'navigation/search' | 'navigation/shaperbox' | 'navigation/shopping_bag' | 'navigation/shopping_bag_v2' | 'navigation/shopping_bag_v3' | 'navigation/shopping_bag_v4' | 'navigation/shopping_cart' | 'navigation/shopping_cart_v2' | 'navigation/slide_dot' | 'navigation/slide_dot_solid' | 'navigation/user' | 'navigation/address_information_light' | 'navigation/user_solid' | 'navigation/user_v2' | 'navigation/filters_v2' | 'navigation/gift';
|
|
160
160
|
declare type Other$1 = 'other/bod_con_label' | 'other/bod_con_mobile_label' | 'other/call_us' | 'other/chat' | 'other/email' | 'other/express_shipping' | 'other/fit_guarantee' | 'other/fit_predictor' | 'other/free_exchange' | 'other/get_discount' | 'other/hassel_free_returns' | 'other/loading' | 'other/mc_afee' | 'other/play' | 'other/qr_code' | 'other/question_with_circle' | 'other/revel_beauty' | 'other/shapermint' | 'other/shapermint_club_icon' | 'other/shapermint_club_icon2' | 'other/shapermint_club_label' | 'other/shapermint_club_mobile_label' | 'other/shapermint_logo' | 'other/shm_club' | 'other/shop_now' | 'other/sign_form' | 'other/sixty_days_tsd' | 'other/the_bod_con' | 'other/the_spa_dr' | 'other/lock' | 'other/help_center' | 'other/coupons';
|
|
161
161
|
declare type Payment$1 = 'payment/amazon' | 'payment/amex' | 'payment/jcb' | 'payment/klarna' | 'payment/master_card' | 'payment/paypal' | 'payment/visa' | 'payment/payment_methods';
|
|
162
|
-
declare type PDP$1 = 'pdp/circle_number' | 'pdp/clock' | 'pdp/drop' | 'pdp/drop_empty' | 'pdp/error_cross' | 'pdp/flag_usa' | 'pdp/hours' | 'pdp/klarna_logo' | 'pdp/light_bulb' | 'pdp/free_returns_v2' | 'pdp/free_shipping_v2' | 'pdp/minus' | 'pdp/moon' | 'pdp/new_clock' | 'pdp/play_mini' | 'pdp/play_video' | 'pdp/plus' | 'pdp/rule' | 'pdp/shipping' | 'pdp/shipping_empty' | 'pdp/size_empty' | 'pdp/size_empty_v2' | 'pdp/star' | 'pdp/stars' | 'pdp/star_empty' | 'pdp/star_half' | 'pdp/stopwatch' | 'pdp/drop_v2' | 'pdp/few_drops' | 'pdp/trust_badge' | 'pdp/verified' | 'pdp/wrinkle_free_face' | 'pdp/skin_appearance' | 'pdp/shine_heart' | 'pdp/cruelty_free' | 'pdp/ph_formula' | 'pdp/box' | 'pdp/afterpay_logo' | 'pdp/
|
|
162
|
+
declare type PDP$1 = 'pdp/circle_number' | 'pdp/clock' | 'pdp/drop' | 'pdp/drop_empty' | 'pdp/error_cross' | 'pdp/flag_usa' | 'pdp/hours' | 'pdp/klarna_logo' | 'pdp/light_bulb' | 'pdp/free_returns_v2' | 'pdp/free_shipping_v2' | 'pdp/minus' | 'pdp/moon' | 'pdp/new_clock' | 'pdp/play_mini' | 'pdp/play_video' | 'pdp/plus' | 'pdp/rule' | 'pdp/shipping' | 'pdp/shipping_empty' | 'pdp/size_empty' | 'pdp/size_empty_v2' | 'pdp/star' | 'pdp/stars' | 'pdp/star_empty' | 'pdp/star_half' | 'pdp/stopwatch' | 'pdp/drop_v2' | 'pdp/few_drops' | 'pdp/trust_badge' | 'pdp/verified' | 'pdp/wrinkle_free_face' | 'pdp/skin_appearance' | 'pdp/shine_heart' | 'pdp/cruelty_free' | 'pdp/ph_formula' | 'pdp/box' | 'pdp/afterpay_logo' | 'pdp/trustpilot_star' | 'pdp/trustpilot_half_star';
|
|
163
163
|
declare type SlideDots$1 = 'slidedots/slide_dot';
|
|
164
164
|
declare type SocialMedia$1 = 'socialmedia/facebook' | 'socialmedia/facebook_solid' | 'socialmedia/instagram' | 'socialmedia/instagram_solid' | 'socialmedia/interaction' | 'socialmedia/pinterest' | 'socialmedia/twitter' | 'socialmedia/youtube' | 'socialmedia/spotify' | 'socialmedia/apple_podcast';
|
|
165
165
|
declare type IconName = Actions$1 | Arrows$1 | Custom$1 | Download$1 | Emoji$1 | Messaging$1 | MyAccount$1 | Navigation$1 | Other$1 | Payment$1 | PDP$1 | SlideDots$1 | SocialMedia$1;
|
|
@@ -1098,9 +1098,9 @@ declare const Stopwatch: IconComponent;
|
|
|
1098
1098
|
|
|
1099
1099
|
declare const TrustBadge: IconComponent;
|
|
1100
1100
|
|
|
1101
|
-
declare const
|
|
1101
|
+
declare const TrustPilotHalfStar: IconComponent;
|
|
1102
1102
|
|
|
1103
|
-
declare const
|
|
1103
|
+
declare const TrustPilotStar: IconComponent;
|
|
1104
1104
|
|
|
1105
1105
|
declare const Verified: IconComponent;
|
|
1106
1106
|
|
|
@@ -1135,8 +1135,8 @@ declare const PDP_StarHalf: typeof StarHalf;
|
|
|
1135
1135
|
declare const PDP_Stars: typeof Stars;
|
|
1136
1136
|
declare const PDP_Stopwatch: typeof Stopwatch;
|
|
1137
1137
|
declare const PDP_TrustBadge: typeof TrustBadge;
|
|
1138
|
-
declare const
|
|
1139
|
-
declare const
|
|
1138
|
+
declare const PDP_TrustPilotHalfStar: typeof TrustPilotHalfStar;
|
|
1139
|
+
declare const PDP_TrustPilotStar: typeof TrustPilotStar;
|
|
1140
1140
|
declare const PDP_Verified: typeof Verified;
|
|
1141
1141
|
declare namespace PDP {
|
|
1142
1142
|
export {
|
|
@@ -1171,8 +1171,8 @@ declare namespace PDP {
|
|
|
1171
1171
|
PDP_Stars as Stars,
|
|
1172
1172
|
PDP_Stopwatch as Stopwatch,
|
|
1173
1173
|
PDP_TrustBadge as TrustBadge,
|
|
1174
|
-
|
|
1175
|
-
|
|
1174
|
+
PDP_TrustPilotHalfStar as TrustPilotHalfStar,
|
|
1175
|
+
PDP_TrustPilotStar as TrustPilotStar,
|
|
1176
1176
|
PDP_Verified as Verified,
|
|
1177
1177
|
};
|
|
1178
1178
|
}
|
|
@@ -1304,8 +1304,9 @@ interface AccordionProps {
|
|
|
1304
1304
|
openIcon: IconType;
|
|
1305
1305
|
closeIcon: IconType;
|
|
1306
1306
|
onClick?: (index: number) => void;
|
|
1307
|
+
testId?: string;
|
|
1307
1308
|
}
|
|
1308
|
-
declare const Accordion: ({ header, headerOnOpen, content, defaultOpen, forceOpenHandler, forceOpenValue, titleColor, variant, disabled, innerHTML, backgroundCover, controlIconPos, openIcon, closeIcon, onClick, }: AccordionProps) => JSX.Element;
|
|
1309
|
+
declare const Accordion: ({ header, headerOnOpen, content, defaultOpen, forceOpenHandler, forceOpenValue, titleColor, variant, disabled, innerHTML, backgroundCover, controlIconPos, openIcon, closeIcon, onClick, testId, }: AccordionProps) => JSX.Element;
|
|
1309
1310
|
|
|
1310
1311
|
interface AccordionOptionsProps {
|
|
1311
1312
|
titleColor: string;
|
package/build/index.esm.js
CHANGED
|
@@ -4643,9 +4643,9 @@ var Stopwatch = function (props) { return jsx$1(Icon$1, __assign$1({}, props, {
|
|
|
4643
4643
|
|
|
4644
4644
|
var TrustBadge = function (props) { return jsx$1(Icon$1, __assign$1({}, props, { name: "pdp/trust_badge" }), void 0); };
|
|
4645
4645
|
|
|
4646
|
-
var
|
|
4646
|
+
var TrustPilotHalfStar = function (props) { return (jsx$1(Icon$1, __assign$1({}, props, { name: "pdp/trustpilot_half_star" }), void 0)); };
|
|
4647
4647
|
|
|
4648
|
-
var
|
|
4648
|
+
var TrustPilotStar = function (props) { return (jsx$1(Icon$1, __assign$1({}, props, { name: "pdp/trustpilot_star" }), void 0)); };
|
|
4649
4649
|
|
|
4650
4650
|
var Verified = function (props) { return jsx$1(Icon$1, __assign$1({}, props, { name: "pdp/verified" }), void 0); };
|
|
4651
4651
|
|
|
@@ -4682,8 +4682,8 @@ var PDP = /*#__PURE__*/Object.freeze({
|
|
|
4682
4682
|
Stars: Stars,
|
|
4683
4683
|
Stopwatch: Stopwatch,
|
|
4684
4684
|
TrustBadge: TrustBadge,
|
|
4685
|
-
|
|
4686
|
-
|
|
4685
|
+
TrustPilotHalfStar: TrustPilotHalfStar,
|
|
4686
|
+
TrustPilotStar: TrustPilotStar,
|
|
4687
4687
|
Verified: Verified
|
|
4688
4688
|
});
|
|
4689
4689
|
|
|
@@ -5061,9 +5061,9 @@ var StyledButton$3 = newStyled(Ye.Button)(AccordionSummaryStyles.baseStyles, fun
|
|
|
5061
5061
|
var StyledPanel$1 = newStyled(Ye.Panel)(AccordionDetailsStyles.baseStyles, function (props) { return [AccordionDetailsStyles[props.variant](props.theme)]; });
|
|
5062
5062
|
var StyledContent$1 = newStyled.button(templateObject_1$24 || (templateObject_1$24 = __makeTemplateObject(["\n appearance: none;\n padding: 0;\n margin: 0;\n border: none;\n background: none;\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n cursor: auto;\n user-select: text;\n writing-mode: unset;\n font-family: inherit;\n"], ["\n appearance: none;\n padding: 0;\n margin: 0;\n border: none;\n background: none;\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n cursor: auto;\n user-select: text;\n writing-mode: unset;\n font-family: inherit;\n"])));
|
|
5063
5063
|
var Accordion$1 = function (_a) {
|
|
5064
|
-
var header = _a.header, headerOnOpen = _a.headerOnOpen, content = _a.content, defaultOpen = _a.defaultOpen, _b = _a.forceOpenHandler, forceOpenHandler = _b === void 0 ? false : _b, _c = _a.forceOpenValue, forceOpenValue = _c === void 0 ? false : _c, titleColor = _a.titleColor, variant = _a.variant, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.innerHTML, innerHTML = _e === void 0 ? false : _e, _f = _a.backgroundCover, backgroundCover = _f === void 0 ? { value: false, iconBgColor: 'inherit' } : _f, _g = _a.controlIconPos, controlIconPos = _g === void 0 ? 'right' : _g, openIcon = _a.openIcon, closeIcon = _a.closeIcon, onClick = _a.onClick;
|
|
5064
|
+
var header = _a.header, headerOnOpen = _a.headerOnOpen, content = _a.content, defaultOpen = _a.defaultOpen, _b = _a.forceOpenHandler, forceOpenHandler = _b === void 0 ? false : _b, _c = _a.forceOpenValue, forceOpenValue = _c === void 0 ? false : _c, titleColor = _a.titleColor, variant = _a.variant, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.innerHTML, innerHTML = _e === void 0 ? false : _e, _f = _a.backgroundCover, backgroundCover = _f === void 0 ? { value: false, iconBgColor: 'inherit' } : _f, _g = _a.controlIconPos, controlIconPos = _g === void 0 ? 'right' : _g, openIcon = _a.openIcon, closeIcon = _a.closeIcon, onClick = _a.onClick, testId = _a.testId;
|
|
5065
5065
|
var theme = useTheme();
|
|
5066
|
-
return (jsx$1(StyledDisclosure$1, __assign$1({ theme: theme, as: "div", defaultOpen: defaultOpen, variant: variant, disabled: disabled, onClick: onClick, controlIconPos: controlIconPos }, { children: function (_a) {
|
|
5066
|
+
return (jsx$1(StyledDisclosure$1, __assign$1({ "data-testid": testId, theme: theme, as: "div", defaultOpen: defaultOpen, variant: variant, disabled: disabled, onClick: onClick, controlIconPos: controlIconPos }, { children: function (_a) {
|
|
5067
5067
|
var open = _a.open;
|
|
5068
5068
|
var openWithForce = forceOpenHandler ? forceOpenValue : open;
|
|
5069
5069
|
var ControlIcon = disabled ? openIcon : openWithForce ? closeIcon : openIcon;
|
|
@@ -20518,6 +20518,26 @@ function usePreventVerticalScroll(ref, dragThreshold) {
|
|
|
20518
20518
|
}, [preventTouch, ref, touchStart]);
|
|
20519
20519
|
}
|
|
20520
20520
|
|
|
20521
|
+
var sendCommandToIframe = function (command, elementId) {
|
|
20522
|
+
if (elementId === void 0) { elementId = 'vwo-video'; }
|
|
20523
|
+
var iframe = document.getElementById(elementId);
|
|
20524
|
+
var origin = new URL(iframe === null || iframe === void 0 ? void 0 : iframe.src).origin;
|
|
20525
|
+
// TODO: Add verification to only allow specific origins
|
|
20526
|
+
// const allowedOrigins = ['https://youtube.com'];
|
|
20527
|
+
// if (!allowedOrigins.includes(origin)) return;
|
|
20528
|
+
(iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) &&
|
|
20529
|
+
iframe.contentWindow.postMessage(JSON.stringify({
|
|
20530
|
+
event: 'command',
|
|
20531
|
+
func: command,
|
|
20532
|
+
}), origin);
|
|
20533
|
+
};
|
|
20534
|
+
var stopVideoCommand = function () {
|
|
20535
|
+
sendCommandToIframe('stopVideo');
|
|
20536
|
+
};
|
|
20537
|
+
var playVideoCommand = function () {
|
|
20538
|
+
sendCommandToIframe('playVideo');
|
|
20539
|
+
};
|
|
20540
|
+
|
|
20521
20541
|
var Container$g = newStyled.div(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n ", "\n position: relative;\n max-height: 524px;\n overflow: hidden;\n & .slick-dots li.slick-active button:before {\n background-color: ", ";\n }\n"], ["\n ", "\n position: relative;\n max-height: 524px;\n overflow: hidden;\n & .slick-dots li.slick-active button:before {\n background-color: ", ";\n }\n"])), function (_a) {
|
|
20522
20542
|
var borderRadiusVariant = _a.borderRadiusVariant;
|
|
20523
20543
|
return borderRadiusVariant &&
|
|
@@ -20526,7 +20546,6 @@ var Container$g = newStyled.div(templateObject_1$i || (templateObject_1$i = __ma
|
|
|
20526
20546
|
var theme = _a.theme;
|
|
20527
20547
|
return theme.component.slideNavigation.slideDots.selectedDotColor;
|
|
20528
20548
|
});
|
|
20529
|
-
// max-height: 31.875rem;
|
|
20530
20549
|
var TopTagContainer$4 = newStyled.div(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n position: absolute;\n left: ", ";\n top: ", ";\n"], ["\n position: absolute;\n left: ", ";\n top: ", ";\n"])), function (props) { return (props.borderRadiusVariant ? '13px' : '0'); }, function (props) { return (props.borderRadiusVariant ? '11px' : '0'); });
|
|
20531
20550
|
var TopRightTagContainer$1 = newStyled.div(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 0;\n"], ["\n position: absolute;\n right: 0;\n top: 0;\n"])));
|
|
20532
20551
|
var BottomTagContainer$4 = newStyled.div(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject(["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"], ["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"])));
|
|
@@ -20556,28 +20575,29 @@ var ImageProductSlide = function (_a) {
|
|
|
20556
20575
|
var contents = _a.contents, _b = _a.customClick, customClick = _b === void 0 ? false : _b, topTag = _a.topTag, topRightTag = _a.topRightTag, bottomTag = _a.bottomTag, testId = _a.testId, borderRadiusVariant = _a.borderRadiusVariant, selectedValue = _a.selectedValue, onChange = _a.onChange, _c = _a.itemsOnViewport, itemsOnViewport = _c === void 0 ? 0 : _c;
|
|
20557
20576
|
var slick = useRef(null);
|
|
20558
20577
|
var sliderWrapper = useRef(null);
|
|
20559
|
-
useRef(null);
|
|
20560
20578
|
var _d = useState(false); _d[0]; var setIsPlaying = _d[1];
|
|
20561
20579
|
usePreventVerticalScroll(sliderWrapper);
|
|
20562
20580
|
var onButtonClick = useCallback(function (i) {
|
|
20563
20581
|
var _a;
|
|
20564
20582
|
(_a = slick.current) === null || _a === void 0 ? void 0 : _a.slickGoTo(i);
|
|
20565
20583
|
}, [slick]);
|
|
20566
|
-
var
|
|
20567
|
-
|
|
20568
|
-
(
|
|
20569
|
-
|
|
20570
|
-
|
|
20571
|
-
|
|
20572
|
-
|
|
20573
|
-
|
|
20574
|
-
var _stopVideo = function () {
|
|
20575
|
-
_sendCommandToIframe('stopVideo');
|
|
20576
|
-
setIsPlaying(false);
|
|
20584
|
+
var stopVideo = function () {
|
|
20585
|
+
stopVideoCommand();
|
|
20586
|
+
setIsPlaying(function (prevIsPlaying) {
|
|
20587
|
+
if (prevIsPlaying) {
|
|
20588
|
+
return !prevIsPlaying;
|
|
20589
|
+
}
|
|
20590
|
+
return prevIsPlaying;
|
|
20591
|
+
});
|
|
20577
20592
|
};
|
|
20578
|
-
var
|
|
20579
|
-
|
|
20580
|
-
setIsPlaying(
|
|
20593
|
+
var playVideo = function () {
|
|
20594
|
+
playVideoCommand();
|
|
20595
|
+
setIsPlaying(function (prevIsPlaying) {
|
|
20596
|
+
if (!prevIsPlaying) {
|
|
20597
|
+
return prevIsPlaying;
|
|
20598
|
+
}
|
|
20599
|
+
return !prevIsPlaying;
|
|
20600
|
+
});
|
|
20581
20601
|
};
|
|
20582
20602
|
useEffect(function () {
|
|
20583
20603
|
var _a;
|
|
@@ -20593,7 +20613,7 @@ var ImageProductSlide = function (_a) {
|
|
|
20593
20613
|
var activeSlide = contents[e];
|
|
20594
20614
|
// If autoplay is true and iframe is the active slide, play the video
|
|
20595
20615
|
var autoplay = (_a = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.url) === null || _a === void 0 ? void 0 : _a.includes('autoplay=1');
|
|
20596
|
-
autoplay ?
|
|
20616
|
+
autoplay ? playVideo() : stopVideo();
|
|
20597
20617
|
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
20598
20618
|
} }, settings$3, { nextArrow: jsx$1(NavButtonContainer$3, { children: jsx$1(Button$4, { children: jsx$1(Icon.Arrows.ChevronRight, { height: 2.125, width: 1.25, fill: "#292929" }, void 0) }, void 0) }, void 0), prevArrow: jsx$1(NavButtonContainer$3, { children: jsx$1(Button$4, { children: jsx$1(Icon.Arrows.ChevronLeft, { height: 2.125, width: 1.25, fill: "#292929" }, void 0) }, void 0) }, void 0), ref: slick }, { children: contents.map(function (content, idx) {
|
|
20599
20619
|
var _a;
|
|
@@ -20966,7 +20986,6 @@ var Container$b = newStyled.div(templateObject_1$b || (templateObject_1$b = __ma
|
|
|
20966
20986
|
var theme = _a.theme;
|
|
20967
20987
|
return theme.component.slideNavigation.slideDots.selectedDotColor;
|
|
20968
20988
|
});
|
|
20969
|
-
// max-height: 31.875rem;
|
|
20970
20989
|
var TopTagContainer$2 = newStyled.div(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n position: absolute;\n left: ", ";\n top: ", ";\n"], ["\n position: absolute;\n left: ", ";\n top: ", ";\n"])), function (props) { return (props.borderRadiusVariant ? '13px' : '0'); }, function (props) { return (props.borderRadiusVariant ? '11px' : '0'); });
|
|
20971
20990
|
var BottomTagContainer$2 = newStyled.div(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"], ["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"])));
|
|
20972
20991
|
var VideoOverlay = newStyled.div(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject(["\n content: '';\n background: transparent;\n width: 100%;\n height: 100%;\n min-height: 1px;\n position: absolute;\n top: 0;\n"], ["\n content: '';\n background: transparent;\n width: 100%;\n height: 100%;\n min-height: 1px;\n position: absolute;\n top: 0;\n"])));
|
|
@@ -20994,21 +21013,23 @@ var ImageProductSlideV3 = function (_a) {
|
|
|
20994
21013
|
var _a;
|
|
20995
21014
|
(_a = slick.current) === null || _a === void 0 ? void 0 : _a.slickGoTo(i);
|
|
20996
21015
|
}, [slick]);
|
|
20997
|
-
var
|
|
20998
|
-
|
|
20999
|
-
(
|
|
21000
|
-
|
|
21001
|
-
|
|
21002
|
-
|
|
21003
|
-
|
|
21004
|
-
|
|
21005
|
-
var _stopVideo = function () {
|
|
21006
|
-
_sendCommandToIframe('stopVideo');
|
|
21007
|
-
setIsPlaying(false);
|
|
21016
|
+
var stopVideo = function () {
|
|
21017
|
+
stopVideoCommand();
|
|
21018
|
+
setIsPlaying(function (prevIsPlaying) {
|
|
21019
|
+
if (prevIsPlaying) {
|
|
21020
|
+
return !prevIsPlaying;
|
|
21021
|
+
}
|
|
21022
|
+
return prevIsPlaying;
|
|
21023
|
+
});
|
|
21008
21024
|
};
|
|
21009
|
-
var
|
|
21010
|
-
|
|
21011
|
-
setIsPlaying(
|
|
21025
|
+
var playVideo = function () {
|
|
21026
|
+
playVideoCommand();
|
|
21027
|
+
setIsPlaying(function (prevIsPlaying) {
|
|
21028
|
+
if (!prevIsPlaying) {
|
|
21029
|
+
return prevIsPlaying;
|
|
21030
|
+
}
|
|
21031
|
+
return !prevIsPlaying;
|
|
21032
|
+
});
|
|
21012
21033
|
};
|
|
21013
21034
|
useEffect(function () {
|
|
21014
21035
|
var _a;
|
|
@@ -21024,11 +21045,11 @@ var ImageProductSlideV3 = function (_a) {
|
|
|
21024
21045
|
var activeSlide = images[e];
|
|
21025
21046
|
// If autoplay is true and iframe is the active slide, play the video
|
|
21026
21047
|
var autoplay = (_a = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.url) === null || _a === void 0 ? void 0 : _a.includes('autoplay=1');
|
|
21027
|
-
autoplay ?
|
|
21048
|
+
autoplay ? playVideo() : stopVideo();
|
|
21028
21049
|
} }, settings$2, { nextArrow: jsx$1(NavButtonContainer$2, { children: jsx$1(Button$2, { children: jsx$1(Icon.Arrows.ChevronRight, { height: 2.125, width: 1.25, fill: "#292929" }, void 0) }, void 0) }, void 0), prevArrow: jsx$1(NavButtonContainer$2, { children: jsx$1(Button$2, { children: jsx$1(Icon.Arrows.ChevronLeft, { height: 2.125, width: 1.25, fill: "#292929" }, void 0) }, void 0) }, void 0), ref: slick }, { children: images.map(function (image) {
|
|
21029
21050
|
var _a, _b;
|
|
21030
21051
|
return (jsxs$1("div", { children: [!((_a = image === null || image === void 0 ? void 0 : image.alt) === null || _a === void 0 ? void 0 : _a.includes('-video')) && (jsxs$1(Fragment$2, { children: [jsx$1(InnerImageZoom, { src: image.url, zoomSrc: image.url, zoomType: "hover", imgAttributes: { alt: image.alt, width: '100%', height: '510px' }, height: 510, fullscreenOnMobile: true, className: "zoomWrapper" }, void 0), jsx$1(TopTagContainer$2, __assign$1({ borderRadiusVariant: borderRadiusVariant, "data-testid": "topTag" }, { children: topTag }), void 0), jsx$1(BottomTagContainer$2, __assign$1({ "data-testid": "bottomTag" }, { children: bottomTag }), void 0)] }, void 0)), ((_b = image === null || image === void 0 ? void 0 : image.alt) === null || _b === void 0 ? void 0 : _b.includes('-video')) && (jsxs$1(Video, { children: [jsx$1("iframe", { id: "vwo-video", ref: iframeRef, allowFullScreen: true, title: image.alt, width: "100%", height: "220px", src: image === null || image === void 0 ? void 0 : image.url, allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" }, void 0), jsx$1(VideoOverlay, { onClick: function () {
|
|
21031
|
-
isPlaying ?
|
|
21052
|
+
isPlaying ? stopVideo() : playVideo();
|
|
21032
21053
|
} }, void 0), jsxs$1(VideoTag, { children: [jsx$1(Icon.PDP.PlayMini, { width: 1.5 }, void 0), jsx$1(Text, { children: "VIDEO" }, void 0)] }, void 0)] }, void 0))] }, image.key));
|
|
21033
21054
|
}) }), void 0) }), void 0)] }, void 0));
|
|
21034
21055
|
};
|
|
@@ -21041,21 +21062,6 @@ var ProductGalleryMobileV3 = function (_a) {
|
|
|
21041
21062
|
};
|
|
21042
21063
|
var templateObject_1$a;
|
|
21043
21064
|
|
|
21044
|
-
var _sendCommandToIframe = function (command) {
|
|
21045
|
-
var iframe = document.getElementById('vwo-video');
|
|
21046
|
-
(iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) &&
|
|
21047
|
-
iframe.contentWindow.postMessage(JSON.stringify({
|
|
21048
|
-
event: 'command',
|
|
21049
|
-
func: command,
|
|
21050
|
-
}), '*' + '');
|
|
21051
|
-
};
|
|
21052
|
-
var _stopVideo = function () {
|
|
21053
|
-
_sendCommandToIframe('stopVideo');
|
|
21054
|
-
};
|
|
21055
|
-
var _playVideo = function () {
|
|
21056
|
-
_sendCommandToIframe('playVideo');
|
|
21057
|
-
};
|
|
21058
|
-
|
|
21059
21065
|
function closeZoom() {
|
|
21060
21066
|
var closeButton = document.querySelectorAll('.iiz__btn.iiz__close.iiz__close--visible')[0];
|
|
21061
21067
|
if (closeButton) {
|
|
@@ -21069,7 +21075,7 @@ var afterChangeSlide = function (_a) {
|
|
|
21069
21075
|
var activeSlide = contents[slide];
|
|
21070
21076
|
// If autoplay is true and iframe is the active slide, play the video
|
|
21071
21077
|
var autoplay = (_b = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.url) === null || _b === void 0 ? void 0 : _b.includes('autoplay=1');
|
|
21072
|
-
autoplay ?
|
|
21078
|
+
autoplay ? playVideoCommand() : stopVideoCommand();
|
|
21073
21079
|
setSelectedImageIndex(Math.round(slide));
|
|
21074
21080
|
onChange === null || onChange === void 0 ? void 0 : onChange(slide);
|
|
21075
21081
|
closeZoom();
|