fulldev-ui 0.6.0-beta.8 → 0.6.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/astro.config.ts +6 -8
- package/cloudcannon.config.yml +38 -102
- package/package.json +2 -1
- package/public/images/block-code.png +0 -0
- package/public/images/component-code.png +0 -0
- package/src/blocks/Banner.astro +3 -5
- package/src/blocks/Colleagues1.astro +4 -3
- package/src/blocks/Content1.astro +6 -28
- package/src/blocks/Content2.astro +25 -49
- package/src/blocks/Content3.astro +25 -54
- package/src/blocks/Content4.astro +27 -50
- package/src/blocks/Content5.astro +7 -37
- package/src/blocks/Content6.astro +56 -0
- package/src/blocks/Content7.astro +64 -0
- package/src/blocks/Content8.astro +47 -0
- package/src/blocks/Cta1.astro +6 -9
- package/src/blocks/Cta2.astro +52 -0
- package/src/blocks/Features1.astro +5 -4
- package/src/blocks/Features2.astro +70 -0
- package/src/blocks/Footer.astro +2 -6
- package/src/blocks/Header.astro +8 -25
- package/src/blocks/Hero1.astro +19 -27
- package/src/blocks/Intro1.astro +3 -4
- package/src/blocks/{Industries1.astro → JobCategories1.astro} +13 -38
- package/src/blocks/JobCategory1.astro +90 -0
- package/src/blocks/Jobs1.astro +7 -10
- package/src/blocks/Logos1.astro +4 -4
- package/src/blocks/Pages1.astro +85 -0
- package/src/blocks/Pricings1.astro +61 -0
- package/src/blocks/Products1.astro +7 -10
- package/src/blocks/Projects1.astro +59 -83
- package/src/blocks/Reviews1.astro +10 -10
- package/src/blocks/Subheader.astro +4 -9
- package/src/blocks/{Contact1.astro → _Contact1.astro} +1 -3
- package/src/components/Avatar.astro +40 -0
- package/src/components/Avatars.astro +20 -0
- package/src/components/Badge.astro +6 -35
- package/src/components/Block.astro +19 -4
- package/src/components/Chip.astro +73 -0
- package/src/components/Element.astro +1 -0
- package/src/components/Heading.astro +13 -5
- package/src/components/Image.astro +1 -1
- package/src/components/Link.astro +1 -1
- package/src/components/Menu.astro +9 -5
- package/src/components/Proof.astro +52 -0
- package/src/components/Toc.astro +33 -35
- package/src/content/config.ts +5 -0
- package/src/content/layouts/base.yml +133 -143
- package/src/content/pages/{base → _base}/toggle.mdx +1 -1
- package/src/content/pages/_showcase/stark-vulcanising-products.md +0 -1
- package/src/content/pages/docs/blocks/_categories.mdx +1 -17
- package/src/content/pages/docs/blocks/banner.mdx +1 -1
- package/src/content/pages/docs/blocks/colleagues.mdx +1 -1
- package/src/content/pages/docs/blocks/content.mdx +162 -1
- package/src/content/pages/docs/blocks/cta.mdx +1 -1
- package/src/content/pages/docs/blocks/features.mdx +66 -1
- package/src/content/pages/docs/blocks/footer.mdx +1 -1
- package/src/content/pages/docs/blocks/header.mdx +1 -1
- package/src/content/pages/docs/blocks/hero.mdx +1 -1
- package/src/content/pages/docs/blocks/intro.mdx +1 -1
- package/src/content/pages/docs/blocks/logos.mdx +1 -1
- package/src/content/pages/docs/blocks/projects.mdx +1 -1
- package/src/content/pages/docs/blocks/reviews.mdx +1 -1
- package/src/content/pages/docs/blocks.mdx +1 -7
- package/src/content/pages/docs/collections/images.mdx +1 -1
- package/src/content/pages/docs/collections/pages.mdx +1 -1
- package/src/content/pages/docs/collections/presets.mdx +1 -1
- package/src/content/pages/docs/components/_localeswitcher.mdx +1 -1
- package/src/content/pages/docs/components/_table.mdx +1 -1
- package/src/content/pages/docs/components/_tagline.mdx +1 -1
- package/src/content/pages/docs/components/_themer.mdx +1 -1
- package/src/content/pages/docs/components/_toggle.mdx +1 -1
- package/src/content/pages/docs/components/avatar.mdx +32 -0
- package/src/content/pages/docs/components/badge.mdx +1 -34
- package/src/content/pages/docs/components/badges.mdx +1 -13
- package/src/content/pages/docs/components/button.mdx +1 -1
- package/src/content/pages/docs/components/buttons.mdx +1 -1
- package/src/content/pages/docs/components/channel.mdx +1 -1
- package/src/content/pages/docs/components/channels.mdx +1 -1
- package/src/content/pages/docs/components/checkbox.mdx +1 -1
- package/src/content/pages/docs/components/chip.mdx +75 -0
- package/src/content/pages/docs/components/heading.mdx +1 -1
- package/src/content/pages/docs/components/icon.mdx +1 -1
- package/src/content/pages/docs/components/image.mdx +2 -1
- package/src/content/pages/docs/components/input.mdx +1 -1
- package/src/content/pages/docs/components/label.mdx +1 -1
- package/src/content/pages/docs/components/link.mdx +1 -1
- package/src/content/pages/docs/components/links.mdx +11 -52
- package/src/content/pages/docs/components/list.mdx +1 -1
- package/src/content/pages/docs/components/logo.mdx +1 -1
- package/src/content/pages/docs/components/menu.mdx +5 -18
- package/src/content/pages/docs/components/paragraph.mdx +1 -1
- package/src/content/pages/docs/components/rating.mdx +1 -1
- package/src/content/pages/docs/components/select.mdx +1 -1
- package/src/content/pages/docs/components/social.mdx +1 -1
- package/src/content/pages/docs/components/socials.mdx +1 -1
- package/src/content/pages/docs/components/switch.mdx +1 -1
- package/src/content/pages/docs/components/tagline.mdx +1 -1
- package/src/content/pages/docs/components/textarea.mdx +1 -1
- package/src/content/pages/docs/components.mdx +1 -1
- package/src/content/pages/docs/customization.mdx +1 -1
- package/src/content/pages/docs/frameworks.mdx +1 -1
- package/src/content/pages/docs/index.mdx +1 -1
- package/src/content/pages/docs/installation.mdx +1 -24
- package/src/content/pages/docs/layouts/doc.mdx +1 -1
- package/src/content/pages/docs/layouts/page.mdx +1 -1
- package/src/content/pages/docs/pages.mdx +1 -1
- package/src/content/pages/docs/structures/_card.mdx +1 -1
- package/src/content/pages/docs/structures/_dialog.mdx +1 -1
- package/src/content/pages/docs/structures/_drawer.mdx +1 -1
- package/src/content/pages/docs/structures/card.mdx +1 -1
- package/src/content/pages/docs/structures/code.mdx +1 -1
- package/src/content/pages/docs/structures/container.mdx +1 -1
- package/src/content/pages/docs/structures/drawer.mdx +1 -1
- package/src/content/pages/docs/structures/group.mdx +1 -1
- package/src/content/pages/docs/structures/layout.mdx +1 -1
- package/src/content/pages/docs/structures/masonry.mdx +1 -1
- package/src/content/pages/docs/structures/matrix.mdx +1 -1
- package/src/content/pages/docs/structures/panel.mdx +1 -1
- package/src/content/pages/docs/structures/prose.mdx +1 -1
- package/src/content/pages/docs/structures/section.mdx +1 -1
- package/src/content/pages/docs/structures/stack.mdx +1 -1
- package/src/content/pages/docs/structures/writeup.mdx +1 -1
- package/src/content/pages/docs/structures.mdx +1 -1
- package/src/content/pages/index.mdx +20 -25
- package/src/layouts/Page.astro +44 -10
- package/src/layouts/{Product.astro → _Product.astro} +6 -6
- package/src/pages/test.astro +16 -0
- package/src/schemas/block.ts +18 -44
- package/src/schemas/button.ts +2 -0
- package/src/schemas/card.ts +43 -0
- package/src/schemas/{badge.ts → chip.ts} +3 -3
- package/src/schemas/page.ts +4 -18
- package/src/schemas/proof.ts +12 -0
- package/src/structures/Drawer.astro +2 -3
- package/src/structures/Prose.astro +31 -40
- package/src/structures/Section.astro +1 -1
- package/src/structures/Sidebar.astro +3 -4
- package/src/structures/Split.astro +38 -0
- package/tailwind.config.ts +4 -1
- package/pnpm-lock.yaml +0 -5186
- package/src/blocks/_Hero.astro +0 -245
- package/src/components/Blocks.astro +0 -26
- package/src/components/Sidebar.astro +0 -43
- package/src/content/pages/docs/blocks/feature.mdx +0 -17
- package/src/content/pages/docs/layouts.mdx +0 -80
- package/src/layouts/Block.astro +0 -81
- package/src/layouts/Category.astro +0 -136
- package/src/layouts/Doc.astro +0 -96
- package/src/layouts/Job.astro +0 -60
- package/src/layouts/Jobs.astro +0 -72
- package/src/layouts/Post.astro +0 -53
- /package/src/content/pages/{posts → _posts}/post.md +0 -0
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
// Heading etc left, image and content right, sticky
|
|
3
|
-
import type { ComponentProps } from 'astro/types'
|
|
4
2
|
import Badges from 'fulldev-ui/components/Badges.astro'
|
|
5
3
|
import Buttons from 'fulldev-ui/components/Buttons.astro'
|
|
6
4
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
@@ -8,96 +6,74 @@ import Heading from 'fulldev-ui/components/Heading.astro'
|
|
|
8
6
|
import Image from 'fulldev-ui/components/Image.astro'
|
|
9
7
|
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
10
8
|
import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
9
|
+
import type { BlockSchema } from 'fulldev-ui/schemas/block'
|
|
11
10
|
import Container from 'fulldev-ui/structures/Container.astro'
|
|
12
11
|
import Group from 'fulldev-ui/structures/Group.astro'
|
|
13
12
|
import Prose from 'fulldev-ui/structures/Prose.astro'
|
|
14
13
|
import Section from 'fulldev-ui/structures/Section.astro'
|
|
14
|
+
import Split from 'fulldev-ui/structures/Split.astro'
|
|
15
15
|
|
|
16
|
-
interface Props extends
|
|
17
|
-
tagline?: string | undefined
|
|
18
|
-
heading?: string | undefined
|
|
19
|
-
paragraph?: string | undefined
|
|
20
|
-
content?: string | undefined
|
|
21
|
-
buttons?: ComponentProps<typeof Buttons>['buttons']
|
|
22
|
-
cards?: {
|
|
23
|
-
image?: ComponentProps<typeof Image> | undefined
|
|
24
|
-
badges?: ComponentProps<typeof Badges>['badges']
|
|
25
|
-
heading?: string | undefined
|
|
26
|
-
paragraph?: string | undefined
|
|
27
|
-
}[]
|
|
28
|
-
}
|
|
16
|
+
interface Props extends BlockSchema {}
|
|
29
17
|
|
|
30
|
-
const {
|
|
31
|
-
|
|
18
|
+
const {
|
|
19
|
+
depth = 2,
|
|
20
|
+
tagline,
|
|
21
|
+
heading,
|
|
22
|
+
paragraph,
|
|
23
|
+
buttons,
|
|
24
|
+
content,
|
|
25
|
+
cards,
|
|
26
|
+
} = Astro.props
|
|
32
27
|
---
|
|
33
28
|
|
|
34
|
-
<Section
|
|
35
|
-
class:list="projects-1"
|
|
36
|
-
{...rest}
|
|
37
|
-
>
|
|
29
|
+
<Section class="projects-1">
|
|
38
30
|
<Container>
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
31
|
+
<Split class="items-start">
|
|
32
|
+
<Prose class="lg:sticky lg:top-sticky-16 lg:max-w-xl">
|
|
33
|
+
<Tagline text={tagline} />
|
|
34
|
+
<Heading
|
|
35
|
+
size="4xl"
|
|
36
|
+
text={heading}
|
|
37
|
+
{depth}
|
|
38
|
+
/>
|
|
39
|
+
<Paragraph
|
|
40
|
+
muted
|
|
41
|
+
size="lg"
|
|
42
|
+
text={paragraph}
|
|
43
|
+
/>
|
|
44
|
+
<Fragment set:html={content} />
|
|
45
|
+
<Group>
|
|
46
|
+
<Buttons
|
|
47
|
+
variant="secondary"
|
|
48
|
+
{buttons}
|
|
49
|
+
/>
|
|
50
|
+
</Group>
|
|
51
|
+
</Prose>
|
|
52
|
+
<Element class="flex flex-col gap-8">
|
|
53
|
+
{
|
|
54
|
+
cards?.map(({ image, badges, heading, paragraph }) => (
|
|
55
|
+
<Element class="flex flex-col gap-2">
|
|
56
|
+
<Image
|
|
57
|
+
class="mb-4"
|
|
58
|
+
{...image}
|
|
64
59
|
/>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
60
|
+
<Group>
|
|
61
|
+
<Badges
|
|
62
|
+
size="sm"
|
|
63
|
+
{badges}
|
|
64
|
+
/>
|
|
65
|
+
</Group>
|
|
66
|
+
<Heading
|
|
67
|
+
depth={(depth + 1) as 3}
|
|
68
|
+
as="h3"
|
|
69
|
+
size="xl"
|
|
70
|
+
text={heading}
|
|
71
|
+
/>
|
|
72
|
+
<Paragraph text={paragraph} />
|
|
73
|
+
</Element>
|
|
74
|
+
))
|
|
75
|
+
}
|
|
76
|
+
</Element>
|
|
77
|
+
</Split>
|
|
76
78
|
</Container>
|
|
77
79
|
</Section>
|
|
78
|
-
|
|
79
|
-
<style is:global>
|
|
80
|
-
@layer fulldev {
|
|
81
|
-
.projects-1 {
|
|
82
|
-
.container {
|
|
83
|
-
@apply flex flex-col items-start gap-x-gutter lg:grid lg:grid-cols-2;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.prose {
|
|
87
|
-
@apply lg:sticky lg:top-sticky-16 lg:max-w-xl;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.projects-1-cards {
|
|
91
|
-
@apply flex flex-col gap-8;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.projects-1-card {
|
|
95
|
-
@apply flex flex-col gap-2;
|
|
96
|
-
|
|
97
|
-
.image {
|
|
98
|
-
@apply mb-4 rounded-md;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
</style>
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type { ComponentProps } from 'astro/types'
|
|
3
2
|
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
4
|
-
import Image from 'fulldev-ui/components/Image.astro'
|
|
5
3
|
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
6
|
-
import
|
|
4
|
+
import Proof from 'fulldev-ui/components/Proof.astro'
|
|
7
5
|
import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
8
6
|
import type { BlockSchema } from 'fulldev-ui/schemas/block'
|
|
9
7
|
import Card from 'fulldev-ui/structures/Card.astro'
|
|
@@ -12,9 +10,9 @@ import Masonry from 'fulldev-ui/structures/Masonry.astro'
|
|
|
12
10
|
import Section from 'fulldev-ui/structures/Section.astro'
|
|
13
11
|
import Writeup from 'fulldev-ui/structures/Writeup.astro'
|
|
14
12
|
|
|
15
|
-
interface Props extends
|
|
13
|
+
interface Props extends BlockSchema {}
|
|
16
14
|
|
|
17
|
-
const { tagline, heading, paragraph, cards, ...rest } = Astro.props
|
|
15
|
+
const { depth = 2, tagline, heading, paragraph, cards, ...rest } = Astro.props
|
|
18
16
|
---
|
|
19
17
|
|
|
20
18
|
<Section
|
|
@@ -30,19 +28,21 @@ const { tagline, heading, paragraph, cards, ...rest } = Astro.props
|
|
|
30
28
|
<Heading
|
|
31
29
|
size="3xl"
|
|
32
30
|
text={heading}
|
|
31
|
+
{depth}
|
|
33
32
|
/>
|
|
34
33
|
<Paragraph text={paragraph} />
|
|
35
34
|
</Writeup>
|
|
36
35
|
<Masonry>
|
|
37
36
|
{
|
|
38
|
-
cards?.map(({ rating, heading, paragraph
|
|
37
|
+
cards?.map(({ tagline, avatar, rating, heading, paragraph }) => (
|
|
39
38
|
<Card class="reviews-1-card">
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
<Proof
|
|
40
|
+
text={tagline}
|
|
41
|
+
{rating}
|
|
42
|
+
{avatar}
|
|
44
43
|
/>
|
|
45
44
|
<Heading
|
|
45
|
+
depth={(depth + 1) as 3}
|
|
46
46
|
as="h3"
|
|
47
47
|
size="md"
|
|
48
48
|
text={heading}
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type { ComponentProps, HTMLAttributes } from 'astro/types'
|
|
3
2
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
3
|
import Links from 'fulldev-ui/components/Links.astro'
|
|
4
|
+
import type { BlockSchema } from 'fulldev-ui/schemas/block'
|
|
5
5
|
|
|
6
|
-
interface Props extends
|
|
7
|
-
dark?: boolean | undefined
|
|
8
|
-
size?: 'sm' | 'md' | 'lg' | undefined
|
|
9
|
-
links?: ComponentProps<typeof Links>['links']
|
|
10
|
-
}
|
|
6
|
+
interface Props extends BlockSchema {}
|
|
11
7
|
|
|
12
|
-
const {
|
|
8
|
+
const { links, ...rest } = Astro.props
|
|
13
9
|
---
|
|
14
10
|
|
|
15
11
|
<Element
|
|
16
12
|
class:list={['subheader']}
|
|
17
13
|
as="subheader"
|
|
18
|
-
{size}
|
|
19
14
|
{...rest}
|
|
20
15
|
>
|
|
21
16
|
<Element class:list="subheader-container">
|
|
22
17
|
<Links
|
|
23
18
|
class:list="subheader-links"
|
|
24
|
-
|
|
19
|
+
size="sm"
|
|
25
20
|
{links}
|
|
26
21
|
/>
|
|
27
22
|
</Element>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
// @ts-nocheck
|
|
3
|
-
import type { ComponentProps } from 'astro/types'
|
|
4
3
|
import Badges from 'fulldev-ui/components/Badges.astro'
|
|
5
4
|
import Channel from 'fulldev-ui/components/Channel.astro'
|
|
6
5
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
@@ -13,7 +12,7 @@ import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
|
13
12
|
import type { BlockSchema } from 'fulldev-ui/schemas/block'
|
|
14
13
|
import Section from 'fulldev-ui/structures/Section.astro'
|
|
15
14
|
|
|
16
|
-
interface Props extends
|
|
15
|
+
interface Props extends BlockSchema {}
|
|
17
16
|
|
|
18
17
|
const {
|
|
19
18
|
badge,
|
|
@@ -40,7 +39,6 @@ const {
|
|
|
40
39
|
<Element class:list="contact-1-content">
|
|
41
40
|
<Badges
|
|
42
41
|
size="sm"
|
|
43
|
-
{badge}
|
|
44
42
|
{badges}
|
|
45
43
|
/>
|
|
46
44
|
<Tagline
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import Image from 'fulldev-ui/components/Image.astro'
|
|
4
|
+
|
|
5
|
+
interface Props extends ComponentProps<typeof Image> {
|
|
6
|
+
size?: 'sm' | 'md' | 'lg' | undefined
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { size = 'md', ...rest } = Astro.props
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<Image
|
|
13
|
+
class:list={[
|
|
14
|
+
'avatar',
|
|
15
|
+
{
|
|
16
|
+
[`size-${size}`]: size,
|
|
17
|
+
},
|
|
18
|
+
]}
|
|
19
|
+
{...rest}
|
|
20
|
+
/>
|
|
21
|
+
|
|
22
|
+
<style is:global>
|
|
23
|
+
@layer fulldev {
|
|
24
|
+
.avatar {
|
|
25
|
+
@apply !rounded-full object-cover;
|
|
26
|
+
|
|
27
|
+
&.size-sm {
|
|
28
|
+
@apply h-9 w-9;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.size-md {
|
|
32
|
+
@apply h-10 w-10;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.size-lg {
|
|
36
|
+
@apply h-11 w-11;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import Avatar from 'fulldev-ui/components/Avatar.astro'
|
|
4
|
+
|
|
5
|
+
interface Props extends ComponentProps<typeof Avatar> {
|
|
6
|
+
avatar?: ComponentProps<typeof Avatar> | undefined
|
|
7
|
+
avatars?: ComponentProps<typeof Avatar>[] | undefined
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { avatar, avatars, ...rest } = Astro.props
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
{
|
|
14
|
+
[avatar, ...(avatars || [])].filter(Boolean).map((avatar) => (
|
|
15
|
+
<Avatar
|
|
16
|
+
{...rest}
|
|
17
|
+
{...avatar}
|
|
18
|
+
/>
|
|
19
|
+
))
|
|
20
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from 'astro/types'
|
|
3
3
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
|
-
import Icon from 'fulldev-ui/components/Icon.astro'
|
|
5
4
|
|
|
6
5
|
interface Props extends HTMLAttributes<'a'>, HTMLAttributes<'div'> {
|
|
7
6
|
variant?: 'primary' | 'secondary' | 'outline' | undefined
|
|
@@ -20,53 +19,25 @@ const { variant = 'outline', size = 'md', text, icon, ...rest } = Astro.props
|
|
|
20
19
|
{size}
|
|
21
20
|
{...rest}
|
|
22
21
|
>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
name={icon}
|
|
26
|
-
/>
|
|
27
|
-
<Element as="span">
|
|
28
|
-
<Fragment set:html={text} />
|
|
29
|
-
<slot />
|
|
30
|
-
</Element>
|
|
22
|
+
<Fragment set:html={text} />
|
|
23
|
+
<slot />
|
|
31
24
|
</Element>
|
|
32
25
|
|
|
33
26
|
<style is:global>
|
|
34
27
|
@layer fulldev {
|
|
35
28
|
.badge {
|
|
36
|
-
@apply inline-flex items-center justify-center
|
|
37
|
-
@apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2;
|
|
38
|
-
@apply disabled:pointer-events-none disabled:opacity-50;
|
|
39
|
-
|
|
40
|
-
&.size-sm {
|
|
41
|
-
@apply h-6 min-w-6 px-2;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&.size-md {
|
|
45
|
-
@apply h-7 min-w-7 px-3;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&.size-lg {
|
|
49
|
-
@apply h-8 min-w-8 px-3.5;
|
|
50
|
-
}
|
|
29
|
+
@apply inline-flex h-6 items-center justify-center whitespace-nowrap rounded-full px-2.5 text-xs font-medium leading-none ring-offset-background;
|
|
51
30
|
|
|
52
31
|
&.variant-primary {
|
|
53
|
-
@apply bg-primary text-primary-foreground
|
|
32
|
+
@apply bg-primary text-primary-foreground;
|
|
54
33
|
}
|
|
55
34
|
|
|
56
35
|
&.variant-secondary {
|
|
57
|
-
@apply bg-secondary text-secondary-foreground
|
|
36
|
+
@apply bg-secondary text-secondary-foreground;
|
|
58
37
|
}
|
|
59
38
|
|
|
60
39
|
&.variant-outline {
|
|
61
|
-
@apply border border-input text-accent-foreground
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.icon {
|
|
65
|
-
@apply first:last:absolute;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
span {
|
|
69
|
-
@apply text-inherit;
|
|
40
|
+
@apply border border-input text-accent-foreground;
|
|
70
41
|
}
|
|
71
42
|
}
|
|
72
43
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { getEntries } from 'astro:content'
|
|
3
3
|
import type { BlockSchema } from 'fulldev-ui/schemas/block'
|
|
4
|
+
import { getHref } from 'fulldev-ui/utils/getHref'
|
|
4
5
|
|
|
5
6
|
interface Props extends BlockSchema {}
|
|
6
7
|
|
|
7
|
-
let { _block, pages, ...rest } = Astro.props
|
|
8
|
-
|
|
9
|
-
pages = pages && (await getEntries(pages))
|
|
8
|
+
let { _block, cards, pages, records, ...rest } = Astro.props
|
|
10
9
|
|
|
11
10
|
const blocks = {
|
|
12
11
|
...import.meta.glob('/src/blocks/**/*.astro'),
|
|
@@ -18,13 +17,29 @@ const path = Object.keys(blocks).find(
|
|
|
18
17
|
)
|
|
19
18
|
|
|
20
19
|
const BlockComponent = path && (await (blocks[path] as any)()).default
|
|
20
|
+
|
|
21
|
+
cards = [
|
|
22
|
+
...(cards || []),
|
|
23
|
+
...(await getEntries(records || [])).map(({ data }) => ({
|
|
24
|
+
...data,
|
|
25
|
+
})),
|
|
26
|
+
...(await getEntries(pages || [])).map(({ slug, data }) => ({
|
|
27
|
+
href: getHref(slug),
|
|
28
|
+
...data,
|
|
29
|
+
heading: data.title,
|
|
30
|
+
})),
|
|
31
|
+
]
|
|
21
32
|
---
|
|
22
33
|
|
|
23
34
|
{
|
|
24
35
|
BlockComponent && (
|
|
25
36
|
<BlockComponent
|
|
37
|
+
{cards}
|
|
26
38
|
{pages}
|
|
39
|
+
{records}
|
|
27
40
|
{...rest}
|
|
28
|
-
|
|
41
|
+
>
|
|
42
|
+
<slot />
|
|
43
|
+
</BlockComponent>
|
|
29
44
|
)
|
|
30
45
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
|
+
import Icon from 'fulldev-ui/components/Icon.astro'
|
|
5
|
+
|
|
6
|
+
interface Props extends HTMLAttributes<'a'>, HTMLAttributes<'div'> {
|
|
7
|
+
variant?: 'primary' | 'secondary' | 'outline' | undefined
|
|
8
|
+
size?: 'sm' | 'md' | 'lg' | undefined
|
|
9
|
+
text?: string | undefined
|
|
10
|
+
icon?: string | undefined
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { variant = 'outline', size = 'md', text, icon, ...rest } = Astro.props
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<Element
|
|
17
|
+
class:list="chip"
|
|
18
|
+
as={rest.href ? 'a' : 'div'}
|
|
19
|
+
{variant}
|
|
20
|
+
{size}
|
|
21
|
+
{...rest}
|
|
22
|
+
>
|
|
23
|
+
<Icon
|
|
24
|
+
size="sm"
|
|
25
|
+
name={icon}
|
|
26
|
+
/>
|
|
27
|
+
<Element as="span">
|
|
28
|
+
<Fragment set:html={text} />
|
|
29
|
+
<slot />
|
|
30
|
+
</Element>
|
|
31
|
+
</Element>
|
|
32
|
+
|
|
33
|
+
<style is:global>
|
|
34
|
+
@layer fulldev {
|
|
35
|
+
.chip {
|
|
36
|
+
@apply inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-full text-sm font-medium leading-none ring-offset-background transition-colors;
|
|
37
|
+
@apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2;
|
|
38
|
+
@apply disabled:pointer-events-none disabled:opacity-50;
|
|
39
|
+
|
|
40
|
+
&.size-sm {
|
|
41
|
+
@apply h-6 min-w-6 px-2;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.size-md {
|
|
45
|
+
@apply h-7 min-w-7 px-3;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.size-lg {
|
|
49
|
+
@apply h-8 min-w-8 px-3.5;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.variant-primary {
|
|
53
|
+
@apply bg-primary text-primary-foreground hover:bg-primary-hover;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.variant-secondary {
|
|
57
|
+
@apply bg-secondary text-secondary-foreground hover:bg-secondary-hover;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.variant-outline {
|
|
61
|
+
@apply border border-input text-accent-foreground hover:bg-accent;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.icon {
|
|
65
|
+
@apply first:last:absolute;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
span {
|
|
69
|
+
@apply text-inherit;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</style>
|
|
@@ -5,8 +5,8 @@ import Element from 'fulldev-ui/components/Element.astro'
|
|
|
5
5
|
interface Props
|
|
6
6
|
extends HTMLAttributes<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'> {
|
|
7
7
|
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | undefined
|
|
8
|
+
depth?: 1 | 2 | 3 | 4 | 5 | 6 | number | undefined
|
|
8
9
|
text?: string | undefined
|
|
9
|
-
muted?: boolean | undefined
|
|
10
10
|
size?:
|
|
11
11
|
| 'xs'
|
|
12
12
|
| 'sm'
|
|
@@ -21,7 +21,7 @@ interface Props
|
|
|
21
21
|
| undefined
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
const {
|
|
24
|
+
const { depth = 2, as = `h${depth}`, text, ...rest } = Astro.props
|
|
25
25
|
---
|
|
26
26
|
|
|
27
27
|
<Element
|
|
@@ -34,11 +34,12 @@ const { as = 'h2', text, ...rest } = Astro.props
|
|
|
34
34
|
</Element>
|
|
35
35
|
|
|
36
36
|
<style is:global>
|
|
37
|
-
.heading
|
|
37
|
+
.heading,
|
|
38
|
+
.prose > :is(h1, h2, h3, h4, h5, h6) {
|
|
38
39
|
@apply scroll-mt-20 font-bold tracking-tight text-foreground;
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
@apply
|
|
41
|
+
code {
|
|
42
|
+
@apply rounded-sm bg-muted px-1 py-0.5 font-mono;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
&.size-xs {
|
|
@@ -49,30 +50,37 @@ const { as = 'h2', text, ...rest } = Astro.props
|
|
|
49
50
|
@apply text-sm;
|
|
50
51
|
}
|
|
51
52
|
|
|
53
|
+
&:where(.prose > h6),
|
|
52
54
|
&.size-md {
|
|
53
55
|
@apply text-base;
|
|
54
56
|
}
|
|
55
57
|
|
|
58
|
+
&:where(.prose > h5),
|
|
56
59
|
&.size-lg {
|
|
57
60
|
@apply text-lg;
|
|
58
61
|
}
|
|
59
62
|
|
|
63
|
+
&:where(.prose > h4),
|
|
60
64
|
&.size-xl {
|
|
61
65
|
@apply text-xl;
|
|
62
66
|
}
|
|
63
67
|
|
|
68
|
+
&:where(.prose > h3),
|
|
64
69
|
&.size-2xl {
|
|
65
70
|
@apply text-2xl;
|
|
66
71
|
}
|
|
67
72
|
|
|
73
|
+
&:where(.prose > h2),
|
|
68
74
|
&.size-3xl {
|
|
69
75
|
@apply text-3xl;
|
|
70
76
|
}
|
|
71
77
|
|
|
78
|
+
&:where(.prose > h2:not(:is(h1 ~ h2))),
|
|
72
79
|
&.size-4xl {
|
|
73
80
|
@apply text-4xl;
|
|
74
81
|
}
|
|
75
82
|
|
|
83
|
+
&:where(.prose > h1),
|
|
76
84
|
&.size-5xl {
|
|
77
85
|
@apply text-4xl lg:text-5xl;
|
|
78
86
|
}
|
|
@@ -30,7 +30,7 @@ const { variant = 'muted', size = 'md', text, icon, ...rest } = Astro.props
|
|
|
30
30
|
@layer fulldev {
|
|
31
31
|
.link,
|
|
32
32
|
.prose-content > *:not(.prose-footer) > a {
|
|
33
|
-
@apply ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2;
|
|
33
|
+
@apply cursor-pointer ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2;
|
|
34
34
|
|
|
35
35
|
&.variant-primary,
|
|
36
36
|
&:is(.prose-content > *:not(.prose-footer) > a) {
|
|
@@ -19,11 +19,15 @@ const { size = 'md', heading, links, ...rest } = Astro.props
|
|
|
19
19
|
class:list="menu"
|
|
20
20
|
{...rest}
|
|
21
21
|
>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
{
|
|
23
|
+
links && links.length > 0 && (
|
|
24
|
+
<Heading
|
|
25
|
+
text={heading}
|
|
26
|
+
as="h6"
|
|
27
|
+
{size}
|
|
28
|
+
/>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
27
31
|
<Links
|
|
28
32
|
{size}
|
|
29
33
|
{links}
|