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.
Files changed (102) hide show
  1. package/.astro/settings.json +5 -0
  2. package/.astro/types.d.ts +3 -12
  3. package/.env +1 -0
  4. package/astro.config.mjs +1 -2
  5. package/package.json +4 -7
  6. package/src/_archive/Childmorphic.ts +8 -0
  7. package/src/_archive/getAllCollections.ts +10 -0
  8. package/src/_archive/getCollectionCascade.ts +33 -0
  9. package/src/_archive/getPathname.ts +18 -0
  10. package/src/_archive/staticPageSchema.ts +124 -0
  11. package/src/_archive/transform/transform.ts +25 -0
  12. package/src/_archive/transform/transformCasing.ts +24 -0
  13. package/src/_archive/transform/transformReferences.ts +54 -0
  14. package/src/_archive/transform/transformSelfs.ts +20 -0
  15. package/src/_archive/transform/transformUnderscores.ts +19 -0
  16. package/src/components/_Block.astro +2 -0
  17. package/src/components/{_Tag.astro → _Component.astro} +18 -9
  18. package/src/components/{segment → _archive}/Body.astro +7 -5
  19. package/src/components/{segment → _archive}/Main.astro +4 -4
  20. package/src/components/{segment → _archive}/Nav.astro +5 -5
  21. package/src/components/{structure → _archive}/Row.astro +4 -4
  22. package/src/components/_todo/Footer.astro +66 -0
  23. package/src/components/{segment → _todo}/Form.astro +6 -6
  24. package/src/components/{segment → _todo}/Prose.astro +20 -20
  25. package/src/components/{segment → _todo}/Writeup.astro +4 -4
  26. package/src/components/{segment → _todo}/todo.md +3 -1
  27. package/src/components/base/Badge.astro +6 -6
  28. package/src/components/base/Button.astro +37 -28
  29. package/src/components/base/Checkbox.astro +3 -4
  30. package/src/components/base/Icon.astro +5 -5
  31. package/src/components/base/Image.astro +19 -52
  32. package/src/components/base/Input.astro +12 -7
  33. package/src/components/base/Logo.astro +4 -4
  34. package/src/components/base/Radio.astro +3 -4
  35. package/src/components/base/Rating.astro +5 -5
  36. package/src/components/base/Select.astro +6 -6
  37. package/src/components/base/SelectOption.astro +1 -1
  38. package/src/components/base/Switch.astro +8 -7
  39. package/src/components/base/Textarea.astro +4 -3
  40. package/src/components/segment/Box.astro +41 -0
  41. package/src/components/segment/Card.astro +21 -35
  42. package/src/components/segment/Deck.astro +20 -16
  43. package/src/components/{structure → segment}/Group.astro +8 -7
  44. package/src/components/segment/Header.astro +18 -7
  45. package/src/components/segment/Section.astro +39 -37
  46. package/src/components/typography/Heading.astro +24 -26
  47. package/src/components/typography/Label.astro +17 -11
  48. package/src/components/typography/Link.astro +5 -5
  49. package/src/components/typography/List.astro +9 -6
  50. package/src/components/typography/ListItem.astro +5 -5
  51. package/src/components/typography/Paragraph.astro +17 -11
  52. package/src/components/typography/Tagline.astro +6 -5
  53. package/src/components/typography/Text.astro +40 -0
  54. package/src/{layouts → components/utility}/Layout.astro +6 -6
  55. package/src/content/config.ts +14 -0
  56. package/src/content/pages/index.md +1 -0
  57. package/src/css/color.css +88 -0
  58. package/src/css/props/align.scss +20 -0
  59. package/src/css/props/frame.scss +153 -0
  60. package/src/css/props/mask +1 -0
  61. package/src/css/props/position.scss +33 -0
  62. package/src/css/props/ratio +1 -0
  63. package/src/css/props/structure.scss +228 -0
  64. package/src/css/props/variant.scss +130 -0
  65. package/src/css/radix.css +281 -0
  66. package/src/css/size.css +334 -0
  67. package/src/css/styles.css +2 -2
  68. package/src/index.ts +13 -34
  69. package/src/integration/integration.ts +45 -0
  70. package/src/schemas/collection.ts +87 -0
  71. package/src/blocks/todo.md +0 -12
  72. package/src/components/_Plural.astro +0 -27
  73. package/src/components/base/Buttons.astro +0 -15
  74. package/src/components/base/Images.astro +0 -15
  75. package/src/components/segment/Footer.astro +0 -14
  76. package/src/components/structure/Bento.astro +0 -35
  77. package/src/components/structure/Carousel.astro +0 -43
  78. package/src/components/structure/Grid.astro +0 -30
  79. package/src/components/structure/Masonry.astro +0 -39
  80. package/src/components/structure/Split.astro +0 -41
  81. package/src/components/structure/Spread.astro +0 -48
  82. package/src/components/structure/Stack.astro +0 -90
  83. package/src/components/structure/todo.md +0 -5
  84. package/src/css/colors.css +0 -197
  85. package/src/css/main.css +0 -3
  86. package/src/css/sizes.css +0 -217
  87. package/src/layouts/todo.md +0 -2
  88. package/src/schemas/attributesSchema.ts +0 -125
  89. package/src/schemas/htmlAttributesSchema.ts +0 -126
  90. package/src/schemas/pageSchema.ts +0 -185
  91. package/src/schemas/staticPageSchema.ts +0 -124
  92. package/src/types/Childmorphic.ts +0 -8
  93. package/src/types/Pluralmorphic.ts +0 -7
  94. package/src/types/Structuremorphic.ts +0 -18
  95. package/src/utils/getAllCollections.ts +0 -10
  96. package/src/utils/getCollectionCascade.ts +0 -33
  97. package/src/utils/getPathname.ts +0 -18
  98. package/src/utils/transform/transform.ts +0 -25
  99. package/src/utils/transform/transformCasing.ts +0 -24
  100. package/src/utils/transform/transformReferences.ts +0 -54
  101. package/src/utils/transform/transformSelfs.ts +0 -20
  102. 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 Tag from '../_Tag.astro'
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 Tag> & {
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
- <Tag
18
+ <Component
19
19
  as="div"
20
20
  class:list="select-wrapper"
21
21
  {...rest}
22
22
  >
23
- <Tag
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
- </Tag>
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
- </Tag>
44
+ </Component>
45
45
 
46
46
  <style is:global lang="scss">
47
47
  @import '../../css/utils.scss';
@@ -20,7 +20,7 @@ const { text, ...rest } = Astro.props
20
20
  .full.option {
21
21
  color: var(--foreground);
22
22
  font-weight: var(--font-weight);
23
- font-size: var(--text-1);
23
+ font-size: var(--text-label);
24
24
  line-height: 1;
25
25
  font-family: var(--font-family);
26
26
  }
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Tag from '../_Tag.astro'
3
+ import Component from '../_Component.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'span'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Tag> & {
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
- <Tag
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
- </Tag>
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-1) + 2 * var(--element-1) * 2) + 2 * var(--space-1)
42
+ (var(--text-label) + 2 * var(--element-1) * 2) + 2 * var(--space-1)
42
43
  );
43
- height: calc(var(--text-1) + 2 * var(--element-1));
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(--primary-background);
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 Tag from '../_Tag.astro'
3
+ import Component from '../_Component.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'textarea'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Tag>
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
- <Tag
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 Tag from '../_Tag.astro'
3
+ import Component from '../_Component.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Tag> & {
7
- structure?: 'stack' | 'group' | 'split' | 'spread' | 'row'
6
+ ComponentProps<typeof Component> & {
7
+ structure?: 'column' | 'group' | 'split' | 'spread' | 'row'
8
8
  align?: 'start' | 'center' | 'end' | 'stretch'
9
- variant?: 'base' | 'raised' | 'primary'
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
- as = Astro.props.href ? 'a' : 'div',
16
- structure = 'stack',
17
- density = 'compact',
22
+ href,
23
+ as = href ? 'a' : 'div',
24
+ structure = 'column',
25
+ compact = true,
18
26
  frame = 'panel',
19
- variant = 'raised',
27
+ variant = frame === 'panel' ? 'subtle' : undefined,
20
28
  ...rest
21
29
  } = Astro.props
22
30
  ---
23
31
 
24
- <Tag
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
- </Tag>
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 { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Tag from '../_Tag.astro'
2
+ import type { HTMLTag, Polymorphic } from 'astro/types'
3
+ import Component from '../_Component.astro'
4
4
 
5
- type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Tag> & {
7
- structure?: 'grid' | 'carousel' | 'masonry' | 'bento'
8
- frame?: 'none' | 'fill' | 'inset'
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
- <Tag
17
+ <Component
15
18
  class:list={['deck']}
19
+ {as}
16
20
  {structure}
17
21
  {...rest}
18
22
  >
19
23
  <slot />
20
- </Tag>
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
- margin-right: calc(var(--space-gutter) * -1);
31
- margin-left: calc(var(--space-gutter) * -1);
32
- padding: 0 var(--space-gutter) var(--space-3);
33
- width: calc(100% + var(--space-gutter) * 2);
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 Tag from '../_Tag.astro'
3
+ import Component from '../_Component.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Tag>
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
- <Tag
15
+ <Component
12
16
  class:list={['group']}
13
17
  {...rest}
14
18
  >
15
19
  <slot />
16
- </Tag>
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 Tag from '../_Tag.astro'
3
+ import Component from '../_Component.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'header'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Tag> & {
7
- structure?: 'spread' | 'group' | 'stack'
6
+ ComponentProps<typeof Component> & {
7
+ structure?: 'spread' | 'group' | 'column'
8
8
  position?: 'relative' | 'sticky' | 'fixed' | 'absolute'
9
9
  variant?: 'base' | 'raised'
10
- frame?: 'fill' | 'panel'
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
- <Tag
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
- </Tag>
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(--space-3) var(--space-gutter);
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 Tag from '../_Tag.astro'
3
+ import Component from '../_Component.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'section'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Tag> & {
7
- structure?: 'stack' | 'split' | 'spread' | 'group'
8
- variant?: 'base' | 'raised' | 'primary'
9
- frame?: 'fill' | 'viewport' | 'panel'
10
- align?: 'start' | 'center' | 'end'
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
- as = 'section',
15
- structure = 'stack',
16
- align = 'start',
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
- <Tag
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
- </Tag>
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
- gap: var(--space-6) var(--space-5);
44
- background: var(--background);
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-panel {
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-viewport {
62
- height: auto;
63
- min-height: 100vh;
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 Tag from '../_Tag.astro'
3
+ import Component from '../_Component.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'h2'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Tag> & {
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
- <Tag
29
+ <Component
22
30
  class:list={['heading']}
23
- {level}
24
31
  {as}
25
- {density}
32
+ {contrast}
26
33
  {...rest}
27
34
  >
28
35
  <slot />
29
- </Tag>
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
- &.level-1,
45
- &.level-4 {
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 { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Tag from '../_Tag.astro'
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
- ComponentProps<typeof Tag> & {
7
- html?: string
8
- text?: string
9
- variant?: 'base' | 'muted' | 'accent'
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
- <Tag
17
+ <Component
16
18
  class:list={['label']}
17
19
  {as}
18
20
  {...rest}
19
21
  >
20
22
  <slot />
21
- </Tag>
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-1);
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>