fulldev-ui 0.1.65 → 0.2.11

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 (74) 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 +10 -7
  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 +9 -7
  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 +93 -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/Row.astro +26 -0
  37. package/src/components/structure/Split.astro +41 -0
  38. package/src/components/structure/Spread.astro +48 -0
  39. package/src/components/structure/Stack.astro +90 -0
  40. package/src/components/structure/todo.md +5 -0
  41. package/src/components/typography/Heading.astro +37 -19
  42. package/src/components/typography/Label.astro +14 -15
  43. package/src/components/typography/Link.astro +15 -10
  44. package/src/components/typography/List.astro +16 -13
  45. package/src/components/typography/ListItem.astro +16 -11
  46. package/src/components/typography/Paragraph.astro +17 -20
  47. package/src/components/typography/Tagline.astro +17 -22
  48. package/src/components/typography/todo.md +1 -13
  49. package/src/css/colors.css +130 -263
  50. package/src/css/main.css +1 -2
  51. package/src/css/sizes.css +136 -198
  52. package/src/css/styles.css +14 -0
  53. package/src/css/utils.scss +16 -0
  54. package/src/index.ts +23 -15
  55. package/src/integration/integration.ts +39 -57
  56. package/src/layouts/Layout.astro +7 -3
  57. package/src/types/Structuremorphic.ts +18 -0
  58. package/src/components/typography/Links.astro +0 -15
  59. package/src/components/typography/_Typography.astro +0 -28
  60. package/src/components/utility/DecorativeBox.astro +0 -22
  61. package/src/components/wrapper/Card.astro +0 -144
  62. package/src/components/wrapper/Cards.astro +0 -15
  63. package/src/components/wrapper/Deck.astro +0 -133
  64. package/src/components/wrapper/Form.astro +0 -26
  65. package/src/components/wrapper/Group.astro +0 -26
  66. package/src/components/wrapper/Main.astro +0 -25
  67. package/src/components/wrapper/Nav.astro +0 -32
  68. package/src/components/wrapper/Section.astro +0 -110
  69. package/src/components/wrapper/Sections.astro +0 -15
  70. package/src/components/wrapper/_Wrapper.astro +0 -333
  71. package/src/components/wrapper/todo.md +0 -20
  72. package/src/css/border.css +0 -23
  73. package/src/css/font.css +0 -15
  74. package/src/css/reset.css +0 -388
@@ -1,36 +1,35 @@
1
1
  ---
2
2
  import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Typography from './_Typography.astro'
3
+ import Tag from '../_Tag.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'label'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Typography> & {
7
- variant?: 'base' | 'muted'
8
- text?: string
6
+ ComponentProps<typeof Tag> & {
9
7
  html?: string
8
+ text?: string
9
+ variant?: 'base' | 'muted' | 'accent'
10
10
  }
11
11
 
12
- const { as = 'label', text, html, ...rest } = Astro.props
12
+ const { as = 'label', ...rest } = Astro.props
13
13
  ---
14
14
 
15
- <Typography
16
- class:list={['full-label']}
15
+ <Tag
16
+ class:list={['label']}
17
17
  {as}
18
18
  {...rest}
19
19
  >
20
- <slot name="before" />
21
- <Fragment set:html={html} />
22
- {text}
23
20
  <slot />
24
- </Typography>
21
+ </Tag>
25
22
 
26
23
  <style is:global lang="scss">
27
- .full-label {
24
+ @import '../../css/utils.scss';
25
+
26
+ @include component('label') {
28
27
  display: flex;
29
28
  flex-direction: column;
30
29
  color: var(--foreground);
31
- font-weight: var(--full-font-weight);
32
- font-size: var(--text-element);
33
- font-family: var(--full-font-family);
30
+ font-weight: var(--font-weight);
31
+ font-size: var(--text-1);
32
+ font-family: var(--font-family);
34
33
  text-align: left;
35
34
  }
36
35
  </style>
@@ -1,32 +1,37 @@
1
1
  ---
2
2
  import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Typography from './_Typography.astro'
3
+ import Tag from '../_Tag.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Typography>
6
+ ComponentProps<typeof Tag> & {
7
+ html?: string
8
+ text?: string
9
+ variant?: 'base' | 'muted' | 'accent'
10
+ }
7
11
 
8
12
  const { as = 'a', ...rest } = Astro.props
9
13
  ---
10
14
 
11
- <Typography
12
- class:list={['full-link']}
15
+ <Tag
16
+ class:list={['link']}
13
17
  {as}
14
18
  {...rest}
15
19
  >
16
- <slot name="before" />
17
20
  <slot />
18
- </Typography>
21
+ </Tag>
19
22
 
20
23
  <style is:global lang="scss">
21
- .full-link {
24
+ @import '../../css/utils.scss';
25
+
26
+ @include component('link') {
22
27
  display: inline-flex;
23
28
  flex-wrap: wrap;
24
29
  align-items: center;
25
30
  gap: var(--space-2);
26
31
  color: var(--foreground);
27
- font-weight: var(--full-font-weight);
28
- font-size: var(--text);
29
- font-family: var(--full-font-family);
32
+ font-weight: var(--font-weight);
33
+ font-size: var(--text-2);
34
+ font-family: var(--font-family);
30
35
  text-decoration: none;
31
36
  text-decoration-color: var(--border);
32
37
  white-space: nowrap;
@@ -1,42 +1,45 @@
1
1
  ---
2
2
  import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import { isObject } from 'radash'
3
+ import Tag from '../_Tag.astro'
4
4
  import ListItem from './ListItem.astro'
5
- import Typography from './_Typography.astro'
6
5
 
7
6
  type Props<As extends HTMLTag = 'ul'> = Polymorphic<{ as: As }> &
8
- ComponentProps<typeof Typography> & {
7
+ ComponentProps<typeof Tag> & {
8
+ html?: string
9
+ text?: string
10
+ variant?: 'base' | 'muted' | 'accent'
9
11
  items?: (ComponentProps<typeof ListItem> | string)[]
10
12
  }
11
13
 
12
14
  const { as = 'ul', items, ...rest } = Astro.props
13
15
  ---
14
16
 
15
- <Typography
16
- class:list={['full-list']}
17
+ <Tag
18
+ class:list={['list']}
17
19
  {as}
18
20
  {...rest}
19
21
  >
20
- <slot name="before" />
21
22
  {
22
23
  items?.map((item) => {
23
- if (isObject(item)) return <ListItem {...item} />
24
- else return <ListItem html={item} />
24
+ if (typeof item === 'string') return <ListItem html={item} />
25
+ else return <ListItem {...item} />
25
26
  })
26
27
  }
27
28
  <slot />
28
- </Typography>
29
+ </Tag>
29
30
 
30
31
  <style is:global lang="scss">
31
- .full-list {
32
+ @import '../../css/utils.scss';
33
+
34
+ @include component('list') {
32
35
  display: flex;
33
36
  flex-direction: column;
34
37
  padding-left: var(--space-4);
35
38
  color: var(--foreground);
36
- font-weight: var(--full-font-weight);
37
- font-size: var(--text);
39
+ font-weight: var(--font-weight);
40
+ font-size: var(--text-2);
38
41
  line-height: 1.625;
39
- font-family: var(--full-font-family);
42
+ font-family: var(--font-family);
40
43
  list-style-type: disc;
41
44
  }
42
45
  </style>
@@ -1,30 +1,35 @@
1
1
  ---
2
2
  import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Typography from './_Typography.astro'
3
+ import Tag from '../_Tag.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'li'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Typography>
6
+ ComponentProps<typeof Tag> & {
7
+ html?: string
8
+ text?: string
9
+ variant?: 'base' | 'muted' | 'accent'
10
+ }
7
11
 
8
12
  const { as = 'li', ...rest } = Astro.props
9
13
  ---
10
14
 
11
- <Typography
12
- class:list={['full-list-item']}
15
+ <Tag
16
+ class:list={['list-item']}
13
17
  {as}
14
18
  {...rest}
15
19
  >
16
- <slot name="before" />
17
20
  <slot />
18
- </Typography>
21
+ </Tag>
19
22
 
20
23
  <style is:global lang="scss">
21
- .full-item {
24
+ @import '../../css/utils.scss';
25
+
26
+ @include component('list-item') {
22
27
  align-items: center;
23
- max-width: calc(var(--space-element-3) * 36);
28
+ max-width: calc(var(--element-3) * 36);
24
29
  color: var(--foreground);
25
- font-weight: var(--full-font-weight);
26
- font-size: var(--text);
30
+ font-weight: var(--font-weight);
31
+ font-size: var(--text-2);
27
32
  line-height: 1.625;
28
- font-family: var(--full-font-family);
33
+ font-family: var(--font-family);
29
34
  }
30
35
  </style>
@@ -1,38 +1,35 @@
1
1
  ---
2
2
  import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Typography from './_Typography.astro'
3
+ import Tag from '../_Tag.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'p'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Typography>
6
+ ComponentProps<typeof Tag> & {
7
+ html?: string
8
+ text?: string
9
+ variant?: 'base' | 'muted' | 'accent'
10
+ }
7
11
 
8
12
  const { as = 'p', ...rest } = Astro.props
9
13
  ---
10
14
 
11
- <Typography
12
- class:list={['full-paragraph']}
15
+ <Tag
16
+ class:list={['paragraph']}
13
17
  {as}
14
18
  {...rest}
15
19
  >
16
- <slot name="before" />
17
20
  <slot />
18
- </Typography>
21
+ </Tag>
19
22
 
20
23
  <style is:global lang="scss">
21
- .full-paragraph {
22
- max-width: calc(var(--space-element-3) * 36);
24
+ @import '../../css/utils.scss';
25
+
26
+ @include component('paragraph') {
27
+ margin: 0;
28
+ max-width: calc(var(--element-3) * 36);
23
29
  color: var(--foreground);
24
- font-weight: var(--full-font-weight);
25
- font-size: var(--text);
30
+ font-weight: var(--font-weight);
31
+ font-size: var(--text-2);
26
32
  line-height: 1.625;
27
- font-family: var(--full-font-family);
28
-
29
- .full-tag + & {
30
- --my-spacer: var(--space-5);
31
- }
32
-
33
- .full-heading + &,
34
- .full-paragraph + & {
35
- --my-spacer: var(--space-3);
36
- }
33
+ font-family: var(--font-family);
37
34
  }
38
35
  </style>
@@ -1,39 +1,34 @@
1
1
  ---
2
2
  import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Typography from './_Typography.astro'
3
+ import Tag from '../_Tag.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'span'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Typography>
6
+ ComponentProps<typeof Tag> & {
7
+ html?: string
8
+ text?: string
9
+ variant?: 'base' | 'muted' | 'accent'
10
+ }
7
11
 
8
- const { as = 'span', variant, ...rest } = Astro.props
12
+ const { as = 'span', ...rest } = Astro.props
9
13
  ---
10
14
 
11
- <Typography
12
- class:list={['full-tagline']}
15
+ <Tag
16
+ class:list={['tagline']}
13
17
  {as}
14
- {variant}
15
18
  {...rest}
16
19
  >
17
- <slot name="before" />
18
20
  <slot />
19
- </Typography>
21
+ </Tag>
20
22
 
21
23
  <style is:global lang="scss">
22
- .full-tagline {
23
- max-width: calc(var(--space-element-3) * 36);
24
+ @import '../../css/utils.scss';
25
+
26
+ @include component('tagline') {
27
+ max-width: calc(var(--element-3) * 36);
24
28
  color: var(--foreground);
25
- font-weight: var(--full-font-weight);
26
- font-size: var(--text-element);
29
+ font-weight: var(--font-weight);
30
+ font-size: var(--text-1);
27
31
  line-height: 1.25;
28
- font-family: var(--full-font-family);
29
-
30
- .full-tag + & {
31
- --my-spacer: var(--space-5);
32
- }
33
-
34
- .full-heading + &,
35
- .full-paragraph + & {
36
- --my-spacer: var(--space-3);
37
- }
32
+ font-family: var(--font-family);
38
33
  }
39
34
  </style>
@@ -1,15 +1,3 @@
1
- # Chores
2
-
3
-
4
1
  # New components
5
- - Highlight (for highlighint stuff in headings for example, with a primary background etc. Should accept same colors as badge)
6
- - Field (for form fields with label etc. Should adapt based on the element, like horizontal for checkboxes)
2
+ - Highlight (for highlighint stuff in headings for example, with a primary background etc. Should accept same variants as badge)
7
3
 
8
- ## Low priority
9
- - Toast
10
- - Modal
11
- - Drawer
12
- - Alert
13
- - Tooltip
14
- - Legal
15
- - Banner