@trackunit/react-form-components 1.7.0 → 1.7.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/index.cjs.js +7 -0
- package/index.esm.js +7 -0
- package/package.json +9 -9
package/index.cjs.js
CHANGED
|
@@ -2192,6 +2192,13 @@ const useCustomComponents = ({ componentsProps, disabled, readOnly, setMenuIsEna
|
|
|
2192
2192
|
const tags = key === PLACEHOLDER_KEY ? [] : values;
|
|
2193
2193
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
2194
2194
|
const searchInput = props && props.children && props.children[1];
|
|
2195
|
+
const placeholderElement = Array.isArray(props.children)
|
|
2196
|
+
? props.children.find(child => child && child.key === "placeholder")
|
|
2197
|
+
: null;
|
|
2198
|
+
const shouldShowPlaceholder = !!placeholderElement && tags?.length === 0;
|
|
2199
|
+
if (shouldShowPlaceholder) {
|
|
2200
|
+
return (jsxRuntime.jsx(ReactSelect.components.ValueContainer, { ...props, isDisabled: props.selectProps.isDisabled, children: props.children }));
|
|
2201
|
+
}
|
|
2195
2202
|
return (jsxRuntime.jsx(ReactSelect.components.ValueContainer, { ...props, isDisabled: props.selectProps.isDisabled, children: maxSelectedDisplayCount === undefined ? (jsxRuntime.jsx(TagsContainer, { disabled: disabled, items: tags
|
|
2196
2203
|
? tags.map(({ props: tagProps }) => {
|
|
2197
2204
|
return {
|
package/index.esm.js
CHANGED
|
@@ -2191,6 +2191,13 @@ const useCustomComponents = ({ componentsProps, disabled, readOnly, setMenuIsEna
|
|
|
2191
2191
|
const tags = key === PLACEHOLDER_KEY ? [] : values;
|
|
2192
2192
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
2193
2193
|
const searchInput = props && props.children && props.children[1];
|
|
2194
|
+
const placeholderElement = Array.isArray(props.children)
|
|
2195
|
+
? props.children.find(child => child && child.key === "placeholder")
|
|
2196
|
+
: null;
|
|
2197
|
+
const shouldShowPlaceholder = !!placeholderElement && tags?.length === 0;
|
|
2198
|
+
if (shouldShowPlaceholder) {
|
|
2199
|
+
return (jsx(components.ValueContainer, { ...props, isDisabled: props.selectProps.isDisabled, children: props.children }));
|
|
2200
|
+
}
|
|
2194
2201
|
return (jsx(components.ValueContainer, { ...props, isDisabled: props.selectProps.isDisabled, children: maxSelectedDisplayCount === undefined ? (jsx(TagsContainer, { disabled: disabled, items: tags
|
|
2195
2202
|
? tags.map(({ props: tagProps }) => {
|
|
2196
2203
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-form-components",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -10,21 +10,21 @@
|
|
|
10
10
|
"react": "19.0.0",
|
|
11
11
|
"usehooks-ts": "^3.1.0",
|
|
12
12
|
"react-select": "^5.10.0",
|
|
13
|
-
"@js-temporal/polyfill": "^0.
|
|
13
|
+
"@js-temporal/polyfill": "^0.5.1",
|
|
14
14
|
"libphonenumber-js": "1.10.36",
|
|
15
15
|
"@testing-library/react": "16.2.0",
|
|
16
16
|
"jest-fetch-mock": "^3.0.3",
|
|
17
17
|
"zod": "^3.23.8",
|
|
18
18
|
"react-hook-form": "7.62.0",
|
|
19
19
|
"tailwind-merge": "^2.0.0",
|
|
20
|
-
"@trackunit/css-class-variance-utilities": "1.6.
|
|
21
|
-
"@trackunit/react-components": "1.7.
|
|
22
|
-
"@trackunit/ui-icons": "1.6.
|
|
23
|
-
"@trackunit/shared-utils": "1.8.
|
|
24
|
-
"@trackunit/ui-design-tokens": "1.6.
|
|
25
|
-
"@trackunit/i18n-library-translation": "1.6.
|
|
20
|
+
"@trackunit/css-class-variance-utilities": "1.6.24",
|
|
21
|
+
"@trackunit/react-components": "1.7.33",
|
|
22
|
+
"@trackunit/ui-icons": "1.6.23",
|
|
23
|
+
"@trackunit/shared-utils": "1.8.24",
|
|
24
|
+
"@trackunit/ui-design-tokens": "1.6.25",
|
|
25
|
+
"@trackunit/i18n-library-translation": "1.6.27",
|
|
26
26
|
"string-ts": "^2.0.0",
|
|
27
|
-
"@trackunit/react-test-setup": "1.3.
|
|
27
|
+
"@trackunit/react-test-setup": "1.3.24"
|
|
28
28
|
},
|
|
29
29
|
"module": "./index.esm.js",
|
|
30
30
|
"main": "./index.cjs.js",
|