@bunnyapp/components 1.8.0-beta.57 → 1.8.0-beta.58

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.
@@ -1,7 +1,10 @@
1
1
  import type { Appearance as StripeAppearance, StripeElementsOptions } from '@stripe/stripe-js';
2
2
  import type { ResolvedAppearance } from '@/ui/appearance/resolveAppearance';
3
- /** The resolved appearance in Stripe's terms, so the Payment Element is drawn like the form's own fields. */
4
- export declare function toStripeAppearance({ variables, customerVariables, rules, sharedSelectors, pageFontFamily, }: ResolvedAppearance): StripeAppearance;
3
+ /**
4
+ * The resolved appearance in Stripe's terms, so the Payment Element is drawn like the form's own fields.
5
+ * `pageFontFamily` is the font our text inherits from the page, for when the customer set none.
6
+ */
7
+ export declare function toStripeAppearance({ variables, customerVariables, rules, sharedSelectors }: ResolvedAppearance, pageFontFamily?: string): StripeAppearance;
5
8
  /** `appearance` and `fonts` for Stripe's `<Elements>`. `fonts` can't change once the group is created. */
6
9
  export declare function useStripeAppearance(): {
7
10
  appearance: StripeAppearance;
@@ -2,6 +2,8 @@ import { ReactNode, type CSSProperties } from 'react';
2
2
  import { type ResolvedAppearance } from './resolveAppearance';
3
3
  import type { Appearance } from './types';
4
4
  export declare function useResolvedAppearance(): ResolvedAppearance;
5
+ /** The font our text inherits from the page, for a payment provider's fields, which can't inherit it. */
6
+ export declare function usePageFontFamily(): string | undefined;
5
7
  /** The class of the nearest root, for overlays that render outside it. Empty outside a root. */
6
8
  export declare function useAppearanceScope(): string;
7
9
  /**
@@ -17,8 +17,6 @@ export type ResolvedAppearance = {
17
17
  /** The selectors the payment provider's fields have too (on a `SHARED_ROOTS` root); their rules are handed over as they are. */
18
18
  sharedSelectors: string[];
19
19
  fonts: AppearanceFont[] | undefined;
20
- /** The font our text inherits from the page, once measured. */
21
- pageFontFamily: string | undefined;
22
20
  };
23
21
  /**
24
22
  * `over` merged onto `base`: variables spread, rules per selector then per property, fonts
@@ -31,4 +29,4 @@ export declare function mergeAppearances(base?: Appearance, over?: Appearance):
31
29
  * customer's rules as given. Our CSS emits the two as separate blocks, defaults first; the payment
32
30
  * provider's appearance is made from the two merged.
33
31
  */
34
- export declare function resolveAppearance(brand: Brand, isMobile: boolean, appearance?: Appearance, pageFontFamily?: string): ResolvedAppearance;
32
+ export declare function resolveAppearance(brand: Brand, isMobile: boolean, appearance?: Appearance): ResolvedAppearance;