Skip to content

Commit f48b8d2

Browse files
committed
note same type as ui5wc
1 parent e7e1afe commit f48b8d2

File tree

119 files changed

+233
-244
lines changed

Some content is hidden

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

119 files changed

+233
-244
lines changed

packages/ai/src/components/Button/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ interface ButtonPropTypes
7272
* **Note:** Although this slot accepts HTML Elements, it is strongly recommended that
7373
* you only use `ButtonState` components in order to preserve the intended design.
7474
*
75-
* __Supported Node Type/s:__ `ButtonState`
75+
* __Supported Node Type/s:__ `Array<ButtonState>`
7676
*/
7777
children?: ReactNode | ReactNode[];
7878
/**

packages/ai/src/components/PromptInput/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ interface PromptInputPropTypes
113113
*
114114
* **Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items.
115115
*
116-
* __Supported Node Type/s:__ `IInputSuggestionItem`
116+
* __Supported Node Type/s:__ `Array<IInputSuggestionItem>`
117117
*/
118118
children?: ReactNode | ReactNode[];
119119

@@ -134,7 +134,7 @@ interface PromptInputPropTypes
134134
*
135135
* **Note:** Available since [v2.0.0](https://github.com/UI5/webcomponents/releases/tag/v2.0.0) of **@ui5/webcomponents-ai**.
136136
*
137-
* __Supported Node Type/s:__ `HTMLElement`
137+
* __Supported Node Type/s:__ `Array<HTMLElement>`
138138
*/
139139
valueStateMessage?: UI5WCSlotsNode;
140140
/**

packages/cli/src/scripts/create-wrappers/PropTypesRenderer.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,8 @@ export class PropTypesRenderer extends AbstractRenderer {
8383

8484
const slotType = slot._ui5type;
8585
if (slotType) {
86-
let slotElementType: string = 'unknown';
87-
const slotReferences = slot._ui5type?.references;
88-
if (slotReferences?.length) {
89-
const types = new Set<string>([]);
90-
slotReferences.forEach((slotRef) => {
91-
types.add(slotRef.name);
92-
});
93-
slotElementType = [...types].join(', ');
94-
} else if (slotType.text) {
95-
slotElementType = slotType.text.match(/^Array<([^>]+)>$/)?.[1] ?? slotType.text;
96-
}
9786
descriptionParts.push(` *`);
98-
descriptionParts.push(` * __Supported Node Type/s:__ \`${slotElementType}\``);
87+
descriptionParts.push(` * __Supported Node Type/s:__ \`${slotType.text ?? 'unknown'}\``);
9988
}
10089

10190
return `/**\n${descriptionParts.join('\n')}\n */\n${snakeCaseToCamelCase(slot.name)}?: ${

packages/compat/src/components/Table/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ interface TablePropTypes
156156
*
157157
* **Note:** Use `TableRow` for the intended design.
158158
*
159-
* __Supported Node Type/s:__ `ITableRow`
159+
* __Supported Node Type/s:__ `Array<ITableRow>`
160160
*/
161161
children?: ReactNode | ReactNode[];
162162

@@ -171,7 +171,7 @@ interface TablePropTypes
171171
* __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.
172172
* Learn more about it [here](https://ui5.github.io/webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
173173
*
174-
* __Supported Node Type/s:__ `TableColumn`
174+
* __Supported Node Type/s:__ `Array<TableColumn>`
175175
*/
176176
columns?: UI5WCSlotsNode;
177177
/**

packages/compat/src/components/TableColumn/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ interface TableColumnPropTypes
5757
/**
5858
* Defines the content of the column header
5959
*
60-
* __Supported Node Type/s:__ `Node`
60+
* __Supported Node Type/s:__ `Array<Node>`
6161
*/
6262
children?: ReactNode | ReactNode[];
6363
}

packages/compat/src/components/TableGroupRow/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface TableGroupRowPropTypes extends TableGroupRowAttributes, Omit<CommonPro
1919
*
2020
* **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.
2121
*
22-
* __Supported Node Type/s:__ `Node`
22+
* __Supported Node Type/s:__ `Array<Node>`
2323
*/
2424
children?: ReactNode | ReactNode[];
2525
}

packages/compat/src/components/TableRow/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ interface TableRowPropTypes extends TableRowAttributes, Omit<CommonProps, keyof
4747
*
4848
* **Note:** Use `TableCell` for the intended design.
4949
*
50-
* __Supported Node Type/s:__ `TableCell`
50+
* __Supported Node Type/s:__ `Array<TableCell>`
5151
*/
5252
children?: ReactNode | ReactNode[];
5353
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ interface AvatarPropTypes
132132
*
133133
* **Note:** Available since [v1.7.0](https://github.com/UI5/webcomponents/releases/tag/v1.7.0) of **@ui5/webcomponents**.
134134
*
135-
* __Supported Node Type/s:__ `HTMLElement`
135+
* __Supported Node Type/s:__ `Array<HTMLElement>`
136136
*/
137137
badge?: UI5WCSlotsNode;
138138

@@ -144,7 +144,7 @@ interface AvatarPropTypes
144144
* &nbsp;&nbsp;&nbsp;&nbsp;`visibility: hidden;`<br/>
145145
* `}`
146146
*
147-
* __Supported Node Type/s:__ `HTMLElement`
147+
* __Supported Node Type/s:__ `Array<HTMLElement>`
148148
*/
149149
children?: ReactNode | ReactNode[];
150150
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ interface AvatarGroupPropTypes
7373
* Moreover, if you use avatars with "Square" shape, there will be visual inconsistency
7474
* as the built-in overflow action has "Circle" shape.
7575
*
76-
* __Supported Node Type/s:__ `IAvatarGroupItem`
76+
* __Supported Node Type/s:__ `Array<IAvatarGroupItem>`
7777
*/
7878
children?: ReactNode | ReactNode[];
7979

@@ -90,7 +90,7 @@ interface AvatarGroupPropTypes
9090
* __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.
9191
* Learn more about it [here](https://ui5.github.io/webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
9292
*
93-
* __Supported Node Type/s:__ `IButton`
93+
* __Supported Node Type/s:__ `Array<IButton>`
9494
*/
9595
overflowButton?: UI5WCSlotsNode;
9696
/**

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ interface BarPropTypes
3737
/**
3838
* Defines the content in the middle of the bar.
3939
*
40-
* __Supported Node Type/s:__ `HTMLElement`
40+
* __Supported Node Type/s:__ `Array<HTMLElement>`
4141
*/
4242
children?: ReactNode | ReactNode[];
4343

@@ -50,7 +50,7 @@ interface BarPropTypes
5050
* __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.
5151
* Learn more about it [here](https://ui5.github.io/webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
5252
*
53-
* __Supported Node Type/s:__ `HTMLElement`
53+
* __Supported Node Type/s:__ `Array<HTMLElement>`
5454
*/
5555
endContent?: UI5WCSlotsNode;
5656

@@ -63,7 +63,7 @@ interface BarPropTypes
6363
* __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.
6464
* Learn more about it [here](https://ui5.github.io/webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
6565
*
66-
* __Supported Node Type/s:__ `HTMLElement`
66+
* __Supported Node Type/s:__ `Array<HTMLElement>`
6767
*/
6868
startContent?: UI5WCSlotsNode;
6969
}

0 commit comments

Comments
 (0)