@stack-spot/portal-layout 2.38.1 → 2.39.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.39.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.38.1...portal-layout@v2.39.0) (2025-12-01)
4
+
5
+
6
+ ### Features
7
+
8
+ * layout: multi modal ([#1825](https://github.com/stack-spot/portal-commons/issues/1825)) ([a6cba63](https://github.com/stack-spot/portal-commons/commit/a6cba631ced1e398ec1b86de80f4420d55f6c8bd))
9
+
3
10
  ## [2.38.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.38.0...portal-layout@v2.38.1) (2025-11-17)
4
11
 
5
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACxE,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;I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S,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,4CAqGX,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';
@@ -58,7 +58,15 @@ export const RawLayout = ({ menuSections, menuContent, menuInnerContent, header,
58
58
  }, [menuContent, menuInnerContent, menuSections, className]);
59
59
  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: [menuInnerContent &&
60
60
  _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 &&
61
- _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 }) }), _jsx("div", { id: elementIds.modal, "aria-modal": true, role: "dialog", children: _jsx(ErrorBoundary, { children: modal }) })] }), _jsx(Toaster, {}), _jsx("div", { id: elementIds.accessibilityAnnouncer, "aria-atomic": true, "aria-live": "assertive" })] })] }));
61
+ _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
62
+ ? rightPanel[0].element
63
+ : rightPanel.map((m, i) => _jsx("div", { className: listToClass([
64
+ 'right-panel-instance',
65
+ (i === rightPanel.length - 1) && 'active',
66
+ modal.length > 0 && 'disabled',
67
+ ]), ...(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
68
+ ? modal[0].element
69
+ : 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" })] })] }));
62
70
  };
63
71
  const MenuContentRenderer = ({ content }) => {
64
72
  const menuContent = typeof content === 'function' ? content() : content;
@@ -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;AACxE,OAAO,yCAAyC,CAAA;AAChD,OAAO,EAA2B,SAAS,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,EAA+B,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAE7D,OAAO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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
  */
@@ -40,16 +59,28 @@ interface CustomRightPanelOptions {
40
59
  * @default true
41
60
  */
42
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;
43
73
  }
44
74
  declare class LayoutOverlayManager {
45
75
  static readonly instance?: LayoutOverlayManager;
46
76
  private setContent;
47
77
  private elements?;
48
- private onModalClose?;
49
78
  /**
50
79
  * Last element with focus before an overlay is shown.
51
80
  */
52
81
  private lastActiveElement;
82
+ private modals;
83
+ private panels;
53
84
  private closeCustomBackdrops;
54
85
  private onClickBackdrop;
55
86
  private onPressKeyInBackdrop;
@@ -84,6 +115,14 @@ declare class LayoutOverlayManager {
84
115
  * @returns true if the modal is currently opened. False otherwise.
85
116
  */
86
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;
87
126
  /**
88
127
  * @returns true if the right panel is currently opened. False otherwise.
89
128
  */
@@ -101,7 +140,7 @@ declare class LayoutOverlayManager {
101
140
  * @param content a react element with the modal content.
102
141
  * @param options the modal options {@link CustomModalOptions}.
103
142
  */
104
- showCustomModal(content: React.ReactElement, { size, onClose, ignoreFirstFocusOnCloseButton }?: CustomModalOptions): void;
143
+ showCustomModal(content: React.ReactElement, { size, onClose, ignoreFirstFocusOnCloseButton, stack, id }?: CustomModalOptions): void;
105
144
  /**
106
145
  * Opens a modal.
107
146
  *
@@ -110,10 +149,9 @@ declare class LayoutOverlayManager {
110
149
  *
111
150
  * @param options the modal options: {@link OverlayContentProps} & { size: {@link ModalSize} }.
112
151
  */
113
- showModal({ size, ignoreFirstFocusOnCloseButton, ...props }: OverlayContentProps & {
152
+ showModal({ size, ignoreFirstFocusOnCloseButton, stack, onGoBack, id, ...props }: OverlayContentProps & {
114
153
  size?: ModalSize;
115
- ignoreFirstFocusOnCloseButton?: boolean;
116
- }): void;
154
+ } & Pick<CustomModalOptions, 'ignoreFirstFocusOnCloseButton' | 'stack' | 'id'>): void;
117
155
  private showDialog;
118
156
  /**
119
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
@@ -154,7 +192,7 @@ declare class LayoutOverlayManager {
154
192
  * @param content a react element with the modal content.
155
193
  * @param options the modal options {@link CustomModalOptions}.
156
194
  */
157
- showCustomRightPanel(content: ReactElement, { size, onClose, ignoreFirstFocusOnCloseButton }?: CustomRightPanelOptions): void;
195
+ showCustomRightPanel(content: ReactElement, { size, onClose, ignoreFirstFocusOnCloseButton, stack, id }?: CustomRightPanelOptions): void;
158
196
  /**
159
197
  * Opens a right panel.
160
198
  *
@@ -163,22 +201,44 @@ declare class LayoutOverlayManager {
163
201
  *
164
202
  * @param options the modal options: {@link OverlayContentProps} & { size: {@link ModalSize} }.
165
203
  */
166
- showRightPanel({ size, ignoreFirstFocusOnCloseButton, ...props }: OverlayContentProps & {
167
- size?: RightPanelSize;
168
- ignoreFirstFocusOnCloseButton?: boolean;
169
- }): void;
204
+ showRightPanel({ size, ignoreFirstFocusOnCloseButton, stack, onGoBack, id, ...props }: OverlayContentProps & Pick<CustomRightPanelOptions, 'size' | 'ignoreFirstFocusOnCloseButton' | 'stack' | 'id'>): void;
170
205
  private focusLastActiveElement;
171
206
  /**
172
- * Closes the modal if it's open.
207
+ * Closes all opened modals.
173
208
  * @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
174
209
  */
175
210
  closeModal(runCloseListener?: boolean): void;
176
211
  /**
177
- * Closes the right panel if it's open.
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.
178
226
  * @param runCloseListener whether or not to run the function `onClose` passed to `showRightPanel` or `showCustomRightPanel`. Defaults to
179
227
  * true.
180
228
  */
181
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;
182
242
  /**
183
243
  * Closes the bottom dialog if it's open.
184
244
  */
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutOverlayManager.d.ts","sourceRoot":"","sources":["../src/LayoutOverlayManager.tsx"],"names":[],"mappings":"AAIA,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;AAED,KAAK,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAA;AASvD,UAAU,kBAAkB;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;CACzC;AAED,UAAU,uBAAuB;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;CACzC;AAWD,cAAM,oBAAoB;IACxB,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,oBAAoB,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;;;;OAsBG;IACH,WAAW,CAAC,oBAAoB,EAAE,qBAAqB,GAAG,MAAM,GAAG,MAAM;IACzE;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,mBAAmB,EAAE,oBAAoB,GAAG,MAAM,GAAG,MAAM;IACvE;;;;;;;;;OASG;IACH,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,GAAG,MAAM;IAKtD;;;OAGG;IACH,YAAY,2BAAoB;CACjC;AAED;;GAEG;AACH,eAAO,MAAM,OAAO,sBAA6B,CAAA"}
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  /* eslint-disable react-hooks/rules-of-hooks */
3
3
  import { Button } from '@citric/core';
4
4
  import { focusAccessibleElement, focusFirstChild } from '@stack-spot/portal-components';
5
+ import { last } from 'lodash';
5
6
  import { useLayoutEffect, useState } from 'react';
6
7
  import { Dialog } from './components/Dialog.js';
7
8
  import { CLOSE_OVERLAY_ID, OverlayContent } from './components/OverlayContent.js';
@@ -32,12 +33,6 @@ class LayoutOverlayManager {
32
33
  writable: true,
33
34
  value: void 0
34
35
  });
35
- Object.defineProperty(this, "onModalClose", {
36
- enumerable: true,
37
- configurable: true,
38
- writable: true,
39
- value: void 0
40
- });
41
36
  /**
42
37
  * Last element with focus before an overlay is shown.
43
38
  */
@@ -47,6 +42,18 @@ class LayoutOverlayManager {
47
42
  writable: true,
48
43
  value: null
49
44
  });
45
+ Object.defineProperty(this, "modals", {
46
+ enumerable: true,
47
+ configurable: true,
48
+ writable: true,
49
+ value: []
50
+ });
51
+ Object.defineProperty(this, "panels", {
52
+ enumerable: true,
53
+ configurable: true,
54
+ writable: true,
55
+ value: []
56
+ });
50
57
  /**
51
58
  * Closes the toaster with the specified id.
52
59
  * @param id the id of the toaster to close.
@@ -121,11 +128,17 @@ class LayoutOverlayManager {
121
128
  if (!this.elements)
122
129
  this.setupElements();
123
130
  }, []);
124
- const [modal, setModal] = useState();
125
- const [rightPanel, setRightPanel] = useState();
131
+ const [modal, setModal] = useState([]);
132
+ const [rightPanel, setRightPanel] = useState([]);
126
133
  const [bottomDialog, setBottomDialog] = useState();
127
- this.setContent.modal = setModal;
128
- this.setContent.rightPanel = setRightPanel;
134
+ this.setContent.modal = (content) => {
135
+ this.modals = content;
136
+ setModal(content);
137
+ };
138
+ this.setContent.rightPanel = (content) => {
139
+ this.panels = content;
140
+ setRightPanel(content);
141
+ };
129
142
  this.setContent.bottomDialog = setBottomDialog;
130
143
  return { modal, rightPanel, bottomDialog };
131
144
  }
@@ -196,6 +209,18 @@ class LayoutOverlayManager {
196
209
  isModalOpen() {
197
210
  return this.elements?.modal?.classList.contains('visible') ?? false;
198
211
  }
212
+ /**
213
+ * @returns the number of modals currently tracked.
214
+ */
215
+ getNumberOfOpenModals() {
216
+ return this.modals.length;
217
+ }
218
+ /**
219
+ * @returns the number of right panels currently tracked.
220
+ */
221
+ getNumberOfOpenRightPanels() {
222
+ return this.panels.length;
223
+ }
199
224
  /**
200
225
  * @returns true if the right panel is currently opened. False otherwise.
201
226
  */
@@ -217,13 +242,17 @@ class LayoutOverlayManager {
217
242
  * @param content a react element with the modal content.
218
243
  * @param options the modal options {@link CustomModalOptions}.
219
244
  */
220
- showCustomModal(content, { size = 'medium', onClose, ignoreFirstFocusOnCloseButton = true } = {}) {
245
+ showCustomModal(content, { size = 'medium', onClose, ignoreFirstFocusOnCloseButton = true, stack = false, id } = {}) {
221
246
  if (!this.elements?.modal)
222
247
  throw new ElementNotFound('modal', elementIds.modal);
223
248
  if (!this.setContent.modal)
224
249
  throw new LayoutError('unable to show modal, because it has not been setup yet.');
225
- this.onModalClose = onClose;
226
- this.setContent.modal(content);
250
+ const modal = { element: content, onClose, size, stack, id };
251
+ const currentModalSize = last(this.modals)?.size;
252
+ this.setContent.modal(stack ? [...this.modals, modal] : [modal]);
253
+ // we should remove the previous size, if any, before showing the modal
254
+ if (currentModalSize)
255
+ this.elements.modal.classList.remove(currentModalSize);
227
256
  this.showOverlay(this.elements.modal, [size], true, true, ignoreFirstFocusOnCloseButton);
228
257
  }
229
258
  /**
@@ -234,8 +263,9 @@ class LayoutOverlayManager {
234
263
  *
235
264
  * @param options the modal options: {@link OverlayContentProps} & { size: {@link ModalSize} }.
236
265
  */
237
- showModal({ size, ignoreFirstFocusOnCloseButton, ...props }) {
238
- this.showCustomModal(_jsx(OverlayContent, { ...props, onClose: () => this.closeModal(), type: "modal" }), { size, onClose: props.onClose, ignoreFirstFocusOnCloseButton });
266
+ showModal({ size, ignoreFirstFocusOnCloseButton, stack, onGoBack, id, ...props }) {
267
+ const handleBack = onGoBack ?? ((stack && this.modals.length >= 1) ? () => this.popModal() : undefined);
268
+ this.showCustomModal(_jsx(OverlayContent, { ...props, onGoBack: handleBack, onClose: () => this.closeModal(), type: "modal" }), { size, onClose: props.onClose, ignoreFirstFocusOnCloseButton, stack, id });
239
269
  }
240
270
  showDialog({ ignoreFirstFocusOnCloseButton = false, options, size = 'small' }) {
241
271
  let dialogResult = false;
@@ -325,16 +355,19 @@ class LayoutOverlayManager {
325
355
  * @param content a react element with the modal content.
326
356
  * @param options the modal options {@link CustomModalOptions}.
327
357
  */
328
- showCustomRightPanel(content, { size = 'medium', onClose, ignoreFirstFocusOnCloseButton = true } = {}) {
358
+ showCustomRightPanel(content, { size = 'medium', onClose, ignoreFirstFocusOnCloseButton = true, stack = false, id } = {}) {
329
359
  if (!this.elements?.rightPanel)
330
360
  throw new ElementNotFound('right panel overlay', elementIds.rightPanel);
331
361
  if (!this.setContent.rightPanel)
332
362
  throw new LayoutError('unable to show right panel overlay, because it has not been setup yet.');
333
- this.onModalClose = onClose;
334
- this.setContent.rightPanel(content);
335
- this.elements?.rightPanel.classList.add(size);
363
+ const panel = { element: content, onClose, size, stack, id };
364
+ const currentPanelSize = last(this.modals)?.size;
365
+ this.setContent.rightPanel(stack ? [...this.panels, panel] : [panel]);
366
+ // we should remove the previous size, if any, before showing the panel
367
+ if (currentPanelSize)
368
+ this.elements.rightPanel.classList.remove(currentPanelSize);
336
369
  setTimeout(() => {
337
- this.showOverlay(this.elements?.rightPanel, [], true, true, ignoreFirstFocusOnCloseButton);
370
+ this.showOverlay(this.elements?.rightPanel, [size], true, true, ignoreFirstFocusOnCloseButton);
338
371
  });
339
372
  }
340
373
  /**
@@ -345,8 +378,9 @@ class LayoutOverlayManager {
345
378
  *
346
379
  * @param options the modal options: {@link OverlayContentProps} & { size: {@link ModalSize} }.
347
380
  */
348
- showRightPanel({ size, ignoreFirstFocusOnCloseButton, ...props }) {
349
- this.showCustomRightPanel(_jsx(OverlayContent, { ...props, onClose: () => this.closeRightPanel(), type: "panel" }), { size, onClose: props.onClose, ignoreFirstFocusOnCloseButton });
381
+ showRightPanel({ size, ignoreFirstFocusOnCloseButton, stack, onGoBack, id, ...props }) {
382
+ const handleBack = onGoBack ?? ((stack && this.panels.length >= 1) ? () => this.popRightPanel() : undefined);
383
+ this.showCustomRightPanel(_jsx(OverlayContent, { ...props, onGoBack: handleBack, onClose: () => this.closeRightPanel(), type: "panel" }), { size, onClose: props.onClose, ignoreFirstFocusOnCloseButton, stack, id });
350
384
  }
351
385
  /*
352
386
  * Focus the element that had focus before the last overlay was opened. If the element is not visible anymore, another one that makes
@@ -357,58 +391,129 @@ class LayoutOverlayManager {
357
391
  this.lastActiveElement = null;
358
392
  }
359
393
  /**
360
- * Closes the modal if it's open.
394
+ * Closes all opened modals.
361
395
  * @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
362
396
  */
363
397
  closeModal(runCloseListener = true) {
364
398
  this.elements?.modal?.classList.remove('visible');
365
- this.elements?.backdrop?.setAttribute('class', '');
366
- if (runCloseListener && this.onModalClose) {
367
- const onClose = this.onModalClose;
368
- // setting it to undefined before running it prevents nested calls to closeModal from generating infinite loops.
369
- this.onModalClose = undefined;
370
- onClose();
399
+ const shouldHideBackdrop = this.panels.length === 0;
400
+ if (shouldHideBackdrop)
401
+ this.elements?.backdrop?.setAttribute('class', '');
402
+ if (runCloseListener) {
403
+ this.modals.forEach((modal) => {
404
+ const onClose = modal.onClose;
405
+ // setting it to undefined before running it prevents nested calls to closeModal from generating infinite loops.
406
+ modal.onClose = undefined;
407
+ onClose?.();
408
+ });
371
409
  }
372
410
  const animationMS = parseFloat(valueOfLayoutVar('--modal-animation-duration')) * 1000;
373
411
  setTimeout(() => {
374
- if (this.elements?.backdrop?.classList.contains('visible')) {
412
+ if (shouldHideBackdrop && this.elements?.backdrop?.classList.contains('visible')) {
375
413
  // eslint-disable-next-line no-console
376
414
  console.warn(multipleCallsWarning('modal', animationMS));
377
415
  this.elements?.modal?.classList.remove('visible');
378
416
  }
379
417
  if (this.setContent.modal)
380
- this.setContent.modal(undefined);
381
- this.hideOverlay(this.elements?.modal);
418
+ this.setContent.modal([]);
419
+ if (shouldHideBackdrop)
420
+ this.hideOverlay(this.elements?.modal);
382
421
  this.focusLastActiveElement();
383
422
  }, animationMS);
384
423
  }
385
424
  /**
386
- * Closes the right panel if it's open.
425
+ * Closes the top-most modal in the stack. Will behave like `closeModal` if only a single modal exists in the stack.
426
+ * @param amount number of modals to pop. Defaults to 1.
427
+ * @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
428
+ */
429
+ popModal(amount = 1, runCloseListener = true) {
430
+ if (amount <= 0)
431
+ return;
432
+ if (this.modals.length <= amount)
433
+ return this.closeModal(runCloseListener);
434
+ for (let i = 0; i < amount; i++) {
435
+ const modalToClose = this.modals.pop(); // "!": because of the second "if", the array can't have less than "amount + 1" elements
436
+ if (runCloseListener)
437
+ modalToClose.onClose?.();
438
+ this.elements?.modal?.classList.remove(modalToClose.size);
439
+ }
440
+ const topModal = last(this.modals); // "!": because of the second "if", the array can't have less than "amount + 1" elements
441
+ this.elements?.modal?.classList.add(topModal.size);
442
+ this.setContent.modal?.([...this.modals]);
443
+ }
444
+ /**
445
+ * 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
446
+ * happens.
447
+ * @param id the id of the modal to pop to.
448
+ * @param inclusive when true, the modal with the given id is also popped. Defaults to false.
449
+ */
450
+ popModalTo(id, inclusive = false) {
451
+ const index = this.modals.findIndex(m => m.id === id);
452
+ if (index >= 0)
453
+ this.popModal(this.modals.length - index - (inclusive ? 0 : 1));
454
+ }
455
+ /**
456
+ * Closes all opened right panels.
387
457
  * @param runCloseListener whether or not to run the function `onClose` passed to `showRightPanel` or `showCustomRightPanel`. Defaults to
388
458
  * true.
389
459
  */
390
460
  closeRightPanel(runCloseListener = true) {
391
461
  this.elements?.rightPanel?.classList.remove('visible');
392
- this.elements?.backdrop?.setAttribute('class', '');
393
- if (runCloseListener && this.onModalClose) {
394
- const onClose = this.onModalClose;
395
- // setting it to undefined before running it prevents nested calls to closeRightPanel from generating infinite loops.
396
- this.onModalClose = undefined;
397
- onClose();
462
+ const shouldHideBackdrop = this.modals.length === 0;
463
+ if (shouldHideBackdrop)
464
+ this.elements?.backdrop?.setAttribute('class', '');
465
+ if (runCloseListener) {
466
+ this.panels.forEach((panel) => {
467
+ const onClose = panel.onClose;
468
+ // setting it to undefined before running it prevents nested calls to closeRightPanel from generating infinite loops.
469
+ panel.onClose = undefined;
470
+ onClose?.();
471
+ });
398
472
  }
399
473
  const animationMS = parseFloat(valueOfLayoutVar('--right-panel-animation-duration')) * 1000;
400
474
  setTimeout(() => {
401
- if (this.elements?.backdrop?.classList.contains('visible')) {
475
+ if (shouldHideBackdrop && this.elements?.backdrop?.classList.contains('visible')) {
402
476
  // eslint-disable-next-line no-console
403
477
  console.warn(multipleCallsWarning('rightPanel', animationMS));
404
478
  this.elements?.rightPanel?.classList.remove('visible');
405
479
  }
406
480
  if (this.setContent.rightPanel)
407
- this.setContent.rightPanel(undefined);
408
- this.hideOverlay(this.elements?.rightPanel);
481
+ this.setContent.rightPanel([]);
482
+ if (shouldHideBackdrop)
483
+ this.hideOverlay(this.elements?.rightPanel);
409
484
  this.focusLastActiveElement();
410
485
  }, animationMS);
411
486
  }
487
+ /**
488
+ * Closes the top-most modal in the stack. Will behave like `closeModal` if only a single modal exists in the stack.
489
+ * @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
490
+ */
491
+ popRightPanel(amount = 1, runCloseListener = true) {
492
+ if (amount <= 0)
493
+ return;
494
+ if (this.panels.length <= amount)
495
+ return this.closeRightPanel(runCloseListener);
496
+ for (let i = 0; i < amount; i++) {
497
+ const panelToClose = this.panels.pop(); // "!": because of the second "if", the array can't have less than "amount + 1" elements
498
+ if (runCloseListener)
499
+ panelToClose.onClose?.();
500
+ this.elements?.rightPanel?.classList.remove(panelToClose.size);
501
+ }
502
+ const topPanel = last(this.panels); // "!": because of the second "if", the array can't have less than "amount + 1" elements
503
+ this.elements?.rightPanel?.classList.add(topPanel.size);
504
+ this.setContent.rightPanel?.([...this.panels]);
505
+ }
506
+ /**
507
+ * 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,
508
+ * nothing happens.
509
+ * @param id the id of the right panel to pop to.
510
+ * @param inclusive when true, the right panel with the given id is also popped. Defaults to false.
511
+ */
512
+ popRightPanelTo(id, inclusive = false) {
513
+ const index = this.panels.findIndex(m => m.id === id);
514
+ if (index >= 0)
515
+ this.popRightPanel(this.panels.length - index - (inclusive ? 0 : 1));
516
+ }
412
517
  /**
413
518
  * Closes the bottom dialog if it's open.
414
519
  */
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutOverlayManager.js","sourceRoot":"","sources":["../src/LayoutOverlayManager.tsx"],"names":[],"mappings":";AAAA,+CAA+C;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACvF,OAAO,EAAgB,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAiB,MAAM,qBAAqB,CAAA;AAC3D,OAAO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KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,qBAAa,aAAc,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBAC5C,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,GAAG;;;;;;;;;;;eALtC,MAAO,SAAS;gBAKU,MAAO,YACpC;;gBAKU,MAAO,aAAa;;;;IAF/B,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG;IAM5C,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAI7C,MAAM;CAKP"}
1
+ {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/error/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAiB,MAAM,qCAAqC,CAAA;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjC,UAAU,KAAM,SAAQ,gBAAgB;IACtC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,qBAAa,aAAc,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBAC5C,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,GAAG;;;;;;;;;;;;;;;;;;IAI1C,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG;IAM5C,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAI7C,MAAM;CAKP"}
@@ -1 +1 @@
1
- {"version":3,"file":"SilentErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/error/SilentErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAEtE,O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HANGED
@@ -494,6 +494,21 @@ body {
494
494
  right: 0;
495
495
  }
496
496
 
497
+ #modal .modal-instance,
498
+ #rightPanel .right-panel-instance {
499
+ flex-direction: column;
500
+ flex: 1;
501
+ overflow: hidden;
502
+ display: none;
503
+ &.active {
504
+ display: flex;
505
+ }
506
+ &.disabled {
507
+ pointer-events: none;
508
+ opacity: 0.7;
509
+ }
510
+ }
511
+
497
512
  #bottomPanel {
498
513
  position: fixed;
499
514
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/portal-layout",
3
- "version": "2.38.1",
3
+ "version": "2.39.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,6 +21,7 @@
21
21
  "styled-components": "^6.1.10"
22
22
  },
23
23
  "devDependencies": {
24
+ "@types/lodash": "^4.14.202",
24
25
  "@types/react": "^18.2.37",
25
26
  "@types/react-dom": "^18.2.15",
26
27
  "@typescript-eslint/eslint-plugin": "^6.10.0",
@@ -45,6 +46,7 @@
45
46
  },
46
47
  "dependencies": {
47
48
  "react-toastify": "^10.0.5",
48
- "reactour": "^1.19.4"
49
+ "reactour": "^1.19.4",
50
+ "lodash": "^4.17.21"
49
51
  }
50
52
  }
package/src/Layout.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import { FadingOverflow } from '@stack-spot/portal-components/FadingOverflow'
2
- import { CSSToCitricAdapter, WithStyle } from '@stack-spot/portal-theme'
2
+ import { CSSToCitricAdapter, listToClass, WithStyle } from '@stack-spot/portal-theme'
3
3
  import '@stack-spot/portal-theme/dist/theme.css'
4
4
  import { ReactElement, ReactNode, useEffect } from 'react'
5
5
  import { overlay } from './LayoutOverlayManager'
@@ -152,8 +152,37 @@ export const RawLayout = (
152
152
  </div>}
153
153
  <div id={elementIds.bottomDialog} role="dialog"><ErrorBoundary>{bottomDialog}</ErrorBoundary></div>
154
154
  <div id={elementIds.backdrop}>
155
- <div id={elementIds.rightPanel} aria-modal role="dialog"><ErrorBoundary>{rightPanel}</ErrorBoundary></div>
156
- <div id={elementIds.modal} aria-modal role="dialog"><ErrorBoundary>{modal}</ErrorBoundary></div>
155
+ <div id={elementIds.rightPanel} aria-modal role="dialog">
156
+ <ErrorBoundary>
157
+ {rightPanel.length === 1 && !rightPanel[0].stack
158
+ ? rightPanel[0].element
159
+ : rightPanel.map(
160
+ (m, i) => <div
161
+ key={i}
162
+ className={listToClass([
163
+ 'right-panel-instance',
164
+ (i === rightPanel.length - 1) && 'active',
165
+ modal.length > 0 && 'disabled',
166
+ ])}
167
+ {...(modal.length > 0 ? { inert: true } : {})}
168
+ >
169
+ {m.element}
170
+ </div>,
171
+ )
172
+ }
173
+ </ErrorBoundary>
174
+ </div>
175
+ <div id={elementIds.modal} aria-modal role="dialog">
176
+ <ErrorBoundary>
177
+ {modal.length === 1 && !modal[0].stack
178
+ ? modal[0].element
179
+ : modal.map(
180
+ (m, i) =>
181
+ <div key={i} className={listToClass(['modal-instance', (i === modal.length - 1) && 'active'])}>{m.element}</div>,
182
+ )
183
+ }
184
+ </ErrorBoundary>
185
+ </div>
157
186
  </div>
158
187
  <Toaster />
159
188
  <div id={elementIds.accessibilityAnnouncer} aria-atomic aria-live="assertive">
@@ -1,7 +1,9 @@
1
1
  /* eslint-disable react-hooks/rules-of-hooks */
2
2
 
3
3
  import { Button } from '@citric/core'
4
+ import { ModalContent } from '@citric/ui'
4
5
  import { focusAccessibleElement, focusFirstChild } from '@stack-spot/portal-components'
6
+ import { last } from 'lodash'
5
7
  import { ReactElement, useLayoutEffect, useState } from 'react'
6
8
  import { Dialog, DialogOptions } from './components/Dialog'
7
9
  import { CLOSE_OVERLAY_ID, OverlayContent, OverlayContentProps } from './components/OverlayContent'
@@ -20,16 +22,28 @@ interface AlertOptions extends Omit<DialogOptions, 'cancel'> {
20
22
  showButton?: boolean,
21
23
  }
22
24
 
25
+ interface ModalContent {
26
+ id?: string,
27
+ element: React.ReactElement,
28
+ size: CustomModalSize | RightPanelSize,
29
+ onClose?: () => void,
30
+ stack: boolean,
31
+ }
32
+
23
33
  type BottomDialogOptions = Omit<DialogOptions, 'title'>
24
- type SetContentFn = ((content: ReactElement | undefined) => void) | undefined
34
+ type SetContentFn = (content: ModalContent[]) => void
25
35
 
26
36
  interface OverlayContentSetter {
27
37
  modal?: SetContentFn,
28
38
  rightPanel?: SetContentFn,
29
- bottomDialog?: SetContentFn,
39
+ bottomDialog?: ((content: React.ReactElement | undefined) => void),
30
40
  }
31
41
 
32
42
  interface CustomModalOptions {
43
+ /**
44
+ * An optional, unique identifier for this modal.
45
+ */
46
+ id?: string,
33
47
  /**
34
48
  * The size of the modal.
35
49
  */
@@ -43,9 +57,24 @@ interface CustomModalOptions {
43
57
  * @default true
44
58
  */
45
59
  ignoreFirstFocusOnCloseButton?: boolean,
60
+ /**
61
+ * If true, instead of replacing the previously opened modal (if any), it will open on top of it (stacked).
62
+ *
63
+ * When a modal is stacked on top of another:
64
+ * - Closing the modal, closes all opened modals.
65
+ * - Popping the modal, closes only the modal at the top of the stack.
66
+ * - Only the modal at the top of the stack can be interacted with.
67
+ *
68
+ * @default false
69
+ */
70
+ stack?: boolean,
46
71
  }
47
72
 
48
73
  interface CustomRightPanelOptions {
74
+ /**
75
+ * An optional, unique identifier for this right panel.
76
+ */
77
+ id?: string,
49
78
  /**
50
79
  * The size of the right panel.
51
80
  */
@@ -59,6 +88,17 @@ interface CustomRightPanelOptions {
59
88
  * @default true
60
89
  */
61
90
  ignoreFirstFocusOnCloseButton?: boolean,
91
+ /**
92
+ * If true, instead of replacing the previously opened right panel (if any), it will open on top of it (stacked).
93
+ *
94
+ * When a right panel is stacked on top of another:
95
+ * - Closing the panel, closes all opened panels.
96
+ * - Popping the panel, closes only the panel at the top of the stack.
97
+ * - Only the panel at the top of the stack can be interacted with.
98
+ *
99
+ * @default false
100
+ */
101
+ stack?: boolean,
62
102
  }
63
103
 
64
104
  function multipleCallsWarning(type: 'modal' | 'rightPanel', timeMS: number) {
@@ -74,11 +114,12 @@ class LayoutOverlayManager {
74
114
  static readonly instance?: LayoutOverlayManager
75
115
  private setContent: OverlayContentSetter = {}
76
116
  private elements?: LayoutElements
77
- private onModalClose?: () => void
78
117
  /**
79
118
  * Last element with focus before an overlay is shown.
80
119
  */
81
120
  private lastActiveElement: Element | null = null
121
+ private modals: ModalContent[] = []
122
+ private panels: ModalContent[] = []
82
123
 
83
124
  private closeCustomBackdrops(elements: NodeListOf<Element>) {
84
125
  // this is the easiest way to close each custom backdrop by calling their respective "onClose" callbacks. This is a hidden button
@@ -137,11 +178,17 @@ class LayoutOverlayManager {
137
178
  useLayoutEffect(() => {
138
179
  if (!this.elements) this.setupElements()
139
180
  }, [])
140
- const [modal, setModal] = useState<ReactElement | undefined>()
141
- const [rightPanel, setRightPanel] = useState<ReactElement | undefined>()
181
+ const [modal, setModal] = useState<ModalContent[]>([])
182
+ const [rightPanel, setRightPanel] = useState<ModalContent[]>([])
142
183
  const [bottomDialog, setBottomDialog] = useState<ReactElement | undefined>()
143
- this.setContent.modal = setModal
144
- this.setContent.rightPanel = setRightPanel
184
+ this.setContent.modal = (content) => {
185
+ this.modals = content
186
+ setModal(content)
187
+ }
188
+ this.setContent.rightPanel = (content) => {
189
+ this.panels = content
190
+ setRightPanel(content)
191
+ }
145
192
  this.setContent.bottomDialog = setBottomDialog
146
193
  return { modal, rightPanel, bottomDialog }
147
194
  }
@@ -175,7 +222,6 @@ class LayoutOverlayManager {
175
222
  ignoreFirstFocusOnCloseButton = true,
176
223
  ) {
177
224
  this.lastActiveElement = document.activeElement
178
-
179
225
  if (manageClasses) element?.classList.add('visible', ...extraClasses)
180
226
  this.setInteractivity(element, true)
181
227
  if (blockMainContent) this.setMainContentInteractivity(false)
@@ -225,6 +271,20 @@ class LayoutOverlayManager {
225
271
  return this.elements?.modal?.classList.contains('visible') ?? false
226
272
  }
227
273
 
274
+ /**
275
+ * @returns the number of modals currently tracked.
276
+ */
277
+ getNumberOfOpenModals() {
278
+ return this.modals.length
279
+ }
280
+
281
+ /**
282
+ * @returns the number of right panels currently tracked.
283
+ */
284
+ getNumberOfOpenRightPanels() {
285
+ return this.panels.length
286
+ }
287
+
228
288
  /**
229
289
  * @returns true if the right panel is currently opened. False otherwise.
230
290
  */
@@ -249,11 +309,15 @@ class LayoutOverlayManager {
249
309
  * @param options the modal options {@link CustomModalOptions}.
250
310
  */
251
311
  showCustomModal(content: React.ReactElement,
252
- { size = 'medium', onClose, ignoreFirstFocusOnCloseButton = true }: CustomModalOptions = {}) {
312
+ { size = 'medium', onClose, ignoreFirstFocusOnCloseButton = true, stack = false, id }: CustomModalOptions = {},
313
+ ) {
253
314
  if (!this.elements?.modal) throw new ElementNotFound('modal', elementIds.modal)
254
315
  if (!this.setContent.modal) throw new LayoutError('unable to show modal, because it has not been setup yet.')
255
- this.onModalClose = onClose
256
- this.setContent.modal(content)
316
+ const modal = { element: content, onClose, size, stack, id }
317
+ const currentModalSize = last(this.modals)?.size
318
+ this.setContent.modal(stack ? [...this.modals, modal] : [modal])
319
+ // we should remove the previous size, if any, before showing the modal
320
+ if (currentModalSize) this.elements.modal.classList.remove(currentModalSize)
257
321
  this.showOverlay(this.elements.modal, [size], true, true, ignoreFirstFocusOnCloseButton)
258
322
  }
259
323
 
@@ -266,11 +330,12 @@ class LayoutOverlayManager {
266
330
  * @param options the modal options: {@link OverlayContentProps} & { size: {@link ModalSize} }.
267
331
  */
268
332
  showModal({
269
- size, ignoreFirstFocusOnCloseButton, ...props
270
- }: OverlayContentProps & { size?: ModalSize, ignoreFirstFocusOnCloseButton?: boolean }) {
333
+ size, ignoreFirstFocusOnCloseButton, stack, onGoBack, id, ...props
334
+ }: OverlayContentProps & { size?: ModalSize } & Pick<CustomModalOptions, 'ignoreFirstFocusOnCloseButton' | 'stack' | 'id'>) {
335
+ const handleBack = onGoBack ?? ((stack && this.modals.length >= 1) ? () => this.popModal() : undefined)
271
336
  this.showCustomModal(
272
- <OverlayContent {...props} onClose={() => this.closeModal()} type="modal" />,
273
- { size, onClose: props.onClose, ignoreFirstFocusOnCloseButton },
337
+ <OverlayContent {...props} onGoBack={handleBack} onClose={() => this.closeModal()} type="modal" />,
338
+ { size, onClose: props.onClose, ignoreFirstFocusOnCloseButton, stack, id },
274
339
  )
275
340
  }
276
341
 
@@ -385,15 +450,17 @@ class LayoutOverlayManager {
385
450
  * @param content a react element with the modal content.
386
451
  * @param options the modal options {@link CustomModalOptions}.
387
452
  */
388
- showCustomRightPanel(content: ReactElement, { size = 'medium', onClose, ignoreFirstFocusOnCloseButton = true }:
453
+ showCustomRightPanel(content: ReactElement, { size = 'medium', onClose, ignoreFirstFocusOnCloseButton = true, stack = false, id }:
389
454
  CustomRightPanelOptions = {}) {
390
455
  if (!this.elements?.rightPanel) throw new ElementNotFound('right panel overlay', elementIds.rightPanel)
391
456
  if (!this.setContent.rightPanel) throw new LayoutError('unable to show right panel overlay, because it has not been setup yet.')
392
- this.onModalClose = onClose
393
- this.setContent.rightPanel(content)
394
- this.elements?.rightPanel.classList.add(size)
457
+ const panel = { element: content, onClose, size, stack, id }
458
+ const currentPanelSize = last(this.modals)?.size
459
+ this.setContent.rightPanel(stack ? [...this.panels, panel] : [panel])
460
+ // we should remove the previous size, if any, before showing the panel
461
+ if (currentPanelSize) this.elements.rightPanel.classList.remove(currentPanelSize)
395
462
  setTimeout(() => {
396
- this.showOverlay(this.elements?.rightPanel, [], true, true, ignoreFirstFocusOnCloseButton)
463
+ this.showOverlay(this.elements?.rightPanel, [size], true, true, ignoreFirstFocusOnCloseButton)
397
464
  })
398
465
  }
399
466
 
@@ -405,11 +472,12 @@ class LayoutOverlayManager {
405
472
  *
406
473
  * @param options the modal options: {@link OverlayContentProps} & { size: {@link ModalSize} }.
407
474
  */
408
- showRightPanel({ size, ignoreFirstFocusOnCloseButton, ...props }:
409
- OverlayContentProps & { size?: RightPanelSize, ignoreFirstFocusOnCloseButton?: boolean }) {
475
+ showRightPanel({ size, ignoreFirstFocusOnCloseButton, stack, onGoBack, id, ...props }:
476
+ OverlayContentProps & Pick<CustomRightPanelOptions, 'size' | 'ignoreFirstFocusOnCloseButton' | 'stack' | 'id'>) {
477
+ const handleBack = onGoBack ?? ((stack && this.panels.length >= 1) ? () => this.popRightPanel() : undefined)
410
478
  this.showCustomRightPanel(
411
- <OverlayContent {...props} onClose={() => this.closeRightPanel()} type="panel" />,
412
- { size, onClose: props.onClose, ignoreFirstFocusOnCloseButton },
479
+ <OverlayContent {...props} onGoBack={handleBack} onClose={() => this.closeRightPanel()} type="panel" />,
480
+ { size, onClose: props.onClose, ignoreFirstFocusOnCloseButton, stack, id },
413
481
  )
414
482
  }
415
483
 
@@ -423,28 +491,31 @@ class LayoutOverlayManager {
423
491
  }
424
492
 
425
493
  /**
426
- * Closes the modal if it's open.
494
+ * Closes all opened modals.
427
495
  * @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
428
496
  */
429
497
  closeModal(runCloseListener = true) {
430
498
  this.elements?.modal?.classList.remove('visible')
431
- this.elements?.backdrop?.setAttribute('class', '')
432
- if (runCloseListener && this.onModalClose) {
433
- const onClose = this.onModalClose
434
- // setting it to undefined before running it prevents nested calls to closeModal from generating infinite loops.
435
- this.onModalClose = undefined
436
- onClose()
499
+ const shouldHideBackdrop = this.panels.length === 0
500
+ if (shouldHideBackdrop) this.elements?.backdrop?.setAttribute('class', '')
501
+ if (runCloseListener) {
502
+ this.modals.forEach((modal) => {
503
+ const onClose = modal.onClose
504
+ // setting it to undefined before running it prevents nested calls to closeModal from generating infinite loops.
505
+ modal.onClose = undefined
506
+ onClose?.()
507
+ })
437
508
  }
438
509
  const animationMS = parseFloat(valueOfLayoutVar('--modal-animation-duration')) * 1000
439
510
  setTimeout(
440
511
  () => {
441
- if (this.elements?.backdrop?.classList.contains('visible')) {
512
+ if (shouldHideBackdrop && this.elements?.backdrop?.classList.contains('visible')) {
442
513
  // eslint-disable-next-line no-console
443
514
  console.warn(multipleCallsWarning('modal', animationMS))
444
515
  this.elements?.modal?.classList.remove('visible')
445
516
  }
446
- if (this.setContent.modal) this.setContent.modal(undefined)
447
- this.hideOverlay(this.elements?.modal)
517
+ if (this.setContent.modal) this.setContent.modal([])
518
+ if (shouldHideBackdrop) this.hideOverlay(this.elements?.modal)
448
519
  this.focusLastActiveElement()
449
520
  },
450
521
  animationMS,
@@ -452,35 +523,95 @@ class LayoutOverlayManager {
452
523
  }
453
524
 
454
525
  /**
455
- * Closes the right panel if it's open.
526
+ * Closes the top-most modal in the stack. Will behave like `closeModal` if only a single modal exists in the stack.
527
+ * @param amount number of modals to pop. Defaults to 1.
528
+ * @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
529
+ */
530
+ popModal(amount = 1, runCloseListener = true) {
531
+ if (amount <= 0) return
532
+ if (this.modals.length <= amount) return this.closeModal(runCloseListener)
533
+ for (let i = 0; i < amount; i++) {
534
+ const modalToClose = this.modals.pop()! // "!": because of the second "if", the array can't have less than "amount + 1" elements
535
+ if (runCloseListener) modalToClose.onClose?.()
536
+ this.elements?.modal?.classList.remove(modalToClose.size)
537
+ }
538
+ const topModal = last(this.modals)! // "!": because of the second "if", the array can't have less than "amount + 1" elements
539
+ this.elements?.modal?.classList.add(topModal.size)
540
+ this.setContent.modal?.([...this.modals])
541
+ }
542
+
543
+ /**
544
+ * 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
545
+ * happens.
546
+ * @param id the id of the modal to pop to.
547
+ * @param inclusive when true, the modal with the given id is also popped. Defaults to false.
548
+ */
549
+ popModalTo(id: string, inclusive = false) {
550
+ const index = this.modals.findIndex(m => m.id === id)
551
+ if (index >= 0) this.popModal(this.modals.length - index - (inclusive ? 0 : 1))
552
+ }
553
+
554
+ /**
555
+ * Closes all opened right panels.
456
556
  * @param runCloseListener whether or not to run the function `onClose` passed to `showRightPanel` or `showCustomRightPanel`. Defaults to
457
557
  * true.
458
558
  */
459
559
  closeRightPanel(runCloseListener = true) {
460
560
  this.elements?.rightPanel?.classList.remove('visible')
461
- this.elements?.backdrop?.setAttribute('class', '')
462
- if (runCloseListener && this.onModalClose) {
463
- const onClose = this.onModalClose
464
- // setting it to undefined before running it prevents nested calls to closeRightPanel from generating infinite loops.
465
- this.onModalClose = undefined
466
- onClose()
561
+ const shouldHideBackdrop = this.modals.length === 0
562
+ if (shouldHideBackdrop) this.elements?.backdrop?.setAttribute('class', '')
563
+ if (runCloseListener) {
564
+ this.panels.forEach((panel) => {
565
+ const onClose = panel.onClose
566
+ // setting it to undefined before running it prevents nested calls to closeRightPanel from generating infinite loops.
567
+ panel.onClose = undefined
568
+ onClose?.()
569
+ })
467
570
  }
468
571
  const animationMS = parseFloat(valueOfLayoutVar('--right-panel-animation-duration')) * 1000
469
572
  setTimeout(
470
573
  () => {
471
- if (this.elements?.backdrop?.classList.contains('visible')) {
574
+ if (shouldHideBackdrop && this.elements?.backdrop?.classList.contains('visible')) {
472
575
  // eslint-disable-next-line no-console
473
576
  console.warn(multipleCallsWarning('rightPanel', animationMS))
474
577
  this.elements?.rightPanel?.classList.remove('visible')
475
578
  }
476
- if (this.setContent.rightPanel) this.setContent.rightPanel(undefined)
477
- this.hideOverlay(this.elements?.rightPanel)
579
+ if (this.setContent.rightPanel) this.setContent.rightPanel([])
580
+ if (shouldHideBackdrop) this.hideOverlay(this.elements?.rightPanel)
478
581
  this.focusLastActiveElement()
479
582
  },
480
583
  animationMS,
481
584
  )
482
585
  }
483
586
 
587
+ /**
588
+ * Closes the top-most modal in the stack. Will behave like `closeModal` if only a single modal exists in the stack.
589
+ * @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
590
+ */
591
+ popRightPanel(amount = 1, runCloseListener = true) {
592
+ if (amount <= 0) return
593
+ if (this.panels.length <= amount) return this.closeRightPanel(runCloseListener)
594
+ for (let i = 0; i < amount; i++) {
595
+ const panelToClose = this.panels.pop()! // "!": because of the second "if", the array can't have less than "amount + 1" elements
596
+ if (runCloseListener) panelToClose.onClose?.()
597
+ this.elements?.rightPanel?.classList.remove(panelToClose.size)
598
+ }
599
+ const topPanel = last(this.panels)! // "!": because of the second "if", the array can't have less than "amount + 1" elements
600
+ this.elements?.rightPanel?.classList.add(topPanel.size)
601
+ this.setContent.rightPanel?.([...this.panels])
602
+ }
603
+
604
+ /**
605
+ * 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,
606
+ * nothing happens.
607
+ * @param id the id of the right panel to pop to.
608
+ * @param inclusive when true, the right panel with the given id is also popped. Defaults to false.
609
+ */
610
+ popRightPanelTo(id: string, inclusive = false) {
611
+ const index = this.panels.findIndex(m => m.id === id)
612
+ if (index >= 0) this.popRightPanel(this.panels.length - index - (inclusive ? 0 : 1))
613
+ }
614
+
484
615
  /**
485
616
  * Closes the bottom dialog if it's open.
486
617
  */
package/src/layout.css CHANGED
@@ -494,6 +494,21 @@ body {
494
494
  right: 0;
495
495
  }
496
496
 
497
+ #modal .modal-instance,
498
+ #rightPanel .right-panel-instance {
499
+ flex-direction: column;
500
+ flex: 1;
501
+ overflow: hidden;
502
+ display: none;
503
+ &.active {
504
+ display: flex;
505
+ }
506
+ &.disabled {
507
+ pointer-events: none;
508
+ opacity: 0.7;
509
+ }
510
+ }
511
+
497
512
  #bottomPanel {
498
513
  position: fixed;
499
514
  display: flex;