@momentum-design/components 0.22.0 → 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.
Files changed (28) hide show
  1. package/dist/browser/index.js +115 -114
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/components/avatar/avatar.component.d.ts +2 -2
  4. package/dist/components/avatar/avatar.component.js +2 -1
  5. package/dist/components/avatarbutton/avatarbutton.component.d.ts +4 -3
  6. package/dist/components/avatarbutton/avatarbutton.component.js +2 -1
  7. package/dist/components/badge/badge.component.d.ts +5 -10
  8. package/dist/components/badge/badge.component.js +3 -6
  9. package/dist/components/button/button.component.d.ts +4 -3
  10. package/dist/components/button/button.component.js +2 -2
  11. package/dist/components/buttonsimple/buttonsimple.component.d.ts +4 -4
  12. package/dist/components/buttonsimple/buttonsimple.component.js +2 -3
  13. package/dist/components/divider/divider.component.d.ts +4 -3
  14. package/dist/components/divider/divider.component.js +1 -1
  15. package/dist/components/formfieldwrapper/formfieldwrapper.types.d.ts +3 -1
  16. package/dist/components/formfieldwrapper/formfieldwrapper.utils.d.ts +2 -3
  17. package/dist/components/input/input.component.d.ts +6 -0
  18. package/dist/components/input/input.component.js +12 -0
  19. package/dist/components/link/link.component.d.ts +5 -11
  20. package/dist/components/link/link.component.js +3 -6
  21. package/dist/custom-elements.json +183 -101
  22. package/dist/react/buttonsimple/index.d.ts +0 -1
  23. package/dist/react/buttonsimple/index.js +0 -1
  24. package/dist/utils/mixins/AvatarComponentMixin.d.ts +0 -2
  25. package/dist/utils/mixins/AvatarComponentMixin.js +0 -4
  26. package/dist/utils/mixins/IconNameMixin.d.ts +7 -0
  27. package/dist/utils/mixins/IconNameMixin.js +20 -0
  28. package/package.json +1 -1
@@ -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
  ],
@@ -3518,6 +3540,21 @@
3518
3540
  ],
3519
3541
  "description": "Handles the change event of the input field.\nUpdates the value and sets the validity of the input field.\n\nThe 'change' event does not bubble up through the shadow DOM as it was not composed.\nTherefore, we need to re-dispatch the same event to ensure it is propagated correctly.\nRead more: https://developer.mozilla.org/en-US/docs/Web/API/Event/composed"
3520
3542
  },
3543
+ {
3544
+ "kind": "method",
3545
+ "name": "handleKeyDown",
3546
+ "privacy": "private",
3547
+ "parameters": [
3548
+ {
3549
+ "name": "event",
3550
+ "type": {
3551
+ "text": "KeyboardEvent"
3552
+ },
3553
+ "description": "Keyboard event"
3554
+ }
3555
+ ],
3556
+ "description": "Handles the keydown event of the input field.\nIf the key pressed is 'Enter', it submits the form."
3557
+ },
3521
3558
  {
3522
3559
  "kind": "method",
3523
3560
  "name": "renderLeadingIcon",
@@ -4089,15 +4126,6 @@
4089
4126
  }
4090
4127
  ],
4091
4128
  "members": [
4092
- {
4093
- "kind": "field",
4094
- "name": "iconName",
4095
- "type": {
4096
- "text": "IconNames | undefined"
4097
- },
4098
- "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.",
4099
- "attribute": "icon-name"
4100
- },
4101
4129
  {
4102
4130
  "kind": "field",
4103
4131
  "name": "inline",
@@ -4177,17 +4205,22 @@
4177
4205
  "name": "DisabledMixin",
4178
4206
  "module": "utils/mixins/DisabledMixin.js"
4179
4207
  }
4180
- }
4181
- ],
4182
- "attributes": [
4208
+ },
4183
4209
  {
4184
- "name": "icon-name",
4210
+ "kind": "field",
4211
+ "name": "iconName",
4185
4212
  "type": {
4186
4213
  "text": "IconNames | undefined"
4187
4214
  },
4188
- "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.",
4189
- "fieldName": "iconName"
4190
- },
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": [
4191
4224
  {
4192
4225
  "name": "inline",
4193
4226
  "type": {
@@ -4227,12 +4260,28 @@
4227
4260
  "name": "DisabledMixin",
4228
4261
  "module": "src/utils/mixins/DisabledMixin.ts"
4229
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
+ }
4230
4275
  }
4231
4276
  ],
4232
4277
  "mixins": [
4233
4278
  {
4234
4279
  "name": "DisabledMixin",
4235
4280
  "module": "/src/utils/mixins/DisabledMixin"
4281
+ },
4282
+ {
4283
+ "name": "IconNameMixin",
4284
+ "module": "/src/utils/mixins/IconNameMixin"
4236
4285
  }
4237
4286
  ],
4238
4287
  "superclass": {
@@ -5911,15 +5960,6 @@
5911
5960
  "attribute": "size",
5912
5961
  "reflects": true
5913
5962
  },
5914
- {
5915
- "kind": "field",
5916
- "name": "iconName",
5917
- "type": {
5918
- "text": "IconNames | undefined"
5919
- },
5920
- "description": "Name of the icon to be displayed inside the Avatar.\nMust be a valid icon name.",
5921
- "attribute": "icon-name"
5922
- },
5923
5963
  {
5924
5964
  "kind": "field",
5925
5965
  "name": "counter",
@@ -5974,14 +6014,6 @@
5974
6014
  "default": "32",
5975
6015
  "fieldName": "size"
5976
6016
  },
5977
- {
5978
- "name": "icon-name",
5979
- "type": {
5980
- "text": "IconNames | undefined"
5981
- },
5982
- "description": "Name of the icon to be displayed inside the Avatar.\nMust be a valid icon name.",
5983
- "fieldName": "iconName"
5984
- },
5985
6017
  {
5986
6018
  "name": "counter",
5987
6019
  "type": {
@@ -6127,6 +6159,56 @@
6127
6159
  }
6128
6160
  ]
6129
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
+ },
6130
6212
  {
6131
6213
  "kind": "javascript-module",
6132
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.0"
39
+ "version": "0.22.2"
40
40
  }