@momentum-design/components 0.117.1 → 0.117.2
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 +268 -273
- package/dist/browser/index.js.map +3 -3
- package/dist/components/option/option.component.js +4 -7
- package/dist/components/select/select.component.d.ts +39 -46
- package/dist/components/select/select.component.js +155 -156
- package/dist/custom-elements.json +2555 -2523
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +2 -2
- package/dist/react/select/index.d.ts +1 -0
- package/dist/react/select/index.js +1 -0
- package/dist/utils/controllers/ElementStore.d.ts +1 -1
- package/dist/utils/mixins/ListNavigationMixin.js +2 -1
- package/package.json +1 -1
package/dist/react/index.d.ts
CHANGED
@@ -4,8 +4,8 @@ export { default as AccordionGroup } from './accordiongroup';
|
|
4
4
|
export { default as AlertChip } from './alertchip';
|
5
5
|
export { default as Animation } from './animation';
|
6
6
|
export { default as Appheader } from './appheader';
|
7
|
-
export { default as Avatar } from './avatar';
|
8
7
|
export { default as AvatarButton } from './avatarbutton';
|
8
|
+
export { default as Avatar } from './avatar';
|
9
9
|
export { default as Badge } from './badge';
|
10
10
|
export { default as Banner } from './banner';
|
11
11
|
export { default as Brandvisual } from './brandvisual';
|
@@ -50,10 +50,10 @@ export { default as MenuSection } from './menusection';
|
|
50
50
|
export { default as NavMenuItem } from './navmenuitem';
|
51
51
|
export { default as OptGroup } from './optgroup';
|
52
52
|
export { default as Option } from './option';
|
53
|
-
export { default as Password } from './password';
|
54
53
|
export { default as Popover } from './popover';
|
55
54
|
export { default as Presence } from './presence';
|
56
55
|
export { default as Progressbar } from './progressbar';
|
56
|
+
export { default as Password } from './password';
|
57
57
|
export { default as Progressspinner } from './progressspinner';
|
58
58
|
export { default as Radio } from './radio';
|
59
59
|
export { default as RadioGroup } from './radiogroup';
|
package/dist/react/index.js
CHANGED
@@ -4,8 +4,8 @@ export { default as AccordionGroup } from './accordiongroup';
|
|
4
4
|
export { default as AlertChip } from './alertchip';
|
5
5
|
export { default as Animation } from './animation';
|
6
6
|
export { default as Appheader } from './appheader';
|
7
|
-
export { default as Avatar } from './avatar';
|
8
7
|
export { default as AvatarButton } from './avatarbutton';
|
8
|
+
export { default as Avatar } from './avatar';
|
9
9
|
export { default as Badge } from './badge';
|
10
10
|
export { default as Banner } from './banner';
|
11
11
|
export { default as Brandvisual } from './brandvisual';
|
@@ -50,10 +50,10 @@ export { default as MenuSection } from './menusection';
|
|
50
50
|
export { default as NavMenuItem } from './navmenuitem';
|
51
51
|
export { default as OptGroup } from './optgroup';
|
52
52
|
export { default as Option } from './option';
|
53
|
-
export { default as Password } from './password';
|
54
53
|
export { default as Popover } from './popover';
|
55
54
|
export { default as Presence } from './presence';
|
56
55
|
export { default as Progressbar } from './progressbar';
|
56
|
+
export { default as Password } from './password';
|
57
57
|
export { default as Progressspinner } from './progressspinner';
|
58
58
|
export { default as Radio } from './radio';
|
59
59
|
export { default as RadioGroup } from './radiogroup';
|
@@ -7,6 +7,7 @@ import Component from '../../components/select';
|
|
7
7
|
* Every mdc-option should have a `value` attribute set to ensure proper form submission.
|
8
8
|
*
|
9
9
|
* To set a default option, use the `selected` attribute on the `mdc-option` element.
|
10
|
+
* You can also set the `value` attribute on the `mdc-select` element to match the value of the desired option. The component will select the corresponding option automatically.
|
10
11
|
*
|
11
12
|
* **Note:** Make sure to add `mdc-selectlistbox` as a child of `mdc-select` and wrap options/optgroup in it to ensure proper accessibility functionality. Read more about it in SelectListBox documentation.
|
12
13
|
*
|
@@ -9,6 +9,7 @@ import { TAG_NAME } from '../../components/select/select.constants';
|
|
9
9
|
* Every mdc-option should have a `value` attribute set to ensure proper form submission.
|
10
10
|
*
|
11
11
|
* To set a default option, use the `selected` attribute on the `mdc-option` element.
|
12
|
+
* You can also set the `value` attribute on the `mdc-select` element to match the value of the desired option. The component will select the corresponding option automatically.
|
12
13
|
*
|
13
14
|
* **Note:** Make sure to add `mdc-selectlistbox` as a child of `mdc-select` and wrap options/optgroup in it to ensure proper accessibility functionality. Read more about it in SelectListBox documentation.
|
14
15
|
*
|
@@ -21,7 +21,7 @@ interface ElementStoreOptions<TItem extends HTMLElement = HTMLElement> {
|
|
21
21
|
* @param index - Index at which the item is added or removed.
|
22
22
|
* @param store - The current state of the store.
|
23
23
|
*/
|
24
|
-
onStoreUpdate?: (item: TItem, changeType: ElementStoreChangeTypes, index: number, store
|
24
|
+
onStoreUpdate?: (item: TItem, changeType: ElementStoreChangeTypes, index: number, store?: TItem[]) => void;
|
25
25
|
}
|
26
26
|
/**
|
27
27
|
* ElementStore is a controller that manages a collection of elements.
|
@@ -146,11 +146,12 @@ export const ListNavigationMixin = (superClass) => {
|
|
146
146
|
* @param index - The index of the currently focused item.
|
147
147
|
*/
|
148
148
|
resetTabIndexes(index) {
|
149
|
+
var _a;
|
149
150
|
if (this.navItems.length > 0) {
|
150
151
|
this.navItems.forEach(item => item.setAttribute('tabindex', '-1'));
|
151
152
|
const currentIndex = this.navItems[index] ? index : 0;
|
152
153
|
this.navItems[currentIndex].setAttribute('tabindex', '0');
|
153
|
-
this.navItems[currentIndex].focus();
|
154
|
+
(_a = this.navItems[currentIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
154
155
|
}
|
155
156
|
}
|
156
157
|
/**
|