@betterstore/react 0.0.3 → 0.1.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - payment element added
8
+
3
9
  ## 0.0.3
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,56 @@
1
+ export declare const appearance: {
2
+ theme: "flat";
3
+ variables: {
4
+ fontFamily: string;
5
+ borderRadius: string;
6
+ focusOutline: string;
7
+ focusBoxShadow: string;
8
+ colorSuccess: string;
9
+ colorWarning: string;
10
+ colorDanger: string;
11
+ colorBackground: string;
12
+ colorPrimary: string;
13
+ colorText: string;
14
+ colorTextSecondary: string;
15
+ colorTextPlaceholder: string;
16
+ tabIconColor: string;
17
+ tabIconSelectedColor: string;
18
+ };
19
+ rules: {
20
+ ".Input": {
21
+ padding: string;
22
+ border: string;
23
+ backgroundColor: string;
24
+ fontSize: string;
25
+ outline: string;
26
+ };
27
+ ".Input:focus": {
28
+ backgroundColor: string;
29
+ };
30
+ ".Input::placeholder": {
31
+ fontSize: string;
32
+ color: string;
33
+ };
34
+ ".Label": {
35
+ marginBottom: string;
36
+ fontSize: string;
37
+ fontWeight: string;
38
+ };
39
+ ".Input:disabled, .Input--invalid:disabled": {
40
+ cursor: string;
41
+ };
42
+ ".Tab": {
43
+ padding: string;
44
+ border: string;
45
+ backgroundColor: string;
46
+ };
47
+ ".Tab:hover": {
48
+ backgroundColor: string;
49
+ };
50
+ ".Tab--selected, .Tab--selected:focus, .Tab--selected:hover": {
51
+ border: string;
52
+ backgroundColor: string;
53
+ color: string;
54
+ };
55
+ };
56
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ declare const _default: React.MemoExoticComponent<({ onSuccess, onError, children, }: {
3
+ onSuccess?: () => void;
4
+ onError?: () => void;
5
+ children: React.ReactNode;
6
+ }) => React.JSX.Element>;
7
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { StripeElementsOptions } from "@stripe/stripe-js";
2
+ import React from "react";
3
+ declare function PaymentElement({ paymentSecret, checkoutAppearance, onSuccess, onError, children, }: {
4
+ paymentSecret: string;
5
+ checkoutAppearance?: Omit<StripeElementsOptions, "clientSecret" | "mode">;
6
+ onSuccess?: () => void;
7
+ onError?: () => void;
8
+ children: React.ReactNode;
9
+ }): React.JSX.Element;
10
+ declare const _default: React.MemoExoticComponent<typeof PaymentElement>;
11
+ export default _default;
@@ -0,0 +1,6 @@
1
+ interface CheckoutStore {
2
+ isSubmitting: boolean;
3
+ setIsSubmitting: (isSubmitting: boolean) => void;
4
+ }
5
+ export declare const useCheckout: import("zustand").UseBoundStore<import("zustand").StoreApi<CheckoutStore>>;
6
+ export {};