@momentum-design/components 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ import { CSSResult } from 'lit';
1
2
  import { Component } from '../../models';
2
3
  import { AvatarType } from './avatar.types';
3
4
  /**
@@ -22,6 +23,6 @@ declare class Avatar extends Component {
22
23
  updated(changedProperties: Map<string, any>): void;
23
24
  photoTemplate(): import("lit-html").TemplateResult<1>;
24
25
  render(): import("lit-html").TemplateResult<1>;
25
- static styles: import("lit").CSSResult;
26
+ static styles: Array<CSSResult>;
26
27
  }
27
28
  export default Avatar;
@@ -58,7 +58,7 @@ class Avatar extends models_1.Component {
58
58
  return (0, lit_1.html) `${content}`;
59
59
  }
60
60
  }
61
- Avatar.styles = avatar_styles_1.default;
61
+ Avatar.styles = [...models_1.Component.styles, ...avatar_styles_1.default];
62
62
  tslib_1.__decorate([
63
63
  (0, decorators_js_1.property)({ type: String, reflect: true }),
64
64
  tslib_1.__metadata("design:type", String)
@@ -1,2 +1,2 @@
1
- declare const styles: import("lit").CSSResult;
2
- export default styles;
1
+ declare const _default: import("lit").CSSResult[];
2
+ export default _default;
@@ -17,4 +17,4 @@ const styles = (0, lit_1.css) `
17
17
  object-fit: cover;
18
18
  }
19
19
  `;
20
- exports.default = styles;
20
+ exports.default = [styles];
@@ -1,3 +1,4 @@
1
+ import { CSSResult } from 'lit';
1
2
  import { Component } from '../../models';
2
3
  import type { BadgeType } from './badge.types';
3
4
  /**
@@ -45,6 +46,6 @@ declare class Badge extends Component {
45
46
  textTemplate(): import("lit-html").TemplateResult<1>;
46
47
  warningTemplate(): import("lit-html").TemplateResult<1>;
47
48
  render(): import("lit-html").TemplateResult<1>;
48
- static styles: import("lit").CSSResult[];
49
+ static styles: Array<CSSResult>;
49
50
  }
50
51
  export default Badge;
@@ -90,7 +90,7 @@ class Badge extends models_1.Component {
90
90
  return (0, lit_1.html) `<div class="mdc-badge-container" style=${(0, style_map_js_1.styleMap)(sizeStyles)}>${content}</div>`;
91
91
  }
92
92
  }
93
- Badge.styles = badge_styles_1.default;
93
+ Badge.styles = [...models_1.Component.styles, ...badge_styles_1.default];
94
94
  tslib_1.__decorate([
95
95
  (0, decorators_js_1.property)({ type: String, reflect: true }),
96
96
  tslib_1.__metadata("design:type", String)
@@ -1,3 +1,4 @@
1
+ import { CSSResult } from 'lit';
1
2
  import { Component } from '../../models';
2
3
  /**
3
4
  * Icon component that dynamically displays SVG icons based on a valid name.
@@ -72,6 +73,6 @@ declare class Icon extends Component {
72
73
  private get computedIconSize();
73
74
  updated(changedProperties: Map<string, any>): void;
74
75
  render(): import("lit-html").TemplateResult<1>;
75
- static styles: import("lit").CSSResult[];
76
+ static styles: Array<CSSResult>;
76
77
  }
77
78
  export default Icon;
@@ -140,7 +140,7 @@ class Icon extends models_1.Component {
140
140
  return (0, lit_1.html) ` ${this.iconData} `;
141
141
  }
142
142
  }
143
- Icon.styles = icon_styles_1.default;
143
+ Icon.styles = [...models_1.Component.styles, ...icon_styles_1.default];
144
144
  tslib_1.__decorate([
145
145
  (0, decorators_js_1.state)(),
146
146
  tslib_1.__metadata("design:type", HTMLElement)
@@ -1,3 +1,4 @@
1
+ import { CSSResult } from 'lit';
1
2
  import { Component } from '../../models';
2
3
  import type { FontType } from './text.types';
3
4
  /**
@@ -23,6 +24,6 @@ declare class Text extends Component {
23
24
  protected handleTypeChanged(): void;
24
25
  protected updated(changedProperties: Map<string, any>): void;
25
26
  render(): import("lit-html").TemplateResult<1>;
26
- static styles: import("lit").CSSResult[];
27
+ static styles: Array<CSSResult>;
27
28
  }
28
29
  export default Text;
@@ -32,7 +32,7 @@ class Text extends models_1.Component {
32
32
  return (0, lit_1.html) `<slot></slot>`;
33
33
  }
34
34
  }
35
- Text.styles = text_styles_1.default;
35
+ Text.styles = [...models_1.Component.styles, ...text_styles_1.default];
36
36
  tslib_1.__decorate([
37
37
  (0, decorators_js_1.property)({ attribute: 'type', reflect: true, type: String }),
38
38
  tslib_1.__metadata("design:type", String)
@@ -92,7 +92,7 @@ class ThemeProvider extends models_1.Provider {
92
92
  }
93
93
  }
94
94
  }
95
- ThemeProvider.styles = [...models_1.Provider.styles, themeprovider_styles_1.default];
95
+ ThemeProvider.styles = [...models_1.Provider.styles, ...themeprovider_styles_1.default];
96
96
  tslib_1.__decorate([
97
97
  (0, decorators_js_1.state)(),
98
98
  tslib_1.__metadata("design:type", String)
@@ -1,2 +1,2 @@
1
- declare const styles: import("lit").CSSResult;
2
- export default styles;
1
+ declare const _default: import("lit").CSSResult[];
2
+ export default _default;
@@ -15,4 +15,4 @@ const styles = (0, lit_1.css) `
15
15
  letter-spacing: var(--mdc-themeprovider-letter-spacing-adjustment);
16
16
  }
17
17
  `;
18
- exports.default = styles;
18
+ exports.default = [styles];
@@ -1,4 +1,4 @@
1
- import { LitElement } from 'lit';
1
+ import { CSSResult, LitElement } from 'lit';
2
2
  /**
3
3
  * Core Component class to ultimately be inherited by all Web Components within
4
4
  * this package.
@@ -37,5 +37,9 @@ declare class Component extends LitElement {
37
37
  * @returns - Void.
38
38
  */
39
39
  static register(namespace: string): void;
40
+ /**
41
+ * Styles associated with the Base Component.
42
+ */
43
+ static styles: Array<CSSResult>;
40
44
  }
41
45
  export default Component;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
3
4
  const lit_1 = require("lit");
5
+ const component_styles_1 = tslib_1.__importDefault(require("./component.styles"));
4
6
  /**
5
7
  * Core Component class to ultimately be inherited by all Web Components within
6
8
  * this package.
@@ -45,4 +47,8 @@ class Component extends lit_1.LitElement {
45
47
  customElements.define(namespace, this);
46
48
  }
47
49
  }
50
+ /**
51
+ * Styles associated with the Base Component.
52
+ */
53
+ Component.styles = [component_styles_1.default];
48
54
  exports.default = Component;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lit_1 = require("lit");
4
+ exports.default = (0, lit_1.css) `
5
+ :host {
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ :host *,
10
+ :host *::before,
11
+ :host *::after {
12
+ box-sizing: inherit;
13
+ }
14
+ `;
@@ -52,5 +52,5 @@ class Provider extends component_1.default {
52
52
  /**
53
53
  * Styles associated with this Provider Component.
54
54
  */
55
- Provider.styles = [provider_styles_1.default];
55
+ Provider.styles = [...component_1.default.styles, provider_styles_1.default];
56
56
  exports.default = Provider;
package/package.json CHANGED
@@ -37,5 +37,5 @@
37
37
  "@momentum-design/icons": "*",
38
38
  "@momentum-design/tokens": "*"
39
39
  },
40
- "version": "0.2.0"
40
+ "version": "0.2.1"
41
41
  }