fulldev-ui 0.1.65 → 0.2.10

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 (73) hide show
  1. package/package.json +4 -2
  2. package/src/components/_Children.astro +0 -7
  3. package/src/components/_Tag.astro +35 -14
  4. package/src/components/base/Badge.astro +21 -22
  5. package/src/components/base/Button.astro +21 -35
  6. package/src/components/base/Checkbox.astro +9 -6
  7. package/src/components/base/Icon.astro +23 -14
  8. package/src/components/base/Image.astro +47 -47
  9. package/src/components/base/Input.astro +18 -16
  10. package/src/components/base/Logo.astro +6 -4
  11. package/src/components/base/Radio.astro +8 -6
  12. package/src/components/base/Rating.astro +10 -7
  13. package/src/components/base/Select.astro +17 -13
  14. package/src/components/base/SelectOption.astro +5 -5
  15. package/src/components/base/Switch.astro +11 -12
  16. package/src/components/base/Textarea.astro +9 -7
  17. package/src/components/base/Video.astro +4 -4
  18. package/src/components/base/todo.md +1 -2
  19. package/src/components/{wrapper → segment}/Body.astro +13 -10
  20. package/src/components/segment/Card.astro +94 -0
  21. package/src/components/segment/Deck.astro +36 -0
  22. package/src/components/{wrapper → segment}/Footer.astro +2 -2
  23. package/src/components/segment/Form.astro +30 -0
  24. package/src/components/{wrapper → segment}/Header.astro +16 -34
  25. package/src/components/segment/Main.astro +28 -0
  26. package/src/components/segment/Nav.astro +30 -0
  27. package/src/components/{wrapper → segment}/Prose.astro +15 -15
  28. package/src/components/segment/Section.astro +66 -0
  29. package/src/components/{wrapper → segment}/Writeup.astro +8 -7
  30. package/src/components/segment/todo.md +8 -0
  31. package/src/components/structure/Bento.astro +35 -0
  32. package/src/components/structure/Carousel.astro +43 -0
  33. package/src/components/structure/Grid.astro +30 -0
  34. package/src/components/structure/Group.astro +28 -0
  35. package/src/components/structure/Masonry.astro +39 -0
  36. package/src/components/structure/Split.astro +41 -0
  37. package/src/components/structure/Spread.astro +48 -0
  38. package/src/components/structure/Stack.astro +90 -0
  39. package/src/components/structure/todo.md +5 -0
  40. package/src/components/typography/Heading.astro +37 -19
  41. package/src/components/typography/Label.astro +13 -14
  42. package/src/components/typography/Link.astro +15 -10
  43. package/src/components/typography/List.astro +16 -13
  44. package/src/components/typography/ListItem.astro +16 -11
  45. package/src/components/typography/Paragraph.astro +17 -20
  46. package/src/components/typography/Tagline.astro +17 -22
  47. package/src/components/typography/todo.md +1 -13
  48. package/src/css/colors.css +130 -263
  49. package/src/css/main.css +1 -2
  50. package/src/css/sizes.css +136 -198
  51. package/src/css/styles.css +15 -0
  52. package/src/css/utils.scss +16 -0
  53. package/src/index.ts +22 -15
  54. package/src/integration/integration.ts +39 -57
  55. package/src/layouts/Layout.astro +7 -3
  56. package/src/types/Structuremorphic.ts +18 -0
  57. package/src/components/typography/Links.astro +0 -15
  58. package/src/components/typography/_Typography.astro +0 -28
  59. package/src/components/utility/DecorativeBox.astro +0 -22
  60. package/src/components/wrapper/Card.astro +0 -144
  61. package/src/components/wrapper/Cards.astro +0 -15
  62. package/src/components/wrapper/Deck.astro +0 -133
  63. package/src/components/wrapper/Form.astro +0 -26
  64. package/src/components/wrapper/Group.astro +0 -26
  65. package/src/components/wrapper/Main.astro +0 -25
  66. package/src/components/wrapper/Nav.astro +0 -32
  67. package/src/components/wrapper/Section.astro +0 -110
  68. package/src/components/wrapper/Sections.astro +0 -15
  69. package/src/components/wrapper/_Wrapper.astro +0 -333
  70. package/src/components/wrapper/todo.md +0 -20
  71. package/src/css/border.css +0 -23
  72. package/src/css/font.css +0 -15
  73. package/src/css/reset.css +0 -388
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fulldev-ui",
3
- "version": "0.1.65",
3
+ "version": "0.2.10",
4
4
  "description": "A component library built for Astro",
5
5
  "homepage": "https://ui.full.dev",
6
6
  "bugs": "https://github.com/fulldotdev/ui/issues",
@@ -23,7 +23,8 @@
23
23
  "exports": {
24
24
  ".": "./src/index.ts",
25
25
  "./css": "./src/css/main.css",
26
- "./colors": "./src/css/colors.css"
26
+ "./colors": "./src/css/colors.css",
27
+ "./integration": "./src/integration/integration.ts"
27
28
  },
28
29
  "devDependencies": {
29
30
  "@astrojs/check": "^0.5.9",
@@ -40,6 +41,7 @@
40
41
  "radash": "^12.1.0",
41
42
  "remeda": "1.61.0",
42
43
  "sass": "^1.77.0",
44
+ "tailwindcss": "^3.4.4",
43
45
  "typescript": "^5.4.3",
44
46
  "vite-plugin-virtual": "^0.3.0"
45
47
  }
@@ -3,13 +3,10 @@ import { isObject, pascal } from 'radash'
3
3
  import { isArray, isString } from 'remeda'
4
4
 
5
5
  interface Props {
6
- render?: () => any
7
6
  [key: string]: any
8
7
  }
9
8
 
10
9
  const components = await Astro.glob('../**/*.astro')
11
- // const userComponents = await Astro.glob('/src/**/*.astro')
12
- // const components = [...userComponents, ...libraryComponents]
13
10
  ---
14
11
 
15
12
  {
@@ -20,10 +17,6 @@ const components = await Astro.glob('../**/*.astro')
20
17
 
21
18
  if (part === 'Text' && isString(value)) return value
22
19
  if (part === 'Html') return <Fragment set:html={value} />
23
- if (part === 'Content' && Astro.props.render) {
24
- const { Content } = Astro.props.render()
25
- return <Content />
26
- }
27
20
 
28
21
  const Component: any = components.find((component) => {
29
22
  const fileName = component.default.moduleId?.split('/').pop()
@@ -1,52 +1,73 @@
1
1
  ---
2
2
  interface Props {
3
3
  theme?: 'light' | 'dark' | string
4
- size?: 'sm' | 'md' | 'lg' | string
4
+ size?: 'sm' | 'md' | 'lg'
5
5
  density?: 'base' | 'compact' | string
6
6
  slot?: any
7
- if?: 'slot' | any
7
+ if?: 'content' | any
8
8
  [key: string | number | symbol]: any
9
9
  }
10
10
 
11
11
  const {
12
12
  as: As = 'div',
13
- if: ifProp = 'slot',
13
+ if: ifProp = 'content',
14
14
  theme,
15
15
  variant,
16
16
  density,
17
17
  size,
18
+ align,
19
+ position,
20
+ level,
21
+ frame,
22
+ ratio,
23
+ structure,
24
+ text,
25
+ html,
18
26
  ...rest
19
27
  } = Astro.props
20
28
 
21
29
  const slot = await Astro.slots.render('default')
22
- const render = ifProp === 'slot' ? slot?.trim().length > 0 : ifProp
30
+ const hasContent = (str?: string) => str && str.trim().length > 0
31
+ const render =
32
+ ifProp == 'content'
33
+ ? hasContent(slot) || hasContent(html) || hasContent(text)
34
+ : ifProp
23
35
  ---
24
36
 
25
37
  {
26
38
  render && (
27
39
  <As
28
40
  class:list={[
29
- 'full-tag',
41
+ 'full',
42
+ structure,
30
43
  {
31
- [`full-theme-${theme}`]: theme,
32
- [`full-variant-${variant}`]: variant,
33
- [`full-density-${density}`]: density,
34
- [`full-size-${size}`]: size,
44
+ [`theme-${theme}`]: theme,
45
+ [`variant-${variant}`]: variant,
46
+ [`density-${density}`]: density,
47
+ [`size-${size}`]: size,
48
+ [`align-${align}`]: align,
49
+ [`level-${level}`]: level,
50
+ [`position-${position}`]: position,
51
+ [`frame-${frame}`]: frame,
52
+ [`ratio-${ratio}`]: ratio,
35
53
  },
36
54
  ]}
37
55
  {...rest}
38
56
  >
57
+ <Fragment set:text={text} />
58
+ <Fragment set:html={html} />
39
59
  <Fragment set:html={slot} />
40
60
  </As>
41
61
  )
42
62
  }
43
63
 
44
- <style is:global>
45
- @import '../css/main.css';
46
- </style>
64
+ <style is:global lang="scss">
65
+ @import '../css/utils.scss';
66
+ @import '../css/colors.css';
67
+ @import '../css/styles.css';
68
+ @import '../css/sizes.css';
47
69
 
48
- <style is:global>
49
- .full-tag {
70
+ @include component('full') {
50
71
  z-index: 0;
51
72
  box-sizing: border-box;
52
73
  }
@@ -1,50 +1,49 @@
1
1
  ---
2
2
  import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import type { Childmorphic } from '../../types/Childmorphic'
4
- import Children from '../_Children.astro'
5
3
  import Tag from '../_Tag.astro'
4
+ import Icon from './Icon.astro'
6
5
 
7
6
  type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
8
- ComponentProps<typeof Tag> &
9
- Childmorphic<{
10
- html: string
11
- text: string
12
- }>
7
+ ComponentProps<typeof Tag> & {
8
+ html?: string
9
+ text?: string
10
+ variant?: 'primary' | 'raised' | 'muted' | 'accent' | 'outline'
11
+ icon?: ComponentProps<typeof Icon> | ComponentProps<typeof Icon>['name']
12
+ }
13
13
 
14
- const { as = 'div', variant, ...rest } = Astro.props
14
+ const { icon, ...rest } = Astro.props
15
15
  ---
16
16
 
17
17
  <Tag
18
- class:list={['full-badge']}
19
- {as}
20
- {variant}
18
+ class:list={['badge']}
21
19
  {...rest}
22
20
  >
23
- <slot name="before" />
24
- <Children {...rest} />
25
21
  <slot />
22
+ {typeof icon === 'string' ? <Icon name={icon} /> : <Icon {...icon} />}
26
23
  </Tag>
27
24
 
28
25
  <style is:global lang="scss">
29
- .full-badge {
26
+ @import '../../css/utils.scss';
27
+
28
+ @include component('badge') {
30
29
  display: inline-flex;
31
30
  flex-shrink: 0;
32
31
  justify-content: center;
33
32
  align-items: center;
34
33
  vertical-align: top;
35
34
  gap: var(--space-2);
36
- transition: var(--full-transition);
35
+ transition: var(--transition);
37
36
  box-shadow: inset 0 0 0 1px var(--border);
38
- border-radius: var(--full-border-radius-2);
37
+ border-radius: var(--radius-1);
39
38
  background-color: var(--background);
40
- padding-right: var(--space-element-2);
41
- padding-left: var(--space-element-2);
42
- height: calc(var(--text-element) + 2 * var(--space-element-1));
39
+ padding-right: var(--element-2);
40
+ padding-left: var(--element-2);
41
+ height: calc(var(--text-1) + 2 * var(--element-1));
43
42
  color: var(--foreground);
44
- font-weight: var(--full-button-font-weight);
45
- font-size: var(--text-element);
43
+ font-weight: var(--button-font-weight);
44
+ font-size: var(--text-1);
46
45
  line-height: 1.625;
47
- font-family: var(--full-button-font-family);
46
+ font-family: var(--button-font-family);
48
47
  text-align: center;
49
48
  text-decoration: none;
50
49
  white-space: nowrap;
@@ -1,60 +1,54 @@
1
1
  ---
2
2
  import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import type { Childmorphic } from '../../types/Childmorphic'
4
- import Children from '../_Children.astro'
5
3
  import Tag from '../_Tag.astro'
6
- import type Icon from './Icon.astro'
4
+ import Icon from './Icon.astro'
7
5
 
8
6
  type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> &
9
- ComponentProps<typeof Tag> &
10
- Childmorphic<{
11
- html: string
12
- text: string
13
- variant?: 'primary' | 'secondary' | 'ghost'
14
- icon: ComponentProps<typeof Icon> | ComponentProps<typeof Icon>['name']
15
- }>
16
-
17
- // TODO: variants: link, filled, outline, ghost. Deze zijn independent van de color prop. Betekent dus dat je een outline variant hebt van elke color.
18
- // Let wel op, dit werkt niet met de Primary variant, omdat deze kleuren dan niet kloppen.
7
+ ComponentProps<typeof Tag> & {
8
+ html?: string
9
+ text?: string
10
+ variant?: 'primary' | 'secondary' | 'outline' | 'ghost'
11
+ icon?: ComponentProps<typeof Icon> | ComponentProps<typeof Icon>['name']
12
+ }
19
13
 
20
- const { as = 'a', variant = 'primary', ...rest } = Astro.props
14
+ const { as = 'a', variant = 'primary', icon, ...rest } = Astro.props
21
15
  ---
22
16
 
23
17
  <Tag
24
- class:list={['full-button']}
18
+ class:list={['button']}
25
19
  {as}
26
20
  {variant}
27
21
  {...rest}
28
22
  >
29
- <slot name="before" />
30
- <Children {...rest} />
31
23
  <slot />
24
+ {typeof icon === 'string' ? <Icon name={icon} /> : <Icon {...icon} />}
32
25
  </Tag>
33
26
 
34
27
  <style is:global lang="scss">
35
- .full-button {
28
+ @import '../../css/utils.scss';
29
+
30
+ @include component('button') {
36
31
  display: inline-flex;
37
32
  flex-shrink: 0;
38
33
  justify-content: center;
39
34
  align-items: center;
40
35
  vertical-align: top;
41
36
  gap: var(--space-2);
42
- transition: background-color var(--full-transition);
37
+ transition: background-color var(--transition);
43
38
  cursor: pointer;
44
39
  outline: none !important;
45
40
  box-shadow: inset 0 0 0 1px var(--border);
46
41
  border: none;
47
- border-radius: var(--full-border-radius-2);
42
+ border-radius: var(--radius-1);
48
43
  background-color: var(--background);
49
- padding-right: var(--space-element-3);
50
- padding-left: var(--space-element-3);
51
- height: calc(var(--text-element) + 2 * var(--space-element-3));
44
+ padding-right: var(--element-3);
45
+ padding-left: var(--element-3);
46
+ height: calc(var(--text-1) + 2 * var(--element-3));
52
47
  color: var(--foreground);
53
- font-weight: var(--full-button-font-weight);
54
- font-size: var(--text-element);
48
+ font-weight: var(--button-font-weight);
49
+ font-size: var(--text-1);
55
50
  line-height: 1.625;
56
- font-family: var(--full-button-font-family);
57
- user-select: none;
51
+ font-family: var(--button-font-family);
58
52
  text-align: center;
59
53
  text-decoration: none;
60
54
  white-space: nowrap;
@@ -73,13 +67,5 @@ const { as = 'a', variant = 'primary', ...rest } = Astro.props
73
67
  cursor: not-allowed;
74
68
  pointer-events: none;
75
69
  }
76
-
77
- .full-tag + & {
78
- --my-spacer: var(--space-4);
79
- }
80
-
81
- & + & {
82
- --my-spacer: var(--space-2);
83
- }
84
70
  }
85
71
  </style>
@@ -1,27 +1,30 @@
1
1
  ---
2
- import type { ComponentProps, HTMLTag } from 'astro/types'
2
+ import type { ComponentProps } from 'astro/types'
3
3
  import Tag from '../_Tag.astro'
4
4
 
5
- type Props<As extends HTMLTag = 'input'> = ComponentProps<typeof Tag<As>>
5
+ type Props = ComponentProps<typeof Tag>
6
6
 
7
7
  const { as = 'input', type = 'checkbox', name, ...rest } = Astro.props
8
8
  ---
9
9
 
10
10
  <Tag
11
11
  class:list={['full-checkbox']}
12
- if={name}
13
- {name}
12
+ if={true}
14
13
  {as}
15
- {type}
14
+ type="checkbox"
16
15
  {...rest}
17
16
  />
18
17
 
19
18
  <style is:global lang="scss">
20
- .full-checkbox {
19
+ @import '../../css/utils.scss';
20
+
21
+ @include component('checkbox') {
22
+ display: block;
21
23
  border-width: var(--border-width);
22
24
  border-color: var(--border-color);
23
25
  border-radius: var(--full-border-radius-2);
24
26
  background: var(--background);
27
+ min-width: var(--element-2);
25
28
  color: var(--color);
26
29
  accent-color: var(--10);
27
30
  font-size: var(--text);
@@ -1,33 +1,42 @@
1
1
  ---
2
2
  import tablerIcons from '@iconify-json/tabler/icons.json'
3
- import type { ComponentProps, HTMLTag } from 'astro/types'
3
+ import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
4
4
  import Tag from '../_Tag.astro'
5
5
 
6
- type Props<As extends HTMLTag = 'i'> = ComponentProps<typeof Tag> & {
7
- name?: string
8
- }
6
+ type Props<As extends HTMLTag = 'i'> = Polymorphic<{ as: As }> &
7
+ ComponentProps<typeof Tag> & {
8
+ name?: string
9
+ }
9
10
 
10
- const { as = 'i', name = Astro.props.html, ...rest } = Astro.props
11
+ const { as = 'i', name, ...rest } = Astro.props
11
12
 
12
13
  const trimmedName = name?.trim() as string | undefined
13
- const icon = trimmedName && (tablerIcons as any)?.icons[trimmedName]?.body
14
+ const icon = trimmedName
15
+ ? (tablerIcons as any)?.icons[trimmedName]?.body
16
+ : undefined
14
17
  ---
15
18
 
16
19
  <Tag
17
- class:list={['full-icon']}
20
+ class:list={['icon']}
18
21
  if={icon}
19
22
  {as}
20
23
  {...rest}
21
24
  >
22
- <svg
23
- xmlns="http://www.w3.org/2000/svg"
24
- viewBox="0 0 24 24"
25
- set:html={icon}
26
- />
25
+ {
26
+ icon && (
27
+ <svg
28
+ xmlns="http://www.w3.org/2000/svg"
29
+ viewBox="0 0 24 24"
30
+ set:html={icon}
31
+ />
32
+ )
33
+ }
27
34
  </Tag>
28
35
 
29
36
  <style is:global lang="scss">
30
- .full-icon {
37
+ @import '../../css/utils.scss';
38
+
39
+ @include component('icon') {
31
40
  display: inline-flex;
32
41
  position: relative;
33
42
  justify-content: center;
@@ -35,7 +44,7 @@ const icon = trimmedName && (tablerIcons as any)?.icons[trimmedName]?.body
35
44
  width: 1em;
36
45
  height: 1em;
37
46
  color: var(--foreground);
38
- font-size: var(--text);
47
+ font-size: var(--text-2);
39
48
 
40
49
  svg {
41
50
  position: absolute;
@@ -5,7 +5,7 @@ import Tag from '../_Tag.astro'
5
5
 
6
6
  interface Props extends ComponentProps<typeof Tag> {
7
7
  position?: 'background' | 'cover' | 'panel'
8
- // frame?: 'mask' | 'mask-sm'
8
+ frame?: 'inset'
9
9
  }
10
10
 
11
11
  function getAltBySrc(): string {
@@ -55,69 +55,69 @@ const {
55
55
  {
56
56
  src && (
57
57
  <Tag
58
- class:list={[
59
- 'full-image',
60
- {
61
- [`full-position-${position}`]: position,
62
- },
63
- ]}
58
+ class:list={['image']}
64
59
  if={src}
65
60
  {src}
66
61
  {alt}
67
62
  {as}
63
+ {frame}
64
+ {position}
68
65
  {...rest}
69
66
  />
70
67
  )
71
68
  }
72
69
 
73
70
  <style is:global lang="scss">
74
- .full-image {
75
- display: block;
76
- border-radius: var(--full-border-radius-1);
77
- width: 100%;
78
- height: auto;
79
- object-fit: cover;
80
-
81
- &.full-position-background {
82
- position: absolute;
83
- top: 0;
84
- right: 0;
85
- bottom: 0;
86
- left: 0;
87
- order: 1;
88
- z-index: -1;
89
-
90
- /* TODO manier fixen zodat dit met custom classes kan */
91
- border-radius: 0;
71
+ @import '../../css/utils.scss';
72
+
73
+ @include component('image') {
74
+ display: block;
75
+ border-radius: var(--radius-1);
92
76
  width: 100%;
93
- height: 100%;
77
+ height: auto;
94
78
  object-fit: cover;
95
79
 
96
- ~ .full-tag {
97
- position: relative;
98
- z-index: 1;
80
+ &.position-background {
81
+ position: absolute;
82
+ top: 0;
83
+ right: 0;
84
+ bottom: 0;
85
+ left: 0;
86
+ order: 1;
87
+ z-index: -1;
88
+
89
+ /* TODO manier fixen zodat dit met custom classes kan */
90
+ border-radius: 0;
91
+ width: 100%;
92
+ height: 100%;
93
+ object-fit: cover;
94
+
95
+ ~ .full {
96
+ position: relative;
97
+ z-index: 1;
98
+ }
99
99
  }
100
- }
101
100
 
102
- &.full-position-cover {
103
- width: 100%;
104
- height: 100%;
105
- object-fit: cover;
106
- }
101
+ &.position-cover {
102
+ width: 100%;
103
+ height: 100%;
104
+ object-fit: cover;
105
+ }
107
106
 
108
- &.full-position-panel {
109
- height: 100%;
110
- object-fit: cover;
111
- }
107
+ &.position-panel {
108
+ height: 100%;
109
+ object-fit: cover;
110
+ }
112
111
 
113
- &.mask-sm {
114
- -webkit-mask-image: linear-gradient(to top, transparent 0%, black 30%);
115
- mask-image: linear-gradient(to top, transparent 0%, black 30%);
116
- }
112
+ &.mask-sm {
113
+ -webkit-mask-image: linear-gradient(to top, transparent 0%, black 30%);
114
+ mask-image: linear-gradient(to top, transparent 0%, black 30%);
115
+ }
116
+
117
+ &.mask {
118
+ -webkit-mask-image: linear-gradient(to top, transparent 0%, black 100%);
119
+ mask-image: linear-gradient(to top, transparent 0%, black 100%);
120
+ }
117
121
 
118
- &.mask {
119
- -webkit-mask-image: linear-gradient(to top, transparent 0%, black 100%);
120
- mask-image: linear-gradient(to top, transparent 0%, black 100%);
121
- }
122
122
  }
123
123
  </style>
@@ -1,42 +1,44 @@
1
1
  ---
2
- import type { ComponentProps } from 'astro/types'
2
+ import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
3
  import Tag from '../_Tag.astro'
4
4
 
5
- type Props = ComponentProps<typeof Tag>
5
+ type Props<As extends HTMLTag = 'input'> = Polymorphic<{ as: As }> &
6
+ ComponentProps<typeof Tag> & {
7
+ variant?: 'outline'
8
+ }
6
9
 
7
- const { as = 'input', variant = 'outline', name, ...rest } = Astro.props
10
+ const { as = 'input', variant = 'outline', ...rest } = Astro.props
8
11
  ---
9
12
 
10
13
  <Tag
11
- class:list={['full-input']}
12
- if={name}
13
- {name}
14
+ class:list={['input']}
15
+ if={true}
14
16
  {as}
15
17
  {variant}
16
18
  {...rest}
17
19
  />
18
20
 
19
21
  <style is:global lang="scss">
20
- .full-input,
21
- .full-textarea,
22
- .full-select {
22
+ @import '../../css/utils.scss';
23
+
24
+ @include component('input') {
23
25
  display: flex;
24
26
  position: relative;
25
27
  align-items: center;
26
28
  outline: none;
27
- box-shadow: inset 0 0 0 var(--full-border-width) var(--border);
29
+ box-shadow: inset 0 0 0 var(--border-width) var(--border);
28
30
  border: 0px;
29
- border-radius: var(--full-border-radius-2);
31
+ border-radius: var(--radius-1);
30
32
  background-color: var(--input-background);
31
- padding: var(--space-element-2);
33
+ padding: var(--element-2);
32
34
  width: 100%;
33
35
  min-width: var(--element-2);
34
- height: calc(var(--text-element) + 2 * var(--space-element-3));
36
+ height: calc(var(--text-1) + 2 * var(--element-3));
35
37
  color: var(--foreground);
36
- font-weight: var(--full-font-weight);
37
- font-size: var(--text-element);
38
+ font-weight: var(--font-weight);
39
+ font-size: var(--text-1);
38
40
  line-height: 1.25;
39
- font-family: var(--full-font-family);
41
+ font-family: var(--font-family);
40
42
 
41
43
  &:focus {
42
44
  outline: none;
@@ -3,14 +3,14 @@ import type { ComponentProps, HTMLTag } from 'astro/types'
3
3
  import Children from '../_Children.astro'
4
4
  import Tag from '../_Tag.astro'
5
5
 
6
- type Props<As extends HTMLTag = 'a'> = ComponentProps<typeof Tag<As>> &
6
+ type Props<As extends HTMLTag = 'a'> = ComponentProps<typeof Tag> &
7
7
  ComponentProps<typeof Children>
8
8
 
9
9
  const { as = 'a', href = '/', src, ...rest } = Astro.props
10
10
  ---
11
11
 
12
12
  <Tag
13
- class:list={['full-logo']}
13
+ class:list={['logo']}
14
14
  {href}
15
15
  {as}
16
16
  {...rest}
@@ -21,8 +21,10 @@ const { as = 'a', href = '/', src, ...rest } = Astro.props
21
21
  </Tag>
22
22
 
23
23
  <style is:global lang="scss">
24
- .full-logo {
25
- .full-image {
24
+ @import '../../css/utils.scss';
25
+
26
+ @include component('logo') {
27
+ .image {
26
28
  display: block !important;
27
29
  width: auto !important;
28
30
  height: var(--space-5) !important;
@@ -1,27 +1,29 @@
1
1
  ---
2
- import type { ComponentProps, HTMLTag } from 'astro/types'
2
+ import type { ComponentProps } from 'astro/types'
3
3
  import Tag from '../_Tag.astro'
4
4
 
5
- type Props<As extends HTMLTag = 'input'> = ComponentProps<typeof Tag<As>>
5
+ type Props = ComponentProps<typeof Tag>
6
6
 
7
7
  const { as = 'input', type = 'radio', name, ...rest } = Astro.props
8
8
  ---
9
9
 
10
10
  <Tag
11
11
  class:list={['full-radio']}
12
- if={name}
13
- {name}
12
+ if={true}
14
13
  {as}
15
- {type}
14
+ type="radio"
16
15
  {...rest}
17
16
  />
18
17
 
19
18
  <style is:global lang="scss">
20
- .full-radio {
19
+ @import '../../css/utils.scss';
20
+
21
+ @include component('radio') {
21
22
  border-width: var(--border-width);
22
23
  border-color: var(--border-color);
23
24
  border-radius: var(--full-border-radius-2);
24
25
  background: var(--background);
26
+ min-width: var(--element-2);
25
27
  accent-color: var(--10);
26
28
  font-size: var(--text);
27
29