fulldev-ui 0.6.0-beta.2 → 0.6.0-beta.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.
Files changed (183) hide show
  1. package/package.json +1 -1
  2. package/src/blocks/Banner1.astro +35 -0
  3. package/src/blocks/Contact1.astro +92 -0
  4. package/src/blocks/Cta1.astro +72 -0
  5. package/src/blocks/Feature1.astro +67 -0
  6. package/src/blocks/Footer.astro +47 -54
  7. package/src/blocks/Header1.astro +192 -0
  8. package/src/blocks/Hero1.astro +74 -0
  9. package/src/blocks/Intro1.astro +56 -0
  10. package/src/blocks/Products1.astro +90 -0
  11. package/src/blocks/{Hero.astro → _Hero.astro} +7 -6
  12. package/src/components/Badge.astro +10 -18
  13. package/src/components/Banner.astro +26 -0
  14. package/src/components/Block.astro +49 -0
  15. package/src/components/Blocks.astro +26 -0
  16. package/src/components/Button.astro +10 -23
  17. package/src/components/Card.astro +8 -150
  18. package/src/components/Cart.astro +1 -0
  19. package/src/components/CartSummary.astro +3 -3
  20. package/src/components/Channel.astro +5 -14
  21. package/src/components/Container.astro +25 -0
  22. package/src/components/Drawer.astro +57 -118
  23. package/src/components/DrawerOld.astro +143 -0
  24. package/src/components/Element.astro +2 -0
  25. package/src/components/Form.astro +5 -3
  26. package/src/components/Head.astro +18 -32
  27. package/src/components/Header.astro +8 -105
  28. package/src/components/Heading.astro +29 -70
  29. package/src/components/Icon.astro +6 -4
  30. package/src/components/Link.astro +12 -18
  31. package/src/components/Logo.astro +31 -18
  32. package/src/components/Navigation.astro +39 -0
  33. package/src/components/Panel.astro +25 -0
  34. package/src/components/Paragraph.astro +24 -7
  35. package/src/components/Price.astro +4 -4
  36. package/src/components/Prose.astro +41 -132
  37. package/src/components/Rating.astro +24 -75
  38. package/src/components/Search.astro +4 -3
  39. package/src/components/Section.astro +20 -29
  40. package/src/components/Sidebar.astro +44 -64
  41. package/src/components/Social.astro +9 -2
  42. package/src/components/Tagline.astro +21 -31
  43. package/src/components/Toc.astro +12 -3
  44. package/src/components/_Author.astro +90 -0
  45. package/src/components/_Header.astro +129 -0
  46. package/src/components/_Prose copy.astro +172 -0
  47. package/src/components/_Sidebar copy.astro +87 -0
  48. package/src/content/categories/category.md +7 -0
  49. package/src/content/config.ts +7 -8
  50. package/src/content/docs/components/text.mdx +47 -0
  51. package/src/content/docs/components.mdx +1 -4
  52. package/src/content/docs/index.mdx +1 -4
  53. package/src/content/layouts/base.yml +41 -80
  54. package/src/content/layouts/docs.yml +2 -70
  55. package/src/content/pages/index.mdx +17 -25
  56. package/src/content/{categories/mugs.md → posts/post.md} +1 -1
  57. package/src/content/products/product.md +3 -3
  58. package/src/css/theme.css +2 -0
  59. package/src/images/favicon/android-chrome-192x192.png +0 -0
  60. package/src/images/favicon/android-chrome-512x512.png +0 -0
  61. package/src/images/favicon/apple-touch-icon.png +0 -0
  62. package/src/images/favicon/browserconfig.xml +9 -0
  63. package/src/images/favicon/favicon-16x16.png +0 -0
  64. package/src/images/favicon/favicon-32x32.png +0 -0
  65. package/src/images/favicon/favicon-48x48.png +0 -0
  66. package/src/images/favicon/favicon.ico +0 -0
  67. package/src/images/favicon/favicon.svg +16 -0
  68. package/src/images/favicon/manifest.webmanifest +30 -0
  69. package/src/images/favicon/mstile-150x150.png +0 -0
  70. package/src/images/favicon/safari-pinned-tab.svg +16 -0
  71. package/src/images/favicon/yandex-browser-50x50.png +0 -0
  72. package/src/images/favicon/yandex-browser-manifest.json +9 -0
  73. package/src/integration/index.ts +10 -1
  74. package/src/layouts/CategoryLayout.astro +16 -9
  75. package/src/layouts/DocLayout.astro +49 -7
  76. package/src/layouts/Layout.astro +55 -27
  77. package/src/layouts/PageLayout.astro +12 -5
  78. package/src/layouts/PostLayout.astro +7 -5
  79. package/src/layouts/ProductLayout.astro +12 -7
  80. package/src/pages/test.astro +7 -1
  81. package/src/schemas/blocks/banner.ts +10 -0
  82. package/src/schemas/blocks/categories.ts +14 -0
  83. package/src/schemas/blocks/contact.ts +18 -0
  84. package/src/schemas/blocks/cta.ts +18 -0
  85. package/src/schemas/blocks/feature.ts +18 -0
  86. package/src/schemas/blocks/hero.ts +20 -0
  87. package/src/schemas/blocks/intro.ts +16 -0
  88. package/src/schemas/blocks/products.ts +14 -0
  89. package/src/schemas/categorySchema.ts +8 -8
  90. package/src/schemas/components/avatar.ts +4 -1
  91. package/src/schemas/components/badge.ts +16 -11
  92. package/src/schemas/components/block.ts +18 -0
  93. package/src/schemas/components/button.ts +13 -19
  94. package/src/schemas/components/channel.ts +15 -9
  95. package/src/schemas/components/footer.ts +15 -14
  96. package/src/schemas/components/head.ts +17 -0
  97. package/src/schemas/components/header.ts +19 -16
  98. package/src/schemas/components/heading.ts +7 -1
  99. package/src/schemas/components/icon.ts +7 -1
  100. package/src/schemas/components/image.ts +17 -14
  101. package/src/schemas/components/link.ts +10 -16
  102. package/src/schemas/components/logo.ts +12 -2
  103. package/src/schemas/components/menu.ts +11 -13
  104. package/src/schemas/components/navigation.ts +10 -0
  105. package/src/schemas/components/paragraph.ts +9 -0
  106. package/src/schemas/components/price.ts +9 -0
  107. package/src/schemas/components/rating.ts +8 -13
  108. package/src/schemas/components/sidebar.ts +14 -12
  109. package/src/schemas/components/social.ts +16 -1
  110. package/src/schemas/components/tagline.ts +7 -1
  111. package/src/schemas/docSchema.ts +6 -2
  112. package/src/schemas/imageSchema.ts +30 -1
  113. package/src/schemas/layoutSchema.ts +14 -20
  114. package/src/schemas/pageSchema.ts +9 -12
  115. package/src/schemas/postSchema.ts +6 -8
  116. package/src/schemas/productSchema.ts +18 -18
  117. package/src/types/global-props.ts +0 -9
  118. package/src/types/{virtual-modules.d.ts → virtual.d.ts} +1 -1
  119. package/src/utils/getHref.ts +3 -2
  120. package/tsconfig.json +1 -3
  121. package/example.svelte +0 -0
  122. package/parent.svelte +0 -0
  123. package/src/App.svelte +0 -0
  124. package/src/blocks/Banner.astro +0 -35
  125. package/src/blocks/Categories.astro +0 -12
  126. package/src/blocks/Colleagues.astro +0 -12
  127. package/src/blocks/Contact.astro +0 -117
  128. package/src/blocks/Content.astro +0 -130
  129. package/src/blocks/Cta.astro +0 -13
  130. package/src/blocks/Excerpt.astro +0 -12
  131. package/src/blocks/Features.astro +0 -11
  132. package/src/blocks/Header.astro +0 -7
  133. package/src/blocks/Intro.astro +0 -101
  134. package/src/blocks/Jobs.astro +0 -12
  135. package/src/blocks/Posts.astro +0 -11
  136. package/src/blocks/Prices.astro +0 -24
  137. package/src/blocks/Product.astro +0 -89
  138. package/src/blocks/Products.astro +0 -101
  139. package/src/blocks/Reviews.astro +0 -12
  140. package/src/blocks/_Contact.astro +0 -112
  141. package/src/components/CartForm.astro +0 -120
  142. package/src/components/CartList.astro +0 -122
  143. package/src/components/Lead.astro +0 -46
  144. package/src/components/ProductCard.astro +0 -52
  145. package/src/components/Text.astro +0 -43
  146. package/src/components/Writeup.astro +0 -108
  147. package/src/components/_CartList backup.astro +0 -125
  148. package/src/components/_CartList copy.astro +0 -213
  149. package/src/components/_CartListSimple.astro +0 -148
  150. package/src/components/sections.astro +0 -28
  151. package/src/content/docs/components/lead.mdx +0 -49
  152. package/src/content/docs/components/paragraph.mdx +0 -49
  153. package/src/loaders/imageLoader.ts +0 -26
  154. package/src/schemas/archive/_pageSchema.ts +0 -94
  155. package/src/schemas/components/avatars.ts +0 -4
  156. package/src/schemas/components/banner.ts +0 -3
  157. package/src/schemas/components/buttons.ts +0 -4
  158. package/src/schemas/components/card.ts +0 -43
  159. package/src/schemas/components/cards.ts +0 -4
  160. package/src/schemas/components/channels.ts +0 -4
  161. package/src/schemas/components/global.ts +0 -16
  162. package/src/schemas/components/links.ts +0 -4
  163. package/src/schemas/components/list.ts +0 -3
  164. package/src/schemas/components/section.ts +0 -17
  165. package/src/schemas/components/sections.ts +0 -3
  166. package/src/schemas/components/socials.ts +0 -4
  167. package/src/schemas/components/subheader.ts +0 -10
  168. package/src/schemas/components/text.ts +0 -3
  169. package/src/schemas/components/themer.ts +0 -3
  170. package/src/schemas/components/toc.ts +0 -3
  171. package/src/schemas/components/writeup.ts +0 -20
  172. package/src/schemas/fields/categories.ts +0 -3
  173. package/src/schemas/fields/description.ts +0 -3
  174. package/src/schemas/fields/href.ts +0 -3
  175. package/src/schemas/fields/image.ts +0 -24
  176. package/src/schemas/fields/images.ts +0 -4
  177. package/src/schemas/fields/order.ts +0 -3
  178. package/src/schemas/fields/price.ts +0 -3
  179. package/src/schemas/fields/products.ts +0 -5
  180. package/src/schemas/fields/seo.ts +0 -12
  181. package/src/schemas/fields/soldout.ts +0 -3
  182. package/src/schemas/fields/title.ts +0 -3
  183. package/src/schemas/fields/variants.ts +0 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fulldev-ui",
3
- "version": "0.6.0-beta.2",
3
+ "version": "0.6.0-beta.3",
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",
@@ -0,0 +1,35 @@
1
+ ---
2
+ import type { HTMLTag } from 'astro/types'
3
+ import Banner from 'fulldev-ui/components/Banner.astro'
4
+ import Container from 'fulldev-ui/components/Container.astro'
5
+ import Header from 'fulldev-ui/components/Header.astro'
6
+ import type { BannerSchema } from 'fulldev-ui/schemas/blocks/banner'
7
+ import type { ComponentProps } from 'svelte'
8
+
9
+ interface Props extends ComponentProps<typeof Header>, BannerSchema {
10
+ as?: HTMLTag
11
+ }
12
+
13
+ const { text, ...rest } = Astro.props
14
+ ---
15
+
16
+ <Banner
17
+ class:list="banner-1"
18
+ {...rest}
19
+ >
20
+ <Container>
21
+ <Fragment set:html={text} />
22
+ </Container>
23
+ </Banner>
24
+
25
+ <style is:global>
26
+ @layer fulldev {
27
+ .banner-1 {
28
+ @apply bg-primary text-primary-foreground;
29
+
30
+ .container {
31
+ @apply flex items-center justify-center overflow-hidden bg-primary text-center text-sm leading-none text-primary-foreground;
32
+ }
33
+ }
34
+ }
35
+ </style>
@@ -0,0 +1,92 @@
1
+ ---
2
+ import Channel from 'fulldev-ui/components/Channel.astro'
3
+ import Element from 'fulldev-ui/components/Element.astro'
4
+ import Form from 'fulldev-ui/components/Form.astro'
5
+ import Heading from 'fulldev-ui/components/Heading.astro'
6
+ import Image from 'fulldev-ui/components/Image.astro'
7
+ import Paragraph from 'fulldev-ui/components/Paragraph.astro'
8
+ import Section from 'fulldev-ui/components/Section.astro'
9
+ import Social from 'fulldev-ui/components/Social.astro'
10
+ import Tagline from 'fulldev-ui/components/Tagline.astro'
11
+ import type { ContactSchema } from 'fulldev-ui/schemas/blocks/contact'
12
+ import type { ComponentProps } from 'svelte'
13
+
14
+ interface Props extends ComponentProps<typeof Section>, ContactSchema {}
15
+
16
+ const {
17
+ heading,
18
+ form,
19
+ text,
20
+ tagline,
21
+ googleMaps,
22
+ paragraph,
23
+ buttons,
24
+ socials,
25
+ position,
26
+ image,
27
+ channels,
28
+ level = 1,
29
+ ...rest
30
+ } = Astro.props
31
+ ---
32
+
33
+ <Section
34
+ class:list="contact-1"
35
+ {...rest}
36
+ >
37
+ <Element>
38
+ <Element class:list="contact-1-segment">
39
+ <Element class:list="contact-1-content">
40
+ <Tagline
41
+ size="sm"
42
+ text={tagline}
43
+ />
44
+ <Heading
45
+ as="h1"
46
+ size="2xl"
47
+ text={heading}
48
+ />
49
+ <Paragraph text={paragraph} />
50
+ </Element>
51
+ <Element class:list="contact-1-channels">
52
+ {channels?.map((channel) => <Channel {...channel} />)}
53
+ </Element>
54
+ <Element class:list="contact-1-socials">
55
+ {socials?.map((social) => <Social href={social} />)}
56
+ </Element>
57
+ <Form
58
+ action="/thank-you"
59
+ method="POST"
60
+ {...form}
61
+ />
62
+ </Element>
63
+ <Image
64
+ {position}
65
+ {...image}
66
+ />
67
+ </Element>
68
+ </Section>
69
+
70
+ <style is:global>
71
+ @layer fulldev {
72
+ .contact-1 {
73
+ @apply relative w-full;
74
+
75
+ .container {
76
+ @apply flex flex-col gap-16;
77
+ }
78
+
79
+ .contact-1-segment {
80
+ @apply flex flex-col items-start gap-8;
81
+ }
82
+
83
+ .contact-1-content {
84
+ @apply flex max-w-screen-md flex-col gap-4;
85
+ }
86
+
87
+ .image {
88
+ @apply rounded-md;
89
+ }
90
+ }
91
+ }
92
+ </style>
@@ -0,0 +1,72 @@
1
+ ---
2
+ import Buttons from 'fulldev-ui/components/Buttons.astro'
3
+ import Container from 'fulldev-ui/components/Container.astro'
4
+ import Element from 'fulldev-ui/components/Element.astro'
5
+ import Heading from 'fulldev-ui/components/Heading.astro'
6
+ import Image from 'fulldev-ui/components/Image.astro'
7
+ import Panel from 'fulldev-ui/components/Panel.astro'
8
+ import Paragraph from 'fulldev-ui/components/Paragraph.astro'
9
+ import Section from 'fulldev-ui/components/Section.astro'
10
+ import Tagline from 'fulldev-ui/components/Tagline.astro'
11
+ import type { CtaSchema } from 'fulldev-ui/schemas/blocks/cta.ts'
12
+ import type { ComponentProps } from 'svelte'
13
+
14
+ interface Props extends ComponentProps<typeof Section>, CtaSchema {}
15
+
16
+ const { tagline, heading, paragraph, buttons, image, ...rest } = Astro.props
17
+ ---
18
+
19
+ <Section
20
+ class:list="cta-1"
21
+ {...rest}
22
+ >
23
+ <Container>
24
+ <Panel>
25
+ <Element class="cta-1-segment">
26
+ <Element class="cta-1-content">
27
+ <Tagline text={tagline} />
28
+ <Heading
29
+ size="4xl"
30
+ as="h2"
31
+ text={heading}
32
+ />
33
+ <Paragraph
34
+ size="lg"
35
+ text={paragraph}
36
+ />
37
+ </Element>
38
+ <Buttons
39
+ {buttons}
40
+ size="lg"
41
+ />
42
+ </Element>
43
+ <Image {...image} />
44
+ </Panel>
45
+ </Container>
46
+ </Section>
47
+
48
+ <style is:global>
49
+ @layer fulldev {
50
+ .cta-1 {
51
+ .panel {
52
+ @apply flex flex-col items-center gap-16;
53
+ }
54
+
55
+ .cta-1-segment {
56
+ @apply z-10 flex flex-col items-center gap-8 text-center;
57
+ }
58
+
59
+ .cta-1-content {
60
+ @apply flex max-w-screen-md flex-col items-center gap-4 text-center;
61
+ }
62
+
63
+ .text {
64
+ @apply text-balance;
65
+ }
66
+
67
+ .image {
68
+ @apply rounded-lg;
69
+ }
70
+ }
71
+ }
72
+ </style>
@@ -0,0 +1,67 @@
1
+ ---
2
+ import Buttons from 'fulldev-ui/components/Buttons.astro'
3
+ import Container from 'fulldev-ui/components/Container.astro'
4
+ import Element from 'fulldev-ui/components/Element.astro'
5
+ import Heading from 'fulldev-ui/components/Heading.astro'
6
+ import Image from 'fulldev-ui/components/Image.astro'
7
+ import Paragraph from 'fulldev-ui/components/Paragraph.astro'
8
+ import Section from 'fulldev-ui/components/Section.astro'
9
+ import Tagline from 'fulldev-ui/components/Tagline.astro'
10
+ import type { FeatureSchema } from 'fulldev-ui/schemas/blocks/feature'
11
+ import type { ComponentProps } from 'svelte'
12
+
13
+ interface Props extends ComponentProps<typeof Section>, FeatureSchema {}
14
+
15
+ const { tagline, heading, paragraph, buttons, image, ...rest } = Astro.props
16
+ ---
17
+
18
+ <Section
19
+ class:list="feature-1"
20
+ {...rest}
21
+ >
22
+ <Container>
23
+ <Element class="feature-1-segment">
24
+ <Element class="feature-1-content">
25
+ <Tagline
26
+ size="sm"
27
+ text={tagline}
28
+ />
29
+ <Heading
30
+ size="3xl"
31
+ text={heading}
32
+ />
33
+ <Paragraph
34
+ size="lg"
35
+ text={paragraph}
36
+ />
37
+ </Element>
38
+ <Buttons
39
+ variant="secondary"
40
+ {buttons}
41
+ />
42
+ </Element>
43
+ <Image {...image} />
44
+ </Container>
45
+ </Section>
46
+
47
+ <style is:global>
48
+ @layer fulldev {
49
+ .feature-1 {
50
+ .container {
51
+ @apply gap-x-gutter gap-y-12 lg:grid lg:grid-cols-2 lg:items-center;
52
+ }
53
+
54
+ .feature-1-segment {
55
+ @apply flex flex-col items-start gap-6 lg:max-w-xl;
56
+ }
57
+
58
+ .feature-1-content {
59
+ @apply flex max-w-screen-md flex-col items-start gap-3;
60
+ }
61
+
62
+ .image {
63
+ @apply rounded-lg;
64
+ }
65
+ }
66
+ }
67
+ </style>
@@ -1,41 +1,28 @@
1
1
  ---
2
- import type { ComponentProps, HTMLAttributes, HTMLTag } from 'astro/types'
3
- import Channels from 'fulldev-ui/components/Channels.astro'
2
+ import type { HTMLAttributes, HTMLTag } from 'astro/types'
3
+ import Channel from 'fulldev-ui/components/Channel.astro'
4
4
  import Element from 'fulldev-ui/components/Element.astro'
5
5
  import Heading from 'fulldev-ui/components/Heading.astro'
6
6
  import Logo from 'fulldev-ui/components/Logo.astro'
7
7
  import Menu from 'fulldev-ui/components/Menu.astro'
8
- import Paragraph from 'fulldev-ui/components/Paragraph.astro'
9
- import Socials from 'fulldev-ui/components/Socials.astro'
10
- import Text from 'fulldev-ui/components/Text.astro'
11
- import type { GlobalProps } from 'fulldev-ui/types/global-props'
8
+ import { default as Paragraph } from 'fulldev-ui/components/Paragraph.astro'
9
+ import Social from 'fulldev-ui/components/Social.astro'
10
+ import type { FooterSchema } from 'fulldev-ui/schemas/components/footer'
12
11
 
13
- interface Props extends GlobalProps, HTMLAttributes<'footer'> {
12
+ interface Props extends HTMLAttributes<'footer'>, FooterSchema {
14
13
  as?: HTMLTag
15
- variant?: 1 | undefined
16
- size?: 'sm' | 'md' | 'lg' | undefined
17
- logo?: ComponentProps<typeof Logo>['src']
18
- company?: ComponentProps<typeof Logo>['company']
19
- paragraph?: ComponentProps<typeof Paragraph>['text']
20
- socials?: ComponentProps<typeof Socials>['socials']
21
- channels?: ComponentProps<typeof Channels>['channels']
22
- hours?: any
23
- menu?: ComponentProps<typeof Menu>['groups']
24
- html?: any
25
14
  }
26
15
 
27
16
  const {
28
17
  as = 'footer',
29
- size = 'sm',
30
- variant = 1,
31
18
  logo,
32
- company,
19
+ heading,
33
20
  paragraph,
34
21
  socials,
35
22
  channels,
36
- hours,
37
- menu,
38
- html,
23
+ menus,
24
+ // hours,
25
+ // html,
39
26
  ...rest
40
27
  } = Astro.props
41
28
  ---
@@ -43,57 +30,63 @@ const {
43
30
  <Element
44
31
  class:list="footer"
45
32
  {as}
46
- {size}
47
- {variant}
48
33
  {...rest}
49
34
  >
50
35
  <Element class:list="footer-container">
51
36
  <Element class:list="footer-content">
52
37
  <Logo
53
- {size}
54
- {company}
55
- {...typeof logo === 'string' ? { src: logo } : logo}
38
+ size="sm"
39
+ {...logo}
56
40
  />
57
41
  <Paragraph
58
- {size}
42
+ size="sm"
59
43
  text={paragraph}
60
44
  />
61
- <Socials
62
- {size}
63
- {socials}
64
- />
65
- </Element>
66
- <Channels {channels} />
67
- <Fragment set:html={html} />
68
- <!-- <Hours {hours} /> -->
69
- <Menu
70
- direction="row"
71
- groups={menu}
72
- {size}
73
- />
74
- <Element class:list="hours column">
75
- <Heading
76
- text={hours?.heading}
77
- level={5}
78
- />
79
- <Element>
45
+ <Element class:list="footer-socials">
80
46
  {
81
- Object.entries(hours?.days ?? {})?.map(([key, value]: any) => (
82
- <Element class:list="spread">
83
- <Text text={key} />
84
- <Text text={value} />
85
- </Element>
47
+ socials?.map((social) => (
48
+ <Social
49
+ variant="secondary"
50
+ size="sm"
51
+ href={social}
52
+ />
86
53
  ))
87
54
  }
88
55
  </Element>
89
56
  </Element>
57
+ <Element class:list="footer-channels">
58
+ {channels?.map((channel) => <Channel {...channel} />)}
59
+ </Element>
90
60
  </Element>
61
+ <!-- <Fragment set:html={html} /> -->
62
+ <!-- <Hours {hours} /> -->
63
+ <!-- <Menu
64
+ direction="row"
65
+ groups={menu}
66
+ {size}
67
+ /> -->
68
+ <!-- <Element class:list="hours column">
69
+ <Heading
70
+ text={hours?.heading}
71
+ as="h5"
72
+ />
73
+ <Element>
74
+ {
75
+ Object.entries(hours?.days ?? {})?.map(([key, value]: any) => (
76
+ <Element class:list="spread">
77
+ <Paragraph text={key} />
78
+ <Paragraph text={value} />
79
+ </Element>
80
+ ))
81
+ }
82
+ </Element>
83
+ </Element> -->
91
84
  </Element>
92
85
 
93
86
  <style is:global>
94
87
  @layer fulldev {
95
88
  .footer {
96
- @apply relative mt-auto w-full;
89
+ @apply relative mt-auto w-full border-t bg-background;
97
90
 
98
91
  &.dark {
99
92
  @apply bg-background;
@@ -0,0 +1,192 @@
1
+ ---
2
+ import type { ComponentProps } from 'astro/types'
3
+ import Button from 'fulldev-ui/components/Button.astro'
4
+ import Cart from 'fulldev-ui/components/Cart.astro'
5
+ import Container from 'fulldev-ui/components/Container.astro'
6
+ import Drawer from 'fulldev-ui/components/Drawer.astro'
7
+ import Element from 'fulldev-ui/components/Element.astro'
8
+ import Header from 'fulldev-ui/components/Header.astro'
9
+ import Heading from 'fulldev-ui/components/Heading.astro'
10
+ import Link from 'fulldev-ui/components/Link.astro'
11
+ import Logo from 'fulldev-ui/components/Logo.astro'
12
+ import Search from 'fulldev-ui/components/Search.astro'
13
+ import Social from 'fulldev-ui/components/Social.astro'
14
+ import Themer from 'fulldev-ui/components/Themer.astro'
15
+ import type { HeaderSchema } from 'fulldev-ui/schemas/components/header'
16
+
17
+ interface Props extends ComponentProps<typeof Header>, HeaderSchema {}
18
+
19
+ const {
20
+ logo,
21
+ heading,
22
+ links,
23
+ socials,
24
+ menus,
25
+ search,
26
+ themer,
27
+ buttons,
28
+ cart,
29
+ ...rest
30
+ } = Astro.props
31
+ ---
32
+
33
+ <Header
34
+ class:list="header-1"
35
+ {...rest}
36
+ >
37
+ <Container>
38
+ <Element class:list="header-1-start">
39
+ <Logo {...logo} />
40
+ {
41
+ links?.map((link) => (
42
+ <Link
43
+ size="sm"
44
+ variant="muted"
45
+ {...link}
46
+ />
47
+ ))
48
+ }
49
+ </Element>
50
+ <Element class:list="header-1-end">
51
+ {
52
+ search && (
53
+ <Search
54
+ if={search}
55
+ variant="ghost"
56
+ size="sm"
57
+ />
58
+ )
59
+ }
60
+ {
61
+ buttons?.map((button) => (
62
+ <Button
63
+ size="sm"
64
+ {...button}
65
+ />
66
+ ))
67
+ }
68
+ {
69
+ cart && (
70
+ <Cart
71
+ if={cart}
72
+ variant="ghost"
73
+ size="sm"
74
+ />
75
+ )
76
+ }
77
+ <Themer
78
+ if={themer}
79
+ variant="ghost"
80
+ size="sm"
81
+ />
82
+ {
83
+ socials?.map((social) => (
84
+ <Social
85
+ variant="ghost"
86
+ size="sm"
87
+ href={social}
88
+ />
89
+ ))
90
+ }
91
+ <!-- <Button
92
+ class:list="menu-button"
93
+ as="label"
94
+ for="sidebar-toggle"
95
+ icon="menu-2"
96
+ variant="ghost"
97
+ size="sm"
98
+ /> -->
99
+ <Drawer
100
+ id="header-1-drawer"
101
+ icon="menu-2"
102
+ size="sm"
103
+ >
104
+ <Container>
105
+ <Element class:list="header-1-links">
106
+ {
107
+ links?.map((link) => (
108
+ <Link
109
+ variant="muted"
110
+ {...link}
111
+ />
112
+ ))
113
+ }
114
+ </Element>
115
+ {
116
+ menus?.map(({ heading, links }) => (
117
+ <Element class:list="header-1-menu">
118
+ <Heading
119
+ text={heading}
120
+ size="md"
121
+ as="h6"
122
+ />
123
+ <Element class:list="header-1-links">
124
+ {links?.map((link) => (
125
+ <Link
126
+ variant="muted"
127
+ {...link}
128
+ />
129
+ ))}
130
+ </Element>
131
+ </Element>
132
+ ))
133
+ }
134
+ </Container>
135
+ </Drawer>
136
+ </Element>
137
+ </Container>
138
+ </Header>
139
+
140
+ <style is:global>
141
+ @layer fulldev {
142
+ .header-1 {
143
+ @apply sticky left-0 top-0 z-20 flex h-14 items-center overflow-hidden border-b bg-background;
144
+
145
+ .container {
146
+ @apply flex items-center gap-6;
147
+ }
148
+
149
+ .header-1-start {
150
+ @apply flex items-center gap-6;
151
+
152
+ .link {
153
+ @apply max-lg:hidden;
154
+ }
155
+ }
156
+
157
+ .header-1-home {
158
+ @apply flex items-center gap-2;
159
+ }
160
+
161
+ .header-1-end {
162
+ @apply ml-auto flex items-center gap-1;
163
+
164
+ .social,
165
+ .themer {
166
+ @apply max-lg:hidden;
167
+ }
168
+
169
+ .menu-button {
170
+ @apply lg:hidden;
171
+ }
172
+ }
173
+
174
+ .drawer {
175
+ @apply lg:hidden;
176
+
177
+ .container {
178
+ @apply flex w-full flex-col items-start gap-6 overflow-y-auto px-gutter pb-14 pt-8;
179
+ @apply scrollbar scrollbar-track-transparent scrollbar-thumb-accent scrollbar-thumb-rounded-full scrollbar-w-2 hover:scrollbar-thumb-accent-hover;
180
+ }
181
+
182
+ .header-1-menu {
183
+ @apply flex flex-col gap-4;
184
+ }
185
+
186
+ .header-1-links {
187
+ @apply flex flex-col gap-3;
188
+ }
189
+ }
190
+ }
191
+ }
192
+ </style>
@@ -0,0 +1,74 @@
1
+ ---
2
+ import Badge from 'fulldev-ui/components/Badge.astro'
3
+ import Buttons from 'fulldev-ui/components/Buttons.astro'
4
+ import Container from 'fulldev-ui/components/Container.astro'
5
+ import Element from 'fulldev-ui/components/Element.astro'
6
+ import Heading from 'fulldev-ui/components/Heading.astro'
7
+ import Image from 'fulldev-ui/components/Image.astro'
8
+ import Paragraph from 'fulldev-ui/components/Paragraph.astro'
9
+ import Section from 'fulldev-ui/components/Section.astro'
10
+ import Tagline from 'fulldev-ui/components/Tagline.astro'
11
+ import type { HeroSchema } from 'fulldev-ui/schemas/blocks/hero.ts'
12
+ import type { ComponentProps } from 'svelte'
13
+
14
+ interface Props extends ComponentProps<typeof Section>, HeroSchema {}
15
+
16
+ const { badge, tagline, heading, paragraph, buttons, image, ...rest } =
17
+ Astro.props
18
+ ---
19
+
20
+ <Section
21
+ class:list="hero-1"
22
+ {...rest}
23
+ >
24
+ <Container>
25
+ <Element class="hero-1-segment">
26
+ <Element class="hero-1-content">
27
+ <Badge
28
+ size="lg"
29
+ {...badge}
30
+ />
31
+ <Tagline
32
+ size="sm"
33
+ text={tagline}
34
+ />
35
+ <Heading
36
+ as="h1"
37
+ size="5xl"
38
+ text={heading}
39
+ />
40
+ <Paragraph
41
+ size="xl"
42
+ text={paragraph}
43
+ />
44
+ </Element>
45
+ <Buttons
46
+ {buttons}
47
+ size="lg"
48
+ />
49
+ </Element>
50
+ <Image {...image} />
51
+ </Container>
52
+ </Section>
53
+
54
+ <style is:global>
55
+ @layer fulldev {
56
+ .hero-1 {
57
+ .hero-1-segment {
58
+ @apply flex flex-col items-center gap-8 text-center;
59
+ }
60
+
61
+ .hero-1-content {
62
+ @apply flex max-w-screen-md flex-col items-center gap-4 text-center;
63
+ }
64
+
65
+ .paragraph {
66
+ @apply text-balance;
67
+ }
68
+
69
+ .image {
70
+ @apply rounded-lg;
71
+ }
72
+ }
73
+ }
74
+ </style>