svelte-stripe
Advanced tools
Comparing version 0.0.21 to 0.0.22
@@ -60,11 +60,39 @@ /** @typedef {typeof __propDef.props} AddressProps */ | ||
props: { | ||
allowedCountries: import('@stripe/stripe-js').StripeAddressElementOptions["allowedCountries"]; | ||
blockPoBox: import('@stripe/stripe-js').StripeAddressElementOptions["blockPoBox"]; | ||
defaultValues: import('@stripe/stripe-js').StripeAddressElementOptions["defaultValues"]; | ||
fields: import('@stripe/stripe-js').StripeAddressElementOptions["fields"]; | ||
validation: import('@stripe/stripe-js').StripeAddressElementOptions["validation"]; | ||
contacts: import('@stripe/stripe-js').StripeAddressElementOptions["contacts"]; | ||
display: import('@stripe/stripe-js').StripeAddressElementOptions["display"]; | ||
mode?: import('@stripe/stripe-js').StripeAddressElementOptions["mode"]; | ||
autocomplete?: import('@stripe/stripe-js').StripeAddressElementOptions["autocomplete"]; | ||
allowedCountries: string[]; | ||
blockPoBox: boolean; | ||
defaultValues: { | ||
name?: string; | ||
firstName?: string; | ||
lastName?: string; | ||
address?: { | ||
line1?: string; | ||
line2?: string; | ||
city?: string; | ||
state?: string; | ||
postal_code?: string; | ||
country: string; | ||
}; | ||
phone?: string; | ||
}; | ||
fields: { | ||
phone?: "auto" | "never" | "always"; | ||
}; | ||
validation: { | ||
phone?: { | ||
required: "auto" | "never" | "always"; | ||
}; | ||
}; | ||
contacts: import("@stripe/stripe-js").ContactOption[]; | ||
display: { | ||
name?: "split" | "full" | "organization"; | ||
}; | ||
mode?: import("@stripe/stripe-js").AddressMode; | ||
autocomplete?: { | ||
mode: "automatic"; | ||
} | { | ||
mode: "disabled"; | ||
} | { | ||
mode: "google_maps_api"; | ||
apiKey: string; | ||
}; | ||
focus?: () => void; | ||
@@ -71,0 +99,0 @@ blur?: () => void; |
# Changelog | ||
## 0.0.22 | ||
- Added `font` option to `<Elements/>` | ||
- Allow changing appearance of `<Elements/>` | ||
- Added support for re-mounting components | ||
- Added `locale` option to `<Elements/>` | ||
## 0.0.21 | ||
- Bump `stripe-js` dep to `1.46` | ||
- Bumped `stripe-js` dep to `1.46` | ||
- Migrated to SvelteKit `1.0` | ||
## 0.0.20 | ||
- Address `<Address>` element. See: https://stripe.com/docs/js/elements_object/create_address_element | ||
- Added `<Address>` element. See: https://stripe.com/docs/js/elements_object/create_address_element | ||
@@ -11,0 +19,0 @@ ## 0.0.19 |
@@ -73,2 +73,4 @@ /** @typedef {typeof __propDef.props} ElementsProps */ | ||
loader?: "auto" | "never" | "always"; | ||
fonts?: (import("@stripe/stripe-js").CssFontSource | import("@stripe/stripe-js").CustomFontSource)[]; | ||
locale?: import("@stripe/stripe-js").StripeElementLocale; | ||
}, { | ||
@@ -154,2 +156,4 @@ [evt: string]: CustomEvent<any>; | ||
loader?: "auto" | "never" | "always"; | ||
fonts?: (import("@stripe/stripe-js").CssFontSource | import("@stripe/stripe-js").CustomFontSource)[]; | ||
locale?: import("@stripe/stripe-js").StripeElementLocale; | ||
}; | ||
@@ -156,0 +160,0 @@ events: { |
{ | ||
"name": "svelte-stripe", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"homepage": "https://sveltestripe.com", | ||
@@ -10,4 +10,5 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@sveltejs/adapter-vercel": "1.0.0-next.65", | ||
"@sveltejs/kit": "1.0.0-next.385", | ||
"@sveltejs/adapter-vercel": "^1.0.0", | ||
"@sveltejs/kit": "^1.0.1", | ||
"@sveltejs/package": "^1.0.1", | ||
"@vitejs/plugin-basic-ssl": "^0.1.1", | ||
@@ -29,3 +30,3 @@ "dotenv-cli": "^5.0.0", | ||
"typescript": "^4.6.2", | ||
"vite": "^3.0.0" | ||
"vite": "^4.0.3" | ||
}, | ||
@@ -32,0 +33,0 @@ "type": "module", |
# [svelte-stripe](https://sveltestripe.com) | ||
Everything you need to add Stripe to your Svelte project. 100% [svelte-kit](https://kit.svelte.dev/) compatible. | ||
Everything you need to add Stripe Elements to your Svelte project. 100% [SvelteKit](https://kit.svelte.dev/) compatible. | ||
@@ -18,3 +18,3 @@ > Stripe is now [sponsoring this project](#sponsors) | ||
- `<Card/>`: All-in-one component that has inputs for card number, expiry, cvc, and zip code. | ||
- `<PaymentRequestButton/>`: A GooglePay or ApplePay button, depending on browser. | ||
- `<PaymentRequestButton/>`: A GooglePay, ApplePay, or Link checkout button, depending on browser and user preferences. | ||
- `<Iban/>`: Input field for IBAN (International bank account number). | ||
@@ -24,2 +24,3 @@ - `<Ideal/>`: Input field for iDEAL (payment system used in the Netherlands). | ||
- `<LinkAuthenticationElement/>`: Ability to use saved payment methods stored in [Link](https://link.co). | ||
- `<Address/>`: Component for collecting billing and shipping addresses. | ||
@@ -26,0 +27,0 @@ ## Examples |
@@ -1,2 +0,2 @@ | ||
import type { StripeElements, Stripe } from '@stripe/stripe-js'; | ||
import type { StripeElements, Stripe } from '@stripe/stripe-js' | ||
@@ -6,2 +6,2 @@ interface ElementsContext { | ||
stripe: Stripe | ||
} | ||
} |
@@ -10,3 +10,3 @@ /** | ||
*/ | ||
export function mount(node, type, elements, dispatch, options={}) { | ||
export function mount(node, type, elements, dispatch, options = {}) { | ||
const element = elements.create(type, options) | ||
@@ -25,3 +25,3 @@ | ||
export const isServer = typeof(window) === 'undefined' | ||
export const isServer = typeof window === 'undefined' | ||
@@ -36,5 +36,5 @@ /** | ||
name: 'svelte-stripe-js', | ||
url: 'https://svelte-stripe-js.vercel.app', | ||
url: 'https://svelte-stripe-js.vercel.app' | ||
}) | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
52349
901
71
20