fulldev-ui 0.5.0-beta.12 → 0.5.0-beta.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fulldev-ui",
3
- "version": "0.5.0-beta.12",
3
+ "version": "0.5.0-beta.14",
4
4
  "description": "A component library built for Astro",
5
5
  "homepage": "https://ui.full.dev",
6
6
  "bugs": "https://github.com/fulldotdev/ui/issues",
@@ -62,6 +62,7 @@ const { ...rest } = Astro.props
62
62
  </style>
63
63
 
64
64
  <script>
65
+ import { SITE_URL, STRIPE_RESTRICTED_KEY } from 'astro:env/client'
65
66
  import { $cart } from 'fulldev-ui/stores/cart.ts'
66
67
  import { formatPrice } from 'fulldev-ui/utils/cart'
67
68
  import Stripe from 'stripe'
@@ -78,8 +79,8 @@ const { ...rest } = Astro.props
78
79
  }
79
80
 
80
81
  document.addEventListener('astro:page-load', () => {
81
- const stripe = new Stripe(import.meta.env.STRIPE_RESTRICTED_KEY)
82
- if (stripe) return
82
+ const stripe = new Stripe(STRIPE_RESTRICTED_KEY)
83
+ if (!stripe) return
83
84
  setPrice($cart.get())
84
85
 
85
86
  $cart.subscribe((items: any) => {
@@ -92,7 +93,7 @@ const { ...rest } = Astro.props
92
93
  const items = $cart.get()
93
94
 
94
95
  const checkoutConfig = {
95
- success_url: `${import.meta.env.PUBLIC_SITE_URL}/checkout`,
96
+ success_url: `${SITE_URL}/checkout`,
96
97
  mode: 'payment',
97
98
  customer_creation: 'always',
98
99
  shipping_address_collection: {
@@ -128,7 +129,7 @@ const { ...rest } = Astro.props
128
129
  currency: 'eur',
129
130
  product_data: {
130
131
  name: item.name,
131
- images: [Astro.site ? Astro.site.href + item.image : undefined],
132
+ images: [SITE_URL + item.image],
132
133
  },
133
134
  unit_amount: Math.round(item.price * 100),
134
135
  },
@@ -40,7 +40,6 @@ const mergedMenu = [buttonsGroup, ...(menu || [])] as typeof menu
40
40
  ---
41
41
 
42
42
  <Button
43
- if={ifProp}
44
43
  variant="secondary"
45
44
  class:list={['drawer-button', `${id}-button`]}
46
45
  onclick={`document.getElementById('${id}').showModal()`}
@@ -51,7 +50,6 @@ const mergedMenu = [buttonsGroup, ...(menu || [])] as typeof menu
51
50
  />
52
51
 
53
52
  <Element
54
- if={ifProp}
55
53
  onclick={`event.target === this && this.close()`}
56
54
  class:list="drawer"
57
55
  as="dialog"
@@ -53,6 +53,11 @@ const {
53
53
  variant="link"
54
54
  />
55
55
  {themeselect && <ThemeSelect />}
56
+
57
+ <Cart
58
+ if={cart}
59
+ heading={cart}
60
+ />
56
61
  <Drawer
57
62
  icon="menu-2"
58
63
  id="menu"
@@ -61,10 +66,6 @@ const {
61
66
  {buttons}
62
67
  {menu}
63
68
  />
64
- <Cart
65
- if={cart}
66
- heading={cart}
67
- />
68
69
  </Element>
69
70
 
70
71
  <style lang="scss" is:global>
@@ -236,6 +236,7 @@ const Component =
236
236
 
237
237
  .segment {
238
238
  flex-direction: row;
239
+ flex-wrap: wrap;
239
240
  justify-content: space-between;
240
241
  width: 100%;
241
242
  }