@xyo-network/react-appbar 4.1.9 → 4.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. package/dist/browser/components/AppBar/Application.d.ts +3 -3
  2. package/dist/browser/components/AppBar/Application.d.ts.map +1 -1
  3. package/dist/browser/components/CollapsibleDrawer/CollapseToggle.d.ts.map +1 -1
  4. package/dist/browser/components/CollapsibleDrawer/CollapsibleDrawer.d.ts.map +1 -1
  5. package/dist/browser/components/CollapsibleDrawer/storyExampleMenuData.d.ts +1 -1
  6. package/dist/browser/components/CollapsibleDrawer/storyExampleMenuData.d.ts.map +1 -1
  7. package/dist/browser/components/Toolbar/Context/ContextToolbar.d.ts +5 -6
  8. package/dist/browser/components/Toolbar/Context/ContextToolbar.d.ts.map +1 -1
  9. package/dist/browser/components/Toolbar/Context/LogoLinkEx.d.ts +1 -0
  10. package/dist/browser/components/Toolbar/Context/LogoLinkEx.d.ts.map +1 -1
  11. package/dist/browser/components/Toolbar/System/SystemToolbar.d.ts +3 -4
  12. package/dist/browser/components/Toolbar/System/SystemToolbar.d.ts.map +1 -1
  13. package/dist/browser/components/index.d.ts +0 -1
  14. package/dist/browser/components/index.d.ts.map +1 -1
  15. package/dist/browser/index.d.ts +0 -1
  16. package/dist/browser/index.d.ts.map +1 -1
  17. package/dist/browser/index.mjs +70 -349
  18. package/dist/browser/index.mjs.map +1 -1
  19. package/package.json +9 -10
  20. package/src/components/AppBar/Application.stories.tsx +11 -11
  21. package/src/components/AppBar/Application.tsx +8 -8
  22. package/src/components/CollapsibleDrawer/CollapseDrawer.stories.tsx +2 -2
  23. package/src/components/CollapsibleDrawer/CollapseToggle.tsx +1 -2
  24. package/src/components/CollapsibleDrawer/CollapsibleDrawer.tsx +1 -2
  25. package/src/components/CollapsibleDrawer/storyExampleMenuData.tsx +1 -2
  26. package/src/components/Toolbar/Context/ContextToolbar.stories.tsx +6 -6
  27. package/src/components/Toolbar/Context/ContextToolbar.tsx +8 -8
  28. package/src/components/Toolbar/Context/LogoLinkEx.tsx +4 -3
  29. package/src/components/Toolbar/System/SystemToolbar.stories.tsx +8 -9
  30. package/src/components/Toolbar/System/SystemToolbar.tsx +8 -19
  31. package/src/components/index.ts +0 -1
  32. package/src/index.ts +0 -1
  33. package/dist/browser/components/SiteMenu/Menu.d.ts +0 -9
  34. package/dist/browser/components/SiteMenu/Menu.d.ts.map +0 -1
  35. package/dist/browser/components/SiteMenu/MenuListItem/MenuListItemContainer.d.ts +0 -11
  36. package/dist/browser/components/SiteMenu/MenuListItem/MenuListItemContainer.d.ts.map +0 -1
  37. package/dist/browser/components/SiteMenu/MenuListItem/index.d.ts +0 -2
  38. package/dist/browser/components/SiteMenu/MenuListItem/index.d.ts.map +0 -1
  39. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/ListItemTooltip.d.ts +0 -7
  40. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/ListItemTooltip.d.ts.map +0 -1
  41. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/MenuIcon.d.ts +0 -8
  42. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/MenuIcon.d.ts.map +0 -1
  43. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/MenuListItem.d.ts +0 -7
  44. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/MenuListItem.d.ts.map +0 -1
  45. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/index.d.ts +0 -4
  46. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/index.d.ts.map +0 -1
  47. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/SubNavListItemCollapse.d.ts +0 -11
  48. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/SubNavListItemCollapse.d.ts.map +0 -1
  49. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/SubNavToggleIconButton.d.ts +0 -9
  50. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/SubNavToggleIconButton.d.ts.map +0 -1
  51. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/index.d.ts +0 -3
  52. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/index.d.ts.map +0 -1
  53. package/dist/browser/components/SiteMenu/MenuSection.d.ts +0 -11
  54. package/dist/browser/components/SiteMenu/MenuSection.d.ts.map +0 -1
  55. package/dist/browser/components/SiteMenu/hooks/index.d.ts +0 -2
  56. package/dist/browser/components/SiteMenu/hooks/index.d.ts.map +0 -1
  57. package/dist/browser/components/SiteMenu/hooks/useMenuItemsShared.d.ts +0 -7
  58. package/dist/browser/components/SiteMenu/hooks/useMenuItemsShared.d.ts.map +0 -1
  59. package/dist/browser/components/SiteMenu/index.d.ts +0 -6
  60. package/dist/browser/components/SiteMenu/index.d.ts.map +0 -1
  61. package/dist/browser/components/SiteMenu/lib/MenuListItemBase.d.ts +0 -5
  62. package/dist/browser/components/SiteMenu/lib/MenuListItemBase.d.ts.map +0 -1
  63. package/dist/browser/components/SiteMenu/lib/NavListItemProps.d.ts +0 -12
  64. package/dist/browser/components/SiteMenu/lib/NavListItemProps.d.ts.map +0 -1
  65. package/dist/browser/components/SiteMenu/lib/index.d.ts +0 -3
  66. package/dist/browser/components/SiteMenu/lib/index.d.ts.map +0 -1
  67. package/dist/browser/contexts/Collapsible/State.d.ts +0 -9
  68. package/dist/browser/contexts/Collapsible/State.d.ts.map +0 -1
  69. package/dist/browser/contexts/Collapsible/context.d.ts +0 -3
  70. package/dist/browser/contexts/Collapsible/context.d.ts.map +0 -1
  71. package/dist/browser/contexts/Collapsible/index.d.ts +0 -4
  72. package/dist/browser/contexts/Collapsible/index.d.ts.map +0 -1
  73. package/dist/browser/contexts/Collapsible/provider.d.ts +0 -8
  74. package/dist/browser/contexts/Collapsible/provider.d.ts.map +0 -1
  75. package/dist/browser/contexts/Collapsible/use.d.ts +0 -2
  76. package/dist/browser/contexts/Collapsible/use.d.ts.map +0 -1
  77. package/dist/browser/contexts/index.d.ts +0 -2
  78. package/dist/browser/contexts/index.d.ts.map +0 -1
  79. package/src/components/SiteMenu/Menu.tsx +0 -53
  80. package/src/components/SiteMenu/MenuListItem/MenuListItemContainer.stories.tsx +0 -54
  81. package/src/components/SiteMenu/MenuListItem/MenuListItemContainer.tsx +0 -87
  82. package/src/components/SiteMenu/MenuListItem/index.ts +0 -1
  83. package/src/components/SiteMenu/MenuListItem/list-item-components/ListItemTooltip.tsx +0 -23
  84. package/src/components/SiteMenu/MenuListItem/list-item-components/MenuIcon.tsx +0 -16
  85. package/src/components/SiteMenu/MenuListItem/list-item-components/MenuListItem.tsx +0 -31
  86. package/src/components/SiteMenu/MenuListItem/list-item-components/index.ts +0 -3
  87. package/src/components/SiteMenu/MenuListItem/sub-nav/SubNavListItemCollapse.tsx +0 -22
  88. package/src/components/SiteMenu/MenuListItem/sub-nav/SubNavToggleIconButton.tsx +0 -27
  89. package/src/components/SiteMenu/MenuListItem/sub-nav/index.ts +0 -2
  90. package/src/components/SiteMenu/MenuSection.tsx +0 -30
  91. package/src/components/SiteMenu/hooks/index.ts +0 -1
  92. package/src/components/SiteMenu/hooks/useMenuItemsShared.tsx +0 -29
  93. package/src/components/SiteMenu/index.ts +0 -5
  94. package/src/components/SiteMenu/lib/MenuListItemBase.tsx +0 -4
  95. package/src/components/SiteMenu/lib/NavListItemProps.ts +0 -12
  96. package/src/components/SiteMenu/lib/index.ts +0 -2
  97. package/src/contexts/Collapsible/State.ts +0 -9
  98. package/src/contexts/Collapsible/context.ts +0 -5
  99. package/src/contexts/Collapsible/index.ts +0 -3
  100. package/src/contexts/Collapsible/provider.tsx +0 -26
  101. package/src/contexts/Collapsible/use.ts +0 -5
  102. package/src/contexts/index.ts +0 -1
@@ -1,2 +0,0 @@
1
- export * from './MenuListItemContainer.tsx';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteMenu/MenuListItem/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA"}
@@ -1,7 +0,0 @@
1
- import type { TooltipProps } from '@mui/material';
2
- import React from 'react';
3
- export interface ListItemTooltipProps extends Omit<TooltipProps, 'children'> {
4
- title: string;
5
- }
6
- export declare const ListItemTooltip: React.FC<ListItemTooltipProps>;
7
- //# sourceMappingURL=ListItemTooltip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListItemTooltip.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SiteMenu/MenuListItem/list-item-components/ListItemTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAGjD,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC;IAC1E,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAW1D,CAAA"}
@@ -1,8 +0,0 @@
1
- import type { TypographyProps } from '@mui/material';
2
- import type { ReactNode } from 'react';
3
- import React from 'react';
4
- export interface MenuIconProps extends TypographyProps {
5
- icon?: ReactNode;
6
- }
7
- export declare const MenuIcon: React.FC<MenuIconProps>;
8
- //# sourceMappingURL=MenuIcon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SiteMenu/MenuListItem/list-item-components/MenuIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,aAAc,SAAQ,eAAe;IACpD,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAM5C,CAAA"}
@@ -1,7 +0,0 @@
1
- import type { ListItemProps } from '@mui/material';
2
- import React from 'react';
3
- import type { MenuListItemBase } from '../../lib/index.ts';
4
- export interface ListItemExProps extends MenuListItemBase, ListItemProps {
5
- }
6
- export declare const MenuListItem: React.FC<ListItemExProps>;
7
- //# sourceMappingURL=MenuListItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuListItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SiteMenu/MenuListItem/list-item-components/MenuListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAE1D,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,aAAa;CAAG;AAE3E,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsBlD,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './ListItemTooltip.tsx';
2
- export * from './MenuIcon.tsx';
3
- export * from './MenuListItem.tsx';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SiteMenu/MenuListItem/list-item-components/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA"}
@@ -1,11 +0,0 @@
1
- import type { CollapseProps } from '@mui/material';
2
- import type { PropsWithChildren } from 'react';
3
- import React from 'react';
4
- import type { NavListItemProps } from '../../lib/index.ts';
5
- export interface SubNavListItemsCollapseProps extends PropsWithChildren, CollapseProps {
6
- collapse?: boolean;
7
- openSubNav?: boolean;
8
- subNavListItems?: NavListItemProps[];
9
- }
10
- export declare const SubNavListItemsCollapse: React.FC<SubNavListItemsCollapseProps>;
11
- //# sourceMappingURL=SubNavListItemCollapse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SubNavListItemCollapse.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SiteMenu/MenuListItem/sub-nav/SubNavListItemCollapse.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAE1D,MAAM,WAAW,4BAA6B,SAAQ,iBAAiB,EAAE,aAAa;IACpF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,eAAe,CAAC,EAAE,gBAAgB,EAAE,CAAA;CACrC;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAQ1E,CAAA"}
@@ -1,9 +0,0 @@
1
- import type { IconButtonProps } from '@mui/material';
2
- import type { Dispatch, SetStateAction } from 'react';
3
- import React from 'react';
4
- export interface SubNavToggleIconButtonProps extends IconButtonProps {
5
- openSubNav?: boolean;
6
- setOpenSubNav?: Dispatch<SetStateAction<boolean>>;
7
- }
8
- export declare const SubNavToggleIconButton: React.FC<SubNavToggleIconButtonProps>;
9
- //# sourceMappingURL=SubNavToggleIconButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SubNavToggleIconButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SiteMenu/MenuListItem/sub-nav/SubNavToggleIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,KAAK,EACV,QAAQ,EAAE,cAAc,EACzB,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,WAAW,2BAA4B,SAAQ,eAAe;IAClE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;CAClD;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAaxE,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './SubNavListItemCollapse.tsx';
2
- export * from './SubNavToggleIconButton.tsx';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SiteMenu/MenuListItem/sub-nav/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA"}
@@ -1,11 +0,0 @@
1
- import type { FlexBoxProps } from '@xylabs/react-flexbox';
2
- import React from 'react';
3
- import type { MenuListItemProps } from './MenuListItem/index.ts';
4
- export interface MenuSectionProps extends FlexBoxProps {
5
- iconMenuTextSpacing?: string;
6
- listItems: MenuListItemProps[];
7
- showTitle?: boolean;
8
- title: string;
9
- }
10
- export declare const MenuSection: React.FC<MenuSectionProps>;
11
- //# sourceMappingURL=MenuSection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuSection.d.ts","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAGhE,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,SAAS,EAAE,iBAAiB,EAAE,CAAA;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAclD,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './useMenuItemsShared.tsx';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteMenu/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA"}
@@ -1,7 +0,0 @@
1
- import type { MenuListItemProps } from '../MenuListItem/index.ts';
2
- export type DefaultSiteMenuListItemProps = Pick<MenuListItemProps, 'collapseEnd' | 'dense' | 'iconOnly' | 'sx'>;
3
- export declare const useMenuItemsShared: () => {
4
- defaultSiteMenuListItemProps: DefaultSiteMenuListItemProps;
5
- onMenuItemToggle: (open?: boolean) => void;
6
- };
7
- //# sourceMappingURL=useMenuItemsShared.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMenuItemsShared.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteMenu/hooks/useMenuItemsShared.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAAC,iBAAiB,EAAE,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC,CAAA;AAE/G,eAAO,MAAM,kBAAkB;;8BAKI,OAAO;CAgBzC,CAAA"}
@@ -1,6 +0,0 @@
1
- export * from './hooks/index.ts';
2
- export * from './lib/index.ts';
3
- export * from './Menu.tsx';
4
- export * from './MenuListItem/index.ts';
5
- export * from './MenuSection.tsx';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SiteMenu/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA"}
@@ -1,5 +0,0 @@
1
- export interface MenuListItemBase {
2
- collapseEnd?: boolean;
3
- iconOnly?: boolean;
4
- }
5
- //# sourceMappingURL=MenuListItemBase.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuListItemBase.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteMenu/lib/MenuListItemBase.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB"}
@@ -1,12 +0,0 @@
1
- import type { ListItemProps, ListItemTextProps } from '@mui/material';
2
- import type { ReactNode } from 'react';
3
- import type { To } from 'react-router-dom';
4
- export interface NavListItemProps {
5
- href?: string;
6
- icon?: ReactNode;
7
- onButtonClick?: ListItemProps['onClick'];
8
- primary: ListItemTextProps['primary'];
9
- to?: To;
10
- tooltip?: string;
11
- }
12
- //# sourceMappingURL=NavListItemProps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NavListItemProps.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteMenu/lib/NavListItemProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AAE1C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,aAAa,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAA;IACxC,OAAO,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAA;IACrC,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"}
@@ -1,3 +0,0 @@
1
- export * from './MenuListItemBase.tsx';
2
- export * from './NavListItemProps.ts';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteMenu/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA"}
@@ -1,9 +0,0 @@
1
- import type { ContextExState } from '@xyo-network/react-shared';
2
- import type { Dispatch, SetStateAction } from 'react';
3
- export interface CollapsibleState extends ContextExState {
4
- collapse?: boolean;
5
- collapseEnd?: boolean;
6
- setCollapse?: Dispatch<SetStateAction<boolean>>;
7
- setCollapseEnd?: Dispatch<SetStateAction<boolean>>;
8
- }
9
- //# sourceMappingURL=State.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/Collapsible/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;IAC/C,cAAc,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;CACnD"}
@@ -1,3 +0,0 @@
1
- import type { CollapsibleState } from './State.ts';
2
- export declare const CollapsibleContext: import("react").Context<CollapsibleState & import("@xyo-network/react-shared").ContextExState>;
3
- //# sourceMappingURL=context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/Collapsible/context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,eAAO,MAAM,kBAAkB,gGAAsC,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './provider.tsx';
2
- export * from './State.ts';
3
- export * from './use.ts';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/contexts/Collapsible/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA"}
@@ -1,8 +0,0 @@
1
- import type { PropsWithChildren } from 'react';
2
- import React from 'react';
3
- export interface CollapsibleProviderProps extends PropsWithChildren {
4
- defaultCollapse?: boolean;
5
- defaultCollapseEnd?: boolean;
6
- }
7
- export declare const CollapsibleProvider: React.FC<CollapsibleProviderProps>;
8
- //# sourceMappingURL=provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/Collapsible/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAmB,MAAM,OAAO,CAAA;AAIvC,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAelE,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const useCollapsible: () => Omit<import("./State.ts").CollapsibleState & import("@xyo-network/react-shared").ContextExState, "provided">;
2
- //# sourceMappingURL=use.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/contexts/Collapsible/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,oHAA+D,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './Collapsible/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA"}
@@ -1,53 +0,0 @@
1
- import { Menu as MenuIcon, Settings as SettingsIcon } from '@mui/icons-material'
2
- import {
3
- IconButton, List, SwipeableDrawer,
4
- } from '@mui/material'
5
- import type { FlexBoxProps } from '@xylabs/react-flexbox'
6
- import { FlexRow } from '@xylabs/react-flexbox'
7
- import React, { useEffect, useState } from 'react'
8
-
9
- import { MenuListItemContainer } from './MenuListItem/index.ts'
10
-
11
- export interface SiteMenuProps extends FlexBoxProps {
12
- hideSettingsMenuItem?: boolean
13
- onMenuToggle?: (state?: boolean) => void
14
- side?: 'left' | 'right' | 'top' | 'bottom'
15
- }
16
-
17
- export const SiteMenu: React.FC<SiteMenuProps> = ({
18
- children, onMenuToggle, side = 'right', ...props
19
- }) => {
20
- const [open, setOpen] = useState(false)
21
-
22
- useEffect(() => {
23
- onMenuToggle?.(open)
24
- }, [onMenuToggle, open])
25
-
26
- return (
27
- <FlexRow alignItems="stretch" {...props}>
28
- <IconButton
29
- size="small"
30
- color="inherit"
31
- onClick={() => {
32
- setOpen(!open)
33
- }}
34
- >
35
- <MenuIcon fontSize="large" />
36
- </IconButton>
37
- <SwipeableDrawer
38
- anchor={side}
39
- open={open}
40
- onClick={() => setOpen(false)}
41
- onKeyDown={() => setOpen(false)}
42
- onClose={() => setOpen(false)}
43
- onOpen={() => setOpen(true)}
44
- >
45
- {children ?? (
46
- <List>
47
- <MenuListItemContainer primary="Settings" icon={<SettingsIcon />} to="/settings" />
48
- </List>
49
- )}
50
- </SwipeableDrawer>
51
- </FlexRow>
52
- )
53
- }
@@ -1,54 +0,0 @@
1
- import { List } from '@mui/material'
2
- import type { Meta, StoryFn } from '@storybook/react'
3
- import React from 'react'
4
- // eslint-disable-next-line import-x/no-internal-modules
5
- import { FaGlobeAmericas } from 'react-icons/fa'
6
- import { BrowserRouter } from 'react-router-dom'
7
-
8
- import type { MenuListItemProps } from './MenuListItemContainer.tsx'
9
- import { MenuListItemContainer } from './MenuListItemContainer.tsx'
10
-
11
- const StorybookEntry = {
12
- argTypes: {},
13
- component: MenuListItemContainer,
14
- parameters: { docs: { page: null } },
15
- title: 'appbar/MenuListItemContainer',
16
- } as Meta<typeof MenuListItemContainer>
17
-
18
- const SiteMenuList: React.FC<MenuListItemProps> = (args) => {
19
- return (
20
- <BrowserRouter>
21
- <List>
22
- <MenuListItemContainer {...args} />
23
- <MenuListItemContainer {...args} />
24
- <MenuListItemContainer {...args} />
25
- </List>
26
- </BrowserRouter>
27
- )
28
- }
29
-
30
- const Template: StoryFn<typeof MenuListItemContainer> = (args) => {
31
- return <SiteMenuList {...args} />
32
- }
33
-
34
- const Default = Template.bind({})
35
- Default.args = {
36
- dense: true,
37
- icon: <FaGlobeAmericas />,
38
- primary: 'Explore',
39
- tooltip: 'View global archivist data on a world map.',
40
- }
41
-
42
- const WithChildren = Template.bind({})
43
- WithChildren.args = {
44
- icon: <FaGlobeAmericas />,
45
- primary: 'Explore',
46
- subNavListItems: [{
47
- primary: 'Explore', to: '/explore', tooltip: 'View global archivist data on a world map.',
48
- }],
49
- tooltip: 'View global archivist data on a world map.',
50
- }
51
-
52
- export { Default, WithChildren }
53
-
54
- export default StorybookEntry
@@ -1,87 +0,0 @@
1
- import type { ListItemProps } from '@mui/material'
2
- import { ListItemText, useTheme } from '@mui/material'
3
- import { FlexRow } from '@xylabs/react-flexbox'
4
- import { LinkEx } from '@xylabs/react-link'
5
- import React, { useState } from 'react'
6
-
7
- import { useCollapsible } from '../../../contexts/index.ts'
8
- import type { MenuListItemBase, NavListItemProps } from '../lib/index.ts'
9
- import {
10
- ListItemTooltip, MenuIcon, MenuListItem,
11
- } from './list-item-components/index.ts'
12
- import { SubNavListItemsCollapse, SubNavToggleIconButton } from './sub-nav/index.ts'
13
-
14
- export interface MenuListItemProps extends NavListItemProps, MenuListItemBase, ListItemProps {
15
- iconMenuTextSpacing?: string
16
- iconOnly?: boolean
17
- subNavListItems?: NavListItemProps[]
18
- subNavOpen?: boolean
19
- }
20
-
21
- export const MenuListItemContainer: React.FC<MenuListItemProps> = ({
22
- style,
23
- icon,
24
- iconMenuTextSpacing,
25
- iconOnly,
26
- onButtonClick,
27
- primary,
28
- subNavListItems,
29
- sx,
30
- tooltip,
31
- to,
32
- ...props
33
- }) => {
34
- const { dense } = props
35
- const theme = useTheme()
36
- const { collapse } = useCollapsible()
37
- const [openSubNav, setOpenSubNav] = useState(false)
38
- const [hovered, setHovered] = useState(false)
39
- const resolvedIconMenuTextSpacing = iconMenuTextSpacing ?? theme.spacing(1)
40
-
41
- return (
42
- <>
43
- <MenuListItem
44
- disableGutters
45
- iconOnly={iconOnly}
46
- onClick={onButtonClick}
47
- dense={dense}
48
- sx={{ justifyContent: 'space-between', ...sx }}
49
- style={{ whiteSpace: 'nowrap', ...style }}
50
- {...props}
51
- >
52
- <LinkEx
53
- onMouseEnter={() => setHovered(true)}
54
- onMouseLeave={() => setHovered(false)}
55
- color="inherit"
56
- to={to}
57
- sx={{
58
- '& :hover': {
59
- cursor: 'pointer',
60
- textDecoration: 'underline',
61
- },
62
- }}
63
- >
64
- <FlexRow>
65
- <MenuIcon icon={icon} paddingRight={resolvedIconMenuTextSpacing} color={hovered ? 'secondary' : 'inherit'} />
66
- <ListItemText primary={primary} />
67
- </FlexRow>
68
- </LinkEx>
69
- <FlexRow style={{ marginLeft: theme.spacing(1) }}>
70
- {subNavListItems
71
- ? <SubNavToggleIconButton setOpenSubNav={setOpenSubNav} openSubNav={openSubNav} />
72
- : null}
73
- {tooltip
74
- ? <ListItemTooltip title={tooltip} />
75
- : null}
76
- </FlexRow>
77
- </MenuListItem>
78
- {subNavListItems
79
- ? (
80
- <SubNavListItemsCollapse openSubNav={openSubNav} collapse={collapse}>
81
- {subNavListItems?.map((item, index) => <MenuListItemContainer dense={dense} sx={{ pl: theme.spacing(1) }} key={index} {...item} />)}
82
- </SubNavListItemsCollapse>
83
- )
84
- : null}
85
- </>
86
- )
87
- }
@@ -1 +0,0 @@
1
- export * from './MenuListItemContainer.tsx'
@@ -1,23 +0,0 @@
1
- import type { TooltipProps } from '@mui/material'
2
- import { Tooltip } from '@mui/material'
3
- import { FlexCol } from '@xylabs/react-flexbox'
4
- import React from 'react'
5
- // eslint-disable-next-line import-x/no-internal-modules
6
- import { VscInfo } from 'react-icons/vsc'
7
-
8
- export interface ListItemTooltipProps extends Omit<TooltipProps, 'children'> {
9
- title: string
10
- }
11
-
12
- export const ListItemTooltip: React.FC<ListItemTooltipProps> = ({ title, ...props }) => {
13
- return (
14
- <Tooltip title={title} placement="right" {...props}>
15
- {/* Needs div so it can work, the hovering doesn't work with a FlexCol */}
16
- <div>
17
- <FlexCol justifyContent="center">
18
- <VscInfo color="grey" />
19
- </FlexCol>
20
- </div>
21
- </Tooltip>
22
- )
23
- }
@@ -1,16 +0,0 @@
1
- import type { TypographyProps } from '@mui/material'
2
- import { Typography } from '@mui/material'
3
- import type { ReactNode } from 'react'
4
- import React from 'react'
5
-
6
- export interface MenuIconProps extends TypographyProps {
7
- icon?: ReactNode
8
- }
9
-
10
- export const MenuIcon: React.FC<MenuIconProps> = ({ icon, ...props }) => {
11
- return (
12
- <Typography display="flex" {...props}>
13
- {icon}
14
- </Typography>
15
- )
16
- }
@@ -1,31 +0,0 @@
1
- import type { ListItemProps } from '@mui/material'
2
- import { ListItem } from '@mui/material'
3
- import React from 'react'
4
-
5
- import type { MenuListItemBase } from '../../lib/index.ts'
6
-
7
- export interface ListItemExProps extends MenuListItemBase, ListItemProps {}
8
-
9
- export const MenuListItem: React.FC<ListItemExProps> = ({
10
- iconOnly, collapseEnd, sx, children, dense, ...props
11
- }) => {
12
- const listItemSx = iconOnly
13
- ? {
14
- borderRadius: '50%', display: 'inline-flex', flexGrow: 0, width: 'auto',
15
- }
16
- : { width: '100%' }
17
- // wait till collapseEnds to remove the spacing between items
18
- const spacingSx = collapseEnd ? { columnGap: 0 } : { columnGap: 1.5 }
19
- // adjusts to the paddingY value which does NOT scale along the theme.spacing
20
- const paddingSx = dense ? { px: '8px' } : { px: '12px' }
21
- return (
22
- <ListItem
23
- sx={{
24
- ...listItemSx, ...spacingSx, ...paddingSx, ...sx,
25
- }}
26
- {...props}
27
- >
28
- {children}
29
- </ListItem>
30
- )
31
- }
@@ -1,3 +0,0 @@
1
- export * from './ListItemTooltip.tsx'
2
- export * from './MenuIcon.tsx'
3
- export * from './MenuListItem.tsx'
@@ -1,22 +0,0 @@
1
- import type { CollapseProps } from '@mui/material'
2
- import { Collapse, List } from '@mui/material'
3
- import type { PropsWithChildren } from 'react'
4
- import React from 'react'
5
-
6
- import type { NavListItemProps } from '../../lib/index.ts'
7
-
8
- export interface SubNavListItemsCollapseProps extends PropsWithChildren, CollapseProps {
9
- collapse?: boolean
10
- openSubNav?: boolean
11
- subNavListItems?: NavListItemProps[]
12
- }
13
-
14
- export const SubNavListItemsCollapse: React.FC<SubNavListItemsCollapseProps> = ({
15
- collapse, openSubNav, children, ...props
16
- }) => {
17
- return (
18
- <Collapse in={collapse == true ? false : openSubNav} {...props}>
19
- <List>{children}</List>
20
- </Collapse>
21
- )
22
- }
@@ -1,27 +0,0 @@
1
- import type { IconButtonProps } from '@mui/material'
2
- import { IconButton, useTheme } from '@mui/material'
3
- import type {
4
- Dispatch, SetStateAction, SyntheticEvent,
5
- } from 'react'
6
- import React from 'react'
7
- // eslint-disable-next-line import-x/no-internal-modules
8
- import { VscChevronDown } from 'react-icons/vsc'
9
- export interface SubNavToggleIconButtonProps extends IconButtonProps {
10
- openSubNav?: boolean
11
- setOpenSubNav?: Dispatch<SetStateAction<boolean>>
12
- }
13
-
14
- export const SubNavToggleIconButton: React.FC<SubNavToggleIconButtonProps> = ({ setOpenSubNav, openSubNav }) => {
15
- const theme = useTheme()
16
- return (
17
- <IconButton
18
- onClick={(event: SyntheticEvent) => {
19
- event.stopPropagation()
20
- setOpenSubNav?.(!openSubNav)
21
- }}
22
- sx={{ marginRight: theme.spacing(0.5) }}
23
- >
24
- <VscChevronDown fontSize="16px" />
25
- </IconButton>
26
- )
27
- }
@@ -1,2 +0,0 @@
1
- export * from './SubNavListItemCollapse.tsx'
2
- export * from './SubNavToggleIconButton.tsx'
@@ -1,30 +0,0 @@
1
- import { Collapse, ListSubheader } from '@mui/material'
2
- import type { FlexBoxProps } from '@xylabs/react-flexbox'
3
- import { FlexCol } from '@xylabs/react-flexbox'
4
- import React from 'react'
5
-
6
- import type { MenuListItemProps } from './MenuListItem/index.ts'
7
- import { MenuListItemContainer } from './MenuListItem/index.ts'
8
-
9
- export interface MenuSectionProps extends FlexBoxProps {
10
- iconMenuTextSpacing?: string
11
- listItems: MenuListItemProps[]
12
- showTitle?: boolean
13
- title: string
14
- }
15
-
16
- export const MenuSection: React.FC<MenuSectionProps> = ({
17
- iconMenuTextSpacing, listItems, showTitle = true, title, ...props
18
- }) => {
19
- return (
20
- <FlexCol alignItems="stretch" {...props}>
21
- <Collapse in={showTitle} timeout={700}>
22
- <ListSubheader>{title}</ListSubheader>
23
- </Collapse>
24
-
25
- {listItems.map((item, index) => (
26
- <MenuListItemContainer key={index} iconMenuTextSpacing={iconMenuTextSpacing} {...item}></MenuListItemContainer>
27
- ))}
28
- </FlexCol>
29
- )
30
- }
@@ -1 +0,0 @@
1
- export * from './useMenuItemsShared.tsx'