@trackunit/react-form-components 1.4.38 → 1.4.40
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 +6 -6
- package/index.esm.js +6 -6
- package/package.json +2 -2
package/index.cjs.js
CHANGED
|
@@ -184,7 +184,7 @@ const cvaInputBase = cssClassVarianceUtilities.cvaMerge([
|
|
|
184
184
|
"hover:bg-slate-50",
|
|
185
185
|
"transition",
|
|
186
186
|
]);
|
|
187
|
-
const cvaInputBaseDisabled = cssClassVarianceUtilities.cvaMerge(["bg-
|
|
187
|
+
const cvaInputBaseDisabled = cssClassVarianceUtilities.cvaMerge(["bg-neutral-100", "hover:bg-neutral-100", "hover:border-neutral-300"]);
|
|
188
188
|
const cvaInputBaseInvalid = cssClassVarianceUtilities.cvaMerge(["border-danger-600"]);
|
|
189
189
|
const cvaInput$1 = cssClassVarianceUtilities.cvaMerge([
|
|
190
190
|
"overflow-hidden",
|
|
@@ -1910,7 +1910,7 @@ const cvaSelect = cssClassVarianceUtilities.cvaMerge([
|
|
|
1910
1910
|
"rounded-lg",
|
|
1911
1911
|
"border-slate-300",
|
|
1912
1912
|
"hover:border-slate-400",
|
|
1913
|
-
"hover:bg-
|
|
1913
|
+
"hover:bg-neutral-50",
|
|
1914
1914
|
"bg-white",
|
|
1915
1915
|
"transition",
|
|
1916
1916
|
"text-sm",
|
|
@@ -1927,7 +1927,7 @@ const cvaSelect = cssClassVarianceUtilities.cvaMerge([
|
|
|
1927
1927
|
false: "",
|
|
1928
1928
|
},
|
|
1929
1929
|
disabled: {
|
|
1930
|
-
true: "!bg-
|
|
1930
|
+
true: "!bg-neutral-100 hover:border-slate-300",
|
|
1931
1931
|
false: "",
|
|
1932
1932
|
},
|
|
1933
1933
|
},
|
|
@@ -1939,7 +1939,7 @@ const cvaSelect = cssClassVarianceUtilities.cvaMerge([
|
|
|
1939
1939
|
const cvaSelectControl = cssClassVarianceUtilities.cvaMerge([], {
|
|
1940
1940
|
variants: {
|
|
1941
1941
|
isDisabled: {
|
|
1942
|
-
true: "!bg-
|
|
1942
|
+
true: "!bg-neutral-100",
|
|
1943
1943
|
false: "",
|
|
1944
1944
|
},
|
|
1945
1945
|
prefix: {
|
|
@@ -2045,7 +2045,7 @@ const TagWithWidth = ({ onWidthKnown, children, ...rest }) => {
|
|
|
2045
2045
|
* @param {TagsContainerProps} props - The props for the TagContainer
|
|
2046
2046
|
* @returns {ReactElement} TagsContainer
|
|
2047
2047
|
*/
|
|
2048
|
-
const TagsContainer = ({ items, width = "100%", itemsGap =
|
|
2048
|
+
const TagsContainer = ({ items, width = "100%", itemsGap = 6, postFix, disabled }) => {
|
|
2049
2049
|
const containerRef = react.useRef(null);
|
|
2050
2050
|
const [isReady, setIsReady] = react.useState(false);
|
|
2051
2051
|
const [counterWidth, setCounterWidth] = react.useState(0);
|
|
@@ -2098,7 +2098,7 @@ const TagsContainer = ({ items, width = "100%", itemsGap = 5, postFix, disabled
|
|
|
2098
2098
|
...acc,
|
|
2099
2099
|
elements: [
|
|
2100
2100
|
...acc.elements,
|
|
2101
|
-
jsxRuntime.jsx(TagWithWidth, { className: "inline-flex shrink-0", color: item.disabled ? "
|
|
2101
|
+
jsxRuntime.jsx(TagWithWidth, { className: "inline-flex shrink-0", color: item.disabled ? "neutral" : "white", dataTestId: `${item.text}-tag`, disabled: disabled, onClose: e => {
|
|
2102
2102
|
e.stopPropagation();
|
|
2103
2103
|
item.onClick();
|
|
2104
2104
|
}, onWidthKnown: onWidthKnownHandler, children: item.text }, item.text + index),
|
package/index.esm.js
CHANGED
|
@@ -183,7 +183,7 @@ const cvaInputBase = cvaMerge([
|
|
|
183
183
|
"hover:bg-slate-50",
|
|
184
184
|
"transition",
|
|
185
185
|
]);
|
|
186
|
-
const cvaInputBaseDisabled = cvaMerge(["bg-
|
|
186
|
+
const cvaInputBaseDisabled = cvaMerge(["bg-neutral-100", "hover:bg-neutral-100", "hover:border-neutral-300"]);
|
|
187
187
|
const cvaInputBaseInvalid = cvaMerge(["border-danger-600"]);
|
|
188
188
|
const cvaInput$1 = cvaMerge([
|
|
189
189
|
"overflow-hidden",
|
|
@@ -1909,7 +1909,7 @@ const cvaSelect = cvaMerge([
|
|
|
1909
1909
|
"rounded-lg",
|
|
1910
1910
|
"border-slate-300",
|
|
1911
1911
|
"hover:border-slate-400",
|
|
1912
|
-
"hover:bg-
|
|
1912
|
+
"hover:bg-neutral-50",
|
|
1913
1913
|
"bg-white",
|
|
1914
1914
|
"transition",
|
|
1915
1915
|
"text-sm",
|
|
@@ -1926,7 +1926,7 @@ const cvaSelect = cvaMerge([
|
|
|
1926
1926
|
false: "",
|
|
1927
1927
|
},
|
|
1928
1928
|
disabled: {
|
|
1929
|
-
true: "!bg-
|
|
1929
|
+
true: "!bg-neutral-100 hover:border-slate-300",
|
|
1930
1930
|
false: "",
|
|
1931
1931
|
},
|
|
1932
1932
|
},
|
|
@@ -1938,7 +1938,7 @@ const cvaSelect = cvaMerge([
|
|
|
1938
1938
|
const cvaSelectControl = cvaMerge([], {
|
|
1939
1939
|
variants: {
|
|
1940
1940
|
isDisabled: {
|
|
1941
|
-
true: "!bg-
|
|
1941
|
+
true: "!bg-neutral-100",
|
|
1942
1942
|
false: "",
|
|
1943
1943
|
},
|
|
1944
1944
|
prefix: {
|
|
@@ -2044,7 +2044,7 @@ const TagWithWidth = ({ onWidthKnown, children, ...rest }) => {
|
|
|
2044
2044
|
* @param {TagsContainerProps} props - The props for the TagContainer
|
|
2045
2045
|
* @returns {ReactElement} TagsContainer
|
|
2046
2046
|
*/
|
|
2047
|
-
const TagsContainer = ({ items, width = "100%", itemsGap =
|
|
2047
|
+
const TagsContainer = ({ items, width = "100%", itemsGap = 6, postFix, disabled }) => {
|
|
2048
2048
|
const containerRef = useRef(null);
|
|
2049
2049
|
const [isReady, setIsReady] = useState(false);
|
|
2050
2050
|
const [counterWidth, setCounterWidth] = useState(0);
|
|
@@ -2097,7 +2097,7 @@ const TagsContainer = ({ items, width = "100%", itemsGap = 5, postFix, disabled
|
|
|
2097
2097
|
...acc,
|
|
2098
2098
|
elements: [
|
|
2099
2099
|
...acc.elements,
|
|
2100
|
-
jsx(TagWithWidth, { className: "inline-flex shrink-0", color: item.disabled ? "
|
|
2100
|
+
jsx(TagWithWidth, { className: "inline-flex shrink-0", color: item.disabled ? "neutral" : "white", dataTestId: `${item.text}-tag`, disabled: disabled, onClose: e => {
|
|
2101
2101
|
e.stopPropagation();
|
|
2102
2102
|
item.onClick();
|
|
2103
2103
|
}, onWidthKnown: onWidthKnownHandler, children: item.text }, item.text + index),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-form-components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.40",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"react-hook-form": "7.53.1",
|
|
19
19
|
"tailwind-merge": "^2.0.0",
|
|
20
20
|
"@trackunit/css-class-variance-utilities": "1.4.21",
|
|
21
|
-
"@trackunit/react-components": "1.5.
|
|
21
|
+
"@trackunit/react-components": "1.5.36",
|
|
22
22
|
"@trackunit/ui-icons": "1.4.21",
|
|
23
23
|
"@trackunit/shared-utils": "1.6.21",
|
|
24
24
|
"@trackunit/ui-design-tokens": "1.4.23",
|