fulldev-ui 0.5.0-beta.8 → 0.6.0-beta.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/.env.example +3 -0
- package/.prettierrc.yaml +1 -0
- package/astro.config.ts +6 -32
- package/package.json +21 -30
- package/pnpm-lock.yaml +696 -2176
- package/public/favicon/android-chrome-192x192.png +0 -0
- package/public/favicon/android-chrome-512x512.png +0 -0
- package/public/favicon/apple-touch-icon.png +0 -0
- package/public/favicon/manifest.webmanifest +7 -3
- package/public/favicon/mstile-150x150.png +0 -0
- package/src/blocks/Banner.astro +6 -19
- package/src/blocks/Colleagues.astro +0 -1
- package/src/blocks/Contact.astro +75 -74
- package/src/blocks/Content.astro +124 -6
- package/src/blocks/Cta.astro +0 -2
- package/src/blocks/Excerpt.astro +0 -2
- package/src/blocks/Footer.astro +107 -3
- package/src/blocks/Hero.astro +238 -9
- package/src/blocks/Intro.astro +89 -11
- package/src/blocks/Prices.astro +1 -1
- package/src/blocks/Product.astro +51 -68
- package/src/blocks/Products.astro +114 -5
- package/src/blocks/Reviews.astro +0 -1
- package/src/blocks/_Contact.astro +112 -0
- package/src/components/Avatar.astro +28 -9
- package/src/components/Avatars.astro +36 -0
- package/src/components/Badge.astro +73 -26
- package/src/components/Badges.astro +16 -23
- package/src/components/Breadcrumb.astro +58 -0
- package/src/components/Button.astro +56 -112
- package/src/components/Buttons.astro +23 -13
- package/src/components/Card.astro +129 -115
- package/src/components/Cards.astro +33 -35
- package/src/components/Carousel.astro +106 -0
- package/src/components/Cart.astro +1 -1
- package/src/components/CartForm.astro +9 -9
- package/src/components/CartList.astro +11 -28
- package/src/components/CartSummary.astro +11 -13
- package/src/components/Channel.astro +40 -22
- package/src/components/Channels.astro +20 -6
- package/src/components/Checkbox.astro +52 -27
- package/src/components/Code.astro +52 -0
- package/src/components/Dialog.astro +2 -2
- package/src/components/Drawer.astro +34 -64
- package/src/components/Element.astro +16 -8
- package/src/components/Form.astro +14 -13
- package/src/components/Gallery.astro +172 -0
- package/src/components/Head.astro +52 -1
- package/src/components/Header.astro +73 -83
- package/src/components/Heading.astro +74 -30
- package/src/components/Icon.astro +25 -30
- package/src/components/Image.astro +23 -38
- package/src/components/Input.astro +59 -53
- package/src/components/Label.astro +20 -15
- package/src/components/Lead.astro +46 -0
- package/src/components/Link.astro +51 -26
- package/src/components/Links.astro +42 -0
- package/src/components/List.astro +41 -16
- package/src/components/LocaleSwitcher.astro +2 -2
- package/src/components/Logo.astro +45 -0
- package/src/components/Menu.astro +21 -17
- package/src/components/Paragraph.astro +38 -0
- package/src/components/Price.astro +1 -1
- package/src/components/Prose.astro +169 -0
- package/src/components/Rating.astro +50 -38
- package/src/components/Search.astro +1 -1
- package/src/components/Section.astro +196 -158
- package/src/components/Select.astro +44 -55
- package/src/components/Sidebar.astro +31 -38
- package/src/components/Social.astro +3 -8
- package/src/components/Socials.astro +9 -5
- package/src/components/Subheader.astro +59 -0
- package/src/components/Switch.astro +72 -29
- package/src/components/Table.astro +1 -1
- package/src/components/Tagline.astro +40 -12
- package/src/components/Text.astro +4 -4
- package/src/components/Textarea.astro +40 -50
- package/src/components/Themer.astro +76 -0
- package/src/components/Toc.astro +24 -32
- package/src/components/Writeup.astro +26 -8
- package/src/components/docs/PropsTable.astro +38 -264
- package/src/components/experimental/Window.astro +5 -57
- package/src/components/sections.astro +1 -1
- package/src/content/pages/blocks/_categories.mdx +1 -1
- package/src/content/pages/blocks/_footer.mdx +1 -1
- package/src/content/pages/blocks/_header.mdx +1 -3
- package/src/content/pages/blocks/_jobs.mdx +1 -1
- package/src/content/pages/blocks/_prices.mdx +1 -1
- package/src/content/pages/blocks/_product.mdx +1 -1
- package/src/content/pages/blocks/_products.mdx +1 -1
- package/src/content/pages/blocks/_stats.mdx +1 -1
- package/src/content/pages/blocks/banner.mdx +1 -1
- package/src/content/pages/blocks/colleagues.mdx +1 -2
- package/src/content/pages/blocks/contact.mdx +1 -1
- package/src/content/pages/blocks/content.mdx +1 -5
- package/src/content/pages/blocks/cta.mdx +1 -9
- package/src/content/pages/blocks/features.mdx +1 -4
- package/src/content/pages/blocks/hero.mdx +1 -4
- package/src/content/pages/blocks/intro.mdx +1 -4
- package/src/content/pages/blocks/posts.mdx +1 -1
- package/src/content/pages/blocks/reviews.mdx +1 -2
- package/src/content/pages/docs/_internationalization.mdx +55 -0
- package/src/content/pages/docs/_using-blocks.mdx +33 -0
- package/src/content/pages/docs/_using-presets.mdx +49 -0
- package/src/content/pages/docs/blocks.mdx +33 -0
- package/src/content/pages/docs/collections/images.mdx +100 -0
- package/src/content/pages/docs/collections/pages.mdx +119 -0
- package/src/content/pages/docs/collections/presets.mdx +60 -0
- package/src/content/pages/docs/collections.mdx +42 -0
- package/src/content/pages/{base/card.mdx → docs/components/_card.mdx} +1 -3
- package/src/content/pages/{base → docs/components}/_switch.mdx +2 -2
- package/src/content/pages/{typography → docs/components}/_tagline.mdx +2 -2
- package/src/content/pages/docs/components/_toggle.mdx +31 -0
- package/src/content/pages/docs/components/avatar.mdx +35 -0
- package/src/content/pages/{base → docs/components}/badge.mdx +27 -8
- package/src/content/pages/docs/components/badges.mdx +47 -0
- package/src/content/pages/{base → docs/components}/button.mdx +29 -10
- package/src/content/pages/docs/components/buttons.mdx +52 -0
- package/src/content/pages/docs/components/channel.mdx +92 -0
- package/src/content/pages/docs/components/channels.mdx +90 -0
- package/src/content/pages/{base → docs/components}/checkbox.mdx +10 -17
- package/src/content/pages/docs/components/code.mdx +46 -0
- package/src/content/pages/docs/components/heading.mdx +60 -0
- package/src/content/pages/docs/components/icon.mdx +49 -0
- package/src/content/pages/docs/components/image.mdx +26 -0
- package/src/content/pages/docs/components/input.mdx +41 -0
- package/src/content/pages/{typography → docs/components}/label.mdx +8 -4
- package/src/content/pages/docs/components/lead.mdx +51 -0
- package/src/content/pages/{typography → docs/components}/link.mdx +23 -8
- package/src/content/pages/docs/components/links.mdx +100 -0
- package/src/content/pages/docs/components/list.mdx +45 -0
- package/src/content/pages/docs/components/logo.mdx +37 -0
- package/src/content/pages/docs/components/menu.mdx +90 -0
- package/src/content/pages/docs/components/paragraph.mdx +51 -0
- package/src/content/pages/docs/components/prose.mdx +37 -0
- package/src/content/pages/docs/components/rating.mdx +77 -0
- package/src/content/pages/{base → docs/components}/section.mdx +1 -1
- package/src/content/pages/{base → docs/components}/select.mdx +0 -9
- package/src/content/pages/docs/components/social.mdx +95 -0
- package/src/content/pages/docs/components/socials.mdx +103 -0
- package/src/content/pages/docs/components/switch.mdx +35 -0
- package/src/content/pages/{base → docs/components}/table.mdx +0 -2
- package/src/content/pages/docs/components/tagline.mdx +47 -0
- package/src/content/pages/docs/components/textarea.mdx +35 -0
- package/src/content/pages/docs/components/themer.mdx +50 -0
- package/src/content/pages/docs/components.mdx +40 -0
- package/src/content/pages/docs/customization.mdx +151 -0
- package/src/content/pages/docs/frameworks.mdx +29 -0
- package/src/content/pages/docs/generating-pages.mdx +129 -0
- package/src/content/pages/docs/index.mdx +23 -0
- package/src/content/pages/docs/installation.mdx +50 -0
- package/src/content/pages/docs/layouts.mdx +33 -0
- package/src/content/pages/index.mdx +11 -9
- package/src/content/pages/showcase.mdx +4 -2
- package/src/content/presets/base.yml +80 -63
- package/src/content/presets/docs.yml +2 -2
- package/src/css/color.css +0 -10
- package/src/css/custom.css +10 -12
- package/src/css/size.css +2 -11
- package/src/css/theme.css +93 -0
- package/src/images/logo-1.svg +11 -0
- package/src/images/logo-2.svg +13 -0
- package/src/images/logo-basic.svg +10 -0
- package/src/images/logo-simple.svg +13 -0
- package/src/images/logo-thin.svg +15 -0
- package/src/images/logo.svg +14 -0
- package/src/images/logofat.svg +11 -0
- package/src/integration/index.ts +71 -144
- package/src/layouts/CategoryLayout.astro +135 -0
- package/src/layouts/Layout.astro +62 -117
- package/src/layouts/PageLayout.astro +26 -0
- package/src/layouts/PostLayout.astro +13 -8
- package/src/layouts/ProductLayout.astro +94 -10
- package/src/pages/[...page].astro +14 -22
- package/src/pages/test.astro +20 -0
- package/src/schemas/components/button.ts +21 -13
- package/src/schemas/components/card.ts +36 -18
- package/src/schemas/components/footer.ts +2 -10
- package/src/schemas/components/global.ts +16 -0
- package/src/schemas/components/header.ts +8 -0
- package/src/schemas/components/image.ts +8 -3
- package/src/schemas/components/link.ts +16 -0
- package/src/schemas/components/links.ts +4 -0
- package/src/schemas/components/menu.ts +2 -0
- package/src/schemas/components/sidebar.ts +2 -2
- package/src/schemas/components/subheader.ts +9 -0
- package/src/schemas/components/themer.ts +3 -0
- package/src/schemas/pageSchema.ts +14 -21
- package/src/utils/cart.ts +1 -10
- package/src/utils/getDeepReferenceChildren.ts +14 -0
- package/src/utils/getReferenceChildren.ts +1 -1
- package/src/utils/setTheme.ts +18 -0
- package/src/utils/slugify.ts +6 -0
- package/tailwind.config.ts +67 -0
- package/src/blocks/Article.astro +0 -40
- package/src/components/Footer.astro +0 -193
- package/src/components/ThemeSelect.astro +0 -41
- package/src/components/experimental/Form.astro +0 -53
- package/src/components/experimental/Gallery.astro +0 -104
- package/src/components/experimental/Logo.astro +0 -38
- package/src/components/experimental/Prose.astro +0 -192
- package/src/content/pages/base/icon.mdx +0 -55
- package/src/content/pages/base/image.mdx +0 -42
- package/src/content/pages/base/input.mdx +0 -56
- package/src/content/pages/base/rating.mdx +0 -55
- package/src/content/pages/base/textarea.mdx +0 -58
- package/src/content/pages/base/theme-select.mdx +0 -15
- package/src/content/pages/layouts/_layout.mdx +0 -14
- package/src/content/pages/layouts/docslayout.mdx +0 -14
- package/src/content/pages/overview/components.mdx +0 -75
- package/src/content/pages/overview/content-collections.mdx +0 -139
- package/src/content/pages/overview/frameworks.mdx +0 -198
- package/src/content/pages/overview/installation.mdx +0 -53
- package/src/content/pages/overview/introduction.mdx +0 -30
- package/src/content/pages/overview/theming.mdx +0 -69
- package/src/content/pages/schemas/page.mdx +0 -17
- package/src/content/pages/schemas/preset.mdx +0 -9
- package/src/content/pages/showcase/record.md +0 -3
- package/src/content/pages/typography/heading.mdx +0 -73
- package/src/content/pages/typography/list.mdx +0 -51
- package/src/content/pages/typography/text.mdx +0 -61
- package/src/content/presets/blocks.yml +0 -1
- package/src/css/space.css +0 -77
- package/src/css/styles.css +0 -0
- package/src/images/avatar-1.yml +0 -1
- package/src/integration/generate-colors.ts +0 -639
- package/src/integration/tailwind-plugin.ts +0 -80
- package/src/integration/unocss-preset.ts +0 -84
- package/src/layouts/BlockLayout.astro +0 -19
- package/src/layouts/ContactLayout.astro +0 -21
- package/src/layouts/DocsLayout.astro +0 -73
- package/src/layouts/OverviewLayout.astro +0 -42
- /package/src/content/pages/{base → docs/components}/_dialog.mdx +0 -0
- /package/src/content/pages/{base → docs/components}/_drawer.mdx +0 -0
- /package/src/content/pages/{base → docs/components}/_localeswitcher.mdx +0 -0
- /package/src/schemas/utils/{parents.ts → categories.ts} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
3
3
|
import Button from './Button.astro'
|
|
4
|
-
import Card from './Card.astro'
|
|
5
4
|
import Heading from './Heading.astro'
|
|
6
5
|
import Text from './Text.astro'
|
|
7
6
|
|
|
@@ -15,7 +14,7 @@ const { ...rest } = Astro.props
|
|
|
15
14
|
/>
|
|
16
15
|
|
|
17
16
|
<template>
|
|
18
|
-
<
|
|
17
|
+
<Element class="cart-list-card">
|
|
19
18
|
<img class="cart-list-image image" />
|
|
20
19
|
<Element class="column">
|
|
21
20
|
<Heading
|
|
@@ -30,13 +29,13 @@ const { ...rest } = Astro.props
|
|
|
30
29
|
/>
|
|
31
30
|
<Button
|
|
32
31
|
class:list="cart-list-remove"
|
|
33
|
-
variant="
|
|
32
|
+
variant="ghost"
|
|
34
33
|
icon="trash"
|
|
35
34
|
type="button"
|
|
36
35
|
/>
|
|
37
36
|
</Element>
|
|
38
37
|
</Element>
|
|
39
|
-
</
|
|
38
|
+
</Element>
|
|
40
39
|
</template>
|
|
41
40
|
|
|
42
41
|
<script>
|
|
@@ -89,44 +88,28 @@ const { ...rest } = Astro.props
|
|
|
89
88
|
})
|
|
90
89
|
</script>
|
|
91
90
|
|
|
92
|
-
<style
|
|
91
|
+
<style is:global>
|
|
93
92
|
@layer fulldev {
|
|
94
93
|
.cart-list {
|
|
95
|
-
|
|
96
|
-
flex-direction: column;
|
|
94
|
+
@apply flex flex-col text-foreground;
|
|
97
95
|
|
|
98
|
-
.card {
|
|
99
|
-
|
|
100
|
-
flex-direction: row;
|
|
101
|
-
gap: var(--space-5);
|
|
102
|
-
width: 100%;
|
|
96
|
+
.cart-list-card {
|
|
97
|
+
@apply flex w-full gap-5;
|
|
103
98
|
|
|
104
99
|
&:not(:first-child) {
|
|
105
|
-
|
|
106
|
-
border-top: 1px solid var(--color-a6);
|
|
107
|
-
padding-top: var(--space-5);
|
|
100
|
+
@apply mt-5 border-t pt-5;
|
|
108
101
|
}
|
|
109
102
|
|
|
110
103
|
.image {
|
|
111
|
-
|
|
112
|
-
width: 100px;
|
|
113
|
-
height: auto;
|
|
104
|
+
@apply block h-auto w-24;
|
|
114
105
|
}
|
|
115
106
|
|
|
116
107
|
.column {
|
|
117
|
-
|
|
118
|
-
flex-direction: column;
|
|
119
|
-
justify-content: space-between;
|
|
120
|
-
gap: var(--space-3);
|
|
121
|
-
width: 100%;
|
|
122
|
-
height: 100%;
|
|
108
|
+
@apply flex h-full w-full flex-col justify-between gap-3;
|
|
123
109
|
}
|
|
124
110
|
|
|
125
111
|
.row {
|
|
126
|
-
|
|
127
|
-
flex-direction: row;
|
|
128
|
-
justify-content: space-between;
|
|
129
|
-
align-items: center;
|
|
112
|
+
@apply flex w-full flex-row justify-between;
|
|
130
113
|
}
|
|
131
114
|
}
|
|
132
115
|
}
|
|
@@ -31,45 +31,40 @@ const { ...rest } = Astro.props
|
|
|
31
31
|
<Button
|
|
32
32
|
class:list="checkout-button"
|
|
33
33
|
variant="primary"
|
|
34
|
-
color="brand"
|
|
35
34
|
text="Afrekenen"
|
|
36
35
|
/>
|
|
37
36
|
</Element>
|
|
38
37
|
|
|
39
|
-
<style is:global
|
|
38
|
+
<style is:global>
|
|
40
39
|
@layer fulldev {
|
|
41
40
|
.cart-summary {
|
|
42
|
-
|
|
43
|
-
flex-direction: column;
|
|
44
|
-
gap: var(--space-3);
|
|
41
|
+
@apply flex flex-col gap-3 text-foreground;
|
|
45
42
|
|
|
46
43
|
.price,
|
|
47
44
|
.total {
|
|
48
|
-
|
|
45
|
+
@apply text-lg;
|
|
49
46
|
}
|
|
50
47
|
|
|
51
48
|
.row {
|
|
52
|
-
|
|
53
|
-
justify-content: space-between;
|
|
54
|
-
align-items: center;
|
|
49
|
+
@apply flex w-full justify-between;
|
|
55
50
|
}
|
|
56
51
|
|
|
57
52
|
.shipping {
|
|
58
|
-
|
|
53
|
+
@apply text-sm text-muted-foreground;
|
|
59
54
|
}
|
|
60
55
|
}
|
|
61
56
|
}
|
|
62
57
|
</style>
|
|
63
58
|
|
|
64
59
|
<script>
|
|
60
|
+
import { STRIPE_RESTRICTED_KEY, URL } from 'astro:env/client'
|
|
65
61
|
import { $cart } from 'fulldev-ui/stores/cart.ts'
|
|
66
62
|
import { formatPrice } from 'fulldev-ui/utils/cart'
|
|
67
63
|
import Stripe from 'stripe'
|
|
68
64
|
|
|
69
|
-
const stripe = new Stripe(import.meta.env.PUBLIC_STRIPE_CHECKOUT_KEY)
|
|
70
|
-
|
|
71
65
|
function setPrice(items: any) {
|
|
72
66
|
const price = document.querySelector('.cart-summary .price')
|
|
67
|
+
console.log('settings price', price)
|
|
73
68
|
if (price)
|
|
74
69
|
price.textContent = formatPrice(
|
|
75
70
|
items.reduce(
|
|
@@ -80,6 +75,8 @@ const { ...rest } = Astro.props
|
|
|
80
75
|
}
|
|
81
76
|
|
|
82
77
|
document.addEventListener('astro:page-load', () => {
|
|
78
|
+
if (!STRIPE_RESTRICTED_KEY) return
|
|
79
|
+
const stripe = new Stripe(STRIPE_RESTRICTED_KEY)
|
|
83
80
|
setPrice($cart.get())
|
|
84
81
|
|
|
85
82
|
$cart.subscribe((items: any) => {
|
|
@@ -92,7 +89,7 @@ const { ...rest } = Astro.props
|
|
|
92
89
|
const items = $cart.get()
|
|
93
90
|
|
|
94
91
|
const checkoutConfig = {
|
|
95
|
-
success_url: `${
|
|
92
|
+
success_url: `${URL}/checkout`,
|
|
96
93
|
mode: 'payment',
|
|
97
94
|
customer_creation: 'always',
|
|
98
95
|
shipping_address_collection: {
|
|
@@ -128,6 +125,7 @@ const { ...rest } = Astro.props
|
|
|
128
125
|
currency: 'eur',
|
|
129
126
|
product_data: {
|
|
130
127
|
name: item.name,
|
|
128
|
+
images: [URL + item.image],
|
|
131
129
|
},
|
|
132
130
|
unit_amount: Math.round(item.price * 100),
|
|
133
131
|
},
|
|
@@ -18,53 +18,71 @@ interface Props extends GlobalProps, ComponentProps<typeof Button> {
|
|
|
18
18
|
|
|
19
19
|
const {
|
|
20
20
|
variant = 'secondary',
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
size = 'md',
|
|
22
|
+
href,
|
|
23
|
+
icon,
|
|
24
24
|
heading,
|
|
25
25
|
text,
|
|
26
|
-
icon,
|
|
27
|
-
href,
|
|
28
26
|
...rest
|
|
29
27
|
} = Astro.props
|
|
30
28
|
---
|
|
31
29
|
|
|
32
30
|
<Element
|
|
33
|
-
class:list=
|
|
34
|
-
{
|
|
31
|
+
class:list="channel"
|
|
32
|
+
{size}
|
|
35
33
|
{...rest}
|
|
36
34
|
>
|
|
37
35
|
<Button
|
|
38
36
|
{variant}
|
|
39
|
-
{
|
|
37
|
+
{size}
|
|
40
38
|
{href}
|
|
41
39
|
{icon}
|
|
42
40
|
/>
|
|
43
|
-
<Element class:list=
|
|
41
|
+
<Element class:list="channel-content">
|
|
44
42
|
<Heading
|
|
45
43
|
level={6}
|
|
46
44
|
text={heading}
|
|
45
|
+
{size}
|
|
47
46
|
/>
|
|
48
|
-
<
|
|
47
|
+
<Fragment set:html={text} />
|
|
48
|
+
<slot />
|
|
49
49
|
</Element>
|
|
50
50
|
</Element>
|
|
51
51
|
|
|
52
|
-
<style>
|
|
52
|
+
<style is:global>
|
|
53
53
|
.channel {
|
|
54
|
-
gap
|
|
54
|
+
@apply flex gap-3;
|
|
55
|
+
|
|
56
|
+
.channel-content {
|
|
57
|
+
@apply flex flex-col text-muted-foreground;
|
|
58
|
+
|
|
59
|
+
.heading {
|
|
60
|
+
@apply leading-snug;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.size-sm {
|
|
65
|
+
@apply gap-2;
|
|
66
|
+
|
|
67
|
+
.channel-content {
|
|
68
|
+
@apply text-xs leading-tight;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.size-md {
|
|
73
|
+
@apply gap-2.5;
|
|
55
74
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
align-items: inherit;
|
|
60
|
-
gap: var(--space-1);
|
|
75
|
+
.channel-content {
|
|
76
|
+
@apply text-sm leading-tight;
|
|
77
|
+
}
|
|
61
78
|
}
|
|
62
79
|
|
|
63
|
-
&.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
80
|
+
&.size-lg {
|
|
81
|
+
@apply gap-3;
|
|
82
|
+
|
|
83
|
+
.channel-content {
|
|
84
|
+
@apply text-base leading-tight;
|
|
85
|
+
}
|
|
68
86
|
}
|
|
69
87
|
}
|
|
70
88
|
</style>
|
|
@@ -6,32 +6,46 @@ import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
|
6
6
|
|
|
7
7
|
interface Props extends GlobalProps, HTMLAttributes<'div'> {
|
|
8
8
|
variant?: ComponentProps<typeof Channel>['variant']
|
|
9
|
+
size?: ComponentProps<typeof Channel>['size']
|
|
10
|
+
channel?: ComponentProps<typeof Channel> | undefined
|
|
9
11
|
channels?: ComponentProps<typeof Channel>[] | undefined
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
const { channels, variant, ...rest } = Astro.props
|
|
14
|
+
const { channels = [], channel, variant, size, ...rest } = Astro.props
|
|
13
15
|
---
|
|
14
16
|
|
|
15
17
|
<Element
|
|
16
18
|
class:list="channels"
|
|
19
|
+
{size}
|
|
17
20
|
{...rest}
|
|
18
21
|
>
|
|
19
22
|
{
|
|
20
|
-
channels
|
|
23
|
+
[channel, ...channels].filter(Boolean).map((channel) => (
|
|
21
24
|
<Channel
|
|
22
25
|
{variant}
|
|
26
|
+
{size}
|
|
23
27
|
{...channel}
|
|
24
28
|
/>
|
|
25
29
|
))
|
|
26
30
|
}
|
|
27
31
|
</Element>
|
|
28
32
|
|
|
29
|
-
<style is:global
|
|
33
|
+
<style is:global>
|
|
30
34
|
@layer fulldev {
|
|
31
35
|
.channels {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
@apply flex flex-col gap-2.5;
|
|
37
|
+
|
|
38
|
+
&.size-sm {
|
|
39
|
+
@apply gap-2;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.size-md {
|
|
43
|
+
@apply gap-2.5;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.size-lg {
|
|
47
|
+
@apply gap-3;
|
|
48
|
+
}
|
|
35
49
|
}
|
|
36
50
|
}
|
|
37
51
|
</style>
|
|
@@ -3,6 +3,7 @@ import type { ComponentProps, HTMLAttributes } from 'astro/types'
|
|
|
3
3
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
4
|
import Label from 'fulldev-ui/components/Label.astro'
|
|
5
5
|
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
6
|
+
import Icon from './Icon.astro'
|
|
6
7
|
|
|
7
8
|
interface Props extends GlobalProps, HTMLAttributes<'input'> {
|
|
8
9
|
label?: ComponentProps<typeof Label>['text']
|
|
@@ -10,52 +11,76 @@ interface Props extends GlobalProps, HTMLAttributes<'input'> {
|
|
|
10
11
|
|
|
11
12
|
const {
|
|
12
13
|
label,
|
|
13
|
-
|
|
14
|
-
name,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
disabled,
|
|
18
|
-
checked,
|
|
19
|
-
required,
|
|
14
|
+
name = label,
|
|
15
|
+
id = name,
|
|
16
|
+
type = 'text',
|
|
17
|
+
size = 'md',
|
|
20
18
|
...rest
|
|
21
19
|
} = Astro.props
|
|
22
20
|
---
|
|
23
21
|
|
|
24
22
|
<Element
|
|
25
23
|
class:list="checkbox"
|
|
26
|
-
|
|
24
|
+
as="label"
|
|
25
|
+
for={id}
|
|
26
|
+
{size}
|
|
27
27
|
>
|
|
28
28
|
<Element
|
|
29
|
+
class:list="checkbox-input"
|
|
29
30
|
as="input"
|
|
30
31
|
type="checkbox"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{disabled}
|
|
35
|
-
{placeholder}
|
|
36
|
-
{required}
|
|
37
|
-
{checked}
|
|
32
|
+
if={id}
|
|
33
|
+
{id}
|
|
34
|
+
{name}
|
|
38
35
|
{...rest}
|
|
39
36
|
/>
|
|
37
|
+
<Icon
|
|
38
|
+
class="checkbox-icon"
|
|
39
|
+
name="check"
|
|
40
|
+
/>
|
|
40
41
|
<Label
|
|
41
|
-
for={id
|
|
42
|
+
for={id}
|
|
42
43
|
text={label}
|
|
44
|
+
{size}
|
|
43
45
|
/>
|
|
44
46
|
</Element>
|
|
45
47
|
|
|
46
|
-
<style
|
|
48
|
+
<style is:global>
|
|
47
49
|
@layer fulldev {
|
|
48
50
|
.checkbox {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
@apply relative flex items-center gap-2;
|
|
52
|
+
|
|
53
|
+
.checkbox-input {
|
|
54
|
+
@apply size-[1em] cursor-pointer rounded-sm border border-primary bg-transparent accent-primary;
|
|
55
|
+
@apply appearance-none border border-primary bg-background checked:bg-primary;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.icon.checkbox-icon {
|
|
59
|
+
@apply absolute bg-transparent p-0.5 text-background;
|
|
60
|
+
|
|
61
|
+
* {
|
|
62
|
+
stroke-width: 3.5px !important;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.size-sm {
|
|
67
|
+
.checkbox-input,
|
|
68
|
+
.icon.checkbox-icon {
|
|
69
|
+
@apply !size-3.5;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
&.size-md {
|
|
73
|
+
.checkbox-input,
|
|
74
|
+
.checkbox-icon {
|
|
75
|
+
@apply !size-4;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.size-lg {
|
|
80
|
+
.checkbox-input,
|
|
81
|
+
.checkbox-icon {
|
|
82
|
+
@apply !size-[1.125rem];
|
|
83
|
+
}
|
|
59
84
|
}
|
|
60
85
|
}
|
|
61
86
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import { Code as AstroCode } from 'astro:components'
|
|
4
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
5
|
+
|
|
6
|
+
interface Props extends ComponentProps<typeof AstroCode> {}
|
|
7
|
+
|
|
8
|
+
const { lang = 'astro', code, ...rest } = Astro.props
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<Element class:list="code">
|
|
12
|
+
<div class="example">
|
|
13
|
+
<slot name="example" />
|
|
14
|
+
<Fragment set:html={code} />
|
|
15
|
+
</div>
|
|
16
|
+
<slot name="code" />
|
|
17
|
+
{
|
|
18
|
+
code && (
|
|
19
|
+
<AstroCode
|
|
20
|
+
class:list="code"
|
|
21
|
+
code={code}
|
|
22
|
+
{lang}
|
|
23
|
+
{...rest}
|
|
24
|
+
/>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
</Element>
|
|
28
|
+
|
|
29
|
+
<style is:global>
|
|
30
|
+
@layer fulldev {
|
|
31
|
+
.astro-code {
|
|
32
|
+
@apply mt-4 rounded-md p-4 text-sm first:mt-0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.code {
|
|
36
|
+
@apply mt-8 overflow-hidden rounded-md border first:mt-0;
|
|
37
|
+
|
|
38
|
+
.example {
|
|
39
|
+
@apply flex flex-wrap items-center gap-8 p-8;
|
|
40
|
+
|
|
41
|
+
> *,
|
|
42
|
+
> slot > * {
|
|
43
|
+
@apply mt-0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.astro-code {
|
|
48
|
+
@apply mt-0 rounded-none border-none p-4;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -28,7 +28,7 @@ const {
|
|
|
28
28
|
|
|
29
29
|
<dialog
|
|
30
30
|
class="dialog"
|
|
31
|
-
{id}
|
|
31
|
+
id={id as string}
|
|
32
32
|
onclick={`event.target === this && this.close()`}
|
|
33
33
|
>
|
|
34
34
|
<Card
|
|
@@ -39,7 +39,7 @@ const {
|
|
|
39
39
|
</Card>
|
|
40
40
|
</dialog>
|
|
41
41
|
|
|
42
|
-
<style
|
|
42
|
+
<style is:global>
|
|
43
43
|
@layer fulldev {
|
|
44
44
|
.dialog {
|
|
45
45
|
margin: auto !important;
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
import type { ComponentProps, HTMLAttributes } from 'astro/types'
|
|
3
3
|
import Button from 'fulldev-ui/components/Button.astro'
|
|
4
4
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
5
|
-
import Logo from 'fulldev-ui/components/
|
|
5
|
+
import Logo from 'fulldev-ui/components/Logo.astro'
|
|
6
6
|
import Menu from 'fulldev-ui/components/Menu.astro'
|
|
7
|
+
import links from 'fulldev-ui/schemas/components/links'
|
|
7
8
|
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
8
9
|
import Buttons from './Buttons.astro'
|
|
9
10
|
import Heading from './Heading.astro'
|
|
11
|
+
import Links from './Links.astro'
|
|
10
12
|
|
|
11
13
|
interface Props extends GlobalProps, HTMLAttributes<'aside'> {
|
|
12
14
|
variant?: ComponentProps<typeof Button>['variant']
|
|
@@ -17,6 +19,8 @@ interface Props extends GlobalProps, HTMLAttributes<'aside'> {
|
|
|
17
19
|
company?: ComponentProps<typeof Logo>['company']
|
|
18
20
|
menu?: ComponentProps<typeof Menu>['groups']
|
|
19
21
|
buttons?: ComponentProps<typeof Buttons>['buttons']
|
|
22
|
+
links?: ComponentProps<typeof Links>['links']
|
|
23
|
+
size?: 'sm' | 'md' | 'lg' | undefined
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
const {
|
|
@@ -27,6 +31,7 @@ const {
|
|
|
27
31
|
variant,
|
|
28
32
|
text,
|
|
29
33
|
buttons,
|
|
34
|
+
links,
|
|
30
35
|
heading,
|
|
31
36
|
logo,
|
|
32
37
|
company,
|
|
@@ -34,13 +39,9 @@ const {
|
|
|
34
39
|
if: ifProp,
|
|
35
40
|
...rest
|
|
36
41
|
} = Astro.props
|
|
37
|
-
|
|
38
|
-
const buttonsGroup = { heading: '', buttons: buttons }
|
|
39
|
-
const mergedMenu = [buttonsGroup, ...(menu || [])] as typeof menu
|
|
40
42
|
---
|
|
41
43
|
|
|
42
44
|
<Button
|
|
43
|
-
if={ifProp}
|
|
44
45
|
variant="secondary"
|
|
45
46
|
class:list={['drawer-button', `${id}-button`]}
|
|
46
47
|
onclick={`document.getElementById('${id}').showModal()`}
|
|
@@ -48,15 +49,16 @@ const mergedMenu = [buttonsGroup, ...(menu || [])] as typeof menu
|
|
|
48
49
|
{text}
|
|
49
50
|
{icon}
|
|
50
51
|
{color}
|
|
52
|
+
{size}
|
|
51
53
|
/>
|
|
52
54
|
|
|
53
55
|
<Element
|
|
54
|
-
if={ifProp}
|
|
55
56
|
onclick={`event.target === this && this.close()`}
|
|
56
57
|
class:list="drawer"
|
|
57
58
|
as="dialog"
|
|
58
59
|
{id}
|
|
59
60
|
{text}
|
|
61
|
+
{size}
|
|
60
62
|
{icon}
|
|
61
63
|
{...rest}
|
|
62
64
|
>
|
|
@@ -66,6 +68,7 @@ const mergedMenu = [buttonsGroup, ...(menu || [])] as typeof menu
|
|
|
66
68
|
as="header"
|
|
67
69
|
>
|
|
68
70
|
<Logo
|
|
71
|
+
{size}
|
|
69
72
|
{company}
|
|
70
73
|
{...logo}
|
|
71
74
|
/>
|
|
@@ -81,7 +84,11 @@ const mergedMenu = [buttonsGroup, ...(menu || [])] as typeof menu
|
|
|
81
84
|
<slot name="header" />
|
|
82
85
|
</Element>
|
|
83
86
|
<Element class:list="drawer-content">
|
|
84
|
-
<
|
|
87
|
+
<Links
|
|
88
|
+
direction="column"
|
|
89
|
+
{links}
|
|
90
|
+
/>
|
|
91
|
+
<Menu groups={menu} />
|
|
85
92
|
<slot />
|
|
86
93
|
</Element>
|
|
87
94
|
<Element
|
|
@@ -93,79 +100,42 @@ const mergedMenu = [buttonsGroup, ...(menu || [])] as typeof menu
|
|
|
93
100
|
</Element>
|
|
94
101
|
</Element>
|
|
95
102
|
|
|
96
|
-
<style
|
|
103
|
+
<style is:global>
|
|
97
104
|
@layer fulldev {
|
|
98
105
|
body:has(dialog[open]) {
|
|
99
|
-
overflow
|
|
100
|
-
|
|
101
|
-
@media (min-width: 768px) {
|
|
102
|
-
overflow: auto;
|
|
103
|
-
}
|
|
106
|
+
@apply max-md:overflow-hidden;
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
.drawer {
|
|
107
|
-
|
|
108
|
-
bottom: 0;
|
|
109
|
-
margin: 0;
|
|
110
|
-
padding: 0;
|
|
111
|
-
width: 100%;
|
|
112
|
-
max-width: 100%;
|
|
113
|
-
height: 100%;
|
|
114
|
-
max-height: 100%;
|
|
115
|
-
|
|
116
|
-
@media (min-width: 768px) {
|
|
117
|
-
width: 440px;
|
|
118
|
-
}
|
|
110
|
+
@apply inset-0 m-0 h-full max-h-full w-full max-w-full p-0 md:max-w-md;
|
|
119
111
|
|
|
120
112
|
&::backdrop {
|
|
121
|
-
cursor
|
|
122
|
-
background: rgba(0, 0, 0, 0.5);
|
|
113
|
+
@apply cursor-pointer bg-background/50;
|
|
123
114
|
}
|
|
124
115
|
|
|
125
116
|
.drawer-body {
|
|
126
|
-
|
|
127
|
-
flex-shrink: 1;
|
|
128
|
-
flex-direction: column;
|
|
129
|
-
border-right: 1px solid var(--color-a6);
|
|
130
|
-
height: 100%;
|
|
131
|
-
overflow: auto;
|
|
132
|
-
}
|
|
117
|
+
@apply flex h-full shrink flex-col overflow-auto bg-background;
|
|
133
118
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
padding: var(--space-6) var(--gutter);
|
|
138
|
-
}
|
|
119
|
+
.drawer-content {
|
|
120
|
+
@apply flex flex-col gap-6 px-gutter py-12;
|
|
121
|
+
}
|
|
139
122
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
flex-shrink: 0;
|
|
145
|
-
z-index: 1;
|
|
146
|
-
border-style: solid;
|
|
147
|
-
border-color: var(--color-a6);
|
|
148
|
-
background-color: var(--base-background);
|
|
149
|
-
}
|
|
123
|
+
.drawer-header,
|
|
124
|
+
.drawer-footer {
|
|
125
|
+
@apply sticky z-10 flex shrink-0 bg-background;
|
|
126
|
+
}
|
|
150
127
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
align-items: center;
|
|
154
|
-
border-bottom-width: 1px;
|
|
155
|
-
padding: 0 var(--gutter);
|
|
156
|
-
height: 56px;
|
|
128
|
+
.drawer-header {
|
|
129
|
+
@apply top-0 h-14 items-center px-gutter;
|
|
157
130
|
|
|
158
|
-
|
|
159
|
-
|
|
131
|
+
.button {
|
|
132
|
+
@apply ml-auto;
|
|
133
|
+
}
|
|
160
134
|
}
|
|
161
|
-
}
|
|
162
135
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
margin-top: auto;
|
|
167
|
-
border-top-width: 1px;
|
|
168
|
-
padding: var(--space-5) var(--gutter);
|
|
136
|
+
.drawer-footer {
|
|
137
|
+
@apply bottom-0 mt-auto flex-col px-gutter py-8;
|
|
138
|
+
}
|
|
169
139
|
}
|
|
170
140
|
}
|
|
171
141
|
}
|