@trackunit/react-form-components 0.1.56 → 0.1.58

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/index.cjs.js CHANGED
@@ -3,7 +3,7 @@
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
4
  var i18nLibraryTranslation = require('@trackunit/i18n-library-translation');
5
5
  var reactComponents = require('@trackunit/react-components');
6
- var reactUse = require('react-use');
6
+ var usehooksTs = require('usehooks-ts');
7
7
  var cssClassVarianceUtilities = require('@trackunit/css-class-variance-utilities');
8
8
  var React = require('react');
9
9
  var uuid = require('uuid');
@@ -134,7 +134,7 @@ const cvaActionContainer = cssClassVarianceUtilities.cvaMerge(["flex", "items-ce
134
134
  * @returns {JSX.Element} ActionButton component
135
135
  */
136
136
  const ActionButton = ({ type, value, dataTestId, iconSize, disabled, className }) => {
137
- const [, copyToClipboard] = reactUse.useCopyToClipboard();
137
+ const [, copyToClipboard] = usehooksTs.useCopyToClipboard();
138
138
  const getIconName = () => {
139
139
  switch (type) {
140
140
  case "PHONE_NUMBER":
@@ -2076,7 +2076,7 @@ const useCustomComponents = ({ componentsProps, disabled, readOnly, refMenuIsEna
2076
2076
  ...componentsProps,
2077
2077
  };
2078
2078
  // eslint-disable-next-line react-hooks/exhaustive-deps
2079
- }, [componentsProps, disabled, maxSelectedDisplayCount]); // do not add dropdownIcon (it will cause issue with opening/closing list for selects with custom icon)
2079
+ }, [componentsProps, disabled, maxSelectedDisplayCount, readOnly]); // do not add dropdownIcon (it will cause issue with opening/closing list for selects with custom icon)
2080
2080
  return customComponents;
2081
2081
  };
2082
2082
 
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useNamespaceTranslation, registerTranslations, NamespaceTrans } from '@trackunit/i18n-library-translation';
3
3
  import { IconButton, Icon, Tooltip, useIsTextCutOff, Heading, Text, MenuItem, Tag, Spinner, useIsFirstRender } from '@trackunit/react-components';
4
- import { useCopyToClipboard } from 'react-use';
4
+ import { useCopyToClipboard } from 'usehooks-ts';
5
5
  import { cvaMerge } from '@trackunit/css-class-variance-utilities';
6
6
  import * as React from 'react';
7
7
  import React__default, { isValidElement, forwardRef, useMemo, useState, useCallback, useRef, cloneElement, useEffect, useImperativeHandle } from 'react';
@@ -2057,7 +2057,7 @@ const useCustomComponents = ({ componentsProps, disabled, readOnly, refMenuIsEna
2057
2057
  ...componentsProps,
2058
2058
  };
2059
2059
  // eslint-disable-next-line react-hooks/exhaustive-deps
2060
- }, [componentsProps, disabled, maxSelectedDisplayCount]); // do not add dropdownIcon (it will cause issue with opening/closing list for selects with custom icon)
2060
+ }, [componentsProps, disabled, maxSelectedDisplayCount, readOnly]); // do not add dropdownIcon (it will cause issue with opening/closing list for selects with custom icon)
2061
2061
  return customComponents;
2062
2062
  };
2063
2063
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-form-components",
3
- "version": "0.1.56",
3
+ "version": "0.1.58",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -11,7 +11,7 @@
11
11
  "@trackunit/ui-icons": "*",
12
12
  "react": "18.3.1",
13
13
  "uuid": "^9.0.1",
14
- "react-use": "^17.4.0",
14
+ "usehooks-ts": "^3.1.0",
15
15
  "date-fns": "^2.30.0",
16
16
  "react-select": "^5.8.0",
17
17
  "libphonenumber-js": "1.10.36",