fulldev-ui 0.2.10 → 0.2.12
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 +1 -1
- package/src/components/_Tag.astro +2 -1
- package/src/components/base/Button.astro +15 -1
- package/src/components/base/Checkbox.astro +1 -1
- package/src/components/base/Radio.astro +1 -1
- package/src/components/base/Rating.astro +1 -1
- package/src/components/segment/Card.astro +1 -2
- package/src/components/structure/Row.astro +26 -0
- package/src/components/typography/Label.astro +1 -1
- package/src/css/colors.css +10 -8
- package/src/css/sizes.css +9 -3
- package/src/css/styles.css +0 -1
- package/src/index.ts +1 -0
- package/src/layouts/Layout.astro +3 -3
package/package.json
CHANGED
|
@@ -27,7 +27,8 @@ const {
|
|
|
27
27
|
} = Astro.props
|
|
28
28
|
|
|
29
29
|
const slot = await Astro.slots.render('default')
|
|
30
|
-
const hasContent = (str?: string) =>
|
|
30
|
+
const hasContent = (str?: string) =>
|
|
31
|
+
typeof str === 'string' && str.trim().length > 0
|
|
31
32
|
const render =
|
|
32
33
|
ifProp == 'content'
|
|
33
34
|
? hasContent(slot) || hasContent(html) || hasContent(text)
|
|
@@ -7,7 +7,7 @@ type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> &
|
|
|
7
7
|
ComponentProps<typeof Tag> & {
|
|
8
8
|
html?: string
|
|
9
9
|
text?: string
|
|
10
|
-
variant?: 'primary' | 'secondary' | 'outline' | 'ghost'
|
|
10
|
+
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'link'
|
|
11
11
|
icon?: ComponentProps<typeof Icon> | ComponentProps<typeof Icon>['name']
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -53,6 +53,20 @@ const { as = 'a', variant = 'primary', icon, ...rest } = Astro.props
|
|
|
53
53
|
text-decoration: none;
|
|
54
54
|
white-space: nowrap;
|
|
55
55
|
|
|
56
|
+
&.variant-link {
|
|
57
|
+
--background: transparent;
|
|
58
|
+
--hover: transparent;
|
|
59
|
+
box-shadow: none !important;
|
|
60
|
+
border-color: transparent;
|
|
61
|
+
background-color: transparent;
|
|
62
|
+
padding: 0;
|
|
63
|
+
font-weight: 400;
|
|
64
|
+
|
|
65
|
+
&:hover {
|
|
66
|
+
text-decoration: underline;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
56
70
|
&:hover {
|
|
57
71
|
background-color: var(--hover);
|
|
58
72
|
}
|
|
@@ -5,7 +5,7 @@ import Icon from './Icon.astro'
|
|
|
5
5
|
|
|
6
6
|
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
|
|
7
7
|
ComponentProps<typeof Tag> & {
|
|
8
|
-
value
|
|
8
|
+
value?: number | string
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const { variant = 'accent', value = Astro.props.html, ...rest } = Astro.props
|
|
@@ -4,7 +4,7 @@ import Tag from '../_Tag.astro'
|
|
|
4
4
|
|
|
5
5
|
type Props<As extends HTMLTag = 'a'> = Polymorphic<{ as: As }> &
|
|
6
6
|
ComponentProps<typeof Tag> & {
|
|
7
|
-
structure?: 'stack' | 'group' | 'split' | 'spread'
|
|
7
|
+
structure?: 'stack' | 'group' | 'split' | 'spread' | 'row'
|
|
8
8
|
align?: 'start' | 'center' | 'end' | 'stretch'
|
|
9
9
|
variant?: 'base' | 'raised' | 'primary'
|
|
10
10
|
frame?: 'fill' | 'panel'
|
|
@@ -56,7 +56,6 @@ const {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
&.frame-panel {
|
|
59
|
-
gap: 0;
|
|
60
59
|
border: 1px solid var(--border);
|
|
61
60
|
border-radius: var(--radius-2);
|
|
62
61
|
background-color: var(--background);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Tag from '../_Tag.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
|
|
6
|
+
ComponentProps<typeof Tag>
|
|
7
|
+
|
|
8
|
+
const { ...rest } = Astro.props
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<Tag
|
|
12
|
+
class:list={['row']}
|
|
13
|
+
{...rest}
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</Tag>
|
|
17
|
+
|
|
18
|
+
<style is:global lang="scss">
|
|
19
|
+
@import '../../css/utils.scss';
|
|
20
|
+
|
|
21
|
+
@include component('row') {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--space-4);
|
|
25
|
+
}
|
|
26
|
+
</style>
|
package/src/css/colors.css
CHANGED
|
@@ -102,7 +102,9 @@
|
|
|
102
102
|
:where([class*='theme-']),
|
|
103
103
|
.variant-base,
|
|
104
104
|
.variant-base
|
|
105
|
-
[class*='density-']:not(
|
|
105
|
+
[class*='density-']:not(
|
|
106
|
+
.variant-base [class*='variant-'] [class*='theme-']
|
|
107
|
+
):not(.variant-base[class*='variant-'][class*='theme-']) {
|
|
106
108
|
--background: var(--base-background);
|
|
107
109
|
--hover: var(--base-hover);
|
|
108
110
|
--border: var(--base-border);
|
|
@@ -114,7 +116,7 @@
|
|
|
114
116
|
.variant-primary
|
|
115
117
|
[class*='density-']:not(
|
|
116
118
|
.variant-primary [class*='variant-'] [class*='theme-']
|
|
117
|
-
) {
|
|
119
|
+
):not(.variant-primary[class*='variant-'][class*='theme-']) {
|
|
118
120
|
--background: var(--primary-background, var(--base-foreground));
|
|
119
121
|
--hover: var(--primary-hover, var(--base-hover));
|
|
120
122
|
--border: var(--primary-border, transparent);
|
|
@@ -126,7 +128,7 @@
|
|
|
126
128
|
.variant-secondary
|
|
127
129
|
[class*='density-']:not(
|
|
128
130
|
.variant-secondary [class*='variant-'] [class*='theme-']
|
|
129
|
-
) {
|
|
131
|
+
):not(.variant-secondary[class*='variant-'][class*='theme-']) {
|
|
130
132
|
--background: var(--secondary-background, var(--base-background));
|
|
131
133
|
--hover: var(--secondary-hover, var(--base-hover));
|
|
132
134
|
--border: var(--secondary-border, transparent);
|
|
@@ -138,7 +140,7 @@
|
|
|
138
140
|
.variant-accent
|
|
139
141
|
[class*='density-']:not(
|
|
140
142
|
.variant-accent [class*='variant-'] [class*='theme-']
|
|
141
|
-
) {
|
|
143
|
+
):not(.variant-accent[class*='variant-'][class*='theme-']) {
|
|
142
144
|
--background: var(--accent-background, var(--base-background));
|
|
143
145
|
--hover: var(--accent-hover, var(--base-hover));
|
|
144
146
|
--border: var(--accent-border, var(--base-border));
|
|
@@ -150,7 +152,7 @@
|
|
|
150
152
|
.variant-muted
|
|
151
153
|
[class*='density-']:not(
|
|
152
154
|
.variant-muted [class*='variant-'] [class*='theme-']
|
|
153
|
-
) {
|
|
155
|
+
):not(.variant-muted[class*='variant-'][class*='theme-']) {
|
|
154
156
|
--background: var(--muted-background, var(--base-background));
|
|
155
157
|
--hover: var(--muted-hover, var(--base-hover));
|
|
156
158
|
--border: var(--muted-border, var(--base-border));
|
|
@@ -162,7 +164,7 @@
|
|
|
162
164
|
.variant-ghost
|
|
163
165
|
[class*='density-']:not(
|
|
164
166
|
.variant-ghost [class*='variant-'] [class*='theme-']
|
|
165
|
-
) {
|
|
167
|
+
):not(.variant-ghost[class*='variant-'][class*='theme-']) {
|
|
166
168
|
--background: var(--ghost-background, transparent);
|
|
167
169
|
--hover: var(--ghost-hover, var(--base-hover));
|
|
168
170
|
--border: var(--ghost-border, transparent);
|
|
@@ -174,7 +176,7 @@
|
|
|
174
176
|
.variant-outline
|
|
175
177
|
[class*='density-']:not(
|
|
176
178
|
.variant-outline [class*='variant-'] [class*='theme-']
|
|
177
|
-
) {
|
|
179
|
+
):not(.variant-outline[class*='variant-'][class*='theme-']) {
|
|
178
180
|
--background: var(--outline-background, transparent);
|
|
179
181
|
--hover: var(--outline-hover, var(--base-hover));
|
|
180
182
|
--border: var(--outline-border, var(--base-border));
|
|
@@ -186,7 +188,7 @@
|
|
|
186
188
|
.variant-raised
|
|
187
189
|
[class*='density-']:not(
|
|
188
190
|
.variant-raised [class*='variant-'] [class*='theme-']
|
|
189
|
-
) {
|
|
191
|
+
):not(.variant-raised[class*='variant-'][class*='theme-']) {
|
|
190
192
|
--background: var(--raised-background, var(--base-background));
|
|
191
193
|
--hover: var(--raised-hover, var(--base-hover));
|
|
192
194
|
--border: var(--raised-border, var(--base-border));
|
package/src/css/sizes.css
CHANGED
|
@@ -135,7 +135,9 @@
|
|
|
135
135
|
|
|
136
136
|
.size-sm,
|
|
137
137
|
.size-sm
|
|
138
|
-
[class*='density-']:not(.size-sm [class*='size-'] [class*='density-'])
|
|
138
|
+
[class*='density-']:not(.size-sm [class*='size-'] [class*='density-']):not(
|
|
139
|
+
.size-sm [class*='size-'][class*='density-']
|
|
140
|
+
) {
|
|
139
141
|
--space-1: var(--space-sm-1);
|
|
140
142
|
--space-2: var(--space-sm-2);
|
|
141
143
|
--space-3: var(--space-sm-3);
|
|
@@ -162,7 +164,9 @@
|
|
|
162
164
|
:where([class*='density-']),
|
|
163
165
|
.size-md,
|
|
164
166
|
.size-md
|
|
165
|
-
[class*='density-']:not(.size-md [class*='size-'] [class*='density-'])
|
|
167
|
+
[class*='density-']:not(.size-md [class*='size-'] [class*='density-']):not(
|
|
168
|
+
.size-md [class*='size-'][class*='density-']
|
|
169
|
+
) {
|
|
166
170
|
--space-1: var(--space-md-1);
|
|
167
171
|
--space-2: var(--space-md-2);
|
|
168
172
|
--space-3: var(--space-md-3);
|
|
@@ -187,7 +191,9 @@
|
|
|
187
191
|
|
|
188
192
|
.size-lg,
|
|
189
193
|
.size-lg
|
|
190
|
-
[class*='density-']:not(.size-lg [class*='size-'] [class*='density-'])
|
|
194
|
+
[class*='density-']:not(.size-lg [class*='size-'] [class*='density-']):not(
|
|
195
|
+
.size-lg [class*='size-'][class*='density-']
|
|
196
|
+
) {
|
|
191
197
|
--space-1: var(--space-lg-1);
|
|
192
198
|
--space-2: var(--space-lg-2);
|
|
193
199
|
--space-3: var(--space-lg-3);
|
package/src/css/styles.css
CHANGED
package/src/index.ts
CHANGED
|
@@ -43,6 +43,7 @@ export { default as Carousel } from './components/structure/Carousel.astro'
|
|
|
43
43
|
export { default as Grid } from './components/structure/Grid.astro'
|
|
44
44
|
export { default as Group } from './components/structure/Group.astro'
|
|
45
45
|
export { default as Masonry } from './components/structure/Masonry.astro'
|
|
46
|
+
export { default as Row } from './components/structure/Row.astro'
|
|
46
47
|
export { default as Split } from './components/structure/Split.astro'
|
|
47
48
|
export { default as Spread } from './components/structure/Spread.astro'
|
|
48
49
|
export { default as Stack } from './components/structure/Stack.astro'
|
package/src/layouts/Layout.astro
CHANGED
|
@@ -5,9 +5,9 @@ import Body from '../components/segment/Body.astro'
|
|
|
5
5
|
import Head from '../components/utility/Head.astro'
|
|
6
6
|
|
|
7
7
|
interface Props extends ComponentProps<typeof Tag> {
|
|
8
|
-
title
|
|
9
|
-
description
|
|
10
|
-
image
|
|
8
|
+
title?: ComponentProps<typeof Head>['title']
|
|
9
|
+
description?: ComponentProps<typeof Head>['description']
|
|
10
|
+
image?: ComponentProps<typeof Head>['image']
|
|
11
11
|
head?: ComponentProps<typeof Head>
|
|
12
12
|
body?: ComponentProps<typeof Body>
|
|
13
13
|
}
|