@seed-design/react 2.3.0 → 2.4.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/lib/components/ActionButton/ActionButton.cjs +5 -2
- package/lib/components/ActionButton/ActionButton.d.ts.map +1 -1
- package/lib/components/ActionButton/ActionButton.js +5 -2
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.cjs +9 -6
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.d.ts.map +1 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.js +9 -6
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.cjs +2 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.d.ts.map +1 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.js +2 -1
- package/lib/components/AttachmentInput/AttachmentInputItem.cjs +9 -6
- package/lib/components/AttachmentInput/AttachmentInputItem.d.ts.map +1 -1
- package/lib/components/AttachmentInput/AttachmentInputItem.js +9 -6
- package/lib/components/AttachmentInput/AttachmentInputTrigger.cjs +2 -1
- package/lib/components/AttachmentInput/AttachmentInputTrigger.d.ts.map +1 -1
- package/lib/components/AttachmentInput/AttachmentInputTrigger.js +2 -1
- package/lib/components/BottomSheet/BottomSheet.cjs +5 -3
- package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/components/BottomSheet/BottomSheet.js +5 -3
- package/lib/components/Callout/Callout.cjs +3 -2
- package/lib/components/Callout/Callout.d.ts.map +1 -1
- package/lib/components/Callout/Callout.js +3 -2
- package/lib/components/Checkbox/Checkbox.cjs +2 -1
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +2 -1
- package/lib/components/Chip/Chip.cjs +2 -1
- package/lib/components/Chip/Chip.d.ts.map +1 -1
- package/lib/components/Chip/Chip.js +2 -1
- package/lib/components/ChipTabs/ChipTabs.cjs +2 -1
- package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -1
- package/lib/components/ChipTabs/ChipTabs.js +2 -1
- package/lib/components/ContentDialog/ContentDialog.cjs +5 -3
- package/lib/components/ContentDialog/ContentDialog.d.ts.map +1 -1
- package/lib/components/ContentDialog/ContentDialog.js +5 -3
- package/lib/components/ContextualFloatingButton/ContextualFloatingButton.cjs +5 -2
- package/lib/components/ContextualFloatingButton/ContextualFloatingButton.d.ts.map +1 -1
- package/lib/components/ContextualFloatingButton/ContextualFloatingButton.js +5 -2
- package/lib/components/DatePicker/DatePicker.cjs +2 -2
- package/lib/components/DatePicker/DatePicker.d.ts +10 -4
- package/lib/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/lib/components/DatePicker/DatePicker.js +2 -2
- package/lib/components/DatePicker/index.d.ts +1 -1
- package/lib/components/DatePicker/index.d.ts.map +1 -1
- package/lib/components/FieldButton/FieldButton.cjs +2 -1
- package/lib/components/FieldButton/FieldButton.d.ts.map +1 -1
- package/lib/components/FieldButton/FieldButton.js +2 -1
- package/lib/components/FloatingActionButton/FloatingActionButton.cjs +2 -1
- package/lib/components/FloatingActionButton/FloatingActionButton.d.ts.map +1 -1
- package/lib/components/FloatingActionButton/FloatingActionButton.js +2 -1
- package/lib/components/HelpBubble/HelpBubble.cjs +2 -1
- package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -1
- package/lib/components/HelpBubble/HelpBubble.js +2 -1
- package/lib/components/ImageFrame/ImageFrame.cjs +5 -2
- package/lib/components/ImageFrame/ImageFrame.d.ts.map +1 -1
- package/lib/components/ImageFrame/ImageFrame.js +5 -2
- package/lib/components/LoadingIndicator/usePendingButton.d.ts +57 -57
- package/lib/components/MenuSheet/MenuSheet.cjs +2 -1
- package/lib/components/MenuSheet/MenuSheet.d.ts.map +1 -1
- package/lib/components/MenuSheet/MenuSheet.js +2 -1
- package/lib/components/PageBanner/PageBanner.cjs +3 -2
- package/lib/components/PageBanner/PageBanner.d.ts.map +1 -1
- package/lib/components/PageBanner/PageBanner.js +3 -2
- package/lib/components/QuantityPicker/QuantityPicker.cjs +8 -4
- package/lib/components/QuantityPicker/QuantityPicker.d.ts.map +1 -1
- package/lib/components/QuantityPicker/QuantityPicker.js +8 -4
- package/lib/components/RadioGroup/RadioGroup.cjs +2 -1
- package/lib/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/lib/components/RadioGroup/RadioGroup.js +2 -1
- package/lib/components/ReactionButton/ReactionButton.cjs +5 -2
- package/lib/components/ReactionButton/ReactionButton.d.ts.map +1 -1
- package/lib/components/ReactionButton/ReactionButton.js +5 -2
- package/lib/components/ScrollFog/ScrollFog.d.ts +4 -6
- package/lib/components/ScrollFog/ScrollFog.d.ts.map +1 -1
- package/lib/components/ScrollFog/ScrollFog.test.d.ts +2 -0
- package/lib/components/ScrollFog/ScrollFog.test.d.ts.map +1 -0
- package/lib/components/SideNavigation/SideNavigation.cjs +1 -1
- package/lib/components/SideNavigation/SideNavigation.js +1 -1
- package/lib/components/SidePanel/SidePanel.cjs +5 -3
- package/lib/components/SidePanel/SidePanel.d.ts.map +1 -1
- package/lib/components/SidePanel/SidePanel.js +5 -3
- package/lib/components/Slider/Slider.cjs +1 -1
- package/lib/components/Slider/Slider.js +1 -1
- package/lib/components/Snackbar/Snackbar.cjs +2 -1
- package/lib/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/lib/components/Snackbar/Snackbar.js +2 -1
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.cjs +2 -1
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts.map +1 -1
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.js +2 -1
- package/lib/components/Switch/Switch.cjs +2 -1
- package/lib/components/Switch/Switch.d.ts.map +1 -1
- package/lib/components/Switch/Switch.js +2 -1
- package/lib/components/Tabs/Tabs.cjs +2 -1
- package/lib/components/Tabs/Tabs.d.ts.map +1 -1
- package/lib/components/Tabs/Tabs.js +2 -1
- package/lib/components/TextField/TextField.cjs +1 -1
- package/lib/components/TextField/TextField.js +1 -1
- package/lib/components/ToggleButton/ToggleButton.cjs +5 -2
- package/lib/components/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/lib/components/ToggleButton/ToggleButton.js +5 -2
- package/lib/components/WheelPicker/WheelPicker.cjs +94 -0
- package/lib/components/WheelPicker/WheelPicker.d.ts +56 -0
- package/lib/components/WheelPicker/WheelPicker.d.ts.map +1 -0
- package/lib/components/WheelPicker/WheelPicker.js +89 -0
- package/lib/components/WheelPicker/WheelPicker.namespace.cjs +15 -0
- package/lib/components/WheelPicker/WheelPicker.namespace.d.ts +2 -0
- package/lib/components/WheelPicker/WheelPicker.namespace.d.ts.map +1 -0
- package/lib/components/WheelPicker/WheelPicker.namespace.js +10 -0
- package/lib/components/WheelPicker/WheelPicker.test.d.ts +2 -0
- package/lib/components/WheelPicker/WheelPicker.test.d.ts.map +1 -0
- package/lib/components/WheelPicker/index.cjs +12 -0
- package/lib/components/WheelPicker/index.d.ts +3 -0
- package/lib/components/WheelPicker/index.d.ts.map +1 -0
- package/lib/components/WheelPicker/index.js +3 -0
- package/lib/components/index.cjs +11 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +3 -1
- package/lib/components/private/WheelPicker.cjs +2 -3
- package/lib/components/private/WheelPicker.d.ts +3 -3
- package/lib/components/private/WheelPicker.d.ts.map +1 -1
- package/lib/components/private/WheelPicker.js +3 -3
- package/lib/components/private/useDismissible.d.ts +123 -123
- package/lib/index.cjs +14 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -1
- package/lib/utils/elementSizeVars.cjs +76 -0
- package/lib/utils/elementSizeVars.d.ts +15 -0
- package/lib/utils/elementSizeVars.d.ts.map +1 -0
- package/lib/utils/elementSizeVars.js +74 -0
- package/lib/utils/scaleFeedback.cjs +99 -0
- package/lib/utils/scaleFeedback.d.ts +58 -0
- package/lib/utils/scaleFeedback.d.ts.map +1 -0
- package/lib/utils/scaleFeedback.js +94 -0
- package/package.json +4 -4
- package/src/components/ActionButton/ActionButton.tsx +5 -2
- package/src/components/AttachmentDisplay/AttachmentDisplayItem.tsx +14 -9
- package/src/components/AttachmentDisplay/AttachmentDisplayTrigger.tsx +7 -4
- package/src/components/AttachmentInput/AttachmentInputItem.tsx +14 -9
- package/src/components/AttachmentInput/AttachmentInputTrigger.tsx +3 -3
- package/src/components/BottomSheet/BottomSheet.tsx +5 -3
- package/src/components/Callout/Callout.tsx +9 -4
- package/src/components/Checkbox/Checkbox.tsx +3 -3
- package/src/components/Chip/Chip.tsx +2 -1
- package/src/components/ChipTabs/ChipTabs.tsx +3 -3
- package/src/components/ContentDialog/ContentDialog.tsx +5 -3
- package/src/components/ContextualFloatingButton/ContextualFloatingButton.tsx +5 -2
- package/src/components/DatePicker/DatePicker.test.tsx +20 -0
- package/src/components/DatePicker/DatePicker.tsx +14 -2
- package/src/components/DatePicker/index.ts +2 -0
- package/src/components/FieldButton/FieldButton.tsx +6 -3
- package/src/components/FloatingActionButton/FloatingActionButton.tsx +4 -4
- package/src/components/HelpBubble/HelpBubble.tsx +7 -4
- package/src/components/HelpBubbleTooltip/HelpBubbleTooltip.tsx +1 -1
- package/src/components/ImageFrame/ImageFrame.tsx +8 -1
- package/src/components/MenuSheet/MenuSheet.tsx +6 -3
- package/src/components/PageBanner/PageBanner.tsx +5 -6
- package/src/components/QuantityPicker/QuantityPicker.tsx +8 -4
- package/src/components/RadioGroup/RadioGroup.tsx +7 -4
- package/src/components/ReactionButton/ReactionButton.tsx +5 -2
- package/src/components/ScrollFog/ScrollFog.test.tsx +13 -0
- package/src/components/ScrollFog/ScrollFog.tsx +5 -7
- package/src/components/SidePanel/SidePanel.tsx +5 -3
- package/src/components/Snackbar/Snackbar.tsx +6 -3
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.tsx +7 -4
- package/src/components/Switch/Switch.tsx +3 -3
- package/src/components/Tabs/Tabs.tsx +3 -3
- package/src/components/ToggleButton/ToggleButton.tsx +5 -2
- package/src/components/WheelPicker/WheelPicker.namespace.ts +9 -0
- package/src/components/WheelPicker/WheelPicker.test.tsx +270 -0
- package/src/components/WheelPicker/WheelPicker.tsx +210 -0
- package/src/components/WheelPicker/index.ts +11 -0
- package/src/components/index.ts +1 -0
- package/src/components/private/WheelPicker.test.tsx +1 -0
- package/src/components/private/WheelPicker.tsx +6 -6
- package/src/index.ts +2 -0
- package/src/utils/elementSizeVars.tsx +112 -0
- package/src/utils/scaleFeedback.tsx +128 -0
|
@@ -12,8 +12,10 @@ import {
|
|
|
12
12
|
} from "@seed-design/css/recipes/quantity-picker";
|
|
13
13
|
import clsx from "clsx";
|
|
14
14
|
import * as React from "react";
|
|
15
|
+
import { useComposedRefs } from "@radix-ui/react-compose-refs";
|
|
15
16
|
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
16
17
|
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
18
|
+
import { useScaleFeedback } from "../../utils/scaleFeedback";
|
|
17
19
|
|
|
18
20
|
const { ClassNamesProvider, useClassNames } = createSlotRecipeContext(quantityPicker);
|
|
19
21
|
const withStateProps = createWithStateProps([useQuantityPickerContext]);
|
|
@@ -154,11 +156,12 @@ export const QuantityPickerDecrementButton = React.forwardRef<
|
|
|
154
156
|
? (removeIcon ?? icon)
|
|
155
157
|
: icon;
|
|
156
158
|
const contentIsIcon = content !== null && content !== undefined;
|
|
159
|
+
const { scaleFeedbackRef, scaleFeedbackClassName } = useScaleFeedback();
|
|
157
160
|
|
|
158
161
|
return (
|
|
159
162
|
<QuantityPickerPrimitive.DecrementButton
|
|
160
|
-
ref={ref}
|
|
161
|
-
className={clsx(classNames.decrementButton, className)}
|
|
163
|
+
ref={useComposedRefs(scaleFeedbackRef, ref)}
|
|
164
|
+
className={clsx(classNames.decrementButton, scaleFeedbackClassName, className)}
|
|
162
165
|
{...props}
|
|
163
166
|
>
|
|
164
167
|
{renderIcon(content ?? children, classNames.decrementIcon, decrementIconProps, contentIsIcon)}
|
|
@@ -208,11 +211,12 @@ export const QuantityPickerIncrementButton = React.forwardRef<
|
|
|
208
211
|
const { incrementIconProps, incrementLoading } = useQuantityPickerContext();
|
|
209
212
|
const content = incrementLoading ? loadingIndicator : icon;
|
|
210
213
|
const contentIsIcon = content !== null && content !== undefined;
|
|
214
|
+
const { scaleFeedbackRef, scaleFeedbackClassName } = useScaleFeedback();
|
|
211
215
|
|
|
212
216
|
return (
|
|
213
217
|
<QuantityPickerPrimitive.IncrementButton
|
|
214
|
-
ref={ref}
|
|
215
|
-
className={clsx(classNames.incrementButton, className)}
|
|
218
|
+
ref={useComposedRefs(scaleFeedbackRef, ref)}
|
|
219
|
+
className={clsx(classNames.incrementButton, scaleFeedbackClassName, className)}
|
|
216
220
|
{...props}
|
|
217
221
|
>
|
|
218
222
|
{renderIcon(content ?? children, classNames.incrementIcon, incrementIconProps, contentIsIcon)}
|
|
@@ -11,6 +11,7 @@ import clsx from "clsx";
|
|
|
11
11
|
import { forwardRef } from "react";
|
|
12
12
|
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
13
13
|
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
14
|
+
import { withScaleFeedback } from "../../utils/scaleFeedback";
|
|
14
15
|
import { InternalIcon } from "../private/Icon";
|
|
15
16
|
import { splitMultipleVariantsProps } from "../../utils/splitMultipleVariantsProps";
|
|
16
17
|
import { createRecipeContext } from "../../utils/createRecipeContext";
|
|
@@ -81,10 +82,12 @@ export interface RadioGroupItemControlProps
|
|
|
81
82
|
extends RadiomarkVariantProps,
|
|
82
83
|
RadioGroupPrimitive.ItemControlProps {}
|
|
83
84
|
|
|
84
|
-
export const RadioGroupItemControl =
|
|
85
|
-
HTMLDivElement,
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
export const RadioGroupItemControl = withScaleFeedback(
|
|
86
|
+
withRadiomarkProvider<HTMLDivElement, RadioGroupItemControlProps>(
|
|
87
|
+
RadioGroupPrimitive.ItemControl,
|
|
88
|
+
"root",
|
|
89
|
+
),
|
|
90
|
+
);
|
|
88
91
|
|
|
89
92
|
////////////////////////////////////////////////////////////////////////////////////
|
|
90
93
|
|
|
@@ -2,9 +2,11 @@ import {
|
|
|
2
2
|
reactionButton,
|
|
3
3
|
type ReactionButtonVariantProps,
|
|
4
4
|
} from "@seed-design/css/recipes/reaction-button";
|
|
5
|
+
import { useComposedRefs } from "@radix-ui/react-compose-refs";
|
|
5
6
|
import { Toggle as TogglePrimitive } from "@seed-design/react-toggle";
|
|
6
7
|
import clsx from "clsx";
|
|
7
8
|
import * as React from "react";
|
|
9
|
+
import { useScaleFeedback } from "../../utils/scaleFeedback";
|
|
8
10
|
import {
|
|
9
11
|
PendingButtonProvider,
|
|
10
12
|
usePendingButton,
|
|
@@ -20,12 +22,13 @@ export const ReactionButton = React.forwardRef<HTMLButtonElement, ReactionButton
|
|
|
20
22
|
({ size = "small", loading = false, className, ...otherProps }, ref) => {
|
|
21
23
|
const recipeClassName = reactionButton({ size });
|
|
22
24
|
const api = usePendingButton({ loading, disabled: otherProps.disabled });
|
|
25
|
+
const { scaleFeedbackRef, scaleFeedbackClassName } = useScaleFeedback();
|
|
23
26
|
|
|
24
27
|
return (
|
|
25
28
|
<PendingButtonProvider value={api}>
|
|
26
29
|
<TogglePrimitive.Root
|
|
27
|
-
ref={ref}
|
|
28
|
-
className={clsx(recipeClassName, className)}
|
|
30
|
+
ref={useComposedRefs(scaleFeedbackRef, ref)}
|
|
31
|
+
className={clsx(recipeClassName, scaleFeedbackClassName, className)}
|
|
29
32
|
{...api.stateProps}
|
|
30
33
|
{...otherProps}
|
|
31
34
|
/>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { render } from "@testing-library/react";
|
|
2
|
+
import { describe, expect, it } from "bun:test";
|
|
3
|
+
import { ScrollFog } from "./ScrollFog";
|
|
4
|
+
|
|
5
|
+
describe("ScrollFog", () => {
|
|
6
|
+
it("CSS 길이 계산식을 Fog 크기로 전달한다", () => {
|
|
7
|
+
const { container } = render(<ScrollFog size="min(40%, 132px)" />);
|
|
8
|
+
const scrollFog = container.firstElementChild as HTMLElement;
|
|
9
|
+
|
|
10
|
+
expect(scrollFog.style.getPropertyValue("--scroll-fog-size-top")).toBe("min(40%, 132px)");
|
|
11
|
+
expect(scrollFog.style.getPropertyValue("--scroll-fog-size-bottom")).toBe("min(40%, 132px)");
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -15,20 +15,18 @@ export interface ScrollFogProps
|
|
|
15
15
|
extends ScrollFogVariantProps,
|
|
16
16
|
React.HTMLAttributes<HTMLDivElement> {
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Fog 효과를 표시할 방향입니다.
|
|
19
19
|
* @default ["top", "bottom"]
|
|
20
20
|
*/
|
|
21
21
|
placement?: ScrollPlacement[];
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Fog 효과의 크기입니다. 숫자는 px 단위로 처리하며 CSS 길이 또는 계산식도 사용할 수 있습니다.
|
|
25
25
|
* @default 20
|
|
26
26
|
*/
|
|
27
|
-
size?: number;
|
|
27
|
+
size?: number | string;
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
* Size of the fog effect for each direction in pixels
|
|
31
|
-
*/
|
|
29
|
+
/** 방향별 Fog 효과의 크기입니다. */
|
|
32
30
|
sizes?: SizesConfig;
|
|
33
31
|
}
|
|
34
32
|
|
|
@@ -42,7 +40,7 @@ export const ScrollFog = forwardRef<HTMLDivElement, ScrollFogProps>(
|
|
|
42
40
|
...props,
|
|
43
41
|
});
|
|
44
42
|
const scrollFogClassName = scrollFog(variantProps);
|
|
45
|
-
const sizePx = typeof size === "number" ? `${size}px` : size;
|
|
43
|
+
const sizePx = typeof size === "number" ? `${size}px` : size;
|
|
46
44
|
|
|
47
45
|
const sizeStyle = useMemo(() => {
|
|
48
46
|
const finalSizes = {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { sidePanel, type SidePanelVariantProps } from "@seed-design/css/recipes/side-panel";
|
|
2
2
|
import { Drawer } from "@seed-design/react-drawer";
|
|
3
3
|
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
4
|
-
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
4
|
+
import { composeRefs, useComposedRefs } from "@radix-ui/react-compose-refs";
|
|
5
5
|
import { dataAttr } from "@seed-design/dom-utils";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { createRenderTrackingContext } from "../../utils/createRenderTrackingContext";
|
|
9
9
|
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
10
|
+
import { useScaleFeedback } from "../../utils/scaleFeedback";
|
|
10
11
|
import { useStyleProps, withStyleProps, type StyleProps } from "../../utils/styled";
|
|
11
12
|
|
|
12
13
|
const { withContext, useClassNames, ClassNamesProvider } = createSlotRecipeContext(sidePanel);
|
|
@@ -202,11 +203,12 @@ export const SidePanelCloseButton = React.forwardRef<HTMLButtonElement, SidePane
|
|
|
202
203
|
({ className, ...props }, ref) => {
|
|
203
204
|
const classNames = useClassNames();
|
|
204
205
|
const { trackRef } = closeButtonTracker.useRenderTracking();
|
|
206
|
+
const { scaleFeedbackRef, scaleFeedbackClassName } = useScaleFeedback();
|
|
205
207
|
|
|
206
208
|
return (
|
|
207
209
|
<Drawer.CloseButton
|
|
208
|
-
ref={
|
|
209
|
-
className={clsx(classNames.closeButton, className)}
|
|
210
|
+
ref={useComposedRefs(scaleFeedbackRef, ref, trackRef)}
|
|
211
|
+
className={clsx(classNames.closeButton, scaleFeedbackClassName, className)}
|
|
210
212
|
{...props}
|
|
211
213
|
/>
|
|
212
214
|
);
|
|
@@ -6,6 +6,7 @@ import { Snackbar as SnackbarPrimitive } from "@seed-design/react-snackbar";
|
|
|
6
6
|
import { forwardRef } from "react";
|
|
7
7
|
import { createRecipeContext } from "../../utils/createRecipeContext";
|
|
8
8
|
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
9
|
+
import { withScaleFeedback } from "../../utils/scaleFeedback";
|
|
9
10
|
import { InternalIcon, type InternalIconProps } from "../private/Icon";
|
|
10
11
|
|
|
11
12
|
const { withContext: withRegionContext } = createRecipeContext(snackbarRegion);
|
|
@@ -69,9 +70,11 @@ export const SnackbarPrefixIcon = withContext<HTMLDivElement, SnackbarPrefixIcon
|
|
|
69
70
|
|
|
70
71
|
export interface SnackbarActionButtonProps extends SnackbarPrimitive.ActionButtonProps {}
|
|
71
72
|
|
|
72
|
-
export const SnackbarActionButton =
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
export const SnackbarActionButton = withScaleFeedback(
|
|
74
|
+
withContext<HTMLButtonElement, SnackbarActionButtonProps>(
|
|
75
|
+
SnackbarPrimitive.ActionButton,
|
|
76
|
+
"actionButton",
|
|
77
|
+
),
|
|
75
78
|
);
|
|
76
79
|
|
|
77
80
|
////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -9,6 +9,7 @@ import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
|
9
9
|
import clsx from "clsx";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
12
|
+
import { withScaleFeedback } from "../../utils/scaleFeedback";
|
|
12
13
|
|
|
13
14
|
const { withContext, useClassNames, ClassNamesProvider } = createSlotRecipeContext(menuSheet);
|
|
14
15
|
const {
|
|
@@ -263,7 +264,9 @@ export interface SwipeableMenuSheetCloseButtonProps extends Drawer.CloseButtonPr
|
|
|
263
264
|
/**
|
|
264
265
|
* Visible button that closes the swipeable menu sheet.
|
|
265
266
|
*/
|
|
266
|
-
export const SwipeableMenuSheetCloseButton =
|
|
267
|
-
HTMLButtonElement,
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
export const SwipeableMenuSheetCloseButton = withScaleFeedback(
|
|
268
|
+
withContext<HTMLButtonElement, SwipeableMenuSheetCloseButtonProps>(
|
|
269
|
+
Drawer.CloseButton,
|
|
270
|
+
"closeButton",
|
|
271
|
+
),
|
|
272
|
+
);
|
|
@@ -4,6 +4,7 @@ import { switchmark, type SwitchmarkVariantProps } from "@seed-design/css/recipe
|
|
|
4
4
|
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
5
5
|
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
6
6
|
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
7
|
+
import { withScaleFeedback } from "../../utils/scaleFeedback";
|
|
7
8
|
import React from "react";
|
|
8
9
|
import clsx from "clsx";
|
|
9
10
|
import { splitMultipleVariantsProps } from "../../utils/splitMultipleVariantsProps";
|
|
@@ -49,9 +50,8 @@ SwitchRoot.displayName = "SwitchRoot";
|
|
|
49
50
|
|
|
50
51
|
export interface SwitchControlProps extends SwitchmarkVariantProps, SwitchPrimitive.ControlProps {}
|
|
51
52
|
|
|
52
|
-
export const SwitchControl =
|
|
53
|
-
SwitchPrimitive.Control,
|
|
54
|
-
"root",
|
|
53
|
+
export const SwitchControl = withScaleFeedback(
|
|
54
|
+
withControlProvider<HTMLDivElement, SwitchControlProps>(SwitchPrimitive.Control, "root"),
|
|
55
55
|
);
|
|
56
56
|
|
|
57
57
|
////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { tabs, type TabsVariantProps } from "@seed-design/css/recipes/tabs";
|
|
2
2
|
import { Tabs as TabsPrimitive } from "@seed-design/react-tabs";
|
|
3
3
|
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
4
|
+
import { withScaleFeedback } from "../../utils/scaleFeedback";
|
|
4
5
|
|
|
5
6
|
const { withProvider, withContext } = createSlotRecipeContext(tabs);
|
|
6
7
|
|
|
@@ -20,9 +21,8 @@ export const TabsList = withContext<HTMLDivElement, TabsListProps>(TabsPrimitive
|
|
|
20
21
|
|
|
21
22
|
export interface TabsTriggerProps extends TabsPrimitive.TriggerProps {}
|
|
22
23
|
|
|
23
|
-
export const TabsTrigger =
|
|
24
|
-
TabsPrimitive.Trigger,
|
|
25
|
-
"trigger",
|
|
24
|
+
export const TabsTrigger = withScaleFeedback(
|
|
25
|
+
withContext<HTMLButtonElement, TabsTriggerProps>(TabsPrimitive.Trigger, "trigger"),
|
|
26
26
|
);
|
|
27
27
|
|
|
28
28
|
////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -2,9 +2,11 @@ import {
|
|
|
2
2
|
toggleButton,
|
|
3
3
|
type ToggleButtonVariantProps,
|
|
4
4
|
} from "@seed-design/css/recipes/toggle-button";
|
|
5
|
+
import { useComposedRefs } from "@radix-ui/react-compose-refs";
|
|
5
6
|
import { Toggle as TogglePrimitive } from "@seed-design/react-toggle";
|
|
6
7
|
import clsx from "clsx";
|
|
7
8
|
import * as React from "react";
|
|
9
|
+
import { useScaleFeedback } from "../../utils/scaleFeedback";
|
|
8
10
|
import {
|
|
9
11
|
PendingButtonProvider,
|
|
10
12
|
usePendingButton,
|
|
@@ -20,12 +22,13 @@ export const ToggleButton = React.forwardRef<HTMLButtonElement, ToggleButtonProp
|
|
|
20
22
|
({ variant = "brandSolid", size = "small", loading = false, className, ...otherProps }, ref) => {
|
|
21
23
|
const recipeClassName = toggleButton({ variant, size });
|
|
22
24
|
const api = usePendingButton({ loading, disabled: otherProps.disabled });
|
|
25
|
+
const { scaleFeedbackRef, scaleFeedbackClassName } = useScaleFeedback();
|
|
23
26
|
|
|
24
27
|
return (
|
|
25
28
|
<PendingButtonProvider value={api}>
|
|
26
29
|
<TogglePrimitive.Root
|
|
27
|
-
ref={ref}
|
|
28
|
-
className={clsx(recipeClassName, className)}
|
|
30
|
+
ref={useComposedRefs(scaleFeedbackRef, ref)}
|
|
31
|
+
className={clsx(recipeClassName, scaleFeedbackClassName, className)}
|
|
29
32
|
{...api.stateProps}
|
|
30
33
|
{...otherProps}
|
|
31
34
|
/>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export {
|
|
2
|
+
WheelPickerRoot as Root,
|
|
3
|
+
WheelPickerColumn as Column,
|
|
4
|
+
WheelPickerItemLabel as ItemLabel,
|
|
5
|
+
type WheelPickerRootProps as RootProps,
|
|
6
|
+
type WheelPickerColumnProps as ColumnProps,
|
|
7
|
+
type WheelPickerItemLabelProps as ItemLabelProps,
|
|
8
|
+
type WheelPickerOption as Option,
|
|
9
|
+
} from "./WheelPicker";
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { fireEvent, render } from "@testing-library/react";
|
|
2
|
+
import { describe, expect, it, mock, spyOn } from "bun:test";
|
|
3
|
+
import type * as React from "react";
|
|
4
|
+
import { BottomSheet } from "../BottomSheet";
|
|
5
|
+
import { WheelPicker } from "./index";
|
|
6
|
+
|
|
7
|
+
const options = [
|
|
8
|
+
{ value: "a", label: "A" },
|
|
9
|
+
{ value: "b", label: "B" },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
function fireTouchPointer(type: string, element: HTMLElement, y: number) {
|
|
13
|
+
const event = new PointerEvent(type, {
|
|
14
|
+
bubbles: true,
|
|
15
|
+
cancelable: true,
|
|
16
|
+
pointerId: 1,
|
|
17
|
+
pointerType: "touch",
|
|
18
|
+
clientX: 50,
|
|
19
|
+
clientY: y,
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(event, "pageX", { value: 50 });
|
|
22
|
+
Object.defineProperty(event, "pageY", { value: y });
|
|
23
|
+
fireEvent(element, event);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
describe("WheelPicker", () => {
|
|
27
|
+
it("공개 기본 geometry와 중립 스타일을 적용한다", () => {
|
|
28
|
+
const { container, getByRole } = render(
|
|
29
|
+
<WheelPicker.Root aria-label="휠 피커">
|
|
30
|
+
<WheelPicker.Column aria-label="문자" options={options} defaultValue="a" />
|
|
31
|
+
</WheelPicker.Root>,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
expect(getByRole("group")).toHaveStyle({
|
|
35
|
+
"--seed-wheel-picker-public-item-size": "44px",
|
|
36
|
+
"--seed-wheel-picker-public-visible-item-count": "5",
|
|
37
|
+
"--seed-wheel-picker-public-viewport-size": "220px",
|
|
38
|
+
"--seed-wheel-picker-public-center-offset": "88px",
|
|
39
|
+
"--seed-wheel-picker-public-scroll-fog-max-height": "132px",
|
|
40
|
+
});
|
|
41
|
+
expect(getByRole("group")).toHaveClass(
|
|
42
|
+
"seed-wheel-picker-public__root",
|
|
43
|
+
"seed-wheel-picker-public__root--size_medium",
|
|
44
|
+
);
|
|
45
|
+
expect(getByRole("group")).not.toHaveClass("seed-wheel-picker__root");
|
|
46
|
+
expect(container.querySelector("[data-wheel-picker-scroll-fog]")).toHaveClass(
|
|
47
|
+
"seed-wheel-picker-public__scrollFog",
|
|
48
|
+
);
|
|
49
|
+
expect(container.querySelector("[data-wheel-picker-columns]")).toHaveClass(
|
|
50
|
+
"seed-wheel-picker-public__columns",
|
|
51
|
+
);
|
|
52
|
+
expect(getByRole("spinbutton")).toHaveClass("seed-wheel-picker-public__column");
|
|
53
|
+
expect(container.querySelector('[data-wheel-picker-value="a"]')).toHaveClass(
|
|
54
|
+
"seed-wheel-picker-public__item",
|
|
55
|
+
);
|
|
56
|
+
expect(container.querySelector("[data-wheel-picker-item-label]")).toHaveClass(
|
|
57
|
+
"seed-wheel-picker-public__itemLabel",
|
|
58
|
+
);
|
|
59
|
+
expect(container.querySelector("[data-wheel-picker-indicator]")).toHaveClass(
|
|
60
|
+
"seed-wheel-picker-public__selectionIndicator",
|
|
61
|
+
);
|
|
62
|
+
const scrollFog = container.querySelector<HTMLElement>("[data-wheel-picker-scroll-fog]");
|
|
63
|
+
expect(scrollFog?.style.getPropertyValue("--scroll-fog-size-top")).toBe(
|
|
64
|
+
"var(--seed-wheel-picker-public-scroll-fog-size)",
|
|
65
|
+
);
|
|
66
|
+
expect(scrollFog?.style.getPropertyValue("--scroll-fog-size-bottom")).toBe(
|
|
67
|
+
"var(--seed-wheel-picker-public-scroll-fog-size)",
|
|
68
|
+
);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it("Small 크기의 geometry와 타이포그래피 Variant를 적용한다", () => {
|
|
72
|
+
const { container, getByRole } = render(
|
|
73
|
+
<WheelPicker.Root aria-label="작은 휠 피커" size="small">
|
|
74
|
+
<WheelPicker.Column aria-label="문자" options={options} defaultValue="a" />
|
|
75
|
+
</WheelPicker.Root>,
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
expect(getByRole("group")).toHaveStyle({
|
|
79
|
+
"--seed-wheel-picker-public-item-size": "36px",
|
|
80
|
+
"--seed-wheel-picker-public-visible-item-count": "5",
|
|
81
|
+
"--seed-wheel-picker-public-viewport-size": "180px",
|
|
82
|
+
"--seed-wheel-picker-public-center-offset": "72px",
|
|
83
|
+
"--seed-wheel-picker-public-scroll-fog-max-height": "108px",
|
|
84
|
+
});
|
|
85
|
+
expect(getByRole("group")).toHaveClass("seed-wheel-picker-public__root--size_small");
|
|
86
|
+
expect(container.querySelector("[data-wheel-picker-item-label]")).toHaveClass(
|
|
87
|
+
"seed-wheel-picker-public__itemLabel--size_small",
|
|
88
|
+
);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("itemSize를 지정하면 Size의 Item 높이와 Scroll Fog 최대 높이만 덮어쓴다", () => {
|
|
92
|
+
const { container, getByRole } = render(
|
|
93
|
+
<WheelPicker.Root
|
|
94
|
+
aria-label="사용자 지정 휠 피커"
|
|
95
|
+
size="small"
|
|
96
|
+
itemSize={56}
|
|
97
|
+
visibleItemCount={7}
|
|
98
|
+
>
|
|
99
|
+
<WheelPicker.Column aria-label="문자" options={options} defaultValue="a" />
|
|
100
|
+
</WheelPicker.Root>,
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
expect(getByRole("group")).toHaveStyle({
|
|
104
|
+
"--seed-wheel-picker-public-item-size": "56px",
|
|
105
|
+
"--seed-wheel-picker-public-visible-item-count": "7",
|
|
106
|
+
"--seed-wheel-picker-public-viewport-size": "392px",
|
|
107
|
+
"--seed-wheel-picker-public-center-offset": "168px",
|
|
108
|
+
"--seed-wheel-picker-public-scroll-fog-max-height": "168px",
|
|
109
|
+
});
|
|
110
|
+
expect(container.querySelector("[data-wheel-picker-item-label]")).toHaveClass(
|
|
111
|
+
"seed-wheel-picker-public__itemLabel--size_small",
|
|
112
|
+
);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
it("Item을 9개 표시해도 Scroll Fog 최대 높이는 Item 3개 높이로 유지한다", () => {
|
|
116
|
+
const { getByRole } = render(
|
|
117
|
+
<WheelPicker.Root aria-label="긴 휠 피커" visibleItemCount={9}>
|
|
118
|
+
<WheelPicker.Column aria-label="문자" options={options} defaultValue="a" />
|
|
119
|
+
</WheelPicker.Root>,
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
expect(getByRole("group")).toHaveStyle({
|
|
123
|
+
"--seed-wheel-picker-public-viewport-size": "396px",
|
|
124
|
+
"--seed-wheel-picker-public-scroll-fog-max-height": "132px",
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
it("Root와 Column의 className을 허용한다", () => {
|
|
129
|
+
const { getByRole } = render(
|
|
130
|
+
<WheelPicker.Root aria-label="휠 피커" className="custom-root">
|
|
131
|
+
<WheelPicker.Column aria-label="문자" options={options} className="custom-column" />
|
|
132
|
+
</WheelPicker.Root>,
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
expect(getByRole("group")).toHaveClass("custom-root");
|
|
136
|
+
expect(getByRole("spinbutton")).toHaveClass("custom-column");
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it("renderLabel로 기본 ItemLabel을 대체한다", () => {
|
|
140
|
+
const { container, getByText } = render(
|
|
141
|
+
<WheelPicker.Root aria-label="휠 피커" itemSize={56}>
|
|
142
|
+
<WheelPicker.Column
|
|
143
|
+
aria-label="문자"
|
|
144
|
+
options={options}
|
|
145
|
+
renderLabel={(option) => <span data-custom-label="">{option.label}</span>}
|
|
146
|
+
/>
|
|
147
|
+
</WheelPicker.Root>,
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
expect(getByText("A")).toHaveAttribute("data-custom-label");
|
|
151
|
+
expect(getByText("A").parentElement).toHaveClass("seed-wheel-picker-public__item");
|
|
152
|
+
expect(container.querySelector("[data-wheel-picker-item-label]")).not.toBeInTheDocument();
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
it("renderLabel에서 공개 ItemLabel을 재사용한다", () => {
|
|
156
|
+
const { getByText } = render(
|
|
157
|
+
<WheelPicker.Root aria-label="휠 피커">
|
|
158
|
+
<WheelPicker.Column
|
|
159
|
+
aria-label="문자"
|
|
160
|
+
options={options}
|
|
161
|
+
renderLabel={(option) => (
|
|
162
|
+
<WheelPicker.ItemLabel data-reused-label="">{option.label}</WheelPicker.ItemLabel>
|
|
163
|
+
)}
|
|
164
|
+
/>
|
|
165
|
+
</WheelPicker.Root>,
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
expect(getByText("A")).toHaveClass("seed-wheel-picker-public__itemLabel");
|
|
169
|
+
expect(getByText("A")).toHaveAttribute("data-wheel-picker-item-label");
|
|
170
|
+
expect(getByText("A")).toHaveAttribute("data-reused-label");
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it("option의 ariaLabel을 기본 접근성 텍스트로 사용한다", () => {
|
|
174
|
+
const { getByRole } = render(
|
|
175
|
+
<WheelPicker.Root aria-label="배지 선택">
|
|
176
|
+
<WheelPicker.Column
|
|
177
|
+
aria-label="배지"
|
|
178
|
+
options={[{ value: "popular", label: <span>◆ 인기</span>, ariaLabel: "인기" }]}
|
|
179
|
+
/>
|
|
180
|
+
</WheelPicker.Root>,
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
expect(getByRole("spinbutton", { name: "배지" })).toHaveAttribute("aria-valuetext", "인기");
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
it("숫자 label을 기본 접근성 텍스트로 변환한다", () => {
|
|
187
|
+
const { getByRole } = render(
|
|
188
|
+
<WheelPicker.Root aria-label="수량 선택">
|
|
189
|
+
<WheelPicker.Column aria-label="수량" options={[{ value: "one", label: 1 }]} />
|
|
190
|
+
</WheelPicker.Root>,
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
expect(getByRole("spinbutton", { name: "수량" })).toHaveAttribute("aria-valuetext", "1");
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
it("Root의 disabled 상태를 Column과 Item에 전파한다", () => {
|
|
197
|
+
const { container, getByRole } = render(
|
|
198
|
+
<WheelPicker.Root aria-label="비활성 휠 피커" disabled>
|
|
199
|
+
<WheelPicker.Column aria-label="문자" options={options} defaultValue="a" />
|
|
200
|
+
</WheelPicker.Root>,
|
|
201
|
+
);
|
|
202
|
+
|
|
203
|
+
expect(getByRole("group")).toHaveAttribute("data-disabled");
|
|
204
|
+
expect(getByRole("spinbutton")).toHaveAttribute("data-disabled");
|
|
205
|
+
expect(getByRole("spinbutton")).toHaveAttribute("aria-disabled", "true");
|
|
206
|
+
expect(container.querySelector('[data-wheel-picker-value="a"]')).toHaveAttribute(
|
|
207
|
+
"data-selected",
|
|
208
|
+
);
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
it("지원하지 않는 readOnly 값이 런타임에 전달되어도 읽기 전용으로 동작하지 않는다", () => {
|
|
212
|
+
const RootWithLegacyReadOnly = WheelPicker.Root as React.ComponentType<
|
|
213
|
+
WheelPicker.RootProps & { readOnly?: boolean }
|
|
214
|
+
>;
|
|
215
|
+
const { getByRole } = render(
|
|
216
|
+
<RootWithLegacyReadOnly aria-label="휠 피커" readOnly>
|
|
217
|
+
<WheelPicker.Column aria-label="문자" options={options} defaultValue="a" />
|
|
218
|
+
</RootWithLegacyReadOnly>,
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
expect(getByRole("group")).not.toHaveAttribute("data-readonly");
|
|
222
|
+
expect(getByRole("spinbutton")).not.toHaveAttribute("aria-readonly");
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
it("BottomSheet 안에서 컬럼을 스크롤할 때 시트 드래그를 시작하지 않는다", () => {
|
|
226
|
+
const originalSetPointerCapture = HTMLElement.prototype.setPointerCapture;
|
|
227
|
+
HTMLElement.prototype.setPointerCapture = mock(() => {});
|
|
228
|
+
|
|
229
|
+
try {
|
|
230
|
+
const { container, getByRole } = render(
|
|
231
|
+
<BottomSheet.Root defaultOpen modal={false} autoFocus={false} skipAnimation>
|
|
232
|
+
<BottomSheet.Content>
|
|
233
|
+
<BottomSheet.Title>값 선택</BottomSheet.Title>
|
|
234
|
+
<BottomSheet.Description>원하는 값을 선택하세요.</BottomSheet.Description>
|
|
235
|
+
<WheelPicker.Root aria-label="휠 피커">
|
|
236
|
+
<WheelPicker.Column aria-label="문자" options={options} defaultValue="b" />
|
|
237
|
+
</WheelPicker.Root>
|
|
238
|
+
</BottomSheet.Content>
|
|
239
|
+
</BottomSheet.Root>,
|
|
240
|
+
);
|
|
241
|
+
const content = container.ownerDocument.querySelector("[data-drawer]") as HTMLElement;
|
|
242
|
+
const column = getByRole("spinbutton");
|
|
243
|
+
|
|
244
|
+
content.style.transform = "matrix(1, 0, 0, 1, 0, 0)";
|
|
245
|
+
spyOn(content, "getBoundingClientRect").mockReturnValue({
|
|
246
|
+
x: 0,
|
|
247
|
+
y: 0,
|
|
248
|
+
width: 320,
|
|
249
|
+
height: 400,
|
|
250
|
+
top: 0,
|
|
251
|
+
left: 0,
|
|
252
|
+
right: 320,
|
|
253
|
+
bottom: 400,
|
|
254
|
+
toJSON: () => {},
|
|
255
|
+
});
|
|
256
|
+
Object.defineProperties(column, {
|
|
257
|
+
clientHeight: { value: 220, configurable: true },
|
|
258
|
+
scrollHeight: { value: 440, configurable: true },
|
|
259
|
+
});
|
|
260
|
+
column.scrollTop = 44;
|
|
261
|
+
|
|
262
|
+
fireTouchPointer("pointerdown", column, 100);
|
|
263
|
+
fireTouchPointer("pointermove", column, 130);
|
|
264
|
+
|
|
265
|
+
expect(content.style.transform).toBe("matrix(1, 0, 0, 1, 0, 0)");
|
|
266
|
+
} finally {
|
|
267
|
+
HTMLElement.prototype.setPointerCapture = originalSetPointerCapture;
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
});
|