fulldev-ui 0.2.12 → 0.3.0-beta.1
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/settings.json +5 -0
- package/.astro/types.d.ts +3 -12
- package/.env +1 -0
- package/astro.config.mjs +1 -2
- package/package.json +4 -7
- package/src/_archive/Childmorphic.ts +8 -0
- package/src/_archive/getAllCollections.ts +10 -0
- package/src/_archive/getCollectionCascade.ts +33 -0
- package/src/_archive/getPathname.ts +18 -0
- package/src/_archive/staticPageSchema.ts +124 -0
- package/src/_archive/transform/transform.ts +25 -0
- package/src/_archive/transform/transformCasing.ts +24 -0
- package/src/_archive/transform/transformReferences.ts +54 -0
- package/src/_archive/transform/transformSelfs.ts +20 -0
- package/src/_archive/transform/transformUnderscores.ts +19 -0
- package/src/components/_Block.astro +2 -0
- package/src/components/{_Tag.astro → _Component.astro} +18 -9
- package/src/components/{segment → _archive}/Body.astro +7 -5
- package/src/components/{segment → _archive}/Main.astro +4 -4
- package/src/components/{segment → _archive}/Nav.astro +5 -5
- package/src/components/{structure → _archive}/Row.astro +4 -4
- package/src/components/_todo/Footer.astro +66 -0
- package/src/components/{segment → _todo}/Form.astro +6 -6
- package/src/components/{segment → _todo}/Prose.astro +20 -20
- package/src/components/{segment → _todo}/Writeup.astro +4 -4
- package/src/components/{segment → _todo}/todo.md +3 -1
- package/src/components/base/Badge.astro +6 -6
- package/src/components/base/Button.astro +37 -28
- package/src/components/base/Checkbox.astro +3 -4
- package/src/components/base/Icon.astro +5 -5
- package/src/components/base/Image.astro +19 -52
- package/src/components/base/Input.astro +12 -7
- package/src/components/base/Logo.astro +4 -4
- package/src/components/base/Radio.astro +3 -4
- package/src/components/base/Rating.astro +5 -5
- package/src/components/base/Select.astro +6 -6
- package/src/components/base/SelectOption.astro +1 -1
- package/src/components/base/Switch.astro +8 -7
- package/src/components/base/Textarea.astro +4 -3
- package/src/components/segment/Box.astro +41 -0
- package/src/components/segment/Card.astro +21 -35
- package/src/components/segment/Deck.astro +20 -16
- package/src/components/{structure → segment}/Group.astro +8 -7
- package/src/components/segment/Header.astro +18 -7
- package/src/components/segment/Section.astro +39 -37
- package/src/components/typography/Heading.astro +24 -26
- package/src/components/typography/Label.astro +17 -11
- package/src/components/typography/Link.astro +5 -5
- package/src/components/typography/List.astro +9 -6
- package/src/components/typography/ListItem.astro +5 -5
- package/src/components/typography/Paragraph.astro +17 -11
- package/src/components/typography/Tagline.astro +6 -5
- package/src/components/typography/Text.astro +40 -0
- package/src/{layouts → components/utility}/Layout.astro +6 -6
- package/src/content/config.ts +14 -0
- package/src/content/pages/index.md +1 -0
- package/src/css/color.css +88 -0
- package/src/css/props/align.scss +20 -0
- package/src/css/props/frame.scss +153 -0
- package/src/css/props/mask +1 -0
- package/src/css/props/position.scss +33 -0
- package/src/css/props/ratio +1 -0
- package/src/css/props/structure.scss +228 -0
- package/src/css/props/variant.scss +130 -0
- package/src/css/radix.css +281 -0
- package/src/css/size.css +334 -0
- package/src/css/styles.css +2 -2
- package/src/index.ts +13 -34
- package/src/integration/integration.ts +45 -0
- package/src/schemas/collection.ts +87 -0
- package/src/blocks/todo.md +0 -12
- package/src/components/_Plural.astro +0 -27
- package/src/components/base/Buttons.astro +0 -15
- package/src/components/base/Images.astro +0 -15
- package/src/components/segment/Footer.astro +0 -14
- package/src/components/structure/Bento.astro +0 -35
- package/src/components/structure/Carousel.astro +0 -43
- package/src/components/structure/Grid.astro +0 -30
- package/src/components/structure/Masonry.astro +0 -39
- package/src/components/structure/Split.astro +0 -41
- package/src/components/structure/Spread.astro +0 -48
- package/src/components/structure/Stack.astro +0 -90
- package/src/components/structure/todo.md +0 -5
- package/src/css/colors.css +0 -197
- package/src/css/main.css +0 -3
- package/src/css/sizes.css +0 -217
- package/src/layouts/todo.md +0 -2
- package/src/schemas/attributesSchema.ts +0 -125
- package/src/schemas/htmlAttributesSchema.ts +0 -126
- package/src/schemas/pageSchema.ts +0 -185
- package/src/schemas/staticPageSchema.ts +0 -124
- package/src/types/Childmorphic.ts +0 -8
- package/src/types/Pluralmorphic.ts +0 -7
- package/src/types/Structuremorphic.ts +0 -18
- package/src/utils/getAllCollections.ts +0 -10
- package/src/utils/getCollectionCascade.ts +0 -33
- package/src/utils/getPathname.ts +0 -18
- package/src/utils/transform/transform.ts +0 -25
- package/src/utils/transform/transformCasing.ts +0 -24
- package/src/utils/transform/transformReferences.ts +0 -54
- package/src/utils/transform/transformSelfs.ts +0 -20
- package/src/utils/transform/transformUnderscores.ts +0 -19
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
// I think we should split it up into multiple components, like SelectIcon etc. gr Sil
|
|
4
4
|
import type { ComponentProps, Polymorphic } from 'astro/types'
|
|
5
5
|
import { isObject } from 'radash'
|
|
6
|
-
import
|
|
6
|
+
import Component from '../_Component.astro'
|
|
7
7
|
import Icon from './Icon.astro'
|
|
8
8
|
import SelectOption from './SelectOption.astro'
|
|
9
9
|
|
|
10
10
|
type Props<As extends 'select'> = Polymorphic<{ as: As }> &
|
|
11
|
-
ComponentProps<typeof
|
|
11
|
+
ComponentProps<typeof Component> & {
|
|
12
12
|
options?: (ComponentProps<typeof SelectOption> | string)[]
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
const { as = 'select', options, ...rest } = Astro.props
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
<
|
|
18
|
+
<Component
|
|
19
19
|
as="div"
|
|
20
20
|
class:list="select-wrapper"
|
|
21
21
|
{...rest}
|
|
22
22
|
>
|
|
23
|
-
<
|
|
23
|
+
<Component
|
|
24
24
|
as="select"
|
|
25
25
|
if={options}
|
|
26
26
|
class:list={['select input']}
|
|
@@ -34,14 +34,14 @@ const { as = 'select', options, ...rest } = Astro.props
|
|
|
34
34
|
})
|
|
35
35
|
}
|
|
36
36
|
<slot />
|
|
37
|
-
</
|
|
37
|
+
</Component>
|
|
38
38
|
<div class="select-icon-wrapper">
|
|
39
39
|
<Icon
|
|
40
40
|
class="select-icon"
|
|
41
41
|
name="chevron-down"
|
|
42
42
|
/>
|
|
43
43
|
</div>
|
|
44
|
-
</
|
|
44
|
+
</Component>
|
|
45
45
|
|
|
46
46
|
<style is:global lang="scss">
|
|
47
47
|
@import '../../css/utils.scss';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
-
import
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
5
|
type Props<As extends HTMLTag = 'span'> = Polymorphic<{ as: As }> &
|
|
6
|
-
ComponentProps<typeof
|
|
6
|
+
ComponentProps<typeof Component> & {
|
|
7
7
|
name?: string
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const { as = 'input', name, ...rest } = Astro.props
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
<
|
|
13
|
+
<Component
|
|
14
14
|
as="label"
|
|
15
15
|
class:list="switch"
|
|
16
16
|
if={true}
|
|
@@ -22,7 +22,7 @@ const { as = 'input', name, ...rest } = Astro.props
|
|
|
22
22
|
class="checkbox"
|
|
23
23
|
/>
|
|
24
24
|
<div class="checkmark"></div>
|
|
25
|
-
</
|
|
25
|
+
</Component>
|
|
26
26
|
|
|
27
27
|
<style is:global lang="scss">
|
|
28
28
|
@import '../../css/utils.scss';
|
|
@@ -37,10 +37,11 @@ const { as = 'input', name, ...rest } = Astro.props
|
|
|
37
37
|
border-radius: 999px;
|
|
38
38
|
background-color: var(--background);
|
|
39
39
|
padding: var(--space-1);
|
|
40
|
+
width: fit-content;
|
|
40
41
|
min-width: calc(
|
|
41
|
-
(var(--text-
|
|
42
|
+
(var(--text-label) + 2 * var(--element-1) * 2) + 2 * var(--space-1)
|
|
42
43
|
);
|
|
43
|
-
height: calc(var(--text-
|
|
44
|
+
height: calc(var(--text-label) + 2 * var(--element-1));
|
|
44
45
|
|
|
45
46
|
.checkbox {
|
|
46
47
|
position: absolute;
|
|
@@ -60,7 +61,7 @@ const { as = 'input', name, ...rest } = Astro.props
|
|
|
60
61
|
|
|
61
62
|
.checkbox:checked ~ .checkmark {
|
|
62
63
|
transform: translateX(100%);
|
|
63
|
-
background-color: var(--
|
|
64
|
+
background-color: var(--solid);
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
&:hover {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
-
import
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
5
|
type Props<As extends HTMLTag = 'textarea'> = Polymorphic<{ as: As }> &
|
|
6
|
-
ComponentProps<typeof
|
|
6
|
+
ComponentProps<typeof Component>
|
|
7
7
|
|
|
8
8
|
const {
|
|
9
9
|
as = 'textarea',
|
|
@@ -14,7 +14,7 @@ const {
|
|
|
14
14
|
} = Astro.props
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
<
|
|
17
|
+
<Component
|
|
18
18
|
class:list={['textarea input']}
|
|
19
19
|
if={true}
|
|
20
20
|
{rows}
|
|
@@ -28,6 +28,7 @@ const {
|
|
|
28
28
|
|
|
29
29
|
@include component('textarea') {
|
|
30
30
|
height: calc((var(--text-1) + 2 * var(--element-3)) * 2);
|
|
31
|
+
min-height: calc((var(--text-1) + 2 * var(--element-3)) * 1);
|
|
31
32
|
resize: vertical;
|
|
32
33
|
}
|
|
33
34
|
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'section'> = Polymorphic<{ as: As }> &
|
|
6
|
+
ComponentProps<typeof Component> & {
|
|
7
|
+
scheme?: 'light' | 'dark'
|
|
8
|
+
color?: 'base' | 'brand'
|
|
9
|
+
size?: 'sm' | 'md' | 'lg'
|
|
10
|
+
compact?: boolean
|
|
11
|
+
frame?: 'container' | 'wrapper' | 'panel' | 'viewport' | 'none'
|
|
12
|
+
variant?: 'fill' | 'subtle' | 'outline' | 'soft' | 'solid' | 'surface'
|
|
13
|
+
align?: 'start' | 'center' | 'end' | 'stretch'
|
|
14
|
+
structure?:
|
|
15
|
+
| 'row'
|
|
16
|
+
| 'column'
|
|
17
|
+
| 'split'
|
|
18
|
+
| 'spread'
|
|
19
|
+
| 'grid'
|
|
20
|
+
| 'bento'
|
|
21
|
+
| 'masonry'
|
|
22
|
+
| 'carousel'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const { ...rest } = Astro.props
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
<Component
|
|
29
|
+
class:list={['box']}
|
|
30
|
+
{...rest}
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</Component>
|
|
34
|
+
|
|
35
|
+
<style is:global lang="scss">
|
|
36
|
+
@import '../../css/utils.scss';
|
|
37
|
+
|
|
38
|
+
@include component('box') {
|
|
39
|
+
position: relative;
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
@@ -1,37 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
-
import
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
5
|
type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> &
|
|
6
|
-
ComponentProps<typeof
|
|
7
|
-
structure?: '
|
|
6
|
+
ComponentProps<typeof Component> & {
|
|
7
|
+
structure?: 'column' | 'group' | 'split' | 'spread' | 'row'
|
|
8
8
|
align?: 'start' | 'center' | 'end' | 'stretch'
|
|
9
|
-
|
|
10
|
-
frame?: 'fill' | 'panel'
|
|
9
|
+
frame?: 'fill' | 'panel' | 'none'
|
|
11
10
|
ratio?: 'landscape' | 'portrait' | 'square' | number
|
|
11
|
+
variant?:
|
|
12
|
+
| 'ghost'
|
|
13
|
+
| 'subtle'
|
|
14
|
+
| 'surface'
|
|
15
|
+
| 'outline'
|
|
16
|
+
| 'soft'
|
|
17
|
+
| 'surface'
|
|
18
|
+
| 'solid'
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
const {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
href,
|
|
23
|
+
as = href ? 'a' : 'div',
|
|
24
|
+
structure = 'column',
|
|
25
|
+
compact = true,
|
|
18
26
|
frame = 'panel',
|
|
19
|
-
variant = '
|
|
27
|
+
variant = frame === 'panel' ? 'subtle' : undefined,
|
|
20
28
|
...rest
|
|
21
29
|
} = Astro.props
|
|
22
30
|
---
|
|
23
31
|
|
|
24
|
-
<
|
|
32
|
+
<Component
|
|
25
33
|
class:list={['card']}
|
|
34
|
+
{compact}
|
|
35
|
+
{href}
|
|
26
36
|
{structure}
|
|
27
|
-
{density}
|
|
28
37
|
{frame}
|
|
29
38
|
{variant}
|
|
30
39
|
{as}
|
|
31
40
|
{...rest}
|
|
32
41
|
>
|
|
33
42
|
<slot />
|
|
34
|
-
</
|
|
43
|
+
</Component>
|
|
35
44
|
|
|
36
45
|
<style is:global lang="scss">
|
|
37
46
|
@import '../../css/utils.scss';
|
|
@@ -55,15 +64,6 @@ const {
|
|
|
55
64
|
}
|
|
56
65
|
}
|
|
57
66
|
|
|
58
|
-
&.frame-panel {
|
|
59
|
-
border: 1px solid var(--border);
|
|
60
|
-
border-radius: var(--radius-2);
|
|
61
|
-
background-color: var(--background);
|
|
62
|
-
padding: var(--space-5);
|
|
63
|
-
overflow: hidden;
|
|
64
|
-
color: var(--foreground);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
67
|
&.ratio-landscape {
|
|
68
68
|
aspect-ratio: 4/3;
|
|
69
69
|
}
|
|
@@ -75,19 +75,5 @@ const {
|
|
|
75
75
|
&.ratio-portrait {
|
|
76
76
|
aspect-ratio: 3/4;
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
& > .frame-inset {
|
|
80
|
-
margin-right: calc(var(--space-5) * -1);
|
|
81
|
-
margin-left: calc(var(--space-5) * -1);
|
|
82
|
-
width: calc(100% + var(--space-5) * 2);
|
|
83
|
-
|
|
84
|
-
&:first-child {
|
|
85
|
-
margin-top: calc(var(--space-5) * -1);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&:last-child {
|
|
89
|
-
margin-bottom: calc(var(--space-5) * -1);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
78
|
}
|
|
93
79
|
</style>
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
3
|
-
import
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
|
-
type Props<As extends HTMLTag = '
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
scheme?: 'light' | 'dark'
|
|
7
|
+
color?: 'base' | 'brand'
|
|
8
|
+
compact?: boolean
|
|
9
|
+
size?: 'sm' | 'md' | 'lg' | 'xl'
|
|
10
|
+
structure?: 'grid' | 'carousel' | 'masonry' | 'bento' | 'row' | 'split'
|
|
11
|
+
frame?: 'wrapper' | 'container'
|
|
12
|
+
}
|
|
10
13
|
|
|
11
|
-
const { structure = 'grid', ...rest } = Astro.props
|
|
14
|
+
const { as = 'div', structure = 'grid', ...rest } = Astro.props
|
|
12
15
|
---
|
|
13
16
|
|
|
14
|
-
<
|
|
17
|
+
<Component
|
|
15
18
|
class:list={['deck']}
|
|
19
|
+
{as}
|
|
16
20
|
{structure}
|
|
17
21
|
{...rest}
|
|
18
22
|
>
|
|
19
23
|
<slot />
|
|
20
|
-
</
|
|
24
|
+
</Component>
|
|
21
25
|
|
|
22
26
|
<style is:global lang="scss">
|
|
23
27
|
@import '../../css/utils.scss';
|
|
@@ -26,11 +30,11 @@ const { structure = 'grid', ...rest } = Astro.props
|
|
|
26
30
|
position: relative;
|
|
27
31
|
width: 100%;
|
|
28
32
|
|
|
29
|
-
&.frame-fill {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
33
|
+
// &.frame-fill {
|
|
34
|
+
// margin-right: calc(var(--space-gutter) * -1);
|
|
35
|
+
// margin-left: calc(var(--space-gutter) * -1);
|
|
36
|
+
// padding: 0 var(--space-gutter) var(--space-3);
|
|
37
|
+
// width: calc(100% + var(--space-gutter) * 2);
|
|
38
|
+
// }
|
|
35
39
|
}
|
|
36
40
|
</style>
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
-
import
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
5
|
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
|
|
6
|
-
ComponentProps<typeof
|
|
6
|
+
ComponentProps<typeof Component> & {
|
|
7
|
+
color?: 'base' | 'brand'
|
|
8
|
+
size?: 'sm' | 'md' | 'lg'
|
|
9
|
+
structure?: 'row' | 'column' | 'wrap'
|
|
10
|
+
}
|
|
7
11
|
|
|
8
12
|
const { ...rest } = Astro.props
|
|
9
13
|
---
|
|
10
14
|
|
|
11
|
-
<
|
|
15
|
+
<Component
|
|
12
16
|
class:list={['group']}
|
|
13
17
|
{...rest}
|
|
14
18
|
>
|
|
15
19
|
<slot />
|
|
16
|
-
</
|
|
20
|
+
</Component>
|
|
17
21
|
|
|
18
22
|
<style is:global lang="scss">
|
|
19
23
|
@import '../../css/utils.scss';
|
|
20
24
|
|
|
21
25
|
@include component('group') {
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-wrap: wrap;
|
|
24
26
|
justify-content: stretch;
|
|
25
27
|
align-items: center;
|
|
26
|
-
gap: var(--space-2);
|
|
27
28
|
}
|
|
28
29
|
</style>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
-
import
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
5
|
type Props<As extends HTMLTag = 'header'> = Polymorphic<{ as: As }> &
|
|
6
|
-
ComponentProps<typeof
|
|
7
|
-
structure?: 'spread' | 'group' | '
|
|
6
|
+
ComponentProps<typeof Component> & {
|
|
7
|
+
structure?: 'spread' | 'group' | 'column'
|
|
8
8
|
position?: 'relative' | 'sticky' | 'fixed' | 'absolute'
|
|
9
9
|
variant?: 'base' | 'raised'
|
|
10
|
-
frame?: '
|
|
10
|
+
frame?: 'wrapper' | 'container' | 'panel'
|
|
11
11
|
align?: 'start' | 'center' | 'end'
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -15,23 +15,29 @@ const {
|
|
|
15
15
|
as = 'header',
|
|
16
16
|
structure = 'spread',
|
|
17
17
|
density = 'compact',
|
|
18
|
+
frame = 'wrapper',
|
|
19
|
+
compact = true,
|
|
18
20
|
...rest
|
|
19
21
|
} = Astro.props
|
|
20
22
|
---
|
|
21
23
|
|
|
22
|
-
<
|
|
24
|
+
<Component
|
|
23
25
|
class:list={['header']}
|
|
24
26
|
{as}
|
|
25
27
|
{density}
|
|
28
|
+
{frame}
|
|
29
|
+
{compact}
|
|
26
30
|
{...rest}
|
|
27
31
|
>
|
|
28
32
|
<slot />
|
|
29
|
-
</
|
|
33
|
+
</Component>
|
|
30
34
|
|
|
31
35
|
<style is:global lang="scss">
|
|
32
36
|
@import '../../css/utils.scss';
|
|
33
37
|
|
|
34
38
|
@include component('header') {
|
|
39
|
+
--inner: var(--element-3);
|
|
40
|
+
|
|
35
41
|
display: flex;
|
|
36
42
|
top: 0;
|
|
37
43
|
right: 0;
|
|
@@ -40,9 +46,14 @@ const {
|
|
|
40
46
|
align-items: center;
|
|
41
47
|
z-index: 10;
|
|
42
48
|
background: var(--background);
|
|
43
|
-
padding: var(--
|
|
49
|
+
padding-top: var(--element-3);
|
|
50
|
+
padding-bottom: var(--element-3);
|
|
44
51
|
width: 100%;
|
|
45
52
|
|
|
53
|
+
// &.panel {
|
|
54
|
+
// margin-top: var(--inner);
|
|
55
|
+
// }
|
|
56
|
+
|
|
46
57
|
&.position-fixed {
|
|
47
58
|
position: fixed;
|
|
48
59
|
}
|
|
@@ -1,66 +1,68 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
-
import
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
5
|
type Props<As extends HTMLTag = 'section'> = Polymorphic<{ as: As }> &
|
|
6
|
-
ComponentProps<typeof
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
ComponentProps<typeof Component> & {
|
|
7
|
+
scheme?: 'light' | 'dark'
|
|
8
|
+
color?: 'base' | 'brand'
|
|
9
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl'
|
|
10
|
+
compact?: boolean
|
|
11
|
+
frame?: 'container' | 'wrapper' | 'panel' | 'viewport' | 'none'
|
|
12
|
+
variant?: 'fill' | 'subtle' | 'outline' | 'soft' | 'solid' | 'surface'
|
|
13
|
+
align?: 'start' | 'center' | 'end' | 'stretch'
|
|
14
|
+
structure?:
|
|
15
|
+
| 'row'
|
|
16
|
+
| 'column'
|
|
17
|
+
| 'split'
|
|
18
|
+
| 'spread'
|
|
19
|
+
| 'grid'
|
|
20
|
+
| 'bento'
|
|
21
|
+
| 'masonry'
|
|
22
|
+
| 'carousel'
|
|
11
23
|
}
|
|
12
24
|
|
|
13
25
|
const {
|
|
14
|
-
|
|
15
|
-
structure = '
|
|
16
|
-
|
|
26
|
+
frame = 'wrapper',
|
|
27
|
+
structure = 'column',
|
|
28
|
+
variant = frame === 'panel' ? 'subtle' : 'fill',
|
|
29
|
+
as = 'div',
|
|
17
30
|
...rest
|
|
18
31
|
} = Astro.props
|
|
19
32
|
---
|
|
20
33
|
|
|
21
|
-
<
|
|
34
|
+
<Component
|
|
22
35
|
class:list={['section']}
|
|
23
|
-
{structure}
|
|
24
|
-
{align}
|
|
25
36
|
{as}
|
|
37
|
+
{frame}
|
|
38
|
+
{variant}
|
|
39
|
+
{structure}
|
|
26
40
|
{...rest}
|
|
27
41
|
>
|
|
28
42
|
<slot />
|
|
29
|
-
</
|
|
43
|
+
</Component>
|
|
30
44
|
|
|
31
45
|
<style is:global lang="scss">
|
|
32
46
|
@import '../../css/utils.scss';
|
|
33
47
|
|
|
34
|
-
:root,
|
|
35
|
-
.full {
|
|
36
|
-
--media: 1536px;
|
|
37
|
-
--space-spacer: calc(var(--space-5) + 4vw);
|
|
38
|
-
--space-gutter: max(4vw, calc((100vw - var(--media)) / 2));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
48
|
@include component('section') {
|
|
49
|
+
--inner-y: var(--space-6);
|
|
50
|
+
|
|
42
51
|
position: relative;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
padding: var(--space-spacer) var(--space-gutter);
|
|
46
|
-
width: 100%;
|
|
47
|
-
overflow-x: hidden;
|
|
52
|
+
padding-top: var(--inner-y);
|
|
53
|
+
padding-bottom: var(--inner-y);
|
|
48
54
|
|
|
49
|
-
&.frame-
|
|
50
|
-
margin: var(--space-5) var(--space-gutter);
|
|
51
|
-
border: 1px solid var(--border);
|
|
52
|
-
border-radius: var(--radius-3);
|
|
55
|
+
&.frame-wrapper {
|
|
53
56
|
background-color: var(--background);
|
|
54
|
-
padding-top: var(--space-5);
|
|
55
|
-
padding-right: min(var(--space-5), var(--space-gutter));
|
|
56
|
-
padding-bottom: var(--space-5);
|
|
57
|
-
padding-left: min(var(--space-5), var(--space-gutter));
|
|
58
|
-
overflow: hidden;
|
|
59
57
|
}
|
|
60
58
|
|
|
61
|
-
&.frame-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
&.frame-panel {
|
|
60
|
+
margin-top: var(--inner-y);
|
|
61
|
+
margin-bottom: var(--inner-y);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:not(.frame-panel) {
|
|
65
|
+
box-shadow: none !important;
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
</style>
|
|
@@ -1,32 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
-
import
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
5
|
type Props<As extends HTMLTag = 'h2'> = Polymorphic<{ as: As }> &
|
|
6
|
-
ComponentProps<typeof
|
|
6
|
+
ComponentProps<typeof Component> & {
|
|
7
|
+
scheme?: 'light' | 'dark'
|
|
8
|
+
color?: 'base' | 'brand'
|
|
9
|
+
size?:
|
|
10
|
+
| 'xs'
|
|
11
|
+
| 'sm'
|
|
12
|
+
| 'md'
|
|
13
|
+
| 'lg'
|
|
14
|
+
| 'xl'
|
|
15
|
+
| '2xl'
|
|
16
|
+
| '3xl'
|
|
17
|
+
| '4xl'
|
|
18
|
+
| '5xl'
|
|
19
|
+
| '6xl'
|
|
7
20
|
html?: string
|
|
8
21
|
text?: string
|
|
22
|
+
contrast?: boolean
|
|
9
23
|
variant?: 'base' | 'muted' | 'accent'
|
|
10
|
-
level?: 1 | 2 | 3 | 4 | 5 | 6
|
|
11
24
|
}
|
|
12
25
|
|
|
13
|
-
const {
|
|
14
|
-
level = 2,
|
|
15
|
-
as = `h${level}`,
|
|
16
|
-
density = level > 3 ? 'compact' : undefined,
|
|
17
|
-
...rest
|
|
18
|
-
} = Astro.props
|
|
26
|
+
const { as = 'h2', contrast = true, ...rest } = Astro.props
|
|
19
27
|
---
|
|
20
28
|
|
|
21
|
-
<
|
|
29
|
+
<Component
|
|
22
30
|
class:list={['heading']}
|
|
23
|
-
{level}
|
|
24
31
|
{as}
|
|
25
|
-
{
|
|
32
|
+
{contrast}
|
|
26
33
|
{...rest}
|
|
27
34
|
>
|
|
28
35
|
<slot />
|
|
29
|
-
</
|
|
36
|
+
</Component>
|
|
30
37
|
|
|
31
38
|
<style is:global lang="scss">
|
|
32
39
|
@import '../../css/utils.scss';
|
|
@@ -34,26 +41,17 @@ const {
|
|
|
34
41
|
@include component('heading') {
|
|
35
42
|
margin: 0;
|
|
36
43
|
max-width: calc(var(--element-3) * 36);
|
|
44
|
+
scroll-margin: var(--space-4);
|
|
37
45
|
color: var(--foreground);
|
|
38
46
|
font-weight: var(--heading-font-weight);
|
|
47
|
+
font-size: var(--text-heading);
|
|
39
48
|
line-height: 1.1;
|
|
40
49
|
font-family: var(--heading-font-family);
|
|
41
50
|
letter-spacing: -0.025em;
|
|
42
51
|
text-decoration: none;
|
|
43
52
|
|
|
44
|
-
&.
|
|
45
|
-
|
|
46
|
-
font-size: var(--text-5);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&.level-2,
|
|
50
|
-
&.level-5 {
|
|
51
|
-
font-size: var(--text-4);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&.level-3,
|
|
55
|
-
&.level-6 {
|
|
56
|
-
font-size: var(--text-3);
|
|
53
|
+
&.contrast {
|
|
54
|
+
color: var(--foreground-contrast);
|
|
57
55
|
}
|
|
58
56
|
}
|
|
59
57
|
</style>
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
3
|
-
import
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
|
-
type Props<As extends HTMLTag = 'label'> = Polymorphic<{ as: As }> &
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
type Props<As extends HTMLTag = 'label'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
scheme?: 'light' | 'dark'
|
|
7
|
+
color?: 'base' | 'brand'
|
|
8
|
+
size?: 'sm' | 'md' | 'lg'
|
|
9
|
+
contrast?: boolean
|
|
10
|
+
html?: string
|
|
11
|
+
text?: string
|
|
12
|
+
}
|
|
11
13
|
|
|
12
14
|
const { as = 'label', ...rest } = Astro.props
|
|
13
15
|
---
|
|
14
16
|
|
|
15
|
-
<
|
|
17
|
+
<Component
|
|
16
18
|
class:list={['label']}
|
|
17
19
|
{as}
|
|
18
20
|
{...rest}
|
|
19
21
|
>
|
|
20
22
|
<slot />
|
|
21
|
-
</
|
|
23
|
+
</Component>
|
|
22
24
|
|
|
23
25
|
<style is:global lang="scss">
|
|
24
26
|
@import '../../css/utils.scss';
|
|
@@ -28,8 +30,12 @@ const { as = 'label', ...rest } = Astro.props
|
|
|
28
30
|
flex-direction: column;
|
|
29
31
|
color: var(--foreground);
|
|
30
32
|
font-weight: var(--font-weight);
|
|
31
|
-
font-size: var(--text-
|
|
33
|
+
font-size: var(--text-label);
|
|
32
34
|
font-family: var(--font-family);
|
|
33
35
|
text-align: left;
|
|
36
|
+
|
|
37
|
+
&.contrast {
|
|
38
|
+
color: var(--foreground-contrast);
|
|
39
|
+
}
|
|
34
40
|
}
|
|
35
41
|
</style>
|