fulldev-ui 0.3.0-beta.3 → 0.3.3

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.
Files changed (91) hide show
  1. package/.astro/settings.json +1 -1
  2. package/package.json +10 -5
  3. package/src/components/_Block.astro +0 -5
  4. package/src/components/_Component.astro +10 -8
  5. package/src/components/_archive/Body.astro +2 -2
  6. package/src/components/_archive/Nav.astro +12 -0
  7. package/src/components/_todo/Form.astro +1 -1
  8. package/src/components/_todo/Prose.astro +7 -7
  9. package/src/components/base/Badge.astro +20 -16
  10. package/src/components/base/Button.astro +21 -34
  11. package/src/components/base/Icon.astro +7 -7
  12. package/src/components/base/Image.astro +116 -42
  13. package/src/components/base/Logo.astro +2 -3
  14. package/src/components/base/Rating.astro +30 -29
  15. package/src/components/base/checkbox/Checkbox.astro +52 -0
  16. package/src/components/base/checkbox/CheckboxElement.astro +31 -0
  17. package/src/components/base/input/Input.astro +79 -0
  18. package/src/components/base/input/InputElement.astro +60 -0
  19. package/src/components/base/radio/Radio.astro +66 -0
  20. package/src/components/base/radio/RadioElement.astro +34 -0
  21. package/src/components/base/select/Select.astro +90 -0
  22. package/src/components/base/select/SelectElement.astro +56 -0
  23. package/src/components/base/select/SelectOption.astro +32 -0
  24. package/src/components/base/switch/Switch.astro +55 -0
  25. package/src/components/base/{Switch.astro → switch/SwitchElement.astro} +15 -13
  26. package/src/components/base/table/Table.astro +55 -0
  27. package/src/components/base/table/TableBody.astro +39 -0
  28. package/src/components/base/table/TableCell.astro +30 -0
  29. package/src/components/base/table/TableFooter.astro +48 -0
  30. package/src/components/base/table/TableHead.astro +31 -0
  31. package/src/components/base/table/TableHeader.astro +44 -0
  32. package/src/components/base/table/TableRow.astro +46 -0
  33. package/src/components/base/textarea/Textarea.astro +79 -0
  34. package/src/components/base/textarea/TextareaElement.astro +61 -0
  35. package/src/components/segment/Card.astro +42 -19
  36. package/src/components/segment/Footer.astro +88 -0
  37. package/src/components/segment/Header.astro +48 -19
  38. package/src/components/segment/Section.astro +66 -32
  39. package/src/components/segment/_regels.md +32 -0
  40. package/src/components/structure/Bento.astro +38 -0
  41. package/src/components/structure/Box.astro +30 -0
  42. package/src/components/structure/Carousel.astro +55 -0
  43. package/src/components/structure/Column.astro +46 -0
  44. package/src/components/structure/Grid.astro +33 -0
  45. package/src/components/structure/Masonry.astro +42 -0
  46. package/src/components/structure/Row.astro +44 -0
  47. package/src/components/structure/Split.astro +54 -0
  48. package/src/components/structure/Spread.astro +45 -0
  49. package/src/components/structure/Wrap.astro +44 -0
  50. package/src/components/typography/Heading.astro +37 -28
  51. package/src/components/typography/Label.astro +4 -8
  52. package/src/components/typography/Link.astro +40 -12
  53. package/src/components/typography/List.astro +12 -13
  54. package/src/components/typography/ListItem.astro +11 -10
  55. package/src/components/typography/Paragraph.astro +4 -9
  56. package/src/components/typography/Tagline.astro +11 -10
  57. package/src/components/typography/Text.astro +5 -9
  58. package/src/content/config.ts +1 -1
  59. package/src/css/color.scss +289 -0
  60. package/src/css/size.scss +293 -0
  61. package/src/css/space.scss +94 -0
  62. package/src/css/styles.css +1 -2
  63. package/src/index.ts +30 -12
  64. package/src/integration/tailwind.ts +34 -0
  65. package/src/integration/unocss.ts +38 -0
  66. package/src/schemas/schemas.ts +45 -0
  67. package/src/components/_archive/Row.astro +0 -26
  68. package/src/components/_todo/Footer.astro +0 -66
  69. package/src/components/_todo/todo.md +0 -10
  70. package/src/components/base/Checkbox.astro +0 -41
  71. package/src/components/base/Input.astro +0 -59
  72. package/src/components/base/Radio.astro +0 -39
  73. package/src/components/base/Select.astro +0 -69
  74. package/src/components/base/SelectOption.astro +0 -27
  75. package/src/components/base/Textarea.astro +0 -34
  76. package/src/components/base/todo.md +0 -7
  77. package/src/components/segment/Box.astro +0 -41
  78. package/src/components/segment/Deck.astro +0 -40
  79. package/src/components/segment/Group.astro +0 -29
  80. package/src/components/typography/todo.md +0 -3
  81. package/src/css/color.css +0 -88
  82. package/src/css/props/align.scss +0 -20
  83. package/src/css/props/frame.scss +0 -153
  84. package/src/css/props/mask +0 -1
  85. package/src/css/props/position.scss +0 -33
  86. package/src/css/props/ratio +0 -1
  87. package/src/css/props/structure.scss +0 -228
  88. package/src/css/props/variant.scss +0 -130
  89. package/src/css/radix.css +0 -281
  90. package/src/css/size.css +0 -334
  91. /package/src/schemas/{collection.ts → collection-old-schemas.ts} +0 -0
@@ -1,21 +1,20 @@
1
1
  ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
2
+ import type { HTMLTag, Polymorphic } from 'astro/types'
3
3
  import Component from '../_Component.astro'
4
4
 
5
- type Props<As extends HTMLTag = 'header'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Component> & {
7
- structure?: 'spread' | 'group' | 'column'
8
- position?: 'relative' | 'sticky' | 'fixed' | 'absolute'
9
- variant?: 'base' | 'raised'
10
- frame?: 'wrapper' | 'container' | 'panel'
11
- align?: 'start' | 'center' | 'end'
12
- }
5
+ type Props<As extends HTMLTag = 'header'> = Polymorphic<{ as: As }> & {
6
+ structure?: 'spread' | 'row' | 'column'
7
+ position?: 'relative' | 'sticky' | 'fixed' | 'absolute'
8
+ variant?: 'ghost' | 'subtle' | 'soft' | 'surface' | 'outline'
9
+ frame?: 'fill' | 'panel'
10
+ align?: 'start' | 'center' | 'end'
11
+ }
13
12
 
14
13
  const {
15
14
  as = 'header',
16
15
  structure = 'spread',
17
- density = 'compact',
18
- frame = 'wrapper',
16
+ frame = 'fill',
17
+ variant = 'subtle',
19
18
  compact = true,
20
19
  ...rest
21
20
  } = Astro.props
@@ -24,9 +23,10 @@ const {
24
23
  <Component
25
24
  class:list={['header']}
26
25
  {as}
27
- {density}
28
26
  {frame}
29
27
  {compact}
28
+ {structure}
29
+ {variant}
30
30
  {...rest}
31
31
  >
32
32
  <slot />
@@ -36,7 +36,8 @@ const {
36
36
  @import '../../css/utils.scss';
37
37
 
38
38
  @include component('header') {
39
- --inner: var(--element-3);
39
+ --screen: 1536px;
40
+ --gutter: max(4vw, calc(100vw - var(--screen)) / 2);
40
41
 
41
42
  display: flex;
42
43
  top: 0;
@@ -45,14 +46,30 @@ const {
45
46
  justify-content: space-between;
46
47
  align-items: center;
47
48
  z-index: 10;
48
- background: var(--background);
49
- padding-top: var(--element-3);
50
- padding-bottom: var(--element-3);
49
+ border-bottom: 1px solid var(--border);
50
+ background-color: var(--background);
51
+ padding-top: var(--space-4);
52
+ padding-bottom: var(--space-4);
51
53
  width: 100%;
52
54
 
53
- // &.panel {
54
- // margin-top: var(--inner);
55
- // }
55
+ &.frame-fill {
56
+ padding-top: var(--space-4);
57
+ padding-right: var(--gutter);
58
+ padding-bottom: var(--space-4);
59
+ padding-left: var(--gutter);
60
+ }
61
+
62
+ &.frame-panel {
63
+ margin-top: var(--space-2);
64
+ margin-right: var(--gutter);
65
+ margin-left: var(--gutter);
66
+ border: 1px solid var(--border);
67
+ border-radius: var(--radius-3);
68
+ padding-top: var(--space-2);
69
+ padding-right: var(--space-4);
70
+ padding-bottom: var(--space-2);
71
+ padding-left: var(--space-4);
72
+ }
56
73
 
57
74
  &.position-fixed {
58
75
  position: fixed;
@@ -65,5 +82,17 @@ const {
65
82
  &.position-sticky {
66
83
  position: sticky;
67
84
  }
85
+
86
+ &.align-start {
87
+ align-items: flex-start;
88
+ }
89
+
90
+ &.align-center {
91
+ align-items: center;
92
+ }
93
+
94
+ &.align-end {
95
+ align-items: flex-end;
96
+ }
68
97
  }
69
98
  </style>
@@ -1,32 +1,24 @@
1
1
  ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
2
+ import type { HTMLTag, Polymorphic } from 'astro/types'
3
3
  import Component from '../_Component.astro'
4
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?: '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'
23
- }
5
+ type Props<As extends HTMLTag = 'section'> = Polymorphic<{ as: As }> & {
6
+ scheme?: 'light' | 'dark'
7
+ color?: 'base' | 'brand'
8
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
9
+ compact?: boolean
10
+ frame?: 'fill' | 'viewport' | 'contain' | 'panel'
11
+ variant?: 'ghost' | 'subtle' | 'outline' | 'soft' | 'solid' | 'surface'
12
+ align?: 'start' | 'center' | 'end'
13
+ structure?: 'column' | 'split' | 'spread' | 'row'
14
+ }
24
15
 
25
16
  const {
26
- frame = 'wrapper',
27
- structure = 'column',
28
- variant = frame === 'panel' ? 'subtle' : 'fill',
29
17
  as = 'div',
18
+ frame = 'fill',
19
+ structure = 'column',
20
+ variant = 'ghost',
21
+ align = 'start',
30
22
  ...rest
31
23
  } = Astro.props
32
24
  ---
@@ -36,6 +28,7 @@ const {
36
28
  {as}
37
29
  {frame}
38
30
  {variant}
31
+ {align}
39
32
  {structure}
40
33
  {...rest}
41
34
  >
@@ -46,23 +39,64 @@ const {
46
39
  @import '../../css/utils.scss';
47
40
 
48
41
  @include component('section') {
49
- --inner-y: var(--space-6);
42
+ --screen: 1536px;
43
+ --gutter: max(4vw, calc(100vw - var(--screen)) / 2);
50
44
 
51
45
  position: relative;
52
- padding-top: var(--inner-y);
53
- padding-bottom: var(--inner-y);
46
+ margin: var(--outer-y) var(--outer-x);
47
+ background-color: var(--background);
48
+ padding: var(--inner-y) var(--inner-x);
49
+ width: 100%;
50
+ max-width: calc(100% - (2 * var(--outer-x)));
51
+
52
+ &.frame-fill {
53
+ --inner-x: var(--gutter);
54
+ --outer-x: 0;
55
+ --inner-y: var(--space-7);
56
+ --outer-y: 0;
57
+ }
58
+
59
+ &.frame-viewport {
60
+ --inner-x: var(--gutter);
61
+ --outer-x: 0;
62
+ --inner-y: var(--space-7);
63
+ --outer-y: 0;
64
+
65
+ min-height: 100vh;
66
+ }
54
67
 
55
- &.frame-wrapper {
56
- background-color: var(--background);
68
+ &.frame-contain {
69
+ --inner-x: max(4vw, var(--space-7));
70
+ --outer-x: max(0px, calc(var(--gutter) - var(--inner-x)));
71
+ --inner-y: var(--space-7);
72
+ --outer-y: 0;
57
73
  }
58
74
 
59
75
  &.frame-panel {
60
- margin-top: var(--inner-y);
61
- margin-bottom: var(--inner-y);
76
+ --inner-x: min(4vw, var(--space-7));
77
+ --outer-x: var(--gutter);
78
+ --inner-y: var(--space-7);
79
+ --outer-y: var(--space-7);
80
+
81
+ border: 1px solid var(--border);
82
+ border-radius: var(--radius-3);
83
+ }
84
+
85
+ &.align-start {
86
+ align-items: flex-start;
87
+ }
88
+
89
+ &.align-center {
90
+ align-items: center;
91
+ text-align: center;
92
+
93
+ & > * > * {
94
+ text-align: left;
95
+ }
62
96
  }
63
97
 
64
- &:not(.frame-panel) {
65
- box-shadow: none !important;
98
+ &.align-end {
99
+ align-items: flex-end;
66
100
  }
67
101
  }
68
102
  </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>
@@ -0,0 +1,30 @@
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
+ scheme?: 'light' | 'dark'
7
+ color?: 'base' | 'brand'
8
+ size?: 'sm' | 'md' | 'lg'
9
+ compact?: boolean
10
+ frame?: 'container' | 'wrapper' | 'panel' | 'viewport' | 'card' | 'none'
11
+ variant?: 'fill' | 'subtle' | 'outline' | 'soft' | 'solid' | 'surface'
12
+ }
13
+
14
+ const { ...rest } = Astro.props
15
+ ---
16
+
17
+ <Component
18
+ class:list={['box']}
19
+ {...rest}
20
+ >
21
+ <slot />
22
+ </Component>
23
+
24
+ <style is:global lang="scss">
25
+ @import '../../css/utils.scss';
26
+
27
+ @include component('box') {
28
+ position: relative;
29
+ }
30
+ </style>
@@ -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>