fulldev-ui 0.3.0-beta.3 → 0.3.2
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 +1 -1
- package/package.json +10 -5
- package/src/components/_Block.astro +0 -5
- package/src/components/_Component.astro +10 -8
- package/src/components/_archive/Body.astro +2 -2
- package/src/components/_archive/Nav.astro +12 -0
- package/src/components/_todo/Form.astro +1 -1
- package/src/components/_todo/Prose.astro +7 -7
- package/src/components/base/Badge.astro +20 -16
- package/src/components/base/Button.astro +21 -34
- package/src/components/base/Icon.astro +3 -2
- package/src/components/base/Image.astro +116 -42
- package/src/components/base/Logo.astro +1 -1
- package/src/components/base/Rating.astro +27 -25
- package/src/components/base/checkbox/Checkbox.astro +52 -0
- package/src/components/base/checkbox/CheckboxElement.astro +31 -0
- package/src/components/base/input/Input.astro +79 -0
- package/src/components/base/input/InputElement.astro +60 -0
- package/src/components/base/radio/Radio.astro +66 -0
- package/src/components/base/radio/RadioElement.astro +34 -0
- package/src/components/base/select/Select.astro +90 -0
- package/src/components/base/select/SelectElement.astro +56 -0
- package/src/components/base/select/SelectOption.astro +32 -0
- package/src/components/base/switch/Switch.astro +55 -0
- package/src/components/base/{Switch.astro → switch/SwitchElement.astro} +15 -13
- package/src/components/base/table/Table.astro +55 -0
- package/src/components/base/table/TableBody.astro +39 -0
- package/src/components/base/table/TableCell.astro +30 -0
- package/src/components/base/table/TableFooter.astro +48 -0
- package/src/components/base/table/TableHead.astro +31 -0
- package/src/components/base/table/TableHeader.astro +44 -0
- package/src/components/base/table/TableRow.astro +46 -0
- package/src/components/base/textarea/Textarea.astro +79 -0
- package/src/components/base/textarea/TextareaElement.astro +61 -0
- package/src/components/segment/Card.astro +28 -4
- package/src/components/segment/Footer.astro +88 -0
- package/src/components/segment/Header.astro +43 -13
- package/src/components/segment/Section.astro +60 -25
- package/src/components/segment/_regels.md +32 -0
- package/src/components/structure/Bento.astro +38 -0
- package/src/components/{segment → structure}/Box.astro +2 -12
- package/src/components/structure/Carousel.astro +55 -0
- package/src/components/structure/Column.astro +46 -0
- package/src/components/structure/Grid.astro +33 -0
- package/src/components/structure/Masonry.astro +42 -0
- package/src/components/structure/Row.astro +44 -0
- package/src/components/structure/Split.astro +54 -0
- package/src/components/structure/Spread.astro +45 -0
- package/src/components/structure/Wrap.astro +44 -0
- package/src/components/typography/Heading.astro +37 -28
- package/src/components/typography/Label.astro +4 -8
- package/src/components/typography/Link.astro +40 -12
- package/src/components/typography/List.astro +12 -13
- package/src/components/typography/ListItem.astro +11 -10
- package/src/components/typography/Paragraph.astro +4 -9
- package/src/components/typography/Tagline.astro +11 -10
- package/src/components/typography/Text.astro +5 -9
- package/src/css/color.scss +289 -0
- package/src/css/size.scss +293 -0
- package/src/css/space.scss +94 -0
- package/src/css/styles.css +1 -2
- package/src/index.ts +29 -11
- package/src/integration/tailwind.ts +34 -0
- package/src/integration/unocss.ts +38 -0
- package/src/components/_archive/Row.astro +0 -26
- package/src/components/_todo/Footer.astro +0 -66
- package/src/components/_todo/todo.md +0 -10
- package/src/components/base/Checkbox.astro +0 -41
- package/src/components/base/Input.astro +0 -59
- package/src/components/base/Radio.astro +0 -39
- package/src/components/base/Select.astro +0 -69
- package/src/components/base/SelectOption.astro +0 -27
- package/src/components/base/Textarea.astro +0 -34
- package/src/components/base/todo.md +0 -7
- package/src/components/segment/Deck.astro +0 -40
- package/src/components/segment/Group.astro +0 -29
- package/src/components/typography/todo.md +0 -3
- package/src/css/color.css +0 -88
- package/src/css/props/align.scss +0 -20
- package/src/css/props/frame.scss +0 -153
- package/src/css/props/mask +0 -1
- package/src/css/props/position.scss +0 -33
- package/src/css/props/ratio +0 -1
- package/src/css/props/structure.scss +0 -228
- package/src/css/props/variant.scss +0 -130
- package/src/css/radix.css +0 -281
- package/src/css/size.css +0 -334
|
@@ -6,27 +6,20 @@ type Props<As extends HTMLTag = 'section'> = Polymorphic<{ as: As }> &
|
|
|
6
6
|
ComponentProps<typeof Component> & {
|
|
7
7
|
scheme?: 'light' | 'dark'
|
|
8
8
|
color?: 'base' | 'brand'
|
|
9
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
9
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
10
10
|
compact?: boolean
|
|
11
|
-
frame?: '
|
|
12
|
-
variant?: '
|
|
13
|
-
align?: 'start' | 'center' | 'end'
|
|
14
|
-
structure?:
|
|
15
|
-
| 'row'
|
|
16
|
-
| 'column'
|
|
17
|
-
| 'split'
|
|
18
|
-
| 'spread'
|
|
19
|
-
| 'grid'
|
|
20
|
-
| 'bento'
|
|
21
|
-
| 'masonry'
|
|
22
|
-
| 'carousel'
|
|
11
|
+
frame?: 'fill' | 'viewport' | 'contain' | 'panel'
|
|
12
|
+
variant?: 'ghost' | 'subtle' | 'outline' | 'soft' | 'solid' | 'surface'
|
|
13
|
+
align?: 'start' | 'center' | 'end'
|
|
14
|
+
structure?: 'column' | 'split' | 'spread' | 'row'
|
|
23
15
|
}
|
|
24
16
|
|
|
25
17
|
const {
|
|
26
|
-
frame = 'wrapper',
|
|
27
|
-
structure = 'column',
|
|
28
|
-
variant = frame === 'panel' ? 'subtle' : 'fill',
|
|
29
18
|
as = 'div',
|
|
19
|
+
frame = 'fill',
|
|
20
|
+
structure = 'column',
|
|
21
|
+
variant = 'ghost',
|
|
22
|
+
align = 'start',
|
|
30
23
|
...rest
|
|
31
24
|
} = Astro.props
|
|
32
25
|
---
|
|
@@ -36,6 +29,7 @@ const {
|
|
|
36
29
|
{as}
|
|
37
30
|
{frame}
|
|
38
31
|
{variant}
|
|
32
|
+
{align}
|
|
39
33
|
{structure}
|
|
40
34
|
{...rest}
|
|
41
35
|
>
|
|
@@ -46,23 +40,64 @@ const {
|
|
|
46
40
|
@import '../../css/utils.scss';
|
|
47
41
|
|
|
48
42
|
@include component('section') {
|
|
49
|
-
--
|
|
43
|
+
--screen: 1536px;
|
|
44
|
+
--gutter: max(4vw, calc(100vw - var(--screen)) / 2);
|
|
50
45
|
|
|
51
46
|
position: relative;
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
margin: var(--outer-y) var(--outer-x);
|
|
48
|
+
background-color: var(--background);
|
|
49
|
+
padding: var(--inner-y) var(--inner-x);
|
|
50
|
+
width: 100%;
|
|
51
|
+
max-width: calc(100% - (2 * var(--outer-x)));
|
|
52
|
+
|
|
53
|
+
&.frame-fill {
|
|
54
|
+
--inner-x: var(--gutter);
|
|
55
|
+
--outer-x: 0;
|
|
56
|
+
--inner-y: var(--space-7);
|
|
57
|
+
--outer-y: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.frame-viewport {
|
|
61
|
+
--inner-x: var(--gutter);
|
|
62
|
+
--outer-x: 0;
|
|
63
|
+
--inner-y: var(--space-7);
|
|
64
|
+
--outer-y: 0;
|
|
65
|
+
|
|
66
|
+
min-height: 100vh;
|
|
67
|
+
}
|
|
54
68
|
|
|
55
|
-
&.frame-
|
|
56
|
-
|
|
69
|
+
&.frame-contain {
|
|
70
|
+
--inner-x: max(4vw, var(--space-7));
|
|
71
|
+
--outer-x: max(0px, calc(var(--gutter) - var(--inner-x)));
|
|
72
|
+
--inner-y: var(--space-7);
|
|
73
|
+
--outer-y: 0;
|
|
57
74
|
}
|
|
58
75
|
|
|
59
76
|
&.frame-panel {
|
|
60
|
-
|
|
61
|
-
|
|
77
|
+
--inner-x: min(4vw, var(--space-7));
|
|
78
|
+
--outer-x: var(--gutter);
|
|
79
|
+
--inner-y: var(--space-7);
|
|
80
|
+
--outer-y: var(--space-7);
|
|
81
|
+
|
|
82
|
+
border: 1px solid var(--border);
|
|
83
|
+
border-radius: var(--radius-3);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.align-start {
|
|
87
|
+
align-items: flex-start;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.align-center {
|
|
91
|
+
align-items: center;
|
|
92
|
+
text-align: center;
|
|
93
|
+
|
|
94
|
+
& > * > * {
|
|
95
|
+
text-align: left;
|
|
96
|
+
}
|
|
62
97
|
}
|
|
63
98
|
|
|
64
|
-
|
|
65
|
-
|
|
99
|
+
&.align-end {
|
|
100
|
+
align-items: flex-end;
|
|
66
101
|
}
|
|
67
102
|
}
|
|
68
103
|
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Kan je een collectie Section maken? Ja: Hero, Cta etc
|
|
2
|
+
Kan je een collectie Cards maken? Ja: Product, Post etc
|
|
3
|
+
|
|
4
|
+
Kan je een collectie ... maken? Zo ja = segment.
|
|
5
|
+
Segments omschrijven super duidelijk de content.
|
|
6
|
+
Group is een voorbeeld van een slechte section, want niemand wat hier in zit.
|
|
7
|
+
|
|
8
|
+
Deze segments willen we uiteindelijk hebben:
|
|
9
|
+
|
|
10
|
+
- Card
|
|
11
|
+
- Section
|
|
12
|
+
- Header
|
|
13
|
+
- Banner
|
|
14
|
+
- Sidebar
|
|
15
|
+
- Layout
|
|
16
|
+
- Deck
|
|
17
|
+
- Footer
|
|
18
|
+
|
|
19
|
+
Denk aan ProductCard, ProductSection, ProductLayout
|
|
20
|
+
|
|
21
|
+
Denk aan een block library met Sections, Cards, Sidebars, Header, Banners, Footer
|
|
22
|
+
|
|
23
|
+
Ze omschrijven ALLEMAAL duidelijk wat de content is.
|
|
24
|
+
|
|
25
|
+
Beschrijft het niet duidelijk de content? Beschrijft het wel duidelijk de structuur? >> structure
|
|
26
|
+
|
|
27
|
+
Waar structures 1 slot hebben, moeten segments meerdere slots krijgen. reden is dat de conten t hier bepalen is! Anders klopt de segment naam sws niet.
|
|
28
|
+
|
|
29
|
+
Section heeft bijv segment, writeup, actions, media.
|
|
30
|
+
Deck heeft bijv segment, writeup, actions, cards
|
|
31
|
+
|
|
32
|
+
Een segment kan goed uit meerdere structures bestaan, waar iedere slot een eigen structure heeft. Als segction structure spread bijv heeft wordt niet perse de hele section spread, maar de segment wel. Of kan ook met align stretch ipv structure
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
color?: 'base' | 'brand'
|
|
7
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
8
|
+
compact?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { ...rest } = Astro.props
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<Component
|
|
15
|
+
class:list={['bento']}
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
<slot />
|
|
19
|
+
</Component>
|
|
20
|
+
|
|
21
|
+
<style is:global lang="scss">
|
|
22
|
+
@import '../../css/utils.scss';
|
|
23
|
+
|
|
24
|
+
@include component('bento') {
|
|
25
|
+
display: grid;
|
|
26
|
+
position: relative;
|
|
27
|
+
grid-template-columns: 1fr;
|
|
28
|
+
width: 100%;
|
|
29
|
+
|
|
30
|
+
@media (min-width: 1024px) {
|
|
31
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
32
|
+
|
|
33
|
+
& > *:nth-child(2n) {
|
|
34
|
+
grid-column-start: span 2;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
@@ -2,24 +2,14 @@
|
|
|
2
2
|
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
3
|
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
|
-
type Props<As extends HTMLTag = '
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
|
|
6
6
|
ComponentProps<typeof Component> & {
|
|
7
7
|
scheme?: 'light' | 'dark'
|
|
8
8
|
color?: 'base' | 'brand'
|
|
9
9
|
size?: 'sm' | 'md' | 'lg'
|
|
10
10
|
compact?: boolean
|
|
11
|
-
frame?: 'container' | 'wrapper' | 'panel' | 'viewport' | 'none'
|
|
11
|
+
frame?: 'container' | 'wrapper' | 'panel' | 'viewport' | 'card' | 'none'
|
|
12
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
13
|
}
|
|
24
14
|
|
|
25
15
|
const { ...rest } = Astro.props
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
color?: 'base' | 'brand'
|
|
7
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
8
|
+
compact?: boolean
|
|
9
|
+
position?: 'inset'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { ...rest } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<Component
|
|
16
|
+
class:list={['carousel']}
|
|
17
|
+
{...rest}
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</Component>
|
|
21
|
+
|
|
22
|
+
<style is:global lang="scss">
|
|
23
|
+
@import '../../css/utils.scss';
|
|
24
|
+
|
|
25
|
+
@include component('carousel') {
|
|
26
|
+
--column-width: calc(16 * var(--space-4));
|
|
27
|
+
|
|
28
|
+
display: flex;
|
|
29
|
+
position: relative;
|
|
30
|
+
position: relative;
|
|
31
|
+
flex-direction: row;
|
|
32
|
+
align-items: flex-start;
|
|
33
|
+
gap: var(--space-4);
|
|
34
|
+
padding-bottom: var(--space-4);
|
|
35
|
+
width: 100%;
|
|
36
|
+
overflow-x: auto;
|
|
37
|
+
scroll-behavior: smooth;
|
|
38
|
+
scroll-snap-type: x mandatory;
|
|
39
|
+
|
|
40
|
+
> .full {
|
|
41
|
+
flex-grow: 0;
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
width: var(--column-width);
|
|
44
|
+
scroll-snap-align: center;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.position-inset {
|
|
48
|
+
margin-right: calc(var(--inner-x) * -1);
|
|
49
|
+
margin-left: calc(var(--inner-x) * -1);
|
|
50
|
+
padding-right: var(--inner-x);
|
|
51
|
+
padding-left: var(--inner-x);
|
|
52
|
+
width: calc(100% + var(--inner-x) * 2);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
color?: 'base' | 'brand'
|
|
7
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
8
|
+
compact?: boolean
|
|
9
|
+
align?: 'start' | 'center' | 'end'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { align = 'start', ...rest } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<Component
|
|
16
|
+
class:list={['column']}
|
|
17
|
+
{align}
|
|
18
|
+
{...rest}
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</Component>
|
|
22
|
+
|
|
23
|
+
<style is:global lang="scss">
|
|
24
|
+
@import '../../css/utils.scss';
|
|
25
|
+
@import '../../css/space.scss';
|
|
26
|
+
|
|
27
|
+
@include component('column') {
|
|
28
|
+
@include space-y;
|
|
29
|
+
|
|
30
|
+
display: flex;
|
|
31
|
+
position: relative;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
|
|
34
|
+
&.align-start {
|
|
35
|
+
align-items: flex-start;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.align-center {
|
|
39
|
+
align-items: center;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.align-end {
|
|
43
|
+
align-items: flex-end;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
color?: 'base' | 'brand'
|
|
7
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
8
|
+
compact?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { ...rest } = Astro.props
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<Component
|
|
15
|
+
class:list={['grid']}
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
<slot />
|
|
19
|
+
</Component>
|
|
20
|
+
|
|
21
|
+
<style is:global lang="scss">
|
|
22
|
+
@import '../../css/utils.scss';
|
|
23
|
+
|
|
24
|
+
@include component('grid') {
|
|
25
|
+
--column-width: calc(15 * var(--space-4));
|
|
26
|
+
|
|
27
|
+
display: grid;
|
|
28
|
+
position: relative;
|
|
29
|
+
grid-template-columns: repeat(auto-fit, minmax(var(--column-width), 1fr));
|
|
30
|
+
gap: var(--space-4);
|
|
31
|
+
width: 100%;
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
color?: 'base' | 'brand'
|
|
7
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
8
|
+
compact?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { ...rest } = Astro.props
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<Component
|
|
15
|
+
class:list={['masonry']}
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
<slot />
|
|
19
|
+
</Component>
|
|
20
|
+
|
|
21
|
+
<style is:global lang="scss">
|
|
22
|
+
@import '../../css/utils.scss';
|
|
23
|
+
|
|
24
|
+
@include component('masonry') {
|
|
25
|
+
--column-width: calc(16 * var(--space-4));
|
|
26
|
+
--gap: var(--space-4);
|
|
27
|
+
|
|
28
|
+
position: relative;
|
|
29
|
+
column-gap: var(--gap);
|
|
30
|
+
column-fill: balance;
|
|
31
|
+
column-width: var(--column-width);
|
|
32
|
+
column-count: 6;
|
|
33
|
+
break-inside: avoid;
|
|
34
|
+
width: 100%;
|
|
35
|
+
|
|
36
|
+
& > .full + .full {
|
|
37
|
+
break-inside: avoid;
|
|
38
|
+
margin-top: var(--gap);
|
|
39
|
+
margin-bottom: var(--gap);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
color?: 'base' | 'brand'
|
|
7
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
8
|
+
compact?: boolean
|
|
9
|
+
align?: 'start' | 'center' | 'end'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { align = 'center', ...rest } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<Component
|
|
16
|
+
class:list={['row']}
|
|
17
|
+
{align}
|
|
18
|
+
{...rest}
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</Component>
|
|
22
|
+
|
|
23
|
+
<style is:global lang="scss">
|
|
24
|
+
@import '../../css/utils.scss';
|
|
25
|
+
@import '../../css/space.scss';
|
|
26
|
+
|
|
27
|
+
@include component('row') {
|
|
28
|
+
@include space-x;
|
|
29
|
+
|
|
30
|
+
display: flex;
|
|
31
|
+
|
|
32
|
+
&.align-start {
|
|
33
|
+
align-items: flex-start;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.align-center {
|
|
37
|
+
align-items: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.align-end {
|
|
41
|
+
align-items: flex-end;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
color?: 'base' | 'brand'
|
|
7
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
8
|
+
compact?: boolean
|
|
9
|
+
align?: 'start' | 'center' | 'end'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { align = 'center', ...rest } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<Component
|
|
16
|
+
class:list={['split']}
|
|
17
|
+
{align}
|
|
18
|
+
{...rest}
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</Component>
|
|
22
|
+
|
|
23
|
+
<style is:global lang="scss">
|
|
24
|
+
@import '../../css/utils.scss';
|
|
25
|
+
@import '../../css/space.scss';
|
|
26
|
+
|
|
27
|
+
@include component('split') {
|
|
28
|
+
display: grid;
|
|
29
|
+
grid-template-columns: 1fr;
|
|
30
|
+
column-gap: var(--space-6);
|
|
31
|
+
width: 100%;
|
|
32
|
+
|
|
33
|
+
@media (max-width: 1023.9999px) {
|
|
34
|
+
@include space-y;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (min-width: 1024px) {
|
|
38
|
+
grid-auto-columns: 1fr;
|
|
39
|
+
grid-auto-flow: column;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.align-start {
|
|
43
|
+
align-items: flex-start;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.align-center {
|
|
47
|
+
align-items: center;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.align-end {
|
|
51
|
+
align-items: flex-end;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
color?: 'base' | 'brand'
|
|
7
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
8
|
+
compact?: boolean
|
|
9
|
+
align?: 'start' | 'center' | 'end'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { align = 'center', ...rest } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<Component
|
|
16
|
+
class:list={['spread']}
|
|
17
|
+
{align}
|
|
18
|
+
{...rest}
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</Component>
|
|
22
|
+
|
|
23
|
+
<style is:global lang="scss">
|
|
24
|
+
@import '../../css/utils.scss';
|
|
25
|
+
|
|
26
|
+
@include component('spread') {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-wrap: wrap;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
gap: var(--space-5);
|
|
31
|
+
width: 100%;
|
|
32
|
+
|
|
33
|
+
&.align-start {
|
|
34
|
+
align-items: flex-start;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.align-center {
|
|
38
|
+
align-items: center;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.align-end {
|
|
42
|
+
align-items: flex-end;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Component from '../_Component.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
color?: 'base' | 'brand'
|
|
7
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
8
|
+
compact?: boolean
|
|
9
|
+
align?: 'start' | 'center' | 'end'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { align = 'center', ...rest } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<Component
|
|
16
|
+
class:list={['wrap']}
|
|
17
|
+
{align}
|
|
18
|
+
{...rest}
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</Component>
|
|
22
|
+
|
|
23
|
+
<style is:global lang="scss">
|
|
24
|
+
@import '../../css/utils.scss';
|
|
25
|
+
|
|
26
|
+
@include component('wrap') {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-wrap: wrap;
|
|
29
|
+
justify-content: stretch;
|
|
30
|
+
gap: var(--space-2);
|
|
31
|
+
|
|
32
|
+
&.align-start {
|
|
33
|
+
align-items: flex-start;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.align-center {
|
|
37
|
+
align-items: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.align-end {
|
|
41
|
+
align-items: flex-end;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -1,35 +1,24 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
3
|
import Component from '../_Component.astro'
|
|
4
4
|
|
|
5
|
-
type Props<As extends HTMLTag = 'h2'> = Polymorphic<{ as: As }> &
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
| 'lg'
|
|
14
|
-
| 'xl'
|
|
15
|
-
| '2xl'
|
|
16
|
-
| '3xl'
|
|
17
|
-
| '4xl'
|
|
18
|
-
| '5xl'
|
|
19
|
-
| '6xl'
|
|
20
|
-
html?: string
|
|
21
|
-
text?: string
|
|
22
|
-
contrast?: boolean
|
|
23
|
-
variant?: 'base' | 'muted' | 'accent'
|
|
24
|
-
}
|
|
5
|
+
type Props<As extends HTMLTag = 'h2'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl'
|
|
7
|
+
color?: 'base' | 'brand'
|
|
8
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6
|
|
9
|
+
contrast?: boolean
|
|
10
|
+
html?: string
|
|
11
|
+
text?: string
|
|
12
|
+
}
|
|
25
13
|
|
|
26
|
-
const {
|
|
14
|
+
const { level = 2, as = `h${level}`, contrast = true, ...rest } = Astro.props
|
|
27
15
|
---
|
|
28
16
|
|
|
29
17
|
<Component
|
|
30
18
|
class:list={['heading']}
|
|
31
19
|
{as}
|
|
32
20
|
{contrast}
|
|
21
|
+
{level}
|
|
33
22
|
{...rest}
|
|
34
23
|
>
|
|
35
24
|
<slot />
|
|
@@ -40,18 +29,38 @@ const { as = 'h2', contrast = true, ...rest } = Astro.props
|
|
|
40
29
|
|
|
41
30
|
@include component('heading') {
|
|
42
31
|
margin: 0;
|
|
43
|
-
max-width: calc(var(--
|
|
44
|
-
scroll-margin: var(--space-
|
|
45
|
-
color: var(--
|
|
32
|
+
max-width: calc(var(--space-4) * 36);
|
|
33
|
+
scroll-margin: var(--space-5);
|
|
34
|
+
color: var(--text);
|
|
46
35
|
font-weight: var(--heading-font-weight);
|
|
47
|
-
font-
|
|
36
|
+
font-weight: 700;
|
|
48
37
|
line-height: 1.1;
|
|
49
38
|
font-family: var(--heading-font-family);
|
|
50
39
|
letter-spacing: -0.025em;
|
|
51
40
|
text-decoration: none;
|
|
52
41
|
|
|
53
|
-
&.
|
|
54
|
-
|
|
42
|
+
&.level-1 {
|
|
43
|
+
font-size: var(--text-7);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.level-2 {
|
|
47
|
+
font-size: var(--text-6);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.level-3 {
|
|
51
|
+
font-size: var(--text-5);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.level-4 {
|
|
55
|
+
font-size: var(--text-4);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&.level-5 {
|
|
59
|
+
font-size: var(--text-3);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.level-6 {
|
|
63
|
+
font-size: var(--text-2);
|
|
55
64
|
}
|
|
56
65
|
}
|
|
57
66
|
</style>
|