@momentum-design/components 0.23.3 → 0.24.0

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.
@@ -248,163 +248,79 @@
248
248
  },
249
249
  {
250
250
  "kind": "javascript-module",
251
- "path": "components/avatarbutton/avatarbutton.component.js",
251
+ "path": "components/badge/badge.component.js",
252
252
  "declarations": [
253
253
  {
254
254
  "kind": "class",
255
- "description": "The `mdc-avatarbutton` component is an interactable version of the `mdc-avatar` component.\n\nThis component is made by extending `buttonsimple` class.\nThe button component acts as a wrapper for the avatar component.",
256
- "name": "AvatarButton",
257
- "members": [
255
+ "description": "The `mdc-badge` component is a versatile UI element used to\ndisplay dot, icons, counters, success, warning and error type badge.\n\nSupported badge types:\n- `dot`: Displays a dot notification badge with a blue color.\n- `icon`: Displays a badge with a specified icon using the `icon-name` attribute.\n- `counter`: Displays a badge with a counter value. If the counter exceeds the `max-counter`,\nit shows `maxCounter+`. The maximum value of the counter is 999 and anything above that will be set to `999+`.\n- `success`: Displays a success badge with a check circle icon and green color.\n- `warning`: Displays a warning badge with a warning icon and yellow color.\n- `error`: Displays a error badge with a error legacy icon and red color.\n\nFor `icon`, `success`, `warning` and `error` types, the `mdc-icon` component is used to render the icon.\n\nFor the `counter` type, the `mdc-text` component is used to render the counter value.",
256
+ "name": "Badge",
257
+ "cssProperties": [
258
258
  {
259
- "kind": "field",
260
- "name": "ariaLabel",
261
- "type": {
262
- "text": "string | null"
263
- },
264
- "default": "null",
265
- "description": "Aria-label attribute to be set for accessibility",
266
- "attribute": "aria-label"
259
+ "description": "The foreground color of the primary badge.",
260
+ "name": "--mdc-badge-primary-foreground-color"
267
261
  },
268
262
  {
269
- "kind": "method",
270
- "name": "setSize",
271
- "privacy": "private",
272
- "parameters": [
273
- {
274
- "name": "size",
275
- "type": {
276
- "text": "AvatarSize"
277
- }
278
- }
279
- ]
263
+ "description": "The background color of the primary badge.",
264
+ "name": "--mdc-badge-primary-background-color"
280
265
  },
281
266
  {
282
- "kind": "field",
283
- "name": "active",
284
- "type": {
285
- "text": "boolean"
286
- },
287
- "default": "undefined as unknown",
288
- "description": "The button's active state indicates whether it is currently toggled on (active) or off (inactive).\nWhen the active state is true, the button is considered to be in an active state, meaning it is toggled on.\nConversely, when the active state is false, the button is in an inactive state, indicating it is toggled off.",
289
- "attribute": "active",
290
- "reflects": true,
291
- "inheritedFrom": {
292
- "name": "Buttonsimple",
293
- "module": "components/buttonsimple/buttonsimple.component.js"
294
- }
267
+ "description": "The foreground color of the secondary badge.",
268
+ "name": "--mdc-badge-secondary-foreground-color"
295
269
  },
296
270
  {
297
- "kind": "field",
298
- "name": "disabled",
299
- "type": {
300
- "text": "boolean"
301
- },
302
- "default": "undefined as unknown",
303
- "description": "Indicates whether the component is disabled.\nWhen the component is disabled for user interaction; it is not focusable or clickable.",
304
- "attribute": "disabled",
305
- "reflects": true,
306
- "inheritedFrom": {
307
- "name": "DisabledMixin",
308
- "module": "utils/mixins/DisabledMixin.js"
309
- }
271
+ "description": "The background color of the secondary badge.",
272
+ "name": "--mdc-badge-secondary-background-color"
310
273
  },
311
274
  {
312
- "kind": "field",
313
- "name": "softDisabled",
314
- "type": {
315
- "text": "boolean"
316
- },
317
- "default": "undefined as unknown",
318
- "description": "Indicates whether the button is soft disabled.\nWhen set to `true`, the button appears visually disabled but still allows\nfocus, click, and keyboard actions to be passed through.\n\n**Important:** When using soft disabled, consumers must ensure that\nthe button behaves like a disabled button, allowing only focus and\npreventing any interactions (clicks or keyboard actions) from triggering unintended actions.",
319
- "attribute": "soft-disabled",
320
- "inheritedFrom": {
321
- "name": "Buttonsimple",
322
- "module": "components/buttonsimple/buttonsimple.component.js"
323
- }
275
+ "description": "The foreground color of the success badge.",
276
+ "name": "--mdc-badge-success-foreground-color"
324
277
  },
325
278
  {
326
- "kind": "field",
327
- "name": "role",
328
- "description": "This property defines the ARIA role for the element. By default, it is set to 'button'.\nConsumers should override this role when:\n- The element is being used in a context where a different role is more appropriate.\n- Custom behaviors are implemented that require a specific ARIA role for accessibility purposes.",
329
- "default": "'button'",
330
- "attribute": "role",
331
- "reflects": true,
332
- "type": {
333
- "text": "string"
334
- },
335
- "inheritedFrom": {
336
- "name": "Buttonsimple",
337
- "module": "components/buttonsimple/buttonsimple.component.js"
338
- }
279
+ "description": "The background color of the success badge.",
280
+ "name": "--mdc-badge-success-background-color"
339
281
  },
340
282
  {
341
- "kind": "field",
342
- "name": "type",
343
- "type": {
344
- "text": "ButtonType"
345
- },
346
- "description": "This property defines the type attribute for the button element.\nThe type attribute specifies the behavior of the button when it is clicked.\n- **submit**: The button submits the form data to the server.\n- **reset**: The button resets the form data to its initial state.\n- **button**: The button does nothing when clicked.",
347
- "default": "button",
348
- "attribute": "type",
349
- "reflects": true,
350
- "inheritedFrom": {
351
- "name": "Buttonsimple",
352
- "module": "components/buttonsimple/buttonsimple.component.js"
353
- }
283
+ "description": "The foreground color of the warning badge.",
284
+ "name": "--mdc-badge-warning-foreground-color"
354
285
  },
355
286
  {
356
- "kind": "field",
357
- "name": "src",
358
- "type": {
359
- "text": "string | undefined"
360
- },
361
- "description": "The src is the url which will be used to display the avatar.\nWhen the src is loading, we will display the initials as a placeholder.",
362
- "attribute": "src",
363
- "inheritedFrom": {
364
- "name": "AvatarComponentMixin",
365
- "module": "utils/mixins/AvatarComponentMixin.js"
366
- }
287
+ "description": "The background color of the warning badge.",
288
+ "name": "--mdc-badge-warning-background-color"
367
289
  },
368
290
  {
369
- "kind": "field",
370
- "name": "initials",
371
- "type": {
372
- "text": "string | undefined"
373
- },
374
- "description": "The initials to be displayed for the avatar.",
375
- "attribute": "initials",
376
- "inheritedFrom": {
377
- "name": "AvatarComponentMixin",
378
- "module": "utils/mixins/AvatarComponentMixin.js"
379
- }
291
+ "description": "The foreground color of the error badge.",
292
+ "name": "--mdc-badge-error-foreground-color"
293
+ },
294
+ {
295
+ "description": "The background color of the error badge.",
296
+ "name": "--mdc-badge-error-background-color"
380
297
  },
298
+ {
299
+ "description": "The background color of the badge overlay.",
300
+ "name": "--mdc-badge-overlay-background-color"
301
+ }
302
+ ],
303
+ "members": [
381
304
  {
382
305
  "kind": "field",
383
- "name": "presence",
306
+ "name": "type",
384
307
  "type": {
385
- "text": "PresenceType | undefined"
308
+ "text": "BadgeType | undefined"
386
309
  },
387
- "description": "The presence is the status which can be used to display the\nactivity state of a user or a space within an avatar component.\n\nAcceptable values include:\n- `active`\n- `away`\n- `away-calling`\n- `busy`\n- `dnd`\n- `meeting`\n- `on-call`\n- `on-device`\n- `on-mobile`\n- `pause`\n- `pto`\n- `presenting`\n- `quiet`\n- `scheduled`",
388
- "attribute": "presence",
389
- "inheritedFrom": {
390
- "name": "AvatarComponentMixin",
391
- "module": "utils/mixins/AvatarComponentMixin.js"
392
- }
310
+ "description": "Type of the badge\nCan be `dot` (notification) , `icon`, `counter`, `success`, `warning` or `error`.",
311
+ "attribute": "type",
312
+ "reflects": true
393
313
  },
394
314
  {
395
315
  "kind": "field",
396
- "name": "size",
316
+ "name": "variant",
397
317
  "type": {
398
- "text": "ButtonSize"
318
+ "text": "IconVariant"
399
319
  },
400
- "description": "Acceptable values include (size in px unit):\n- 24\n- 32\n- 48\n- 64\n- 72\n- 88\n- 124",
401
- "default": "32",
402
- "attribute": "size",
403
- "reflects": true,
404
- "inheritedFrom": {
405
- "name": "Buttonsimple",
406
- "module": "components/buttonsimple/buttonsimple.component.js"
407
- }
320
+ "description": "Type of the variant can be `primary` or `secondary`.\nIt defines the background and foreground color of the icon.",
321
+ "default": "primary",
322
+ "attribute": "variant",
323
+ "reflects": true
408
324
  },
409
325
  {
410
326
  "kind": "field",
@@ -412,378 +328,231 @@
412
328
  "type": {
413
329
  "text": "number | undefined"
414
330
  },
415
- "description": "The counter is the number which can be displayed on the avatar.\nThe maximum number is 99 and if the given number is greater than 99,\nthen the avatar will be displayed as `99+`.\nIf the given number is a negative number,\nthen the avatar will be displayed as `0`.",
416
- "attribute": "counter",
417
- "inheritedFrom": {
418
- "name": "AvatarComponentMixin",
419
- "module": "utils/mixins/AvatarComponentMixin.js"
420
- }
331
+ "description": "Counter is the number which can be provided in the badge.",
332
+ "attribute": "counter"
421
333
  },
422
334
  {
423
335
  "kind": "field",
424
- "name": "isTyping",
336
+ "name": "maxCounter",
425
337
  "type": {
426
- "text": "boolean"
338
+ "text": "number"
427
339
  },
428
- "default": "false",
429
- "description": "Represents the typing indicator when the user is typing.",
430
- "attribute": "is-typing",
431
- "inheritedFrom": {
432
- "name": "AvatarComponentMixin",
433
- "module": "utils/mixins/AvatarComponentMixin.js"
434
- }
340
+ "description": "The maximum number can be set up to 999, anything above that will be rendered as _999+_.\nThe max counter can be `9`, `99` or `999`.",
341
+ "default": "99",
342
+ "attribute": "max-counter",
343
+ "reflects": true
435
344
  },
436
345
  {
437
346
  "kind": "field",
438
- "name": "iconName",
347
+ "name": "overlay",
439
348
  "type": {
440
- "text": "IconNames | undefined"
349
+ "text": "boolean"
441
350
  },
442
- "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
443
- "attribute": "icon-name",
444
- "inheritedFrom": {
445
- "name": "IconNameMixin",
446
- "module": "utils/mixins/IconNameMixin.js"
447
- }
351
+ "default": "false",
352
+ "description": "Overlay is to add a thin outline to the badge.\nThis will help distinguish between the badge and the button,\nwhere the badge will be layered on top of a button.",
353
+ "attribute": "overlay"
448
354
  },
449
355
  {
450
356
  "kind": "field",
451
- "name": "tabIndex",
357
+ "name": "ariaLabel",
452
358
  "type": {
453
- "text": "number"
359
+ "text": "string | null"
454
360
  },
455
- "default": "0",
456
- "description": "This property specifies the tab order of the element.",
457
- "attribute": "tabIndex",
458
- "reflects": true,
459
- "inheritedFrom": {
460
- "name": "TabIndexMixin",
461
- "module": "utils/mixins/TabIndexMixin.js"
462
- }
463
- },
464
- {
465
- "kind": "method",
466
- "name": "executeAction",
467
- "privacy": "protected",
468
- "inheritedFrom": {
469
- "name": "Buttonsimple",
470
- "module": "components/buttonsimple/buttonsimple.component.js"
471
- }
472
- },
473
- {
474
- "kind": "method",
475
- "name": "setActive",
476
- "privacy": "protected",
477
- "parameters": [
478
- {
479
- "name": "element",
480
- "type": {
481
- "text": "HTMLElement"
482
- },
483
- "description": "The button element"
484
- },
485
- {
486
- "name": "active",
487
- "type": {
488
- "text": "boolean"
489
- },
490
- "description": "The active state of the element"
491
- }
492
- ],
493
- "description": "Sets the aria-pressed attribute based on the active state of the button.",
494
- "inheritedFrom": {
495
- "name": "Buttonsimple",
496
- "module": "components/buttonsimple/buttonsimple.component.js"
497
- }
361
+ "default": "null",
362
+ "description": "Aria-label attribute to be set for accessibility",
363
+ "attribute": "aria-label"
498
364
  },
499
365
  {
500
366
  "kind": "method",
501
- "name": "setSoftDisabled",
367
+ "name": "getCounterText",
502
368
  "privacy": "private",
503
- "parameters": [
504
- {
505
- "name": "element",
506
- "type": {
507
- "text": "HTMLElement"
508
- },
509
- "description": "The button element."
510
- },
511
- {
512
- "name": "softDisabled",
513
- "type": {
514
- "text": "boolean"
515
- },
516
- "description": "The soft-disabled state."
369
+ "return": {
370
+ "type": {
371
+ "text": ""
517
372
  }
518
- ],
519
- "description": "Sets the soft-disabled attribute for the button.\nWhen soft-disabled, the button looks to be disabled but remains focusable and clickable.\nAlso sets/removes aria-disabled attribute.",
520
- "inheritedFrom": {
521
- "name": "Buttonsimple",
522
- "module": "components/buttonsimple/buttonsimple.component.js"
523
- }
524
- },
525
- {
526
- "kind": "method",
527
- "name": "setDisabled",
528
- "privacy": "private",
373
+ },
529
374
  "parameters": [
530
375
  {
531
- "name": "element",
376
+ "name": "maxCounter",
532
377
  "type": {
533
- "text": "HTMLElement"
378
+ "text": "number"
534
379
  },
535
- "description": "The button element."
380
+ "description": "the maximum limit which can be displayed on the badge"
536
381
  },
537
382
  {
538
- "name": "disabled",
539
- "type": {
540
- "text": "boolean"
541
- },
542
- "description": "The disabled state."
543
- }
544
- ],
545
- "description": "Sets the disabled attribute for the button.\nWhen disabled, the button is not focusable or clickable, and tabindex is set to -1.\nThe previous tabindex is stored and restored when enabled.\nAlso sets/removes aria-disabled attribute.",
546
- "inheritedFrom": {
547
- "name": "Buttonsimple",
548
- "module": "components/buttonsimple/buttonsimple.component.js"
549
- }
550
- },
551
- {
552
- "kind": "method",
553
- "name": "triggerClickEvent",
554
- "privacy": "private",
555
- "inheritedFrom": {
556
- "name": "Buttonsimple",
557
- "module": "components/buttonsimple/buttonsimple.component.js"
558
- }
559
- },
560
- {
561
- "kind": "method",
562
- "name": "handleKeyDown",
563
- "privacy": "private",
564
- "parameters": [
565
- {
566
- "name": "event",
567
- "type": {
568
- "text": "KeyboardEvent"
569
- },
570
- "description": "The keyboard event."
571
- }
572
- ],
573
- "description": "Handles the keydown event on the button.\nIf the key is 'Enter' or 'Space', the button is pressed.\nIf the key is 'Enter', the button is pressed. The native HTML button works in the same way.",
574
- "inheritedFrom": {
575
- "name": "Buttonsimple",
576
- "module": "components/buttonsimple/buttonsimple.component.js"
577
- }
578
- },
579
- {
580
- "kind": "method",
581
- "name": "handleKeyUp",
582
- "privacy": "private",
583
- "parameters": [
584
- {
585
- "name": "event",
383
+ "name": "counter",
384
+ "optional": true,
586
385
  "type": {
587
- "text": "KeyboardEvent"
386
+ "text": "number"
588
387
  },
589
- "description": "The keyboard event."
388
+ "description": "the number to be displayed on the badge"
590
389
  }
591
- ],
592
- "description": "Handles the keyup event on the button.\nIf the key is 'Enter' or 'Space', the button is clicked.\nIf the key is 'Space', the button is pressed. The native HTML button works in the same way.",
593
- "inheritedFrom": {
594
- "name": "Buttonsimple",
595
- "module": "components/buttonsimple/buttonsimple.component.js"
596
- }
597
- }
598
- ],
599
- "attributes": [
600
- {
601
- "name": "aria-label",
602
- "type": {
603
- "text": "string | null"
604
- },
605
- "default": "null",
606
- "description": "Aria-label attribute to be set for accessibility",
607
- "fieldName": "ariaLabel"
608
- },
609
- {
610
- "name": "src",
611
- "type": {
612
- "text": "string | undefined"
613
- },
614
- "description": "The src is the url which will be used to display the avatar.\nWhen the src is loading, we will display the initials as a placeholder.",
615
- "fieldName": "src",
616
- "inheritedFrom": {
617
- "name": "AvatarComponentMixin",
618
- "module": "src/utils/mixins/AvatarComponentMixin.ts"
619
- }
390
+ ],
391
+ "description": "If `type` is set to `counter` and if `counter` is greater than `maxCounter`,\nthen it will return a string the maxCounter value as string.\nOtherwise, it will return a string representation of `counter`.\nIf `counter` is not a number, it will return an empty string."
620
392
  },
621
393
  {
622
- "name": "initials",
623
- "type": {
624
- "text": "string | undefined"
394
+ "kind": "method",
395
+ "name": "getBadgeIcon",
396
+ "privacy": "private",
397
+ "return": {
398
+ "type": {
399
+ "text": ""
400
+ }
625
401
  },
626
- "description": "The initials to be displayed for the avatar.",
627
- "fieldName": "initials",
628
- "inheritedFrom": {
629
- "name": "AvatarComponentMixin",
630
- "module": "src/utils/mixins/AvatarComponentMixin.ts"
631
- }
402
+ "parameters": [
403
+ {
404
+ "name": "iconName",
405
+ "type": {
406
+ "text": "string"
407
+ },
408
+ "description": "the name of the icon from the icon set"
409
+ },
410
+ {
411
+ "name": "backgroundClassPostfix",
412
+ "type": {
413
+ "text": "string"
414
+ },
415
+ "description": "postfix for the class to style the badge icon."
416
+ }
417
+ ],
418
+ "description": "Method to generate the badge icon."
632
419
  },
633
420
  {
634
- "name": "presence",
635
- "type": {
636
- "text": "PresenceType | undefined"
421
+ "kind": "method",
422
+ "name": "getBadgeDot",
423
+ "privacy": "private",
424
+ "return": {
425
+ "type": {
426
+ "text": ""
427
+ }
637
428
  },
638
- "description": "The presence is the status which can be used to display the\nactivity state of a user or a space within an avatar component.\n\nAcceptable values include:\n- `active`\n- `away`\n- `away-calling`\n- `busy`\n- `dnd`\n- `meeting`\n- `on-call`\n- `on-device`\n- `on-mobile`\n- `pause`\n- `pto`\n- `presenting`\n- `quiet`\n- `scheduled`",
639
- "fieldName": "presence",
640
- "inheritedFrom": {
641
- "name": "AvatarComponentMixin",
642
- "module": "src/utils/mixins/AvatarComponentMixin.ts"
643
- }
429
+ "description": "Method to generate the badge dot template."
644
430
  },
645
431
  {
646
- "name": "size",
647
- "type": {
648
- "text": "ButtonSize"
432
+ "kind": "method",
433
+ "name": "getBadgeCounterText",
434
+ "privacy": "private",
435
+ "return": {
436
+ "type": {
437
+ "text": ""
438
+ }
649
439
  },
650
- "description": "Acceptable values include (size in px unit):\n- 24\n- 32\n- 48\n- 64\n- 72\n- 88\n- 124",
651
- "default": "32",
652
- "fieldName": "size",
653
- "inheritedFrom": {
654
- "name": "Buttonsimple",
655
- "module": "src/components/buttonsimple/buttonsimple.component.ts"
656
- }
440
+ "description": "Method to generate the badge text and counter template."
657
441
  },
658
442
  {
659
- "name": "counter",
660
- "type": {
661
- "text": "number | undefined"
443
+ "kind": "method",
444
+ "name": "setRoleByAriaLabel",
445
+ "privacy": "private",
446
+ "return": {
447
+ "type": {
448
+ "text": "void"
449
+ }
662
450
  },
663
- "description": "The counter is the number which can be displayed on the avatar.\nThe maximum number is 99 and if the given number is greater than 99,\nthen the avatar will be displayed as `99+`.\nIf the given number is a negative number,\nthen the avatar will be displayed as `0`.",
664
- "fieldName": "counter",
665
- "inheritedFrom": {
666
- "name": "AvatarComponentMixin",
667
- "module": "src/utils/mixins/AvatarComponentMixin.ts"
668
- }
451
+ "description": "Method to set the role based on the aria-label provided.\nIf the aria-label is provided, the role of the element will be 'img'.\nOtherwise, the role will be null."
669
452
  },
670
453
  {
671
- "name": "is-typing",
672
- "type": {
673
- "text": "boolean"
454
+ "kind": "method",
455
+ "name": "getBadgeContentBasedOnType",
456
+ "privacy": "private",
457
+ "return": {
458
+ "type": {
459
+ "text": ""
460
+ }
674
461
  },
675
- "default": "false",
676
- "description": "Represents the typing indicator when the user is typing.",
677
- "fieldName": "isTyping",
678
- "inheritedFrom": {
679
- "name": "AvatarComponentMixin",
680
- "module": "src/utils/mixins/AvatarComponentMixin.ts"
681
- }
462
+ "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."
682
463
  },
683
464
  {
684
- "name": "icon-name",
465
+ "kind": "field",
466
+ "name": "iconName",
685
467
  "type": {
686
468
  "text": "IconNames | undefined"
687
469
  },
688
470
  "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
689
- "fieldName": "iconName",
471
+ "attribute": "icon-name",
690
472
  "inheritedFrom": {
691
473
  "name": "IconNameMixin",
692
- "module": "src/utils/mixins/IconNameMixin.ts"
474
+ "module": "utils/mixins/IconNameMixin.js"
693
475
  }
476
+ }
477
+ ],
478
+ "attributes": [
479
+ {
480
+ "name": "type",
481
+ "type": {
482
+ "text": "BadgeType | undefined"
483
+ },
484
+ "description": "Type of the badge\nCan be `dot` (notification) , `icon`, `counter`, `success`, `warning` or `error`.",
485
+ "fieldName": "type"
694
486
  },
695
487
  {
696
- "name": "tabIndex",
488
+ "name": "variant",
697
489
  "type": {
698
- "text": "number"
490
+ "text": "IconVariant"
699
491
  },
700
- "default": "0",
701
- "description": "This property specifies the tab order of the element.",
702
- "fieldName": "tabIndex",
703
- "inheritedFrom": {
704
- "name": "TabIndexMixin",
705
- "module": "src/utils/mixins/TabIndexMixin.ts"
706
- }
492
+ "description": "Type of the variant can be `primary` or `secondary`.\nIt defines the background and foreground color of the icon.",
493
+ "default": "primary",
494
+ "fieldName": "variant"
707
495
  },
708
496
  {
709
- "name": "disabled",
497
+ "name": "counter",
710
498
  "type": {
711
- "text": "boolean"
499
+ "text": "number | undefined"
712
500
  },
713
- "default": "false",
714
- "description": "Indicates whether the component is disabled.\nWhen the component is disabled for user interaction; it is not focusable or clickable.",
715
- "fieldName": "disabled",
716
- "inheritedFrom": {
717
- "name": "DisabledMixin",
718
- "module": "src/utils/mixins/DisabledMixin.ts"
719
- }
501
+ "description": "Counter is the number which can be provided in the badge.",
502
+ "fieldName": "counter"
720
503
  },
721
504
  {
722
- "name": "active",
505
+ "name": "max-counter",
723
506
  "type": {
724
- "text": "boolean"
507
+ "text": "number"
725
508
  },
726
- "default": "false",
727
- "description": "The button's active state indicates whether it is currently toggled on (active) or off (inactive).\nWhen the active state is true, the button is considered to be in an active state, meaning it is toggled on.\nConversely, when the active state is false, the button is in an inactive state, indicating it is toggled off.",
728
- "fieldName": "active",
729
- "inheritedFrom": {
730
- "name": "Buttonsimple",
731
- "module": "src/components/buttonsimple/buttonsimple.component.ts"
732
- }
509
+ "description": "The maximum number can be set up to 999, anything above that will be rendered as _999+_.\nThe max counter can be `9`, `99` or `999`.",
510
+ "default": "99",
511
+ "fieldName": "maxCounter"
733
512
  },
734
513
  {
735
- "name": "soft-disabled",
514
+ "name": "overlay",
736
515
  "type": {
737
516
  "text": "boolean"
738
517
  },
739
518
  "default": "false",
740
- "description": "Indicates whether the button is soft disabled.\nWhen set to `true`, the button appears visually disabled but still allows\nfocus, click, and keyboard actions to be passed through.\n\n**Important:** When using soft disabled, consumers must ensure that\nthe button behaves like a disabled button, allowing only focus and\npreventing any interactions (clicks or keyboard actions) from triggering unintended actions.",
741
- "fieldName": "softDisabled",
742
- "inheritedFrom": {
743
- "name": "Buttonsimple",
744
- "module": "src/components/buttonsimple/buttonsimple.component.ts"
745
- }
519
+ "description": "Overlay is to add a thin outline to the badge.\nThis will help distinguish between the badge and the button,\nwhere the badge will be layered on top of a button.",
520
+ "fieldName": "overlay"
746
521
  },
747
522
  {
748
- "name": "role",
749
- "description": "This property defines the ARIA role for the element. By default, it is set to 'button'.\nConsumers should override this role when:\n- The element is being used in a context where a different role is more appropriate.\n- Custom behaviors are implemented that require a specific ARIA role for accessibility purposes.",
750
- "default": "button",
751
- "fieldName": "role",
752
- "inheritedFrom": {
753
- "name": "Buttonsimple",
754
- "module": "src/components/buttonsimple/buttonsimple.component.ts"
755
- }
523
+ "name": "aria-label",
524
+ "type": {
525
+ "text": "string | null"
526
+ },
527
+ "default": "null",
528
+ "description": "Aria-label attribute to be set for accessibility",
529
+ "fieldName": "ariaLabel"
756
530
  },
757
531
  {
758
- "name": "type",
532
+ "name": "icon-name",
759
533
  "type": {
760
- "text": "ButtonType"
534
+ "text": "IconNames | undefined"
761
535
  },
762
- "description": "This property defines the type attribute for the button element.\nThe type attribute specifies the behavior of the button when it is clicked.\n- **submit**: The button submits the form data to the server.\n- **reset**: The button resets the form data to its initial state.\n- **button**: The button does nothing when clicked.",
763
- "default": "button",
764
- "fieldName": "type",
536
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
537
+ "fieldName": "iconName",
765
538
  "inheritedFrom": {
766
- "name": "Buttonsimple",
767
- "module": "src/components/buttonsimple/buttonsimple.component.ts"
539
+ "name": "IconNameMixin",
540
+ "module": "src/utils/mixins/IconNameMixin.ts"
768
541
  }
769
542
  }
770
543
  ],
771
544
  "mixins": [
772
- {
773
- "name": "AvatarComponentMixin",
774
- "module": "/src/utils/mixins/AvatarComponentMixin"
775
- },
776
545
  {
777
546
  "name": "IconNameMixin",
778
547
  "module": "/src/utils/mixins/IconNameMixin"
779
548
  }
780
549
  ],
781
550
  "superclass": {
782
- "name": "Buttonsimple",
783
- "module": "/src/components/buttonsimple/buttonsimple.component"
551
+ "name": "Component",
552
+ "module": "/src/models"
784
553
  },
785
- "tagName": "mdc-avatarbutton",
786
- "jsDoc": "/**\n * The `mdc-avatarbutton` component is an interactable version of the `mdc-avatar` component.\n *\n * This component is made by extending `buttonsimple` class.\n * The button component acts as a wrapper for the avatar component.\n *\n * @dependency mdc-avatar\n *\n * @tagname mdc-avatarbutton\n */",
554
+ "tagName": "mdc-badge",
555
+ "jsDoc": "/**\n * The `mdc-badge` component is a versatile UI element used to\n * display dot, icons, counters, success, warning and error type badge.\n *\n * Supported badge types:\n * - `dot`: Displays a dot notification badge with a blue color.\n * - `icon`: Displays a badge with a specified icon using the `icon-name` attribute.\n * - `counter`: Displays a badge with a counter value. If the counter exceeds the `max-counter`,\n * it shows `maxCounter+`. The maximum value of the counter is 999 and anything above that will be set to `999+`.\n * - `success`: Displays a success badge with a check circle icon and green color.\n * - `warning`: Displays a warning badge with a warning icon and yellow color.\n * - `error`: Displays a error badge with a error legacy icon and red color.\n *\n * For `icon`, `success`, `warning` and `error` types, the `mdc-icon` component is used to render the icon.\n *\n * For the `counter` type, the `mdc-text` component is used to render the counter value.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @tagname mdc-badge\n *\n * @cssproperty --mdc-badge-primary-foreground-color - The foreground color of the primary badge.\n * @cssproperty --mdc-badge-primary-background-color - The background color of the primary badge.\n * @cssproperty --mdc-badge-secondary-foreground-color - The foreground color of the secondary badge.\n * @cssproperty --mdc-badge-secondary-background-color - The background color of the secondary badge.\n * @cssproperty --mdc-badge-success-foreground-color - The foreground color of the success badge.\n * @cssproperty --mdc-badge-success-background-color - The background color of the success badge.\n * @cssproperty --mdc-badge-warning-foreground-color - The foreground color of the warning badge.\n * @cssproperty --mdc-badge-warning-background-color - The background color of the warning badge.\n * @cssproperty --mdc-badge-error-foreground-color - The foreground color of the error badge.\n * @cssproperty --mdc-badge-error-background-color - The background color of the error badge.\n * @cssproperty --mdc-badge-overlay-background-color - The background color of the badge overlay.\n */",
787
556
  "customElement": true
788
557
  }
789
558
  ],
@@ -792,87 +561,171 @@
792
561
  "kind": "js",
793
562
  "name": "default",
794
563
  "declaration": {
795
- "name": "AvatarButton",
796
- "module": "components/avatarbutton/avatarbutton.component.js"
564
+ "name": "Badge",
565
+ "module": "components/badge/badge.component.js"
797
566
  }
798
567
  }
799
568
  ]
800
569
  },
801
570
  {
802
571
  "kind": "javascript-module",
803
- "path": "components/badge/badge.component.js",
572
+ "path": "components/avatarbutton/avatarbutton.component.js",
804
573
  "declarations": [
805
574
  {
806
575
  "kind": "class",
807
- "description": "The `mdc-badge` component is a versatile UI element used to\ndisplay dot, icons, counters, success, warning and error type badge.\n\nSupported badge types:\n- `dot`: Displays a dot notification badge with a blue color.\n- `icon`: Displays a badge with a specified icon using the `icon-name` attribute.\n- `counter`: Displays a badge with a counter value. If the counter exceeds the `max-counter`,\nit shows `maxCounter+`. The maximum value of the counter is 999 and anything above that will be set to `999+`.\n- `success`: Displays a success badge with a check circle icon and green color.\n- `warning`: Displays a warning badge with a warning icon and yellow color.\n- `error`: Displays a error badge with a error legacy icon and red color.\n\nFor `icon`, `success`, `warning` and `error` types, the `mdc-icon` component is used to render the icon.\n\nFor the `counter` type, the `mdc-text` component is used to render the counter value.",
808
- "name": "Badge",
809
- "cssProperties": [
810
- {
811
- "description": "The foreground color of the primary badge.",
812
- "name": "--mdc-badge-primary-foreground-color"
813
- },
814
- {
815
- "description": "The background color of the primary badge.",
816
- "name": "--mdc-badge-primary-background-color"
817
- },
576
+ "description": "The `mdc-avatarbutton` component is an interactable version of the `mdc-avatar` component.\n\nThis component is made by extending `buttonsimple` class.\nThe button component acts as a wrapper for the avatar component.",
577
+ "name": "AvatarButton",
578
+ "members": [
818
579
  {
819
- "description": "The foreground color of the secondary badge.",
820
- "name": "--mdc-badge-secondary-foreground-color"
580
+ "kind": "field",
581
+ "name": "ariaLabel",
582
+ "type": {
583
+ "text": "string | null"
584
+ },
585
+ "default": "null",
586
+ "description": "Aria-label attribute to be set for accessibility",
587
+ "attribute": "aria-label"
821
588
  },
822
589
  {
823
- "description": "The background color of the secondary badge.",
824
- "name": "--mdc-badge-secondary-background-color"
590
+ "kind": "method",
591
+ "name": "setSize",
592
+ "privacy": "private",
593
+ "parameters": [
594
+ {
595
+ "name": "size",
596
+ "type": {
597
+ "text": "AvatarSize"
598
+ }
599
+ }
600
+ ]
825
601
  },
826
602
  {
827
- "description": "The foreground color of the success badge.",
828
- "name": "--mdc-badge-success-foreground-color"
603
+ "kind": "field",
604
+ "name": "active",
605
+ "type": {
606
+ "text": "boolean"
607
+ },
608
+ "default": "undefined as unknown",
609
+ "description": "The button's active state indicates whether it is currently toggled on (active) or off (inactive).\nWhen the active state is true, the button is considered to be in an active state, meaning it is toggled on.\nConversely, when the active state is false, the button is in an inactive state, indicating it is toggled off.",
610
+ "attribute": "active",
611
+ "reflects": true,
612
+ "inheritedFrom": {
613
+ "name": "Buttonsimple",
614
+ "module": "components/buttonsimple/buttonsimple.component.js"
615
+ }
829
616
  },
830
617
  {
831
- "description": "The background color of the success badge.",
832
- "name": "--mdc-badge-success-background-color"
618
+ "kind": "field",
619
+ "name": "disabled",
620
+ "type": {
621
+ "text": "boolean"
622
+ },
623
+ "default": "undefined as unknown",
624
+ "description": "Indicates whether the component is disabled.\nWhen the component is disabled for user interaction; it is not focusable or clickable.",
625
+ "attribute": "disabled",
626
+ "reflects": true,
627
+ "inheritedFrom": {
628
+ "name": "DisabledMixin",
629
+ "module": "utils/mixins/DisabledMixin.js"
630
+ }
833
631
  },
834
632
  {
835
- "description": "The foreground color of the warning badge.",
836
- "name": "--mdc-badge-warning-foreground-color"
633
+ "kind": "field",
634
+ "name": "softDisabled",
635
+ "type": {
636
+ "text": "boolean"
637
+ },
638
+ "default": "undefined as unknown",
639
+ "description": "Indicates whether the button is soft disabled.\nWhen set to `true`, the button appears visually disabled but still allows\nfocus, click, and keyboard actions to be passed through.\n\n**Important:** When using soft disabled, consumers must ensure that\nthe button behaves like a disabled button, allowing only focus and\npreventing any interactions (clicks or keyboard actions) from triggering unintended actions.",
640
+ "attribute": "soft-disabled",
641
+ "inheritedFrom": {
642
+ "name": "Buttonsimple",
643
+ "module": "components/buttonsimple/buttonsimple.component.js"
644
+ }
837
645
  },
838
646
  {
839
- "description": "The background color of the warning badge.",
840
- "name": "--mdc-badge-warning-background-color"
647
+ "kind": "field",
648
+ "name": "role",
649
+ "description": "This property defines the ARIA role for the element. By default, it is set to 'button'.\nConsumers should override this role when:\n- The element is being used in a context where a different role is more appropriate.\n- Custom behaviors are implemented that require a specific ARIA role for accessibility purposes.",
650
+ "default": "'button'",
651
+ "attribute": "role",
652
+ "reflects": true,
653
+ "type": {
654
+ "text": "string"
655
+ },
656
+ "inheritedFrom": {
657
+ "name": "Buttonsimple",
658
+ "module": "components/buttonsimple/buttonsimple.component.js"
659
+ }
841
660
  },
842
661
  {
843
- "description": "The foreground color of the error badge.",
844
- "name": "--mdc-badge-error-foreground-color"
662
+ "kind": "field",
663
+ "name": "type",
664
+ "type": {
665
+ "text": "ButtonType"
666
+ },
667
+ "description": "This property defines the type attribute for the button element.\nThe type attribute specifies the behavior of the button when it is clicked.\n- **submit**: The button submits the form data to the server.\n- **reset**: The button resets the form data to its initial state.\n- **button**: The button does nothing when clicked.",
668
+ "default": "button",
669
+ "attribute": "type",
670
+ "reflects": true,
671
+ "inheritedFrom": {
672
+ "name": "Buttonsimple",
673
+ "module": "components/buttonsimple/buttonsimple.component.js"
674
+ }
845
675
  },
846
676
  {
847
- "description": "The background color of the error badge.",
848
- "name": "--mdc-badge-error-background-color"
677
+ "kind": "field",
678
+ "name": "src",
679
+ "type": {
680
+ "text": "string | undefined"
681
+ },
682
+ "description": "The src is the url which will be used to display the avatar.\nWhen the src is loading, we will display the initials as a placeholder.",
683
+ "attribute": "src",
684
+ "inheritedFrom": {
685
+ "name": "AvatarComponentMixin",
686
+ "module": "utils/mixins/AvatarComponentMixin.js"
687
+ }
849
688
  },
850
689
  {
851
- "description": "The background color of the badge overlay.",
852
- "name": "--mdc-badge-overlay-background-color"
853
- }
854
- ],
855
- "members": [
690
+ "kind": "field",
691
+ "name": "initials",
692
+ "type": {
693
+ "text": "string | undefined"
694
+ },
695
+ "description": "The initials to be displayed for the avatar.",
696
+ "attribute": "initials",
697
+ "inheritedFrom": {
698
+ "name": "AvatarComponentMixin",
699
+ "module": "utils/mixins/AvatarComponentMixin.js"
700
+ }
701
+ },
856
702
  {
857
703
  "kind": "field",
858
- "name": "type",
704
+ "name": "presence",
859
705
  "type": {
860
- "text": "BadgeType | undefined"
706
+ "text": "PresenceType | undefined"
861
707
  },
862
- "description": "Type of the badge\nCan be `dot` (notification) , `icon`, `counter`, `success`, `warning` or `error`.",
863
- "attribute": "type",
864
- "reflects": true
708
+ "description": "The presence is the status which can be used to display the\nactivity state of a user or a space within an avatar component.\n\nAcceptable values include:\n- `active`\n- `away`\n- `away-calling`\n- `busy`\n- `dnd`\n- `meeting`\n- `on-call`\n- `on-device`\n- `on-mobile`\n- `pause`\n- `pto`\n- `presenting`\n- `quiet`\n- `scheduled`",
709
+ "attribute": "presence",
710
+ "inheritedFrom": {
711
+ "name": "AvatarComponentMixin",
712
+ "module": "utils/mixins/AvatarComponentMixin.js"
713
+ }
865
714
  },
866
715
  {
867
716
  "kind": "field",
868
- "name": "variant",
717
+ "name": "size",
869
718
  "type": {
870
- "text": "IconVariant"
719
+ "text": "ButtonSize"
871
720
  },
872
- "description": "Type of the variant can be `primary` or `secondary`.\nIt defines the background and foreground color of the icon.",
873
- "default": "primary",
874
- "attribute": "variant",
875
- "reflects": true
721
+ "description": "Acceptable values include (size in px unit):\n- 24\n- 32\n- 48\n- 64\n- 72\n- 88\n- 124",
722
+ "default": "32",
723
+ "attribute": "size",
724
+ "reflects": true,
725
+ "inheritedFrom": {
726
+ "name": "Buttonsimple",
727
+ "module": "components/buttonsimple/buttonsimple.component.js"
728
+ }
876
729
  },
877
730
  {
878
731
  "kind": "field",
@@ -880,231 +733,378 @@
880
733
  "type": {
881
734
  "text": "number | undefined"
882
735
  },
883
- "description": "Counter is the number which can be provided in the badge.",
884
- "attribute": "counter"
736
+ "description": "The counter is the number which can be displayed on the avatar.\nThe maximum number is 99 and if the given number is greater than 99,\nthen the avatar will be displayed as `99+`.\nIf the given number is a negative number,\nthen the avatar will be displayed as `0`.",
737
+ "attribute": "counter",
738
+ "inheritedFrom": {
739
+ "name": "AvatarComponentMixin",
740
+ "module": "utils/mixins/AvatarComponentMixin.js"
741
+ }
885
742
  },
886
743
  {
887
744
  "kind": "field",
888
- "name": "maxCounter",
745
+ "name": "isTyping",
889
746
  "type": {
890
- "text": "number"
747
+ "text": "boolean"
891
748
  },
892
- "description": "The maximum number can be set up to 999, anything above that will be rendered as _999+_.\nThe max counter can be `9`, `99` or `999`.",
893
- "default": "99",
894
- "attribute": "max-counter",
895
- "reflects": true
749
+ "default": "false",
750
+ "description": "Represents the typing indicator when the user is typing.",
751
+ "attribute": "is-typing",
752
+ "inheritedFrom": {
753
+ "name": "AvatarComponentMixin",
754
+ "module": "utils/mixins/AvatarComponentMixin.js"
755
+ }
896
756
  },
897
757
  {
898
758
  "kind": "field",
899
- "name": "overlay",
759
+ "name": "iconName",
900
760
  "type": {
901
- "text": "boolean"
761
+ "text": "IconNames | undefined"
902
762
  },
903
- "default": "false",
904
- "description": "Overlay is to add a thin outline to the badge.\nThis will help distinguish between the badge and the button,\nwhere the badge will be layered on top of a button.",
905
- "attribute": "overlay"
763
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
764
+ "attribute": "icon-name",
765
+ "inheritedFrom": {
766
+ "name": "IconNameMixin",
767
+ "module": "utils/mixins/IconNameMixin.js"
768
+ }
906
769
  },
907
770
  {
908
771
  "kind": "field",
909
- "name": "ariaLabel",
772
+ "name": "tabIndex",
910
773
  "type": {
911
- "text": "string | null"
774
+ "text": "number"
912
775
  },
913
- "default": "null",
914
- "description": "Aria-label attribute to be set for accessibility",
915
- "attribute": "aria-label"
776
+ "default": "0",
777
+ "description": "This property specifies the tab order of the element.",
778
+ "attribute": "tabIndex",
779
+ "reflects": true,
780
+ "inheritedFrom": {
781
+ "name": "TabIndexMixin",
782
+ "module": "utils/mixins/TabIndexMixin.js"
783
+ }
916
784
  },
917
785
  {
918
786
  "kind": "method",
919
- "name": "getCounterText",
920
- "privacy": "private",
921
- "return": {
922
- "type": {
923
- "text": ""
924
- }
925
- },
787
+ "name": "executeAction",
788
+ "privacy": "protected",
789
+ "inheritedFrom": {
790
+ "name": "Buttonsimple",
791
+ "module": "components/buttonsimple/buttonsimple.component.js"
792
+ }
793
+ },
794
+ {
795
+ "kind": "method",
796
+ "name": "setActive",
797
+ "privacy": "protected",
926
798
  "parameters": [
927
799
  {
928
- "name": "maxCounter",
800
+ "name": "element",
929
801
  "type": {
930
- "text": "number"
802
+ "text": "HTMLElement"
931
803
  },
932
- "description": "the maximum limit which can be displayed on the badge"
804
+ "description": "The button element"
933
805
  },
934
806
  {
935
- "name": "counter",
936
- "optional": true,
807
+ "name": "active",
937
808
  "type": {
938
- "text": "number"
809
+ "text": "boolean"
939
810
  },
940
- "description": "the number to be displayed on the badge"
811
+ "description": "The active state of the element"
941
812
  }
942
813
  ],
943
- "description": "If `type` is set to `counter` and if `counter` is greater than `maxCounter`,\nthen it will return a string the maxCounter value as string.\nOtherwise, it will return a string representation of `counter`.\nIf `counter` is not a number, it will return an empty string."
814
+ "description": "Sets the aria-pressed attribute based on the active state of the button.",
815
+ "inheritedFrom": {
816
+ "name": "Buttonsimple",
817
+ "module": "components/buttonsimple/buttonsimple.component.js"
818
+ }
944
819
  },
945
820
  {
946
821
  "kind": "method",
947
- "name": "getBadgeIcon",
822
+ "name": "setSoftDisabled",
948
823
  "privacy": "private",
949
- "return": {
950
- "type": {
951
- "text": ""
824
+ "parameters": [
825
+ {
826
+ "name": "element",
827
+ "type": {
828
+ "text": "HTMLElement"
829
+ },
830
+ "description": "The button element."
831
+ },
832
+ {
833
+ "name": "softDisabled",
834
+ "type": {
835
+ "text": "boolean"
836
+ },
837
+ "description": "The soft-disabled state."
952
838
  }
953
- },
839
+ ],
840
+ "description": "Sets the soft-disabled attribute for the button.\nWhen soft-disabled, the button looks to be disabled but remains focusable and clickable.\nAlso sets/removes aria-disabled attribute.",
841
+ "inheritedFrom": {
842
+ "name": "Buttonsimple",
843
+ "module": "components/buttonsimple/buttonsimple.component.js"
844
+ }
845
+ },
846
+ {
847
+ "kind": "method",
848
+ "name": "setDisabled",
849
+ "privacy": "private",
954
850
  "parameters": [
955
851
  {
956
- "name": "iconName",
852
+ "name": "element",
957
853
  "type": {
958
- "text": "string"
854
+ "text": "HTMLElement"
959
855
  },
960
- "description": "the name of the icon from the icon set"
856
+ "description": "The button element."
961
857
  },
962
858
  {
963
- "name": "backgroundClassPostfix",
859
+ "name": "disabled",
964
860
  "type": {
965
- "text": "string"
861
+ "text": "boolean"
966
862
  },
967
- "description": "postfix for the class to style the badge icon."
863
+ "description": "The disabled state."
968
864
  }
969
865
  ],
970
- "description": "Method to generate the badge icon."
866
+ "description": "Sets the disabled attribute for the button.\nWhen disabled, the button is not focusable or clickable, and tabindex is set to -1.\nThe previous tabindex is stored and restored when enabled.\nAlso sets/removes aria-disabled attribute.",
867
+ "inheritedFrom": {
868
+ "name": "Buttonsimple",
869
+ "module": "components/buttonsimple/buttonsimple.component.js"
870
+ }
971
871
  },
972
872
  {
973
873
  "kind": "method",
974
- "name": "getBadgeDot",
874
+ "name": "triggerClickEvent",
975
875
  "privacy": "private",
976
- "return": {
977
- "type": {
978
- "text": ""
979
- }
980
- },
981
- "description": "Method to generate the badge dot template."
876
+ "inheritedFrom": {
877
+ "name": "Buttonsimple",
878
+ "module": "components/buttonsimple/buttonsimple.component.js"
879
+ }
982
880
  },
983
881
  {
984
882
  "kind": "method",
985
- "name": "getBadgeCounterText",
883
+ "name": "handleKeyDown",
986
884
  "privacy": "private",
987
- "return": {
988
- "type": {
989
- "text": ""
885
+ "parameters": [
886
+ {
887
+ "name": "event",
888
+ "type": {
889
+ "text": "KeyboardEvent"
890
+ },
891
+ "description": "The keyboard event."
990
892
  }
991
- },
992
- "description": "Method to generate the badge text and counter template."
893
+ ],
894
+ "description": "Handles the keydown event on the button.\nIf the key is 'Enter' or 'Space', the button is pressed.\nIf the key is 'Enter', the button is pressed. The native HTML button works in the same way.",
895
+ "inheritedFrom": {
896
+ "name": "Buttonsimple",
897
+ "module": "components/buttonsimple/buttonsimple.component.js"
898
+ }
993
899
  },
994
900
  {
995
901
  "kind": "method",
996
- "name": "setRoleByAriaLabel",
902
+ "name": "handleKeyUp",
997
903
  "privacy": "private",
998
- "return": {
999
- "type": {
1000
- "text": "void"
904
+ "parameters": [
905
+ {
906
+ "name": "event",
907
+ "type": {
908
+ "text": "KeyboardEvent"
909
+ },
910
+ "description": "The keyboard event."
1001
911
  }
912
+ ],
913
+ "description": "Handles the keyup event on the button.\nIf the key is 'Enter' or 'Space', the button is clicked.\nIf the key is 'Space', the button is pressed. The native HTML button works in the same way.",
914
+ "inheritedFrom": {
915
+ "name": "Buttonsimple",
916
+ "module": "components/buttonsimple/buttonsimple.component.js"
917
+ }
918
+ }
919
+ ],
920
+ "attributes": [
921
+ {
922
+ "name": "aria-label",
923
+ "type": {
924
+ "text": "string | null"
1002
925
  },
1003
- "description": "Method to set the role based on the aria-label provided.\nIf the aria-label is provided, the role of the element will be 'img'.\nOtherwise, the role will be null."
926
+ "default": "null",
927
+ "description": "Aria-label attribute to be set for accessibility",
928
+ "fieldName": "ariaLabel"
1004
929
  },
1005
930
  {
1006
- "kind": "method",
1007
- "name": "getBadgeContentBasedOnType",
1008
- "privacy": "private",
1009
- "return": {
1010
- "type": {
1011
- "text": ""
1012
- }
931
+ "name": "src",
932
+ "type": {
933
+ "text": "string | undefined"
1013
934
  },
1014
- "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."
935
+ "description": "The src is the url which will be used to display the avatar.\nWhen the src is loading, we will display the initials as a placeholder.",
936
+ "fieldName": "src",
937
+ "inheritedFrom": {
938
+ "name": "AvatarComponentMixin",
939
+ "module": "src/utils/mixins/AvatarComponentMixin.ts"
940
+ }
1015
941
  },
1016
942
  {
1017
- "kind": "field",
1018
- "name": "iconName",
943
+ "name": "initials",
1019
944
  "type": {
1020
- "text": "IconNames | undefined"
945
+ "text": "string | undefined"
1021
946
  },
1022
- "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
1023
- "attribute": "icon-name",
947
+ "description": "The initials to be displayed for the avatar.",
948
+ "fieldName": "initials",
1024
949
  "inheritedFrom": {
1025
- "name": "IconNameMixin",
1026
- "module": "utils/mixins/IconNameMixin.js"
950
+ "name": "AvatarComponentMixin",
951
+ "module": "src/utils/mixins/AvatarComponentMixin.ts"
1027
952
  }
1028
- }
1029
- ],
1030
- "attributes": [
953
+ },
1031
954
  {
1032
- "name": "type",
955
+ "name": "presence",
1033
956
  "type": {
1034
- "text": "BadgeType | undefined"
957
+ "text": "PresenceType | undefined"
1035
958
  },
1036
- "description": "Type of the badge\nCan be `dot` (notification) , `icon`, `counter`, `success`, `warning` or `error`.",
1037
- "fieldName": "type"
959
+ "description": "The presence is the status which can be used to display the\nactivity state of a user or a space within an avatar component.\n\nAcceptable values include:\n- `active`\n- `away`\n- `away-calling`\n- `busy`\n- `dnd`\n- `meeting`\n- `on-call`\n- `on-device`\n- `on-mobile`\n- `pause`\n- `pto`\n- `presenting`\n- `quiet`\n- `scheduled`",
960
+ "fieldName": "presence",
961
+ "inheritedFrom": {
962
+ "name": "AvatarComponentMixin",
963
+ "module": "src/utils/mixins/AvatarComponentMixin.ts"
964
+ }
1038
965
  },
1039
966
  {
1040
- "name": "variant",
967
+ "name": "size",
1041
968
  "type": {
1042
- "text": "IconVariant"
969
+ "text": "ButtonSize"
1043
970
  },
1044
- "description": "Type of the variant can be `primary` or `secondary`.\nIt defines the background and foreground color of the icon.",
1045
- "default": "primary",
1046
- "fieldName": "variant"
971
+ "description": "Acceptable values include (size in px unit):\n- 24\n- 32\n- 48\n- 64\n- 72\n- 88\n- 124",
972
+ "default": "32",
973
+ "fieldName": "size",
974
+ "inheritedFrom": {
975
+ "name": "Buttonsimple",
976
+ "module": "src/components/buttonsimple/buttonsimple.component.ts"
977
+ }
1047
978
  },
1048
979
  {
1049
980
  "name": "counter",
1050
981
  "type": {
1051
982
  "text": "number | undefined"
1052
983
  },
1053
- "description": "Counter is the number which can be provided in the badge.",
1054
- "fieldName": "counter"
984
+ "description": "The counter is the number which can be displayed on the avatar.\nThe maximum number is 99 and if the given number is greater than 99,\nthen the avatar will be displayed as `99+`.\nIf the given number is a negative number,\nthen the avatar will be displayed as `0`.",
985
+ "fieldName": "counter",
986
+ "inheritedFrom": {
987
+ "name": "AvatarComponentMixin",
988
+ "module": "src/utils/mixins/AvatarComponentMixin.ts"
989
+ }
1055
990
  },
1056
991
  {
1057
- "name": "max-counter",
992
+ "name": "is-typing",
993
+ "type": {
994
+ "text": "boolean"
995
+ },
996
+ "default": "false",
997
+ "description": "Represents the typing indicator when the user is typing.",
998
+ "fieldName": "isTyping",
999
+ "inheritedFrom": {
1000
+ "name": "AvatarComponentMixin",
1001
+ "module": "src/utils/mixins/AvatarComponentMixin.ts"
1002
+ }
1003
+ },
1004
+ {
1005
+ "name": "icon-name",
1006
+ "type": {
1007
+ "text": "IconNames | undefined"
1008
+ },
1009
+ "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
1010
+ "fieldName": "iconName",
1011
+ "inheritedFrom": {
1012
+ "name": "IconNameMixin",
1013
+ "module": "src/utils/mixins/IconNameMixin.ts"
1014
+ }
1015
+ },
1016
+ {
1017
+ "name": "tabIndex",
1058
1018
  "type": {
1059
1019
  "text": "number"
1060
1020
  },
1061
- "description": "The maximum number can be set up to 999, anything above that will be rendered as _999+_.\nThe max counter can be `9`, `99` or `999`.",
1062
- "default": "99",
1063
- "fieldName": "maxCounter"
1021
+ "default": "0",
1022
+ "description": "This property specifies the tab order of the element.",
1023
+ "fieldName": "tabIndex",
1024
+ "inheritedFrom": {
1025
+ "name": "TabIndexMixin",
1026
+ "module": "src/utils/mixins/TabIndexMixin.ts"
1027
+ }
1064
1028
  },
1065
1029
  {
1066
- "name": "overlay",
1030
+ "name": "disabled",
1067
1031
  "type": {
1068
1032
  "text": "boolean"
1069
1033
  },
1070
1034
  "default": "false",
1071
- "description": "Overlay is to add a thin outline to the badge.\nThis will help distinguish between the badge and the button,\nwhere the badge will be layered on top of a button.",
1072
- "fieldName": "overlay"
1035
+ "description": "Indicates whether the component is disabled.\nWhen the component is disabled for user interaction; it is not focusable or clickable.",
1036
+ "fieldName": "disabled",
1037
+ "inheritedFrom": {
1038
+ "name": "DisabledMixin",
1039
+ "module": "src/utils/mixins/DisabledMixin.ts"
1040
+ }
1073
1041
  },
1074
1042
  {
1075
- "name": "aria-label",
1043
+ "name": "active",
1076
1044
  "type": {
1077
- "text": "string | null"
1045
+ "text": "boolean"
1078
1046
  },
1079
- "default": "null",
1080
- "description": "Aria-label attribute to be set for accessibility",
1081
- "fieldName": "ariaLabel"
1047
+ "default": "false",
1048
+ "description": "The button's active state indicates whether it is currently toggled on (active) or off (inactive).\nWhen the active state is true, the button is considered to be in an active state, meaning it is toggled on.\nConversely, when the active state is false, the button is in an inactive state, indicating it is toggled off.",
1049
+ "fieldName": "active",
1050
+ "inheritedFrom": {
1051
+ "name": "Buttonsimple",
1052
+ "module": "src/components/buttonsimple/buttonsimple.component.ts"
1053
+ }
1082
1054
  },
1083
1055
  {
1084
- "name": "icon-name",
1056
+ "name": "soft-disabled",
1085
1057
  "type": {
1086
- "text": "IconNames | undefined"
1058
+ "text": "boolean"
1087
1059
  },
1088
- "description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
1089
- "fieldName": "iconName",
1060
+ "default": "false",
1061
+ "description": "Indicates whether the button is soft disabled.\nWhen set to `true`, the button appears visually disabled but still allows\nfocus, click, and keyboard actions to be passed through.\n\n**Important:** When using soft disabled, consumers must ensure that\nthe button behaves like a disabled button, allowing only focus and\npreventing any interactions (clicks or keyboard actions) from triggering unintended actions.",
1062
+ "fieldName": "softDisabled",
1090
1063
  "inheritedFrom": {
1091
- "name": "IconNameMixin",
1092
- "module": "src/utils/mixins/IconNameMixin.ts"
1064
+ "name": "Buttonsimple",
1065
+ "module": "src/components/buttonsimple/buttonsimple.component.ts"
1066
+ }
1067
+ },
1068
+ {
1069
+ "name": "role",
1070
+ "description": "This property defines the ARIA role for the element. By default, it is set to 'button'.\nConsumers should override this role when:\n- The element is being used in a context where a different role is more appropriate.\n- Custom behaviors are implemented that require a specific ARIA role for accessibility purposes.",
1071
+ "default": "button",
1072
+ "fieldName": "role",
1073
+ "inheritedFrom": {
1074
+ "name": "Buttonsimple",
1075
+ "module": "src/components/buttonsimple/buttonsimple.component.ts"
1076
+ }
1077
+ },
1078
+ {
1079
+ "name": "type",
1080
+ "type": {
1081
+ "text": "ButtonType"
1082
+ },
1083
+ "description": "This property defines the type attribute for the button element.\nThe type attribute specifies the behavior of the button when it is clicked.\n- **submit**: The button submits the form data to the server.\n- **reset**: The button resets the form data to its initial state.\n- **button**: The button does nothing when clicked.",
1084
+ "default": "button",
1085
+ "fieldName": "type",
1086
+ "inheritedFrom": {
1087
+ "name": "Buttonsimple",
1088
+ "module": "src/components/buttonsimple/buttonsimple.component.ts"
1093
1089
  }
1094
1090
  }
1095
1091
  ],
1096
1092
  "mixins": [
1093
+ {
1094
+ "name": "AvatarComponentMixin",
1095
+ "module": "/src/utils/mixins/AvatarComponentMixin"
1096
+ },
1097
1097
  {
1098
1098
  "name": "IconNameMixin",
1099
1099
  "module": "/src/utils/mixins/IconNameMixin"
1100
1100
  }
1101
1101
  ],
1102
1102
  "superclass": {
1103
- "name": "Component",
1104
- "module": "/src/models"
1103
+ "name": "Buttonsimple",
1104
+ "module": "/src/components/buttonsimple/buttonsimple.component"
1105
1105
  },
1106
- "tagName": "mdc-badge",
1107
- "jsDoc": "/**\n * The `mdc-badge` component is a versatile UI element used to\n * display dot, icons, counters, success, warning and error type badge.\n *\n * Supported badge types:\n * - `dot`: Displays a dot notification badge with a blue color.\n * - `icon`: Displays a badge with a specified icon using the `icon-name` attribute.\n * - `counter`: Displays a badge with a counter value. If the counter exceeds the `max-counter`,\n * it shows `maxCounter+`. The maximum value of the counter is 999 and anything above that will be set to `999+`.\n * - `success`: Displays a success badge with a check circle icon and green color.\n * - `warning`: Displays a warning badge with a warning icon and yellow color.\n * - `error`: Displays a error badge with a error legacy icon and red color.\n *\n * For `icon`, `success`, `warning` and `error` types, the `mdc-icon` component is used to render the icon.\n *\n * For the `counter` type, the `mdc-text` component is used to render the counter value.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @tagname mdc-badge\n *\n * @cssproperty --mdc-badge-primary-foreground-color - The foreground color of the primary badge.\n * @cssproperty --mdc-badge-primary-background-color - The background color of the primary badge.\n * @cssproperty --mdc-badge-secondary-foreground-color - The foreground color of the secondary badge.\n * @cssproperty --mdc-badge-secondary-background-color - The background color of the secondary badge.\n * @cssproperty --mdc-badge-success-foreground-color - The foreground color of the success badge.\n * @cssproperty --mdc-badge-success-background-color - The background color of the success badge.\n * @cssproperty --mdc-badge-warning-foreground-color - The foreground color of the warning badge.\n * @cssproperty --mdc-badge-warning-background-color - The background color of the warning badge.\n * @cssproperty --mdc-badge-error-foreground-color - The foreground color of the error badge.\n * @cssproperty --mdc-badge-error-background-color - The background color of the error badge.\n * @cssproperty --mdc-badge-overlay-background-color - The background color of the badge overlay.\n */",
1106
+ "tagName": "mdc-avatarbutton",
1107
+ "jsDoc": "/**\n * The `mdc-avatarbutton` component is an interactable version of the `mdc-avatar` component.\n *\n * This component is made by extending `buttonsimple` class.\n * The button component acts as a wrapper for the avatar component.\n *\n * @dependency mdc-avatar\n *\n * @tagname mdc-avatarbutton\n */",
1108
1108
  "customElement": true
1109
1109
  }
1110
1110
  ],
@@ -1113,8 +1113,8 @@
1113
1113
  "kind": "js",
1114
1114
  "name": "default",
1115
1115
  "declaration": {
1116
- "name": "Badge",
1117
- "module": "components/badge/badge.component.js"
1116
+ "name": "AvatarButton",
1117
+ "module": "components/avatarbutton/avatarbutton.component.js"
1118
1118
  }
1119
1119
  }
1120
1120
  ]