@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.
- package/dist/browser/index.js +4 -4
- package/dist/browser/index.js.map +2 -2
- package/dist/components/listitem/listitem.component.d.ts +2 -3
- package/dist/components/listitem/listitem.component.js +4 -5
- package/dist/custom-elements.json +1304 -1304
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/package.json +1 -1
@@ -1,5 +1,4 @@
|
|
1
|
-
import
|
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
|
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 {
|
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
|
-
|
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
|
}
|