burne-ui 1.6.8 → 1.7.0
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/README.md +5 -2
- package/cli/init.js +2 -2
- package/dist/components/composite/AlertDialog/alertDialogAPI.d.ts +1 -1
- package/dist/components/composite/AlertDialog/alertDialogAnimations.d.ts +1 -0
- package/dist/components/composite/AlertDialog/alertDialogParts.d.ts +0 -1
- package/dist/components/composite/AlertDialog/index.d.ts +0 -1
- package/dist/components/core/Alert/alertStyles.d.ts +3 -1
- package/dist/components/core/Button/Button.d.ts +0 -1
- package/dist/components/core/Button/buttonAnimations.d.ts +3 -4
- package/dist/components/core/Button/buttonParts.d.ts +2 -2
- package/dist/components/core/Button/buttonStyles.d.ts +2 -1
- package/dist/components/core/Button/buttonTypes.d.ts +4 -5
- package/dist/components/core/Button/index.d.ts +0 -1
- package/dist/components/core/Button/useButtonRootState.d.ts +1 -2
- package/dist/components/core/Calendar/calendarAnimations.d.ts +10 -11
- package/dist/components/core/Calendar/calendarStyles.d.ts +1 -1
- package/dist/components/core/Card/Card.d.ts +0 -1
- package/dist/components/core/Card/cardAnimations.d.ts +1 -1
- package/dist/components/core/Card/cardTypes.d.ts +0 -7
- package/dist/components/core/Card/index.d.ts +0 -1
- package/dist/components/core/Checkbox/checkboxStyles.d.ts +5 -4
- package/dist/components/core/CloseButton/CloseButton.d.ts +0 -1
- package/dist/components/core/CloseButton/closeButtonAnimations.d.ts +1 -1
- package/dist/components/core/CloseButton/closeButtonTypes.d.ts +0 -2
- package/dist/components/core/CloseButton/useCloseButtonRootState.d.ts +1 -2
- package/dist/components/core/ComboBox/comboBoxStyles.d.ts +2 -2
- package/dist/components/core/ComboBox/comboBoxTypes.d.ts +0 -9
- package/dist/components/core/Dialog/dialogAnimations.d.ts +2 -2
- package/dist/components/core/Dialog/dialogParts.d.ts +0 -1
- package/dist/components/core/Dialog/index.d.ts +0 -1
- package/dist/components/core/Disclosure/disclosureStyles.d.ts +1 -1
- package/dist/components/core/Drawer/drawerAnimations.d.ts +1 -2
- package/dist/components/core/Drawer/drawerParts.d.ts +0 -1
- package/dist/components/core/Drawer/index.d.ts +0 -1
- package/dist/components/core/Dropdown/dropdownItemParts.d.ts +1 -1
- package/dist/components/core/Dropdown/dropdownStyles.d.ts +1 -1
- package/dist/components/core/Dropdown/index.d.ts +1 -1
- package/dist/components/core/Dropdown/useDropdownItemState.d.ts +6 -1
- package/dist/components/core/Expandable/expandableStyles.d.ts +2 -2
- package/dist/components/core/Input/inputStyles.d.ts +3 -11
- package/dist/components/core/ListBox/ListBox.d.ts +1 -1
- package/dist/components/core/ListBox/index.d.ts +3 -3
- package/dist/components/core/ListBox/listBoxAnimations.d.ts +11 -1
- package/dist/components/core/ListBox/listBoxContext.d.ts +6 -0
- package/dist/components/core/ListBox/listBoxParts.d.ts +1 -1
- package/dist/components/core/ListBox/listBoxStyles.d.ts +2 -3
- package/dist/components/core/ListBox/listBoxTypes.d.ts +0 -1
- package/dist/components/core/ListBox/useListBoxItemState.d.ts +0 -1
- package/dist/components/core/ListBox/useListBoxRootState.d.ts +1 -0
- package/dist/components/core/Pagination/paginationAnimations.d.ts +16 -4
- package/dist/components/core/Pagination/paginationStyles.d.ts +1 -1
- package/dist/components/core/Popover/popoverStyles.d.ts +1 -1
- package/dist/components/core/ProgressBar/progressBarAPI.d.ts +0 -2
- package/dist/components/core/ProgressBar/progressBarAnimations.d.ts +1 -1
- package/dist/components/core/ProgressBar/progressBarStyles.d.ts +1 -5
- package/dist/components/core/ProgressBar/progressBarTypes.d.ts +3 -2
- package/dist/components/core/ProgressBar/useProgressBarTrackState.d.ts +1 -1
- package/dist/components/core/Radio/radioStyles.d.ts +5 -4
- package/dist/components/core/Ripple/Ripple.d.ts +4 -0
- package/dist/components/core/Select/selectStyles.d.ts +2 -2
- package/dist/components/core/Select/selectTypes.d.ts +0 -8
- package/dist/components/core/Slider/sliderStyles.d.ts +2 -1
- package/dist/components/core/Switch/switchStyles.d.ts +5 -5
- package/dist/components/core/Table/index.d.ts +2 -2
- package/dist/components/core/Table/tableAPI.d.ts +1 -0
- package/dist/components/core/Table/tableContext.d.ts +4 -0
- package/dist/components/core/Table/tableParts.d.ts +2 -2
- package/dist/components/core/Table/tableTypes.d.ts +13 -4
- package/dist/components/core/TextArea/textAreaStyles.d.ts +2 -4
- package/dist/components/core/TimeField/timeFieldStyles.d.ts +3 -6
- package/dist/components/core/Toast/toastAPI.d.ts +5 -0
- package/dist/components/core/Toast/toastStyles.d.ts +4 -4
- package/dist/components/core/ToggleButton/ToggleButton.d.ts +0 -1
- package/dist/components/core/ToggleButton/index.d.ts +0 -1
- package/dist/components/core/ToggleButton/toggleButtonAnimations.d.ts +1 -1
- package/dist/components/core/ToggleButton/toggleButtonStyles.d.ts +1 -1
- package/dist/components/core/ToggleButton/toggleButtonTypes.d.ts +1 -3
- package/dist/components/core/ToggleButton/useToggleButtonRootState.d.ts +1 -2
- package/dist/components/core/Tooltip/tooltipStyles.d.ts +11 -8
- package/dist/components/core/utils/fieldShellVariant.d.ts +7 -3
- package/dist/components/core/utils/glossInteractiveMotion.d.ts +1 -1
- package/dist/components/core/utils/gsapMotion.d.ts +17 -3
- package/dist/components/core/utils/hoverInteractiveLift.d.ts +2 -3
- package/dist/components/core/utils/hoverVariant.d.ts +1 -1
- package/dist/components/core/utils/modalSurfaceMotion.d.ts +1 -0
- package/dist/components/core/utils/motionConfig.d.ts +70 -2
- package/dist/components/core/utils/optionListItemStyles.d.ts +1 -1
- package/dist/components/core/utils/pressRipple.d.ts +2 -2
- package/dist/components/core/utils/reducedMotion.d.ts +11 -0
- package/dist/components/core/utils/runOpenAfterSqueeze.d.ts +19 -5
- package/dist/components/core/utils/useCollapsibleHeight.d.ts +1 -1
- package/dist/components/core/utils/useContainerPointerHoverHandlers.d.ts +20 -0
- package/dist/components/core/utils/useFieldShellHoverLift.d.ts +20 -6
- package/dist/components/core/utils/useFirstLevelInteractiveMotion.d.ts +1 -5
- package/dist/components/core/utils/useModalMotion.d.ts +45 -0
- package/dist/components/core/utils/usePressableElementTextMotion.d.ts +15 -7
- package/dist/components/core/utils/useShadowMotion.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12305 -12143
- package/dist/internal.cjs +1 -1
- package/dist/internal.d.ts +4 -2
- package/dist/internal.js +55 -52
- package/dist/theme/themeConfig.d.ts +1 -1
- package/dist/theme/themeDefaults.d.ts +25 -1
- package/dist/theme/themeScript.d.ts +2 -1
- package/dist/themeRuntimeContext-BGPGJ9Al.cjs +14 -0
- package/dist/themeRuntimeContext-D_BFeuKg.js +5691 -0
- package/dist/tokens/config.d.ts +4 -0
- package/dist/tokens/index.d.ts +1 -1
- package/dist/ui.css +253 -100
- package/package.json +4 -4
- package/dist/components/core/ComboBox/comboBoxAnimations.d.ts +0 -5
- package/dist/components/core/Select/selectAnimations.d.ts +0 -5
- package/dist/themeRuntimeContext-CE8HsqSx.js +0 -7742
- package/dist/themeRuntimeContext-zhfbKb8L.cjs +0 -50
|
@@ -5,28 +5,33 @@ import { TOOLTIP_ARROW_CLASS, TOOLTIP_ARROW_SHELL_PAD } from './tooltipPosition'
|
|
|
5
5
|
import { TooltipSize, TooltipVariant } from './tooltipTypes';
|
|
6
6
|
export { TOOLTIP_ARROW_CLASS, TOOLTIP_ARROW_SHELL_PAD };
|
|
7
7
|
export declare const TOOLTIP_DEFAULT_OFFSET = 8;
|
|
8
|
-
|
|
8
|
+
/** Neutral shell by variant — status accents live on indicator + title (Alert / Toast). */
|
|
9
9
|
export declare const TOOLTIP_VARIANT_SURFACE_CLASS: Record<TooltipVariant, string>;
|
|
10
10
|
export declare const TOOLTIP_TEXT_LAYOUT: Record<TooltipSize, string>;
|
|
11
11
|
export declare const TOOLTIP_CONTENT_VARIANT: Record<TooltipSize, TextVariant>;
|
|
12
12
|
export declare const TOOLTIP_DESC_VARIANT: Record<TooltipSize, TextVariant>;
|
|
13
13
|
export declare const TOOLTIP_ICON_SIZE: Record<TooltipSize, string>;
|
|
14
14
|
export declare const TOOLTIP_ICON_SLOT_SVG: Record<TooltipSize, string>;
|
|
15
|
-
|
|
16
|
-
export declare const
|
|
15
|
+
/** Status accent for indicator (and semantic SVG). Default → primary like Alert/Toast. */
|
|
16
|
+
export declare const TOOLTIP_STATUS_ACCENT_CLASS: Record<SemanticStatus, string>;
|
|
17
17
|
export declare const TOOLTIP_GRID_GAP: Record<TooltipSize, string>;
|
|
18
18
|
export declare const TOOLTIP_TRIGGER_BASE_CLASS = "inline-flex shrink-0 outline-none focus-ring";
|
|
19
19
|
export declare const TOOLTIP_INDICATOR_BASE_CLASS = "inline-flex shrink-0 [&_svg]:shrink-0";
|
|
20
|
+
export declare const TOOLTIP_TITLE_CLASS = "font-w-mid";
|
|
20
21
|
export declare const TOOLTIP_DESCRIPTION_MUTED_CLASS = "text-muted";
|
|
21
22
|
export declare const TOOLTIP_ARROW_BASE_CLASS = "pointer-events-none absolute z-0 size-2 rotate-45";
|
|
22
23
|
export declare const TOOLTIP_ARROW_GLOSS_CLASS = "border-0 bg-[var(--color-surface)]";
|
|
23
|
-
|
|
24
|
+
/** Arrow fill mirrors panel surface (no status tint). */
|
|
25
|
+
export declare const TOOLTIP_ARROW_FILL_CLASS: Record<Exclude<TooltipVariant, "gloss">, string>;
|
|
26
|
+
export declare const TOOLTIP_CONTENT_BASE_CLASS = "pointer-events-none z-tooltip w-max min-w-0 overflow-visible text-left outline-none";
|
|
24
27
|
export declare const TOOLTIP_CONTENT_INNER_CLASS = "relative overflow-visible";
|
|
25
28
|
export declare const TOOLTIP_GLOSS_PANEL_BASE_CLASS = "gloss-panel gloss-deep relative z-[1] w-max min-w-0 origin-center overflow-hidden rounded-mid text-left text-foreground";
|
|
26
29
|
export declare const TOOLTIP_GLOSS_CONTENT_CLASS = "gloss-content";
|
|
27
30
|
/** Compound slots (`Tooltip.Message`) — pass-through grid children. */
|
|
28
31
|
export declare const TOOLTIP_COMPOUND_CONTENTS_CLASS = "contents";
|
|
29
32
|
export declare const TOOLTIP_PANEL_BASE_CLASS = "relative z-[1] w-max min-w-0 rounded-mid text-left animate-shadow";
|
|
33
|
+
export declare function tooltipTitleClass(status: SemanticStatus): string;
|
|
34
|
+
export declare function tooltipIndicatorClass(status: SemanticStatus, slotClass?: string, className?: string): string;
|
|
30
35
|
export declare function tooltipGlossShellClass({ size, slotClass, className, }: {
|
|
31
36
|
size: TooltipSize;
|
|
32
37
|
slotClass?: string;
|
|
@@ -37,17 +42,15 @@ export declare function tooltipGlossContentClass({ gridSlots, size, slotClass, }
|
|
|
37
42
|
size: TooltipSize;
|
|
38
43
|
slotClass?: string;
|
|
39
44
|
}): string;
|
|
40
|
-
export declare function tooltipPanelClass({ variant,
|
|
45
|
+
export declare function tooltipPanelClass({ variant, size, gridSlots, slotClass, className, }: {
|
|
41
46
|
variant: TooltipVariant;
|
|
42
|
-
status: SemanticStatus;
|
|
43
47
|
size: TooltipSize;
|
|
44
48
|
gridSlots: Parameters<typeof messageBannerGridClass>[0];
|
|
45
49
|
slotClass?: string;
|
|
46
50
|
className?: string;
|
|
47
51
|
}): string;
|
|
48
|
-
export declare function tooltipArrowClass({ variant,
|
|
52
|
+
export declare function tooltipArrowClass({ variant, resolvedSide, slotClass, className, }: {
|
|
49
53
|
variant: TooltipVariant;
|
|
50
|
-
status: SemanticStatus;
|
|
51
54
|
resolvedSide: keyof typeof TOOLTIP_ARROW_CLASS;
|
|
52
55
|
slotClass?: string;
|
|
53
56
|
className?: string;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { ButtonVariant } from '../Button/buttonTypes';
|
|
2
|
+
import { SemanticSurfaceStatus } from './semanticStatusSurface';
|
|
2
3
|
/** Shared visual variants for field shells (Input, TextArea, Select, ComboBox, TimeField, SearchInput). */
|
|
3
4
|
export type FieldShellVariant = "default" | "outline" | "secondary" | "gloss";
|
|
4
5
|
export type FieldShellFilledVariant = Exclude<FieldShellVariant, "gloss">;
|
|
6
|
+
export type FieldShellStatus = "default" | SemanticSurfaceStatus;
|
|
5
7
|
export declare const FIELD_SHELL_VARIANT_BG_CLASS: Record<FieldShellFilledVariant, string>;
|
|
6
8
|
export declare function fieldShellHoverVariantForShell(variant: FieldShellFilledVariant): "default" | "secondary";
|
|
7
9
|
export declare function fieldShellVariantFromButtonGroup(groupVariant?: ButtonVariant): FieldShellFilledVariant | "gloss";
|
|
8
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Neutral variant surface + `border-token`.
|
|
12
|
+
* Status accents live on the permanent status ring (`fieldShellFocusRingClass`), not the border.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveFieldShellSurfaceClass({ variant, }: {
|
|
9
15
|
variant: FieldShellVariant;
|
|
10
|
-
statusTinted: boolean;
|
|
11
|
-
statusTintClass: string;
|
|
12
16
|
}): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RefObject, Ref, PointerEvent as ReactPointerEvent } from 'react';
|
|
2
2
|
/** Motion classes without `animate-shadow` — gloss shadows are animated by GSAP, not `--el-shadow`. */
|
|
3
|
-
export declare const GLOSS_INTERACTIVE_MOTION_CLASS = "
|
|
3
|
+
export declare const GLOSS_INTERACTIVE_MOTION_CLASS = "origin-center";
|
|
4
4
|
export type GlossDecorState = "rest" | "hover" | "press";
|
|
5
5
|
/**
|
|
6
6
|
* Multi-layer gloss box-shadow (rest / hover / press).
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import { default as gsap } from 'gsap';
|
|
2
|
-
import { useGSAP } from '@gsap/react';
|
|
3
2
|
/** Ensures CustomEase for ripple is registered from current motion config. */
|
|
4
3
|
export declare function ensureRippleEase(): string;
|
|
5
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Stops active tweens/timelines on target(s) via `killTweensOf`.
|
|
6
|
+
* Clears inline `will-change` on HTMLElement targets (dynamic hint left mid-tween).
|
|
7
|
+
* Does not clear other inline styles — callers that need a clean slate must reset
|
|
8
|
+
* (`style.transform = ""`, `gsap.set(..., { clearProps })`, etc.) themselves.
|
|
9
|
+
*/
|
|
6
10
|
export declare function killMotion(...targets: gsap.TweenTarget[]): void;
|
|
7
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Dynamic compositor hint for transform tweens.
|
|
13
|
+
* Prefer over permanent Tailwind `will-change-transform` (avoids idle layer promotion).
|
|
14
|
+
*/
|
|
15
|
+
export declare function setWillChangeTransform(el: HTMLElement, active: boolean): void;
|
|
16
|
+
/**
|
|
17
|
+
* Wraps a GSAP `onComplete` so `will-change` is cleared when the tween/timeline ends.
|
|
18
|
+
* Call `setWillChangeTransform(el, true)` before starting the animation.
|
|
19
|
+
*/
|
|
20
|
+
export declare function clearWillChangeOnComplete(el: HTMLElement, onComplete?: gsap.Callback): gsap.Callback;
|
|
21
|
+
export { gsap };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RefObject, PointerEvent as ReactPointerEvent } from 'react';
|
|
2
2
|
import { ShadowSize } from '../../../tokens/shadows';
|
|
3
3
|
/**
|
|
4
4
|
* `box-shadow` values for hover / persistent `--el-shadow`.
|
|
@@ -35,7 +35,6 @@ export declare function readShadowSize(size: ShadowSize, from?: Element | null):
|
|
|
35
35
|
* For hover-only shadow, `animate-shadow` class is enough (idle = `--shadow-none`).
|
|
36
36
|
*/
|
|
37
37
|
export declare function initElementShadow(element: HTMLElement | null, shadow: string): void;
|
|
38
|
-
export declare function prefersReducedInteractiveHoverLift(): boolean;
|
|
39
38
|
/** Hover lift and shadow change: off for reduced-motion, touch and viewport ≤ tablet. */
|
|
40
39
|
export declare function shouldSkipInteractiveHoverLift(): boolean;
|
|
41
40
|
/** Adaptive scale for hover-lift (for gloss-combined motion). */
|
|
@@ -64,7 +63,7 @@ export type AnimateInteractivePressSqueezeOptions = {
|
|
|
64
63
|
onReleaseStart?: () => void;
|
|
65
64
|
};
|
|
66
65
|
export declare function animateInteractivePressSqueeze(element: HTMLElement, options?: AnimateInteractivePressSqueezeOptions): Promise<void>;
|
|
67
|
-
export declare function useInteractiveHoverLiftContainerHandlers<Element extends HTMLElement = HTMLElement>(liftedRef: RefObject<HTMLElement | null>, enabled: boolean, pointerInsideRef?:
|
|
66
|
+
export declare function useInteractiveHoverLiftContainerHandlers<Element extends HTMLElement = HTMLElement>(liftedRef: RefObject<HTMLElement | null>, enabled: boolean, pointerInsideRef?: RefObject<boolean>,
|
|
68
67
|
/** Explicit lift scale; `undefined` (default) — adaptive by element size. */
|
|
69
68
|
liftScale?: number, shadow?: HoverShadowConfig): {
|
|
70
69
|
onPointerOver: (e: ReactPointerEvent<Element>) => void;
|
|
@@ -4,7 +4,7 @@ export declare const TEXT_COLOR_TRANSITION = "text-color-transition motion-reduc
|
|
|
4
4
|
* Hover background for interactive surfaces.
|
|
5
5
|
* - `default` / `primary` / `secondary` — neutral and brand fills.
|
|
6
6
|
* - `danger` … `warning` — tint on transparent/neutral background (Dropdown, ListBox).
|
|
7
|
-
* - `danger-tint-hover` … — hover over `bg-surface-tint-*`
|
|
7
|
+
* - `danger-tint-hover` … — stronger hover over an existing `bg-surface-tint-*` surface.
|
|
8
8
|
* - `danger-fill` … `warning-fill` — hover over filled status surface (Button danger, etc.).
|
|
9
9
|
*/
|
|
10
10
|
export type HoverVariant = "default" | "primary" | "secondary" | "danger" | "warning" | "info" | "success" | "danger-tint-hover" | "success-tint-hover" | "info-tint-hover" | "warning-tint-hover" | "danger-fill" | "warning-fill" | "info-fill" | "success-fill";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { gsap as gsapInstance } from './gsapMotion';
|
|
2
|
+
/** Panel enter scale — intentional visual constant (not in `configureMotion`). */
|
|
2
3
|
export declare const MODAL_PANEL_SCALE_FROM = 0.97;
|
|
3
4
|
export type GsapMotionVars = NonNullable<Parameters<typeof gsapInstance.to>[1]>;
|
|
4
5
|
export declare function isReducedModalMotion(): boolean;
|
|
@@ -8,22 +8,28 @@
|
|
|
8
8
|
*
|
|
9
9
|
* configureMotion({
|
|
10
10
|
* interactiveDuration: 350,
|
|
11
|
+
* pressSqueezeDurationFactor: 1.15,
|
|
12
|
+
* modalDuration: 280,
|
|
11
13
|
* surfaceTransitionDuration: 450,
|
|
12
14
|
* toastDismissDuration: 220,
|
|
15
|
+
* progressIndeterminateDuration: 1500,
|
|
13
16
|
* selectionFillDuration: 400,
|
|
14
17
|
* selectionFillEase: "back.out(1.25)",
|
|
15
18
|
* switchThumbEase: "back.out(1.6)",
|
|
19
|
+
* enableAnimations: false, // global kill-switch
|
|
16
20
|
* });
|
|
17
21
|
*/
|
|
18
22
|
/** CSS custom properties written by `applyMotionCssTokens` / theme apply. */
|
|
19
23
|
export declare const MOTION_CSS_VAR: {
|
|
20
24
|
readonly surfaceDuration: "--motion-surface-duration";
|
|
21
25
|
};
|
|
26
|
+
/** Per-feature enable flags (AND with `enableAnimations`). */
|
|
27
|
+
export type MotionFeatureFlag = "enableHoverLift" | "enablePressSqueeze" | "enableToggleButtonFill" | "enableRipple" | "enableExpandable" | "enableToastStack" | "enableAsyncButtonCrossfade" | "enableContentFade" | "enableFeedbackExpand" | "enableProgressFill" | "enableLoadingDots" | "enableModalMotion" | "enableSwitchThumb" | "enableTabsIndicator" | "enablePaginationFlip" | "enableSelectionFill";
|
|
22
28
|
export interface MotionConfig {
|
|
23
29
|
/**
|
|
24
30
|
* Duration (ms) for most interactive UI animations:
|
|
25
|
-
* hover-lift, press-squeeze,
|
|
26
|
-
*
|
|
31
|
+
* hover-lift, press-squeeze, checkbox, radio, accordion, tab indicator, etc.
|
|
32
|
+
* Modals use `modalDuration`.
|
|
27
33
|
* @default 280
|
|
28
34
|
*/
|
|
29
35
|
interactiveDuration: number;
|
|
@@ -43,6 +49,11 @@ export interface MotionConfig {
|
|
|
43
49
|
* @default 200
|
|
44
50
|
*/
|
|
45
51
|
tooltipDuration: number;
|
|
52
|
+
/**
|
|
53
|
+
* Duration (ms) for Dialog / AlertDialog / Drawer open/close.
|
|
54
|
+
* @default 280
|
|
55
|
+
*/
|
|
56
|
+
modalDuration: number;
|
|
46
57
|
/** Switch thumb — how long the travel animation takes (ms). @default 340 */
|
|
47
58
|
switchThumbDuration: number;
|
|
48
59
|
/**
|
|
@@ -70,6 +81,14 @@ export interface MotionConfig {
|
|
|
70
81
|
* @default [1, 0.98, 1]
|
|
71
82
|
*/
|
|
72
83
|
pressSqueezeScale: readonly [number, number, number];
|
|
84
|
+
/**
|
|
85
|
+
* Multiplier on `interactiveDuration` for the full press-squeeze timeline.
|
|
86
|
+
* Also sets the open delay in `runOpenAfterSqueeze` (Popover / Dropdown / Dialog /
|
|
87
|
+
* Drawer / Select / ComboBox / AlertDialog) because open waits for squeeze to finish
|
|
88
|
+
* (~322 ms at defaults: 280 × 1.15).
|
|
89
|
+
* @default 1.15
|
|
90
|
+
*/
|
|
91
|
+
pressSqueezeDurationFactor: number;
|
|
73
92
|
/** Duration (ms) of converge-ripple expansion. @default 700 */
|
|
74
93
|
rippleDefaultDuration: number;
|
|
75
94
|
/** Starting opacity of converge-ripple. @default 0.42 */
|
|
@@ -113,6 +132,12 @@ export interface MotionConfig {
|
|
|
113
132
|
* @default "power2.in"
|
|
114
133
|
*/
|
|
115
134
|
toastDismissEase: string;
|
|
135
|
+
/**
|
|
136
|
+
* Master kill-switch for all GSAP feature flags.
|
|
137
|
+
* When `false`, every `enable*` feature is treated as off (flags keep their values).
|
|
138
|
+
* @default true
|
|
139
|
+
*/
|
|
140
|
+
enableAnimations: boolean;
|
|
116
141
|
/** Whether to enable hover-lift animations globally. @default true */
|
|
117
142
|
enableHoverLift: boolean;
|
|
118
143
|
/** Whether to enable press-squeeze animations globally. @default true */
|
|
@@ -140,6 +165,16 @@ export interface MotionConfig {
|
|
|
140
165
|
progressFillEase: string;
|
|
141
166
|
/** Animate ProgressBar fill on value change. @default true */
|
|
142
167
|
enableProgressFill: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Duration (ms) of one ProgressBar indeterminate loop (translate across track).
|
|
170
|
+
* @default 1500
|
|
171
|
+
*/
|
|
172
|
+
progressIndeterminateDuration: number;
|
|
173
|
+
/**
|
|
174
|
+
* GSAP easing for ProgressBar indeterminate loop.
|
|
175
|
+
* @default "expo.inOut"
|
|
176
|
+
*/
|
|
177
|
+
progressIndeterminateEase: string;
|
|
143
178
|
/**
|
|
144
179
|
* Duration (ms) of one full Loading dots bounce (up + down).
|
|
145
180
|
* Delay between dots = duration / 3 (wave 1 → 2 → 3).
|
|
@@ -152,6 +187,16 @@ export interface MotionConfig {
|
|
|
152
187
|
loadingDotsEaseDown: string;
|
|
153
188
|
/** Bouncing Loading dots animation (`variant="dots"`). @default true */
|
|
154
189
|
enableLoadingDots: boolean;
|
|
190
|
+
/** Dialog / AlertDialog / Drawer enter/leave. @default true */
|
|
191
|
+
enableModalMotion: boolean;
|
|
192
|
+
/** Switch thumb travel (+ related track fill / icon crossfade). @default true */
|
|
193
|
+
enableSwitchThumb: boolean;
|
|
194
|
+
/** Tabs sliding indicator. @default true */
|
|
195
|
+
enableTabsIndicator: boolean;
|
|
196
|
+
/** Pagination FLIP layout transitions. @default true */
|
|
197
|
+
enablePaginationFlip: boolean;
|
|
198
|
+
/** SelectionIndicator fill / mark (Checkbox, Radio, ListBox, …). @default true */
|
|
199
|
+
enableSelectionFill: boolean;
|
|
155
200
|
}
|
|
156
201
|
/** Canonical motion defaults — imported by theme `MOTION_DEFAULTS` (single source). */
|
|
157
202
|
export declare const MOTION_CONFIG_DEFAULTS: MotionConfig;
|
|
@@ -172,16 +217,34 @@ export declare function applyMotionCssTokens(root: HTMLElement | null | undefine
|
|
|
172
217
|
export declare function configureMotion(overrides: Partial<MotionConfig>): void;
|
|
173
218
|
/** Returns the current (possibly customised) motion config. */
|
|
174
219
|
export declare function getMotionConfig(): Readonly<MotionConfig>;
|
|
220
|
+
/** Master kill-switch — `false` disables all GSAP feature flags. */
|
|
221
|
+
export declare function isMotionEnabled(): boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Whether a feature flag is on under the current master kill-switch.
|
|
224
|
+
* Equivalent to `enableAnimations && config[flag]`.
|
|
225
|
+
*/
|
|
226
|
+
export declare function isMotionFeatureEnabled(flag: MotionFeatureFlag): boolean;
|
|
175
227
|
/** Returns `{ duration, ease }` for standard interactive GSAP tweens (duration in seconds). */
|
|
176
228
|
export declare function motionInteractive(): {
|
|
177
229
|
readonly duration: number;
|
|
178
230
|
readonly ease: string;
|
|
179
231
|
};
|
|
232
|
+
/** Dialog / AlertDialog / Drawer enter/leave. */
|
|
233
|
+
export declare function motionModal(): {
|
|
234
|
+
readonly duration: number;
|
|
235
|
+
readonly ease: string;
|
|
236
|
+
};
|
|
180
237
|
/** Returns `{ duration, ease }` for hover-lift GSAP tweens (duration in seconds). */
|
|
181
238
|
export declare function motionHoverLift(): {
|
|
182
239
|
readonly duration: number;
|
|
183
240
|
readonly ease: string;
|
|
184
241
|
};
|
|
242
|
+
/**
|
|
243
|
+
* Full press-squeeze timeline duration in seconds
|
|
244
|
+
* (`interactiveDuration × pressSqueezeDurationFactor`).
|
|
245
|
+
* Used by squeeze animations and as the open-after-squeeze delay.
|
|
246
|
+
*/
|
|
247
|
+
export declare function motionPressSqueezeTotal(): number;
|
|
185
248
|
/** Selection fill (ToggleButton, Calendar, Checkbox/Radio indicator fill). */
|
|
186
249
|
export declare function motionSelectionFill(): {
|
|
187
250
|
readonly duration: number;
|
|
@@ -216,6 +279,11 @@ export declare function motionProgressFill(): {
|
|
|
216
279
|
readonly duration: number;
|
|
217
280
|
readonly ease: string;
|
|
218
281
|
};
|
|
282
|
+
/** ProgressBar indeterminate translate loop. */
|
|
283
|
+
export declare function motionProgressIndeterminate(): {
|
|
284
|
+
readonly duration: number;
|
|
285
|
+
readonly ease: string;
|
|
286
|
+
};
|
|
219
287
|
/** Toast dismiss slide + last-scrim fade-out. */
|
|
220
288
|
export declare function motionToastDismiss(): {
|
|
221
289
|
readonly duration: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const OPTION_LIST_ITEM_LABEL_WRAP_CLASS = "inline-flex min-w-0 items-center";
|
|
2
2
|
export declare const OPTION_LIST_ITEM_LABEL_MIN_WIDTH_CLASS = "min-w-0";
|
|
3
|
-
export declare const OPTION_LIST_ITEM_LABEL_MOTION_CLASS = "origin-center
|
|
3
|
+
export declare const OPTION_LIST_ITEM_LABEL_MOTION_CLASS = "origin-center";
|
|
4
4
|
export declare const OPTION_LIST_ITEM_LABEL_TEXT_CLASS = "font-w-mid";
|
|
5
5
|
export declare const OPTION_LIST_ITEM_LABEL_TEXT_DISABLED_CLASS = "text-muted";
|
|
6
6
|
export declare const OPTION_LIST_ITEM_HINT_MUTED_CLASS = "text-muted";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ConvergeRipple } from './convergeRippleGeometry';
|
|
2
2
|
export type RippleDirection = "in" | "out";
|
|
3
|
-
export declare
|
|
3
|
+
export declare const ConvergeRippleLayer: import('react').NamedExoticComponent<{
|
|
4
4
|
ripples: ConvergeRipple[];
|
|
5
5
|
tone: string;
|
|
6
6
|
onDone: (id: number) => void;
|
|
7
7
|
durationMs?: number;
|
|
8
8
|
opacityFrom?: number;
|
|
9
9
|
direction?: RippleDirection;
|
|
10
|
-
}
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OS `prefers-reduced-motion` — shared by all Burne UI GSAP paths
|
|
3
|
+
* (not hover-lift specific).
|
|
4
|
+
*/
|
|
5
|
+
/** Sync read of `prefers-reduced-motion: reduce` (event handlers, non-React). */
|
|
6
|
+
export declare function prefersReducedMotion(): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Reactive `prefers-reduced-motion` for React render / hook bodies.
|
|
9
|
+
* Re-renders when the OS setting changes.
|
|
10
|
+
*/
|
|
11
|
+
export declare function usePrefersReducedMotion(): boolean;
|
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
+
export type RunOpenAfterSqueezeOptions = {
|
|
3
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
4
|
+
openingRef: RefObject<boolean>;
|
|
5
|
+
setOpen: (open: boolean) => void;
|
|
6
|
+
/** Skip when the control is disabled. Re-checked after the squeeze resolves. */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** Runs after `setOpen(true)` (focus, active option, filter seed, …). */
|
|
9
|
+
onOpened?: () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Press animation before open. Default: standard `animateInteractivePressSqueeze`.
|
|
12
|
+
* Gloss / other surface plugins can inject their own squeeze without forking this helper.
|
|
13
|
+
*/
|
|
14
|
+
runSqueeze?: (el: HTMLElement) => Promise<void>;
|
|
15
|
+
};
|
|
2
16
|
/**
|
|
3
17
|
* Runs a press-squeeze animation on `triggerRef.current`, then calls `setOpen(true)`.
|
|
4
18
|
*
|
|
19
|
+
* Delay equals the squeeze timeline (`interactiveDuration × pressSqueezeDurationFactor`,
|
|
20
|
+
* see `motionPressSqueezeTotal()`), so open waits for the press feel to finish.
|
|
21
|
+
*
|
|
5
22
|
* - Respects `prefers-reduced-motion` (opens immediately when reduced motion is on).
|
|
6
23
|
* - Guards against double-trigger via `openingRef`.
|
|
7
24
|
* - Falls back to immediate open when element is missing.
|
|
25
|
+
* - Variant-agnostic: default squeeze is standard; gloss is not branched here.
|
|
8
26
|
*
|
|
9
27
|
* Use `useOpeningRef()` to create the required `openingRef`.
|
|
10
28
|
*/
|
|
11
|
-
export declare function runOpenAfterSqueeze({ triggerRef, openingRef, setOpen, }:
|
|
12
|
-
triggerRef: RefObject<HTMLElement | null>;
|
|
13
|
-
openingRef: RefObject<boolean>;
|
|
14
|
-
setOpen: (open: boolean) => void;
|
|
15
|
-
}): void;
|
|
29
|
+
export declare function runOpenAfterSqueeze({ triggerRef, openingRef, setOpen, disabled, onOpened, runSqueeze, }: RunOpenAfterSqueezeOptions): void;
|
|
16
30
|
/** Creates the guard ref used by `runOpenAfterSqueeze`. */
|
|
17
31
|
export declare function useOpeningRef(): RefObject<boolean>;
|
|
@@ -9,7 +9,7 @@ export declare function applyCollapsibleInstantState(shell: HTMLElement, open: b
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function useCollapsibleShellRef(shellRef: RefObject<HTMLElement | null>, open: boolean): (node: HTMLElement | null) => void;
|
|
11
11
|
export type UseCollapsibleHeightOptions = {
|
|
12
|
-
/** @default () =>
|
|
12
|
+
/** @default () => isMotionFeatureEnabled("enableExpandable") */
|
|
13
13
|
enabled?: () => boolean;
|
|
14
14
|
/** Skip GSAP (Disclosure drag-handle): set height instantly. */
|
|
15
15
|
skipAnimRef?: RefObject<boolean>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RefObject, PointerEvent as ReactPointerEvent } from 'react';
|
|
2
|
+
export type UseContainerPointerHoverHandlersOptions<Element extends HTMLElement = HTMLElement> = {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
/** Element that receives the effect (may differ from `event.currentTarget`). */
|
|
5
|
+
targetRef: RefObject<HTMLElement | null>;
|
|
6
|
+
pointerInsideRef?: RefObject<boolean> | RefObject<boolean>;
|
|
7
|
+
/**
|
|
8
|
+
* Skip hover motion (touch / reduced-motion / feature flag).
|
|
9
|
+
* Pass `shouldSkipInteractiveHoverLift` from hover-lift utils.
|
|
10
|
+
*/
|
|
11
|
+
skipHover?: () => boolean;
|
|
12
|
+
/** Kill GSAP on the target when the hook unmounts (default true). */
|
|
13
|
+
killMotionOnUnmount?: boolean;
|
|
14
|
+
onEnter: (el: HTMLElement, e: ReactPointerEvent<Element>) => void;
|
|
15
|
+
onLeave: (el: HTMLElement, e: ReactPointerEvent<Element>) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare function useContainerPointerHoverHandlers<Element extends HTMLElement = HTMLElement>({ enabled, targetRef, pointerInsideRef, skipHover, killMotionOnUnmount, onEnter, onLeave, }: UseContainerPointerHoverHandlersOptions<Element>): {
|
|
18
|
+
onPointerOver: (e: ReactPointerEvent<Element>) => void;
|
|
19
|
+
onPointerOut: (e: ReactPointerEvent<Element>) => void;
|
|
20
|
+
};
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import { FieldShellFilledVariant } from './fieldShellVariant';
|
|
3
|
-
export type FieldShellStatus
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { FieldShellFilledVariant, FieldShellStatus } from './fieldShellVariant';
|
|
3
|
+
export type { FieldShellStatus };
|
|
4
|
+
/**
|
|
5
|
+
* Field shell hover background via `hoverVariant` (variant only — status is ring accent).
|
|
6
|
+
* `focus-within` — focus on inner control.
|
|
7
|
+
*/
|
|
8
|
+
export declare function fieldShellHoverClass(enabled: boolean, _status?: FieldShellStatus, variant?: FieldShellFilledVariant): string;
|
|
9
|
+
/** Shell transition: background, border, shadow, focus-ring (always, including disabled). */
|
|
7
10
|
export declare const FIELD_SHELL_TRANSITION_CLASS = "field-shell-transition motion-reduce:transition-none";
|
|
8
|
-
/** Outer
|
|
11
|
+
/** Outer focus ring on shell `:focus-within` (default status — `--color-focus-ring`). */
|
|
9
12
|
export declare const FIELD_SHELL_FOCUS_CLASS = "focus-within-ring";
|
|
13
|
+
/**
|
|
14
|
+
* Permanent status-colored outer ring (idle + focus). Keeps status focus-ring token on `:focus-within`
|
|
15
|
+
* so `focus-within-ring` is not used for non-default status.
|
|
16
|
+
*/
|
|
17
|
+
export declare const FIELD_SHELL_STATUS_RING: Record<Exclude<FieldShellStatus, "default">, string>;
|
|
18
|
+
/**
|
|
19
|
+
* Focus / status ring for field shells.
|
|
20
|
+
* - `default` → `focus-within-ring` (keyboard / focus only)
|
|
21
|
+
* - status → always-visible status focus-ring token (same width/offset as focus-ring)
|
|
22
|
+
*/
|
|
23
|
+
export declare function fieldShellFocusRingClass(status?: FieldShellStatus): string;
|
|
10
24
|
/**
|
|
11
25
|
* Hover lift and sm → md shadow for input-like field shells (`Input`, `TextArea`, `TimeField`, `ComboBox`).
|
|
12
26
|
*/
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { ForwardedRef, PointerEvent } from 'react';
|
|
2
2
|
export type UseFirstLevelInteractiveMotionProps = {
|
|
3
3
|
isGloss: boolean;
|
|
4
|
-
/**
|
|
5
|
-
* When `false`, all GSAP interactions (hover lift, press squeeze) are skipped.
|
|
6
|
-
*/
|
|
7
|
-
animated: boolean;
|
|
8
4
|
/**
|
|
9
5
|
* Whether the element is interactive (true = !disabled / !blocked).
|
|
10
6
|
* Changing to `false` kills all in-flight animations and clears the hover shadow.
|
|
@@ -29,7 +25,7 @@ export type UseFirstLevelInteractiveMotionProps = {
|
|
|
29
25
|
*/
|
|
30
26
|
onPressReleaseStart?: () => void;
|
|
31
27
|
};
|
|
32
|
-
export declare function useFirstLevelInteractiveMotion({ isGloss,
|
|
28
|
+
export declare function useFirstLevelInteractiveMotion({ isGloss, enabled, hasHoverShadow, useContentRef, forwardedRef, onPointerEnter: onPointerEnterProp, onPointerLeave: onPointerLeaveProp, onPointerDown: onPointerDownProp, onPressReleaseStart, }: UseFirstLevelInteractiveMotionProps): {
|
|
33
29
|
setRefs: (node: HTMLButtonElement | null) => void;
|
|
34
30
|
btnRef: import('react').RefObject<HTMLButtonElement | null>;
|
|
35
31
|
contentMotionRef: import('react').RefObject<HTMLSpanElement | null>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { GsapMotionVars } from './modalSurfaceMotion';
|
|
2
|
+
import { MouseEvent, RefObject } from 'react';
|
|
3
|
+
export type UseModalMotionOptions = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** Enables gloss interactive bind on the gloss panel shell. */
|
|
6
|
+
gloss?: boolean;
|
|
7
|
+
/** Custom portal host — `show()` instead of `showModal()`, absolute positioning. */
|
|
8
|
+
contained?: boolean;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
/** When true, pointerdown on the overlay (target === currentTarget) closes. */
|
|
11
|
+
dismissOnBackdrop?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Contained portals use non-modal `show()` — Escape does not fire `cancel`.
|
|
14
|
+
* When true, listen for Escape and call `onOpenChange(false)`.
|
|
15
|
+
*/
|
|
16
|
+
enableContainedEscape?: boolean;
|
|
17
|
+
/** Focus the panel after open (default true). */
|
|
18
|
+
focusOnOpen?: boolean;
|
|
19
|
+
/** Override default scale enter; called with the live panel element. */
|
|
20
|
+
getPanelOpen?: (panel: HTMLElement) => {
|
|
21
|
+
from: GsapMotionVars;
|
|
22
|
+
to: GsapMotionVars;
|
|
23
|
+
};
|
|
24
|
+
/** Override default scale+fade exit. */
|
|
25
|
+
getPanelExit?: (panel: HTMLElement) => GsapMotionVars;
|
|
26
|
+
/** Runs before enter animation (e.g. clear leftover Drawer x/y). */
|
|
27
|
+
preparePanel?: (panel: HTMLElement) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Extra open/close effect dependency (e.g. Drawer `placement`) so panel
|
|
30
|
+
* motion resolvers re-run when direction changes while mounted.
|
|
31
|
+
*/
|
|
32
|
+
panelMotionKey?: string | number;
|
|
33
|
+
};
|
|
34
|
+
export type UseModalMotionResult = {
|
|
35
|
+
mounted: boolean;
|
|
36
|
+
/** `open || mounted` — keep portal in DOM for exit animation. */
|
|
37
|
+
showPortal: boolean;
|
|
38
|
+
dialogRef: RefObject<HTMLDialogElement | null>;
|
|
39
|
+
overlayRef: RefObject<HTMLDivElement | null>;
|
|
40
|
+
panelRef: RefObject<HTMLDivElement | null>;
|
|
41
|
+
skipCloseAnimRef: RefObject<boolean>;
|
|
42
|
+
bindGlossPanelRef: (node: HTMLElement | null) => void;
|
|
43
|
+
handleBackdropPointerDown: (e: MouseEvent<HTMLDivElement>) => void;
|
|
44
|
+
};
|
|
45
|
+
export declare function useModalMotion({ open, gloss, contained, onOpenChange, dismissOnBackdrop, enableContainedEscape, focusOnOpen, getPanelOpen, getPanelExit, preparePanel, panelMotionKey, }: UseModalMotionOptions): UseModalMotionResult;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { PointerEvent, RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Press squeeze (+ optional hover lift) for text-based interactive elements.
|
|
4
|
+
*
|
|
5
|
+
* - `hoverLift: false` (default) — only squeezes on press. Used by Checkbox, Radio, Switch, ListBox.
|
|
6
|
+
* - `hoverLift: true` — lifts on hover and squeezes on press, then restores lift. Used by Link, Tabs.
|
|
7
|
+
* - `hoverLiftScale: "adaptive"` — size-based lift (Calendar cells/nav); default uses `configureMotion().hoverLiftScale`.
|
|
8
|
+
*/
|
|
2
9
|
export type UsePressableElementTextMotionProps<EventTarget extends HTMLElement = HTMLElement, RefTarget extends HTMLElement = HTMLElement> = {
|
|
3
10
|
/**
|
|
4
11
|
* Whether the element is disabled. When `true`, animations are skipped and
|
|
@@ -20,17 +27,18 @@ export type UsePressableElementTextMotionProps<EventTarget extends HTMLElement =
|
|
|
20
27
|
* Default: `false` (press-only).
|
|
21
28
|
*/
|
|
22
29
|
hoverLift?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Hover lift amplitude when `hoverLift` is true.
|
|
32
|
+
* - omit / `undefined` — `getMotionConfig().hoverLiftScale`
|
|
33
|
+
* - `"adaptive"` — size-based (same as bare `animateInteractiveHoverLift`)
|
|
34
|
+
* - `number` — explicit scale
|
|
35
|
+
*/
|
|
36
|
+
hoverLiftScale?: number | "adaptive";
|
|
23
37
|
onPointerEnter?: (e: PointerEvent<EventTarget>) => void;
|
|
24
38
|
onPointerLeave?: (e: PointerEvent<EventTarget>) => void;
|
|
25
39
|
onPointerDown?: (e: PointerEvent<EventTarget>) => void;
|
|
26
40
|
};
|
|
27
|
-
|
|
28
|
-
* Press squeeze (+ optional hover lift) for text-based interactive elements.
|
|
29
|
-
*
|
|
30
|
-
* - `hoverLift: false` (default) — only squeezes on press. Used by Checkbox, Radio, Switch, ListBox.
|
|
31
|
-
* - `hoverLift: true` — lifts on hover and squeezes on press, then restores lift. Used by Link, Tabs.
|
|
32
|
-
*/
|
|
33
|
-
export declare function usePressableElementTextMotion<EventTarget extends HTMLElement = HTMLElement, RefTarget extends HTMLElement = HTMLElement>({ isDisabled, enabled, textMotionRef, hoverLift, onPointerEnter, onPointerLeave, onPointerDown, }: UsePressableElementTextMotionProps<EventTarget, RefTarget>): {
|
|
41
|
+
export declare function usePressableElementTextMotion<EventTarget extends HTMLElement = HTMLElement, RefTarget extends HTMLElement = HTMLElement>({ isDisabled, enabled, textMotionRef, hoverLift, hoverLiftScale, onPointerEnter, onPointerLeave, onPointerDown, }: UsePressableElementTextMotionProps<EventTarget, RefTarget>): {
|
|
34
42
|
handlePointerEnter: (e: PointerEvent<EventTarget>) => void;
|
|
35
43
|
handlePointerLeave: (e: PointerEvent<EventTarget>) => void;
|
|
36
44
|
handlePointerDown: (e: PointerEvent<EventTarget>) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MutableRefObject, RefObject, PointerEvent as ReactPointerEvent } from 'react';
|
|
2
2
|
import { HoverShadowConfig } from './hoverInteractiveLift';
|
|
3
3
|
/** Class for JS-animated shadow and scale-lift. */
|
|
4
|
-
export declare const SHADOW_LIFT_MOTION_CLASS = "animate-shadow
|
|
4
|
+
export declare const SHADOW_LIFT_MOTION_CLASS = "animate-shadow origin-center";
|
|
5
5
|
/** Hover-only: idle `--shadow-none`, hover `--shadow-base` (Button, ToggleButton). */
|
|
6
6
|
export declare function firstLevelHoverShadow(): HoverShadowConfig;
|
|
7
7
|
/** Level 2 interactive: idle small, hover mid (Alert, Badge, Input). */
|