Skip to content

Commit bcfa32e

Browse files
committed
nextsjs-page: wip
1 parent 8ea2e58 commit bcfa32e

File tree

7 files changed

+111
-384
lines changed

7 files changed

+111
-384
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
.appShell {
2-
height: 100vh;
3-
width: 100vw;
4-
overflow: hidden;
2+
height: 100vh;
3+
width: 100vw;
4+
overflow: hidden;
55
}
66

77
.scrollContainer {
8-
height: calc(100vh - 3.25rem);
9-
overflow-y: auto;
10-
position: relative;
11-
}
8+
height: calc(100vh - 3.25rem);
9+
overflow-y: auto;
10+
position: relative;
11+
}

examples/nextjs-pages/components/AppShell/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import navBackIcon from '@ui5/webcomponents-icons/dist/nav-back.js';
2-
import { Button, ShellBar } from '@ui5/webcomponents-react/ssr';
2+
import { Button, ShellBar } from '@ui5/webcomponents-react';
33
import { useRouter } from 'next/router';
44
import { ReactNode } from 'react';
55
import classes from './AppShell.module.css';

examples/nextjs-pages/package-lock.json

Lines changed: 84 additions & 360 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/nextjs-pages/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12-
"@ui5/webcomponents": "1.24.8",
13-
"@ui5/webcomponents-fiori": "1.24.8",
14-
"@ui5/webcomponents-react": "1.29.8",
12+
"@ui5/webcomponents": "2.1.2",
13+
"@ui5/webcomponents-fiori": "2.1.2",
14+
"@ui5/webcomponents-base": "2.1.2",
15+
"@ui5/webcomponents-react": "2.0.1",
1516
"@types/node": "20.16.1",
1617
"@types/react": "18.3.4",
1718
"@types/react-dom": "18.3.0",

examples/nextjs-pages/pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import '@ui5/webcomponents-react/dist/Assets.js';
22
import '@ui5/webcomponents-react/styles.css';
33
import '../styles/globals.css';
4-
import { ThemeProvider } from '@ui5/webcomponents-react/ssr';
4+
import { ThemeProvider } from '@ui5/webcomponents-react';
55
import type { AppProps } from 'next/app';
66
import Head from 'next/head';
77
import { AppShell } from '../components/AppShell';

examples/nextjs-pages/pages/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
StandardListItem,
99
Title,
1010
ValueState
11-
} from '@ui5/webcomponents-react/ssr';
11+
} from '@ui5/webcomponents-react';
1212
import { GetServerSideProps } from 'next';
1313
import { useRouter } from 'next/router';
1414

@@ -30,19 +30,19 @@ export default function Home({ todos }: Props) {
3030

3131
return (
3232
<>
33-
<Page header={<Bar startContent={<Title>My Todos</Title>} />}>
33+
<Page header={<Bar startContent={<Title wrappingType="None">My Todos</Title>} />} fixedFooter>
3434
<List onItemClick={handleTodoClick}>
3535
{todos.map((todo) => {
3636
return (
37-
<StandardListItem
37+
<ListItemStandard
3838
key={todo.id}
3939
data-id={todo.id}
4040
type={ListItemType.Navigation}
4141
additionalText={`${!todo.completed ? 'Not ' : ''}Completed`}
42-
additionalTextState={todo.completed ? ValueState.Success : ValueState.None}
42+
additionalTextState={todo.completed ? ValueState.Positive : ValueState.None}
4343
>
4444
{todo.title}
45-
</StandardListItem>
45+
</ListItemStandard>
4646
);
4747
})}
4848
</List>

examples/nextjs-pages/pages/todos/[id].tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ import {
1111
MessageStripDesign,
1212
Switch,
1313
TextArea
14-
} from '@ui5/webcomponents-react/ssr';
14+
} from '@ui5/webcomponents-react';
1515
import { GetServerSideProps } from 'next';
1616

17+
import { Label } from '@ui5/webcomponents-react';
18+
1719
interface Props {
1820
todo: Todo | undefined;
1921
}
@@ -27,22 +29,22 @@ export const getServerSideProps: GetServerSideProps<Props> = async (context) =>
2729
export default function TodoDetails({ todo }: Props) {
2830
return (
2931
<>
30-
<DynamicPage showHideHeaderButton={false} headerTitle={<DynamicPageTitle header={todo?.title} />}>
32+
<DynamicPage titleArea={<DynamicPageTitle heading={todo?.title} />}>
3133
<MessageStrip design={MessageStripDesign.Information}>
3234
{`Since this is only a demo app, adjustments made here on this page won't be reflected in the todo list.`}
3335
</MessageStrip>
3436
<Form>
35-
<FormItem label={'Title'}>
37+
<FormItem labelContent={<Label wrappingType="None">Title</Label>}>
3638
<Input value={todo?.title} />
3739
</FormItem>
38-
<FormItem label={'Details'}>
39-
<TextArea value={todo?.details} growing growingMaxLines={10} />
40+
<FormItem labelContent={<Label wrappingType="None">Details</Label>}>
41+
<TextArea value={todo?.details} growing growingMaxRows={10} />
4042
</FormItem>
4143

42-
<FormItem label={'Due Date'}>
44+
<FormItem labelContent={<Label wrappingType="None">Due Date</Label>}>
4345
<DatePicker />
4446
</FormItem>
45-
<FormItem label={'Completed'}>
47+
<FormItem labelContent={<Label wrappingType="None">Completed</Label>}>
4648
<Switch checked={todo?.completed} />
4749
</FormItem>
4850
</Form>

0 commit comments

Comments
 (0)