@stack-spot/portal-layout 2.32.4 → 2.32.5-beta.1
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/CHANGELOG.md +140 -0
- package/dist/Layout.d.ts +6 -7
- package/dist/Layout.d.ts.map +1 -1
- package/dist/Layout.js +30 -11
- package/dist/Layout.js.map +1 -1
- package/dist/LayoutOverlayManager.d.ts +77 -11
- package/dist/LayoutOverlayManager.d.ts.map +1 -1
- package/dist/LayoutOverlayManager.js +159 -46
- package/dist/LayoutOverlayManager.js.map +1 -1
- package/dist/components/Dialog.d.ts +1 -1
- package/dist/components/Dialog.d.ts.map +1 -1
- package/dist/components/NotificationCenter/NotificationsPanelFooter.js +1 -1
- package/dist/components/NotificationCenter/NotificationsPanelFooter.js.map +1 -1
- package/dist/components/NotificationCenter/dictionary.d.ts +1 -1
- package/dist/components/NotificationCenter/dictionary.d.ts.map +1 -1
- package/dist/components/NotificationCenter/dictionary.js +2 -2
- package/dist/components/NotificationCenter/dictionary.js.map +1 -1
- package/dist/components/OverlayContent.js +2 -2
- package/dist/components/error/ErrorBoundary.d.ts.map +1 -1
- package/dist/components/error/SilentErrorBoundary.d.ts.map +1 -1
- package/dist/components/menu/MenuSections.d.ts.map +1 -1
- package/dist/components/menu/MenuSections.js +17 -7
- package/dist/components/menu/MenuSections.js.map +1 -1
- package/dist/components/menu/types.d.ts +7 -0
- package/dist/components/menu/types.d.ts.map +1 -1
- package/dist/components/tour/StepNavigation.d.ts.map +1 -1
- package/dist/components/tour/StepNavigation.js +2 -1
- package/dist/components/tour/StepNavigation.js.map +1 -1
- package/dist/dictionary.js +2 -2
- package/dist/dictionary.js.map +1 -1
- package/dist/elements.d.ts +1 -0
- package/dist/elements.d.ts.map +1 -1
- package/dist/elements.js +1 -0
- package/dist/elements.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/layout.css +31 -4
- package/package.json +6 -4
- package/readme.md +0 -1
- package/src/Layout.tsx +70 -22
- package/src/LayoutOverlayManager.tsx +206 -54
- package/src/components/Dialog.tsx +1 -1
- package/src/components/NotificationCenter/NotificationsPanelFooter.tsx +1 -1
- package/src/components/NotificationCenter/dictionary.ts +2 -2
- package/src/components/OverlayContent.tsx +2 -2
- package/src/components/menu/MenuSections.tsx +19 -8
- package/src/components/menu/types.ts +7 -0
- package/src/components/tour/StepNavigation.tsx +3 -1
- package/src/dictionary.ts +2 -2
- package/src/elements.ts +1 -0
- package/src/index.ts +1 -0
- package/src/layout.css +31 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,145 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.32.5-beta.1](https://github.com/stack-spot/portal-commons/compare/portal-layout-beta@v2.32.4-beta.1...portal-layout-beta@v2.32.5-beta.1) (2025-12-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* compact menu as default ([#1876](https://github.com/stack-spot/portal-commons/issues/1876)) ([0f42b35](https://github.com/stack-spot/portal-commons/commit/0f42b35ad7597f25db161553edf28765a68d0eef))
|
|
9
|
+
|
|
10
|
+
## [2.39.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.38.1...portal-layout@v2.39.0) (2025-12-01)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* layout: multi modal ([#1825](https://github.com/stack-spot/portal-commons/issues/1825)) ([a6cba63](https://github.com/stack-spot/portal-commons/commit/a6cba631ced1e398ec1b86de80f4420d55f6c8bd))
|
|
16
|
+
|
|
17
|
+
## [2.38.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.38.0...portal-layout@v2.38.1) (2025-11-17)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* 1968 notification panel height ([#1804](https://github.com/stack-spot/portal-commons/issues/1804)) ([c1e1937](https://github.com/stack-spot/portal-commons/commit/c1e1937ecbb472ad4b03215751e5cfa8ec22cea8))
|
|
23
|
+
|
|
24
|
+
## [2.38.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.37.1...portal-layout@v2.38.0) (2025-11-10)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* add third-level menu for inner content ([#1742](https://github.com/stack-spot/portal-commons/issues/1742)) ([9966a5c](https://github.com/stack-spot/portal-commons/commit/9966a5c6970ba676542ead228cf6a887bf8260f6))
|
|
30
|
+
|
|
31
|
+
## [2.37.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.37.0...portal-layout@v2.37.1) (2025-11-07)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* semantic for accessibility ([#1766](https://github.com/stack-spot/portal-commons/issues/1766)) ([578bc95](https://github.com/stack-spot/portal-commons/commit/578bc95698f5d707f4645693df22c4da57f8684e))
|
|
37
|
+
|
|
38
|
+
## [2.37.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.36.3...portal-layout@v2.37.0) (2025-09-30)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* 3156 notifications ([#1491](https://github.com/stack-spot/portal-commons/issues/1491)) ([3f9f6a6](https://github.com/stack-spot/portal-commons/commit/3f9f6a6b56004893cca4e0d53afe8eccdf615005))
|
|
44
|
+
* upgrades translation lib ([#1645](https://github.com/stack-spot/portal-commons/issues/1645)) ([838a740](https://github.com/stack-spot/portal-commons/commit/838a7404c9946e8804cebab6ba33a24a0cf52a80))
|
|
45
|
+
|
|
46
|
+
## [2.36.3](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.36.2...portal-layout@v2.36.3) (2025-09-02)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Bug Fixes
|
|
50
|
+
|
|
51
|
+
* overlay header style ([#1504](https://github.com/stack-spot/portal-commons/issues/1504)) ([567c3fb](https://github.com/stack-spot/portal-commons/commit/567c3fb768749a26215fd701314fe3b0dbabf3a3))
|
|
52
|
+
|
|
53
|
+
## [2.36.2](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.36.1...portal-layout@v2.36.2) (2025-08-21)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* support button hidden ([#1424](https://github.com/stack-spot/portal-commons/issues/1424)) ([15b88ce](https://github.com/stack-spot/portal-commons/commit/15b88ce7659ac7c3192087d5b6384515ef6c00a4))
|
|
59
|
+
|
|
60
|
+
## [2.36.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.36.0...portal-layout@v2.36.1) (2025-08-05)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Bug Fixes
|
|
64
|
+
|
|
65
|
+
* default for modal ([#1341](https://github.com/stack-spot/portal-commons/issues/1341)) ([8d0ef68](https://github.com/stack-spot/portal-commons/commit/8d0ef68fa17abebcf3c8fc46a3afee0ee089f6c1))
|
|
66
|
+
|
|
67
|
+
## [2.36.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.35.1...portal-layout@v2.36.0) (2025-08-04)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Features
|
|
71
|
+
|
|
72
|
+
* ignoreFirstFocusOnCloseButton right panel ([#1335](https://github.com/stack-spot/portal-commons/issues/1335)) ([d3a09f1](https://github.com/stack-spot/portal-commons/commit/d3a09f144bb61d809071bbbe6c8fa7a2f914251b))
|
|
73
|
+
|
|
74
|
+
## [2.35.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.35.0...portal-layout@v2.35.1) (2025-08-04)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Bug Fixes
|
|
78
|
+
|
|
79
|
+
* Fix 3111 menu collpase behavior ([#1318](https://github.com/stack-spot/portal-commons/issues/1318)) ([9489478](https://github.com/stack-spot/portal-commons/commit/94894780433fdb940c4f0380f3e71cead02c73c5))
|
|
80
|
+
* upd version ([#1327](https://github.com/stack-spot/portal-commons/issues/1327)) ([9dbc112](https://github.com/stack-spot/portal-commons/commit/9dbc112adfb6bb6f00946cff699bd20c65e52ecc))
|
|
81
|
+
|
|
82
|
+
## [2.35.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.34.2...portal-layout@v2.35.0) (2025-08-04)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Features
|
|
86
|
+
|
|
87
|
+
* Support right panel on overlay confirm ([#1292](https://github.com/stack-spot/portal-commons/issues/1292)) ([8b76600](https://github.com/stack-spot/portal-commons/commit/8b7660083ec945de53ae031f6ae74c3ac2c98c76))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
### Bug Fixes
|
|
91
|
+
|
|
92
|
+
* Fix 3111 menu collpase behavior ([#1318](https://github.com/stack-spot/portal-commons/issues/1318)) ([9489478](https://github.com/stack-spot/portal-commons/commit/94894780433fdb940c4f0380f3e71cead02c73c5))
|
|
93
|
+
|
|
94
|
+
## [2.35.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.34.2...portal-layout@v2.35.0) (2025-07-24)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### Features
|
|
98
|
+
|
|
99
|
+
* Support right panel on overlay confirm ([#1292](https://github.com/stack-spot/portal-commons/issues/1292)) ([8b76600](https://github.com/stack-spot/portal-commons/commit/8b7660083ec945de53ae031f6ae74c3ac2c98c76))
|
|
100
|
+
|
|
101
|
+
## [2.34.2](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.34.1...portal-layout@v2.34.2) (2025-07-22)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Bug Fixes
|
|
105
|
+
|
|
106
|
+
* export typeform component ([#1278](https://github.com/stack-spot/portal-commons/issues/1278)) ([8dfdf36](https://github.com/stack-spot/portal-commons/commit/8dfdf361a9fc842f79ce126b70e7356c038f5a4b))
|
|
107
|
+
|
|
108
|
+
## [2.34.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.34.0...portal-layout@v2.34.1) (2025-07-22)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
### Bug Fixes
|
|
112
|
+
|
|
113
|
+
* Rollback show typeform modal ([#1276](https://github.com/stack-spot/portal-commons/issues/1276)) ([3c6b7b0](https://github.com/stack-spot/portal-commons/commit/3c6b7b0e0b8933d5c775def1f1ab4c9957bbc752))
|
|
114
|
+
|
|
115
|
+
## [2.34.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.33.1...portal-layout@v2.34.0) (2025-07-21)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### Features
|
|
119
|
+
|
|
120
|
+
* 3013 csat workflow ([#1269](https://github.com/stack-spot/portal-commons/issues/1269)) ([77baca3](https://github.com/stack-spot/portal-commons/commit/77baca3c360610399795260dc3752191be0324df))
|
|
121
|
+
|
|
122
|
+
## [2.33.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.33.0...portal-layout@v2.33.1) (2025-07-16)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
### Bug Fixes
|
|
126
|
+
|
|
127
|
+
* Fix auto collapse re auto ([#1225](https://github.com/stack-spot/portal-commons/issues/1225)) ([3cff95e](https://github.com/stack-spot/portal-commons/commit/3cff95e7eeba8b9be5d23fbff284c2c3f2b2b4b0))
|
|
128
|
+
|
|
129
|
+
## [2.33.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.32.5...portal-layout@v2.33.0) (2025-07-16)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### Features
|
|
133
|
+
|
|
134
|
+
* Feat 2981 menu auto collapse behavior ([#1222](https://github.com/stack-spot/portal-commons/issues/1222)) ([e1cfa2e](https://github.com/stack-spot/portal-commons/commit/e1cfa2e50e731571ee58619ed2fffe71b5b834ce))
|
|
135
|
+
|
|
136
|
+
## [2.32.5](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.32.4...portal-layout@v2.32.5) (2025-07-14)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
### Bug Fixes
|
|
140
|
+
|
|
141
|
+
* Remove bottom spaces from menu ([#1208](https://github.com/stack-spot/portal-commons/issues/1208)) ([f9ace0e](https://github.com/stack-spot/portal-commons/commit/f9ace0e643062fafebd60a7dc6d55e5ee75e1af7))
|
|
142
|
+
|
|
3
143
|
## [2.32.4](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.32.3...portal-layout@v2.32.4) (2025-06-17)
|
|
4
144
|
|
|
5
145
|
|
package/dist/Layout.d.ts
CHANGED
|
@@ -45,6 +45,10 @@ interface RawProps extends WithStyle {
|
|
|
45
45
|
* The React element to go in the menu content.
|
|
46
46
|
*/
|
|
47
47
|
menuContent?: ReactElement;
|
|
48
|
+
/**
|
|
49
|
+
* The React element to go in the menu inner content (third level nav).
|
|
50
|
+
*/
|
|
51
|
+
menuInnerContent?: ReactElement;
|
|
48
52
|
/**
|
|
49
53
|
* The React element to go in the header.
|
|
50
54
|
*/
|
|
@@ -65,21 +69,16 @@ interface RawProps extends WithStyle {
|
|
|
65
69
|
* A function to run whenever an error is catch by an error boundary.
|
|
66
70
|
*/
|
|
67
71
|
onError?: ErrorHandler;
|
|
68
|
-
/**
|
|
69
|
-
* When true, the sections menu auto-collapses whenever a secondary (contextual) menu appears.
|
|
70
|
-
* @default false
|
|
71
|
-
*/
|
|
72
|
-
autoCollapseSectionsMenu?: boolean;
|
|
73
72
|
}
|
|
74
73
|
/**
|
|
75
74
|
* Renders the layout with the React elements passed in the props.
|
|
76
75
|
* @param props the component's props {@link RawProps}.
|
|
77
76
|
*/
|
|
78
|
-
export declare const RawLayout: ({ menuSections, menuContent, header, children,
|
|
77
|
+
export declare const RawLayout: ({ menuSections, menuContent, menuInnerContent, header, children, extra, errorDescriptor, onError, className, style }: RawProps) => import("react/jsx-runtime").JSX.Element;
|
|
79
78
|
/**
|
|
80
79
|
* Renders the layout with a menu and header that follow the config objects passed as parameter.
|
|
81
80
|
* @param props the component's props {@link Props}.
|
|
82
81
|
*/
|
|
83
|
-
export declare const Layout: ({ menu, header, children, extra, errorDescriptor, onError,
|
|
82
|
+
export declare const Layout: ({ menu, header, children, extra, errorDescriptor, onError, className, style }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
84
83
|
export {};
|
|
85
84
|
//# sourceMappingURL=Layout.d.ts.map
|
package/dist/Layout.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmC,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACrF,OAAO,yCAAyC,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAa,MAAM,OAAO,CAAA;AAG1D,OAAO,EAAU,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGzD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAgB,MAAM,iCAAiC,CAAA;AAI3F,OAAO,EAAE,SAAS,EAA+B,MAAM,yBAAyB,CAAA;AAEhF,OAAO,cAAc,CAAA;AAErB,UAAU,KAAM,SAAQ,SAAS;IAC/B;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE,WAAW,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,UAAU,QAAS,SAAQ,SAAS;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,GACpB,sHAEE,QAAQ,4CAkGX,CAAA;AASD;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,+EAA+E,KAAK,4CAsB1G,CAAA"}
|
package/dist/Layout.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FadingOverflow } from '@stack-spot/portal-components/FadingOverflow';
|
|
3
|
-
import { CSSToCitricAdapter } from '@stack-spot/portal-theme';
|
|
3
|
+
import { CSSToCitricAdapter, listToClass } from '@stack-spot/portal-theme';
|
|
4
4
|
import '@stack-spot/portal-theme/dist/theme.css';
|
|
5
5
|
import { useEffect } from 'react';
|
|
6
6
|
import { overlay } from './LayoutOverlayManager.js';
|
|
@@ -18,7 +18,7 @@ import './layout.css';
|
|
|
18
18
|
* Renders the layout with the React elements passed in the props.
|
|
19
19
|
* @param props the component's props {@link RawProps}.
|
|
20
20
|
*/
|
|
21
|
-
export const RawLayout = ({ menuSections, menuContent, header, children,
|
|
21
|
+
export const RawLayout = ({ menuSections, menuContent, menuInnerContent, header, children, extra, errorDescriptor, onError, className, style }) => {
|
|
22
22
|
const { bottomDialog, modal, rightPanel } = overlay.useOverlays();
|
|
23
23
|
useEffect(() => {
|
|
24
24
|
if (errorDescriptor)
|
|
@@ -32,32 +32,51 @@ export const RawLayout = ({ menuSections, menuContent, header, children, autoCol
|
|
|
32
32
|
const classList = document.getElementById(elementIds.layout)?.classList;
|
|
33
33
|
if (!classList)
|
|
34
34
|
return;
|
|
35
|
-
|
|
35
|
+
const hasMenuContent = !!menuContent && !!document.getElementById(elementIds.menuContent)?.children.length;
|
|
36
|
+
const hasMenuInnerContent = !!menuInnerContent && !!document.getElementById(elementIds.menuInnerContent)?.children.length;
|
|
37
|
+
if (hasMenuContent) {
|
|
36
38
|
classList.add('menu-content-visible');
|
|
37
|
-
if (
|
|
39
|
+
if (!classList.contains('menu-manual')) {
|
|
38
40
|
classList.add('menu-compact');
|
|
41
|
+
}
|
|
39
42
|
}
|
|
40
43
|
else {
|
|
41
44
|
classList.remove('menu-content-visible');
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
}
|
|
46
|
+
if (hasMenuInnerContent) {
|
|
47
|
+
classList.add('menu-inner-content-visible');
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
classList.remove('menu-inner-content-visible');
|
|
44
51
|
}
|
|
45
52
|
classList[menuSections ? 'remove' : 'add']('no-menu-sections');
|
|
46
53
|
if (className)
|
|
47
54
|
classList.add(...className.split(/\s+/));
|
|
48
|
-
});
|
|
49
|
-
return (_jsxs(CSSToCitricAdapter, { children: [_jsx(WelcomeTour, {}), _jsxs("div", { id: elementIds.layout, style: style, children: [header && _jsx("header", { id: elementIds.header, children: _jsx(SilentErrorBoundary, { children: header }) }), extra && _jsx(SilentErrorBoundary, { children: extra }), _jsxs("aside", { id: elementIds.menu, children: [
|
|
50
|
-
_jsx(
|
|
55
|
+
}, [menuContent, menuInnerContent, menuSections, className]);
|
|
56
|
+
return (_jsxs(CSSToCitricAdapter, { children: [_jsx(WelcomeTour, {}), _jsxs("div", { id: elementIds.layout, style: style, className: "menu-manual menu-compact", children: [header && _jsx("header", { id: elementIds.header, children: _jsx(SilentErrorBoundary, { children: header }) }), extra && _jsx(SilentErrorBoundary, { children: extra }), _jsxs("aside", { id: elementIds.menu, children: [menuInnerContent &&
|
|
57
|
+
_jsx("nav", { role: "menubar", id: elementIds.menuInnerContent, children: _jsx(SilentErrorBoundary, { children: menuInnerContent }) }), _jsx("nav", { role: "menubar", id: elementIds.menuContent, children: _jsx(SilentErrorBoundary, { children: menuContent }) }), menuSections &&
|
|
58
|
+
_jsx(FadingOverflow, { sides: ['top', 'bottom'], scroll: "arrows", children: _jsx("nav", { role: "menubar", id: elementIds.menuSections, children: _jsx(SilentErrorBoundary, { children: menuSections }) }) })] }), children && _jsx("div", { id: elementIds.page, children: _jsx("article", { id: elementIds.content, children: _jsx(ErrorBoundary, { children: children }) }) }), _jsx("div", { id: elementIds.bottomDialog, role: "dialog", children: _jsx(ErrorBoundary, { children: bottomDialog }) }), _jsxs("div", { id: elementIds.backdrop, children: [_jsx("div", { id: elementIds.rightPanel, "aria-modal": true, role: "dialog", children: _jsx(ErrorBoundary, { children: rightPanel.length === 1 && !rightPanel[0].stack
|
|
59
|
+
? rightPanel[0].element
|
|
60
|
+
: rightPanel.map((m, i) => _jsx("div", { className: listToClass([
|
|
61
|
+
'right-panel-instance',
|
|
62
|
+
(i === rightPanel.length - 1) && 'active',
|
|
63
|
+
modal.length > 0 && 'disabled',
|
|
64
|
+
]), ...(modal.length > 0 ? { inert: true } : {}), children: m.element }, i)) }) }), _jsx("div", { id: elementIds.modal, "aria-modal": true, role: "dialog", children: _jsx(ErrorBoundary, { children: modal.length === 1 && !modal[0].stack
|
|
65
|
+
? modal[0].element
|
|
66
|
+
: modal.map((m, i) => _jsx("div", { className: listToClass(['modal-instance', (i === modal.length - 1) && 'active']), children: m.element }, i)) }) })] }), _jsx(Toaster, {}), _jsx("div", { id: elementIds.accessibilityAnnouncer, "aria-atomic": true, "aria-live": "assertive" })] })] }));
|
|
51
67
|
};
|
|
52
68
|
const MenuContentRenderer = ({ content }) => {
|
|
53
69
|
const menuContent = typeof content === 'function' ? content() : content;
|
|
54
70
|
return _jsx(MenuContent, { ...menuContent });
|
|
55
71
|
};
|
|
72
|
+
const hasInnerContent = (menu) => 'innerContent' in menu;
|
|
56
73
|
/**
|
|
57
74
|
* Renders the layout with a menu and header that follow the config objects passed as parameter.
|
|
58
75
|
* @param props the component's props {@link Props}.
|
|
59
76
|
*/
|
|
60
|
-
export const Layout = ({ menu, header, children, extra, errorDescriptor, onError,
|
|
77
|
+
export const Layout = ({ menu, header, children, extra, errorDescriptor, onError, className, style }) => (_jsx(RawLayout, { header: _jsx(Header, { ...header }), menuSections: menu.sections ? _jsx(MenuSections, { ...menu }) : undefined, menuContent: menu.content
|
|
61
78
|
? _jsx(MenuContentRenderer, { content: menu.content }, 'contentKey' in menu ? menu.contentKey : undefined)
|
|
62
|
-
: undefined,
|
|
79
|
+
: undefined, menuInnerContent: hasInnerContent(menu) && menu.innerContent
|
|
80
|
+
? _jsx(MenuContentRenderer, { content: menu.innerContent }, 'contentKey' in menu ? menu.contentKey : undefined)
|
|
81
|
+
: undefined, errorDescriptor: errorDescriptor, onError: onError, extra: extra, className: className, style: style, children: children }));
|
|
63
82
|
//# sourceMappingURL=Layout.js.map
|
package/dist/Layout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAA;AAC7E,OAAO,EAAE,kBAAkB,EAAa,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAA;AAC7E,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAa,MAAM,0BAA0B,CAAA;AACrF,OAAO,yCAAyC,CAAA;AAChD,OAAO,EAA2B,SAAS,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,OAAO,EAA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EAAuC,EAAE,CAAC,cAAc,IAAI,IAAI,CAAA;AAExG;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAS,EAAE,EAAE,CAAC,CAC9G,KAAC,SAAS,IACR,MAAM,EAAE,KAAC,MAAM,OAAK,MAAM,GAAI,EAC9B,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAC,YAAY,OAAK,IAAI,GAAI,CAAC,CAAC,CAAC,SAAS,EACpE,WAAW,EACT,IAAI,CAAC,OAAO;QACV,CAAC,CAAC,KAAC,mBAAmB,IAA0D,OAAO,EAAE,IAAI,CAAC,OAAO,IAAzE,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAA2B;QACzG,CAAC,CAAC,SAAS,EAEf,gBAAgB,EACd,eAAe,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,YAAY;QACxC,CAAC,CAAC,KAAC,mBAAmB,IAA0D,OAAO,EAAE,IAAI,CAAC,YAAY,IAA9E,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAgC;QAC9G,CAAC,CAAC,SAAS,EAEf,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,YAEX,QAAQ,GACC,CACb,CAAA"}
|
|
@@ -12,6 +12,10 @@ interface AlertOptions extends Omit<DialogOptions, 'cancel'> {
|
|
|
12
12
|
}
|
|
13
13
|
type BottomDialogOptions = Omit<DialogOptions, 'title'>;
|
|
14
14
|
interface CustomModalOptions {
|
|
15
|
+
/**
|
|
16
|
+
* An optional, unique identifier for this modal.
|
|
17
|
+
*/
|
|
18
|
+
id?: string;
|
|
15
19
|
/**
|
|
16
20
|
* The size of the modal.
|
|
17
21
|
*/
|
|
@@ -25,8 +29,23 @@ interface CustomModalOptions {
|
|
|
25
29
|
* @default true
|
|
26
30
|
*/
|
|
27
31
|
ignoreFirstFocusOnCloseButton?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* If true, instead of replacing the previously opened modal (if any), it will open on top of it (stacked).
|
|
34
|
+
*
|
|
35
|
+
* When a modal is stacked on top of another:
|
|
36
|
+
* - Closing the modal, closes all opened modals.
|
|
37
|
+
* - Popping the modal, closes only the modal at the top of the stack.
|
|
38
|
+
* - Only the modal at the top of the stack can be interacted with.
|
|
39
|
+
*
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
stack?: boolean;
|
|
28
43
|
}
|
|
29
44
|
interface CustomRightPanelOptions {
|
|
45
|
+
/**
|
|
46
|
+
* An optional, unique identifier for this right panel.
|
|
47
|
+
*/
|
|
48
|
+
id?: string;
|
|
30
49
|
/**
|
|
31
50
|
* The size of the right panel.
|
|
32
51
|
*/
|
|
@@ -35,16 +54,33 @@ interface CustomRightPanelOptions {
|
|
|
35
54
|
* A function to call when the right panel closes.
|
|
36
55
|
*/
|
|
37
56
|
onClose?: () => void;
|
|
57
|
+
/**
|
|
58
|
+
* Property that defines whether the modal should ignore the initial focus on the close button.
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
ignoreFirstFocusOnCloseButton?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* If true, instead of replacing the previously opened right panel (if any), it will open on top of it (stacked).
|
|
64
|
+
*
|
|
65
|
+
* When a right panel is stacked on top of another:
|
|
66
|
+
* - Closing the panel, closes all opened panels.
|
|
67
|
+
* - Popping the panel, closes only the panel at the top of the stack.
|
|
68
|
+
* - Only the panel at the top of the stack can be interacted with.
|
|
69
|
+
*
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
stack?: boolean;
|
|
38
73
|
}
|
|
39
74
|
declare class LayoutOverlayManager {
|
|
40
75
|
static readonly instance?: LayoutOverlayManager;
|
|
41
76
|
private setContent;
|
|
42
77
|
private elements?;
|
|
43
|
-
private onModalClose?;
|
|
44
78
|
/**
|
|
45
79
|
* Last element with focus before an overlay is shown.
|
|
46
80
|
*/
|
|
47
81
|
private lastActiveElement;
|
|
82
|
+
private modals;
|
|
83
|
+
private panels;
|
|
48
84
|
private closeCustomBackdrops;
|
|
49
85
|
private onClickBackdrop;
|
|
50
86
|
private onPressKeyInBackdrop;
|
|
@@ -79,6 +115,14 @@ declare class LayoutOverlayManager {
|
|
|
79
115
|
* @returns true if the modal is currently opened. False otherwise.
|
|
80
116
|
*/
|
|
81
117
|
isModalOpen(): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* @returns the number of modals currently tracked.
|
|
120
|
+
*/
|
|
121
|
+
getNumberOfOpenModals(): number;
|
|
122
|
+
/**
|
|
123
|
+
* @returns the number of right panels currently tracked.
|
|
124
|
+
*/
|
|
125
|
+
getNumberOfOpenRightPanels(): number;
|
|
82
126
|
/**
|
|
83
127
|
* @returns true if the right panel is currently opened. False otherwise.
|
|
84
128
|
*/
|
|
@@ -96,7 +140,7 @@ declare class LayoutOverlayManager {
|
|
|
96
140
|
* @param content a react element with the modal content.
|
|
97
141
|
* @param options the modal options {@link CustomModalOptions}.
|
|
98
142
|
*/
|
|
99
|
-
showCustomModal(content: React.ReactElement, { size, onClose, ignoreFirstFocusOnCloseButton }?: CustomModalOptions): void;
|
|
143
|
+
showCustomModal(content: React.ReactElement, { size, onClose, ignoreFirstFocusOnCloseButton, stack, id }?: CustomModalOptions): void;
|
|
100
144
|
/**
|
|
101
145
|
* Opens a modal.
|
|
102
146
|
*
|
|
@@ -105,10 +149,9 @@ declare class LayoutOverlayManager {
|
|
|
105
149
|
*
|
|
106
150
|
* @param options the modal options: {@link OverlayContentProps} & { size: {@link ModalSize} }.
|
|
107
151
|
*/
|
|
108
|
-
showModal({ size, ignoreFirstFocusOnCloseButton, ...props }: OverlayContentProps & {
|
|
152
|
+
showModal({ size, ignoreFirstFocusOnCloseButton, stack, onGoBack, id, ...props }: OverlayContentProps & {
|
|
109
153
|
size?: ModalSize;
|
|
110
|
-
|
|
111
|
-
}): void;
|
|
154
|
+
} & Pick<CustomModalOptions, 'ignoreFirstFocusOnCloseButton' | 'stack' | 'id'>): void;
|
|
112
155
|
private showDialog;
|
|
113
156
|
/**
|
|
114
157
|
* Shows a confirmation dialog and returns a promise that resolves as soon as the dialog is closed. The result of the promise is true if
|
|
@@ -149,7 +192,7 @@ declare class LayoutOverlayManager {
|
|
|
149
192
|
* @param content a react element with the modal content.
|
|
150
193
|
* @param options the modal options {@link CustomModalOptions}.
|
|
151
194
|
*/
|
|
152
|
-
showCustomRightPanel(content: ReactElement, { size, onClose }?: CustomRightPanelOptions): void;
|
|
195
|
+
showCustomRightPanel(content: ReactElement, { size, onClose, ignoreFirstFocusOnCloseButton, stack, id }?: CustomRightPanelOptions): void;
|
|
153
196
|
/**
|
|
154
197
|
* Opens a right panel.
|
|
155
198
|
*
|
|
@@ -158,21 +201,44 @@ declare class LayoutOverlayManager {
|
|
|
158
201
|
*
|
|
159
202
|
* @param options the modal options: {@link OverlayContentProps} & { size: {@link ModalSize} }.
|
|
160
203
|
*/
|
|
161
|
-
showRightPanel({ size, ...props }: OverlayContentProps &
|
|
162
|
-
size?: RightPanelSize;
|
|
163
|
-
}): void;
|
|
204
|
+
showRightPanel({ size, ignoreFirstFocusOnCloseButton, stack, onGoBack, id, ...props }: OverlayContentProps & Pick<CustomRightPanelOptions, 'size' | 'ignoreFirstFocusOnCloseButton' | 'stack' | 'id'>): void;
|
|
164
205
|
private focusLastActiveElement;
|
|
165
206
|
/**
|
|
166
|
-
* Closes
|
|
207
|
+
* Closes all opened modals.
|
|
167
208
|
* @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
|
|
168
209
|
*/
|
|
169
210
|
closeModal(runCloseListener?: boolean): void;
|
|
170
211
|
/**
|
|
171
|
-
* Closes the
|
|
212
|
+
* Closes the top-most modal in the stack. Will behave like `closeModal` if only a single modal exists in the stack.
|
|
213
|
+
* @param amount number of modals to pop. Defaults to 1.
|
|
214
|
+
* @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
|
|
215
|
+
*/
|
|
216
|
+
popModal(amount?: number, runCloseListener?: boolean): void;
|
|
217
|
+
/**
|
|
218
|
+
* Close all modals in the stack of modal until the modal with the given id is found. If no modal with the given id is found, nothing
|
|
219
|
+
* happens.
|
|
220
|
+
* @param id the id of the modal to pop to.
|
|
221
|
+
* @param inclusive when true, the modal with the given id is also popped. Defaults to false.
|
|
222
|
+
*/
|
|
223
|
+
popModalTo(id: string, inclusive?: boolean): void;
|
|
224
|
+
/**
|
|
225
|
+
* Closes all opened right panels.
|
|
172
226
|
* @param runCloseListener whether or not to run the function `onClose` passed to `showRightPanel` or `showCustomRightPanel`. Defaults to
|
|
173
227
|
* true.
|
|
174
228
|
*/
|
|
175
229
|
closeRightPanel(runCloseListener?: boolean): void;
|
|
230
|
+
/**
|
|
231
|
+
* Closes the top-most modal in the stack. Will behave like `closeModal` if only a single modal exists in the stack.
|
|
232
|
+
* @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
|
|
233
|
+
*/
|
|
234
|
+
popRightPanel(amount?: number, runCloseListener?: boolean): void;
|
|
235
|
+
/**
|
|
236
|
+
* Close all right panels in the stack of panels until the panel with the given id is found. If no panel with the given id is found,
|
|
237
|
+
* nothing happens.
|
|
238
|
+
* @param id the id of the right panel to pop to.
|
|
239
|
+
* @param inclusive when true, the right panel with the given id is also popped. Defaults to false.
|
|
240
|
+
*/
|
|
241
|
+
popRightPanelTo(id: string, inclusive?: boolean): void;
|
|
176
242
|
/**
|
|
177
243
|
* Closes the bottom dialog if it's open.
|
|
178
244
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutOverlayManager.d.ts","sourceRoot":"","sources":["../src/LayoutOverlayManager.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutOverlayManager.d.ts","sourceRoot":"","sources":["../src/LayoutOverlayManager.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA6B,MAAM,OAAO,CAAA;AAC/D,OAAO,EAAU,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAoC,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAInG,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,iBAAiB,EAAmC,MAAM,WAAW,CAAA;AAC3H,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAGpE,UAAU,YAAa,SAAQ,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;IAC1D;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAUD,KAAK,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAA;AASvD,UAAU,kBAAkB;IAC1B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,uBAAuB;IAC/B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC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