@limetech/lime-elements 33.14.0-next.16 → 33.14.0-next.17
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/cjs/limel-config.cjs.entry.js +3 -0
- package/dist/cjs/limel-list_2.cjs.entry.js +4 -17
- package/dist/cjs/limel-menu-list.cjs.entry.js +6 -28
- package/dist/collection/components/config/config.js +3 -0
- package/dist/collection/components/list/list-renderer.js +4 -17
- package/dist/collection/components/menu-list/menu-list-renderer.js +3 -11
- package/dist/collection/components/menu-list/menu-list.css +0 -30
- package/dist/collection/components/menu-list/menu-list.js +3 -17
- package/dist/esm/limel-config.entry.js +3 -0
- package/dist/esm/limel-list_2.entry.js +4 -17
- package/dist/esm/limel-menu-list.entry.js +7 -29
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-e332bcf4.entry.js → p-31fecf5d.entry.js} +1 -1
- package/dist/lime-elements/p-8d1ab246.entry.js +1 -0
- package/dist/lime-elements/p-df55ee67.entry.js +82 -0
- package/dist/types/components/list/list-renderer.d.ts +5 -6
- package/dist/types/components/menu/menu.types.d.ts +0 -5
- package/dist/types/components/menu-list/menu-list-renderer-config.d.ts +0 -1
- package/dist/types/components/menu-list/menu-list-renderer.d.ts +3 -4
- package/package.json +1 -1
- package/dist/lime-elements/p-590ef65e.entry.js +0 -1
- package/dist/lime-elements/p-dcad1b31.entry.js +0 -82
|
@@ -38,7 +38,7 @@ class ListRenderer {
|
|
|
38
38
|
* Returns `undefined` if no item should have the attribute set.
|
|
39
39
|
* See https://github.com/material-components/material-components-web/tree/e66a43a75fef4f9179e24856649518e15e279a04/packages/mdc-list#accessibility
|
|
40
40
|
*
|
|
41
|
-
* @param {Array<ListItem | ListSeparator
|
|
41
|
+
* @param {Array<ListItem | ListSeparator>} items the items of the list, including any `ListSeparator`:s
|
|
42
42
|
* @returns {number} the index as per the description
|
|
43
43
|
*/
|
|
44
44
|
this.getIndexForWhichToApplyTabIndex = (items) => {
|
|
@@ -63,7 +63,7 @@ class ListRenderer {
|
|
|
63
63
|
/**
|
|
64
64
|
* Render a single list item
|
|
65
65
|
*
|
|
66
|
-
* @param {ListItem | ListSeparator
|
|
66
|
+
* @param {ListItem | ListSeparator} item the item to render
|
|
67
67
|
* @param {number} index the index the item had in the `items` array
|
|
68
68
|
* @returns {HTMLElement} the list item
|
|
69
69
|
*/
|
|
@@ -92,7 +92,7 @@ class ListRenderer {
|
|
|
92
92
|
/**
|
|
93
93
|
* Render the text of the list item
|
|
94
94
|
*
|
|
95
|
-
* @param {ListItem
|
|
95
|
+
* @param {ListItem} item the list item
|
|
96
96
|
* @returns {HTMLElement | string} the text for the list item
|
|
97
97
|
*/
|
|
98
98
|
this.renderText = (item) => {
|
|
@@ -101,20 +101,10 @@ class ListRenderer {
|
|
|
101
101
|
}
|
|
102
102
|
return (index.h("div", { class: "mdc-deprecated-list-item__text" },
|
|
103
103
|
index.h("div", { class: "mdc-deprecated-list-item__primary-command-text" },
|
|
104
|
-
index.h("div", { class: "mdc-deprecated-list-item__primary-text" }, item.text),
|
|
105
|
-
this.renderCommandText(item)),
|
|
104
|
+
index.h("div", { class: "mdc-deprecated-list-item__primary-text" }, item.text)),
|
|
106
105
|
index.h("div", { class: "mdc-deprecated-list-item__secondary-text" }, item.secondaryText)));
|
|
107
106
|
};
|
|
108
|
-
this.renderCommandText = (item) => {
|
|
109
|
-
if (!('commandText' in item)) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
return (index.h("div", { class: "mdc-deprecated-list-item__command-text" }, item.commandText));
|
|
113
|
-
};
|
|
114
107
|
this.isSimpleItem = (item) => {
|
|
115
|
-
if ('commandText' in item) {
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
108
|
if ('secondaryText' in item) {
|
|
119
109
|
return false;
|
|
120
110
|
}
|
|
@@ -195,9 +185,6 @@ class ListRenderer {
|
|
|
195
185
|
this.twoLines = items.some((item) => {
|
|
196
186
|
return 'secondaryText' in item && !!item.secondaryText;
|
|
197
187
|
});
|
|
198
|
-
this.commandKey = items.some((item) => {
|
|
199
|
-
return 'commandText' in item && !!item.commandText;
|
|
200
|
-
});
|
|
201
188
|
this.hasIcons = items.some((item) => {
|
|
202
189
|
return 'icon' in item && !!item.icon;
|
|
203
190
|
});
|