fulldev-ui 0.6.1 → 0.6.2
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/cloudcannon.config.yml
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
import Button from 'fulldev-ui/components/Button.astro'
|
|
3
|
+
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
4
|
+
import List from 'fulldev-ui/components/List.astro'
|
|
5
|
+
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
6
|
+
import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
7
|
+
import type { BlockSchema } from 'fulldev-ui/schemas/block'
|
|
8
|
+
import Card from 'fulldev-ui/structures/Card.astro'
|
|
9
|
+
import Container from 'fulldev-ui/structures/Container.astro'
|
|
10
|
+
import Prose from 'fulldev-ui/structures/Prose.astro'
|
|
11
|
+
import Section from 'fulldev-ui/structures/Section.astro'
|
|
12
|
+
import Stack from 'fulldev-ui/structures/Stack.astro'
|
|
13
|
+
|
|
14
|
+
interface Props extends BlockSchema {}
|
|
15
|
+
|
|
16
|
+
const { depth = 2, heading, paragraph, button, pros, cons } = Astro.props
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<Section class="pricings-1">
|
|
20
|
+
<Container class="flex flex-col items-center gap-16">
|
|
21
|
+
<Prose class="text-center">
|
|
22
|
+
<Heading
|
|
23
|
+
size="5xl"
|
|
24
|
+
text={heading}
|
|
25
|
+
{depth}
|
|
26
|
+
/>
|
|
27
|
+
<Paragraph
|
|
28
|
+
size="xl"
|
|
29
|
+
text={paragraph}
|
|
30
|
+
/>
|
|
31
|
+
</Prose>
|
|
32
|
+
<Stack class="mx-auto flex flex-wrap items-stretch justify-center">
|
|
33
|
+
{
|
|
34
|
+
[cons || {}, pros || {}].map(
|
|
35
|
+
({ tagline, heading, paragraph, list }, i) => (
|
|
36
|
+
<Card
|
|
37
|
+
class:list={`min-w-sm flex max-w-md flex-col justify-between gap-8 p-8 ${i === 0 ? 'bg-transparent' : ''}`}
|
|
38
|
+
>
|
|
39
|
+
<Prose>
|
|
40
|
+
<Tagline text={tagline} />
|
|
41
|
+
<Heading
|
|
42
|
+
depth={(depth + 1) as 3}
|
|
43
|
+
size="3xl"
|
|
44
|
+
text={heading}
|
|
45
|
+
/>
|
|
46
|
+
<Paragraph
|
|
47
|
+
muted={i === 0}
|
|
48
|
+
text={paragraph}
|
|
49
|
+
/>
|
|
50
|
+
<List
|
|
51
|
+
icon={i === 0 ? 'x' : 'check'}
|
|
52
|
+
muted={i === 0}
|
|
53
|
+
size="sm"
|
|
54
|
+
items={list}
|
|
55
|
+
/>
|
|
56
|
+
</Prose>
|
|
57
|
+
</Card>
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
</Stack>
|
|
62
|
+
<Button {...button} />
|
|
63
|
+
</Container>
|
|
64
|
+
</Section>
|
|
@@ -1,28 +1,32 @@
|
|
|
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'
|
|
4
5
|
|
|
5
6
|
interface Props extends HTMLAttributes<'ul' | 'ol'> {
|
|
6
7
|
as?: 'ul' | 'ol' | undefined
|
|
7
8
|
size?: 'sm' | 'md' | 'lg' | undefined
|
|
8
9
|
items?: string[] | undefined
|
|
9
10
|
muted?: boolean | undefined
|
|
11
|
+
icon?: string | undefined
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
const { as = 'ul', items, ...rest } = Astro.props
|
|
14
|
+
const { as = 'ul', items, icon, ...rest } = Astro.props
|
|
13
15
|
---
|
|
14
16
|
|
|
15
17
|
<Element
|
|
16
|
-
class:list=
|
|
18
|
+
class:list={['list', icon ? 'has-icon' : undefined]}
|
|
17
19
|
{as}
|
|
18
20
|
{...rest}
|
|
19
21
|
>
|
|
20
22
|
{
|
|
21
23
|
items?.map((item) => (
|
|
22
|
-
<Element
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
<Element as="li">
|
|
25
|
+
<Icon name={icon} />
|
|
26
|
+
<span>
|
|
27
|
+
<Fragment set:html={item} />
|
|
28
|
+
</span>
|
|
29
|
+
</Element>
|
|
26
30
|
))
|
|
27
31
|
}
|
|
28
32
|
<slot />
|
|
@@ -32,14 +36,14 @@ const { as = 'ul', items, ...rest } = Astro.props
|
|
|
32
36
|
@layer fulldev {
|
|
33
37
|
.list,
|
|
34
38
|
.prose :is(ul, ol) {
|
|
35
|
-
@apply
|
|
39
|
+
@apply pl-4;
|
|
36
40
|
|
|
37
41
|
&:is(ul) {
|
|
38
42
|
@apply list-disc;
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
ul {
|
|
42
|
-
@apply ml-
|
|
46
|
+
@apply ml-5 mt-2 list-disc;
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
&:is(ol) {
|
|
@@ -47,7 +51,7 @@ const { as = 'ul', items, ...rest } = Astro.props
|
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
ol {
|
|
50
|
-
@apply ml-
|
|
54
|
+
@apply ml-5 mt-2 list-decimal;
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
li {
|
|
@@ -57,11 +61,35 @@ const { as = 'ul', items, ...rest } = Astro.props
|
|
|
57
61
|
&.size-sm,
|
|
58
62
|
&:where(.size-sm &) {
|
|
59
63
|
@apply text-sm;
|
|
64
|
+
|
|
65
|
+
.icon {
|
|
66
|
+
@apply mt-0;
|
|
67
|
+
}
|
|
60
68
|
}
|
|
61
69
|
|
|
62
70
|
&.size-lg,
|
|
63
71
|
&:where(.size-lg &) {
|
|
64
72
|
@apply text-lg;
|
|
73
|
+
|
|
74
|
+
.icon {
|
|
75
|
+
@apply mt-1;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.muted {
|
|
80
|
+
@apply text-muted-foreground;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.icon {
|
|
84
|
+
@apply -ml-5 mt-0.5 shrink-0 text-inherit;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.has-icon {
|
|
88
|
+
@apply ml-0 list-none;
|
|
89
|
+
|
|
90
|
+
li {
|
|
91
|
+
@apply flex gap-2;
|
|
92
|
+
}
|
|
65
93
|
}
|
|
66
94
|
}
|
|
67
95
|
}
|
|
@@ -40,3 +40,14 @@ import List from 'fulldev-ui/components/List.astro'
|
|
|
40
40
|
<List size="md" items={['First', 'Second', 'Third']} />
|
|
41
41
|
<List size="lg" items={['First', 'Second', 'Third']} />
|
|
42
42
|
```
|
|
43
|
+
|
|
44
|
+
### `icon`
|
|
45
|
+
|
|
46
|
+
```astro live
|
|
47
|
+
---
|
|
48
|
+
import List from 'fulldev-ui/components/List.astro'
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
<List icon="check" items={['First', 'Second', 'Third']} />
|
|
52
|
+
<List icon="x" items={['First', 'Second', 'Third']} />
|
|
53
|
+
```
|
package/src/schemas/block.ts
CHANGED
|
@@ -11,6 +11,8 @@ export const blockSchema = cardSchema
|
|
|
11
11
|
search: z.boolean().optional(),
|
|
12
12
|
cart: z.boolean().optional(),
|
|
13
13
|
cards: cardSchema.array().optional(),
|
|
14
|
+
pros: cardSchema.optional(),
|
|
15
|
+
cons: cardSchema.optional(),
|
|
14
16
|
pages: pathSchema('pages').array().optional(),
|
|
15
17
|
records: pathSchema('records').array().optional(),
|
|
16
18
|
soldout: z.boolean().optional(),
|