@momentum-design/components 0.0.23 → 0.0.25
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/index.js +51 -51
- package/dist/browser/index.js.map +4 -4
- package/dist/components/iconprovider/iconprovider.stories.utils.d.ts +12 -0
- package/dist/components/iconprovider/iconprovider.stories.utils.js +24 -0
- package/dist/components/themeprovider/themeprovider.stories.utils.d.ts +12 -0
- package/dist/components/themeprovider/themeprovider.stories.utils.js +20 -0
- package/dist/custom-elements.json +683 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -4
- package/dist/react/avatar/index.d.ts +11 -0
- package/dist/react/avatar/index.js +23 -0
- package/dist/react/badge/index.d.ts +11 -0
- package/dist/react/badge/index.js +23 -0
- package/dist/react/icon/index.d.ts +25 -0
- package/dist/react/icon/index.js +37 -0
- package/dist/react/iconprovider/index.d.ts +14 -0
- package/dist/react/iconprovider/index.js +26 -0
- package/dist/react/index.d.ts +6 -0
- package/dist/react/index.js +18 -0
- package/dist/react/text/index.d.ts +15 -0
- package/dist/react/text/index.js +27 -0
- package/dist/react/themeprovider/index.d.ts +14 -0
- package/dist/react/themeprovider/index.js +26 -0
- package/dist/utils/mixins/DisabledMixin.d.ts +7 -0
- package/dist/utils/mixins/DisabledMixin.js +20 -0
- package/dist/utils/mixins/TabIndexMixin.d.ts +7 -0
- package/dist/utils/mixins/TabIndexMixin.js +20 -0
- package/package.json +6 -3
@@ -0,0 +1,683 @@
|
|
1
|
+
{
|
2
|
+
"schemaVersion": "1.0.0",
|
3
|
+
"readme": "",
|
4
|
+
"modules": [
|
5
|
+
{
|
6
|
+
"kind": "javascript-module",
|
7
|
+
"path": "components/avatar/avatar.component.js",
|
8
|
+
"declarations": [
|
9
|
+
{
|
10
|
+
"kind": "class",
|
11
|
+
"description": "",
|
12
|
+
"name": "Avatar",
|
13
|
+
"slots": [
|
14
|
+
{
|
15
|
+
"description": "This is a default/unnamed slot",
|
16
|
+
"name": ""
|
17
|
+
}
|
18
|
+
],
|
19
|
+
"members": [
|
20
|
+
{
|
21
|
+
"kind": "field",
|
22
|
+
"name": "type",
|
23
|
+
"type": {
|
24
|
+
"text": "AvatarType | undefined"
|
25
|
+
},
|
26
|
+
"attribute": "type",
|
27
|
+
"reflects": true
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"kind": "field",
|
31
|
+
"name": "alt",
|
32
|
+
"type": {
|
33
|
+
"text": "string | undefined"
|
34
|
+
},
|
35
|
+
"attribute": "alt"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"kind": "field",
|
39
|
+
"name": "src",
|
40
|
+
"type": {
|
41
|
+
"text": "string | undefined"
|
42
|
+
},
|
43
|
+
"attribute": "src"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"kind": "field",
|
47
|
+
"name": "scale",
|
48
|
+
"type": {
|
49
|
+
"text": "number | undefined"
|
50
|
+
},
|
51
|
+
"description": "Scale of the avatar",
|
52
|
+
"attribute": "scale"
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"kind": "method",
|
56
|
+
"name": "updateSize",
|
57
|
+
"privacy": "private",
|
58
|
+
"description": "Updates the size by setting the width and height"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"kind": "method",
|
62
|
+
"name": "photoTemplate"
|
63
|
+
}
|
64
|
+
],
|
65
|
+
"attributes": [
|
66
|
+
{
|
67
|
+
"name": "type",
|
68
|
+
"type": {
|
69
|
+
"text": "AvatarType | undefined"
|
70
|
+
},
|
71
|
+
"fieldName": "type"
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"name": "alt",
|
75
|
+
"type": {
|
76
|
+
"text": "string | undefined"
|
77
|
+
},
|
78
|
+
"fieldName": "alt"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"name": "src",
|
82
|
+
"type": {
|
83
|
+
"text": "string | undefined"
|
84
|
+
},
|
85
|
+
"fieldName": "src"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"name": "scale",
|
89
|
+
"type": {
|
90
|
+
"text": "number | undefined"
|
91
|
+
},
|
92
|
+
"description": "Scale of the avatar",
|
93
|
+
"fieldName": "scale"
|
94
|
+
}
|
95
|
+
],
|
96
|
+
"superclass": {
|
97
|
+
"name": "Component",
|
98
|
+
"module": "/src/models"
|
99
|
+
},
|
100
|
+
"tagName": "mdc-avatar",
|
101
|
+
"summary": "This is MyElement",
|
102
|
+
"jsDoc": "/**\n * @slot - This is a default/unnamed slot\n *\n * @summary This is MyElement\n *\n * @tag mdc-avatar\n * @tagname mdc-avatar\n */",
|
103
|
+
"customElement": true
|
104
|
+
}
|
105
|
+
],
|
106
|
+
"exports": [
|
107
|
+
{
|
108
|
+
"kind": "js",
|
109
|
+
"name": "default",
|
110
|
+
"declaration": {
|
111
|
+
"name": "Avatar",
|
112
|
+
"module": "components/avatar/avatar.component.js"
|
113
|
+
}
|
114
|
+
}
|
115
|
+
]
|
116
|
+
},
|
117
|
+
{
|
118
|
+
"kind": "javascript-module",
|
119
|
+
"path": "components/badge/badge.component.js",
|
120
|
+
"declarations": [
|
121
|
+
{
|
122
|
+
"kind": "class",
|
123
|
+
"description": "",
|
124
|
+
"name": "Badge",
|
125
|
+
"slots": [
|
126
|
+
{
|
127
|
+
"description": "This is a default/unnamed slot",
|
128
|
+
"name": ""
|
129
|
+
}
|
130
|
+
],
|
131
|
+
"members": [
|
132
|
+
{
|
133
|
+
"kind": "field",
|
134
|
+
"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`",
|
139
|
+
"attribute": "type",
|
140
|
+
"reflects": true
|
141
|
+
},
|
142
|
+
{
|
143
|
+
"kind": "field",
|
144
|
+
"name": "scale",
|
145
|
+
"type": {
|
146
|
+
"text": "number | undefined"
|
147
|
+
},
|
148
|
+
"description": "Scale of the badge (works in combination with length unit)\n\nDefault: `1`",
|
149
|
+
"attribute": "scale"
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"kind": "field",
|
153
|
+
"name": "lengthUnit",
|
154
|
+
"type": {
|
155
|
+
"text": "string | undefined"
|
156
|
+
},
|
157
|
+
"description": "Length unit attribute for scale\n\nDefault: `rem`",
|
158
|
+
"attribute": "length-unit"
|
159
|
+
},
|
160
|
+
{
|
161
|
+
"kind": "field",
|
162
|
+
"name": "iconName",
|
163
|
+
"type": {
|
164
|
+
"text": "string | undefined"
|
165
|
+
},
|
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"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"kind": "field",
|
171
|
+
"name": "text",
|
172
|
+
"type": {
|
173
|
+
"text": "string | undefined"
|
174
|
+
},
|
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"
|
177
|
+
},
|
178
|
+
{
|
179
|
+
"kind": "method",
|
180
|
+
"name": "updateSize",
|
181
|
+
"privacy": "private"
|
182
|
+
},
|
183
|
+
{
|
184
|
+
"kind": "method",
|
185
|
+
"name": "iconTemplate"
|
186
|
+
},
|
187
|
+
{
|
188
|
+
"kind": "method",
|
189
|
+
"name": "textTemplate"
|
190
|
+
},
|
191
|
+
{
|
192
|
+
"kind": "method",
|
193
|
+
"name": "warningTemplate"
|
194
|
+
}
|
195
|
+
],
|
196
|
+
"attributes": [
|
197
|
+
{
|
198
|
+
"name": "type",
|
199
|
+
"type": {
|
200
|
+
"text": "BadgeType | undefined"
|
201
|
+
},
|
202
|
+
"description": "Type of the badge\nCan be `regular`, `icon`, `text` or `warning`\n\nDefault: `regular`",
|
203
|
+
"fieldName": "type"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"name": "scale",
|
207
|
+
"type": {
|
208
|
+
"text": "number | undefined"
|
209
|
+
},
|
210
|
+
"description": "Scale of the badge (works in combination with length unit)\n\nDefault: `1`",
|
211
|
+
"fieldName": "scale"
|
212
|
+
},
|
213
|
+
{
|
214
|
+
"name": "length-unit",
|
215
|
+
"type": {
|
216
|
+
"text": "string | undefined"
|
217
|
+
},
|
218
|
+
"description": "Length unit attribute for scale\n\nDefault: `rem`",
|
219
|
+
"fieldName": "lengthUnit"
|
220
|
+
},
|
221
|
+
{
|
222
|
+
"name": "icon-name",
|
223
|
+
"type": {
|
224
|
+
"text": "string | undefined"
|
225
|
+
},
|
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"
|
228
|
+
},
|
229
|
+
{
|
230
|
+
"name": "text",
|
231
|
+
"type": {
|
232
|
+
"text": "string | undefined"
|
233
|
+
},
|
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"
|
236
|
+
}
|
237
|
+
],
|
238
|
+
"superclass": {
|
239
|
+
"name": "Component",
|
240
|
+
"module": "/src/models"
|
241
|
+
},
|
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 */",
|
245
|
+
"customElement": true
|
246
|
+
}
|
247
|
+
],
|
248
|
+
"exports": [
|
249
|
+
{
|
250
|
+
"kind": "js",
|
251
|
+
"name": "default",
|
252
|
+
"declaration": {
|
253
|
+
"name": "Badge",
|
254
|
+
"module": "components/badge/badge.component.js"
|
255
|
+
}
|
256
|
+
}
|
257
|
+
]
|
258
|
+
},
|
259
|
+
{
|
260
|
+
"kind": "javascript-module",
|
261
|
+
"path": "components/icon/icon.component.js",
|
262
|
+
"declarations": [
|
263
|
+
{
|
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 `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",
|
267
|
+
"members": [
|
268
|
+
{
|
269
|
+
"kind": "field",
|
270
|
+
"name": "iconData",
|
271
|
+
"type": {
|
272
|
+
"text": "HTMLElement | undefined"
|
273
|
+
},
|
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",
|
292
|
+
"reflects": true
|
293
|
+
},
|
294
|
+
{
|
295
|
+
"kind": "field",
|
296
|
+
"name": "scale",
|
297
|
+
"type": {
|
298
|
+
"text": "number | undefined"
|
299
|
+
},
|
300
|
+
"description": "Scale of the icon (works in combination with length unit)",
|
301
|
+
"attribute": "scale"
|
302
|
+
},
|
303
|
+
{
|
304
|
+
"kind": "field",
|
305
|
+
"name": "lengthUnit",
|
306
|
+
"type": {
|
307
|
+
"text": "string | undefined"
|
308
|
+
},
|
309
|
+
"description": "Length unit attribute for overridding length-unit from `IconProvider`",
|
310
|
+
"attribute": "length-unit"
|
311
|
+
},
|
312
|
+
{
|
313
|
+
"kind": "field",
|
314
|
+
"name": "role",
|
315
|
+
"type": {
|
316
|
+
"text": "string | null"
|
317
|
+
},
|
318
|
+
"default": "null",
|
319
|
+
"description": "Role attribute to be set for accessibility",
|
320
|
+
"attribute": "role"
|
321
|
+
},
|
322
|
+
{
|
323
|
+
"kind": "field",
|
324
|
+
"name": "ariaLabel",
|
325
|
+
"type": {
|
326
|
+
"text": "string | null"
|
327
|
+
},
|
328
|
+
"default": "null",
|
329
|
+
"description": "Aria-label attribute to be set for accessibility",
|
330
|
+
"attribute": "aria-label"
|
331
|
+
},
|
332
|
+
{
|
333
|
+
"kind": "field",
|
334
|
+
"name": "iconProviderContext",
|
335
|
+
"privacy": "private"
|
336
|
+
},
|
337
|
+
{
|
338
|
+
"kind": "method",
|
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"
|
342
|
+
},
|
343
|
+
{
|
344
|
+
"kind": "method",
|
345
|
+
"name": "updateSize",
|
346
|
+
"privacy": "private",
|
347
|
+
"description": "Updates the size by setting the width and height"
|
348
|
+
},
|
349
|
+
{
|
350
|
+
"kind": "method",
|
351
|
+
"name": "setRoleOnIcon",
|
352
|
+
"privacy": "private"
|
353
|
+
},
|
354
|
+
{
|
355
|
+
"kind": "method",
|
356
|
+
"name": "setAriaLabelOnIcon",
|
357
|
+
"privacy": "private"
|
358
|
+
}
|
359
|
+
],
|
360
|
+
"attributes": [
|
361
|
+
{
|
362
|
+
"name": "name",
|
363
|
+
"type": {
|
364
|
+
"text": "string | undefined"
|
365
|
+
},
|
366
|
+
"description": "Name of the icon (= filename)",
|
367
|
+
"fieldName": "name"
|
368
|
+
},
|
369
|
+
{
|
370
|
+
"name": "scale",
|
371
|
+
"type": {
|
372
|
+
"text": "number | undefined"
|
373
|
+
},
|
374
|
+
"description": "Scale of the icon (works in combination with length unit)",
|
375
|
+
"fieldName": "scale"
|
376
|
+
},
|
377
|
+
{
|
378
|
+
"name": "length-unit",
|
379
|
+
"type": {
|
380
|
+
"text": "string | undefined"
|
381
|
+
},
|
382
|
+
"description": "Length unit attribute for overridding length-unit from `IconProvider`",
|
383
|
+
"fieldName": "lengthUnit"
|
384
|
+
},
|
385
|
+
{
|
386
|
+
"name": "role",
|
387
|
+
"type": {
|
388
|
+
"text": "string | null"
|
389
|
+
},
|
390
|
+
"default": "null",
|
391
|
+
"description": "Role attribute to be set for accessibility",
|
392
|
+
"fieldName": "role"
|
393
|
+
},
|
394
|
+
{
|
395
|
+
"name": "aria-label",
|
396
|
+
"type": {
|
397
|
+
"text": "string | null"
|
398
|
+
},
|
399
|
+
"default": "null",
|
400
|
+
"description": "Aria-label attribute to be set for accessibility",
|
401
|
+
"fieldName": "ariaLabel"
|
402
|
+
}
|
403
|
+
],
|
404
|
+
"superclass": {
|
405
|
+
"name": "Component",
|
406
|
+
"module": "/src/models"
|
407
|
+
},
|
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
|
+
"customElement": true
|
411
|
+
}
|
412
|
+
],
|
413
|
+
"exports": [
|
414
|
+
{
|
415
|
+
"kind": "js",
|
416
|
+
"name": "default",
|
417
|
+
"declaration": {
|
418
|
+
"name": "Icon",
|
419
|
+
"module": "components/icon/icon.component.js"
|
420
|
+
}
|
421
|
+
}
|
422
|
+
]
|
423
|
+
},
|
424
|
+
{
|
425
|
+
"kind": "javascript-module",
|
426
|
+
"path": "components/iconprovider/iconprovider.component.js",
|
427
|
+
"declarations": [
|
428
|
+
{
|
429
|
+
"kind": "class",
|
430
|
+
"description": "IconProvider component, which allows to be consumed from sub components\n(see `providerUtils.consume` for how to consume)\n\nBundling icons will be up to the consumer of this component, such\nthat only a url has to be passed in from which the icons will be\nfetched.",
|
431
|
+
"name": "IconProvider",
|
432
|
+
"members": [
|
433
|
+
{
|
434
|
+
"kind": "field",
|
435
|
+
"name": "Context",
|
436
|
+
"privacy": "public",
|
437
|
+
"static": true,
|
438
|
+
"readonly": true
|
439
|
+
},
|
440
|
+
{
|
441
|
+
"kind": "field",
|
442
|
+
"name": "url",
|
443
|
+
"type": {
|
444
|
+
"text": "string | undefined"
|
445
|
+
},
|
446
|
+
"description": "Url of where icons will be fetched from",
|
447
|
+
"attribute": "url"
|
448
|
+
},
|
449
|
+
{
|
450
|
+
"kind": "field",
|
451
|
+
"name": "fileExtension",
|
452
|
+
"type": {
|
453
|
+
"text": "string | undefined"
|
454
|
+
},
|
455
|
+
"description": "File extension of icons, default: 'svg'",
|
456
|
+
"attribute": "file-extension",
|
457
|
+
"reflects": true
|
458
|
+
},
|
459
|
+
{
|
460
|
+
"kind": "field",
|
461
|
+
"name": "lengthUnit",
|
462
|
+
"type": {
|
463
|
+
"text": "string | undefined"
|
464
|
+
},
|
465
|
+
"description": "Length unit used for sizing of icons, default: 'em'",
|
466
|
+
"attribute": "length-unit",
|
467
|
+
"reflects": true
|
468
|
+
},
|
469
|
+
{
|
470
|
+
"kind": "method",
|
471
|
+
"name": "updateValuesInContext",
|
472
|
+
"privacy": "private"
|
473
|
+
},
|
474
|
+
{
|
475
|
+
"kind": "method",
|
476
|
+
"name": "updateContext",
|
477
|
+
"privacy": "protected",
|
478
|
+
"return": {
|
479
|
+
"type": {
|
480
|
+
"text": "void"
|
481
|
+
}
|
482
|
+
}
|
483
|
+
}
|
484
|
+
],
|
485
|
+
"attributes": [
|
486
|
+
{
|
487
|
+
"name": "url",
|
488
|
+
"type": {
|
489
|
+
"text": "string | undefined"
|
490
|
+
},
|
491
|
+
"description": "Url of where icons will be fetched from",
|
492
|
+
"fieldName": "url"
|
493
|
+
},
|
494
|
+
{
|
495
|
+
"name": "file-extension",
|
496
|
+
"type": {
|
497
|
+
"text": "string | undefined"
|
498
|
+
},
|
499
|
+
"description": "File extension of icons, default: 'svg'",
|
500
|
+
"fieldName": "fileExtension"
|
501
|
+
},
|
502
|
+
{
|
503
|
+
"name": "length-unit",
|
504
|
+
"type": {
|
505
|
+
"text": "string | undefined"
|
506
|
+
},
|
507
|
+
"description": "Length unit used for sizing of icons, default: 'em'",
|
508
|
+
"fieldName": "lengthUnit"
|
509
|
+
}
|
510
|
+
],
|
511
|
+
"superclass": {
|
512
|
+
"name": "Provider",
|
513
|
+
"module": "/src/models"
|
514
|
+
},
|
515
|
+
"tagName": "mdc-iconprovider",
|
516
|
+
"jsDoc": "/**\n * IconProvider component, which allows to be consumed from sub components\n * (see `providerUtils.consume` for how to consume)\n *\n * Bundling icons will be up to the consumer of this component, such\n * that only a url has to be passed in from which the icons will be\n * fetched.\n *\n * @tag mdc-iconprovider\n * @tagname mdc-iconprovider\n */",
|
517
|
+
"customElement": true
|
518
|
+
}
|
519
|
+
],
|
520
|
+
"exports": [
|
521
|
+
{
|
522
|
+
"kind": "js",
|
523
|
+
"name": "default",
|
524
|
+
"declaration": {
|
525
|
+
"name": "IconProvider",
|
526
|
+
"module": "components/iconprovider/iconprovider.component.js"
|
527
|
+
}
|
528
|
+
}
|
529
|
+
]
|
530
|
+
},
|
531
|
+
{
|
532
|
+
"kind": "javascript-module",
|
533
|
+
"path": "components/text/text.component.js",
|
534
|
+
"declarations": [
|
535
|
+
{
|
536
|
+
"kind": "class",
|
537
|
+
"description": "Text component, which helps creating a text element aligning with\nstyling.\n\nThe `type` attribute allows changing the type of text, like `heading-1`, etc.\n\nFor accessibility the `role` and `aria-level` on the component are going to be set\nautomatically based on the type e.g. heading-1 will lead to `role=\"heading\"` and `aria-level=1`.",
|
538
|
+
"name": "Text",
|
539
|
+
"members": [
|
540
|
+
{
|
541
|
+
"kind": "field",
|
542
|
+
"name": "type",
|
543
|
+
"type": {
|
544
|
+
"text": "FontType | undefined"
|
545
|
+
},
|
546
|
+
"privacy": "public",
|
547
|
+
"description": "Text Type - defines how the text should be rendered\n\nPossible values: `heading-1` | `heading-2` | `heading-3` | `heading-4`\n| `heading-5` | `heading-6` | `heading-7` | `body-large` | `body-regular`\n| `body-small` | `image-title` | `label`;",
|
548
|
+
"attribute": "type",
|
549
|
+
"reflects": true
|
550
|
+
},
|
551
|
+
{
|
552
|
+
"kind": "method",
|
553
|
+
"name": "handleTypeChanged",
|
554
|
+
"privacy": "protected",
|
555
|
+
"return": {
|
556
|
+
"type": {
|
557
|
+
"text": "void"
|
558
|
+
}
|
559
|
+
}
|
560
|
+
}
|
561
|
+
],
|
562
|
+
"attributes": [
|
563
|
+
{
|
564
|
+
"name": "type",
|
565
|
+
"type": {
|
566
|
+
"text": "FontType | undefined"
|
567
|
+
},
|
568
|
+
"description": "Text Type - defines how the text should be rendered\n\nPossible values: `heading-1` | `heading-2` | `heading-3` | `heading-4`\n| `heading-5` | `heading-6` | `heading-7` | `body-large` | `body-regular`\n| `body-small` | `image-title` | `label`;",
|
569
|
+
"fieldName": "type"
|
570
|
+
}
|
571
|
+
],
|
572
|
+
"superclass": {
|
573
|
+
"name": "Component",
|
574
|
+
"module": "/src/models"
|
575
|
+
},
|
576
|
+
"tagName": "mdc-text",
|
577
|
+
"jsDoc": "/**\n * Text component, which helps creating a text element aligning with\n * styling.\n *\n * The `type` attribute allows changing the type of text, like `heading-1`, etc.\n *\n * For accessibility the `role` and `aria-level` on the component are going to be set\n * automatically based on the type e.g. heading-1 will lead to `role=\"heading\"` and `aria-level=1`.\n *\n * @tag mdc-text\n * @tagname mdc-text\n */",
|
578
|
+
"customElement": true
|
579
|
+
}
|
580
|
+
],
|
581
|
+
"exports": [
|
582
|
+
{
|
583
|
+
"kind": "js",
|
584
|
+
"name": "default",
|
585
|
+
"declaration": {
|
586
|
+
"name": "Text",
|
587
|
+
"module": "components/text/text.component.js"
|
588
|
+
}
|
589
|
+
}
|
590
|
+
]
|
591
|
+
},
|
592
|
+
{
|
593
|
+
"kind": "javascript-module",
|
594
|
+
"path": "components/themeprovider/themeprovider.component.js",
|
595
|
+
"declarations": [
|
596
|
+
{
|
597
|
+
"kind": "class",
|
598
|
+
"description": "ThemeProvider component, which sets the theme css variables\nfor the child dom nodes and allows to be consumed from sub components\n(see providerUtils.consume for how to consume)\n\nThemeProvider also includes the different font faces available\nfor Text components.",
|
599
|
+
"name": "ThemeProvider",
|
600
|
+
"members": [
|
601
|
+
{
|
602
|
+
"kind": "field",
|
603
|
+
"name": "Context",
|
604
|
+
"privacy": "public",
|
605
|
+
"static": true,
|
606
|
+
"readonly": true
|
607
|
+
},
|
608
|
+
{
|
609
|
+
"kind": "field",
|
610
|
+
"name": "themes",
|
611
|
+
"type": {
|
612
|
+
"text": "string"
|
613
|
+
},
|
614
|
+
"description": "Available themes to switch to\n\nHas to be a space separated string, like className\ne.g.: `mds-theme-stable-darkWebex mds-theme-stable-lightWebex`",
|
615
|
+
"attribute": "themes"
|
616
|
+
},
|
617
|
+
{
|
618
|
+
"kind": "field",
|
619
|
+
"name": "theme",
|
620
|
+
"type": {
|
621
|
+
"text": "Theme"
|
622
|
+
},
|
623
|
+
"description": "Current theme attribute\n\nHas to be fully qualified, such that\nthe theme name matches the className of the respective\ntheme stylesheet",
|
624
|
+
"attribute": "theme"
|
625
|
+
},
|
626
|
+
{
|
627
|
+
"kind": "method",
|
628
|
+
"name": "updateContext",
|
629
|
+
"privacy": "protected",
|
630
|
+
"return": {
|
631
|
+
"type": {
|
632
|
+
"text": "void"
|
633
|
+
}
|
634
|
+
},
|
635
|
+
"description": "Update all observing components of this\nprovider to update the theme"
|
636
|
+
},
|
637
|
+
{
|
638
|
+
"kind": "method",
|
639
|
+
"name": "updateActiveThemeClass",
|
640
|
+
"privacy": "private",
|
641
|
+
"description": "Function to update the active theme classname to update the theme tokens\nas CSS variables on the web component."
|
642
|
+
}
|
643
|
+
],
|
644
|
+
"attributes": [
|
645
|
+
{
|
646
|
+
"name": "themes",
|
647
|
+
"type": {
|
648
|
+
"text": "string"
|
649
|
+
},
|
650
|
+
"description": "Available themes to switch to\n\nHas to be a space separated string, like className\ne.g.: `mds-theme-stable-darkWebex mds-theme-stable-lightWebex`",
|
651
|
+
"fieldName": "themes"
|
652
|
+
},
|
653
|
+
{
|
654
|
+
"name": "theme",
|
655
|
+
"type": {
|
656
|
+
"text": "Theme"
|
657
|
+
},
|
658
|
+
"description": "Current theme attribute\n\nHas to be fully qualified, such that\nthe theme name matches the className of the respective\ntheme stylesheet",
|
659
|
+
"fieldName": "theme"
|
660
|
+
}
|
661
|
+
],
|
662
|
+
"superclass": {
|
663
|
+
"name": "Provider",
|
664
|
+
"module": "/src/models"
|
665
|
+
},
|
666
|
+
"tagName": "mdc-themeprovider",
|
667
|
+
"jsDoc": "/**\n * ThemeProvider component, which sets the theme css variables\n * for the child dom nodes and allows to be consumed from sub components\n * (see providerUtils.consume for how to consume)\n *\n * ThemeProvider also includes the different font faces available\n * for Text components.\n *\n * @tag mdc-themeprovider\n * @tagname mdc-themeprovider\n */",
|
668
|
+
"customElement": true
|
669
|
+
}
|
670
|
+
],
|
671
|
+
"exports": [
|
672
|
+
{
|
673
|
+
"kind": "js",
|
674
|
+
"name": "default",
|
675
|
+
"declaration": {
|
676
|
+
"name": "ThemeProvider",
|
677
|
+
"module": "components/themeprovider/themeprovider.component.js"
|
678
|
+
}
|
679
|
+
}
|
680
|
+
]
|
681
|
+
}
|
682
|
+
]
|
683
|
+
}
|
package/dist/index.d.ts
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
import { Component, Provider } from './models';
|
2
1
|
import ThemeProvider from './components/themeprovider';
|
3
2
|
import Icon from './components/icon';
|
4
3
|
import IconProvider from './components/iconprovider';
|
5
4
|
import Avatar from './components/avatar';
|
6
5
|
import Badge from './components/badge';
|
7
6
|
import Text from './components/text';
|
8
|
-
export {
|
7
|
+
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Text, };
|