@stack-spot/portal-layout 0.0.52 → 0.0.53

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.
Files changed (97) hide show
  1. package/dist/Layout.d.ts +2 -2
  2. package/dist/Layout.js +1 -1
  3. package/dist/LayoutOverlayManager.js +6 -6
  4. package/dist/LayoutOverlayManager.js.map +1 -1
  5. package/dist/components/Dialog.d.ts +1 -1
  6. package/dist/components/Dialog.js +1 -1
  7. package/dist/components/Header.d.ts +1 -1
  8. package/dist/components/Header.js +1 -1
  9. package/dist/components/OverlayContent.d.ts +1 -1
  10. package/dist/components/OverlayContent.js +20 -20
  11. package/dist/components/PortalSwitcher.d.ts +1 -1
  12. package/dist/components/PortalSwitcher.js +54 -54
  13. package/dist/components/SelectionList.d.ts +1 -1
  14. package/dist/components/SelectionList.js +54 -54
  15. package/dist/components/SelectionList.js.map +1 -1
  16. package/dist/components/Toaster.d.ts +1 -1
  17. package/dist/components/Toaster.js +1 -1
  18. package/dist/components/UserMenu.d.ts +1 -1
  19. package/dist/components/UserMenu.js +41 -41
  20. package/dist/components/error/ErrorBoundary.d.ts +1 -1
  21. package/dist/components/error/ErrorBoundary.js +1 -1
  22. package/dist/components/error/ErrorFeedback.d.ts +1 -1
  23. package/dist/components/error/ErrorFeedback.js +1 -1
  24. package/dist/components/error/SilentErrorBoundary.d.ts +1 -1
  25. package/dist/components/error/SilentErrorBoundary.js +1 -1
  26. package/dist/components/menu/MenuContent.d.ts +12 -10
  27. package/dist/components/menu/MenuContent.d.ts.map +1 -1
  28. package/dist/components/menu/MenuContent.js +146 -146
  29. package/dist/components/menu/MenuContent.js.map +1 -1
  30. package/dist/components/menu/MenuSections.d.ts +1 -1
  31. package/dist/components/menu/MenuSections.js +1 -1
  32. package/dist/components/menu/MenuSections.js.map +1 -1
  33. package/dist/components/menu/PageSelector.d.ts +1 -1
  34. package/dist/components/menu/PageSelector.js +65 -65
  35. package/dist/components/menu/PageSelector.js.map +1 -1
  36. package/dist/components/menu/use-check-text-overflow.js.map +1 -1
  37. package/dist/layout-context.d.ts +1 -1
  38. package/dist/layout-context.js +1 -1
  39. package/dist/layout.css +466 -466
  40. package/dist/svg/AI.d.ts +1 -1
  41. package/dist/svg/AI.js +1 -1
  42. package/dist/svg/EDP.d.ts +1 -1
  43. package/dist/svg/EDP.js +1 -1
  44. package/dist/svg/Forbidden.d.ts +1 -1
  45. package/dist/svg/Forbidden.js +1 -1
  46. package/dist/svg/HUB.d.ts +1 -1
  47. package/dist/svg/HUB.js +1 -1
  48. package/dist/svg/Logo.d.ts +1 -1
  49. package/dist/svg/Logo.js +1 -1
  50. package/dist/svg/NotFound.d.ts +1 -1
  51. package/dist/svg/NotFound.js +1 -1
  52. package/dist/svg/ServerError.d.ts +1 -1
  53. package/dist/svg/ServerError.js +1 -1
  54. package/dist/svg/Unauthenticated.d.ts +1 -1
  55. package/dist/svg/Unauthenticated.js +1 -1
  56. package/dist/toaster.js +2 -2
  57. package/dist/toaster.js.map +1 -1
  58. package/dist/utils.js.map +1 -1
  59. package/package.json +5 -5
  60. package/src/Layout.tsx +106 -106
  61. package/src/LayoutOverlayManager.tsx +273 -273
  62. package/src/components/Dialog.tsx +93 -93
  63. package/src/components/Header.tsx +34 -34
  64. package/src/components/OverlayContent.tsx +58 -58
  65. package/src/components/PortalSwitcher.tsx +147 -147
  66. package/src/components/SelectionList.tsx +272 -272
  67. package/src/components/Toaster.tsx +16 -16
  68. package/src/components/UserMenu.tsx +111 -111
  69. package/src/components/error/ErrorBoundary.tsx +38 -38
  70. package/src/components/error/ErrorFeedback.tsx +114 -114
  71. package/src/components/error/ErrorManager.ts +31 -31
  72. package/src/components/error/SilentErrorBoundary.tsx +54 -54
  73. package/src/components/menu/MenuContent.tsx +296 -296
  74. package/src/components/menu/MenuSections.tsx +270 -270
  75. package/src/components/menu/PageSelector.tsx +154 -154
  76. package/src/components/menu/constants.ts +2 -2
  77. package/src/components/menu/types.ts +112 -112
  78. package/src/components/menu/use-check-text-overflow.tsx +26 -26
  79. package/src/components/menu/use-keyboard-controls.tsx +70 -70
  80. package/src/components/types.ts +15 -15
  81. package/src/dictionary.ts +25 -25
  82. package/src/elements.ts +24 -24
  83. package/src/errors.ts +11 -11
  84. package/src/index.ts +17 -17
  85. package/src/layout-context.tsx +22 -22
  86. package/src/layout.css +466 -466
  87. package/src/svg/AI.tsx +37 -37
  88. package/src/svg/EDP.tsx +35 -35
  89. package/src/svg/Forbidden.tsx +22 -22
  90. package/src/svg/HUB.tsx +35 -35
  91. package/src/svg/Logo.tsx +35 -35
  92. package/src/svg/NotFound.tsx +16 -16
  93. package/src/svg/ServerError.tsx +33 -33
  94. package/src/svg/Unauthenticated.tsx +16 -16
  95. package/src/toaster.tsx +76 -76
  96. package/src/utils.ts +114 -114
  97. package/tsconfig.json +8 -8
@@ -1,54 +1,54 @@
1
- import { theme } from '@stack-spot/portal-theme'
2
- import { Component } from 'react'
3
- import { ErrorDescription, ErrorManager } from './ErrorManager'
4
-
5
- interface State extends ErrorDescription {
6
- hasError: boolean,
7
- message?: string,
8
- }
9
-
10
- interface Props {
11
- children: React.ReactNode,
12
- }
13
-
14
- export class SilentErrorBoundary extends Component<Props, State> {
15
- constructor(props: Props) {
16
- super(props)
17
- this.state = { hasError: false }
18
- }
19
-
20
- static getDerivedStateFromError(error: any) {
21
- return { hasError: true, ...ErrorManager.describe(error) }
22
- }
23
-
24
- componentDidCatch(error: any, errorInfo: any) {
25
- // eslint-disable-next-line no-console
26
- console.error(error, errorInfo)
27
- ErrorManager.runErrorHandler(error)
28
- }
29
-
30
- componentDidUpdate(prevProps: Readonly<Props>) {
31
- if (this.props.children !== prevProps.children) this.setState({ hasError: false })
32
- }
33
-
34
- render() {
35
- return this.state.hasError
36
- ? <div
37
- title={this.state.message ? `Error: ${this.state.message}` : undefined}
38
- style={{
39
- width: '16px',
40
- height: '16px',
41
- margin: '16px',
42
- background: theme.color.danger[500],
43
- color: theme.color.danger.contrastText,
44
- display: this.state.debug ? 'flex' : 'none',
45
- justifyContent: 'center',
46
- alignItems: 'center',
47
- fontWeight: 'bold',
48
- fontSize: '10px',
49
- borderRadius: '50%',
50
- }}
51
- >!</div>
52
- : this.props.children
53
- }
54
- }
1
+ import { theme } from '@stack-spot/portal-theme'
2
+ import { Component } from 'react'
3
+ import { ErrorDescription, ErrorManager } from './ErrorManager'
4
+
5
+ interface State extends ErrorDescription {
6
+ hasError: boolean,
7
+ message?: string,
8
+ }
9
+
10
+ interface Props {
11
+ children: React.ReactNode,
12
+ }
13
+
14
+ export class SilentErrorBoundary extends Component<Props, State> {
15
+ constructor(props: Props) {
16
+ super(props)
17
+ this.state = { hasError: false }
18
+ }
19
+
20
+ static getDerivedStateFromError(error: any) {
21
+ return { hasError: true, ...ErrorManager.describe(error) }
22
+ }
23
+
24
+ componentDidCatch(error: any, errorInfo: any) {
25
+ // eslint-disable-next-line no-console
26
+ console.error(error, errorInfo)
27
+ ErrorManager.runErrorHandler(error)
28
+ }
29
+
30
+ componentDidUpdate(prevProps: Readonly<Props>) {
31
+ if (this.props.children !== prevProps.children) this.setState({ hasError: false })
32
+ }
33
+
34
+ render() {
35
+ return this.state.hasError
36
+ ? <div
37
+ title={this.state.message ? `Error: ${this.state.message}` : undefined}
38
+ style={{
39
+ width: '16px',
40
+ height: '16px',
41
+ margin: '16px',
42
+ background: theme.color.danger[500],
43
+ color: theme.color.danger.contrastText,
44
+ display: this.state.debug ? 'flex' : 'none',
45
+ justifyContent: 'center',
46
+ alignItems: 'center',
47
+ fontWeight: 'bold',
48
+ fontSize: '10px',
49
+ borderRadius: '50%',
50
+ }}
51
+ >!</div>
52
+ : this.props.children
53
+ }
54
+ }