}
+ id={popupId}
className={className}
- {...getFloatingProps()}
+ role="tooltip"
{...dataAttributes}
data-side={placement}
data-starting-style={transitionStatus === 'initial' ? '' : undefined}
@@ -246,53 +348,17 @@ function TooltipPopup({ className = '', children }: TooltipPopupProps): JSX.Elem
);
}
-function TooltipArrow({ className = '', children }: TooltipArrowProps): JSX.Element {
- const { arrowRef, context } = useTooltipContext();
- const { side } = useTooltipPositionerContext();
-
- // Get arrow positioning data from floating-ui
- const { x: arrowX, y: arrowY } = context.middlewareData.arrow || { x: 0, y: 0 };
-
- return (
-
}
- className={className}
- aria-hidden="true"
- data-side={side}
- style={{
- left: arrowX != null ? `${arrowX}px` : undefined,
- top: arrowY != null ? `${arrowY}px` : undefined,
- }}
- >
- {children}
-
- );
-}
-
-function TooltipPortal({ children, root, rootId = '@default_portal_id' }: TooltipPortalProps): JSX.Element {
- return (
-
- {children}
-
- );
-}
-
-// Export compound component
// eslint-disable-next-line react-refresh/only-export-components
export const Tooltip: {
Root: typeof TooltipRoot;
Trigger: typeof TooltipTrigger;
Positioner: typeof TooltipPositioner;
Popup: typeof TooltipPopup;
- Arrow: typeof TooltipArrow;
- Portal: typeof TooltipPortal;
} = {
Root: TooltipRoot,
Trigger: TooltipTrigger,
Positioner: TooltipPositioner,
Popup: TooltipPopup,
- Arrow: TooltipArrow,
- Portal: TooltipPortal,
};
export default Tooltip;
diff --git a/packages/react/src/skins/frosted/FrostedSkin.tsx b/packages/react/src/skins/frosted/FrostedSkin.tsx
index e4ec770a..db651a27 100644
--- a/packages/react/src/skins/frosted/FrostedSkin.tsx
+++ b/packages/react/src/skins/frosted/FrostedSkin.tsx
@@ -41,14 +41,12 @@ export default function FrostedSkin({ children, className = '' }: SkinProps): JS
-
-
-
- Play
- Pause
-
-
-
+
+
+ Play
+ Pause
+
+
@@ -68,13 +66,11 @@ export default function FrostedSkin({ children, className = '' }: SkinProps): JS
-
-
-
-
-
-
-
+
+
+
+
+
@@ -88,18 +84,16 @@ export default function FrostedSkin({ children, className = '' }: SkinProps): JS
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -109,14 +103,12 @@ export default function FrostedSkin({ children, className = '' }: SkinProps): JS
-
-
-
- Enter Fullscreen
- Exit Fullscreen
-
-
-
+
+
+ Enter Fullscreen
+ Exit Fullscreen
+
+
diff --git a/packages/react/src/skins/minimal/MinimalSkin.tsx b/packages/react/src/skins/minimal/MinimalSkin.tsx
index add81185..f65cbc58 100644
--- a/packages/react/src/skins/minimal/MinimalSkin.tsx
+++ b/packages/react/src/skins/minimal/MinimalSkin.tsx
@@ -41,14 +41,12 @@ export default function MinimalSkin({ children, className = '' }: SkinProps): JS
-
-
-
- Play
- Pause
-
-
-
+
+
+ Play
+ Pause
+
+
@@ -74,13 +72,11 @@ export default function MinimalSkin({ children, className = '' }: SkinProps): JS
-
-
-
-
-
-
-
+
+
+
+
+
@@ -92,18 +88,16 @@ export default function MinimalSkin({ children, className = '' }: SkinProps): JS
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -113,14 +107,12 @@ export default function MinimalSkin({ children, className = '' }: SkinProps): JS
-
-
-
- Enter Fullscreen
- Exit Fullscreen
-
-
-
+
+
+ Enter Fullscreen
+ Exit Fullscreen
+
+
diff --git a/packages/react/src/skins/minimal/styles.ts b/packages/react/src/skins/minimal/styles.ts
index 3408ec02..870cdc8b 100644
--- a/packages/react/src/skins/minimal/styles.ts
+++ b/packages/react/src/skins/minimal/styles.ts
@@ -131,7 +131,7 @@ const styles: MinimalSkinStyles = {
'vjs:data-starting-style:scale-0 vjs:data-starting-style:opacity-0 vjs:data-starting-style:blur-sm',
'vjs:data-ending-style:scale-0 vjs:data-ending-style:opacity-0 vjs:data-ending-style:blur-sm',
),
- PopoverPopup: cn('vjs:py-2'),
+ PopoverPopup: cn('vjs:py-2 vjs:bg-transparent'),
TooltipPopup: cn(
'vjs:whitespace-nowrap vjs:flex vjs:flex-col vjs:rounded vjs:text-white vjs:text-xs vjs:@7xl/root:text-sm vjs:px-2 vjs:py-1 vjs:bg-white/20 vjs:backdrop-blur-3xl vjs:backdrop-saturate-150 vjs:backdrop-brightness-90 vjs:shadow-md vjs:shadow-black/5',
),
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c0a48c51..2d961ab9 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -226,9 +226,6 @@ importers:
packages/react:
dependencies:
- '@floating-ui/react':
- specifier: ^0.27.16
- version: 0.27.16(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@videojs/core':
specifier: workspace:*
version: link:../core
@@ -1056,12 +1053,6 @@ packages:
react: '>=16.8.0'
react-dom: '>=16.8.0'
- '@floating-ui/react@0.27.16':
- resolution: {integrity: sha512-9O8N4SeG2z++TSM8QA/KTeKFBVCNEz/AGS7gWPJf6KFRzmRWixFRnCnkPHRDwSVZW6QPDO6uT0P2SpWNKCc9/g==}
- peerDependencies:
- react: '>=17.0.0'
- react-dom: '>=17.0.0'
-
'@floating-ui/utils@0.2.10':
resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==}
@@ -7398,14 +7389,6 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
- '@floating-ui/react@0.27.16(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
- dependencies:
- '@floating-ui/react-dom': 2.1.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@floating-ui/utils': 0.2.10
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
- tabbable: 6.2.0
-
'@floating-ui/utils@0.2.10': {}
'@humanfs/core@0.19.1': {}