@momentum-design/components 0.4.13 → 0.4.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/dist/browser/index.js +86 -31
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/components/avatar/avatar.component.js +38 -32
  4. package/dist/components/avatar/avatar.constants.js +3 -9
  5. package/dist/components/avatar/avatar.styles.js +3 -5
  6. package/dist/components/avatar/avatar.types.js +1 -2
  7. package/dist/components/avatar/index.js +4 -7
  8. package/dist/components/badge/badge.component.d.ts +74 -29
  9. package/dist/components/badge/badge.component.js +182 -88
  10. package/dist/components/badge/badge.constants.d.ts +28 -4
  11. package/dist/components/badge/badge.constants.js +30 -12
  12. package/dist/components/badge/badge.styles.js +59 -19
  13. package/dist/components/badge/index.d.ts +2 -0
  14. package/dist/components/badge/index.js +6 -7
  15. package/dist/components/icon/icon.component.js +46 -40
  16. package/dist/components/icon/icon.constants.js +3 -8
  17. package/dist/components/icon/icon.styles.js +5 -7
  18. package/dist/components/icon/icon.utils.js +1 -4
  19. package/dist/components/icon/index.js +4 -7
  20. package/dist/components/iconprovider/iconprovider.component.js +39 -33
  21. package/dist/components/iconprovider/iconprovider.constants.js +3 -10
  22. package/dist/components/iconprovider/iconprovider.context.js +4 -6
  23. package/dist/components/iconprovider/index.js +4 -7
  24. package/dist/components/text/fonts.styles.js +2 -5
  25. package/dist/components/text/index.js +4 -7
  26. package/dist/components/text/text.component.js +35 -29
  27. package/dist/components/text/text.constants.js +3 -9
  28. package/dist/components/text/text.styles.js +5 -7
  29. package/dist/components/text/text.types.js +1 -2
  30. package/dist/components/themeprovider/index.js +4 -7
  31. package/dist/components/themeprovider/themeprovider.component.js +27 -21
  32. package/dist/components/themeprovider/themeprovider.constants.js +3 -8
  33. package/dist/components/themeprovider/themeprovider.context.js +4 -6
  34. package/dist/components/themeprovider/themeprovider.styles.js +3 -5
  35. package/dist/custom-elements.json +230 -51
  36. package/dist/index.js +7 -16
  37. package/dist/models/component/component.component.js +5 -8
  38. package/dist/models/component/component.styles.js +2 -4
  39. package/dist/models/component/component.types.js +1 -2
  40. package/dist/models/component/index.js +2 -5
  41. package/dist/models/index.js +3 -8
  42. package/dist/models/provider/index.js +2 -5
  43. package/dist/models/provider/provider.component.js +9 -12
  44. package/dist/models/provider/provider.styles.js +3 -5
  45. package/dist/react/avatar/index.js +8 -11
  46. package/dist/react/badge/index.d.ts +6 -3
  47. package/dist/react/badge/index.js +14 -14
  48. package/dist/react/icon/index.js +8 -11
  49. package/dist/react/iconprovider/index.js +8 -11
  50. package/dist/react/index.js +6 -18
  51. package/dist/react/text/index.js +8 -11
  52. package/dist/react/themeprovider/index.js +8 -11
  53. package/dist/utils/mixins/DisabledMixin.js +14 -10
  54. package/dist/utils/mixins/TabIndexMixin.js +14 -10
  55. package/dist/utils/provider/index.js +3 -5
  56. package/dist/utils/styles/index.js +4 -8
  57. package/dist/utils/tag-name/constants.js +1 -3
  58. package/dist/utils/tag-name/index.js +3 -6
  59. package/dist/utils/types.js +1 -2
  60. package/package.json +1 -1
  61. package/dist/components/badge/badge.types.d.ts +0 -1
  62. package/dist/components/badge/badge.types.js +0 -2
@@ -120,119 +120,299 @@
120
120
  "declarations": [
121
121
  {
122
122
  "kind": "class",
123
- "description": "",
123
+ "description": "A badge is a small, visually distinct element that provides additional information\nor highlights the status of an item.\nBadges are often used to display notification dot, counts, making them a useful tool for\nconveying information quickly without taking up much space.",
124
124
  "name": "Badge",
125
- "slots": [
126
- {
127
- "description": "This is a default/unnamed slot",
128
- "name": ""
129
- }
130
- ],
131
125
  "members": [
132
126
  {
133
127
  "kind": "field",
134
128
  "name": "type",
135
- "type": {
136
- "text": "BadgeType | undefined"
137
- },
138
- "description": "Type of the badge\nCan be `regular`, `icon`, `text` or `warning`\n\nDefault: `regular`",
129
+ "description": "Type of the badge\nCan be `dot` (notification) , `icon` and `counter`\n\nDefault: `dot`",
139
130
  "attribute": "type",
140
131
  "reflects": true
141
132
  },
142
133
  {
143
134
  "kind": "field",
144
- "name": "size",
135
+ "name": "iconName",
136
+ "type": {
137
+ "text": "string | undefined"
138
+ },
139
+ "description": "If `type` is set to `icon`, attribute `iconName` can\nbe used to choose which icon should be shown\n\nIf no `iconName` is provided, no icon will be rendered.",
140
+ "attribute": "icon-name"
141
+ },
142
+ {
143
+ "kind": "field",
144
+ "name": "variant",
145
+ "description": "badge variant",
146
+ "attribute": "variant"
147
+ },
148
+ {
149
+ "kind": "field",
150
+ "name": "counter",
145
151
  "type": {
146
152
  "text": "number | undefined"
147
153
  },
148
- "description": "Scale of the badge (works in combination with length unit)\n\nDefault: `1`",
149
- "attribute": "size"
154
+ "attribute": "counter"
150
155
  },
151
156
  {
152
157
  "kind": "field",
153
- "name": "lengthUnit",
158
+ "name": "maxCounter",
154
159
  "type": {
155
- "text": "string | undefined"
160
+ "text": "number"
156
161
  },
157
- "description": "Length unit attribute for scale\n\nDefault: `rem`",
158
- "attribute": "length-unit"
162
+ "attribute": "max-counter"
159
163
  },
160
164
  {
161
165
  "kind": "field",
162
- "name": "iconName",
166
+ "name": "overlay",
163
167
  "type": {
164
- "text": "string | undefined"
168
+ "text": "boolean"
165
169
  },
166
- "description": "If `type` is set to `icon`, attribute `iconName` can\nbe used to choose which icon should be shown\n\nIf no `iconName` is provided, no icon will be rendered.",
167
- "attribute": "icon-name"
170
+ "default": "false",
171
+ "attribute": "overlay"
168
172
  },
169
173
  {
170
174
  "kind": "field",
171
- "name": "text",
175
+ "name": "ariaLabel",
172
176
  "type": {
173
- "text": "string | undefined"
177
+ "text": "string | null"
174
178
  },
175
- "description": "If `type` is set to `text`, attribute `text` can\nbe used to pass in any text to be displayed in the badge.",
176
- "attribute": "text"
179
+ "default": "null",
180
+ "description": "Aria-label attribute to be set for accessibility",
181
+ "attribute": "aria-label"
177
182
  },
178
183
  {
179
184
  "kind": "method",
180
- "name": "updateSize",
181
- "privacy": "private"
185
+ "name": "getCounterText",
186
+ "privacy": "private",
187
+ "return": {
188
+ "type": {
189
+ "text": ""
190
+ }
191
+ },
192
+ "parameters": [
193
+ {
194
+ "name": "maxCounter",
195
+ "type": {
196
+ "text": "number"
197
+ },
198
+ "description": "the maximum limit which can be displayed on the badge"
199
+ },
200
+ {
201
+ "name": "counter",
202
+ "optional": true,
203
+ "type": {
204
+ "text": "number"
205
+ },
206
+ "description": "the number to be displayed on the badge"
207
+ }
208
+ ],
209
+ "description": "If `type` is set to `counter` and if `counter` is greater than `maxCounter`,\nthen it will return a string the maxCounter value as string.\nOtherwise, it will return a string representation of `counter`.\nIf `counter` is not a number, it will return an empty string."
210
+ },
211
+ {
212
+ "kind": "method",
213
+ "name": "getBadgeIcon",
214
+ "privacy": "private",
215
+ "return": {
216
+ "type": {
217
+ "text": ""
218
+ }
219
+ },
220
+ "parameters": [
221
+ {
222
+ "name": "iconName",
223
+ "type": {
224
+ "text": "string"
225
+ },
226
+ "description": "name of the icon to be used."
227
+ },
228
+ {
229
+ "name": "overlay",
230
+ "type": {
231
+ "text": "boolean"
232
+ }
233
+ },
234
+ {
235
+ "name": "iconVariant",
236
+ "type": {
237
+ "text": "string"
238
+ }
239
+ },
240
+ {
241
+ "name": "type",
242
+ "optional": true,
243
+ "type": {
244
+ "text": "string"
245
+ }
246
+ },
247
+ {
248
+ "description": "variant of the badge.",
249
+ "name": "variant"
250
+ }
251
+ ],
252
+ "description": "Method to generate the badge icon template."
253
+ },
254
+ {
255
+ "kind": "method",
256
+ "name": "getBadgeDot",
257
+ "privacy": "private",
258
+ "return": {
259
+ "type": {
260
+ "text": ""
261
+ }
262
+ },
263
+ "parameters": [
264
+ {
265
+ "name": "overlay",
266
+ "type": {
267
+ "text": "boolean"
268
+ },
269
+ "description": "boolean indicating whether the badge should have an overlay."
270
+ }
271
+ ],
272
+ "description": "Method to generate the badge dot template."
182
273
  },
183
274
  {
184
275
  "kind": "method",
185
- "name": "iconTemplate"
276
+ "name": "getIconClasses",
277
+ "privacy": "private",
278
+ "return": {
279
+ "type": {
280
+ "text": ""
281
+ }
282
+ },
283
+ "parameters": [
284
+ {
285
+ "name": "overlay",
286
+ "type": {
287
+ "text": "boolean"
288
+ },
289
+ "description": "boolean indicating whether the badge should have an overlay."
290
+ },
291
+ {
292
+ "name": "iconVariant",
293
+ "type": {
294
+ "text": "string"
295
+ },
296
+ "description": "the variant of the icon badge."
297
+ },
298
+ {
299
+ "name": "type",
300
+ "optional": true,
301
+ "type": {
302
+ "text": "string"
303
+ },
304
+ "description": "the type of the badge."
305
+ }
306
+ ],
307
+ "description": "This method generates the CSS classes for the badge icon."
186
308
  },
187
309
  {
188
310
  "kind": "method",
189
- "name": "textTemplate"
311
+ "name": "getBadgeCounterText",
312
+ "privacy": "private",
313
+ "return": {
314
+ "type": {
315
+ "text": ""
316
+ }
317
+ },
318
+ "parameters": [
319
+ {
320
+ "name": "maxCounter",
321
+ "type": {
322
+ "text": "number"
323
+ },
324
+ "description": "the maximum limit which can be displayed on the badge"
325
+ },
326
+ {
327
+ "name": "overlay",
328
+ "type": {
329
+ "text": "boolean"
330
+ },
331
+ "description": "whether the badge should have an overlay."
332
+ },
333
+ {
334
+ "name": "counter",
335
+ "optional": true,
336
+ "type": {
337
+ "text": "number"
338
+ },
339
+ "description": "the number to be displayed on the badge"
340
+ }
341
+ ],
342
+ "description": "Method to generate the badge text and counter template."
343
+ },
344
+ {
345
+ "kind": "method",
346
+ "name": "setRoleByAriaLabel",
347
+ "privacy": "private",
348
+ "return": {
349
+ "type": {
350
+ "text": "void"
351
+ }
352
+ },
353
+ "description": "Method to set the role based on the aria-label provided.\nIf the aria-label is provided, the role of the element will be 'img'.\nOtherwise, the role will be null."
190
354
  },
191
355
  {
192
356
  "kind": "method",
193
- "name": "warningTemplate"
357
+ "name": "getBadgeContentBasedOnType",
358
+ "privacy": "private",
359
+ "return": {
360
+ "type": {
361
+ "text": ""
362
+ }
363
+ },
364
+ "description": "Generates the badge content based on the badge type.\nUtilizes various helper methods to create the appropriate badge template based on the\ncurrent badge type. Supports 'dot', 'icon', 'counter', 'success', 'warning', and 'error'\ntypes, returning the corresponding template result for each type."
194
365
  }
195
366
  ],
196
367
  "attributes": [
197
368
  {
198
369
  "name": "type",
370
+ "description": "Type of the badge\nCan be `dot` (notification) , `icon` and `counter`\n\nDefault: `dot`",
371
+ "fieldName": "type"
372
+ },
373
+ {
374
+ "name": "icon-name",
199
375
  "type": {
200
- "text": "BadgeType | undefined"
376
+ "text": "string | undefined"
201
377
  },
202
- "description": "Type of the badge\nCan be `regular`, `icon`, `text` or `warning`\n\nDefault: `regular`",
203
- "fieldName": "type"
378
+ "description": "If `type` is set to `icon`, attribute `iconName` can\nbe used to choose which icon should be shown\n\nIf no `iconName` is provided, no icon will be rendered.",
379
+ "fieldName": "iconName"
204
380
  },
205
381
  {
206
- "name": "size",
382
+ "name": "variant",
383
+ "description": "badge variant",
384
+ "fieldName": "variant"
385
+ },
386
+ {
387
+ "name": "counter",
207
388
  "type": {
208
389
  "text": "number | undefined"
209
390
  },
210
- "description": "Scale of the badge (works in combination with length unit)\n\nDefault: `1`",
211
- "fieldName": "size"
391
+ "fieldName": "counter"
212
392
  },
213
393
  {
214
- "name": "length-unit",
394
+ "name": "max-counter",
215
395
  "type": {
216
- "text": "string | undefined"
396
+ "text": "number"
217
397
  },
218
- "description": "Length unit attribute for scale\n\nDefault: `rem`",
219
- "fieldName": "lengthUnit"
398
+ "fieldName": "maxCounter"
220
399
  },
221
400
  {
222
- "name": "icon-name",
401
+ "name": "overlay",
223
402
  "type": {
224
- "text": "string | undefined"
403
+ "text": "boolean"
225
404
  },
226
- "description": "If `type` is set to `icon`, attribute `iconName` can\nbe used to choose which icon should be shown\n\nIf no `iconName` is provided, no icon will be rendered.",
227
- "fieldName": "iconName"
405
+ "default": "false",
406
+ "fieldName": "overlay"
228
407
  },
229
408
  {
230
- "name": "text",
409
+ "name": "aria-label",
231
410
  "type": {
232
- "text": "string | undefined"
411
+ "text": "string | null"
233
412
  },
234
- "description": "If `type` is set to `text`, attribute `text` can\nbe used to pass in any text to be displayed in the badge.",
235
- "fieldName": "text"
413
+ "default": "null",
414
+ "description": "Aria-label attribute to be set for accessibility",
415
+ "fieldName": "ariaLabel"
236
416
  }
237
417
  ],
238
418
  "superclass": {
@@ -240,8 +420,7 @@
240
420
  "module": "/src/models"
241
421
  },
242
422
  "tagName": "mdc-badge",
243
- "summary": "This is MyElement",
244
- "jsDoc": "/**\n * @slot - This is a default/unnamed slot\n *\n * @summary This is MyElement\n *\n * @tagname mdc-badge\n */",
423
+ "jsDoc": "/**\n * A badge is a small, visually distinct element that provides additional information\n * or highlights the status of an item.\n * Badges are often used to display notification dot, counts, making them a useful tool for\n * conveying information quickly without taking up much space.\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @tagname mdc-badge\n */",
245
424
  "customElement": true
246
425
  }
247
426
  ],
package/dist/index.js CHANGED
@@ -1,16 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Text = exports.Badge = exports.Avatar = exports.IconProvider = exports.Icon = exports.ThemeProvider = void 0;
4
- const tslib_1 = require("tslib");
5
- const themeprovider_1 = tslib_1.__importDefault(require("./components/themeprovider"));
6
- exports.ThemeProvider = themeprovider_1.default;
7
- const icon_1 = tslib_1.__importDefault(require("./components/icon"));
8
- exports.Icon = icon_1.default;
9
- const iconprovider_1 = tslib_1.__importDefault(require("./components/iconprovider"));
10
- exports.IconProvider = iconprovider_1.default;
11
- const avatar_1 = tslib_1.__importDefault(require("./components/avatar"));
12
- exports.Avatar = avatar_1.default;
13
- const badge_1 = tslib_1.__importDefault(require("./components/badge"));
14
- exports.Badge = badge_1.default;
15
- const text_1 = tslib_1.__importDefault(require("./components/text"));
16
- exports.Text = text_1.default;
1
+ import ThemeProvider from './components/themeprovider';
2
+ import Icon from './components/icon';
3
+ import IconProvider from './components/iconprovider';
4
+ import Avatar from './components/avatar';
5
+ import Badge from './components/badge';
6
+ import Text from './components/text';
7
+ export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Text, };
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const lit_1 = require("lit");
5
- const component_styles_1 = tslib_1.__importDefault(require("./component.styles"));
1
+ import { LitElement } from 'lit';
2
+ import styles from './component.styles';
6
3
  /**
7
4
  * Core Component class to ultimately be inherited by all Web Components within
8
5
  * this package.
@@ -12,7 +9,7 @@ const component_styles_1 = tslib_1.__importDefault(require("./component.styles")
12
9
  *
13
10
  * @public
14
11
  */
15
- class Component extends lit_1.LitElement {
12
+ class Component extends LitElement {
16
13
  /**
17
14
  * Register `this` extended `Component` Class as a custom element within the
18
15
  * DOM's custom elements registry.
@@ -50,5 +47,5 @@ class Component extends lit_1.LitElement {
50
47
  /**
51
48
  * Styles associated with the Base Component.
52
49
  */
53
- Component.styles = [component_styles_1.default];
54
- exports.default = Component;
50
+ Component.styles = [styles];
51
+ export default Component;
@@ -1,7 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const lit_1 = require("lit");
4
- exports.default = (0, lit_1.css) `
1
+ import { css } from 'lit';
2
+ export default css `
5
3
  :host {
6
4
  box-sizing: border-box;
7
5
  }
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,5 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const component_component_1 = tslib_1.__importDefault(require("./component.component"));
5
- exports.default = component_component_1.default;
1
+ import Component from './component.component';
2
+ export default Component;
@@ -1,8 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Provider = exports.Component = void 0;
4
- const tslib_1 = require("tslib");
5
- const component_1 = tslib_1.__importDefault(require("./component"));
6
- exports.Component = component_1.default;
7
- const provider_1 = tslib_1.__importDefault(require("./provider"));
8
- exports.Provider = provider_1.default;
1
+ import Component from './component';
2
+ import Provider from './provider';
3
+ export { Component, Provider, };
@@ -1,5 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const provider_component_1 = tslib_1.__importDefault(require("./provider.component"));
5
- exports.default = provider_component_1.default;
1
+ import Provider from './provider.component';
2
+ export default Provider;
@@ -1,17 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const context_1 = require("@lit/context");
5
- const lit_1 = require("lit");
6
- const component_1 = tslib_1.__importDefault(require("../component"));
7
- const provider_styles_1 = tslib_1.__importDefault(require("./provider.styles"));
1
+ import { ContextProvider } from '@lit/context';
2
+ import { html } from 'lit';
3
+ import Component from '../component';
4
+ import styles from './provider.styles';
8
5
  /**
9
6
  * Provider Component class to ultimately be inherited by all Provider-type Web
10
7
  * Components within this package.
11
8
  *
12
9
  * @public
13
10
  */
14
- class Provider extends component_1.default {
11
+ class Provider extends Component {
15
12
  /**
16
13
  * Constructor of the Provider.
17
14
  *
@@ -29,7 +26,7 @@ class Provider extends component_1.default {
29
26
  */
30
27
  constructor({ context, initialValue }) {
31
28
  super();
32
- this.context = new context_1.ContextProvider(this, {
29
+ this.context = new ContextProvider(this, {
33
30
  context,
34
31
  initialValue,
35
32
  });
@@ -46,11 +43,11 @@ class Provider extends component_1.default {
46
43
  */
47
44
  render() {
48
45
  this.updateContext();
49
- return (0, lit_1.html) `<slot></slot>`;
46
+ return html `<slot></slot>`;
50
47
  }
51
48
  }
52
49
  /**
53
50
  * Styles associated with this Provider Component.
54
51
  */
55
- Provider.styles = [...component_1.default.styles, provider_styles_1.default];
56
- exports.default = Provider;
52
+ Provider.styles = [...Component.styles, styles];
53
+ export default Provider;
@@ -1,9 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const lit_1 = require("lit");
4
- const styles = (0, lit_1.css) `
1
+ import { css } from 'lit';
2
+ const styles = css `
5
3
  :host {
6
4
  display: contents;
7
5
  }
8
6
  `;
9
- exports.default = styles;
7
+ export default styles;
@@ -1,10 +1,7 @@
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");
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/avatar';
4
+ import { TAG_NAME } from '../../components/avatar/avatar.constants';
8
5
  /**
9
6
  * @slot - This is a default/unnamed slot
10
7
  *
@@ -12,11 +9,11 @@ const avatar_constants_1 = require("../../components/avatar/avatar.constants");
12
9
  *
13
10
  * @tagname mdc-avatar
14
11
  */
15
- const reactWrapper = (0, react_1.createComponent)({
16
- tagName: avatar_constants_1.TAG_NAME,
17
- elementClass: avatar_1.default,
12
+ const reactWrapper = createComponent({
13
+ tagName: TAG_NAME,
14
+ elementClass: Component,
18
15
  react: React,
19
16
  events: {},
20
17
  displayName: 'Avatar',
21
18
  });
22
- exports.default = reactWrapper;
19
+ export default reactWrapper;
@@ -1,8 +1,11 @@
1
1
  import Component from '../../components/badge';
2
2
  /**
3
- * @slot - This is a default/unnamed slot
4
- *
5
- * @summary This is MyElement
3
+ * A badge is a small, visually distinct element that provides additional information
4
+ * or highlights the status of an item.
5
+ * Badges are often used to display notification dot, counts, making them a useful tool for
6
+ * conveying information quickly without taking up much space.
7
+ * @dependency mdc-icon
8
+ * @dependency mdc-text
6
9
  *
7
10
  * @tagname mdc-badge
8
11
  */
@@ -1,22 +1,22 @@
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");
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/badge';
4
+ import { TAG_NAME } from '../../components/badge/badge.constants';
8
5
  /**
9
- * @slot - This is a default/unnamed slot
10
- *
11
- * @summary This is MyElement
6
+ * A badge is a small, visually distinct element that provides additional information
7
+ * or highlights the status of an item.
8
+ * Badges are often used to display notification dot, counts, making them a useful tool for
9
+ * conveying information quickly without taking up much space.
10
+ * @dependency mdc-icon
11
+ * @dependency mdc-text
12
12
  *
13
13
  * @tagname mdc-badge
14
14
  */
15
- const reactWrapper = (0, react_1.createComponent)({
16
- tagName: badge_constants_1.TAG_NAME,
17
- elementClass: badge_1.default,
15
+ const reactWrapper = createComponent({
16
+ tagName: TAG_NAME,
17
+ elementClass: Component,
18
18
  react: React,
19
19
  events: {},
20
20
  displayName: 'Badge',
21
21
  });
22
- exports.default = reactWrapper;
22
+ export default reactWrapper;
@@ -1,10 +1,7 @@
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");
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/icon';
4
+ import { TAG_NAME } from '../../components/icon/icon.constants';
8
5
  /**
9
6
  * Icon component that dynamically displays SVG icons based on a valid name.
10
7
  *
@@ -42,11 +39,11 @@ const icon_constants_1 = require("../../components/icon/icon.constants");
42
39
  *
43
40
  * @cssproperty --mdc-icon-fill-color - Allows customization of the default fill color.
44
41
  */
45
- const reactWrapper = (0, react_1.createComponent)({
46
- tagName: icon_constants_1.TAG_NAME,
47
- elementClass: icon_1.default,
42
+ const reactWrapper = createComponent({
43
+ tagName: TAG_NAME,
44
+ elementClass: Component,
48
45
  react: React,
49
46
  events: {},
50
47
  displayName: 'Icon',
51
48
  });
52
- exports.default = reactWrapper;
49
+ export default reactWrapper;