@momentum-design/components 0.95.4 → 0.95.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,4 @@
1
- import type { CSSResult, PropertyValues, TemplateResult } from 'lit';
2
- import { nothing } from 'lit';
1
+ import { CSSResult, PropertyValues, TemplateResult } from 'lit';
3
2
  import { Component } from '../../models';
4
3
  import type { PopoverPlacement } from '../popover/popover.types';
5
4
  import type { TextType } from '../text/text.types';
@@ -146,7 +145,7 @@ declare class ListItem extends ListItem_base {
146
145
  * @param content - The text content to be displayed within the slot.
147
146
  * @returns A TemplateResult containing a slot with an `mdc-text` element of type BODY_SMALL_REGULAR.
148
147
  */
149
- protected getText(slotName: string, type: TextType, content?: string): TemplateResult | typeof nothing;
148
+ protected getText(slotName: string, type: TextType, content?: string): TemplateResult;
150
149
  /**
151
150
  * Disable or enable all slotted elements in the leading and trailing slots.
152
151
  * This is useful when the list item is disabled, to prevent the user from interacting with the controls.
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { html, nothing } from 'lit';
10
+ import { nothing, html } from 'lit';
11
11
  import { property, queryAssignedElements } from 'lit/decorators.js';
12
12
  import { Component } from '../../models';
13
13
  import { KEYS } from '../../utils/keys';
@@ -176,12 +176,11 @@ class ListItem extends DisabledMixin(TabIndexMixin(Component)) {
176
176
  * @returns A TemplateResult containing a slot with an `mdc-text` element of type BODY_SMALL_REGULAR.
177
177
  */
178
178
  getText(slotName, type, content) {
179
- if (!content) {
180
- return nothing;
181
- }
182
179
  return html `
183
180
  <slot name="${slotName}">
184
- <mdc-text part="${slotName}" type="${type}" tagname="${VALID_TEXT_TAGS.SPAN}">${content}</mdc-text>
181
+ ${content
182
+ ? html `<mdc-text part="${slotName}" type="${type}" tagname="${VALID_TEXT_TAGS.SPAN}">${content}</mdc-text>`
183
+ : nothing}
185
184
  </slot>
186
185
  `;
187
186
  }