@momentum-design/components 0.0.27 → 0.0.28

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.
@@ -116,37 +116,27 @@
116
116
  },
117
117
  {
118
118
  "kind": "javascript-module",
119
- "path": "components/icon/icon.component.js",
119
+ "path": "components/badge/badge.component.js",
120
120
  "declarations": [
121
121
  {
122
122
  "kind": "class",
123
- "description": "Icon component, which has to be mounted inside of a `IconProvider`\ncomponent.\n\nThe `IconProvider` component defines where icons should be consumed from (`url`).\nThis `Icon` component accepts the `name` attribute, which will be\nthe file name of the icon to be loaded from the given `url`.\n\nOnce fetched, the icon will be mounted. If fetching wasn't successful,\nnothing will be shown.\n\nThe `scale` attribute allows scaling the icon based on the provided\n`length-unit` attribute (which will either come from the IconProvider or\ncould be overridden per icon). For example:\nif `scale = 1` and `length-unit = 'em'`, the size of the icon will be\n`width: 1em; height: 1em`.\n\nFor accessibility the `role` and `aria-label` of the icon can be set.",
124
- "name": "Icon",
125
- "members": [
126
- {
127
- "kind": "field",
128
- "name": "iconData",
129
- "type": {
130
- "text": "HTMLElement | undefined"
131
- },
132
- "privacy": "private"
133
- },
123
+ "description": "",
124
+ "name": "Badge",
125
+ "slots": [
134
126
  {
135
- "kind": "field",
136
- "name": "lengthUnitFromContext",
137
- "type": {
138
- "text": "string | undefined"
139
- },
140
- "privacy": "private"
141
- },
127
+ "description": "This is a default/unnamed slot",
128
+ "name": ""
129
+ }
130
+ ],
131
+ "members": [
142
132
  {
143
133
  "kind": "field",
144
- "name": "name",
134
+ "name": "type",
145
135
  "type": {
146
- "text": "string | undefined"
136
+ "text": "BadgeType | undefined"
147
137
  },
148
- "description": "Name of the icon (= filename)",
149
- "attribute": "name",
138
+ "description": "Type of the badge\nCan be `regular`, `icon`, `text` or `warning`\n\nDefault: `regular`",
139
+ "attribute": "type",
150
140
  "reflects": true
151
141
  },
152
142
  {
@@ -155,7 +145,7 @@
155
145
  "type": {
156
146
  "text": "number | undefined"
157
147
  },
158
- "description": "Scale of the icon (works in combination with length unit)",
148
+ "description": "Scale of the badge (works in combination with length unit)\n\nDefault: `1`",
159
149
  "attribute": "scale"
160
150
  },
161
151
  {
@@ -164,72 +154,60 @@
164
154
  "type": {
165
155
  "text": "string | undefined"
166
156
  },
167
- "description": "Length unit attribute for overridding length-unit from `IconProvider`",
157
+ "description": "Length unit attribute for scale\n\nDefault: `rem`",
168
158
  "attribute": "length-unit"
169
159
  },
170
160
  {
171
161
  "kind": "field",
172
- "name": "role",
162
+ "name": "iconName",
173
163
  "type": {
174
- "text": "string | null"
164
+ "text": "string | undefined"
175
165
  },
176
- "default": "null",
177
- "description": "Role attribute to be set for accessibility",
178
- "attribute": "role"
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"
179
168
  },
180
169
  {
181
170
  "kind": "field",
182
- "name": "ariaLabel",
171
+ "name": "text",
183
172
  "type": {
184
- "text": "string | null"
173
+ "text": "string | undefined"
185
174
  },
186
- "default": "null",
187
- "description": "Aria-label attribute to be set for accessibility",
188
- "attribute": "aria-label"
189
- },
190
- {
191
- "kind": "field",
192
- "name": "iconProviderContext",
193
- "privacy": "private"
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"
194
177
  },
195
178
  {
196
179
  "kind": "method",
197
- "name": "getIconData",
198
- "privacy": "private",
199
- "description": "Get Icon Data function which will fetch the icon (currently only svg)\nand sets state and attributes once fetched successfully"
180
+ "name": "updateSize",
181
+ "privacy": "private"
200
182
  },
201
183
  {
202
184
  "kind": "method",
203
- "name": "updateSize",
204
- "privacy": "private",
205
- "description": "Updates the size by setting the width and height"
185
+ "name": "iconTemplate"
206
186
  },
207
187
  {
208
188
  "kind": "method",
209
- "name": "setRoleOnIcon",
210
- "privacy": "private"
189
+ "name": "textTemplate"
211
190
  },
212
191
  {
213
192
  "kind": "method",
214
- "name": "setAriaLabelOnIcon",
215
- "privacy": "private"
193
+ "name": "warningTemplate"
216
194
  }
217
195
  ],
218
196
  "attributes": [
219
197
  {
220
- "name": "name",
198
+ "name": "type",
221
199
  "type": {
222
- "text": "string | undefined"
200
+ "text": "BadgeType | undefined"
223
201
  },
224
- "description": "Name of the icon (= filename)",
225
- "fieldName": "name"
202
+ "description": "Type of the badge\nCan be `regular`, `icon`, `text` or `warning`\n\nDefault: `regular`",
203
+ "fieldName": "type"
226
204
  },
227
205
  {
228
206
  "name": "scale",
229
207
  "type": {
230
208
  "text": "number | undefined"
231
209
  },
232
- "description": "Scale of the icon (works in combination with length unit)",
210
+ "description": "Scale of the badge (works in combination with length unit)\n\nDefault: `1`",
233
211
  "fieldName": "scale"
234
212
  },
235
213
  {
@@ -237,34 +215,33 @@
237
215
  "type": {
238
216
  "text": "string | undefined"
239
217
  },
240
- "description": "Length unit attribute for overridding length-unit from `IconProvider`",
218
+ "description": "Length unit attribute for scale\n\nDefault: `rem`",
241
219
  "fieldName": "lengthUnit"
242
220
  },
243
221
  {
244
- "name": "role",
222
+ "name": "icon-name",
245
223
  "type": {
246
- "text": "string | null"
224
+ "text": "string | undefined"
247
225
  },
248
- "default": "null",
249
- "description": "Role attribute to be set for accessibility",
250
- "fieldName": "role"
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"
251
228
  },
252
229
  {
253
- "name": "aria-label",
230
+ "name": "text",
254
231
  "type": {
255
- "text": "string | null"
232
+ "text": "string | undefined"
256
233
  },
257
- "default": "null",
258
- "description": "Aria-label attribute to be set for accessibility",
259
- "fieldName": "ariaLabel"
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"
260
236
  }
261
237
  ],
262
238
  "superclass": {
263
239
  "name": "Component",
264
240
  "module": "/src/models"
265
241
  },
266
- "tagName": "mdc-icon",
267
- "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 */",
242
+ "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 * @tag mdc-badge\n * @tagname mdc-badge\n */",
268
245
  "customElement": true
269
246
  }
270
247
  ],
@@ -273,35 +250,45 @@
273
250
  "kind": "js",
274
251
  "name": "default",
275
252
  "declaration": {
276
- "name": "Icon",
277
- "module": "components/icon/icon.component.js"
253
+ "name": "Badge",
254
+ "module": "components/badge/badge.component.js"
278
255
  }
279
256
  }
280
257
  ]
281
258
  },
282
259
  {
283
260
  "kind": "javascript-module",
284
- "path": "components/badge/badge.component.js",
261
+ "path": "components/icon/icon.component.js",
285
262
  "declarations": [
286
263
  {
287
264
  "kind": "class",
288
- "description": "",
289
- "name": "Badge",
290
- "slots": [
291
- {
292
- "description": "This is a default/unnamed slot",
293
- "name": ""
294
- }
295
- ],
265
+ "description": "Icon component, which has to be mounted inside of a `IconProvider`\ncomponent.\n\nThe `IconProvider` component defines where icons should be consumed from (`url`).\nThis `Icon` component accepts the `name` attribute, which will be\nthe file name of the icon to be loaded from the given `url`.\n\nOnce fetched, the icon will be mounted. If fetching wasn't successful,\nnothing will be shown.\n\nThe `scale` attribute allows scaling the icon based on the provided\n`length-unit` attribute (which will either come from the IconProvider or\ncould be overridden per icon). For example:\nif `scale = 1` and `length-unit = 'em'`, the size of the icon will be\n`width: 1em; height: 1em`.\n\nFor accessibility the `role` and `aria-label` of the icon can be set.",
266
+ "name": "Icon",
296
267
  "members": [
297
268
  {
298
269
  "kind": "field",
299
- "name": "type",
270
+ "name": "iconData",
300
271
  "type": {
301
- "text": "BadgeType | undefined"
272
+ "text": "HTMLElement | undefined"
302
273
  },
303
- "description": "Type of the badge\nCan be `regular`, `icon`, `text` or `warning`\n\nDefault: `regular`",
304
- "attribute": "type",
274
+ "privacy": "private"
275
+ },
276
+ {
277
+ "kind": "field",
278
+ "name": "lengthUnitFromContext",
279
+ "type": {
280
+ "text": "string | undefined"
281
+ },
282
+ "privacy": "private"
283
+ },
284
+ {
285
+ "kind": "field",
286
+ "name": "name",
287
+ "type": {
288
+ "text": "string | undefined"
289
+ },
290
+ "description": "Name of the icon (= filename)",
291
+ "attribute": "name",
305
292
  "reflects": true
306
293
  },
307
294
  {
@@ -310,7 +297,7 @@
310
297
  "type": {
311
298
  "text": "number | undefined"
312
299
  },
313
- "description": "Scale of the badge (works in combination with length unit)\n\nDefault: `1`",
300
+ "description": "Scale of the icon (works in combination with length unit)",
314
301
  "attribute": "scale"
315
302
  },
316
303
  {
@@ -319,60 +306,72 @@
319
306
  "type": {
320
307
  "text": "string | undefined"
321
308
  },
322
- "description": "Length unit attribute for scale\n\nDefault: `rem`",
309
+ "description": "Length unit attribute for overridding length-unit from `IconProvider`",
323
310
  "attribute": "length-unit"
324
311
  },
325
312
  {
326
313
  "kind": "field",
327
- "name": "iconName",
314
+ "name": "role",
328
315
  "type": {
329
- "text": "string | undefined"
316
+ "text": "string | null"
330
317
  },
331
- "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.",
332
- "attribute": "icon-name"
318
+ "default": "null",
319
+ "description": "Role attribute to be set for accessibility",
320
+ "attribute": "role"
333
321
  },
334
322
  {
335
323
  "kind": "field",
336
- "name": "text",
324
+ "name": "ariaLabel",
337
325
  "type": {
338
- "text": "string | undefined"
326
+ "text": "string | null"
339
327
  },
340
- "description": "If `type` is set to `text`, attribute `text` can\nbe used to pass in any text to be displayed in the badge.",
341
- "attribute": "text"
328
+ "default": "null",
329
+ "description": "Aria-label attribute to be set for accessibility",
330
+ "attribute": "aria-label"
342
331
  },
343
332
  {
344
- "kind": "method",
345
- "name": "updateSize",
333
+ "kind": "field",
334
+ "name": "iconProviderContext",
346
335
  "privacy": "private"
347
336
  },
348
337
  {
349
338
  "kind": "method",
350
- "name": "iconTemplate"
339
+ "name": "getIconData",
340
+ "privacy": "private",
341
+ "description": "Get Icon Data function which will fetch the icon (currently only svg)\nand sets state and attributes once fetched successfully"
351
342
  },
352
343
  {
353
344
  "kind": "method",
354
- "name": "textTemplate"
345
+ "name": "updateSize",
346
+ "privacy": "private",
347
+ "description": "Updates the size by setting the width and height"
355
348
  },
356
349
  {
357
350
  "kind": "method",
358
- "name": "warningTemplate"
351
+ "name": "setRoleOnIcon",
352
+ "privacy": "private"
353
+ },
354
+ {
355
+ "kind": "method",
356
+ "name": "setAriaLabelOnIcon",
357
+ "privacy": "private"
359
358
  }
360
359
  ],
361
360
  "attributes": [
362
361
  {
363
- "name": "type",
362
+ "name": "name",
364
363
  "type": {
365
- "text": "BadgeType | undefined"
364
+ "text": "string | undefined"
366
365
  },
367
- "description": "Type of the badge\nCan be `regular`, `icon`, `text` or `warning`\n\nDefault: `regular`",
368
- "fieldName": "type"
366
+ "description": "Name of the icon (= filename)",
367
+ "fieldName": "name"
369
368
  },
370
369
  {
371
370
  "name": "scale",
372
371
  "type": {
373
372
  "text": "number | undefined"
374
373
  },
375
- "description": "Scale of the badge (works in combination with length unit)\n\nDefault: `1`",
374
+ "description": "Scale of the icon (works in combination with length unit)",
376
375
  "fieldName": "scale"
377
376
  },
378
377
  {
@@ -380,33 +379,34 @@
380
379
  "type": {
381
380
  "text": "string | undefined"
382
381
  },
383
- "description": "Length unit attribute for scale\n\nDefault: `rem`",
382
+ "description": "Length unit attribute for overridding length-unit from `IconProvider`",
384
383
  "fieldName": "lengthUnit"
385
384
  },
386
385
  {
387
- "name": "icon-name",
386
+ "name": "role",
388
387
  "type": {
389
- "text": "string | undefined"
388
+ "text": "string | null"
390
389
  },
391
- "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.",
392
- "fieldName": "iconName"
390
+ "default": "null",
391
+ "description": "Role attribute to be set for accessibility",
392
+ "fieldName": "role"
393
393
  },
394
394
  {
395
- "name": "text",
395
+ "name": "aria-label",
396
396
  "type": {
397
- "text": "string | undefined"
397
+ "text": "string | null"
398
398
  },
399
- "description": "If `type` is set to `text`, attribute `text` can\nbe used to pass in any text to be displayed in the badge.",
400
- "fieldName": "text"
399
+ "default": "null",
400
+ "description": "Aria-label attribute to be set for accessibility",
401
+ "fieldName": "ariaLabel"
401
402
  }
402
403
  ],
403
404
  "superclass": {
404
405
  "name": "Component",
405
406
  "module": "/src/models"
406
407
  },
407
- "tagName": "mdc-badge",
408
- "summary": "This is MyElement",
409
- "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 */",
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 */",
410
410
  "customElement": true
411
411
  }
412
412
  ],
@@ -415,8 +415,8 @@
415
415
  "kind": "js",
416
416
  "name": "default",
417
417
  "declaration": {
418
- "name": "Badge",
419
- "module": "components/badge/badge.component.js"
418
+ "name": "Icon",
419
+ "module": "components/icon/icon.component.js"
420
420
  }
421
421
  }
422
422
  ]
@@ -1,6 +1,6 @@
1
1
  export { default as Avatar } from './avatar';
2
- export { default as Icon } from './icon';
3
2
  export { default as Badge } from './badge';
3
+ export { default as Icon } from './icon';
4
4
  export { default as IconProvider } from './iconprovider';
5
5
  export { default as Text } from './text';
6
6
  export { default as ThemeProvider } from './themeprovider';
@@ -3,13 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ThemeProvider = exports.Text = exports.IconProvider = exports.Badge = exports.Icon = exports.Avatar = void 0;
6
+ exports.ThemeProvider = exports.Text = exports.IconProvider = exports.Icon = exports.Badge = exports.Avatar = void 0;
7
7
  var avatar_1 = require("./avatar");
8
8
  Object.defineProperty(exports, "Avatar", { enumerable: true, get: function () { return __importDefault(avatar_1).default; } });
9
- var icon_1 = require("./icon");
10
- Object.defineProperty(exports, "Icon", { enumerable: true, get: function () { return __importDefault(icon_1).default; } });
11
9
  var badge_1 = require("./badge");
12
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
13
  var iconprovider_1 = require("./iconprovider");
14
14
  Object.defineProperty(exports, "IconProvider", { enumerable: true, get: function () { return __importDefault(iconprovider_1).default; } });
15
15
  var text_1 = require("./text");
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  "@momentum-design/icons": "*",
32
32
  "@momentum-design/tokens": "*"
33
33
  },
34
- "version": "0.0.27"
34
+ "version": "0.0.28"
35
35
  }