fulldev-ui 0.5.0-beta.3 → 0.5.0-beta.4
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 +1 -1
- package/src/blocks/Contact.astro +7 -30
- package/src/blocks/Intro.astro +3 -1
- package/src/components/Card.astro +10 -4
- package/src/components/Footer.astro +2 -2
- package/src/components/Header.astro +1 -2
- package/src/components/Sidebar.astro +2 -2
- package/src/components/Social.astro +7 -0
- package/src/components/experimental/Form.astro +2 -0
- package/src/content/presets/docs.yml +1 -0
- package/src/layouts/Layout.astro +13 -6
- package/src/layouts/OverviewLayout.astro +2 -0
- package/src/schemas/components/footer.ts +1 -0
- package/src/schemas/components/header.ts +9 -6
- package/src/schemas/pageSchema.ts +5 -2
- package/src/schemas/presetSchema.ts +7 -3
- package/src/schemas/utils/navigation.ts +2 -1
- package/src/utils/getReferenceChildren.ts +4 -1
package/package.json
CHANGED
package/src/blocks/Contact.astro
CHANGED
|
@@ -13,35 +13,6 @@ import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
|
13
13
|
import Text from 'fulldev-ui/components/Text.astro'
|
|
14
14
|
import Textarea from 'fulldev-ui/components/Textarea.astro'
|
|
15
15
|
|
|
16
|
-
// interface Channel {
|
|
17
|
-
// type: 'tel' | 'email' | 'address'
|
|
18
|
-
// text: string
|
|
19
|
-
// heading?: string
|
|
20
|
-
// icon?: string
|
|
21
|
-
// href?: string
|
|
22
|
-
// }
|
|
23
|
-
|
|
24
|
-
// interface FormField {
|
|
25
|
-
// type: 'text' | 'email' | 'tel' | 'textarea'
|
|
26
|
-
// name: string
|
|
27
|
-
// label: string
|
|
28
|
-
// required?: boolean
|
|
29
|
-
// }
|
|
30
|
-
|
|
31
|
-
// interface Form {
|
|
32
|
-
// fields: FormField[]
|
|
33
|
-
// button: string
|
|
34
|
-
// }
|
|
35
|
-
|
|
36
|
-
// type Props<As extends HTMLTag = 'section'> = ComponentProps<
|
|
37
|
-
// typeof Section<As>
|
|
38
|
-
// > & {
|
|
39
|
-
// form: Form
|
|
40
|
-
// googleMaps?: string
|
|
41
|
-
// socials?: any
|
|
42
|
-
// channels: Channel[]
|
|
43
|
-
// }
|
|
44
|
-
|
|
45
16
|
const {
|
|
46
17
|
heading,
|
|
47
18
|
form,
|
|
@@ -53,7 +24,7 @@ const {
|
|
|
53
24
|
position,
|
|
54
25
|
image,
|
|
55
26
|
channels,
|
|
56
|
-
level =
|
|
27
|
+
level = 1,
|
|
57
28
|
...rest
|
|
58
29
|
} = Astro.props
|
|
59
30
|
---
|
|
@@ -69,6 +40,7 @@ const {
|
|
|
69
40
|
text={tagline}
|
|
70
41
|
/>
|
|
71
42
|
<Heading
|
|
43
|
+
size={'sm'}
|
|
72
44
|
level={level}
|
|
73
45
|
text={heading}
|
|
74
46
|
/>
|
|
@@ -106,6 +78,7 @@ const {
|
|
|
106
78
|
<Button
|
|
107
79
|
type="submit"
|
|
108
80
|
color="brand"
|
|
81
|
+
variant="primary"
|
|
109
82
|
text={form.button}
|
|
110
83
|
/>
|
|
111
84
|
</Form>
|
|
@@ -126,6 +99,10 @@ const {
|
|
|
126
99
|
align-items: flex-start;
|
|
127
100
|
}
|
|
128
101
|
|
|
102
|
+
> .column {
|
|
103
|
+
gap: var(--space-5);
|
|
104
|
+
}
|
|
105
|
+
|
|
129
106
|
.channel + .channel {
|
|
130
107
|
margin-top: var(--space-3) !important;
|
|
131
108
|
}
|
package/src/blocks/Intro.astro
CHANGED
|
@@ -8,7 +8,7 @@ const { image, ...rest } = Astro.props
|
|
|
8
8
|
class:list="intro"
|
|
9
9
|
structure="column"
|
|
10
10
|
size="sm"
|
|
11
|
-
level={
|
|
11
|
+
level={1}
|
|
12
12
|
{...rest}
|
|
13
13
|
/>
|
|
14
14
|
|
|
@@ -16,6 +16,8 @@ const { image, ...rest } = Astro.props
|
|
|
16
16
|
@layer fulldev {
|
|
17
17
|
.intro {
|
|
18
18
|
border-bottom: 1px solid var(--base-6);
|
|
19
|
+
padding-top: var(--space-7);
|
|
20
|
+
padding-bottom: var(--space-7);
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
</style>
|
|
@@ -9,6 +9,7 @@ import Image from 'fulldev-ui/components/Image.astro'
|
|
|
9
9
|
import Writeup from 'fulldev-ui/components/Writeup.astro'
|
|
10
10
|
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
11
11
|
import Icon from './Icon.astro'
|
|
12
|
+
import Price from './Price.astro'
|
|
12
13
|
|
|
13
14
|
interface Props
|
|
14
15
|
extends GlobalProps,
|
|
@@ -22,9 +23,11 @@ interface Props
|
|
|
22
23
|
variant?: ComponentProps<typeof Button>['variant']
|
|
23
24
|
align?: ComponentProps<typeof Writeup>['align']
|
|
24
25
|
icon?: ComponentProps<typeof Icon>['name']
|
|
26
|
+
price?: ComponentProps<typeof Price>['value']
|
|
25
27
|
slug?: CollectionEntry<'pages'>['slug'] | undefined
|
|
26
28
|
id?: any
|
|
27
29
|
panel?: boolean | undefined
|
|
30
|
+
title?: ComponentProps<typeof Writeup>['heading']
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
const { slug } = Astro.props
|
|
@@ -47,12 +50,14 @@ const {
|
|
|
47
50
|
heading,
|
|
48
51
|
text,
|
|
49
52
|
variant,
|
|
53
|
+
price,
|
|
50
54
|
list,
|
|
51
55
|
button,
|
|
52
56
|
buttons,
|
|
53
57
|
panel,
|
|
54
58
|
image,
|
|
55
59
|
icon,
|
|
60
|
+
title,
|
|
56
61
|
images,
|
|
57
62
|
position,
|
|
58
63
|
...rest
|
|
@@ -81,14 +86,15 @@ const {
|
|
|
81
86
|
</slot>
|
|
82
87
|
<slot name="writeup">
|
|
83
88
|
<Writeup
|
|
89
|
+
heading={heading || title}
|
|
84
90
|
{level}
|
|
85
91
|
{rating}
|
|
86
92
|
{badge}
|
|
87
93
|
{tagline}
|
|
88
|
-
{heading}
|
|
89
94
|
{text}
|
|
90
95
|
{list}
|
|
91
96
|
/>
|
|
97
|
+
<Price value={price} />
|
|
92
98
|
</slot>
|
|
93
99
|
<slot name="buttons">
|
|
94
100
|
<Button
|
|
@@ -121,12 +127,12 @@ const {
|
|
|
121
127
|
&[href] {
|
|
122
128
|
cursor: pointer;
|
|
123
129
|
|
|
124
|
-
> .
|
|
125
|
-
transition: all;
|
|
130
|
+
> .image {
|
|
131
|
+
transition: all 0.2s ease;
|
|
126
132
|
}
|
|
127
133
|
|
|
128
134
|
&:hover {
|
|
129
|
-
> .
|
|
135
|
+
> .image {
|
|
130
136
|
opacity: 0.8;
|
|
131
137
|
}
|
|
132
138
|
}
|
|
@@ -53,9 +53,8 @@ const {
|
|
|
53
53
|
>
|
|
54
54
|
<Element class:list="column">
|
|
55
55
|
<Logo
|
|
56
|
-
id={logo}
|
|
57
|
-
src={logo}
|
|
58
56
|
{company}
|
|
57
|
+
{...typeof logo === 'string' ? { src: logo } : logo}
|
|
59
58
|
/>
|
|
60
59
|
<Text
|
|
61
60
|
color="base"
|
|
@@ -110,6 +109,7 @@ const {
|
|
|
110
109
|
align-items: flex-start;
|
|
111
110
|
gap: var(--space-6);
|
|
112
111
|
margin-top: auto;
|
|
112
|
+
margin-top: auto;
|
|
113
113
|
border-top-width: 1px;
|
|
114
114
|
border-color: var(--base-a6);
|
|
115
115
|
background-color: var(--base-2);
|
package/src/layouts/Layout.astro
CHANGED
|
@@ -84,10 +84,14 @@ const {
|
|
|
84
84
|
</slot>
|
|
85
85
|
</main>
|
|
86
86
|
<slot name="toc">
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
{
|
|
88
|
+
toc && (
|
|
89
|
+
<Toc
|
|
90
|
+
{render}
|
|
91
|
+
{...toc}
|
|
92
|
+
/>
|
|
93
|
+
)
|
|
94
|
+
}
|
|
91
95
|
</slot>
|
|
92
96
|
</div>
|
|
93
97
|
<slot name="footer">
|
|
@@ -108,25 +112,28 @@ const {
|
|
|
108
112
|
|
|
109
113
|
body {
|
|
110
114
|
--screen: 100vw;
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
111
117
|
|
|
112
118
|
background-color: var(--base-2);
|
|
113
119
|
width: 100%;
|
|
120
|
+
min-height: 100vh;
|
|
114
121
|
color: var(--base-11);
|
|
115
122
|
|
|
116
123
|
.core {
|
|
117
124
|
display: flex;
|
|
118
125
|
position: relative;
|
|
126
|
+
flex-grow: 1;
|
|
127
|
+
height: 100%;
|
|
119
128
|
|
|
120
129
|
main {
|
|
121
130
|
--screen: 1280px;
|
|
122
|
-
|
|
123
131
|
display: flex;
|
|
124
132
|
flex: 1;
|
|
125
133
|
flex-direction: column;
|
|
126
134
|
background-color: var(--color-background);
|
|
127
135
|
width: 100%;
|
|
128
136
|
max-width: 100vw;
|
|
129
|
-
min-height: 100vh;
|
|
130
137
|
overflow-x: hidden;
|
|
131
138
|
}
|
|
132
139
|
}
|
|
@@ -23,11 +23,13 @@ const referenceChildren = await getReferenceChildren(slug)
|
|
|
23
23
|
text={description}
|
|
24
24
|
/>
|
|
25
25
|
<Categories
|
|
26
|
+
component="Categories"
|
|
26
27
|
cards={folderChildren}
|
|
27
28
|
structure="grid"
|
|
28
29
|
panel
|
|
29
30
|
/>
|
|
30
31
|
<Products
|
|
32
|
+
component="Products"
|
|
31
33
|
cards={referenceChildren}
|
|
32
34
|
structure="grid"
|
|
33
35
|
/>
|
|
@@ -2,9 +2,12 @@ import { z } from 'astro:content'
|
|
|
2
2
|
import buttons from './buttons'
|
|
3
3
|
import logo from './logo'
|
|
4
4
|
|
|
5
|
-
export default z
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
export default z.boolean().or(
|
|
6
|
+
z
|
|
7
|
+
.object({
|
|
8
|
+
logo,
|
|
9
|
+
buttons,
|
|
10
|
+
})
|
|
11
|
+
.partial()
|
|
12
|
+
.passthrough()
|
|
13
|
+
)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getEntries, getEntry, z } from 'astro:content'
|
|
2
2
|
import { assign } from 'radash'
|
|
3
3
|
import fulldevConfig from 'virtual:fulldev-ui/config'
|
|
4
|
+
import footer from './components/footer'
|
|
5
|
+
import header from './components/header'
|
|
4
6
|
import image from './components/image'
|
|
5
7
|
import images from './components/images'
|
|
6
8
|
import sections from './components/sections'
|
|
@@ -63,11 +65,12 @@ export default i18n.pipe(presets).pipe(
|
|
|
63
65
|
image,
|
|
64
66
|
images,
|
|
65
67
|
sections,
|
|
66
|
-
header
|
|
67
|
-
footer
|
|
68
|
+
header,
|
|
69
|
+
footer,
|
|
68
70
|
navigation,
|
|
69
71
|
toc: z.any(),
|
|
70
72
|
sidebar: z.any(),
|
|
73
|
+
banner: z.any(),
|
|
71
74
|
})
|
|
72
75
|
.partial()
|
|
73
76
|
.passthrough()
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
+
import footer from './components/footer'
|
|
3
|
+
import header from './components/header'
|
|
2
4
|
import image from './components/image'
|
|
3
5
|
import sections from './components/sections'
|
|
4
6
|
import component from './utils/component'
|
|
7
|
+
import navigation from './utils/navigation'
|
|
5
8
|
import parents from './utils/parents'
|
|
6
9
|
|
|
7
10
|
export default z
|
|
@@ -20,10 +23,11 @@ export default z
|
|
|
20
23
|
description: z.string().optional(),
|
|
21
24
|
image,
|
|
22
25
|
sections,
|
|
23
|
-
header
|
|
24
|
-
footer
|
|
25
|
-
navigation
|
|
26
|
+
header,
|
|
27
|
+
footer,
|
|
28
|
+
navigation,
|
|
26
29
|
toc: z.any(),
|
|
27
30
|
sidebar: z.any(),
|
|
28
31
|
})
|
|
29
32
|
.partial()
|
|
33
|
+
.passthrough()
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
// })
|
|
18
18
|
|
|
19
19
|
import { z } from 'astro:content'
|
|
20
|
+
import logo from '../components/logo'
|
|
20
21
|
import pathSchema from '../utils/pathSchema'
|
|
21
22
|
|
|
22
23
|
const button = pathSchema('pages').or(
|
|
@@ -43,7 +44,7 @@ const group = z
|
|
|
43
44
|
|
|
44
45
|
export default z
|
|
45
46
|
.object({
|
|
46
|
-
logo
|
|
47
|
+
logo,
|
|
47
48
|
search: z.boolean(),
|
|
48
49
|
sidebar: z.boolean(),
|
|
49
50
|
toc: z.boolean(),
|