From 7f896442750b8675af5b5d0dcd18245d83835cff Mon Sep 17 00:00:00 2001 From: Sofiya Pavlenko Date: Thu, 19 Dec 2024 22:42:21 +0300 Subject: [PATCH 1/2] feat(tabs): move tabs to deprecated --- package.json | 5 +++++ src/components/{ => lab}/Tabs/README.md | 4 ++-- src/components/{ => lab}/Tabs/Tabs.scss | 4 ++-- src/components/{ => lab}/Tabs/Tabs.tsx | 4 ++-- src/components/{ => lab}/Tabs/TabsContext.ts | 0 src/components/{ => lab}/Tabs/TabsItem.tsx | 6 +++--- src/components/{ => lab}/Tabs/__stories__/Docs.mdx | 0 .../{ => lab}/Tabs/__stories__/Tabs.stories.tsx | 2 +- src/components/{ => lab}/Tabs/__stories__/getTabsMock.tsx | 0 src/components/{ => lab}/Tabs/__stories__/types.ts | 0 src/components/{ => lab}/Tabs/__tests__/Tabs.test.tsx | 2 +- src/components/{ => lab}/Tabs/__tests__/TabsItem.test.tsx | 2 +- src/components/{ => lab}/Tabs/index.ts | 0 src/deprecated.ts | 8 ++++++++ 14 files changed, 25 insertions(+), 12 deletions(-) rename src/components/{ => lab}/Tabs/README.md (98%) rename src/components/{ => lab}/Tabs/Tabs.scss (98%) rename src/components/{ => lab}/Tabs/Tabs.tsx (97%) rename src/components/{ => lab}/Tabs/TabsContext.ts (100%) rename src/components/{ => lab}/Tabs/TabsItem.tsx (95%) rename src/components/{ => lab}/Tabs/__stories__/Docs.mdx (100%) rename src/components/{ => lab}/Tabs/__stories__/Tabs.stories.tsx (98%) rename src/components/{ => lab}/Tabs/__stories__/getTabsMock.tsx (100%) rename src/components/{ => lab}/Tabs/__stories__/types.ts (100%) rename src/components/{ => lab}/Tabs/__tests__/Tabs.test.tsx (98%) rename src/components/{ => lab}/Tabs/__tests__/TabsItem.test.tsx (98%) rename src/components/{ => lab}/Tabs/index.ts (100%) create mode 100644 src/deprecated.ts diff --git a/package.json b/package.json index 3cbe219647..9532cb0a7a 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,11 @@ "default": "./build/cjs/unstable.js" } }, + "./deprecated": { + "types": "./build/esm/deprecated.d.ts", + "require": "./build/cjs/deprecated.js", + "import": "./build/esm/deprecated.js" + }, "./server": { "node": { "types": "./build/cjs/server.d.ts", diff --git a/src/components/Tabs/README.md b/src/components/lab/Tabs/README.md similarity index 98% rename from src/components/Tabs/README.md rename to src/components/lab/Tabs/README.md index d0d7afc319..5d6772d257 100644 --- a/src/components/Tabs/README.md +++ b/src/components/lab/Tabs/README.md @@ -5,7 +5,7 @@ ```tsx -import {Tabs} from '@gravity-ui/uikit'; +import {deprecated_Tabs as Tabs} from '@gravity-ui/uikit/deprecated'; ``` Tabs is used to explore, organize content and switch between different views. @@ -297,7 +297,7 @@ LANDING_BLOCK--> | meta | Tab description | `string` | | | hint | HTML title attribute | `string` | | | icon | Icon displayed at the start | `React.ReactNode` | | -| counter | Number displayed at the end | `React.ReactNode` | | +| counter | Number displayed at the end | `number` `string` | | | label | `