Skip to content

Commit af55f40

Browse files
committed
run main wrapper script, add new components, adjust breaking changes
1 parent 9ecc717 commit af55f40

14 files changed

Lines changed: 1330 additions & 59 deletions

File tree

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

Lines changed: 774 additions & 9 deletions
Large diffs are not rendered by default.

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

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11181,6 +11181,15 @@
1118111181
"_ui5type": {
1118211182
"text": "Array<Node>"
1118311183
}
11184+
},
11185+
{
11186+
"name": "default",
11187+
"description": "Defines the text of the component.\n\n**Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.",
11188+
"_ui5propertyName": "text",
11189+
"_ui5type": {
11190+
"text": "Array<Node>"
11191+
},
11192+
"_ui5privacy": "public"
1118411193
}
1118511194
],
1118611195
"members": [
@@ -18482,23 +18491,17 @@
1848218491
{
1848318492
"kind": "field",
1848418493
"name": "startValue",
18485-
"type": {
18486-
"text": "number"
18487-
},
18488-
"default": "0",
1848918494
"description": "Defines start point of a selection - position of a first handle on the slider.",
18495+
"default": "0",
1849018496
"privacy": "public",
1849118497
"_ui5formProperty": true,
1849218498
"_ui5formEvents": "change,input"
1849318499
},
1849418500
{
1849518501
"kind": "field",
1849618502
"name": "endValue",
18497-
"type": {
18498-
"text": "number"
18499-
},
18500-
"default": "100",
1850118503
"description": "Defines end point of a selection - position of a second handle on the slider.",
18504+
"default": "100",
1850218505
"privacy": "public",
1850318506
"_ui5formProperty": true,
1850418507
"_ui5formEvents": "change,input"
@@ -18653,7 +18656,7 @@
1865318656
"default": "undefined",
1865418657
"fieldName": "startValue",
1865518658
"type": {
18656-
"text": "number"
18659+
"text": "any"
1865718660
}
1865818661
},
1865918662
{
@@ -18662,7 +18665,7 @@
1866218665
"default": "undefined",
1866318666
"fieldName": "endValue",
1866418667
"type": {
18665-
"text": "number"
18668+
"text": "any"
1866618669
}
1866718670
},
1866818671
{
@@ -29497,12 +29500,12 @@
2949729500
{
2949829501
"kind": "field",
2949929502
"name": "selected",
29503+
"description": "Defines the selected state of the component.",
29504+
"default": "false",
29505+
"privacy": "public",
2950029506
"type": {
2950129507
"text": "boolean"
29502-
},
29503-
"default": "false",
29504-
"description": "Defines the selected state of the component.",
29505-
"privacy": "public"
29508+
}
2950629509
}
2950729510
],
2950829511
"attributes": [
@@ -29512,7 +29515,7 @@
2951229515
"default": "false",
2951329516
"fieldName": "selected",
2951429517
"type": {
29515-
"text": "boolean"
29518+
"text": "any"
2951629519
}
2951729520
}
2951829521
],

packages/main/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,18 @@
740740
"types": "./dist/webComponents/UserSettingsAccountView/index.d.ts",
741741
"default": "./dist/webComponents/UserSettingsAccountView/index.js"
742742
},
743+
"./UserSettingsAppearanceView": {
744+
"types": "./dist/webComponents/UserSettingsAppearanceView/index.d.ts",
745+
"default": "./dist/webComponents/UserSettingsAppearanceView/index.js"
746+
},
747+
"./UserSettingsAppearanceViewGroup": {
748+
"types": "./dist/webComponents/UserSettingsAppearanceViewGroup/index.d.ts",
749+
"default": "./dist/webComponents/UserSettingsAppearanceViewGroup/index.js"
750+
},
751+
"./UserSettingsAppearanceViewItem": {
752+
"types": "./dist/webComponents/UserSettingsAppearanceViewItem/index.d.ts",
753+
"default": "./dist/webComponents/UserSettingsAppearanceViewItem/index.js"
754+
},
743755
"./UserSettingsDialog": {
744756
"types": "./dist/webComponents/UserSettingsDialog/index.d.ts",
745757
"default": "./dist/webComponents/UserSettingsDialog/index.js"

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,15 @@ interface LinkAttributes {
162162
interface LinkDomRef extends Required<LinkAttributes>, Ui5DomRef {}
163163

164164
interface LinkPropTypes extends LinkAttributes, Omit<CommonProps, keyof LinkAttributes | 'children' | 'onClick'> {
165+
/**
166+
* Defines the text of the component.
167+
*
168+
* **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.
169+
*
170+
* __Supported Node Type/s:__ `Array<Node>`
171+
*/
172+
children?: ReactNode | ReactNode[];
173+
165174
/**
166175
* Defines the text of the component.
167176
*

packages/main/src/webComponents/Search/Search.stories.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ export const WithScopeAndItems: Story = {
4141
args: {
4242
showClearIcon: true,
4343
placeholder: 'Search Apps, Products',
44+
scopeValue: 'all',
4445
scopes: (
4546
<>
46-
<SearchScope selected text="All" />
47-
<SearchScope text="Apps" />
48-
<SearchScope text="Products" />
47+
<SearchScope text="All" value="all" />
48+
<SearchScope text="Apps" value="apps" />
49+
<SearchScope text="Products" value="products" />
4950
</>
5051
),
5152
},

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ interface SearchAttributes {
4444
*/
4545
placeholder?: string | undefined;
4646

47+
/**
48+
* Defines the value of the component:
49+
*
50+
* Applications are responsible for setting the correct scope value.
51+
*
52+
* **Note:** If the given value does not match any existing scopes,
53+
* no scope will be selected and the SearchField scope component will be displayed as empty.
54+
*
55+
* **Note:** Available since [v2.18.0](https://github.com/UI5/webcomponents/releases/tag/v2.18.0) of **@ui5/webcomponents-fiori**.
56+
*/
57+
scopeValue?: string | undefined;
58+
4759
/**
4860
* Defines whether the clear icon of the search will be shown.
4961
* @default false
@@ -221,7 +233,7 @@ interface SearchPropTypes
221233
*/
222234
const Search = withWebComponent<SearchPropTypes, SearchDomRef>(
223235
'ui5-search',
224-
['accessibleDescription', 'accessibleName', 'placeholder', 'value'],
236+
['accessibleDescription', 'accessibleName', 'placeholder', 'scopeValue', 'value'],
225237
['loading', 'noTypeahead', 'open', 'showClearIcon'],
226238
['action', 'filterButton', 'illustration', 'messageArea', 'scopes'],
227239
['close', 'input', 'open', 'scope-change', 'search'],

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ import type { CommonProps, Ui5DomRef } from '@ui5/webcomponents-react-base';
66

77
interface SearchScopeAttributes {
88
/**
9-
* Indicates whether the item is selected
10-
* @default false
9+
* Defines the text of the component.
1110
*/
12-
selected?: boolean;
11+
text?: string;
1312

1413
/**
15-
* Defines the text of the component.
14+
* Defines the value of the `SearchScope`.
15+
* Used for selection in Search scopes.
16+
* @default undefined
1617
*/
17-
text?: string;
18+
value?: string | undefined;
1819
}
1920

2021
interface SearchScopeDomRef extends Required<SearchScopeAttributes>, Ui5DomRef {}
@@ -32,8 +33,8 @@ interface SearchScopePropTypes extends SearchScopeAttributes, Omit<CommonProps,
3233
*/
3334
const SearchScope = withWebComponent<SearchScopePropTypes, SearchScopeDomRef>(
3435
'ui5-search-scope',
35-
['text'],
36-
['selected'],
36+
['text', 'value'],
37+
[],
3738
[],
3839
[],
3940
);

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ interface ShellBarSearchAttributes {
5050
*/
5151
placeholder?: string | undefined;
5252

53+
/**
54+
* Defines the value of the component:
55+
*
56+
* Applications are responsible for setting the correct scope value.
57+
*
58+
* **Note:** If the given value does not match any existing scopes,
59+
* no scope will be selected and the SearchField scope component will be displayed as empty.
60+
*
61+
* **Note:** Available since [v2.18.0](https://github.com/UI5/webcomponents/releases/tag/v2.18.0) of **@ui5/webcomponents-fiori**.
62+
*/
63+
scopeValue?: string | undefined;
64+
5365
/**
5466
* Defines whether the clear icon of the search will be shown.
5567
* @default false
@@ -218,7 +230,7 @@ interface ShellBarSearchPropTypes
218230
*/
219231
const ShellBarSearch = withWebComponent<ShellBarSearchPropTypes, ShellBarSearchDomRef>(
220232
'ui5-shellbar-search',
221-
['accessibleDescription', 'accessibleName', 'placeholder', 'value'],
233+
['accessibleDescription', 'accessibleName', 'placeholder', 'scopeValue', 'value'],
222234
['autoOpen', 'loading', 'noTypeahead', 'open', 'showClearIcon'],
223235
['action', 'filterButton', 'illustration', 'messageArea', 'scopes'],
224236
['close', 'input', 'open', 'scope-change', 'search'],
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
'use client';
2+
3+
import '@ui5/webcomponents-fiori/dist/UserSettingsAppearanceView.js';
4+
import type { UserSettingsAppearanceViewItemSelectEventDetail } from '@ui5/webcomponents-fiori/dist/UserSettingsAppearanceView.js';
5+
import { withWebComponent } from '@ui5/webcomponents-react-base';
6+
import type { CommonProps, Ui5CustomEvent, Ui5DomRef, UI5WCSlotsNode } from '@ui5/webcomponents-react-base';
7+
import type { ReactNode } from 'react';
8+
9+
interface UserSettingsAppearanceViewAttributes {
10+
/**
11+
* Indicates whether the view is secondary. It is relevant only if the view is used in `pages` slot of `UserSettingsItem`
12+
* and controls the visibility of the back button.
13+
* @default false
14+
*/
15+
secondary?: boolean;
16+
17+
/**
18+
* Defines whether the view is selected. There can be just one selected view at a time.
19+
* @default false
20+
*/
21+
selected?: boolean;
22+
23+
/**
24+
* Defines the title text of the user settings view.
25+
* @default undefined
26+
*/
27+
text?: string | undefined;
28+
}
29+
30+
interface UserSettingsAppearanceViewDomRef extends Required<UserSettingsAppearanceViewAttributes>, Ui5DomRef {}
31+
32+
interface UserSettingsAppearanceViewPropTypes
33+
extends
34+
UserSettingsAppearanceViewAttributes,
35+
Omit<
36+
CommonProps,
37+
keyof UserSettingsAppearanceViewAttributes | 'additionalContent' | 'children' | 'onSelectionChange'
38+
> {
39+
/**
40+
* Defines additional content displayed below the items list.
41+
*
42+
* __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="additionalContent"`).
43+
* 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.
44+
*
45+
* __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.
46+
* Learn more about it [here](https://ui5.github.io/webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
47+
*
48+
* __Supported Node Type/s:__ `Array<HTMLElement> | undefined`
49+
*/
50+
additionalContent?: UI5WCSlotsNode;
51+
52+
/**
53+
* Defines the items of the component.
54+
*
55+
* __Supported Node Type/s:__ `Array<UserSettingsAppearanceViewGroup | UserSettingsAppearanceViewItem>`
56+
*/
57+
children?: ReactNode | ReactNode[];
58+
/**
59+
* Fired when an item is selected.
60+
*
61+
* **Note:** Call `event.preventDefault()` inside the handler of this event to prevent its default action/s.
62+
*
63+
* | cancelable | bubbles |
64+
* | :--------: | :-----: |
65+
* | ✅|❌|
66+
*/
67+
onSelectionChange?: (
68+
event: Ui5CustomEvent<UserSettingsAppearanceViewDomRef, UserSettingsAppearanceViewItemSelectEventDetail>,
69+
) => void;
70+
}
71+
72+
/**
73+
* The `UserSettingsAppearanceView` represents a view displayed in the `UserSettingsItem`.
74+
*
75+
*
76+
*
77+
* __Note:__ This is a UI5 Web Component! [UserSettingsAppearanceView UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/fiori/UserSettingsAppearanceView) | [Repository](https://github.com/UI5/webcomponents)
78+
*
79+
* @since [2.17.0](https://github.com/UI5/webcomponents/releases/tag/v2.17.0) of __@ui5/webcomponents-fiori__.
80+
* @experimental
81+
*/
82+
const UserSettingsAppearanceView = withWebComponent<
83+
UserSettingsAppearanceViewPropTypes,
84+
UserSettingsAppearanceViewDomRef
85+
>(
86+
'ui5-user-settings-appearance-view',
87+
['text'],
88+
['secondary', 'selected'],
89+
['additionalContent'],
90+
['selection-change'],
91+
);
92+
93+
UserSettingsAppearanceView.displayName = 'UserSettingsAppearanceView';
94+
95+
export { UserSettingsAppearanceView };
96+
export type { UserSettingsAppearanceViewDomRef, UserSettingsAppearanceViewPropTypes };

0 commit comments

Comments
 (0)