@momentum-design/components 0.0.28 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/index.js +18 -16
- package/dist/browser/index.js.map +3 -3
- package/dist/components/avatar/avatar.component.d.ts +1 -1
- package/dist/components/avatar/avatar.component.js +5 -5
- package/dist/components/avatar/avatar.constants.d.ts +1 -1
- package/dist/components/avatar/avatar.constants.js +1 -1
- package/dist/components/badge/badge.component.d.ts +1 -1
- package/dist/components/badge/badge.component.js +6 -5
- package/dist/components/badge/badge.constants.d.ts +2 -2
- package/dist/components/badge/badge.constants.js +1 -1
- package/dist/components/badge/badge.styles.js +2 -0
- package/dist/components/icon/icon.component.d.ts +8 -6
- package/dist/components/icon/icon.component.js +20 -11
- package/dist/components/icon/icon.constants.d.ts +1 -1
- package/dist/components/icon/icon.constants.js +1 -1
- package/dist/components/iconprovider/iconprovider.component.d.ts +6 -1
- package/dist/components/iconprovider/iconprovider.component.js +15 -2
- package/dist/components/iconprovider/iconprovider.constants.d.ts +3 -1
- package/dist/components/iconprovider/iconprovider.constants.js +8 -1
- package/dist/components/iconprovider/iconprovider.context.d.ts +2 -1
- package/dist/components/iconprovider/iconprovider.stories.utils.d.ts +1 -2
- package/dist/components/iconprovider/iconprovider.stories.utils.js +4 -3
- package/dist/components/text/text.utils.d.ts +1 -1
- package/dist/components/text/text.utils.js +1 -1
- package/dist/custom-elements.json +56 -21
- package/dist/react/icon/index.d.ts +2 -2
- package/dist/react/icon/index.js +2 -2
- package/package.json +1 -1
@@ -44,12 +44,12 @@
|
|
44
44
|
},
|
45
45
|
{
|
46
46
|
"kind": "field",
|
47
|
-
"name": "
|
47
|
+
"name": "size",
|
48
48
|
"type": {
|
49
49
|
"text": "number | undefined"
|
50
50
|
},
|
51
51
|
"description": "Scale of the avatar",
|
52
|
-
"attribute": "
|
52
|
+
"attribute": "size"
|
53
53
|
},
|
54
54
|
{
|
55
55
|
"kind": "method",
|
@@ -85,12 +85,12 @@
|
|
85
85
|
"fieldName": "src"
|
86
86
|
},
|
87
87
|
{
|
88
|
-
"name": "
|
88
|
+
"name": "size",
|
89
89
|
"type": {
|
90
90
|
"text": "number | undefined"
|
91
91
|
},
|
92
92
|
"description": "Scale of the avatar",
|
93
|
-
"fieldName": "
|
93
|
+
"fieldName": "size"
|
94
94
|
}
|
95
95
|
],
|
96
96
|
"superclass": {
|
@@ -141,12 +141,12 @@
|
|
141
141
|
},
|
142
142
|
{
|
143
143
|
"kind": "field",
|
144
|
-
"name": "
|
144
|
+
"name": "size",
|
145
145
|
"type": {
|
146
146
|
"text": "number | undefined"
|
147
147
|
},
|
148
148
|
"description": "Scale of the badge (works in combination with length unit)\n\nDefault: `1`",
|
149
|
-
"attribute": "
|
149
|
+
"attribute": "size"
|
150
150
|
},
|
151
151
|
{
|
152
152
|
"kind": "field",
|
@@ -203,12 +203,12 @@
|
|
203
203
|
"fieldName": "type"
|
204
204
|
},
|
205
205
|
{
|
206
|
-
"name": "
|
206
|
+
"name": "size",
|
207
207
|
"type": {
|
208
208
|
"text": "number | undefined"
|
209
209
|
},
|
210
210
|
"description": "Scale of the badge (works in combination with length unit)\n\nDefault: `1`",
|
211
|
-
"fieldName": "
|
211
|
+
"fieldName": "size"
|
212
212
|
},
|
213
213
|
{
|
214
214
|
"name": "length-unit",
|
@@ -262,7 +262,7 @@
|
|
262
262
|
"declarations": [
|
263
263
|
{
|
264
264
|
"kind": "class",
|
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 `
|
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 `size` attribute allows sizing 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 `size = 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
266
|
"name": "Icon",
|
267
267
|
"members": [
|
268
268
|
{
|
@@ -281,6 +281,14 @@
|
|
281
281
|
},
|
282
282
|
"privacy": "private"
|
283
283
|
},
|
284
|
+
{
|
285
|
+
"kind": "field",
|
286
|
+
"name": "sizeFromContext",
|
287
|
+
"type": {
|
288
|
+
"text": "number | undefined"
|
289
|
+
},
|
290
|
+
"privacy": "private"
|
291
|
+
},
|
284
292
|
{
|
285
293
|
"kind": "field",
|
286
294
|
"name": "name",
|
@@ -293,12 +301,12 @@
|
|
293
301
|
},
|
294
302
|
{
|
295
303
|
"kind": "field",
|
296
|
-
"name": "
|
304
|
+
"name": "size",
|
297
305
|
"type": {
|
298
306
|
"text": "number | undefined"
|
299
307
|
},
|
300
|
-
"description": "
|
301
|
-
"attribute": "
|
308
|
+
"description": "Size of the icon (works in combination with length unit)",
|
309
|
+
"attribute": "size"
|
302
310
|
},
|
303
311
|
{
|
304
312
|
"kind": "field",
|
@@ -306,7 +314,7 @@
|
|
306
314
|
"type": {
|
307
315
|
"text": "string | undefined"
|
308
316
|
},
|
309
|
-
"description": "Length unit attribute for
|
317
|
+
"description": "Length unit attribute for overriding length-unit from `IconProvider`",
|
310
318
|
"attribute": "length-unit"
|
311
319
|
},
|
312
320
|
{
|
@@ -332,7 +340,8 @@
|
|
332
340
|
{
|
333
341
|
"kind": "field",
|
334
342
|
"name": "iconProviderContext",
|
335
|
-
"privacy": "private"
|
343
|
+
"privacy": "private",
|
344
|
+
"readonly": true
|
336
345
|
},
|
337
346
|
{
|
338
347
|
"kind": "method",
|
@@ -355,6 +364,12 @@
|
|
355
364
|
"kind": "method",
|
356
365
|
"name": "setAriaLabelOnIcon",
|
357
366
|
"privacy": "private"
|
367
|
+
},
|
368
|
+
{
|
369
|
+
"kind": "field",
|
370
|
+
"name": "computedIconSize",
|
371
|
+
"privacy": "private",
|
372
|
+
"readonly": true
|
358
373
|
}
|
359
374
|
],
|
360
375
|
"attributes": [
|
@@ -367,19 +382,19 @@
|
|
367
382
|
"fieldName": "name"
|
368
383
|
},
|
369
384
|
{
|
370
|
-
"name": "
|
385
|
+
"name": "size",
|
371
386
|
"type": {
|
372
387
|
"text": "number | undefined"
|
373
388
|
},
|
374
|
-
"description": "
|
375
|
-
"fieldName": "
|
389
|
+
"description": "Size of the icon (works in combination with length unit)",
|
390
|
+
"fieldName": "size"
|
376
391
|
},
|
377
392
|
{
|
378
393
|
"name": "length-unit",
|
379
394
|
"type": {
|
380
395
|
"text": "string | undefined"
|
381
396
|
},
|
382
|
-
"description": "Length unit attribute for
|
397
|
+
"description": "Length unit attribute for overriding length-unit from `IconProvider`",
|
383
398
|
"fieldName": "lengthUnit"
|
384
399
|
},
|
385
400
|
{
|
@@ -406,7 +421,7 @@
|
|
406
421
|
"module": "/src/models"
|
407
422
|
},
|
408
423
|
"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 `
|
424
|
+
"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 `size` attribute allows sizing 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 `size = 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
425
|
"customElement": true
|
411
426
|
}
|
412
427
|
],
|
@@ -460,12 +475,23 @@
|
|
460
475
|
"kind": "field",
|
461
476
|
"name": "lengthUnit",
|
462
477
|
"type": {
|
463
|
-
"text": "string
|
478
|
+
"text": "string"
|
464
479
|
},
|
465
480
|
"description": "Length unit used for sizing of icons, default: 'em'",
|
466
481
|
"attribute": "length-unit",
|
467
482
|
"reflects": true
|
468
483
|
},
|
484
|
+
{
|
485
|
+
"kind": "field",
|
486
|
+
"name": "size",
|
487
|
+
"type": {
|
488
|
+
"text": "number | undefined"
|
489
|
+
},
|
490
|
+
"default": "DEFAULTS.LENGTH_UNIT_SIZE[DEFAULTS.LENGTH_UNIT]",
|
491
|
+
"description": "The default size of the icon.\nIf not set, it falls back to the size defined by the length unit.",
|
492
|
+
"attribute": "size",
|
493
|
+
"reflects": true
|
494
|
+
},
|
469
495
|
{
|
470
496
|
"kind": "method",
|
471
497
|
"name": "updateValuesInContext",
|
@@ -502,10 +528,19 @@
|
|
502
528
|
{
|
503
529
|
"name": "length-unit",
|
504
530
|
"type": {
|
505
|
-
"text": "string
|
531
|
+
"text": "string"
|
506
532
|
},
|
507
533
|
"description": "Length unit used for sizing of icons, default: 'em'",
|
508
534
|
"fieldName": "lengthUnit"
|
535
|
+
},
|
536
|
+
{
|
537
|
+
"name": "size",
|
538
|
+
"type": {
|
539
|
+
"text": "number | undefined"
|
540
|
+
},
|
541
|
+
"default": "DEFAULTS.LENGTH_UNIT_SIZE[DEFAULTS.LENGTH_UNIT]",
|
542
|
+
"description": "The default size of the icon.\nIf not set, it falls back to the size defined by the length unit.",
|
543
|
+
"fieldName": "size"
|
509
544
|
}
|
510
545
|
],
|
511
546
|
"superclass": {
|
@@ -10,10 +10,10 @@ import Component from '../../components/icon';
|
|
10
10
|
* Once fetched, the icon will be mounted. If fetching wasn't successful,
|
11
11
|
* nothing will be shown.
|
12
12
|
*
|
13
|
-
* The `
|
13
|
+
* The `size` attribute allows sizing the icon based on the provided
|
14
14
|
* `length-unit` attribute (which will either come from the IconProvider or
|
15
15
|
* could be overridden per icon). For example:
|
16
|
-
* if `
|
16
|
+
* if `size = 1` and `length-unit = 'em'`, the size of the icon will be
|
17
17
|
* `width: 1em; height: 1em`.
|
18
18
|
*
|
19
19
|
* For accessibility the `role` and `aria-label` of the icon can be set.
|
package/dist/react/icon/index.js
CHANGED
@@ -16,10 +16,10 @@ const icon_constants_1 = require("../../components/icon/icon.constants");
|
|
16
16
|
* Once fetched, the icon will be mounted. If fetching wasn't successful,
|
17
17
|
* nothing will be shown.
|
18
18
|
*
|
19
|
-
* The `
|
19
|
+
* The `size` attribute allows sizing the icon based on the provided
|
20
20
|
* `length-unit` attribute (which will either come from the IconProvider or
|
21
21
|
* could be overridden per icon). For example:
|
22
|
-
* if `
|
22
|
+
* if `size = 1` and `length-unit = 'em'`, the size of the icon will be
|
23
23
|
* `width: 1em; height: 1em`.
|
24
24
|
*
|
25
25
|
* For accessibility the `role` and `aria-label` of the icon can be set.
|
package/package.json
CHANGED