@descope/web-components-ui 1.0.372 → 1.0.373

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.esm.js CHANGED
@@ -4183,7 +4183,6 @@ class EnrichedText extends createBaseClass({ componentName: componentName$G, bas
4183
4183
  this.attachShadow({ mode: 'open' }).innerHTML = `
4184
4184
  <style>
4185
4185
  :host {
4186
- display: inline-block;
4187
4186
  line-height: 1em;
4188
4187
  word-break: break-word;
4189
4188
  }
@@ -4314,6 +4313,14 @@ class EnrichedText extends createBaseClass({ componentName: componentName$G, bas
4314
4313
 
4315
4314
  let html = decodeHTML(this.innerHTML);
4316
4315
 
4316
+ if (!html) {
4317
+ this.setAttribute('empty', 'true');
4318
+
4319
+ return;
4320
+ }
4321
+
4322
+ this.removeAttribute('empty');
4323
+
4317
4324
  try {
4318
4325
  const tokens = this.processor.parse(html, { references: undefined });
4319
4326
  html = this.processor.renderer.render(tokens, { html: true, breaks: true });
@@ -4338,6 +4345,7 @@ const EnrichedTextClass = compose(
4338
4345
  createStyleMixin({
4339
4346
  mappings: {
4340
4347
  hostWidth: { selector: () => ':host', property: 'width' },
4348
+ hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },
4341
4349
  hostDirection: { selector: () => ':host', property: 'direction' },
4342
4350
  fontSize: {},
4343
4351
  fontFamily: {},
@@ -14021,6 +14029,14 @@ const enrichedText = {
14021
14029
  [vars$w.fontWeightBold]: '900',
14022
14030
  [vars$w.minWidth]: '0.25em',
14023
14031
  [vars$w.minHeight]: '1.35em',
14032
+
14033
+ [vars$w.hostDisplay]: 'inline-block',
14034
+
14035
+ _empty: {
14036
+ _hideWhenEmpty: {
14037
+ [vars$w.hostDisplay]: 'none',
14038
+ },
14039
+ },
14024
14040
  };
14025
14041
 
14026
14042
  var enrichedText$1 = /*#__PURE__*/Object.freeze({