@alfalab/core-components-side-panel 5.0.0 → 5.1.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.
- package/Component.responsive.js +4 -4
- package/components/content/Component.desktop.js +3 -1
- package/components/content/Component.js +5 -2
- package/components/content/Component.mobile.js +3 -1
- package/components/content/desktop.css +3 -3
- package/components/content/index.css +4 -4
- package/components/content/mobile.css +3 -3
- package/components/controls/Component.js +6 -5
- package/components/controls/index.css +2 -2
- package/components/controls/index.js +2 -1
- package/components/footer/Component.desktop.js +4 -2
- package/components/footer/Component.js +6 -3
- package/components/footer/Component.mobile.js +4 -2
- package/components/footer/desktop.css +3 -3
- package/components/footer/index.css +4 -4
- package/components/footer/layout.css +17 -17
- package/components/footer/mobile.css +3 -3
- package/components/header/Component.js +6 -5
- package/components/header/desktop.css +5 -5
- package/components/header/index.css +14 -14
- package/components/header/mobile.css +4 -4
- package/cssm/Component.responsive.js +3 -3
- package/cssm/components/content/Component.desktop.js +2 -0
- package/cssm/components/content/Component.js +4 -1
- package/cssm/components/content/Component.mobile.js +2 -0
- package/cssm/components/controls/Component.js +4 -3
- package/cssm/components/controls/index.js +1 -0
- package/cssm/components/footer/Component.desktop.js +2 -0
- package/cssm/components/footer/Component.js +4 -1
- package/cssm/components/footer/Component.mobile.js +2 -0
- package/cssm/components/header/Component.js +3 -2
- package/cssm/desktop/Component.desktop.js +4 -3
- package/cssm/desktop/index.js +2 -1
- package/cssm/mobile/Component.mobile.js +4 -3
- package/cssm/mobile/index.js +2 -1
- package/cssm/shared/index.d.ts +1 -0
- package/cssm/shared/index.js +3 -0
- package/cssm/typings.d.ts +1 -0
- package/cssm/utils.d.ts +11 -0
- package/cssm/utils.js +20 -0
- package/desktop/Component.desktop.js +7 -6
- package/desktop/desktop.css +3 -3
- package/desktop/index.js +3 -2
- package/desktop/transitions.desktop.css +7 -7
- package/esm/Component.responsive.js +4 -4
- package/esm/components/content/Component.desktop.js +3 -1
- package/esm/components/content/Component.js +5 -2
- package/esm/components/content/Component.mobile.js +3 -1
- package/esm/components/content/desktop.css +3 -3
- package/esm/components/content/index.css +4 -4
- package/esm/components/content/mobile.css +3 -3
- package/esm/components/controls/Component.js +6 -5
- package/esm/components/controls/index.css +2 -2
- package/esm/components/controls/index.js +2 -1
- package/esm/components/footer/Component.desktop.js +4 -2
- package/esm/components/footer/Component.js +6 -3
- package/esm/components/footer/Component.mobile.js +4 -2
- package/esm/components/footer/desktop.css +3 -3
- package/esm/components/footer/index.css +4 -4
- package/esm/components/footer/layout.css +17 -17
- package/esm/components/footer/mobile.css +3 -3
- package/esm/components/header/Component.js +6 -5
- package/esm/components/header/desktop.css +5 -5
- package/esm/components/header/index.css +14 -14
- package/esm/components/header/mobile.css +4 -4
- package/esm/desktop/Component.desktop.js +7 -6
- package/esm/desktop/desktop.css +3 -3
- package/esm/desktop/index.js +3 -2
- package/esm/desktop/transitions.desktop.css +7 -7
- package/esm/index.js +1 -1
- package/esm/layout.module-32a5f5e3.js +4 -0
- package/esm/mobile/Component.mobile.js +8 -7
- package/esm/mobile/index.js +3 -2
- package/esm/mobile/mobile.css +4 -4
- package/esm/mobile/transitions.mobile.css +8 -8
- package/esm/shared/index.d.ts +1 -0
- package/esm/shared/index.js +2 -0
- package/esm/typings.d.ts +1 -0
- package/esm/utils.d.ts +11 -0
- package/esm/utils.js +16 -0
- package/index.js +1 -1
- package/layout.module-3c57dc76.js +6 -0
- package/mobile/Component.mobile.js +7 -6
- package/mobile/index.js +3 -2
- package/mobile/mobile.css +4 -4
- package/mobile/transitions.mobile.css +8 -8
- package/modern/Component.responsive.js +4 -4
- package/modern/components/content/Component.desktop.js +3 -1
- package/modern/components/content/Component.js +5 -2
- package/modern/components/content/Component.mobile.js +3 -1
- package/modern/components/content/desktop.css +3 -3
- package/modern/components/content/index.css +4 -4
- package/modern/components/content/mobile.css +3 -3
- package/modern/components/controls/Component.js +6 -5
- package/modern/components/controls/index.css +2 -2
- package/modern/components/controls/index.js +2 -1
- package/modern/components/footer/Component.desktop.js +4 -2
- package/modern/components/footer/Component.js +6 -3
- package/modern/components/footer/Component.mobile.js +4 -2
- package/modern/components/footer/desktop.css +3 -3
- package/modern/components/footer/index.css +4 -4
- package/modern/components/footer/layout.css +17 -17
- package/modern/components/footer/mobile.css +3 -3
- package/modern/components/header/Component.js +6 -5
- package/modern/components/header/desktop.css +5 -5
- package/modern/components/header/index.css +14 -14
- package/modern/components/header/mobile.css +4 -4
- package/modern/desktop/Component.desktop.js +7 -6
- package/modern/desktop/desktop.css +3 -3
- package/modern/desktop/index.js +3 -2
- package/modern/desktop/transitions.desktop.css +7 -7
- package/modern/index.js +1 -1
- package/modern/layout.module-6eff2b9e.js +4 -0
- package/modern/mobile/Component.mobile.js +8 -7
- package/modern/mobile/index.js +3 -2
- package/modern/mobile/mobile.css +4 -4
- package/modern/mobile/transitions.mobile.css +8 -8
- package/modern/shared/index.d.ts +1 -0
- package/modern/shared/index.js +2 -0
- package/modern/typings.d.ts +1 -0
- package/modern/utils.d.ts +11 -0
- package/modern/utils.js +16 -0
- package/package.json +5 -5
- package/shared/index.d.ts +1 -0
- package/shared/index.js +3 -0
- package/src/Component.responsive.tsx +16 -3
- package/src/components/content/Component.tsx +5 -1
- package/src/components/controls/Component.tsx +5 -2
- package/src/components/footer/Component.tsx +5 -1
- package/src/components/header/Component.tsx +3 -1
- package/src/desktop/Component.desktop.tsx +4 -2
- package/src/mobile/Component.mobile.tsx +8 -4
- package/src/shared/index.ts +1 -0
- package/src/typings.ts +1 -0
- package/src/utils.ts +14 -0
- package/typings.d.ts +1 -0
- package/utils.d.ts +11 -0
- package/utils.js +20 -0
- package/esm/layout.module-39750ede.js +0 -4
- package/layout.module-9de5161f.js +0 -6
- package/modern/layout.module-36042bae.js +0 -4
package/esm/typings.d.ts
CHANGED
package/esm/utils.d.ts
ADDED
package/esm/utils.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getDataTestId } from '@alfalab/core-components-shared/esm';
|
|
2
|
+
|
|
3
|
+
function getSidePanelTestIds(dataTestId) {
|
|
4
|
+
return {
|
|
5
|
+
modal: dataTestId,
|
|
6
|
+
content: getDataTestId(dataTestId, 'content'),
|
|
7
|
+
footer: getDataTestId(dataTestId, 'footer'),
|
|
8
|
+
controls: getDataTestId(dataTestId, 'controls'),
|
|
9
|
+
header: getDataTestId(dataTestId, 'header'),
|
|
10
|
+
title: getDataTestId(dataTestId, 'header-title'),
|
|
11
|
+
closer: getDataTestId(dataTestId, 'header-closer'),
|
|
12
|
+
backButton: getDataTestId(dataTestId, 'header-back-button'),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { getSidePanelTestIds };
|
package/index.js
CHANGED
|
@@ -10,7 +10,7 @@ require('@alfalab/core-components-shared');
|
|
|
10
10
|
require('./components/controls/Component.js');
|
|
11
11
|
require('classnames');
|
|
12
12
|
require('./ResponsiveContext.js');
|
|
13
|
-
require('./layout.module-
|
|
13
|
+
require('./layout.module-3c57dc76.js');
|
|
14
14
|
require('./components/header/Component.js');
|
|
15
15
|
require('@alfalab/core-components-navigation-bar');
|
|
16
16
|
require('./Context.js');
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var layoutStyles = {"column":"side-panel__column_v9h4m","gap-16":"side-panel__gap-16_v9h4m","gap-24":"side-panel__gap-24_v9h4m","gap-32":"side-panel__gap-32_v9h4m","start":"side-panel__start_v9h4m","center":"side-panel__center_v9h4m","space-between":"side-panel__space-between_v9h4m"};
|
|
4
|
+
require('./components/footer/layout.css')
|
|
5
|
+
|
|
6
|
+
exports.layoutStyles = layoutStyles;
|
|
@@ -12,8 +12,9 @@ var components_footer_Component_mobile = require('../components/footer/Component
|
|
|
12
12
|
var components_header_Component = require('../components/header/Component.js');
|
|
13
13
|
var ResponsiveContext = require('../ResponsiveContext.js');
|
|
14
14
|
require('../components/content/Component.js');
|
|
15
|
+
require('@alfalab/core-components-shared');
|
|
15
16
|
require('../Context.js');
|
|
16
|
-
require('../layout.module-
|
|
17
|
+
require('../layout.module-3c57dc76.js');
|
|
17
18
|
require('../components/footer/Component.js');
|
|
18
19
|
require('@alfalab/core-components-navigation-bar');
|
|
19
20
|
|
|
@@ -22,17 +23,17 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
22
23
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
23
24
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
24
25
|
|
|
25
|
-
var styles = {"component":"side-
|
|
26
|
+
var styles = {"component":"side-panel__component_1m9qb","mobileContent":"side-panel__mobileContent_1m9qb"};
|
|
26
27
|
require('./mobile.css')
|
|
27
28
|
|
|
28
|
-
var transitions = {"appear":"side-
|
|
29
|
+
var transitions = {"appear":"side-panel__appear_rhotw","enter":"side-panel__enter_rhotw","appearActive":"side-panel__appearActive_rhotw","enterActive":"side-panel__enterActive_rhotw","exit":"side-panel__exit_rhotw","exitActive":"side-panel__exitActive_rhotw","exitDone":"side-panel__exitDone_rhotw"};
|
|
29
30
|
require('./transitions.mobile.css')
|
|
30
31
|
|
|
31
|
-
var contextValue = { size: 's', view: 'mobile' };
|
|
32
32
|
var SidePanelMobileComponent = React.forwardRef(function (_a, ref) {
|
|
33
|
-
var children = _a.children, className = _a.className, transitionProps = _a.transitionProps, restProps = tslib.__rest(_a, ["children", "className", "transitionProps"]);
|
|
33
|
+
var children = _a.children, className = _a.className, transitionProps = _a.transitionProps, dataTestId = _a.dataTestId, restProps = tslib.__rest(_a, ["children", "className", "transitionProps", "dataTestId"]);
|
|
34
34
|
var responsiveContext = React.useContext(ResponsiveContext.ResponsiveContext);
|
|
35
|
-
var
|
|
35
|
+
var contextValue = React.useMemo(function () { return ({ size: 's', view: 'mobile', dataTestId: dataTestId }); }, [dataTestId]);
|
|
36
|
+
var renderContent = function () { return (React__default.default.createElement(coreComponentsBaseModal.BaseModal, tslib.__assign({}, restProps, { dataTestId: dataTestId, ref: ref, transitionProps: tslib.__assign({ classNames: transitions }, transitionProps), className: cn__default.default(className, styles.component), scrollHandler: 'content' }),
|
|
36
37
|
React__default.default.createElement("div", { className: styles.mobileContent }, children))); };
|
|
37
38
|
var renderWithContext = function () { return (React__default.default.createElement(ResponsiveContext.ResponsiveContext.Provider, { value: contextValue }, renderContent())); };
|
|
38
39
|
return responsiveContext ? renderContent() : renderWithContext();
|
package/mobile/index.js
CHANGED
|
@@ -9,10 +9,11 @@ require('classnames');
|
|
|
9
9
|
require('@alfalab/core-components-base-modal');
|
|
10
10
|
require('../components/content/Component.mobile.js');
|
|
11
11
|
require('../components/content/Component.js');
|
|
12
|
+
require('@alfalab/core-components-shared');
|
|
12
13
|
require('../Context.js');
|
|
13
|
-
require('../components/controls/Component.js');
|
|
14
14
|
require('../ResponsiveContext.js');
|
|
15
|
-
require('../
|
|
15
|
+
require('../components/controls/Component.js');
|
|
16
|
+
require('../layout.module-3c57dc76.js');
|
|
16
17
|
require('../components/footer/Component.mobile.js');
|
|
17
18
|
require('../components/footer/Component.js');
|
|
18
19
|
require('../components/header/Component.js');
|
package/mobile/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 163lm */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
/* mobile */
|
|
28
28
|
|
|
29
29
|
/* paddings */
|
|
30
|
-
} .side-
|
|
30
|
+
} .side-panel__component_1m9qb {
|
|
31
31
|
top: 0;
|
|
32
32
|
height: 100%;
|
|
33
33
|
width: 100%;
|
|
34
34
|
overflow-x: hidden;
|
|
35
35
|
overflow-y: auto;
|
|
36
36
|
max-width: 600px;
|
|
37
|
-
} .side-
|
|
37
|
+
} .side-panel__component_1m9qb.side-panel__component_1m9qb {
|
|
38
38
|
position: fixed;
|
|
39
39
|
flex: 1;
|
|
40
|
-
} .side-
|
|
40
|
+
} .side-panel__mobileContent_1m9qb {
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: column;
|
|
43
43
|
width: 100%;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
.side-
|
|
3
|
-
.side-
|
|
1
|
+
/* hash: 1kno1 */
|
|
2
|
+
.side-panel__appear_rhotw,
|
|
3
|
+
.side-panel__enter_rhotw {
|
|
4
4
|
opacity: 0;
|
|
5
5
|
transform: translateY(15px);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.side-
|
|
9
|
-
.side-
|
|
8
|
+
.side-panel__appearActive_rhotw,
|
|
9
|
+
.side-panel__enterActive_rhotw {
|
|
10
10
|
opacity: 1;
|
|
11
11
|
transform: translateY(0);
|
|
12
12
|
transition: opacity 200ms ease-in, transform 200ms ease-in;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.side-
|
|
15
|
+
.side-panel__exit_rhotw {
|
|
16
16
|
opacity: 1;
|
|
17
17
|
transform: translateY(0);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.side-
|
|
21
|
-
.side-
|
|
20
|
+
.side-panel__exitActive_rhotw,
|
|
21
|
+
.side-panel__exitDone_rhotw {
|
|
22
22
|
opacity: 0;
|
|
23
23
|
transform: translateY(15px);
|
|
24
24
|
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
|
@@ -7,7 +7,7 @@ import { SidePanelDesktop } from './desktop/Component.desktop.js';
|
|
|
7
7
|
import { SidePanelMobile } from './mobile/Component.mobile.js';
|
|
8
8
|
import { ResponsiveContext } from './ResponsiveContext.js';
|
|
9
9
|
import 'classnames';
|
|
10
|
-
import './layout.module-
|
|
10
|
+
import './layout.module-6eff2b9e.js';
|
|
11
11
|
import '@alfalab/core-components-navigation-bar/modern';
|
|
12
12
|
import './Context.js';
|
|
13
13
|
import '@alfalab/core-components-base-modal/modern';
|
|
@@ -29,15 +29,15 @@ function createResponsive(desktop, mobile) {
|
|
|
29
29
|
}
|
|
30
30
|
return ResponsiveChild;
|
|
31
31
|
}
|
|
32
|
-
const SidePanelResponsiveComponent = forwardRef(({ children, breakpoint = 1024, size = 's', defaultMatchMediaValue, ...restProps }, ref) => {
|
|
32
|
+
const SidePanelResponsiveComponent = forwardRef(({ children, breakpoint = 1024, size = 's', defaultMatchMediaValue, dataTestId, ...restProps }, ref) => {
|
|
33
33
|
const query = `(min-width: ${breakpoint}px)`;
|
|
34
34
|
const getDefaultValue = () => (isClient() ? window.matchMedia(query).matches : false);
|
|
35
35
|
const [isDesktop] = useMatchMedia(query, defaultMatchMediaValue ?? getDefaultValue);
|
|
36
36
|
const view = isDesktop ? 'desktop' : 'mobile';
|
|
37
|
-
const contextValue = useMemo(() => ({ view, size }), [view, size]);
|
|
37
|
+
const contextValue = useMemo(() => ({ view, size, dataTestId }), [view, size, dataTestId]);
|
|
38
38
|
const Component = isDesktop ? SidePanelDesktop : SidePanelMobile;
|
|
39
39
|
return (React.createElement(ResponsiveContext.Provider, { value: contextValue },
|
|
40
|
-
React.createElement(Component, { ref: ref, size: size, ...restProps }, children)));
|
|
40
|
+
React.createElement(Component, { ref: ref, size: size, dataTestId: dataTestId, ...restProps }, children)));
|
|
41
41
|
});
|
|
42
42
|
const SidePanelResponsive = Object.assign(SidePanelResponsiveComponent, {
|
|
43
43
|
Header,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { Content } from './Component.js';
|
|
4
|
+
import '@alfalab/core-components-shared/modern';
|
|
4
5
|
import '../../Context.js';
|
|
5
6
|
import '@alfalab/core-components-base-modal/modern';
|
|
7
|
+
import '../../ResponsiveContext.js';
|
|
6
8
|
|
|
7
|
-
const styles = {"s":"side-
|
|
9
|
+
const styles = {"s":"side-panel__s_6qysf"};
|
|
8
10
|
require('./desktop.css')
|
|
9
11
|
|
|
10
12
|
const ContentDesktop = ({ size = 's', className, ...restProps }) => React.createElement(Content, { className: cn(className, size && styles[size]), ...restProps });
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
3
4
|
import { ModalContext } from '../../Context.js';
|
|
5
|
+
import { ResponsiveContext } from '../../ResponsiveContext.js';
|
|
4
6
|
import '@alfalab/core-components-base-modal/modern';
|
|
5
7
|
|
|
6
|
-
const styles = {"content":"side-
|
|
8
|
+
const styles = {"content":"side-panel__content_11fxa","withHeader":"side-panel__withHeader_11fxa","flex":"side-panel__flex_11fxa"};
|
|
7
9
|
require('./index.css')
|
|
8
10
|
|
|
9
11
|
const Content = ({ children, className, dataTestId }) => {
|
|
10
12
|
const { contentRef, hasHeader } = useContext(ModalContext);
|
|
13
|
+
const responsiveContext = useContext(ResponsiveContext);
|
|
11
14
|
return (React.createElement("div", { className: cn(styles.content, className, styles.flex, {
|
|
12
15
|
[styles.withHeader]: hasHeader,
|
|
13
|
-
}), ref: contentRef, "data-test-id": dataTestId }, children));
|
|
16
|
+
}), ref: contentRef, "data-test-id": dataTestId || getDataTestId(responsiveContext?.dataTestId, 'content') }, children));
|
|
14
17
|
};
|
|
15
18
|
|
|
16
19
|
export { Content };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { Content } from './Component.js';
|
|
4
|
+
import '@alfalab/core-components-shared/modern';
|
|
4
5
|
import '../../Context.js';
|
|
5
6
|
import '@alfalab/core-components-base-modal/modern';
|
|
7
|
+
import '../../ResponsiveContext.js';
|
|
6
8
|
|
|
7
|
-
const styles = {"content":"side-
|
|
9
|
+
const styles = {"content":"side-panel__content_qkd51"};
|
|
8
10
|
require('./mobile.css')
|
|
9
11
|
|
|
10
12
|
const ContentMobile = ({ className, ...restProps }) => (React.createElement(Content, { className: cn(className, styles.content), ...restProps }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1uyff */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
/* mobile */
|
|
31
31
|
|
|
32
32
|
/* paddings */
|
|
33
|
-
} .side-
|
|
33
|
+
} .side-panel__s_6qysf {
|
|
34
34
|
padding: var(--side-panel-s-content-paddings)
|
|
35
|
-
} .side-
|
|
35
|
+
} .side-panel__s_6qysf:last-child {
|
|
36
36
|
padding-bottom: var(--gap-2xl);
|
|
37
37
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: hr6pq */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
/* mobile */
|
|
28
28
|
|
|
29
29
|
/* paddings */
|
|
30
|
-
} .side-
|
|
30
|
+
} .side-panel__content_11fxa {
|
|
31
31
|
position: relative;
|
|
32
32
|
box-sizing: border-box;
|
|
33
33
|
width: 100%;
|
|
34
34
|
z-index: 0
|
|
35
|
-
} .side-
|
|
35
|
+
} .side-panel__content_11fxa.side-panel__withHeader_11fxa {
|
|
36
36
|
padding-top: 0;
|
|
37
|
-
} .side-
|
|
37
|
+
} .side-panel__flex_11fxa {
|
|
38
38
|
flex: 1 1 auto;
|
|
39
39
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: xcffi */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
/* mobile */
|
|
29
29
|
|
|
30
30
|
/* paddings */
|
|
31
|
-
} .side-
|
|
31
|
+
} .side-panel__content_qkd51 {
|
|
32
32
|
padding: var(--gap-m) var(--gap-m) 0
|
|
33
|
-
} .side-
|
|
33
|
+
} .side-panel__content_qkd51:last-child {
|
|
34
34
|
padding-bottom: var(--gap-m);
|
|
35
35
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
3
4
|
import { ResponsiveContext } from '../../ResponsiveContext.js';
|
|
4
|
-
import { l as layoutStyles } from '../../layout.module-
|
|
5
|
+
import { l as layoutStyles } from '../../layout.module-6eff2b9e.js';
|
|
5
6
|
|
|
6
|
-
const styles = {"component":"side-
|
|
7
|
+
const styles = {"component":"side-panel__component_10bf7"};
|
|
7
8
|
require('./index.css')
|
|
8
9
|
|
|
9
|
-
const Controls = ({ primary, secondary, gap
|
|
10
|
+
const Controls = ({ primary, secondary, gap, layout: layoutProp = 'start', mobileLayout = layoutProp, }) => {
|
|
10
11
|
const context = useContext(ResponsiveContext);
|
|
11
|
-
const { view = 'desktop' } = context || {};
|
|
12
|
+
const { view = 'desktop', dataTestId } = context || {};
|
|
12
13
|
const layout = view === 'mobile' ? mobileLayout : layoutProp;
|
|
13
14
|
const shouldReverse = view === 'mobile' && layout !== 'column';
|
|
14
|
-
return (React.createElement("div", { className: cn(styles.component, layoutStyles[layout], gap && layoutStyles[`gap-${gap}`]) }, shouldReverse ? (React.createElement(React.Fragment, null,
|
|
15
|
+
return (React.createElement("div", { "data-test-id": getDataTestId(dataTestId, 'controls'), className: cn(styles.component, layoutStyles[layout], gap && layoutStyles[`gap-${gap}`]) }, shouldReverse ? (React.createElement(React.Fragment, null,
|
|
15
16
|
secondary,
|
|
16
17
|
primary)) : (React.createElement(React.Fragment, null,
|
|
17
18
|
primary,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { Footer } from './Component.js';
|
|
4
|
+
import '@alfalab/core-components-shared/modern';
|
|
4
5
|
import '../../Context.js';
|
|
5
6
|
import '@alfalab/core-components-base-modal/modern';
|
|
6
|
-
import '../../
|
|
7
|
+
import '../../ResponsiveContext.js';
|
|
8
|
+
import '../../layout.module-6eff2b9e.js';
|
|
7
9
|
|
|
8
|
-
const styles = {"sticky":"side-
|
|
10
|
+
const styles = {"sticky":"side-panel__sticky_1twrr","s":"side-panel__s_1twrr"};
|
|
9
11
|
require('./desktop.css')
|
|
10
12
|
|
|
11
13
|
const FooterDesktop = ({ size = 's', className, sticky, ...restProps }) => (React.createElement(Footer, { className: cn(className, size && styles[size], {
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import React, { useContext, useEffect } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
3
4
|
import { ModalContext } from '../../Context.js';
|
|
4
|
-
import {
|
|
5
|
+
import { ResponsiveContext } from '../../ResponsiveContext.js';
|
|
6
|
+
import { l as layoutStyles } from '../../layout.module-6eff2b9e.js';
|
|
5
7
|
import '@alfalab/core-components-base-modal/modern';
|
|
6
8
|
|
|
7
|
-
const styles = {"footer":"side-
|
|
9
|
+
const styles = {"footer":"side-panel__footer_po3ep","sticky":"side-panel__sticky_po3ep","highlighted":"side-panel__highlighted_po3ep"};
|
|
8
10
|
require('./index.css')
|
|
9
11
|
|
|
10
12
|
const Footer = ({ children, className, sticky, layout = 'start', gap, dataTestId, }) => {
|
|
11
13
|
const { footerHighlighted, setHasFooter } = useContext(ModalContext);
|
|
14
|
+
const responsiveContext = useContext(ResponsiveContext);
|
|
12
15
|
useEffect(() => {
|
|
13
16
|
setHasFooter(true);
|
|
14
17
|
}, [setHasFooter]);
|
|
15
18
|
return (React.createElement("div", { className: cn(styles.footer, className, layoutStyles[layout], gap && layoutStyles[`gap-${gap}`], {
|
|
16
19
|
[styles.highlighted]: sticky && footerHighlighted,
|
|
17
20
|
[styles.sticky]: sticky,
|
|
18
|
-
}), "data-test-id": dataTestId }, children));
|
|
21
|
+
}), "data-test-id": dataTestId || getDataTestId(responsiveContext?.dataTestId, 'footer') }, children));
|
|
19
22
|
};
|
|
20
23
|
|
|
21
24
|
export { Footer };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { Footer } from './Component.js';
|
|
4
|
+
import '@alfalab/core-components-shared/modern';
|
|
4
5
|
import '../../Context.js';
|
|
5
6
|
import '@alfalab/core-components-base-modal/modern';
|
|
6
|
-
import '../../
|
|
7
|
+
import '../../ResponsiveContext.js';
|
|
8
|
+
import '../../layout.module-6eff2b9e.js';
|
|
7
9
|
|
|
8
|
-
const styles = {"footer":"side-
|
|
10
|
+
const styles = {"footer":"side-panel__footer_166d5","sticky":"side-panel__sticky_166d5"};
|
|
9
11
|
require('./mobile.css')
|
|
10
12
|
|
|
11
13
|
const FooterMobile = ({ className, sticky, layout = 'start', ...restProps }) => (React.createElement(Footer, { className: cn(className, styles.footer, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1vp51 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
/* mobile */
|
|
31
31
|
|
|
32
32
|
/* paddings */
|
|
33
|
-
} .side-
|
|
33
|
+
} .side-panel__sticky_1twrr {
|
|
34
34
|
bottom: 0;
|
|
35
|
-
} .side-
|
|
35
|
+
} .side-panel__s_1twrr {
|
|
36
36
|
padding: var(--side-panel-s-footer-paddings);
|
|
37
37
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 19kuq */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-modal-bg-primary: #fff;
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
/* mobile */
|
|
33
33
|
|
|
34
34
|
/* paddings */
|
|
35
|
-
} .side-
|
|
35
|
+
} .side-panel__footer_po3ep {
|
|
36
36
|
width: 100%;
|
|
37
37
|
box-sizing: border-box;
|
|
38
38
|
transition: box-shadow 0.2s ease, background 0.2s ease;
|
|
39
|
-
} .side-
|
|
39
|
+
} .side-panel__sticky_po3ep {
|
|
40
40
|
background: var(--side-panel-footer-background);
|
|
41
41
|
position: sticky;
|
|
42
42
|
z-index: 1;
|
|
43
|
-
} .side-
|
|
43
|
+
} .side-panel__highlighted_po3ep {
|
|
44
44
|
background: var(--side-panel-footer-highlight-background);
|
|
45
45
|
box-shadow: var(--side-panel-footer-highlight-box-shadow);
|
|
46
46
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: wddeo */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -31,35 +31,35 @@
|
|
|
31
31
|
/* mobile */
|
|
32
32
|
|
|
33
33
|
/* paddings */
|
|
34
|
-
} .side-
|
|
34
|
+
} .side-panel__column_v9h4m {
|
|
35
35
|
display: flex;
|
|
36
36
|
flex-direction: column
|
|
37
|
-
} .side-
|
|
37
|
+
} .side-panel__column_v9h4m > *:not(:last-child):not(:only-child) {
|
|
38
38
|
margin-bottom: var(--side-panel-footer-default-gap);
|
|
39
|
-
} .side-
|
|
39
|
+
} .side-panel__column_v9h4m.side-panel__gap-16_v9h4m > *:not(:last-child):not(:only-child) {
|
|
40
40
|
margin-bottom: var(--gap-m);
|
|
41
|
-
} .side-
|
|
41
|
+
} .side-panel__column_v9h4m.side-panel__gap-24_v9h4m > *:not(:last-child):not(:only-child) {
|
|
42
42
|
margin-bottom: var(--gap-xl);
|
|
43
|
-
} .side-
|
|
43
|
+
} .side-panel__column_v9h4m.side-panel__gap-32_v9h4m > *:not(:last-child):not(:only-child) {
|
|
44
44
|
margin-bottom: var(--gap-2xl);
|
|
45
|
-
} .side-
|
|
45
|
+
} .side-panel__start_v9h4m {
|
|
46
46
|
justify-content: flex-start;
|
|
47
|
-
} .side-
|
|
47
|
+
} .side-panel__center_v9h4m {
|
|
48
48
|
justify-content: center;
|
|
49
|
-
} .side-panel__space-
|
|
49
|
+
} .side-panel__space-between_v9h4m {
|
|
50
50
|
justify-content: space-between
|
|
51
|
-
} .side-panel__space-
|
|
51
|
+
} .side-panel__space-between_v9h4m > * {
|
|
52
52
|
flex: 1;
|
|
53
|
-
} .side-
|
|
54
|
-
.side-
|
|
55
|
-
.side-panel__space-
|
|
53
|
+
} .side-panel__start_v9h4m,
|
|
54
|
+
.side-panel__center_v9h4m,
|
|
55
|
+
.side-panel__space-between_v9h4m {
|
|
56
56
|
display: flex
|
|
57
|
-
} .side-
|
|
57
|
+
} .side-panel__start_v9h4m > *:not(:last-child):not(:only-child), .side-panel__center_v9h4m > *:not(:last-child):not(:only-child), .side-panel__space-between_v9h4m > *:not(:last-child):not(:only-child) {
|
|
58
58
|
margin-right: var(--side-panel-footer-default-gap);
|
|
59
|
-
} .side-
|
|
59
|
+
} .side-panel__start_v9h4m.side-panel__gap-16_v9h4m > *:not(:last-child):not(:only-child), .side-panel__center_v9h4m.side-panel__gap-16_v9h4m > *:not(:last-child):not(:only-child), .side-panel__space-between_v9h4m.side-panel__gap-16_v9h4m > *:not(:last-child):not(:only-child) {
|
|
60
60
|
margin-right: var(--gap-m);
|
|
61
|
-
} .side-
|
|
61
|
+
} .side-panel__start_v9h4m.side-panel__gap-24_v9h4m > *:not(:last-child):not(:only-child), .side-panel__center_v9h4m.side-panel__gap-24_v9h4m > *:not(:last-child):not(:only-child), .side-panel__space-between_v9h4m.side-panel__gap-24_v9h4m > *:not(:last-child):not(:only-child) {
|
|
62
62
|
margin-right: var(--gap-xl);
|
|
63
|
-
} .side-
|
|
63
|
+
} .side-panel__start_v9h4m.side-panel__gap-32_v9h4m > *:not(:last-child):not(:only-child), .side-panel__center_v9h4m.side-panel__gap-32_v9h4m > *:not(:last-child):not(:only-child), .side-panel__space-between_v9h4m.side-panel__gap-32_v9h4m > *:not(:last-child):not(:only-child) {
|
|
64
64
|
margin-right: var(--gap-2xl);
|
|
65
65
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 190yi */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
/* mobile */
|
|
29
29
|
|
|
30
30
|
/* paddings */
|
|
31
|
-
} .side-
|
|
31
|
+
} .side-panel__footer_166d5 {
|
|
32
32
|
padding: var(--gap-m);
|
|
33
|
-
} .side-
|
|
33
|
+
} .side-panel__sticky_166d5 {
|
|
34
34
|
bottom: 0;
|
|
35
35
|
}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import React, { useContext, useEffect } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { NavigationBar } from '@alfalab/core-components-navigation-bar/modern';
|
|
4
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
4
5
|
import { ModalContext } from '../../Context.js';
|
|
5
6
|
import { ResponsiveContext } from '../../ResponsiveContext.js';
|
|
6
7
|
import '@alfalab/core-components-base-modal/modern';
|
|
7
8
|
|
|
8
|
-
const desktopStyles = {"content":"side-
|
|
9
|
+
const desktopStyles = {"content":"side-panel__content_o3tu9","s":"side-panel__s_o3tu9","sticky":"side-panel__sticky_o3tu9"};
|
|
9
10
|
require('./desktop.css')
|
|
10
11
|
|
|
11
|
-
const styles = {"header":"side-
|
|
12
|
+
const styles = {"header":"side-panel__header_1kokn","hasContent":"side-panel__hasContent_1kokn","highlighted":"side-panel__highlighted_1kokn","sticky":"side-panel__sticky_1kokn","backgroundImage":"side-panel__backgroundImage_1kokn","content":"side-panel__content_1kokn","title":"side-panel__title_1kokn","addon":"side-panel__addon_1kokn","closer":"side-panel__closer_1kokn","right":"side-panel__right_1kokn","trim":"side-panel__trim_1kokn"};
|
|
12
13
|
require('./index.css')
|
|
13
14
|
|
|
14
|
-
const mobileStyles = {"header":"side-
|
|
15
|
+
const mobileStyles = {"header":"side-panel__header_1ka0o","sticky":"side-panel__sticky_1ka0o","content":"side-panel__content_1ka0o"};
|
|
15
16
|
require('./mobile.css')
|
|
16
17
|
|
|
17
18
|
const Header = ({ className, children, contentClassName, title, sticky, hasCloser = true, ...restProps }) => {
|
|
18
19
|
const { setHasHeader, headerHighlighted, onClose, componentRef } = useContext(ModalContext);
|
|
19
|
-
const { size = 's', view = 'desktop' } = useContext(ResponsiveContext) || {};
|
|
20
|
+
const { size = 's', view = 'desktop', dataTestId } = useContext(ResponsiveContext) || {};
|
|
20
21
|
useEffect(() => {
|
|
21
22
|
setHasHeader(true);
|
|
22
23
|
}, [setHasHeader]);
|
|
23
24
|
const hasContent = Boolean(title || children);
|
|
24
|
-
return (React.createElement(NavigationBar, { ...restProps, scrollableParentRef: componentRef, view: view, sticky: sticky, title: title, hasCloser: hasCloser, onClose: onClose, className: cn(styles.header, className, {
|
|
25
|
+
return (React.createElement(NavigationBar, { dataTestId: getDataTestId(dataTestId, 'header'), ...restProps, scrollableParentRef: componentRef, view: view, sticky: sticky, title: title, hasCloser: hasCloser, onClose: onClose, className: cn(styles.header, className, {
|
|
25
26
|
[styles.highlighted]: hasContent && sticky && headerHighlighted,
|
|
26
27
|
[styles.sticky]: sticky,
|
|
27
28
|
[styles.hasContent]: hasContent,
|