@trackunit/react-components 0.1.194-alpha-500b40a315.0 → 0.1.195

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,29 +1,29 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.1.194-alpha-500b40a315.0",
3
+ "version": "0.1.195",
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
- "@trackunit/ui-design-tokens": "*",
11
- "react": "^18.2.0",
12
- "@trackunit/css-class-variance-utilities": "*",
13
- "react-use": "^17.4.0",
14
- "react-day-picker": "^8.7.1",
15
- "date-fns": "^2.29.3",
16
- "@floating-ui/react": "^0.25.4",
17
- "@trackunit/ui-icons": "*",
18
- "@trackunit/shared-utils": "*",
19
- "react-useportal": "1.0.18",
20
- "react-router-dom": "6.11.2",
21
- "react-helmet-async": "^1.3.0",
22
- "zod": "3.22.3",
10
+ "@floating-ui/react": "0.25.4",
11
+ "@trackunit/css-class-variance-utilities": "0.0.15",
12
+ "@trackunit/css-core": "0.0.99",
13
+ "@trackunit/shared-utils": "0.0.15",
14
+ "@trackunit/ui-design-tokens": "0.0.79",
15
+ "@trackunit/ui-icons": "0.0.79",
16
+ "date-fns": "2.29.3",
23
17
  "lodash": "4.17.21",
24
- "jest-fetch-mock": "^3.0.3",
25
- "@testing-library/react": "14.0.0"
18
+ "react": "18.2.0",
19
+ "react-day-picker": "8.7.1",
20
+ "react-helmet-async": "1.3.0",
21
+ "react-router-dom": "6.11.2",
22
+ "react-use": "17.4.0",
23
+ "react-useportal": "1.0.18",
24
+ "zod": "3.22.3"
26
25
  },
27
26
  "module": "./index.esm.js",
28
- "main": "./index.cjs.js"
27
+ "main": "./index.cjs.js",
28
+ "peerDependencies": {}
29
29
  }
@@ -54,6 +54,11 @@ export interface MenuItemProps extends CommonProps {
54
54
  * used in disabled select options
55
55
  */
56
56
  disabled?: boolean;
57
+ /**
58
+ * A boolean prop to stop propagation of onClick event
59
+ * used in Menu and Select components
60
+ */
61
+ stopPropagation?: boolean;
57
62
  }
58
63
  /**
59
64
  * The MenuItem component is used to display a menu, primarily meant to be used in a list form.
@@ -61,5 +66,5 @@ export interface MenuItemProps extends CommonProps {
61
66
  * @param {MenuItemProps} props - The props for the MenuItem component
62
67
  * @returns {JSX.Element} MenuItem component
63
68
  */
64
- export declare const MenuItem: ({ className, dataTestId, label, size, children, selected, focused, prefix, suffix, disabled, onClick, id, }: MenuItemProps) => JSX.Element;
69
+ export declare const MenuItem: ({ className, dataTestId, label, size, children, selected, focused, prefix, suffix, disabled, onClick, stopPropagation, id, }: MenuItemProps) => JSX.Element;
65
70
  export {};
@@ -19,6 +19,8 @@ export interface MenuListProps extends CommonProps {
19
19
  * @default false
20
20
  */
21
21
  withStickyHeader?: boolean;
22
+ /** Click handler - typically used to trigger close action. when propagation is NOT prevented on menuItem */
23
+ onClick?: () => void;
22
24
  }
23
25
  /**
24
26
  * The MenuList component is used for menus and selects.
@@ -0,0 +1,4 @@
1
+ import { RenderHookOptions } from "@testing-library/react";
2
+ declare const customRenderHook: <T, K>(callback: (props: T) => K, options?: RenderHookOptions<T, typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement> | undefined) => import("@testing-library/react").RenderHookResult<K, T>;
3
+ export * from "@testing-library/react";
4
+ export { customRenderHook as renderHook };
@@ -0,0 +1,5 @@
1
+ import { RenderOptions } from "@testing-library/react";
2
+ import * as React from "react";
3
+ declare const customRender: (ui: React.ReactElement, options?: Omit<RenderOptions, "queries">) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
4
+ export * from "@testing-library/react";
5
+ export { customRender as render };