@salutejs/plasma-new-hope 0.94.0-canary.1272.9717304400.0 → 0.94.0-canary.1274.9714331676.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Combobox/Combobox.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +1 -1
- package/cjs/components/Drawer/Drawer.js +1 -1
- package/cjs/components/Drawer/hooks/useDrawer.js +1 -3
- package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.js +1 -1
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
- package/cjs/components/Modal/hooks/useModal.js +1 -3
- package/cjs/components/Modal/hooks/useModal.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/cjs/components/Popover/Popover.js +3 -9
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/components/Popup/Popup.js +3 -9
- package/cjs/components/Popup/Popup.js.map +1 -1
- package/cjs/components/Select/Select.js +1 -1
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +1 -1
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +1 -1
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +1 -1
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +1 -1
- package/cjs/components/Select/ui/SelectItem/SelectItem.js +1 -1
- package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
- package/cjs/index.js +0 -3
- package/cjs/index.js.map +1 -1
- package/es/components/Combobox/Combobox.js +1 -1
- package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +1 -1
- package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +1 -1
- package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +1 -1
- package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +1 -1
- package/es/components/Drawer/Drawer.js +1 -1
- package/es/components/Drawer/hooks/useDrawer.js +1 -3
- package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/es/components/Dropdown/Dropdown.js +1 -1
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
- package/es/components/Modal/hooks/useModal.js +1 -3
- package/es/components/Modal/hooks/useModal.js.map +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/es/components/Popover/Popover.js +3 -9
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/components/Popup/Popup.js +3 -9
- package/es/components/Popup/Popup.js.map +1 -1
- package/es/components/Select/Select.js +1 -1
- package/es/components/Select/ui/SelectDivider/SelectDivider.js +1 -1
- package/es/components/Select/ui/SelectFooter/SelectFooter.js +1 -1
- package/es/components/Select/ui/SelectGroup/SelectGroup.js +1 -1
- package/es/components/Select/ui/SelectHeader/SelectHeader.js +1 -1
- package/es/components/Select/ui/SelectItem/SelectItem.js +1 -1
- package/es/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
- package/es/index.js +0 -1
- package/es/index.js.map +1 -1
- package/package.json +4 -4
- package/styled-components/cjs/components/Popover/Popover.js +4 -8
- package/styled-components/cjs/components/Popup/Popup.js +4 -8
- package/styled-components/cjs/index.js +0 -11
- package/styled-components/es/components/Popover/Popover.js +3 -8
- package/styled-components/es/components/Popup/Popup.js +3 -8
- package/styled-components/es/index.js +1 -2
- package/types/components/Popover/Popover.d.ts.map +1 -1
- package/types/components/Popup/Popup.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/cjs/components/Portal/Portal.js +0 -36
- package/cjs/components/Portal/Portal.js.map +0 -1
- package/es/components/Portal/Portal.js +0 -31
- package/es/components/Portal/Portal.js.map +0 -1
- package/styled-components/cjs/components/Portal/Portal.js +0 -37
- package/styled-components/cjs/components/Portal/Portal.template-doc.mdx +0 -66
- package/styled-components/cjs/components/Portal/Portal.types.js +0 -5
- package/styled-components/cjs/components/Portal/index.js +0 -18
- package/styled-components/cjs/examples/plasma_b2c/components/Portal/Portal.js +0 -10
- package/styled-components/cjs/examples/plasma_b2c/components/Portal/Portal.stories.tsx +0 -57
- package/styled-components/cjs/examples/plasma_web/components/Portal/Portal.js +0 -10
- package/styled-components/cjs/examples/plasma_web/components/Portal/Portal.stories.tsx +0 -57
- package/styled-components/es/components/Portal/Portal.js +0 -27
- package/styled-components/es/components/Portal/Portal.template-doc.mdx +0 -66
- package/styled-components/es/components/Portal/Portal.types.js +0 -1
- package/styled-components/es/components/Portal/index.js +0 -1
- package/styled-components/es/examples/plasma_b2c/components/Portal/Portal.js +0 -4
- package/styled-components/es/examples/plasma_b2c/components/Portal/Portal.stories.tsx +0 -57
- package/styled-components/es/examples/plasma_web/components/Portal/Portal.js +0 -4
- package/styled-components/es/examples/plasma_web/components/Portal/Portal.stories.tsx +0 -57
- package/types/components/Portal/Portal.d.ts +0 -13
- package/types/components/Portal/Portal.d.ts.map +0 -1
- package/types/components/Portal/Portal.types.d.ts +0 -18
- package/types/components/Portal/Portal.types.d.ts.map +0 -1
- package/types/components/Portal/index.d.ts +0 -3
- package/types/components/Portal/index.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Portal/Portal.d.ts +0 -3
- package/types/examples/plasma_b2c/components/Portal/Portal.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Portal/Portal.d.ts +0 -3
- package/types/examples/plasma_web/components/Portal/Portal.d.ts.map +0 -1
@@ -1,57 +0,0 @@
|
|
1
|
-
import React, { useState, useRef } from 'react';
|
2
|
-
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
-
import type { ComponentProps } from 'react';
|
4
|
-
import styled from 'styled-components';
|
5
|
-
|
6
|
-
import { Button } from '../Button/Button';
|
7
|
-
import { WithTheme } from '../../../_helpers';
|
8
|
-
import { Body } from '../../../typograpy/components/Body/Body';
|
9
|
-
|
10
|
-
import { Portal } from './Portal';
|
11
|
-
|
12
|
-
const meta: Meta<typeof Portal> = {
|
13
|
-
title: 'plasma_b2c/Portal',
|
14
|
-
decorators: [WithTheme],
|
15
|
-
args: {
|
16
|
-
disabled: false,
|
17
|
-
},
|
18
|
-
};
|
19
|
-
|
20
|
-
export default meta;
|
21
|
-
|
22
|
-
type StoryPortalProps = ComponentProps<typeof Portal>;
|
23
|
-
|
24
|
-
const StyledWrapper = styled.div`
|
25
|
-
padding: 1.25rem;
|
26
|
-
margin-bottom: 0.625rem;
|
27
|
-
margin-top: 0.625rem;
|
28
|
-
|
29
|
-
border: 1px solid;
|
30
|
-
`;
|
31
|
-
|
32
|
-
const StoryDefault = ({ disabled }: StoryPortalProps) => {
|
33
|
-
const [show, setShow] = useState(false);
|
34
|
-
const containerRef = useRef<HTMLDivElement>(null);
|
35
|
-
|
36
|
-
return (
|
37
|
-
<>
|
38
|
-
<Button onClick={() => setShow(!show)}>{show ? 'Скрыть' : 'Показать'}</Button>
|
39
|
-
<StyledWrapper>
|
40
|
-
<Body style={{ marginBottom: '1.25rem' }}>Содержимое портала появится в нижнем блоке.</Body>
|
41
|
-
<Body style={{ marginBottom: '1.25rem' }}>
|
42
|
-
Если портал выключен (disabled), то содержимое появится в данном блоке.
|
43
|
-
</Body>
|
44
|
-
{show && containerRef.current && (
|
45
|
-
<Portal disabled={disabled} container={containerRef.current}>
|
46
|
-
<Body bold>Содержимое портала</Body>
|
47
|
-
</Portal>
|
48
|
-
)}
|
49
|
-
</StyledWrapper>
|
50
|
-
<StyledWrapper ref={containerRef} />
|
51
|
-
</>
|
52
|
-
);
|
53
|
-
};
|
54
|
-
|
55
|
-
export const Default: StoryObj<StoryPortalProps> = {
|
56
|
-
render: (args) => <StoryDefault {...args} />,
|
57
|
-
};
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import React, { useState, useRef } from 'react';
|
2
|
-
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
-
import type { ComponentProps } from 'react';
|
4
|
-
import styled from 'styled-components';
|
5
|
-
|
6
|
-
import { Button } from '../Button/Button';
|
7
|
-
import { WithTheme } from '../../../_helpers';
|
8
|
-
import { Body } from '../../../typograpy/components/Body/Body';
|
9
|
-
|
10
|
-
import { Portal } from './Portal';
|
11
|
-
|
12
|
-
const meta: Meta<typeof Portal> = {
|
13
|
-
title: 'plasma_web/Portal',
|
14
|
-
decorators: [WithTheme],
|
15
|
-
args: {
|
16
|
-
disabled: false,
|
17
|
-
},
|
18
|
-
};
|
19
|
-
|
20
|
-
export default meta;
|
21
|
-
|
22
|
-
type StoryPortalProps = ComponentProps<typeof Portal>;
|
23
|
-
|
24
|
-
const StyledWrapper = styled.div`
|
25
|
-
padding: 1.25rem;
|
26
|
-
margin-bottom: 0.625rem;
|
27
|
-
margin-top: 0.625rem;
|
28
|
-
|
29
|
-
border: 1px solid;
|
30
|
-
`;
|
31
|
-
|
32
|
-
const StoryDefault = ({ disabled }: StoryPortalProps) => {
|
33
|
-
const [show, setShow] = useState(false);
|
34
|
-
const containerRef = useRef<HTMLDivElement>(null);
|
35
|
-
|
36
|
-
return (
|
37
|
-
<>
|
38
|
-
<Button onClick={() => setShow(!show)}>{show ? 'Скрыть' : 'Показать'}</Button>
|
39
|
-
<StyledWrapper>
|
40
|
-
<Body style={{ marginBottom: '1.25rem' }}>Содержимое портала появится в нижнем блоке.</Body>
|
41
|
-
<Body style={{ marginBottom: '1.25rem' }}>
|
42
|
-
Если портал выключен (disabled), то содержимое появится в данном блоке.
|
43
|
-
</Body>
|
44
|
-
{show && containerRef.current && (
|
45
|
-
<Portal disabled={disabled} container={containerRef.current}>
|
46
|
-
<Body bold>Содержимое портала</Body>
|
47
|
-
</Portal>
|
48
|
-
)}
|
49
|
-
</StyledWrapper>
|
50
|
-
<StyledWrapper ref={containerRef} />
|
51
|
-
</>
|
52
|
-
);
|
53
|
-
};
|
54
|
-
|
55
|
-
export const Default: StoryObj<StoryPortalProps> = {
|
56
|
-
render: (args) => <StoryDefault {...args} />,
|
57
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import type { RootProps } from '../../engines/types';
|
3
|
-
import { PortalProps } from './Portal.types';
|
4
|
-
export declare const portalRoot: (Root: RootProps<HTMLDivElement, Omit<PortalProps, 'container'>>) => React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
|
5
|
-
export declare const portalConfig: {
|
6
|
-
name: string;
|
7
|
-
tag: string;
|
8
|
-
layout: (Root: RootProps<HTMLDivElement, Omit<PortalProps, 'container'>>) => React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
|
9
|
-
base: string;
|
10
|
-
variations: {};
|
11
|
-
defaults: {};
|
12
|
-
};
|
13
|
-
//# sourceMappingURL=Portal.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAM7C,eAAO,MAAM,UAAU,SAAU,UAAU,cAAc,EAAE,KAAK,WAAW,EAAE,WAAW,CAAC,CAAC,uFAUpF,CAAC;AAEP,eAAO,MAAM,YAAY;;;mBAZQ,UAAU,cAAc,EAAE,KAAK,WAAW,EAAE,WAAW,CAAC,CAAC;;;;CAmBzF,CAAC"}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import type { ReactNode } from 'react';
|
2
|
-
export declare type PortalProps = {
|
3
|
-
/**
|
4
|
-
* Элемент, в который добавится содержимое портала.
|
5
|
-
*/
|
6
|
-
container: HTMLElement | (() => HTMLElement);
|
7
|
-
/**
|
8
|
-
* Содержимое портала.
|
9
|
-
*/
|
10
|
-
children?: ReactNode;
|
11
|
-
/**
|
12
|
-
* Отключение портала.
|
13
|
-
* Если портал выключен, то его содержимое добавится внутрь родительского элемента.
|
14
|
-
* @default false
|
15
|
-
*/
|
16
|
-
disabled?: boolean;
|
17
|
-
};
|
18
|
-
//# sourceMappingURL=Portal.types.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Portal.types.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/Portal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,oBAAY,WAAW,GAAG;IACtB;;OAEG;IACH,SAAS,EAAE,WAAW,GAAG,CAAC,MAAM,WAAW,CAAC,CAAC;IAC7C;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
@@ -1,3 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
export declare const Portal: import("react").FunctionComponent<import("../../../../engines/types").PropsType<import("../../../../engines/types").Variants> & import("../../../../components/Portal").PortalProps & import("react").RefAttributes<HTMLDivElement>>;
|
3
|
-
//# sourceMappingURL=Portal.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Portal/Portal.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,MAAM,sOAA0B,CAAC"}
|
@@ -1,3 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
export declare const Portal: import("react").FunctionComponent<import("../../../../engines/types").PropsType<import("../../../../engines/types").Variants> & import("../../../../components/Portal").PortalProps & import("react").RefAttributes<HTMLDivElement>>;
|
3
|
-
//# sourceMappingURL=Portal.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Portal/Portal.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,MAAM,sOAA0B,CAAC"}
|