@trafilea/afrodita-components 6.14.1 → 6.14.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 +1 -0
- package/build/index.esm.js +10 -5
- package/build/index.esm.js.map +1 -1
- package/build/index.js +10 -5
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -5834,11 +5834,16 @@ var DiscountTag = newStyled.div(templateObject_2$13 || (templateObject_2$13 = __
|
|
|
5834
5834
|
var theme = _a.theme;
|
|
5835
5835
|
return theme.component.autoship.discountTag.borderRadius;
|
|
5836
5836
|
});
|
|
5837
|
+
var getSelectedBorder = function (_a) {
|
|
5838
|
+
var name = _a.name, colors = _a.colors;
|
|
5839
|
+
if (name === 'TheSpaDr') {
|
|
5840
|
+
return "2px solid ".concat(colors.pallete.primary.color);
|
|
5841
|
+
}
|
|
5842
|
+
return "1.5px solid ".concat(colors.shades['700'].color);
|
|
5843
|
+
};
|
|
5837
5844
|
var ContainerBase = newStyled.div(templateObject_3$S || (templateObject_3$S = __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) {
|
|
5838
5845
|
var selected = _a.selected, theme = _a.theme;
|
|
5839
|
-
return selected
|
|
5840
|
-
? "1.5px solid ".concat(theme.colors.shades['700'].color)
|
|
5841
|
-
: "1px solid ".concat(theme.colors.shades[200].color);
|
|
5846
|
+
return selected ? getSelectedBorder(theme) : "1px solid ".concat(theme.colors.shades[200].color);
|
|
5842
5847
|
}, function (_a) {
|
|
5843
5848
|
var selected = _a.selected;
|
|
5844
5849
|
return selected
|
|
@@ -5882,7 +5887,7 @@ var radioIds = {
|
|
|
5882
5887
|
var DEFAULT_DROPDOWN_OPTIONS = { key: '1', label: '1 Month', value: 1, disabled: false };
|
|
5883
5888
|
var DEFAULT_FREQUENCY_UNIT = 'months';
|
|
5884
5889
|
var AutoshipV2 = function (_a) {
|
|
5885
|
-
var tooltipContent = _a.tooltipContent, tooltipHeader = _a.tooltipHeader, pricing = _a.pricing, frequencyValues = _a.frequencyValues, _b = _a.frequencyUnit, frequencyUnit = _b === void 0 ? DEFAULT_FREQUENCY_UNIT : _b, autoshipBenefits = _a.autoshipBenefits, onChange = _a.onChange, singlePurchaseLabel = _a.singlePurchaseLabel, subscriptionLabel = _a.subscriptionLabel, className = _a.className, closeIcon = _a.closeIcon, _c = _a.currencySymbol, currencySymbol = _c === void 0 ? '$' : _c, discountLabel = _a.discountLabel;
|
|
5890
|
+
var tooltipContent = _a.tooltipContent, tooltipHeader = _a.tooltipHeader, pricing = _a.pricing, frequencyValues = _a.frequencyValues, _b = _a.frequencyUnit, frequencyUnit = _b === void 0 ? DEFAULT_FREQUENCY_UNIT : _b, autoshipBenefits = _a.autoshipBenefits, benefits = _a.benefits, onChange = _a.onChange, singlePurchaseLabel = _a.singlePurchaseLabel, subscriptionLabel = _a.subscriptionLabel, className = _a.className, closeIcon = _a.closeIcon, _c = _a.currencySymbol, currencySymbol = _c === void 0 ? '$' : _c, discountLabel = _a.discountLabel;
|
|
5886
5891
|
var theme = useTheme();
|
|
5887
5892
|
var dropdownOptions = frequencyValues && (frequencyValues === null || frequencyValues === void 0 ? void 0 : frequencyValues.length) > 0
|
|
5888
5893
|
? frequencyValues.map(function (value) {
|
|
@@ -5898,7 +5903,7 @@ var AutoshipV2 = function (_a) {
|
|
|
5898
5903
|
var autoShipSaving = Math.floor(listPrice - autoshipFinalPrice);
|
|
5899
5904
|
var autoShipPctOverListPrice = (autoShipSaving / listPrice) * 100;
|
|
5900
5905
|
var autoShipPctOverListPriceRounded = Math.round(autoShipPctOverListPrice / 5) * 5;
|
|
5901
|
-
var updatedAutoshipBenefits = __spreadArray([
|
|
5906
|
+
var updatedAutoshipBenefits = benefits !== null && benefits !== void 0 ? benefits : __spreadArray([
|
|
5902
5907
|
"Save up to ".concat(autoShipPctOverListPriceRounded, "% always")
|
|
5903
5908
|
], autoshipBenefits.slice(0), true);
|
|
5904
5909
|
var createDataObject = function () {
|