@momentum-design/components 0.0.24 → 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,12 @@
1
+ import { Component } from '../../models';
2
+ declare class SubComponentIconProvider extends Component {
3
+ currentTheme?: string;
4
+ private iconProviderContext;
5
+ render(): import("lit-html").TemplateResult<1>;
6
+ }
7
+ declare global {
8
+ interface HTMLElementTagNameMap {
9
+ ['mdc-subcomponent-icon']: SubComponentIconProvider;
10
+ }
11
+ }
12
+ export {};
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const lit_1 = require("lit");
5
+ const models_1 = require("../../models");
6
+ const iconprovider_component_1 = tslib_1.__importDefault(require("./iconprovider.component"));
7
+ const provider_1 = tslib_1.__importDefault(require("../../utils/provider"));
8
+ // Subcomponent to be rendered in storybook, to showcase that the
9
+ // theme can be consumed as a subcomponent
10
+ class SubComponentIconProvider extends models_1.Component {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.iconProviderContext = provider_1.default.consume({ host: this, context: iconprovider_component_1.default.Context });
14
+ }
15
+ render() {
16
+ var _a, _b, _c;
17
+ return (0, lit_1.html) `
18
+ <p>URL: ${(_a = this.iconProviderContext.value) === null || _a === void 0 ? void 0 : _a.url}</p>
19
+ <p>File Extension: ${(_b = this.iconProviderContext.value) === null || _b === void 0 ? void 0 : _b.fileExtension}</p>
20
+ <p>Length Unit: ${(_c = this.iconProviderContext.value) === null || _c === void 0 ? void 0 : _c.lengthUnit}</p>
21
+ `;
22
+ }
23
+ }
24
+ SubComponentIconProvider.register('mdc-subcomponent-icon');
@@ -0,0 +1,12 @@
1
+ import { Component } from '../../models';
2
+ declare class SubComponentThemeProvider extends Component {
3
+ currentTheme?: string;
4
+ private themeProviderContext;
5
+ render(): import("lit-html").TemplateResult<1>;
6
+ }
7
+ declare global {
8
+ interface HTMLElementTagNameMap {
9
+ ['mdc-subcomponent']: SubComponentThemeProvider;
10
+ }
11
+ }
12
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const lit_1 = require("lit");
5
+ const models_1 = require("../../models");
6
+ const themeprovider_component_1 = tslib_1.__importDefault(require("./themeprovider.component"));
7
+ const provider_1 = tslib_1.__importDefault(require("../../utils/provider"));
8
+ // Subcomponent to be rendered in storybook, to showcase that the
9
+ // theme can be consumed as a subcomponent
10
+ class SubComponentThemeProvider extends models_1.Component {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.themeProviderContext = provider_1.default.consume({ host: this, context: themeprovider_component_1.default.Context });
14
+ }
15
+ render() {
16
+ var _a;
17
+ return (0, lit_1.html) ` <p>${(_a = this.themeProviderContext.value) === null || _a === void 0 ? void 0 : _a.theme}</p> `;
18
+ }
19
+ }
20
+ SubComponentThemeProvider.register('mdc-subcomponent');
@@ -4,7 +4,7 @@
4
4
  "modules": [
5
5
  {
6
6
  "kind": "javascript-module",
7
- "path": "src/components/avatar/avatar.component.ts",
7
+ "path": "components/avatar/avatar.component.js",
8
8
  "declarations": [
9
9
  {
10
10
  "kind": "class",
@@ -99,6 +99,7 @@
99
99
  },
100
100
  "tagName": "mdc-avatar",
101
101
  "summary": "This is MyElement",
102
+ "jsDoc": "/**\n * @slot - This is a default/unnamed slot\n *\n * @summary This is MyElement\n *\n * @tag mdc-avatar\n * @tagname mdc-avatar\n */",
102
103
  "customElement": true
103
104
  }
104
105
  ],
@@ -108,14 +109,14 @@
108
109
  "name": "default",
109
110
  "declaration": {
110
111
  "name": "Avatar",
111
- "module": "src/components/avatar/avatar.component.ts"
112
+ "module": "components/avatar/avatar.component.js"
112
113
  }
113
114
  }
114
115
  ]
115
116
  },
116
117
  {
117
118
  "kind": "javascript-module",
118
- "path": "src/components/badge/badge.component.ts",
119
+ "path": "components/badge/badge.component.js",
119
120
  "declarations": [
120
121
  {
121
122
  "kind": "class",
@@ -240,6 +241,7 @@
240
241
  },
241
242
  "tagName": "mdc-badge",
242
243
  "summary": "This is MyElement",
244
+ "jsDoc": "/**\n * @slot - This is a default/unnamed slot\n *\n * @summary This is MyElement\n *\n * @tag mdc-badge\n * @tagname mdc-badge\n */",
243
245
  "customElement": true
244
246
  }
245
247
  ],
@@ -249,14 +251,14 @@
249
251
  "name": "default",
250
252
  "declaration": {
251
253
  "name": "Badge",
252
- "module": "src/components/badge/badge.component.ts"
254
+ "module": "components/badge/badge.component.js"
253
255
  }
254
256
  }
255
257
  ]
256
258
  },
257
259
  {
258
260
  "kind": "javascript-module",
259
- "path": "src/components/icon/icon.component.ts",
261
+ "path": "components/icon/icon.component.js",
260
262
  "declarations": [
261
263
  {
262
264
  "kind": "class",
@@ -404,6 +406,7 @@
404
406
  "module": "/src/models"
405
407
  },
406
408
  "tagName": "mdc-icon",
409
+ "jsDoc": "/**\n * Icon component, which has to be mounted inside of a `IconProvider`\n * component.\n *\n * The `IconProvider` component defines where icons should be consumed from (`url`).\n * This `Icon` component accepts the `name` attribute, which will be\n * the file name of the icon to be loaded from the given `url`.\n *\n * Once fetched, the icon will be mounted. If fetching wasn't successful,\n * nothing will be shown.\n *\n * The `scale` attribute allows scaling the icon based on the provided\n * `length-unit` attribute (which will either come from the IconProvider or\n * could be overridden per icon). For example:\n * if `scale = 1` and `length-unit = 'em'`, the size of the icon will be\n * `width: 1em; height: 1em`.\n *\n * For accessibility the `role` and `aria-label` of the icon can be set.\n *\n * @tag mdc-icon\n * @tagname mdc-icon\n */",
407
410
  "customElement": true
408
411
  }
409
412
  ],
@@ -413,14 +416,14 @@
413
416
  "name": "default",
414
417
  "declaration": {
415
418
  "name": "Icon",
416
- "module": "src/components/icon/icon.component.ts"
419
+ "module": "components/icon/icon.component.js"
417
420
  }
418
421
  }
419
422
  ]
420
423
  },
421
424
  {
422
425
  "kind": "javascript-module",
423
- "path": "src/components/iconprovider/iconprovider.component.ts",
426
+ "path": "components/iconprovider/iconprovider.component.js",
424
427
  "declarations": [
425
428
  {
426
429
  "kind": "class",
@@ -510,6 +513,7 @@
510
513
  "module": "/src/models"
511
514
  },
512
515
  "tagName": "mdc-iconprovider",
516
+ "jsDoc": "/**\n * IconProvider component, which allows to be consumed from sub components\n * (see `providerUtils.consume` for how to consume)\n *\n * Bundling icons will be up to the consumer of this component, such\n * that only a url has to be passed in from which the icons will be\n * fetched.\n *\n * @tag mdc-iconprovider\n * @tagname mdc-iconprovider\n */",
513
517
  "customElement": true
514
518
  }
515
519
  ],
@@ -519,14 +523,14 @@
519
523
  "name": "default",
520
524
  "declaration": {
521
525
  "name": "IconProvider",
522
- "module": "src/components/iconprovider/iconprovider.component.ts"
526
+ "module": "components/iconprovider/iconprovider.component.js"
523
527
  }
524
528
  }
525
529
  ]
526
530
  },
527
531
  {
528
532
  "kind": "javascript-module",
529
- "path": "src/components/text/text.component.ts",
533
+ "path": "components/text/text.component.js",
530
534
  "declarations": [
531
535
  {
532
536
  "kind": "class",
@@ -570,6 +574,7 @@
570
574
  "module": "/src/models"
571
575
  },
572
576
  "tagName": "mdc-text",
577
+ "jsDoc": "/**\n * Text component, which helps creating a text element aligning with\n * styling.\n *\n * The `type` attribute allows changing the type of text, like `heading-1`, etc.\n *\n * For accessibility the `role` and `aria-level` on the component are going to be set\n * automatically based on the type e.g. heading-1 will lead to `role=\"heading\"` and `aria-level=1`.\n *\n * @tag mdc-text\n * @tagname mdc-text\n */",
573
578
  "customElement": true
574
579
  }
575
580
  ],
@@ -579,14 +584,14 @@
579
584
  "name": "default",
580
585
  "declaration": {
581
586
  "name": "Text",
582
- "module": "src/components/text/text.component.ts"
587
+ "module": "components/text/text.component.js"
583
588
  }
584
589
  }
585
590
  ]
586
591
  },
587
592
  {
588
593
  "kind": "javascript-module",
589
- "path": "src/components/themeprovider/themeprovider.component.ts",
594
+ "path": "components/themeprovider/themeprovider.component.js",
590
595
  "declarations": [
591
596
  {
592
597
  "kind": "class",
@@ -659,6 +664,7 @@
659
664
  "module": "/src/models"
660
665
  },
661
666
  "tagName": "mdc-themeprovider",
667
+ "jsDoc": "/**\n * ThemeProvider component, which sets the theme css variables\n * for the child dom nodes and allows to be consumed from sub components\n * (see providerUtils.consume for how to consume)\n *\n * ThemeProvider also includes the different font faces available\n * for Text components.\n *\n * @tag mdc-themeprovider\n * @tagname mdc-themeprovider\n */",
662
668
  "customElement": true
663
669
  }
664
670
  ],
@@ -668,7 +674,7 @@
668
674
  "name": "default",
669
675
  "declaration": {
670
676
  "name": "ThemeProvider",
671
- "module": "src/components/themeprovider/themeprovider.component.ts"
677
+ "module": "components/themeprovider/themeprovider.component.js"
672
678
  }
673
679
  }
674
680
  ]
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { Component, Provider } from './models';
2
1
  import ThemeProvider from './components/themeprovider';
3
2
  import Icon from './components/icon';
4
3
  import IconProvider from './components/iconprovider';
5
4
  import Avatar from './components/avatar';
6
5
  import Badge from './components/badge';
7
6
  import Text from './components/text';
8
- export { Component, Provider, ThemeProvider, Icon, IconProvider, Avatar, Badge, Text, };
7
+ export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Text, };
package/dist/index.js CHANGED
@@ -1,10 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Text = exports.Badge = exports.Avatar = exports.IconProvider = exports.Icon = exports.ThemeProvider = exports.Provider = exports.Component = void 0;
3
+ exports.Text = exports.Badge = exports.Avatar = exports.IconProvider = exports.Icon = exports.ThemeProvider = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const models_1 = require("./models");
6
- Object.defineProperty(exports, "Component", { enumerable: true, get: function () { return models_1.Component; } });
7
- Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return models_1.Provider; } });
8
5
  const themeprovider_1 = tslib_1.__importDefault(require("./components/themeprovider"));
9
6
  exports.ThemeProvider = themeprovider_1.default;
10
7
  const icon_1 = tslib_1.__importDefault(require("./components/icon"));
@@ -0,0 +1,11 @@
1
+ import Component from '../../components/avatar';
2
+ /**
3
+ * @slot - This is a default/unnamed slot
4
+ *
5
+ * @summary This is MyElement
6
+ *
7
+ * @tag mdc-avatar
8
+ * @tagname mdc-avatar
9
+ */
10
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
11
+ export default reactWrapper;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const React = tslib_1.__importStar(require("react"));
5
+ const react_1 = require("@lit/react");
6
+ const avatar_1 = tslib_1.__importDefault(require("../../components/avatar"));
7
+ const avatar_constants_1 = require("../../components/avatar/avatar.constants");
8
+ /**
9
+ * @slot - This is a default/unnamed slot
10
+ *
11
+ * @summary This is MyElement
12
+ *
13
+ * @tag mdc-avatar
14
+ * @tagname mdc-avatar
15
+ */
16
+ const reactWrapper = (0, react_1.createComponent)({
17
+ tagName: avatar_constants_1.TAG_NAME,
18
+ elementClass: avatar_1.default,
19
+ react: React,
20
+ events: {},
21
+ displayName: 'Avatar',
22
+ });
23
+ exports.default = reactWrapper;
@@ -0,0 +1,11 @@
1
+ import Component from '../../components/badge';
2
+ /**
3
+ * @slot - This is a default/unnamed slot
4
+ *
5
+ * @summary This is MyElement
6
+ *
7
+ * @tag mdc-badge
8
+ * @tagname mdc-badge
9
+ */
10
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
11
+ export default reactWrapper;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const React = tslib_1.__importStar(require("react"));
5
+ const react_1 = require("@lit/react");
6
+ const badge_1 = tslib_1.__importDefault(require("../../components/badge"));
7
+ const badge_constants_1 = require("../../components/badge/badge.constants");
8
+ /**
9
+ * @slot - This is a default/unnamed slot
10
+ *
11
+ * @summary This is MyElement
12
+ *
13
+ * @tag mdc-badge
14
+ * @tagname mdc-badge
15
+ */
16
+ const reactWrapper = (0, react_1.createComponent)({
17
+ tagName: badge_constants_1.TAG_NAME,
18
+ elementClass: badge_1.default,
19
+ react: React,
20
+ events: {},
21
+ displayName: 'Badge',
22
+ });
23
+ exports.default = reactWrapper;
@@ -0,0 +1,25 @@
1
+ import Component from '../../components/icon';
2
+ /**
3
+ * Icon component, which has to be mounted inside of a `IconProvider`
4
+ * component.
5
+ *
6
+ * The `IconProvider` component defines where icons should be consumed from (`url`).
7
+ * This `Icon` component accepts the `name` attribute, which will be
8
+ * the file name of the icon to be loaded from the given `url`.
9
+ *
10
+ * Once fetched, the icon will be mounted. If fetching wasn't successful,
11
+ * nothing will be shown.
12
+ *
13
+ * The `scale` attribute allows scaling the icon based on the provided
14
+ * `length-unit` attribute (which will either come from the IconProvider or
15
+ * could be overridden per icon). For example:
16
+ * if `scale = 1` and `length-unit = 'em'`, the size of the icon will be
17
+ * `width: 1em; height: 1em`.
18
+ *
19
+ * For accessibility the `role` and `aria-label` of the icon can be set.
20
+ *
21
+ * @tag mdc-icon
22
+ * @tagname mdc-icon
23
+ */
24
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
25
+ export default reactWrapper;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const React = tslib_1.__importStar(require("react"));
5
+ const react_1 = require("@lit/react");
6
+ const icon_1 = tslib_1.__importDefault(require("../../components/icon"));
7
+ const icon_constants_1 = require("../../components/icon/icon.constants");
8
+ /**
9
+ * Icon component, which has to be mounted inside of a `IconProvider`
10
+ * component.
11
+ *
12
+ * The `IconProvider` component defines where icons should be consumed from (`url`).
13
+ * This `Icon` component accepts the `name` attribute, which will be
14
+ * the file name of the icon to be loaded from the given `url`.
15
+ *
16
+ * Once fetched, the icon will be mounted. If fetching wasn't successful,
17
+ * nothing will be shown.
18
+ *
19
+ * The `scale` attribute allows scaling the icon based on the provided
20
+ * `length-unit` attribute (which will either come from the IconProvider or
21
+ * could be overridden per icon). For example:
22
+ * if `scale = 1` and `length-unit = 'em'`, the size of the icon will be
23
+ * `width: 1em; height: 1em`.
24
+ *
25
+ * For accessibility the `role` and `aria-label` of the icon can be set.
26
+ *
27
+ * @tag mdc-icon
28
+ * @tagname mdc-icon
29
+ */
30
+ const reactWrapper = (0, react_1.createComponent)({
31
+ tagName: icon_constants_1.TAG_NAME,
32
+ elementClass: icon_1.default,
33
+ react: React,
34
+ events: {},
35
+ displayName: 'Icon',
36
+ });
37
+ exports.default = reactWrapper;
@@ -0,0 +1,14 @@
1
+ import Component from '../../components/iconprovider';
2
+ /**
3
+ * IconProvider component, which allows to be consumed from sub components
4
+ * (see `providerUtils.consume` for how to consume)
5
+ *
6
+ * Bundling icons will be up to the consumer of this component, such
7
+ * that only a url has to be passed in from which the icons will be
8
+ * fetched.
9
+ *
10
+ * @tag mdc-iconprovider
11
+ * @tagname mdc-iconprovider
12
+ */
13
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
14
+ export default reactWrapper;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const React = tslib_1.__importStar(require("react"));
5
+ const react_1 = require("@lit/react");
6
+ const iconprovider_1 = tslib_1.__importDefault(require("../../components/iconprovider"));
7
+ const iconprovider_constants_1 = require("../../components/iconprovider/iconprovider.constants");
8
+ /**
9
+ * IconProvider component, which allows to be consumed from sub components
10
+ * (see `providerUtils.consume` for how to consume)
11
+ *
12
+ * Bundling icons will be up to the consumer of this component, such
13
+ * that only a url has to be passed in from which the icons will be
14
+ * fetched.
15
+ *
16
+ * @tag mdc-iconprovider
17
+ * @tagname mdc-iconprovider
18
+ */
19
+ const reactWrapper = (0, react_1.createComponent)({
20
+ tagName: iconprovider_constants_1.TAG_NAME,
21
+ elementClass: iconprovider_1.default,
22
+ react: React,
23
+ events: {},
24
+ displayName: 'IconProvider',
25
+ });
26
+ exports.default = reactWrapper;
@@ -0,0 +1,6 @@
1
+ export { default as Avatar } from './avatar';
2
+ export { default as Badge } from './badge';
3
+ export { default as Icon } from './icon';
4
+ export { default as IconProvider } from './iconprovider';
5
+ export { default as Text } from './text';
6
+ export { default as ThemeProvider } from './themeprovider';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ThemeProvider = exports.Text = exports.IconProvider = exports.Icon = exports.Badge = exports.Avatar = void 0;
7
+ var avatar_1 = require("./avatar");
8
+ Object.defineProperty(exports, "Avatar", { enumerable: true, get: function () { return __importDefault(avatar_1).default; } });
9
+ var badge_1 = require("./badge");
10
+ Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { return __importDefault(badge_1).default; } });
11
+ var icon_1 = require("./icon");
12
+ Object.defineProperty(exports, "Icon", { enumerable: true, get: function () { return __importDefault(icon_1).default; } });
13
+ var iconprovider_1 = require("./iconprovider");
14
+ Object.defineProperty(exports, "IconProvider", { enumerable: true, get: function () { return __importDefault(iconprovider_1).default; } });
15
+ var text_1 = require("./text");
16
+ Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return __importDefault(text_1).default; } });
17
+ var themeprovider_1 = require("./themeprovider");
18
+ Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return __importDefault(themeprovider_1).default; } });
@@ -0,0 +1,15 @@
1
+ import Component from '../../components/text';
2
+ /**
3
+ * Text component, which helps creating a text element aligning with
4
+ * styling.
5
+ *
6
+ * The `type` attribute allows changing the type of text, like `heading-1`, etc.
7
+ *
8
+ * For accessibility the `role` and `aria-level` on the component are going to be set
9
+ * automatically based on the type e.g. heading-1 will lead to `role="heading"` and `aria-level=1`.
10
+ *
11
+ * @tag mdc-text
12
+ * @tagname mdc-text
13
+ */
14
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
15
+ export default reactWrapper;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const React = tslib_1.__importStar(require("react"));
5
+ const react_1 = require("@lit/react");
6
+ const text_1 = tslib_1.__importDefault(require("../../components/text"));
7
+ const text_constants_1 = require("../../components/text/text.constants");
8
+ /**
9
+ * Text component, which helps creating a text element aligning with
10
+ * styling.
11
+ *
12
+ * The `type` attribute allows changing the type of text, like `heading-1`, etc.
13
+ *
14
+ * For accessibility the `role` and `aria-level` on the component are going to be set
15
+ * automatically based on the type e.g. heading-1 will lead to `role="heading"` and `aria-level=1`.
16
+ *
17
+ * @tag mdc-text
18
+ * @tagname mdc-text
19
+ */
20
+ const reactWrapper = (0, react_1.createComponent)({
21
+ tagName: text_constants_1.TAG_NAME,
22
+ elementClass: text_1.default,
23
+ react: React,
24
+ events: {},
25
+ displayName: 'Text',
26
+ });
27
+ exports.default = reactWrapper;
@@ -0,0 +1,14 @@
1
+ import Component from '../../components/themeprovider';
2
+ /**
3
+ * ThemeProvider component, which sets the theme css variables
4
+ * for the child dom nodes and allows to be consumed from sub components
5
+ * (see providerUtils.consume for how to consume)
6
+ *
7
+ * ThemeProvider also includes the different font faces available
8
+ * for Text components.
9
+ *
10
+ * @tag mdc-themeprovider
11
+ * @tagname mdc-themeprovider
12
+ */
13
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
14
+ export default reactWrapper;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const React = tslib_1.__importStar(require("react"));
5
+ const react_1 = require("@lit/react");
6
+ const themeprovider_1 = tslib_1.__importDefault(require("../../components/themeprovider"));
7
+ const themeprovider_constants_1 = require("../../components/themeprovider/themeprovider.constants");
8
+ /**
9
+ * ThemeProvider component, which sets the theme css variables
10
+ * for the child dom nodes and allows to be consumed from sub components
11
+ * (see providerUtils.consume for how to consume)
12
+ *
13
+ * ThemeProvider also includes the different font faces available
14
+ * for Text components.
15
+ *
16
+ * @tag mdc-themeprovider
17
+ * @tagname mdc-themeprovider
18
+ */
19
+ const reactWrapper = (0, react_1.createComponent)({
20
+ tagName: themeprovider_constants_1.TAG_NAME,
21
+ elementClass: themeprovider_1.default,
22
+ react: React,
23
+ events: {},
24
+ displayName: 'ThemeProvider',
25
+ });
26
+ exports.default = reactWrapper;
@@ -0,0 +1,7 @@
1
+ import { LitElement } from 'lit';
2
+ type Constructor<T = {}> = new (...args: any[]) => T;
3
+ export interface DisabledMixinInterface {
4
+ disabled: boolean;
5
+ }
6
+ export declare const DisabledMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<DisabledMixinInterface> & T;
7
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DisabledMixin = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const decorators_js_1 = require("lit/decorators.js");
6
+ const DisabledMixin = (superClass) => {
7
+ class InnerMixinClass extends superClass {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.disabled = false;
11
+ }
12
+ }
13
+ tslib_1.__decorate([
14
+ (0, decorators_js_1.property)({ reflect: true, type: Boolean }),
15
+ tslib_1.__metadata("design:type", Object)
16
+ ], InnerMixinClass.prototype, "disabled", void 0);
17
+ // Cast return type to your mixin's interface intersected with the superClass type
18
+ return InnerMixinClass;
19
+ };
20
+ exports.DisabledMixin = DisabledMixin;
@@ -0,0 +1,7 @@
1
+ import { LitElement } from 'lit';
2
+ type Constructor<T = {}> = new (...args: any[]) => T;
3
+ export interface TabIndexMixinInterface {
4
+ tabIndex: number;
5
+ }
6
+ export declare const TabIndexMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<TabIndexMixinInterface> & T;
7
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TabIndexMixin = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const decorators_js_1 = require("lit/decorators.js");
6
+ const TabIndexMixin = (superClass) => {
7
+ class InnerMixinClass extends superClass {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.tabIndex = 0;
11
+ }
12
+ }
13
+ tslib_1.__decorate([
14
+ (0, decorators_js_1.property)({ reflect: true, type: Number, attribute: 'tabindex' }),
15
+ tslib_1.__metadata("design:type", Object)
16
+ ], InnerMixinClass.prototype, "tabIndex", void 0);
17
+ // Cast return type to your mixin's interface intersected with the superClass type
18
+ return InnerMixinClass;
19
+ };
20
+ exports.TabIndexMixin = TabIndexMixin;
package/package.json CHANGED
@@ -13,14 +13,17 @@
13
13
  "import": "./dist/index.js",
14
14
  "require": "./dist/index.js"
15
15
  },
16
+ "./browser": "./dist/browser/index.js",
16
17
  "./module": "./dist/components",
17
- "./browser": "./dist/browser"
18
+ "./react": "./dist/react"
18
19
  },
19
20
  "files": [
20
- "./dist/"
21
+ "./dist/",
22
+ "!**/*.tsbuildinfo"
21
23
  ],
22
24
  "dependencies": {
23
25
  "@lit/context": "^1.1.2",
26
+ "@lit/react": "^1.0.5",
24
27
  "lit": "^3.2.0"
25
28
  },
26
29
  "peerDependencies": {
@@ -28,5 +31,5 @@
28
31
  "@momentum-design/icons": "*",
29
32
  "@momentum-design/tokens": "*"
30
33
  },
31
- "version": "0.0.24"
34
+ "version": "0.0.26"
32
35
  }