@scality/core-ui 0.126.0 → 0.128.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.
- package/dist/components/inputv2/inputv2.d.ts.map +1 -1
- package/dist/components/inputv2/inputv2.js +8 -0
- package/dist/components/searchinput/SearchInput.component.d.ts +1 -0
- package/dist/components/searchinput/SearchInput.component.d.ts.map +1 -1
- package/dist/components/searchinput/SearchInput.component.js +2 -2
- package/dist/components/tabsv2/StyledTabs.d.ts +1 -0
- package/dist/components/tabsv2/StyledTabs.d.ts.map +1 -1
- package/dist/components/tabsv2/StyledTabs.js +8 -4
- package/dist/components/tabsv2/Tab.d.ts +1 -0
- package/dist/components/tabsv2/Tab.d.ts.map +1 -1
- package/dist/components/tabsv2/Tabsv2.component.d.ts +3 -3
- package/dist/components/tabsv2/Tabsv2.component.d.ts.map +1 -1
- package/dist/components/tabsv2/Tabsv2.component.js +6 -7
- package/dist/components/tabsv2/useScrollingTabs.d.ts +1 -1
- package/dist/components/tabsv2/useScrollingTabs.d.ts.map +1 -1
- package/dist/organisms/attachments/AttachmentTable.d.ts.map +1 -1
- package/dist/organisms/attachments/AttachmentTable.js +115 -121
- package/package.json +1 -1
- package/src/lib/components/inputv2/inputv2.tsx +8 -0
- package/src/lib/components/searchinput/SearchInput.component.tsx +3 -0
- package/src/lib/components/tabsv2/StyledTabs.ts +12 -6
- package/src/lib/components/tabsv2/Tab.ts +1 -0
- package/src/lib/components/tabsv2/Tabsv2.component.tsx +45 -36
- package/src/lib/components/tabsv2/useScrollingTabs.ts +1 -1
- package/src/lib/organisms/attachments/AttachmentTable.tsx +203 -211
- package/stories/attachment.stories.tsx +5 -1
- package/stories/tabsv2.stories.tsx +56 -40
|
@@ -5,15 +5,23 @@ import { Wrapper, Title } from './common';
|
|
|
5
5
|
import { BrowserRouter } from 'react-router-dom';
|
|
6
6
|
import { brand, spacing } from '../src/lib/style/theme';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
|
-
import { useLocation } from 'react-router';
|
|
8
|
+
import { MemoryRouter, Route, useLocation } from 'react-router';
|
|
9
|
+
|
|
9
10
|
const Content = styled.div`
|
|
10
11
|
padding: ${spacing.sp24};
|
|
11
12
|
color: ${(props) => props.theme.textPrimary};
|
|
13
|
+
height: 100%;
|
|
12
14
|
`;
|
|
13
15
|
export default {
|
|
14
16
|
title: 'Components/Navigation/Tabs',
|
|
15
17
|
component: Tabs,
|
|
16
|
-
decorators: [
|
|
18
|
+
decorators: [
|
|
19
|
+
(story) => (
|
|
20
|
+
<BrowserRouter>
|
|
21
|
+
<Wrapper style={{ minHeight: '30rem' }}>{story()}</Wrapper>
|
|
22
|
+
</BrowserRouter>
|
|
23
|
+
),
|
|
24
|
+
],
|
|
17
25
|
argTypes: {
|
|
18
26
|
activeTabSeparator: {
|
|
19
27
|
control: {
|
|
@@ -79,44 +87,52 @@ const DefaultTabsDetails = (props) => {
|
|
|
79
87
|
<Title>
|
|
80
88
|
{location.pathname} / {location.search}
|
|
81
89
|
</Title>
|
|
82
|
-
<
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
90
|
+
<MemoryRouter initialEntries={['/path?tab=group']} initialIndex={0}>
|
|
91
|
+
<Route
|
|
92
|
+
path="/:path?"
|
|
93
|
+
render={() => (
|
|
94
|
+
<Tabs {...props}>
|
|
95
|
+
<Tab path="/path" label="Users" withoutPadding>
|
|
96
|
+
<Content>Users Content</Content>
|
|
97
|
+
</Tab>
|
|
98
|
+
<Tab
|
|
99
|
+
path="/path1"
|
|
100
|
+
query={{
|
|
101
|
+
tab: 'group',
|
|
102
|
+
}}
|
|
103
|
+
label="Groups"
|
|
104
|
+
>
|
|
105
|
+
{details()}
|
|
106
|
+
</Tab>
|
|
107
|
+
<Tab
|
|
108
|
+
path="/path1"
|
|
109
|
+
query={{
|
|
110
|
+
tab: 'role',
|
|
111
|
+
}}
|
|
112
|
+
label="Roles"
|
|
113
|
+
withoutPadding
|
|
114
|
+
>
|
|
115
|
+
<Content>Roles content</Content>
|
|
116
|
+
</Tab>
|
|
117
|
+
<Tab
|
|
118
|
+
path="/path1"
|
|
119
|
+
query={{
|
|
120
|
+
tab: 'policies',
|
|
121
|
+
}}
|
|
122
|
+
label="Policies"
|
|
123
|
+
>
|
|
124
|
+
<Content>Policies content</Content>
|
|
125
|
+
</Tab>
|
|
126
|
+
<Tab path="/path4" label="Storage Location">
|
|
127
|
+
<Content>Storage Location Content</Content>
|
|
128
|
+
</Tab>
|
|
129
|
+
<Tab path="/path5" label="Properties">
|
|
130
|
+
<Content>Properties Content</Content>
|
|
131
|
+
</Tab>
|
|
132
|
+
</Tabs>
|
|
133
|
+
)}
|
|
134
|
+
/>
|
|
135
|
+
</MemoryRouter>
|
|
120
136
|
</>
|
|
121
137
|
);
|
|
122
138
|
};
|