@@ -3,6 +3,7 @@ import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
3
3
import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AriaLabelHelper.js" ;
4
4
import { fetchI18nBundle , getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js" ;
5
5
import LinkDesign from "./types/LinkDesign.js" ;
6
+ import WrappingType from "./types/WrappingType.js" ;
6
7
7
8
// Template
8
9
import LinkRederer from "./generated/templates/LinkTemplate.lit.js" ;
@@ -84,17 +85,20 @@ const metadata = {
84
85
} ,
85
86
86
87
/**
87
- * Defines whether the component text should wrap
88
- * when there is no sufficient space.
89
- * <br><br>
90
- * <b>Note:</b> The text is truncated by default.
88
+ * Defines how the text of a component will be displayed when there is not enough space.
89
+ * Available options are:
90
+ * <ul>
91
+ * <li><code>None</code> - The text will be truncated with an ellipsis.</li>
92
+ * <li><code>Normal</code> - The text will wrap. The words will not be broken based on hyphenation.</li>
93
+ * </ul>
91
94
*
92
- * @type {boolean }
93
- * @defaultvalue false
95
+ * @type {WrappingType }
96
+ * @defaultvalue "None"
94
97
* @public
95
98
*/
96
- wrap : {
97
- type : Boolean ,
99
+ wrappingType : {
100
+ type : WrappingType ,
101
+ defaultValue : WrappingType . None ,
98
102
} ,
99
103
100
104
/**
@@ -174,13 +178,13 @@ const metadata = {
174
178
* by using the <code>design</code> property.
175
179
* <br><br>
176
180
* If the <code>href</code> property is set, the link behaves as the HTML
177
- * anchor tag (<code><a>& lt;a/> </code>) and opens the specified URL in the given target frame (<code>target</code> property).
181
+ * anchor tag (<code><a>& lt;a/> </code>) and opens the specified URL in the given target frame (<code>target</code> property).
178
182
* To specify where the linked content is opened, you can use the <code>target</code> property.
179
183
*
180
184
* <h3>Responsive behavior</h3>
181
185
*
182
186
* If there is not enough space, the text of the <code>ui5-link</code> becomes truncated.
183
- * If the <code>wrap </code> property is set to <code>true </code>, the text is displayed
187
+ * If the <code>wrappingType </code> property is set to <code>"Normal" </code>, the text is displayed
184
188
* on several lines instead of being truncated.
185
189
*
186
190
* <h3>ES6 Module Import</h3>
0 commit comments