fulldev-ui 0.5.0-beta.8 → 0.6.0-beta.0

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 (236) hide show
  1. package/.env.example +3 -0
  2. package/.prettierrc.yaml +1 -0
  3. package/astro.config.ts +6 -32
  4. package/package.json +21 -30
  5. package/pnpm-lock.yaml +696 -2176
  6. package/public/favicon/android-chrome-192x192.png +0 -0
  7. package/public/favicon/android-chrome-512x512.png +0 -0
  8. package/public/favicon/apple-touch-icon.png +0 -0
  9. package/public/favicon/manifest.webmanifest +7 -3
  10. package/public/favicon/mstile-150x150.png +0 -0
  11. package/src/blocks/Banner.astro +6 -19
  12. package/src/blocks/Colleagues.astro +0 -1
  13. package/src/blocks/Contact.astro +75 -74
  14. package/src/blocks/Content.astro +124 -6
  15. package/src/blocks/Cta.astro +0 -2
  16. package/src/blocks/Excerpt.astro +0 -2
  17. package/src/blocks/Footer.astro +107 -3
  18. package/src/blocks/Hero.astro +238 -9
  19. package/src/blocks/Intro.astro +89 -11
  20. package/src/blocks/Prices.astro +1 -1
  21. package/src/blocks/Product.astro +51 -68
  22. package/src/blocks/Products.astro +114 -5
  23. package/src/blocks/Reviews.astro +0 -1
  24. package/src/blocks/_Contact.astro +112 -0
  25. package/src/components/Avatar.astro +28 -9
  26. package/src/components/Avatars.astro +36 -0
  27. package/src/components/Badge.astro +73 -26
  28. package/src/components/Badges.astro +16 -23
  29. package/src/components/Breadcrumb.astro +58 -0
  30. package/src/components/Button.astro +56 -112
  31. package/src/components/Buttons.astro +23 -13
  32. package/src/components/Card.astro +129 -115
  33. package/src/components/Cards.astro +33 -35
  34. package/src/components/Carousel.astro +106 -0
  35. package/src/components/Cart.astro +1 -1
  36. package/src/components/CartForm.astro +9 -9
  37. package/src/components/CartList.astro +11 -28
  38. package/src/components/CartSummary.astro +11 -13
  39. package/src/components/Channel.astro +40 -22
  40. package/src/components/Channels.astro +20 -6
  41. package/src/components/Checkbox.astro +52 -27
  42. package/src/components/Code.astro +52 -0
  43. package/src/components/Dialog.astro +2 -2
  44. package/src/components/Drawer.astro +34 -64
  45. package/src/components/Element.astro +16 -8
  46. package/src/components/Form.astro +14 -13
  47. package/src/components/Gallery.astro +172 -0
  48. package/src/components/Head.astro +52 -1
  49. package/src/components/Header.astro +73 -83
  50. package/src/components/Heading.astro +74 -30
  51. package/src/components/Icon.astro +25 -30
  52. package/src/components/Image.astro +23 -38
  53. package/src/components/Input.astro +59 -53
  54. package/src/components/Label.astro +20 -15
  55. package/src/components/Lead.astro +46 -0
  56. package/src/components/Link.astro +51 -26
  57. package/src/components/Links.astro +42 -0
  58. package/src/components/List.astro +41 -16
  59. package/src/components/LocaleSwitcher.astro +2 -2
  60. package/src/components/Logo.astro +45 -0
  61. package/src/components/Menu.astro +21 -17
  62. package/src/components/Paragraph.astro +38 -0
  63. package/src/components/Price.astro +1 -1
  64. package/src/components/Prose.astro +169 -0
  65. package/src/components/Rating.astro +50 -38
  66. package/src/components/Search.astro +1 -1
  67. package/src/components/Section.astro +196 -158
  68. package/src/components/Select.astro +44 -55
  69. package/src/components/Sidebar.astro +31 -38
  70. package/src/components/Social.astro +3 -8
  71. package/src/components/Socials.astro +9 -5
  72. package/src/components/Subheader.astro +59 -0
  73. package/src/components/Switch.astro +72 -29
  74. package/src/components/Table.astro +1 -1
  75. package/src/components/Tagline.astro +40 -12
  76. package/src/components/Text.astro +4 -4
  77. package/src/components/Textarea.astro +40 -50
  78. package/src/components/Themer.astro +76 -0
  79. package/src/components/Toc.astro +24 -32
  80. package/src/components/Writeup.astro +26 -8
  81. package/src/components/docs/PropsTable.astro +38 -264
  82. package/src/components/experimental/Window.astro +5 -57
  83. package/src/components/sections.astro +1 -1
  84. package/src/content/pages/blocks/_categories.mdx +1 -1
  85. package/src/content/pages/blocks/_footer.mdx +1 -1
  86. package/src/content/pages/blocks/_header.mdx +1 -3
  87. package/src/content/pages/blocks/_jobs.mdx +1 -1
  88. package/src/content/pages/blocks/_prices.mdx +1 -1
  89. package/src/content/pages/blocks/_product.mdx +1 -1
  90. package/src/content/pages/blocks/_products.mdx +1 -1
  91. package/src/content/pages/blocks/_stats.mdx +1 -1
  92. package/src/content/pages/blocks/banner.mdx +1 -1
  93. package/src/content/pages/blocks/colleagues.mdx +1 -2
  94. package/src/content/pages/blocks/contact.mdx +1 -1
  95. package/src/content/pages/blocks/content.mdx +1 -5
  96. package/src/content/pages/blocks/cta.mdx +1 -9
  97. package/src/content/pages/blocks/features.mdx +1 -4
  98. package/src/content/pages/blocks/hero.mdx +1 -4
  99. package/src/content/pages/blocks/intro.mdx +1 -4
  100. package/src/content/pages/blocks/posts.mdx +1 -1
  101. package/src/content/pages/blocks/reviews.mdx +1 -2
  102. package/src/content/pages/docs/_internationalization.mdx +55 -0
  103. package/src/content/pages/docs/_using-blocks.mdx +33 -0
  104. package/src/content/pages/docs/_using-presets.mdx +49 -0
  105. package/src/content/pages/docs/blocks.mdx +33 -0
  106. package/src/content/pages/docs/collections/images.mdx +100 -0
  107. package/src/content/pages/docs/collections/pages.mdx +119 -0
  108. package/src/content/pages/docs/collections/presets.mdx +60 -0
  109. package/src/content/pages/docs/collections.mdx +42 -0
  110. package/src/content/pages/{base/card.mdx → docs/components/_card.mdx} +1 -3
  111. package/src/content/pages/{base → docs/components}/_switch.mdx +2 -2
  112. package/src/content/pages/{typography → docs/components}/_tagline.mdx +2 -2
  113. package/src/content/pages/docs/components/_toggle.mdx +31 -0
  114. package/src/content/pages/docs/components/avatar.mdx +35 -0
  115. package/src/content/pages/{base → docs/components}/badge.mdx +27 -8
  116. package/src/content/pages/docs/components/badges.mdx +47 -0
  117. package/src/content/pages/{base → docs/components}/button.mdx +29 -10
  118. package/src/content/pages/docs/components/buttons.mdx +52 -0
  119. package/src/content/pages/docs/components/channel.mdx +92 -0
  120. package/src/content/pages/docs/components/channels.mdx +90 -0
  121. package/src/content/pages/{base → docs/components}/checkbox.mdx +10 -17
  122. package/src/content/pages/docs/components/code.mdx +46 -0
  123. package/src/content/pages/docs/components/heading.mdx +60 -0
  124. package/src/content/pages/docs/components/icon.mdx +49 -0
  125. package/src/content/pages/docs/components/image.mdx +26 -0
  126. package/src/content/pages/docs/components/input.mdx +41 -0
  127. package/src/content/pages/{typography → docs/components}/label.mdx +8 -4
  128. package/src/content/pages/docs/components/lead.mdx +51 -0
  129. package/src/content/pages/{typography → docs/components}/link.mdx +23 -8
  130. package/src/content/pages/docs/components/links.mdx +100 -0
  131. package/src/content/pages/docs/components/list.mdx +45 -0
  132. package/src/content/pages/docs/components/logo.mdx +37 -0
  133. package/src/content/pages/docs/components/menu.mdx +90 -0
  134. package/src/content/pages/docs/components/paragraph.mdx +51 -0
  135. package/src/content/pages/docs/components/prose.mdx +37 -0
  136. package/src/content/pages/docs/components/rating.mdx +77 -0
  137. package/src/content/pages/{base → docs/components}/section.mdx +1 -1
  138. package/src/content/pages/{base → docs/components}/select.mdx +0 -9
  139. package/src/content/pages/docs/components/social.mdx +95 -0
  140. package/src/content/pages/docs/components/socials.mdx +103 -0
  141. package/src/content/pages/docs/components/switch.mdx +35 -0
  142. package/src/content/pages/{base → docs/components}/table.mdx +0 -2
  143. package/src/content/pages/docs/components/tagline.mdx +47 -0
  144. package/src/content/pages/docs/components/textarea.mdx +35 -0
  145. package/src/content/pages/docs/components/themer.mdx +50 -0
  146. package/src/content/pages/docs/components.mdx +40 -0
  147. package/src/content/pages/docs/customization.mdx +151 -0
  148. package/src/content/pages/docs/frameworks.mdx +29 -0
  149. package/src/content/pages/docs/generating-pages.mdx +129 -0
  150. package/src/content/pages/docs/index.mdx +23 -0
  151. package/src/content/pages/docs/installation.mdx +50 -0
  152. package/src/content/pages/docs/layouts.mdx +33 -0
  153. package/src/content/pages/index.mdx +11 -9
  154. package/src/content/pages/showcase.mdx +4 -2
  155. package/src/content/presets/base.yml +80 -63
  156. package/src/content/presets/docs.yml +2 -2
  157. package/src/css/color.css +0 -10
  158. package/src/css/custom.css +10 -12
  159. package/src/css/size.css +2 -11
  160. package/src/css/theme.css +93 -0
  161. package/src/images/logo-1.svg +11 -0
  162. package/src/images/logo-2.svg +13 -0
  163. package/src/images/logo-basic.svg +10 -0
  164. package/src/images/logo-simple.svg +13 -0
  165. package/src/images/logo-thin.svg +15 -0
  166. package/src/images/logo.svg +14 -0
  167. package/src/images/logofat.svg +11 -0
  168. package/src/integration/index.ts +71 -144
  169. package/src/layouts/CategoryLayout.astro +135 -0
  170. package/src/layouts/Layout.astro +62 -117
  171. package/src/layouts/PageLayout.astro +26 -0
  172. package/src/layouts/PostLayout.astro +13 -8
  173. package/src/layouts/ProductLayout.astro +94 -10
  174. package/src/pages/[...page].astro +14 -22
  175. package/src/pages/test.astro +20 -0
  176. package/src/schemas/components/button.ts +21 -13
  177. package/src/schemas/components/card.ts +36 -18
  178. package/src/schemas/components/footer.ts +2 -10
  179. package/src/schemas/components/global.ts +16 -0
  180. package/src/schemas/components/header.ts +8 -0
  181. package/src/schemas/components/image.ts +8 -3
  182. package/src/schemas/components/link.ts +16 -0
  183. package/src/schemas/components/links.ts +4 -0
  184. package/src/schemas/components/menu.ts +2 -0
  185. package/src/schemas/components/sidebar.ts +2 -2
  186. package/src/schemas/components/subheader.ts +9 -0
  187. package/src/schemas/components/themer.ts +3 -0
  188. package/src/schemas/pageSchema.ts +14 -21
  189. package/src/utils/cart.ts +1 -10
  190. package/src/utils/getDeepReferenceChildren.ts +14 -0
  191. package/src/utils/getReferenceChildren.ts +1 -1
  192. package/src/utils/setTheme.ts +18 -0
  193. package/src/utils/slugify.ts +6 -0
  194. package/tailwind.config.ts +67 -0
  195. package/src/blocks/Article.astro +0 -40
  196. package/src/components/Footer.astro +0 -193
  197. package/src/components/ThemeSelect.astro +0 -41
  198. package/src/components/experimental/Form.astro +0 -53
  199. package/src/components/experimental/Gallery.astro +0 -104
  200. package/src/components/experimental/Logo.astro +0 -38
  201. package/src/components/experimental/Prose.astro +0 -192
  202. package/src/content/pages/base/icon.mdx +0 -55
  203. package/src/content/pages/base/image.mdx +0 -42
  204. package/src/content/pages/base/input.mdx +0 -56
  205. package/src/content/pages/base/rating.mdx +0 -55
  206. package/src/content/pages/base/textarea.mdx +0 -58
  207. package/src/content/pages/base/theme-select.mdx +0 -15
  208. package/src/content/pages/layouts/_layout.mdx +0 -14
  209. package/src/content/pages/layouts/docslayout.mdx +0 -14
  210. package/src/content/pages/overview/components.mdx +0 -75
  211. package/src/content/pages/overview/content-collections.mdx +0 -139
  212. package/src/content/pages/overview/frameworks.mdx +0 -198
  213. package/src/content/pages/overview/installation.mdx +0 -53
  214. package/src/content/pages/overview/introduction.mdx +0 -30
  215. package/src/content/pages/overview/theming.mdx +0 -69
  216. package/src/content/pages/schemas/page.mdx +0 -17
  217. package/src/content/pages/schemas/preset.mdx +0 -9
  218. package/src/content/pages/showcase/record.md +0 -3
  219. package/src/content/pages/typography/heading.mdx +0 -73
  220. package/src/content/pages/typography/list.mdx +0 -51
  221. package/src/content/pages/typography/text.mdx +0 -61
  222. package/src/content/presets/blocks.yml +0 -1
  223. package/src/css/space.css +0 -77
  224. package/src/css/styles.css +0 -0
  225. package/src/images/avatar-1.yml +0 -1
  226. package/src/integration/generate-colors.ts +0 -639
  227. package/src/integration/tailwind-plugin.ts +0 -80
  228. package/src/integration/unocss-preset.ts +0 -84
  229. package/src/layouts/BlockLayout.astro +0 -19
  230. package/src/layouts/ContactLayout.astro +0 -21
  231. package/src/layouts/DocsLayout.astro +0 -73
  232. package/src/layouts/OverviewLayout.astro +0 -42
  233. /package/src/content/pages/{base → docs/components}/_dialog.mdx +0 -0
  234. /package/src/content/pages/{base → docs/components}/_drawer.mdx +0 -0
  235. /package/src/content/pages/{base → docs/components}/_localeswitcher.mdx +0 -0
  236. /package/src/schemas/utils/{parents.ts → categories.ts} +0 -0
@@ -0,0 +1,16 @@
1
+ import { z } from 'astro:content'
2
+ import pathSchema from '../utils/pathSchema'
3
+
4
+ export default z.union([pathSchema('pages'), z.object({}).passthrough()]).pipe(
5
+ z
6
+ .object({
7
+ slug: z
8
+ .string()
9
+ .refine(async (data) => await pathSchema('pages').parseAsync(data)),
10
+ text: z.string(),
11
+ href: z.string(),
12
+ icon: z.string(),
13
+ })
14
+ .partial()
15
+ .passthrough()
16
+ )
@@ -0,0 +1,4 @@
1
+ import { z } from 'astro:content'
2
+ import link from './link'
3
+
4
+ export default z.array(link)
@@ -1,12 +1,14 @@
1
1
  import { z } from 'astro:content'
2
2
  import buttons from './buttons'
3
3
  import heading from './heading'
4
+ import links from './links'
4
5
 
5
6
  export default z.array(
6
7
  z
7
8
  .object({
8
9
  heading,
9
10
  buttons,
11
+ links,
10
12
  })
11
13
  .partial()
12
14
  .passthrough()
@@ -2,14 +2,14 @@ import { z } from 'astro:content'
2
2
  import logo from '../components/logo'
3
3
  import menu from '../components/menu'
4
4
  import heading from './heading'
5
- import toc from './toc'
5
+ import themer from './themer'
6
6
 
7
7
  export default z
8
8
  .object({
9
+ themer,
9
10
  logo,
10
11
  heading,
11
12
  menu,
12
- toc,
13
13
  })
14
14
  .partial()
15
15
  .passthrough()
@@ -0,0 +1,9 @@
1
+ import { z } from 'astro:content'
2
+ import links from './links'
3
+
4
+ export default z
5
+ .object({
6
+ links,
7
+ })
8
+ .partial()
9
+ .passthrough()
@@ -0,0 +1,3 @@
1
+ import { z } from 'astro:content'
2
+
3
+ export default z.boolean().optional()
@@ -1,6 +1,5 @@
1
1
  import { getEntries, getEntry, z } from 'astro:content'
2
2
  import { assign } from 'radash'
3
- import fulldevConfig from 'virtual:fulldev-ui/config'
4
3
  import footer from './components/footer'
5
4
  import header from './components/header'
6
5
  import image from './components/image'
@@ -9,10 +8,11 @@ import price from './components/price'
9
8
  import section from './components/section'
10
9
  import sections from './components/sections'
11
10
  import sidebar from './components/sidebar'
11
+ import subheader from './components/subheader'
12
12
  import toc from './components/toc'
13
+ import categories from './utils/categories'
13
14
  import component from './utils/component'
14
15
  import navigation from './utils/navigation'
15
- import parents from './utils/parents'
16
16
  import pathSchema from './utils/pathSchema'
17
17
 
18
18
  export const i18n = z
@@ -35,10 +35,8 @@ export const presets = z
35
35
  .transform(async ({ presets, ...rest }) => {
36
36
  let mergedData = {}
37
37
 
38
- if (fulldevConfig.basePreset) {
39
- const baseEntry = await getEntry('presets', fulldevConfig.basePreset)
40
- mergedData = assign(mergedData, baseEntry?.data || {})
41
- }
38
+ const baseEntry = await getEntry('presets', 'base')
39
+ mergedData = assign(mergedData, baseEntry?.data || {})
42
40
 
43
41
  if (presets) {
44
42
  const entries = await getEntries(presets)
@@ -51,21 +49,12 @@ export const presets = z
51
49
  return mergedData as typeof rest
52
50
  })
53
51
 
54
- export const basePreset = z
55
- .object({})
56
- .passthrough()
57
- .transform(async (data) => {
58
- if (!fulldevConfig.basePreset) return data
59
- const baseEntry = await getEntry('presets', fulldevConfig.basePreset)
60
- const mergedData = assign(baseEntry?.data ?? {}, data)
61
- return mergedData as typeof data
62
- })
63
-
64
52
  export const page = z
65
53
  .object({
66
54
  component,
67
- parents,
68
- theme: z.enum(['light', 'dark']),
55
+ categories,
56
+ order: z.number().optional(),
57
+ theme: z.enum(['light', 'dark', 'system']),
69
58
  lang: z.string(),
70
59
  seo: z
71
60
  .object({
@@ -75,13 +64,15 @@ export const page = z
75
64
  .optional(),
76
65
  title: z.string(),
77
66
  description: z.string().optional(),
67
+ paragraph: z.string().optional(),
78
68
  image,
79
69
  images,
80
70
  section,
81
71
  sections,
82
72
  footer,
83
- header: header,
84
- sidebar: sidebar,
73
+ header,
74
+ sidebar,
75
+ subheader,
85
76
  navigation,
86
77
  toc,
87
78
  price,
@@ -94,8 +85,10 @@ export const page = z
94
85
  variants: z.any(),
95
86
  heading: z.any(),
96
87
  href: z.any(),
88
+ next: z.any(),
89
+ prev: z.any(),
97
90
  })
98
91
  .partial()
99
92
  .strict()
100
93
 
101
- export default i18n.pipe(basePreset).pipe(presets).pipe(page)
94
+ export default i18n.pipe(presets).pipe(page)
package/src/utils/cart.ts CHANGED
@@ -1,13 +1,4 @@
1
- // import Stripe from 'stripe'
2
-
3
- // const stripe = new Stripe(import.meta.env.STRIPE_SECRET_KEY)
4
-
5
- const slugify = (input: string): string => {
6
- return input
7
- .toLowerCase()
8
- .replace(/[^a-z0-9]+/g, '-')
9
- .replace(/^-+|-+$/g, '')
10
- }
1
+ import { slugify } from './slugify'
11
2
 
12
3
  export const generateProductId = (
13
4
  slug: string,
@@ -0,0 +1,14 @@
1
+ import { getCollection, type CollectionEntry } from 'astro:content'
2
+
3
+ // Pages that reference the current page
4
+ export const getDeepReferenceChildren = async (
5
+ slug: CollectionEntry<'pages'>['slug']
6
+ ) =>
7
+ (
8
+ await getCollection('pages', (page) =>
9
+ page.data?.categories?.some((p: any) => p.slug.includes(slug))
10
+ )
11
+ )?.map(({ slug, data }) => ({
12
+ ...data,
13
+ href: `/${slug}/`,
14
+ }))
@@ -6,7 +6,7 @@ export const getReferenceChildren = async (
6
6
  ) =>
7
7
  (
8
8
  await getCollection('pages', (page) =>
9
- page.data?.parents?.some((p: any) => p.slug === slug)
9
+ page.data?.categories?.some((p: any) => p.slug === slug)
10
10
  )
11
11
  )?.map(({ slug, data }) => ({
12
12
  ...data,
@@ -0,0 +1,18 @@
1
+ export default function setTheme(newValue?: string) {
2
+ newValue && localStorage.setItem('theme', newValue)
3
+ const value = localStorage.getItem('theme')
4
+
5
+ const isDark =
6
+ value === 'dark' ||
7
+ (value === 'system' &&
8
+ window.matchMedia('(prefers-color-scheme: dark)').matches)
9
+
10
+ document.documentElement.classList.toggle('dark', isDark)
11
+
12
+ document.querySelectorAll('.themer').forEach((themer) => {
13
+ themer.classList.toggle('dark', isDark)
14
+ themer?.querySelectorAll('option').forEach((option) => {
15
+ option.selected = option.value === value
16
+ })
17
+ })
18
+ }
@@ -0,0 +1,6 @@
1
+ export const slugify = (input: string): string => {
2
+ return input
3
+ .toLowerCase()
4
+ .replace(/[^a-z0-9]+/g, '-')
5
+ .replace(/^-+|-+$/g, '')
6
+ }
@@ -0,0 +1,67 @@
1
+ import tailwindcssScrollbar from 'tailwind-scrollbar'
2
+ import type { Config } from 'tailwindcss'
3
+ import tailwindcssAnimate from 'tailwindcss-animate'
4
+
5
+ export default {
6
+ darkMode: ['class'],
7
+ content: ['src/**/*.{ts,tsx,astro,css,mdx}'],
8
+ theme: {
9
+ container: {
10
+ center: true,
11
+ padding: 'clamp(16px, 4vw, 32px)',
12
+ screens: ['1536px'],
13
+ },
14
+ extend: {
15
+ spacing: {
16
+ gutter: 'clamp(16px, 4vw, 32px)',
17
+ container: 'var(--container, 1536px)',
18
+ hero: 'calc(100vh - var(--header-height, 0px) - var(--subheader-height, 0px) - var(--banner-height, 0px))',
19
+ },
20
+ colors: {
21
+ border: 'hsl(var(--border))',
22
+ input: 'hsl(var(--input))',
23
+ ring: 'hsl(var(--ring))',
24
+ background: 'hsl(var(--background))',
25
+ foreground: 'hsl(var(--foreground))',
26
+ primary: {
27
+ DEFAULT: 'hsl(var(--primary))',
28
+ foreground: 'hsl(var(--primary-foreground))',
29
+ hover: 'hsl(var(--primary) / 85%)',
30
+ },
31
+ secondary: {
32
+ DEFAULT: 'hsl(var(--secondary))',
33
+ foreground: 'hsl(var(--secondary-foreground))',
34
+ hover: 'hsl(var(--secondary) / 75%)',
35
+ },
36
+ muted: {
37
+ DEFAULT: 'hsl(var(--muted))',
38
+ foreground: 'hsl(var(--muted-foreground))',
39
+ hover: 'hsl(var(--muted) / 75%)',
40
+ },
41
+ accent: {
42
+ DEFAULT: 'hsl(var(--accent))',
43
+ foreground: 'hsl(var(--accent-foreground))',
44
+ hover: 'hsl(var(--accent) / 75%)',
45
+ },
46
+ card: {
47
+ DEFAULT: 'hsl(var(--card))',
48
+ foreground: 'hsl(var(--card-foreground))',
49
+ hover: 'hsl(var(--card) / 75%)',
50
+ },
51
+ destructive: {
52
+ DEFAULT: 'hsl(var(--destructive))',
53
+ foreground: 'hsl(var(--destructive-foreground))',
54
+ },
55
+ },
56
+ borderRadius: {
57
+ lg: `var(--radius)`,
58
+ md: `calc(var(--radius) - 2px)`,
59
+ sm: 'calc(var(--radius) - 4px)',
60
+ },
61
+ borderColor: {
62
+ DEFAULT: 'hsl(var(--border))',
63
+ },
64
+ },
65
+ },
66
+ plugins: [tailwindcssAnimate, tailwindcssScrollbar({ nocompatible: true })],
67
+ } satisfies Config
@@ -1,40 +0,0 @@
1
- ---
2
- import Prose from 'fulldev-ui/components/experimental/Prose.astro'
3
- import Section from 'fulldev-ui/components/Section.astro'
4
- import Toc from 'fulldev-ui/components/Toc.astro'
5
-
6
- const { toc = 'Op deze pagina', render } = Astro.props
7
- const { Content } = (render && (await render())) || {}
8
- ---
9
-
10
- <Section class:list="article">
11
- <Prose>
12
- {Content && <Content />}
13
- <slot />
14
- </Prose>
15
- <Toc
16
- {render}
17
- heading={toc}
18
- />
19
- </Section>
20
-
21
- <style is:global lang="scss">
22
- .article {
23
- display: flex;
24
- position: relative;
25
- flex-grow: 1;
26
- flex-direction: row;
27
- align-items: start;
28
- height: 100%;
29
-
30
- &:first-child {
31
- padding-top: var(--space-6);
32
- }
33
-
34
- .prose {
35
- margin-right: auto;
36
- margin-left: auto;
37
- max-width: 768px;
38
- }
39
- }
40
- </style>
@@ -1,193 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLAttributes } from 'astro/types'
3
- import Button from 'fulldev-ui/components/Button.astro'
4
- import Channels from 'fulldev-ui/components/Channels.astro'
5
- import Element from 'fulldev-ui/components/Element.astro'
6
- import Heading from 'fulldev-ui/components/Heading.astro'
7
- import Social from 'fulldev-ui/components/Social.astro'
8
- import Socials from 'fulldev-ui/components/Socials.astro'
9
- import Text from 'fulldev-ui/components/Text.astro'
10
- import Logo from 'fulldev-ui/components/experimental/Logo.astro'
11
- import type { GlobalProps } from 'fulldev-ui/types/global-props'
12
-
13
- interface Props extends GlobalProps, HTMLAttributes<'footer'> {
14
- screen?: number | undefined
15
- logo?: ComponentProps<typeof Logo>['src']
16
- company?: ComponentProps<typeof Logo>['company']
17
- text?: ComponentProps<typeof Text>['text']
18
- hours?: any
19
- socials?: ComponentProps<typeof Social>['href'][] | undefined
20
- buttons?: ComponentProps<typeof Button>[] | undefined
21
- panel?: boolean | undefined
22
- channels?: ComponentProps<typeof Channels>['channels'] | undefined
23
- columns?: {
24
- heading: ComponentProps<typeof Heading>['text']
25
- buttons: ComponentProps<typeof Button>[] | undefined
26
- }[]
27
- }
28
-
29
- const {
30
- size = 'sm',
31
- screen = 1280,
32
- hours,
33
- panel,
34
- logo,
35
- company,
36
- socials,
37
- buttons,
38
- columns,
39
- text,
40
- title,
41
- channels,
42
- ...rest
43
- } = Astro.props
44
- ---
45
-
46
- <Element
47
- class:list="footer"
48
- style={{ '--screen': `${screen}px` }}
49
- structure="stack"
50
- {panel}
51
- {size}
52
- {...rest}
53
- >
54
- <Element class:list="column">
55
- <Logo
56
- {company}
57
- {...typeof logo === 'string' ? { src: logo } : logo}
58
- />
59
- <Text
60
- color="base"
61
- {text}
62
- />
63
- <Socials {socials} />
64
- </Element>
65
- <Channels {channels} />
66
- <Element class:list="hours column">
67
- <Heading
68
- text={hours?.heading}
69
- level={5}
70
- />
71
- <Element>
72
- {
73
- Object.entries(hours?.days ?? {})?.map(([key, value]: any) => (
74
- <Element class:list="spread">
75
- <Text text={key} />
76
- <Text text={value} />
77
- </Element>
78
- ))
79
- }
80
- </Element>
81
- </Element>
82
-
83
- <Element class:list="buttons column">
84
- {
85
- columns?.map(({ heading, buttons }: any) => (
86
- <Element class:list="column">
87
- <Heading
88
- level={5}
89
- text={heading}
90
- />
91
- {buttons?.map((button: any) => (
92
- <Button
93
- variant="link"
94
- {...button}
95
- />
96
- ))}
97
- </Element>
98
- ))
99
- }
100
- </Element>
101
- </Element>
102
-
103
- <style is:global lang="scss">
104
- @layer fulldev {
105
- .footer {
106
- display: grid;
107
- position: relative;
108
- grid-template-columns: 1fr;
109
- align-items: flex-start;
110
- gap: var(--space-6);
111
- margin-top: auto;
112
- margin-top: auto;
113
- border-top-width: 1px;
114
- border-color: var(--base-a6);
115
- background-color: var(--base-2);
116
- padding: var(--space-7) var(--gutter);
117
- width: 100%;
118
-
119
- @media (min-width: 1024px) {
120
- grid-auto-columns: 1fr;
121
- grid-auto-flow: column;
122
- }
123
-
124
- .spread {
125
- display: flex;
126
- justify-content: space-between;
127
- }
128
-
129
- .column {
130
- display: flex;
131
- flex-direction: column;
132
- }
133
-
134
- > .column {
135
- gap: var(--space-4);
136
- }
137
-
138
- .socials {
139
- display: flex;
140
- }
141
-
142
- .column {
143
- h5 + * {
144
- margin-top: var(--space-4);
145
- }
146
-
147
- .button.variant-link + .button.variant-link {
148
- margin-top: var(--space-4);
149
- }
150
- }
151
-
152
- &.panel {
153
- margin: var(--spacer) var(--gutter);
154
- border-width: 1px;
155
- border-radius: var(--radius-2);
156
- overflow: hidden;
157
- }
158
-
159
- .channels {
160
- gap: var(--space-3);
161
- }
162
-
163
- .buttons {
164
- display: grid;
165
- position: relative;
166
- grid-template-columns: 1fr;
167
- align-items: flex-start;
168
- gap: var(--space-3);
169
- gap: var(--space-6);
170
- width: 100%;
171
-
172
- @media (min-width: 1024px) {
173
- grid-auto-columns: 1fr;
174
- grid-auto-flow: column;
175
- }
176
- }
177
-
178
- .text {
179
- max-width: calc(5 * var(--space-7));
180
- }
181
-
182
- .hours {
183
- .column {
184
- gap: 0;
185
-
186
- .text {
187
- font-size: var(--text-2);
188
- }
189
- }
190
- }
191
- }
192
- }
193
- </style>
@@ -1,41 +0,0 @@
1
- ---
2
- import Select from 'fulldev-ui/components/Select.astro'
3
- // const defaultTheme = fulldevConfig.colors.theme || 'light'
4
-
5
- const { ...rest } = Astro.props
6
- ---
7
-
8
- <Select
9
- class:list="theme-select"
10
- name="theme-select"
11
- options={['light', 'dark']}
12
- value="light"
13
- onchange="localStorage.setItem('theme', this.value); window.location.reload();"
14
- {...rest}
15
- />
16
-
17
- <script>
18
- const setOption = (document: Document) => {
19
- const selects = document.querySelectorAll('.theme-select')
20
- const theme = localStorage.getItem('theme') || ''
21
- selects?.forEach((select) => {
22
- const options = select?.querySelectorAll('option')
23
- options?.forEach((option) => {
24
- if (option.value === theme) option.selected = true
25
- else option.selected = false
26
- })
27
- })
28
- }
29
-
30
- setOption(document)
31
-
32
- document.addEventListener('astro:before-swap', (event) => {
33
- setOption(event.newDocument)
34
- })
35
- </script>
36
-
37
- <style is:global lang="scss">
38
- .theme-select {
39
- width: calc(1.4 * var(--space-7));
40
- }
41
- </style>
@@ -1,53 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLAttributes } from 'astro/types'
3
- import Element from 'fulldev-ui/components/Element.astro'
4
- import type { GlobalProps } from 'fulldev-ui/types/global-props'
5
- import Button from '../Button.astro'
6
- import Input from '../Input.astro'
7
- import Select from '../Select.astro'
8
- import Textarea from '../Textarea.astro'
9
-
10
- interface Props extends GlobalProps, HTMLAttributes<'form'> {
11
- submit?: ComponentProps<typeof Button>['text']
12
- fields?:
13
- | (
14
- | ComponentProps<typeof Input>
15
- | ComponentProps<typeof Select>
16
- | (ComponentProps<typeof Textarea> & { type?: 'textarea' | undefined })
17
- )[]
18
- | undefined
19
- }
20
-
21
- const { fields, submit, ...rest } = Astro.props
22
- ---
23
-
24
- <Element
25
- class:list="form"
26
- as="form"
27
- {...rest}
28
- >
29
- <slot>
30
- {
31
- fields?.map((field) => {
32
- if ('options' in field) return <Select {...field} />
33
- if ('type' in field && field.type === 'textarea')
34
- return <Textarea {...field} />
35
- return <Input {...(field as any)} />
36
- })
37
- }
38
- <Button
39
- type="submit"
40
- text={submit}
41
- />
42
- </slot>
43
- </Element>
44
-
45
- <style is:global lang="scss">
46
- .form {
47
- display: flex;
48
- flex-direction: column;
49
- gap: var(--space-4);
50
- width: 100%;
51
- max-width: calc(var(--space-4) * 44);
52
- }
53
- </style>