@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
- /** Text cluster (kicker, title, description). */
8
- export const pageHeaderTextClass = 'flex min-w-0 flex-1 flex-col gap-1'
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 =
@@ -4,6 +4,7 @@ export type {
4
4
  AccessibilityProps,
5
5
  ThemeProps,
6
6
  CompositionProps,
7
+ DataAttributes,
7
8
  } from './types.js'
8
9
 
9
10
  export type {
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refraction-ui/astro",
3
- "version": "0.20.0",
3
+ "version": "0.20.1",
4
4
  "description": "All Refraction UI Astro components in one package",
5
5
  "type": "module",
6
6
  "exports": {