@xyo-network/react-appbar 3.0.1 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. package/dist/browser/components/AppBar/Application.d.ts +11 -0
  2. package/dist/browser/components/AppBar/Application.d.ts.map +1 -0
  3. package/dist/browser/components/AppBar/index.d.ts +2 -0
  4. package/dist/browser/components/AppBar/index.d.ts.map +1 -0
  5. package/dist/browser/components/CollapsibleDrawer/CollapseToggle.d.ts +4 -0
  6. package/dist/browser/components/CollapsibleDrawer/CollapseToggle.d.ts.map +1 -0
  7. package/dist/browser/components/CollapsibleDrawer/CollapsibleDrawer.d.ts +5 -0
  8. package/dist/browser/components/CollapsibleDrawer/CollapsibleDrawer.d.ts.map +1 -0
  9. package/dist/browser/components/CollapsibleDrawer/index.d.ts +3 -0
  10. package/dist/browser/components/CollapsibleDrawer/index.d.ts.map +1 -0
  11. package/dist/browser/components/CollapsibleDrawer/storyExampleMenuData.d.ts +4 -0
  12. package/dist/browser/components/CollapsibleDrawer/storyExampleMenuData.d.ts.map +1 -0
  13. package/dist/browser/components/MobileSystemControls/SystemControls.d.ts +5 -0
  14. package/dist/browser/components/MobileSystemControls/SystemControls.d.ts.map +1 -0
  15. package/dist/browser/components/MobileSystemControls/SystemControlsRoot.d.ts +4 -0
  16. package/dist/browser/components/MobileSystemControls/SystemControlsRoot.d.ts.map +1 -0
  17. package/dist/browser/components/MobileSystemControls/SystemControlsType.d.ts +6 -0
  18. package/dist/browser/components/MobileSystemControls/SystemControlsType.d.ts.map +1 -0
  19. package/dist/browser/components/MobileSystemControls/SystemControlsUnstyled.d.ts +11 -0
  20. package/dist/browser/components/MobileSystemControls/SystemControlsUnstyled.d.ts.map +1 -0
  21. package/dist/browser/components/MobileSystemControls/controls/SystemControl.d.ts +11 -0
  22. package/dist/browser/components/MobileSystemControls/controls/SystemControl.d.ts.map +1 -0
  23. package/dist/browser/components/MobileSystemControls/controls/SystemControlText.d.ts +8 -0
  24. package/dist/browser/components/MobileSystemControls/controls/SystemControlText.d.ts.map +1 -0
  25. package/dist/browser/components/MobileSystemControls/controls/index.d.ts +3 -0
  26. package/dist/browser/components/MobileSystemControls/controls/index.d.ts.map +1 -0
  27. package/dist/browser/components/MobileSystemControls/index.d.ts +4 -0
  28. package/dist/browser/components/MobileSystemControls/index.d.ts.map +1 -0
  29. package/dist/browser/components/SearchBar/SearchBar.d.ts +7 -0
  30. package/dist/browser/components/SearchBar/SearchBar.d.ts.map +1 -0
  31. package/dist/browser/components/SearchBar/index.d.ts +2 -0
  32. package/dist/browser/components/SearchBar/index.d.ts.map +1 -0
  33. package/dist/browser/components/SiteMenu/Menu.d.ts +9 -0
  34. package/dist/browser/components/SiteMenu/Menu.d.ts.map +1 -0
  35. package/dist/browser/components/SiteMenu/MenuListItem/MenuListItemContainer.d.ts +11 -0
  36. package/dist/browser/components/SiteMenu/MenuListItem/MenuListItemContainer.d.ts.map +1 -0
  37. package/dist/browser/components/SiteMenu/MenuListItem/index.d.ts +2 -0
  38. package/dist/browser/components/SiteMenu/MenuListItem/index.d.ts.map +1 -0
  39. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/ListItemTooltip.d.ts +7 -0
  40. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/ListItemTooltip.d.ts.map +1 -0
  41. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/MenuIcon.d.ts +8 -0
  42. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/MenuIcon.d.ts.map +1 -0
  43. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/MenuListItem.d.ts +7 -0
  44. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/MenuListItem.d.ts.map +1 -0
  45. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/index.d.ts +4 -0
  46. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/index.d.ts.map +1 -0
  47. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/SubNavListItemCollapse.d.ts +11 -0
  48. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/SubNavListItemCollapse.d.ts.map +1 -0
  49. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/SubNavToggleIconButton.d.ts +9 -0
  50. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/SubNavToggleIconButton.d.ts.map +1 -0
  51. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/index.d.ts +3 -0
  52. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/index.d.ts.map +1 -0
  53. package/dist/browser/components/SiteMenu/MenuSection.d.ts +11 -0
  54. package/dist/browser/components/SiteMenu/MenuSection.d.ts.map +1 -0
  55. package/dist/browser/components/SiteMenu/hooks/index.d.ts +2 -0
  56. package/dist/browser/components/SiteMenu/hooks/index.d.ts.map +1 -0
  57. package/dist/browser/components/SiteMenu/hooks/useMenuItemsShared.d.ts +7 -0
  58. package/dist/browser/components/SiteMenu/hooks/useMenuItemsShared.d.ts.map +1 -0
  59. package/dist/browser/components/SiteMenu/index.d.ts +6 -0
  60. package/dist/browser/components/SiteMenu/index.d.ts.map +1 -0
  61. package/dist/browser/components/SiteMenu/lib/MenuListItemBase.d.ts +5 -0
  62. package/dist/browser/components/SiteMenu/lib/MenuListItemBase.d.ts.map +1 -0
  63. package/dist/browser/components/SiteMenu/lib/NavListItemProps.d.ts +12 -0
  64. package/dist/browser/components/SiteMenu/lib/NavListItemProps.d.ts.map +1 -0
  65. package/dist/browser/components/SiteMenu/lib/index.d.ts +3 -0
  66. package/dist/browser/components/SiteMenu/lib/index.d.ts.map +1 -0
  67. package/dist/browser/components/Toolbar/Context/ContextToolbar.d.ts +9 -0
  68. package/dist/browser/components/Toolbar/Context/ContextToolbar.d.ts.map +1 -0
  69. package/dist/browser/components/Toolbar/Context/Logo.d.ts +3 -0
  70. package/dist/browser/components/Toolbar/Context/Logo.d.ts.map +1 -0
  71. package/dist/browser/components/Toolbar/Context/LogoLinkEx.d.ts +7 -0
  72. package/dist/browser/components/Toolbar/Context/LogoLinkEx.d.ts.map +1 -0
  73. package/dist/browser/components/Toolbar/Context/index.d.ts +2 -0
  74. package/dist/browser/components/Toolbar/Context/index.d.ts.map +1 -0
  75. package/dist/browser/components/Toolbar/System/SystemToolbar.d.ts +16 -0
  76. package/dist/browser/components/Toolbar/System/SystemToolbar.d.ts.map +1 -0
  77. package/dist/browser/components/Toolbar/System/index.d.ts +2 -0
  78. package/dist/browser/components/Toolbar/System/index.d.ts.map +1 -0
  79. package/dist/browser/components/Toolbar/index.d.ts +3 -0
  80. package/dist/browser/components/Toolbar/index.d.ts.map +1 -0
  81. package/dist/browser/components/index.d.ts +7 -0
  82. package/dist/browser/components/index.d.ts.map +1 -0
  83. package/dist/browser/contexts/Collapsible/State.d.ts +9 -0
  84. package/dist/browser/contexts/Collapsible/State.d.ts.map +1 -0
  85. package/dist/browser/contexts/Collapsible/context.d.ts +3 -0
  86. package/dist/browser/contexts/Collapsible/context.d.ts.map +1 -0
  87. package/dist/browser/contexts/Collapsible/index.d.ts +4 -0
  88. package/dist/browser/contexts/Collapsible/index.d.ts.map +1 -0
  89. package/dist/browser/contexts/Collapsible/provider.d.ts +8 -0
  90. package/dist/browser/contexts/Collapsible/provider.d.ts.map +1 -0
  91. package/dist/browser/contexts/Collapsible/use.d.ts +2 -0
  92. package/dist/browser/contexts/Collapsible/use.d.ts.map +1 -0
  93. package/dist/browser/contexts/index.d.ts +2 -0
  94. package/dist/browser/contexts/index.d.ts.map +1 -0
  95. package/dist/browser/index.d.ts +3 -116
  96. package/dist/browser/index.d.ts.map +1 -0
  97. package/dist/browser/index.mjs +5 -15
  98. package/dist/browser/index.mjs.map +1 -1
  99. package/package.json +59 -53
  100. package/src/components/AppBar/Application.stories.tsx +8 -8
  101. package/src/components/AppBar/Application.tsx +8 -4
  102. package/src/components/CollapsibleDrawer/CollapseDrawer.stories.tsx +8 -10
  103. package/src/components/CollapsibleDrawer/CollapseToggle.tsx +5 -2
  104. package/src/components/CollapsibleDrawer/CollapsibleDrawer.tsx +8 -3
  105. package/src/components/CollapsibleDrawer/storyExampleMenuData.tsx +10 -4
  106. package/src/components/MobileSystemControls/SystemControls.stories.tsx +2 -6
  107. package/src/components/MobileSystemControls/SystemControls.tsx +1 -1
  108. package/src/components/MobileSystemControls/SystemControlsRoot.tsx +4 -7
  109. package/src/components/MobileSystemControls/SystemControlsUnstyled.tsx +4 -2
  110. package/src/components/MobileSystemControls/controls/SystemControl.tsx +5 -3
  111. package/src/components/MobileSystemControls/controls/SystemControlText.tsx +2 -1
  112. package/src/components/SearchBar/SearchBar.tsx +24 -5
  113. package/src/components/SiteMenu/Menu.tsx +8 -3
  114. package/src/components/SiteMenu/MenuListItem/MenuListItemContainer.stories.tsx +7 -8
  115. package/src/components/SiteMenu/MenuListItem/MenuListItemContainer.tsx +6 -3
  116. package/src/components/SiteMenu/MenuListItem/list-item-components/ListItemTooltip.tsx +2 -1
  117. package/src/components/SiteMenu/MenuListItem/list-item-components/MenuIcon.tsx +4 -2
  118. package/src/components/SiteMenu/MenuListItem/list-item-components/MenuListItem.tsx +17 -5
  119. package/src/components/SiteMenu/MenuListItem/sub-nav/SubNavListItemCollapse.tsx +7 -4
  120. package/src/components/SiteMenu/MenuListItem/sub-nav/SubNavToggleIconButton.tsx +6 -2
  121. package/src/components/SiteMenu/MenuSection.tsx +7 -3
  122. package/src/components/SiteMenu/hooks/useMenuItemsShared.tsx +5 -5
  123. package/src/components/SiteMenu/lib/NavListItemProps.ts +3 -3
  124. package/src/components/Toolbar/Context/ContextToolbar.stories.tsx +2 -6
  125. package/src/components/Toolbar/Context/ContextToolbar.tsx +6 -3
  126. package/src/components/Toolbar/Context/LogoLinkEx.tsx +5 -2
  127. package/src/components/Toolbar/System/SystemToolbar.stories.tsx +7 -8
  128. package/src/components/Toolbar/System/SystemToolbar.tsx +8 -4
  129. package/src/contexts/Collapsible/State.ts +2 -2
  130. package/src/contexts/Collapsible/context.ts +1 -1
  131. package/src/contexts/Collapsible/provider.tsx +11 -14
  132. package/xy.config.ts +2 -4
@@ -1,5 +1,5 @@
1
- import { WithChildren } from '@xylabs/react-shared'
2
- import React, { useEffect, useState } from 'react'
1
+ import type { WithChildren } from '@xylabs/react-shared'
2
+ import React, { useState } from 'react'
3
3
 
4
4
  import { CollapsibleContext } from './context.ts'
5
5
 
@@ -8,21 +8,18 @@ export interface CollapsibleProviderProps extends WithChildren {
8
8
  defaultCollapseEnd?: boolean
9
9
  }
10
10
 
11
- export const CollapsibleProvider: React.FC<CollapsibleProviderProps> = ({ defaultCollapse = false, defaultCollapseEnd = false, children }) => {
12
- const [collapse, setCollapse] = useState(defaultCollapse)
13
- const [collapseEnd, setCollapseEnd] = useState(defaultCollapseEnd)
14
-
15
- useEffect(() => {
16
- setCollapse(defaultCollapse)
17
- }, [defaultCollapse])
18
-
19
- useEffect(() => {
20
- setCollapseEnd(defaultCollapseEnd)
21
- }, [defaultCollapseEnd])
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)
22
16
 
23
17
  return (
24
18
  // eslint-disable-next-line @eslint-react/no-unstable-context-value
25
- <CollapsibleContext.Provider value={{ collapse, collapseEnd, provided: true, setCollapse, setCollapseEnd }}>
19
+ <CollapsibleContext.Provider value={{
20
+ collapse, collapseEnd, provided: true, setCollapse, setCollapseEnd,
21
+ }}
22
+ >
26
23
  {children}
27
24
  </CollapsibleContext.Provider>
28
25
  )
package/xy.config.ts CHANGED
@@ -1,9 +1,7 @@
1
- import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
1
+ import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
2
  const config: XyTsupConfig = {
3
3
  compile: {
4
- browser: {
5
- src: true,
6
- },
4
+ browser: { src: true },
7
5
  node: {},
8
6
  neutral: {},
9
7
  },