@betterstore/react 0.2.10 → 0.2.13

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/components/checkout-embed/appearance.d.ts +24 -0
  3. package/dist/components/checkout-embed/checkout-form-loading.d.ts +2 -0
  4. package/dist/components/checkout-embed/checkout-form.d.ts +7 -3
  5. package/dist/components/checkout-embed/checkout-schema.d.ts +143 -72
  6. package/dist/components/checkout-embed/index.d.ts +10 -10
  7. package/dist/components/checkout-embed/steps/customer/address-input.d.ts +2 -0
  8. package/dist/components/checkout-embed/steps/customer/address-utils.d.ts +2 -0
  9. package/dist/components/checkout-embed/steps/customer/form.d.ts +8 -0
  10. package/dist/components/checkout-embed/steps/payment/form.d.ts +14 -0
  11. package/dist/components/checkout-embed/steps/shipping/form.d.ts +13 -0
  12. package/dist/components/checkout-embed/steps/summary/index.d.ts +9 -0
  13. package/dist/components/checkout-embed/steps/summary/loading.d.ts +2 -0
  14. package/dist/components/checkout-embed/useFormStore.d.ts +20 -0
  15. package/dist/components/compounds/form/country-dropdown.d.ts +22 -0
  16. package/dist/components/compounds/form/form-messages.d.ts +7 -0
  17. package/dist/components/compounds/form/input-group.d.ts +8 -0
  18. package/dist/components/compounds/form/submit-button.d.ts +8 -0
  19. package/dist/components/ui/command.d.ts +16 -0
  20. package/dist/components/ui/dialog.d.ts +13 -0
  21. package/dist/components/ui/dropdown-menu.d.ts +25 -0
  22. package/dist/components/ui/form.d.ts +1 -1
  23. package/dist/components/ui/popover.d.ts +7 -0
  24. package/dist/components/ui/skeleton.d.ts +3 -0
  25. package/dist/i18n/index.d.ts +4 -0
  26. package/dist/index.cjs.js +31588 -609
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.mjs +31586 -606
  29. package/dist/lib/betterstore.d.ts +10 -0
  30. package/dist/lib/error-message-utils.d.ts +4 -0
  31. package/dist/types.d.ts +1 -0
  32. package/package.json +15 -2
  33. package/rollup.config.mjs +39 -1
  34. package/dist/components/checkout-embed/customer/form.d.ts +0 -9
  35. package/dist/components/checkout-embed/payment/form.d.ts +0 -12
  36. package/dist/components/checkout-embed/shipping/form.d.ts +0 -11
  37. package/dist/components/checkout-embed/summary/index.d.ts +0 -8
  38. package/dist/components/checkout-embed/useLocalStorage.d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.2.13
4
+
5
+ ### Patch Changes
6
+
7
+ - bug fixes
8
+
9
+ ## 0.2.12
10
+
11
+ ### Patch Changes
12
+
13
+ - types fix, loading skeleton added
14
+
15
+ ## 0.2.11
16
+
17
+ ### Patch Changes
18
+
19
+ - base functionality
20
+
3
21
  ## 0.2.10
4
22
 
5
23
  ### Patch Changes
@@ -0,0 +1,24 @@
1
+ export type Themes = "dark" | "light";
2
+ export type AppearanceConfig = {
3
+ theme?: Themes;
4
+ borderRadius?: number;
5
+ font?: string;
6
+ colors?: {
7
+ background?: string;
8
+ foreground?: string;
9
+ primary?: string;
10
+ primaryForeground?: string;
11
+ secondary?: string;
12
+ secondaryForeground?: string;
13
+ muted?: string;
14
+ mutedForeground?: string;
15
+ accent?: string;
16
+ accentForeground?: string;
17
+ destructive?: string;
18
+ border?: string;
19
+ ring?: string;
20
+ };
21
+ };
22
+ export default function Appearance({ appearance, }: {
23
+ appearance?: AppearanceConfig;
24
+ }): null;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export default function CheckoutFormLoading(): React.JSX.Element;
@@ -1,9 +1,13 @@
1
+ import { CheckoutSession } from "@betterstore/sdk";
1
2
  import React from "react";
2
- import type { CheckoutFormData } from "./checkout-schema";
3
3
  interface CheckoutFormProps {
4
4
  checkoutId: string;
5
- onComplete?: (data: CheckoutFormData) => void;
5
+ onSuccess: () => void;
6
+ onError: () => void;
6
7
  cancelUrl: string;
8
+ clientSecret: string;
9
+ customer?: CheckoutSession["customer"];
10
+ currency: string;
7
11
  }
8
- export default function CheckoutForm({ checkoutId, onComplete, cancelUrl, }: CheckoutFormProps): React.JSX.Element;
12
+ export default function CheckoutForm({ checkoutId, onSuccess, onError, cancelUrl, clientSecret, customer, currency, }: CheckoutFormProps): React.JSX.Element;
9
13
  export {};
@@ -1,127 +1,198 @@
1
1
  import { z } from "zod";
2
2
  export declare const customerSchema: z.ZodObject<{
3
3
  email: z.ZodString;
4
- marketingConsent: z.ZodOptional<z.ZodBoolean>;
5
- firstName: z.ZodOptional<z.ZodString>;
4
+ firstName: z.ZodString;
6
5
  lastName: z.ZodString;
7
- address: z.ZodString;
8
- apartment: z.ZodOptional<z.ZodString>;
9
- city: z.ZodString;
10
- state: z.ZodString;
11
- zipCode: z.ZodString;
12
- country: z.ZodString;
6
+ address: z.ZodObject<{
7
+ line1: z.ZodString;
8
+ line2: z.ZodOptional<z.ZodString>;
9
+ city: z.ZodString;
10
+ state: z.ZodOptional<z.ZodString>;
11
+ zipCode: z.ZodString;
12
+ country: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ line1: string;
15
+ city: string;
16
+ zipCode: string;
17
+ country: string;
18
+ line2?: string | undefined;
19
+ state?: string | undefined;
20
+ }, {
21
+ line1: string;
22
+ city: string;
23
+ zipCode: string;
24
+ country: string;
25
+ line2?: string | undefined;
26
+ state?: string | undefined;
27
+ }>;
13
28
  saveInfo: z.ZodOptional<z.ZodBoolean>;
29
+ phone: z.ZodString;
14
30
  }, "strip", z.ZodTypeAny, {
15
31
  email: string;
32
+ firstName: string;
16
33
  lastName: string;
17
- address: string;
18
- city: string;
19
- state: string;
20
- zipCode: string;
21
- country: string;
22
- marketingConsent?: boolean | undefined;
23
- firstName?: string | undefined;
24
- apartment?: string | undefined;
34
+ address: {
35
+ line1: string;
36
+ city: string;
37
+ zipCode: string;
38
+ country: string;
39
+ line2?: string | undefined;
40
+ state?: string | undefined;
41
+ };
42
+ phone: string;
25
43
  saveInfo?: boolean | undefined;
26
44
  }, {
27
45
  email: string;
46
+ firstName: string;
28
47
  lastName: string;
29
- address: string;
30
- city: string;
31
- state: string;
32
- zipCode: string;
33
- country: string;
34
- marketingConsent?: boolean | undefined;
35
- firstName?: string | undefined;
36
- apartment?: string | undefined;
48
+ address: {
49
+ line1: string;
50
+ city: string;
51
+ zipCode: string;
52
+ country: string;
53
+ line2?: string | undefined;
54
+ state?: string | undefined;
55
+ };
56
+ phone: string;
37
57
  saveInfo?: boolean | undefined;
38
58
  }>;
39
59
  export declare const shippingMethodSchema: z.ZodObject<{
40
- method: z.ZodEnum<["economy", "standard"]>;
60
+ rateId: z.ZodString;
61
+ name: z.ZodString;
62
+ provider: z.ZodString;
63
+ amount: z.ZodNumber;
41
64
  }, "strip", z.ZodTypeAny, {
42
- method: "economy" | "standard";
65
+ rateId: string;
66
+ name: string;
67
+ provider: string;
68
+ amount: number;
43
69
  }, {
44
- method: "economy" | "standard";
70
+ rateId: string;
71
+ name: string;
72
+ provider: string;
73
+ amount: number;
45
74
  }>;
46
75
  export declare const checkoutSchema: z.ZodObject<{
47
76
  customer: z.ZodObject<{
48
77
  email: z.ZodString;
49
- marketingConsent: z.ZodOptional<z.ZodBoolean>;
50
- firstName: z.ZodOptional<z.ZodString>;
78
+ firstName: z.ZodString;
51
79
  lastName: z.ZodString;
52
- address: z.ZodString;
53
- apartment: z.ZodOptional<z.ZodString>;
54
- city: z.ZodString;
55
- state: z.ZodString;
56
- zipCode: z.ZodString;
57
- country: z.ZodString;
80
+ address: z.ZodObject<{
81
+ line1: z.ZodString;
82
+ line2: z.ZodOptional<z.ZodString>;
83
+ city: z.ZodString;
84
+ state: z.ZodOptional<z.ZodString>;
85
+ zipCode: z.ZodString;
86
+ country: z.ZodString;
87
+ }, "strip", z.ZodTypeAny, {
88
+ line1: string;
89
+ city: string;
90
+ zipCode: string;
91
+ country: string;
92
+ line2?: string | undefined;
93
+ state?: string | undefined;
94
+ }, {
95
+ line1: string;
96
+ city: string;
97
+ zipCode: string;
98
+ country: string;
99
+ line2?: string | undefined;
100
+ state?: string | undefined;
101
+ }>;
58
102
  saveInfo: z.ZodOptional<z.ZodBoolean>;
103
+ phone: z.ZodString;
59
104
  }, "strip", z.ZodTypeAny, {
60
105
  email: string;
106
+ firstName: string;
61
107
  lastName: string;
62
- address: string;
63
- city: string;
64
- state: string;
65
- zipCode: string;
66
- country: string;
67
- marketingConsent?: boolean | undefined;
68
- firstName?: string | undefined;
69
- apartment?: string | undefined;
108
+ address: {
109
+ line1: string;
110
+ city: string;
111
+ zipCode: string;
112
+ country: string;
113
+ line2?: string | undefined;
114
+ state?: string | undefined;
115
+ };
116
+ phone: string;
70
117
  saveInfo?: boolean | undefined;
71
118
  }, {
72
119
  email: string;
120
+ firstName: string;
73
121
  lastName: string;
74
- address: string;
75
- city: string;
76
- state: string;
77
- zipCode: string;
78
- country: string;
79
- marketingConsent?: boolean | undefined;
80
- firstName?: string | undefined;
81
- apartment?: string | undefined;
122
+ address: {
123
+ line1: string;
124
+ city: string;
125
+ zipCode: string;
126
+ country: string;
127
+ line2?: string | undefined;
128
+ state?: string | undefined;
129
+ };
130
+ phone: string;
82
131
  saveInfo?: boolean | undefined;
83
132
  }>;
84
133
  shipping: z.ZodObject<{
85
- method: z.ZodEnum<["economy", "standard"]>;
134
+ rateId: z.ZodString;
135
+ name: z.ZodString;
136
+ provider: z.ZodString;
137
+ amount: z.ZodNumber;
86
138
  }, "strip", z.ZodTypeAny, {
87
- method: "economy" | "standard";
139
+ rateId: string;
140
+ name: string;
141
+ provider: string;
142
+ amount: number;
88
143
  }, {
89
- method: "economy" | "standard";
144
+ rateId: string;
145
+ name: string;
146
+ provider: string;
147
+ amount: number;
90
148
  }>;
149
+ customerId: z.ZodOptional<z.ZodString>;
91
150
  }, "strip", z.ZodTypeAny, {
92
151
  customer: {
93
152
  email: string;
153
+ firstName: string;
94
154
  lastName: string;
95
- address: string;
96
- city: string;
97
- state: string;
98
- zipCode: string;
99
- country: string;
100
- marketingConsent?: boolean | undefined;
101
- firstName?: string | undefined;
102
- apartment?: string | undefined;
155
+ address: {
156
+ line1: string;
157
+ city: string;
158
+ zipCode: string;
159
+ country: string;
160
+ line2?: string | undefined;
161
+ state?: string | undefined;
162
+ };
163
+ phone: string;
103
164
  saveInfo?: boolean | undefined;
104
165
  };
105
166
  shipping: {
106
- method: "economy" | "standard";
167
+ rateId: string;
168
+ name: string;
169
+ provider: string;
170
+ amount: number;
107
171
  };
172
+ customerId?: string | undefined;
108
173
  }, {
109
174
  customer: {
110
175
  email: string;
176
+ firstName: string;
111
177
  lastName: string;
112
- address: string;
113
- city: string;
114
- state: string;
115
- zipCode: string;
116
- country: string;
117
- marketingConsent?: boolean | undefined;
118
- firstName?: string | undefined;
119
- apartment?: string | undefined;
178
+ address: {
179
+ line1: string;
180
+ city: string;
181
+ zipCode: string;
182
+ country: string;
183
+ line2?: string | undefined;
184
+ state?: string | undefined;
185
+ };
186
+ phone: string;
120
187
  saveInfo?: boolean | undefined;
121
188
  };
122
189
  shipping: {
123
- method: "economy" | "standard";
190
+ rateId: string;
191
+ name: string;
192
+ provider: string;
193
+ amount: number;
124
194
  };
195
+ customerId?: string | undefined;
125
196
  }>;
126
197
  export type CheckoutFormData = z.infer<typeof checkoutSchema>;
127
198
  export type CustomerFormData = z.infer<typeof customerSchema>;
@@ -1,16 +1,16 @@
1
- import BetterStore from "@betterstore/sdk";
1
+ import { Locale } from "@/i18n";
2
2
  import React from "react";
3
- type BetterStoreClient = () => {
4
- retrieveCheckout: InstanceType<typeof BetterStore>["checkout"]["retrieve"];
5
- updateCheckout: InstanceType<typeof BetterStore>["checkout"]["update"];
6
- getShippingRates: InstanceType<typeof BetterStore>["checkout"]["getShippingRates"];
7
- };
3
+ import { AppearanceConfig } from "./appearance";
8
4
  interface CheckoutEmbedProps {
9
5
  checkoutId: string;
10
- cancelUrl: string;
11
- successUrl: string;
12
- client: BetterStoreClient;
6
+ config: {
7
+ clientSecret: string;
8
+ cancelUrl: string;
9
+ successUrl: string;
10
+ appearance?: AppearanceConfig;
11
+ locale?: Locale;
12
+ };
13
13
  }
14
- declare function CheckoutEmbed({ checkoutId, cancelUrl, successUrl, client, }: CheckoutEmbedProps): React.JSX.Element;
14
+ declare function CheckoutEmbed({ checkoutId, config }: CheckoutEmbedProps): React.JSX.Element;
15
15
  declare const _default: React.MemoExoticComponent<typeof CheckoutEmbed>;
16
16
  export default _default;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export default function AddressInput(): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { CustomerFormData } from "../../checkout-schema";
2
+ export declare const formatAddress: (address: CustomerFormData["address"]) => string;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { type CustomerFormData } from "../../checkout-schema";
3
+ interface CustomerFormProps {
4
+ initialData?: CustomerFormData;
5
+ onSubmit: (data: CustomerFormData) => void;
6
+ }
7
+ export default function CustomerForm({ initialData, onSubmit, }: CustomerFormProps): React.JSX.Element;
8
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ interface PaymentFormProps {
3
+ paymentSecret: string | null;
4
+ onSuccess: () => void;
5
+ onError: () => void;
6
+ onBack: () => void;
7
+ onDoubleBack: () => void;
8
+ contactEmail: string;
9
+ shippingAddress: string;
10
+ shippingProvider: string;
11
+ shippingPrice: string;
12
+ }
13
+ export default function PaymentForm({ paymentSecret, onSuccess, onError, onBack, onDoubleBack, contactEmail, shippingAddress, shippingProvider, shippingPrice, }: PaymentFormProps): React.JSX.Element;
14
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ShippingRate } from "@betterstore/sdk";
2
+ import React from "react";
3
+ import { type ShippingMethodFormData } from "../../checkout-schema";
4
+ interface ShippingMethodFormProps {
5
+ shippingRates: ShippingRate[];
6
+ initialData?: ShippingMethodFormData;
7
+ onSubmit: (data: ShippingMethodFormData) => void;
8
+ onBack: () => void;
9
+ contactEmail: string;
10
+ shippingAddress: string;
11
+ }
12
+ export default function ShippingMethodForm({ shippingRates, initialData, onSubmit, onBack, contactEmail, shippingAddress, }: ShippingMethodFormProps): React.JSX.Element;
13
+ export {};
@@ -0,0 +1,9 @@
1
+ import { CheckoutSession } from "@betterstore/sdk";
2
+ import React from "react";
3
+ export default function CheckoutSummary({ lineItems, shipping, tax, currency, cancelUrl, }: {
4
+ lineItems: CheckoutSession["lineItems"];
5
+ shipping?: number;
6
+ tax?: number;
7
+ currency: string;
8
+ cancelUrl: string;
9
+ }): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export default function CheckoutSummaryLoading(): React.JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { CheckoutFormData } from "./checkout-schema";
2
+ export type CheckoutStep = "customer" | "shipping" | "payment";
3
+ interface FormStore {
4
+ formData: Partial<CheckoutFormData>;
5
+ setFormData: (formData: Partial<CheckoutFormData>) => void;
6
+ step: CheckoutStep;
7
+ setStep: (step: CheckoutStep) => void;
8
+ }
9
+ export declare const useFormStore: (checkoutId: string) => import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<FormStore>, "persist"> & {
10
+ persist: {
11
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<FormStore, FormStore>>) => void;
12
+ clearStorage: () => void;
13
+ rehydrate: () => Promise<void> | void;
14
+ hasHydrated: () => boolean;
15
+ onHydrate: (fn: (state: FormStore) => void) => () => void;
16
+ onFinishHydration: (fn: (state: FormStore) => void) => () => void;
17
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<FormStore, FormStore>>;
18
+ };
19
+ }>;
20
+ export {};
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ export interface Country {
3
+ alpha2: string;
4
+ alpha3: string;
5
+ countryCallingCodes: string[];
6
+ currencies: string[];
7
+ emoji?: string;
8
+ ioc: string;
9
+ languages: string[];
10
+ name: string;
11
+ status: string;
12
+ }
13
+ interface CountryDropdownProps {
14
+ options?: Country[];
15
+ onChange?: (country: Country) => void;
16
+ defaultValue?: string;
17
+ disabled?: boolean;
18
+ placeholder?: string;
19
+ slim?: boolean;
20
+ }
21
+ export declare const CountryDropdown: React.ForwardRefExoticComponent<CountryDropdownProps & React.RefAttributes<HTMLButtonElement>>;
22
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ interface FormMessagesProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ messages?: string[] | string | React.ReactNode;
4
+ type?: "error" | "success";
5
+ }
6
+ export declare function FormMessages({ messages, type, className, ...props }: FormMessagesProps): React.JSX.Element | null;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Input } from "@/components/ui/input";
2
+ import React from "react";
3
+ type InputGroupProps = {
4
+ name: string;
5
+ label?: string;
6
+ } & React.ComponentProps<typeof Input>;
7
+ export default function InputGroup({ name, label, className, ...props }: InputGroupProps): React.JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Button } from "@/components/ui/button";
2
+ import React from "react";
3
+ type SubmitButtonProps = Parameters<typeof Button>[0] & {
4
+ isSubmitting: boolean;
5
+ isValid: boolean;
6
+ };
7
+ export default function SubmitButton({ isSubmitting, isValid, className, variant, children, size, ...props }: SubmitButtonProps): React.JSX.Element;
8
+ export {};
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import { Dialog } from "@/components/ui/dialog";
4
+ declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
5
+ declare function CommandDialog({ title, description, children, ...props }: React.ComponentProps<typeof Dialog> & {
6
+ title?: string;
7
+ description?: string;
8
+ }): React.JSX.Element;
9
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): React.JSX.Element;
10
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): React.JSX.Element;
11
+ declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element;
12
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): React.JSX.Element;
13
+ declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): React.JSX.Element;
14
+ declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): React.JSX.Element;
15
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
16
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,13 @@
1
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
2
+ import * as React from "react";
3
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element;
4
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element;
5
+ declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element;
6
+ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element;
7
+ declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element;
8
+ declare function DialogContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): React.JSX.Element;
9
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;
12
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element;
13
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -0,0 +1,25 @@
1
+ import * as React from "react";
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
4
+ declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
5
+ declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
6
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
7
+ declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): React.JSX.Element;
8
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
9
+ inset?: boolean;
10
+ variant?: "default" | "destructive";
11
+ }): React.JSX.Element;
12
+ declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): React.JSX.Element;
13
+ declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): React.JSX.Element;
14
+ declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): React.JSX.Element;
15
+ declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
16
+ inset?: boolean;
17
+ }): React.JSX.Element;
18
+ declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): React.JSX.Element;
19
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
20
+ declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
21
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
22
+ inset?: boolean;
23
+ }): React.JSX.Element;
24
+ declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): React.JSX.Element;
25
+ export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
@@ -2,7 +2,7 @@ import * as LabelPrimitive from "@radix-ui/react-label";
2
2
  import { Slot } from "@radix-ui/react-slot";
3
3
  import * as React from "react";
4
4
  import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
5
- declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
5
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
6
6
  declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
7
7
  declare const useFormField: () => {
8
8
  invalid: boolean;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
3
+ declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
4
+ declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
5
+ declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
6
+ declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
7
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
3
+ export { Skeleton };
@@ -0,0 +1,4 @@
1
+ import { CheckoutLocale } from "@stripe/stripe-js";
2
+ export type Locale = CheckoutLocale;
3
+ declare const createI18nInstance: (locale?: Locale) => Promise<import("i18next").i18n>;
4
+ export default createI18nInstance;