@xqmsg/ui-core 0.18.4 → 0.18.5
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/navigation/index.d.ts +8 -7
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/toolbar/index.d.ts +0 -2
- package/dist/ui-core.cjs.development.js +1 -1
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +1 -1
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/navigation/NavigationMenu.stories.tsx +3 -3
- package/src/components/navigation/index.tsx +9 -7
- package/src/components/table/Table.stories.tsx +5 -5
- package/src/components/table/index.tsx +11 -9
- package/src/components/toolbar/index.tsx +0 -3
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@ Default.args = {
|
|
|
33
33
|
defaultSelectedMenuItem: 'Settings',
|
|
34
34
|
groupedMenuItems: [
|
|
35
35
|
{
|
|
36
|
-
|
|
36
|
+
groupSortValue: 0,
|
|
37
37
|
groupMenuItems: [
|
|
38
38
|
{
|
|
39
39
|
leftIcon: <Settings boxSize="18px" />,
|
|
@@ -47,7 +47,7 @@ Default.args = {
|
|
|
47
47
|
],
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
|
-
|
|
50
|
+
groupSortValue: 1,
|
|
51
51
|
groupHeader: 'Files',
|
|
52
52
|
groupMenuItems: [
|
|
53
53
|
{
|
|
@@ -69,7 +69,7 @@ Default.args = {
|
|
|
69
69
|
],
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
|
-
|
|
72
|
+
groupSortValue: 2,
|
|
73
73
|
groupMenuItems: [
|
|
74
74
|
{
|
|
75
75
|
leftIcon: <MicrosoftOneDrive boxSize="18px" />,
|
|
@@ -3,20 +3,22 @@ import { Box } from '@chakra-ui/react';
|
|
|
3
3
|
import { NavigationMenuHeader } from './components/header';
|
|
4
4
|
import { NavigationMenuItem } from './components/items';
|
|
5
5
|
|
|
6
|
-
export
|
|
6
|
+
export type GroupMenuItems = {
|
|
7
7
|
leftIcon: JSX.Element;
|
|
8
8
|
label: string;
|
|
9
9
|
href?: string;
|
|
10
10
|
rightIcon?: JSX.Element;
|
|
11
11
|
isExternal?: boolean;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type GroupedMenuItem = {
|
|
15
|
+
groupSortValue: number;
|
|
16
|
+
groupHeader?: string;
|
|
17
|
+
groupMenuItems: GroupMenuItems[];
|
|
18
|
+
};
|
|
13
19
|
|
|
14
20
|
export interface NavigationMenuProps {
|
|
15
|
-
groupedMenuItems:
|
|
16
|
-
groupSortValue: number;
|
|
17
|
-
groupHeader?: string;
|
|
18
|
-
groupMenuItems: GroupedMenuItems[];
|
|
19
|
-
}[];
|
|
21
|
+
groupedMenuItems: GroupedMenuItem[];
|
|
20
22
|
defaultSelectedMenuItem?: string;
|
|
21
23
|
}
|
|
22
24
|
|
|
@@ -7,10 +7,10 @@ import { useArgs } from '@storybook/addons';
|
|
|
7
7
|
|
|
8
8
|
const tableColumns = ['AppliesToTypes', 'bar'];
|
|
9
9
|
|
|
10
|
-
const tableHeaders: TableHeaders<typeof tableColumns> = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
10
|
+
// const tableHeaders: TableHeaders<typeof tableColumns> = {
|
|
11
|
+
// AppliesToTypes: <Text variant="paragraph">AppliesToTypes</Text>,
|
|
12
|
+
// bar: <Text variant="paragraph">BAR</Text>,
|
|
13
|
+
// };
|
|
14
14
|
|
|
15
15
|
const tableBody: TableBody<typeof tableColumns> = [
|
|
16
16
|
{
|
|
@@ -57,7 +57,7 @@ export const Default = Template.bind({});
|
|
|
57
57
|
|
|
58
58
|
Default.args = {
|
|
59
59
|
body: tableBody,
|
|
60
|
-
headers: tableHeaders,
|
|
60
|
+
// headers: tableHeaders,
|
|
61
61
|
columns: tableColumns,
|
|
62
62
|
loading: false,
|
|
63
63
|
};
|
|
@@ -22,7 +22,7 @@ import { EmptyTable } from './empty';
|
|
|
22
22
|
|
|
23
23
|
export interface TableProps<T extends ReadonlyTableColumns> {
|
|
24
24
|
columns: TableColumns;
|
|
25
|
-
headers
|
|
25
|
+
headers?: TableHeaders<T>;
|
|
26
26
|
body: TableBody<T>;
|
|
27
27
|
loading?: boolean;
|
|
28
28
|
loadMore?: () => void;
|
|
@@ -52,14 +52,16 @@ export function Table<T extends ReadonlyTableColumns>({
|
|
|
52
52
|
borderSpacing: '0px',
|
|
53
53
|
}}
|
|
54
54
|
>
|
|
55
|
-
|
|
56
|
-
<
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
{headers && (
|
|
56
|
+
<Thead>
|
|
57
|
+
<Tr _odd={{ bg: colors.label.primary.dark }}>
|
|
58
|
+
{columnsAsConst.map(column => (
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
<Th>{headers[column]}</Th>
|
|
61
|
+
))}
|
|
62
|
+
</Tr>
|
|
63
|
+
</Thead>
|
|
64
|
+
)}
|
|
63
65
|
<Tbody>
|
|
64
66
|
{body.map(row => (
|
|
65
67
|
<Tr>
|
|
@@ -7,9 +7,6 @@ export type ToolbarLabelAndHandler = { label: string; handler: () => void };
|
|
|
7
7
|
export interface ToolbarProps extends PropsWithChildren {
|
|
8
8
|
pageList: ToolbarLabelAndHandler[];
|
|
9
9
|
currentPage: string;
|
|
10
|
-
searchValue: string;
|
|
11
|
-
|
|
12
|
-
onChangeSearch: (value: string) => void;
|
|
13
10
|
}
|
|
14
11
|
|
|
15
12
|
/**
|