Skip to content

Commit 60907b4

Browse files
feat: update to @ui5/webcomonents 2.0.0-rc.6 (#5940)
BREAKING CHANGE: the `StandardListItem` has been replaced with the `ListItemStandard` component BREAKING CHANGE: the `CustomListItem` has been replaced with the `ListItemCustom` component BREAKING CHANGE: the `MultiComboBoxGroupItem` has been replaced with the `MultiComboBoxItemGroup` component BREAKING CHANGE: the `TableGroupRow` component has been deleted BREAKING CHANGE: the `TableColumn` component has been replaced with the `TableHeaderCell` component BREAKING CHANGE: **VariantManagement**: the `portalContainer` prop has been removed as it is no longer needed. --------- Co-authored-by: Lukas Harbarth <[email protected]>
1 parent 3d4cb44 commit 60907b4

File tree

77 files changed

+9395
-7658
lines changed

Some content is hidden

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

77 files changed

+9395
-7658
lines changed

.storybook/components/ProductsTable.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import {
44
Label,
55
Table,
66
TableCell,
7-
TableColumn,
7+
TableHeaderCell,
8+
TableHeaderRow,
89
TableRow,
910
Text
1011
} from '@ui5/webcomponents-react';
@@ -13,13 +14,13 @@ import { ProductCollection } from './products.json';
1314
export const ProductsTable = () => {
1415
return (
1516
<Table
16-
columns={
17-
<>
18-
<TableColumn>Product</TableColumn>
19-
<TableColumn>Supplier</TableColumn>
20-
<TableColumn>Dimensions</TableColumn>
21-
<TableColumn>Price</TableColumn>
22-
</>
17+
headerRow={
18+
<TableHeaderRow>
19+
<TableHeaderCell>Product</TableHeaderCell>
20+
<TableHeaderCell>Supplier</TableHeaderCell>
21+
<TableHeaderCell>Dimensions</TableHeaderCell>
22+
<TableHeaderCell>Price</TableHeaderCell>
23+
</TableHeaderRow>
2324
}
2425
>
2526
{ProductCollection.map((product) => {

.storybook/custom-element-manifests/fiori.json

Lines changed: 266 additions & 24 deletions
Large diffs are not rendered by default.

.storybook/custom-element-manifests/main.json

Lines changed: 7862 additions & 6598 deletions
Large diffs are not rendered by default.

.storybook/utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ export function useGetCem() {
4747
}
4848
}
4949
const replaceSubComps = {
50-
ListItemBase: ['StandardListItem', 'CustomListItem', 'ListItemGroup'],
50+
ListItemBase: ['ListItemStandard', 'ListItemCustom', 'ListItemGroup'],
5151
InputSuggestionItem: ['SuggestionItem', 'SuggestionGroupItem'],
5252
NotificationListItemBase: ['NotificationListItem'],
5353
ToolbarItem: ['ToolbarSeparatorV2', 'ToolbarSpacerV2', 'ToolbarButton', 'ToolbarSelect', 'ToolbarSelectOption'],
5454
TreeItemBase: ['TreeItem', 'TreeItemCustom'],
55-
AvatarGroupItem: ['Avatar']
55+
AvatarGroupItem: ['Avatar'],
56+
TableFeature: ['TableGrowing', 'TableSelection']
5657
};
5758

5859
function findSubComponentsRecursively(moduleName: string, cem: any): string[] {

docs/knowledge-base/ChangeEvents.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ const onSelectionChange = (event) => {
4646
};
4747

4848
<List mode={ListSelectionMode.MultiSelect} onSelectionChange={onSelectionChange}>
49-
<StandardListItem additionalText="3" data-custom="custom value of list item 1">
49+
<ListItemStandard additionalText="3" data-custom="custom value of list item 1">
5050
List Item 1
51-
</StandardListItem>
52-
<StandardListItem additionalText="2" data-custom="custom value of list item 2">
51+
</ListItemStandard>
52+
<ListItemStandard additionalText="2" data-custom="custom value of list item 2">
5353
List Item 2
54-
</StandardListItem>
55-
<StandardListItem additionalText="1" data-custom="custom value of list item 3">
54+
</ListItemStandard>
55+
<ListItemStandard additionalText="1" data-custom="custom value of list item 3">
5656
List Item 3
57-
</StandardListItem>
57+
</ListItemStandard>
5858
</List>;
5959
```
6060

docs/knowledge-base/Styling.mdx

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import { Footer, TableOfContent } from '@sb/components';
12
import { Meta } from '@storybook/addon-docs';
3+
import { MessageStrip, ThemeProvider } from '@ui5/webcomponents-react';
24
import MessageStripDesign from '@ui5/webcomponents/dist/types/MessageStripDesign.js';
5+
import { CssPartsExample } from '../styling/CssPartsExample';
36
import { MyCustomElement } from '../styling/MyCustomElement';
4-
import { TableShadowRootExample } from '../styling/TableShadowRootExample';
5-
import { MessageStrip, ThemeProvider } from '@ui5/webcomponents-react';
6-
import { Footer, TableOfContent } from '@sb/components';
77

88
<Meta title="Styling" />
99

@@ -137,58 +137,48 @@ With the help of this attribute it's possible styling the respective element, by
137137

138138
### Example
139139

140-
<TableShadowRootExample />
140+
<CssPartsExample />
141141

142142
<br />
143143
<br />
144144

145145
<details>
146146

147+
{' '}
148+
147149
<summary>Show Code</summary>
148150

149151
```css
150-
.thGreen::part(column) {
152+
.card::part(root) {
151153
background-color: lightgreen;
152154
}
153-
.trBlue::part(row) {
154-
background-color: lightblue;
155+
.card::part(content) {
156+
transform: rotate(180deg);
155157
}
156158
```
157159

158160
```jsx
159-
const TableComponent = () => {
161+
function MyComponent() {
160162
return (
161-
<Table
162-
columns={
163-
<>
164-
<TableColumn className="thGreen">
165-
<Label>Product</Label>
166-
</TableColumn>
167-
<TableColumn>
168-
<Label>Price</Label>
169-
</TableColumn>
170-
</>
163+
<Card
164+
header={
165+
<CardHeader
166+
additionalText="3 of 5"
167+
avatar={<Icon name="person-placeholder" />}
168+
subtitleText="Direct Reports"
169+
titleText="TeamSpace"
170+
/>
171171
}
172+
className="card"
172173
>
173-
<TableRow className="trBlue">
174-
<TableCell>
175-
<Label>Notebook Basic</Label>
176-
</TableCell>
177-
<TableCell>
178-
<Label>956EUR</Label>
179-
</TableCell>
180-
</TableRow>
181-
<TableRow>
182-
<TableCell>
183-
<Label>Notebook Basic 17HT-1001</Label>
184-
</TableCell>
185-
<TableCell>
186-
<Label>1249EUR</Label>
187-
</TableCell>
188-
</TableRow>
189-
</Table>
174+
<List>
175+
<ListItemStandard description="Software Architect">Richard Wilson</ListItemStandard>
176+
<ListItemStandard description="Visual Designer">Elena Petrova</ListItemStandard>
177+
<ListItemStandard description="Quality Specialist">John Miller</ListItemStandard>
178+
</List>
179+
</Card>
190180
);
191-
};
181+
}
192182
```
193183

194184
</details>

docs/styling/CssPartsExample.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.card::part(root) {
2+
background-color: lightgreen;
3+
}
4+
.card::part(content) {
5+
transform: rotate(180deg);
6+
}

docs/styling/CssPartsExample.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { composeStories } from '@storybook/react';
2+
import * as CardStories from '../../packages/main/src/webComponents/Card/Card.stories.js';
3+
import './CssPartsExample.css';
4+
5+
const { Default: CardComponent } = composeStories(CardStories);
6+
7+
export const CssPartsExample = () => {
8+
return (
9+
<div>
10+
<CardComponent className="card" />
11+
</div>
12+
);
13+
};

docs/styling/TableShadowRootExample.tsx

Lines changed: 0 additions & 36 deletions
This file was deleted.

docs/styling/TableShadowRootExampleStyles.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"wrappers:main": "WITH_WEB_COMPONENT_IMPORT_PATH='../../internal/withWebComponent.js' INTERFACES_IMPORT_PATH='../../types/index.js' node packages/cli/dist/bin/index.js create-wrappers --packageName @ui5/webcomponents --out ./packages/main/src/webComponents --additionalComponentNote 'This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/)'",
2626
"wrappers:fiori": "WITH_WEB_COMPONENT_IMPORT_PATH='../../internal/withWebComponent.js' INTERFACES_IMPORT_PATH='../../types/index.js' node packages/cli/dist/bin/index.js create-wrappers --packageName @ui5/webcomponents-fiori --out ./packages/main/src/webComponents --additionalComponentNote 'This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/)'",
2727
"wrappers:compat": "node packages/cli/dist/bin/index.js create-wrappers --packageName @ui5/webcomponents-compat --out ./packages/compat/src/components --additionalComponentNote 'This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/)' && prettier --log-level silent --write ./packages/compat/src/components && eslint --ext .ts,.tsx --fix ./packages/compat/src/components/*/index.tsx",
28-
"create-webcomponents-wrapper": "yarn run build && yarn run wrappers:main && yarn run wrappers:fiori && yarn run wrappers:compat && prettier --log-level silent --write ./packages/main/src/webComponents && eslint --ext .ts,.tsx --fix ./packages/main/src/webComponents/*/index.tsx && yarn run sb:prepare-cem",
28+
"create-webcomponents-wrapper": "(cd packages/cli && tsc) && yarn run wrappers:main && yarn run wrappers:fiori && yarn run wrappers:compat && prettier --log-level silent --write ./packages/main/src/webComponents && eslint --ext .ts,.tsx --fix ./packages/main/src/webComponents/*/index.tsx && yarn run sb:prepare-cem",
2929
"chromatic": "cross-env STORYBOOK_ENV=chromatic npx chromatic --build-script-name build:storybook",
3030
"postinstall": "husky && yarn setup",
3131
"create-cypress-commands-docs": "typedoc && rimraf temp/typedoc",
@@ -40,10 +40,10 @@
4040
"@storybook/react": "8.0.10",
4141
"@storybook/react-vite": "8.0.10",
4242
"@storybook/theming": "8.0.10",
43-
"@ui5/webcomponents": "2.0.0-rc.5",
44-
"@ui5/webcomponents-compat": "2.0.0-rc.5",
45-
"@ui5/webcomponents-fiori": "2.0.0-rc.5",
46-
"@ui5/webcomponents-icons": "2.0.0-rc.5",
43+
"@ui5/webcomponents": "2.0.0-rc.6",
44+
"@ui5/webcomponents-compat": "2.0.0-rc.6",
45+
"@ui5/webcomponents-fiori": "2.0.0-rc.6",
46+
"@ui5/webcomponents-icons": "2.0.0-rc.6",
4747
"react": "19.0.0-rc-fb9a90fa48-20240614",
4848
"react-dom": "19.0.0-rc-fb9a90fa48-20240614",
4949
"remark-gfm": "^4.0.0",
@@ -65,7 +65,7 @@
6565
"@types/use-sync-external-store": "^0.0.6",
6666
"@typescript-eslint/eslint-plugin": "^7.0.0",
6767
"@typescript-eslint/parser": "^7.0.0",
68-
"@ui5/webcomponents-tools": "2.0.0-rc.5",
68+
"@ui5/webcomponents-tools": "2.0.0-rc.6",
6969
"@vitejs/plugin-react": "^4.2.0",
7070
"chromatic": "^11.0.0",
7171
"cssnano": "^7.0.0",

packages/base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"peerDependencies": {
3232
"@types/react": "*",
33-
"@ui5/webcomponents-base": "2.0.0-rc.5",
33+
"@ui5/webcomponents-base": "2.0.0-rc.6",
3434
"react": "^16.14.0 || ^17 || ^18 || ^19"
3535
},
3636
"peerDependenciesMeta": {

packages/cli/src/scripts/codemod/transforms/v2/codemodConfig.json

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"newComponent": "ComboBoxItemGroup"
8080
},
8181
"CustomListItem": {
82+
"newComponent": "ListItemCustom",
8283
"renamedEnums": {
8384
"highlight": "HighlightTypes"
8485
}
@@ -182,6 +183,17 @@
182183
"mode": "ListMode"
183184
}
184185
},
186+
"ListItemCustom": {
187+
"renamedEnums": {
188+
"highlight": "HighlightTypes"
189+
}
190+
},
191+
"ListItemStandard": {
192+
"renamedEnums": {
193+
"highlight": "HighlightTypes",
194+
"additionalTextState": "ValueState"
195+
}
196+
},
185197
"ListItemGroup": {},
186198
"MediaGallery": {},
187199
"MediaGalleryItem": {},
@@ -222,8 +234,18 @@
222234
"valueState": "ValueState"
223235
}
224236
},
225-
"MultiComboBoxGroupItem": {},
237+
"MultiComboBoxGroupItem": {
238+
"newComponent": "MultiComboBoxItemGroup",
239+
"changedProps": {
240+
"onOpenChange": "onOpen"
241+
}
242+
},
226243
"MultiComboBoxItem": {},
244+
"MultiComboBoxItemGroup": {
245+
"changedProps": {
246+
"onOpenChange": "onOpen"
247+
}
248+
},
227249
"MultiInput": {
228250
"changedProps": {
229251
"onSuggestionItemPreview": "onSelectionChange"
@@ -349,7 +371,8 @@
349371
"SideNavigationItem": {
350372
"changedProps": {
351373
"title": "tooltip"
352-
}
374+
},
375+
"removedProps": ["wholeItemToggleable"]
353376
},
354377
"SideNavigationSubItem": {
355378
"changedProps": {
@@ -363,6 +386,7 @@
363386
"removedProps": ["activeIcon"]
364387
},
365388
"StandardListItem": {
389+
"newComponent": "ListItemStandard",
366390
"renamedEnums": {
367391
"highlight": "HighlightTypes",
368392
"additionalTextState": "ValueState"
@@ -392,6 +416,37 @@
392416
"removedProps": ["fixed", "showOverflow"]
393417
},
394418
"TabSeparator": {},
419+
"Table": {
420+
"comment": "noDataText is now noData slot",
421+
"changedProps": {
422+
"busy": "loading",
423+
"columns": "headerRow"
424+
},
425+
"removedProps": [
426+
"busyDelay",
427+
"growing",
428+
"growingButtonSubtext",
429+
"growingButtonText",
430+
"mode",
431+
"hideNoData",
432+
"stickyColumnHeader",
433+
"onLoadMore",
434+
"onPopinChange",
435+
"onSelectionChange"
436+
]
437+
},
438+
"TableCell": {},
439+
"TableColumn": {
440+
"newComponent": "TableHeaderCell",
441+
"removedProps": ["demandPopin", "popinDisplay", "popinText"]
442+
},
443+
"TableRow": {
444+
"comment": "type=Interactive becomes interactive=true",
445+
"changedProps": {
446+
"type": "interactive"
447+
},
448+
"removedProps": ["navigated", "selected"]
449+
},
395450
"TextArea": {
396451
"changedProps": {
397452
"growingMaxLines": "growingMaxRows"
@@ -461,6 +516,9 @@
461516
}
462517
},
463518
"UploadCollectionItem": {},
519+
"VariantManagement": {
520+
"removedProps": ["portalContainer"]
521+
},
464522
"ViewSettingsDialog": {},
465523
"Wizard": {},
466524
"WizardStep": {}
@@ -572,5 +630,14 @@
572630
"MultiSelect": "Multiple"
573631
}
574632
},
575-
"wrappingTypeComponents": ["Badge", "CheckBox", "Label", "Link", "Title", "RadioButton", "NotificationListItem"]
633+
"wrappingTypeComponents": [
634+
"Badge",
635+
"CheckBox",
636+
"Label",
637+
"Link",
638+
"Title",
639+
"RadioButton",
640+
"NotificationListItem",
641+
"Tag"
642+
]
576643
}

0 commit comments

Comments
 (0)