Skip to content

Commit a4b6650

Browse files
Merge remote-tracking branch 'origin/main' into popover_autoclose
2 parents 64ab684 + e48da75 commit a4b6650

File tree

15 files changed

+523
-529
lines changed

15 files changed

+523
-529
lines changed

packages/base/src/types/CSSSize.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import DataType from "./DataType.js";
2+
3+
/**
4+
* @class
5+
* CSSSize data type.
6+
*
7+
* @extends sap.ui.webc.base.types.DataType
8+
* @constructor
9+
* @author SAP SE
10+
* @alias sap.ui.webc.base.types.CSSSize
11+
* @public
12+
*/
13+
class CSSSize extends DataType {
14+
static isValid(value: string) {
15+
return /^(auto|inherit|[-+]?(0*|([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%))|calc\(\s*(\(\s*)*[-+]?(([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)(\s*(\)\s*)*(\s[-+]\s|[*\/])\s*(\(\s*)*([-+]?(([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)))*\s*(\)\s*)*\))$/.test(value); // eslint-disable-line
16+
}
17+
}
18+
19+
export default CSSSize;

packages/main/src/BusyIndicator.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="ui5-busy-indicator-circle circle-animation-2"></div>
1818
</div>
1919
{{#if text}}
20-
<ui5-label id="{{_id}}-label" class="ui5-busy-indicator-text">
20+
<ui5-label id="{{_id}}-label" class="ui5-busy-indicator-text" wrapping-type="Normal">
2121
{{text}}
2222
</ui5-label>
2323
{{/if}}

packages/main/src/ComboBox.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,6 @@ class ComboBox extends UI5Element {
267267

268268
/**
269269
* Defines the value state of the component.
270-
* <br><br>
271-
* Available options are:
272-
* <ul>
273-
* <li><code>None</code></li>
274-
* <li><code>Error</code></li>
275-
* <li><code>Warning</code></li>
276-
* <li><code>Success</code></li>
277-
* <li><code>Information</code></li>
278-
* </ul>
279270
*
280271
* @type {sap.ui.webc.base.types.ValueState}
281272
* @name sap.ui.webc.main.ComboBox.prototype.valueState
@@ -323,7 +314,6 @@ class ComboBox extends UI5Element {
323314

324315
/**
325316
* Defines the filter type of the component.
326-
* Available options are: <code>StartsWithPerTerm</code>, <code>StartsWith</code>, <code>Contains</code> and <code>None</code>.
327317
*
328318
* @type {sap.ui.webc.main.types.ComboBoxFilter}
329319
* @name sap.ui.webc.main.ComboBox.prototype.filter
@@ -352,7 +342,7 @@ class ComboBox extends UI5Element {
352342
*
353343
* @type {string}
354344
* @name sap.ui.webc.main.ComboBox.prototype.accessibleName
355-
* @defaultvalue: ""
345+
* @defaultvalue ""
356346
* @public
357347
* @since 1.0.0-rc.15
358348
*/

packages/main/src/Input.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,6 @@ class Input extends UI5Element implements SuggestionComponent, IFormElement {
336336

337337
/**
338338
* Defines the HTML type of the component.
339-
* Available options are: <code>Text</code>, <code>Email</code>,
340-
* <code>Number</code>, <code>Password</code>, <code>Tel</code>, and <code>URL</code>.
341339
* <br><br>
342340
* <b>Notes:</b>
343341
* <ul>
@@ -384,15 +382,6 @@ class Input extends UI5Element implements SuggestionComponent, IFormElement {
384382

385383
/**
386384
* Defines the value state of the component.
387-
* <br><br>
388-
* Available options are:
389-
* <ul>
390-
* <li><code>None</code></li>
391-
* <li><code>Error</code></li>
392-
* <li><code>Warning</code></li>
393-
* <li><code>Success</code></li>
394-
* <li><code>Information</code></li>
395-
* </ul>
396385
*
397386
* @type {sap.ui.webc.base.types.ValueState}
398387
* @name sap.ui.webc.main.Input.prototype.valueState

packages/main/src/TabContainer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
import MediaRange from "@ui5/webcomponents-base/dist/MediaRange.js";
2525
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
2626
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
27+
import { getScopedVarName } from "@ui5/webcomponents-base/dist/CustomElementsScope.js";
2728
import "@ui5/webcomponents-icons/dist/slim-arrow-up.js";
2829
import "@ui5/webcomponents-icons/dist/slim-arrow-down.js";
2930
import {
@@ -812,8 +813,8 @@ class TabContainer extends UI5Element {
812813
}
813814

814815
tab._style = {
815-
"--_ui5-tab-indentation-level": level,
816-
"--_ui5-tab-extra-indent": extraIndent ? 1 : null,
816+
[getScopedVarName("--_ui5-tab-indentation-level")]: level,
817+
[getScopedVarName("--_ui5-tab-extra-indent")]: extraIndent ? 1 : null,
817818
};
818819
});
819820
}

packages/main/src/Table.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -381,13 +381,7 @@ class Table extends UI5Element {
381381

382382
/**
383383
* Defines the mode of the component.
384-
* <br><br>
385-
* Available options are:
386-
* <ul>
387-
* <li><code>MultiSelect</code></li>
388-
* <li><code>SingleSelect</code></li>
389-
* <li><code>None</code></li>
390-
* <ul>
384+
*
391385
* @type {sap.ui.webc.main.types.TableMode}
392386
* @name sap.ui.webc.main.Table.prototype.mode
393387
* @defaultvalue "None"

packages/main/src/ToolbarButton.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
22
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
33
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
4+
import CSSSize from "@ui5/webcomponents-base/dist/types/CSSSize.js";
45
import Button from "./Button.js";
56
import ButtonDesign from "./types/ButtonDesign.js";
67

@@ -191,12 +192,12 @@ class ToolbarButton extends ToolbarItem {
191192
* <b>Note:</b> all CSS sizes are supported - 'percentage', 'px', 'rem', 'auto', etc.
192193
*
193194
* @name sap.ui.webc.main.ToolbarButton.prototype.width
194-
* @defaultvalue ""
195-
* @type {string}
195+
* @defaultvalue undefined
196+
* @type { sap.ui.webc.base.types.CSSSize }
196197
* @public
197198
*/
198-
@property()
199-
width!: string;
199+
@property({ validator: CSSSize })
200+
width?: string;
200201

201202
static get staticAreaStyles() {
202203
return ToolbarButtonPopoverCss;

packages/main/src/ToolbarSelect.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
33
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
44
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
55
import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
6+
import CSSSize from "@ui5/webcomponents-base/dist/types/CSSSize.js";
67

78
import { registerToolbarItem } from "./ToolbarRegistry.js";
89

@@ -81,12 +82,12 @@ class ToolbarSelect extends ToolbarItem {
8182
* <b>Note:</b> all CSS sizes are supported - 'percentage', 'px', 'rem', 'auto', etc.
8283
*
8384
* @name sap.ui.webc.main.ToolbarSelect.prototype.width
84-
* @defaultvalue ""
85-
* @type {string}
85+
* @defaultvalue undefined
86+
* @type { sap.ui.webc.base.types.CSSSize }
8687
* @public
8788
*/
88-
@property()
89-
width!: string;
89+
@property({ validator: CSSSize })
90+
width?: string;
9091

9192
/**
9293
* Defines the component options.

packages/main/src/ToolbarSeparator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import ToolbarItem from "./ToolbarItem.js";
1717
* @constructor
1818
* @author SAP SE
1919
* @alias sap.ui.webc.main.ToolbarSeparator
20-
* @extends sap.ui.webc.base.UI5Element
20+
* @extends sap.ui.webc.main.ToolbarItem
2121
* @tagname ui5-toolbar-separator
2222
* @since 1.17.0
2323
* @abstract

packages/main/src/ToolbarSpacer.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
22
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
3+
import CSSSize from "@ui5/webcomponents-base/dist/types/CSSSize.js";
34
import ToolbarSpacerTemplate from "./generated/templates/ToolbarSpacerTemplate.lit.js";
45

56
import ToolbarItem from "./ToolbarItem.js";
@@ -15,7 +16,7 @@ import { registerToolbarItem } from "./ToolbarRegistry.js";
1516
* @constructor
1617
* @author SAP SE
1718
* @alias sap.ui.webc.main.ToolbarSpacer
18-
* @extends sap.ui.webc.base.UI5Element
19+
* @extends sap.ui.webc.main.ToolbarItem
1920
* @tagname ui5-toolbar-spacer
2021
* @abstract
2122
* @since 1.17.0
@@ -33,12 +34,12 @@ class ToolbarSpacer extends ToolbarItem {
3334
* <b>Note:</b> all CSS sizes are supported - 'percentage', 'px', 'rem', 'auto', etc.
3435
*
3536
* @public
36-
* @type {string}
37+
* @type { sap.ui.webc.base.types.CSSSize }
3738
* @name sap.ui.webc.main.ToolbarSpacer.prototype.width
38-
* @defaultvalue ""
39+
* @defaultvalue undefined
3940
*/
40-
@property({ type: String })
41-
width!: string
41+
@property({ validator: CSSSize })
42+
width?: string;
4243

4344
get styles() {
4445
return this.width ? { width: this.width } : { flex: "auto" };

0 commit comments

Comments
 (0)