Skip to content

Commit c4fbac8

Browse files
committed
run wrapper script (main)
1 parent 305f1de commit c4fbac8

File tree

20 files changed

+1383
-124
lines changed

20 files changed

+1383
-124
lines changed

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

Lines changed: 309 additions & 62 deletions
Large diffs are not rendered by default.

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

Lines changed: 609 additions & 18 deletions
Large diffs are not rendered by default.

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,24 @@ interface AvatarGroupAttributes {
2525
*/
2626
accessibilityAttributes?: AvatarGroupAccessibilityAttributes;
2727

28+
/**
29+
* Defines the accessible name of the AvatarGroup.
30+
* When provided, this will override the default aria-label text.
31+
*
32+
* **Note:** Available since [v2.12.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.12.0) of **@ui5/webcomponents**.
33+
* @default undefined
34+
*/
35+
accessibleName?: string | undefined;
36+
37+
/**
38+
* Receives id(s) of the elements that describe the AvatarGroup.
39+
* When provided, this will be used as aria-labelledby instead of aria-label.
40+
*
41+
* **Note:** Available since [v2.12.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.12.0) of **@ui5/webcomponents**.
42+
* @default undefined
43+
*/
44+
accessibleNameRef?: string | undefined;
45+
2846
/**
2947
* Defines the mode of the `AvatarGroup`.
3048
* @default "Group"
@@ -149,7 +167,7 @@ interface AvatarGroupPropTypes
149167
*/
150168
const AvatarGroup = withWebComponent<AvatarGroupPropTypes, AvatarGroupDomRef>(
151169
'ui5-avatar-group',
152-
['accessibilityAttributes', 'type'],
170+
['accessibilityAttributes', 'accessibleName', 'accessibleNameRef', 'type'],
153171
[],
154172
['overflowButton'],
155173
['click', 'overflow'],

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,18 @@ interface CheckBoxAttributes {
102102
*/
103103
text?: string | undefined;
104104

105+
/**
106+
* Defines the form value of the component that is submitted when the checkbox is checked.
107+
*
108+
* When a form containing `CheckBox` elements is submitted, only the values of the
109+
* **checked** checkboxes are included in the form data sent to the server. Unchecked
110+
* checkboxes do not contribute any data to the form submission.
111+
*
112+
* This property is particularly useful for **checkbox groups**, where multiple checkboxes with the same `name` but different `value` properties can be used to represent a set of related options.
113+
* @default "on"
114+
*/
115+
value?: string;
116+
105117
/**
106118
* Defines the value state of the component.
107119
* @default "None"
@@ -167,7 +179,7 @@ interface CheckBoxPropTypes extends CheckBoxAttributes, Omit<CommonProps, keyof
167179
*/
168180
const CheckBox = withWebComponent<CheckBoxPropTypes, CheckBoxDomRef>(
169181
'ui5-checkbox',
170-
['accessibleName', 'accessibleNameRef', 'name', 'text', 'valueState', 'wrappingType'],
182+
['accessibleName', 'accessibleNameRef', 'name', 'text', 'value', 'valueState', 'wrappingType'],
171183
['checked', 'disabled', 'displayOnly', 'indeterminate', 'readonly', 'required'],
172184
[],
173185
['change'],

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

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ import type { CommonProps, Ui5CustomEvent, Ui5DomRef, UI5WCSlotsNode } from '@ui
99
import type { ReactNode } from 'react';
1010

1111
interface DialogAttributes {
12+
/**
13+
* Defines the accessible description of the component.
14+
*
15+
* **Note:** Available since [v2.11.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.11.0) of **@ui5/webcomponents**.
16+
* @default undefined
17+
*/
18+
accessibleDescription?: string | undefined;
19+
20+
/**
21+
* Receives id(or many ids) of the elements that describe the component.
22+
*
23+
* **Note:** Available since [v2.11.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.11.0) of **@ui5/webcomponents**.
24+
* @default undefined
25+
*/
26+
accessibleDescriptionRef?: string | undefined;
27+
1228
/**
1329
* Defines the accessible name of the component.
1430
* @default undefined
@@ -259,7 +275,16 @@ interface DialogPropTypes
259275
*/
260276
const Dialog = withWebComponent<DialogPropTypes, DialogDomRef>(
261277
'ui5-dialog',
262-
['accessibleName', 'accessibleNameRef', 'accessibleRole', 'headerText', 'initialFocus', 'state'],
278+
[
279+
'accessibleDescription',
280+
'accessibleDescriptionRef',
281+
'accessibleName',
282+
'accessibleNameRef',
283+
'accessibleRole',
284+
'headerText',
285+
'initialFocus',
286+
'state',
287+
],
263288
['draggable', 'open', 'preventFocusRestore', 'preventInitialFocus', 'resizable', 'stretch'],
264289
['footer', 'header'],
265290
['before-close', 'before-open', 'close', 'open'],

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
'use client';
22

33
import '@ui5/webcomponents/dist/DynamicDateRange.js';
4-
import type {
5-
DynamicDateRangeChangeEventDetail,
6-
DynamicDateRangeValue,
7-
} from '@ui5/webcomponents/dist/DynamicDateRange.js';
4+
import type { DynamicDateRangeValue } from '@ui5/webcomponents/dist/DynamicDateRange.js';
85
import { withWebComponent } from '@ui5/webcomponents-react-base';
96
import type { CommonProps, Ui5CustomEvent, Ui5DomRef } from '@ui5/webcomponents-react-base';
107

@@ -22,7 +19,14 @@ interface DynamicDateRangeAttributes {
2219
value?: DynamicDateRangeValue | undefined;
2320
}
2421

25-
interface DynamicDateRangeDomRef extends Required<DynamicDateRangeAttributes>, Ui5DomRef {}
22+
interface DynamicDateRangeDomRef extends Required<DynamicDateRangeAttributes>, Ui5DomRef {
23+
/**
24+
* Converts a `value` into concrete `startDate` and `endDate` JavaScript `Date` objects.
25+
* @param {DynamicDateRangeValue} value - The option to convert into an array of date ranges
26+
* @returns {Array<Date>} - An array of two `Date` objects representing the start and end dates.
27+
*/
28+
toDates: (value: DynamicDateRangeValue) => Array<Date>;
29+
}
2630

2731
interface DynamicDateRangePropTypes
2832
extends DynamicDateRangeAttributes,
@@ -36,7 +40,7 @@ interface DynamicDateRangePropTypes
3640
* | :--------: | :-----: |
3741
* | ✅|✅|
3842
*/
39-
onChange?: (event: Ui5CustomEvent<DynamicDateRangeDomRef, DynamicDateRangeChangeEventDetail>) => void;
43+
onChange?: (event: Ui5CustomEvent<DynamicDateRangeDomRef>) => void;
4044
}
4145

4246
/**
@@ -63,6 +67,8 @@ interface DynamicDateRangePropTypes
6367
*
6468
*
6569
* __Note__: This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/)
70+
*
71+
* @since [2.11.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.11.0) of __@ui5/webcomponents__.
6672
*/
6773
const DynamicDateRange = withWebComponent<DynamicDateRangePropTypes, DynamicDateRangeDomRef>(
6874
'ui5-dynamic-date-range',

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@ interface MenuPropTypes
163163
* - `Arrow Left` or `ArrowRight` - Navigate between the menu item actions and the menu item itself
164164
* - `Arrow Up` / `Arrow Down` - Navigates up and down the currently visible menu items
165165
*
166-
* Note: if the text ditrection is set to Right-to-left (RTL), `Arrow Right` and `Arrow Left` functionality is swapped.
166+
* **Note:** If the text direction is set to Right-to-left (RTL), `Arrow Right` and `Arrow Left` functionality is swapped.
167+
*
168+
* Application developers are responsible for ensuring that interactive elements placed in the `endContent` slot
169+
* have the correct accessibility behaviour, including their enabled or disabled states.
170+
* The menu does not manage these aspects when the menu item state changes.
167171
*
168172
*
169173
*

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

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,22 @@ interface MenuItemAttributes {
4949
additionalText?: string | undefined;
5050

5151
/**
52-
* Defines whether `MenuItem` is in disabled state.
52+
* Defines whether menu item is in checked state.
5353
*
54-
* **Note:** A disabled `MenuItem` is noninteractive.
54+
* **Note:** checked state is only taken into account when menu item is added to menu item group
55+
* with `checkMode` other than `None`.
56+
*
57+
* **Note:** A checked menu item has a checkmark displayed at its end.
58+
*
59+
* **Note:** Available since [v2.12.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.12.0) of **@ui5/webcomponents**.
60+
* @default false
61+
*/
62+
checked?: boolean;
63+
64+
/**
65+
* Defines whether menu item is in disabled state.
66+
*
67+
* **Note:** A disabled menu item is noninteractive.
5568
* @default false
5669
*/
5770
disabled?: boolean;
@@ -77,17 +90,17 @@ interface MenuItemAttributes {
7790
icon?: string | undefined;
7891

7992
/**
80-
* Defines the delay in milliseconds, after which the loading indicator will be displayed inside the corresponding ui5-menu popover.
93+
* Defines the delay in milliseconds, after which the loading indicator will be displayed inside the corresponding menu popover.
8194
*
82-
* **Note:** If set to `true` a `BusyIndicator` component will be displayed into the related one to the current `MenuItem` sub-menu popover.
95+
* **Note:** If set to `true` a busy indicator component will be displayed into the related one to the current menu item sub-menu popover.
8396
*
8497
* **Note:** Available since [v1.13.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v1.13.0) of **@ui5/webcomponents**.
8598
* @default false
8699
*/
87100
loading?: boolean;
88101

89102
/**
90-
* Defines the delay in milliseconds, after which the loading indicator will be displayed inside the corresponding ui5-menu popover.
103+
* Defines the delay in milliseconds, after which the loading indicator will be displayed inside the corresponding menu popover.
91104
*
92105
* **Note:** Available since [v1.13.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v1.13.0) of **@ui5/webcomponents**.
93106
* @default 1000
@@ -146,14 +159,15 @@ interface MenuItemPropTypes
146159
| 'endContent'
147160
| 'onBeforeClose'
148161
| 'onBeforeOpen'
162+
| 'onCheck'
149163
| 'onClose'
150164
| 'onDetailClick'
151165
| 'onOpen'
152166
> {
153167
/**
154168
* Defines the items of this component.
155169
*
156-
* **Note:** The slot can hold `MenuItem` and `MenuSeparator` items.
170+
* **Note:** The slot can hold menu item and menu separator items.
157171
*
158172
* If there are items added to this slot, an arrow will be displayed at the end
159173
* of the item in order to indicate that there are items added. In that case components added
@@ -191,6 +205,10 @@ interface MenuItemPropTypes
191205
* The priority of what will be displayed at the end of the menu item is as follows:
192206
* sub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`.
193207
*
208+
* Application developers are responsible for ensuring that interactive elements placed in the `endContent` slot
209+
* have the correct accessibility behaviour, including their enabled or disabled states.
210+
* The menu does not manage these aspects when the menu item state changes.
211+
*
194212
* __Note:__ The content of the prop will be rendered into a [&lt;slot&gt;](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) by assigning the respective [slot](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot) attribute (`slot="endContent"`).
195213
* Since you can't change the DOM order of slots when declaring them within a prop, it might prove beneficial to manually mount them as part of the component's children, especially when facing problems with the reading order of screen readers.
196214
*
@@ -228,6 +246,17 @@ interface MenuItemPropTypes
228246
*/
229247
onBeforeOpen?: (event: Ui5CustomEvent<MenuItemDomRef, MenuBeforeOpenEventDetail>) => void;
230248

249+
/**
250+
* Fired when an item is checked or unchecked.
251+
*
252+
* **Note:** Available since [v2.12.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.12.0) of **@ui5/webcomponents**.
253+
*
254+
* | cancelable | bubbles |
255+
* | :--------: | :-----: |
256+
* | ❌|✅|
257+
*/
258+
onCheck?: (event: Ui5CustomEvent<MenuItemDomRef>) => void;
259+
231260
/**
232261
* Fired after the menu is closed.
233262
*
@@ -287,9 +316,9 @@ const MenuItem = withWebComponent<MenuItemPropTypes, MenuItemDomRef>(
287316
'tooltip',
288317
'type',
289318
],
290-
['disabled', 'loading', 'navigated', 'selected'],
319+
['checked', 'disabled', 'loading', 'navigated', 'selected'],
291320
['deleteButton', 'endContent'],
292-
['before-close', 'before-open', 'close', 'detail-click', 'open'],
321+
['before-close', 'before-open', 'check', 'close', 'detail-click', 'open'],
293322
);
294323

295324
MenuItem.displayName = 'MenuItem';
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
'use client';
2+
3+
import '@ui5/webcomponents/dist/MenuItemGroup.js';
4+
import type MenuItemGroupCheckMode from '@ui5/webcomponents/dist/types/MenuItemGroupCheckMode.js';
5+
import { withWebComponent } from '@ui5/webcomponents-react-base';
6+
import type { CommonProps, Ui5DomRef } from '@ui5/webcomponents-react-base';
7+
import type { ReactNode } from 'react';
8+
9+
interface MenuItemGroupAttributes {
10+
/**
11+
* Defines the component's check mode.
12+
* @default "None"
13+
*/
14+
checkMode?: MenuItemGroupCheckMode | keyof typeof MenuItemGroupCheckMode;
15+
}
16+
17+
interface MenuItemGroupDomRef extends Required<MenuItemGroupAttributes>, Ui5DomRef {}
18+
19+
interface MenuItemGroupPropTypes
20+
extends MenuItemGroupAttributes,
21+
Omit<CommonProps, keyof MenuItemGroupAttributes | 'children'> {
22+
/**
23+
* Defines the items of this component.
24+
* **Note:** The slot can hold any combination of components of type `MenuItem` or `MenuSeparator` or both.
25+
*/
26+
children?: ReactNode | ReactNode[];
27+
}
28+
29+
/**
30+
* The `MenuItemGroup` component represents a group of items designed for use inside a `Menu`.
31+
* Items belonging to the same group should be wrapped by a `MenuItemGroup`.
32+
* Each group can have an `checkMode` property, which defines the check mode for the items within the group.
33+
* The possible values for `checkMode` are:
34+
* - 'None' (default) - no items can be checked
35+
* - 'Single' - Only one item can be checked at a time
36+
* - 'Multiple' - Multiple items can be checked simultaneously
37+
*
38+
* **Note:** If the `checkMode` property is set to 'Single', only one item can remain checked at any given time.
39+
* If multiple items are marked as checked, the last checked item will take precedence.
40+
*
41+
* ### Usage
42+
*
43+
* `MenuItemGroup` represents a collection of `MenuItem` components that can have the same check mode.
44+
* The items are addeed to the group's `items` slot.
45+
*
46+
*
47+
*
48+
* __Note__: This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/)
49+
*
50+
* @since [2.12.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.12.0) of __@ui5/webcomponents__.
51+
*/
52+
const MenuItemGroup = withWebComponent<MenuItemGroupPropTypes, MenuItemGroupDomRef>(
53+
'ui5-menu-item-group',
54+
['checkMode'],
55+
[],
56+
[],
57+
[],
58+
);
59+
60+
MenuItemGroup.displayName = 'MenuItemGroup';
61+
62+
export { MenuItemGroup };
63+
export type { MenuItemGroupDomRef, MenuItemGroupPropTypes };

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ import { withWebComponent } from '@ui5/webcomponents-react-base';
1111
import type { ReactNode } from 'react';
1212

1313
interface PopoverAttributes {
14+
/**
15+
* Defines the accessible description of the component.
16+
*
17+
* **Note:** Available since [v2.11.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.11.0) of **@ui5/webcomponents**.
18+
* @default undefined
19+
*/
20+
accessibleDescription?: string | undefined;
21+
22+
/**
23+
* Receives id(or many ids) of the elements that describe the component.
24+
*
25+
* **Note:** Available since [v2.11.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.11.0) of **@ui5/webcomponents**.
26+
* @default undefined
27+
*/
28+
accessibleDescriptionRef?: string | undefined;
29+
1430
/**
1531
* Defines the accessible name of the component.
1632
* @default undefined
@@ -238,6 +254,8 @@ interface PopoverPropTypes
238254
const Popover = withWebComponent<PopoverPropTypes, PopoverDomRef>(
239255
'ui5-popover',
240256
[
257+
'accessibleDescription',
258+
'accessibleDescriptionRef',
241259
'accessibleName',
242260
'accessibleNameRef',
243261
'accessibleRole',

0 commit comments

Comments
 (0)