@refraction-ui/astro 0.20.0 → 0.20.1
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.
|
@@ -55,17 +55,14 @@ const hasDefaultSlot = Astro.slots.has('default')
|
|
|
55
55
|
{...rest}
|
|
56
56
|
>
|
|
57
57
|
{hasDefaultSlot ? (
|
|
58
|
-
<!-- Media slot fills the tile -->
|
|
59
58
|
<div class="absolute inset-0 h-full w-full">
|
|
60
59
|
<slot />
|
|
61
60
|
</div>
|
|
62
61
|
) : avatarUrl ? (
|
|
63
|
-
<!-- Avatar image fallback -->
|
|
64
62
|
<div class={videoTileAvatarFallbackClass}>
|
|
65
63
|
<img src={avatarUrl} alt={name} class={videoTileAvatarCircleClass} />
|
|
66
64
|
</div>
|
|
67
65
|
) : (
|
|
68
|
-
<!-- Initials fallback -->
|
|
69
66
|
<div class={videoTileAvatarFallbackClass}>
|
|
70
67
|
<div class={videoTileAvatarCircleClass} aria-hidden="true">{initials}</div>
|
|
71
68
|
</div>
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export const pageHeaderClass = 'flex flex-wrap items-start justify-between gap-4'
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
export const pageHeaderTextClass = 'flex min-w-0
|
|
7
|
+
/** Give text a preferred width so actions wrap before squeezing the heading. */
|
|
8
|
+
export const pageHeaderTextClass = 'flex min-w-0 basis-64 grow flex-col gap-1'
|
|
9
9
|
|
|
10
10
|
/** Small uppercase eyebrow above the title. */
|
|
11
11
|
export const pageHeaderKickerClass =
|
package/dist/shared/index.ts
CHANGED
package/dist/shared/types.ts
CHANGED
|
@@ -12,6 +12,16 @@ export interface BaseProps {
|
|
|
12
12
|
[dataAttr: `data-${string}`]: string | undefined
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* `data-*` attributes, for props that take element attributes as an object
|
|
17
|
+
* (e.g. DataTable `getRowProps`, StatGrid item `props`). React's
|
|
18
|
+
* HTMLAttributes declares no `data-*` key, so without this an object of only
|
|
19
|
+
* data attributes fails TypeScript's weak-type check.
|
|
20
|
+
*/
|
|
21
|
+
export type DataAttributes = {
|
|
22
|
+
[dataAttr: `data-${string}`]: string | number | boolean | undefined
|
|
23
|
+
}
|
|
24
|
+
|
|
15
25
|
/** Accessibility props */
|
|
16
26
|
export interface AccessibilityProps {
|
|
17
27
|
role?: string
|