@matrix-widget-toolkit/mui 2.0.2 → 2.0.4

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.
@@ -200,6 +200,10 @@ function createSwitchStyleOverrides(_a) {
200
200
  * browser settings.
201
201
  */
202
202
  var defaultTheme = material.createTheme();
203
+ function container() {
204
+ var _a;
205
+ return (_a = document.fullscreenElement) !== null && _a !== void 0 ? _a : document.documentElement;
206
+ }
203
207
  var baseTheme = {
204
208
  shape: {
205
209
  borderRadius: 8,
@@ -323,8 +327,14 @@ var baseTheme = {
323
327
  },
324
328
  },
325
329
  },
326
- // Tooltips have a darker background
330
+ // Tooltips are fullscreen-aware
331
+ MuiMenu: {
332
+ defaultProps: {
333
+ container: container,
334
+ },
335
+ },
327
336
  MuiTooltip: {
337
+ // Tooltips have a darker background
328
338
  styleOverrides: {
329
339
  tooltip: function (_a) {
330
340
  var theme = _a.theme;
@@ -335,6 +345,28 @@ var baseTheme = {
335
345
  });
336
346
  },
337
347
  },
348
+ // Tooltips are fullscreen-aware
349
+ defaultProps: {
350
+ slotProps: {
351
+ popper: {
352
+ container: container,
353
+ },
354
+ },
355
+ PopperProps: {
356
+ container: container,
357
+ },
358
+ },
359
+ },
360
+ // Tooltips are fullscreen-aware
361
+ MuiPopover: {
362
+ defaultProps: {
363
+ slotProps: {
364
+ root: {
365
+ container: container,
366
+ },
367
+ },
368
+ container: container,
369
+ },
338
370
  },
339
371
  // Buttons have to ripple but have the default keyboard focus ring instead
340
372
  MuiButtonBase: {
@@ -188,6 +188,10 @@ function createSwitchStyleOverrides(_a) {
188
188
  * browser settings.
189
189
  */
190
190
  var defaultTheme = createTheme();
191
+ function container() {
192
+ var _a;
193
+ return (_a = document.fullscreenElement) !== null && _a !== void 0 ? _a : document.documentElement;
194
+ }
191
195
  var baseTheme = {
192
196
  shape: {
193
197
  borderRadius: 8,
@@ -311,8 +315,14 @@ var baseTheme = {
311
315
  },
312
316
  },
313
317
  },
314
- // Tooltips have a darker background
318
+ // Tooltips are fullscreen-aware
319
+ MuiMenu: {
320
+ defaultProps: {
321
+ container: container,
322
+ },
323
+ },
315
324
  MuiTooltip: {
325
+ // Tooltips have a darker background
316
326
  styleOverrides: {
317
327
  tooltip: function (_a) {
318
328
  var theme = _a.theme;
@@ -323,6 +333,28 @@ var baseTheme = {
323
333
  });
324
334
  },
325
335
  },
336
+ // Tooltips are fullscreen-aware
337
+ defaultProps: {
338
+ slotProps: {
339
+ popper: {
340
+ container: container,
341
+ },
342
+ },
343
+ PopperProps: {
344
+ container: container,
345
+ },
346
+ },
347
+ },
348
+ // Tooltips are fullscreen-aware
349
+ MuiPopover: {
350
+ defaultProps: {
351
+ slotProps: {
352
+ root: {
353
+ container: container,
354
+ },
355
+ },
356
+ container: container,
357
+ },
326
358
  },
327
359
  // Buttons have to ripple but have the default keyboard focus ring instead
328
360
  MuiButtonBase: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matrix-widget-toolkit/mui",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "A customized material-ui theme that matches the style of the Element Matrix client",
5
5
  "author": "Nordeck IT + Consulting GmbH",
6
6
  "license": "Apache-2.0",