@momentum-design/components 0.36.2 → 0.36.3

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.
Files changed (56) hide show
  1. package/dist/browser/index.js +782 -447
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/components/alertchip/alertchip.component.d.ts +46 -0
  4. package/dist/components/alertchip/alertchip.component.js +79 -0
  5. package/dist/components/alertchip/alertchip.constants.d.ts +16 -0
  6. package/dist/components/alertchip/alertchip.constants.js +19 -0
  7. package/dist/components/alertchip/alertchip.styles.d.ts +2 -0
  8. package/dist/components/alertchip/alertchip.styles.js +106 -0
  9. package/dist/components/alertchip/alertchip.types.d.ts +6 -0
  10. package/dist/components/alertchip/alertchip.types.js +1 -0
  11. package/dist/components/alertchip/alertchip.utils.d.ts +3 -0
  12. package/dist/components/alertchip/alertchip.utils.js +12 -0
  13. package/dist/components/alertchip/index.d.ts +9 -0
  14. package/dist/components/alertchip/index.js +6 -0
  15. package/dist/components/chip/chip.component.d.ts +57 -0
  16. package/dist/components/chip/chip.component.js +97 -0
  17. package/dist/components/chip/chip.constants.d.ts +20 -0
  18. package/dist/components/chip/chip.constants.js +23 -0
  19. package/dist/components/chip/chip.styles.d.ts +2 -0
  20. package/dist/components/chip/chip.styles.js +140 -0
  21. package/dist/components/chip/chip.types.d.ts +4 -0
  22. package/dist/components/chip/chip.types.js +1 -0
  23. package/dist/components/chip/index.d.ts +9 -0
  24. package/dist/components/chip/index.js +6 -0
  25. package/dist/components/filterchip/filterchip.component.d.ts +30 -0
  26. package/dist/components/filterchip/filterchip.component.js +64 -0
  27. package/dist/components/filterchip/filterchip.constants.d.ts +6 -0
  28. package/dist/components/filterchip/filterchip.constants.js +7 -0
  29. package/dist/components/filterchip/filterchip.styles.d.ts +2 -0
  30. package/dist/components/filterchip/filterchip.styles.js +23 -0
  31. package/dist/components/filterchip/index.d.ts +7 -0
  32. package/dist/components/filterchip/index.js +4 -0
  33. package/dist/components/input/input.constants.d.ts +0 -1
  34. package/dist/components/input/input.constants.js +0 -1
  35. package/dist/components/inputchip/index.d.ts +10 -0
  36. package/dist/components/inputchip/index.js +7 -0
  37. package/dist/components/inputchip/inputchip.component.d.ts +58 -0
  38. package/dist/components/inputchip/inputchip.component.js +113 -0
  39. package/dist/components/inputchip/inputchip.constants.d.ts +7 -0
  40. package/dist/components/inputchip/inputchip.constants.js +9 -0
  41. package/dist/components/inputchip/inputchip.styles.d.ts +2 -0
  42. package/dist/components/inputchip/inputchip.styles.js +53 -0
  43. package/dist/custom-elements.json +2955 -1199
  44. package/dist/index.d.ts +5 -1
  45. package/dist/index.js +5 -1
  46. package/dist/react/alertchip/index.d.ts +27 -0
  47. package/dist/react/alertchip/index.js +36 -0
  48. package/dist/react/chip/index.d.ts +28 -0
  49. package/dist/react/chip/index.js +37 -0
  50. package/dist/react/filterchip/index.d.ts +17 -0
  51. package/dist/react/filterchip/index.js +26 -0
  52. package/dist/react/index.d.ts +5 -1
  53. package/dist/react/index.js +5 -1
  54. package/dist/react/inputchip/index.d.ts +32 -0
  55. package/dist/react/inputchip/index.js +41 -0
  56. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,15 +1,19 @@
1
+ import AlertChip from './components/alertchip';
1
2
  import Avatar from './components/avatar';
2
3
  import AvatarButton from './components/avatarbutton';
3
4
  import Badge from './components/badge';
4
5
  import Bullet from './components/bullet';
5
6
  import Button from './components/button';
6
7
  import Checkbox from './components/checkbox';
8
+ import Chip from './components/chip';
7
9
  import Coachmark from './components/coachmark';
8
10
  import Divider from './components/divider';
11
+ import FilterChip from './components/filterchip';
9
12
  import FormfieldGroup from './components/formfieldgroup';
10
13
  import Icon from './components/icon';
11
14
  import IconProvider from './components/iconprovider';
12
15
  import Input from './components/input';
16
+ import InputChip from './components/inputchip';
13
17
  import Link from './components/link';
14
18
  import List from './components/list';
15
19
  import ListItem from './components/listitem';
@@ -31,6 +35,6 @@ import OptGroup from './components/optgroup';
31
35
  import Textarea from './components/textarea';
32
36
  import type { SpinnerSize, SpinnerVariant } from './components/spinner/spinner.types';
33
37
  import type { TextType } from './components/text/text.types';
34
- export { Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Coachmark, Divider, FormfieldGroup, Icon, IconProvider, Input, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, Option, OptGroup, Textarea, Tooltip, };
38
+ export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Chip, Coachmark, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, Option, OptGroup, Textarea, Tooltip, };
35
39
  export type { TextType, SpinnerSize, SpinnerVariant, };
36
40
  export { inMemoryCache, webAPIIconsCache };
package/dist/index.js CHANGED
@@ -1,15 +1,19 @@
1
+ import AlertChip from './components/alertchip';
1
2
  import Avatar from './components/avatar';
2
3
  import AvatarButton from './components/avatarbutton';
3
4
  import Badge from './components/badge';
4
5
  import Bullet from './components/bullet';
5
6
  import Button from './components/button';
6
7
  import Checkbox from './components/checkbox';
8
+ import Chip from './components/chip';
7
9
  import Coachmark from './components/coachmark';
8
10
  import Divider from './components/divider';
11
+ import FilterChip from './components/filterchip';
9
12
  import FormfieldGroup from './components/formfieldgroup';
10
13
  import Icon from './components/icon';
11
14
  import IconProvider from './components/iconprovider';
12
15
  import Input from './components/input';
16
+ import InputChip from './components/inputchip';
13
17
  import Link from './components/link';
14
18
  import List from './components/list';
15
19
  import ListItem from './components/listitem';
@@ -29,5 +33,5 @@ import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
29
33
  import Option from './components/option';
30
34
  import OptGroup from './components/optgroup';
31
35
  import Textarea from './components/textarea';
32
- export { Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Coachmark, Divider, FormfieldGroup, Icon, IconProvider, Input, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, Option, OptGroup, Textarea, Tooltip, };
36
+ export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Chip, Coachmark, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, Option, OptGroup, Textarea, Tooltip, };
33
37
  export { inMemoryCache, webAPIIconsCache };
@@ -0,0 +1,27 @@
1
+ import Component from '../../components/alertchip';
2
+ /**
3
+ * mdc-alertchip component is an interactive chip that consumers can use to represent an alert.
4
+ *
5
+ * - It supports a leading icon along with label.
6
+ * - It supports 5 variants of alerts - neutral, warning, error, success, and informational
7
+ *
8
+ * This component is built by extending Buttonsimple.
9
+ *
10
+ * @tagname mdc-alertchip
11
+ *
12
+ * @dependency mdc-icon
13
+ * @dependency mdc-text
14
+ *
15
+ * @cssproperty --mdc-chip-color - The color of the label text
16
+ * @cssproperty --mdc-chip-icon-color - The color of the icon
17
+ * @cssproperty --mdc-chip-border-color - The border color of the alertchip
18
+ * @cssproperty --mdc-chip-background-color - The background color of the alertchip
19
+ *
20
+ */
21
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
22
+ onClick: string;
23
+ onKeyDown: string;
24
+ onKeyUp: string;
25
+ onFocus: string;
26
+ }>;
27
+ export default reactWrapper;
@@ -0,0 +1,36 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/alertchip';
4
+ import { TAG_NAME } from '../../components/alertchip/alertchip.constants';
5
+ /**
6
+ * mdc-alertchip component is an interactive chip that consumers can use to represent an alert.
7
+ *
8
+ * - It supports a leading icon along with label.
9
+ * - It supports 5 variants of alerts - neutral, warning, error, success, and informational
10
+ *
11
+ * This component is built by extending Buttonsimple.
12
+ *
13
+ * @tagname mdc-alertchip
14
+ *
15
+ * @dependency mdc-icon
16
+ * @dependency mdc-text
17
+ *
18
+ * @cssproperty --mdc-chip-color - The color of the label text
19
+ * @cssproperty --mdc-chip-icon-color - The color of the icon
20
+ * @cssproperty --mdc-chip-border-color - The border color of the alertchip
21
+ * @cssproperty --mdc-chip-background-color - The background color of the alertchip
22
+ *
23
+ */
24
+ const reactWrapper = createComponent({
25
+ tagName: TAG_NAME,
26
+ elementClass: Component,
27
+ react: React,
28
+ events: {
29
+ onClick: 'click',
30
+ onKeyDown: 'keydown',
31
+ onKeyUp: 'keyup',
32
+ onFocus: 'focus',
33
+ },
34
+ displayName: 'AlertChip',
35
+ });
36
+ export default reactWrapper;
@@ -0,0 +1,28 @@
1
+ import Component from '../../components/chip';
2
+ /**
3
+ * mdc-chip is an interactive element that can be used to represent a chip. It supports a leading icon along with label.
4
+ * Consumers can wrap this component around a tooltip to provide additional context.
5
+ *
6
+ * It is recommended to keep the label text for the chip component concise and compact.
7
+ * For best results, we recommend limiting the <b>maximum length of the label text to 20 characters</b>,
8
+ * including empty spaces to split words.
9
+ *
10
+ * This component is built by extending Buttonsimple.
11
+ *
12
+ * @tagname mdc-chip
13
+ *
14
+ * @dependency mdc-icon
15
+ * @dependency mdc-text
16
+ *
17
+ * @cssproperty --mdc-chip-color - The color of the chip.
18
+ * @cssproperty --mdc-chip-border-color - The border color of the chip.
19
+ * @cssproperty --mdc-chip-background-color - The background color of the chip.
20
+ *
21
+ */
22
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
23
+ onClick: string;
24
+ onKeyDown: string;
25
+ onKeyUp: string;
26
+ onFocus: string;
27
+ }>;
28
+ export default reactWrapper;
@@ -0,0 +1,37 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/chip';
4
+ import { TAG_NAME } from '../../components/chip/chip.constants';
5
+ /**
6
+ * mdc-chip is an interactive element that can be used to represent a chip. It supports a leading icon along with label.
7
+ * Consumers can wrap this component around a tooltip to provide additional context.
8
+ *
9
+ * It is recommended to keep the label text for the chip component concise and compact.
10
+ * For best results, we recommend limiting the <b>maximum length of the label text to 20 characters</b>,
11
+ * including empty spaces to split words.
12
+ *
13
+ * This component is built by extending Buttonsimple.
14
+ *
15
+ * @tagname mdc-chip
16
+ *
17
+ * @dependency mdc-icon
18
+ * @dependency mdc-text
19
+ *
20
+ * @cssproperty --mdc-chip-color - The color of the chip.
21
+ * @cssproperty --mdc-chip-border-color - The border color of the chip.
22
+ * @cssproperty --mdc-chip-background-color - The background color of the chip.
23
+ *
24
+ */
25
+ const reactWrapper = createComponent({
26
+ tagName: TAG_NAME,
27
+ elementClass: Component,
28
+ react: React,
29
+ events: {
30
+ onClick: 'click',
31
+ onKeyDown: 'keydown',
32
+ onKeyUp: 'keyup',
33
+ onFocus: 'focus',
34
+ },
35
+ displayName: 'Chip',
36
+ });
37
+ export default reactWrapper;
@@ -0,0 +1,17 @@
1
+ import Component from '../../components/filterchip';
2
+ /**
3
+ * mdc-filterchip component is an interactive chip that consumers can use to select or deselect.
4
+ * They can be found with lists or tables as quick filters.
5
+ *
6
+ * This component is built on top of the mdc-chip component.
7
+ *
8
+ * @tagname mdc-filterchip
9
+ *
10
+ */
11
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
12
+ onClick: string;
13
+ onKeyDown: string;
14
+ onKeyUp: string;
15
+ onFocus: string;
16
+ }>;
17
+ export default reactWrapper;
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/filterchip';
4
+ import { TAG_NAME } from '../../components/filterchip/filterchip.constants';
5
+ /**
6
+ * mdc-filterchip component is an interactive chip that consumers can use to select or deselect.
7
+ * They can be found with lists or tables as quick filters.
8
+ *
9
+ * This component is built on top of the mdc-chip component.
10
+ *
11
+ * @tagname mdc-filterchip
12
+ *
13
+ */
14
+ const reactWrapper = createComponent({
15
+ tagName: TAG_NAME,
16
+ elementClass: Component,
17
+ react: React,
18
+ events: {
19
+ onClick: 'click',
20
+ onKeyDown: 'keydown',
21
+ onKeyUp: 'keyup',
22
+ onFocus: 'focus',
23
+ },
24
+ displayName: 'FilterChip',
25
+ });
26
+ export default reactWrapper;
@@ -1,17 +1,21 @@
1
- export { default as Avatar } from './avatar';
1
+ export { default as AlertChip } from './alertchip';
2
2
  export { default as AvatarButton } from './avatarbutton';
3
+ export { default as Avatar } from './avatar';
3
4
  export { default as Badge } from './badge';
4
5
  export { default as Bullet } from './bullet';
5
6
  export { default as Button } from './button';
6
7
  export { default as Buttonsimple } from './buttonsimple';
7
8
  export { default as Checkbox } from './checkbox';
9
+ export { default as Chip } from './chip';
8
10
  export { default as Coachmark } from './coachmark';
9
11
  export { default as Divider } from './divider';
12
+ export { default as FilterChip } from './filterchip';
10
13
  export { default as FormfieldGroup } from './formfieldgroup';
11
14
  export { default as FormfieldWrapper } from './formfieldwrapper';
12
15
  export { default as Icon } from './icon';
13
16
  export { default as IconProvider } from './iconprovider';
14
17
  export { default as Input } from './input';
18
+ export { default as InputChip } from './inputchip';
15
19
  export { default as Link } from './link';
16
20
  export { default as List } from './list';
17
21
  export { default as ListItem } from './listitem';
@@ -1,17 +1,21 @@
1
- export { default as Avatar } from './avatar';
1
+ export { default as AlertChip } from './alertchip';
2
2
  export { default as AvatarButton } from './avatarbutton';
3
+ export { default as Avatar } from './avatar';
3
4
  export { default as Badge } from './badge';
4
5
  export { default as Bullet } from './bullet';
5
6
  export { default as Button } from './button';
6
7
  export { default as Buttonsimple } from './buttonsimple';
7
8
  export { default as Checkbox } from './checkbox';
9
+ export { default as Chip } from './chip';
8
10
  export { default as Coachmark } from './coachmark';
9
11
  export { default as Divider } from './divider';
12
+ export { default as FilterChip } from './filterchip';
10
13
  export { default as FormfieldGroup } from './formfieldgroup';
11
14
  export { default as FormfieldWrapper } from './formfieldwrapper';
12
15
  export { default as Icon } from './icon';
13
16
  export { default as IconProvider } from './iconprovider';
14
17
  export { default as Input } from './input';
18
+ export { default as InputChip } from './inputchip';
15
19
  export { default as Link } from './link';
16
20
  export { default as List } from './list';
17
21
  export { default as ListItem } from './listitem';
@@ -0,0 +1,32 @@
1
+ import Component from '../../components/inputchip';
2
+ /**
3
+ * mdc-inputchip component is an interactive chip that consumers can use to represent an input.
4
+ *
5
+ * - It supports a leading icon along with label.
6
+ * - It supports an error state for validation.
7
+ * - It supports a close button to remove the chip.
8
+ *
9
+ * @tagname mdc-inputchip
10
+ *
11
+ * @dependency mdc-button
12
+ * @dependency mdc-icon
13
+ * @dependency mdc-text
14
+ *
15
+ * @event click - (React: onClick) This event is dispatched when the close button is clicked.
16
+ * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the close button.
17
+ * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the close button.
18
+ * @event focus - (React: onFocus) This event is dispatched when the close button receives focus.
19
+ *
20
+ * @cssproperty --mdc-chip-color - The color of the chip.
21
+ * @cssproperty --mdc-chip-border-color - The border color of the chip.
22
+ * @cssproperty --mdc-chip-background-color - The background color of the chip.
23
+ *
24
+ */
25
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
26
+ undefined: string;
27
+ onClick: string;
28
+ onKeyDown: string;
29
+ onKeyUp: string;
30
+ onFocus: string;
31
+ }>;
32
+ export default reactWrapper;
@@ -0,0 +1,41 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/inputchip';
4
+ import { TAG_NAME } from '../../components/inputchip/inputchip.constants';
5
+ /**
6
+ * mdc-inputchip component is an interactive chip that consumers can use to represent an input.
7
+ *
8
+ * - It supports a leading icon along with label.
9
+ * - It supports an error state for validation.
10
+ * - It supports a close button to remove the chip.
11
+ *
12
+ * @tagname mdc-inputchip
13
+ *
14
+ * @dependency mdc-button
15
+ * @dependency mdc-icon
16
+ * @dependency mdc-text
17
+ *
18
+ * @event click - (React: onClick) This event is dispatched when the close button is clicked.
19
+ * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the close button.
20
+ * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the close button.
21
+ * @event focus - (React: onFocus) This event is dispatched when the close button receives focus.
22
+ *
23
+ * @cssproperty --mdc-chip-color - The color of the chip.
24
+ * @cssproperty --mdc-chip-border-color - The border color of the chip.
25
+ * @cssproperty --mdc-chip-background-color - The background color of the chip.
26
+ *
27
+ */
28
+ const reactWrapper = createComponent({
29
+ tagName: TAG_NAME,
30
+ elementClass: Component,
31
+ react: React,
32
+ events: {
33
+ undefined: 'undefined',
34
+ onClick: 'click',
35
+ onKeyDown: 'keydown',
36
+ onKeyUp: 'keyup',
37
+ onFocus: 'focus',
38
+ },
39
+ displayName: 'InputChip',
40
+ });
41
+ export default reactWrapper;
package/package.json CHANGED
@@ -38,5 +38,5 @@
38
38
  "lit": "^3.2.0",
39
39
  "uuid": "^11.0.5"
40
40
  },
41
- "version": "0.36.2"
41
+ "version": "0.36.3"
42
42
  }