@momentum-design/components 0.18.3 → 0.18.5
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 +250 -76
- package/dist/browser/index.js.map +4 -4
- package/dist/components/badge/badge.component.d.ts +12 -0
- package/dist/components/badge/badge.component.js +12 -0
- package/dist/components/checkbox/checkbox.component.d.ts +71 -0
- package/dist/components/checkbox/checkbox.component.js +150 -0
- package/dist/components/checkbox/checkbox.constants.d.ts +6 -0
- package/dist/components/checkbox/checkbox.constants.js +7 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +2 -0
- package/dist/components/checkbox/checkbox.styles.js +106 -0
- package/dist/components/checkbox/index.d.ts +8 -0
- package/dist/components/checkbox/index.js +5 -0
- package/dist/components/icon/icon.component.d.ts +2 -0
- package/dist/components/icon/icon.component.js +2 -0
- package/dist/components/presence/presence.component.d.ts +16 -0
- package/dist/components/presence/presence.component.js +16 -0
- package/dist/components/presence/presence.styles.js +0 -14
- package/dist/custom-elements.json +656 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/badge/index.d.ts +12 -0
- package/dist/react/badge/index.js +12 -0
- package/dist/react/checkbox/index.d.ts +27 -0
- package/dist/react/checkbox/index.js +36 -0
- package/dist/react/icon/index.d.ts +2 -0
- package/dist/react/icon/index.js +2 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/react/presence/index.d.ts +16 -0
- package/dist/react/presence/index.js +16 -0
- package/dist/utils/mixins/DataAriaLabelMixin.d.ts +6 -0
- package/dist/utils/mixins/DataAriaLabelMixin.js +29 -0
- package/package.json +1 -1
@@ -23,6 +23,18 @@ import type { IconVariant, BadgeType } from './badge.types';
|
|
23
23
|
* @dependency mdc-text
|
24
24
|
*
|
25
25
|
* @tagname mdc-badge
|
26
|
+
*
|
27
|
+
* @cssproperty --mdc-badge-primary-foreground-color - The foreground color of the primary badge.
|
28
|
+
* @cssproperty --mdc-badge-primary-background-color - The background color of the primary badge.
|
29
|
+
* @cssproperty --mdc-badge-secondary-foreground-color - The foreground color of the secondary badge.
|
30
|
+
* @cssproperty --mdc-badge-secondary-background-color - The background color of the secondary badge.
|
31
|
+
* @cssproperty --mdc-badge-success-foreground-color - The foreground color of the success badge.
|
32
|
+
* @cssproperty --mdc-badge-success-background-color - The background color of the success badge.
|
33
|
+
* @cssproperty --mdc-badge-warning-foreground-color - The foreground color of the warning badge.
|
34
|
+
* @cssproperty --mdc-badge-warning-background-color - The background color of the warning badge.
|
35
|
+
* @cssproperty --mdc-badge-error-foreground-color - The foreground color of the error badge.
|
36
|
+
* @cssproperty --mdc-badge-error-background-color - The background color of the error badge.
|
37
|
+
* @cssproperty --mdc-badge-overlay-background-color - The background color of the badge overlay.
|
26
38
|
*/
|
27
39
|
declare class Badge extends Component {
|
28
40
|
/**
|
@@ -36,6 +36,18 @@ import styles from './badge.styles';
|
|
36
36
|
* @dependency mdc-text
|
37
37
|
*
|
38
38
|
* @tagname mdc-badge
|
39
|
+
*
|
40
|
+
* @cssproperty --mdc-badge-primary-foreground-color - The foreground color of the primary badge.
|
41
|
+
* @cssproperty --mdc-badge-primary-background-color - The background color of the primary badge.
|
42
|
+
* @cssproperty --mdc-badge-secondary-foreground-color - The foreground color of the secondary badge.
|
43
|
+
* @cssproperty --mdc-badge-secondary-background-color - The background color of the secondary badge.
|
44
|
+
* @cssproperty --mdc-badge-success-foreground-color - The foreground color of the success badge.
|
45
|
+
* @cssproperty --mdc-badge-success-background-color - The background color of the success badge.
|
46
|
+
* @cssproperty --mdc-badge-warning-foreground-color - The foreground color of the warning badge.
|
47
|
+
* @cssproperty --mdc-badge-warning-background-color - The background color of the warning badge.
|
48
|
+
* @cssproperty --mdc-badge-error-foreground-color - The foreground color of the error badge.
|
49
|
+
* @cssproperty --mdc-badge-error-background-color - The background color of the error badge.
|
50
|
+
* @cssproperty --mdc-badge-overlay-background-color - The background color of the badge overlay.
|
39
51
|
*/
|
40
52
|
class Badge extends Component {
|
41
53
|
constructor() {
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import { CSSResult, PropertyValues } from 'lit';
|
2
|
+
import FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';
|
3
|
+
declare const Checkbox_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/NameMixin").NameMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/ValueMixin").ValueMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
|
4
|
+
/**
|
5
|
+
* Checkboxes allow users to select multiple options from a list or turn an item/feature on or off.
|
6
|
+
* These are often used in forms, settings, and selections in lists.
|
7
|
+
*
|
8
|
+
* A checkbox component contains an optional label and an optional helper text.
|
9
|
+
*
|
10
|
+
* @dependency mdc-icon
|
11
|
+
*
|
12
|
+
* @tagname mdc-checkbox
|
13
|
+
*
|
14
|
+
* @cssproperty --mdc-checkbox-background-color-hover - Allows customization of the background color on hover.
|
15
|
+
* @cssproperty --mdc-checkbox-border-color - Border color in high contrast.
|
16
|
+
* @cssproperty --mdc-checkbox-checked-background-color - Background color for a selected checkbox.
|
17
|
+
* @cssproperty --mdc-checkbox-checked-background-color-hover - Background color for a selected checkbox when hovered.
|
18
|
+
* @cssproperty --mdc-checkbox-checked-pressed-icon-color - Background color for a selected checkbox when pressed.
|
19
|
+
* @cssproperty --mdc-checkbox-disabled-background-color - Background color for a disabled checkbox.
|
20
|
+
* @cssproperty --mdc-checkbox-disabled-border-color - Border color for a disabled checkbox.
|
21
|
+
* @cssproperty --mdc-checkbox-disabled-checked-icon-color - Background color for a disabled, selected checkbox.
|
22
|
+
* @cssproperty --mdc-checkbox-disabled-icon-color - Icon color for a disabled checkbox.
|
23
|
+
* @cssproperty --mdc-checkbox-icon-background-color - Background color for an unselected checkbox.
|
24
|
+
* @cssproperty --mdc-checkbox-icon-border-color - Default background color for an unselected checkbox.
|
25
|
+
* @cssproperty --mdc-checkbox-icon-color - Icon color for an unselected checkbox.
|
26
|
+
* @cssproperty --mdc-checkbox-pressed-icon-color - Background color for a selected checkbox when pressed.
|
27
|
+
*/
|
28
|
+
declare class Checkbox extends Checkbox_base {
|
29
|
+
/**
|
30
|
+
* Determines whether the checkbox is selected or unselected.
|
31
|
+
*
|
32
|
+
* @default false
|
33
|
+
*/
|
34
|
+
checked: boolean;
|
35
|
+
/**
|
36
|
+
* This property is used to determine the parent checkbox in a nested checkbox group.
|
37
|
+
* If any one of the children is unselected, then the parent checkbox will be indeterminate.
|
38
|
+
* If all children are either selected or unselected, then the parent checkbox will not be indeterminate.
|
39
|
+
*
|
40
|
+
* @default false
|
41
|
+
*/
|
42
|
+
indeterminate: boolean;
|
43
|
+
/** @internal */
|
44
|
+
private internals;
|
45
|
+
/** @internal */
|
46
|
+
static formAssociated: boolean;
|
47
|
+
/** @internal */
|
48
|
+
get form(): HTMLFormElement | null;
|
49
|
+
constructor();
|
50
|
+
/**
|
51
|
+
* Updates the form value to reflect the current state of the checkbox.
|
52
|
+
* If checked, the value is set to either the user-provided value or 'on' if no value is provided.
|
53
|
+
* If unchecked, the value is set to null.
|
54
|
+
*/
|
55
|
+
private setFormValue;
|
56
|
+
/**
|
57
|
+
* Toggles the state of the checkbox element.
|
58
|
+
* If the element is not disabled, then
|
59
|
+
* the checked property is toggled and the indeterminate property is set to false.
|
60
|
+
*/
|
61
|
+
private toggleState;
|
62
|
+
/**
|
63
|
+
* Toggles the state of the checkbox element.
|
64
|
+
* and dispatch the new event.
|
65
|
+
*/
|
66
|
+
handleChange(event: Event): void;
|
67
|
+
update(changedProperties: PropertyValues): void;
|
68
|
+
render(): import("lit-html").TemplateResult<1>;
|
69
|
+
static styles: Array<CSSResult>;
|
70
|
+
}
|
71
|
+
export default Checkbox;
|
@@ -0,0 +1,150 @@
|
|
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 { html, nothing } from 'lit';
|
11
|
+
import { property } from 'lit/decorators.js';
|
12
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
13
|
+
import { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';
|
14
|
+
import { NameMixin } from '../../utils/mixins/NameMixin';
|
15
|
+
import { ValueMixin } from '../../utils/mixins/ValueMixin';
|
16
|
+
import FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';
|
17
|
+
import { ICON_NAME } from './checkbox.constants';
|
18
|
+
import styles from './checkbox.styles';
|
19
|
+
/**
|
20
|
+
* Checkboxes allow users to select multiple options from a list or turn an item/feature on or off.
|
21
|
+
* These are often used in forms, settings, and selections in lists.
|
22
|
+
*
|
23
|
+
* A checkbox component contains an optional label and an optional helper text.
|
24
|
+
*
|
25
|
+
* @dependency mdc-icon
|
26
|
+
*
|
27
|
+
* @tagname mdc-checkbox
|
28
|
+
*
|
29
|
+
* @cssproperty --mdc-checkbox-background-color-hover - Allows customization of the background color on hover.
|
30
|
+
* @cssproperty --mdc-checkbox-border-color - Border color in high contrast.
|
31
|
+
* @cssproperty --mdc-checkbox-checked-background-color - Background color for a selected checkbox.
|
32
|
+
* @cssproperty --mdc-checkbox-checked-background-color-hover - Background color for a selected checkbox when hovered.
|
33
|
+
* @cssproperty --mdc-checkbox-checked-pressed-icon-color - Background color for a selected checkbox when pressed.
|
34
|
+
* @cssproperty --mdc-checkbox-disabled-background-color - Background color for a disabled checkbox.
|
35
|
+
* @cssproperty --mdc-checkbox-disabled-border-color - Border color for a disabled checkbox.
|
36
|
+
* @cssproperty --mdc-checkbox-disabled-checked-icon-color - Background color for a disabled, selected checkbox.
|
37
|
+
* @cssproperty --mdc-checkbox-disabled-icon-color - Icon color for a disabled checkbox.
|
38
|
+
* @cssproperty --mdc-checkbox-icon-background-color - Background color for an unselected checkbox.
|
39
|
+
* @cssproperty --mdc-checkbox-icon-border-color - Default background color for an unselected checkbox.
|
40
|
+
* @cssproperty --mdc-checkbox-icon-color - Icon color for an unselected checkbox.
|
41
|
+
* @cssproperty --mdc-checkbox-pressed-icon-color - Background color for a selected checkbox when pressed.
|
42
|
+
*/
|
43
|
+
class Checkbox extends NameMixin(ValueMixin(DataAriaLabelMixin(FormfieldWrapper))) {
|
44
|
+
/** @internal */
|
45
|
+
get form() {
|
46
|
+
return this.internals.form;
|
47
|
+
}
|
48
|
+
constructor() {
|
49
|
+
super();
|
50
|
+
/**
|
51
|
+
* Determines whether the checkbox is selected or unselected.
|
52
|
+
*
|
53
|
+
* @default false
|
54
|
+
*/
|
55
|
+
this.checked = false;
|
56
|
+
/**
|
57
|
+
* This property is used to determine the parent checkbox in a nested checkbox group.
|
58
|
+
* If any one of the children is unselected, then the parent checkbox will be indeterminate.
|
59
|
+
* If all children are either selected or unselected, then the parent checkbox will not be indeterminate.
|
60
|
+
*
|
61
|
+
* @default false
|
62
|
+
*/
|
63
|
+
this.indeterminate = false;
|
64
|
+
this.internals = this.attachInternals();
|
65
|
+
// Checkbox does not contain helpTextType property.
|
66
|
+
this.helpTextType = undefined;
|
67
|
+
}
|
68
|
+
/**
|
69
|
+
* Updates the form value to reflect the current state of the checkbox.
|
70
|
+
* If checked, the value is set to either the user-provided value or 'on' if no value is provided.
|
71
|
+
* If unchecked, the value is set to null.
|
72
|
+
*/
|
73
|
+
setFormValue() {
|
74
|
+
let actualValue = null;
|
75
|
+
if (this.checked) {
|
76
|
+
actualValue = !this.value ? 'on' : this.value;
|
77
|
+
}
|
78
|
+
this.internals.setFormValue(actualValue);
|
79
|
+
}
|
80
|
+
/**
|
81
|
+
* Toggles the state of the checkbox element.
|
82
|
+
* If the element is not disabled, then
|
83
|
+
* the checked property is toggled and the indeterminate property is set to false.
|
84
|
+
*/
|
85
|
+
toggleState() {
|
86
|
+
if (!this.disabled) {
|
87
|
+
this.checked = !this.checked;
|
88
|
+
this.indeterminate = false;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
/**
|
92
|
+
* Toggles the state of the checkbox element.
|
93
|
+
* and dispatch the new event.
|
94
|
+
*/
|
95
|
+
handleChange(event) {
|
96
|
+
this.toggleState();
|
97
|
+
this.dispatchEvent(new Event(event.type, event));
|
98
|
+
}
|
99
|
+
update(changedProperties) {
|
100
|
+
super.update(changedProperties);
|
101
|
+
if (changedProperties.has('checked')) {
|
102
|
+
this.setFormValue();
|
103
|
+
}
|
104
|
+
}
|
105
|
+
render() {
|
106
|
+
var _a;
|
107
|
+
const checkboxIconContent = (this.checked || this.indeterminate) ? html `
|
108
|
+
<mdc-icon
|
109
|
+
class="icon"
|
110
|
+
name="${this.indeterminate ? ICON_NAME.INDETERMINATE : ICON_NAME.CHECKED}"
|
111
|
+
size="1"
|
112
|
+
length-unit="rem"
|
113
|
+
></mdc-icon>
|
114
|
+
` : nothing;
|
115
|
+
const helpTextContent = this.helpText ? this.renderHelperText() : nothing;
|
116
|
+
return html `
|
117
|
+
<div class="container mdc-focus-ring">
|
118
|
+
<input
|
119
|
+
id="${this.id}"
|
120
|
+
type="checkbox"
|
121
|
+
class="input"
|
122
|
+
name="${ifDefined(this.name)}"
|
123
|
+
value="${ifDefined(this.value)}"
|
124
|
+
.checked="${this.checked}"
|
125
|
+
.indeterminate="${this.indeterminate}"
|
126
|
+
.disabled="${this.disabled}"
|
127
|
+
aria-label="${(_a = this.dataAriaLabel) !== null && _a !== void 0 ? _a : ''}"
|
128
|
+
@change=${this.handleChange}
|
129
|
+
/>
|
130
|
+
<div class="icon-container">${checkboxIconContent}</div>
|
131
|
+
</div>
|
132
|
+
<div class="text-container">
|
133
|
+
${this.renderLabel()}
|
134
|
+
${helpTextContent}
|
135
|
+
</div>
|
136
|
+
`;
|
137
|
+
}
|
138
|
+
}
|
139
|
+
/** @internal */
|
140
|
+
Checkbox.formAssociated = true;
|
141
|
+
Checkbox.styles = [...FormfieldWrapper.styles, ...styles];
|
142
|
+
__decorate([
|
143
|
+
property({ type: Boolean, reflect: true }),
|
144
|
+
__metadata("design:type", Object)
|
145
|
+
], Checkbox.prototype, "checked", void 0);
|
146
|
+
__decorate([
|
147
|
+
property({ type: Boolean, reflect: true }),
|
148
|
+
__metadata("design:type", Object)
|
149
|
+
], Checkbox.prototype, "indeterminate", void 0);
|
150
|
+
export default Checkbox;
|
@@ -0,0 +1,106 @@
|
|
1
|
+
import { css } from 'lit';
|
2
|
+
import { hostFocusRingStyles } from '../../utils/styles';
|
3
|
+
const styles = [css `
|
4
|
+
:host {
|
5
|
+
--mdc-checkbox-background-color-hover: var(--mds-color-theme-control-inactive-hover);
|
6
|
+
--mdc-checkbox-border-color: var(--mds-color-theme-outline-button-normal);
|
7
|
+
--mdc-checkbox-checked-background-color-hover: var(--mds-color-theme-control-active-hover);
|
8
|
+
--mdc-checkbox-checked-background-color: var(--mds-color-theme-control-active-normal);
|
9
|
+
--mdc-checkbox-checked-pressed-icon-color: var(--mds-color-theme-control-active-pressed);
|
10
|
+
--mdc-checkbox-disabled-background-color: var(--mds-color-theme-control-inactive-disabled);
|
11
|
+
--mdc-checkbox-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
|
12
|
+
--mdc-checkbox-disabled-checked-icon-color: var(--mds-color-theme-control-active-disabled);
|
13
|
+
--mdc-checkbox-disabled-icon-color: var(--mds-color-theme-text-primary-disabled);
|
14
|
+
--mdc-checkbox-icon-background-color: var(--mds-color-theme-control-inactive-normal);
|
15
|
+
--mdc-checkbox-icon-border-color: var(--mds-color-theme-outline-input-normal);
|
16
|
+
--mdc-checkbox-icon-color: var(--mds-color-theme-inverted-text-primary-normal);
|
17
|
+
--mdc-checkbox-pressed-icon-color: var(--mds-color-theme-control-inactive-pressed);
|
18
|
+
|
19
|
+
flex-direction: row;
|
20
|
+
align-items: flex-start;
|
21
|
+
}
|
22
|
+
.mdc-label, .input {
|
23
|
+
cursor: pointer;
|
24
|
+
}
|
25
|
+
:host([checked]) .icon-container,
|
26
|
+
:host([indeterminate]) .icon-container {
|
27
|
+
background: var(--mdc-checkbox-checked-background-color);
|
28
|
+
border: unset;
|
29
|
+
}
|
30
|
+
:host([checked]) .container:hover .icon-container,
|
31
|
+
:host([indeterminate]) .container:hover .icon-container {
|
32
|
+
background: var(--mdc-checkbox-checked-background-color-hover);
|
33
|
+
}
|
34
|
+
:host([checked]) .container:active .icon-container,
|
35
|
+
:host([indeterminate]) .container:active .icon-container {
|
36
|
+
background: var(--mdc-checkbox-checked-pressed-icon-color);
|
37
|
+
}
|
38
|
+
:host([disabled]) .mdc-label,
|
39
|
+
:host([disabled]) .input {
|
40
|
+
cursor: default;
|
41
|
+
}
|
42
|
+
:host([disabled]) .container:hover {
|
43
|
+
background: unset;
|
44
|
+
}
|
45
|
+
:host([disabled]) .icon-container {
|
46
|
+
border-color: var(--mdc-checkbox-disabled-border-color);
|
47
|
+
background: var(--mdc-checkbox-disabled-background-color);
|
48
|
+
}
|
49
|
+
:host([disabled]) .icon {
|
50
|
+
--mdc-icon-fill-color: var(--mdc-checkbox-disabled-icon-color);
|
51
|
+
}
|
52
|
+
:host([disabled][checked]) .icon-container,
|
53
|
+
:host([disabled][indeterminate]) .icon-container {
|
54
|
+
background: var(--mdc-checkbox-disabled-checked-icon-color);
|
55
|
+
border: 0.0625rem solid var(--mdc-checkbox-disabled-border-color);
|
56
|
+
}
|
57
|
+
.input {
|
58
|
+
margin: 0;
|
59
|
+
padding: 0;
|
60
|
+
position: absolute;
|
61
|
+
opacity: 0.1%;
|
62
|
+
overflow: visible;
|
63
|
+
z-index: 1;
|
64
|
+
}
|
65
|
+
.icon-container {
|
66
|
+
display: flex;
|
67
|
+
align-items: center;
|
68
|
+
border: 0.0625rem solid var(--mdc-checkbox-icon-border-color);
|
69
|
+
background: var(--mdc-checkbox-icon-background-color);
|
70
|
+
}
|
71
|
+
.container:hover {
|
72
|
+
background: var(--mdc-checkbox-background-color-hover);
|
73
|
+
}
|
74
|
+
.container:active {
|
75
|
+
background: var(--mdc-checkbox-pressed-icon-color);
|
76
|
+
}
|
77
|
+
.input, .icon-container {
|
78
|
+
width: 1rem;
|
79
|
+
height: 1rem;
|
80
|
+
}
|
81
|
+
.input,
|
82
|
+
.icon-container,
|
83
|
+
.container {
|
84
|
+
border-radius: 0.125rem;
|
85
|
+
}
|
86
|
+
.icon {
|
87
|
+
--mdc-icon-fill-color: var(--mdc-checkbox-icon-color);
|
88
|
+
}
|
89
|
+
.container {
|
90
|
+
margin: 0.125rem 0;
|
91
|
+
}
|
92
|
+
.text-container {
|
93
|
+
display: flex;
|
94
|
+
flex-direction: column;
|
95
|
+
gap: 0.25rem;
|
96
|
+
}
|
97
|
+
|
98
|
+
/* High Contrast Mode */
|
99
|
+
@media (forced-colors: active) {
|
100
|
+
:host([checked]) .icon-container,
|
101
|
+
:host([indeterminate]) .icon-container {
|
102
|
+
border: 0.0625rem solid var(--mdc-checkbox-border-color);
|
103
|
+
}
|
104
|
+
}
|
105
|
+
`, ...hostFocusRingStyles(true)];
|
106
|
+
export default styles;
|
@@ -44,6 +44,8 @@ import type { IconNames } from './icon.types';
|
|
44
44
|
* @tagname mdc-icon
|
45
45
|
*
|
46
46
|
* @cssproperty --mdc-icon-fill-color - Allows customization of the default fill color.
|
47
|
+
* @cssproperty --mdc-icon-size - Allows customization of the icon size.
|
48
|
+
* @cssproperty --mdc-icon-border-radius - Allows customization of the icon border radius.
|
47
49
|
*/
|
48
50
|
declare class Icon extends Component {
|
49
51
|
private iconData?;
|
@@ -58,6 +58,8 @@ import { DEFAULTS } from './icon.constants';
|
|
58
58
|
* @tagname mdc-icon
|
59
59
|
*
|
60
60
|
* @cssproperty --mdc-icon-fill-color - Allows customization of the default fill color.
|
61
|
+
* @cssproperty --mdc-icon-size - Allows customization of the icon size.
|
62
|
+
* @cssproperty --mdc-icon-border-radius - Allows customization of the icon border radius.
|
61
63
|
*/
|
62
64
|
class Icon extends Component {
|
63
65
|
constructor() {
|
@@ -11,6 +11,22 @@ import type { PresenceType, PresenceSize } from './presence.types';
|
|
11
11
|
* @dependency mdc-icon
|
12
12
|
*
|
13
13
|
* @tagname mdc-presence
|
14
|
+
*
|
15
|
+
* @cssproperty --mdc-presence-active-background-color - The background color of the presence type active.
|
16
|
+
* @cssproperty --mdc-presence-away-background-color - The background color of the presence type away.
|
17
|
+
* @cssproperty --mdc-presence-away-calling-background-color - The background color of the presence type away-calling.
|
18
|
+
* @cssproperty --mdc-presence-busy-background-color - The background color of the presence type busy.
|
19
|
+
* @cssproperty --mdc-presence-dnd-background-color - The background color of the presence type dnd.
|
20
|
+
* @cssproperty --mdc-presence-meeting-background-color - The background color of the presence type meeting.
|
21
|
+
* @cssproperty --mdc-presence-on-call-background-color - The background color of the presence type on-call.
|
22
|
+
* @cssproperty --mdc-presence-on-device-background-color - The background color of the presence type on-device.
|
23
|
+
* @cssproperty --mdc-presence-on-mobile-background-color - The background color of the presence type on-mobile.
|
24
|
+
* @cssproperty --mdc-presence-pause-background-color - The background color of the presence type pause.
|
25
|
+
* @cssproperty --mdc-presence-pto-background-color - The background color of the presence type pto.
|
26
|
+
* @cssproperty --mdc-presence-presenting-background-color - The background color of the presence type presenting.
|
27
|
+
* @cssproperty --mdc-presence-quiet-background-color - The background color of the presence type quiet.
|
28
|
+
* @cssproperty --mdc-presence-scheduled-background-color - The background color of the presence type scheduled.
|
29
|
+
* @cssproperty --mdc-presence-overlay-background-color - The background color of the presence type overlay.
|
14
30
|
*/
|
15
31
|
declare class Presence extends Component {
|
16
32
|
/**
|
@@ -23,6 +23,22 @@ import { getIconValue } from './presence.utils';
|
|
23
23
|
* @dependency mdc-icon
|
24
24
|
*
|
25
25
|
* @tagname mdc-presence
|
26
|
+
*
|
27
|
+
* @cssproperty --mdc-presence-active-background-color - The background color of the presence type active.
|
28
|
+
* @cssproperty --mdc-presence-away-background-color - The background color of the presence type away.
|
29
|
+
* @cssproperty --mdc-presence-away-calling-background-color - The background color of the presence type away-calling.
|
30
|
+
* @cssproperty --mdc-presence-busy-background-color - The background color of the presence type busy.
|
31
|
+
* @cssproperty --mdc-presence-dnd-background-color - The background color of the presence type dnd.
|
32
|
+
* @cssproperty --mdc-presence-meeting-background-color - The background color of the presence type meeting.
|
33
|
+
* @cssproperty --mdc-presence-on-call-background-color - The background color of the presence type on-call.
|
34
|
+
* @cssproperty --mdc-presence-on-device-background-color - The background color of the presence type on-device.
|
35
|
+
* @cssproperty --mdc-presence-on-mobile-background-color - The background color of the presence type on-mobile.
|
36
|
+
* @cssproperty --mdc-presence-pause-background-color - The background color of the presence type pause.
|
37
|
+
* @cssproperty --mdc-presence-pto-background-color - The background color of the presence type pto.
|
38
|
+
* @cssproperty --mdc-presence-presenting-background-color - The background color of the presence type presenting.
|
39
|
+
* @cssproperty --mdc-presence-quiet-background-color - The background color of the presence type quiet.
|
40
|
+
* @cssproperty --mdc-presence-scheduled-background-color - The background color of the presence type scheduled.
|
41
|
+
* @cssproperty --mdc-presence-overlay-background-color - The background color of the presence type overlay.
|
26
42
|
*/
|
27
43
|
class Presence extends Component {
|
28
44
|
constructor() {
|
@@ -5,33 +5,19 @@ const styles = [
|
|
5
5
|
css `
|
6
6
|
:host {
|
7
7
|
--mdc-presence-active-background-color: var(--mds-color-theme-indicator-stable);
|
8
|
-
|
9
8
|
--mdc-presence-away-background-color: var(--mds-color-theme-indicator-locked);
|
10
|
-
|
11
9
|
--mdc-presence-away-calling-background-color: var(--mds-color-theme-indicator-locked);
|
12
|
-
|
13
10
|
--mdc-presence-busy-background-color: var(--mds-color-theme-indicator-unstable);
|
14
|
-
|
15
11
|
--mdc-presence-dnd-background-color: var(--mds-color-theme-indicator-attention);
|
16
|
-
|
17
12
|
--mdc-presence-meeting-background-color: var(--mds-color-theme-indicator-unstable);
|
18
|
-
|
19
13
|
--mdc-presence-on-call-background-color: var(--mds-color-theme-indicator-unstable);
|
20
|
-
|
21
14
|
--mdc-presence-on-device-background-color: var(--mds-color-theme-indicator-locked);
|
22
|
-
|
23
15
|
--mdc-presence-on-mobile-background-color: var(--mds-color-theme-indicator-locked);
|
24
|
-
|
25
16
|
--mdc-presence-pause-background-color: var(--mds-color-theme-indicator-locked);
|
26
|
-
|
27
17
|
--mdc-presence-pto-background-color: var(--mds-color-theme-indicator-locked);
|
28
|
-
|
29
18
|
--mdc-presence-presenting-background-color: var(--mds-color-theme-indicator-attention);
|
30
|
-
|
31
19
|
--mdc-presence-quiet-background-color: var(--mds-color-theme-indicator-locked);
|
32
|
-
|
33
20
|
--mdc-presence-scheduled-background-color: var(--mds-color-theme-indicator-unstable);
|
34
|
-
|
35
21
|
--mdc-presence-overlay-background-color: var(--mds-color-theme-background-solid-primary-normal);
|
36
22
|
}
|
37
23
|
|