@momentum-design/components 0.28.8 → 0.28.10
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 +1032 -926
- package/dist/browser/index.js.map +4 -4
- package/dist/components/checkbox/checkbox.component.js +2 -0
- package/dist/components/input/input.component.d.ts +1 -0
- package/dist/components/input/input.component.js +3 -1
- package/dist/components/list/index.d.ts +8 -0
- package/dist/components/list/index.js +5 -0
- package/dist/components/list/list.component.d.ts +64 -0
- package/dist/components/list/list.component.js +138 -0
- package/dist/components/list/list.constants.d.ts +9 -0
- package/dist/components/list/list.constants.js +10 -0
- package/dist/components/list/list.styles.d.ts +2 -0
- package/dist/components/list/list.styles.js +7 -0
- package/dist/components/listitem/index.d.ts +8 -0
- package/dist/components/listitem/index.js +5 -0
- package/dist/components/listitem/listitem.component.d.ts +90 -0
- package/dist/components/listitem/listitem.component.js +153 -0
- package/dist/components/listitem/listitem.constants.d.ts +10 -0
- package/dist/components/listitem/listitem.constants.js +11 -0
- package/dist/components/listitem/listitem.styles.d.ts +2 -0
- package/dist/components/listitem/listitem.styles.js +70 -0
- package/dist/components/listitem/listitem.types.d.ts +4 -0
- package/dist/components/listitem/listitem.types.js +1 -0
- package/dist/components/radio/radio.component.js +2 -0
- package/dist/components/toggle/toggle.component.js +2 -0
- package/dist/custom-elements.json +700 -166
- package/dist/index.d.ts +19 -17
- package/dist/index.js +18 -16
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +2 -0
- package/dist/react/list/index.d.ts +12 -0
- package/dist/react/list/index.js +21 -0
- package/dist/react/listitem/index.d.ts +34 -0
- package/dist/react/listitem/index.js +43 -0
- package/dist/utils/mixins/FormInternalsMixin.js +0 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -1,29 +1,31 @@
|
|
1
|
-
import ThemeProvider from './components/themeprovider';
|
2
|
-
import Icon from './components/icon';
|
3
|
-
import IconProvider from './components/iconprovider';
|
4
1
|
import Avatar from './components/avatar';
|
2
|
+
import AvatarButton from './components/avatarbutton';
|
5
3
|
import Badge from './components/badge';
|
6
|
-
import Presence from './components/presence';
|
7
|
-
import Text from './components/text';
|
8
|
-
import Button from './components/button';
|
9
|
-
import Popover from './components/popover';
|
10
4
|
import Bullet from './components/bullet';
|
11
|
-
import
|
5
|
+
import Button from './components/button';
|
6
|
+
import Checkbox from './components/checkbox';
|
12
7
|
import Divider from './components/divider';
|
13
|
-
import
|
8
|
+
import FormfieldGroup from './components/formfieldgroup';
|
9
|
+
import Icon from './components/icon';
|
10
|
+
import IconProvider from './components/iconprovider';
|
14
11
|
import Input from './components/input';
|
15
12
|
import Link from './components/link';
|
16
|
-
import
|
17
|
-
import
|
13
|
+
import List from './components/list';
|
14
|
+
import ListItem from './components/listitem';
|
15
|
+
import Marker from './components/marker';
|
16
|
+
import Popover from './components/popover';
|
17
|
+
import Presence from './components/presence';
|
18
18
|
import Radio from './components/radio';
|
19
|
-
import
|
19
|
+
import RadioGroup from './components/radiogroup';
|
20
|
+
import Spinner from './components/spinner';
|
20
21
|
import Tab from './components/tab';
|
21
|
-
import
|
22
|
+
import Text from './components/text';
|
23
|
+
import ThemeProvider from './components/themeprovider';
|
24
|
+
import Toggle from './components/toggle';
|
25
|
+
import VirtualizedList from './components/virtualizedlist';
|
22
26
|
import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
|
23
|
-
import Spinner from './components/spinner';
|
24
|
-
import RadioGroup from './components/radiogroup';
|
25
|
-
import type { TextType } from './components/text/text.types';
|
26
27
|
import type { SpinnerSize, SpinnerVariant } from './components/spinner/spinner.types';
|
27
|
-
|
28
|
+
import type { TextType } from './components/text/text.types';
|
29
|
+
export { Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Divider, FormfieldGroup, Icon, IconProvider, Input, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, };
|
28
30
|
export type { TextType, SpinnerSize, SpinnerVariant, };
|
29
31
|
export { inMemoryCache, webAPIIconsCache };
|
package/dist/index.js
CHANGED
@@ -1,26 +1,28 @@
|
|
1
|
-
import ThemeProvider from './components/themeprovider';
|
2
|
-
import Icon from './components/icon';
|
3
|
-
import IconProvider from './components/iconprovider';
|
4
1
|
import Avatar from './components/avatar';
|
2
|
+
import AvatarButton from './components/avatarbutton';
|
5
3
|
import Badge from './components/badge';
|
6
|
-
import Presence from './components/presence';
|
7
|
-
import Text from './components/text';
|
8
|
-
import Button from './components/button';
|
9
|
-
import Popover from './components/popover';
|
10
4
|
import Bullet from './components/bullet';
|
11
|
-
import
|
5
|
+
import Button from './components/button';
|
6
|
+
import Checkbox from './components/checkbox';
|
12
7
|
import Divider from './components/divider';
|
13
|
-
import
|
8
|
+
import FormfieldGroup from './components/formfieldgroup';
|
9
|
+
import Icon from './components/icon';
|
10
|
+
import IconProvider from './components/iconprovider';
|
14
11
|
import Input from './components/input';
|
15
12
|
import Link from './components/link';
|
16
|
-
import
|
17
|
-
import
|
13
|
+
import List from './components/list';
|
14
|
+
import ListItem from './components/listitem';
|
15
|
+
import Marker from './components/marker';
|
16
|
+
import Popover from './components/popover';
|
17
|
+
import Presence from './components/presence';
|
18
18
|
import Radio from './components/radio';
|
19
|
-
import
|
19
|
+
import RadioGroup from './components/radiogroup';
|
20
|
+
import Spinner from './components/spinner';
|
20
21
|
import Tab from './components/tab';
|
21
|
-
import
|
22
|
+
import Text from './components/text';
|
23
|
+
import ThemeProvider from './components/themeprovider';
|
24
|
+
import Toggle from './components/toggle';
|
25
|
+
import VirtualizedList from './components/virtualizedlist';
|
22
26
|
import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
|
23
|
-
|
24
|
-
import RadioGroup from './components/radiogroup';
|
25
|
-
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Popover, Bullet, Marker, Divider, AvatarButton, Input, Link, Toggle, Checkbox, Radio, VirtualizedList, Tab, FormfieldGroup, Spinner, RadioGroup, };
|
27
|
+
export { Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Divider, FormfieldGroup, Icon, IconProvider, Input, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, };
|
26
28
|
export { inMemoryCache, webAPIIconsCache };
|
package/dist/react/index.d.ts
CHANGED
@@ -12,6 +12,8 @@ export { default as Icon } from './icon';
|
|
12
12
|
export { default as IconProvider } from './iconprovider';
|
13
13
|
export { default as Input } from './input';
|
14
14
|
export { default as Link } from './link';
|
15
|
+
export { default as List } from './list';
|
16
|
+
export { default as ListItem } from './listitem';
|
15
17
|
export { default as Marker } from './marker';
|
16
18
|
export { default as Modalcontainer } from './modalcontainer';
|
17
19
|
export { default as Popover } from './popover';
|
package/dist/react/index.js
CHANGED
@@ -12,6 +12,8 @@ export { default as Icon } from './icon';
|
|
12
12
|
export { default as IconProvider } from './iconprovider';
|
13
13
|
export { default as Input } from './input';
|
14
14
|
export { default as Link } from './link';
|
15
|
+
export { default as List } from './list';
|
16
|
+
export { default as ListItem } from './listitem';
|
15
17
|
export { default as Marker } from './marker';
|
16
18
|
export { default as Modalcontainer } from './modalcontainer';
|
17
19
|
export { default as Popover } from './popover';
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import Component from '../../components/list';
|
2
|
+
/**
|
3
|
+
* mdc-list component is used to display a group of list items. It is used as a container to wrap other list items.
|
4
|
+
*
|
5
|
+
* @tagname mdc-list
|
6
|
+
*
|
7
|
+
* @dependency mdc-text
|
8
|
+
*
|
9
|
+
* @slot default - This is a default/unnamed slot
|
10
|
+
*/
|
11
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
|
12
|
+
export default reactWrapper;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/list';
|
4
|
+
import { TAG_NAME } from '../../components/list/list.constants';
|
5
|
+
/**
|
6
|
+
* mdc-list component is used to display a group of list items. It is used as a container to wrap other list items.
|
7
|
+
*
|
8
|
+
* @tagname mdc-list
|
9
|
+
*
|
10
|
+
* @dependency mdc-text
|
11
|
+
*
|
12
|
+
* @slot default - This is a default/unnamed slot
|
13
|
+
*/
|
14
|
+
const reactWrapper = createComponent({
|
15
|
+
tagName: TAG_NAME,
|
16
|
+
elementClass: Component,
|
17
|
+
react: React,
|
18
|
+
events: {},
|
19
|
+
displayName: 'List',
|
20
|
+
});
|
21
|
+
export default reactWrapper;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import Component from '../../components/listitem';
|
2
|
+
/**
|
3
|
+
* mdc-listitem component is used to display a label with different types of controls.
|
4
|
+
* There can be three types of controls, a radio button, a checkbox on the
|
5
|
+
* leading side and a toggle on the trailing side.
|
6
|
+
* The list item can contain an avatar on the leading side and a badge on the trailing side.
|
7
|
+
* Additionally, the list item can contain a side header and a subline text.
|
8
|
+
*
|
9
|
+
* The leading and trailing slots can be used to display controls and text. <br/>
|
10
|
+
* Based on the leading/trailing slot, the position of the controls and text can be adjusted. <br/>
|
11
|
+
* Please use mdc-list as a parent element even when there is only listitem for a11y purpose.
|
12
|
+
*
|
13
|
+
* @tagname mdc-listitem
|
14
|
+
*
|
15
|
+
* @dependency mdc-text
|
16
|
+
*
|
17
|
+
* @slot leading-controls - slot for list item controls to appear of leading end.
|
18
|
+
* @slot leading-text-primary-label - slot for list item primary label.
|
19
|
+
* @slot leading-text-secondary-label - slot for list item secondary label.
|
20
|
+
* @slot leading-text-tertiary-label - slot for list item tertiary label.
|
21
|
+
* @slot trailing-text-side-header - slot for list item side header text.
|
22
|
+
* @slot trailing-text-subline - slot for list item subline text.
|
23
|
+
* @slot trailing-controls - slot for list item controls to appear of trailing end.
|
24
|
+
*
|
25
|
+
* @cssproperty --mdc-listitem-default-background-color - Allows customization of the default background color.
|
26
|
+
* @cssproperty --mdc-listitem-background-color-hover - Allows customization of the background color on hover.
|
27
|
+
* @cssproperty --mdc-listitem-background-color-active - Allows customization of the background color when pressed.
|
28
|
+
* @cssproperty --mdc-listitem-primary-label-color
|
29
|
+
* - Allows customization of the primary label, side header and subline text slot color.
|
30
|
+
* @cssproperty --mdc-listitem-secondary-label-color
|
31
|
+
* - Allows customization of the secondary and teritary label text slot color.
|
32
|
+
*/
|
33
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
|
34
|
+
export default reactWrapper;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/listitem';
|
4
|
+
import { TAG_NAME } from '../../components/listitem/listitem.constants';
|
5
|
+
/**
|
6
|
+
* mdc-listitem component is used to display a label with different types of controls.
|
7
|
+
* There can be three types of controls, a radio button, a checkbox on the
|
8
|
+
* leading side and a toggle on the trailing side.
|
9
|
+
* The list item can contain an avatar on the leading side and a badge on the trailing side.
|
10
|
+
* Additionally, the list item can contain a side header and a subline text.
|
11
|
+
*
|
12
|
+
* The leading and trailing slots can be used to display controls and text. <br/>
|
13
|
+
* Based on the leading/trailing slot, the position of the controls and text can be adjusted. <br/>
|
14
|
+
* Please use mdc-list as a parent element even when there is only listitem for a11y purpose.
|
15
|
+
*
|
16
|
+
* @tagname mdc-listitem
|
17
|
+
*
|
18
|
+
* @dependency mdc-text
|
19
|
+
*
|
20
|
+
* @slot leading-controls - slot for list item controls to appear of leading end.
|
21
|
+
* @slot leading-text-primary-label - slot for list item primary label.
|
22
|
+
* @slot leading-text-secondary-label - slot for list item secondary label.
|
23
|
+
* @slot leading-text-tertiary-label - slot for list item tertiary label.
|
24
|
+
* @slot trailing-text-side-header - slot for list item side header text.
|
25
|
+
* @slot trailing-text-subline - slot for list item subline text.
|
26
|
+
* @slot trailing-controls - slot for list item controls to appear of trailing end.
|
27
|
+
*
|
28
|
+
* @cssproperty --mdc-listitem-default-background-color - Allows customization of the default background color.
|
29
|
+
* @cssproperty --mdc-listitem-background-color-hover - Allows customization of the background color on hover.
|
30
|
+
* @cssproperty --mdc-listitem-background-color-active - Allows customization of the background color when pressed.
|
31
|
+
* @cssproperty --mdc-listitem-primary-label-color
|
32
|
+
* - Allows customization of the primary label, side header and subline text slot color.
|
33
|
+
* @cssproperty --mdc-listitem-secondary-label-color
|
34
|
+
* - Allows customization of the secondary and teritary label text slot color.
|
35
|
+
*/
|
36
|
+
const reactWrapper = createComponent({
|
37
|
+
tagName: TAG_NAME,
|
38
|
+
elementClass: Component,
|
39
|
+
react: React,
|
40
|
+
events: {},
|
41
|
+
displayName: 'ListItem',
|
42
|
+
});
|
43
|
+
export default reactWrapper;
|
@@ -8,7 +8,6 @@ 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
10
|
import { property, query } from 'lit/decorators.js';
|
11
|
-
import { v4 as uuidv4 } from 'uuid';
|
12
11
|
export const FormInternalsMixin = (superClass) => {
|
13
12
|
class InnerMixinClass extends superClass {
|
14
13
|
/** @internal */
|
@@ -36,7 +35,6 @@ export const FormInternalsMixin = (superClass) => {
|
|
36
35
|
this.value = '';
|
37
36
|
/** @internal */
|
38
37
|
this.internals = this.attachInternals();
|
39
|
-
this.id = `mdc-input-${uuidv4()}`;
|
40
38
|
}
|
41
39
|
/**
|
42
40
|
* Sets the validity of the input field based on the input field's validity.
|
package/package.json
CHANGED