@trafilea/afrodita-components 6.43.5 → 6.43.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/build/index.d.ts +21 -9
- package/build/index.esm.js +30 -19
- package/build/index.esm.js.map +1 -1
- package/build/index.js +30 -19
- package/build/index.js.map +1 -1
- package/build/theme/revel.theme.js +4 -0
- package/build/theme/shapermint.theme.js +4 -0
- package/build/theme/thebodcon.theme.js +4 -0
- package/build/theme/thespadr.theme.js +4 -0
- package/build/theme/truekind.theme.js +4 -0
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -2595,12 +2595,16 @@ interface ISubscriptionFrequencyDropdown {
|
|
|
2595
2595
|
}
|
|
2596
2596
|
declare const AutoshipFrequencyDropdown: FC<ISubscriptionFrequencyDropdown>;
|
|
2597
2597
|
|
|
2598
|
-
declare type
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
baseColor: string;
|
|
2598
|
+
declare type Benefit = {
|
|
2599
|
+
iconName: IconName;
|
|
2600
|
+
htmlText: string;
|
|
2601
|
+
fill?: string;
|
|
2603
2602
|
};
|
|
2603
|
+
declare type BenefitsListProps = {
|
|
2604
|
+
benefits: Benefit[];
|
|
2605
|
+
disabled?: boolean;
|
|
2606
|
+
};
|
|
2607
|
+
|
|
2604
2608
|
declare const BenefitsList: FC<BenefitsListProps>;
|
|
2605
2609
|
|
|
2606
2610
|
declare type TimeProps = {
|
|
@@ -3698,13 +3702,14 @@ declare type TextPricingProps = {
|
|
|
3698
3702
|
declare type TextLinkProps = {
|
|
3699
3703
|
variant: 'link';
|
|
3700
3704
|
weight?: 'demi' | 'regular';
|
|
3701
|
-
size?: 'regular' | 'small';
|
|
3705
|
+
size?: 'regular' | 'small' | 'xsmall';
|
|
3702
3706
|
underline?: boolean;
|
|
3703
3707
|
disabled?: boolean;
|
|
3704
3708
|
wide?: never;
|
|
3705
3709
|
original?: never;
|
|
3706
3710
|
allCaps?: never;
|
|
3707
3711
|
href?: string;
|
|
3712
|
+
target?: string;
|
|
3708
3713
|
};
|
|
3709
3714
|
declare type TextLabelProps = {
|
|
3710
3715
|
variant: 'label';
|
|
@@ -4127,24 +4132,31 @@ interface TableProps {
|
|
|
4127
4132
|
declare const SizeChartTableV3: React.FC<TableProps>;
|
|
4128
4133
|
|
|
4129
4134
|
declare type WithBenefits = {
|
|
4130
|
-
benefits:
|
|
4135
|
+
benefits: Benefit[];
|
|
4131
4136
|
children?: never;
|
|
4132
4137
|
};
|
|
4133
4138
|
declare type WithChildren = {
|
|
4134
4139
|
benefits?: never;
|
|
4135
4140
|
children: ReactNode;
|
|
4136
4141
|
};
|
|
4142
|
+
declare type TermsLink = {
|
|
4143
|
+
text: string;
|
|
4144
|
+
url: string;
|
|
4145
|
+
};
|
|
4137
4146
|
declare type CommonProps = {
|
|
4138
4147
|
pricing: PriceType;
|
|
4139
4148
|
currencySymbol: string;
|
|
4140
4149
|
radios: RadiosConfig;
|
|
4141
4150
|
onChange: (values: SelectorOnChangeProps) => void;
|
|
4142
4151
|
tooltip?: TooltipType;
|
|
4143
|
-
frequency?: AutoshipFrequency
|
|
4152
|
+
frequency?: AutoshipFrequency & {
|
|
4153
|
+
showFrequencyText?: boolean;
|
|
4154
|
+
};
|
|
4144
4155
|
className?: string;
|
|
4145
4156
|
discountTagClassName?: string;
|
|
4146
4157
|
closeIcon?: boolean;
|
|
4147
4158
|
discountLabel?: string;
|
|
4159
|
+
termsAndConditions?: TermsLink;
|
|
4148
4160
|
};
|
|
4149
4161
|
declare type SubscriptionPlanSelectorProps = (WithBenefits | WithChildren) & CommonProps;
|
|
4150
4162
|
declare type SubscriptionPlanSelectorRadios = 'oneTime' | 'subscription';
|
|
@@ -4293,4 +4305,4 @@ declare const benefits: (size: 'xsmall' | 'small' | 'regular') => BenefitProps[]
|
|
|
4293
4305
|
declare const benefitsRawHtml: BenefitProps[];
|
|
4294
4306
|
declare const sizeOptions: SizeOptionProps[];
|
|
4295
4307
|
|
|
4296
|
-
export { AbsorbencyLevel, Accordion, AccordionOptions, AmazonButton, AssetsProvider, Autoship, AutoshipFrequency, AutoshipFrequencyDropdown, AutoshipOfferCard, AutoshipOfferCardCta, AutoshipV2, BasicAccordion, BeforeAfterCard, BeforeAfterVariant, BenefitProps, BenefitsList, BenefitsListProps, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, ButtonType, BuyNowPayLater, CTAProps, CancellationFlowAccordionContentPerPartner, _default as Card, CardSectionType, CartItemCard, CartProductItem, CategorySquareTag, CategoryTag, Checkbox, ClubOfferSelector, ClubOfferTag, ClubPriceMemberLabel, ClubRadioGroupInput, Collection, ColorPickerOption, ColorPickerWithTooltip, ColorsState, CommonProps, ComponentPosition, ComponentSize, ContentType, CouponCard, index_d as CrossSell, DeliveryDetails, DeviceType, DiscountTag, Drawer, DropdownDialog, DropdownListIcons, DropdownListIconsItem, DropdownListIconsSubItem, DropdownOption, Filter, FilterChange, FilteringDropdown, Tags as FilteringTags, Filters, FitGuarantee, FitPredictor, HorizontalDivider, HorizontalDividerProps, HurryUp, HurryUpProps, ISubscriptionFrequencyDropdown, Icon, IconButton, IconProps, IconWithOpacityProps, IconsWithTitle, Image, ImageCardWithDescription, ImageProps, Input, InputValidationType, JoinClubCard, Icon$1 as LibIcon, IconProps$1 as LibIconProps, LikeButton, LikeButtonColors, LikeButtonProps, Modal, MotivatorProgressBar, MultiColorPicker, Note, OfferAtCart, OfferAtCartProps, OfferBanner, OrderBar, Overlay, PackSelector, PackSelectorV2, Pagination, PaginatorBlog, Partner, PartnerContent, Pattern, PaymentMethod, PaypalButton, Portal, PriceLabel, PriceLabelV2, PriceLabelV3, PriceType, ProductCard, ProductCardV2, ProductCardV3, ProductGallery, ProductGalleryMobile, ProductGalleryMobileV2, ProductGalleryMobileV3, ProductGalleryMobileV4, ProductGalleryMobileV5, ProgressBar, QuantityPicker, RadioConfig, RadioGroupInput, RadioGroupOption, RadioInput, RadioPrimary, RadiosConfig, Rating, Review, Review$1 as ReviewDetail, ReviewsHeader, ScrollToTop, SearchBar, SearchBarOptionItem, SearchNavigation, SeasonOfferTag, SelectorOnChangeProps, ShortBanner, SimpleDropdown, SimpleOrderItem, SingleColorPicker, SizeChartTable, SizeChartTableV2, SizeChartTableV3, SizeDropdown, SizeFitGuide, SizeOption, SizeOptionProps, SizeSelector, SizeTable, SliderNavigation, Spacing, Spinner, SpinnerProps, StarList, StrengthBars, SubscriptionPlanSelector, SubscriptionPlanSelectorProps, SubscriptionPlanSelectorRadios, Tab, Tabs, Text, TextButton, TextWithImage, Theme, ThemeAssets, ThemeBasicPallete, ThemeBreakpoints, ThemeColorPallete, ThemeColors, ThemeComponent, ThemeFonts, ThemeProvider, ThemeProviderProps, ThemeTypography, ThemeVariables, Timer, Toast, ToggleComponent, Tooltip, TooltipContent, TooltipHeader, TooltipType, Totals, TrackingProgress, TrackingProgressV2, Video, VideoProps, WithBenefits, WithChildren, WithTestId, benefits, benefitsRawHtml, buildImageUrl, componentSizeMapper, decimalFormat, formatPrice, getSrcSet, imageVideoProps, isDangerouslySetInnerHTML, isEmail, isEmpty, isNumber, isPhoneNumber, isValidDate, mediaQueries, modalEvent, SeasonOfferRoundedTag as seasonOfferRoundedTag, simulateMouseClick, sizeOptions, sliceString, title, useDeviceType, useModal, useModalEvent, useOnClickOutside, useTheme, useThemeAssets, useWindowDimensions };
|
|
4308
|
+
export { AbsorbencyLevel, Accordion, AccordionOptions, AmazonButton, AssetsProvider, Autoship, AutoshipFrequency, AutoshipFrequencyDropdown, AutoshipOfferCard, AutoshipOfferCardCta, AutoshipV2, BasicAccordion, BeforeAfterCard, BeforeAfterVariant, BenefitProps, BenefitsList, BenefitsListProps, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, ButtonType, BuyNowPayLater, CTAProps, CancellationFlowAccordionContentPerPartner, _default as Card, CardSectionType, CartItemCard, CartProductItem, CategorySquareTag, CategoryTag, Checkbox, ClubOfferSelector, ClubOfferTag, ClubPriceMemberLabel, ClubRadioGroupInput, Collection, ColorPickerOption, ColorPickerWithTooltip, ColorsState, CommonProps, ComponentPosition, ComponentSize, ContentType, CouponCard, index_d as CrossSell, DeliveryDetails, DeviceType, DiscountTag, Drawer, DropdownDialog, DropdownListIcons, DropdownListIconsItem, DropdownListIconsSubItem, DropdownOption, Filter, FilterChange, FilteringDropdown, Tags as FilteringTags, Filters, FitGuarantee, FitPredictor, HorizontalDivider, HorizontalDividerProps, HurryUp, HurryUpProps, ISubscriptionFrequencyDropdown, Icon, IconButton, IconName, IconProps, IconWithOpacityProps, IconsWithTitle, Image, ImageCardWithDescription, ImageProps, Input, InputValidationType, JoinClubCard, Icon$1 as LibIcon, IconProps$1 as LibIconProps, LikeButton, LikeButtonColors, LikeButtonProps, Modal, MotivatorProgressBar, MultiColorPicker, Note, OfferAtCart, OfferAtCartProps, OfferBanner, OrderBar, Overlay, PackSelector, PackSelectorV2, Pagination, PaginatorBlog, Partner, PartnerContent, Pattern, PaymentMethod, PaypalButton, Portal, PriceLabel, PriceLabelV2, PriceLabelV3, PriceType, ProductCard, ProductCardV2, ProductCardV3, ProductGallery, ProductGalleryMobile, ProductGalleryMobileV2, ProductGalleryMobileV3, ProductGalleryMobileV4, ProductGalleryMobileV5, ProgressBar, QuantityPicker, RadioConfig, RadioGroupInput, RadioGroupOption, RadioInput, RadioPrimary, RadiosConfig, Rating, Review, Review$1 as ReviewDetail, ReviewsHeader, ScrollToTop, SearchBar, SearchBarOptionItem, SearchNavigation, SeasonOfferTag, SelectorOnChangeProps, ShortBanner, SimpleDropdown, SimpleOrderItem, SingleColorPicker, SizeChartTable, SizeChartTableV2, SizeChartTableV3, SizeDropdown, SizeFitGuide, SizeOption, SizeOptionProps, SizeSelector, SizeTable, SliderNavigation, Spacing, Spinner, SpinnerProps, StarList, StrengthBars, SubscriptionPlanSelector, SubscriptionPlanSelectorProps, SubscriptionPlanSelectorRadios, Tab, Tabs, Text, TextButton, TextWithImage, Theme, ThemeAssets, ThemeBasicPallete, ThemeBreakpoints, ThemeColorPallete, ThemeColors, ThemeComponent, ThemeFonts, ThemeProvider, ThemeProviderProps, ThemeTypography, ThemeVariables, Timer, Toast, ToggleComponent, Tooltip, TooltipContent, TooltipHeader, TooltipType, Totals, TrackingProgress, TrackingProgressV2, Video, VideoProps, WithBenefits, WithChildren, WithTestId, benefits, benefitsRawHtml, buildImageUrl, componentSizeMapper, decimalFormat, formatPrice, getSrcSet, imageVideoProps, isDangerouslySetInnerHTML, isEmail, isEmpty, isNumber, isPhoneNumber, isValidDate, mediaQueries, modalEvent, SeasonOfferRoundedTag as seasonOfferRoundedTag, simulateMouseClick, sizeOptions, sliceString, title, useDeviceType, useModal, useModalEvent, useOnClickOutside, useTheme, useThemeAssets, useWindowDimensions };
|
package/build/index.esm.js
CHANGED
|
@@ -4883,7 +4883,7 @@ var Text$7 = function (_a) {
|
|
|
4883
4883
|
}
|
|
4884
4884
|
return propsHref;
|
|
4885
4885
|
}, [props.disabled, propsHref]);
|
|
4886
|
-
return (jsx(Tag, __assign$1({}, props, { css: commonCSS, href: href, "data-testid": testId }, { children: children }), void 0));
|
|
4886
|
+
return (jsx(Tag, __assign$1({}, props, { css: commonCSS, href: href, target: variant === 'link' ? props.target : undefined, "data-testid": testId }, { children: children }), void 0));
|
|
4887
4887
|
};
|
|
4888
4888
|
var DEFAULTS = {
|
|
4889
4889
|
heading1: {
|
|
@@ -6676,8 +6676,12 @@ var BenefitText$1 = newStyled(Text$7)(templateObject_2$1g || (templateObject_2$1
|
|
|
6676
6676
|
var templateObject_1$1G, templateObject_2$1g;
|
|
6677
6677
|
|
|
6678
6678
|
var BenefitsList = function (_a) {
|
|
6679
|
-
var benefits = _a.benefits,
|
|
6680
|
-
|
|
6679
|
+
var benefits = _a.benefits, disabled = _a.disabled;
|
|
6680
|
+
var colors = useTheme().colors;
|
|
6681
|
+
return (jsx$1(Fragment$2, { children: benefits.map(function (benefit) {
|
|
6682
|
+
var _a;
|
|
6683
|
+
return (jsxs$1(Benefit$2, { children: [jsx$1(Icon$1, { name: benefit.iconName, fill: disabled ? colors.shades['250'].color : (_a = benefit.fill) !== null && _a !== void 0 ? _a : colors.shades['700'].color, width: "24px", height: "24px" }, void 0), jsx$1(BenefitText$1, { variant: "body", dangerouslySetInnerHTML: { __html: benefit.htmlText } }, void 0)] }, benefit.iconName));
|
|
6684
|
+
}) }, void 0));
|
|
6681
6685
|
};
|
|
6682
6686
|
|
|
6683
6687
|
var TimerContainer$1 = newStyled.div(templateObject_1$1F || (templateObject_1$1F = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
@@ -21884,10 +21888,10 @@ var FlexContainer = newStyled.div(templateObject_1$1 || (templateObject_1$1 = __
|
|
|
21884
21888
|
"\n [data-testid='subscription-frequency'] {\n border: 0;\n padding-left: 0 !important;\n padding-right: 32px !important;\n }\n\n [role='listbox']{\n margin-left: -20px;\n }\n ";
|
|
21885
21889
|
});
|
|
21886
21890
|
var DiscountTag = newStyled.div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n position: absolute;\n top: -24px;\n right: 18px;\n background-color: ", ";\n color: white;\n padding: 5px 10px;\n font-size: 12px;\n font-weight: bold;\n line-height: 14px;\n border-radius: ", ";\n"], ["\n position: absolute;\n top: -24px;\n right: 18px;\n background-color: ", ";\n color: white;\n padding: 5px 10px;\n font-size: 12px;\n font-weight: bold;\n line-height: 14px;\n border-radius: ", ";\n"])), function (_a) {
|
|
21887
|
-
var theme = _a.theme,
|
|
21888
|
-
return
|
|
21889
|
-
? theme.
|
|
21890
|
-
: theme.
|
|
21891
|
+
var theme = _a.theme, selected = _a.selected;
|
|
21892
|
+
return selected
|
|
21893
|
+
? theme.component.autoship.discountTag.backgroundColor
|
|
21894
|
+
: theme.colors.shades[350].color;
|
|
21891
21895
|
}, function (_a) {
|
|
21892
21896
|
var theme = _a.theme;
|
|
21893
21897
|
return "".concat(theme.component.autoship.discountTag.borderRadius, " \n ").concat(theme.component.autoship.discountTag.borderRadius, " 0 0");
|
|
@@ -21900,8 +21904,12 @@ var getSelectedBorder = function (_a) {
|
|
|
21900
21904
|
return "1.5px solid ".concat(colors.shades['700'].color);
|
|
21901
21905
|
};
|
|
21902
21906
|
var ContainerBase = newStyled.div(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n border-radius: 8px;\n\n border: ", ";\n\n ", "\n\n & input:checked + div {\n border-color: ", ";\n }\n\n & label {\n cursor: pointer;\n }\n"], ["\n border-radius: 8px;\n\n border: ", ";\n\n ", "\n\n & input:checked + div {\n border-color: ", ";\n }\n\n & label {\n cursor: pointer;\n }\n"])), function (_a) {
|
|
21903
|
-
var disabled = _a.disabled, theme = _a.theme;
|
|
21904
|
-
return disabled
|
|
21907
|
+
var disabled = _a.disabled, highlighted = _a.highlighted, theme = _a.theme;
|
|
21908
|
+
return disabled
|
|
21909
|
+
? "1px solid ".concat(theme.colors.shades[200].color)
|
|
21910
|
+
: highlighted
|
|
21911
|
+
? getSelectedBorder(theme)
|
|
21912
|
+
: "1.5px solid ".concat(theme.colors.shades[150].color);
|
|
21905
21913
|
}, function (_a) {
|
|
21906
21914
|
var disabled = _a.disabled;
|
|
21907
21915
|
return disabled
|
|
@@ -21916,9 +21924,15 @@ var SinglePurchaseContainer = newStyled(ContainerBase)(templateObject_4$1 || (te
|
|
|
21916
21924
|
return (onClick ? 'cursor: pointer;' : '');
|
|
21917
21925
|
});
|
|
21918
21926
|
var SubscriptionContainer = newStyled(ContainerBase)(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n padding: 16px;\n margin-bottom: 8px;\n position: relative;\n"], ["\n padding: 16px;\n margin-bottom: 8px;\n position: relative;\n"])));
|
|
21919
|
-
var SubscriptionHeader = newStyled.div(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n
|
|
21920
|
-
var
|
|
21921
|
-
return
|
|
21927
|
+
var SubscriptionHeader = newStyled.div(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n padding-bottom: ", ";\n margin-bottom: ", ";\n cursor: pointer;\n border-bottom: ", ";\n\n & input:checked + div {\n border-color: ", ";\n }\n"], ["\n display: flex;\n justify-content: space-between;\n padding-bottom: ", ";\n margin-bottom: ", ";\n cursor: pointer;\n border-bottom: ", ";\n\n & input:checked + div {\n border-color: ", ";\n }\n"])), function (_a) {
|
|
21928
|
+
var _b = _a.showBorder, showBorder = _b === void 0 ? true : _b;
|
|
21929
|
+
return (showBorder ? '10px' : '');
|
|
21930
|
+
}, function (_a) {
|
|
21931
|
+
var _b = _a.showBorder, showBorder = _b === void 0 ? true : _b;
|
|
21932
|
+
return (showBorder ? '8px' : '0');
|
|
21933
|
+
}, function (_a) {
|
|
21934
|
+
var _b = _a.showBorder, showBorder = _b === void 0 ? true : _b, theme = _a.theme;
|
|
21935
|
+
return showBorder ? "1px solid ".concat(theme.colors.shades[200].color) : 'none';
|
|
21922
21936
|
}, function (_a) {
|
|
21923
21937
|
var theme = _a.theme;
|
|
21924
21938
|
return theme.colors.pallete.primary.color;
|
|
@@ -21946,8 +21960,7 @@ var TooltipWrapper = newStyled.div(templateObject_10 || (templateObject_10 = __m
|
|
|
21946
21960
|
var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1, templateObject_6$1, templateObject_7$1, templateObject_8$1, templateObject_9$1, templateObject_10;
|
|
21947
21961
|
|
|
21948
21962
|
var SubscriptionPlanSelector = function (_a) {
|
|
21949
|
-
var children = _a.children, benefits = _a.benefits, tooltip = _a.tooltip, pricing = _a.pricing, frequency = _a.frequency, onChange = _a.onChange, className = _a.className, discountTagClassName = _a.discountTagClassName, closeIcon = _a.closeIcon, currencySymbol = _a.currencySymbol, discountLabel = _a.discountLabel, radios = _a.radios;
|
|
21950
|
-
var theme = useTheme();
|
|
21963
|
+
var children = _a.children, benefits = _a.benefits, tooltip = _a.tooltip, pricing = _a.pricing, frequency = _a.frequency, onChange = _a.onChange, className = _a.className, discountTagClassName = _a.discountTagClassName, closeIcon = _a.closeIcon, currencySymbol = _a.currencySymbol, discountLabel = _a.discountLabel, radios = _a.radios, termsAndConditions = _a.termsAndConditions;
|
|
21951
21964
|
var _b = useState({
|
|
21952
21965
|
oneTime: radios.oneTime,
|
|
21953
21966
|
subscription: radios.subscription,
|
|
@@ -21998,7 +22011,6 @@ var SubscriptionPlanSelector = function (_a) {
|
|
|
21998
22011
|
var handleFrequencyChange = function (value) {
|
|
21999
22012
|
setSubscriptionPeriod(radiosStatuses.subscription.checked ? value.value : undefined);
|
|
22000
22013
|
};
|
|
22001
|
-
var benefitsColor = benefitsColorMapper(theme);
|
|
22002
22014
|
var renderBenefitsOrChildren = function () {
|
|
22003
22015
|
var isDisabled = radiosStatuses.subscription.disabled;
|
|
22004
22016
|
if (children) {
|
|
@@ -22010,17 +22022,16 @@ var SubscriptionPlanSelector = function (_a) {
|
|
|
22010
22022
|
});
|
|
22011
22023
|
}
|
|
22012
22024
|
else if (benefits) {
|
|
22013
|
-
|
|
22014
|
-
return (jsx$1(BenefitsList, { benefits: benefits, isSelected: isSelected, selectedColor: benefitsColor.selected, baseColor: isDisabled ? 'var(--colors-shades-250-color)' : benefitsColor.base }, void 0));
|
|
22025
|
+
return jsx$1(BenefitsList, { benefits: benefits, disabled: isDisabled }, void 0);
|
|
22015
22026
|
}
|
|
22016
22027
|
return null;
|
|
22017
22028
|
};
|
|
22018
|
-
return (jsxs$1(Container$1, __assign$1({ className: className }, { children: [jsxs$1(SubscriptionContainer, __assign$1({ onClick: function () { return handleRadioClicked('subscription'); }, "data-testid": "subscription-purchase-block", disabled: radiosStatuses.subscription.disabled }, { children: [jsx$1(DiscountTag, __assign$1({ className: discountTagClassName,
|
|
22029
|
+
return (jsxs$1(Container$1, __assign$1({ className: className }, { children: [jsxs$1(SubscriptionContainer, __assign$1({ highlighted: radiosStatuses.subscription.checked, onClick: function () { return handleRadioClicked('subscription'); }, "data-testid": "subscription-purchase-block", disabled: radiosStatuses.subscription.disabled }, { children: [jsx$1(DiscountTag, __assign$1({ className: discountTagClassName, selected: radiosStatuses.subscription.checked }, { children: discountLabel !== null && discountLabel !== void 0 ? discountLabel : "".concat(subscriptionPctOverListPriceRounded, "% OFF - SAVE ").concat(currencySymbol).concat(subscriptionSaving.toFixed(2)) }), void 0), jsxs$1(SubscriptionHeader, __assign$1({ showBorder: radiosStatuses.subscription.checked }, { children: [jsxs$1(FlexContainer, __assign$1({ "data-testid": "subscription-block", onClick: function () { return handleRadioClicked('subscription'); } }, { children: [jsx$1(RadioInput, { label: radios.subscription.label, icon: radios.subscription.icon, name: "subscription", id: "subscription", value: "subscription", size: ComponentSize.Medium, style: { marginRight: '10px' }, useV2Style: true, onChange: function () {
|
|
22019
22030
|
setRadiosStatuses(function (prev) { return ({
|
|
22020
22031
|
subscription: __assign$1(__assign$1({}, prev.subscription), { checked: true }),
|
|
22021
22032
|
oneTime: __assign$1(__assign$1({}, prev.oneTime), { checked: false }),
|
|
22022
22033
|
}); });
|
|
22023
|
-
}, checked: !radiosStatuses.subscription.disabled && radiosStatuses.subscription.checked, disabled: radiosStatuses.subscription.disabled }, void 0), jsx$1(TooltipWrapper, { children: jsx$1(Tooltip, __assign$1({ position: 0, content: tooltip
|
|
22034
|
+
}, checked: !radiosStatuses.subscription.disabled && radiosStatuses.subscription.checked, disabled: radiosStatuses.subscription.disabled }, void 0), tooltip && (jsx$1(TooltipWrapper, { children: jsx$1(Tooltip, __assign$1({ position: 0, content: tooltip.content, header: tooltip.header, maxWidth: "248px", showCloseIcon: closeIcon, closeBtnSize: 0.7 }, { children: jsx$1(Icon.Actions.CircleQuestion, { width: 1 }, void 0) }), void 0) }, void 0))] }), void 0), jsx$1(StyledPrice, { testId: "subscription", finalPrice: "$".concat(decimalFormat(Number(subscriptionFinalPrice))), disabled: radiosStatuses.subscription.disabled, highlighted: !radiosStatuses.subscription.disabled && radiosStatuses.subscription.highlighted, size: ComponentSize.Large, originalPrice: "$".concat(decimalFormat(Number(listPrice))) }, void 0)] }), void 0), radiosStatuses.subscription.checked && (jsxs$1(Fragment$2, { children: [jsx$1(BenefitsContainer, __assign$1({ disabled: radiosStatuses.subscription.disabled }, { children: renderBenefitsOrChildren() }), void 0), termsAndConditions && (jsx$1(Text$7, __assign$1({ variant: "link", underline: true, href: termsAndConditions.url, size: "regular", target: "_blank" }, { children: termsAndConditions.text }), void 0)), (frequency === null || frequency === void 0 ? void 0 : frequency.showFrequencyText) && (jsx$1(AutoshipFrequencyDropdown, { frequency: frequency, onChange: handleFrequencyChange }, void 0))] }, void 0))] }), void 0), jsxs$1(SinglePurchaseContainer, __assign$1({ "data-testid": "single-purchase-block", highlighted: radiosStatuses.oneTime.checked, disabled: radiosStatuses.oneTime.disabled, onClick: function () { return handleRadioClicked('oneTime'); } }, { children: [jsx$1(RadioInput, { label: radios.oneTime.label, icon: radios.oneTime.icon, name: "oneTime", id: "oneTime", value: "oneTime", size: ComponentSize.Medium, onChange: function () {
|
|
22024
22035
|
setRadiosStatuses(function (prev) { return ({
|
|
22025
22036
|
subscription: __assign$1(__assign$1({}, prev.subscription), { checked: false }),
|
|
22026
22037
|
oneTime: __assign$1(__assign$1({}, prev.oneTime), { checked: true }),
|