fulldev-ui 0.2.11 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fulldev-ui",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
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",
@@ -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) => str && str.trim().length > 0
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: number | string
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'
@@ -102,7 +102,9 @@
102
102
  :where([class*='theme-']),
103
103
  .variant-base,
104
104
  .variant-base
105
- [class*='density-']:not(.variant-base [class*='variant-'] [class*='theme-']) {
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);
@@ -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: ComponentProps<typeof Head>['title']
9
- description: ComponentProps<typeof Head>['description']
10
- image: ComponentProps<typeof Head>['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
  }