@xyo-network/react-appbar 2.25.23 → 2.25.26
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.
- package/package.json +14 -14
- package/src/components/AppBar/Application.stories.tsx +5 -4
- package/src/components/MobileSystemControls/SystemControls.stories.tsx +5 -4
- package/src/components/Toolbar/Context/ContextToolbar.stories.tsx +1 -1
- package/src/components/Toolbar/System/SystemToolbar.stories.tsx +73 -0
package/package.json
CHANGED
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"@mui/icons-material": "^5.8.0",
|
|
16
16
|
"@mui/material": "^5.8.1",
|
|
17
17
|
"@xylabs/sdk-react": "^2.12.10",
|
|
18
|
-
"@xyo-network/core": "^2.20.
|
|
19
|
-
"@xyo-network/react-archive": "^2.25.
|
|
20
|
-
"@xyo-network/react-archivist-api": "^2.25.
|
|
21
|
-
"@xyo-network/react-auth": "^2.25.
|
|
22
|
-
"@xyo-network/react-network": "^2.25.
|
|
23
|
-
"@xyo-network/react-shared": "^2.25.
|
|
24
|
-
"@xyo-network/react-theme": "^2.25.
|
|
18
|
+
"@xyo-network/core": "^2.20.38",
|
|
19
|
+
"@xyo-network/react-archive": "^2.25.26",
|
|
20
|
+
"@xyo-network/react-archivist-api": "^2.25.26",
|
|
21
|
+
"@xyo-network/react-auth": "^2.25.26",
|
|
22
|
+
"@xyo-network/react-network": "^2.25.26",
|
|
23
|
+
"@xyo-network/react-shared": "^2.25.26",
|
|
24
|
+
"@xyo-network/react-theme": "^2.25.26",
|
|
25
25
|
"lodash": "^4.17.21",
|
|
26
26
|
"react": "^18.1.0",
|
|
27
27
|
"react-dom": "^18.1.0",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/core": "^7.18.2",
|
|
35
35
|
"@babel/preset-env": "^7.18.2",
|
|
36
|
-
"@storybook/addons": "^6.5.
|
|
37
|
-
"@storybook/api": "^6.5.
|
|
38
|
-
"@storybook/components": "^6.5.
|
|
39
|
-
"@storybook/core-events": "^6.5.
|
|
40
|
-
"@storybook/react": "^6.5.
|
|
41
|
-
"@storybook/theming": "^6.5.
|
|
36
|
+
"@storybook/addons": "^6.5.6",
|
|
37
|
+
"@storybook/api": "^6.5.6",
|
|
38
|
+
"@storybook/components": "^6.5.6",
|
|
39
|
+
"@storybook/core-events": "^6.5.6",
|
|
40
|
+
"@storybook/react": "^6.5.6",
|
|
41
|
+
"@storybook/theming": "^6.5.6",
|
|
42
42
|
"@types/lodash": "^4.14.182",
|
|
43
43
|
"@xylabs/sdk-react": "^2.12.10",
|
|
44
44
|
"@xylabs/ts-scripts": "^1.0.66",
|
|
@@ -105,6 +105,6 @@
|
|
|
105
105
|
},
|
|
106
106
|
"sideEffects": false,
|
|
107
107
|
"types": "dist/esm/index.d.ts",
|
|
108
|
-
"version": "2.25.
|
|
108
|
+
"version": "2.25.26",
|
|
109
109
|
"packageManager": "yarn@3.1.1"
|
|
110
110
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/* eslint-disable import/no-internal-modules */
|
|
1
2
|
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
2
|
-
import { ArchiveProvider, ArchivesProvider } from '@xyo-network/react-archive'
|
|
3
|
-
import { ArchivistApiProvider } from '@xyo-network/react-archivist-api'
|
|
4
|
-
import { NetworkMemoryProvider } from '@xyo-network/react-network'
|
|
5
3
|
import { BrowserRouter } from 'react-router-dom'
|
|
6
4
|
|
|
5
|
+
import { ArchiveProvider, ArchivesProvider } from '../../../../archive/src'
|
|
6
|
+
import { ArchivistApiProvider } from '../../../../archivist-api/src'
|
|
7
|
+
import { NetworkMemoryProvider } from '../../../../network/src'
|
|
7
8
|
import { SearchBar } from '../SearchBar'
|
|
8
9
|
import { SystemToolbar } from '../Toolbar'
|
|
9
10
|
import { ApplicationAppBar } from './Application'
|
|
@@ -16,7 +17,7 @@ const StorybookEntry = {
|
|
|
16
17
|
page: null,
|
|
17
18
|
},
|
|
18
19
|
},
|
|
19
|
-
title: 'AppBar/Application',
|
|
20
|
+
title: 'appbar/AppBar/Application',
|
|
20
21
|
} as ComponentMeta<typeof ApplicationAppBar>
|
|
21
22
|
|
|
22
23
|
const Template: ComponentStory<typeof ApplicationAppBar> = (args) => (
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/* eslint-disable import/no-internal-modules */
|
|
1
2
|
import { ComponentStory, Meta } from '@storybook/react'
|
|
2
|
-
import { ArchivesProvider } from '@xyo-network/react-archive'
|
|
3
|
-
import { ArchivistApiProvider } from '@xyo-network/react-archivist-api'
|
|
4
|
-
import { NetworkMemoryProvider } from '@xyo-network/react-network'
|
|
5
3
|
|
|
4
|
+
import { ArchivesProvider } from '../../../../archive/src'
|
|
5
|
+
import { ArchivistApiProvider } from '../../../../archivist-api/src'
|
|
6
|
+
import { NetworkMemoryProvider } from '../../../../network/src'
|
|
6
7
|
import { SystemControls } from './SystemControls'
|
|
7
8
|
import { SystemControlsType } from './SystemControlsType'
|
|
8
9
|
|
|
@@ -14,7 +15,7 @@ const StorybookEntry: Meta = {
|
|
|
14
15
|
page: null,
|
|
15
16
|
},
|
|
16
17
|
},
|
|
17
|
-
title: 'System/SystemControls',
|
|
18
|
+
title: 'appbar/System/SystemControls',
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
const Template: ComponentStory<typeof SystemControls> = (props) => {
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* eslint-disable import/no-internal-modules */
|
|
2
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
3
|
+
import { BrowserRouter } from 'react-router-dom'
|
|
4
|
+
|
|
5
|
+
import { WrappedAuthComponent } from '../../../../../../.storybook'
|
|
6
|
+
import { ArchiveProvider, ArchivesProvider } from '../../../../../archive/src'
|
|
7
|
+
import { ArchivistApiProvider } from '../../../../../archivist-api/src'
|
|
8
|
+
import { AuthProvider, AuthState } from '../../../../../auth/src'
|
|
9
|
+
import { NetworkMemoryProvider } from '../../../../../network/src'
|
|
10
|
+
import { SystemToolbar } from './SystemToolbar'
|
|
11
|
+
|
|
12
|
+
const StorybookEntry = {
|
|
13
|
+
argTypes: {},
|
|
14
|
+
component: SystemToolbar,
|
|
15
|
+
parameters: {
|
|
16
|
+
docs: {
|
|
17
|
+
page: null,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
title: 'appbar/Toolbar/System',
|
|
21
|
+
} as ComponentMeta<typeof SystemToolbar>
|
|
22
|
+
|
|
23
|
+
const Template: ComponentStory<typeof SystemToolbar> = (args) => (
|
|
24
|
+
<ArchivistApiProvider apiDomain="https://beta.api.archivist.xyo.network">
|
|
25
|
+
<ArchivesProvider>
|
|
26
|
+
<BrowserRouter>
|
|
27
|
+
<NetworkMemoryProvider>
|
|
28
|
+
<ArchiveProvider>
|
|
29
|
+
<SystemToolbar {...args} />
|
|
30
|
+
</ArchiveProvider>
|
|
31
|
+
</NetworkMemoryProvider>
|
|
32
|
+
</BrowserRouter>
|
|
33
|
+
</ArchivesProvider>
|
|
34
|
+
</ArchivistApiProvider>
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
const TemplateWithAuthContext: ComponentStory<WrappedAuthComponent> = ({ authState }) => (
|
|
38
|
+
<AuthProvider authState={authState as AuthState}>
|
|
39
|
+
<ArchivistApiProvider apiDomain="https://beta.api.archivist.xyo.network">
|
|
40
|
+
<ArchivesProvider>
|
|
41
|
+
<BrowserRouter>
|
|
42
|
+
<NetworkMemoryProvider>
|
|
43
|
+
<ArchiveProvider>
|
|
44
|
+
<SystemToolbar />
|
|
45
|
+
</ArchiveProvider>
|
|
46
|
+
</NetworkMemoryProvider>
|
|
47
|
+
</BrowserRouter>
|
|
48
|
+
</ArchivesProvider>
|
|
49
|
+
</ArchivistApiProvider>
|
|
50
|
+
</AuthProvider>
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
const Default = Template.bind({})
|
|
54
|
+
Default.args = {}
|
|
55
|
+
|
|
56
|
+
const WithLoggedInAccount = TemplateWithAuthContext.bind({})
|
|
57
|
+
WithLoggedInAccount.args = {
|
|
58
|
+
authState: {
|
|
59
|
+
loggedInAccount: 'none@none.com',
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const NeedsReAuth = TemplateWithAuthContext.bind({})
|
|
64
|
+
NeedsReAuth.args = {
|
|
65
|
+
authState: {
|
|
66
|
+
reAuthenticate: true,
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { Default, NeedsReAuth, WithLoggedInAccount }
|
|
71
|
+
|
|
72
|
+
// eslint-disable-next-line import/no-default-export
|
|
73
|
+
export default StorybookEntry
|