react-panel-layout 0.6.0 → 0.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/dist/{FloatingPanelFrame-SgYLc6Ud.js → FloatingPanelFrame-3eU9AwPo.js} +2 -2
- package/dist/{FloatingPanelFrame-SgYLc6Ud.js.map → FloatingPanelFrame-3eU9AwPo.js.map} +1 -1
- package/dist/FloatingWindow-Bw2djgpz.js +1542 -0
- package/dist/FloatingWindow-Bw2djgpz.js.map +1 -0
- package/dist/FloatingWindow-Cvyokf0m.cjs +2 -0
- package/dist/FloatingWindow-Cvyokf0m.cjs.map +1 -0
- package/dist/GridLayout-B4aCqSyd.js +947 -0
- package/dist/{GridLayout-BltqeCPK.js.map → GridLayout-B4aCqSyd.js.map} +1 -1
- package/dist/GridLayout-DNOClFzz.cjs +2 -0
- package/dist/{GridLayout-B4VRsC0r.cjs.map → GridLayout-DNOClFzz.cjs.map} +1 -1
- package/dist/{HorizontalDivider-WF1k_qND.js → HorizontalDivider-DdxzfV0l.js} +3 -3
- package/dist/{HorizontalDivider-WF1k_qND.js.map → HorizontalDivider-DdxzfV0l.js.map} +1 -1
- package/dist/{HorizontalDivider-B5Z-KZLk.cjs → HorizontalDivider-_pgV4Mcv.cjs} +2 -2
- package/dist/{HorizontalDivider-B5Z-KZLk.cjs.map → HorizontalDivider-_pgV4Mcv.cjs.map} +1 -1
- package/dist/PanelSystem-B8Igvnb2.cjs +3 -0
- package/dist/PanelSystem-B8Igvnb2.cjs.map +1 -0
- package/dist/{PanelSystem-Dr1TBhxM.js → PanelSystem-DDUSFjXD.js} +209 -248
- package/dist/PanelSystem-DDUSFjXD.js.map +1 -0
- package/dist/ResizeHandle-CBcAS918.cjs +2 -0
- package/dist/{ResizeHandle-CScipO5l.cjs.map → ResizeHandle-CBcAS918.cjs.map} +1 -1
- package/dist/{ResizeHandle-CdA_JYfN.js → ResizeHandle-CXjc1meV.js} +28 -29
- package/dist/{ResizeHandle-CdA_JYfN.js.map → ResizeHandle-CXjc1meV.js.map} +1 -1
- package/dist/SwipePivotTabBar-DWrCuwEI.js +411 -0
- package/dist/SwipePivotTabBar-DWrCuwEI.js.map +1 -0
- package/dist/SwipePivotTabBar-fjjXkpj7.cjs +2 -0
- package/dist/SwipePivotTabBar-fjjXkpj7.cjs.map +1 -0
- package/dist/components/gesture/SwipeSafeZone.d.ts +40 -0
- package/dist/components/window/Drawer.d.ts +4 -1
- package/dist/components/window/DrawerLayers.d.ts +1 -1
- package/dist/components/window/DrawerRevealContext.d.ts +61 -0
- package/dist/components/window/drawerRevealAnimationUtils.d.ts +212 -0
- package/dist/components/window/drawerStyles.d.ts +74 -0
- package/dist/components/window/drawerSwipeConfig.d.ts +29 -0
- package/dist/components/window/useDrawerSwipeTransform.d.ts +29 -0
- package/dist/components/window/useDrawerTransform.d.ts +68 -0
- package/dist/components/window/useRevealDrawerTransform.d.ts +56 -0
- package/dist/config.cjs +1 -1
- package/dist/config.cjs.map +1 -1
- package/dist/config.js +9 -8
- package/dist/config.js.map +1 -1
- package/dist/constants/styles.d.ts +17 -0
- package/dist/dialog/index.d.ts +69 -0
- package/dist/floating.js +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/grid.js +2 -2
- package/dist/hooks/gesture/testing/createGestureSimulator.d.ts +7 -0
- package/dist/hooks/gesture/types.d.ts +48 -5
- package/dist/hooks/gesture/utils.d.ts +19 -0
- package/dist/hooks/useAnimationFrame.d.ts +2 -0
- package/dist/hooks/useOperationContinuity.d.ts +64 -0
- package/dist/hooks/useResizeObserver.d.ts +33 -1
- package/dist/hooks/useSharedElementTransition.d.ts +112 -0
- package/dist/hooks/useSwipeContentTransform.d.ts +9 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +7 -7
- package/dist/modules/dialog/AlertDialog.d.ts +9 -0
- package/dist/modules/dialog/DialogContainer.d.ts +37 -0
- package/dist/modules/dialog/Modal.d.ts +26 -0
- package/dist/modules/dialog/SwipeDialogContainer.d.ts +16 -0
- package/dist/modules/dialog/dialogAnimationUtils.d.ts +113 -0
- package/dist/modules/dialog/types.d.ts +183 -0
- package/dist/modules/dialog/useDialog.d.ts +39 -0
- package/dist/modules/dialog/useDialogContainer.d.ts +47 -0
- package/dist/modules/dialog/useDialogSwipeInput.d.ts +70 -0
- package/dist/modules/dialog/useDialogTransform.d.ts +82 -0
- package/dist/modules/drawer/drawerStateMachine.d.ts +168 -0
- package/dist/modules/drawer/revealDrawerConstants.d.ts +33 -0
- package/dist/modules/drawer/revealDrawerStateMachine.d.ts +146 -0
- package/dist/modules/drawer/strategies/index.d.ts +8 -0
- package/dist/modules/drawer/strategies/overlayStrategy.d.ts +12 -0
- package/dist/modules/drawer/strategies/revealStrategy.d.ts +12 -0
- package/dist/modules/drawer/strategies/types.d.ts +116 -0
- package/dist/modules/drawer/types.d.ts +74 -0
- package/dist/modules/drawer/useDrawerSwipeInput.d.ts +24 -0
- package/dist/modules/pivot/SwipePivotTabBar.d.ts +3 -0
- package/dist/modules/stack/SwipeStackContent.d.ts +6 -3
- package/dist/modules/stack/SwipeStackOutlet.d.ts +4 -4
- package/dist/modules/stack/computeSwipeStackTransform.d.ts +1 -1
- package/dist/panels.cjs +1 -1
- package/dist/panels.js +1 -1
- package/dist/pivot.cjs +1 -1
- package/dist/pivot.js +1 -1
- package/dist/resizer.cjs +1 -1
- package/dist/resizer.js +2 -2
- package/dist/stack.cjs +1 -1
- package/dist/stack.cjs.map +1 -1
- package/dist/stack.js +480 -780
- package/dist/stack.js.map +1 -1
- package/dist/sticky-header/calculateStickyMetrics.d.ts +28 -0
- package/dist/sticky-header.cjs +1 -1
- package/dist/sticky-header.cjs.map +1 -1
- package/dist/sticky-header.js +59 -51
- package/dist/sticky-header.js.map +1 -1
- package/dist/{styles-DPPuJ0sf.js → styles-NkjuMOVS.js} +13 -13
- package/dist/{styles-DPPuJ0sf.js.map → styles-NkjuMOVS.js.map} +1 -1
- package/dist/styles-qf6ptVLD.cjs.map +1 -1
- package/dist/types.d.ts +30 -0
- package/dist/useAnimationFrame-BZ6D2lMq.cjs +2 -0
- package/dist/useAnimationFrame-BZ6D2lMq.cjs.map +1 -0
- package/dist/useAnimationFrame-Bg4e-H8O.js +394 -0
- package/dist/useAnimationFrame-Bg4e-H8O.js.map +1 -0
- package/dist/useDocumentPointerEvents-DXxw3qWj.js +54 -0
- package/dist/useDocumentPointerEvents-DXxw3qWj.js.map +1 -0
- package/dist/useDocumentPointerEvents-DxDSOtip.cjs +2 -0
- package/dist/useDocumentPointerEvents-DxDSOtip.cjs.map +1 -0
- package/dist/window/index.d.ts +2 -0
- package/dist/window.cjs +1 -1
- package/dist/window.cjs.map +1 -1
- package/dist/window.js +114 -103
- package/dist/window.js.map +1 -1
- package/package.json +6 -1
- package/src/components/gesture/SwipeSafeZone.tsx +70 -0
- package/src/components/grid/GridLayout.tsx +110 -38
- package/src/components/window/Drawer.tsx +353 -162
- package/src/components/window/DrawerLayers.tsx +54 -11
- package/src/components/window/DrawerRevealContext.spec.ts +20 -0
- package/src/components/window/DrawerRevealContext.tsx +99 -0
- package/src/components/window/drawerRevealAnimationUtils.spec.ts +375 -0
- package/src/components/window/drawerRevealAnimationUtils.ts +415 -0
- package/src/components/window/drawerStyles.spec.ts +302 -0
- package/src/components/window/drawerStyles.ts +252 -0
- package/src/components/window/drawerSwipeConfig.spec.ts +131 -0
- package/src/components/window/drawerSwipeConfig.ts +112 -0
- package/src/components/window/useDrawerSwipeTransform.ts +67 -0
- package/src/components/window/useDrawerTransform.ts +505 -0
- package/src/components/window/useRevealDrawerTransform.spec.ts +1936 -0
- package/src/components/window/useRevealDrawerTransform.ts +105 -0
- package/src/constants/styles.ts +19 -0
- package/src/demo/components/FullscreenDemoPage.tsx +47 -0
- package/src/demo/fullscreenRoutes.tsx +32 -0
- package/src/demo/index.tsx +5 -0
- package/src/demo/pages/Dialog/alerts/index.tsx +22 -0
- package/src/demo/pages/Dialog/card/index.tsx +22 -0
- package/src/demo/pages/Dialog/components/AlertDialogDemo.tsx +124 -0
- package/src/demo/pages/Dialog/components/CardExpandDemo.module.css +243 -0
- package/src/demo/pages/Dialog/components/CardExpandDemo.tsx +219 -0
- package/src/demo/pages/Dialog/components/CustomAlertDialogDemo.tsx +219 -0
- package/src/demo/pages/Dialog/components/DialogDemos.module.css +77 -0
- package/src/demo/pages/Dialog/components/ModalBasics.tsx +45 -0
- package/src/demo/pages/Dialog/components/SwipeDialogDemo.module.css +77 -0
- package/src/demo/pages/Dialog/components/SwipeDialogDemo.tsx +181 -0
- package/src/demo/pages/Dialog/custom-alert/index.tsx +22 -0
- package/src/demo/pages/Dialog/modal/index.tsx +17 -0
- package/src/demo/pages/Dialog/swipe/index.tsx +22 -0
- package/src/demo/pages/Drawer/components/DrawerBasics.module.css +6 -1
- package/src/demo/pages/Drawer/components/DrawerBasics.tsx +14 -4
- package/src/demo/pages/Drawer/components/DrawerReveal.module.css +157 -0
- package/src/demo/pages/Drawer/components/DrawerReveal.tsx +128 -0
- package/src/demo/pages/Drawer/components/DrawerSwipe.module.css +316 -0
- package/src/demo/pages/Drawer/components/DrawerSwipe.tsx +178 -0
- package/src/demo/pages/Drawer/reveal/index.tsx +17 -0
- package/src/demo/pages/Drawer/reveal-fullscreen/index.tsx +135 -0
- package/src/demo/pages/Drawer/reveal-fullscreen/styles.module.css +233 -0
- package/src/demo/pages/Drawer/swipe/index.tsx +17 -0
- package/src/demo/pages/Pivot/components/SwipeTabsPivot.tsx +54 -23
- package/src/demo/pages/Pivot/swipe-debug/index.tsx +1 -1
- package/src/demo/pages/Stack/components/StackBasics.spec.tsx +156 -0
- package/src/demo/pages/Stack/components/StackBasics.tsx +179 -95
- package/src/demo/pages/Stack/components/StackTablet.spec.tsx +110 -0
- package/src/demo/pages/Stack/components/StackTablet.tsx +42 -21
- package/src/demo/routes.tsx +24 -1
- package/src/dialog/index.ts +85 -0
- package/src/hooks/gesture/testing/createGestureSimulator.spec.ts +68 -64
- package/src/hooks/gesture/testing/createGestureSimulator.ts +113 -37
- package/src/hooks/gesture/types.ts +83 -6
- package/src/hooks/gesture/useEdgeSwipeInput.spec.ts +22 -14
- package/src/hooks/gesture/useNativeGestureGuard.spec.ts +99 -31
- package/src/hooks/gesture/useNativeGestureGuard.ts +3 -1
- package/src/hooks/gesture/utils.ts +102 -0
- package/src/hooks/useAnimatedVisibility.spec.ts +44 -24
- package/src/hooks/useAnimatedVisibility.ts +28 -2
- package/src/hooks/useAnimationFrame.ts +8 -0
- package/src/hooks/useOperationContinuity.spec.ts +394 -0
- package/src/hooks/useOperationContinuity.ts +135 -0
- package/src/hooks/useResizeObserver.spec.tsx +277 -0
- package/src/hooks/useResizeObserver.tsx +108 -39
- package/src/hooks/useScrollContainer.ts +4 -10
- package/src/hooks/useSharedElementTransition.ts +354 -0
- package/src/hooks/useSwipeContentTransform.spec.ts +18 -18
- package/src/hooks/useSwipeContentTransform.ts +166 -28
- package/src/modules/dialog/AlertDialog.spec.tsx +387 -0
- package/src/modules/dialog/AlertDialog.tsx +221 -0
- package/src/modules/dialog/DialogContainer.spec.tsx +228 -0
- package/src/modules/dialog/DialogContainer.tsx +188 -0
- package/src/modules/dialog/Modal.spec.tsx +220 -0
- package/src/modules/dialog/Modal.tsx +182 -0
- package/src/modules/dialog/SwipeDialogContainer.tsx +208 -0
- package/src/modules/dialog/dialogAnimationUtils.spec.ts +252 -0
- package/src/modules/dialog/dialogAnimationUtils.ts +297 -0
- package/src/modules/dialog/types.ts +186 -0
- package/src/modules/dialog/useDialog.spec.tsx +447 -0
- package/src/modules/dialog/useDialog.ts +214 -0
- package/src/modules/dialog/useDialogContainer.spec.ts +339 -0
- package/src/modules/dialog/useDialogContainer.ts +150 -0
- package/src/modules/dialog/useDialogSwipeInput.spec.ts +178 -0
- package/src/modules/dialog/useDialogSwipeInput.ts +350 -0
- package/src/modules/dialog/useDialogTransform.spec.ts +403 -0
- package/src/modules/dialog/useDialogTransform.ts +407 -0
- package/src/modules/drawer/drawerStateMachine.ts +500 -0
- package/src/modules/drawer/revealDrawerConstants.ts +38 -0
- package/src/modules/drawer/revealDrawerStateMachine.spec.ts +558 -0
- package/src/modules/drawer/revealDrawerStateMachine.ts +197 -0
- package/src/modules/drawer/strategies/index.ts +9 -0
- package/src/modules/drawer/strategies/overlayStrategy.ts +133 -0
- package/src/modules/drawer/strategies/revealStrategy.ts +111 -0
- package/src/modules/drawer/strategies/types.ts +160 -0
- package/src/modules/drawer/types.ts +102 -0
- package/src/modules/drawer/useDrawerSwipeInput.spec.ts +566 -0
- package/src/modules/drawer/useDrawerSwipeInput.ts +402 -0
- package/src/modules/panels/rendering/ContentRegistry.spec.tsx +21 -14
- package/src/modules/pivot/SwipePivotContent.position.spec.tsx +12 -8
- package/src/modules/pivot/SwipePivotContent.spec.tsx +66 -25
- package/src/modules/pivot/SwipePivotContent.tsx +2 -2
- package/src/modules/pivot/SwipePivotTabBar.spec.tsx +85 -68
- package/src/modules/pivot/SwipePivotTabBar.tsx +75 -15
- package/src/modules/pivot/scaleInputState.spec.ts +11 -2
- package/src/modules/pivot/usePivot.spec.ts +17 -3
- package/src/modules/pivot/usePivotSwipeInput.spec.ts +182 -123
- package/src/modules/stack/SwipeStackContent.spec.tsx +387 -100
- package/src/modules/stack/SwipeStackContent.tsx +43 -33
- package/src/modules/stack/SwipeStackOutlet.spec.tsx +14 -16
- package/src/modules/stack/SwipeStackOutlet.tsx +6 -6
- package/src/modules/stack/computeSwipeStackTransform.spec.ts +5 -5
- package/src/modules/stack/computeSwipeStackTransform.ts +3 -3
- package/src/modules/stack/swipeTransitionContinuity.spec.tsx +1133 -0
- package/src/modules/stack/useStackAnimationState.spec.ts +3 -1
- package/src/modules/stack/useStackAnimationState.ts +18 -13
- package/src/modules/stack/useStackNavigation.spec.ts +198 -3
- package/src/modules/stack/useStackNavigation.tsx +113 -56
- package/src/modules/stack/useStackSwipeInput.spec.ts +65 -32
- package/src/modules/stack/useStackSwipeInput.ts +1 -1
- package/src/sticky-header/StickyArea.tsx +29 -57
- package/src/sticky-header/calculateStickyMetrics.spec.ts +105 -0
- package/src/sticky-header/calculateStickyMetrics.ts +50 -0
- package/src/types.ts +33 -0
- package/src/window/index.ts +2 -0
- package/dist/FloatingWindow-BpdOpg_L.js +0 -400
- package/dist/FloatingWindow-BpdOpg_L.js.map +0 -1
- package/dist/FloatingWindow-TCDNY5gE.cjs +0 -2
- package/dist/FloatingWindow-TCDNY5gE.cjs.map +0 -1
- package/dist/GridLayout-B4VRsC0r.cjs +0 -2
- package/dist/GridLayout-BltqeCPK.js +0 -927
- package/dist/PanelSystem-Bs8bQwQF.cjs +0 -3
- package/dist/PanelSystem-Bs8bQwQF.cjs.map +0 -1
- package/dist/PanelSystem-Dr1TBhxM.js.map +0 -1
- package/dist/ResizeHandle-CScipO5l.cjs +0 -2
- package/dist/SwipePivotTabBar-BGO9X94m.js +0 -407
- package/dist/SwipePivotTabBar-BGO9X94m.js.map +0 -1
- package/dist/SwipePivotTabBar-BrQismcZ.cjs +0 -2
- package/dist/SwipePivotTabBar-BrQismcZ.cjs.map +0 -1
- package/dist/useDocumentPointerEvents-CKdhGXd0.js +0 -46
- package/dist/useDocumentPointerEvents-CKdhGXd0.js.map +0 -1
- package/dist/useDocumentPointerEvents-ChqrKXDk.cjs +0 -2
- package/dist/useDocumentPointerEvents-ChqrKXDk.cjs.map +0 -1
- package/dist/useEffectEvent-Dp7HLCf0.js +0 -13
- package/dist/useEffectEvent-Dp7HLCf0.js.map +0 -1
- package/dist/useEffectEvent-huSsGUnl.cjs +0 -2
- package/dist/useEffectEvent-huSsGUnl.cjs.map +0 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Hook for managing reveal-mode drawer transform (backward-compatible wrapper).
|
|
3
|
+
*
|
|
4
|
+
* This hook is a thin wrapper around useDrawerTransform with mode="reveal".
|
|
5
|
+
* For new code, prefer using useDrawerTransform directly.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated Use useDrawerTransform with mode="reveal" instead.
|
|
8
|
+
*/
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import type { ContinuousOperationState } from "../../hooks/gesture/types.js";
|
|
11
|
+
import type { DrawerPlacement } from "./drawerStyles.js";
|
|
12
|
+
import {
|
|
13
|
+
useDrawerTransform,
|
|
14
|
+
type DrawerAnimationPhase,
|
|
15
|
+
type UseDrawerTransformResult,
|
|
16
|
+
} from "./useDrawerTransform.js";
|
|
17
|
+
import { getContentElement } from "./drawerRevealAnimationUtils.js";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Phase of reveal drawer animation lifecycle.
|
|
21
|
+
* @deprecated Use DrawerAnimationPhase from useDrawerTransform.ts
|
|
22
|
+
*/
|
|
23
|
+
export type RevealDrawerAnimationPhase = DrawerAnimationPhase;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Options for useRevealDrawerTransform hook.
|
|
27
|
+
*/
|
|
28
|
+
export type UseRevealDrawerTransformOptions = {
|
|
29
|
+
/** Ref to the drawer element */
|
|
30
|
+
drawerRef: React.RefObject<HTMLElement | null>;
|
|
31
|
+
/** Drawer placement */
|
|
32
|
+
placement: DrawerPlacement;
|
|
33
|
+
/** Drawer size in pixels */
|
|
34
|
+
drawerSize: number;
|
|
35
|
+
/** Whether the drawer is open */
|
|
36
|
+
isOpen: boolean;
|
|
37
|
+
/** Current swipe state */
|
|
38
|
+
swipeState: ContinuousOperationState;
|
|
39
|
+
/** Current swipe displacement */
|
|
40
|
+
displacement: number;
|
|
41
|
+
/** Whether opening via swipe */
|
|
42
|
+
isOpening: boolean;
|
|
43
|
+
/** Whether closing via swipe */
|
|
44
|
+
isClosing: boolean;
|
|
45
|
+
/** Whether this hook is enabled */
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
/** Whether drawer is inline (affects target element) */
|
|
48
|
+
inline: boolean;
|
|
49
|
+
/** Grid container ref for inline mode */
|
|
50
|
+
gridRef?: React.RefObject<HTMLElement | null>;
|
|
51
|
+
/** Content background color for stacking context */
|
|
52
|
+
contentBackground?: string;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Result from useRevealDrawerTransform hook.
|
|
57
|
+
*/
|
|
58
|
+
export type UseRevealDrawerTransformResult = UseDrawerTransformResult;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Hook for managing reveal-mode drawer transform.
|
|
62
|
+
*
|
|
63
|
+
* @deprecated Use useDrawerTransform with mode="reveal" instead.
|
|
64
|
+
*/
|
|
65
|
+
export function useRevealDrawerTransform(
|
|
66
|
+
options: UseRevealDrawerTransformOptions,
|
|
67
|
+
): UseRevealDrawerTransformResult {
|
|
68
|
+
const {
|
|
69
|
+
drawerRef,
|
|
70
|
+
placement,
|
|
71
|
+
drawerSize,
|
|
72
|
+
isOpen,
|
|
73
|
+
swipeState,
|
|
74
|
+
displacement,
|
|
75
|
+
isOpening,
|
|
76
|
+
isClosing,
|
|
77
|
+
enabled,
|
|
78
|
+
inline,
|
|
79
|
+
gridRef,
|
|
80
|
+
contentBackground = "#fff",
|
|
81
|
+
} = options;
|
|
82
|
+
|
|
83
|
+
// Create a content ref that resolves the content element
|
|
84
|
+
const contentRef = React.useRef<HTMLElement | null>(null);
|
|
85
|
+
React.useLayoutEffect(() => {
|
|
86
|
+
contentRef.current = getContentElement(inline, gridRef);
|
|
87
|
+
}, [inline, gridRef]);
|
|
88
|
+
|
|
89
|
+
return useDrawerTransform({
|
|
90
|
+
mode: "reveal",
|
|
91
|
+
drawerRef,
|
|
92
|
+
contentRef,
|
|
93
|
+
placement,
|
|
94
|
+
drawerSize,
|
|
95
|
+
isOpen,
|
|
96
|
+
swipeState,
|
|
97
|
+
displacement,
|
|
98
|
+
isOpening,
|
|
99
|
+
isClosing,
|
|
100
|
+
enabled,
|
|
101
|
+
inline,
|
|
102
|
+
gridRef,
|
|
103
|
+
contentBackground,
|
|
104
|
+
});
|
|
105
|
+
}
|
package/src/constants/styles.ts
CHANGED
|
@@ -259,3 +259,22 @@ export const SPLIT_HANDLE_THICKNESS = SIZE_SPLIT_HANDLE_THICKNESS;
|
|
|
259
259
|
*/
|
|
260
260
|
export const HORIZONTAL_DIVIDER_WIDTH = "var(--rpl-size-horizontal-divider-width, 4px)";
|
|
261
261
|
export const HORIZONTAL_DIVIDER_HIT_AREA_OFFSET = "var(--rpl-space-horizontal-divider-hit-area-offset, 4px)";
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Modal
|
|
265
|
+
*/
|
|
266
|
+
export const COLOR_MODAL_BACKDROP = "var(--rpl-color-modal-backdrop, rgba(0, 0, 0, 0.5))";
|
|
267
|
+
export const MODAL_TRANSITION_DURATION = "var(--rpl-modal-transition-duration, 200ms)";
|
|
268
|
+
export const MODAL_TRANSITION_EASING = "var(--rpl-modal-transition-easing, ease-out)";
|
|
269
|
+
export const MODAL_MIN_WIDTH = "var(--rpl-modal-min-width, 280px)";
|
|
270
|
+
export const MODAL_MAX_WIDTH = "var(--rpl-modal-max-width, 90vw)";
|
|
271
|
+
export const MODAL_MAX_HEIGHT = "var(--rpl-modal-max-height, 85vh)";
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Alert Dialog
|
|
275
|
+
*/
|
|
276
|
+
export const ALERT_DIALOG_WIDTH = "var(--rpl-alert-dialog-width, 320px)";
|
|
277
|
+
export const ALERT_DIALOG_BUTTON_GAP = "var(--rpl-alert-dialog-button-gap, 8px)";
|
|
278
|
+
export const ALERT_DIALOG_ACTIONS_PADDING = "var(--rpl-alert-dialog-actions-padding, 12px)";
|
|
279
|
+
export const ALERT_DIALOG_MESSAGE_PADDING = "var(--rpl-alert-dialog-message-padding, 16px)";
|
|
280
|
+
export const ALERT_DIALOG_INPUT_MARGIN_TOP = "var(--rpl-alert-dialog-input-margin-top, 12px)";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Fullscreen demo page wrapper
|
|
3
|
+
*
|
|
4
|
+
* Renders fullscreen demos by ID from the route parameter.
|
|
5
|
+
*/
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { useParams, Link } from "react-router";
|
|
8
|
+
import { getFullscreenDemo } from "../fullscreenRoutes";
|
|
9
|
+
|
|
10
|
+
export const FullscreenDemoPage: React.FC = () => {
|
|
11
|
+
const { id } = useParams<{ id: string }>();
|
|
12
|
+
const demo = id ? getFullscreenDemo(id) : undefined;
|
|
13
|
+
|
|
14
|
+
if (!demo) {
|
|
15
|
+
return (
|
|
16
|
+
<div style={{
|
|
17
|
+
display: "flex",
|
|
18
|
+
flexDirection: "column",
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
height: "100vh",
|
|
22
|
+
gap: "16px",
|
|
23
|
+
fontFamily: "system-ui, sans-serif",
|
|
24
|
+
}}>
|
|
25
|
+
<h1>Demo not found</h1>
|
|
26
|
+
<p>The fullscreen demo "{id}" does not exist.</p>
|
|
27
|
+
<Link to="/" style={{ color: "#1d9bf0" }}>Go back home</Link>
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<React.Suspense fallback={
|
|
34
|
+
<div style={{
|
|
35
|
+
display: "flex",
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
justifyContent: "center",
|
|
38
|
+
height: "100vh",
|
|
39
|
+
fontFamily: "system-ui, sans-serif",
|
|
40
|
+
}}>
|
|
41
|
+
Loading...
|
|
42
|
+
</div>
|
|
43
|
+
}>
|
|
44
|
+
{demo.element}
|
|
45
|
+
</React.Suspense>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Fullscreen demo route configuration
|
|
3
|
+
*
|
|
4
|
+
* Demos that need to be rendered outside the main Layout
|
|
5
|
+
* (e.g., reveal-mode drawer that transforms the body).
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
|
|
9
|
+
export type FullscreenDemo = {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
element: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// Lazy load fullscreen demos
|
|
16
|
+
// eslint-disable-next-line no-restricted-syntax -- dynamic import required for lazy loading
|
|
17
|
+
const DrawerRevealFullscreen = React.lazy(() => import("./pages/Drawer/reveal-fullscreen"));
|
|
18
|
+
|
|
19
|
+
export const fullscreenDemos: Record<string, FullscreenDemo> = {
|
|
20
|
+
"drawer-reveal": {
|
|
21
|
+
id: "drawer-reveal",
|
|
22
|
+
label: "Drawer Reveal Mode",
|
|
23
|
+
element: <DrawerRevealFullscreen />,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Get a fullscreen demo by ID.
|
|
29
|
+
*/
|
|
30
|
+
export function getFullscreenDemo(id: string): FullscreenDemo | undefined {
|
|
31
|
+
return fullscreenDemos[id];
|
|
32
|
+
}
|
package/src/demo/index.tsx
CHANGED
|
@@ -8,6 +8,7 @@ import { HashRouter, Routes, Route, Outlet, Link } from "react-router";
|
|
|
8
8
|
import { Layout } from "./Layout";
|
|
9
9
|
import { PanelLayoutDemo } from "./pages/PanelLayout/PanelLayoutDemo";
|
|
10
10
|
import { demoCategories } from "./routes";
|
|
11
|
+
import { FullscreenDemoPage } from "./components/FullscreenDemoPage";
|
|
11
12
|
import * as React from "react";
|
|
12
13
|
import { useMedia } from "./hooks/useMedia";
|
|
13
14
|
import "./demo.css";
|
|
@@ -263,6 +264,10 @@ function App() {
|
|
|
263
264
|
return (
|
|
264
265
|
<HashRouter>
|
|
265
266
|
<Routes>
|
|
267
|
+
{/* Fullscreen pages (outside Layout) */}
|
|
268
|
+
<Route path="/fullscreen/:id" element={<FullscreenDemoPage />} />
|
|
269
|
+
|
|
270
|
+
{/* Regular pages (inside Layout) */}
|
|
266
271
|
<Route path="/" element={<Layout />}>
|
|
267
272
|
<Route index element={<Home />} />
|
|
268
273
|
<Route path="panel-demo" element={<PanelLayoutDemo />} />
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Dialog - Alerts page
|
|
3
|
+
*/
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { AlertDialogDemo } from "../components/AlertDialogDemo";
|
|
6
|
+
import AlertDialogDemoSource from "../components/AlertDialogDemo.tsx?raw";
|
|
7
|
+
import { SingleSamplePage } from "../../../components/layout";
|
|
8
|
+
|
|
9
|
+
const Page: React.FC = () => {
|
|
10
|
+
return (
|
|
11
|
+
<SingleSamplePage
|
|
12
|
+
title="Dialog / Alert, Confirm, Prompt"
|
|
13
|
+
code={AlertDialogDemoSource}
|
|
14
|
+
codeTitle="AlertDialogDemo.tsx"
|
|
15
|
+
previewHeight={520}
|
|
16
|
+
>
|
|
17
|
+
<AlertDialogDemo />
|
|
18
|
+
</SingleSamplePage>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default Page;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Dialog - Card Expansion page (Apple Music style)
|
|
3
|
+
*/
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { CardExpandDemo } from "../components/CardExpandDemo.js";
|
|
6
|
+
import CardExpandDemoSource from "../components/CardExpandDemo.tsx?raw";
|
|
7
|
+
import { SingleSamplePage } from "../../../components/layout/index.js";
|
|
8
|
+
|
|
9
|
+
const Page: React.FC = () => {
|
|
10
|
+
return (
|
|
11
|
+
<SingleSamplePage
|
|
12
|
+
title="Dialog / Card Expansion"
|
|
13
|
+
code={CardExpandDemoSource}
|
|
14
|
+
codeTitle="CardExpandDemo.tsx"
|
|
15
|
+
previewHeight={600}
|
|
16
|
+
>
|
|
17
|
+
<CardExpandDemo />
|
|
18
|
+
</SingleSamplePage>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default Page;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Alert, Confirm, Prompt dialog demo
|
|
3
|
+
*/
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { useDialog } from "../../../../modules/dialog/useDialog";
|
|
6
|
+
import { DemoButton } from "../../../components/ui/DemoButton";
|
|
7
|
+
import styles from "./DialogDemos.module.css";
|
|
8
|
+
|
|
9
|
+
export const AlertDialogDemo: React.FC = () => {
|
|
10
|
+
const { alert, confirm, prompt, Outlet } = useDialog();
|
|
11
|
+
const [lastResult, setLastResult] = React.useState<string>("");
|
|
12
|
+
|
|
13
|
+
const handleAlert = async () => {
|
|
14
|
+
await alert({
|
|
15
|
+
title: "Information",
|
|
16
|
+
message: "This is an alert dialog. It displays information and waits for acknowledgment.",
|
|
17
|
+
okLabel: "Got it",
|
|
18
|
+
});
|
|
19
|
+
setLastResult("alert: acknowledged");
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const handleConfirm = async () => {
|
|
23
|
+
const result = await confirm({
|
|
24
|
+
title: "Confirm Action",
|
|
25
|
+
message: "Are you sure you want to proceed? This action cannot be undone.",
|
|
26
|
+
confirmLabel: "Proceed",
|
|
27
|
+
cancelLabel: "Cancel",
|
|
28
|
+
});
|
|
29
|
+
setLastResult(`confirm: ${result ? "confirmed" : "cancelled"}`);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const handlePrompt = async () => {
|
|
33
|
+
const result = await prompt({
|
|
34
|
+
title: "Enter Name",
|
|
35
|
+
message: "Please enter your name:",
|
|
36
|
+
placeholder: "John Doe",
|
|
37
|
+
defaultValue: "",
|
|
38
|
+
});
|
|
39
|
+
setLastResult(`prompt: ${result === null ? "cancelled" : `"${result}"`}`);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const handlePasswordPrompt = async () => {
|
|
43
|
+
const result = await prompt({
|
|
44
|
+
title: "Enter Password",
|
|
45
|
+
message: "Please enter your password:",
|
|
46
|
+
inputType: "password",
|
|
47
|
+
confirmLabel: "Submit",
|
|
48
|
+
});
|
|
49
|
+
setLastResult(`password prompt: ${result === null ? "cancelled" : "(password entered)"}`);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const handleSequence = async () => {
|
|
53
|
+
await alert("First, let me explain...");
|
|
54
|
+
|
|
55
|
+
const proceed = await confirm({
|
|
56
|
+
message: "Would you like to continue with the setup?",
|
|
57
|
+
confirmLabel: "Yes",
|
|
58
|
+
cancelLabel: "No",
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
if (!proceed) {
|
|
62
|
+
setLastResult("sequence: cancelled at step 2");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const name = await prompt({
|
|
67
|
+
message: "What is your name?",
|
|
68
|
+
defaultValue: "Anonymous",
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
if (name === null) {
|
|
72
|
+
setLastResult("sequence: cancelled at step 3");
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
await alert(`Hello, ${name}! Setup complete.`);
|
|
77
|
+
setLastResult(`sequence: completed with name "${name}"`);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<div className={styles.container}>
|
|
82
|
+
<div className={styles.section}>
|
|
83
|
+
<h3>Alert Dialog</h3>
|
|
84
|
+
<p>Simple information dialog that waits for acknowledgment.</p>
|
|
85
|
+
<DemoButton variant="primary" size="md" onClick={handleAlert}>
|
|
86
|
+
Show Alert
|
|
87
|
+
</DemoButton>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<div className={styles.section}>
|
|
91
|
+
<h3>Confirm Dialog</h3>
|
|
92
|
+
<p>Yes/No dialog that returns a boolean result.</p>
|
|
93
|
+
<DemoButton variant="primary" size="md" onClick={handleConfirm}>
|
|
94
|
+
Show Confirm
|
|
95
|
+
</DemoButton>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<div className={styles.section}>
|
|
99
|
+
<h3>Prompt Dialog</h3>
|
|
100
|
+
<p>Input dialog that returns the entered value or null if cancelled.</p>
|
|
101
|
+
<div className={styles.buttonGroup}>
|
|
102
|
+
<DemoButton variant="primary" size="md" onClick={handlePrompt}>
|
|
103
|
+
Show Prompt
|
|
104
|
+
</DemoButton>
|
|
105
|
+
<DemoButton variant="secondary" size="md" onClick={handlePasswordPrompt}>
|
|
106
|
+
Password Prompt
|
|
107
|
+
</DemoButton>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<div className={styles.section}>
|
|
112
|
+
<h3>Dialog Sequence</h3>
|
|
113
|
+
<p>Chain multiple dialogs together using async/await.</p>
|
|
114
|
+
<DemoButton variant="primary" size="md" onClick={handleSequence}>
|
|
115
|
+
Start Sequence
|
|
116
|
+
</DemoButton>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
{lastResult ? <div className={styles.resultBox}>Last result: {lastResult}</div> : null}
|
|
120
|
+
|
|
121
|
+
<Outlet />
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
124
|
+
};
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
padding: 16px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.header {
|
|
6
|
+
margin-bottom: 16px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.sectionTitle {
|
|
10
|
+
margin: 0 0 4px;
|
|
11
|
+
font-size: 20px;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
color: var(--color-text-primary, #1a1a1a);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.hint {
|
|
17
|
+
margin: 0;
|
|
18
|
+
font-size: 13px;
|
|
19
|
+
color: var(--color-text-secondary, #6b7280);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.grid {
|
|
23
|
+
display: grid;
|
|
24
|
+
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
|
25
|
+
gap: 12px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Card styles */
|
|
29
|
+
.card {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
aspect-ratio: 1;
|
|
33
|
+
border: none;
|
|
34
|
+
border-radius: 12px;
|
|
35
|
+
padding: 0;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.card:hover {
|
|
42
|
+
transform: scale(1.02);
|
|
43
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.card:active {
|
|
47
|
+
transform: scale(0.98);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.cardArt {
|
|
51
|
+
flex: 1;
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.cardIcon {
|
|
58
|
+
width: 60%;
|
|
59
|
+
height: 60%;
|
|
60
|
+
opacity: 0.8;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.cardInfo {
|
|
64
|
+
padding: 10px;
|
|
65
|
+
background: rgba(0, 0, 0, 0.3);
|
|
66
|
+
backdrop-filter: blur(10px);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.cardTitle {
|
|
70
|
+
font-size: 13px;
|
|
71
|
+
font-weight: 600;
|
|
72
|
+
color: #fff;
|
|
73
|
+
white-space: nowrap;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
text-overflow: ellipsis;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.cardArtist {
|
|
79
|
+
font-size: 11px;
|
|
80
|
+
color: rgba(255, 255, 255, 0.7);
|
|
81
|
+
white-space: nowrap;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
text-overflow: ellipsis;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Backdrop */
|
|
87
|
+
.backdrop {
|
|
88
|
+
position: fixed;
|
|
89
|
+
inset: 0;
|
|
90
|
+
background: rgba(0, 0, 0, 0.6);
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: flex-end;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
z-index: 1000;
|
|
95
|
+
/* Fade in animation separate from view transition */
|
|
96
|
+
animation: backdropFadeIn 0.35s ease-out;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@keyframes backdropFadeIn {
|
|
100
|
+
from {
|
|
101
|
+
opacity: 0;
|
|
102
|
+
}
|
|
103
|
+
to {
|
|
104
|
+
opacity: 1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Expanded view styles */
|
|
109
|
+
.expanded {
|
|
110
|
+
width: 100vw;
|
|
111
|
+
max-width: 420px;
|
|
112
|
+
height: 85vh;
|
|
113
|
+
max-height: 700px;
|
|
114
|
+
border-radius: 24px 24px 0 0;
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
117
|
+
align-items: center;
|
|
118
|
+
padding: 12px 24px 32px;
|
|
119
|
+
box-sizing: border-box;
|
|
120
|
+
color: #fff;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.dragHandle {
|
|
124
|
+
width: 36px;
|
|
125
|
+
height: 5px;
|
|
126
|
+
background: rgba(255, 255, 255, 0.4);
|
|
127
|
+
border-radius: 3px;
|
|
128
|
+
margin-bottom: 24px;
|
|
129
|
+
flex-shrink: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.expandedArt {
|
|
133
|
+
width: min(280px, 70vw);
|
|
134
|
+
aspect-ratio: 1;
|
|
135
|
+
background: rgba(0, 0, 0, 0.2);
|
|
136
|
+
border-radius: 16px;
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
justify-content: center;
|
|
140
|
+
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
|
|
141
|
+
margin-bottom: 32px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.expandedIcon {
|
|
145
|
+
width: 70%;
|
|
146
|
+
height: 70%;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.expandedInfo {
|
|
150
|
+
text-align: center;
|
|
151
|
+
margin-bottom: 32px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.expandedTitle {
|
|
155
|
+
margin: 0 0 8px;
|
|
156
|
+
font-size: 22px;
|
|
157
|
+
font-weight: 700;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.expandedArtist {
|
|
161
|
+
margin: 0;
|
|
162
|
+
font-size: 16px;
|
|
163
|
+
opacity: 0.8;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.controls {
|
|
167
|
+
width: 100%;
|
|
168
|
+
max-width: 320px;
|
|
169
|
+
margin-bottom: 24px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.progressBar {
|
|
173
|
+
height: 4px;
|
|
174
|
+
background: rgba(255, 255, 255, 0.3);
|
|
175
|
+
border-radius: 2px;
|
|
176
|
+
overflow: hidden;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.progressFill {
|
|
180
|
+
height: 100%;
|
|
181
|
+
background: #fff;
|
|
182
|
+
border-radius: 2px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.timeLabels {
|
|
186
|
+
display: flex;
|
|
187
|
+
justify-content: space-between;
|
|
188
|
+
margin-top: 8px;
|
|
189
|
+
font-size: 12px;
|
|
190
|
+
opacity: 0.7;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.playbackControls {
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
gap: 32px;
|
|
197
|
+
margin-bottom: 24px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.controlButton {
|
|
201
|
+
background: none;
|
|
202
|
+
border: none;
|
|
203
|
+
color: #fff;
|
|
204
|
+
cursor: pointer;
|
|
205
|
+
padding: 8px;
|
|
206
|
+
opacity: 0.9;
|
|
207
|
+
transition: opacity 0.15s, transform 0.15s;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.controlButton:hover {
|
|
211
|
+
opacity: 1;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.controlButton:active {
|
|
215
|
+
transform: scale(0.9);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.playButton {
|
|
219
|
+
width: 64px;
|
|
220
|
+
height: 64px;
|
|
221
|
+
border-radius: 50%;
|
|
222
|
+
background: rgba(255, 255, 255, 0.2);
|
|
223
|
+
border: none;
|
|
224
|
+
color: #fff;
|
|
225
|
+
cursor: pointer;
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
transition: background 0.15s, transform 0.15s;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.playButton:hover {
|
|
233
|
+
background: rgba(255, 255, 255, 0.3);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.playButton:active {
|
|
237
|
+
transform: scale(0.95);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.closeButton {
|
|
241
|
+
margin-top: auto;
|
|
242
|
+
color: rgba(255, 255, 255, 0.8);
|
|
243
|
+
}
|