Skip to content

Commit

Permalink
feat(tabs): move tabs to deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
sofiushko committed Dec 19, 2024
1 parent 91e8cd3 commit 7f89644
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 12 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!--/GITHUB_BLOCK-->

```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.
Expand Down Expand Up @@ -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 | `<Label>` displayed at the end | `React.ReactNode` | |
| disabled | Inactive state | `boolean` | |

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use '../variables';
@use '../../../styles/mixins';
@use '../../variables';
@use '../../../../styles/mixins';

$block: '.#{variables.$ns}tabs';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import React from 'react';

import type {QAProps} from '../types';
import {block} from '../utils/cn';
import type {QAProps} from '../../types';
import {block} from '../../utils/cn';

import {TabsContext} from './TabsContext';
import {TabsItem} from './TabsItem';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import React from 'react';

import {Label} from '../Label';
import type {LabelProps} from '../Label';
import {block} from '../utils/cn';
import {Label} from '../../Label';
import type {LabelProps} from '../../Label';
import {block} from '../../utils/cn';

import {TabsContext} from './TabsContext';

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {getTabsMock} from './getTabsMock';
import type {StoryParams} from './types';

const meta: Meta<typeof Tabs> = {
title: 'Components/Navigation/Tabs',
title: 'Deprecated/Tabs',
component: Tabs,
args: {
direction: TabsDirection.Horizontal,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

import userEvent from '@testing-library/user-event';

import {render, screen} from '../../../../test-utils/utils';
import {render, screen} from '../../../../../test-utils/utils';
import {Tabs, TabsDirection} from '../Tabs';
import type {TabsItemProps, TabsSize} from '../Tabs';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import {Flame} from '@gravity-ui/icons';
import userEvent from '@testing-library/user-event';

import {render, screen} from '../../../../test-utils/utils';
import {render, screen} from '../../../../../test-utils/utils';
import {TabsItem} from '../TabsItem';

const tabId = 'tab-id';
Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions src/deprecated.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* eslint-disable camelcase */
export {
Tabs as deprecated_Tabs,
TabsDirection as deprecated_TabsDirection,
type TabsSize as deprecated_TabsSize,
type TabsItemProps as deprecated_TabsItemProps,
type TabsProps as deprecated_TabsProps,
} from './components/lab/Tabs';

0 comments on commit 7f89644

Please sign in to comment.