@rebilly/instruments 3.24.0-beta.0 → 3.24.2-beta.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebilly/instruments",
3
- "version": "3.24.0-beta.0",
3
+ "version": "3.24.2-beta.0",
4
4
  "author": "Rebilly",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
package/src/i18n/en.json CHANGED
@@ -17,6 +17,10 @@
17
17
  },
18
18
  "loaderMessages": {
19
19
  "processingPayment": "Processing payment instrument."
20
+ },
21
+ "bumpOffer": {
22
+ "title": "Yes, I want to upgrade!",
23
+ "startingAt": "Starting at {basePrice}"
20
24
  }
21
25
  },
22
26
  "paymentMethods": {
package/src/i18n/es.json CHANGED
@@ -14,6 +14,10 @@
14
14
  "popupOverlayText": "Haga clic aquí para mostrar la ventana emergente",
15
15
  "error": {
16
16
  "noPaymentMethods": "No hay métodos de pago disponibles para esta transacción, por favor, póngase en contacto con el servicio de asistencia."
17
+ },
18
+ "bumpOffer": {
19
+ "title": "¡Sí! Me gustaría actualizar!",
20
+ "startingAt": "A partir de {basePrice}"
17
21
  }
18
22
  },
19
23
  "paymentMethods": {
@@ -200,6 +200,14 @@ export const vars = (theme) => `
200
200
  display: inline-block;
201
201
  }
202
202
 
203
+ /* Components. Icons
204
+ ------------------------------------------------------------ */
205
+ .rebilly-instruments-icon {
206
+ width: var(--rebilly-fontLineHeightBase);
207
+ height: var(--rebilly-fontLineHeightBase);
208
+ fill: var(--rebilly-colorText);
209
+ }
210
+
203
211
  /* Components. Forms. Checkboxes
204
212
  ------------------------------------------------------------ */
205
213
  .rebilly-instruments-form-field-checkbox {
@@ -665,82 +673,4 @@ export const vars = (theme) => `
665
673
  .rebilly-instruments-bump-offer-line-item-price-breakdown-unit-price {
666
674
  color: var(--rebilly-colorText);
667
675
  }
668
-
669
- .rebilly-instruments-bump-offer-breakdown {
670
- padding: var(--rebilly-spacingS) 0;
671
- border-bottom: 2px solid var(--rebilly-colorMutedBorder);
672
- }
673
-
674
- .rebilly-instruments-bump-offer-breakdown table {
675
- width: 100%;
676
- color: inherit;
677
- }
678
-
679
- .rebilly-instruments-bump-offer-breakdown table colgroup col:first-child {
680
- width: 85%;
681
- }
682
-
683
- .rebilly-instruments-bump-offer-breakdown table colgroup col {
684
- width: 15%;
685
- }
686
-
687
- .rebilly-instruments-bump-offer-breakdown table tr td {
688
- text-align: right;
689
- }
690
-
691
- .rebilly-instruments-bump-offer-breakdown table tr td:first-child {
692
- padding-right: var(--rebilly-spacingS);
693
- font-weight: 500;
694
- }
695
-
696
- .rebilly-instruments-bump-offer-breakdown-total {
697
- padding-top: var(--rebilly-spacingXs);
698
- margin: var(--rebilly-spacingS) 0 0;
699
- display: flex;
700
- align-items: center;
701
- }
702
-
703
- .rebilly-instruments-bump-offer-breakdown-total-amount {
704
- flex: 1 2 80%;
705
- font-size: var(--rebilly-fontSizeL);
706
- font-weight: var(--rebilly-headingFontWeight);
707
- text-align: right;
708
- letter-spacing: -0.8px;
709
- line-height: 1;
710
- }
711
-
712
- .rebilly-instruments-bump-offer-breakdown-total-amount-has-due {
713
- text-decoration: line-through;
714
- font-weight: var(--rebilly-fontWeightBase);
715
- }
716
-
717
- .rebilly-instruments-bump-offer-breakdown-total-amount-currency {
718
- font-size: var(--rebilly-fontSizeS);
719
- color: var(--rebilly-colorMutedText);
720
- margin-right: var(--rebilly-spacingXs);
721
- font-weight: var(--rebilly-fontWeightBase);
722
- }
723
-
724
- .rebilly-instruments-bump-offer-breakdown-amount-due {
725
- padding-top: var(--rebilly-spacingXs);
726
- margin: var(--rebilly-spacingS) 0 0;
727
- display: flex;
728
- align-items: center;
729
- }
730
-
731
- .rebilly-instruments-bump-offer-breakdown-amount-due-amount {
732
- flex: 1 2 80%;
733
- font-size: var(--rebilly-fontSizeL);
734
- font-weight: var(--rebilly-headingFontWeight);
735
- text-align: right;
736
- letter-spacing: -0.8px;
737
- line-height: 1;
738
- }
739
-
740
- .rebilly-instruments-bump-offer-breakdown-amount-due-amount-currency {
741
- font-size: var(--rebilly-fontSizeS);
742
- color: var(--rebilly-colorMutedText);
743
- margin-right: var(--rebilly-spacingXs);
744
- font-weight: var(--rebilly-fontWeightBase);
745
- }
746
676
  `;
@@ -14,7 +14,10 @@ function lineItem({offer}) {
14
14
  : plan.pricing.price;
15
15
 
16
16
  const basePrice = formatCurrency(planPricing, plan.currency);
17
- return plan.pricing.isBracket ? `Starting at ${basePrice}` : basePrice;
17
+ return plan.pricing.isBracket
18
+ ? state.translate.getTranslation('form.bumpOffer.startingAt')
19
+ .replace('{basePrice}', basePrice)
20
+ : basePrice;
18
21
  }
19
22
 
20
23
  const thumbnail = (item) => rif(item.thumbnail, `
@@ -72,7 +75,9 @@ function lineItem({offer}) {
72
75
  export function mountBumpOffer ({container}) {
73
76
  container.insertAdjacentHTML('beforeEnd', `
74
77
  <label for="rebilly-instruments-bump-offer" class="rebilly-instruments-form-field-checkbox">
75
- <div class="rebilly-instruments-bump-offer-label">Yes, I want to upgrade!</div>
78
+ <div class="rebilly-instruments-bump-offer-label" data-rebilly-i18n="form.bumpOffer.title">
79
+ ${state.translate.getTranslation('form.bumpOffer.title')}
80
+ </div>
76
81
  <input
77
82
  type="checkbox"
78
83
  id="rebilly-instruments-bump-offer"