Skip to content

Commit 7a27b7f

Browse files
feat: update to UI5 Web Components 2.0 RC (#5861)
BREAKING CHANGE: updated UI5 Web Components to v2. All [breaking changes](https://sap.github.io/ui5-webcomponents/nightly/docs/Migrating%20to%20version%202.0%20guide/) apply to this project as well. BREAKING CHANGE: `ActionSheet`: prop `placementType` has been renamed to `placement`, `onAfterClose` to `onClose` and `onAfterOpen` to `onOpen` BREAKING CHANGE: the `Badge` component has been renamed to `Tag` BREAKING CHANGE: the `ComboBoxGroupItem` component has been renamed to `ComboBoxItemGroup` BREAKING CHANGE: the `GroupHeaderListItem` component has been renamed to `ListItemGroup` BREAKING CHANGE: the `NotificationAction` component has been removed. You can use the `Menu` component instead. BREAKING CHANGE: the `SelectMenu` and `SelectMenuOption` components have been removed. The `Select` and `Option` now allow custom content. BREAKING CHANGE: `SelectDialog`: renamed prop `mode` to `selectionMode` to be aligned with new List API, `onAfterClose` to `onClose` and `onAfterOpen` to `onOpen` --------- Co-authored-by: Lukas Harbarth <[email protected]>
1 parent 0a9fae9 commit 7a27b7f

File tree

330 files changed

+11157
-13666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

330 files changed

+11157
-13666
lines changed

.storybook/components/ArgTypesWithNote.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ArgTypes } from '@storybook/blocks';
2-
import { MessageStrip, MessageStripDesign } from '@ui5/webcomponents-react';
2+
import MessageStripDesign from '@ui5/webcomponents/dist/types/MessageStripDesign.js';
3+
import { MessageStrip } from '@ui5/webcomponents-react';
34
import { ComponentProps, ReactNode } from 'react';
45
import classes from './ArgTypesWithNote.module.css';
56

.storybook/components/ControlsWithNote.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Controls } from '@storybook/blocks';
2-
import { MessageStrip, MessageStripDesign } from '@ui5/webcomponents-react';
2+
import MessageStripDesign from '@ui5/webcomponents/dist/types/MessageStripDesign.js';
3+
import { MessageStrip } from '@ui5/webcomponents-react';
34
import { ComponentProps, ReactNode } from 'react';
45
import classes from './ControlsWithNote.module.css';
56
import { DomRefTable } from './DomRefTable';

.storybook/components/DocsHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Description, DocsContext, Subtitle, Title } from '@storybook/addon-docs';
22
import copyIcon from '@ui5/webcomponents-icons/dist/copy';
3+
import ButtonDesign from '@ui5/webcomponents/dist/types/ButtonDesign.js';
34
import {
45
Button,
5-
ButtonDesign,
66
FlexBox,
77
FlexBoxAlignItems,
88
Label,

.storybook/components/DomRefTable.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { DocsContext, Heading } from '@storybook/blocks';
2-
import { Badge, BadgeDesign, Link, MessageStrip, Popover } from '@ui5/webcomponents-react';
2+
import { Tag, Link, MessageStrip, Popover } from '@ui5/webcomponents-react';
3+
import TagDesign from '@ui5/webcomponents/dist/types/TagDesign.js';
34
import type * as CEM from '@ui5/webcomponents-tools/lib/cem/types';
45
import type { ReactNode } from 'react';
56
import { Fragment, useContext, useRef } from 'react';
@@ -99,9 +100,9 @@ export function DomRefTable() {
99100
{row.deprecated && (
100101
<>
101102
<br />
102-
<Badge
103+
<Tag
103104
className={classes.deprecationInfoBadge}
104-
design={BadgeDesign.Critical}
105+
design={TagDesign.Critical}
105106
interactive={typeof row.deprecated === 'string'}
106107
onClick={
107108
typeof row.deprecated === 'string'
@@ -113,7 +114,7 @@ export function DomRefTable() {
113114
}
114115
>
115116
deprecated
116-
</Badge>
117+
</Tag>
117118
</>
118119
)}
119120
</td>

.storybook/components/Footer.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import {
22
Button,
3-
ButtonDesign,
43
FlexBox,
54
FlexBoxAlignItems,
65
FlexBoxJustifyContent,
76
FlexBoxWrap,
87
Label,
98
Link,
10-
Popover,
11-
PopoverPlacementType,
12-
WrappingType
9+
Popover
1310
} from '@ui5/webcomponents-react';
11+
import ButtonDesign from '@ui5/webcomponents/dist/types/ButtonDesign.js';
12+
import PopoverPlacement from '@ui5/webcomponents/dist/types/PopoverPlacement.js';
13+
import WrappingType from '@ui5/webcomponents/dist/types/WrappingType.js';
1414
import { useRef } from 'react';
1515
import { createPortal } from 'react-dom';
1616
import BestRunLogo from '../../assets/SAP_Best_R_grad_blk_scrn.png';
@@ -63,7 +63,7 @@ export const Footer = ({ style }) => {
6363
<Popover
6464
headerText={'Privacy Statement'}
6565
ref={popoverRef}
66-
placementType={PopoverPlacementType.Top}
66+
placementType={PopoverPlacement.Top}
6767
data-ui5-compact-size
6868
style={{ width: '360px', maxWidth: '100%' }}
6969
>

.storybook/components/LabelWithWrapping.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Label, WrappingType } from '@ui5/webcomponents-react';
1+
import { Label } from '@ui5/webcomponents-react';
2+
import WrappingType from '@ui5/webcomponents/dist/types/WrappingType.js';
23

34
//mdx adds a paragraph to children if added inline, this component prevents that.
45
export const LabelWithWrapping = ({ children }) => {

.storybook/components/ProjectTemplate.tsx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
import TsLogo from '@sb/images/logo-ts.png';
2-
import {
3-
Avatar,
4-
Card,
5-
CardHeader,
6-
Link,
7-
LinkDesign,
8-
MessageStrip,
9-
MessageStripDesign,
10-
Text,
11-
ThemeProvider
12-
} from '@ui5/webcomponents-react';
2+
import LinkDesign from '@ui5/webcomponents/dist/types/LinkDesign.js';
3+
import MessageStripDesign from '@ui5/webcomponents/dist/types/MessageStripDesign.js';
4+
import { Avatar, Card, CardHeader, Link, MessageStrip, Text, ThemeProvider } from '@ui5/webcomponents-react';
135
import { clsx } from 'clsx';
146
import { ReactNode } from 'react';
157
import { addCustomCSSWithScoping } from '../../packages/main/src/internal/addCustomCSSWithScoping';
@@ -79,7 +71,7 @@ export function ProjectTemplate(props: ProjectTemplatePropTypes) {
7971
{deprecationNotice && (
8072
<MessageStrip
8173
hideCloseButton
82-
design={MessageStripDesign.Warning}
74+
design={MessageStripDesign.Critical}
8375
children={deprecationNotice}
8476
className={classes.deprecationNotice}
8577
/>

0 commit comments

Comments
 (0)