@trackunit/react-components 0.1.157 → 0.1.159

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/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.1.157",
3
+ "version": "0.1.159",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
7
7
  "node": ">=18.x"
8
8
  },
9
9
  "dependencies": {
10
- "@floating-ui/react": "0.22.2",
10
+ "@floating-ui/react": "0.25.4",
11
11
  "@trackunit/css-class-variance-utilities": "0.0.14",
12
12
  "@trackunit/css-core": "0.0.95",
13
13
  "@trackunit/ui-design-tokens": "0.0.77",
@@ -16,27 +16,35 @@ export declare const usePopoverContext: () => {
16
16
  className?: string | undefined;
17
17
  dataTestId?: string | undefined;
18
18
  };
19
- placement: import("@floating-ui/core").Placement;
20
- strategy: import("@floating-ui/core").Strategy;
19
+ placement: import("@floating-ui/utils").Placement;
20
+ strategy: import("@floating-ui/utils").Strategy;
21
21
  middlewareData: import("@floating-ui/core").MiddlewareData;
22
- x: number | null;
23
- y: number | null;
22
+ x: number;
23
+ y: number;
24
+ isPositioned: boolean;
24
25
  update: () => void;
25
- reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
26
- floating: (node: HTMLElement | null) => void;
27
- positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
26
+ floatingStyles: import("react").CSSProperties;
27
+ refs: {
28
+ reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
29
+ floating: import("react").MutableRefObject<HTMLElement | null>;
30
+ setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
31
+ setFloating: (node: HTMLElement | null) => void;
32
+ } & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
33
+ elements: {
34
+ reference: import("@floating-ui/react-dom").ReferenceType | null;
35
+ floating: HTMLElement | null;
36
+ } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
28
37
  context: {
29
- placement: import("@floating-ui/core").Placement;
30
- strategy: import("@floating-ui/core").Strategy;
31
- x: number | null;
32
- y: number | null;
38
+ placement: import("@floating-ui/utils").Placement;
39
+ strategy: import("@floating-ui/utils").Strategy;
40
+ x: number;
41
+ y: number;
33
42
  middlewareData: import("@floating-ui/core").MiddlewareData;
34
- update: () => void;
35
- reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
36
- floating: (node: HTMLElement | null) => void;
37
43
  isPositioned: boolean;
44
+ update: () => void;
45
+ floatingStyles: import("react").CSSProperties;
38
46
  open: boolean;
39
- onOpenChange: (open: boolean) => void;
47
+ onOpenChange: (open: boolean, event?: Event | undefined) => void;
40
48
  events: import("@floating-ui/react").FloatingEvents;
41
49
  dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
42
50
  nodeId: string | undefined;
@@ -44,9 +52,6 @@ export declare const usePopoverContext: () => {
44
52
  refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
45
53
  elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
46
54
  };
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
- isPositioned: boolean;
50
55
  getReferenceProps: (userProps?: import("react").HTMLProps<Element> | undefined) => Record<string, unknown>;
51
56
  getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
52
57
  getItemProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
@@ -17,27 +17,35 @@ export declare const usePopover: ({ initialOpen, placement, isModal, isOpen: con
17
17
  className?: string | undefined;
18
18
  dataTestId?: string | undefined;
19
19
  };
20
- placement: import("@floating-ui/react").Placement;
21
- strategy: import("@floating-ui/react").Strategy;
22
- middlewareData: import("@floating-ui/react").MiddlewareData;
23
- x: number | null;
24
- y: number | null;
20
+ placement: import("@floating-ui/utils").Placement;
21
+ strategy: import("@floating-ui/utils").Strategy;
22
+ middlewareData: import("@floating-ui/core").MiddlewareData;
23
+ x: number;
24
+ y: number;
25
+ isPositioned: boolean;
25
26
  update: () => void;
26
- reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
27
- floating: (node: HTMLElement | null) => void;
28
- positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
27
+ floatingStyles: import("react").CSSProperties;
28
+ refs: {
29
+ reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
30
+ floating: import("react").MutableRefObject<HTMLElement | null>;
31
+ setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
32
+ setFloating: (node: HTMLElement | null) => void;
33
+ } & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
34
+ elements: {
35
+ reference: import("@floating-ui/react-dom").ReferenceType | null;
36
+ floating: HTMLElement | null;
37
+ } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
29
38
  context: {
30
- placement: import("@floating-ui/react").Placement;
31
- strategy: import("@floating-ui/react").Strategy;
32
- x: number | null;
33
- y: number | null;
34
- middlewareData: import("@floating-ui/react").MiddlewareData;
35
- update: () => void;
36
- reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
37
- floating: (node: HTMLElement | null) => void;
39
+ placement: import("@floating-ui/utils").Placement;
40
+ strategy: import("@floating-ui/utils").Strategy;
41
+ x: number;
42
+ y: number;
43
+ middlewareData: import("@floating-ui/core").MiddlewareData;
38
44
  isPositioned: boolean;
45
+ update: () => void;
46
+ floatingStyles: import("react").CSSProperties;
39
47
  open: boolean;
40
- onOpenChange: (open: boolean) => void;
48
+ onOpenChange: (open: boolean, event?: Event | undefined) => void;
41
49
  events: import("@floating-ui/react").FloatingEvents;
42
50
  dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
43
51
  nodeId: string | undefined;
@@ -45,9 +53,6 @@ export declare const usePopover: ({ initialOpen, placement, isModal, isOpen: con
45
53
  refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
46
54
  elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
47
55
  };
48
- refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
49
- elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
50
- isPositioned: boolean;
51
56
  getReferenceProps: (userProps?: import("react").HTMLProps<Element> | undefined) => Record<string, unknown>;
52
57
  getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
53
58
  getItemProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
@@ -7,6 +7,7 @@ export * from "./useDebounce";
7
7
  export * from "./useDevicePixelRatio";
8
8
  export * from "./useHover";
9
9
  export * from "./useIsFirstRender";
10
+ export * from "./useIsTextCutOff";
10
11
  export * from "./useResize";
11
12
  export * from "./useTimeout";
12
13
  export * from "./useVisibilityChange";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Check if text is cut off.
3
+ *
4
+ * @param {HTMLElement| null} element The element to check.
5
+ * @returns {boolean} True if the text is cut off.
6
+ */
7
+ export declare const useIsTextCutOff: (element: HTMLElement | null) => boolean;