@mt-gloss/ui 0.1.9 → 0.1.11
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.
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* SwingReveal — shared swing-from-behind reveal wrapper (Phase 5 Plan 01).
|
|
4
|
+
*
|
|
5
|
+
* MOTION-03 source of truth: gridMotionPrimitives.swingReveal (enterDurationMs, exitDurationMs,
|
|
6
|
+
* enterEasing, exitEasing, translateOffsetPx). See gridMotionPrimitives.ts for values.
|
|
7
|
+
*
|
|
8
|
+
* MOTION-08 invariant: ALL timing/easing values come from gridMotionPrimitives.
|
|
9
|
+
* No inline literals in this file or swing-reveal.scss (SCSS reads via CSS custom props).
|
|
10
|
+
*
|
|
11
|
+
* MOTION-09 under prefers-reduced-motion: 100ms opacity-only (reducedMotion.swingEnterMs);
|
|
12
|
+
* transform: none. Handled entirely by CSS @media query in swing-reveal.scss (research Q3).
|
|
13
|
+
*
|
|
14
|
+
* D-05-07 flat-sibling placement; D-05-08 variant-gated API (no open timing props);
|
|
15
|
+
* D-05-09 trigger="hover+focus" uses CSS :has(:focus-visible) (research Q2); D-05-10 4px from swingReveal.translateOffsetPx.
|
|
16
|
+
*
|
|
17
|
+
* RESIZE-12 consumers: EdgeHoverHandle (Plan 02) + EmptyCellPackAffordance (Plan 02).
|
|
18
|
+
*/
|
|
19
|
+
export type SwingRevealVariant = 'pack' | 'handle';
|
|
20
|
+
export type SwingRevealTrigger = 'hover' | 'hover+focus';
|
|
21
|
+
export interface SwingRevealProps {
|
|
22
|
+
/** Imperative visibility flag — toggles data-visible attribute and .gloss-swing-reveal[data-visible='true'] CSS state. */
|
|
23
|
+
visible: boolean;
|
|
24
|
+
/** Variant drives modifier class + future per-variant timing differentiation (D-05-08 variant-gated API — no open timing props). */
|
|
25
|
+
variant: SwingRevealVariant;
|
|
26
|
+
/** 'hover' = imperative only; 'hover+focus' = also reveal under :has(:focus-visible) via CSS (research Q2 CSS approach). */
|
|
27
|
+
trigger: SwingRevealTrigger;
|
|
28
|
+
/** Children rendered inside the span wrapper. */
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
/** Optional caller class appended after built-in classes. */
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const SwingReveal: React.FC<SwingRevealProps>;
|