@tinybigui/react 0.11.0 → 0.11.2

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/dist/index.d.cts CHANGED
@@ -3085,15 +3085,12 @@ declare const Tabs: React__default.ForwardRefExoticComponent<TabsProps & React__
3085
3085
  * Uses React Aria's useTabList for role="tablist", keyboard navigation,
3086
3086
  * and accessibility attributes.
3087
3087
  *
3088
- * The active indicator slides to the selected tab using CSS transitions
3089
- * with MD3 motion tokens (medium2 duration, emphasized easing).
3088
+ * Active indicator behavior (MD3 spec):
3089
+ * - Primary: indicator width = content (label/icon) width, centered under content.
3090
+ * Measured via the [data-tab-content] child span of the selected tab.
3091
+ * - Secondary: indicator spans the full tab button width.
3090
3092
  *
3091
- * MD3 Specifications:
3092
- * - Container background: bg-surface
3093
- * - Container height: 48dp
3094
- * - Bottom border: 1dp, outline-variant color
3095
- * - Fixed layout: tabs fill width equally
3096
- * - Scrollable layout: overflow-x, no wrapping
3093
+ * Motion: left and width are spatial properties → spring-standard-default-spatial.
3097
3094
  *
3098
3095
  * @example
3099
3096
  * ```tsx
@@ -3111,25 +3108,26 @@ declare const TabList: React__default.ForwardRefExoticComponent<TabListProps & R
3111
3108
  /**
3112
3109
  * Material Design 3 Tab Component (Layer 3: Styled)
3113
3110
  *
3114
- * Renders a single tab item inside a TabList.
3115
- * Supports three content modes: icon-only, label-only, icon + label (stacked).
3111
+ * Architecture: Variants-vs-States
3112
+ * - Design-time variants (primary/secondary, fixed/scrollable) live in CVA.
3113
+ * - All interaction states are expressed as data-* attributes on the root button
3114
+ * via getInteractionDataAttributes, consumed by slots using group-data-[x]/tab.
3115
+ * - Content flags (data-with-icon, data-with-label) describe structure, set explicitly.
3116
3116
  *
3117
- * Features:
3118
- * - Icon-only, label-only, icon + label (stacked) content modes
3119
- * - Ripple effect (Material Design)
3120
- * - MD3 state layers (hover 8%, pressed 12%)
3121
- * - Badge support (numeric, dot, 999+)
3122
- * - Disabled state (opacity-38, not focusable)
3123
- * - ✅ Full keyboard accessibility (via React Aria)
3124
- * - ✅ Primary/secondary variant colors
3117
+ * Slots:
3118
+ * root button — group/tab; typography, label color, disabled, content flags
3119
+ * state layer — absolute inset hover/focus/pressed overlay
3120
+ * content span — data-tab-content; measured by TabList for primary indicator width
3121
+ * icon wrapper — 24dp icon + badge anchor
3122
+ * label span — truncated text label
3125
3123
  *
3126
3124
  * MD3 Specifications:
3127
- * - Minimum height: 48dp
3128
- * - Minimum width: 90dp
3129
- * - Typography: Title Small (14px, weight 500, tracking 0.1px)
3130
- * - Icon: 24x24dp
3131
- * - Active indicator: 3dp primary / 2dp secondary
3132
- * - State layers: 8% hover, 12% pressed/focus
3125
+ * - Minimum height: 48dp (label/icon-only), 64dp (icon+label stacked)
3126
+ * - Typography: Title Small (text-title-small, weight 500, tracking 0.1px)
3127
+ * - Icon: 24×24dp
3128
+ * - Active indicator: 3dp primary / 2dp secondary — both bg-primary
3129
+ * - State layers: hover 8%, focus/pressed 10%
3130
+ * - Disabled: 38% opacity (not focusable)
3133
3131
  *
3134
3132
  * @example
3135
3133
  * ```tsx
@@ -4587,6 +4585,12 @@ interface CardHeadlessProps extends AriaButtonProps, Pick<HTMLAttributes<HTMLDiv
4587
4585
  * Card content.
4588
4586
  */
4589
4587
  children?: ReactNode;
4588
+ /**
4589
+ * Presence-based interaction/content `data-*` attributes forwarded onto the
4590
+ * root element (e.g. `data-hovered`, `data-pressed`, `data-interactive`,
4591
+ * `data-dragged`). Consumed by slot `group-data-[x]/card:` selectors.
4592
+ */
4593
+ [dataAttr: `data-${string}`]: unknown;
4590
4594
  }
4591
4595
  /**
4592
4596
  * Props for the `CardMedia` sub-component.
@@ -4695,29 +4699,37 @@ interface CardActionsProps {
4695
4699
  }
4696
4700
 
4697
4701
  /**
4698
- * `Card` Layer 3 MD3 Styled Card Component.
4702
+ * Material Design 3 Card Component (Layer 3: Styled).
4699
4703
  *
4700
- * Wraps `CardHeadless` with Material Design 3 visual styling: elevation shadows,
4701
- * state layer, ripple feedback, and all three card variants.
4704
+ * Wraps `CardHeadless` with MD3 visual styling using the Variants-vs-States
4705
+ * architecture: all interaction states are expressed as `data-*` attributes on
4706
+ * the root and consumed by each slot via `group-data-[x]/card` selectors — no
4707
+ * state variants live in CVA.
4702
4708
  *
4703
4709
  * ## Modes
4704
4710
  *
4705
- * | Condition | Rendered as | Ripple | State layer |
4706
- * |---|---|---|---|
4707
- * | `onPress` or `href` provided | `role="button"` | ✅ | ✅ |
4708
- * | Neither provided | `role="article"` | ❌ | ❌ |
4711
+ * | Condition | Rendered as | Ripple | State layer | Focus ring |
4712
+ * |---|---|---|---|---|
4713
+ * | `onPress` or `href` provided | `role="button"` | ✅ | ✅ | ✅ |
4714
+ * | Neither provided | `role="article"` | ❌ | ❌ | ❌ |
4715
+ *
4716
+ * ## Variants & elevation per state (MD3 comp tokens)
4717
+ *
4718
+ * - **elevated** — `surface-container-low`; 1 base → 2 hover → 1 focus/pressed → 4 dragged.
4719
+ * - **filled** — `surface-container-highest`; 0 base → 1 hover → 0 focus/pressed → 3 dragged.
4720
+ * - **outlined** — `surface` + `outline-variant` border; 0 base → 1 hover → 0 focus/pressed → 3 dragged.
4709
4721
  *
4710
- * ## Variants
4722
+ * ## State layer (interactive only)
4711
4723
  *
4712
- * - **elevated** `surface-container-low` background, elevation 1dp at rest (2dp on hover).
4713
- * - **filled** `surface-container-highest` background, no elevation.
4714
- * - **outlined** — `surface` background, `outline-variant` border, no elevation.
4724
+ * `on-surface` overlay: 8% hover, 10% focus/pressed, 16% dragged. Rendered below
4725
+ * the content (which carries `z-10`) so the surface is tinted without reducing
4726
+ * text legibility.
4715
4727
  *
4716
4728
  * ## Dragged state
4717
4729
  *
4718
- * When `isDraggable` is `true`, the card tracks its own drag state via mouse events.
4719
- * While dragging, the `elevated` variant jumps to elevation 4dp using a slower,
4720
- * decelerate transition curve per MD3 motion spec.
4730
+ * When `isDraggable` is `true`, the card tracks its own drag state via mouse
4731
+ * events and exposes it as `data-dragged`. While dragging, elevation rises to
4732
+ * its MD3 dragged level and the state layer reaches 16% opacity.
4721
4733
  *
4722
4734
  * @example
4723
4735
  * ```tsx
@@ -4824,64 +4836,94 @@ declare const CardActions: React$1.ForwardRefExoticComponent<CardActionsProps &
4824
4836
  /**
4825
4837
  * `CardHeadless` — Layer 2 headless primitive.
4826
4838
  *
4827
- * Provides all MD3 Card interaction semantics without any visual styling.
4839
+ * Provides MD3 Card interaction semantics (press, keyboard activation, link
4840
+ * behavior) without any visual styling. Pure behavior — all interaction-state
4841
+ * styling is driven by the Layer 3 `Card` via forwarded `data-*` attributes.
4828
4842
  *
4829
4843
  * ## Dual-mode behavior
4830
4844
  *
4831
- * | Condition | Role | Keyboard | Focus ring |
4832
- * |---|---|---|---|
4833
- * | `onPress` or `href` present | `role="button"` | Enter / Space activate | `data-focus-visible="true"` on keyboard focus |
4834
- * | Neither present | `role="article"` | No activation | Not applicable |
4845
+ * | Condition | Role | Keyboard |
4846
+ * |---|---|---|
4847
+ * | `onPress` or `href` present | `role="button"` | Enter / Space activate |
4848
+ * | Neither present | `role="article"` | No activation, not a tab stop |
4835
4849
  *
4836
- * Both `useButton` and `useFocusRing` are **always** called (React Rules of Hooks).
4837
- * When the card is non-interactive, `buttonProps` are not spread onto the element
4838
- * so no keyboard interaction or tab-stop is added.
4850
+ * `useButton` is always called (Rules of Hooks); its `buttonProps` are only
4851
+ * applied to the element when the card is interactive, so a static card adds
4852
+ * no tab stop or keyboard handlers.
4839
4853
  *
4840
- * ## Focus ring
4854
+ * ## Prop passthrough
4841
4855
  *
4842
- * The `data-focus-visible` attribute is set to `"true"` only when focus was
4843
- * triggered by keyboard navigation (`useFocusRing` `isFocusVisible`).
4844
- * Mouse/touch focus leaves the attribute unset. The styled Card layer reads
4845
- * this attribute to conditionally render the MD3 focus ring.
4856
+ * Any `data-*` attributes (e.g. `data-hovered`, `data-pressed`, `data-dragged`,
4857
+ * `data-interactive`) and DOM event handlers (`onMouseDown`, `onFocus`, …) are
4858
+ * spread onto the root element so the styled layer can drive `group-data-[x]/card`
4859
+ * selectors and ripple/drag tracking.
4846
4860
  *
4847
4861
  * @example
4848
4862
  * ```tsx
4849
4863
  * // Interactive
4850
- * <CardHeadless
4851
- * onPress={handlePress}
4852
- * aria-label="View details"
4853
- * className="rounded-xl p-4"
4854
- * >
4864
+ * <CardHeadless onPress={handlePress} aria-label="View details" className="rounded-xl p-4">
4855
4865
  * Card content
4856
4866
  * </CardHeadless>
4857
4867
  *
4858
4868
  * // Static
4859
- * <CardHeadless className="rounded-xl p-4">
4860
- * Card content
4861
- * </CardHeadless>
4869
+ * <CardHeadless className="rounded-xl p-4">Card content</CardHeadless>
4862
4870
  * ```
4863
4871
  */
4864
4872
  declare const CardHeadless: React__default.ForwardRefExoticComponent<CardHeadlessProps & React__default.RefAttributes<HTMLDivElement>>;
4865
4873
 
4866
4874
  /**
4867
- * Material Design 3 Card Variants (CVA)
4875
+ * Material Design 3 Card Variants
4876
+ *
4877
+ * Architecture: Variants vs States
4878
+ * - CVA holds design-time structure only (the `variant` axis). No interaction
4879
+ * state variants (hovered/pressed/focused/dragged/disabled) live in CVA.
4880
+ * - All interaction states are driven by data-* attributes on the root via
4881
+ * `data-[x]:` (self-targeting) on the root and `group-data-[x]/card:` selectors
4882
+ * in each slot's base classes.
4883
+ * - Content flags (`data-interactive`) are set explicitly by the component.
4884
+ *
4885
+ * Slot responsibilities:
4886
+ * cardVariants — root container; shape, color, per-state elevation
4887
+ * cardStateLayerVariants — hover/focus/press/drag opacity ring (absolute overlay)
4888
+ * cardFocusRingVariants — keyboard focus outline (inset so overflow-hidden never clips it)
4889
+ *
4890
+ * MD3 Spec (https://m3.material.io/components/cards/specs):
4891
+ * Shape: medium corner (12dp) → `rounded-md`
4892
+ * State-layer color: on-surface (all variants)
4893
+ * State-layer opacities: hover 8% | focus 10% | pressed 10% | dragged 16%
4894
+ * Disabled: container 38% opacity, no pointer events
4895
+ *
4896
+ * Elevation per state (MD3 comp tokens):
4897
+ * Elevated enabled=1 hover=2 focus=1 pressed=1 dragged=4
4898
+ * Filled enabled=0 hover=1 focus=0 pressed=0 dragged=3
4899
+ * Outlined enabled=0 hover=1 focus=0 pressed=0 dragged=3
4900
+ *
4901
+ * Motion tier: Standard **default** (cards are standard-size components alongside
4902
+ * dialogs/menus — not the fast tier used for small <48dp controls like buttons).
4903
+ * All effect transitions use `duration-spring-standard-default-effects` (200ms) +
4904
+ * `ease-spring-standard-default-effects`.
4905
+ *
4906
+ * Specificity strategy (self-targeting `data-[x]:` on the root):
4907
+ * base → hover (single) → focus (single) → pressed (doubled) → dragged (tripled)
4908
+ * Doubling/tripling the attribute selector guarantees the later state wins
4909
+ * regardless of Tailwind's emitted class order. `pressed` (and `dragged`,
4910
+ * which co-occurs with a held pointer) therefore beat `hover` deterministically.
4911
+ */
4912
+ /**
4913
+ * Root container element.
4868
4914
  *
4869
- * Type-safe variant management for the Card component.
4870
- * Uses Tailwind CSS classes mapped to MD3 design tokens.
4915
+ * `overflow-hidden` clips full-bleed media (CardMedia), the ripple, and the
4916
+ * state layer to the card's rounded shape. Because the root clips, the focus
4917
+ * ring is rendered as an INSET overlay (see `cardFocusRingVariants`) rather than
4918
+ * an outset ring, so it is never cut off.
4871
4919
  *
4872
- * MD3 Specifications:
4873
- * - Shape: medium (12dp) `rounded-md`
4874
- * - Elevated: surface-container-low + elevation-1 (resting), elevation-2 (hover/interactive)
4875
- * - Filled: surface-container-highest + elevation-0
4876
- * - Outlined: surface + outline-variant border + elevation-0
4877
- * - Dragged state (elevated only): elevation-4, slower shadow transition
4878
- * - Disabled: on-surface at 12% opacity (`opacity-38`) + no pointer events
4920
+ * Elevation responds to the root's own `data-*` state attributes via
4921
+ * self-targeting selectors (the root carries both `group/card` and the state
4922
+ * attributes). The shadow, opacity, and border-color changes are effects, so
4923
+ * they use the standard-default-effects spring (200ms, no overshoot).
4879
4924
  */
4880
4925
  declare const cardVariants: (props?: ({
4881
4926
  variant?: "filled" | "outlined" | "elevated" | null | undefined;
4882
- isInteractive?: boolean | null | undefined;
4883
- isDragged?: boolean | null | undefined;
4884
- isDisabled?: boolean | null | undefined;
4885
4927
  } & class_variance_authority_types.ClassProp) | undefined) => string;
4886
4928
  /**
4887
4929
  * Extract variant prop types from CVA for typed usage.
package/dist/index.d.ts CHANGED
@@ -3085,15 +3085,12 @@ declare const Tabs: React__default.ForwardRefExoticComponent<TabsProps & React__
3085
3085
  * Uses React Aria's useTabList for role="tablist", keyboard navigation,
3086
3086
  * and accessibility attributes.
3087
3087
  *
3088
- * The active indicator slides to the selected tab using CSS transitions
3089
- * with MD3 motion tokens (medium2 duration, emphasized easing).
3088
+ * Active indicator behavior (MD3 spec):
3089
+ * - Primary: indicator width = content (label/icon) width, centered under content.
3090
+ * Measured via the [data-tab-content] child span of the selected tab.
3091
+ * - Secondary: indicator spans the full tab button width.
3090
3092
  *
3091
- * MD3 Specifications:
3092
- * - Container background: bg-surface
3093
- * - Container height: 48dp
3094
- * - Bottom border: 1dp, outline-variant color
3095
- * - Fixed layout: tabs fill width equally
3096
- * - Scrollable layout: overflow-x, no wrapping
3093
+ * Motion: left and width are spatial properties → spring-standard-default-spatial.
3097
3094
  *
3098
3095
  * @example
3099
3096
  * ```tsx
@@ -3111,25 +3108,26 @@ declare const TabList: React__default.ForwardRefExoticComponent<TabListProps & R
3111
3108
  /**
3112
3109
  * Material Design 3 Tab Component (Layer 3: Styled)
3113
3110
  *
3114
- * Renders a single tab item inside a TabList.
3115
- * Supports three content modes: icon-only, label-only, icon + label (stacked).
3111
+ * Architecture: Variants-vs-States
3112
+ * - Design-time variants (primary/secondary, fixed/scrollable) live in CVA.
3113
+ * - All interaction states are expressed as data-* attributes on the root button
3114
+ * via getInteractionDataAttributes, consumed by slots using group-data-[x]/tab.
3115
+ * - Content flags (data-with-icon, data-with-label) describe structure, set explicitly.
3116
3116
  *
3117
- * Features:
3118
- * - Icon-only, label-only, icon + label (stacked) content modes
3119
- * - Ripple effect (Material Design)
3120
- * - MD3 state layers (hover 8%, pressed 12%)
3121
- * - Badge support (numeric, dot, 999+)
3122
- * - Disabled state (opacity-38, not focusable)
3123
- * - ✅ Full keyboard accessibility (via React Aria)
3124
- * - ✅ Primary/secondary variant colors
3117
+ * Slots:
3118
+ * root button — group/tab; typography, label color, disabled, content flags
3119
+ * state layer — absolute inset hover/focus/pressed overlay
3120
+ * content span — data-tab-content; measured by TabList for primary indicator width
3121
+ * icon wrapper — 24dp icon + badge anchor
3122
+ * label span — truncated text label
3125
3123
  *
3126
3124
  * MD3 Specifications:
3127
- * - Minimum height: 48dp
3128
- * - Minimum width: 90dp
3129
- * - Typography: Title Small (14px, weight 500, tracking 0.1px)
3130
- * - Icon: 24x24dp
3131
- * - Active indicator: 3dp primary / 2dp secondary
3132
- * - State layers: 8% hover, 12% pressed/focus
3125
+ * - Minimum height: 48dp (label/icon-only), 64dp (icon+label stacked)
3126
+ * - Typography: Title Small (text-title-small, weight 500, tracking 0.1px)
3127
+ * - Icon: 24×24dp
3128
+ * - Active indicator: 3dp primary / 2dp secondary — both bg-primary
3129
+ * - State layers: hover 8%, focus/pressed 10%
3130
+ * - Disabled: 38% opacity (not focusable)
3133
3131
  *
3134
3132
  * @example
3135
3133
  * ```tsx
@@ -4587,6 +4585,12 @@ interface CardHeadlessProps extends AriaButtonProps, Pick<HTMLAttributes<HTMLDiv
4587
4585
  * Card content.
4588
4586
  */
4589
4587
  children?: ReactNode;
4588
+ /**
4589
+ * Presence-based interaction/content `data-*` attributes forwarded onto the
4590
+ * root element (e.g. `data-hovered`, `data-pressed`, `data-interactive`,
4591
+ * `data-dragged`). Consumed by slot `group-data-[x]/card:` selectors.
4592
+ */
4593
+ [dataAttr: `data-${string}`]: unknown;
4590
4594
  }
4591
4595
  /**
4592
4596
  * Props for the `CardMedia` sub-component.
@@ -4695,29 +4699,37 @@ interface CardActionsProps {
4695
4699
  }
4696
4700
 
4697
4701
  /**
4698
- * `Card` Layer 3 MD3 Styled Card Component.
4702
+ * Material Design 3 Card Component (Layer 3: Styled).
4699
4703
  *
4700
- * Wraps `CardHeadless` with Material Design 3 visual styling: elevation shadows,
4701
- * state layer, ripple feedback, and all three card variants.
4704
+ * Wraps `CardHeadless` with MD3 visual styling using the Variants-vs-States
4705
+ * architecture: all interaction states are expressed as `data-*` attributes on
4706
+ * the root and consumed by each slot via `group-data-[x]/card` selectors — no
4707
+ * state variants live in CVA.
4702
4708
  *
4703
4709
  * ## Modes
4704
4710
  *
4705
- * | Condition | Rendered as | Ripple | State layer |
4706
- * |---|---|---|---|
4707
- * | `onPress` or `href` provided | `role="button"` | ✅ | ✅ |
4708
- * | Neither provided | `role="article"` | ❌ | ❌ |
4711
+ * | Condition | Rendered as | Ripple | State layer | Focus ring |
4712
+ * |---|---|---|---|---|
4713
+ * | `onPress` or `href` provided | `role="button"` | ✅ | ✅ | ✅ |
4714
+ * | Neither provided | `role="article"` | ❌ | ❌ | ❌ |
4715
+ *
4716
+ * ## Variants & elevation per state (MD3 comp tokens)
4717
+ *
4718
+ * - **elevated** — `surface-container-low`; 1 base → 2 hover → 1 focus/pressed → 4 dragged.
4719
+ * - **filled** — `surface-container-highest`; 0 base → 1 hover → 0 focus/pressed → 3 dragged.
4720
+ * - **outlined** — `surface` + `outline-variant` border; 0 base → 1 hover → 0 focus/pressed → 3 dragged.
4709
4721
  *
4710
- * ## Variants
4722
+ * ## State layer (interactive only)
4711
4723
  *
4712
- * - **elevated** `surface-container-low` background, elevation 1dp at rest (2dp on hover).
4713
- * - **filled** `surface-container-highest` background, no elevation.
4714
- * - **outlined** — `surface` background, `outline-variant` border, no elevation.
4724
+ * `on-surface` overlay: 8% hover, 10% focus/pressed, 16% dragged. Rendered below
4725
+ * the content (which carries `z-10`) so the surface is tinted without reducing
4726
+ * text legibility.
4715
4727
  *
4716
4728
  * ## Dragged state
4717
4729
  *
4718
- * When `isDraggable` is `true`, the card tracks its own drag state via mouse events.
4719
- * While dragging, the `elevated` variant jumps to elevation 4dp using a slower,
4720
- * decelerate transition curve per MD3 motion spec.
4730
+ * When `isDraggable` is `true`, the card tracks its own drag state via mouse
4731
+ * events and exposes it as `data-dragged`. While dragging, elevation rises to
4732
+ * its MD3 dragged level and the state layer reaches 16% opacity.
4721
4733
  *
4722
4734
  * @example
4723
4735
  * ```tsx
@@ -4824,64 +4836,94 @@ declare const CardActions: React$1.ForwardRefExoticComponent<CardActionsProps &
4824
4836
  /**
4825
4837
  * `CardHeadless` — Layer 2 headless primitive.
4826
4838
  *
4827
- * Provides all MD3 Card interaction semantics without any visual styling.
4839
+ * Provides MD3 Card interaction semantics (press, keyboard activation, link
4840
+ * behavior) without any visual styling. Pure behavior — all interaction-state
4841
+ * styling is driven by the Layer 3 `Card` via forwarded `data-*` attributes.
4828
4842
  *
4829
4843
  * ## Dual-mode behavior
4830
4844
  *
4831
- * | Condition | Role | Keyboard | Focus ring |
4832
- * |---|---|---|---|
4833
- * | `onPress` or `href` present | `role="button"` | Enter / Space activate | `data-focus-visible="true"` on keyboard focus |
4834
- * | Neither present | `role="article"` | No activation | Not applicable |
4845
+ * | Condition | Role | Keyboard |
4846
+ * |---|---|---|
4847
+ * | `onPress` or `href` present | `role="button"` | Enter / Space activate |
4848
+ * | Neither present | `role="article"` | No activation, not a tab stop |
4835
4849
  *
4836
- * Both `useButton` and `useFocusRing` are **always** called (React Rules of Hooks).
4837
- * When the card is non-interactive, `buttonProps` are not spread onto the element
4838
- * so no keyboard interaction or tab-stop is added.
4850
+ * `useButton` is always called (Rules of Hooks); its `buttonProps` are only
4851
+ * applied to the element when the card is interactive, so a static card adds
4852
+ * no tab stop or keyboard handlers.
4839
4853
  *
4840
- * ## Focus ring
4854
+ * ## Prop passthrough
4841
4855
  *
4842
- * The `data-focus-visible` attribute is set to `"true"` only when focus was
4843
- * triggered by keyboard navigation (`useFocusRing` `isFocusVisible`).
4844
- * Mouse/touch focus leaves the attribute unset. The styled Card layer reads
4845
- * this attribute to conditionally render the MD3 focus ring.
4856
+ * Any `data-*` attributes (e.g. `data-hovered`, `data-pressed`, `data-dragged`,
4857
+ * `data-interactive`) and DOM event handlers (`onMouseDown`, `onFocus`, …) are
4858
+ * spread onto the root element so the styled layer can drive `group-data-[x]/card`
4859
+ * selectors and ripple/drag tracking.
4846
4860
  *
4847
4861
  * @example
4848
4862
  * ```tsx
4849
4863
  * // Interactive
4850
- * <CardHeadless
4851
- * onPress={handlePress}
4852
- * aria-label="View details"
4853
- * className="rounded-xl p-4"
4854
- * >
4864
+ * <CardHeadless onPress={handlePress} aria-label="View details" className="rounded-xl p-4">
4855
4865
  * Card content
4856
4866
  * </CardHeadless>
4857
4867
  *
4858
4868
  * // Static
4859
- * <CardHeadless className="rounded-xl p-4">
4860
- * Card content
4861
- * </CardHeadless>
4869
+ * <CardHeadless className="rounded-xl p-4">Card content</CardHeadless>
4862
4870
  * ```
4863
4871
  */
4864
4872
  declare const CardHeadless: React__default.ForwardRefExoticComponent<CardHeadlessProps & React__default.RefAttributes<HTMLDivElement>>;
4865
4873
 
4866
4874
  /**
4867
- * Material Design 3 Card Variants (CVA)
4875
+ * Material Design 3 Card Variants
4876
+ *
4877
+ * Architecture: Variants vs States
4878
+ * - CVA holds design-time structure only (the `variant` axis). No interaction
4879
+ * state variants (hovered/pressed/focused/dragged/disabled) live in CVA.
4880
+ * - All interaction states are driven by data-* attributes on the root via
4881
+ * `data-[x]:` (self-targeting) on the root and `group-data-[x]/card:` selectors
4882
+ * in each slot's base classes.
4883
+ * - Content flags (`data-interactive`) are set explicitly by the component.
4884
+ *
4885
+ * Slot responsibilities:
4886
+ * cardVariants — root container; shape, color, per-state elevation
4887
+ * cardStateLayerVariants — hover/focus/press/drag opacity ring (absolute overlay)
4888
+ * cardFocusRingVariants — keyboard focus outline (inset so overflow-hidden never clips it)
4889
+ *
4890
+ * MD3 Spec (https://m3.material.io/components/cards/specs):
4891
+ * Shape: medium corner (12dp) → `rounded-md`
4892
+ * State-layer color: on-surface (all variants)
4893
+ * State-layer opacities: hover 8% | focus 10% | pressed 10% | dragged 16%
4894
+ * Disabled: container 38% opacity, no pointer events
4895
+ *
4896
+ * Elevation per state (MD3 comp tokens):
4897
+ * Elevated enabled=1 hover=2 focus=1 pressed=1 dragged=4
4898
+ * Filled enabled=0 hover=1 focus=0 pressed=0 dragged=3
4899
+ * Outlined enabled=0 hover=1 focus=0 pressed=0 dragged=3
4900
+ *
4901
+ * Motion tier: Standard **default** (cards are standard-size components alongside
4902
+ * dialogs/menus — not the fast tier used for small <48dp controls like buttons).
4903
+ * All effect transitions use `duration-spring-standard-default-effects` (200ms) +
4904
+ * `ease-spring-standard-default-effects`.
4905
+ *
4906
+ * Specificity strategy (self-targeting `data-[x]:` on the root):
4907
+ * base → hover (single) → focus (single) → pressed (doubled) → dragged (tripled)
4908
+ * Doubling/tripling the attribute selector guarantees the later state wins
4909
+ * regardless of Tailwind's emitted class order. `pressed` (and `dragged`,
4910
+ * which co-occurs with a held pointer) therefore beat `hover` deterministically.
4911
+ */
4912
+ /**
4913
+ * Root container element.
4868
4914
  *
4869
- * Type-safe variant management for the Card component.
4870
- * Uses Tailwind CSS classes mapped to MD3 design tokens.
4915
+ * `overflow-hidden` clips full-bleed media (CardMedia), the ripple, and the
4916
+ * state layer to the card's rounded shape. Because the root clips, the focus
4917
+ * ring is rendered as an INSET overlay (see `cardFocusRingVariants`) rather than
4918
+ * an outset ring, so it is never cut off.
4871
4919
  *
4872
- * MD3 Specifications:
4873
- * - Shape: medium (12dp) `rounded-md`
4874
- * - Elevated: surface-container-low + elevation-1 (resting), elevation-2 (hover/interactive)
4875
- * - Filled: surface-container-highest + elevation-0
4876
- * - Outlined: surface + outline-variant border + elevation-0
4877
- * - Dragged state (elevated only): elevation-4, slower shadow transition
4878
- * - Disabled: on-surface at 12% opacity (`opacity-38`) + no pointer events
4920
+ * Elevation responds to the root's own `data-*` state attributes via
4921
+ * self-targeting selectors (the root carries both `group/card` and the state
4922
+ * attributes). The shadow, opacity, and border-color changes are effects, so
4923
+ * they use the standard-default-effects spring (200ms, no overshoot).
4879
4924
  */
4880
4925
  declare const cardVariants: (props?: ({
4881
4926
  variant?: "filled" | "outlined" | "elevated" | null | undefined;
4882
- isInteractive?: boolean | null | undefined;
4883
- isDragged?: boolean | null | undefined;
4884
- isDisabled?: boolean | null | undefined;
4885
4927
  } & class_variance_authority_types.ClassProp) | undefined) => string;
4886
4928
  /**
4887
4929
  * Extract variant prop types from CVA for typed usage.