Skip to content

Commit ec2dca2

Browse files
feat: update to @ui5/webcomponents ~1.14.0 (#4667)
Co-authored-by: Lukas Harbarth <[email protected]>
1 parent 378e0ed commit ec2dca2

File tree

30 files changed

+227
-103
lines changed

30 files changed

+227
-103
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
"@storybook/react": "7.0.18",
3636
"@storybook/react-vite": "7.0.18",
3737
"@storybook/theming": "7.0.18",
38-
"@ui5/webcomponents": "1.13.3",
39-
"@ui5/webcomponents-fiori": "1.13.3",
40-
"@ui5/webcomponents-icons": "1.13.3",
38+
"@ui5/webcomponents": "1.14.0",
39+
"@ui5/webcomponents-fiori": "1.14.0",
40+
"@ui5/webcomponents-icons": "1.14.0",
4141
"react": "18.2.0",
4242
"react-dom": "18.2.0",
4343
"remark-gfm": "^3.0.1",
@@ -57,7 +57,7 @@
5757
"@types/react-dom": "^18.0.0",
5858
"@typescript-eslint/eslint-plugin": "^5.54.1",
5959
"@typescript-eslint/parser": "^5.54.1",
60-
"@ui5/webcomponents-tools": "1.13.1",
60+
"@ui5/webcomponents-tools": "1.14.0",
6161
"@vitejs/plugin-react": "^4.0.0",
6262
"chromatic": "^6.5.3",
6363
"cypress": "^12.1.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": "~1.13.0",
33+
"@ui5/webcomponents-base": "~1.14.0",
3434
"react": "^16.14.0 || ^17.0.0 || ^18.0.0"
3535
},
3636
"peerDependenciesMeta": {

packages/charts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"recharts": "2.6.2"
3535
},
3636
"peerDependencies": {
37-
"@ui5/webcomponents-react": "~1.15.0",
38-
"@ui5/webcomponents-react-base": "~1.15.0",
37+
"@ui5/webcomponents-react": "~1.16.0",
38+
"@ui5/webcomponents-react-base": "~1.16.0",
3939
"react": "^16.14.0 || ^17.0.0 || ^18.0.0",
4040
"react-jss": "^10.10.0"
4141
},

packages/cra-template-seed/template.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"package": {
33
"dependencies": {
4-
"@ui5/webcomponents": "~1.13.0",
5-
"@ui5/webcomponents-fiori": "~1.13.0",
6-
"@ui5/webcomponents-icons": "~1.13.0",
4+
"@ui5/webcomponents": "~1.14.0",
5+
"@ui5/webcomponents-fiori": "~1.14.0",
6+
"@ui5/webcomponents-icons": "~1.14.0",
77
"@ui5/webcomponents-react": "latest",
88
"axios": "^0.27.2",
99
"formik": "^2.2.9",

packages/cra-template/template.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"package": {
33
"dependencies": {
4-
"@ui5/webcomponents": "~1.13.0",
5-
"@ui5/webcomponents-fiori": "~1.13.0",
6-
"@ui5/webcomponents-icons": "~1.13.0",
4+
"@ui5/webcomponents": "~1.14.0",
5+
"@ui5/webcomponents-fiori": "~1.14.0",
6+
"@ui5/webcomponents-icons": "~1.14.0",
77
"@ui5/webcomponents-react": "latest",
88
"web-vitals": "^2.1.0"
99
},

packages/main/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
"peerDependencies": {
5959
"@types/react": "*",
6060
"@types/react-dom": "*",
61-
"@ui5/webcomponents": "~1.13.0",
62-
"@ui5/webcomponents-base": "~1.13.0",
63-
"@ui5/webcomponents-fiori": "~1.13.0",
64-
"@ui5/webcomponents-icons": "~1.13.0",
61+
"@ui5/webcomponents": "~1.14.0",
62+
"@ui5/webcomponents-base": "~1.14.0",
63+
"@ui5/webcomponents-fiori": "~1.14.0",
64+
"@ui5/webcomponents-icons": "~1.14.0",
6565
"react": "^16.14.0 || ^17.0.0 || ^18.0.0",
6666
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0"
6767
},

packages/main/src/components/DynamicPageAnchorBar/index.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import iconArrowUp from '@ui5/webcomponents-icons/dist/slim-arrow-up.js';
66
import { enrichEventWithDetails, ThemingParameters, useI18nBundle } from '@ui5/webcomponents-react-base';
77
import { clsx } from 'clsx';
88
import React, { forwardRef, useCallback, useEffect, useRef } from 'react';
9+
import type { CSSProperties } from 'react';
910
import { createUseStyles } from 'react-jss';
1011
import { COLLAPSE_HEADER, EXPAND_HEADER, PIN_HEADER, UNPIN_HEADER } from '../../i18n/i18n-defaults.js';
1112
import type { CommonProps } from '../../interfaces/index.js';
@@ -32,8 +33,6 @@ const anchorBarStyles = {
3233
}
3334
},
3435
anchorBarActionButton: {
35-
'--_ui5_button_base_min_width': '1.5rem',
36-
'--_ui5_button_base_height': '1.5rem',
3736
'--ui5wcr_anchor-btn-center': `calc((var(--_ui5_button_base_min_width) - var(--sapButton_BorderWidth)) / 2)`,
3837
position: 'absolute',
3938
insetBlockStart: `calc(-1 * var(--ui5wcr_anchor-btn-center))`,
@@ -101,6 +100,11 @@ interface DynamicPageAnchorBarPropTypes extends CommonProps {
101100
onPinnedStateChange?: (pinned: boolean) => void;
102101
}
103102

103+
const anchorButtonVariables = {
104+
'--_ui5_button_base_min_width': '1.5rem',
105+
'--_ui5_button_base_height': '1.5rem'
106+
} as CSSProperties;
107+
104108
/**
105109
* The dynamic page anchor bar contains the expand/collapse (expands or collapses the header content)
106110
* and pin button (pins the content header).
@@ -161,6 +165,7 @@ const DynamicPageAnchorBar = forwardRef<HTMLElement, DynamicPageAnchorBarPropTyp
161165
classes.anchorBarActionButtonExpandable,
162166
showBothActions && classes.anchorBarActionPinnableAndExpandable
163167
)}
168+
style={anchorButtonVariables}
164169
onClick={onToggleHeaderButtonClick}
165170
onMouseOver={onHoverToggleButton}
166171
onMouseLeave={onHoverToggleButton}
@@ -174,6 +179,7 @@ const DynamicPageAnchorBar = forwardRef<HTMLElement, DynamicPageAnchorBarPropTyp
174179
icon={iconPushPin}
175180
data-ui5wcr-dynamic-page-header-action=""
176181
className={clsx(classes.anchorBarActionButton, classes.anchorBarActionButtonPinnable)}
182+
style={anchorButtonVariables}
177183
pressed={headerPinned}
178184
onClick={onPinHeader}
179185
tooltip={i18nBundle.getText(headerPinned ? UNPIN_HEADER : PIN_HEADER)}

packages/main/src/components/FilterBar/FilterBarDialog.jss.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ const styles = {
1111
textAlign: 'center'
1212
}
1313
},
14-
table: {
15-
'--_ui5_input_width': '100%'
16-
},
1714
groupPanel: {
1815
'&::part(content)': {
1916
padding: 0

packages/main/src/components/FilterBar/FilterDialog.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ export const FilterDialog = (props: FilterDialogPropTypes) => {
352352
key={`${item === 'default' ? basicText : item}${index}`}
353353
>
354354
<Table
355-
className={classes.table}
356355
mode={TableMode.MultiSelect}
357356
data-component-name="FilterBarDialogPanelTable"
358357
onSelectionChange={handleCheckBoxChange}
@@ -470,7 +469,6 @@ export const FilterDialog = (props: FilterDialogPropTypes) => {
470469
<Table
471470
data-component-name="FilterBarDialogTable"
472471
hideNoData={!isListView}
473-
className={classes.table}
474472
mode={TableMode.MultiSelect}
475473
onSelectionChange={handleCheckBoxChange}
476474
columns={

packages/main/src/components/FilterGroupItem/FilterGroupItem.jss.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ const styles = {
5050
flexGrow: 1,
5151
color: ThemingParameters.sapNeutralColor,
5252
transform: 'scale(-50%)'
53+
},
54+
labelContainer: {
55+
'& :not(:first-child)': {
56+
width: '100%'
57+
}
5358
}
5459
};
5560

packages/main/src/components/FilterGroupItem/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const FilterGroupItem = forwardRef<HTMLDivElement, FilterGroupItemPropTyp
113113
data-component-name="FilterBarDialogTableRow"
114114
>
115115
<TableCell>
116-
<FlexBox direction={FlexBoxDirection.Column}>
116+
<FlexBox direction={FlexBoxDirection.Column} className={classes.labelContainer}>
117117
<Label
118118
className={classes.dialogCellLabel}
119119
title={labelTooltip ?? label}

packages/main/src/components/VariantManagement/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ const styles = {
220220
}
221221
},
222222
inputIcon: { cursor: 'pointer', color: ThemingParameters.sapContent_IconColor },
223-
searchInput: { padding: '0.25rem 1rem' },
223+
searchInputContainer: { padding: '0.25rem 1rem' },
224+
searchInput: { width: '100%' },
224225
popover: {
225226
minWidth: '25rem',
226227
'&::part(content), &::part(footer)': {
@@ -539,8 +540,9 @@ const VariantManagement = forwardRef<HTMLDivElement, VariantManagementPropTypes>
539540
mode={ListMode.SingleSelect}
540541
header={
541542
showInput ? (
542-
<div className={classes.searchInput} tabIndex={-1}>
543+
<div className={classes.searchInputContainer} tabIndex={-1}>
543544
<Input
545+
className={classes.searchInput}
544546
accessibleName={a11ySearchText}
545547
value={searchValue}
546548
placeholder={searchText}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Generated file - do not change manually!
2+
3+
import BackgroundDesign from '@ui5/webcomponents/dist/types/BackgroundDesign.js';
4+
5+
export { BackgroundDesign };
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Generated file - do not change manually!
2+
3+
import BorderDesign from '@ui5/webcomponents/dist/types/BorderDesign.js';
4+
5+
export { BorderDesign };
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Generated file - do not change manually!
2+
3+
import SegmentedButtonMode from '@ui5/webcomponents/dist/types/SegmentedButtonMode.js';
4+
5+
export { SegmentedButtonMode };
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Generated file - do not change manually!
2+
3+
import WizardContentLayout from '@ui5/webcomponents-fiori/dist/types/WizardContentLayout.js';
4+
5+
export { WizardContentLayout };

packages/main/src/enums/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export * from './AvatarColorScheme.js';
1010
export * from './AvatarGroupType.js';
1111
export * from './AvatarShape.js';
1212
export * from './AvatarSize.js';
13+
export * from './BackgroundDesign.js';
1314
export * from './BarDesign.js';
15+
export * from './BorderDesign.js';
1416
export * from './BreadcrumbsDesign.js';
1517
export * from './BreadcrumbsSeparatorStyle.js';
1618
export * from './BusyIndicatorSize.js';
@@ -57,6 +59,7 @@ export * from './PopoverPlacementType.js';
5759
export * from './PopoverVerticalAlign.js';
5860
export * from './PopupAccessibleRole.js';
5961
export * from './Priority.js';
62+
export * from './SegmentedButtonMode.js';
6063
export * from './SemanticColor.js';
6164
export * from './SideContentFallDown.js';
6265
export * from './SideContentPosition.js';
@@ -88,4 +91,5 @@ export * from './ValueColor.js';
8891
export * from './ValueState.js';
8992
export * from './VerticalAlign.js';
9093
export * from './ViewSettingsDialogMode.js';
94+
export * from './WizardContentLayout.js';
9195
export * from './WrappingType.js';

packages/main/src/webComponents/CardHeader/CardHeaderDescription.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In case you enable `interactive` property, you can press the `CardHeader` by Spa
99
### CSS Shadow Parts
1010

1111
<ui5-link target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/::part">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.
12-
The `Card` exposes the following CSS Shadow Parts:
12+
The `CardHeader` exposes the following CSS Shadow Parts:
1313

1414
- root - Used to style the root DOM element of the CardHeader
1515
- title - Used to style the title of the CardHeader

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

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
import '@ui5/webcomponents/dist/Carousel.js';
44
import type { ReactNode } from 'react';
5-
import { CarouselArrowsPlacement, CarouselPageIndicatorStyle } from '../../enums/index.js';
5+
import {
6+
CarouselArrowsPlacement,
7+
BackgroundDesign,
8+
BorderDesign,
9+
CarouselPageIndicatorStyle
10+
} from '../../enums/index.js';
611
import type { Ui5CustomEvent, CommonProps, Ui5DomRef } from '../../interfaces/index.js';
712
import { withWebComponent } from '../../internal/withWebComponent.js';
813

@@ -20,6 +25,10 @@ interface CarouselAttributes {
2025
* When set to "Navigation", the arrows are placed on the sides of the page indicator.
2126
*/
2227
arrowsPlacement?: CarouselArrowsPlacement | keyof typeof CarouselArrowsPlacement;
28+
/**
29+
* Defines the carousel's background design.
30+
*/
31+
backgroundDesign?: BackgroundDesign | keyof typeof BackgroundDesign;
2332
/**
2433
* Defines whether the carousel should loop, i.e show the first page after the last page is reached and vice versa.
2534
*/
@@ -46,6 +55,14 @@ interface CarouselAttributes {
4655
* Defines the number of items per page on small size (up to 640px). One item per page shown by default.
4756
*/
4857
itemsPerPageS?: number;
58+
/**
59+
* Defines the page indicator background design.
60+
*/
61+
pageIndicatorBackgroundDesign?: BackgroundDesign | keyof typeof BackgroundDesign;
62+
/**
63+
* Defines the page indicator border design.
64+
*/
65+
pageIndicatorBorderDesign?: BorderDesign | keyof typeof BorderDesign;
4966
/**
5067
* Defines the style of the page indicator. Available options are:
5168
*
@@ -87,7 +104,16 @@ export interface CarouselPropTypes extends CarouselAttributes, CommonProps {
87104
*/
88105
const Carousel = withWebComponent<CarouselPropTypes, CarouselDomRef>(
89106
'ui5-carousel',
90-
['arrowsPlacement', 'itemsPerPageL', 'itemsPerPageM', 'itemsPerPageS', 'pageIndicatorStyle'],
107+
[
108+
'arrowsPlacement',
109+
'backgroundDesign',
110+
'itemsPerPageL',
111+
'itemsPerPageM',
112+
'itemsPerPageS',
113+
'pageIndicatorBackgroundDesign',
114+
'pageIndicatorBorderDesign',
115+
'pageIndicatorStyle'
116+
],
91117
['cyclic', 'hideNavigationArrows', 'hidePageIndicator'],
92118
[],
93119
['navigate'],
@@ -98,9 +124,12 @@ Carousel.displayName = 'Carousel';
98124

99125
Carousel.defaultProps = {
100126
arrowsPlacement: CarouselArrowsPlacement.Content,
127+
backgroundDesign: BackgroundDesign.Translucent,
101128
itemsPerPageL: 1,
102129
itemsPerPageM: 1,
103130
itemsPerPageS: 1,
131+
pageIndicatorBackgroundDesign: BackgroundDesign.Solid,
132+
pageIndicatorBorderDesign: BorderDesign.Solid,
104133
pageIndicatorStyle: CarouselPageIndicatorStyle.Default
105134
};
106135

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import '@ui5/webcomponents/dist/ComboBox.js';
44
import type { ReactNode } from 'react';
5-
import { ValueState } from '../../enums/index.js';
5+
import { ComboBoxFilter, ValueState } from '../../enums/index.js';
66
import type { Ui5CustomEvent, CommonProps, Ui5DomRef } from '../../interfaces/index.js';
77
import { withWebComponent } from '../../internal/withWebComponent.js';
88
import type { UI5WCSlotsNode } from '../../types/index.js';
@@ -25,7 +25,7 @@ interface ComboBoxAttributes {
2525
/**
2626
* Defines the filter type of the component. Available options are: `StartsWithPerTerm`, `StartsWith`, `Contains` and `None`.
2727
*/
28-
filter?: string;
28+
filter?: ComboBoxFilter | keyof typeof ComboBoxFilter;
2929
/**
3030
* Indicates whether a loading indicator should be shown in the picker.
3131
*/
@@ -129,7 +129,7 @@ const ComboBox = withWebComponent<ComboBoxPropTypes, ComboBoxDomRef>(
129129
ComboBox.displayName = 'ComboBox';
130130

131131
ComboBox.defaultProps = {
132-
filter: 'StartsWithPerTerm',
132+
filter: ComboBoxFilter.StartsWithPerTerm,
133133
valueState: ValueState.None
134134
};
135135

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ export interface LabelPropTypes extends LabelAttributes, CommonProps {
4545
}
4646

4747
/**
48-
* The `Label` is a component used to represent a label, providing valuable information to the user. Usually it is placed next to a value holder, such as a text field. It informs the user about what data is displayed or expected in the value holder.
48+
* The `Label` is a component used to represent a label for elements like input, textarea, select.
49+
*
50+
* The `for` property of the `Label` must be the same as the id attribute of the related input element.
51+
*
52+
* Screen readers read out the label, when the user focuses the labelled control.
4953
*
5054
* The `Label` appearance can be influenced by properties, such as `required` and `wrappingType`. The appearance of the Label can be configured in a limited way by using the design property. For a broader choice of designs, you can use custom styles.
5155
*

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ export interface MenuPropTypes extends MenuAttributes, CommonProps {
6464
*/
6565
onBeforeClose?: (event: Ui5CustomEvent<MenuDomRef, { escPressed: boolean }>) => void;
6666
/**
67-
* Fired before the menu is opened. This event can be cancelled, which will prevent the menu from opening. **This event does not bubble.**
67+
* Fired before the menu is opened. This event can be cancelled, which will prevent the menu from opening. **This event does not bubble.** **Note:** Since 1.14.0 the event is also fired before a sub-menu opens.
6868
*/
69-
onBeforeOpen?: (event: Ui5CustomEvent<MenuDomRef>) => void;
69+
onBeforeOpen?: (event: Ui5CustomEvent<MenuDomRef, { item: HTMLElement }>) => void;
7070
/**
7171
* Fired when an item is being clicked.
7272
*/
73-
onItemClick?: (event: Ui5CustomEvent<MenuDomRef, { item: Record<string, unknown>; text: string }>) => void;
73+
onItemClick?: (event: Ui5CustomEvent<MenuDomRef, { item: HTMLElement; text: string }>) => void;
7474
}
7575

7676
/**

0 commit comments

Comments
 (0)