@yahoo/uds 3.160.0 → 3.161.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/dist/components/client/BottomSheet/BottomSheet.cjs +2 -2
- package/dist/components/client/BottomSheet/BottomSheet.js +2 -2
- package/dist/components/client/Button/Button.cjs +2 -1
- package/dist/components/client/Button/Button.js +3 -2
- package/dist/components/client/Checkbox.cjs +2 -1
- package/dist/components/client/Checkbox.js +3 -2
- package/dist/components/client/Chip/ChipBase.cjs +2 -2
- package/dist/components/client/Chip/ChipBase.js +2 -2
- package/dist/components/client/IconButton/IconButton.cjs +2 -1
- package/dist/components/client/IconButton/IconButton.js +3 -2
- package/dist/components/client/Input/Input.cjs +2 -2
- package/dist/components/client/Input/Input.js +2 -2
- package/dist/components/client/Modal/ManagedModal.cjs +2 -2
- package/dist/components/client/Modal/ManagedModal.js +2 -2
- package/dist/components/client/Modal/Modal.cjs +2 -2
- package/dist/components/client/Modal/Modal.js +2 -2
- package/dist/components/client/Popover/Popover.cjs +2 -2
- package/dist/components/client/Popover/Popover.js +2 -2
- package/dist/components/client/Radio/Radio.cjs +2 -1
- package/dist/components/client/Radio/Radio.js +3 -2
- package/dist/components/client/Switch/Switch.cjs +1 -1
- package/dist/components/client/Switch/Switch.js +1 -1
- package/dist/components/client/Tabs/TabList.cjs +2 -2
- package/dist/components/client/Tabs/TabList.js +2 -2
- package/dist/components/client/Toast/Toast.cjs +2 -2
- package/dist/components/client/Toast/Toast.js +2 -2
- package/dist/components/client/Toast/UDSToastConfigProvider.d.cts +1 -1
- package/dist/components/client/Toast/UDSToastConfigProvider.d.ts +1 -1
- package/dist/hooks/usePrefersReducedMotion.cjs +27 -15
- package/dist/hooks/usePrefersReducedMotion.js +28 -16
- package/dist/styles/styler.d.cts +24 -24
- package/dist/styles/styler.d.ts +24 -24
- package/dist/uds/generated/componentData.cjs +64 -64
- package/dist/uds/generated/componentData.js +64 -64
- package/generated/componentData.json +86 -86
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ require("../../../_virtual/_rolldown/runtime.cjs");
|
|
|
5
5
|
const require_styles_styler = require("../../../styles/styler.cjs");
|
|
6
6
|
const require_components_Box = require("../../Box.cjs");
|
|
7
7
|
const require_components_Scrim = require("../../Scrim.cjs");
|
|
8
|
+
const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
|
|
8
9
|
const require_utils_exposeAriakitScrollbarWidth = require("../../../utils/exposeAriakitScrollbarWidth.cjs");
|
|
9
10
|
const require_components_client_BottomSheet_BottomSheetHandle = require("./BottomSheetHandle.cjs");
|
|
10
11
|
const require_components_client_BottomSheet_BottomSheetInternalContext = require("./BottomSheetInternalContext.cjs");
|
|
@@ -19,7 +20,6 @@ const require_components_client_BottomSheet_useVirtualKeyboard = require("./useV
|
|
|
19
20
|
let react = require("react");
|
|
20
21
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
21
22
|
let _ariakit_react = require("@ariakit/react");
|
|
22
|
-
let motion_react = require("motion/react");
|
|
23
23
|
//#region src/components/client/BottomSheet/BottomSheet.tsx
|
|
24
24
|
/**
|
|
25
25
|
* Drag-to-dismiss distance threshold as a ratio of the lowest snap point's
|
|
@@ -43,7 +43,7 @@ function BottomSheet({ children, className: sheetClassName, controller: controll
|
|
|
43
43
|
const isOpen = dialogStore.useState().open;
|
|
44
44
|
const keyboardHeightPx = require_components_client_BottomSheet_useVirtualKeyboard.useVirtualKeyboard(isOpen);
|
|
45
45
|
const viewportHeightPx = require_components_client_BottomSheet_useViewportHeight.useViewportHeight();
|
|
46
|
-
const prefersReducedMotion =
|
|
46
|
+
const prefersReducedMotion = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion();
|
|
47
47
|
const reducedMotion = forceReduceMotion || prefersReducedMotion;
|
|
48
48
|
const isDraggingRef = (0, react.useRef)(false);
|
|
49
49
|
const forceZeroMarginsRef = (0, react.useRef)(false);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
4
|
import { Box } from "../../Box.js";
|
|
5
5
|
import { Scrim } from "../../Scrim.js";
|
|
6
|
+
import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
|
|
6
7
|
import { exposeAriakitScrollbarWidth } from "../../../utils/exposeAriakitScrollbarWidth.js";
|
|
7
8
|
import { BottomSheetHandle } from "./BottomSheetHandle.js";
|
|
8
9
|
import { BottomSheetInternalContext } from "./BottomSheetInternalContext.js";
|
|
@@ -17,7 +18,6 @@ import { useVirtualKeyboard } from "./useVirtualKeyboard.js";
|
|
|
17
18
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef } from "react";
|
|
18
19
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
20
|
import { Dialog, useDialogContext } from "@ariakit/react";
|
|
20
|
-
import { useReducedMotion } from "motion/react";
|
|
21
21
|
//#region src/components/client/BottomSheet/BottomSheet.tsx
|
|
22
22
|
/**
|
|
23
23
|
* Drag-to-dismiss distance threshold as a ratio of the lowest snap point's
|
|
@@ -41,7 +41,7 @@ function BottomSheet({ children, className: sheetClassName, controller: controll
|
|
|
41
41
|
const isOpen = dialogStore.useState().open;
|
|
42
42
|
const keyboardHeightPx = useVirtualKeyboard(isOpen);
|
|
43
43
|
const viewportHeightPx = useViewportHeight();
|
|
44
|
-
const prefersReducedMotion =
|
|
44
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
45
45
|
const reducedMotion = forceReduceMotion || prefersReducedMotion;
|
|
46
46
|
const isDraggingRef = useRef(false);
|
|
47
47
|
const forceZeroMarginsRef = useRef(false);
|
|
@@ -6,6 +6,7 @@ const require_index = require("../../../css-tokens/dist/index.cjs");
|
|
|
6
6
|
const require_utils_createSlot = require("../../../utils/createSlot.cjs");
|
|
7
7
|
const require_components_Icon = require("../../Icon.cjs");
|
|
8
8
|
const require_components_IconSlot = require("../../IconSlot.cjs");
|
|
9
|
+
const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
|
|
9
10
|
const require_components_client_SpringMotionConfig = require("../SpringMotionConfig.cjs");
|
|
10
11
|
const require_components_client_Button_ButtonBase = require("./ButtonBase.cjs");
|
|
11
12
|
require("./buttonConstants.cjs");
|
|
@@ -70,7 +71,7 @@ const loadingMotionVariants = {
|
|
|
70
71
|
* @componentType Client component
|
|
71
72
|
*/
|
|
72
73
|
const Button = (0, react.forwardRef)(function Button(props, forwardedRef) {
|
|
73
|
-
const prefersReducedMotion =
|
|
74
|
+
const prefersReducedMotion = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion();
|
|
74
75
|
const disableMotion = !!props.disableEffects || !!props.disabled;
|
|
75
76
|
const layoutVariant = prefersReducedMotion ? "smooth" : "subtle";
|
|
76
77
|
const endVariant = props.endIcon ? "icon" : "hide";
|
|
@@ -4,13 +4,14 @@ import { BUTTON_GAP_VAR, BUTTON_SCALE_EFFECT_HOVER, BUTTON_SCALE_EFFECT_PRESSED,
|
|
|
4
4
|
import { createSlot } from "../../../utils/createSlot.js";
|
|
5
5
|
import { Icon } from "../../Icon.js";
|
|
6
6
|
import { IconSlot } from "../../IconSlot.js";
|
|
7
|
+
import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
|
|
7
8
|
import { SpringMotionConfig } from "../SpringMotionConfig.js";
|
|
8
9
|
import { ButtonBase, renderButtonChildren } from "./ButtonBase.js";
|
|
9
10
|
import "./buttonConstants.js";
|
|
10
11
|
import { Progress } from "@yahoo/uds-icons";
|
|
11
12
|
import { forwardRef, isValidElement, useMemo } from "react";
|
|
12
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { AnimatePresence, m
|
|
14
|
+
import { AnimatePresence, m } from "motion/react";
|
|
14
15
|
//#region src/components/client/Button/Button.tsx
|
|
15
16
|
const iconContainerMotionVariants = {
|
|
16
17
|
hide: {
|
|
@@ -67,7 +68,7 @@ const loadingMotionVariants = {
|
|
|
67
68
|
* @componentType Client component
|
|
68
69
|
*/
|
|
69
70
|
const Button = forwardRef(function Button(props, forwardedRef) {
|
|
70
|
-
const prefersReducedMotion =
|
|
71
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
71
72
|
const disableMotion = !!props.disableEffects || !!props.disabled;
|
|
72
73
|
const layoutVariant = prefersReducedMotion ? "smooth" : "subtle";
|
|
73
74
|
const endVariant = props.endIcon ? "icon" : "hide";
|
|
@@ -6,6 +6,7 @@ const require_styles_styler = require("../../styles/styler.cjs");
|
|
|
6
6
|
const require_components_Icon = require("../Icon.cjs");
|
|
7
7
|
const require_components_Box = require("../Box.cjs");
|
|
8
8
|
const require_components_FormLabel = require("../FormLabel.cjs");
|
|
9
|
+
const require_hooks_usePrefersReducedMotion = require("../../hooks/usePrefersReducedMotion.cjs");
|
|
9
10
|
const require_components_client_SpringMotionConfig = require("./SpringMotionConfig.cjs");
|
|
10
11
|
let _yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
11
12
|
let react = require("react");
|
|
@@ -116,7 +117,7 @@ const Checkbox = (0, react.forwardRef)(function Checkbox({ id, checked: checkedP
|
|
|
116
117
|
if (!innerRef.current) return;
|
|
117
118
|
innerRef.current.indeterminate = isIndeterminate(checked_);
|
|
118
119
|
};
|
|
119
|
-
const prefersReducedMotion =
|
|
120
|
+
const prefersReducedMotion = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion();
|
|
120
121
|
const reduceMotion = forceReduceMotion ? "always" : "user";
|
|
121
122
|
const cssAnimationDuration = prefersReducedMotion || forceReduceMotion ? "duration-0" : "duration-120";
|
|
122
123
|
/**
|
|
@@ -4,11 +4,12 @@ import { cx, getStyles } from "../../styles/styler.js";
|
|
|
4
4
|
import { Icon } from "../Icon.js";
|
|
5
5
|
import { Box } from "../Box.js";
|
|
6
6
|
import { FormLabel } from "../FormLabel.js";
|
|
7
|
+
import { usePrefersReducedMotion } from "../../hooks/usePrefersReducedMotion.js";
|
|
7
8
|
import { SpringMotionConfig } from "./SpringMotionConfig.js";
|
|
8
9
|
import { Check, Minus } from "@yahoo/uds-icons";
|
|
9
10
|
import { forwardRef, useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
10
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { m
|
|
12
|
+
import { m } from "motion/react";
|
|
12
13
|
//#region src/components/client/Checkbox.tsx
|
|
13
14
|
const VARIANTS = ["primary", "secondary"];
|
|
14
15
|
const SIZES = ["sm", "md"];
|
|
@@ -113,7 +114,7 @@ const Checkbox = forwardRef(function Checkbox({ id, checked: checkedProp, defaul
|
|
|
113
114
|
if (!innerRef.current) return;
|
|
114
115
|
innerRef.current.indeterminate = isIndeterminate(checked_);
|
|
115
116
|
};
|
|
116
|
-
const prefersReducedMotion =
|
|
117
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
117
118
|
const reduceMotion = forceReduceMotion ? "always" : "user";
|
|
118
119
|
const cssAnimationDuration = prefersReducedMotion || forceReduceMotion ? "duration-0" : "duration-120";
|
|
119
120
|
/**
|
|
@@ -6,16 +6,16 @@ const require_styles_styler = require("../../../styles/styler.cjs");
|
|
|
6
6
|
const require_components_IconSlot = require("../../IconSlot.cjs");
|
|
7
7
|
const require_components_Text = require("../../Text.cjs");
|
|
8
8
|
const require_components_HStack = require("../../HStack.cjs");
|
|
9
|
+
const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
|
|
9
10
|
let react = require("react");
|
|
10
11
|
react = require_runtime.__toESM(react);
|
|
11
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
|
-
let motion_react = require("motion/react");
|
|
13
13
|
//#region src/components/client/Chip/ChipBase.tsx
|
|
14
14
|
const SIZE_DEFAULT = "md";
|
|
15
15
|
const VARIANT_DEFAULT = "primary";
|
|
16
16
|
const MAX_WIDTH_DEFAULT = 200;
|
|
17
17
|
const ChipBase = (0, react.forwardRef)(function ChipBase({ size = SIZE_DEFAULT, minWidth, maxWidth = MAX_WIDTH_DEFAULT, startIcon, endIcon, as: As = "div", reduceMotion: forceReduceMotion, disabled = false, className, slotProps, children, ...rest }, ref) {
|
|
18
|
-
const cssAnimationDuration =
|
|
18
|
+
const cssAnimationDuration = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion() || forceReduceMotion ? "duration-0" : "duration-120";
|
|
19
19
|
const { className: textClassName, ...textProps } = slotProps?.text ?? {};
|
|
20
20
|
const { className: startIconClassName, ...startIconProps } = slotProps?.startIcon ?? {};
|
|
21
21
|
const { className: endIconClassName, ...endIconProps } = slotProps?.endIcon ?? {};
|
|
@@ -4,15 +4,15 @@ import { cx, getStyles } from "../../../styles/styler.js";
|
|
|
4
4
|
import { IconSlot } from "../../IconSlot.js";
|
|
5
5
|
import { Text } from "../../Text.js";
|
|
6
6
|
import { HStack } from "../../HStack.js";
|
|
7
|
+
import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
|
|
7
8
|
import { forwardRef, useMemo } from "react";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { useReducedMotion } from "motion/react";
|
|
10
10
|
//#region src/components/client/Chip/ChipBase.tsx
|
|
11
11
|
const SIZE_DEFAULT = "md";
|
|
12
12
|
const VARIANT_DEFAULT = "primary";
|
|
13
13
|
const MAX_WIDTH_DEFAULT = 200;
|
|
14
14
|
const ChipBase = forwardRef(function ChipBase({ size = SIZE_DEFAULT, minWidth, maxWidth = MAX_WIDTH_DEFAULT, startIcon, endIcon, as: As = "div", reduceMotion: forceReduceMotion, disabled = false, className, slotProps, children, ...rest }, ref) {
|
|
15
|
-
const cssAnimationDuration =
|
|
15
|
+
const cssAnimationDuration = usePrefersReducedMotion() || forceReduceMotion ? "duration-0" : "duration-120";
|
|
16
16
|
const { className: textClassName, ...textProps } = slotProps?.text ?? {};
|
|
17
17
|
const { className: startIconClassName, ...startIconProps } = slotProps?.startIcon ?? {};
|
|
18
18
|
const { className: endIconClassName, ...endIconProps } = slotProps?.endIcon ?? {};
|
|
@@ -5,6 +5,7 @@ require("../../../_virtual/_rolldown/runtime.cjs");
|
|
|
5
5
|
const require_index = require("../../../css-tokens/dist/index.cjs");
|
|
6
6
|
const require_utils_createSlot = require("../../../utils/createSlot.cjs");
|
|
7
7
|
const require_components_Icon = require("../../Icon.cjs");
|
|
8
|
+
const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
|
|
8
9
|
const require_components_client_SpringMotionConfig = require("../SpringMotionConfig.cjs");
|
|
9
10
|
require("../Button/buttonConstants.cjs");
|
|
10
11
|
const require_components_client_Button_Button = require("../Button/Button.cjs");
|
|
@@ -20,7 +21,7 @@ let motion_react = require("motion/react");
|
|
|
20
21
|
* @componentType Client component
|
|
21
22
|
*/
|
|
22
23
|
const IconButton = (0, react.forwardRef)(function IconButton(props, forwardedRef) {
|
|
23
|
-
const prefersReducedMotion =
|
|
24
|
+
const prefersReducedMotion = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion();
|
|
24
25
|
const disableMotion = !!props.disableEffects || !!props.disabled;
|
|
25
26
|
const layoutVariant = (0, react.useMemo)(() => prefersReducedMotion ? "smooth" : "subtle", [prefersReducedMotion]);
|
|
26
27
|
const Slot = (0, react.useMemo)(() => require_utils_createSlot.createSlot(), []);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { BUTTON_SCALE_EFFECT_HOVER, BUTTON_SCALE_EFFECT_PRESSED, BUTTON_SCALE_EFFECT_REST } from "../../../css-tokens/dist/index.js";
|
|
4
4
|
import { createSlot } from "../../../utils/createSlot.js";
|
|
5
5
|
import { Icon } from "../../Icon.js";
|
|
6
|
+
import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
|
|
6
7
|
import { SpringMotionConfig } from "../SpringMotionConfig.js";
|
|
7
8
|
import "../Button/buttonConstants.js";
|
|
8
9
|
import { iconMotionVariants, loadingMotionVariants } from "../Button/Button.js";
|
|
@@ -10,7 +11,7 @@ import { IconButtonBase, renderIconButtonAsChild } from "./IconButtonBase.js";
|
|
|
10
11
|
import { Progress } from "@yahoo/uds-icons";
|
|
11
12
|
import { forwardRef, isValidElement, useMemo } from "react";
|
|
12
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { AnimatePresence, m
|
|
14
|
+
import { AnimatePresence, m } from "motion/react";
|
|
14
15
|
//#region src/components/client/IconButton/IconButton.tsx
|
|
15
16
|
/**
|
|
16
17
|
* **⚙️️ An icon button element that can be used to trigger an action**
|
|
@@ -18,7 +19,7 @@ import { AnimatePresence, m, useReducedMotion } from "motion/react";
|
|
|
18
19
|
* @componentType Client component
|
|
19
20
|
*/
|
|
20
21
|
const IconButton = forwardRef(function IconButton(props, forwardedRef) {
|
|
21
|
-
const prefersReducedMotion =
|
|
22
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
22
23
|
const disableMotion = !!props.disableEffects || !!props.disabled;
|
|
23
24
|
const layoutVariant = useMemo(() => prefersReducedMotion ? "smooth" : "subtle", [prefersReducedMotion]);
|
|
24
25
|
const Slot = useMemo(() => createSlot(), []);
|
|
@@ -7,13 +7,13 @@ const require_components_IconSlot = require("../../IconSlot.cjs");
|
|
|
7
7
|
const require_components_Box = require("../../Box.cjs");
|
|
8
8
|
const require_components_HStack = require("../../HStack.cjs");
|
|
9
9
|
const require_components_VStack = require("../../VStack.cjs");
|
|
10
|
+
const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
|
|
10
11
|
const require_components_client_AnimateHeightChange = require("../AnimateHeightChange.cjs");
|
|
11
12
|
const require_components_client_Input_InputHelpTextInternal = require("./InputHelpTextInternal.cjs");
|
|
12
13
|
let react = require("react");
|
|
13
14
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
15
|
let lodash_isFunction_js = require("lodash/isFunction.js");
|
|
15
16
|
lodash_isFunction_js = require_runtime.__toESM(lodash_isFunction_js);
|
|
16
|
-
let motion_react = require("motion/react");
|
|
17
17
|
//#region src/components/client/Input/Input.tsx
|
|
18
18
|
function setNativeInputValue(input, next) {
|
|
19
19
|
(Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(input, next);
|
|
@@ -132,7 +132,7 @@ const Input = (0, react.forwardRef)(function Input({ id, label, type = "text", s
|
|
|
132
132
|
onFocus,
|
|
133
133
|
slotProps
|
|
134
134
|
]);
|
|
135
|
-
const layoutVariant =
|
|
135
|
+
const layoutVariant = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion() ? "smooth" : "bouncy";
|
|
136
136
|
const reduceMotion = forceReduceMotion ? "always" : "user";
|
|
137
137
|
const isInteractive = !readOnly && !disabled;
|
|
138
138
|
const classNames = {
|
|
@@ -5,12 +5,12 @@ import { IconSlot } from "../../IconSlot.js";
|
|
|
5
5
|
import { Box } from "../../Box.js";
|
|
6
6
|
import { HStack } from "../../HStack.js";
|
|
7
7
|
import { VStack } from "../../VStack.js";
|
|
8
|
+
import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
|
|
8
9
|
import { AnimateHeightChange } from "../AnimateHeightChange.js";
|
|
9
10
|
import { InputHelpTextInternal as InputHelpTextInternalMemo } from "./InputHelpTextInternal.js";
|
|
10
11
|
import { forwardRef, memo, useCallback, useEffect, useId, useImperativeHandle, useRef, useState } from "react";
|
|
11
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
13
|
import { isFunction } from "lodash-es";
|
|
13
|
-
import { useReducedMotion } from "motion/react";
|
|
14
14
|
//#region src/components/client/Input/Input.tsx
|
|
15
15
|
function setNativeInputValue(input, next) {
|
|
16
16
|
(Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(input, next);
|
|
@@ -129,7 +129,7 @@ const Input = forwardRef(function Input({ id, label, type = "text", size = "md",
|
|
|
129
129
|
onFocus,
|
|
130
130
|
slotProps
|
|
131
131
|
]);
|
|
132
|
-
const layoutVariant =
|
|
132
|
+
const layoutVariant = usePrefersReducedMotion() ? "smooth" : "bouncy";
|
|
133
133
|
const reduceMotion = forceReduceMotion ? "always" : "user";
|
|
134
134
|
const isInteractive = !readOnly && !disabled;
|
|
135
135
|
const classNames = {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
5
|
+
const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
|
|
5
6
|
const require_components_client_Modal_modalStore = require("./modalStore.cjs");
|
|
6
7
|
const require_components_client_Modal_UDSModalConfigProvider = require("./UDSModalConfigProvider.cjs");
|
|
7
8
|
const require_components_client_Modal_ModalActions = require("./ModalActions.cjs");
|
|
@@ -11,12 +12,11 @@ const require_components_client_Modal_ModalTitle = require("./ModalTitle.cjs");
|
|
|
11
12
|
const require_components_client_Modal_Modal = require("./Modal.cjs");
|
|
12
13
|
let react = require("react");
|
|
13
14
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
|
-
let motion_react = require("motion/react");
|
|
15
15
|
//#region src/components/client/Modal/ManagedModal.tsx
|
|
16
16
|
const ManagedModal = ({ slot }) => {
|
|
17
17
|
const { animationDuration } = require_components_client_Modal_UDSModalConfigProvider.useModalConfig();
|
|
18
18
|
const durationOut = typeof animationDuration === "number" ? animationDuration : animationDuration.out;
|
|
19
|
-
const exitDuration =
|
|
19
|
+
const exitDuration = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion() || slot.props.reduceMotion ? 0 : durationOut;
|
|
20
20
|
(0, react.useEffect)(() => {
|
|
21
21
|
if (!slot.closing) return;
|
|
22
22
|
const ownerId = slot.ownerId;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
"use client";
|
|
3
|
+
import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
|
|
3
4
|
import { closeModalEntry, removeModalEntry } from "./modalStore.js";
|
|
4
5
|
import { useModalConfig } from "./UDSModalConfigProvider.js";
|
|
5
6
|
import { ModalActions } from "./ModalActions.js";
|
|
@@ -9,12 +10,11 @@ import { ModalTitle } from "./ModalTitle.js";
|
|
|
9
10
|
import { Modal } from "./Modal.js";
|
|
10
11
|
import { useEffect } from "react";
|
|
11
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
import { useReducedMotion } from "motion/react";
|
|
13
13
|
//#region src/components/client/Modal/ManagedModal.tsx
|
|
14
14
|
const ManagedModal = ({ slot }) => {
|
|
15
15
|
const { animationDuration } = useModalConfig();
|
|
16
16
|
const durationOut = typeof animationDuration === "number" ? animationDuration : animationDuration.out;
|
|
17
|
-
const exitDuration =
|
|
17
|
+
const exitDuration = usePrefersReducedMotion() || slot.props.reduceMotion ? 0 : durationOut;
|
|
18
18
|
useEffect(() => {
|
|
19
19
|
if (!slot.closing) return;
|
|
20
20
|
const ownerId = slot.ownerId;
|
|
@@ -9,6 +9,7 @@ const require_components_Box = require("../../Box.cjs");
|
|
|
9
9
|
const require_components_HStack = require("../../HStack.cjs");
|
|
10
10
|
const require_components_VStack = require("../../VStack.cjs");
|
|
11
11
|
const require_components_Scrim = require("../../Scrim.cjs");
|
|
12
|
+
const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
|
|
12
13
|
const require_utils_exposeAriakitScrollbarWidth = require("../../../utils/exposeAriakitScrollbarWidth.cjs");
|
|
13
14
|
const require_components_client_Modal_ModalContext = require("./ModalContext.cjs");
|
|
14
15
|
const require_components_client_Modal_UDSModalConfigProvider = require("./UDSModalConfigProvider.cjs");
|
|
@@ -21,7 +22,6 @@ let _yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
|
21
22
|
let react = require("react");
|
|
22
23
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
23
24
|
let _ariakit_react = require("@ariakit/react");
|
|
24
|
-
let motion_react = require("motion/react");
|
|
25
25
|
//#region src/components/client/Modal/Modal.tsx
|
|
26
26
|
require_utils_exposeAriakitScrollbarWidth.exposeAriakitScrollbarWidth();
|
|
27
27
|
const Modal = ({ children, open, onClose, onOpen, portal = true, modal = true, includeScrim, closeAriaLabel = "Close", slotProps, hideDismissButton = false, reduceMotion: forceReduceMotion = false, closeIcon = _yahoo_uds_icons.Cross, maxWidth = "auto", maxHeight: maxHeightProp = "auto", fullWidth = false, fullHeight = false, title: titleProp, description: descriptionProp, content: contentProp, actions: actionsProp, scrollBehavior = "outside", className, style }) => {
|
|
@@ -37,7 +37,7 @@ const Modal = ({ children, open, onClose, onOpen, portal = true, modal = true, i
|
|
|
37
37
|
out: animationEasing
|
|
38
38
|
} : animationEasing;
|
|
39
39
|
const { title: modalTitle, description: modalDescription, content: modalContent, actions: modalActions } = require_components_client_Modal_utils.separateChildren(children);
|
|
40
|
-
const reducedMotion =
|
|
40
|
+
const reducedMotion = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion() || forceReduceMotion;
|
|
41
41
|
(0, react.useEffect)(() => {
|
|
42
42
|
if (open && !prevOpen.current) onOpen?.();
|
|
43
43
|
prevOpen.current = open;
|
|
@@ -7,6 +7,7 @@ import { Box } from "../../Box.js";
|
|
|
7
7
|
import { HStack } from "../../HStack.js";
|
|
8
8
|
import { VStack } from "../../VStack.js";
|
|
9
9
|
import { Scrim } from "../../Scrim.js";
|
|
10
|
+
import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
|
|
10
11
|
import { exposeAriakitScrollbarWidth } from "../../../utils/exposeAriakitScrollbarWidth.js";
|
|
11
12
|
import { ModalContext } from "./ModalContext.js";
|
|
12
13
|
import { useModalConfig } from "./UDSModalConfigProvider.js";
|
|
@@ -19,7 +20,6 @@ import { Cross } from "@yahoo/uds-icons";
|
|
|
19
20
|
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
20
21
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
22
|
import { Dialog, DialogDismiss } from "@ariakit/react";
|
|
22
|
-
import { useReducedMotion } from "motion/react";
|
|
23
23
|
//#region src/components/client/Modal/Modal.tsx
|
|
24
24
|
exposeAriakitScrollbarWidth();
|
|
25
25
|
const Modal = ({ children, open, onClose, onOpen, portal = true, modal = true, includeScrim, closeAriaLabel = "Close", slotProps, hideDismissButton = false, reduceMotion: forceReduceMotion = false, closeIcon = Cross, maxWidth = "auto", maxHeight: maxHeightProp = "auto", fullWidth = false, fullHeight = false, title: titleProp, description: descriptionProp, content: contentProp, actions: actionsProp, scrollBehavior = "outside", className, style }) => {
|
|
@@ -35,7 +35,7 @@ const Modal = ({ children, open, onClose, onOpen, portal = true, modal = true, i
|
|
|
35
35
|
out: animationEasing
|
|
36
36
|
} : animationEasing;
|
|
37
37
|
const { title: modalTitle, description: modalDescription, content: modalContent, actions: modalActions } = separateChildren(children);
|
|
38
|
-
const reducedMotion =
|
|
38
|
+
const reducedMotion = usePrefersReducedMotion() || forceReduceMotion;
|
|
39
39
|
useEffect(() => {
|
|
40
40
|
if (open && !prevOpen.current) onOpen?.();
|
|
41
41
|
prevOpen.current = open;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
5
|
+
const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
|
|
5
6
|
const require_components_client_Popover_PopoverContext = require("./PopoverContext.cjs");
|
|
6
7
|
const require_components_client_Popover_UDSPopoverConfigProvider = require("./UDSPopoverConfigProvider.cjs");
|
|
7
8
|
let react = require("react");
|
|
8
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
10
|
let _ariakit_react = require("@ariakit/react");
|
|
10
|
-
let motion_react = require("motion/react");
|
|
11
11
|
//#region src/components/client/Popover/Popover.tsx
|
|
12
12
|
const POPOVER_OPEN_EVENT = "uds:popover-open";
|
|
13
13
|
/**
|
|
@@ -61,7 +61,7 @@ function Popover({ children, placement, open, defaultOpen = false, portal = true
|
|
|
61
61
|
return () => document.removeEventListener(POPOVER_OPEN_EVENT, handler);
|
|
62
62
|
}, [id, store]);
|
|
63
63
|
const isControlled = open !== void 0;
|
|
64
|
-
const reducedMotion =
|
|
64
|
+
const reducedMotion = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion() || forceReduceMotion;
|
|
65
65
|
const animationDuration = reducedMotion ? 0 : animationDurationConfig;
|
|
66
66
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Popover_PopoverContext.PopoverInternalContext.Provider, {
|
|
67
67
|
value: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
"use client";
|
|
3
|
+
import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
|
|
3
4
|
import { PopoverInternalContext } from "./PopoverContext.js";
|
|
4
5
|
import { usePopoverConfig } from "./UDSPopoverConfigProvider.js";
|
|
5
6
|
import { useCallback, useEffect, useId } from "react";
|
|
6
7
|
import { jsx } from "react/jsx-runtime";
|
|
7
8
|
import { PopoverProvider, usePopoverStore } from "@ariakit/react";
|
|
8
|
-
import { useReducedMotion } from "motion/react";
|
|
9
9
|
//#region src/components/client/Popover/Popover.tsx
|
|
10
10
|
const POPOVER_OPEN_EVENT = "uds:popover-open";
|
|
11
11
|
/**
|
|
@@ -59,7 +59,7 @@ function Popover({ children, placement, open, defaultOpen = false, portal = true
|
|
|
59
59
|
return () => document.removeEventListener(POPOVER_OPEN_EVENT, handler);
|
|
60
60
|
}, [id, store]);
|
|
61
61
|
const isControlled = open !== void 0;
|
|
62
|
-
const reducedMotion =
|
|
62
|
+
const reducedMotion = usePrefersReducedMotion() || forceReduceMotion;
|
|
63
63
|
const animationDuration = reducedMotion ? 0 : animationDurationConfig;
|
|
64
64
|
return /* @__PURE__ */ jsx(PopoverInternalContext.Provider, {
|
|
65
65
|
value: {
|
|
@@ -5,6 +5,7 @@ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
|
5
5
|
const require_styles_styler = require("../../../styles/styler.cjs");
|
|
6
6
|
const require_components_Box = require("../../Box.cjs");
|
|
7
7
|
const require_components_FormLabel = require("../../FormLabel.cjs");
|
|
8
|
+
const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
|
|
8
9
|
const require_components_client_SpringMotionConfig = require("../SpringMotionConfig.cjs");
|
|
9
10
|
const require_components_client_Radio_useRadioGroup = require("./useRadioGroup.cjs");
|
|
10
11
|
let react = require("react");
|
|
@@ -117,7 +118,7 @@ const Radio = (0, react.forwardRef)(function Radio({ id, name: nameProp, label,
|
|
|
117
118
|
const handleTapEnd = (0, react.useCallback)(() => {
|
|
118
119
|
setIsPressed(false);
|
|
119
120
|
}, []);
|
|
120
|
-
const prefersReducedMotion =
|
|
121
|
+
const prefersReducedMotion = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion();
|
|
121
122
|
const reduceMotion = forceReduceMotion ? "always" : "user";
|
|
122
123
|
const cssAnimationDuration = prefersReducedMotion || forceReduceMotion ? "duration-0" : "duration-120";
|
|
123
124
|
const classNames = {
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
4
|
import { Box } from "../../Box.js";
|
|
5
5
|
import { FormLabel } from "../../FormLabel.js";
|
|
6
|
+
import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
|
|
6
7
|
import { SpringMotionConfig } from "../SpringMotionConfig.js";
|
|
7
8
|
import { useRadioGroup } from "./useRadioGroup.js";
|
|
8
9
|
import { forwardRef, useCallback, useId, useMemo, useRef, useState } from "react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { m
|
|
11
|
+
import { m } from "motion/react";
|
|
11
12
|
//#region src/components/client/Radio/Radio.tsx
|
|
12
13
|
const RADIO_VARIANTS = ["primary", "secondary"];
|
|
13
14
|
const RADIO_SIZES = ["sm", "md"];
|
|
@@ -114,7 +115,7 @@ const Radio = forwardRef(function Radio({ id, name: nameProp, label, labelPositi
|
|
|
114
115
|
const handleTapEnd = useCallback(() => {
|
|
115
116
|
setIsPressed(false);
|
|
116
117
|
}, []);
|
|
117
|
-
const prefersReducedMotion =
|
|
118
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
118
119
|
const reduceMotion = forceReduceMotion ? "always" : "user";
|
|
119
120
|
const cssAnimationDuration = prefersReducedMotion || forceReduceMotion ? "duration-0" : "duration-120";
|
|
120
121
|
const classNames = {
|
|
@@ -5,8 +5,8 @@ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
|
5
5
|
const require_styles_styler = require("../../../styles/styler.cjs");
|
|
6
6
|
const require_components_IconSlot = require("../../IconSlot.cjs");
|
|
7
7
|
const require_components_Box = require("../../Box.cjs");
|
|
8
|
-
const require_components_client_SpringMotionConfig = require("../SpringMotionConfig.cjs");
|
|
9
8
|
const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
|
|
9
|
+
const require_components_client_SpringMotionConfig = require("../SpringMotionConfig.cjs");
|
|
10
10
|
const require_components_client_Switch_SwitchBase = require("./SwitchBase.cjs");
|
|
11
11
|
let react = require("react");
|
|
12
12
|
react = require_runtime.__toESM(react);
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
4
|
import { IconSlot } from "../../IconSlot.js";
|
|
5
5
|
import { Box } from "../../Box.js";
|
|
6
|
-
import { SpringMotionConfig } from "../SpringMotionConfig.js";
|
|
7
6
|
import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
|
|
7
|
+
import { SpringMotionConfig } from "../SpringMotionConfig.js";
|
|
8
8
|
import { SwitchBase } from "./SwitchBase.js";
|
|
9
9
|
import { forwardRef } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
5
5
|
const require_styles_styler = require("../../../styles/styler.cjs");
|
|
6
|
+
const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
|
|
6
7
|
const require_components_client_Tabs_tabsContext = require("./tabsContext.cjs");
|
|
7
8
|
let react = require("react");
|
|
8
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
10
|
let _ariakit_react = require("@ariakit/react");
|
|
10
|
-
let motion_react = require("motion/react");
|
|
11
11
|
//#region src/components/client/Tabs/TabList.tsx
|
|
12
12
|
/** Matches {@link Tab} per-tab underline (token CSS variables on the indicator root). */
|
|
13
13
|
const tabRootUnderlineClassName = require_styles_styler.cx("pointer-events-none absolute bottom-0 left-0 right-0", "h-[var(--uds-tab-underline-width,0px)] bg-[var(--uds-tab-underline-color,transparent)]", "transition-[height,background-color] duration-[240ms] ease-[cubic-bezier(0.2,0,0,1)]");
|
|
@@ -21,7 +21,7 @@ const TabList = (0, react.forwardRef)(function TabList({ children, scrollable, c
|
|
|
21
21
|
const listRef = (0, react.useRef)(null);
|
|
22
22
|
const indicatorRef = (0, react.useRef)(null);
|
|
23
23
|
const skipNextTransitionRef = (0, react.useRef)(true);
|
|
24
|
-
const reducedMotion =
|
|
24
|
+
const reducedMotion = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion();
|
|
25
25
|
const applyIndicator = (0, react.useCallback)(() => {
|
|
26
26
|
const listEl = listRef.current;
|
|
27
27
|
const indicatorEl = indicatorRef.current;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
"use client";
|
|
3
3
|
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
|
+
import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
|
|
4
5
|
import { useTabsContext } from "./tabsContext.js";
|
|
5
6
|
import { forwardRef, useCallback, useLayoutEffect, useRef } from "react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { TabList as TabList$1, useStoreState, useTabContext } from "@ariakit/react";
|
|
8
|
-
import { useReducedMotion } from "motion/react";
|
|
9
9
|
//#region src/components/client/Tabs/TabList.tsx
|
|
10
10
|
/** Matches {@link Tab} per-tab underline (token CSS variables on the indicator root). */
|
|
11
11
|
const tabRootUnderlineClassName = cx("pointer-events-none absolute bottom-0 left-0 right-0", "h-[var(--uds-tab-underline-width,0px)] bg-[var(--uds-tab-underline-color,transparent)]", "transition-[height,background-color] duration-[240ms] ease-[cubic-bezier(0.2,0,0,1)]");
|
|
@@ -19,7 +19,7 @@ const TabList = forwardRef(function TabList({ children, scrollable, className, .
|
|
|
19
19
|
const listRef = useRef(null);
|
|
20
20
|
const indicatorRef = useRef(null);
|
|
21
21
|
const skipNextTransitionRef = useRef(true);
|
|
22
|
-
const reducedMotion =
|
|
22
|
+
const reducedMotion = usePrefersReducedMotion();
|
|
23
23
|
const applyIndicator = useCallback(() => {
|
|
24
24
|
const listEl = listRef.current;
|
|
25
25
|
const indicatorEl = indicatorRef.current;
|
|
@@ -6,12 +6,12 @@ const require_styles_styler = require("../../../styles/styler.cjs");
|
|
|
6
6
|
const require_components_client_Pressable = require("../Pressable.cjs");
|
|
7
7
|
const require_components_IconSlot = require("../../IconSlot.cjs");
|
|
8
8
|
const require_components_Text = require("../../Text.cjs");
|
|
9
|
+
const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
|
|
9
10
|
const require_components_client_Button_Button = require("../Button/Button.cjs");
|
|
10
11
|
const require_components_client_Toast_UDSToastConfigProvider = require("./UDSToastConfigProvider.cjs");
|
|
11
12
|
const require_components_client_Toast_ToastContainer = require("./ToastContainer.cjs");
|
|
12
13
|
let _yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
13
14
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
|
-
let motion_react = require("motion/react");
|
|
15
15
|
//#region src/components/client/Toast/Toast.tsx
|
|
16
16
|
const iconMap = {
|
|
17
17
|
loading: _yahoo_uds_icons.Progress,
|
|
@@ -48,7 +48,7 @@ const Toast = ({ message, onClickCloseButton, size: sizeProp, variant: variantPr
|
|
|
48
48
|
const { className: startIconClassName, ...startIconProps } = slotProps?.startIcon ?? {};
|
|
49
49
|
const { className: closeIconContainerClassName, ...closeIconContainerProps } = slotProps?.closeIconContainer ?? {};
|
|
50
50
|
const { className: closeIconClassName, ...closeIconProps } = slotProps?.closeIcon ?? {};
|
|
51
|
-
const reducedMotion =
|
|
51
|
+
const reducedMotion = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion() || forceReduceMotion;
|
|
52
52
|
const handleClose = () => {
|
|
53
53
|
closeToast?.();
|
|
54
54
|
onClickCloseButton?.(id);
|
|
@@ -4,12 +4,12 @@ import { cx, getStyles } from "../../../styles/styler.js";
|
|
|
4
4
|
import { Pressable } from "../Pressable.js";
|
|
5
5
|
import { IconSlot } from "../../IconSlot.js";
|
|
6
6
|
import { Text } from "../../Text.js";
|
|
7
|
+
import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
|
|
7
8
|
import { Button } from "../Button/Button.js";
|
|
8
9
|
import { useToastConfig } from "./UDSToastConfigProvider.js";
|
|
9
10
|
import { ToastContainer } from "./ToastContainer.js";
|
|
10
11
|
import { CheckCircle, Cross, Error, Info, Progress, Warning } from "@yahoo/uds-icons";
|
|
11
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
import { useReducedMotion } from "motion/react";
|
|
13
13
|
//#region src/components/client/Toast/Toast.tsx
|
|
14
14
|
const iconMap = {
|
|
15
15
|
loading: Progress,
|
|
@@ -46,7 +46,7 @@ const Toast = ({ message, onClickCloseButton, size: sizeProp, variant: variantPr
|
|
|
46
46
|
const { className: startIconClassName, ...startIconProps } = slotProps?.startIcon ?? {};
|
|
47
47
|
const { className: closeIconContainerClassName, ...closeIconContainerProps } = slotProps?.closeIconContainer ?? {};
|
|
48
48
|
const { className: closeIconClassName, ...closeIconProps } = slotProps?.closeIcon ?? {};
|
|
49
|
-
const reducedMotion =
|
|
49
|
+
const reducedMotion = usePrefersReducedMotion() || forceReduceMotion;
|
|
50
50
|
const handleClose = () => {
|
|
51
51
|
closeToast?.();
|
|
52
52
|
onClickCloseButton?.(id);
|