@primer-io/primer-js 0.1.5 → 0.1.6

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.
@@ -101,7 +101,7 @@ export type ButtonComponentProps = {
101
101
  When true, the button will display a spinner and be disabled */
102
102
  loading?: boolean;
103
103
  /** */
104
- buttonType?: "button" | "submit" | "reset";
104
+ type?: "button" | "submit" | "reset";
105
105
  /** Selection state of the button
106
106
  - default: Not checked
107
107
  - checked: Button is checked */
@@ -274,6 +274,8 @@ export type AchPaymentComponentProps = {
274
274
  };
275
275
 
276
276
  export type CardFormComponentProps = {
277
+ /** */
278
+ "hide-labels"?: boolean;
277
279
  /** Payment managers injected from context */
278
280
  paymentManagers?: InitializedManagersMap;
279
281
  };
@@ -2319,6 +2319,13 @@ export declare class InitializedPayments {
2319
2319
  toArray(): InitializedPaymentMethod[];
2320
2320
  size(): number;
2321
2321
  }
2322
+ export interface OnCheckoutCompletePayload {
2323
+ payment: Payment | null;
2324
+ }
2325
+ export interface OnCheckoutFailurePayload {
2326
+ error: PrimerClientError;
2327
+ payment?: Payment;
2328
+ }
2322
2329
  export interface CardSubmitSuccessPayload {
2323
2330
  result: unknown;
2324
2331
  }
@@ -2330,6 +2337,8 @@ export interface PrimeAchErrorPayload {
2330
2337
  }
2331
2338
  export interface PrimerEvents {
2332
2339
  "primer-state-changed": CustomEvent<SdkStateContext>;
2340
+ "primer-oncheckout-complete": CustomEvent<OnCheckoutCompletePayload>;
2341
+ "primer-oncheckout-failure": CustomEvent<OnCheckoutFailurePayload>;
2333
2342
  "primer-payment-methods-updated": CustomEvent<InitializedPayments>;
2334
2343
  "primer-checkout-initialized": CustomEvent<PrimerHeadlessCheckout>;
2335
2344
  "primer-card-network-change": CustomEvent<CardNetworksContext>;
@@ -2356,6 +2365,8 @@ declare class PrimerEventsController implements ReactiveController {
2356
2365
  dispatchPaymentMethods(paymentMethods: InitializedPayments): void;
2357
2366
  dispatchCheckoutInitialized(checkoutInstance: PrimerHeadlessCheckout): void;
2358
2367
  dispatchCardNetworkChange(network: CardNetworksContext): void;
2368
+ dispatchOnCheckoutComplete(payment: Payment | null): void;
2369
+ dispatchOnCheckoutFailure(error: PrimerClientError, payment?: Payment): void;
2359
2370
  dispatchFormSubmitSuccess(result: unknown): void;
2360
2371
  dispatchFormSubmitErrors(errors: unknown): void;
2361
2372
  }
@@ -3444,6 +3455,8 @@ declare global {
3444
3455
  */
3445
3456
  declare class CardFormComponent extends LitElement {
3446
3457
  static styles: CSSResult[];
3458
+ hideLabels: boolean;
3459
+ updated(changedProperties: Map<string, unknown>): void;
3447
3460
  /**
3448
3461
  * Tracks whether custom content has been provided via slot
3449
3462
  */
@@ -3506,6 +3519,7 @@ export interface CardFormContext {
3506
3519
  validate: () => Promise<Validation>;
3507
3520
  submit: (values?: CardPaymentMethodSubmitValues) => Promise<void>;
3508
3521
  errors?: Validation["validationErrors"];
3522
+ hideLabels?: boolean;
3509
3523
  }
3510
3524
  /**
3511
3525
  * A shared type that ensures the host of a HostedInputController contains