fulldev-ui 0.3.2 → 0.3.3
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/components/base/Icon.astro +5 -6
- package/src/components/base/Logo.astro +1 -2
- package/src/components/base/Rating.astro +7 -8
- package/src/components/segment/Card.astro +17 -18
- package/src/components/segment/Header.astro +8 -9
- package/src/components/segment/Section.astro +11 -12
- package/src/components/structure/Box.astro +9 -10
- package/src/content/config.ts +1 -1
- package/src/index.ts +1 -1
- package/src/schemas/schemas.ts +45 -0
- /package/src/schemas/{collection.ts → collection-old-schemas.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
import tablerIcons from '@iconify-json/tabler/icons.json'
|
|
3
|
-
import type {
|
|
3
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
4
4
|
import Component from '../_Component.astro'
|
|
5
5
|
|
|
6
|
-
type Props<As extends HTMLTag = 'i'> = Polymorphic<{ as: As }> &
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
6
|
+
type Props<As extends HTMLTag = 'i'> = Polymorphic<{ as: As }> & {
|
|
7
|
+
name?: string
|
|
8
|
+
color?: 'base' | 'brand'
|
|
9
|
+
}
|
|
11
10
|
|
|
12
11
|
const { as = 'i', name, ...rest } = Astro.props
|
|
13
12
|
|
|
@@ -3,8 +3,7 @@ import type { ComponentProps, HTMLTag } from 'astro/types'
|
|
|
3
3
|
import Children from '../_Children.astro'
|
|
4
4
|
import Component from '../_Component.astro'
|
|
5
5
|
|
|
6
|
-
type Props<As extends HTMLTag = 'a'> = ComponentProps<typeof
|
|
7
|
-
ComponentProps<typeof Children>
|
|
6
|
+
type Props<As extends HTMLTag = 'a'> = ComponentProps<typeof Children>
|
|
8
7
|
|
|
9
8
|
const { as = 'a', href = '/', src, ...rest } = Astro.props
|
|
10
9
|
---
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
3
|
import Component from '../_Component.astro'
|
|
4
4
|
import Icon from './Icon.astro'
|
|
5
5
|
|
|
6
|
-
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
6
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
7
|
+
color?: 'base' | 'brand'
|
|
8
|
+
value?: number
|
|
9
|
+
size?: string
|
|
10
|
+
compact?: boolean
|
|
11
|
+
}
|
|
13
12
|
|
|
14
13
|
const { size, compact, value = 5, ...rest } = Astro.props
|
|
15
14
|
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
3
|
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
|
-
type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> &
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
5
|
+
type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
structure?: 'column' | 'group' | 'split' | 'spread' | 'row'
|
|
7
|
+
align?: 'start' | 'center' | 'end' | 'stretch'
|
|
8
|
+
frame?: 'panel' | 'none'
|
|
9
|
+
color?: 'base' | 'brand'
|
|
10
|
+
contrast?: boolean
|
|
11
|
+
ratio?: 'landscape' | 'portrait' | 'square' | number
|
|
12
|
+
variant?:
|
|
13
|
+
| 'ghost'
|
|
14
|
+
| 'subtle'
|
|
15
|
+
| 'surface'
|
|
16
|
+
| 'outline'
|
|
17
|
+
| 'soft'
|
|
18
|
+
| 'surface'
|
|
19
|
+
| 'solid'
|
|
20
|
+
}
|
|
22
21
|
|
|
23
22
|
const {
|
|
24
23
|
href,
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
3
|
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
|
-
type Props<As extends HTMLTag = 'header'> = Polymorphic<{ as: As }> &
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
5
|
+
type Props<As extends HTMLTag = 'header'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
structure?: 'spread' | 'row' | 'column'
|
|
7
|
+
position?: 'relative' | 'sticky' | 'fixed' | 'absolute'
|
|
8
|
+
variant?: 'ghost' | 'subtle' | 'soft' | 'surface' | 'outline'
|
|
9
|
+
frame?: 'fill' | 'panel'
|
|
10
|
+
align?: 'start' | 'center' | 'end'
|
|
11
|
+
}
|
|
13
12
|
|
|
14
13
|
const {
|
|
15
14
|
as = 'header',
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
3
|
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
|
-
type Props<As extends HTMLTag = 'section'> = Polymorphic<{ as: As }> &
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
5
|
+
type Props<As extends HTMLTag = 'section'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
scheme?: 'light' | 'dark'
|
|
7
|
+
color?: 'base' | 'brand'
|
|
8
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
9
|
+
compact?: boolean
|
|
10
|
+
frame?: 'fill' | 'viewport' | 'contain' | 'panel'
|
|
11
|
+
variant?: 'ghost' | 'subtle' | 'outline' | 'soft' | 'solid' | 'surface'
|
|
12
|
+
align?: 'start' | 'center' | 'end'
|
|
13
|
+
structure?: 'column' | 'split' | 'spread' | 'row'
|
|
14
|
+
}
|
|
16
15
|
|
|
17
16
|
const {
|
|
18
17
|
as = 'div',
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
3
|
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
|
-
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
scheme?: 'light' | 'dark'
|
|
7
|
+
color?: 'base' | 'brand'
|
|
8
|
+
size?: 'sm' | 'md' | 'lg'
|
|
9
|
+
compact?: boolean
|
|
10
|
+
frame?: 'container' | 'wrapper' | 'panel' | 'viewport' | 'card' | 'none'
|
|
11
|
+
variant?: 'fill' | 'subtle' | 'outline' | 'soft' | 'solid' | 'surface'
|
|
12
|
+
}
|
|
14
13
|
|
|
15
14
|
const { ...rest } = Astro.props
|
|
16
15
|
---
|
package/src/content/config.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'astro/zod'
|
|
2
|
+
|
|
3
|
+
export const pathSchema = z.string().transform((value) => {
|
|
4
|
+
const path = value.split(`content`).pop()
|
|
5
|
+
const slug = path?.split('/').pop()?.split('.').shift()
|
|
6
|
+
return slug
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
export const buttonSchema = z.object({
|
|
10
|
+
text: z.string(),
|
|
11
|
+
html: z.string(),
|
|
12
|
+
href: z.string(),
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const baseSchema = z.object({
|
|
16
|
+
image: z.string(),
|
|
17
|
+
images: z.string().array(),
|
|
18
|
+
icon: z.string(),
|
|
19
|
+
rating: z.number(),
|
|
20
|
+
badge: z.string(),
|
|
21
|
+
tagline: z.string(),
|
|
22
|
+
heading: z.string(),
|
|
23
|
+
text: z.string(),
|
|
24
|
+
list: z.string().array(),
|
|
25
|
+
price: z.string().or(z.number()),
|
|
26
|
+
button: buttonSchema,
|
|
27
|
+
buttons: buttonSchema.array(),
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
export const blockSchema = baseSchema.extend({
|
|
31
|
+
card: baseSchema,
|
|
32
|
+
cards: baseSchema.array(),
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
export const pageSchema = baseSchema.extend({
|
|
36
|
+
title: z.string(),
|
|
37
|
+
description: z.string(),
|
|
38
|
+
head: z
|
|
39
|
+
.object({
|
|
40
|
+
title: z.string(),
|
|
41
|
+
description: z.string(),
|
|
42
|
+
image: z.string().optional(),
|
|
43
|
+
})
|
|
44
|
+
.partial(),
|
|
45
|
+
})
|
|
File without changes
|