@payrails/web-sdk 4.1.0-RC.2 → 4.1.0-RC.4

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.2",
3
+ "version": "4.1.0-RC.4",
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
@@ -500,7 +500,6 @@ interface StoreInstrumentElementOptions extends ElementOptions {
500
500
  };
501
501
  styles?: {
502
502
  storeInstrumentCheckbox?: Partial<CSSStyleDeclaration>;
503
- storeInsrtumentCheckboxClassName?: string;
504
503
  };
505
504
  events?: PayrailsSDKEvents;
506
505
  }
@@ -736,7 +735,6 @@ interface DropinElementEvents {
736
735
  interface DropinElementStyles {
737
736
  base?: Partial<CSSStyleDeclaration>;
738
737
  active?: Partial<CSSStyleDeclaration>;
739
- className?: string;
740
738
  }
741
739
  declare abstract class DropinElement extends PayrailsElement {
742
740
  protected events?: DropinElementEvents | undefined;
@@ -764,8 +762,9 @@ declare class GenericRedirectButton extends PayrailsElement {
764
762
  private sdkConfig;
765
763
  private execution;
766
764
  protected options: GenericRedirectButtonOptions;
765
+ private readonly returnLinks?;
767
766
  private button;
768
- constructor(sdkConfig: SdkConfiguration, execution: WorkflowExecution, options: GenericRedirectButtonOptions);
767
+ constructor(sdkConfig: SdkConfiguration, execution: WorkflowExecution, options: GenericRedirectButtonOptions, returnLinks?: RedirectReturnLinks | undefined);
769
768
  private paymentExecutor;
770
769
  private onClick;
771
770
  private configureButton;
@@ -785,8 +784,9 @@ interface GenericRedirectDropinOptions {
785
784
  declare class GenericRedirectDropin extends DropinElement {
786
785
  private sdkConfig;
787
786
  private execution;
787
+ private readonly returnLinks?;
788
788
  protected component: GenericRedirectButton;
789
- constructor(sdkConfig: SdkConfiguration, execution: WorkflowExecution, options?: GenericRedirectDropinOptions);
789
+ constructor(sdkConfig: SdkConfiguration, execution: WorkflowExecution, options?: GenericRedirectDropinOptions, returnLinks?: RedirectReturnLinks | undefined);
790
790
  }
791
791
 
792
792
  interface GooglePayDropinOptions extends GooglePayButtonOptions {
@@ -891,10 +891,7 @@ interface DropinOptions {
891
891
  clientDomain?: string;
892
892
  } & StorablePaymentMethodConfiguration;
893
893
  };
894
- returnInfo?: {
895
- success: string;
896
- error: string;
897
- };
894
+ returnInfo?: RedirectReturnLinks;
898
895
  events?: PayrailsSDKEvents;
899
896
  translations?: {
900
897
  googlePayButton?: GooglePayDropinOptions['translations'];
@@ -910,7 +907,6 @@ interface DropinOptions {
910
907
  styles?: {
911
908
  container?: {
912
909
  styles?: Partial<CSSStyleDeclaration>;
913
- className?: string;
914
910
  };
915
911
  element?: DropinElementStyles;
916
912
  googlePayButton?: GooglePayButtonOptions['styles'];