fulldev-ui 0.3.36 → 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} +14 -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} +7 -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 -17
- 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,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Root from 'fulldev-ui/components/Root.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'ul'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
size?: 'sm' | 'md' | 'lg'
|
|
7
|
+
color?: 'base' | 'brand'
|
|
8
|
+
contrast?: boolean
|
|
9
|
+
items?: (string | { text: string })[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { as = 'ul', items, ...rest } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<Root
|
|
16
|
+
class:list="list"
|
|
17
|
+
{as}
|
|
18
|
+
{...rest}
|
|
19
|
+
>
|
|
20
|
+
{items?.map((item) => <li>{typeof item === 'string' ? item : item.text}</li>)}
|
|
21
|
+
</Root>
|
|
22
|
+
|
|
23
|
+
<style is:global lang="scss">
|
|
24
|
+
.list {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
padding-left: var(--space-5);
|
|
28
|
+
color: var(--color-11);
|
|
29
|
+
font-size: var(--text-2);
|
|
30
|
+
line-height: 1.625;
|
|
31
|
+
list-style-type: disc;
|
|
32
|
+
|
|
33
|
+
li {
|
|
34
|
+
align-items: center;
|
|
35
|
+
max-width: calc(var(--space-4) * 44);
|
|
36
|
+
color: var(--color-11);
|
|
37
|
+
font-size: var(--text-2);
|
|
38
|
+
line-height: 1.625;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
@@ -1,28 +1,25 @@
|
|
|
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 = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
6
|
color?: 'base' | 'brand'
|
|
7
|
-
size?: '
|
|
8
|
-
compact?: boolean
|
|
7
|
+
size?: 'sm' | 'md' | 'lg'
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
const { ...rest } = Astro.props
|
|
12
11
|
---
|
|
13
12
|
|
|
14
|
-
<
|
|
15
|
-
class:list=
|
|
13
|
+
<Root
|
|
14
|
+
class:list="masonry"
|
|
16
15
|
{...rest}
|
|
17
16
|
>
|
|
18
17
|
<slot />
|
|
19
|
-
</
|
|
18
|
+
</Root>
|
|
20
19
|
|
|
21
20
|
<style is:global lang="scss">
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
@include component('masonry') {
|
|
25
|
-
--column-width: calc(16 * var(--space-4));
|
|
21
|
+
.masonry {
|
|
22
|
+
--column-width: calc(21 * var(--space-4));
|
|
26
23
|
--gap: var(--space-4);
|
|
27
24
|
|
|
28
25
|
position: relative;
|
|
@@ -33,7 +30,8 @@ const { ...rest } = Astro.props
|
|
|
33
30
|
break-inside: avoid;
|
|
34
31
|
width: 100%;
|
|
35
32
|
|
|
36
|
-
& > .
|
|
33
|
+
& > .root + .root,
|
|
34
|
+
& > * + * {
|
|
37
35
|
break-inside: avoid;
|
|
38
36
|
margin-top: var(--gap);
|
|
39
37
|
margin-bottom: var(--gap);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
+
import Icon from 'fulldev-ui/components/Icon.astro'
|
|
4
|
+
import Root from 'fulldev-ui/components/Root.astro'
|
|
5
|
+
import Avatar from './Avatar.astro'
|
|
6
|
+
import Column from './Column.astro'
|
|
7
|
+
import Label from './Label.astro'
|
|
8
|
+
|
|
9
|
+
type Props = HTMLAttributes<'div'> & {
|
|
10
|
+
color?: 'base' | 'brand'
|
|
11
|
+
value?: number
|
|
12
|
+
size?: string
|
|
13
|
+
label?: string
|
|
14
|
+
avatars?: string[]
|
|
15
|
+
avatar?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const { value, label, avatars, avatar, ...rest } = Astro.props
|
|
19
|
+
|
|
20
|
+
const getIcon = (count: number) => {
|
|
21
|
+
if (!value) return
|
|
22
|
+
const difference = value - count
|
|
23
|
+
if (difference >= -0.25) return 'star-filled'
|
|
24
|
+
if (difference >= -0.75) return 'star-half-filled'
|
|
25
|
+
return 'star'
|
|
26
|
+
}
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
<Root
|
|
30
|
+
class:list="rating"
|
|
31
|
+
{...rest}
|
|
32
|
+
>
|
|
33
|
+
{
|
|
34
|
+
[avatar, ...(avatars ?? [])]?.filter(Boolean)?.map((avatar) => (
|
|
35
|
+
<Avatar
|
|
36
|
+
radius="full"
|
|
37
|
+
src={avatar}
|
|
38
|
+
/>
|
|
39
|
+
))
|
|
40
|
+
}
|
|
41
|
+
<Column>
|
|
42
|
+
<Root
|
|
43
|
+
class:list={'stars'}
|
|
44
|
+
{...rest}
|
|
45
|
+
>
|
|
46
|
+
{
|
|
47
|
+
value &&
|
|
48
|
+
[1, 2, 3, 4, 5].map((_, i) => (
|
|
49
|
+
<Icon
|
|
50
|
+
name={getIcon(i + 1)}
|
|
51
|
+
class:list={'rating-icon-solid'}
|
|
52
|
+
/>
|
|
53
|
+
))
|
|
54
|
+
}
|
|
55
|
+
</Root>
|
|
56
|
+
<Label
|
|
57
|
+
color="base"
|
|
58
|
+
html={label}
|
|
59
|
+
/>
|
|
60
|
+
</Column>
|
|
61
|
+
</Root>
|
|
62
|
+
|
|
63
|
+
<style is:global lang="scss">
|
|
64
|
+
.rating {
|
|
65
|
+
display: flex;
|
|
66
|
+
gap: var(--space-4);
|
|
67
|
+
|
|
68
|
+
.avatar + .avatar {
|
|
69
|
+
margin-left: calc(var(--space-4) * -2.5);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.label {
|
|
73
|
+
margin-top: var(--space-2) !important;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.stars {
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: var(--space-2);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
@@ -5,17 +5,14 @@ type Props<As extends HTMLTag> = {
|
|
|
5
5
|
as?: As
|
|
6
6
|
slot?: any
|
|
7
7
|
if?: 'content' | any
|
|
8
|
-
wrapper?: any
|
|
9
8
|
[key: string | number | symbol]: any
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
const {
|
|
13
12
|
as: As = 'div',
|
|
14
13
|
if: ifProp = 'content',
|
|
15
|
-
wrapper = true,
|
|
16
14
|
space,
|
|
17
15
|
theme,
|
|
18
|
-
compact,
|
|
19
16
|
variant,
|
|
20
17
|
underline,
|
|
21
18
|
density,
|
|
@@ -33,6 +30,8 @@ const {
|
|
|
33
30
|
radius,
|
|
34
31
|
level,
|
|
35
32
|
mask,
|
|
33
|
+
reverse,
|
|
34
|
+
lead,
|
|
36
35
|
...rest
|
|
37
36
|
} = Astro.props
|
|
38
37
|
|
|
@@ -49,15 +48,14 @@ const render =
|
|
|
49
48
|
render && (
|
|
50
49
|
<As
|
|
51
50
|
class:list={[
|
|
52
|
-
'
|
|
51
|
+
'root',
|
|
53
52
|
structure,
|
|
54
53
|
{
|
|
55
|
-
|
|
54
|
+
lead,
|
|
56
55
|
contrast,
|
|
57
56
|
[`theme-${theme}`]: theme,
|
|
58
57
|
[`level-${level}`]: level,
|
|
59
58
|
[`variant-${variant}`]: variant,
|
|
60
|
-
[`density-${density}`]: density,
|
|
61
59
|
[`structure-${structure}`]: structure,
|
|
62
60
|
[`size-${size}`]: size,
|
|
63
61
|
[`align-${align}`]: align,
|
|
@@ -70,25 +68,23 @@ const render =
|
|
|
70
68
|
[`radius-${radius}`]: radius,
|
|
71
69
|
[`mask-${mask}`]: mask,
|
|
72
70
|
[`space-${space}`]: space,
|
|
71
|
+
[`reverse-${reverse}`]: reverse,
|
|
73
72
|
},
|
|
74
73
|
]}
|
|
75
74
|
{...rest}
|
|
76
75
|
>
|
|
77
76
|
<Fragment set:html={slot} />
|
|
78
|
-
<Fragment set:text={text} />
|
|
79
|
-
<Fragment set:html={html} />
|
|
80
77
|
</As>
|
|
81
78
|
)
|
|
82
79
|
}
|
|
83
80
|
|
|
84
81
|
<style is:global lang="scss">
|
|
85
|
-
@import '../css/utils.scss';
|
|
86
82
|
@import '../css/color.css';
|
|
87
83
|
@import '../css/styles.css';
|
|
88
|
-
@import '../css/size.
|
|
84
|
+
@import '../css/size.css';
|
|
89
85
|
@import '../css/space.css';
|
|
90
86
|
|
|
91
|
-
|
|
87
|
+
.root {
|
|
92
88
|
z-index: 1;
|
|
93
89
|
box-sizing: border-box;
|
|
94
90
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
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 = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
6
|
color?: 'base' | 'brand'
|
|
7
|
-
size?: '
|
|
8
|
-
compact?: boolean
|
|
7
|
+
size?: 'sm' | 'md' | 'lg'
|
|
9
8
|
align?: 'start' | 'center' | 'end'
|
|
10
9
|
space?: 'none' | 'auto'
|
|
11
10
|
}
|
|
@@ -13,19 +12,17 @@ type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
|
13
12
|
const { space = 'auto', align = 'center', ...rest } = Astro.props
|
|
14
13
|
---
|
|
15
14
|
|
|
16
|
-
<
|
|
17
|
-
class:list=
|
|
15
|
+
<Root
|
|
16
|
+
class:list="row"
|
|
18
17
|
{align}
|
|
19
18
|
{space}
|
|
20
19
|
{...rest}
|
|
21
20
|
>
|
|
22
21
|
<slot />
|
|
23
|
-
</
|
|
22
|
+
</Root>
|
|
24
23
|
|
|
25
24
|
<style is:global lang="scss">
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
@include component('row') {
|
|
25
|
+
.row {
|
|
29
26
|
display: flex;
|
|
30
27
|
|
|
31
28
|
&.align-start {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
import Pagefind from 'astro-pagefind/components/Search'
|
|
3
|
+
import Dialog from './Dialog.astro'
|
|
4
|
+
|
|
5
|
+
const { variant = 'secondary', icon, ...rest } = Astro.props
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<Dialog
|
|
9
|
+
class:list="search"
|
|
10
|
+
id="search"
|
|
11
|
+
{variant}
|
|
12
|
+
{icon}
|
|
13
|
+
{...rest}
|
|
14
|
+
>
|
|
15
|
+
<Pagefind uiOptions={{ showImages: false }} />
|
|
16
|
+
</Dialog>
|
|
17
|
+
|
|
18
|
+
<style is:global lang="scss">
|
|
19
|
+
:root {
|
|
20
|
+
--pagefind-ui-primary: var(--brand-11);
|
|
21
|
+
--pagefind-ui-text: var(--base-12);
|
|
22
|
+
--pagefind-ui-background: var(--base-2);
|
|
23
|
+
--pagefind-ui-border: var(--base-6);
|
|
24
|
+
--pagefind-ui-tag: var(--base-6);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@media (max-width: 123.9999) {
|
|
28
|
+
.search,
|
|
29
|
+
#search,
|
|
30
|
+
#search-button {
|
|
31
|
+
display: none !important;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dialog div {
|
|
36
|
+
width: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.pagefind-ui__search-input {
|
|
40
|
+
outline: none !important;
|
|
41
|
+
border: 1px solid var(--base-7);
|
|
42
|
+
color: var(--base-11);
|
|
43
|
+
|
|
44
|
+
&::placeholder {
|
|
45
|
+
color: var(--base-11);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:hover {
|
|
49
|
+
outline: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:focus {
|
|
53
|
+
outline: none;
|
|
54
|
+
box-shadow: inset 0 0 0 2px var(--base-8);
|
|
55
|
+
border-color: var(--base-8);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.pagefind-ui__search-clear {
|
|
60
|
+
background: transparent !important;
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import type { CollectionEntry } from 'astro:content'
|
|
4
|
+
import Badge from 'fulldev-ui/components/Badge.astro'
|
|
5
|
+
import Box from 'fulldev-ui/components/Box.astro'
|
|
6
|
+
import Button from 'fulldev-ui/components/Button.astro'
|
|
7
|
+
import Card from 'fulldev-ui/components/Card.astro'
|
|
8
|
+
import Column from 'fulldev-ui/components/Column.astro'
|
|
9
|
+
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
10
|
+
import Image from 'fulldev-ui/components/Image.astro'
|
|
11
|
+
import List from 'fulldev-ui/components/List.astro'
|
|
12
|
+
import Rating from 'fulldev-ui/components/Rating.astro'
|
|
13
|
+
import Root from 'fulldev-ui/components/Root.astro'
|
|
14
|
+
import Text from 'fulldev-ui/components/Text.astro'
|
|
15
|
+
import Wrap from 'fulldev-ui/components/Wrap.astro'
|
|
16
|
+
import Tagline from './Tagline.astro'
|
|
17
|
+
|
|
18
|
+
type Props<As extends HTMLTag = 'section'> = Polymorphic<{ as: As }> & {
|
|
19
|
+
position?: 'background' | 'cover' | 'inset'
|
|
20
|
+
ratio?: 'landscape' | 'portrait' | 'square' | number
|
|
21
|
+
mask?: 'sm' | 'md' | 'lg'
|
|
22
|
+
buttons?: ComponentProps<typeof Button<'a'>>[]
|
|
23
|
+
button?: ComponentProps<typeof Button<'a'>>
|
|
24
|
+
cards?: ComponentProps<typeof Card<'a'>>[]
|
|
25
|
+
badge?: string | ComponentProps<typeof Badge<'a'>>
|
|
26
|
+
image?: ComponentProps<typeof Image>['src']
|
|
27
|
+
rating?: number
|
|
28
|
+
pages?: CollectionEntry<'pages'>['data'][]
|
|
29
|
+
records?: CollectionEntry<'records'>['data'][]
|
|
30
|
+
heading?: string
|
|
31
|
+
title?: string
|
|
32
|
+
text?: string
|
|
33
|
+
html?: string
|
|
34
|
+
description?: string
|
|
35
|
+
label?: string
|
|
36
|
+
tagline?: string
|
|
37
|
+
list?: string[]
|
|
38
|
+
theme?: 'light' | 'dark'
|
|
39
|
+
color?: 'base' | 'brand'
|
|
40
|
+
size?: 'sm' | 'md' | 'lg'
|
|
41
|
+
frame?: 'none' | 'fill' | 'panel'
|
|
42
|
+
align?: 'start' | 'center' | 'end'
|
|
43
|
+
justify?: 'start' | 'center' | 'end'
|
|
44
|
+
structure?: 'column' | 'split' | 'spread' | 'carousel' | 'grid' | 'masonry'
|
|
45
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6
|
|
46
|
+
space?: 'auto' | 'none'
|
|
47
|
+
reverse?: 'odd' | 'even'
|
|
48
|
+
variant?: 'primary' | 'secondary' | 'tertiary'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const {
|
|
52
|
+
as = 'section',
|
|
53
|
+
space = 'auto',
|
|
54
|
+
frame = 'none',
|
|
55
|
+
structure = 'column',
|
|
56
|
+
variant = 'secondary',
|
|
57
|
+
align = 'start',
|
|
58
|
+
level = 2,
|
|
59
|
+
position,
|
|
60
|
+
label,
|
|
61
|
+
heading,
|
|
62
|
+
badge,
|
|
63
|
+
title,
|
|
64
|
+
text,
|
|
65
|
+
list,
|
|
66
|
+
html,
|
|
67
|
+
tagline,
|
|
68
|
+
description,
|
|
69
|
+
buttons,
|
|
70
|
+
image,
|
|
71
|
+
rating,
|
|
72
|
+
size,
|
|
73
|
+
button,
|
|
74
|
+
cards,
|
|
75
|
+
pages,
|
|
76
|
+
records,
|
|
77
|
+
mask,
|
|
78
|
+
ratio,
|
|
79
|
+
...rest
|
|
80
|
+
} = Astro.props
|
|
81
|
+
|
|
82
|
+
const mergedCards = (pages || records || cards)?.filter(Boolean)
|
|
83
|
+
const hasCards = mergedCards && mergedCards?.length > 0
|
|
84
|
+
|
|
85
|
+
const buttonVariant = (i: number) => {
|
|
86
|
+
if (variant === 'primary' && i === 0) return 'primary'
|
|
87
|
+
else if (variant === 'primary' && i === 1) return 'secondary'
|
|
88
|
+
else if (variant === 'primary' && i > 1) return 'tertiary'
|
|
89
|
+
else if (variant === 'secondary' && i === 0) return 'secondary'
|
|
90
|
+
else if (variant === 'secondary' && i > 0) return 'tertiary'
|
|
91
|
+
else if (variant === 'tertiary') return 'tertiary'
|
|
92
|
+
}
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
<Root
|
|
96
|
+
class:list="section"
|
|
97
|
+
variant={hasCards ? undefined : variant}
|
|
98
|
+
structure={structure === 'split' ? 'split' : 'column'}
|
|
99
|
+
frame={frame === 'panel' && hasCards ? 'none' : frame}
|
|
100
|
+
{as}
|
|
101
|
+
{align}
|
|
102
|
+
{space}
|
|
103
|
+
{size}
|
|
104
|
+
{...rest}
|
|
105
|
+
>
|
|
106
|
+
<Box
|
|
107
|
+
structure={structure === 'spread' || structure === 'carousel'
|
|
108
|
+
? 'spread'
|
|
109
|
+
: 'column'}
|
|
110
|
+
align={structure === 'split' ? 'start' : align}
|
|
111
|
+
>
|
|
112
|
+
<slot name="segment">
|
|
113
|
+
<Column
|
|
114
|
+
style={{ textWrap: 'balance' }}
|
|
115
|
+
align={structure === 'split' || structure === 'spread'
|
|
116
|
+
? 'start'
|
|
117
|
+
: align}
|
|
118
|
+
>
|
|
119
|
+
<slot name="writeup">
|
|
120
|
+
<Rating
|
|
121
|
+
color="brand"
|
|
122
|
+
{...typeof rating === 'number' ? { value: rating } : rating}
|
|
123
|
+
/>
|
|
124
|
+
<Badge
|
|
125
|
+
color="base"
|
|
126
|
+
radius="full"
|
|
127
|
+
{...typeof badge === 'string' ? { html: badge } : badge}
|
|
128
|
+
/>
|
|
129
|
+
<Tagline
|
|
130
|
+
color="brand"
|
|
131
|
+
html={tagline}
|
|
132
|
+
/>
|
|
133
|
+
<Heading
|
|
134
|
+
html={heading || title}
|
|
135
|
+
{level}
|
|
136
|
+
/>
|
|
137
|
+
<Text
|
|
138
|
+
contrast={!hasCards && position === 'background' && true}
|
|
139
|
+
html={html || text || description}
|
|
140
|
+
lead={level === 1}
|
|
141
|
+
/>
|
|
142
|
+
<List items={list} />
|
|
143
|
+
</slot>
|
|
144
|
+
</Column>
|
|
145
|
+
<Wrap>
|
|
146
|
+
<slot name="actions">
|
|
147
|
+
{
|
|
148
|
+
[button, ...(buttons ?? [])]
|
|
149
|
+
.filter(Boolean)
|
|
150
|
+
?.map((button: any, i: number) => (
|
|
151
|
+
<Button
|
|
152
|
+
variant={buttonVariant(i)}
|
|
153
|
+
{...button}
|
|
154
|
+
/>
|
|
155
|
+
))
|
|
156
|
+
}
|
|
157
|
+
</slot>
|
|
158
|
+
</Wrap>
|
|
159
|
+
</slot>
|
|
160
|
+
</Box>
|
|
161
|
+
<slot>
|
|
162
|
+
<Box
|
|
163
|
+
structure={structure === 'split' || structure === 'spread'
|
|
164
|
+
? 'column'
|
|
165
|
+
: structure}
|
|
166
|
+
position={structure === 'carousel' ? 'inset' : undefined}
|
|
167
|
+
size={size === 'lg' ? 'md' : 'sm'}
|
|
168
|
+
>
|
|
169
|
+
<slot name="deck">
|
|
170
|
+
{
|
|
171
|
+
mergedCards?.map(({ ...rest }: any) => (
|
|
172
|
+
<Card
|
|
173
|
+
align="start"
|
|
174
|
+
level={Number(level) + 2}
|
|
175
|
+
{position}
|
|
176
|
+
{frame}
|
|
177
|
+
{variant}
|
|
178
|
+
{ratio}
|
|
179
|
+
{mask}
|
|
180
|
+
{...rest}
|
|
181
|
+
/>
|
|
182
|
+
))
|
|
183
|
+
}
|
|
184
|
+
</slot>
|
|
185
|
+
</Box>
|
|
186
|
+
<Image
|
|
187
|
+
position={hasCards ? undefined : position}
|
|
188
|
+
ratio={hasCards ? undefined : ratio}
|
|
189
|
+
mask={hasCards ? undefined : mask}
|
|
190
|
+
src={image}
|
|
191
|
+
/>
|
|
192
|
+
</slot>
|
|
193
|
+
</Root>
|
|
194
|
+
|
|
195
|
+
<style is:global lang="scss">
|
|
196
|
+
.section {
|
|
197
|
+
--inset-top: var(--space-7);
|
|
198
|
+
--inset-left: var(--gutter-left);
|
|
199
|
+
--inset-right: var(--gutter-right);
|
|
200
|
+
--inset-bottom: var(--space-7);
|
|
201
|
+
|
|
202
|
+
position: relative;
|
|
203
|
+
|
|
204
|
+
&:first-child {
|
|
205
|
+
--inset-top: var(--space-6);
|
|
206
|
+
--inset-bottom: var(--space-6);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&.frame-none {
|
|
210
|
+
padding: var(--inset-top) var(--inset-right) var(--inset-bottom)
|
|
211
|
+
var(--inset-left);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&.frame-fill {
|
|
215
|
+
background-color: var(--color-2);
|
|
216
|
+
padding: var(--inset-top) var(--inset-right) var(--inset-bottom)
|
|
217
|
+
var(--inset-left);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
&.frame-panel {
|
|
221
|
+
--inset-top: var(--space-6);
|
|
222
|
+
--inset-left: min(var(--gutter), var(--space-7));
|
|
223
|
+
--inset-right: min(var(--gutter), var(--space-7));
|
|
224
|
+
--inset-bottom: var(--space-6);
|
|
225
|
+
|
|
226
|
+
margin: var(--inset-top) var(--gutter-right) var(--inset-bottom)
|
|
227
|
+
var(--gutter-left);
|
|
228
|
+
border: 1px solid var(--base-a6);
|
|
229
|
+
border-radius: var(--radius-2);
|
|
230
|
+
background-color: var(--color-2);
|
|
231
|
+
padding: var(--inset-top) var(--inset-right) var(--inset-bottom)
|
|
232
|
+
var(--inset-left);
|
|
233
|
+
max-width: calc(
|
|
234
|
+
100vw - var(--sidebar-width) - var(--toc-width) - var(--inset-left) - var(
|
|
235
|
+
--inset-right
|
|
236
|
+
)
|
|
237
|
+
);
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
|
|
240
|
+
@media (min-width: 1024px) {
|
|
241
|
+
--inset-top: var(--space-7);
|
|
242
|
+
--inset-bottom: var(--space-7);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&.frame-viewport {
|
|
247
|
+
padding: var(--inset-top) var(--inset-right) var(--inset-bottom)
|
|
248
|
+
var(--inset-left);
|
|
249
|
+
min-height: 100vh;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
@media (min-width: 1024px) {
|
|
253
|
+
&:nth-of-type(odd).split.reverse-odd {
|
|
254
|
+
> :first-child {
|
|
255
|
+
order: 999;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
> :last-child {
|
|
259
|
+
order: 0;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
&:nth-of-type(even).split.reverse-even {
|
|
264
|
+
> :first-child {
|
|
265
|
+
order: 0;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
> :last-child {
|
|
269
|
+
order: 999;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
</style>
|