@learningpool/ui 1.6.0-beta.9 → 1.6.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.
Files changed (55) hide show
  1. package/components/landmarks/Header/Header.d.ts +26 -0
  2. package/components/landmarks/Header/Header.js +75 -0
  3. package/components/landmarks/Header/HeaderActionButtons.d.ts +3 -0
  4. package/components/landmarks/Header/HeaderActionButtons.js +66 -0
  5. package/components/landmarks/Header/HeaderStyles.d.ts +55 -0
  6. package/components/landmarks/Header/HeaderStyles.js +13 -0
  7. package/components/navigation/MobileNavigation/MobileNavigation.d.ts +1 -2
  8. package/components/navigation/MobileNavigation/MobileNavigation.js +29 -82
  9. package/components/navigation/MobileNavigation/MobileNavigationAvatar.d.ts +1 -1
  10. package/components/navigation/MobileNavigation/MobileNavigationAvatar.js +26 -8
  11. package/components/navigation/MobileNavigation/MobileNavigationDrawer.js +3 -4
  12. package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +3 -3
  13. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.d.ts +1 -1
  14. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.d.ts +1 -1
  15. package/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.d.ts +3 -0
  16. package/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +31 -0
  17. package/components/navigation/MobileNavigation/MobileNavigationStyles.d.ts +0 -254
  18. package/components/navigation/MobileNavigation/MobileNavigationStyles.js +19 -24
  19. package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +2 -1
  20. package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +2 -1
  21. package/components/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +2 -1
  22. package/components/navigation/MobileNavigation/MobileNavigationToggleX.js +2 -1
  23. package/components/navigation/VerticalNavigation/VerticalNavigation.d.ts +3 -3
  24. package/components/navigation/VerticalNavigation/VerticalNavigation.js +5 -10
  25. package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.d.ts +1 -21
  26. package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +4 -4
  27. package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +3 -3
  28. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +1 -16
  29. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +27 -23
  30. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.d.ts +1 -1
  31. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +1 -1
  32. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +1 -1
  33. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +1 -3
  34. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +3 -5
  35. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.js +2 -2
  36. package/components/stream/AppSwitcher/AppSwitcher.d.ts +1 -9
  37. package/components/stream/AppSwitcher/AppSwitcher.js +6 -6
  38. package/components/stream/AppSwitcher/AppSwitcherStyles.d.ts +2 -2
  39. package/components/stream/AppSwitcher/AppSwitcherStyles.js +16 -16
  40. package/components/stream/AppSwitcher/constants.js +2 -2
  41. package/index.d.ts +1 -0
  42. package/index.js +1 -0
  43. package/package.json +2 -2
  44. package/types/components/navigation/VerticalNavigation.d.ts +49 -0
  45. package/types/components/navigation/VerticalNavigation.js +1 -0
  46. package/types/components/navigation/VerticalNavigationAvatar.d.ts +22 -0
  47. package/types/components/navigation/VerticalNavigationAvatar.js +1 -0
  48. package/types/components/stream/AppSwitcher.d.ts +9 -0
  49. package/types/components/stream/AppSwitcher.js +1 -0
  50. package/types/index.d.ts +3 -0
  51. package/types/index.js +3 -0
  52. package/utils/constants.d.ts +1 -0
  53. package/utils/constants.js +3 -0
  54. package/utils/theme.d.ts +2 -2
  55. package/utils/theme.js +3 -3
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "components",
10
10
  "ui"
11
11
  ],
12
- "version": "1.6.0-beta.9",
12
+ "version": "1.6.0",
13
13
  "private": false,
14
14
  "main": "index.js",
15
15
  "module": "index.js",
@@ -23,7 +23,7 @@
23
23
  "@types/jest": "^27.4.0",
24
24
  "@types/node": "^16.11.45",
25
25
  "@types/react": "^17.0.48",
26
- "@types/react-dom": "^17.0.11",
26
+ "@types/react-dom": "^17.0.18",
27
27
  "@typescript-eslint/parser": "^5.31.0",
28
28
  "anysort": "^2.0.0",
29
29
  "eslint-plugin-n": "^15.2.4",
@@ -0,0 +1,49 @@
1
+ /// <reference types="react" />
2
+ import { IApplication } from '../stream/AppSwitcher';
3
+ import { IAvatarMenuItemProps } from './VerticalNavigationAvatar';
4
+ export interface IVerticalNavigationItemProps {
5
+ label: string;
6
+ icon?: JSX.Element;
7
+ onClick?: any;
8
+ isActive?: boolean;
9
+ children?: IVerticalNavigationItemProps[];
10
+ isDrawerOpen?: boolean;
11
+ index?: number;
12
+ isSecondary?: boolean;
13
+ hasFlyout?: boolean;
14
+ fullHeightFlyout?: boolean;
15
+ content?: JSX.Element;
16
+ style?: any;
17
+ open?: boolean;
18
+ hasCustomContent?: boolean;
19
+ }
20
+ export interface IVerticalNavigationProps {
21
+ logo?: string;
22
+ logoText?: string;
23
+ logoOnClick?: any;
24
+ items?: IVerticalNavigationItemProps[];
25
+ secondaryItems?: IVerticalNavigationItemProps[];
26
+ hasStreamHome?: boolean;
27
+ streamHomeAccessToken?: string;
28
+ streamHomeBaseUrl?: string;
29
+ streamHomeApiKey?: string;
30
+ streamHomeApplications?: IApplication[];
31
+ avatarName?: string;
32
+ isDrawerOpen?: boolean;
33
+ isPersistent?: boolean;
34
+ setIsPersistent?: any;
35
+ appRootID?: string;
36
+ hasAvatar?: boolean;
37
+ avatarPanelLogoutString?: string;
38
+ avatarPanelOnClickSwitchDirection?: any;
39
+ avatarPanelOnClickLogout?: any;
40
+ avatarPanelOnClickViewProfile?: any;
41
+ avatarPanelViewProfileString?: string;
42
+ avatarPanelOnClickEditProfile?: any;
43
+ avatarPanelEditProfileString?: string;
44
+ avatarPanelMenuItems?: Array<IAvatarMenuItemProps>;
45
+ avatarPanelOnClickMainAction?: any;
46
+ avatarPanelMainActionString?: string;
47
+ avatarPanelSettingItems?: Array<IAvatarMenuItemProps>;
48
+ avatarPanelFootnote?: any;
49
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
1
+ export interface IAvatarMenuItemProps {
2
+ label: string;
3
+ icon: any;
4
+ onClick: any;
5
+ }
6
+ export interface IAvatarPanelProps {
7
+ avatarName: string;
8
+ editProfileText?: string;
9
+ avatarPanelLogoutString?: string;
10
+ avatarPanelOnClickSwitchDirection?: any;
11
+ avatarPanelOnClickLogout?: any;
12
+ avatarPanelOnClickViewProfile?: any;
13
+ avatarPanelViewProfileString?: string;
14
+ avatarPanelOnClickEditProfile?: any;
15
+ avatarPanelEditProfileString?: string;
16
+ avatarPanelMenuItems?: Array<IAvatarMenuItemProps>;
17
+ avatarPanelOnClickMainAction?: any;
18
+ avatarPanelMainActionString?: string;
19
+ avatarPanelSettingItems?: Array<IAvatarMenuItemProps>;
20
+ avatarPanelInvertNavString?: string;
21
+ avatarPanelFootnote?: any;
22
+ }
@@ -0,0 +1,9 @@
1
+ export interface IApplication {
2
+ applicationId: number;
3
+ applicationName: string;
4
+ shortName: string;
5
+ internalName: string;
6
+ customName?: string;
7
+ url: string;
8
+ children?: object[];
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export type { IVerticalNavigationItemProps, IVerticalNavigationProps } from './components/navigation/VerticalNavigation';
2
+ export type { IAvatarMenuItemProps, IAvatarPanelProps } from './components/navigation/VerticalNavigationAvatar';
3
+ export type { IApplication } from './components/stream/AppSwitcher';
package/types/index.js ADDED
@@ -0,0 +1,3 @@
1
+ // https://www.typescriptlang.org/play#example/types-vs-interfaces
2
+ // https://stackoverflow.com/questions/56018167/typescript-does-not-copy-d-ts-files-to-build
3
+ export {};
@@ -4,3 +4,4 @@ export declare const MOBILE_NAV_PANEL_TYPES: {
4
4
  SEARCH: string;
5
5
  AVATAR: string;
6
6
  };
7
+ export declare const DEFAULT_MAX_CHARACTERS_PER_LINE = 50;
@@ -4,3 +4,6 @@ export var MOBILE_NAV_PANEL_TYPES = {
4
4
  SEARCH: 'search',
5
5
  AVATAR: 'avatar'
6
6
  };
7
+ // 50 seems a reasonable default limit
8
+ // https://m2.material.io/design/typography/understanding-typography.html#readability
9
+ export var DEFAULT_MAX_CHARACTERS_PER_LINE = 50;
package/utils/theme.d.ts CHANGED
@@ -53,7 +53,7 @@ export declare const lightTheme: {
53
53
  };
54
54
  divider: string;
55
55
  text: {
56
- primary: "#000";
56
+ primary: string;
57
57
  };
58
58
  };
59
59
  };
@@ -77,7 +77,7 @@ export declare const darkTheme: {
77
77
  };
78
78
  divider: string;
79
79
  text: {
80
- primary: "#fff";
80
+ primary: string;
81
81
  };
82
82
  };
83
83
  };
package/utils/theme.js CHANGED
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { amber, blue, common } from '@mui/material/colors';
12
+ import { amber, blue } from '@mui/material/colors';
13
13
  var DEFAULT_HEADER_TYPOGRAPHY = {
14
14
  fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif'
15
15
  };
@@ -40,7 +40,7 @@ export var lightTheme = {
40
40
  },
41
41
  divider: 'rgba(0, 0, 0, 0.075)',
42
42
  text: {
43
- primary: common.black
43
+ primary: 'rgba(0,0,0,0.95)'
44
44
  }
45
45
  }
46
46
  };
@@ -49,7 +49,7 @@ export var darkTheme = {
49
49
  primary: amber,
50
50
  divider: 'rgba(255, 255, 255, 0.075)',
51
51
  text: {
52
- primary: common.white
52
+ primary: 'rgba(255,255,255,0.95)'
53
53
  }
54
54
  }
55
55
  };