diff --git a/.storybook/decorators/withTheme.tsx b/.storybook/decorators/withTheme.tsx index 69eebfb0..587c6478 100644 --- a/.storybook/decorators/withTheme.tsx +++ b/.storybook/decorators/withTheme.tsx @@ -2,13 +2,13 @@ import React from 'react'; import type {DecoratorFn} from '@storybook/react'; -import {ThemeProvider} from '@gravity-ui/uikit'; +import {Provider} from '@gravity-ui/uikit'; import '@gravity-ui/uikit/styles/styles.scss'; import './styles.scss'; export const withTheme: DecoratorFn = (Story, context) => ( - + - + ); diff --git a/package-lock.json b/package-lock.json index ad564eab..efee0bee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,9 +14,12 @@ "@gravity-ui/date-utils": "^2.7.1", "@gravity-ui/i18n": "^1.8.0", "@gravity-ui/icons": "^2.22.0", + "@hello-pangea/dnd": "^18.0.1", "decimal.js": "^10.6.0", "json-schema-library": "^11.6.2", "lodash": "^4.18.1", + "react-virtualized-auto-sizer": "^1.0.26", + "react-window": "^1.8.11", "uuid": "^14.0.1" }, "devDependencies": { @@ -28,7 +31,7 @@ "@gravity-ui/prettier-config": "^1.1.0", "@gravity-ui/stylelint-config": "^4.0.1", "@gravity-ui/tsconfig": "^1.0.0", - "@gravity-ui/uikit": "^7.41.0", + "@gravity-ui/uikit": "8.0.0-beta.1", "@playwright/experimental-ct-react": "^1.40.0", "@playwright/test": "^1.40.0", "@storybook/addon-essentials": "^8.6.4", @@ -81,12 +84,12 @@ "typescript": "^5.8.4" }, "peerDependencies": { - "@gravity-ui/uikit": "^7.0.0", + "@gravity-ui/uikit": "^8.0.0-beta.1", "final-form": "^4.20.2", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0", "react-final-form": "^6.5.3", - "react-is": "^17.0.0 || ^18.0.0 || ^19.0.0" + "react-is": "^18.0.0 || ^19.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -2197,7 +2200,6 @@ "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -3595,9 +3597,9 @@ "dev": true }, "node_modules/@gravity-ui/uikit": { - "version": "7.41.0", - "resolved": "https://registry.npmjs.org/@gravity-ui/uikit/-/uikit-7.41.0.tgz", - "integrity": "sha512-nJbeAzOVrEiqMzFAo/hN3oa4YCO+8jIrT6z1q2rdl/MJDGXNHkkEveQYWGNUqz6x8mUatnpjfGPBTdhm0NN1UQ==", + "version": "8.0.0-beta.1", + "resolved": "https://registry.npmjs.org/@gravity-ui/uikit/-/uikit-8.0.0-beta.1.tgz", + "integrity": "sha512-8cQzm90ais35cP5jRNdcZlzIE0kK4UT/Klzvv5VLspz+TgRBrNoKx3wMOPdmLbfM1QstJPSFe93fz4LrCXvl7g==", "dev": true, "license": "MIT", "dependencies": { @@ -3605,29 +3607,45 @@ "@floating-ui/react": "^0.27.16", "@gravity-ui/i18n": "^1.8.0", "@gravity-ui/icons": "^2.16.0", - "@hello-pangea/dnd": "^18.0.1", - "@tanstack/react-virtual": "^3.13.12", "@uiw/react-color": "^2.9.2", "blueimp-md5": "^2.19.0", - "lodash": "^4.17.21", + "es-toolkit": "^1.47.1", "rc-slider": "^11.1.9", "react-transition-group": "^4.4.5", - "react-virtualized-auto-sizer": "^1.0.26", - "react-window": "^1.8.11", "tabbable": "^6.2.0", - "tslib": "^2.8.1", - "use-sync-external-store": "^1.6.0" + "tslib": "^2.8.1" }, "peerDependencies": { - "react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + "@hello-pangea/dnd": "^18", + "@tanstack/react-virtual": "^3", + "@types/react": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0", + "react-virtualized-auto-sizer": "^1", + "react-window": "^1" + }, + "peerDependenciesMeta": { + "@hello-pangea/dnd": { + "optional": true + }, + "@tanstack/react-virtual": { + "optional": true + }, + "@types/react": { + "optional": true + }, + "react-virtualized-auto-sizer": { + "optional": true + }, + "react-window": { + "optional": true + } } }, "node_modules/@hello-pangea/dnd": { "version": "18.0.1", "resolved": "https://registry.npmjs.org/@hello-pangea/dnd/-/dnd-18.0.1.tgz", "integrity": "sha512-xojVWG8s/TGrKT1fC8K2tIWeejJYTAeJuj36zM//yEm/ZrnZUSFGS15BpO+jGZT1ybWvyXmeDJwPYb4dhWlbZQ==", - "dev": true, "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.26.7", @@ -5765,35 +5783,6 @@ "@swc/counter": "^0.1.3" } }, - "node_modules/@tanstack/react-virtual": { - "version": "3.13.12", - "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.13.12.tgz", - "integrity": "sha512-Gd13QdxPSukP8ZrkbgS2RwoZseTTbQPLnQEn7HY/rqtM+8Zt95f7xKC7N0EsKs7aoz0WzZ+fditZux+F8EzYxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@tanstack/virtual-core": "3.13.12" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, - "node_modules/@tanstack/virtual-core": { - "version": "3.13.12", - "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.13.12.tgz", - "integrity": "sha512-1YBOJfRHV4sXUmWsFSf5rQor4Ss82G8dQWLRbnk3GA4jeP8hQt1hxXh0tmflpC0dz3VgEv/1+qwPyLeWkQuPFA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, "node_modules/@testing-library/dom": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.0.1.tgz", @@ -6366,7 +6355,6 @@ "version": "0.0.6", "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz", "integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==", - "dev": true, "license": "MIT" }, "node_modules/@types/uuid": { @@ -9307,7 +9295,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/css-box-model/-/css-box-model-1.2.1.tgz", "integrity": "sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw==", - "dev": true, "license": "MIT", "dependencies": { "tiny-invariant": "^1.0.6" @@ -10368,6 +10355,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-toolkit": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.52.0.tgz", + "integrity": "sha512-XTNEJQh1tY1ZJVcf6ayP/2n4ZPyaHlW2FWs7xvw5ddPuhUVjLD3olQVQS7kf58JbAB48iL0uL/jerTrjtV3lDA==", + "dev": true, + "license": "MIT", + "workspaces": [ + "docs", + "benchmarks", + "tests/types", + "tests/browser-compat" + ] + }, "node_modules/es5-ext": { "version": "0.10.62", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", @@ -17685,8 +17685,7 @@ "node_modules/memoize-one": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", - "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==", - "dev": true + "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" }, "node_modules/memoizerific": { "version": "1.11.3", @@ -19639,7 +19638,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/raf-schd/-/raf-schd-4.0.3.tgz", "integrity": "sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==", - "dev": true, "license": "MIT" }, "node_modules/randexp": { @@ -19848,7 +19846,6 @@ "version": "9.2.0", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz", "integrity": "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==", - "dev": true, "license": "MIT", "dependencies": { "@types/use-sync-external-store": "^0.0.6", @@ -19888,7 +19885,6 @@ "version": "1.0.26", "resolved": "https://registry.npmjs.org/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.26.tgz", "integrity": "sha512-CblNyiNVw2o+hsa5/49NH2ogGxZ+t+3aweRvNSq7TVjDIlwk7ir4lencEg5HxHeSzwNarSkNkiu0qJSOXtxm5A==", - "dev": true, "license": "MIT", "peerDependencies": { "react": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0 || ^19.0.0", @@ -19899,7 +19895,7 @@ "version": "1.8.11", "resolved": "https://registry.npmjs.org/react-window/-/react-window-1.8.11.tgz", "integrity": "sha512-+SRbUVT2scadgFSWx+R1P754xHPEqvcfSfVX10QYg6POOz+WNgkN48pS+BtZNIMGiL1HYrSEiCkwsMS15QogEQ==", - "dev": true, + "license": "MIT", "dependencies": { "@babel/runtime": "^7.0.0", "memoize-one": ">=3.1.1 <6" @@ -20024,7 +20020,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", - "dev": true, "license": "MIT" }, "node_modules/reflect.getprototypeof": { @@ -22418,7 +22413,6 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", - "dev": true, "license": "MIT" }, "node_modules/tinyexec": { @@ -23160,7 +23154,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", - "dev": true, "license": "MIT", "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" @@ -25857,8 +25850,7 @@ "@babel/runtime": { "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", - "dev": true + "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==" }, "@babel/template": { "version": "7.26.9", @@ -26701,34 +26693,28 @@ "dev": true }, "@gravity-ui/uikit": { - "version": "7.41.0", - "resolved": "https://registry.npmjs.org/@gravity-ui/uikit/-/uikit-7.41.0.tgz", - "integrity": "sha512-nJbeAzOVrEiqMzFAo/hN3oa4YCO+8jIrT6z1q2rdl/MJDGXNHkkEveQYWGNUqz6x8mUatnpjfGPBTdhm0NN1UQ==", + "version": "8.0.0-beta.1", + "resolved": "https://registry.npmjs.org/@gravity-ui/uikit/-/uikit-8.0.0-beta.1.tgz", + "integrity": "sha512-8cQzm90ais35cP5jRNdcZlzIE0kK4UT/Klzvv5VLspz+TgRBrNoKx3wMOPdmLbfM1QstJPSFe93fz4LrCXvl7g==", "dev": true, "requires": { "@bem-react/classname": "^1.7.0", "@floating-ui/react": "^0.27.16", "@gravity-ui/i18n": "^1.8.0", "@gravity-ui/icons": "^2.16.0", - "@hello-pangea/dnd": "^18.0.1", - "@tanstack/react-virtual": "^3.13.12", "@uiw/react-color": "^2.9.2", "blueimp-md5": "^2.19.0", - "lodash": "^4.17.21", + "es-toolkit": "^1.47.1", "rc-slider": "^11.1.9", "react-transition-group": "^4.4.5", - "react-virtualized-auto-sizer": "^1.0.26", - "react-window": "^1.8.11", "tabbable": "^6.2.0", - "tslib": "^2.8.1", - "use-sync-external-store": "^1.6.0" + "tslib": "^2.8.1" } }, "@hello-pangea/dnd": { "version": "18.0.1", "resolved": "https://registry.npmjs.org/@hello-pangea/dnd/-/dnd-18.0.1.tgz", "integrity": "sha512-xojVWG8s/TGrKT1fC8K2tIWeejJYTAeJuj36zM//yEm/ZrnZUSFGS15BpO+jGZT1ybWvyXmeDJwPYb4dhWlbZQ==", - "dev": true, "requires": { "@babel/runtime": "^7.26.7", "css-box-model": "^1.2.1", @@ -28094,21 +28080,6 @@ "@swc/counter": "^0.1.3" } }, - "@tanstack/react-virtual": { - "version": "3.13.12", - "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.13.12.tgz", - "integrity": "sha512-Gd13QdxPSukP8ZrkbgS2RwoZseTTbQPLnQEn7HY/rqtM+8Zt95f7xKC7N0EsKs7aoz0WzZ+fditZux+F8EzYxA==", - "dev": true, - "requires": { - "@tanstack/virtual-core": "3.13.12" - } - }, - "@tanstack/virtual-core": { - "version": "3.13.12", - "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.13.12.tgz", - "integrity": "sha512-1YBOJfRHV4sXUmWsFSf5rQor4Ss82G8dQWLRbnk3GA4jeP8hQt1hxXh0tmflpC0dz3VgEv/1+qwPyLeWkQuPFA==", - "dev": true - }, "@testing-library/dom": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.0.1.tgz", @@ -28589,8 +28560,7 @@ "@types/use-sync-external-store": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz", - "integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==", - "dev": true + "integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==" }, "@types/uuid": { "version": "9.0.4", @@ -30679,7 +30649,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/css-box-model/-/css-box-model-1.2.1.tgz", "integrity": "sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw==", - "dev": true, "requires": { "tiny-invariant": "^1.0.6" } @@ -31494,6 +31463,12 @@ "is-symbol": "^1.0.4" } }, + "es-toolkit": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.52.0.tgz", + "integrity": "sha512-XTNEJQh1tY1ZJVcf6ayP/2n4ZPyaHlW2FWs7xvw5ddPuhUVjLD3olQVQS7kf58JbAB48iL0uL/jerTrjtV3lDA==", + "dev": true + }, "es5-ext": { "version": "0.10.62", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", @@ -36983,8 +36958,7 @@ "memoize-one": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", - "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==", - "dev": true + "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" }, "memoizerific": { "version": "1.11.3", @@ -38394,8 +38368,7 @@ "raf-schd": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/raf-schd/-/raf-schd-4.0.3.tgz", - "integrity": "sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==", - "dev": true + "integrity": "sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==" }, "randexp": { "version": "0.5.3", @@ -38546,7 +38519,6 @@ "version": "9.2.0", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz", "integrity": "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==", - "dev": true, "requires": { "@types/use-sync-external-store": "^0.0.6", "use-sync-external-store": "^1.4.0" @@ -38567,14 +38539,12 @@ "react-virtualized-auto-sizer": { "version": "1.0.26", "resolved": "https://registry.npmjs.org/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.26.tgz", - "integrity": "sha512-CblNyiNVw2o+hsa5/49NH2ogGxZ+t+3aweRvNSq7TVjDIlwk7ir4lencEg5HxHeSzwNarSkNkiu0qJSOXtxm5A==", - "dev": true + "integrity": "sha512-CblNyiNVw2o+hsa5/49NH2ogGxZ+t+3aweRvNSq7TVjDIlwk7ir4lencEg5HxHeSzwNarSkNkiu0qJSOXtxm5A==" }, "react-window": { "version": "1.8.11", "resolved": "https://registry.npmjs.org/react-window/-/react-window-1.8.11.tgz", "integrity": "sha512-+SRbUVT2scadgFSWx+R1P754xHPEqvcfSfVX10QYg6POOz+WNgkN48pS+BtZNIMGiL1HYrSEiCkwsMS15QogEQ==", - "dev": true, "requires": { "@babel/runtime": "^7.0.0", "memoize-one": ">=3.1.1 <6" @@ -38660,8 +38630,7 @@ "redux": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", - "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", - "dev": true + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==" }, "reflect.getprototypeof": { "version": "1.0.10", @@ -40433,8 +40402,7 @@ "tiny-invariant": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", - "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", - "dev": true + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==" }, "tinyexec": { "version": "1.0.2", @@ -40967,8 +40935,7 @@ "use-sync-external-store": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", - "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", - "dev": true + "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==" }, "util": { "version": "0.12.5", diff --git a/package.json b/package.json index abafd63f..bbeed9d2 100644 --- a/package.json +++ b/package.json @@ -49,9 +49,12 @@ "@gravity-ui/date-utils": "^2.7.1", "@gravity-ui/i18n": "^1.8.0", "@gravity-ui/icons": "^2.22.0", + "@hello-pangea/dnd": "^18.0.1", "decimal.js": "^10.6.0", "json-schema-library": "^11.6.2", "lodash": "^4.18.1", + "react-virtualized-auto-sizer": "^1.0.26", + "react-window": "^1.8.11", "uuid": "^14.0.1" }, "devDependencies": { @@ -63,7 +66,7 @@ "@gravity-ui/prettier-config": "^1.1.0", "@gravity-ui/stylelint-config": "^4.0.1", "@gravity-ui/tsconfig": "^1.0.0", - "@gravity-ui/uikit": "^7.41.0", + "@gravity-ui/uikit": "8.0.0-beta.1", "@playwright/experimental-ct-react": "^1.40.0", "@playwright/test": "^1.40.0", "@storybook/addon-essentials": "^8.6.4", @@ -116,12 +119,12 @@ "typescript": "^5.8.4" }, "peerDependencies": { - "@gravity-ui/uikit": "^7.0.0", + "@gravity-ui/uikit": "^8.0.0-beta.1", "final-form": "^4.20.2", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0", "react-final-form": "^6.5.3", - "react-is": "^17.0.0 || ^18.0.0 || ^19.0.0" + "react-is": "^18.0.0 || ^19.0.0" }, "nano-staged": { "*.{scss}": [ diff --git a/playwright/playwright/index.tsx b/playwright/playwright/index.tsx index ec55afd1..a899f24e 100644 --- a/playwright/playwright/index.tsx +++ b/playwright/playwright/index.tsx @@ -1,13 +1,7 @@ import React from 'react'; +import {Provider, Toaster, ToasterComponent, ToasterProvider} from '@gravity-ui/uikit'; import {beforeMount} from '@playwright/experimental-ct-react/hooks'; -import { - MobileProvider, - ThemeProvider, - Toaster, - ToasterComponent, - ToasterProvider, -} from '@gravity-ui/uikit'; import './index.scss'; @@ -15,13 +9,11 @@ const toaster = new Toaster(); beforeMount(async ({App}) => { return ( - - - - - - - - + + + + + + ); }); diff --git a/src/lib/core/components/Form/__tests__/DynamicField.test.tsx b/src/lib/core/components/Form/__tests__/DynamicField.test.tsx index 8de87459..49beaad5 100644 --- a/src/lib/core/components/Form/__tests__/DynamicField.test.tsx +++ b/src/lib/core/components/Form/__tests__/DynamicField.test.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import {ThemeProvider} from '@gravity-ui/uikit'; +import {Provider} from '@gravity-ui/uikit'; import {act, render} from '@testing-library/react'; import type {FormApi} from 'final-form'; import noop from 'lodash/noop'; @@ -163,7 +163,7 @@ test('Form/hooks/DynamicField', () => { let form = null as FormApi | null; render( - +
{() => { const Caller = () => { @@ -185,7 +185,7 @@ test('Form/hooks/DynamicField', () => { ); }}
-
, + , ); const value = { @@ -443,11 +443,11 @@ test('warns about spec property keys containing dots', () => { }; render( - +
{() => } -
, + , ); expect(warn).toHaveBeenCalledTimes(1); @@ -464,11 +464,11 @@ test('does not warn when spec property keys have no dots', () => { const warn = jest.spyOn(console, 'warn').mockImplementation(() => {}); render( - +
{() => } -
, + , ); expect(warn).not.toHaveBeenCalled(); diff --git a/src/lib/core/components/Form/hooks/__tests__/useSearch.test.tsx b/src/lib/core/components/Form/hooks/__tests__/useSearch.test.tsx index aec4b98a..48d6e062 100644 --- a/src/lib/core/components/Form/hooks/__tests__/useSearch.test.tsx +++ b/src/lib/core/components/Form/hooks/__tests__/useSearch.test.tsx @@ -1,5 +1,6 @@ import React from 'react'; +import {Provider} from '@gravity-ui/uikit'; import {render} from '@testing-library/react'; import noop from 'lodash/noop'; import {Form} from 'react-final-form'; @@ -56,6 +57,7 @@ describe('Form/hooks/useSearch', () => { /> )} , + {wrapper: Provider}, ); expect(mirror.field.useSearchStore?.store).toMatchObject({ diff --git a/src/lib/kit/components/Card/__tests__/helpers.ts b/src/lib/kit/components/Card/__tests__/helpers.ts index beeb7c4a..37371334 100644 --- a/src/lib/kit/components/Card/__tests__/helpers.ts +++ b/src/lib/kit/components/Card/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {ArraySpec, FormValue, ObjectSpec} from '../../../../core'; -import {SpecTypes} from '../../../../core'; +import {SpecTypes} from '../../../../core/constants'; export const ACCORDEON_CARD: Record = { arraySpec: { diff --git a/src/lib/kit/components/Inputs/ArrayBase/__tests__/helpers.tsx b/src/lib/kit/components/Inputs/ArrayBase/__tests__/helpers.tsx index a8599c53..8868b90f 100644 --- a/src/lib/kit/components/Inputs/ArrayBase/__tests__/helpers.tsx +++ b/src/lib/kit/components/Inputs/ArrayBase/__tests__/helpers.tsx @@ -3,7 +3,7 @@ import React from 'react'; import {DynamicForm as BaseDynamicForm} from '~playwright/core/DynamicForm'; import type {ArraySpec, FormValue, Spec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const ARRAY_BASE: Record = { default: { diff --git a/src/lib/kit/components/Inputs/CardOneOf/__tests__/helpers.ts b/src/lib/kit/components/Inputs/CardOneOf/__tests__/helpers.ts index 31184d2e..51981d4c 100644 --- a/src/lib/kit/components/Inputs/CardOneOf/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/CardOneOf/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const CARD_ONEOF: Record = { default: { diff --git a/src/lib/kit/components/Inputs/Checkbox/__tests__/helpers.ts b/src/lib/kit/components/Inputs/Checkbox/__tests__/helpers.ts index 76c126f4..7359cf7a 100644 --- a/src/lib/kit/components/Inputs/Checkbox/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/Checkbox/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {BooleanSpec, FormValue} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const CHECKBOX: Record = { default: { diff --git a/src/lib/kit/components/Inputs/CheckboxGroup/__tests__/helpers.ts b/src/lib/kit/components/Inputs/CheckboxGroup/__tests__/helpers.ts index e9d72b2f..4af3440a 100644 --- a/src/lib/kit/components/Inputs/CheckboxGroup/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/CheckboxGroup/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {ArraySpec, FormValue} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const CHECKBOX_GROUP: Record = { default: { diff --git a/src/lib/kit/components/Inputs/ColorPicker/ColorPicker.tsx b/src/lib/kit/components/Inputs/ColorPicker/ColorPicker.tsx index dafac9ed..2136ab94 100644 --- a/src/lib/kit/components/Inputs/ColorPicker/ColorPicker.tsx +++ b/src/lib/kit/components/Inputs/ColorPicker/ColorPicker.tsx @@ -1,26 +1,17 @@ import React from 'react'; -import {unstable_ColorPicker as ColorPickerBase} from '@gravity-ui/uikit/unstable'; +import {ColorPicker as ColorPickerBase} from '@gravity-ui/uikit'; import type {StringInput} from '../../../../core'; /** - * Props forwarded to the underlying `unstable_ColorPicker` from `@gravity-ui/uikit/unstable`. - * - * NOTE: The underlying uikit component is marked as **unstable** — its API and behavior - * may change in future uikit releases without following semver. Use with that in mind. - * - * @see https://preview.gravity-ui.com/uikit/?path=/docs/lab-colorpicker--docs + * Props forwarded to the underlying `ColorPicker` from `@gravity-ui/uikit`. */ export interface ColorPickerProps extends Omit, 'value' | 'onUpdate' | 'disabled'> {} /** * Dynamic-forms input that renders a color picker for `StringSpec`. - * - * Wraps `unstable_ColorPicker` from `@gravity-ui/uikit/unstable`. Because the underlying - * uikit component is **unstable**, the visual appearance, available `inputProps`, and - * supported color formats may change between uikit releases. */ export const ColorPicker: StringInput = ({input, spec, inputProps}) => { const {value, onChange, onBlur, onFocus} = input; diff --git a/src/lib/kit/components/Inputs/ColorPicker/__tests__/helpers.ts b/src/lib/kit/components/Inputs/ColorPicker/__tests__/helpers.ts index 189e3da6..8137421c 100644 --- a/src/lib/kit/components/Inputs/ColorPicker/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/ColorPicker/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, StringSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const COLOR_PICKER: Record = { default: { diff --git a/src/lib/kit/components/Inputs/DateInput/__tests__/helpers.ts b/src/lib/kit/components/Inputs/DateInput/__tests__/helpers.ts index 1db6e09b..4dd45fcc 100644 --- a/src/lib/kit/components/Inputs/DateInput/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/DateInput/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, StringSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const DATE_INPUT: Record = { default: { diff --git a/src/lib/kit/components/Inputs/FileInput/__tests__/helpers.ts b/src/lib/kit/components/Inputs/FileInput/__tests__/helpers.ts index 28417952..b0df9a76 100644 --- a/src/lib/kit/components/Inputs/FileInput/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/FileInput/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, StringSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const FILE_INPUT: Record = { default: { diff --git a/src/lib/kit/components/Inputs/MonacoInput/MonacoInputDialog.tsx b/src/lib/kit/components/Inputs/MonacoInput/MonacoInputDialog.tsx index be39f6bc..b4d2bd91 100644 --- a/src/lib/kit/components/Inputs/MonacoInput/MonacoInputDialog.tsx +++ b/src/lib/kit/components/Inputs/MonacoInput/MonacoInputDialog.tsx @@ -52,6 +52,15 @@ export const MonacoInputDialog: React.FC = ({ onClose(); }, [onChange, onClose, value]); + const handleOpenChange = React.useCallback( + (open: boolean) => { + if (!open) { + handleClose(); + } + }, + [handleClose], + ); + const options = useMonacoOptions(fontSize, false); if (!MonacoEditor) { @@ -59,7 +68,7 @@ export const MonacoInputDialog: React.FC = ({ } return ( - +
diff --git a/src/lib/kit/components/Inputs/MultiOneOf/__tests__/helpers.ts b/src/lib/kit/components/Inputs/MultiOneOf/__tests__/helpers.ts index 1ea23f0e..bd6c0146 100644 --- a/src/lib/kit/components/Inputs/MultiOneOf/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/MultiOneOf/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const MULTI_ONEOF: Record = { default: { diff --git a/src/lib/kit/components/Inputs/MultiSelect/MultiSelect.tsx b/src/lib/kit/components/Inputs/MultiSelect/MultiSelect.tsx index 2792829a..19fd7a82 100644 --- a/src/lib/kit/components/Inputs/MultiSelect/MultiSelect.tsx +++ b/src/lib/kit/components/Inputs/MultiSelect/MultiSelect.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import type {SelectProps as SelectBaseProps} from '@gravity-ui/uikit'; +import type {SelectProps as SelectBaseProps, SelectOptionProps} from '@gravity-ui/uikit'; import {Select, Text} from '@gravity-ui/uikit'; import type {ArrayInput, FieldArrayValue} from '../../../../core'; @@ -44,7 +44,6 @@ export const MultiSelect: ArrayInput = ({name, input, spec, in return { id: value, value, - text, content: spec.viewSpec.selectParams?.meta?.[value] ? (
{text} @@ -71,6 +70,11 @@ export const MultiSelect: ArrayInput = ({name, input, spec, in return {option.content || option.value}; }, []); + const getOptionText: SelectBaseProps['getOptionText'] = React.useCallback( + (option: SelectOptionProps) => spec.description?.[option.value] || option.value, + [spec.description], + ); + const getOptionHeight = React.useCallback(() => { if (spec.viewSpec.selectParams?.meta) { return 44; @@ -118,6 +122,7 @@ export const MultiSelect: ArrayInput = ({name, input, spec, in filterable={filterable} renderOption={renderOption} getOptionHeight={getOptionHeight} + getOptionText={withCustomOptions ? undefined : getOptionText} {...inputProps} value={_value} options={options} diff --git a/src/lib/kit/components/Inputs/MultiSelect/__tests__/MultiSelect.number-enum.test.tsx b/src/lib/kit/components/Inputs/MultiSelect/__tests__/MultiSelect.number-enum.test.tsx index f70b6566..2fc26a3e 100644 --- a/src/lib/kit/components/Inputs/MultiSelect/__tests__/MultiSelect.number-enum.test.tsx +++ b/src/lib/kit/components/Inputs/MultiSelect/__tests__/MultiSelect.number-enum.test.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import {ThemeProvider} from '@gravity-ui/uikit'; +import {Provider} from '@gravity-ui/uikit'; import {render, screen, waitFor} from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import noop from 'lodash/noop'; @@ -34,7 +34,7 @@ const renderNumberEnum = (values: number[], initialValue: number[] | undefined = }; render( - +
{({values}) => ( <> @@ -43,7 +43,7 @@ const renderNumberEnum = (values: number[], initialValue: number[] | undefined = )}
-
, + , ); return screen.getByText('3'); diff --git a/src/lib/kit/components/Inputs/MultiSelect/__tests__/helpers.ts b/src/lib/kit/components/Inputs/MultiSelect/__tests__/helpers.ts index 56dfa0a1..ffe5e4d4 100644 --- a/src/lib/kit/components/Inputs/MultiSelect/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/MultiSelect/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {ArraySpec, FormValue} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const MULTI_SELECT: Record = { default: { diff --git a/src/lib/kit/components/Inputs/Number/__tests__/Number.test.tsx b/src/lib/kit/components/Inputs/Number/__tests__/Number.test.tsx index 7582ee10..257ec674 100644 --- a/src/lib/kit/components/Inputs/Number/__tests__/Number.test.tsx +++ b/src/lib/kit/components/Inputs/Number/__tests__/Number.test.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import {ThemeProvider} from '@gravity-ui/uikit'; +import {Provider} from '@gravity-ui/uikit'; import {render, screen} from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import cloneDeep from 'lodash/cloneDeep'; @@ -27,11 +27,11 @@ const SPEC_NUMBER: NumberSpec = { }; const DynamicForm = ({spec}: {spec: Spec}) => ( - +
{() => } -
+ ); beforeEach(() => { diff --git a/src/lib/kit/components/Inputs/Number/__tests__/helpers.ts b/src/lib/kit/components/Inputs/Number/__tests__/helpers.ts index 19575bc8..dcb91765 100644 --- a/src/lib/kit/components/Inputs/Number/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/Number/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {NumberSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const NUMBER_SPEC: Record = { default: { diff --git a/src/lib/kit/components/Inputs/NumberWithScale/__tests__/helpers.ts b/src/lib/kit/components/Inputs/NumberWithScale/__tests__/helpers.ts index d806ea1b..a9219a96 100644 --- a/src/lib/kit/components/Inputs/NumberWithScale/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/NumberWithScale/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, StringSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const NUMBER_WITH_SCALE: Record = { default: { diff --git a/src/lib/kit/components/Inputs/ObjectBase/__tests__/helpers.ts b/src/lib/kit/components/Inputs/ObjectBase/__tests__/helpers.ts index 90cea19e..57b935e6 100644 --- a/src/lib/kit/components/Inputs/ObjectBase/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/ObjectBase/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const OBJECT_BASE: Record = { default: { diff --git a/src/lib/kit/components/Inputs/ObjectValueInput/__tests__/helpers.ts b/src/lib/kit/components/Inputs/ObjectValueInput/__tests__/helpers.ts index 88cbbb0e..f0d51f45 100644 --- a/src/lib/kit/components/Inputs/ObjectValueInput/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/ObjectValueInput/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const OBJECT_VALUE_INPUT: Record = { default: { diff --git a/src/lib/kit/components/Inputs/OneOf/__tests__/helpers.ts b/src/lib/kit/components/Inputs/OneOf/__tests__/helpers.ts index cd26bdf6..157e83dc 100644 --- a/src/lib/kit/components/Inputs/OneOf/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/OneOf/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const ONEOF: Record = { default: { diff --git a/src/lib/kit/components/Inputs/RadioGroup/__tests__/helpers.ts b/src/lib/kit/components/Inputs/RadioGroup/__tests__/helpers.ts index 935f0820..569a83fe 100644 --- a/src/lib/kit/components/Inputs/RadioGroup/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/RadioGroup/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {StringSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const RADIO_GROUP: Record = { default: { diff --git a/src/lib/kit/components/Inputs/RangeInputPicker/__tests__/helpers.ts b/src/lib/kit/components/Inputs/RangeInputPicker/__tests__/helpers.ts index 4a25cdbd..1ba29552 100644 --- a/src/lib/kit/components/Inputs/RangeInputPicker/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/RangeInputPicker/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, NumberSpec, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; const fromTo = ( extra: Partial = {}, diff --git a/src/lib/kit/components/Inputs/Secret/__tests__/helpers.ts b/src/lib/kit/components/Inputs/Secret/__tests__/helpers.ts index 33bc2844..a1720c95 100644 --- a/src/lib/kit/components/Inputs/Secret/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/Secret/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const SECRET: Record = { default: { diff --git a/src/lib/kit/components/Inputs/Select/Select.tsx b/src/lib/kit/components/Inputs/Select/Select.tsx index cf90651f..e4567232 100644 --- a/src/lib/kit/components/Inputs/Select/Select.tsx +++ b/src/lib/kit/components/Inputs/Select/Select.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import type {SelectProps as SelectBaseProps} from '@gravity-ui/uikit'; +import type {SelectProps as SelectBaseProps, SelectOptionProps} from '@gravity-ui/uikit'; import {Select as SelectBase, Text} from '@gravity-ui/uikit'; import type {StringInput} from '../../../../core'; @@ -38,7 +38,6 @@ export const Select: StringInput = ({name, input, spec, inputProps} : spec.enum?.map((id) => ({ id, value: id, - text: spec.description?.[id] || id, content: spec.viewSpec.selectParams?.meta?.[id] ? (
{spec.description?.[id] || id} @@ -64,6 +63,11 @@ export const Select: StringInput = ({name, input, spec, inputProps} return {option.content || option.value}; }, []); + const getOptionText: SelectBaseProps['getOptionText'] = React.useCallback( + (option: SelectOptionProps) => spec.description?.[option.value] || option.value, + [spec.description], + ); + const getOptionHeight = React.useCallback(() => { if (spec.viewSpec.selectParams?.meta) { return 44; @@ -91,6 +95,7 @@ export const Select: StringInput = ({name, input, spec, inputProps} width="max" filterable={filterable} getOptionHeight={getOptionHeight} + getOptionText={withCustomOptions ? undefined : getOptionText} renderOption={renderOption} {...inputProps} value={[value]} diff --git a/src/lib/kit/components/Inputs/Select/__tests__/Select.test.tsx b/src/lib/kit/components/Inputs/Select/__tests__/Select.test.tsx new file mode 100644 index 00000000..6873b7e1 --- /dev/null +++ b/src/lib/kit/components/Inputs/Select/__tests__/Select.test.tsx @@ -0,0 +1,126 @@ +import React from 'react'; + +import {Provider} from '@gravity-ui/uikit'; +import {render, screen, waitFor} from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import noop from 'lodash/noop'; +import {Form} from 'react-final-form'; + +import {DynamicField, SpecTypes} from '../../../../../core'; +import { + JsonSchemaType, + NodeType, + SchemaRenderer, + SchemaRendererMode, +} from '../../../../../unstable/core'; +import {config} from '../../../../../unstable/kit/constants'; +import {dynamicConfig} from '../../../../constants'; + +beforeEach(() => { + window.matchMedia = () => ({ + media: '', + matches: false, + onchange: null, + addListener: noop, + removeListener: noop, + addEventListener: noop, + removeEventListener: noop, + dispatchEvent: () => true, + }); +}); + +const descriptions = {alpha: 'First option', beta: 'Second option'}; +const metadata = {alpha: 'First details', beta: 'Second details'}; +const enumValues = ['alpha', 'beta', ...Array.from({length: 8}, (_, index) => `option-${index}`)]; +const nodeParameters = { + entity: 'select', + layout: 'row', + entityProps: { + filterable: true, + filterPlaceholder: 'Search options', + enumDescriptions: descriptions, + optionsMeta: metadata, + }, +}; + +describe.each([false, true])('Select with multiple=%s', (multiple) => { + test.each(['DynamicField', 'SchemaRenderer'])( + '%s preserves labels, filtering and submitted values with JSX options', + async (renderer) => { + const user = userEvent.setup(); + + render( + +
+ {({values}) => ( + <> + {renderer === 'DynamicField' ? ( + + ) : ( + + )} + {JSON.stringify(values.input)} + + )} + +
, + ); + + expect(screen.getByRole('combobox')).toHaveTextContent('First option'); + await user.click(screen.getByRole('combobox')); + await user.type(screen.getByPlaceholderText('Search options'), 'Second'); + + expect(screen.queryByRole('option', {name: /First option/})).not.toBeInTheDocument(); + await user.click(screen.getByRole('option', {name: /Second option/})); + + await waitFor(() => { + expect(screen.getByTestId('value')).toHaveTextContent( + JSON.stringify(multiple ? ['alpha', 'beta'] : 'beta'), + ); + }); + }, + ); +}); diff --git a/src/lib/kit/components/Inputs/Select/__tests__/helpers.ts b/src/lib/kit/components/Inputs/Select/__tests__/helpers.ts index 5ca729cf..8547ac01 100644 --- a/src/lib/kit/components/Inputs/Select/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/Select/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {StringSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const SELECT: Record = { default: { diff --git a/src/lib/kit/components/Inputs/Switch/__tests__/helpers.ts b/src/lib/kit/components/Inputs/Switch/__tests__/helpers.ts index c3d11585..c670019c 100644 --- a/src/lib/kit/components/Inputs/Switch/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/Switch/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {BooleanSpec, FormValue} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const SWITCH: Record = { default: { diff --git a/src/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.tsx b/src/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.tsx index 8bbfb9d3..53b40d51 100644 --- a/src/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.tsx +++ b/src/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.tsx @@ -1,7 +1,8 @@ import React from 'react'; import {Plus, TrashBin} from '@gravity-ui/icons'; -import {Button, Flex, HelpMark, Icon, Table, type TableColumnConfig} from '@gravity-ui/uikit'; +import {Button, Flex, HelpMark, Icon} from '@gravity-ui/uikit'; +import {Table, type TableColumnConfig} from '@gravity-ui/uikit/legacy'; import noop from 'lodash/noop'; import set from 'lodash/set'; @@ -118,7 +119,7 @@ export const TableArrayInput: ArrayInput = ({spec, name, arrayInput, input}) => ) : () => ( diff --git a/src/lib/kit/components/Inputs/TableArrayInput/__tests__/helpers.tsx b/src/lib/kit/components/Inputs/TableArrayInput/__tests__/helpers.tsx index 8960fe09..c06da747 100644 --- a/src/lib/kit/components/Inputs/TableArrayInput/__tests__/helpers.tsx +++ b/src/lib/kit/components/Inputs/TableArrayInput/__tests__/helpers.tsx @@ -3,7 +3,7 @@ import React from 'react'; import {DynamicForm as BaseDynamicForm} from '~playwright/core/DynamicForm'; import type {ArraySpec, FormValue, Spec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const TABLE_ARRAY_INPUT: Record = { default: { diff --git a/src/lib/kit/components/Inputs/Text/__tests__/Text.test.tsx b/src/lib/kit/components/Inputs/Text/__tests__/Text.test.tsx index 7b29a3e9..4b570091 100644 --- a/src/lib/kit/components/Inputs/Text/__tests__/Text.test.tsx +++ b/src/lib/kit/components/Inputs/Text/__tests__/Text.test.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import {ThemeProvider} from '@gravity-ui/uikit'; +import {Provider} from '@gravity-ui/uikit'; import {render, screen} from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import cloneDeep from 'lodash/cloneDeep'; @@ -32,11 +32,11 @@ const SPEC_PASSWORD: StringSpec = { }; const DynamicForm = ({spec}: {spec: Spec}) => ( - +
{() => } -
+ ); beforeEach(() => { diff --git a/src/lib/kit/components/Inputs/Text/__tests__/helpers.ts b/src/lib/kit/components/Inputs/Text/__tests__/helpers.ts index 4202c270..bfa45a50 100644 --- a/src/lib/kit/components/Inputs/Text/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/Text/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {StringSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const PASSWORD_SPEC: Record = { default: { diff --git a/src/lib/kit/components/Inputs/TextArea/__tests__/helpers.ts b/src/lib/kit/components/Inputs/TextArea/__tests__/helpers.ts index b521ffc7..43eb15ca 100644 --- a/src/lib/kit/components/Inputs/TextArea/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/TextArea/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {StringSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const TEXT_AREA_SPEC: Record = { default: { diff --git a/src/lib/kit/components/Inputs/TextContent/__tests__/helpers.ts b/src/lib/kit/components/Inputs/TextContent/__tests__/helpers.ts index 27f21ba5..12be9a0a 100644 --- a/src/lib/kit/components/Inputs/TextContent/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/TextContent/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {StringSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const TEXT_CONTENT_SPEC: Record = { defaultText: { diff --git a/src/lib/kit/components/Inputs/TimeRangeSelector/__tests__/helpers.ts b/src/lib/kit/components/Inputs/TimeRangeSelector/__tests__/helpers.ts index 96504bd6..985cf825 100644 --- a/src/lib/kit/components/Inputs/TimeRangeSelector/__tests__/helpers.ts +++ b/src/lib/kit/components/Inputs/TimeRangeSelector/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; const ENUM_START = [ '00:00', diff --git a/src/lib/kit/components/Inputs/TimeRangeSelector/components/TimeRangeSelect/TimeRangeSelect.tsx b/src/lib/kit/components/Inputs/TimeRangeSelector/components/TimeRangeSelect/TimeRangeSelect.tsx index cc51f534..a909bf45 100644 --- a/src/lib/kit/components/Inputs/TimeRangeSelector/components/TimeRangeSelect/TimeRangeSelect.tsx +++ b/src/lib/kit/components/Inputs/TimeRangeSelector/components/TimeRangeSelect/TimeRangeSelect.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import type {SelectOption} from '@gravity-ui/uikit'; +import type {SelectOptionProps} from '@gravity-ui/uikit'; import { Controller, @@ -16,7 +16,7 @@ import './TimeRangeSelect.scss'; const b = block('time-range-select'); interface TimeRangeSelectProps extends ControllerProps { - options: SelectOption[]; + options: SelectOptionProps[]; } export const TimeRangeSelect: React.FC = ({spec, options, ...props}) => { diff --git a/src/lib/kit/components/Layouts/Accordeon/__tests__/helpers.ts b/src/lib/kit/components/Layouts/Accordeon/__tests__/helpers.ts index 91909951..95f3e440 100644 --- a/src/lib/kit/components/Layouts/Accordeon/__tests__/helpers.ts +++ b/src/lib/kit/components/Layouts/Accordeon/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {ArraySpec, FormValue, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const ACCORDEON: Record = { arraySpec: { diff --git a/src/lib/kit/components/Layouts/AccordeonCard/__tests__/helpers.ts b/src/lib/kit/components/Layouts/AccordeonCard/__tests__/helpers.ts index 2d9014cb..58b76785 100644 --- a/src/lib/kit/components/Layouts/AccordeonCard/__tests__/helpers.ts +++ b/src/lib/kit/components/Layouts/AccordeonCard/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {ArraySpec, FormValue, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const ACCORDEON_CARD: Record = { arraySpec: { diff --git a/src/lib/kit/components/Layouts/Column/__tests__/helpers.ts b/src/lib/kit/components/Layouts/Column/__tests__/helpers.ts index 3e2dbe8e..8c018833 100644 --- a/src/lib/kit/components/Layouts/Column/__tests__/helpers.ts +++ b/src/lib/kit/components/Layouts/Column/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const COLUMN_CARD: ObjectSpec = { defaultValue: { diff --git a/src/lib/kit/components/Layouts/Section/__tests__/helpers.ts b/src/lib/kit/components/Layouts/Section/__tests__/helpers.ts index 6a40eb62..91a91432 100644 --- a/src/lib/kit/components/Layouts/Section/__tests__/helpers.ts +++ b/src/lib/kit/components/Layouts/Section/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {ArraySpec, FormValue, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const SECTION: Record = { sectionArraySpec: { diff --git a/src/lib/kit/components/RemoveButton/RemoveButton.tsx b/src/lib/kit/components/RemoveButton/RemoveButton.tsx index bc4e3221..88e9ac99 100644 --- a/src/lib/kit/components/RemoveButton/RemoveButton.tsx +++ b/src/lib/kit/components/RemoveButton/RemoveButton.tsx @@ -1,8 +1,8 @@ import React from 'react'; import {Ellipsis} from '@gravity-ui/icons'; -import type {DropdownMenuItemMixed} from '@gravity-ui/uikit'; -import {Button, DropdownMenu, Icon} from '@gravity-ui/uikit'; +import {Button, Icon} from '@gravity-ui/uikit'; +import {DropdownMenu, type DropdownMenuItemMixed} from '@gravity-ui/uikit/legacy'; import i18n from '../../i18n'; diff --git a/src/lib/kit/components/ViewLayouts/ViewColumn/__tests__/helpers.ts b/src/lib/kit/components/ViewLayouts/ViewColumn/__tests__/helpers.ts index c8cb7b29..44eafa88 100644 --- a/src/lib/kit/components/ViewLayouts/ViewColumn/__tests__/helpers.ts +++ b/src/lib/kit/components/ViewLayouts/ViewColumn/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const VIEW_COLUMN: ObjectSpec = { defaultValue: { diff --git a/src/lib/kit/components/ViewLayouts/ViewRow/__tests__/helpers.ts b/src/lib/kit/components/ViewLayouts/ViewRow/__tests__/helpers.ts index 49cb76ef..cd13033e 100644 --- a/src/lib/kit/components/ViewLayouts/ViewRow/__tests__/helpers.ts +++ b/src/lib/kit/components/ViewLayouts/ViewRow/__tests__/helpers.ts @@ -1,5 +1,5 @@ import type {FormValue, ObjectSpec} from '../../../../../core'; -import {SpecTypes} from '../../../../../core'; +import {SpecTypes} from '../../../../../core/constants'; export const VIEW_ROW: ObjectSpec = { defaultValue: { diff --git a/src/lib/kit/components/Views/MonacoInputView/MonacoViewDialog.tsx b/src/lib/kit/components/Views/MonacoInputView/MonacoViewDialog.tsx index f556dcd5..7133c6fa 100644 --- a/src/lib/kit/components/Views/MonacoInputView/MonacoViewDialog.tsx +++ b/src/lib/kit/components/Views/MonacoInputView/MonacoViewDialog.tsx @@ -41,6 +41,15 @@ export const MonacoViewDialog: React.FC = ({ onClose(); }, [onClose]); + const handleOpenChange = React.useCallback( + (open: boolean) => { + if (!open) { + handleClose(); + } + }, + [handleClose], + ); + const options = useMonacoOptions(fontSize, true); if (!MonacoEditor) { @@ -48,7 +57,7 @@ export const MonacoViewDialog: React.FC = ({ } return ( - +
diff --git a/src/lib/kit/components/Views/TableArrayView/TableArrayView.tsx b/src/lib/kit/components/Views/TableArrayView/TableArrayView.tsx index 871aa121..bc74eb06 100644 --- a/src/lib/kit/components/Views/TableArrayView/TableArrayView.tsx +++ b/src/lib/kit/components/Views/TableArrayView/TableArrayView.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import {Flex, HelpMark, Table, type TableColumnConfig} from '@gravity-ui/uikit'; +import {Flex, HelpMark} from '@gravity-ui/uikit'; +import {Table, type TableColumnConfig} from '@gravity-ui/uikit/legacy'; import type {ArrayView, FormValue, ObjectValue} from '../../../../core'; import { @@ -49,7 +50,7 @@ export const TableArrayView: ArrayView = ({value = [], spec, name}) => { description && showLayoutDescription ? () => ( diff --git a/src/lib/unstable/kit/components/DropButton/DropButton.tsx b/src/lib/unstable/kit/components/DropButton/DropButton.tsx index a9469c7c..dae95f03 100644 --- a/src/lib/unstable/kit/components/DropButton/DropButton.tsx +++ b/src/lib/unstable/kit/components/DropButton/DropButton.tsx @@ -1,11 +1,6 @@ import React from 'react'; -import {Text} from '@gravity-ui/uikit'; -import { - unstable_Menu as Menu, - unstable_MenuItem as MenuItem, - unstable_MenuTrigger as MenuTrigger, -} from '@gravity-ui/uikit/unstable'; +import {Menu, MenuItem, MenuTrigger, Text} from '@gravity-ui/uikit'; import {useForm} from 'react-final-form'; import i18n from '../../../../kit/i18n'; diff --git a/src/lib/unstable/kit/components/EntityContainer/EntityContainer.tsx b/src/lib/unstable/kit/components/EntityContainer/EntityContainer.tsx index 1a7d22c3..8869e103 100644 --- a/src/lib/unstable/kit/components/EntityContainer/EntityContainer.tsx +++ b/src/lib/unstable/kit/components/EntityContainer/EntityContainer.tsx @@ -33,7 +33,7 @@ export const EntityContainer: React.FC = ({ data-droppable={droppable} data-width={width} > - + {children}
diff --git a/src/lib/unstable/kit/components/EntityDescription/EntityDescription.tsx b/src/lib/unstable/kit/components/EntityDescription/EntityDescription.tsx index 003a9df8..8c67c434 100644 --- a/src/lib/unstable/kit/components/EntityDescription/EntityDescription.tsx +++ b/src/lib/unstable/kit/components/EntityDescription/EntityDescription.tsx @@ -26,7 +26,7 @@ export const EntityDescription: React.FC = ({ if (likeHelpMark) { return ( - + ); diff --git a/src/lib/unstable/kit/components/MonacoContainer/MonacoContainer.tsx b/src/lib/unstable/kit/components/MonacoContainer/MonacoContainer.tsx index e1d3c46d..f8fd77f1 100644 --- a/src/lib/unstable/kit/components/MonacoContainer/MonacoContainer.tsx +++ b/src/lib/unstable/kit/components/MonacoContainer/MonacoContainer.tsx @@ -36,7 +36,7 @@ export const MonacoContainer: React.FC = ({ return (
- + {language} diff --git a/src/lib/unstable/kit/entities/Alert/Alert.tsx b/src/lib/unstable/kit/entities/Alert/Alert.tsx index 263bc9ce..7d1bfa25 100644 --- a/src/lib/unstable/kit/entities/Alert/Alert.tsx +++ b/src/lib/unstable/kit/entities/Alert/Alert.tsx @@ -48,7 +48,7 @@ export const Alert: NodeEntity = ({props, schema, setExpanded(!expanded)} > @@ -100,14 +100,7 @@ export const Alert: NodeEntity = ({props, schema, return ( - + ); }; diff --git a/src/lib/unstable/kit/entities/ArrayEntity/ArrayEntity.tsx b/src/lib/unstable/kit/entities/ArrayEntity/ArrayEntity.tsx index 05be780f..61792d3e 100644 --- a/src/lib/unstable/kit/entities/ArrayEntity/ArrayEntity.tsx +++ b/src/lib/unstable/kit/entities/ArrayEntity/ArrayEntity.tsx @@ -104,7 +104,7 @@ export const ArrayEntity: NodeEntity = ({ } return ( - + {items?.length ? {items} : null} {addButton} diff --git a/src/lib/unstable/kit/entities/ArrayTable/ArrayTable.tsx b/src/lib/unstable/kit/entities/ArrayTable/ArrayTable.tsx index bd8bdb9d..dd97e1d0 100644 --- a/src/lib/unstable/kit/entities/ArrayTable/ArrayTable.tsx +++ b/src/lib/unstable/kit/entities/ArrayTable/ArrayTable.tsx @@ -201,7 +201,7 @@ export const ArrayTable: NodeEntity = ({ diff --git a/src/lib/unstable/kit/entities/Monaco/Monaco.tsx b/src/lib/unstable/kit/entities/Monaco/Monaco.tsx index b29c8902..53a4e122 100644 --- a/src/lib/unstable/kit/entities/Monaco/Monaco.tsx +++ b/src/lib/unstable/kit/entities/Monaco/Monaco.tsx @@ -170,7 +170,7 @@ export const Monaco: NodeEntity = ({ > {control} - + = ({ className={b('items', {overview: overviewFlag})} direction="row" alignItems="center" - gap={overviewFlag ? 1 : 2} + gap={overviewFlag ? 'spacing-1' : 'spacing-2'} > {(order || Object.keys(schema.properties || {})).map( (property: string, index: number, array: string[]) => ( diff --git a/src/lib/unstable/kit/form-entities/CheckboxGroupInput/CheckboxGroupInput.tsx b/src/lib/unstable/kit/form-entities/CheckboxGroupInput/CheckboxGroupInput.tsx index 3d7e0be5..5dcfdee5 100644 --- a/src/lib/unstable/kit/form-entities/CheckboxGroupInput/CheckboxGroupInput.tsx +++ b/src/lib/unstable/kit/form-entities/CheckboxGroupInput/CheckboxGroupInput.tsx @@ -67,7 +67,7 @@ export const CheckboxGroupInput: NodeEntity {options?.map(({value: optionValue, text}) => ( + {content} {optionMeta} @@ -62,7 +69,7 @@ export const MultiSelectInput: NodeEntity ( - - {option.content || option.text || option.value} - + (option: SelectOptionProps) => ( + {option.content || option.value} ), [], ); + const getOptionText: SelectProps['getOptionText'] = React.useCallback( + (option: SelectOptionProps) => option.data?.text ?? getSelectOptionText(option), + [], + ); + const getOptionHeight: SelectProps['getOptionHeight'] = React.useCallback( - (option: SelectOption) => { + (option: SelectOptionProps) => { let height = 28; if (settings?.size) { @@ -116,6 +126,7 @@ export const MultiSelectInput: NodeEntity 9} renderOption={renderOption} getOptionHeight={getOptionHeight} + getOptionText={getOptionText} placeholder={`${schema.examples?.[0]?.[0] || DASH}`} disabled={disabled || schema.readOnly} size={settings?.size} diff --git a/src/lib/unstable/kit/form-entities/NumberWithScaleInput/NumberWithScaleInput.tsx b/src/lib/unstable/kit/form-entities/NumberWithScaleInput/NumberWithScaleInput.tsx index ae2327cb..335eaf2f 100644 --- a/src/lib/unstable/kit/form-entities/NumberWithScaleInput/NumberWithScaleInput.tsx +++ b/src/lib/unstable/kit/form-entities/NumberWithScaleInput/NumberWithScaleInput.tsx @@ -110,7 +110,7 @@ export const NumberWithScaleInput: NodeEntity
= ({ return ( - + = ({ if (optionMeta) { content = ( - + {content} {optionMeta} @@ -62,22 +69,25 @@ export const SelectInput: NodeEntity = ({ ); } - return {value, text, content, key: value, data: {optionMeta}}; + return {value, content, key: value, data: {optionMeta, text}}; }), [enumDescriptions, optionsMeta, schema.enum, settings], ); const renderOption: SelectProps['renderOption'] = React.useCallback( - (option: SelectOption) => ( - - {option.content || option.text || option.value} - + (option: SelectOptionProps) => ( + {option.content || option.value} ), [], ); + const getOptionText: SelectProps['getOptionText'] = React.useCallback( + (option: SelectOptionProps) => option.data?.text ?? getSelectOptionText(option), + [], + ); + const getOptionHeight: SelectProps['getOptionHeight'] = React.useCallback( - (option: SelectOption) => { + (option: SelectOptionProps) => { let height = 28; if (settings?.size) { @@ -114,6 +124,7 @@ export const SelectInput: NodeEntity = ({ filterable={(schema.enum?.length || 0) > 9} renderOption={renderOption} getOptionHeight={getOptionHeight} + getOptionText={getOptionText} placeholder={schema.examples?.[0] || DASH} disabled={disabled || schema.readOnly} size={settings?.size} diff --git a/src/lib/unstable/kit/form-entities/StringNumberWithScaleInput/StringNumberWithScaleInput.tsx b/src/lib/unstable/kit/form-entities/StringNumberWithScaleInput/StringNumberWithScaleInput.tsx index 84fbd358..9528db5f 100644 --- a/src/lib/unstable/kit/form-entities/StringNumberWithScaleInput/StringNumberWithScaleInput.tsx +++ b/src/lib/unstable/kit/form-entities/StringNumberWithScaleInput/StringNumberWithScaleInput.tsx @@ -115,7 +115,7 @@ export const StringNumberWithScaleInput: NodeEntity< width="max" className={b({error: getBooleanValidationState(meta)})} direction="row" - gap={2} + gap="spacing-2" >
= ({ const {hidden} = schema.nodeParameters?.flags || {}; return ( -