@momentum-design/components 0.129.0 → 0.129.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 +38 -38
- package/dist/browser/index.js.map +3 -3
- package/dist/components/dialog/dialog.styles.js +1 -1
- package/dist/components/virtualizedlist/virtualizedlist.component.d.ts +1 -1
- package/dist/components/virtualizedlist/virtualizedlist.component.js +3 -6
- package/dist/custom-elements.json +2331 -2307
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +4 -4
- package/dist/utils/mixins/ListNavigationMixin.d.ts +1 -1
- package/dist/utils/mixins/ListNavigationMixin.js +5 -3
- package/package.json +1 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export { default as AlertChip } from './alertchip';
|
|
|
5
5
|
export { default as Animation } from './animation';
|
|
6
6
|
export { default as AnnouncementDialog } from './announcementdialog';
|
|
7
7
|
export { default as Appheader } from './appheader';
|
|
8
|
-
export { default as AvatarButton } from './avatarbutton';
|
|
9
8
|
export { default as Avatar } from './avatar';
|
|
9
|
+
export { default as AvatarButton } from './avatarbutton';
|
|
10
10
|
export { default as Badge } from './badge';
|
|
11
11
|
export { default as Banner } from './banner';
|
|
12
12
|
export { default as Brandvisual } from './brandvisual';
|
|
@@ -14,8 +14,8 @@ export { default as Bullet } from './bullet';
|
|
|
14
14
|
export { default as Button } from './button';
|
|
15
15
|
export { default as ButtonGroup } from './buttongroup';
|
|
16
16
|
export { default as ButtonLink } from './buttonlink';
|
|
17
|
-
export { default as Buttonsimple } from './buttonsimple';
|
|
18
17
|
export { default as Card } from './card';
|
|
18
|
+
export { default as Buttonsimple } from './buttonsimple';
|
|
19
19
|
export { default as CardButton } from './cardbutton';
|
|
20
20
|
export { default as CardCheckbox } from './cardcheckbox';
|
|
21
21
|
export { default as CardRadio } from './cardradio';
|
|
@@ -24,14 +24,14 @@ export { default as Chip } from './chip';
|
|
|
24
24
|
export { default as Coachmark } from './coachmark';
|
|
25
25
|
export { default as Combobox } from './combobox';
|
|
26
26
|
export { default as ControlTypeProvider } from './controltypeprovider';
|
|
27
|
-
export { default as Dialog } from './dialog';
|
|
28
27
|
export { default as Divider } from './divider';
|
|
29
28
|
export { default as FilterChip } from './filterchip';
|
|
29
|
+
export { default as Dialog } from './dialog';
|
|
30
30
|
export { default as FormfieldGroup } from './formfieldgroup';
|
|
31
31
|
export { default as FormfieldWrapper } from './formfieldwrapper';
|
|
32
32
|
export { default as Icon } from './icon';
|
|
33
|
-
export { default as IconProvider } from './iconprovider';
|
|
34
33
|
export { default as Illustration } from './illustration';
|
|
34
|
+
export { default as IconProvider } from './iconprovider';
|
|
35
35
|
export { default as IllustrationProvider } from './illustrationprovider';
|
|
36
36
|
export { default as Input } from './input';
|
|
37
37
|
export { default as InputChip } from './inputchip';
|
package/dist/react/index.js
CHANGED
|
@@ -5,8 +5,8 @@ export { default as AlertChip } from './alertchip';
|
|
|
5
5
|
export { default as Animation } from './animation';
|
|
6
6
|
export { default as AnnouncementDialog } from './announcementdialog';
|
|
7
7
|
export { default as Appheader } from './appheader';
|
|
8
|
-
export { default as AvatarButton } from './avatarbutton';
|
|
9
8
|
export { default as Avatar } from './avatar';
|
|
9
|
+
export { default as AvatarButton } from './avatarbutton';
|
|
10
10
|
export { default as Badge } from './badge';
|
|
11
11
|
export { default as Banner } from './banner';
|
|
12
12
|
export { default as Brandvisual } from './brandvisual';
|
|
@@ -14,8 +14,8 @@ export { default as Bullet } from './bullet';
|
|
|
14
14
|
export { default as Button } from './button';
|
|
15
15
|
export { default as ButtonGroup } from './buttongroup';
|
|
16
16
|
export { default as ButtonLink } from './buttonlink';
|
|
17
|
-
export { default as Buttonsimple } from './buttonsimple';
|
|
18
17
|
export { default as Card } from './card';
|
|
18
|
+
export { default as Buttonsimple } from './buttonsimple';
|
|
19
19
|
export { default as CardButton } from './cardbutton';
|
|
20
20
|
export { default as CardCheckbox } from './cardcheckbox';
|
|
21
21
|
export { default as CardRadio } from './cardradio';
|
|
@@ -24,14 +24,14 @@ export { default as Chip } from './chip';
|
|
|
24
24
|
export { default as Coachmark } from './coachmark';
|
|
25
25
|
export { default as Combobox } from './combobox';
|
|
26
26
|
export { default as ControlTypeProvider } from './controltypeprovider';
|
|
27
|
-
export { default as Dialog } from './dialog';
|
|
28
27
|
export { default as Divider } from './divider';
|
|
29
28
|
export { default as FilterChip } from './filterchip';
|
|
29
|
+
export { default as Dialog } from './dialog';
|
|
30
30
|
export { default as FormfieldGroup } from './formfieldgroup';
|
|
31
31
|
export { default as FormfieldWrapper } from './formfieldwrapper';
|
|
32
32
|
export { default as Icon } from './icon';
|
|
33
|
-
export { default as IconProvider } from './iconprovider';
|
|
34
33
|
export { default as Illustration } from './illustration';
|
|
34
|
+
export { default as IconProvider } from './iconprovider';
|
|
35
35
|
export { default as IllustrationProvider } from './illustrationprovider';
|
|
36
36
|
export { default as Input } from './input';
|
|
37
37
|
export { default as InputChip } from './inputchip';
|
|
@@ -7,7 +7,7 @@ export declare abstract class ListNavigationMixinInterface {
|
|
|
7
7
|
protected initialFocus: number;
|
|
8
8
|
protected abstract get navItems(): BaseArray<HTMLElement>;
|
|
9
9
|
protected resetTabIndexes(index: number, focusElement?: boolean): void;
|
|
10
|
-
protected resetTabIndexAndSetFocus(newIndex: number, oldIndex?: number, focusNewItem?: boolean): void;
|
|
10
|
+
protected resetTabIndexAndSetFocus(newIndex: number, oldIndex?: number, focusNewItem?: boolean, scrollToNewItem?: boolean): void;
|
|
11
11
|
protected setInitialFocus(): void;
|
|
12
12
|
protected handleNavigationKeyDown(event: KeyboardEvent): void;
|
|
13
13
|
}
|
|
@@ -61,7 +61,7 @@ export const ListNavigationMixin = (superClass) => {
|
|
|
61
61
|
// When user clicked on a focusable element inside the item, we update the navigation index, but
|
|
62
62
|
// keep the focus on the clicked element.
|
|
63
63
|
const focusNewItem = !(this.navItems.at(newIndex) !== target && document.activeElement === event.target);
|
|
64
|
-
this.resetTabIndexAndSetFocus(newIndex, undefined, focusNewItem);
|
|
64
|
+
this.resetTabIndexAndSetFocus(newIndex, undefined, focusNewItem, false);
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
this.addEventListener('keydown', this.handleNavigationKeyDown.bind(this));
|
|
@@ -179,7 +179,7 @@ export const ListNavigationMixin = (superClass) => {
|
|
|
179
179
|
* @param focusNewItem - Call focus() on the new item or not. It should be false during firstUpdate
|
|
180
180
|
* @returns - This method does not return anything.
|
|
181
181
|
*/
|
|
182
|
-
resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem = true) {
|
|
182
|
+
resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem = true, scrollToNewItem = true) {
|
|
183
183
|
var _a;
|
|
184
184
|
const { navItems } = this;
|
|
185
185
|
if (navItems.length === 0)
|
|
@@ -199,7 +199,9 @@ export const ListNavigationMixin = (superClass) => {
|
|
|
199
199
|
newItem.setAttribute('tabindex', '0');
|
|
200
200
|
if (focusNewItem) {
|
|
201
201
|
newItem.focus({ preventScroll: true });
|
|
202
|
-
|
|
202
|
+
if (scrollToNewItem) {
|
|
203
|
+
newItem.scrollIntoView({ block: 'nearest' });
|
|
204
|
+
}
|
|
203
205
|
}
|
|
204
206
|
}
|
|
205
207
|
/**
|