Skip to content

Commit

Permalink
[BREAKING CHANGE] refactor: remove <VisuallyHiddenInput /> (#6156)
Browse files Browse the repository at this point in the history
* refactor: remove VisuallyHiddenInput

* docs: update migration_v6.md
  • Loading branch information
eugpoloz authored Nov 28, 2023
1 parent bafe32f commit 6c6143d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 63 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions packages/vkui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,6 @@ export { PanelHeaderEdit } from './components/PanelHeaderEdit/PanelHeaderEdit';
export type { PanelHeaderEditProps } from './components/PanelHeaderEdit/PanelHeaderEdit';
export { ModalCardBase } from './components/ModalCardBase/ModalCardBase';
export type { ModalCardBaseProps } from './components/ModalCardBase/ModalCardBase';
export { VisuallyHiddenInput } from './components/VisuallyHiddenInput/VisuallyHiddenInput';
export type { VisuallyHiddenInputProps } from './components/VisuallyHiddenInput/VisuallyHiddenInput';
export { VisuallyHidden } from './components/VisuallyHidden/VisuallyHidden';
export { AdaptiveIconRenderer } from './components/AdaptiveIconRenderer/AdaptiveIconRenderer';
export type { AdaptiveIconRendererProps } from './components/AdaptiveIconRenderer/AdaptiveIconRenderer';
Expand Down
21 changes: 20 additions & 1 deletion styleguide/pages/migration_v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
- `webviewType={WebviewType.INTERNAL}` -> `hasCustomPanelHeaderAfter={false}`.
- `webviewType={WebviewType.VKAPPS}` -> `hasCustomPanelHeaderAfter={true}`. При необходимости передайте `customPanelHeaderAfterMinWidth={<value>}` (по умолчанию `90`).

<br/><br/>

## [AppearanceProvider](#/AppearanceProvider)

По аналогии с остальными провайдерами свойство `appearance` заменено на `value`
Expand All @@ -66,10 +68,14 @@
+ <AppearanceProvider value={appearance}>...</AppearanceProvider>
```

<br/><br/>

## ~`withInsets`~

Используйте вместо него хук `useInsets()` из [@vkontakte/vk-bridge-react](https://www.npmjs.com/package/@vkontakte/vk-bridge-react).

<br/><br/>

## Поддержка браузеров

Библиотека по умолчанию компилируется в [ES2015 (ES6)](https://262.ecma-international.org/6.0/).
Expand All @@ -78,6 +84,8 @@
> В VKUI есть [специальная сборка](https://vkcom.github.io/VKUI/#/CSS%20Modules)
> в ESNext, которая позволяет уменьшить размер вашего приложения
<br/><br/>

## CSS Logical для [специальной сборки](https://vkcom.github.io/VKUI/#/CSS%20Modules)

> **Note**
Expand All @@ -88,6 +96,8 @@
Если вам требуется [широкая браузерная поддержка](https://caniuse.com/css-logical-props),
рекомендуем воспользоваться [postcss-logical](https://www.npmjs.com/package/postcss-logical).

<br/><br/>

## Перечисления заменены на объекты

Следующие перечисления были заменены на [объекты](https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums):
Expand Down Expand Up @@ -128,7 +138,7 @@

## [`ActionSheetItem`](#/ActionSheetItem)

- Свойство `autoClose` удалено, теперь это поведение по-умолчанию
- Свойство `autoClose` удалено, теперь это поведение по умолчанию

```diff
<ActionSheet>
Expand All @@ -148,3 +158,12 @@
- Удалено свойство `option` из `CustomSelectOption`

<br/><br/>

## [`VisuallyHiddenInput`](#/VisuallyHiddenInput)

Устаревший компонент удален. Используйте [`VisuallyHidden`](#/VisuallyHidden)

```diff
- <VisuallyHiddenInput />
+ <VisuallyHidden Component="input" />
```

0 comments on commit 6c6143d

Please sign in to comment.