@momentum-design/components 0.22.1 → 0.22.2

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.
@@ -87,19 +87,6 @@
87
87
  "module": "utils/mixins/AvatarComponentMixin.js"
88
88
  }
89
89
  },
90
- {
91
- "kind": "field",
92
- "name": "iconName",
93
- "type": {
94
- "text": "IconNames | undefined"
95
- },
96
- "description": "Name of the icon to be displayed inside the Avatar.\nMust be a valid icon name.",
97
- "attribute": "icon-name",
98
- "inheritedFrom": {
99
- "name": "AvatarComponentMixin",
100
- "module": "utils/mixins/AvatarComponentMixin.js"
101
- }
102
- },
103
90
  {
104
91
  "kind": "field",
105
92
  "name": "counter",
@@ -126,12 +113,29 @@
126
113
  "name": "AvatarComponentMixin",
127
114
  "module": "utils/mixins/AvatarComponentMixin.js"
128
115
  }
116
+ },
117
+ {
118
+ "kind": "field",
119
+ "name": "iconName",
120
+ "type": {
121
+ "text": "IconNames | undefined"
122
+ },
123
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
124
+ "attribute": "icon-name",
125
+ "inheritedFrom": {
126
+ "name": "IconNameMixin",
127
+ "module": "utils/mixins/IconNameMixin.js"
128
+ }
129
129
  }
130
130
  ],
131
131
  "mixins": [
132
132
  {
133
133
  "name": "AvatarComponentMixin",
134
134
  "module": "/src/utils/mixins/AvatarComponentMixin"
135
+ },
136
+ {
137
+ "name": "IconNameMixin",
138
+ "module": "/src/utils/mixins/IconNameMixin"
135
139
  }
136
140
  ],
137
141
  "superclass": {
@@ -191,18 +195,6 @@
191
195
  "module": "src/utils/mixins/AvatarComponentMixin.ts"
192
196
  }
193
197
  },
194
- {
195
- "name": "icon-name",
196
- "type": {
197
- "text": "IconNames | undefined"
198
- },
199
- "description": "Name of the icon to be displayed inside the Avatar.\nMust be a valid icon name.",
200
- "fieldName": "iconName",
201
- "inheritedFrom": {
202
- "name": "AvatarComponentMixin",
203
- "module": "src/utils/mixins/AvatarComponentMixin.ts"
204
- }
205
- },
206
198
  {
207
199
  "name": "counter",
208
200
  "type": {
@@ -227,6 +219,18 @@
227
219
  "name": "AvatarComponentMixin",
228
220
  "module": "src/utils/mixins/AvatarComponentMixin.ts"
229
221
  }
222
+ },
223
+ {
224
+ "name": "icon-name",
225
+ "type": {
226
+ "text": "IconNames | undefined"
227
+ },
228
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
229
+ "fieldName": "iconName",
230
+ "inheritedFrom": {
231
+ "name": "IconNameMixin",
232
+ "module": "src/utils/mixins/IconNameMixin.ts"
233
+ }
230
234
  }
231
235
  ]
232
236
  }
@@ -401,19 +405,6 @@
401
405
  "module": "components/buttonsimple/buttonsimple.component.js"
402
406
  }
403
407
  },
404
- {
405
- "kind": "field",
406
- "name": "iconName",
407
- "type": {
408
- "text": "IconNames | undefined"
409
- },
410
- "description": "Name of the icon to be displayed inside the Avatar.\nMust be a valid icon name.",
411
- "attribute": "icon-name",
412
- "inheritedFrom": {
413
- "name": "AvatarComponentMixin",
414
- "module": "utils/mixins/AvatarComponentMixin.js"
415
- }
416
- },
417
408
  {
418
409
  "kind": "field",
419
410
  "name": "counter",
@@ -441,6 +432,19 @@
441
432
  "module": "utils/mixins/AvatarComponentMixin.js"
442
433
  }
443
434
  },
435
+ {
436
+ "kind": "field",
437
+ "name": "iconName",
438
+ "type": {
439
+ "text": "IconNames | undefined"
440
+ },
441
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
442
+ "attribute": "icon-name",
443
+ "inheritedFrom": {
444
+ "name": "IconNameMixin",
445
+ "module": "utils/mixins/IconNameMixin.js"
446
+ }
447
+ },
444
448
  {
445
449
  "kind": "field",
446
450
  "name": "tabIndex",
@@ -650,18 +654,6 @@
650
654
  "module": "src/components/buttonsimple/buttonsimple.component.ts"
651
655
  }
652
656
  },
653
- {
654
- "name": "icon-name",
655
- "type": {
656
- "text": "IconNames | undefined"
657
- },
658
- "description": "Name of the icon to be displayed inside the Avatar.\nMust be a valid icon name.",
659
- "fieldName": "iconName",
660
- "inheritedFrom": {
661
- "name": "AvatarComponentMixin",
662
- "module": "src/utils/mixins/AvatarComponentMixin.ts"
663
- }
664
- },
665
657
  {
666
658
  "name": "counter",
667
659
  "type": {
@@ -687,6 +679,18 @@
687
679
  "module": "src/utils/mixins/AvatarComponentMixin.ts"
688
680
  }
689
681
  },
682
+ {
683
+ "name": "icon-name",
684
+ "type": {
685
+ "text": "IconNames | undefined"
686
+ },
687
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
688
+ "fieldName": "iconName",
689
+ "inheritedFrom": {
690
+ "name": "IconNameMixin",
691
+ "module": "src/utils/mixins/IconNameMixin.ts"
692
+ }
693
+ },
690
694
  {
691
695
  "name": "tabIndex",
692
696
  "type": {
@@ -767,6 +771,10 @@
767
771
  {
768
772
  "name": "AvatarComponentMixin",
769
773
  "module": "/src/utils/mixins/AvatarComponentMixin"
774
+ },
775
+ {
776
+ "name": "IconNameMixin",
777
+ "module": "/src/utils/mixins/IconNameMixin"
770
778
  }
771
779
  ],
772
780
  "superclass": {
@@ -854,15 +862,6 @@
854
862
  "attribute": "type",
855
863
  "reflects": true
856
864
  },
857
- {
858
- "kind": "field",
859
- "name": "iconName",
860
- "type": {
861
- "text": "IconNames | undefined"
862
- },
863
- "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
864
- "attribute": "icon-name"
865
- },
866
865
  {
867
866
  "kind": "field",
868
867
  "name": "variant",
@@ -1012,6 +1011,19 @@
1012
1011
  }
1013
1012
  },
1014
1013
  "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."
1014
+ },
1015
+ {
1016
+ "kind": "field",
1017
+ "name": "iconName",
1018
+ "type": {
1019
+ "text": "IconNames | undefined"
1020
+ },
1021
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
1022
+ "attribute": "icon-name",
1023
+ "inheritedFrom": {
1024
+ "name": "IconNameMixin",
1025
+ "module": "utils/mixins/IconNameMixin.js"
1026
+ }
1015
1027
  }
1016
1028
  ],
1017
1029
  "attributes": [
@@ -1023,14 +1035,6 @@
1023
1035
  "description": "Type of the badge\nCan be `dot` (notification) , `icon`, `counter`, `success`, `warning` or `error`.",
1024
1036
  "fieldName": "type"
1025
1037
  },
1026
- {
1027
- "name": "icon-name",
1028
- "type": {
1029
- "text": "IconNames | undefined"
1030
- },
1031
- "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
1032
- "fieldName": "iconName"
1033
- },
1034
1038
  {
1035
1039
  "name": "variant",
1036
1040
  "type": {
@@ -1074,6 +1078,24 @@
1074
1078
  "default": "null",
1075
1079
  "description": "Aria-label attribute to be set for accessibility",
1076
1080
  "fieldName": "ariaLabel"
1081
+ },
1082
+ {
1083
+ "name": "icon-name",
1084
+ "type": {
1085
+ "text": "IconNames | undefined"
1086
+ },
1087
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
1088
+ "fieldName": "iconName",
1089
+ "inheritedFrom": {
1090
+ "name": "IconNameMixin",
1091
+ "module": "src/utils/mixins/IconNameMixin.ts"
1092
+ }
1093
+ }
1094
+ ],
1095
+ "mixins": [
1096
+ {
1097
+ "name": "IconNameMixin",
1098
+ "module": "/src/utils/mixins/IconNameMixin"
1077
1099
  }
1078
1100
  ],
1079
1101
  "superclass": {
@@ -1960,7 +1982,7 @@
1960
1982
  "module": "/src/models"
1961
1983
  },
1962
1984
  "tagName": "mdc-buttonsimple",
1963
- "jsDoc": "/**\n * `mdc-buttonsimple` is a component that can be configured in various ways to suit different use cases.\n * It is used as an internal component and is not intended to be used directly by consumers.\n * Consumers should use the `mdc-button` component instead.\n *\n * @tagname mdc-buttonsimple\n *\n */",
1985
+ "jsDoc": "/**\n * `mdc-buttonsimple` is a component that can be configured in various ways to suit different use cases.\n * It is used as an internal component and is not intended to be used directly by consumers.\n * Consumers should use the `mdc-button` component instead.\n *\n * @tagname mdc-buttonsimple\n */",
1964
1986
  "customElement": true
1965
1987
  }
1966
1988
  ],
@@ -4104,15 +4126,6 @@
4104
4126
  }
4105
4127
  ],
4106
4128
  "members": [
4107
- {
4108
- "kind": "field",
4109
- "name": "iconName",
4110
- "type": {
4111
- "text": "IconNames | undefined"
4112
- },
4113
- "description": "Name of the icon (= filename) to be used as trailing icon for link.\n\nIf no `icon` is provided, no icon will be rendered.",
4114
- "attribute": "icon-name"
4115
- },
4116
4129
  {
4117
4130
  "kind": "field",
4118
4131
  "name": "inline",
@@ -4192,17 +4205,22 @@
4192
4205
  "name": "DisabledMixin",
4193
4206
  "module": "utils/mixins/DisabledMixin.js"
4194
4207
  }
4195
- }
4196
- ],
4197
- "attributes": [
4208
+ },
4198
4209
  {
4199
- "name": "icon-name",
4210
+ "kind": "field",
4211
+ "name": "iconName",
4200
4212
  "type": {
4201
4213
  "text": "IconNames | undefined"
4202
4214
  },
4203
- "description": "Name of the icon (= filename) to be used as trailing icon for link.\n\nIf no `icon` is provided, no icon will be rendered.",
4204
- "fieldName": "iconName"
4205
- },
4215
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
4216
+ "attribute": "icon-name",
4217
+ "inheritedFrom": {
4218
+ "name": "IconNameMixin",
4219
+ "module": "utils/mixins/IconNameMixin.js"
4220
+ }
4221
+ }
4222
+ ],
4223
+ "attributes": [
4206
4224
  {
4207
4225
  "name": "inline",
4208
4226
  "type": {
@@ -4242,12 +4260,28 @@
4242
4260
  "name": "DisabledMixin",
4243
4261
  "module": "src/utils/mixins/DisabledMixin.ts"
4244
4262
  }
4263
+ },
4264
+ {
4265
+ "name": "icon-name",
4266
+ "type": {
4267
+ "text": "IconNames | undefined"
4268
+ },
4269
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
4270
+ "fieldName": "iconName",
4271
+ "inheritedFrom": {
4272
+ "name": "IconNameMixin",
4273
+ "module": "src/utils/mixins/IconNameMixin.ts"
4274
+ }
4245
4275
  }
4246
4276
  ],
4247
4277
  "mixins": [
4248
4278
  {
4249
4279
  "name": "DisabledMixin",
4250
4280
  "module": "/src/utils/mixins/DisabledMixin"
4281
+ },
4282
+ {
4283
+ "name": "IconNameMixin",
4284
+ "module": "/src/utils/mixins/IconNameMixin"
4251
4285
  }
4252
4286
  ],
4253
4287
  "superclass": {
@@ -5926,15 +5960,6 @@
5926
5960
  "attribute": "size",
5927
5961
  "reflects": true
5928
5962
  },
5929
- {
5930
- "kind": "field",
5931
- "name": "iconName",
5932
- "type": {
5933
- "text": "IconNames | undefined"
5934
- },
5935
- "description": "Name of the icon to be displayed inside the Avatar.\nMust be a valid icon name.",
5936
- "attribute": "icon-name"
5937
- },
5938
5963
  {
5939
5964
  "kind": "field",
5940
5965
  "name": "counter",
@@ -5989,14 +6014,6 @@
5989
6014
  "default": "32",
5990
6015
  "fieldName": "size"
5991
6016
  },
5992
- {
5993
- "name": "icon-name",
5994
- "type": {
5995
- "text": "IconNames | undefined"
5996
- },
5997
- "description": "Name of the icon to be displayed inside the Avatar.\nMust be a valid icon name.",
5998
- "fieldName": "iconName"
5999
- },
6000
6017
  {
6001
6018
  "name": "counter",
6002
6019
  "type": {
@@ -6142,6 +6159,56 @@
6142
6159
  }
6143
6160
  ]
6144
6161
  },
6162
+ {
6163
+ "kind": "javascript-module",
6164
+ "path": "utils/mixins/IconNameMixin.js",
6165
+ "declarations": [
6166
+ {
6167
+ "kind": "mixin",
6168
+ "description": "",
6169
+ "name": "IconNameMixin",
6170
+ "members": [
6171
+ {
6172
+ "kind": "field",
6173
+ "name": "iconName",
6174
+ "type": {
6175
+ "text": "IconNames | undefined"
6176
+ },
6177
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
6178
+ "attribute": "icon-name"
6179
+ }
6180
+ ],
6181
+ "attributes": [
6182
+ {
6183
+ "name": "icon-name",
6184
+ "type": {
6185
+ "text": "IconNames | undefined"
6186
+ },
6187
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
6188
+ "fieldName": "iconName"
6189
+ }
6190
+ ],
6191
+ "parameters": [
6192
+ {
6193
+ "name": "superClass",
6194
+ "type": {
6195
+ "text": "T"
6196
+ }
6197
+ }
6198
+ ]
6199
+ }
6200
+ ],
6201
+ "exports": [
6202
+ {
6203
+ "kind": "js",
6204
+ "name": "IconNameMixin",
6205
+ "declaration": {
6206
+ "name": "IconNameMixin",
6207
+ "module": "utils/mixins/IconNameMixin.js"
6208
+ }
6209
+ }
6210
+ ]
6211
+ },
6145
6212
  {
6146
6213
  "kind": "javascript-module",
6147
6214
  "path": "utils/mixins/NameMixin.js",
@@ -5,7 +5,6 @@ import Component from '../../components/buttonsimple';
5
5
  * Consumers should use the `mdc-button` component instead.
6
6
  *
7
7
  * @tagname mdc-buttonsimple
8
- *
9
8
  */
10
9
  declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
11
10
  export default reactWrapper;
@@ -8,7 +8,6 @@ import { TAG_NAME } from '../../components/buttonsimple/buttonsimple.constants';
8
8
  * Consumers should use the `mdc-button` component instead.
9
9
  *
10
10
  * @tagname mdc-buttonsimple
11
- *
12
11
  */
13
12
  const reactWrapper = createComponent({
14
13
  tagName: TAG_NAME,
@@ -1,5 +1,4 @@
1
1
  import type { AvatarSize } from '../../components/avatar/avatar.types';
2
- import type { IconNames } from '../../components/icon/icon.types';
3
2
  import type { PresenceType } from '../../components/presence/presence.types';
4
3
  import type { Component } from '../../models';
5
4
  import type { Constructor } from './index.types';
@@ -8,7 +7,6 @@ export interface AvatarComponentMixinInterface {
8
7
  initials?: string;
9
8
  presence?: PresenceType;
10
9
  size: AvatarSize;
11
- iconName?: IconNames;
12
10
  counter?: number;
13
11
  isTyping: boolean;
14
12
  }
@@ -49,10 +49,6 @@ export const AvatarComponentMixin = (superClass) => {
49
49
  property({ type: Number, reflect: true, attribute: 'size' }),
50
50
  __metadata("design:type", Number)
51
51
  ], InnerMixinClass.prototype, "size", void 0);
52
- __decorate([
53
- property({ type: String, attribute: 'icon-name' }),
54
- __metadata("design:type", String)
55
- ], InnerMixinClass.prototype, "iconName", void 0);
56
52
  __decorate([
57
53
  property({ type: Number }),
58
54
  __metadata("design:type", Number)
@@ -0,0 +1,7 @@
1
+ import { LitElement } from 'lit';
2
+ import type { Constructor } from './index.types';
3
+ import type { IconNames } from '../../components/icon/icon.types';
4
+ export interface IconNameMixinInterface {
5
+ iconName: IconNames;
6
+ }
7
+ export declare const IconNameMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<IconNameMixinInterface> & T;
@@ -0,0 +1,20 @@
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 IconNameMixin = (superClass) => {
12
+ class InnerMixinClass extends superClass {
13
+ }
14
+ __decorate([
15
+ property({ type: String, attribute: 'icon-name' }),
16
+ __metadata("design:type", String)
17
+ ], InnerMixinClass.prototype, "iconName", void 0);
18
+ // Cast return type to your mixin's interface intersected with the superClass type
19
+ return InnerMixinClass;
20
+ };
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.22.1"
39
+ "version": "0.22.2"
40
40
  }