fulldev-ui 0.3.35 → 0.4.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.
- package/.github/ISSUE_TEMPLATE/bug_report.yml +57 -0
- package/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +39 -0
- package/.github/pull_request_template.md +23 -0
- package/.github/workflows/github-releases-to-discord.yml +21 -0
- package/.prettierignore +15 -0
- package/.prettierrc.yaml +34 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +11 -0
- package/.vscode/settings.json +23 -0
- package/CHANGELOG.md +100 -0
- package/CONTRIBUTING.md +102 -0
- package/LICENCE +21 -0
- package/README.md +9 -6
- package/astro.config.ts +44 -0
- package/package.json +41 -27
- package/pnpm-lock.yaml +6229 -0
- package/public/favicon/android-chrome-192x192.png +0 -0
- package/public/favicon/android-chrome-512x512.png +0 -0
- package/public/favicon/apple-touch-icon.png +0 -0
- package/public/favicon/browserconfig.xml +9 -0
- package/public/favicon/favicon-16x16.png +0 -0
- package/public/favicon/favicon-32x32.png +0 -0
- package/public/favicon/favicon.ico +0 -0
- package/public/favicon/mstile-150x150.png +0 -0
- package/public/favicon/safari-pinned-tab.svg +17 -0
- package/public/favicon/site.webmanifest +19 -0
- package/public/images/avatar-placeholder.jpg +0 -0
- package/public/images/avatars/1.jpeg +0 -0
- package/public/images/avatars/2.jpeg +0 -0
- package/public/images/avatars/3.jpeg +0 -0
- package/public/images/avatars/300/1.jpeg +0 -0
- package/public/images/avatars/300/2.jpeg +0 -0
- package/public/images/avatars/300/3.jpeg +0 -0
- package/public/images/avatars/300/4.jpeg +0 -0
- package/public/images/avatars/4.jpeg +0 -0
- package/public/images/avatars/5.jpeg +0 -0
- package/public/images/avatars/500/1.jpeg +0 -0
- package/public/images/avatars/500/2.jpeg +0 -0
- package/public/images/avatars/500/3.jpeg +0 -0
- package/public/images/avatars/500/4.jpeg +0 -0
- package/public/images/avatars/6.jpeg +0 -0
- package/public/images/avatars/7.jpeg +0 -0
- package/public/images/avatars/8.jpeg +0 -0
- package/public/images/block-code.png +0 -0
- package/public/images/blocks/colleagues.png +0 -0
- package/public/images/blocks/content.png +0 -0
- package/public/images/blocks/cta.png +0 -0
- package/public/images/blocks/features.png +0 -0
- package/public/images/blocks/footer.png +0 -0
- package/public/images/blocks/header.png +0 -0
- package/public/images/blocks/hero.png +0 -0
- package/public/images/blocks/intro.png +0 -0
- package/public/images/blocks/posts.png +0 -0
- package/public/images/blocks/prices.png +0 -0
- package/public/images/blocks/reviews.png +0 -0
- package/public/images/component-code.png +0 -0
- package/public/images/logo-placeholder.svg +1 -0
- package/public/images/placeholder-center.webp +0 -0
- package/public/images/placeholder-landscape-dark.png +0 -0
- package/public/images/placeholder-landscape.webp +0 -0
- package/public/images/placeholder-portrait.webp +0 -0
- package/public/images/placeholder-right.webp +0 -0
- package/public/images/placeholder.webp +0 -0
- package/siteicon.png +0 -0
- package/src/blocks/Categories.astro +12 -0
- package/src/blocks/Colleagues.astro +12 -0
- package/src/blocks/Contact.astro +152 -0
- package/src/blocks/Content.astro +12 -0
- package/src/blocks/Cta.astro +14 -0
- package/src/blocks/Features.astro +11 -0
- package/src/blocks/Footer.astro +7 -0
- package/src/blocks/Header.astro +7 -0
- package/src/blocks/Hero.astro +16 -0
- package/src/blocks/Intro.astro +19 -0
- package/src/blocks/Jobs.astro +12 -0
- package/src/blocks/Posts.astro +11 -0
- package/src/blocks/Prices.astro +22 -0
- package/src/blocks/Product.astro +64 -0
- package/src/blocks/Products.astro +11 -0
- package/src/blocks/Reviews.astro +13 -0
- package/src/components/{base/Avatar.astro → Avatar.astro} +7 -11
- package/src/components/{base/Badge.astro → Badge.astro} +36 -22
- package/src/components/{structure/Bento.astro → Bento.astro} +6 -9
- package/src/components/Block.astro +157 -0
- package/src/components/Blocks.astro +5 -0
- package/src/components/Box.astro +60 -0
- package/src/components/Button.astro +140 -0
- package/src/components/Card.astro +212 -0
- package/src/components/{structure/Carousel.astro → Carousel.astro} +13 -16
- package/src/components/Checkbox.astro +63 -0
- package/src/components/{structure/Column.astro → Column.astro} +18 -9
- package/src/components/Dialog.astro +65 -0
- package/src/components/Drawer.astro +99 -0
- package/src/components/Footer.astro +144 -0
- package/src/components/{structure/Grid.astro → Grid.astro} +7 -10
- package/src/components/Head.astro +85 -0
- package/src/components/Header.astro +204 -0
- package/src/components/Heading.astro +79 -0
- package/src/components/{base/Icon.astro → Icon.astro} +7 -9
- package/src/components/{base/Image.astro → Image.astro} +32 -30
- package/src/components/Input.astro +119 -0
- package/src/components/{typography/Label.astro → Label.astro} +12 -12
- package/src/components/{typography/Link.astro → Link.astro} +15 -13
- package/src/components/List.astro +41 -0
- package/src/components/{structure/Masonry.astro → Masonry.astro} +9 -11
- package/src/components/Rating.astro +82 -0
- package/src/components/{_Component.astro → Root.astro} +9 -11
- package/src/components/{structure/Row.astro → Row.astro} +6 -9
- package/src/components/Search.astro +62 -0
- package/src/components/Section.astro +274 -0
- package/src/components/Select.astro +144 -0
- package/src/components/Sidebar.astro +71 -0
- package/src/components/{structure/Split.astro → Split.astro} +6 -9
- package/src/components/{structure/Spread.astro → Spread.astro} +6 -9
- package/src/components/Switch.astro +114 -0
- package/src/components/Table.astro +121 -0
- package/src/components/Tagline.astro +35 -0
- package/src/components/Text.astro +43 -0
- package/src/components/Textarea.astro +105 -0
- package/src/components/Toc.astro +52 -0
- package/src/components/{structure/Wrap.astro → Wrap.astro} +5 -10
- package/src/components/docs/DecorativeBox.astro +15 -0
- package/src/components/docs/PropsTable.astro +95 -0
- package/src/components/experimental/Channel.astro +15 -10
- package/src/components/experimental/Form.astro +34 -0
- package/src/components/experimental/Gallery.astro +180 -0
- package/src/components/experimental/GalleryVertical.astro +161 -0
- package/src/components/{base → experimental}/Logo.astro +3 -5
- package/src/components/experimental/Price.astro +17 -15
- package/src/components/experimental/Prose.astro +154 -0
- package/src/components/{base → experimental}/Video.astro +1 -1
- package/src/components/experimental/Window.astro +173 -0
- package/src/content/config.ts +16 -13
- package/src/content/pages/_changelog.mdx +10 -0
- package/src/content/pages/_segment/footer.mdx +244 -0
- package/src/content/pages/_segment/header.mdx +210 -0
- package/src/content/pages/base/_dialog.mdx +17 -0
- package/src/content/pages/base/_drawer.mdx +17 -0
- package/src/content/pages/base/_image.mdx +14 -0
- package/src/content/pages/base/_switch.mdx +33 -0
- package/src/content/pages/base/badge.mdx +70 -0
- package/src/content/pages/base/button.mdx +71 -0
- package/src/content/pages/base/card.mdx +114 -0
- package/src/content/pages/base/checkbox.mdx +43 -0
- package/src/content/pages/base/icon.mdx +54 -0
- package/src/content/pages/base/input.mdx +67 -0
- package/src/content/pages/base/rating.mdx +66 -0
- package/src/content/pages/base/section.mdx +79 -0
- package/src/content/pages/base/select.mdx +77 -0
- package/src/content/pages/base/table.mdx +133 -0
- package/src/content/pages/base/textarea.mdx +73 -0
- package/src/content/pages/blocks/_banner.mdx +13 -0
- package/src/content/pages/blocks/_categories.mdx +149 -0
- package/src/content/pages/blocks/_jobs.mdx +37 -0
- package/src/content/pages/blocks/_product.mdx +29 -0
- package/src/content/pages/blocks/_products.mdx +55 -0
- package/src/content/pages/blocks/_stats.mdx +34 -0
- package/src/content/pages/blocks/colleagues.mdx +42 -0
- package/src/content/pages/blocks/content.mdx +101 -0
- package/src/content/pages/blocks/cta.mdx +192 -0
- package/src/content/pages/blocks/features.mdx +134 -0
- package/src/content/pages/blocks/footer.mdx +71 -0
- package/src/content/pages/blocks/header.mdx +192 -0
- package/src/content/pages/blocks/hero.mdx +97 -0
- package/src/content/pages/blocks/intro.mdx +132 -0
- package/src/content/pages/blocks/posts.mdx +40 -0
- package/src/content/pages/blocks/prices.mdx +126 -0
- package/src/content/pages/blocks/reviews.mdx +249 -0
- package/src/content/pages/blocks.mdx +10 -0
- package/src/content/pages/index.mdx +65 -0
- package/src/content/pages/overview/frameworks.mdx +180 -0
- package/src/content/pages/overview/installation.mdx +20 -0
- package/src/content/pages/overview/integration.mdx +37 -0
- package/src/content/pages/overview/introduction.mdx +20 -0
- package/src/content/pages/overview/theming.mdx +83 -0
- package/src/content/pages/structure/_row.mdx +23 -0
- package/src/content/pages/structure/_wrap.mdx +25 -0
- package/src/content/pages/structure/carousel.mdx +31 -0
- package/src/content/pages/structure/column.mdx +21 -0
- package/src/content/pages/structure/grid.mdx +26 -0
- package/src/content/pages/structure/masonry.mdx +32 -0
- package/src/content/pages/structure/split.mdx +21 -0
- package/src/content/pages/structure/spread.mdx +21 -0
- package/src/content/pages/typography/_tagline.mdx +36 -0
- package/src/content/pages/typography/heading.mdx +74 -0
- package/src/content/pages/typography/label.mdx +42 -0
- package/src/content/pages/typography/link.mdx +63 -0
- package/src/content/pages/typography/list.mdx +52 -0
- package/src/content/pages/typography/text.mdx +62 -0
- package/src/content/records/record.yml +1 -0
- package/src/content/settings/base.yml +48 -0
- package/src/content/settings/components.yml +27 -0
- package/src/css/color.css +6 -67
- package/src/css/custom.css +59 -0
- package/src/css/size.css +130 -0
- package/src/css/space.css +47 -26
- package/src/css/styles.css +4 -2
- package/src/env.d.ts +1 -1
- package/src/integration/generate-colors.ts +637 -0
- package/src/integration/index.ts +158 -0
- package/src/integration/tailwind-plugin.ts +80 -0
- package/src/integration/unocss-preset.ts +84 -0
- package/src/layouts/BlockLayout.astro +24 -0
- package/src/layouts/BlockOverviewLayout.astro +39 -0
- package/src/layouts/ComponentLayout.astro +23 -0
- package/src/layouts/JobsLayout.astro +40 -0
- package/src/layouts/Layout.astro +168 -0
- package/src/layouts/OverviewLayout.astro +45 -0
- package/src/layouts/PageLayout.astro +32 -0
- package/src/layouts/PostLayout.astro +32 -0
- package/src/layouts/ProductLayout.astro +31 -0
- package/src/pages/[...page].astro +41 -0
- package/src/schemas/base.ts +81 -0
- package/src/schemas/block.ts +15 -0
- package/src/schemas/card.ts +3 -0
- package/src/schemas/page.ts +43 -0
- package/src/schemas/utils.ts +22 -0
- package/src/utils/mergeEntries.ts +28 -0
- package/tsconfig.json +10 -1
- package/.astro/settings.json +0 -5
- package/.astro/types.d.ts +0 -147
- package/.env +0 -1
- package/astro.config.mjs +0 -6
- package/src/components/_Block.astro +0 -20
- package/src/components/_Blocks.astro +0 -11
- package/src/components/_Children.astro +0 -31
- package/src/components/_archive/Body.astro +0 -37
- package/src/components/_archive/Main.astro +0 -28
- package/src/components/_archive/Nav.astro +0 -50
- package/src/components/_todo/Form.astro +0 -36
- package/src/components/_todo/Prose.astro +0 -139
- package/src/components/_todo/Writeup.astro +0 -24
- package/src/components/base/Button.astro +0 -123
- package/src/components/base/Rating.astro +0 -47
- package/src/components/base/checkbox/Checkbox.astro +0 -52
- package/src/components/base/checkbox/CheckboxElement.astro +0 -31
- package/src/components/base/input/Input.astro +0 -79
- package/src/components/base/input/InputElement.astro +0 -69
- package/src/components/base/radio/Radio.astro +0 -66
- package/src/components/base/radio/RadioElement.astro +0 -34
- package/src/components/base/select/Select.astro +0 -90
- package/src/components/base/select/SelectElement.astro +0 -56
- package/src/components/base/select/SelectOption.astro +0 -32
- package/src/components/base/switch/Switch.astro +0 -55
- package/src/components/base/switch/SwitchElement.astro +0 -84
- package/src/components/base/table/Table.astro +0 -57
- package/src/components/base/table/TableBody.astro +0 -38
- package/src/components/base/table/TableCell.astro +0 -30
- package/src/components/base/table/TableFooter.astro +0 -48
- package/src/components/base/table/TableHead.astro +0 -31
- package/src/components/base/table/TableHeader.astro +0 -44
- package/src/components/base/table/TableRow.astro +0 -46
- package/src/components/base/textarea/Textarea.astro +0 -79
- package/src/components/base/textarea/TextareaElement.astro +0 -68
- package/src/components/segment/Box.astro +0 -46
- package/src/components/segment/Card.astro +0 -114
- package/src/components/segment/Footer.astro +0 -94
- package/src/components/segment/Header.astro +0 -100
- package/src/components/segment/Section.astro +0 -103
- package/src/components/segment/_regels.md +0 -32
- package/src/components/typography/Heading.astro +0 -66
- package/src/components/typography/List.astro +0 -47
- package/src/components/typography/ListItem.astro +0 -36
- package/src/components/typography/Paragraph.astro +0 -36
- package/src/components/typography/Tagline.astro +0 -36
- package/src/components/typography/Text.astro +0 -37
- package/src/components/utility/Head.astro +0 -83
- package/src/components/utility/Layout.astro +0 -46
- package/src/content/pages/index.md +0 -2
- package/src/css/color.scss +0 -289
- package/src/css/size.scss +0 -296
- package/src/css/utils.scss +0 -16
- package/src/index.ts +0 -71
- package/src/integration/integration.ts +0 -88
- package/src/integration/tailwind.ts +0 -34
- package/src/integration/unocss.ts +0 -38
- /package/src/{_archive → utils/_archive}/Childmorphic.ts +0 -0
- /package/src/{_archive → utils/_archive}/getAllCollections.ts +0 -0
- /package/src/{_archive → utils/_archive}/getCollectionCascade.ts +0 -0
- /package/src/{_archive → utils/_archive}/getPathname.ts +0 -0
- /package/src/{_archive → utils/_archive}/staticPageSchema.ts +0 -0
- /package/src/{_archive → utils/_archive}/transform/transform.ts +0 -0
- /package/src/{_archive → utils/_archive}/transform/transformCasing.ts +0 -0
- /package/src/{_archive → utils/_archive}/transform/transformReferences.ts +0 -0
- /package/src/{_archive → utils/_archive}/transform/transformSelfs.ts +0 -0
- /package/src/{_archive → utils/_archive}/transform/transformUnderscores.ts +0 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import { getCollection } from 'astro:content'
|
|
4
|
+
import Button from 'fulldev-ui/components/Button.astro'
|
|
5
|
+
import Drawer from 'fulldev-ui/components/Drawer.astro'
|
|
6
|
+
import Logo from 'fulldev-ui/components/experimental/Logo.astro'
|
|
7
|
+
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
8
|
+
import Link from 'fulldev-ui/components/Link.astro'
|
|
9
|
+
import Root from 'fulldev-ui/components/Root.astro'
|
|
10
|
+
import Row from 'fulldev-ui/components/Row.astro'
|
|
11
|
+
import Search from 'fulldev-ui/components/Search.astro'
|
|
12
|
+
|
|
13
|
+
type Props<As extends HTMLTag = 'header'> = Polymorphic<{ as: As }> & {
|
|
14
|
+
structure?: 'spread' | 'row' | 'column'
|
|
15
|
+
position?: 'relative' | 'sticky' | 'fixed' | 'absolute'
|
|
16
|
+
variant?: 'ghost' | 'base' | 'subtle' | 'soft' | 'surface' | 'outline'
|
|
17
|
+
size?: 'sm' | 'md' | 'lg'
|
|
18
|
+
frame?: 'fill' | 'panel'
|
|
19
|
+
align?: 'start' | 'center' | 'end'
|
|
20
|
+
space?: 'none' | 'auto'
|
|
21
|
+
logo?: string
|
|
22
|
+
heading?: string
|
|
23
|
+
links?: any[]
|
|
24
|
+
buttons?: any[]
|
|
25
|
+
drawer?: any[]
|
|
26
|
+
search?: any
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const {
|
|
30
|
+
as = 'header',
|
|
31
|
+
align = 'center',
|
|
32
|
+
structure = 'spread',
|
|
33
|
+
space = 'auto',
|
|
34
|
+
size = 'sm',
|
|
35
|
+
frame = 'fill',
|
|
36
|
+
variant = 'base',
|
|
37
|
+
logo,
|
|
38
|
+
heading,
|
|
39
|
+
links,
|
|
40
|
+
buttons,
|
|
41
|
+
drawer,
|
|
42
|
+
search,
|
|
43
|
+
...rest
|
|
44
|
+
} = Astro.props
|
|
45
|
+
|
|
46
|
+
const slug = Astro.url.pathname.replace(/^\/|\/$/g, '')
|
|
47
|
+
const url = Astro.url.href
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
<Root
|
|
51
|
+
class:list={'header'}
|
|
52
|
+
{as}
|
|
53
|
+
{frame}
|
|
54
|
+
{structure}
|
|
55
|
+
{variant}
|
|
56
|
+
{space}
|
|
57
|
+
{size}
|
|
58
|
+
{...rest}
|
|
59
|
+
>
|
|
60
|
+
<Row
|
|
61
|
+
style={{ textDecoration: 'none', height: '100%' }}
|
|
62
|
+
as="a"
|
|
63
|
+
href="/"
|
|
64
|
+
>
|
|
65
|
+
<Logo src={logo} />
|
|
66
|
+
<Heading
|
|
67
|
+
as="p"
|
|
68
|
+
level={3}
|
|
69
|
+
html={heading}
|
|
70
|
+
/>
|
|
71
|
+
</Row>
|
|
72
|
+
<Row>
|
|
73
|
+
{
|
|
74
|
+
links?.map((link) => (
|
|
75
|
+
<Link
|
|
76
|
+
class={'header-link'}
|
|
77
|
+
{...link}
|
|
78
|
+
/>
|
|
79
|
+
))
|
|
80
|
+
}
|
|
81
|
+
{
|
|
82
|
+
buttons?.map((button) => (
|
|
83
|
+
<Button
|
|
84
|
+
variant="secondary"
|
|
85
|
+
{...button}
|
|
86
|
+
/>
|
|
87
|
+
))
|
|
88
|
+
}
|
|
89
|
+
<Search {...search} />
|
|
90
|
+
<Drawer
|
|
91
|
+
icon="menu-2"
|
|
92
|
+
id="navigation-drawer"
|
|
93
|
+
>
|
|
94
|
+
{
|
|
95
|
+
drawer &&
|
|
96
|
+
drawer.length > 0 &&
|
|
97
|
+
drawer.map((item: any) => (
|
|
98
|
+
<>
|
|
99
|
+
<Heading
|
|
100
|
+
level={6}
|
|
101
|
+
html={item.heading}
|
|
102
|
+
/>
|
|
103
|
+
{item.links?.map((link: any) => (
|
|
104
|
+
<Link
|
|
105
|
+
{...link}
|
|
106
|
+
class="sidebar-link"
|
|
107
|
+
color={url.endsWith(link.href) ? 'brand' : undefined}
|
|
108
|
+
/>
|
|
109
|
+
))}
|
|
110
|
+
{item.folder &&
|
|
111
|
+
(async () => {
|
|
112
|
+
const pages = await getCollection(
|
|
113
|
+
'pages',
|
|
114
|
+
(entry: any) =>
|
|
115
|
+
entry.slug.startsWith(item.folder) &&
|
|
116
|
+
!entry.slug.endsWith(item.folder)
|
|
117
|
+
)
|
|
118
|
+
return pages.map((page: any) => (
|
|
119
|
+
<Link
|
|
120
|
+
href={`/${page.slug}`}
|
|
121
|
+
class="sidebar-link"
|
|
122
|
+
color={slug === page.slug ? 'brand' : undefined}
|
|
123
|
+
html={page.data.title}
|
|
124
|
+
/>
|
|
125
|
+
))
|
|
126
|
+
})()}
|
|
127
|
+
</>
|
|
128
|
+
))
|
|
129
|
+
}
|
|
130
|
+
</Drawer>
|
|
131
|
+
</Row>
|
|
132
|
+
</Root>
|
|
133
|
+
|
|
134
|
+
<style lang="scss" is:global>
|
|
135
|
+
:root {
|
|
136
|
+
--header-height: calc(
|
|
137
|
+
var(--text-2) + 2 * var(--space-4) + 2 * var(--space-3)
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.header {
|
|
142
|
+
--screen: 1536px;
|
|
143
|
+
--gutter: max(4vw, calc(100vw - var(--screen)) / 2);
|
|
144
|
+
|
|
145
|
+
display: flex;
|
|
146
|
+
position: relative;
|
|
147
|
+
top: 0;
|
|
148
|
+
right: 0;
|
|
149
|
+
left: 0;
|
|
150
|
+
align-items: center;
|
|
151
|
+
z-index: 10;
|
|
152
|
+
border-bottom: 1px solid var(--color-a6);
|
|
153
|
+
width: 100%;
|
|
154
|
+
// TODO: fix this
|
|
155
|
+
max-width: calc(100% - (2 * var(--outer-x)));
|
|
156
|
+
height: var(--header-height);
|
|
157
|
+
|
|
158
|
+
&.frame-fill {
|
|
159
|
+
background-color: var(--color-2);
|
|
160
|
+
padding: 0 var(--gutter);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&.frame-panel {
|
|
164
|
+
margin: var(--space-3) var(--gutter);
|
|
165
|
+
border: 1px solid var(--color-a6);
|
|
166
|
+
border-radius: var(--radius-2);
|
|
167
|
+
padding: var(--space-4) min(var(--gutter), var(--space-4));
|
|
168
|
+
width: auto;
|
|
169
|
+
overflow: hidden;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&.position-fixed {
|
|
173
|
+
position: fixed;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&.position-absolute {
|
|
177
|
+
position: absolute;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&.position-sticky {
|
|
181
|
+
position: sticky;
|
|
182
|
+
top: -1px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.header-link {
|
|
186
|
+
display: none;
|
|
187
|
+
font-size: var(--text-2);
|
|
188
|
+
|
|
189
|
+
@media (min-width: 1024px) {
|
|
190
|
+
display: flex;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.drawer-link {
|
|
195
|
+
font-size: var(--text-2);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.drawer-button {
|
|
199
|
+
@media (min-width: 1024px) {
|
|
200
|
+
display: none !important;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
</style>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { Polymorphic } from 'astro/types'
|
|
3
|
+
import Root from 'fulldev-ui/components/Root.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span'> =
|
|
6
|
+
Polymorphic<{
|
|
7
|
+
as: As
|
|
8
|
+
}> & {
|
|
9
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6
|
|
10
|
+
size?: 'sm' | 'md' | 'lg'
|
|
11
|
+
color?: 'base' | 'brand'
|
|
12
|
+
contrast?: boolean
|
|
13
|
+
html?: string
|
|
14
|
+
text?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
level = 2,
|
|
19
|
+
as = `h${level}`,
|
|
20
|
+
color = 'base',
|
|
21
|
+
contrast = true,
|
|
22
|
+
html,
|
|
23
|
+
text,
|
|
24
|
+
...rest
|
|
25
|
+
} = Astro.props
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
<Root
|
|
29
|
+
class:list="heading"
|
|
30
|
+
{as}
|
|
31
|
+
{contrast}
|
|
32
|
+
{color}
|
|
33
|
+
{level}
|
|
34
|
+
{...rest}
|
|
35
|
+
>
|
|
36
|
+
<slot>
|
|
37
|
+
<Fragment set:html={html} />
|
|
38
|
+
<Fragment set:text={text} />
|
|
39
|
+
</slot>
|
|
40
|
+
</Root>
|
|
41
|
+
|
|
42
|
+
<style is:global lang="scss">
|
|
43
|
+
.heading {
|
|
44
|
+
margin: 0;
|
|
45
|
+
max-width: calc(var(--space-4) * 44);
|
|
46
|
+
scroll-margin: var(--space-5);
|
|
47
|
+
color: var(--color-11);
|
|
48
|
+
font-weight: var(--heading-font-weight);
|
|
49
|
+
font-weight: 700;
|
|
50
|
+
line-height: 1.1;
|
|
51
|
+
font-family: var(--heading-font-family);
|
|
52
|
+
letter-spacing: -0.025em;
|
|
53
|
+
text-decoration: none;
|
|
54
|
+
|
|
55
|
+
&.level-1 {
|
|
56
|
+
font-size: var(--text-8);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.level-2 {
|
|
60
|
+
font-size: var(--text-7);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.level-3 {
|
|
64
|
+
font-size: var(--text-6);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.level-4 {
|
|
68
|
+
font-size: var(--text-5);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.level-5 {
|
|
72
|
+
font-size: var(--text-4);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&.level-6 {
|
|
76
|
+
font-size: var(--text-3);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import tablerIcons from '@iconify-json/tabler/icons.json'
|
|
3
3
|
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
4
|
-
import
|
|
4
|
+
import Root from 'fulldev-ui/components/Root.astro'
|
|
5
5
|
|
|
6
6
|
type Props<As extends HTMLTag = 'i'> = Polymorphic<{ as: As }> & {
|
|
7
7
|
name?: string
|
|
@@ -16,8 +16,8 @@ const icon = trimmedName
|
|
|
16
16
|
: undefined
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
<
|
|
20
|
-
class:list=
|
|
19
|
+
<Root
|
|
20
|
+
class:list="icon"
|
|
21
21
|
if={icon}
|
|
22
22
|
{as}
|
|
23
23
|
{...rest}
|
|
@@ -31,20 +31,18 @@ const icon = trimmedName
|
|
|
31
31
|
/>
|
|
32
32
|
)
|
|
33
33
|
}
|
|
34
|
-
</
|
|
34
|
+
</Root>
|
|
35
35
|
|
|
36
36
|
<style is:global lang="scss">
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
@include component('icon') {
|
|
37
|
+
.icon {
|
|
40
38
|
display: inline-flex;
|
|
41
39
|
position: relative;
|
|
42
40
|
justify-content: center;
|
|
43
41
|
align-items: center;
|
|
44
42
|
width: 1em;
|
|
45
43
|
height: 1em;
|
|
46
|
-
color: var(--
|
|
47
|
-
font-size:
|
|
44
|
+
color: var(--color-11);
|
|
45
|
+
font-size: inherit;
|
|
48
46
|
|
|
49
47
|
svg {
|
|
50
48
|
position: absolute;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from 'astro/types'
|
|
3
3
|
import { Image as AstroImage } from 'astro:assets'
|
|
4
|
+
import Root from 'fulldev-ui/components/Root.astro'
|
|
4
5
|
import { isString } from 'remeda'
|
|
5
|
-
import Component from '../_Component.astro'
|
|
6
6
|
|
|
7
7
|
type Props = HTMLAttributes<'img'> & {
|
|
8
8
|
position?: 'background' | 'cover' | 'inset'
|
|
@@ -33,14 +33,18 @@ const {
|
|
|
33
33
|
height,
|
|
34
34
|
...rest
|
|
35
35
|
} = Astro.props
|
|
36
|
+
|
|
37
|
+
// TODO get alt from image collection with yaml files
|
|
38
|
+
// const imageEntry =
|
|
39
|
+
// src && (await getEntry('images', src?.replace('/images/', '')))
|
|
36
40
|
---
|
|
37
41
|
|
|
38
42
|
{
|
|
39
43
|
src && (
|
|
40
44
|
<>
|
|
41
45
|
{!width && !height && (
|
|
42
|
-
<
|
|
43
|
-
class:list=
|
|
46
|
+
<Root
|
|
47
|
+
class:list="image"
|
|
44
48
|
if={src}
|
|
45
49
|
{src}
|
|
46
50
|
{alt}
|
|
@@ -53,7 +57,7 @@ const {
|
|
|
53
57
|
)}
|
|
54
58
|
{width && height && (
|
|
55
59
|
<AstroImage
|
|
56
|
-
class:list=
|
|
60
|
+
class:list="image"
|
|
57
61
|
{src}
|
|
58
62
|
{alt}
|
|
59
63
|
width={width}
|
|
@@ -67,9 +71,7 @@ const {
|
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
<style is:global lang="scss">
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
@include component('image') {
|
|
74
|
+
.image {
|
|
73
75
|
display: block;
|
|
74
76
|
width: 100%;
|
|
75
77
|
height: auto;
|
|
@@ -111,10 +113,10 @@ const {
|
|
|
111
113
|
margin: 0 !important;
|
|
112
114
|
border-radius: 0;
|
|
113
115
|
width: 100%;
|
|
116
|
+
max-width: none;
|
|
114
117
|
height: 100%;
|
|
115
118
|
max-height: 100%;
|
|
116
119
|
object-fit: cover;
|
|
117
|
-
max-width: none;
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
&.position-cover {
|
|
@@ -131,55 +133,55 @@ const {
|
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
&.position-inset {
|
|
134
|
-
object-fit: cover;
|
|
135
136
|
max-width: none;
|
|
137
|
+
object-fit: cover;
|
|
136
138
|
|
|
137
139
|
&:is(.structure-column > &) {
|
|
138
|
-
margin-right: calc(var(--
|
|
139
|
-
margin-left: calc(var(--
|
|
140
|
-
width: calc(100% + var(--
|
|
140
|
+
margin-right: calc(var(--inset-right) * -1);
|
|
141
|
+
margin-left: calc(var(--inset-left) * -1);
|
|
142
|
+
width: calc(100% + var(--inset-left) + var(--inset-right));
|
|
141
143
|
|
|
142
144
|
&.image:first-child {
|
|
143
|
-
margin-top: calc(var(--
|
|
144
|
-
height: calc(100% + var(--
|
|
145
|
+
margin-top: calc(var(--inset-top) * -1);
|
|
146
|
+
height: calc(100% + var(--inset-top) * 1);
|
|
145
147
|
}
|
|
146
148
|
|
|
147
149
|
&.image:last-child {
|
|
148
|
-
margin-bottom: calc(var(--
|
|
149
|
-
height: calc(100% + var(--
|
|
150
|
+
margin-bottom: calc(var(--inset-bottom) * -1);
|
|
151
|
+
height: calc(100% + var(--inset-bottom) * 1);
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
154
|
|
|
153
155
|
&:is(.structure-split > &) {
|
|
154
156
|
@media (max-width: 1023.999px) {
|
|
155
|
-
margin-right: calc(var(--
|
|
156
|
-
margin-left: calc(var(--
|
|
157
|
-
width: calc(100% + var(--
|
|
157
|
+
margin-right: calc(var(--inset-right) * -1);
|
|
158
|
+
margin-left: calc(var(--inset-left) * -1);
|
|
159
|
+
width: calc(100% + var(--inset-left) + var(--inset-right));
|
|
158
160
|
|
|
159
161
|
&.image:first-child {
|
|
160
|
-
margin-top: calc(var(--
|
|
161
|
-
height: calc(100% + var(--
|
|
162
|
+
margin-top: calc(var(--inset-top) * -1);
|
|
163
|
+
height: calc(100% + var(--inset-top) * 1);
|
|
162
164
|
}
|
|
163
165
|
|
|
164
166
|
&.image:last-child {
|
|
165
|
-
margin-bottom: calc(var(--
|
|
166
|
-
height: calc(100% + var(--
|
|
167
|
+
margin-bottom: calc(var(--inset-bottom) * -1);
|
|
168
|
+
height: calc(100% + var(--inset-bottom) * 1);
|
|
167
169
|
}
|
|
168
170
|
}
|
|
169
171
|
|
|
170
172
|
@media (min-width: 1024px) {
|
|
171
|
-
margin-top: calc(var(--
|
|
172
|
-
margin-bottom: calc(var(--
|
|
173
|
-
height: calc(100% + var(--
|
|
173
|
+
margin-top: calc(var(--inset-top) * -1);
|
|
174
|
+
margin-bottom: calc(var(--inset-bottom) * -1);
|
|
175
|
+
height: calc(100% + var(--inset-top) * 1 + var(--inset-bottom) * 1);
|
|
174
176
|
|
|
175
177
|
&.image:first-child {
|
|
176
|
-
margin-left: calc(var(--
|
|
177
|
-
width: calc(100% + var(--
|
|
178
|
+
margin-left: calc(var(--inset-left) * -1);
|
|
179
|
+
width: calc(100% + var(--inset-left) * 1);
|
|
178
180
|
}
|
|
179
181
|
|
|
180
182
|
&.image:last-child {
|
|
181
|
-
margin-right: calc(var(--
|
|
182
|
-
width: calc(100% + var(--
|
|
183
|
+
margin-right: calc(var(--inset-right) * -1);
|
|
184
|
+
width: calc(100% + var(--inset-right) * 1);
|
|
183
185
|
}
|
|
184
186
|
}
|
|
185
187
|
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
+
import Icon from 'fulldev-ui/components/Icon.astro'
|
|
4
|
+
import Label from 'fulldev-ui/components/Label.astro'
|
|
5
|
+
import Root from 'fulldev-ui/components/Root.astro'
|
|
6
|
+
|
|
7
|
+
type Props = HTMLAttributes<'input'> & {
|
|
8
|
+
variant?: 'outline'
|
|
9
|
+
color?: 'base' | 'brand'
|
|
10
|
+
label?: string
|
|
11
|
+
icon?: string
|
|
12
|
+
radius?: 'none' | 'auto' | 'full'
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const {
|
|
16
|
+
variant = 'outline',
|
|
17
|
+
label,
|
|
18
|
+
icon,
|
|
19
|
+
value,
|
|
20
|
+
disabled,
|
|
21
|
+
required,
|
|
22
|
+
radius = 'auto',
|
|
23
|
+
placeholder,
|
|
24
|
+
name = placeholder,
|
|
25
|
+
type = 'text',
|
|
26
|
+
...rest
|
|
27
|
+
} = Astro.props
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
<Root
|
|
31
|
+
class:list="input"
|
|
32
|
+
{...rest}
|
|
33
|
+
>
|
|
34
|
+
<Label
|
|
35
|
+
for={name}
|
|
36
|
+
html={label}
|
|
37
|
+
/>
|
|
38
|
+
<Root
|
|
39
|
+
as="input"
|
|
40
|
+
if={name}
|
|
41
|
+
id={name}
|
|
42
|
+
{name}
|
|
43
|
+
{variant}
|
|
44
|
+
{placeholder}
|
|
45
|
+
{radius}
|
|
46
|
+
{type}
|
|
47
|
+
{value}
|
|
48
|
+
{disabled}
|
|
49
|
+
{required}
|
|
50
|
+
/>
|
|
51
|
+
<Icon name={icon} />
|
|
52
|
+
</Root>
|
|
53
|
+
|
|
54
|
+
<style is:global lang="scss">
|
|
55
|
+
.input {
|
|
56
|
+
display: flex;
|
|
57
|
+
position: relative;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
gap: var(--space-1);
|
|
60
|
+
width: 100%;
|
|
61
|
+
|
|
62
|
+
.icon {
|
|
63
|
+
position: absolute;
|
|
64
|
+
right: var(--space-4);
|
|
65
|
+
bottom: var(--space-4);
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
input {
|
|
70
|
+
display: flex;
|
|
71
|
+
position: relative;
|
|
72
|
+
align-items: center;
|
|
73
|
+
outline: none;
|
|
74
|
+
border: 1px solid var(--color-6);
|
|
75
|
+
border-radius: var(--radius-1);
|
|
76
|
+
background-color: transparent;
|
|
77
|
+
padding: var(--space-4);
|
|
78
|
+
padding-right: calc(var(--text-2) + 2 * var(--space-4));
|
|
79
|
+
width: 100%;
|
|
80
|
+
min-width: var(--space-4);
|
|
81
|
+
height: calc(var(--text-2) + 2 * var(--space-4));
|
|
82
|
+
color: var(--text);
|
|
83
|
+
font-size: var(--text-2);
|
|
84
|
+
line-height: 1.25;
|
|
85
|
+
|
|
86
|
+
&.radius-none {
|
|
87
|
+
border-radius: 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.radius-auto {
|
|
91
|
+
border-radius: var(--radius-1);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&.radius-full {
|
|
95
|
+
border-radius: 9999px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&::placeholder {
|
|
99
|
+
color: var(--color-11);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:hover {
|
|
103
|
+
outline: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:focus {
|
|
107
|
+
outline: none;
|
|
108
|
+
box-shadow: inset 0 0 0 2px var(--color-7);
|
|
109
|
+
border-color: var(--color-7);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:disabled {
|
|
113
|
+
opacity: 50%;
|
|
114
|
+
cursor: not-allowed;
|
|
115
|
+
pointer-events: none;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
-
import
|
|
3
|
+
import Root from 'fulldev-ui/components/Root.astro'
|
|
4
4
|
|
|
5
5
|
type Props<As extends HTMLTag = 'label'> = Polymorphic<{ as: As }> & {
|
|
6
6
|
size?: 'sm' | 'md' | 'lg'
|
|
@@ -10,26 +10,26 @@ type Props<As extends HTMLTag = 'label'> = Polymorphic<{ as: As }> & {
|
|
|
10
10
|
text?: string
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const { as = 'label', ...rest } = Astro.props
|
|
13
|
+
const { as = 'label', html, text, ...rest } = Astro.props
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
<
|
|
17
|
-
class:list=
|
|
16
|
+
<Root
|
|
17
|
+
class:list="label"
|
|
18
18
|
{as}
|
|
19
19
|
{...rest}
|
|
20
20
|
>
|
|
21
|
-
<slot
|
|
22
|
-
|
|
21
|
+
<slot>
|
|
22
|
+
<Fragment set:html={html} />
|
|
23
|
+
<Fragment set:text={text} />
|
|
24
|
+
</slot>
|
|
25
|
+
</Root>
|
|
23
26
|
|
|
24
27
|
<style is:global lang="scss">
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
@include component('label') {
|
|
28
|
+
.label {
|
|
28
29
|
display: flex;
|
|
29
30
|
flex-direction: column;
|
|
30
|
-
color: var(--
|
|
31
|
-
font-
|
|
32
|
-
font-size: var(--text-1);
|
|
31
|
+
color: var(--color-11);
|
|
32
|
+
font-size: var(--text-2);
|
|
33
33
|
line-height: 1;
|
|
34
34
|
font-family: var(--font-family);
|
|
35
35
|
text-align: left;
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
-
import
|
|
3
|
+
import Root from 'fulldev-ui/components/Root.astro'
|
|
4
4
|
|
|
5
5
|
type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> & {
|
|
6
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
7
|
-
color?: 'base' | 'brand'
|
|
8
6
|
underline?: 'auto' | 'always' | 'hover' | 'none'
|
|
7
|
+
size?: 'sm' | 'md' | 'lg'
|
|
8
|
+
color?: 'base' | 'brand'
|
|
9
9
|
contrast?: boolean
|
|
10
10
|
html?: string
|
|
11
11
|
text?: string
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const { as = 'a', underline = 'auto', ...rest } = Astro.props
|
|
14
|
+
const { html, text, as = 'a', underline = 'auto', ...rest } = Astro.props
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
<
|
|
18
|
-
class:list=
|
|
17
|
+
<Root
|
|
18
|
+
class:list="link"
|
|
19
19
|
{as}
|
|
20
20
|
{underline}
|
|
21
21
|
{...rest}
|
|
22
22
|
>
|
|
23
|
-
<slot
|
|
24
|
-
|
|
23
|
+
<slot>
|
|
24
|
+
<Fragment set:text={text} />
|
|
25
|
+
<Fragment set:html={html} />
|
|
26
|
+
</slot>
|
|
27
|
+
</Root>
|
|
25
28
|
|
|
26
29
|
<style is:global lang="scss">
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
@include component('link') {
|
|
30
|
+
.link {
|
|
30
31
|
display: inline-flex;
|
|
31
32
|
flex-wrap: wrap;
|
|
32
33
|
align-items: center;
|
|
@@ -34,9 +35,9 @@ const { as = 'a', underline = 'auto', ...rest } = Astro.props
|
|
|
34
35
|
cursor: pointer;
|
|
35
36
|
border: none;
|
|
36
37
|
background: none;
|
|
37
|
-
color: var(--
|
|
38
|
+
color: var(--color-11);
|
|
38
39
|
font-weight: var(--font-weight);
|
|
39
|
-
font-size: var(--text-
|
|
40
|
+
font-size: var(--text-3);
|
|
40
41
|
font-family: var(--font-family);
|
|
41
42
|
text-decoration-color: var(--border); // FIXME, werkt niet
|
|
42
43
|
white-space: nowrap;
|
|
@@ -59,6 +60,7 @@ const { as = 'a', underline = 'auto', ...rest } = Astro.props
|
|
|
59
60
|
|
|
60
61
|
&.underline-hover {
|
|
61
62
|
text-decoration: none;
|
|
63
|
+
|
|
62
64
|
&:hover {
|
|
63
65
|
text-decoration: underline;
|
|
64
66
|
}
|