fulldev-ui 0.1.64 → 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 (74) hide show
  1. package/README.md +1 -1
  2. package/package.json +5 -2
  3. package/src/components/_Children.astro +0 -7
  4. package/src/components/_Tag.astro +35 -14
  5. package/src/components/base/Badge.astro +21 -23
  6. package/src/components/base/Button.astro +22 -36
  7. package/src/components/base/Checkbox.astro +9 -6
  8. package/src/components/base/Icon.astro +23 -14
  9. package/src/components/base/Image.astro +47 -47
  10. package/src/components/base/Input.astro +18 -16
  11. package/src/components/base/Logo.astro +6 -4
  12. package/src/components/base/Radio.astro +8 -6
  13. package/src/components/base/Rating.astro +10 -7
  14. package/src/components/base/Select.astro +17 -13
  15. package/src/components/base/SelectOption.astro +5 -5
  16. package/src/components/base/Switch.astro +11 -12
  17. package/src/components/base/Textarea.astro +9 -7
  18. package/src/components/base/Video.astro +4 -4
  19. package/src/components/base/todo.md +1 -2
  20. package/src/components/{wrapper → segment}/Body.astro +13 -10
  21. package/src/components/segment/Card.astro +94 -0
  22. package/src/components/segment/Deck.astro +36 -0
  23. package/src/components/{wrapper → segment}/Footer.astro +2 -2
  24. package/src/components/segment/Form.astro +30 -0
  25. package/src/components/{wrapper → segment}/Header.astro +16 -34
  26. package/src/components/segment/Main.astro +28 -0
  27. package/src/components/segment/Nav.astro +30 -0
  28. package/src/components/{wrapper → segment}/Prose.astro +15 -15
  29. package/src/components/segment/Section.astro +66 -0
  30. package/src/components/{wrapper → segment}/Writeup.astro +8 -7
  31. package/src/components/segment/todo.md +8 -0
  32. package/src/components/structure/Bento.astro +35 -0
  33. package/src/components/structure/Carousel.astro +43 -0
  34. package/src/components/structure/Grid.astro +30 -0
  35. package/src/components/structure/Group.astro +28 -0
  36. package/src/components/structure/Masonry.astro +39 -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 +13 -14
  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 +142 -275
  50. package/src/css/main.css +1 -2
  51. package/src/css/sizes.css +136 -198
  52. package/src/css/styles.css +15 -0
  53. package/src/css/utils.scss +16 -0
  54. package/src/index.ts +22 -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,22 +0,0 @@
1
- ---
2
- type Props = {
3
- height: string
4
- width: string
5
- }
6
-
7
- const { height = '100%', width = '100%' } = Astro.props
8
- ---
9
-
10
- <div class="full-placeholder"></div>
11
-
12
- <style is:global define:vars={{ height, width }}>
13
- .full-placeholder {
14
- border: 1px solid var(--raised-border);
15
- border-radius: var(--full-border-radius-1);
16
- background-color: var(--raised-background);
17
- width: var(--width) !important;
18
- min-width: 100px;
19
- height: var(--height) !important;
20
- min-height: 100px;
21
- }
22
- </style>
@@ -1,144 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Wrapper from './_Wrapper.astro'
4
-
5
- type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Wrapper> & {
7
- variant?: 'ghost' | 'soft' | 'solid'
8
- frame?: 'fill' | 'panel' | 'screen'
9
- ratio?: 'landscape' | 'portrait' | 'square' | number
10
- }
11
-
12
- const {
13
- href,
14
- as = Astro.props.href ? 'a' : 'div',
15
- density = 'compact',
16
- variant,
17
- frame,
18
- ratio,
19
- ...rest
20
- } = Astro.props
21
- ---
22
-
23
- <Wrapper
24
- {as}
25
- {href}
26
- class:list={[
27
- 'full-card',
28
- {
29
- [`full-frame-${frame}`]: frame,
30
- [`full-variant-${variant}`]: variant,
31
- [`full-ratio-${ratio}`]: ratio,
32
- },
33
- ]}
34
- {density}
35
- {...rest}
36
- >
37
- <slot name="before" />
38
- <slot />
39
- </Wrapper>
40
-
41
- <style is:global lang="scss">
42
- .full-card {
43
- position: relative;
44
- overflow: hidden;
45
- text-decoration: none;
46
-
47
- /* &:is(a) */
48
- &[href] {
49
- cursor: pointer;
50
-
51
- > .full-image {
52
- transition: var(--full-transition);
53
- }
54
-
55
- &:hover {
56
- > .full-image {
57
- opacity: 0.85;
58
- }
59
- }
60
- }
61
-
62
- /* TODO add child paddings/margin */
63
- /* padding all side with negative padding/margin on image/media? */
64
- /* or only padding bottom and side apdding on children? */
65
- /* I prefer negative margin (inset) on media if this works */
66
- &.full-frame-panel {
67
- gap: 0;
68
- border: 1px solid var(--border);
69
- border-radius: var(--full-border-radius-3);
70
- background-color: var(--background);
71
- padding: var(--space-5);
72
- overflow: hidden;
73
- color: var(--foreground);
74
-
75
- // > .full-tag:not(.full-image) {
76
- // margin-right: var(--space-5);
77
- // margin-left: var(--space-5);
78
-
79
- // &:first-child {
80
- // margin-top: var(--space-5);
81
- // }
82
-
83
- // &:last-child {
84
- // margin-bottom: var(--space-5);
85
- // }
86
- // }
87
- }
88
-
89
- /* &.subtle,
90
- &.surface {
91
- background-color: var(--2);
92
-
93
- &:is(a) {
94
- border-color: var(--7);
95
- background: var(--2);
96
-
97
- &:hover {
98
- border-color: var(--8);
99
- background: var(--3);
100
- }
101
-
102
- &:active {
103
- background: var(--4);
104
- }
105
- }
106
-
107
- .full-image {
108
- border-bottom-right-radius: 0;
109
- border-bottom-left-radius: 0;
110
- }
111
- }
112
-
113
- &.solid {
114
- border-color: var(--9);
115
- background: var(--9);
116
-
117
- * {
118
- color: var(--fg);
119
- }
120
-
121
- &:is(a):hover {
122
- background: var(--10);
123
- }
124
-
125
- .full-image {
126
- border-bottom-right-radius: 0;
127
- border-bottom-left-radius: 0;
128
- }
129
- }
130
- } */
131
-
132
- &.full-ratio-landscape {
133
- aspect-ratio: 4/3;
134
- }
135
-
136
- &.full-ratio-square {
137
- aspect-ratio: 1/1;
138
- }
139
-
140
- &.full-ratio-portrait {
141
- aspect-ratio: 3/4;
142
- }
143
- }
144
- </style>
@@ -1,15 +0,0 @@
1
- ---
2
- import type { ComponentProps } from 'astro/types'
3
- import type { Pluralmorphic } from '../../types/Pluralmorphic'
4
- import Plural from '../_Plural.astro'
5
- import Card from './Card.astro'
6
-
7
- type Props = Pluralmorphic<ComponentProps<typeof Card>>
8
-
9
- const { props } = Astro
10
- ---
11
-
12
- <Plural
13
- component={Card}
14
- {...props}
15
- />
@@ -1,133 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Wrapper from './_Wrapper.astro'
4
-
5
- type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
6
- Omit<ComponentProps<typeof Wrapper>, 'layout'> & {
7
- layout?:
8
- | 'carousel'
9
- | 'grid'
10
- | 'masonry'
11
- | 'row'
12
- | 'column'
13
- | 'split'
14
- | 'panels'
15
- | 'bento'
16
- }
17
-
18
- const { layout = 'grid', direction = null, ...rest } = Astro.props
19
- ---
20
-
21
- <Wrapper
22
- class:list={['full-deck']}
23
- layout={layout as any}
24
- {direction}
25
- {...rest as any}
26
- >
27
- <slot name="before" />
28
- <slot />
29
- </Wrapper>
30
-
31
- <style is:global lang="scss">
32
- .full-deck {
33
- position: relative;
34
- width: 100%;
35
-
36
- &.full-layout-row {
37
- display: grid;
38
- row-gap: var(--space-4);
39
-
40
- @media (min-width: 1024px) {
41
- grid-auto-columns: 6fr 1fr;
42
- grid-auto-flow: column;
43
-
44
- > * {
45
- &:nth-child(2) {
46
- grid-column-start: 3;
47
- }
48
- &:nth-child(3) {
49
- grid-column-start: 5;
50
- }
51
- &:nth-child(4) {
52
- grid-column-start: 7;
53
- }
54
- &:nth-child(5) {
55
- grid-column-start: 9;
56
- }
57
- &:nth-child(6) {
58
- grid-column-start: 11;
59
- }
60
- }
61
- }
62
- }
63
-
64
- &.full-layout-carousel {
65
- display: flex;
66
- position: relative;
67
- flex-direction: row;
68
- align-items: flex-start;
69
- gap: var(--space-3);
70
- margin: 0 calc(var(--space-gutter) * -1);
71
- padding: 0 var(--space-gutter) var(--space-3);
72
- width: 100vw;
73
- overflow-x: auto;
74
- scroll-behavior: smooth;
75
- scroll-snap-type: x mandatory;
76
-
77
- > .full-card {
78
- /* TODO add multiple sizes */
79
- flex-grow: 0;
80
- flex-shrink: 0;
81
- width: calc(12 * var(--space-6));
82
- scroll-snap-align: center;
83
- }
84
- }
85
-
86
- &.full-layout-grid {
87
- display: grid;
88
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
89
- column-gap: var(--space-3);
90
- row-gap: var(--space-4);
91
- }
92
-
93
- &.full-layout-masonry {
94
- column-gap: var(--space-3);
95
- column-count: 1;
96
-
97
- @media (min-width: 640px) {
98
- column-count: 2;
99
- }
100
- @media (min-width: 768px) {
101
- column-count: 3;
102
- }
103
-
104
- @media (min-width: 1024px) {
105
- column-count: 4;
106
- }
107
-
108
- & > .card + .card {
109
- margin-top: var(--space-4);
110
- margin-bottom: var(--space-4);
111
- }
112
- }
113
-
114
- &.full-layout-panels {
115
- display: grid;
116
- grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
117
- gap: var(--space-3);
118
- }
119
-
120
- &.full-layout-bento {
121
- display: grid;
122
- grid-template-columns: 1fr;
123
-
124
- @media (min-width: 1024px) {
125
- grid-template-columns: 1fr 1fr 1fr;
126
-
127
- & > *:nth-child(2n) {
128
- grid-column-start: span 2;
129
- }
130
- }
131
- }
132
- }
133
- </style>
@@ -1,26 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Wrapper from './_Wrapper.astro'
4
-
5
- type Props<As extends HTMLTag = 'form'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Wrapper>
7
-
8
- const { as = 'form', ...rest } = Astro.props
9
- ---
10
-
11
- <Wrapper
12
- class:list={['full-form']}
13
- {as}
14
- {...rest}
15
- >
16
- <slot name="before" />
17
- <slot />
18
- </Wrapper>
19
-
20
- <style is:global lang="scss">
21
- .full-form {
22
- display: flex;
23
- width: 100%;
24
- max-width: calc(var(--space-element-3) * 36);
25
- }
26
- </style>
@@ -1,26 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Wrapper from './_Wrapper.astro'
4
-
5
- type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Wrapper>
7
-
8
- const { as = 'div', ...rest } = Astro.props
9
- ---
10
-
11
- <Wrapper
12
- class:list={['full-group']}
13
- {as}
14
- {...rest}
15
- >
16
- <slot name="before" />
17
- <slot />
18
- </Wrapper>
19
-
20
- <style is:global lang="scss">
21
- .full-group {
22
- .full-tag + & {
23
- --my-spacer: var(--space-4);
24
- }
25
- }
26
- </style>
@@ -1,25 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Wrapper from './_Wrapper.astro'
4
-
5
- type Props<As extends HTMLTag = 'main'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Wrapper>
7
-
8
- const { as = 'main', x = 'fill', ...rest } = Astro.props
9
- ---
10
-
11
- <Wrapper
12
- class:list={['full-main']}
13
- {as}
14
- {x}
15
- {...rest}
16
- >
17
- <slot name="before" />
18
- <slot />
19
- </Wrapper>
20
-
21
- <style is:global lang="scss">
22
- .full-main {
23
- width: 100%;
24
- }
25
- </style>
@@ -1,32 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Wrapper from './_Wrapper.astro'
4
-
5
- type Props<As extends HTMLTag = 'nav'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Wrapper>
7
-
8
- const {
9
- as = 'nav',
10
- direction = 'horizontal',
11
- y = 'center',
12
- ...rest
13
- } = Astro.props
14
- ---
15
-
16
- <Wrapper
17
- class:list={['full-nav']}
18
- {as}
19
- {direction}
20
- {y}
21
- {...rest}
22
- >
23
- <slot name="before" />
24
- <slot />
25
- </Wrapper>
26
-
27
- <style is:global lang="scss">
28
- .full-nav {
29
- margin-left: auto;
30
- width: max-content;
31
- }
32
- </style>
@@ -1,110 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Wrapper from './_Wrapper.astro'
4
-
5
- type Props<As extends HTMLTag = 'section'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Wrapper> & {
7
- direction?: 'horizontal' | 'vertical'
8
- variant?: 'base' | 'raised'
9
- frame?: 'viewport' | 'panel'
10
- // gutter?: 'viewport' | 'panel'
11
- reverse?: true | 'odd' | 'even'
12
- }
13
-
14
- const { as = 'section', reverse, variant, frame, ...rest } = Astro.props
15
- ---
16
-
17
- <Wrapper
18
- class:list={[
19
- 'full-section',
20
- {
21
- [`full-variant-${variant}`]: variant,
22
- [`full-frame-${frame}`]: frame,
23
- [`full-reverse-${reverse}`]: reverse,
24
- },
25
- ]}
26
- {as}
27
- {...rest}
28
- >
29
- <slot name="before" />
30
- <slot />
31
- </Wrapper>
32
-
33
- <style is:global lang="scss">
34
- :root,
35
- .full-tag {
36
- --media: 1536px;
37
- --space-gutter: max(4vw, calc((100vw - var(--media)) / 2));
38
- --space-spacer: calc(var(--space-5) + 4vw);
39
- }
40
-
41
- .full-section {
42
- position: relative;
43
- background: var(--background);
44
- padding: var(--space-spacer) var(--space-gutter);
45
- width: 100%;
46
- overflow-x: hidden;
47
-
48
- &.full-frame-panel {
49
- margin: var(--space-5) var(--space-gutter);
50
- border: 1px solid var(--border);
51
- border-radius: var(--full-border-radius-3);
52
- background-color: var(--background);
53
- padding: var(--space-5) var(--space-gutter);
54
- width: auto;
55
- overflow: hidden;
56
- }
57
- }
58
-
59
- .full-layout-split {
60
- display: grid;
61
- column-gap: var(--space-gutter);
62
- row-gap: var(--space-5);
63
- justify-content: var(--full-x);
64
- align-items: var(--full-y);
65
-
66
- @media (min-width: 1024px) {
67
- grid-auto-columns: 1fr;
68
- grid-auto-flow: column;
69
- }
70
-
71
- & > * {
72
- margin: 0;
73
- }
74
- }
75
-
76
- .full-reverse-true {
77
- --full-reverse: 1;
78
- }
79
-
80
- .full-reverse-even:nth-child(even) {
81
- --full-reverse: 1;
82
- }
83
-
84
- .full-reverse-odd:nth-child(odd) {
85
- --full-reverse: 1;
86
- }
87
-
88
- .full-reverse-even,
89
- .full-reverse-odd,
90
- .full-reverse-true {
91
- @media (min-width: 1024px) {
92
- > .full-tag {
93
- order: 0;
94
-
95
- &:first-child {
96
- order: var(--full-reverse, 0);
97
- }
98
-
99
- &:last-child {
100
- order: calc(var(--full-reverse, 0) * -1);
101
- }
102
- }
103
- }
104
- }
105
-
106
- .full-frame-viewport {
107
- height: auto;
108
- min-height: 100vh;
109
- }
110
- </style>
@@ -1,15 +0,0 @@
1
- ---
2
- import type { ComponentProps } from 'astro/types'
3
- import type { Pluralmorphic } from '../../types/Pluralmorphic'
4
- import Plural from '../_Plural.astro'
5
- import Section from './Section.astro'
6
-
7
- type Props = Pluralmorphic<ComponentProps<typeof Section>>
8
-
9
- const { props } = Astro
10
- ---
11
-
12
- <Plural
13
- component={Section}
14
- {...props}
15
- />