@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 CHANGED
@@ -1172,6 +1172,7 @@ declare type AutoshipPropsV2 = {
1172
1172
  frequencyValues?: Array<number>;
1173
1173
  frequencyUnit?: string;
1174
1174
  autoshipBenefits: string[];
1175
+ benefits?: string[];
1175
1176
  onChange: (values: {
1176
1177
  subscriptionPeriod: number;
1177
1178
  autoship: boolean;
@@ -5808,11 +5808,16 @@ var DiscountTag = newStyled.div(templateObject_2$13 || (templateObject_2$13 = __
5808
5808
  var theme = _a.theme;
5809
5809
  return theme.component.autoship.discountTag.borderRadius;
5810
5810
  });
5811
+ var getSelectedBorder = function (_a) {
5812
+ var name = _a.name, colors = _a.colors;
5813
+ if (name === 'TheSpaDr') {
5814
+ return "2px solid ".concat(colors.pallete.primary.color);
5815
+ }
5816
+ return "1.5px solid ".concat(colors.shades['700'].color);
5817
+ };
5811
5818
  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) {
5812
5819
  var selected = _a.selected, theme = _a.theme;
5813
- return selected
5814
- ? "1.5px solid ".concat(theme.colors.shades['700'].color)
5815
- : "1px solid ".concat(theme.colors.shades[200].color);
5820
+ return selected ? getSelectedBorder(theme) : "1px solid ".concat(theme.colors.shades[200].color);
5816
5821
  }, function (_a) {
5817
5822
  var selected = _a.selected;
5818
5823
  return selected
@@ -5856,7 +5861,7 @@ var radioIds = {
5856
5861
  var DEFAULT_DROPDOWN_OPTIONS = { key: '1', label: '1 Month', value: 1, disabled: false };
5857
5862
  var DEFAULT_FREQUENCY_UNIT = 'months';
5858
5863
  var AutoshipV2 = function (_a) {
5859
- 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;
5864
+ 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;
5860
5865
  var theme = useTheme();
5861
5866
  var dropdownOptions = frequencyValues && (frequencyValues === null || frequencyValues === void 0 ? void 0 : frequencyValues.length) > 0
5862
5867
  ? frequencyValues.map(function (value) {
@@ -5872,7 +5877,7 @@ var AutoshipV2 = function (_a) {
5872
5877
  var autoShipSaving = Math.floor(listPrice - autoshipFinalPrice);
5873
5878
  var autoShipPctOverListPrice = (autoShipSaving / listPrice) * 100;
5874
5879
  var autoShipPctOverListPriceRounded = Math.round(autoShipPctOverListPrice / 5) * 5;
5875
- var updatedAutoshipBenefits = __spreadArray([
5880
+ var updatedAutoshipBenefits = benefits !== null && benefits !== void 0 ? benefits : __spreadArray([
5876
5881
  "Save up to ".concat(autoShipPctOverListPriceRounded, "% always")
5877
5882
  ], autoshipBenefits.slice(0), true);
5878
5883
  var createDataObject = function () {