@payrails/web-sdk 4.1.0-RC.3 → 4.1.0-RC.5

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": "@payrails/web-sdk",
3
- "version": "4.1.0-RC.3",
3
+ "version": "4.1.0-RC.5",
4
4
  "description": "SDK providing tokenization options on the client for merchants",
5
5
  "main": "index.js",
6
6
  "types": "payrails.d.ts",
@@ -158,32 +158,144 @@
158
158
  }
159
159
 
160
160
  #payrails-dropin-component {
161
- background: #ffffff;
162
- box-shadow:
163
- 0px 0px 1px rgba(66, 71, 76, 0.32),
164
- 0px 4px 8px rgba(66, 71, 76, 0.06),
165
- 0px 8px 48px #eeeeee;
166
- border-radius: 16px;
167
- border: 1px solid #eae8ee;
168
- width: 100%;
161
+ border-radius: 0;
162
+ box-shadow: none;
163
+ background-color: rgba(246, 247, 248, 1);
169
164
 
170
165
  display: flex;
171
166
  flex-direction: column;
172
167
  align-items: flex-start;
173
168
  padding: 24px;
174
169
  position: relative;
170
+ border: 1px solid rgb(223, 224, 225);
171
+ }
172
+
173
+ .payrails-dropin-item {
174
+ border-radius: 0;
175
+ background-color: white;
176
+ padding: 20px;
177
+ transition: border 500ms ease-out;
178
+ width: 100%;
179
+ border: 1px solid rgb(223, 224, 225);
180
+ }
181
+
182
+ .payrails-dropin-item:hover {
183
+ border-color: black;
184
+ }
185
+
186
+ .payrails-dropin-item.active {
187
+ border-color: black;
188
+ }
189
+
190
+ .payrails-dropin-item button {
191
+ background-color: rgba(25, 25, 25, 1);
192
+ width: 100%;
193
+ border-radius: 0;
194
+ color: white;
195
+ text-transform: uppercase;
196
+ font-weight: medium;
197
+ padding: 20px;
198
+ height: auto;
199
+ cursor: pointer;
200
+ }
201
+
202
+ .payrails-dropin-item button:hover:not([disabled], .black) {
203
+ background-color: rgba(59, 64, 71, 1);
175
204
  }
176
205
 
177
206
  .payrails-dropin-item input[type='radio'] {
178
- width: auto;
207
+ appearance: none;
208
+ -webkit-appearance: none;
209
+ -moz-appearance: none;
210
+ width: 20px !important;
211
+ height: 20px !important;
212
+ border: 2px solid rgba(140, 145, 152, 0.5);
213
+ border-radius: 50%;
214
+ padding: 2px;
215
+ cursor: pointer;
216
+ background-clip: padding-box;
217
+ position: relative;
179
218
  margin-right: 8px;
180
219
  }
181
220
 
182
- .payrails-dropin-item {
183
- border: 1px solid #eae8ee;
221
+ .payrails-dropin-item input[type='radio']:checked:after {
222
+ content: '';
223
+ display: block;
224
+ width: 10px;
225
+ height: 10px;
226
+ background-color: rgba(25, 25, 25, 1);
227
+ border-radius: 50%;
228
+ position: absolute;
229
+ top: 50%;
230
+ left: 50%;
231
+ transform: translate(-50%, -50%);
232
+ }
233
+
234
+ .payrails-dropin-item input[type='radio']:checked {
235
+ border-color: rgba(103, 109, 117, 1);
236
+ }
237
+
238
+ .payrails-dropin-item input[type='radio']:focus {
239
+ box-shadow: 0 0 0 2px rgba(140, 145, 152, 0.5);
240
+ }
241
+
242
+ .payrails-dropin-item input[type='radio']:hover,
243
+ .payrails-dropin-item:hover input[type='radio'] {
244
+ border-color: rgba(140, 145, 152, 0.8);
245
+ }
246
+
247
+ .payrails-dropin-item label {
248
+ display: flex;
249
+ flex-direction: row;
250
+ align-items: center;
251
+ }
252
+
253
+ .payrails-dropin-item.payrails-store-instrument {
254
+ display: block;
255
+ margin-top: 20px !important;
256
+ }
257
+
258
+ .payrails-dropin-item .payrails-store-instrument input[type='checkbox'] {
259
+ appearance: none;
260
+ -webkit-appearance: none;
261
+ -moz-appearance: none;
262
+ width: 20px !important;
263
+ height: 20px !important;
264
+ border: 2px solid rgba(140, 145, 152, 0.5);
184
265
  border-radius: 4px;
185
- padding: 16px;
186
- width: 100%;
266
+ padding: 2px;
267
+ cursor: pointer;
268
+ background-clip: padding-box;
269
+ position: relative;
270
+ }
271
+
272
+ .payrails-dropin-item
273
+ .payrails-store-instrument
274
+ input[type='checkbox']:checked:after {
275
+ content: '\2714';
276
+ display: block;
277
+ color: white;
278
+ position: absolute;
279
+ font-size: 10px;
280
+ top: 50%;
281
+ left: 50%;
282
+ transform: translate(-50%, -50%);
283
+ }
284
+
285
+ .payrails-dropin-item
286
+ .payrails-store-instrument
287
+ input[type='checkbox']:checked {
288
+ border-color: rgba(103, 109, 117, 1);
289
+ background-color: rgba(25, 25, 25, 1);
290
+ }
291
+
292
+ .payrails-dropin-item .payrails-store-instrument input[type='checkbox']:focus {
293
+ box-shadow: 0 0 0 2px rgba(140, 145, 152, 0.5);
294
+ }
295
+
296
+ .payrails-dropin-item .payrails-store-instrument input[type='checkbox']:hover,
297
+ .payrails-dropin-item .payrails-store-instrument:hover input[type='checkbox'] {
298
+ border-color: rgba(140, 145, 152, 0.8);
187
299
  }
188
300
 
189
301
  #payrails-dropin-component * {
package/payrails.d.ts CHANGED
@@ -475,7 +475,7 @@ interface Mountable {
475
475
  }
476
476
  interface ElementOptions {
477
477
  id?: string;
478
- className?: string;
478
+ className?: string | string[];
479
479
  styles?: Partial<CSSStyleDeclaration>;
480
480
  }
481
481
  declare class PayrailsElement implements Mountable {
@@ -591,7 +591,6 @@ interface CardFormOptions extends StoreInstrumentElementOptions {
591
591
  wrapper?: Partial<CSSStyleDeclaration>;
592
592
  base?: Partial<CSSStyleDeclaration>;
593
593
  storeCardCheckbox?: Partial<CSSStyleDeclaration>;
594
- storeInstrumentCheckbox?: Partial<CSSStyleDeclaration>;
595
594
  errorTextStyles?: {
596
595
  base: Partial<CSSStyleDeclaration>;
597
596
  };
@@ -601,7 +600,7 @@ interface CardFormOptions extends StoreInstrumentElementOptions {
601
600
  labels?: {
602
601
  [key in ElementType | 'all']?: Partial<CSSStyleDeclaration>;
603
602
  };
604
- };
603
+ } & StoreInstrumentElementOptions['styles'];
605
604
  }
606
605
  declare class CardForm extends PayrailsElementWithStoreInstrumentCheckbox {
607
606
  private readonly collectContainer;
@@ -712,8 +711,7 @@ interface GooglePayButtonOptions extends StoreInstrumentElementOptions {
712
711
  buttonType?: google.payments.api.ButtonType;
713
712
  buttonSizeMode?: google.payments.api.ButtonSizeMode;
714
713
  buttonLocale?: string;
715
- storeInstrumentCheckbox?: Partial<CSSStyleDeclaration>;
716
- };
714
+ } & StoreInstrumentElementOptions['styles'];
717
715
  }
718
716
  declare class GooglePayButton extends PayrailsElementWithStoreInstrumentCheckbox {
719
717
  private sdkConfig;
@@ -812,8 +810,7 @@ interface PaypalButtonOptions extends StoreInstrumentElementOptions {
812
810
  label?: 'paypal' | 'checkout' | 'buynow' | 'pay' | 'installment' | 'subscribe' | 'donate';
813
811
  shape?: 'rect' | 'pill';
814
812
  tagline?: boolean;
815
- storeInstrumentCheckbox?: Partial<CSSStyleDeclaration>;
816
- };
813
+ } & StoreInstrumentElementOptions['styles'];
817
814
  }
818
815
  declare class PaypalButton extends PayrailsElementWithStoreInstrumentCheckbox {
819
816
  private sdkConfig;
@@ -875,6 +872,7 @@ declare class Dropin extends PayrailsElement {
875
872
  private onAuthorizeSuccess;
876
873
  private onAuthorizeFailed;
877
874
  private isStoredInstrumentEnabled;
875
+ private applyStyles;
878
876
  }
879
877
  interface StorablePaymentMethodConfiguration extends StoreInstrumentElementOptions {
880
878
  showStoredInstruments?: boolean;
@@ -907,6 +905,9 @@ interface DropinOptions {
907
905
  genericRedirect?: GenericRedirectDropinOptions['translations'];
908
906
  };
909
907
  styles?: {
908
+ container?: {
909
+ styles?: Partial<CSSStyleDeclaration>;
910
+ };
910
911
  element?: DropinElementStyles;
911
912
  googlePayButton?: GooglePayButtonOptions['styles'];
912
913
  paypalButton?: PaypalDropinOptions['styles'];