@synerise/ds-popover 1.1.1 → 1.1.2

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,20 +3,18 @@
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.1.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-popover@1.1.0...@synerise/ds-popover@1.1.1) (2025-11-13)
7
-
8
-
9
- ### Bug Fixes
10
-
11
- * **date-picker:** dropdown state ([e16e4ce](https://github.com/Synerise/synerise-design/commit/e16e4ce8374c374512d0dc59a2361000ab89c8b9))
6
+ ## [1.1.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-popover@1.1.1...@synerise/ds-popover@1.1.2) (2025-12-15)
12
7
 
8
+ **Note:** Version bump only for package @synerise/ds-popover
13
9
 
10
+ ## [1.1.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-popover@1.1.0...@synerise/ds-popover@1.1.1) (2025-11-13)
14
11
 
12
+ ### Bug Fixes
15
13
 
14
+ - **date-picker:** dropdown state ([e16e4ce](https://github.com/Synerise/synerise-design/commit/e16e4ce8374c374512d0dc59a2361000ab89c8b9))
16
15
 
17
16
  # 1.1.0 (2025-11-06)
18
17
 
19
-
20
18
  ### Features
21
19
 
22
- * **dropdown:** dropdownMenu component ([f0ec827](https://github.com/Synerise/synerise-design/commit/f0ec82792cdcb021fa9a454912f6e7a892e53895))
20
+ - **dropdown:** dropdownMenu component ([f0ec827](https://github.com/Synerise/synerise-design/commit/f0ec82792cdcb021fa9a454912f6e7a892e53895))
@@ -1,5 +1,5 @@
1
- import { type ReactNode } from 'react';
2
- import { type AutoUpdateOptions, type FlipOptions, type OffsetOptions, type OpenChangeReason, type Placement, type ShiftOptions, type UseDismissProps, type UseListNavigationProps, type UseTransitionStylesProps } from '@floating-ui/react';
1
+ import { type CSSProperties, type Dispatch, type ReactNode, type SetStateAction } from 'react';
2
+ import { 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';
3
3
  export type PopoverProps = {
4
4
  children: ReactNode;
5
5
  } & PopoverOptions;
@@ -33,7 +33,7 @@ export type PopoverOptions = {
33
33
  * defaults to theme.variables['zindex-dropdown'],
34
34
  */
35
35
  zIndex?: number;
36
- onOpenChange?: (open: boolean, event?: Event, reason?: OpenChangeReason) => void;
36
+ onOpenChange?: OpenChangeFn;
37
37
  onDismiss?: (event?: Event, reason?: OpenChangeReason) => void;
38
38
  getPopupContainer?: (element: HTMLElement) => HTMLElement;
39
39
  transitionDuration?: number;
@@ -41,4 +41,20 @@ export type PopoverOptions = {
41
41
  placement: Placement;
42
42
  }) => Partial<UseTransitionStylesProps>;
43
43
  };
44
+ type OpenChangeFn = (open: boolean, event?: Event, reason?: OpenChangeReason) => void;
45
+ export type UsePopoverReturn = Omit<UseFloatingReturn, 'open'> & UseInteractionsReturn & {
46
+ open: boolean;
47
+ setOpen: OpenChangeFn;
48
+ transitionStyles: CSSProperties | undefined;
49
+ modal: boolean | undefined;
50
+ labelId: string | undefined;
51
+ descriptionId: string | undefined;
52
+ setLabelId: Dispatch<SetStateAction<string | undefined>>;
53
+ setDescriptionId: Dispatch<SetStateAction<string | undefined>>;
54
+ getPopupContainer?: (element: HTMLElement) => HTMLElement;
55
+ testId: string;
56
+ zIndex?: number;
57
+ returnFocus?: boolean;
58
+ componentId?: string;
59
+ };
44
60
  export {};
@@ -1,6 +1,6 @@
1
1
  import { type Dispatch, type SetStateAction } from 'react';
2
- import { type usePopover } from '../hooks';
3
- export type ContextType = (ReturnType<typeof usePopover> & {
2
+ import { type UsePopoverReturn } from '../Popover.types';
3
+ export type ContextType = (UsePopoverReturn & {
4
4
  setLabelId: Dispatch<SetStateAction<string | undefined>>;
5
5
  setDescriptionId: Dispatch<SetStateAction<string | undefined>>;
6
6
  }) | null;
@@ -19,6 +19,6 @@ export declare const useListNavigationConfig: (listNavigationConfig?: UseListNav
19
19
  cols?: number;
20
20
  scrollItemIntoView?: boolean | ScrollIntoViewOptions;
21
21
  virtualItemRef?: React.MutableRefObject<HTMLElement | null>;
22
- itemSizes?: import("@floating-ui/utils").Dimensions[];
22
+ itemSizes?: import("@floating-ui/react").Dimensions[];
23
23
  dense?: boolean;
24
24
  };
@@ -1,59 +1,2 @@
1
- import { type OpenChangeReason } from '@floating-ui/react';
2
- import { type PopoverOptions } from '../Popover.types';
3
- export declare const usePopover: ({ initialOpen, placement, modal, trigger, open: controlledOpen, onOpenChange: setControlledOpen, onDismiss, transitionDuration, getPopupContainer, autoUpdate: autoUpdateWhileMounted, dismissConfig, offsetConfig, flipConfig, shiftConfig, testId, componentId, returnFocus, listNavigationConfig, getTransitionConfig, zIndex, }?: PopoverOptions) => {
4
- modal: boolean | undefined;
5
- labelId: string | undefined;
6
- getPopupContainer: ((element: HTMLElement) => HTMLElement) | undefined;
7
- descriptionId: string | undefined;
8
- setLabelId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
9
- setDescriptionId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
10
- testId: string;
11
- zIndex: number | undefined;
12
- returnFocus: boolean | undefined;
13
- componentId: string | undefined;
14
- placement: import("@floating-ui/utils").Placement;
15
- strategy: import("@floating-ui/utils").Strategy;
16
- middlewareData: import("@floating-ui/core").MiddlewareData;
17
- x: number;
18
- y: number;
19
- isPositioned: boolean;
20
- update: () => void;
21
- floatingStyles: React.CSSProperties;
22
- refs: {
23
- reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
24
- floating: React.MutableRefObject<HTMLElement | null>;
25
- setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
26
- setFloating: (node: HTMLElement | null) => void;
27
- } & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
28
- elements: {
29
- reference: import("@floating-ui/react-dom").ReferenceType | null;
30
- floating: HTMLElement | null;
31
- } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
32
- context: {
33
- x: number;
34
- y: number;
35
- placement: import("@floating-ui/utils").Placement;
36
- strategy: import("@floating-ui/utils").Strategy;
37
- middlewareData: import("@floating-ui/core").MiddlewareData;
38
- isPositioned: boolean;
39
- update: () => void;
40
- floatingStyles: React.CSSProperties;
41
- open: boolean;
42
- onOpenChange: (open: boolean, event?: Event, reason?: OpenChangeReason) => void;
43
- events: import("@floating-ui/react").FloatingEvents;
44
- dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
45
- nodeId: string | undefined;
46
- floatingId: string | undefined;
47
- refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
48
- elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
49
- };
50
- getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
51
- getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
52
- getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
53
- active?: boolean;
54
- selected?: boolean;
55
- }) => Record<string, unknown>;
56
- open: boolean;
57
- setOpen: (open: boolean, event?: Event, reason?: OpenChangeReason) => void;
58
- transitionStyles: import("react").CSSProperties | undefined;
59
- };
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, testId, componentId, returnFocus, listNavigationConfig, getTransitionConfig, zIndex, }?: PopoverOptions) => UsePopoverReturn;
@@ -1,60 +1,2 @@
1
- export declare const usePopoverContext: () => {
2
- modal: boolean | undefined;
3
- labelId: string | undefined;
4
- getPopupContainer: ((element: HTMLElement) => HTMLElement) | undefined;
5
- descriptionId: string | undefined;
6
- setLabelId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
7
- setDescriptionId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
8
- testId: string;
9
- zIndex: number | undefined;
10
- returnFocus: boolean | undefined;
11
- componentId: string | undefined;
12
- placement: import("@floating-ui/utils").Placement;
13
- strategy: import("@floating-ui/utils").Strategy;
14
- middlewareData: import("@floating-ui/core").MiddlewareData;
15
- x: number;
16
- y: number;
17
- isPositioned: boolean;
18
- update: () => void;
19
- floatingStyles: React.CSSProperties;
20
- refs: {
21
- reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
22
- floating: React.MutableRefObject<HTMLElement | null>;
23
- setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
24
- setFloating: (node: HTMLElement | null) => void;
25
- } & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
26
- elements: {
27
- reference: import("@floating-ui/react-dom").ReferenceType | null;
28
- floating: HTMLElement | null;
29
- } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
30
- context: {
31
- x: number;
32
- y: number;
33
- placement: import("@floating-ui/utils").Placement;
34
- strategy: import("@floating-ui/utils").Strategy;
35
- middlewareData: import("@floating-ui/core").MiddlewareData;
36
- isPositioned: boolean;
37
- update: () => void;
38
- floatingStyles: React.CSSProperties;
39
- open: boolean;
40
- onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
41
- events: import("@floating-ui/react").FloatingEvents;
42
- dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
43
- nodeId: string | undefined;
44
- floatingId: string | undefined;
45
- refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
46
- elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
47
- };
48
- getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
49
- getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
50
- getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
51
- active?: boolean;
52
- selected?: boolean;
53
- }) => Record<string, unknown>;
54
- open: boolean;
55
- setOpen: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
56
- transitionStyles: import("react").CSSProperties | undefined;
57
- } & {
58
- setLabelId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
59
- setDescriptionId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
60
- };
1
+ import { type ContextType } from '../contexts';
2
+ export declare const usePopoverContext: () => Exclude<ContextType, null>;
@@ -7,6 +7,6 @@ type GetMiddleware = {
7
7
  export declare const getMiddleware: ({ offsetConfig, flipConfig, shiftConfig, }: GetMiddleware) => {
8
8
  name: string;
9
9
  options?: any;
10
- fn: (state: import("@floating-ui/dom").MiddlewareState) => import("@floating-ui/core").MiddlewareReturn | Promise<import("@floating-ui/core").MiddlewareReturn>;
10
+ fn: (state: import("@floating-ui/react").MiddlewareState) => import("@floating-ui/react").MiddlewareReturn | Promise<import("@floating-ui/react").MiddlewareReturn>;
11
11
  }[];
12
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-popover",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Popover UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,7 +34,7 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@floating-ui/react": "^0.27.13"
37
+ "@floating-ui/react": "^0.27.16"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@testing-library/user-event": "^14"
@@ -43,5 +43,5 @@
43
43
  "@synerise/ds-core": "*",
44
44
  "react": ">=16.9.0 <= 18.3.1"
45
45
  },
46
- "gitHead": "085189e79075b23a8fb86ce9b7d930f6ac7b3d23"
46
+ "gitHead": "b1279d5354132a2bf0b6f0cfa343db4c6c928f72"
47
47
  }