fulldev-ui 0.3.27 → 0.3.29

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fulldev-ui",
3
- "version": "0.3.27",
3
+ "version": "0.3.29",
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",
@@ -13,6 +13,7 @@ const {
13
13
  as: As = 'div',
14
14
  if: ifProp = 'content',
15
15
  wrapper = true,
16
+ space,
16
17
  theme,
17
18
  compact,
18
19
  variant,
@@ -66,6 +67,7 @@ const render =
66
67
  [`underline-${underline}`]: underline,
67
68
  [`radius-${radius}`]: radius,
68
69
  [`mask-${mask}`]: mask,
70
+ [`space-${space}`]: space,
69
71
  },
70
72
  ]}
71
73
  {...rest}
@@ -82,7 +84,7 @@ const render =
82
84
  @import '../css/color.css';
83
85
  @import '../css/styles.css';
84
86
  @import '../css/size.scss';
85
- @import '../css/space.scss';
87
+ @import '../css/space.css';
86
88
 
87
89
  @include component('full') {
88
90
  z-index: 1;
@@ -6,15 +6,22 @@ type Props<As extends HTMLTag = 'nav'> = Polymorphic<{ as: As }> &
6
6
  ComponentProps<typeof Component> & {
7
7
  structure?: 'spread' | 'group' | 'row'
8
8
  align?: 'start' | 'center' | 'end'
9
+ space?: 'none' | 'auto'
9
10
  }
10
11
 
11
- const { as = 'nav', structure = 'spread', ...rest } = Astro.props
12
+ const {
13
+ as = 'nav',
14
+ space = 'auto',
15
+ structure = 'spread',
16
+ ...rest
17
+ } = Astro.props
12
18
  ---
13
19
 
14
20
  <Component
15
21
  class:list={['nav']}
16
22
  {as}
17
23
  {structure}
24
+ {space}
18
25
  {...rest}
19
26
  >
20
27
  <slot />
@@ -29,6 +36,7 @@ const { as = 'nav', structure = 'spread', ...rest } = Astro.props
29
36
 
30
37
  &.align-start {
31
38
  align-items: flex-start;
39
+ text-align: left;
32
40
  }
33
41
 
34
42
  &.align-center {
@@ -1,34 +1,16 @@
1
1
  ---
2
2
  import type { HTMLTag, Polymorphic } from 'astro/types'
3
3
  import Component from '../_Component.astro'
4
- import Column from '../structure/Column.astro'
5
- import Row from '../structure/Row.astro'
6
- import Heading from '../typography/Heading.astro'
7
- import Label from '../typography/Label.astro'
8
- import Avatar from './Avatar.astro'
9
4
  import Icon from './Icon.astro'
10
5
 
11
6
  type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
12
7
  color?: 'base' | 'brand'
13
- radius?: 'none' | 'auto' | 'full'
14
8
  value?: number
15
9
  size?: string
16
10
  compact?: boolean
17
- avatars?: string[]
18
- label?: string
19
- heading: string
20
11
  }
21
12
 
22
- const {
23
- color = 'brand',
24
- radius = 'full',
25
- compact = true,
26
- value,
27
- heading,
28
- avatars,
29
- label,
30
- ...rest
31
- } = Astro.props
13
+ const { value, ...rest } = Astro.props
32
14
 
33
15
  const getIcon = (count: number) => {
34
16
  if (!value) return
@@ -40,64 +22,26 @@ const getIcon = (count: number) => {
40
22
  ---
41
23
 
42
24
  <Component
43
- class:list={['rating']}
44
- {compact}
25
+ class:list={'rating'}
45
26
  {...rest}
46
27
  >
47
28
  {
48
- avatars?.map((avatar) => (
49
- <Avatar
50
- {radius}
51
- src={avatar}
52
- />
53
- ))
29
+ value &&
30
+ [1, 2, 3, 4, 5].map((_, i) => (
31
+ <Icon
32
+ name={getIcon(i + 1)}
33
+ class:list={'rating-icon-solid'}
34
+ />
35
+ ))
54
36
  }
55
- <Column>
56
- <Row>
57
- {
58
- value &&
59
- [1, 2, 3, 4, 5].map((_, i) => (
60
- <Icon
61
- {color}
62
- name={getIcon(i + 1)}
63
- class:list={'rating-icon-solid'}
64
- />
65
- ))
66
- }
67
- </Row>
68
- <Label
69
- color="base"
70
- html={label}
71
- />
72
- <Heading
73
- level={6}
74
- html={heading}
75
- />
76
- </Column>
77
37
  </Component>
78
38
 
79
39
  <style is:global lang="scss">
80
40
  @import '../../css/utils.scss';
81
41
 
82
42
  @include component('rating') {
83
- display: inline-flex;
43
+ display: flex;
84
44
  align-items: center;
85
-
86
- .avatar {
87
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
88
- }
89
-
90
- * + .column {
91
- margin-left: var(--space-4);
92
- }
93
-
94
- .label,
95
- .heading {
96
- margin-top: var(--space-2) !important;
97
- }
98
-
99
- .avatar + .avatar {
100
- margin-left: calc(-1 * var(--space-5));
101
- }
45
+ gap: var(--space-2);
102
46
  }
103
47
  </style>
@@ -4,6 +4,8 @@ import Component from '../_Component.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
6
6
  align?: 'start' | 'center' | 'end'
7
+ position?: 'inset'
8
+ space?: 'none' | 'auto'
7
9
  structure?:
8
10
  | 'bento'
9
11
  | 'carousel'
@@ -18,6 +20,7 @@ type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
18
20
 
19
21
  const {
20
22
  as = 'div',
23
+ space = 'auto',
21
24
  structure = 'column',
22
25
  align = 'start',
23
26
  ...rest
@@ -29,6 +32,7 @@ const {
29
32
  {as}
30
33
  {structure}
31
34
  {align}
35
+ {space}
32
36
  {...rest}
33
37
  >
34
38
  <slot />
@@ -12,7 +12,9 @@ type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> & {
12
12
  contrast?: boolean
13
13
  compact?: boolean
14
14
  ratio?: 'landscape' | 'portrait' | 'square' | number
15
+ space?: 'auto' | 'none'
15
16
  variant?:
17
+ | 'base'
16
18
  | 'ghost'
17
19
  | 'subtle'
18
20
  | 'surface'
@@ -25,6 +27,7 @@ type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> & {
25
27
  const {
26
28
  href,
27
29
  as = href ? 'a' : 'div',
30
+ space = 'auto',
28
31
  frame = 'panel',
29
32
  structure = 'column',
30
33
  compact = true,
@@ -41,6 +44,7 @@ const {
41
44
  {radius}
42
45
  {structure}
43
46
  {variant}
47
+ {space}
44
48
  {frame}
45
49
  {as}
46
50
  {...rest}
@@ -10,11 +10,14 @@ type Props<As extends HTMLTag = 'footer'> = Polymorphic<{ as: As }> & {
10
10
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
11
11
  scheme?: 'light' | 'dark'
12
12
  color?: 'base' | 'brand'
13
+ space?: 'none' | 'auto'
14
+
13
15
  compact?: boolean
14
16
  }
15
17
 
16
18
  const {
17
19
  as = 'footer',
20
+ space = 'auto',
18
21
  structure = 'spread',
19
22
  variant = 'subtle',
20
23
  frame = 'fill',
@@ -28,6 +31,7 @@ const {
28
31
  {as}
29
32
  {variant}
30
33
  {frame}
34
+ {space}
31
35
  {...rest}
32
36
  >
33
37
  <slot />
@@ -76,6 +80,7 @@ const {
76
80
 
77
81
  &.align-start {
78
82
  align-items: flex-start;
83
+ text-align: left;
79
84
  }
80
85
 
81
86
  &.align-center {
@@ -9,11 +9,13 @@ type Props<As extends HTMLTag = 'header'> = Polymorphic<{ as: As }> & {
9
9
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
10
10
  frame?: 'fill' | 'panel'
11
11
  align?: 'start' | 'center' | 'end'
12
+ space?: 'none' | 'auto'
12
13
  compact?: boolean
13
14
  }
14
15
 
15
16
  const {
16
17
  as = 'header',
18
+ space = 'auto',
17
19
  structure = 'spread',
18
20
  frame = 'fill',
19
21
  variant = 'subtle',
@@ -29,6 +31,7 @@ const {
29
31
  {compact}
30
32
  {structure}
31
33
  {variant}
34
+ {space}
32
35
  {...rest}
33
36
  >
34
37
  <slot />
@@ -10,11 +10,14 @@ type Props<As extends HTMLTag = 'section'> = Polymorphic<{ as: As }> & {
10
10
  variant?: 'ghost' | 'subtle' | 'outline' | 'soft' | 'solid' | 'surface'
11
11
  align?: 'start' | 'center' | 'end'
12
12
  structure?: 'column' | 'split' | 'spread'
13
+ // order?: 'reverse' | 'switch'
14
+ space?: 'auto' | 'none'
13
15
  compact?: boolean
14
16
  }
15
17
 
16
18
  const {
17
19
  as = 'div',
20
+ space = 'auto',
18
21
  frame = 'fill',
19
22
  structure = 'column',
20
23
  variant = 'ghost',
@@ -29,6 +32,7 @@ const {
29
32
  {frame}
30
33
  {variant}
31
34
  {align}
35
+ {space}
32
36
  {structure}
33
37
  {...rest}
34
38
  >
@@ -82,5 +86,17 @@ const {
82
86
  border-radius: var(--radius-3);
83
87
  overflow: hidden;
84
88
  }
89
+
90
+ // &.order-reverse {
91
+ // --is-reverse: initial;
92
+
93
+ // > *:first-child {
94
+ // order: 999;
95
+ // }
96
+
97
+ // & > *:last-child {
98
+ // order: -999;
99
+ // }
100
+ // }
85
101
  }
86
102
  </style>
@@ -7,14 +7,16 @@ type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
7
7
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
8
8
  compact?: boolean
9
9
  align?: 'start' | 'center' | 'end'
10
+ space?: 'none' | 'auto'
10
11
  }
11
12
 
12
- const { align = 'start', ...rest } = Astro.props
13
+ const { space = 'auto', align = 'start', ...rest } = Astro.props
13
14
  ---
14
15
 
15
16
  <Component
16
17
  class:list={['column']}
17
18
  {align}
19
+ {space}
18
20
  {...rest}
19
21
  >
20
22
  <slot />
@@ -22,7 +24,6 @@ const { align = 'start', ...rest } = Astro.props
22
24
 
23
25
  <style is:global lang="scss">
24
26
  @import '../../css/utils.scss';
25
- @import '../../css/space.scss';
26
27
 
27
28
  @include component('column') {
28
29
  display: flex;
@@ -31,6 +32,7 @@ const { align = 'start', ...rest } = Astro.props
31
32
 
32
33
  &.align-start {
33
34
  align-items: flex-start;
35
+ text-align: left;
34
36
  }
35
37
 
36
38
  &.align-center {
@@ -46,6 +48,15 @@ const { align = 'start', ...rest } = Astro.props
46
48
  align-items: flex-end;
47
49
  }
48
50
 
49
- @include space-y;
51
+ &.space-auto {
52
+ > * + * {
53
+ margin-top: var(--space-auto);
54
+ }
55
+
56
+ > * + .carousel {
57
+ margin-top: 0;
58
+ padding-top: var(--space-auto);
59
+ }
60
+ }
50
61
  }
51
62
  </style>
@@ -7,14 +7,16 @@ type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
7
7
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
8
8
  compact?: boolean
9
9
  align?: 'start' | 'center' | 'end'
10
+ space?: 'none' | 'auto'
10
11
  }
11
12
 
12
- const { align = 'center', ...rest } = Astro.props
13
+ const { space = 'auto', align = 'center', ...rest } = Astro.props
13
14
  ---
14
15
 
15
16
  <Component
16
17
  class:list={['row']}
17
18
  {align}
19
+ {space}
18
20
  {...rest}
19
21
  >
20
22
  <slot />
@@ -22,15 +24,13 @@ const { align = 'center', ...rest } = Astro.props
22
24
 
23
25
  <style is:global lang="scss">
24
26
  @import '../../css/utils.scss';
25
- @import '../../css/space.scss';
26
27
 
27
28
  @include component('row') {
28
29
  display: flex;
29
30
 
30
- @include space-x;
31
-
32
31
  &.align-start {
33
32
  align-items: flex-start;
33
+ text-align: left;
34
34
  }
35
35
 
36
36
  &.align-center {
@@ -40,5 +40,11 @@ const { align = 'center', ...rest } = Astro.props
40
40
  &.align-end {
41
41
  align-items: flex-end;
42
42
  }
43
+
44
+ &.space-auto {
45
+ > * + * {
46
+ margin-left: var(--space-auto);
47
+ }
48
+ }
43
49
  }
44
50
  </style>
@@ -7,14 +7,16 @@ type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
7
7
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
8
8
  compact?: boolean
9
9
  align?: 'start' | 'center' | 'end'
10
+ space?: 'none' | 'auto'
10
11
  }
11
12
 
12
- const { align = 'center', ...rest } = Astro.props
13
+ const { space = 'auto', align = 'center', ...rest } = Astro.props
13
14
  ---
14
15
 
15
16
  <Component
16
17
  class:list={['split']}
17
18
  {align}
19
+ {space}
18
20
  {...rest}
19
21
  >
20
22
  <slot />
@@ -22,7 +24,6 @@ const { align = 'center', ...rest } = Astro.props
22
24
 
23
25
  <style is:global lang="scss">
24
26
  @import '../../css/utils.scss';
25
- @import '../../css/space.scss';
26
27
 
27
28
  @include component('split') {
28
29
  display: grid;
@@ -31,7 +32,11 @@ const { align = 'center', ...rest } = Astro.props
31
32
  width: 100%;
32
33
 
33
34
  @media (max-width: 1023.9999px) {
34
- @include space-y;
35
+ &.space-auto {
36
+ > * + * {
37
+ margin-top: var(--space-auto);
38
+ }
39
+ }
35
40
  }
36
41
 
37
42
  @media (min-width: 1024px) {
@@ -41,6 +46,7 @@ const { align = 'center', ...rest } = Astro.props
41
46
 
42
47
  &.align-start {
43
48
  align-items: flex-start;
49
+ text-align: left;
44
50
  }
45
51
 
46
52
  &.align-center {
@@ -32,6 +32,7 @@ const { align = 'center', ...rest } = Astro.props
32
32
 
33
33
  &.align-start {
34
34
  align-items: flex-start;
35
+ text-align: left;
35
36
  }
36
37
 
37
38
  &.align-center {
@@ -31,6 +31,7 @@ const { align = 'center', ...rest } = Astro.props
31
31
 
32
32
  &.align-start {
33
33
  align-items: flex-start;
34
+ text-align: left;
34
35
  }
35
36
 
36
37
  &.align-center {
package/src/css/color.css CHANGED
@@ -49,7 +49,7 @@
49
49
  --brand-11: #ff976f;
50
50
  --brand-12: #ffd8c9;
51
51
  --brand-contrast: #fff;
52
- --brand-background: #000;
52
+ --brand-background: #160f0d;
53
53
 
54
54
  --base-1: #101113;
55
55
  --base-2: #18191b;
@@ -64,7 +64,7 @@
64
64
  --base-11: #b0b4ba;
65
65
  --base-12: #edeef0;
66
66
  --base-contrast: #ffffff;
67
- --base-background: #000;
67
+ --base-background: #101113;
68
68
 
69
69
  color-scheme: dark;
70
70
  }
@@ -154,7 +154,7 @@
154
154
  .variant-base,
155
155
  .variant-base
156
156
  *:not([class*='variant-']):not(.variant-base [class*='variant-'] *) {
157
- --background: var(--color-1);
157
+ --background: var(--color-background, var(--color-1));
158
158
  --background-hover: var(--color-1);
159
159
  --background-active: var(--color-1);
160
160
  --border: var(--color-a6);
@@ -0,0 +1,64 @@
1
+ .full + .full,
2
+ .full + .box,
3
+ .full + .masonry,
4
+ .full + .carousel,
5
+ .image + .full,
6
+ .icon + .full {
7
+ --space-auto: var(--space-6);
8
+ }
9
+
10
+ .full + .group,
11
+ .full + .row,
12
+ .full + .wrap,
13
+ .full + .button,
14
+ .full + .price,
15
+ .full + .switch {
16
+ --space-auto: var(--space-5);
17
+ }
18
+
19
+ .full + .heading,
20
+ .full + .link,
21
+ .full + .list,
22
+ .full + .paragraph,
23
+ .full + .text,
24
+ .full + .tagline,
25
+ .full + .input,
26
+ .full + .textarea,
27
+ .full + .select,
28
+ .full + .badge,
29
+ .full + .rating {
30
+ --space-auto: var(--space-4);
31
+ }
32
+
33
+ .paragraph + .paragraph,
34
+ .text + .text,
35
+ .button + .button,
36
+ .input + .button {
37
+ --space-auto: var(--space-3);
38
+ }
39
+
40
+ .full + .label,
41
+ .label + .input,
42
+ .label + .textarea,
43
+ .label + .select,
44
+ .icon + .icon {
45
+ --space-auto: var(--space-2);
46
+ }
47
+
48
+ .rating + .text,
49
+ .text + .rating {
50
+ --space-auto: var(--space-1);
51
+ }
52
+
53
+ .image + .full,
54
+ .icon + .full {
55
+ --space-auto: var(--space-6);
56
+ }
57
+
58
+ /* // .button:not(.variant-link) + .button:not(.variant-link) {
59
+ // margin-top: var(--space-3);
60
+ // }
61
+
62
+ // .variant-link + .variant-link{
63
+ // margin-top: var(--space-2);
64
+ // } */
@@ -1,107 +0,0 @@
1
- @mixin space-x {
2
- > {
3
- .full + .full {
4
- margin-left: var(--space-6);
5
- }
6
-
7
- .full + .group,
8
- .full + .row,
9
- .full + .wrap,
10
- .full + .button,
11
- .full + .switch {
12
- margin-left: var(--space-5);
13
- }
14
-
15
- .full + .heading,
16
- .full + .link,
17
- .full + .list,
18
- .full + .paragraph,
19
- .full + .text,
20
- .full + .tagline,
21
- .full + .input,
22
- .full + .badge,
23
- .full + .rating {
24
- margin-left: var(--space-4);
25
- }
26
-
27
- .paragraph + .paragraph,
28
- .text + .text,
29
- .button + .button,
30
- .input + .button {
31
- margin-left: var(--space-3);
32
- }
33
-
34
- .full + .label,
35
- .icon + .icon,
36
- .label + .full {
37
- margin-left: var(--space-2);
38
- }
39
-
40
- .image + .full {
41
- margin-left: var(--space-6);
42
- }
43
- }
44
- }
45
-
46
- @mixin space-y {
47
- > {
48
- .full + .full,
49
- .full + .box,
50
- .full + .masonry {
51
- margin-top: var(--space-6);
52
- }
53
-
54
- .full + .carousel {
55
- margin-top: 0;
56
- padding-top: var(--space-6);
57
- }
58
-
59
- .full + .group,
60
- .full + .row,
61
- .full + .wrap,
62
- .full + .button,
63
- .full + .price,
64
- .full + .switch {
65
- margin-top: var(--space-5);
66
- }
67
-
68
- .full + .heading,
69
- .full + .link,
70
- .full + .list,
71
- .full + .paragraph,
72
- .full + .text,
73
- .full + .tagline,
74
- .full + .input,
75
- .full + .textarea,
76
- .full + .select,
77
- .full + .badge,
78
- .full + .rating {
79
- margin-top: var(--space-4);
80
- }
81
-
82
- .paragraph + .paragraph,
83
- .text + .text,
84
- .button:not(.variant-link) + .button:not(.variant-link),
85
- .input + .button {
86
- margin-top: var(--space-3);
87
- }
88
-
89
- .label + .input,
90
- .variant-link + .variant-link,
91
- .label + .textarea,
92
- .full + .label,
93
- .label + .select {
94
- margin-top: var(--space-2);
95
- }
96
-
97
- .rating + .text,
98
- .text + .rating {
99
- margin-top: var(--space-1);
100
- }
101
-
102
- .image + .full,
103
- .icon + .full {
104
- margin-top: var(--space-6);
105
- }
106
- }
107
- }