fulldev-ui 0.1.64
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/.astro/types.d.ts +156 -0
- package/README.md +29 -0
- package/astro.config.mjs +7 -0
- package/package.json +45 -0
- package/src/blocks/todo.md +12 -0
- package/src/components/_Block.astro +20 -0
- package/src/components/_Blocks.astro +26 -0
- package/src/components/_Children.astro +38 -0
- package/src/components/_Plural.astro +27 -0
- package/src/components/_Tag.astro +53 -0
- package/src/components/base/Badge.astro +53 -0
- package/src/components/base/Button.astro +85 -0
- package/src/components/base/Buttons.astro +15 -0
- package/src/components/base/Checkbox.astro +39 -0
- package/src/components/base/Icon.astro +46 -0
- package/src/components/base/Image.astro +123 -0
- package/src/components/base/Images.astro +15 -0
- package/src/components/base/Input.astro +52 -0
- package/src/components/base/Logo.astro +33 -0
- package/src/components/base/Radio.astro +38 -0
- package/src/components/base/Rating.astro +45 -0
- package/src/components/base/Select.astro +65 -0
- package/src/components/base/SelectOption.astro +27 -0
- package/src/components/base/Switch.astro +82 -0
- package/src/components/base/Textarea.astro +31 -0
- package/src/components/base/Video.astro +32 -0
- package/src/components/base/todo.md +8 -0
- package/src/components/typography/Heading.astro +41 -0
- package/src/components/typography/Label.astro +36 -0
- package/src/components/typography/Link.astro +38 -0
- package/src/components/typography/Links.astro +15 -0
- package/src/components/typography/List.astro +42 -0
- package/src/components/typography/ListItem.astro +30 -0
- package/src/components/typography/Paragraph.astro +38 -0
- package/src/components/typography/Tagline.astro +39 -0
- package/src/components/typography/_Typography.astro +28 -0
- package/src/components/typography/todo.md +15 -0
- package/src/components/utility/DecorativeBox.astro +22 -0
- package/src/components/utility/Head.astro +81 -0
- package/src/components/wrapper/Body.astro +32 -0
- package/src/components/wrapper/Card.astro +144 -0
- package/src/components/wrapper/Cards.astro +15 -0
- package/src/components/wrapper/Deck.astro +133 -0
- package/src/components/wrapper/Footer.astro +14 -0
- package/src/components/wrapper/Form.astro +26 -0
- package/src/components/wrapper/Group.astro +26 -0
- package/src/components/wrapper/Header.astro +76 -0
- package/src/components/wrapper/Main.astro +25 -0
- package/src/components/wrapper/Nav.astro +32 -0
- package/src/components/wrapper/Prose.astro +108 -0
- package/src/components/wrapper/Section.astro +110 -0
- package/src/components/wrapper/Sections.astro +15 -0
- package/src/components/wrapper/Writeup.astro +23 -0
- package/src/components/wrapper/_Wrapper.astro +333 -0
- package/src/components/wrapper/todo.md +20 -0
- package/src/content/pages/index.md +2 -0
- package/src/css/border.css +23 -0
- package/src/css/colors.css +328 -0
- package/src/css/font.css +15 -0
- package/src/css/main.css +4 -0
- package/src/css/reset.css +388 -0
- package/src/css/sizes.css +273 -0
- package/src/env.d.ts +2 -0
- package/src/index.ts +63 -0
- package/src/integration/integration.ts +61 -0
- package/src/layouts/Layout.astro +39 -0
- package/src/layouts/todo.md +2 -0
- package/src/schemas/attributesSchema.ts +125 -0
- package/src/schemas/htmlAttributesSchema.ts +126 -0
- package/src/schemas/pageSchema.ts +185 -0
- package/src/schemas/staticPageSchema.ts +124 -0
- package/src/types/Childmorphic.ts +8 -0
- package/src/types/Pluralmorphic.ts +7 -0
- package/src/utils/getAllCollections.ts +10 -0
- package/src/utils/getCollectionCascade.ts +33 -0
- package/src/utils/getPathname.ts +18 -0
- package/src/utils/transform/transform.ts +25 -0
- package/src/utils/transform/transformCasing.ts +24 -0
- package/src/utils/transform/transformReferences.ts +54 -0
- package/src/utils/transform/transformSelfs.ts +20 -0
- package/src/utils/transform/transformUnderscores.ts +19 -0
- package/tsconfig.json +6 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import { isObject } from 'radash'
|
|
4
|
+
import ListItem from './ListItem.astro'
|
|
5
|
+
import Typography from './_Typography.astro'
|
|
6
|
+
|
|
7
|
+
type Props<As extends HTMLTag = 'ul'> = Polymorphic<{ as: As }> &
|
|
8
|
+
ComponentProps<typeof Typography> & {
|
|
9
|
+
items?: (ComponentProps<typeof ListItem> | string)[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { as = 'ul', items, ...rest } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<Typography
|
|
16
|
+
class:list={['full-list']}
|
|
17
|
+
{as}
|
|
18
|
+
{...rest}
|
|
19
|
+
>
|
|
20
|
+
<slot name="before" />
|
|
21
|
+
{
|
|
22
|
+
items?.map((item) => {
|
|
23
|
+
if (isObject(item)) return <ListItem {...item} />
|
|
24
|
+
else return <ListItem html={item} />
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
<slot />
|
|
28
|
+
</Typography>
|
|
29
|
+
|
|
30
|
+
<style is:global lang="scss">
|
|
31
|
+
.full-list {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
padding-left: var(--space-4);
|
|
35
|
+
color: var(--foreground);
|
|
36
|
+
font-weight: var(--full-font-weight);
|
|
37
|
+
font-size: var(--text);
|
|
38
|
+
line-height: 1.625;
|
|
39
|
+
font-family: var(--full-font-family);
|
|
40
|
+
list-style-type: disc;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Typography from './_Typography.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'li'> = Polymorphic<{ as: As }> &
|
|
6
|
+
ComponentProps<typeof Typography>
|
|
7
|
+
|
|
8
|
+
const { as = 'li', ...rest } = Astro.props
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<Typography
|
|
12
|
+
class:list={['full-list-item']}
|
|
13
|
+
{as}
|
|
14
|
+
{...rest}
|
|
15
|
+
>
|
|
16
|
+
<slot name="before" />
|
|
17
|
+
<slot />
|
|
18
|
+
</Typography>
|
|
19
|
+
|
|
20
|
+
<style is:global lang="scss">
|
|
21
|
+
.full-item {
|
|
22
|
+
align-items: center;
|
|
23
|
+
max-width: calc(var(--space-element-3) * 36);
|
|
24
|
+
color: var(--foreground);
|
|
25
|
+
font-weight: var(--full-font-weight);
|
|
26
|
+
font-size: var(--text);
|
|
27
|
+
line-height: 1.625;
|
|
28
|
+
font-family: var(--full-font-family);
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Typography from './_Typography.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'p'> = Polymorphic<{ as: As }> &
|
|
6
|
+
ComponentProps<typeof Typography>
|
|
7
|
+
|
|
8
|
+
const { as = 'p', ...rest } = Astro.props
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<Typography
|
|
12
|
+
class:list={['full-paragraph']}
|
|
13
|
+
{as}
|
|
14
|
+
{...rest}
|
|
15
|
+
>
|
|
16
|
+
<slot name="before" />
|
|
17
|
+
<slot />
|
|
18
|
+
</Typography>
|
|
19
|
+
|
|
20
|
+
<style is:global lang="scss">
|
|
21
|
+
.full-paragraph {
|
|
22
|
+
max-width: calc(var(--space-element-3) * 36);
|
|
23
|
+
color: var(--foreground);
|
|
24
|
+
font-weight: var(--full-font-weight);
|
|
25
|
+
font-size: var(--text);
|
|
26
|
+
line-height: 1.625;
|
|
27
|
+
font-family: var(--full-font-family);
|
|
28
|
+
|
|
29
|
+
.full-tag + & {
|
|
30
|
+
--my-spacer: var(--space-5);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.full-heading + &,
|
|
34
|
+
.full-paragraph + & {
|
|
35
|
+
--my-spacer: var(--space-3);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Typography from './_Typography.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'span'> = Polymorphic<{ as: As }> &
|
|
6
|
+
ComponentProps<typeof Typography>
|
|
7
|
+
|
|
8
|
+
const { as = 'span', variant, ...rest } = Astro.props
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<Typography
|
|
12
|
+
class:list={['full-tagline']}
|
|
13
|
+
{as}
|
|
14
|
+
{variant}
|
|
15
|
+
{...rest}
|
|
16
|
+
>
|
|
17
|
+
<slot name="before" />
|
|
18
|
+
<slot />
|
|
19
|
+
</Typography>
|
|
20
|
+
|
|
21
|
+
<style is:global lang="scss">
|
|
22
|
+
.full-tagline {
|
|
23
|
+
max-width: calc(var(--space-element-3) * 36);
|
|
24
|
+
color: var(--foreground);
|
|
25
|
+
font-weight: var(--full-font-weight);
|
|
26
|
+
font-size: var(--text-element);
|
|
27
|
+
line-height: 1.25;
|
|
28
|
+
font-family: var(--full-font-family);
|
|
29
|
+
|
|
30
|
+
.full-tag + & {
|
|
31
|
+
--my-spacer: var(--space-5);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.full-heading + &,
|
|
35
|
+
.full-paragraph + & {
|
|
36
|
+
--my-spacer: var(--space-3);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Children from '../_Children.astro'
|
|
4
|
+
import Tag from '../_Tag.astro'
|
|
5
|
+
|
|
6
|
+
type Props<As extends HTMLTag> = Polymorphic<{ as: As }> &
|
|
7
|
+
ComponentProps<typeof Tag> & {
|
|
8
|
+
html?: string
|
|
9
|
+
text?: string
|
|
10
|
+
variant?: 'base' | 'muted'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { ...rest } = Astro.props
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<Tag
|
|
17
|
+
class:list={['full-typography']}
|
|
18
|
+
{...rest}
|
|
19
|
+
>
|
|
20
|
+
<slot name="before" />
|
|
21
|
+
<Children {...rest} />
|
|
22
|
+
<slot />
|
|
23
|
+
</Tag>
|
|
24
|
+
|
|
25
|
+
<style is:global lang="scss">
|
|
26
|
+
.full-typography {
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Chores
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# New components
|
|
5
|
+
- Highlight (for highlighint stuff in headings for example, with a primary background etc. Should accept same colors as badge)
|
|
6
|
+
- Field (for form fields with label etc. Should adapt based on the element, like horizontal for checkboxes)
|
|
7
|
+
|
|
8
|
+
## Low priority
|
|
9
|
+
- Toast
|
|
10
|
+
- Modal
|
|
11
|
+
- Drawer
|
|
12
|
+
- Alert
|
|
13
|
+
- Tooltip
|
|
14
|
+
- Legal
|
|
15
|
+
- Banner
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
type Props = {
|
|
3
|
+
height: string
|
|
4
|
+
width: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const { height = '100%', width = '100%' } = Astro.props
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<div class="full-placeholder"></div>
|
|
11
|
+
|
|
12
|
+
<style is:global define:vars={{ height, width }}>
|
|
13
|
+
.full-placeholder {
|
|
14
|
+
border: 1px solid var(--raised-border);
|
|
15
|
+
border-radius: var(--full-border-radius-1);
|
|
16
|
+
background-color: var(--raised-background);
|
|
17
|
+
width: var(--width) !important;
|
|
18
|
+
min-width: 100px;
|
|
19
|
+
height: var(--height) !important;
|
|
20
|
+
min-height: 100px;
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { SEO } from 'astro-seo'
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
title?: string
|
|
6
|
+
description?: string
|
|
7
|
+
image?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { title, description, image } = Astro.props
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<head>
|
|
14
|
+
<meta charset="UTF-8" />
|
|
15
|
+
<meta
|
|
16
|
+
content="width=device-width, initial-scale=1, viewport-fit=cover"
|
|
17
|
+
name="viewport"
|
|
18
|
+
/>
|
|
19
|
+
<meta
|
|
20
|
+
name="generator"
|
|
21
|
+
content={Astro.generator}
|
|
22
|
+
/>
|
|
23
|
+
|
|
24
|
+
<SEO
|
|
25
|
+
title={title || undefined}
|
|
26
|
+
description={description || undefined}
|
|
27
|
+
openGraph={title && image
|
|
28
|
+
? {
|
|
29
|
+
basic: {
|
|
30
|
+
title: title,
|
|
31
|
+
type: 'website',
|
|
32
|
+
image: image,
|
|
33
|
+
},
|
|
34
|
+
image: {
|
|
35
|
+
url: image,
|
|
36
|
+
alt: title,
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
: undefined}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<!-- Favicon -->
|
|
43
|
+
<link
|
|
44
|
+
rel="apple-touch-icon"
|
|
45
|
+
sizes="76x76"
|
|
46
|
+
href="/favicon/apple-touch-icon.png"
|
|
47
|
+
/>
|
|
48
|
+
<link
|
|
49
|
+
rel="icon"
|
|
50
|
+
type="image/png"
|
|
51
|
+
sizes="32x32"
|
|
52
|
+
href="/favicon/favicon-32x32.png"
|
|
53
|
+
/>
|
|
54
|
+
<link
|
|
55
|
+
rel="icon"
|
|
56
|
+
type="image/png"
|
|
57
|
+
sizes="16x16"
|
|
58
|
+
href="/favicon/favicon-16x16.png"
|
|
59
|
+
/>
|
|
60
|
+
<link
|
|
61
|
+
rel="manifest"
|
|
62
|
+
href="/favicon/site.webmanifest"
|
|
63
|
+
/>
|
|
64
|
+
<link
|
|
65
|
+
rel="mask-icon"
|
|
66
|
+
href="/favicon/safari-pinned-tab.svg"
|
|
67
|
+
/>
|
|
68
|
+
<link
|
|
69
|
+
rel="shortcut icon"
|
|
70
|
+
href="/favicon/favicon.ico"
|
|
71
|
+
/>
|
|
72
|
+
<meta
|
|
73
|
+
name="msapplication-config"
|
|
74
|
+
content="/favicon/browserconfig.xml"
|
|
75
|
+
/>
|
|
76
|
+
<meta
|
|
77
|
+
name="theme-color"
|
|
78
|
+
content="#000000"
|
|
79
|
+
/>
|
|
80
|
+
<slot />
|
|
81
|
+
</head>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Wrapper from './_Wrapper.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'body'> = Polymorphic<{ as: As }> &
|
|
6
|
+
ComponentProps<typeof Wrapper>
|
|
7
|
+
|
|
8
|
+
const { as = 'body', x = 'fill', ...rest } = Astro.props
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<Wrapper
|
|
12
|
+
class:list={['full-body']}
|
|
13
|
+
{as}
|
|
14
|
+
{x}
|
|
15
|
+
{...rest}
|
|
16
|
+
>
|
|
17
|
+
<slot name="before" />
|
|
18
|
+
<slot />
|
|
19
|
+
|
|
20
|
+
<style is:global lang="scss">
|
|
21
|
+
.full-body {
|
|
22
|
+
margin: 0;
|
|
23
|
+
background: var(--background);
|
|
24
|
+
padding: 0;
|
|
25
|
+
height: 100%;
|
|
26
|
+
min-height: 100vh;
|
|
27
|
+
color: var(--foreground);
|
|
28
|
+
font-size: var(--text);
|
|
29
|
+
font-family: var(--font-family);
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
32
|
+
</Wrapper>
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Wrapper from './_Wrapper.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> &
|
|
6
|
+
ComponentProps<typeof Wrapper> & {
|
|
7
|
+
variant?: 'ghost' | 'soft' | 'solid'
|
|
8
|
+
frame?: 'fill' | 'panel' | 'screen'
|
|
9
|
+
ratio?: 'landscape' | 'portrait' | 'square' | number
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
href,
|
|
14
|
+
as = Astro.props.href ? 'a' : 'div',
|
|
15
|
+
density = 'compact',
|
|
16
|
+
variant,
|
|
17
|
+
frame,
|
|
18
|
+
ratio,
|
|
19
|
+
...rest
|
|
20
|
+
} = Astro.props
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<Wrapper
|
|
24
|
+
{as}
|
|
25
|
+
{href}
|
|
26
|
+
class:list={[
|
|
27
|
+
'full-card',
|
|
28
|
+
{
|
|
29
|
+
[`full-frame-${frame}`]: frame,
|
|
30
|
+
[`full-variant-${variant}`]: variant,
|
|
31
|
+
[`full-ratio-${ratio}`]: ratio,
|
|
32
|
+
},
|
|
33
|
+
]}
|
|
34
|
+
{density}
|
|
35
|
+
{...rest}
|
|
36
|
+
>
|
|
37
|
+
<slot name="before" />
|
|
38
|
+
<slot />
|
|
39
|
+
</Wrapper>
|
|
40
|
+
|
|
41
|
+
<style is:global lang="scss">
|
|
42
|
+
.full-card {
|
|
43
|
+
position: relative;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
text-decoration: none;
|
|
46
|
+
|
|
47
|
+
/* &:is(a) */
|
|
48
|
+
&[href] {
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
|
|
51
|
+
> .full-image {
|
|
52
|
+
transition: var(--full-transition);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
> .full-image {
|
|
57
|
+
opacity: 0.85;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* TODO add child paddings/margin */
|
|
63
|
+
/* padding all side with negative padding/margin on image/media? */
|
|
64
|
+
/* or only padding bottom and side apdding on children? */
|
|
65
|
+
/* I prefer negative margin (inset) on media if this works */
|
|
66
|
+
&.full-frame-panel {
|
|
67
|
+
gap: 0;
|
|
68
|
+
border: 1px solid var(--border);
|
|
69
|
+
border-radius: var(--full-border-radius-3);
|
|
70
|
+
background-color: var(--background);
|
|
71
|
+
padding: var(--space-5);
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
color: var(--foreground);
|
|
74
|
+
|
|
75
|
+
// > .full-tag:not(.full-image) {
|
|
76
|
+
// margin-right: var(--space-5);
|
|
77
|
+
// margin-left: var(--space-5);
|
|
78
|
+
|
|
79
|
+
// &:first-child {
|
|
80
|
+
// margin-top: var(--space-5);
|
|
81
|
+
// }
|
|
82
|
+
|
|
83
|
+
// &:last-child {
|
|
84
|
+
// margin-bottom: var(--space-5);
|
|
85
|
+
// }
|
|
86
|
+
// }
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* &.subtle,
|
|
90
|
+
&.surface {
|
|
91
|
+
background-color: var(--2);
|
|
92
|
+
|
|
93
|
+
&:is(a) {
|
|
94
|
+
border-color: var(--7);
|
|
95
|
+
background: var(--2);
|
|
96
|
+
|
|
97
|
+
&:hover {
|
|
98
|
+
border-color: var(--8);
|
|
99
|
+
background: var(--3);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:active {
|
|
103
|
+
background: var(--4);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.full-image {
|
|
108
|
+
border-bottom-right-radius: 0;
|
|
109
|
+
border-bottom-left-radius: 0;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&.solid {
|
|
114
|
+
border-color: var(--9);
|
|
115
|
+
background: var(--9);
|
|
116
|
+
|
|
117
|
+
* {
|
|
118
|
+
color: var(--fg);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:is(a):hover {
|
|
122
|
+
background: var(--10);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.full-image {
|
|
126
|
+
border-bottom-right-radius: 0;
|
|
127
|
+
border-bottom-left-radius: 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
} */
|
|
131
|
+
|
|
132
|
+
&.full-ratio-landscape {
|
|
133
|
+
aspect-ratio: 4/3;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&.full-ratio-square {
|
|
137
|
+
aspect-ratio: 1/1;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&.full-ratio-portrait {
|
|
141
|
+
aspect-ratio: 3/4;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import type { Pluralmorphic } from '../../types/Pluralmorphic'
|
|
4
|
+
import Plural from '../_Plural.astro'
|
|
5
|
+
import Card from './Card.astro'
|
|
6
|
+
|
|
7
|
+
type Props = Pluralmorphic<ComponentProps<typeof Card>>
|
|
8
|
+
|
|
9
|
+
const { props } = Astro
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<Plural
|
|
13
|
+
component={Card}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Wrapper from './_Wrapper.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
|
|
6
|
+
Omit<ComponentProps<typeof Wrapper>, 'layout'> & {
|
|
7
|
+
layout?:
|
|
8
|
+
| 'carousel'
|
|
9
|
+
| 'grid'
|
|
10
|
+
| 'masonry'
|
|
11
|
+
| 'row'
|
|
12
|
+
| 'column'
|
|
13
|
+
| 'split'
|
|
14
|
+
| 'panels'
|
|
15
|
+
| 'bento'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const { layout = 'grid', direction = null, ...rest } = Astro.props
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
<Wrapper
|
|
22
|
+
class:list={['full-deck']}
|
|
23
|
+
layout={layout as any}
|
|
24
|
+
{direction}
|
|
25
|
+
{...rest as any}
|
|
26
|
+
>
|
|
27
|
+
<slot name="before" />
|
|
28
|
+
<slot />
|
|
29
|
+
</Wrapper>
|
|
30
|
+
|
|
31
|
+
<style is:global lang="scss">
|
|
32
|
+
.full-deck {
|
|
33
|
+
position: relative;
|
|
34
|
+
width: 100%;
|
|
35
|
+
|
|
36
|
+
&.full-layout-row {
|
|
37
|
+
display: grid;
|
|
38
|
+
row-gap: var(--space-4);
|
|
39
|
+
|
|
40
|
+
@media (min-width: 1024px) {
|
|
41
|
+
grid-auto-columns: 6fr 1fr;
|
|
42
|
+
grid-auto-flow: column;
|
|
43
|
+
|
|
44
|
+
> * {
|
|
45
|
+
&:nth-child(2) {
|
|
46
|
+
grid-column-start: 3;
|
|
47
|
+
}
|
|
48
|
+
&:nth-child(3) {
|
|
49
|
+
grid-column-start: 5;
|
|
50
|
+
}
|
|
51
|
+
&:nth-child(4) {
|
|
52
|
+
grid-column-start: 7;
|
|
53
|
+
}
|
|
54
|
+
&:nth-child(5) {
|
|
55
|
+
grid-column-start: 9;
|
|
56
|
+
}
|
|
57
|
+
&:nth-child(6) {
|
|
58
|
+
grid-column-start: 11;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.full-layout-carousel {
|
|
65
|
+
display: flex;
|
|
66
|
+
position: relative;
|
|
67
|
+
flex-direction: row;
|
|
68
|
+
align-items: flex-start;
|
|
69
|
+
gap: var(--space-3);
|
|
70
|
+
margin: 0 calc(var(--space-gutter) * -1);
|
|
71
|
+
padding: 0 var(--space-gutter) var(--space-3);
|
|
72
|
+
width: 100vw;
|
|
73
|
+
overflow-x: auto;
|
|
74
|
+
scroll-behavior: smooth;
|
|
75
|
+
scroll-snap-type: x mandatory;
|
|
76
|
+
|
|
77
|
+
> .full-card {
|
|
78
|
+
/* TODO add multiple sizes */
|
|
79
|
+
flex-grow: 0;
|
|
80
|
+
flex-shrink: 0;
|
|
81
|
+
width: calc(12 * var(--space-6));
|
|
82
|
+
scroll-snap-align: center;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.full-layout-grid {
|
|
87
|
+
display: grid;
|
|
88
|
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
89
|
+
column-gap: var(--space-3);
|
|
90
|
+
row-gap: var(--space-4);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&.full-layout-masonry {
|
|
94
|
+
column-gap: var(--space-3);
|
|
95
|
+
column-count: 1;
|
|
96
|
+
|
|
97
|
+
@media (min-width: 640px) {
|
|
98
|
+
column-count: 2;
|
|
99
|
+
}
|
|
100
|
+
@media (min-width: 768px) {
|
|
101
|
+
column-count: 3;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (min-width: 1024px) {
|
|
105
|
+
column-count: 4;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
& > .card + .card {
|
|
109
|
+
margin-top: var(--space-4);
|
|
110
|
+
margin-bottom: var(--space-4);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&.full-layout-panels {
|
|
115
|
+
display: grid;
|
|
116
|
+
grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
|
|
117
|
+
gap: var(--space-3);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&.full-layout-bento {
|
|
121
|
+
display: grid;
|
|
122
|
+
grid-template-columns: 1fr;
|
|
123
|
+
|
|
124
|
+
@media (min-width: 1024px) {
|
|
125
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
126
|
+
|
|
127
|
+
& > *:nth-child(2n) {
|
|
128
|
+
grid-column-start: span 2;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Wrapper from './_Wrapper.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'footer'> = Polymorphic<{ as: As }> &
|
|
6
|
+
ComponentProps<typeof Wrapper>
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
as = 'footer',
|
|
10
|
+
direction = 'horizontal',
|
|
11
|
+
density = 'compact',
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props
|
|
14
|
+
---
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Wrapper from './_Wrapper.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'form'> = Polymorphic<{ as: As }> &
|
|
6
|
+
ComponentProps<typeof Wrapper>
|
|
7
|
+
|
|
8
|
+
const { as = 'form', ...rest } = Astro.props
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<Wrapper
|
|
12
|
+
class:list={['full-form']}
|
|
13
|
+
{as}
|
|
14
|
+
{...rest}
|
|
15
|
+
>
|
|
16
|
+
<slot name="before" />
|
|
17
|
+
<slot />
|
|
18
|
+
</Wrapper>
|
|
19
|
+
|
|
20
|
+
<style is:global lang="scss">
|
|
21
|
+
.full-form {
|
|
22
|
+
display: flex;
|
|
23
|
+
width: 100%;
|
|
24
|
+
max-width: calc(var(--space-element-3) * 36);
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Wrapper from './_Wrapper.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
|
|
6
|
+
ComponentProps<typeof Wrapper>
|
|
7
|
+
|
|
8
|
+
const { as = 'div', ...rest } = Astro.props
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<Wrapper
|
|
12
|
+
class:list={['full-group']}
|
|
13
|
+
{as}
|
|
14
|
+
{...rest}
|
|
15
|
+
>
|
|
16
|
+
<slot name="before" />
|
|
17
|
+
<slot />
|
|
18
|
+
</Wrapper>
|
|
19
|
+
|
|
20
|
+
<style is:global lang="scss">
|
|
21
|
+
.full-group {
|
|
22
|
+
.full-tag + & {
|
|
23
|
+
--my-spacer: var(--space-4);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</style>
|