@xyo-network/react-appbar 4.1.9 → 4.1.11

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,29 +0,0 @@
1
- import { useMemo } from 'react'
2
-
3
- import { useCollapsible } from '../../../contexts/index.ts'
4
- import type { MenuListItemProps } from '../MenuListItem/index.ts'
5
-
6
- export type DefaultSiteMenuListItemProps = Pick<MenuListItemProps, 'collapseEnd' | 'dense' | 'iconOnly' | 'sx'>
7
-
8
- export const useMenuItemsShared = () => {
9
- const {
10
- collapse, collapseEnd, setCollapse, setCollapseEnd,
11
- } = useCollapsible()
12
-
13
- const onMenuItemToggle = (open?: boolean) => {
14
- setCollapse?.(previous => (open ? false : previous))
15
- setCollapseEnd?.(previous => (open ? false : previous))
16
- }
17
-
18
- const defaultSiteMenuListItemProps: DefaultSiteMenuListItemProps = useMemo(
19
- () => ({
20
- collapseEnd,
21
- dense: true,
22
- iconOnly: collapse,
23
- sx: { px: '8px' },
24
- }),
25
- [collapse, collapseEnd],
26
- )
27
-
28
- return { defaultSiteMenuListItemProps, onMenuItemToggle }
29
- }
@@ -1,5 +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'
@@ -1,4 +0,0 @@
1
- export interface MenuListItemBase {
2
- collapseEnd?: boolean
3
- iconOnly?: boolean
4
- }
@@ -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
-
5
- export interface NavListItemProps {
6
- href?: string
7
- icon?: ReactNode
8
- onButtonClick?: ListItemProps['onClick']
9
- primary: ListItemTextProps['primary']
10
- to?: To
11
- tooltip?: string
12
- }
@@ -1,2 +0,0 @@
1
- export * from './MenuListItemBase.tsx'
2
- export * from './NavListItemProps.ts'
@@ -1,9 +0,0 @@
1
- import type { ContextExState } from '@xyo-network/react-shared'
2
- import type { Dispatch, SetStateAction } from 'react'
3
-
4
- export interface CollapsibleState extends ContextExState {
5
- collapse?: boolean
6
- collapseEnd?: boolean
7
- setCollapse?: Dispatch<SetStateAction<boolean>>
8
- setCollapseEnd?: Dispatch<SetStateAction<boolean>>
9
- }
@@ -1,5 +0,0 @@
1
- import { createContextEx } from '@xyo-network/react-shared'
2
-
3
- import type { CollapsibleState } from './State.ts'
4
-
5
- export const CollapsibleContext = createContextEx<CollapsibleState>()
@@ -1,3 +0,0 @@
1
- export * from './provider.tsx'
2
- export * from './State.ts'
3
- export * from './use.ts'
@@ -1,26 +0,0 @@
1
- import type { PropsWithChildren } from 'react'
2
- import React, { useState } from 'react'
3
-
4
- import { CollapsibleContext } from './context.ts'
5
-
6
- export interface CollapsibleProviderProps extends PropsWithChildren {
7
- defaultCollapse?: boolean
8
- defaultCollapseEnd?: boolean
9
- }
10
-
11
- export const CollapsibleProvider: React.FC<CollapsibleProviderProps> = ({
12
- defaultCollapse = false, defaultCollapseEnd = false, children,
13
- }) => {
14
- const [collapse, setCollapse] = useState(() => defaultCollapse)
15
- const [collapseEnd, setCollapseEnd] = useState(() => defaultCollapseEnd)
16
-
17
- return (
18
- // eslint-disable-next-line @eslint-react/no-unstable-context-value
19
- <CollapsibleContext.Provider value={{
20
- collapse, collapseEnd, provided: true, setCollapse, setCollapseEnd,
21
- }}
22
- >
23
- {children}
24
- </CollapsibleContext.Provider>
25
- )
26
- }
@@ -1,5 +0,0 @@
1
- import { useContextEx } from '@xyo-network/react-shared'
2
-
3
- import { CollapsibleContext } from './context.ts'
4
-
5
- export const useCollapsible = () => useContextEx(CollapsibleContext, 'Collapsible', false)
@@ -1 +0,0 @@
1
- export * from './Collapsible/index.ts'