@momentum-design/components 0.18.4 → 0.18.6

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 (35) hide show
  1. package/dist/browser/index.js +427 -62
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/components/checkbox/checkbox.component.d.ts +71 -0
  4. package/dist/components/checkbox/checkbox.component.js +150 -0
  5. package/dist/components/checkbox/checkbox.constants.d.ts +6 -0
  6. package/dist/components/checkbox/checkbox.constants.js +7 -0
  7. package/dist/components/checkbox/checkbox.styles.d.ts +2 -0
  8. package/dist/components/checkbox/checkbox.styles.js +106 -0
  9. package/dist/components/checkbox/index.d.ts +8 -0
  10. package/dist/components/checkbox/index.js +5 -0
  11. package/dist/components/formfieldwrapper/formfieldwrapper.constants.d.ts +3 -3
  12. package/dist/components/formfieldwrapper/formfieldwrapper.constants.js +3 -3
  13. package/dist/components/formfieldwrapper/formfieldwrapper.utils.js +4 -4
  14. package/dist/components/input/index.d.ts +10 -0
  15. package/dist/components/input/index.js +7 -0
  16. package/dist/components/input/input.component.d.ts +208 -0
  17. package/dist/components/input/input.component.js +401 -0
  18. package/dist/components/input/input.constants.d.ts +25 -0
  19. package/dist/components/input/input.constants.js +29 -0
  20. package/dist/components/input/input.styles.d.ts +2 -0
  21. package/dist/components/input/input.styles.js +118 -0
  22. package/dist/components/input/input.types.d.ts +4 -0
  23. package/dist/components/input/input.types.js +1 -0
  24. package/dist/custom-elements.json +2569 -1222
  25. package/dist/index.d.ts +3 -1
  26. package/dist/index.js +3 -1
  27. package/dist/react/checkbox/index.d.ts +27 -0
  28. package/dist/react/checkbox/index.js +36 -0
  29. package/dist/react/index.d.ts +5 -3
  30. package/dist/react/index.js +5 -3
  31. package/dist/react/input/index.d.ts +39 -0
  32. package/dist/react/input/index.js +48 -0
  33. package/dist/utils/mixins/DataAriaLabelMixin.d.ts +6 -0
  34. package/dist/utils/mixins/DataAriaLabelMixin.js +29 -0
  35. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -10,7 +10,9 @@ import Bullet from './components/bullet';
10
10
  import Marker from './components/marker';
11
11
  import Divider from './components/divider';
12
12
  import AvatarButton from './components/avatarbutton';
13
+ import Input from './components/input';
13
14
  import Link from './components/link';
15
+ import Checkbox from './components/checkbox';
14
16
  import type { TextType } from './components/text/text.types';
15
- export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, AvatarButton, Link, };
17
+ export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, AvatarButton, Input, Link, Checkbox, };
16
18
  export type { TextType, };
package/dist/index.js CHANGED
@@ -10,5 +10,7 @@ import Bullet from './components/bullet';
10
10
  import Marker from './components/marker';
11
11
  import Divider from './components/divider';
12
12
  import AvatarButton from './components/avatarbutton';
13
+ import Input from './components/input';
13
14
  import Link from './components/link';
14
- export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, AvatarButton, Link, };
15
+ import Checkbox from './components/checkbox';
16
+ export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, AvatarButton, Input, Link, Checkbox, };
@@ -0,0 +1,27 @@
1
+ import Component from '../../components/checkbox';
2
+ /**
3
+ * Checkboxes allow users to select multiple options from a list or turn an item/feature on or off.
4
+ * These are often used in forms, settings, and selections in lists.
5
+ *
6
+ * A checkbox component contains an optional label and an optional helper text.
7
+ *
8
+ * @dependency mdc-icon
9
+ *
10
+ * @tagname mdc-checkbox
11
+ *
12
+ * @cssproperty --mdc-checkbox-background-color-hover - Allows customization of the background color on hover.
13
+ * @cssproperty --mdc-checkbox-border-color - Border color in high contrast.
14
+ * @cssproperty --mdc-checkbox-checked-background-color - Background color for a selected checkbox.
15
+ * @cssproperty --mdc-checkbox-checked-background-color-hover - Background color for a selected checkbox when hovered.
16
+ * @cssproperty --mdc-checkbox-checked-pressed-icon-color - Background color for a selected checkbox when pressed.
17
+ * @cssproperty --mdc-checkbox-disabled-background-color - Background color for a disabled checkbox.
18
+ * @cssproperty --mdc-checkbox-disabled-border-color - Border color for a disabled checkbox.
19
+ * @cssproperty --mdc-checkbox-disabled-checked-icon-color - Background color for a disabled, selected checkbox.
20
+ * @cssproperty --mdc-checkbox-disabled-icon-color - Icon color for a disabled checkbox.
21
+ * @cssproperty --mdc-checkbox-icon-background-color - Background color for an unselected checkbox.
22
+ * @cssproperty --mdc-checkbox-icon-border-color - Default background color for an unselected checkbox.
23
+ * @cssproperty --mdc-checkbox-icon-color - Icon color for an unselected checkbox.
24
+ * @cssproperty --mdc-checkbox-pressed-icon-color - Background color for a selected checkbox when pressed.
25
+ */
26
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
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/checkbox';
4
+ import { TAG_NAME } from '../../components/checkbox/checkbox.constants';
5
+ /**
6
+ * Checkboxes allow users to select multiple options from a list or turn an item/feature on or off.
7
+ * These are often used in forms, settings, and selections in lists.
8
+ *
9
+ * A checkbox component contains an optional label and an optional helper text.
10
+ *
11
+ * @dependency mdc-icon
12
+ *
13
+ * @tagname mdc-checkbox
14
+ *
15
+ * @cssproperty --mdc-checkbox-background-color-hover - Allows customization of the background color on hover.
16
+ * @cssproperty --mdc-checkbox-border-color - Border color in high contrast.
17
+ * @cssproperty --mdc-checkbox-checked-background-color - Background color for a selected checkbox.
18
+ * @cssproperty --mdc-checkbox-checked-background-color-hover - Background color for a selected checkbox when hovered.
19
+ * @cssproperty --mdc-checkbox-checked-pressed-icon-color - Background color for a selected checkbox when pressed.
20
+ * @cssproperty --mdc-checkbox-disabled-background-color - Background color for a disabled checkbox.
21
+ * @cssproperty --mdc-checkbox-disabled-border-color - Border color for a disabled checkbox.
22
+ * @cssproperty --mdc-checkbox-disabled-checked-icon-color - Background color for a disabled, selected checkbox.
23
+ * @cssproperty --mdc-checkbox-disabled-icon-color - Icon color for a disabled checkbox.
24
+ * @cssproperty --mdc-checkbox-icon-background-color - Background color for an unselected checkbox.
25
+ * @cssproperty --mdc-checkbox-icon-border-color - Default background color for an unselected checkbox.
26
+ * @cssproperty --mdc-checkbox-icon-color - Icon color for an unselected checkbox.
27
+ * @cssproperty --mdc-checkbox-pressed-icon-color - Background color for a selected checkbox when pressed.
28
+ */
29
+ const reactWrapper = createComponent({
30
+ tagName: TAG_NAME,
31
+ elementClass: Component,
32
+ react: React,
33
+ events: {},
34
+ displayName: 'Checkbox',
35
+ });
36
+ export default reactWrapper;
@@ -1,16 +1,18 @@
1
1
  export { default as Avatar } from './avatar';
2
- export { default as Badge } from './badge';
3
2
  export { default as AvatarButton } from './avatarbutton';
4
- export { default as Bullet } from './bullet';
3
+ export { default as Badge } from './badge';
5
4
  export { default as Button } from './button';
6
5
  export { default as Buttonsimple } from './buttonsimple';
6
+ export { default as Bullet } from './bullet';
7
+ export { default as Checkbox } from './checkbox';
7
8
  export { default as Divider } from './divider';
8
9
  export { default as FormfieldWrapper } from './formfieldwrapper';
9
10
  export { default as Icon } from './icon';
10
11
  export { default as IconProvider } from './iconprovider';
12
+ export { default as Input } from './input';
11
13
  export { default as Link } from './link';
12
14
  export { default as Marker } from './marker';
13
- export { default as Modalcontainer } from './modalcontainer';
14
15
  export { default as Presence } from './presence';
16
+ export { default as Modalcontainer } from './modalcontainer';
15
17
  export { default as Text } from './text';
16
18
  export { default as ThemeProvider } from './themeprovider';
@@ -1,16 +1,18 @@
1
1
  export { default as Avatar } from './avatar';
2
- export { default as Badge } from './badge';
3
2
  export { default as AvatarButton } from './avatarbutton';
4
- export { default as Bullet } from './bullet';
3
+ export { default as Badge } from './badge';
5
4
  export { default as Button } from './button';
6
5
  export { default as Buttonsimple } from './buttonsimple';
6
+ export { default as Bullet } from './bullet';
7
+ export { default as Checkbox } from './checkbox';
7
8
  export { default as Divider } from './divider';
8
9
  export { default as FormfieldWrapper } from './formfieldwrapper';
9
10
  export { default as Icon } from './icon';
10
11
  export { default as IconProvider } from './iconprovider';
12
+ export { default as Input } from './input';
11
13
  export { default as Link } from './link';
12
14
  export { default as Marker } from './marker';
13
- export { default as Modalcontainer } from './modalcontainer';
14
15
  export { default as Presence } from './presence';
16
+ export { default as Modalcontainer } from './modalcontainer';
15
17
  export { default as Text } from './text';
16
18
  export { default as ThemeProvider } from './themeprovider';
@@ -0,0 +1,39 @@
1
+ import Component from '../../components/input';
2
+ /**
3
+ * mdc-input is a component that allows users to input text.
4
+ * It contains:
5
+ * - label field - describe the input field.
6
+ * - input field - contains the value
7
+ * - help text or validation message - displayed below the input field.
8
+ * - trailing button - it displays a clear the input field.
9
+ * - prefix text - displayed before the input field.
10
+ * - leading icon - displayed before the input field.
11
+ * - clear-aria-label - aria label for the trailing button.
12
+ * - all the attributes of the input field.
13
+ *
14
+ * @tagname mdc-input
15
+ *
16
+ * @dependency mdc-icon
17
+ * @dependency mdc-text
18
+ * @dependency mdc-button
19
+ *
20
+ * @cssproperty --mdc-input-disabled-border-color - Border color for the input container when disabled
21
+ * @cssproperty --mdc-input-disabled-text-color - Text color for the input field when disabled
22
+ * @cssproperty --mdc-input-disabled-background-color - Background color for the input field when disabled
23
+ * @cssproperty --mdc-input-border-color - Border color for the input container
24
+ * @cssproperty --mdc-input-text-color - Text color for the input field
25
+ * @cssproperty --mdc-input-background-color - Background color for the input field
26
+ * @cssproperty --mdc-input-selection-background-color - Background color for the selected text
27
+ * @cssproperty --mdc-input-selection-text-color - Text color for the selected text
28
+ * @cssproperty --mdc-input-support-text-color - Text color for the help text
29
+ * @cssproperty --mdc-input-hover-background-color - Background color for the input field when hovered
30
+ * @cssproperty --mdc-input-focused-background-color - Background color for the input field when focused
31
+ * @cssproperty --mdc-input-focused-border-color - Border color for the input container when focused
32
+ * @cssproperty --mdc-input-error-border-color - Border color for the input container when error
33
+ * @cssproperty --mdc-input-warning-border-color - Border color for the input container when warning
34
+ * @cssproperty --mdc-input-success-border-color - Border color for the input container when success
35
+ * @cssproperty --mdc-input-primary-border-color - Border color for the input container when primary
36
+ *
37
+ */
38
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
39
+ export default reactWrapper;
@@ -0,0 +1,48 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/input';
4
+ import { TAG_NAME } from '../../components/input/input.constants';
5
+ /**
6
+ * mdc-input is a component that allows users to input text.
7
+ * It contains:
8
+ * - label field - describe the input field.
9
+ * - input field - contains the value
10
+ * - help text or validation message - displayed below the input field.
11
+ * - trailing button - it displays a clear the input field.
12
+ * - prefix text - displayed before the input field.
13
+ * - leading icon - displayed before the input field.
14
+ * - clear-aria-label - aria label for the trailing button.
15
+ * - all the attributes of the input field.
16
+ *
17
+ * @tagname mdc-input
18
+ *
19
+ * @dependency mdc-icon
20
+ * @dependency mdc-text
21
+ * @dependency mdc-button
22
+ *
23
+ * @cssproperty --mdc-input-disabled-border-color - Border color for the input container when disabled
24
+ * @cssproperty --mdc-input-disabled-text-color - Text color for the input field when disabled
25
+ * @cssproperty --mdc-input-disabled-background-color - Background color for the input field when disabled
26
+ * @cssproperty --mdc-input-border-color - Border color for the input container
27
+ * @cssproperty --mdc-input-text-color - Text color for the input field
28
+ * @cssproperty --mdc-input-background-color - Background color for the input field
29
+ * @cssproperty --mdc-input-selection-background-color - Background color for the selected text
30
+ * @cssproperty --mdc-input-selection-text-color - Text color for the selected text
31
+ * @cssproperty --mdc-input-support-text-color - Text color for the help text
32
+ * @cssproperty --mdc-input-hover-background-color - Background color for the input field when hovered
33
+ * @cssproperty --mdc-input-focused-background-color - Background color for the input field when focused
34
+ * @cssproperty --mdc-input-focused-border-color - Border color for the input container when focused
35
+ * @cssproperty --mdc-input-error-border-color - Border color for the input container when error
36
+ * @cssproperty --mdc-input-warning-border-color - Border color for the input container when warning
37
+ * @cssproperty --mdc-input-success-border-color - Border color for the input container when success
38
+ * @cssproperty --mdc-input-primary-border-color - Border color for the input container when primary
39
+ *
40
+ */
41
+ const reactWrapper = createComponent({
42
+ tagName: TAG_NAME,
43
+ elementClass: Component,
44
+ react: React,
45
+ events: {},
46
+ displayName: 'Input',
47
+ });
48
+ export default reactWrapper;
@@ -0,0 +1,6 @@
1
+ import { LitElement } from 'lit';
2
+ import type { Constructor } from './index.types';
3
+ export interface DataAriaLabelMixinInterface {
4
+ dataAriaLabel: string | null;
5
+ }
6
+ export declare const DataAriaLabelMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<DataAriaLabelMixinInterface> & T;
@@ -0,0 +1,29 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { property } from 'lit/decorators.js';
11
+ export const DataAriaLabelMixin = (superClass) => {
12
+ class InnerMixinClass extends superClass {
13
+ constructor() {
14
+ super(...arguments);
15
+ /**
16
+ * Defines a string value that labels the current element.
17
+ * The Aria-Label attribute to be set for accessibility.
18
+ * @default null
19
+ */
20
+ this.dataAriaLabel = null;
21
+ }
22
+ }
23
+ __decorate([
24
+ property({ type: String, reflect: true, attribute: 'data-aria-label' }),
25
+ __metadata("design:type", Object)
26
+ ], InnerMixinClass.prototype, "dataAriaLabel", void 0);
27
+ // Cast return type to your mixin's interface intersected with the superClass type
28
+ return InnerMixinClass;
29
+ };
package/package.json CHANGED
@@ -36,5 +36,5 @@
36
36
  "lit": "^3.2.0",
37
37
  "uuid": "^11.0.5"
38
38
  },
39
- "version": "0.18.4"
39
+ "version": "0.18.6"
40
40
  }