@gravity-ui/navigation 0.18.0 → 0.19.0
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconProps } from '@gravity-ui/uikit';
|
|
3
3
|
import './Settings.scss';
|
|
4
|
-
interface SettingsProps {
|
|
4
|
+
export interface SettingsProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
title?: string;
|
|
7
7
|
filterPlaceholder?: string;
|
|
@@ -14,25 +14,25 @@ interface SettingsProps {
|
|
|
14
14
|
view?: 'normal' | 'mobile';
|
|
15
15
|
onClose?: () => void;
|
|
16
16
|
}
|
|
17
|
-
interface SettingsGroupProps {
|
|
17
|
+
export interface SettingsGroupProps {
|
|
18
18
|
id?: string;
|
|
19
19
|
groupTitle: string;
|
|
20
20
|
children: React.ReactNode;
|
|
21
21
|
}
|
|
22
|
-
interface SettingsPageProps {
|
|
22
|
+
export interface SettingsPageProps {
|
|
23
23
|
id?: string;
|
|
24
24
|
title: string;
|
|
25
25
|
icon?: IconProps;
|
|
26
26
|
children: React.ReactNode;
|
|
27
27
|
}
|
|
28
|
-
interface SettingsSectionProps {
|
|
28
|
+
export interface SettingsSectionProps {
|
|
29
29
|
title: string;
|
|
30
30
|
header?: React.ReactNode;
|
|
31
31
|
children: React.ReactNode;
|
|
32
32
|
withBadge?: boolean;
|
|
33
33
|
showTitle?: boolean;
|
|
34
34
|
}
|
|
35
|
-
interface SettingsItemProps {
|
|
35
|
+
export interface SettingsItemProps {
|
|
36
36
|
title: string;
|
|
37
37
|
renderTitleComponent?: (highlightedTitle: React.ReactNode | null) => React.ReactNode;
|
|
38
38
|
align?: 'top' | 'center';
|
|
@@ -48,4 +48,3 @@ export declare namespace Settings {
|
|
|
48
48
|
var Section: ({ children }: SettingsSectionProps) => React.JSX.Element;
|
|
49
49
|
var Item: ({ title, children, align, withBadge, renderTitleComponent, mode, description, }: SettingsItemProps) => React.JSX.Element;
|
|
50
50
|
}
|
|
51
|
-
export {};
|
package/build/cjs/index.js
CHANGED
|
@@ -4800,8 +4800,9 @@ const b$i = block('drawer');
|
|
|
4800
4800
|
const TIMEOUT = 300;
|
|
4801
4801
|
const DrawerItem = ({ visible, content, direction, className }) => {
|
|
4802
4802
|
const itemRef = React__default["default"].useRef(null);
|
|
4803
|
-
|
|
4804
|
-
|
|
4803
|
+
const cssDirection = direction === 'left' ? undefined : direction;
|
|
4804
|
+
return (React__default["default"].createElement(CSSTransition, { in: visible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$i('item-transition', { direction: cssDirection }), nodeRef: itemRef },
|
|
4805
|
+
React__default["default"].createElement("div", { ref: itemRef, className: b$i('item', { direction: cssDirection }, className) }, content)));
|
|
4805
4806
|
};
|
|
4806
4807
|
const Drawer = ({ className, children, style, onVeilClick, onEscape, preventScrollBody = true, }) => {
|
|
4807
4808
|
let someItemVisible = false;
|