fulldev-ui 0.6.0-beta.3 → 0.6.0-beta.7
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 +1 -7
- package/cloudcannon.config.yml +270 -0
- package/package.json +1 -1
- package/src/blocks/Banner.astro +33 -0
- package/src/blocks/Colleagues1.astro +73 -0
- package/src/blocks/Contact1.astro +12 -4
- package/src/blocks/Content1.astro +79 -0
- package/src/blocks/Content2.astro +94 -0
- package/src/blocks/Content3.astro +70 -0
- package/src/blocks/Content4.astro +75 -0
- package/src/blocks/Cta1.astro +35 -34
- package/src/blocks/Feature1.astro +20 -26
- package/src/blocks/Features1.astro +66 -0
- package/src/blocks/Footer.astro +27 -52
- package/src/blocks/Header.astro +154 -0
- package/src/blocks/Hero1.astro +41 -41
- package/src/blocks/Intro1.astro +32 -18
- package/src/blocks/Jobs1.astro +73 -0
- package/src/blocks/Logos1.astro +55 -0
- package/src/blocks/Products1.astro +4 -4
- package/src/blocks/Reviews1.astro +79 -0
- package/src/components/Badges.astro +12 -35
- package/src/components/Block.astro +5 -24
- package/src/components/Button.astro +1 -2
- package/src/components/Buttons.astro +12 -43
- package/src/components/Cart.astro +6 -12
- package/src/components/Drawer.astro +1 -2
- package/src/components/Form.astro +3 -3
- package/src/components/Grid.astro +39 -0
- package/src/components/{Banner.astro → Group.astro} +5 -6
- package/src/components/Heading.astro +5 -1
- package/src/components/Icon.astro +0 -1
- package/src/components/Image.astro +15 -50
- package/src/components/Layout.astro +35 -0
- package/src/components/Links.astro +14 -35
- package/src/components/Logo.astro +5 -7
- package/src/components/Masonry.astro +42 -0
- package/src/components/Menu.astro +17 -38
- package/src/components/Menus.astro +20 -0
- package/src/components/Panel.astro +1 -1
- package/src/components/Paragraph.astro +8 -8
- package/src/components/Prose.astro +15 -7
- package/src/components/Search.astro +1 -1
- package/src/components/Section.astro +1 -1
- package/src/components/Sidebar.astro +11 -42
- package/src/components/Stack.astro +25 -0
- package/src/components/Tagline.astro +1 -1
- package/src/components/Toc.astro +22 -30
- package/src/components/Writeup.astro +59 -0
- package/src/components/_Image.astro +79 -0
- package/src/content/config.ts +2 -28
- package/src/content/layouts/base.yml +4 -3
- package/src/content/{docs → pages/docs}/_internationalization.mdx +1 -0
- package/src/content/{docs → pages/docs}/_using-blocks.mdx +1 -0
- package/src/content/{docs → pages/docs}/_using-presets.mdx +1 -0
- package/src/content/{docs → pages/docs}/blocks.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections/images.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections/pages.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections/presets.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_card.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_dialog.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_drawer.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_localeswitcher.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_switch.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_tagline.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_toggle.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/avatar.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/badge.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/badges.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/button.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/buttons.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/channel.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/channels.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/checkbox.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/code.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/heading.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/icon.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/image.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/input.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/label.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/link.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/links.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/list.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/logo.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/menu.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/prose.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/rating.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/section.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/select.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/social.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/socials.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/switch.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/table.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/tagline.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/text.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/textarea.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/themer.mdx +1 -0
- package/src/content/{docs → pages/docs}/components.mdx +1 -0
- package/src/content/{docs → pages/docs}/customization.mdx +1 -0
- package/src/content/{docs → pages/docs}/frameworks.mdx +1 -0
- package/src/content/{docs → pages/docs}/generating-pages.mdx +1 -0
- package/src/content/{docs → pages/docs}/index.mdx +1 -0
- package/src/content/{docs → pages/docs}/installation.mdx +1 -0
- package/src/content/{docs → pages/docs}/layouts.mdx +1 -0
- package/src/content/pages/index.mdx +3 -3
- package/src/content/{products → pages/products}/product.md +2 -2
- package/src/integration/index.ts +36 -16
- package/src/layouts/{CategoryLayout.astro → Category.astro} +19 -20
- package/src/layouts/Doc.astro +70 -0
- package/src/layouts/Job.astro +60 -0
- package/src/layouts/Jobs.astro +72 -0
- package/src/layouts/Page.astro +29 -0
- package/src/layouts/Post.astro +52 -0
- package/src/layouts/{ProductLayout.astro → Product.astro} +20 -11
- package/src/pages/[...page].astro +36 -4
- package/src/pages/test.astro +25 -1
- package/src/schemas/components/block.ts +58 -15
- package/src/schemas/components/button.ts +1 -0
- package/src/schemas/components/image.ts +32 -18
- package/src/schemas/components/menu.ts +1 -0
- package/src/schemas/imageSchema.ts +3 -3
- package/src/schemas/page.ts +40 -0
- package/src/stores/cart.svelte.ts +0 -1
- package/src/utils/getHref.ts +4 -21
- package/tailwind.config.ts +4 -0
- package/src/blocks/Banner1.astro +0 -35
- package/src/blocks/Header1.astro +0 -192
- package/src/content/layouts/docs.yml +0 -2
- package/src/layouts/DocLayout.astro +0 -59
- package/src/layouts/Layout.astro +0 -107
- package/src/layouts/PageLayout.astro +0 -27
- package/src/layouts/PostLayout.astro +0 -22
- package/src/pages/[...category].astro +0 -17
- package/src/pages/[...doc].astro +0 -17
- package/src/pages/[...post].astro +0 -17
- package/src/pages/[...product].astro +0 -17
- package/src/schemas/blocks/banner.ts +0 -10
- package/src/schemas/blocks/categories.ts +0 -14
- package/src/schemas/blocks/contact.ts +0 -18
- package/src/schemas/blocks/cta.ts +0 -18
- package/src/schemas/blocks/feature.ts +0 -18
- package/src/schemas/blocks/hero.ts +0 -20
- package/src/schemas/blocks/intro.ts +0 -16
- package/src/schemas/blocks/products.ts +0 -14
- package/src/schemas/categorySchema.ts +0 -16
- package/src/schemas/docSchema.ts +0 -14
- package/src/schemas/layoutSchema.ts +0 -22
- package/src/schemas/pageSchema.ts +0 -17
- package/src/schemas/postSchema.ts +0 -14
- package/src/schemas/productSchema.ts +0 -22
- /package/src/content/{categories → pages/categories}/category.md +0 -0
- /package/src/content/{posts → pages/posts}/post.md +0 -0
package/src/components/Toc.astro
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { MarkdownHeading } from 'astro'
|
|
3
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
4
4
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
5
5
|
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
6
6
|
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
7
|
-
import
|
|
7
|
+
import Link from './Link.astro'
|
|
8
8
|
|
|
9
9
|
interface Props extends GlobalProps, HTMLAttributes<'div'> {
|
|
10
|
-
|
|
11
|
-
render?: CollectionEntry<'pages'>['render'] | undefined
|
|
10
|
+
headings?: MarkdownHeading[] | undefined
|
|
12
11
|
}
|
|
13
12
|
|
|
14
|
-
const {
|
|
13
|
+
const { headings, ...rest } = Astro.props
|
|
15
14
|
|
|
16
|
-
const headings = render ? (await render())?.headings : []
|
|
17
15
|
const filteredHeadings = headings?.filter(
|
|
18
16
|
(heading: any) => heading.depth >= 2 && heading.depth <= 4
|
|
19
17
|
)
|
|
18
|
+
|
|
19
|
+
const h1 = headings?.find((heading: any) => heading.depth === 1)
|
|
20
|
+
|
|
20
21
|
const links = filteredHeadings?.map((button: any) => ({
|
|
21
22
|
text: button.text,
|
|
22
23
|
href: `#${button.slug}`,
|
|
@@ -25,41 +26,32 @@ const links = filteredHeadings?.map((button: any) => ({
|
|
|
25
26
|
---
|
|
26
27
|
|
|
27
28
|
<Element
|
|
28
|
-
if={filteredHeadings?.length > 1}
|
|
29
29
|
class:list="toc"
|
|
30
|
-
{
|
|
30
|
+
if={filteredHeadings?.length}
|
|
31
31
|
{...rest}
|
|
32
32
|
>
|
|
33
33
|
<Heading
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{
|
|
37
|
-
/>
|
|
38
|
-
<Links
|
|
39
|
-
direction="column"
|
|
40
|
-
{links}
|
|
41
|
-
{size}
|
|
34
|
+
as="a"
|
|
35
|
+
href="#"
|
|
36
|
+
{...h1}
|
|
42
37
|
/>
|
|
38
|
+
{
|
|
39
|
+
links?.map((link) => (
|
|
40
|
+
<Link
|
|
41
|
+
variant="muted"
|
|
42
|
+
size="sm"
|
|
43
|
+
{...link}
|
|
44
|
+
/>
|
|
45
|
+
))
|
|
46
|
+
}
|
|
43
47
|
</Element>
|
|
44
48
|
|
|
45
49
|
<style is:global>
|
|
46
50
|
@layer fulldev {
|
|
47
51
|
.toc {
|
|
48
|
-
@apply sticky bottom-0 z-10 hidden shrink-0 flex-col items-start justify-start gap-3 overflow-y-auto
|
|
52
|
+
@apply lg:top-sticky-16 sticky bottom-0 z-10 hidden w-48 shrink-0 flex-col items-start justify-start gap-3 overflow-y-auto md:flex;
|
|
49
53
|
@apply scrollbar scrollbar-track-transparent scrollbar-thumb-accent scrollbar-thumb-rounded-full scrollbar-w-2 hover:scrollbar-thumb-accent-hover;
|
|
50
54
|
|
|
51
|
-
--headers: calc(var(--header-height, 0px) + var(--subheader-height, 0px));
|
|
52
|
-
top: var(--headers);
|
|
53
|
-
width: var(--toc-width);
|
|
54
|
-
max-height: calc(100vh - var(--headers));
|
|
55
|
-
|
|
56
|
-
&,
|
|
57
|
-
& ~ * {
|
|
58
|
-
@media (min-width: 768px) {
|
|
59
|
-
--toc-width: 12rem;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
55
|
.depth-3 {
|
|
64
56
|
@apply pl-3;
|
|
65
57
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
|
+
|
|
5
|
+
interface Props extends HTMLAttributes<'div'> {
|
|
6
|
+
as?: HTMLTag
|
|
7
|
+
align?: 'left' | 'center' | 'right'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { align = 'start', ...rest } = Astro.props
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<Element
|
|
14
|
+
class:list="writeup"
|
|
15
|
+
{align}
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
<slot />
|
|
19
|
+
</Element>
|
|
20
|
+
|
|
21
|
+
<style is:global>
|
|
22
|
+
@layer fulldev {
|
|
23
|
+
.writeup {
|
|
24
|
+
@apply relative w-full;
|
|
25
|
+
|
|
26
|
+
&.align-left {
|
|
27
|
+
@apply mr-auto flex flex-col items-start text-left;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.align-center {
|
|
31
|
+
@apply mx-auto flex flex-col items-center text-center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.align-right {
|
|
35
|
+
@apply ml-auto flex flex-col items-end text-right;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.heading {
|
|
39
|
+
@apply max-w-screen-lg text-balance;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.paragraph {
|
|
43
|
+
@apply max-w-screen-md text-balance;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
> * {
|
|
47
|
+
& + * {
|
|
48
|
+
@apply mt-4;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
& + .group,
|
|
52
|
+
& + .button,
|
|
53
|
+
& + .buttons {
|
|
54
|
+
@apply mt-8;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import type { ImageMetadata } from 'astro'
|
|
4
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
5
|
+
import { Image as AstroImage } from 'astro:assets'
|
|
6
|
+
import { getEntry } from 'astro:content'
|
|
7
|
+
|
|
8
|
+
interface Props extends GlobalProps, HTMLAttributes<'img'> {
|
|
9
|
+
id?: any
|
|
10
|
+
size?: 'sm' | 'md' | 'lg' | undefined
|
|
11
|
+
position?: 'background' | 'cover' | 'inset' | undefined
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const { id } = Astro.props
|
|
15
|
+
const entry = id ? (await getEntry('images', id))?.data : {}
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
width = 1920,
|
|
19
|
+
height = 1920,
|
|
20
|
+
position,
|
|
21
|
+
src,
|
|
22
|
+
alt,
|
|
23
|
+
size,
|
|
24
|
+
...rest
|
|
25
|
+
} = {
|
|
26
|
+
...entry,
|
|
27
|
+
...Astro.props,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function getAltBySrc() {
|
|
31
|
+
if (!src) return
|
|
32
|
+
const filename = src?.split('/').pop()
|
|
33
|
+
const slug = filename && filename.split('.')[0]
|
|
34
|
+
const unslugged = slug?.replace(/-/g, ' ')
|
|
35
|
+
return unslugged || ''
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const images = import.meta.glob<{ default: ImageMetadata }>('/src/images/*')
|
|
39
|
+
const image = images[src as keyof typeof images]
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
{
|
|
43
|
+
(image || src) && (
|
|
44
|
+
<AstroImage
|
|
45
|
+
class:list={[
|
|
46
|
+
'image',
|
|
47
|
+
{
|
|
48
|
+
[`size-${size}`]: size,
|
|
49
|
+
[`position-${position}`]: position,
|
|
50
|
+
},
|
|
51
|
+
]}
|
|
52
|
+
alt={alt || getAltBySrc()}
|
|
53
|
+
src={image ? image() : src}
|
|
54
|
+
width={width ? Number(width) : undefined}
|
|
55
|
+
height={height ? Number(height) : undefined}
|
|
56
|
+
{...rest}
|
|
57
|
+
/>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
<style is:global>
|
|
62
|
+
@layer fulldev {
|
|
63
|
+
.image {
|
|
64
|
+
@apply block;
|
|
65
|
+
|
|
66
|
+
&.position-contain {
|
|
67
|
+
@apply h-auto w-full object-contain;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.position-cover {
|
|
71
|
+
@apply h-full w-full object-cover;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.position-background {
|
|
75
|
+
@apply absolute inset-0 h-full max-h-none w-full max-w-none object-cover opacity-30;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
</style>
|
package/src/content/config.ts
CHANGED
|
@@ -1,39 +1,13 @@
|
|
|
1
1
|
import { defineCollection } from 'astro:content'
|
|
2
|
-
import {
|
|
3
|
-
import { docSchema } from 'fulldev-ui/schemas/docSchema.ts'
|
|
4
|
-
import { imageLoader, imageSchema } from 'fulldev-ui/schemas/imageSchema.ts'
|
|
5
|
-
import { layoutSchema } from 'fulldev-ui/schemas/layoutSchema.ts'
|
|
6
|
-
import { pageSchema } from 'fulldev-ui/schemas/pageSchema.ts'
|
|
7
|
-
import { postSchema } from 'fulldev-ui/schemas/postSchema.ts'
|
|
8
|
-
import { productSchema } from 'fulldev-ui/schemas/productSchema.ts'
|
|
2
|
+
import { pageSchema } from 'fulldev-ui/schemas/page.ts'
|
|
9
3
|
|
|
10
4
|
export const collections = {
|
|
11
5
|
pages: defineCollection({
|
|
12
6
|
type: 'content',
|
|
13
7
|
schema: pageSchema,
|
|
14
8
|
}),
|
|
15
|
-
posts: defineCollection({
|
|
16
|
-
type: 'content',
|
|
17
|
-
schema: postSchema,
|
|
18
|
-
}),
|
|
19
|
-
docs: defineCollection({
|
|
20
|
-
type: 'content',
|
|
21
|
-
schema: docSchema,
|
|
22
|
-
}),
|
|
23
|
-
categories: defineCollection({
|
|
24
|
-
type: 'content',
|
|
25
|
-
schema: categorySchema,
|
|
26
|
-
}),
|
|
27
|
-
products: defineCollection({
|
|
28
|
-
type: 'content',
|
|
29
|
-
schema: productSchema,
|
|
30
|
-
}),
|
|
31
9
|
layouts: defineCollection({
|
|
32
10
|
type: 'data',
|
|
33
|
-
schema:
|
|
34
|
-
}),
|
|
35
|
-
images: defineCollection({
|
|
36
|
-
loader: imageLoader,
|
|
37
|
-
schema: imageSchema,
|
|
11
|
+
schema: pageSchema,
|
|
38
12
|
}),
|
|
39
13
|
}
|
|
@@ -12,11 +12,10 @@ head:
|
|
|
12
12
|
banner:
|
|
13
13
|
text: 'Introducing v0.6: layouts & pagebuilding 🎉'
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
header: true
|
|
17
|
-
themer: true
|
|
15
|
+
header:
|
|
18
16
|
search: true
|
|
19
17
|
logo:
|
|
18
|
+
image: /src/images/favicon/android-chrome-512x512.png
|
|
20
19
|
text: Fulldev UI
|
|
21
20
|
links:
|
|
22
21
|
- text: Docs
|
|
@@ -30,6 +29,8 @@ navigation:
|
|
|
30
29
|
socials:
|
|
31
30
|
- https://github.com/fulldotdev/ui
|
|
32
31
|
- https://discord.gg/vXZqMbadm8
|
|
32
|
+
|
|
33
|
+
sidebar:
|
|
33
34
|
menus:
|
|
34
35
|
- heading: Get Started
|
|
35
36
|
links:
|