fulldev-ui 0.6.0-beta.11 → 0.6.0-beta.13

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fulldev-ui",
3
- "version": "0.6.0-beta.11",
3
+ "version": "0.6.0-beta.13",
4
4
  "description": "A component library built for Astro",
5
5
  "homepage": "https://ui.full.dev",
6
6
  "bugs": "https://github.com/fulldotdev/ui/issues",
@@ -107,7 +107,7 @@ const {
107
107
  <style is:global>
108
108
  @layer fulldev {
109
109
  .header {
110
- @apply sticky left-0 top-0 z-20 flex h-14 w-full items-center overflow-hidden border-b bg-background;
110
+ @apply sticky left-0 top-0 z-20 flex h-14 w-full items-center border-b bg-background;
111
111
  height: var(--header-height);
112
112
 
113
113
  &,
@@ -2,17 +2,33 @@
2
2
  import type { ComponentProps } from 'astro/types'
3
3
  import Badge from 'fulldev-ui/components/Badge.astro'
4
4
  import Buttons from 'fulldev-ui/components/Buttons.astro'
5
+ import Element from 'fulldev-ui/components/Element.astro'
5
6
  import Heading from 'fulldev-ui/components/Heading.astro'
6
7
  import Image from 'fulldev-ui/components/Image.astro'
8
+ import Label from 'fulldev-ui/components/Label.astro'
7
9
  import Paragraph from 'fulldev-ui/components/Paragraph.astro'
10
+ import Rating from 'fulldev-ui/components/Rating.astro'
8
11
  import Tagline from 'fulldev-ui/components/Tagline.astro'
9
- import type { BlockSchema } from 'fulldev-ui/schemas/block'
10
12
  import Container from 'fulldev-ui/structures/Container.astro'
11
13
  import Group from 'fulldev-ui/structures/Group.astro'
14
+ import Prose from 'fulldev-ui/structures/Prose.astro'
12
15
  import Section from 'fulldev-ui/structures/Section.astro'
13
- import Writeup from 'fulldev-ui/structures/Writeup.astro'
14
16
 
15
- interface Props extends ComponentProps<typeof Section>, BlockSchema {}
17
+ interface Props {
18
+ depth?: 1 | 2 | undefined
19
+ badge?: ComponentProps<typeof Badge> | undefined
20
+ tagline?: string | undefined
21
+ heading?: string | undefined
22
+ paragraph?: string | undefined
23
+ content?: string | undefined
24
+ image?: ComponentProps<typeof Image> | undefined
25
+ buttons?: ComponentProps<typeof Buttons>['buttons']
26
+ proof?: {
27
+ rating?: number | undefined
28
+ images?: ComponentProps<typeof Image>[] | undefined
29
+ text?: string | undefined
30
+ }
31
+ }
16
32
 
17
33
  const {
18
34
  badge,
@@ -20,9 +36,9 @@ const {
20
36
  heading,
21
37
  paragraph,
22
38
  content,
23
- button,
24
39
  buttons,
25
40
  image,
41
+ proof,
26
42
  ...rest
27
43
  } = Astro.props
28
44
  ---
@@ -32,7 +48,27 @@ const {
32
48
  {...rest}
33
49
  >
34
50
  <Container>
35
- <Writeup align="center">
51
+ <Prose class="flex flex-col items-center text-center">
52
+ <Element class="flex items-center">
53
+ {
54
+ proof?.images?.map((image) => (
55
+ <Image
56
+ class="-mr-5 h-11 w-11 rounded-full object-cover last-of-type:mr-2"
57
+ {...image}
58
+ />
59
+ ))
60
+ }
61
+ <Element class="flex flex-col gap-1">
62
+ <Rating
63
+ score={proof?.rating}
64
+ size="sm"
65
+ />
66
+ <Label
67
+ size="md"
68
+ text={proof?.text}
69
+ />
70
+ </Element>
71
+ </Element>
36
72
  <Badge
37
73
  size="lg"
38
74
  {...badge}
@@ -54,11 +90,10 @@ const {
54
90
  <Group>
55
91
  <Buttons
56
92
  size="lg"
57
- {button}
58
93
  {buttons}
59
94
  />
60
95
  </Group>
61
- </Writeup>
96
+ </Prose>
62
97
  <Image {...image} />
63
98
  </Container>
64
99
  </Section>
@@ -53,6 +53,13 @@ export const blockSchema = z
53
53
  .strict()
54
54
  .array()
55
55
  .optional(),
56
+ proof: z
57
+ .object({
58
+ rating: z.number().optional(),
59
+ images: imageSchema.array().optional(),
60
+ text: z.string().optional(),
61
+ })
62
+ .optional(),
56
63
  })
57
64
  .strict()
58
65
 
@@ -42,7 +42,6 @@ const render = slot?.trim().length > 0
42
42
  >
43
43
  <Fragment set:html={slot} />
44
44
  </Element>
45
-
46
45
  <label
47
46
  for={id}
48
47
  class="drawer-backdrop"
@@ -62,7 +61,7 @@ const render = slot?.trim().length > 0
62
61
  }
63
62
 
64
63
  .drawer-backdrop {
65
- @apply pointer-events-none invisible fixed left-0 top-0 z-30 h-full w-full bg-black opacity-0 transition-opacity;
64
+ @apply pointer-events-none invisible fixed left-0 top-0 z-30 h-screen w-full bg-black opacity-0 transition-opacity;
66
65
 
67
66
  &:is(.drawer-checkbox:checked ~ &) {
68
67
  @apply pointer-events-auto visible opacity-50;
@@ -70,7 +69,7 @@ const render = slot?.trim().length > 0
70
69
  }
71
70
 
72
71
  .drawer-body {
73
- @apply fixed bottom-0 left-0 top-0 z-40 h-full w-80 max-w-[75vw] -translate-x-full overflow-y-auto rounded-r-lg border border-l-0 bg-background shadow-2xl transition-transform;
72
+ @apply fixed bottom-0 left-0 top-0 z-40 h-screen w-80 max-w-[75vw] -translate-x-full overflow-y-auto rounded-r-lg border border-l-0 bg-background shadow-2xl transition-transform;
74
73
  @apply scrollbar scrollbar-track-transparent scrollbar-thumb-accent scrollbar-thumb-rounded-full scrollbar-w-2 hover:scrollbar-thumb-accent-hover;
75
74
 
76
75
  &:is(.drawer-checkbox:checked ~ &) {
@@ -85,7 +85,7 @@ const { ...rest } = Astro.props
85
85
  }
86
86
 
87
87
  > img,
88
- > * > img {
88
+ > p > img {
89
89
  @apply my-12 rounded-md;
90
90
  }
91
91