@synerise/ds-popover 1.2.0 → 1.3.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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.3.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-popover@1.2.0...@synerise/ds-popover@1.3.0) (2026-01-20)
7
+
8
+ ### Features
9
+
10
+ - **information-card:** migrate to popover ([de900e4](https://github.com/Synerise/synerise-design/commit/de900e4bc1c32a4bbbf175401374619e691023f2))
11
+
6
12
  # [1.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-popover@1.1.2...@synerise/ds-popover@1.2.0) (2025-12-19)
7
13
 
8
14
  ### Features
@@ -1,5 +1,5 @@
1
1
  import { type CSSProperties, type Dispatch, type ReactNode, type RefObject, type SetStateAction } from 'react';
2
- import { type ArrowOptions, type AutoUpdateOptions, type FlipOptions, type OffsetOptions, type OpenChangeReason, type Placement, type ShiftOptions, type UseDismissProps, type UseFloatingReturn, type UseInteractionsReturn, type UseListNavigationProps, type UseTransitionStylesProps } from '@floating-ui/react';
2
+ import { type ArrowOptions, type AutoUpdateOptions, type Delay, type FlipOptions, type OffsetOptions, type OpenChangeReason, type Placement, type ShiftOptions, type UseDismissProps, type UseFloatingReturn, type UseHoverProps, type UseInteractionsReturn, type UseListNavigationProps, type UseTransitionStylesProps } from '@floating-ui/react';
3
3
  export type PopoverProps = {
4
4
  children: ReactNode;
5
5
  } & PopoverOptions;
@@ -10,6 +10,8 @@ type SharedMiddlewareConfig = {
10
10
  export type OffsetConfig = SharedMiddlewareConfig & Exclude<OffsetOptions, number>;
11
11
  export type FlipConfig = SharedMiddlewareConfig & FlipOptions;
12
12
  export type ShiftConfig = SharedMiddlewareConfig & ShiftOptions;
13
+ export type HoverConfig = Omit<UseHoverProps, 'enabled'>;
14
+ export type DelayConfig = Delay;
13
15
  export type PopoverOptions = {
14
16
  initialOpen?: boolean;
15
17
  placement?: Placement;
@@ -26,6 +28,7 @@ export type PopoverOptions = {
26
28
  offsetConfig?: OffsetConfig;
27
29
  flipConfig?: FlipConfig;
28
30
  shiftConfig?: ShiftConfig;
31
+ hoverConfig?: HoverConfig;
29
32
  arrowConfig?: Omit<ArrowOptions, 'element'>;
30
33
  dismissConfig?: UseDismissProps;
31
34
  listNavigationConfig?: UseListNavigationProps;
@@ -31,6 +31,7 @@ export var PopoverTrigger = /*#__PURE__*/forwardRef(function (_ref, propRef) {
31
31
  "aria-hidden": "true",
32
32
  hidden: true,
33
33
  ref: function ref(node) {
34
+ // TODO - skip any TriggerAnchors .....
34
35
  context.refs.setReference((node == null ? void 0 : node.nextElementSibling) || null);
35
36
  }
36
37
  }), /*#__PURE__*/cloneElement(children, _extends({}, referenceProps)));
@@ -1,2 +1,2 @@
1
1
  import { type PopoverOptions, type UsePopoverReturn } from '../Popover.types';
2
- export declare const usePopover: ({ initialOpen, placement, modal, trigger, open: controlledOpen, onOpenChange: setControlledOpen, onDismiss, transitionDuration, getPopupContainer, autoUpdate: autoUpdateWhileMounted, dismissConfig, offsetConfig, flipConfig, shiftConfig, arrowConfig, testId, componentId, returnFocus, listNavigationConfig, getTransitionConfig, zIndex, }?: PopoverOptions) => UsePopoverReturn;
2
+ export declare const usePopover: ({ initialOpen, placement, modal, trigger, open: controlledOpen, onOpenChange: setControlledOpen, onDismiss, transitionDuration, getPopupContainer, autoUpdate: autoUpdateWhileMounted, dismissConfig, offsetConfig, flipConfig, shiftConfig, arrowConfig, hoverConfig, testId, componentId, returnFocus, listNavigationConfig, getTransitionConfig, zIndex, }?: PopoverOptions) => UsePopoverReturn;
@@ -1,6 +1,6 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import { useMemo, useRef, useState } from 'react';
3
- import { autoUpdate, useClick, useDismiss, useFloating, useHover, useInteractions, useListNavigation, useRole, useTransitionStyles } from '@floating-ui/react';
3
+ import { autoUpdate, useClick, useDelayGroup, useDismiss, useFloating, useHover, useInteractions, useListNavigation, useRole, useTransitionStyles } from '@floating-ui/react';
4
4
  import { HOVER_CLOSE_DELAY, HOVER_OPEN_DELAY } from '../Popover.const';
5
5
  import { getDefaultTransitionConfig, getMiddleware } from '../utils';
6
6
  import { useListNavigationConfig } from './useListNavigationConfig';
@@ -29,6 +29,8 @@ export var usePopover = function usePopover(_temp) {
29
29
  shiftConfig = _ref$shiftConfig === void 0 ? {} : _ref$shiftConfig,
30
30
  _ref$arrowConfig = _ref.arrowConfig,
31
31
  arrowConfig = _ref$arrowConfig === void 0 ? {} : _ref$arrowConfig,
32
+ _ref$hoverConfig = _ref.hoverConfig,
33
+ hoverConfig = _ref$hoverConfig === void 0 ? {} : _ref$hoverConfig,
32
34
  _ref$testId = _ref.testId,
33
35
  testId = _ref$testId === void 0 ? 'noTestId' : _ref$testId,
34
36
  componentId = _ref.componentId,
@@ -89,13 +91,15 @@ export var usePopover = function usePopover(_temp) {
89
91
  var click = useClick(context, {
90
92
  enabled: isClickEnabled && controlledOpen === undefined
91
93
  });
92
- var hover = useHover(context, {
94
+ var _useDelayGroup = useDelayGroup(context),
95
+ delay = _useDelayGroup.delay;
96
+ var hover = useHover(context, _extends({
93
97
  enabled: isHoverEnabled,
94
- delay: {
98
+ delay: delay || {
95
99
  open: HOVER_OPEN_DELAY,
96
100
  close: HOVER_CLOSE_DELAY
97
101
  }
98
- });
102
+ }, hoverConfig));
99
103
  var dismiss = useDismiss(context, dismissConfig);
100
104
  var role = useRole(context);
101
105
  var interactions = useInteractions([click, hover, dismiss, role, listNav]);
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './Popover';
2
2
  export * from './components';
3
3
  export { Popover as default } from './Popover';
4
+ export { FloatingDelayGroup } from '@floating-ui/react';
4
5
  export * from './Popover.types';
5
6
  export { getPlacement } from './utils/getPlacement';
6
7
  export { PLACEMENT_MAP } from './Popover.const';
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './Popover';
2
2
  export * from './components';
3
3
  export { Popover as default } from './Popover';
4
+ export { FloatingDelayGroup } from '@floating-ui/react';
4
5
  export * from './Popover.types';
5
6
  export { getPlacement } from './utils/getPlacement';
6
7
  export { PLACEMENT_MAP } from './Popover.const';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-popover",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Popover UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -45,5 +45,5 @@
45
45
  "react": ">=16.9.0 <= 18.3.1",
46
46
  "styled-components": "^5.3.3"
47
47
  },
48
- "gitHead": "c638fc7e1af8aea55d466a643329fe499b2b3383"
48
+ "gitHead": "db758824923a2a231a0de460f0d6d10739514cda"
49
49
  }