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
@@ -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 { 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 = 'h2'> = Polymorphic<{ as: As }> &
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'
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 { as = 'h2', contrast = true, ...rest } = Astro.props
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(--element-3) * 36);
44
- scroll-margin: var(--space-4);
45
- color: var(--foreground);
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-size: var(--text-heading);
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
- &.contrast {
54
- color: var(--foreground-contrast);
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>
@@ -3,9 +3,8 @@ import type { HTMLTag, Polymorphic } from 'astro/types'
3
3
  import Component from '../_Component.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'label'> = Polymorphic<{ as: As }> & {
6
- scheme?: 'light' | 'dark'
7
- color?: 'base' | 'brand'
8
6
  size?: 'sm' | 'md' | 'lg'
7
+ color?: 'base' | 'brand'
9
8
  contrast?: boolean
10
9
  html?: string
11
10
  text?: string
@@ -28,14 +27,11 @@ const { as = 'label', ...rest } = Astro.props
28
27
  @include component('label') {
29
28
  display: flex;
30
29
  flex-direction: column;
31
- color: var(--foreground);
30
+ color: var(--text);
32
31
  font-weight: var(--font-weight);
33
- font-size: var(--text-label);
32
+ font-size: var(--text-1);
33
+ line-height: 1;
34
34
  font-family: var(--font-family);
35
35
  text-align: left;
36
-
37
- &.contrast {
38
- color: var(--foreground-contrast);
39
- }
40
36
  }
41
37
  </style>
@@ -1,20 +1,23 @@
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 = 'a'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Component> & {
7
- html?: string
8
- text?: string
9
- variant?: 'base' | 'muted' | 'accent'
10
- }
5
+ type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> & {
6
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
7
+ color?: 'base' | 'brand'
8
+ underline?: 'auto' | 'always' | 'hover' | 'none'
9
+ contrast?: boolean
10
+ html?: string
11
+ text?: string
12
+ }
11
13
 
12
- const { as = 'a', ...rest } = Astro.props
14
+ const { as = 'a', underline = 'auto', ...rest } = Astro.props
13
15
  ---
14
16
 
15
17
  <Component
16
18
  class:list={['link']}
17
19
  {as}
20
+ {underline}
18
21
  {...rest}
19
22
  >
20
23
  <slot />
@@ -28,16 +31,41 @@ const { as = 'a', ...rest } = Astro.props
28
31
  flex-wrap: wrap;
29
32
  align-items: center;
30
33
  gap: var(--space-2);
31
- color: var(--foreground);
34
+ cursor: pointer;
35
+ border: none;
36
+ background: none;
37
+ color: var(--text);
32
38
  font-weight: var(--font-weight);
33
- font-size: var(--text-body);
39
+ font-size: var(--text-2);
34
40
  font-family: var(--font-family);
35
- text-decoration: none;
36
- text-decoration-color: var(--border);
41
+ text-decoration-color: var(--border); // FIXME, werkt niet
37
42
  white-space: nowrap;
38
43
 
39
44
  &:hover {
45
+ color: var(--color-12);
46
+ }
47
+
48
+ &.underline-auto {
49
+ text-decoration: none;
50
+
51
+ &:is(p > &) {
52
+ text-decoration: underline;
53
+ }
54
+ }
55
+
56
+ &.underline-always {
40
57
  text-decoration: underline;
41
58
  }
59
+
60
+ &.underline-hover {
61
+ text-decoration: none;
62
+ &:hover {
63
+ text-decoration: underline;
64
+ }
65
+ }
66
+
67
+ &.underline-none {
68
+ text-decoration: none;
69
+ }
42
70
  }
43
71
  </style>
@@ -3,16 +3,15 @@ import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
3
  import Component from '../_Component.astro'
4
4
  import ListItem from './ListItem.astro'
5
5
 
6
- type Props<As extends HTMLTag = 'ul'> = Polymorphic<{ as: As }> &
7
- ComponentProps<typeof Component> & {
8
- html?: string
9
- text?: string
10
- variant?: 'base' | 'muted' | 'accent'
11
- items?: (
12
- | ComponentProps<typeof ListItem>
13
- | ComponentProps<typeof ListItem>['html']
14
- )[]
15
- }
6
+ type Props<As extends HTMLTag = 'ul'> = Polymorphic<{ as: As }> & {
7
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
8
+ color?: 'base' | 'brand'
9
+ contrast?: boolean
10
+ items?: (
11
+ | ComponentProps<typeof ListItem>
12
+ | ComponentProps<typeof ListItem>['html']
13
+ )[]
14
+ }
16
15
 
17
16
  const { as = 'ul', items, ...rest } = Astro.props
18
17
  ---
@@ -37,10 +36,10 @@ const { as = 'ul', items, ...rest } = Astro.props
37
36
  @include component('list') {
38
37
  display: flex;
39
38
  flex-direction: column;
40
- padding-left: var(--space-4);
41
- color: var(--foreground);
39
+ padding-left: var(--space-5);
40
+ color: var(--text);
42
41
  font-weight: var(--font-weight);
43
- font-size: var(--text-body);
42
+ font-size: var(--text-2);
44
43
  line-height: 1.625;
45
44
  font-family: var(--font-family);
46
45
  list-style-type: disc;
@@ -1,13 +1,14 @@
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 = 'li'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Component> & {
7
- html?: string
8
- text?: string
9
- variant?: 'base' | 'muted' | 'accent'
10
- }
5
+ type Props<As extends HTMLTag = 'li'> = Polymorphic<{ as: As }> & {
6
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
7
+ color?: 'base' | 'brand'
8
+ contrast?: boolean
9
+ html?: string
10
+ text?: string
11
+ }
11
12
 
12
13
  const { as = 'li', ...rest } = Astro.props
13
14
  ---
@@ -25,10 +26,10 @@ const { as = 'li', ...rest } = Astro.props
25
26
 
26
27
  @include component('list-item') {
27
28
  align-items: center;
28
- max-width: calc(var(--element-3) * 36);
29
- color: var(--foreground);
29
+ max-width: calc(var(--space-4) * 36);
30
+ color: var(--text);
30
31
  font-weight: var(--font-weight);
31
- font-size: var(--text-body);
32
+ font-size: var(--text-2);
32
33
  line-height: 1.625;
33
34
  font-family: var(--font-family);
34
35
  }
@@ -3,9 +3,8 @@ import type { HTMLTag, Polymorphic } from 'astro/types'
3
3
  import Component from '../_Component.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'p'> = Polymorphic<{ as: As }> & {
6
- scheme?: 'light' | 'dark'
6
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
7
7
  color?: 'base' | 'brand'
8
- size?: 'sm' | 'md' | 'lg' | 'xl'
9
8
  contrast?: boolean
10
9
  html?: string
11
10
  text?: string
@@ -27,15 +26,11 @@ const { as = 'p', ...rest } = Astro.props
27
26
 
28
27
  @include component('paragraph') {
29
28
  margin: 0;
30
- max-width: calc(var(--element-3) * 36);
31
- color: var(--foreground);
29
+ max-width: calc(var(--space-4) * 36);
30
+ color: var(--text);
32
31
  font-weight: var(--font-weight);
33
- font-size: var(--text-body);
32
+ font-size: var(--text-2);
34
33
  line-height: 1.625;
35
34
  font-family: var(--font-family);
36
-
37
- &.contrast {
38
- color: var(--foreground-contrast);
39
- }
40
35
  }
41
36
  </style>
@@ -1,13 +1,14 @@
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 = 'span'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Component> & {
7
- html?: string
8
- text?: string
9
- variant?: 'base' | 'muted' | 'accent'
10
- }
5
+ type Props<As extends HTMLTag = 'span'> = Polymorphic<{ as: As }> & {
6
+ size?: 'sm' | 'md' | 'lg'
7
+ color?: 'base' | 'brand'
8
+ contrast?: boolean
9
+ html?: string
10
+ text?: string
11
+ }
11
12
 
12
13
  const { as = 'span', ...rest } = Astro.props
13
14
  ---
@@ -25,10 +26,10 @@ const { as = 'span', ...rest } = Astro.props
25
26
 
26
27
  @include component('tagline') {
27
28
  margin: 0;
28
- max-width: calc(var(--element-3) * 36);
29
- color: var(--foreground);
29
+ max-width: calc(var(--space-4) * 36);
30
+ color: var(--text);
30
31
  font-weight: var(--font-weight);
31
- font-size: var(--text-label);
32
+ font-size: var(--text-1);
32
33
  line-height: 1.25;
33
34
  font-family: var(--font-family);
34
35
  }
@@ -3,9 +3,8 @@ import type { HTMLTag, Polymorphic } from 'astro/types'
3
3
  import Component from '../_Component.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'p'> = Polymorphic<{ as: As }> & {
6
- scheme?: 'light' | 'dark'
6
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
7
7
  color?: 'base' | 'brand'
8
- size?: 'sm' | 'md' | 'lg' | 'xl'
9
8
  contrast?: boolean
10
9
  html?: string
11
10
  text?: string
@@ -16,6 +15,7 @@ const { as = 'p', ...rest } = Astro.props
16
15
 
17
16
  <Component
18
17
  class:list={['text']}
18
+ {as}
19
19
  {...rest}
20
20
  >
21
21
  <slot />
@@ -26,15 +26,11 @@ const { as = 'p', ...rest } = Astro.props
26
26
 
27
27
  @include component('text') {
28
28
  margin: 0;
29
- max-width: calc(var(--element-3) * 36);
30
- color: var(--foreground);
29
+ max-width: calc(var(--space-4) * 36);
30
+ color: var(--text, var(--color-11));
31
31
  font-weight: var(--font-weight);
32
- font-size: var(--text-body);
32
+ font-size: var(--text-2);
33
33
  line-height: 1.625;
34
34
  font-family: var(--font-family);
35
-
36
- &.contrast {
37
- color: var(--foreground-contrast);
38
- }
39
35
  }
40
36
  </style>
@@ -1,5 +1,5 @@
1
1
  import { defineCollection, reference } from 'astro:content'
2
- import { pageSchema } from '../schemas/collection'
2
+ import { pageSchema } from '../schemas/schemas'
3
3
 
4
4
  const collection = defineCollection({
5
5
  type: 'content',