Skip to content

Commit bea31ee

Browse files
feat: update @ui5/webcomponents to 1.0.0-rc.14 (#1478)
1 parent 1f1f333 commit bea31ee

12 files changed

Lines changed: 107 additions & 73 deletions

File tree

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
"@storybook/cli": "6.1.21",
3232
"@storybook/react": "6.1.21",
3333
"@storybook/theming": "6.1.21",
34-
"@ui5/webcomponents": "1.0.0-rc.13",
35-
"@ui5/webcomponents-fiori": "1.0.0-rc.13",
36-
"@ui5/webcomponents-icons": "1.0.0-rc.13",
34+
"@ui5/webcomponents": "1.0.0-rc.14",
35+
"@ui5/webcomponents-fiori": "1.0.0-rc.14",
36+
"@ui5/webcomponents-icons": "1.0.0-rc.14",
3737
"react": "17.0.2",
3838
"react-dom": "17.0.2",
3939
"react-syntax-highlighter": "^15.2.1",
@@ -63,7 +63,7 @@
6363
"@types/react-dom": "^17.0.0",
6464
"@typescript-eslint/eslint-plugin": "^4.4.0",
6565
"@typescript-eslint/parser": "^4.4.0",
66-
"@ui5/webcomponents-tools": "1.0.0-rc.13",
66+
"@ui5/webcomponents-tools": "1.0.0-rc.14",
6767
"babel-loader": "^8.1.0",
6868
"chalk": "^4.0.0",
6969
"dedent": "^0.7.0",

packages/base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"smoothscroll-polyfill": "0.4.4"
3434
},
3535
"peerDependencies": {
36-
"@ui5/webcomponents-base": "0.32.0",
36+
"@ui5/webcomponents-base": "0.34.0",
3737
"react": "^16.8.0 || ^17.0.0"
3838
},
3939
"peerDependenciesMeta": {

packages/charts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"recharts": "2.0.8"
2727
},
2828
"peerDependencies": {
29-
"@ui5/webcomponents-react": "^0.15.0",
30-
"@ui5/webcomponents-react-base": "^0.15.0",
29+
"@ui5/webcomponents-react": "^0.15.2",
30+
"@ui5/webcomponents-react-base": "^0.15.2",
3131
"react": "^16.8.0 || ^17.0.0",
3232
"react-jss": "^10.0.4"
3333
},

packages/cra-template-seed/template.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"@testing-library/jest-dom": "^5.11.4",
55
"@testing-library/react": "^11.1.0",
66
"@testing-library/user-event": "^12.1.10",
7-
"@ui5/webcomponents": "1.0.0-rc.13",
8-
"@ui5/webcomponents-fiori": "1.0.0-rc.13",
9-
"@ui5/webcomponents-icons": "1.0.0-rc.13",
10-
"@ui5/webcomponents-react": "^0.15.0",
7+
"@ui5/webcomponents": "1.0.0-rc.14",
8+
"@ui5/webcomponents-fiori": "1.0.0-rc.14",
9+
"@ui5/webcomponents-icons": "1.0.0-rc.14",
10+
"@ui5/webcomponents-react": "^0.15.2",
1111
"axios": "^0.21.1",
1212
"formik": "^2.1.7",
1313
"i18next": "^19.7.0",

packages/cra-template/template.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"package": {
33
"dependencies": {
4-
"@ui5/webcomponents": "1.0.0-rc.13",
5-
"@ui5/webcomponents-fiori": "1.0.0-rc.13",
6-
"@ui5/webcomponents-icons": "1.0.0-rc.13",
7-
"@ui5/webcomponents-react": "^0.15.0",
4+
"@ui5/webcomponents": "1.0.0-rc.14",
5+
"@ui5/webcomponents-fiori": "1.0.0-rc.14",
6+
"@ui5/webcomponents-icons": "1.0.0-rc.14",
7+
"@ui5/webcomponents-react": "^0.15.2",
88
"@testing-library/jest-dom": "^5.11.4",
99
"@testing-library/react": "^11.1.0",
1010
"@testing-library/user-event": "^12.1.10",

packages/main/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
"react-virtual": "2.6.1"
4242
},
4343
"peerDependencies": {
44-
"@ui5/webcomponents": "1.0.0-rc.13",
45-
"@ui5/webcomponents-base": "0.32.0",
46-
"@ui5/webcomponents-fiori": "1.0.0-rc.13",
47-
"@ui5/webcomponents-icons": "1.0.0-rc.13",
44+
"@ui5/webcomponents": "1.0.0-rc.14",
45+
"@ui5/webcomponents-base": "0.34.0",
46+
"@ui5/webcomponents-fiori": "1.0.0-rc.14",
47+
"@ui5/webcomponents-icons": "1.0.0-rc.14",
4848
"react": "^16.8.0 || ^17.0.0",
4949
"react-dom": "^16.8.0 || ^17.0.0"
5050
},

packages/main/src/webComponents/AvatarGroup/AvatarGroup.stories.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import { DocsCommonProps } from '@shared/stories/DocsCommonProps';
1313
argTypes={{
1414
...createSelectArgTypes({ avatarSize: AvatarSize, type: AvatarGroupType }),
1515
...DocsCommonProps,
16-
children: { control: { disable: true } }
16+
children: { control: { disable: true } },
17+
overflowButton: { control: { disable: true } }
1718
}}
1819
args={{
1920
avatarSize: AvatarSize.S,

packages/main/src/webComponents/AvatarGroup/index.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,23 @@ export interface AvatarGroupPropTypes extends Omit<WithWebComponentPropTypes, 'o
3333
* **Note:** The UX guidelines recommends using avatars with "Circle" shape. Moreover, if you use avatars with "Square" shape, there will be visual inconsistency as the built-in overflow action has "Circle" shape.
3434
*/
3535
children?: ReactNode | ReactNode[];
36+
/**
37+
* Defines the overflow button of `AvatarGroup`. **Note:** We recommend using the `Button` component.
38+
*
39+
* **Note:** If this slot is not used, the `AvatarGroup` will display the built-in overflow button.
40+
*
41+
* __Note:__ When passing a custom React component to this prop, you have to make sure your component reads the `slot` prop and appends it to the most outer element of your component.
42+
* Learn more about it [here](https://sap.github.io/ui5-webcomponents-react/?path=/docs/knowledge-base--page#adding-custom-components-to-slots).
43+
*/
44+
overflowButton?: ReactNode;
3645
/**
3746
* Fired when the `AvatarGroup` is activated either with a click/tap or by using the Enter or Space key.
3847
*/
3948
onClick?: (event: CustomEvent<{ targetRef: ReactNode; overflowButtonClicked: boolean }>) => void;
49+
/**
50+
* Fired when the count of visible `Avatar` elements in the `AvatarGroup` has changed
51+
*/
52+
onOverflow?: (event: CustomEvent) => void;
4053
}
4154

4255
/**
@@ -51,8 +64,8 @@ const AvatarGroup: FC<AvatarGroupPropTypes> = withWebComponent<AvatarGroupPropTy
5164
'ui5-avatar-group',
5265
['avatarSize', 'type'],
5366
[],
54-
[],
55-
['click']
67+
['overflowButton'],
68+
['click', 'overflow']
5669
);
5770

5871
AvatarGroup.displayName = 'AvatarGroup';

packages/main/src/webComponents/UploadCollectionItem/__snapshots__/UploadCollectionItem.test.tsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ exports[`UploadCollectionItem Basic Test (generated) 1`] = `
55
<ui5-upload-collection-item
66
actionable=""
77
progress="0"
8+
type="Active"
89
ui5-upload-collection-item=""
910
upload-state="Ready"
1011
/>

packages/main/src/webComponents/UploadCollectionItem/index.tsx

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ListItemTypes } from '@ui5/webcomponents-react/dist/ListItemTypes';
12
import { UploadState } from '@ui5/webcomponents-react/dist/UploadState';
23
import { withWebComponent, WithWebComponentPropTypes } from '@ui5/webcomponents-react/dist/withWebComponent';
34
import { FC, ReactNode } from 'react';
@@ -39,6 +40,16 @@ export interface UploadCollectionItemPropTypes extends WithWebComponentPropTypes
3940
* If set to `Uploading` or `Error`, a progress indicator showing the `progress` is displayed. Also if set to `Error`, a refresh button is shown. When this icon is pressed `onRetry` event is fired. If set to `Uploading`, a terminate button is shown. When this icon is pressed `onTerminate` event is fired.
4041
*/
4142
uploadState?: UploadState;
43+
/**
44+
* Defines the visual indication and behavior of the list items. Available options are `Active` (by default), `Inactive` and `Detail`.
45+
*
46+
* **Note:** When set to `Active`, the item will provide visual response upon press and hover, while with type `Inactive` and `Detail` - will not.
47+
*/
48+
type?: ListItemTypes;
49+
/**
50+
* Defines the selected state of the `ListItem`.
51+
*/
52+
selected?: boolean;
4253
/**
4354
* Hold the description of the `UploadCollectionItem`. Will be shown below the file name.
4455
*/
@@ -76,6 +87,10 @@ export interface UploadCollectionItemPropTypes extends WithWebComponentPropTypes
7687
* **Note:** Terminate button is displayed when `uploadState` property is set to `Uploading`.
7788
*/
7889
onTerminate?: (event: CustomEvent) => void;
90+
/**
91+
* Fired when the user clicks on the detail button when type is `Detail`.
92+
*/
93+
onDetailClick?: (event: CustomEvent) => void;
7994
}
8095

8196
/**
@@ -85,10 +100,10 @@ export interface UploadCollectionItemPropTypes extends WithWebComponentPropTypes
85100
*/
86101
const UploadCollectionItem: FC<UploadCollectionItemPropTypes> = withWebComponent<UploadCollectionItemPropTypes>(
87102
'ui5-upload-collection-item',
88-
['file', 'fileName', 'progress', 'uploadState'],
89-
['fileNameClickable', 'noDelete', 'noRetry', 'noTerminate'],
103+
['file', 'fileName', 'progress', 'uploadState', 'type'],
104+
['fileNameClickable', 'noDelete', 'noRetry', 'noTerminate', 'selected'],
90105
['thumbnail'],
91-
['file-name-click', 'rename', 'retry', 'terminate']
106+
['file-name-click', 'rename', 'retry', 'terminate', 'detail-click']
92107
);
93108

94109
UploadCollectionItem.displayName = 'UploadCollectionItem';
@@ -100,7 +115,9 @@ UploadCollectionItem.defaultProps = {
100115
noRetry: false,
101116
noTerminate: false,
102117
progress: 0,
103-
uploadState: UploadState.Ready
118+
uploadState: UploadState.Ready,
119+
type: ListItemTypes.Active,
120+
selected: false
104121
};
105122

106123
export { UploadCollectionItem };

0 commit comments

Comments
 (0)