@momentum-design/components 0.74.1 → 0.74.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.js.map +2 -2
- package/dist/components/animation/animation.component.d.ts +1 -1
- package/dist/components/animation/animation.component.js +1 -1
- package/dist/custom-elements.json +958 -958
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.js +3 -3
- package/package.json +1 -1
@@ -2,6 +2,67 @@
|
|
2
2
|
"schemaVersion": "1.0.0",
|
3
3
|
"readme": "",
|
4
4
|
"modules": [
|
5
|
+
{
|
6
|
+
"kind": "javascript-module",
|
7
|
+
"path": "components/appheader/appheader.component.js",
|
8
|
+
"declarations": [
|
9
|
+
{
|
10
|
+
"kind": "class",
|
11
|
+
"description": "The `mdc-appheader` component provides a structured and accessible app header layout.\nIt consists of three primary sections: leading, center, and trailing.\n\n- The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.\n- The **center section** can contain a **search bar**, **icons** or action controls.\n- The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.",
|
12
|
+
"name": "Appheader",
|
13
|
+
"cssParts": [
|
14
|
+
{
|
15
|
+
"description": "The main container for styling the header.",
|
16
|
+
"name": "container"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"description": "The leading section of the header.",
|
20
|
+
"name": "leading-section"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"description": "The center section of the header.",
|
24
|
+
"name": "center-section"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"description": "The trailing section of the header.",
|
28
|
+
"name": "trailing-section"
|
29
|
+
}
|
30
|
+
],
|
31
|
+
"slots": [
|
32
|
+
{
|
33
|
+
"description": "Slot for the leading section (e.g., brand logo, brand name).",
|
34
|
+
"name": "leading"
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"description": "Slot for the center section (e.g., search bar, icons).",
|
38
|
+
"name": "center"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"description": "Slot for the trailing section (e.g., profile avatar, icons).",
|
42
|
+
"name": "trailing"
|
43
|
+
}
|
44
|
+
],
|
45
|
+
"members": [],
|
46
|
+
"superclass": {
|
47
|
+
"name": "Component",
|
48
|
+
"module": "/src/models"
|
49
|
+
},
|
50
|
+
"tagName": "mdc-appheader",
|
51
|
+
"jsDoc": "/**\n * The `mdc-appheader` component provides a structured and accessible app header layout.\n * It consists of three primary sections: leading, center, and trailing.\n *\n * - The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.\n * - The **center section** can contain a **search bar**, **icons** or action controls.\n * - The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.\n *\n * @tagname mdc-appheader\n *\n * @slot leading - Slot for the leading section (e.g., brand logo, brand name).\n * @slot center - Slot for the center section (e.g., search bar, icons).\n * @slot trailing - Slot for the trailing section (e.g., profile avatar, icons).\n *\n * @csspart container - The main container for styling the header.\n * @csspart leading-section - The leading section of the header.\n * @csspart center-section - The center section of the header.\n * @csspart trailing-section - The trailing section of the header.\n */",
|
52
|
+
"customElement": true
|
53
|
+
}
|
54
|
+
],
|
55
|
+
"exports": [
|
56
|
+
{
|
57
|
+
"kind": "js",
|
58
|
+
"name": "default",
|
59
|
+
"declaration": {
|
60
|
+
"name": "Appheader",
|
61
|
+
"module": "components/appheader/appheader.component.js"
|
62
|
+
}
|
63
|
+
}
|
64
|
+
]
|
65
|
+
},
|
5
66
|
{
|
6
67
|
"kind": "javascript-module",
|
7
68
|
"path": "components/alertchip/alertchip.component.js",
|
@@ -706,111 +767,35 @@
|
|
706
767
|
},
|
707
768
|
{
|
708
769
|
"kind": "javascript-module",
|
709
|
-
"path": "components/
|
770
|
+
"path": "components/avatar/avatar.component.js",
|
710
771
|
"declarations": [
|
711
772
|
{
|
712
773
|
"kind": "class",
|
713
|
-
"description": "The `mdc-
|
714
|
-
"name": "
|
715
|
-
"
|
716
|
-
{
|
717
|
-
"description": "The main container for styling the header.",
|
718
|
-
"name": "container"
|
719
|
-
},
|
720
|
-
{
|
721
|
-
"description": "The leading section of the header.",
|
722
|
-
"name": "leading-section"
|
723
|
-
},
|
724
|
-
{
|
725
|
-
"description": "The center section of the header.",
|
726
|
-
"name": "center-section"
|
727
|
-
},
|
728
|
-
{
|
729
|
-
"description": "The trailing section of the header.",
|
730
|
-
"name": "trailing-section"
|
731
|
-
}
|
732
|
-
],
|
733
|
-
"slots": [
|
774
|
+
"description": "The `mdc-avatar` component is used to represent a person or a space.\nAn avatar can be an icon, initials, counter and photo.\n\nTo set the photo of an avatar,\nyou need to set \"src\" attribute.\n\nWhile the avatar image is loading, as a placeholder,\nwe will show the initials text.\nIf the initials are not specified then,\nwe will show `user-regular` icon as a placeholder.\n\nBy default, if there are no attributes specified,\nthen the default avatar will be an icon with `user-regular` name.\n\nThe avatar component is non clickable and non interactive/focusable component.\nIf the avatar is typing, then the loading indicator will be displayed.\nIf the counter type avatar is set to a negative number, then we will display 0.\nThe presence indicator will be hidden when the counter property is set.",
|
775
|
+
"name": "Avatar",
|
776
|
+
"cssProperties": [
|
734
777
|
{
|
735
|
-
"description": "
|
736
|
-
"name": "
|
778
|
+
"description": "Allows customization of the default background color.",
|
779
|
+
"name": "--mdc-avatar-default-background-color"
|
737
780
|
},
|
738
781
|
{
|
739
|
-
"description": "
|
740
|
-
"name": "
|
782
|
+
"description": "Allows customization of the default foreground color.",
|
783
|
+
"name": "--mdc-avatar-default-foreground-color"
|
741
784
|
},
|
742
785
|
{
|
743
|
-
"description": "
|
744
|
-
"name": "
|
745
|
-
}
|
746
|
-
],
|
747
|
-
"members": [],
|
748
|
-
"superclass": {
|
749
|
-
"name": "Component",
|
750
|
-
"module": "/src/models"
|
751
|
-
},
|
752
|
-
"tagName": "mdc-appheader",
|
753
|
-
"jsDoc": "/**\n * The `mdc-appheader` component provides a structured and accessible app header layout.\n * It consists of three primary sections: leading, center, and trailing.\n *\n * - The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.\n * - The **center section** can contain a **search bar**, **icons** or action controls.\n * - The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.\n *\n * @tagname mdc-appheader\n *\n * @slot leading - Slot for the leading section (e.g., brand logo, brand name).\n * @slot center - Slot for the center section (e.g., search bar, icons).\n * @slot trailing - Slot for the trailing section (e.g., profile avatar, icons).\n *\n * @csspart container - The main container for styling the header.\n * @csspart leading-section - The leading section of the header.\n * @csspart center-section - The center section of the header.\n * @csspart trailing-section - The trailing section of the header.\n */",
|
754
|
-
"customElement": true
|
755
|
-
}
|
756
|
-
],
|
757
|
-
"exports": [
|
758
|
-
{
|
759
|
-
"kind": "js",
|
760
|
-
"name": "default",
|
761
|
-
"declaration": {
|
762
|
-
"name": "Appheader",
|
763
|
-
"module": "components/appheader/appheader.component.js"
|
764
|
-
}
|
765
|
-
}
|
766
|
-
]
|
767
|
-
},
|
768
|
-
{
|
769
|
-
"kind": "javascript-module",
|
770
|
-
"path": "components/avatarbutton/avatarbutton.component.js",
|
771
|
-
"declarations": [
|
772
|
-
{
|
773
|
-
"kind": "class",
|
774
|
-
"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.",
|
775
|
-
"name": "AvatarButton",
|
776
|
-
"cssProperties": [
|
777
|
-
{
|
778
|
-
"description": "Background color of the overlay in rest state",
|
779
|
-
"name": "--mdc-avatarbutton-overlay-background-color-rest"
|
786
|
+
"description": "Allows customization of the loading indicator background color.",
|
787
|
+
"name": "--mdc-avatar-loading-indicator-background-color"
|
780
788
|
},
|
781
789
|
{
|
782
|
-
"description": "
|
783
|
-
"name": "--mdc-
|
790
|
+
"description": "Allows customization of the loading indicator foreground color.",
|
791
|
+
"name": "--mdc-avatar-loading-indicator-foreground-color"
|
784
792
|
},
|
785
793
|
{
|
786
|
-
"description": "
|
787
|
-
"name": "--mdc-
|
794
|
+
"description": "Allows customization of the loading overlay background color.",
|
795
|
+
"name": "--mdc-avatar-loading-overlay-background-color"
|
788
796
|
}
|
789
797
|
],
|
790
798
|
"members": [
|
791
|
-
{
|
792
|
-
"kind": "field",
|
793
|
-
"name": "ariaLabel",
|
794
|
-
"type": {
|
795
|
-
"text": "string | null"
|
796
|
-
},
|
797
|
-
"default": "null",
|
798
|
-
"description": "Aria-label attribute to be set for accessibility",
|
799
|
-
"attribute": "aria-label"
|
800
|
-
},
|
801
|
-
{
|
802
|
-
"kind": "method",
|
803
|
-
"name": "setSize",
|
804
|
-
"privacy": "private",
|
805
|
-
"parameters": [
|
806
|
-
{
|
807
|
-
"name": "size",
|
808
|
-
"type": {
|
809
|
-
"text": "AvatarSize"
|
810
|
-
}
|
811
|
-
}
|
812
|
-
]
|
813
|
-
},
|
814
799
|
{
|
815
800
|
"kind": "field",
|
816
801
|
"name": "src",
|
@@ -854,15 +839,15 @@
|
|
854
839
|
"kind": "field",
|
855
840
|
"name": "size",
|
856
841
|
"type": {
|
857
|
-
"text": "
|
842
|
+
"text": "AvatarSize"
|
858
843
|
},
|
859
844
|
"description": "Acceptable values include (size in px unit):\n- 24\n- 32\n- 48\n- 64\n- 72\n- 88\n- 124",
|
860
845
|
"default": "32",
|
861
846
|
"attribute": "size",
|
862
847
|
"reflects": true,
|
863
848
|
"inheritedFrom": {
|
864
|
-
"name": "
|
865
|
-
"module": "
|
849
|
+
"name": "AvatarComponentMixin",
|
850
|
+
"module": "utils/mixins/AvatarComponentMixin.js"
|
866
851
|
}
|
867
852
|
},
|
868
853
|
{
|
@@ -904,73 +889,332 @@
|
|
904
889
|
"name": "IconNameMixin",
|
905
890
|
"module": "utils/mixins/IconNameMixin.js"
|
906
891
|
}
|
892
|
+
}
|
893
|
+
],
|
894
|
+
"mixins": [
|
895
|
+
{
|
896
|
+
"name": "AvatarComponentMixin",
|
897
|
+
"module": "/src/utils/mixins/AvatarComponentMixin"
|
907
898
|
},
|
908
899
|
{
|
909
|
-
"
|
910
|
-
"
|
900
|
+
"name": "IconNameMixin",
|
901
|
+
"module": "/src/utils/mixins/IconNameMixin"
|
902
|
+
}
|
903
|
+
],
|
904
|
+
"superclass": {
|
905
|
+
"name": "Component",
|
906
|
+
"module": "/src/models"
|
907
|
+
},
|
908
|
+
"tagName": "mdc-avatar",
|
909
|
+
"jsDoc": "/**\n * The `mdc-avatar` component is used to represent a person or a space.\n * An avatar can be an icon, initials, counter and photo.\n *\n * To set the photo of an avatar,\n * you need to set \"src\" attribute.\n *\n * While the avatar image is loading, as a placeholder,\n * we will show the initials text.\n * If the initials are not specified then,\n * we will show `user-regular` icon as a placeholder.\n *\n * By default, if there are no attributes specified,\n * then the default avatar will be an icon with `user-regular` name.\n *\n * The avatar component is non clickable and non interactive/focusable component.\n * If the avatar is typing, then the loading indicator will be displayed.\n * If the counter type avatar is set to a negative number, then we will display 0.\n * The presence indicator will be hidden when the counter property is set.\n *\n * @dependency mdc-icon\n * @dependency mdc-presence\n * @dependency mdc-text\n *\n * @tagname mdc-avatar\n *\n * @cssproperty --mdc-avatar-default-background-color - Allows customization of the default background color.\n * @cssproperty --mdc-avatar-default-foreground-color - Allows customization of the default foreground color.\n * @cssproperty --mdc-avatar-loading-indicator-background-color -\n * Allows customization of the loading indicator background color.\n * @cssproperty --mdc-avatar-loading-indicator-foreground-color -\n * Allows customization of the loading indicator foreground color.\n * @cssproperty --mdc-avatar-loading-overlay-background-color -\n * Allows customization of the loading overlay background color.\n */",
|
910
|
+
"customElement": true,
|
911
|
+
"attributes": [
|
912
|
+
{
|
913
|
+
"name": "src",
|
911
914
|
"type": {
|
912
|
-
"text": "
|
915
|
+
"text": "string | undefined"
|
913
916
|
},
|
914
|
-
"
|
915
|
-
"
|
916
|
-
"attribute": "tabIndex",
|
917
|
-
"reflects": true,
|
917
|
+
"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.",
|
918
|
+
"fieldName": "src",
|
918
919
|
"inheritedFrom": {
|
919
|
-
"name": "
|
920
|
-
"module": "utils/mixins/
|
920
|
+
"name": "AvatarComponentMixin",
|
921
|
+
"module": "src/utils/mixins/AvatarComponentMixin.ts"
|
921
922
|
}
|
922
923
|
},
|
923
924
|
{
|
924
|
-
"
|
925
|
-
"name": "disabled",
|
925
|
+
"name": "initials",
|
926
926
|
"type": {
|
927
|
-
"text": "
|
927
|
+
"text": "string | undefined"
|
928
928
|
},
|
929
|
-
"description": "
|
930
|
-
"
|
931
|
-
"attribute": "disabled",
|
932
|
-
"reflects": true,
|
929
|
+
"description": "The initials to be displayed for the avatar.",
|
930
|
+
"fieldName": "initials",
|
933
931
|
"inheritedFrom": {
|
934
|
-
"name": "
|
935
|
-
"module": "utils/mixins/
|
932
|
+
"name": "AvatarComponentMixin",
|
933
|
+
"module": "src/utils/mixins/AvatarComponentMixin.ts"
|
936
934
|
}
|
937
935
|
},
|
938
936
|
{
|
939
|
-
"
|
940
|
-
"name": "active",
|
937
|
+
"name": "presence",
|
941
938
|
"type": {
|
942
|
-
"text": "
|
939
|
+
"text": "PresenceType | undefined"
|
943
940
|
},
|
944
|
-
"description": "The
|
945
|
-
"
|
946
|
-
"attribute": "active",
|
947
|
-
"reflects": true,
|
941
|
+
"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`",
|
942
|
+
"fieldName": "presence",
|
948
943
|
"inheritedFrom": {
|
949
|
-
"name": "
|
950
|
-
"module": "
|
944
|
+
"name": "AvatarComponentMixin",
|
945
|
+
"module": "src/utils/mixins/AvatarComponentMixin.ts"
|
951
946
|
}
|
952
947
|
},
|
953
948
|
{
|
954
|
-
"
|
955
|
-
"name": "softDisabled",
|
949
|
+
"name": "size",
|
956
950
|
"type": {
|
957
|
-
"text": "
|
951
|
+
"text": "AvatarSize"
|
958
952
|
},
|
959
|
-
"description": "
|
960
|
-
"default": "
|
961
|
-
"
|
962
|
-
"reflects": true,
|
953
|
+
"description": "Acceptable values include (size in px unit):\n- 24\n- 32\n- 48\n- 64\n- 72\n- 88\n- 124",
|
954
|
+
"default": "32",
|
955
|
+
"fieldName": "size",
|
963
956
|
"inheritedFrom": {
|
964
|
-
"name": "
|
965
|
-
"module": "
|
957
|
+
"name": "AvatarComponentMixin",
|
958
|
+
"module": "src/utils/mixins/AvatarComponentMixin.ts"
|
966
959
|
}
|
967
960
|
},
|
968
961
|
{
|
969
|
-
"
|
970
|
-
"
|
971
|
-
|
972
|
-
|
973
|
-
"
|
962
|
+
"name": "counter",
|
963
|
+
"type": {
|
964
|
+
"text": "number | undefined"
|
965
|
+
},
|
966
|
+
"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`.",
|
967
|
+
"fieldName": "counter",
|
968
|
+
"inheritedFrom": {
|
969
|
+
"name": "AvatarComponentMixin",
|
970
|
+
"module": "src/utils/mixins/AvatarComponentMixin.ts"
|
971
|
+
}
|
972
|
+
},
|
973
|
+
{
|
974
|
+
"name": "is-typing",
|
975
|
+
"type": {
|
976
|
+
"text": "boolean"
|
977
|
+
},
|
978
|
+
"default": "false",
|
979
|
+
"description": "Represents the typing indicator when the user is typing.",
|
980
|
+
"fieldName": "isTyping",
|
981
|
+
"inheritedFrom": {
|
982
|
+
"name": "AvatarComponentMixin",
|
983
|
+
"module": "src/utils/mixins/AvatarComponentMixin.ts"
|
984
|
+
}
|
985
|
+
},
|
986
|
+
{
|
987
|
+
"name": "icon-name",
|
988
|
+
"type": {
|
989
|
+
"text": "IconNames | undefined"
|
990
|
+
},
|
991
|
+
"description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
|
992
|
+
"fieldName": "iconName",
|
993
|
+
"inheritedFrom": {
|
994
|
+
"name": "IconNameMixin",
|
995
|
+
"module": "src/utils/mixins/IconNameMixin.ts"
|
996
|
+
}
|
997
|
+
}
|
998
|
+
]
|
999
|
+
}
|
1000
|
+
],
|
1001
|
+
"exports": [
|
1002
|
+
{
|
1003
|
+
"kind": "js",
|
1004
|
+
"name": "default",
|
1005
|
+
"declaration": {
|
1006
|
+
"name": "Avatar",
|
1007
|
+
"module": "components/avatar/avatar.component.js"
|
1008
|
+
}
|
1009
|
+
}
|
1010
|
+
]
|
1011
|
+
},
|
1012
|
+
{
|
1013
|
+
"kind": "javascript-module",
|
1014
|
+
"path": "components/avatarbutton/avatarbutton.component.js",
|
1015
|
+
"declarations": [
|
1016
|
+
{
|
1017
|
+
"kind": "class",
|
1018
|
+
"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.",
|
1019
|
+
"name": "AvatarButton",
|
1020
|
+
"cssProperties": [
|
1021
|
+
{
|
1022
|
+
"description": "Background color of the overlay in rest state",
|
1023
|
+
"name": "--mdc-avatarbutton-overlay-background-color-rest"
|
1024
|
+
},
|
1025
|
+
{
|
1026
|
+
"description": "Background color of the overlay in hover state",
|
1027
|
+
"name": "--mdc-avatarbutton-overlay-background-color-hover"
|
1028
|
+
},
|
1029
|
+
{
|
1030
|
+
"description": "Background color of the overlay in active state",
|
1031
|
+
"name": "--mdc-avatarbutton-overlay-background-color-active"
|
1032
|
+
}
|
1033
|
+
],
|
1034
|
+
"members": [
|
1035
|
+
{
|
1036
|
+
"kind": "field",
|
1037
|
+
"name": "ariaLabel",
|
1038
|
+
"type": {
|
1039
|
+
"text": "string | null"
|
1040
|
+
},
|
1041
|
+
"default": "null",
|
1042
|
+
"description": "Aria-label attribute to be set for accessibility",
|
1043
|
+
"attribute": "aria-label"
|
1044
|
+
},
|
1045
|
+
{
|
1046
|
+
"kind": "method",
|
1047
|
+
"name": "setSize",
|
1048
|
+
"privacy": "private",
|
1049
|
+
"parameters": [
|
1050
|
+
{
|
1051
|
+
"name": "size",
|
1052
|
+
"type": {
|
1053
|
+
"text": "AvatarSize"
|
1054
|
+
}
|
1055
|
+
}
|
1056
|
+
]
|
1057
|
+
},
|
1058
|
+
{
|
1059
|
+
"kind": "field",
|
1060
|
+
"name": "src",
|
1061
|
+
"type": {
|
1062
|
+
"text": "string | undefined"
|
1063
|
+
},
|
1064
|
+
"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.",
|
1065
|
+
"attribute": "src",
|
1066
|
+
"inheritedFrom": {
|
1067
|
+
"name": "AvatarComponentMixin",
|
1068
|
+
"module": "utils/mixins/AvatarComponentMixin.js"
|
1069
|
+
}
|
1070
|
+
},
|
1071
|
+
{
|
1072
|
+
"kind": "field",
|
1073
|
+
"name": "initials",
|
1074
|
+
"type": {
|
1075
|
+
"text": "string | undefined"
|
1076
|
+
},
|
1077
|
+
"description": "The initials to be displayed for the avatar.",
|
1078
|
+
"attribute": "initials",
|
1079
|
+
"inheritedFrom": {
|
1080
|
+
"name": "AvatarComponentMixin",
|
1081
|
+
"module": "utils/mixins/AvatarComponentMixin.js"
|
1082
|
+
}
|
1083
|
+
},
|
1084
|
+
{
|
1085
|
+
"kind": "field",
|
1086
|
+
"name": "presence",
|
1087
|
+
"type": {
|
1088
|
+
"text": "PresenceType | undefined"
|
1089
|
+
},
|
1090
|
+
"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`",
|
1091
|
+
"attribute": "presence",
|
1092
|
+
"inheritedFrom": {
|
1093
|
+
"name": "AvatarComponentMixin",
|
1094
|
+
"module": "utils/mixins/AvatarComponentMixin.js"
|
1095
|
+
}
|
1096
|
+
},
|
1097
|
+
{
|
1098
|
+
"kind": "field",
|
1099
|
+
"name": "size",
|
1100
|
+
"type": {
|
1101
|
+
"text": "ButtonSize"
|
1102
|
+
},
|
1103
|
+
"description": "Acceptable values include (size in px unit):\n- 24\n- 32\n- 48\n- 64\n- 72\n- 88\n- 124",
|
1104
|
+
"default": "32",
|
1105
|
+
"attribute": "size",
|
1106
|
+
"reflects": true,
|
1107
|
+
"inheritedFrom": {
|
1108
|
+
"name": "Buttonsimple",
|
1109
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
1110
|
+
}
|
1111
|
+
},
|
1112
|
+
{
|
1113
|
+
"kind": "field",
|
1114
|
+
"name": "counter",
|
1115
|
+
"type": {
|
1116
|
+
"text": "number | undefined"
|
1117
|
+
},
|
1118
|
+
"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`.",
|
1119
|
+
"attribute": "counter",
|
1120
|
+
"inheritedFrom": {
|
1121
|
+
"name": "AvatarComponentMixin",
|
1122
|
+
"module": "utils/mixins/AvatarComponentMixin.js"
|
1123
|
+
}
|
1124
|
+
},
|
1125
|
+
{
|
1126
|
+
"kind": "field",
|
1127
|
+
"name": "isTyping",
|
1128
|
+
"type": {
|
1129
|
+
"text": "boolean"
|
1130
|
+
},
|
1131
|
+
"default": "false",
|
1132
|
+
"description": "Represents the typing indicator when the user is typing.",
|
1133
|
+
"attribute": "is-typing",
|
1134
|
+
"inheritedFrom": {
|
1135
|
+
"name": "AvatarComponentMixin",
|
1136
|
+
"module": "utils/mixins/AvatarComponentMixin.js"
|
1137
|
+
}
|
1138
|
+
},
|
1139
|
+
{
|
1140
|
+
"kind": "field",
|
1141
|
+
"name": "iconName",
|
1142
|
+
"type": {
|
1143
|
+
"text": "IconNames | undefined"
|
1144
|
+
},
|
1145
|
+
"description": "Name of the icon (= filename).\n\nIf no `icon-name` is provided, no icon will be rendered.",
|
1146
|
+
"attribute": "icon-name",
|
1147
|
+
"inheritedFrom": {
|
1148
|
+
"name": "IconNameMixin",
|
1149
|
+
"module": "utils/mixins/IconNameMixin.js"
|
1150
|
+
}
|
1151
|
+
},
|
1152
|
+
{
|
1153
|
+
"kind": "field",
|
1154
|
+
"name": "tabIndex",
|
1155
|
+
"type": {
|
1156
|
+
"text": "number"
|
1157
|
+
},
|
1158
|
+
"default": "0",
|
1159
|
+
"description": "This property specifies the tab order of the element.",
|
1160
|
+
"attribute": "tabIndex",
|
1161
|
+
"reflects": true,
|
1162
|
+
"inheritedFrom": {
|
1163
|
+
"name": "TabIndexMixin",
|
1164
|
+
"module": "utils/mixins/TabIndexMixin.js"
|
1165
|
+
}
|
1166
|
+
},
|
1167
|
+
{
|
1168
|
+
"kind": "field",
|
1169
|
+
"name": "disabled",
|
1170
|
+
"type": {
|
1171
|
+
"text": "boolean | undefined"
|
1172
|
+
},
|
1173
|
+
"description": "Indicates whether the component is disabled.\nWhen the component is disabled for user interaction; it is not focusable or clickable.",
|
1174
|
+
"default": "undefined",
|
1175
|
+
"attribute": "disabled",
|
1176
|
+
"reflects": true,
|
1177
|
+
"inheritedFrom": {
|
1178
|
+
"name": "DisabledMixin",
|
1179
|
+
"module": "utils/mixins/DisabledMixin.js"
|
1180
|
+
}
|
1181
|
+
},
|
1182
|
+
{
|
1183
|
+
"kind": "field",
|
1184
|
+
"name": "active",
|
1185
|
+
"type": {
|
1186
|
+
"text": "boolean | undefined"
|
1187
|
+
},
|
1188
|
+
"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.\n\nThis attribute is used to set the provided `ariaStateKey` to true or false.",
|
1189
|
+
"default": "undefined",
|
1190
|
+
"attribute": "active",
|
1191
|
+
"reflects": true,
|
1192
|
+
"inheritedFrom": {
|
1193
|
+
"name": "Buttonsimple",
|
1194
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
1195
|
+
}
|
1196
|
+
},
|
1197
|
+
{
|
1198
|
+
"kind": "field",
|
1199
|
+
"name": "softDisabled",
|
1200
|
+
"type": {
|
1201
|
+
"text": "boolean | undefined"
|
1202
|
+
},
|
1203
|
+
"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.",
|
1204
|
+
"default": "undefined",
|
1205
|
+
"attribute": "soft-disabled",
|
1206
|
+
"reflects": true,
|
1207
|
+
"inheritedFrom": {
|
1208
|
+
"name": "Buttonsimple",
|
1209
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
1210
|
+
}
|
1211
|
+
},
|
1212
|
+
{
|
1213
|
+
"kind": "field",
|
1214
|
+
"name": "role",
|
1215
|
+
"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.",
|
1216
|
+
"default": "button",
|
1217
|
+
"attribute": "role",
|
974
1218
|
"reflects": true,
|
975
1219
|
"inheritedFrom": {
|
976
1220
|
"name": "Buttonsimple",
|
@@ -1409,115 +1653,218 @@
|
|
1409
1653
|
},
|
1410
1654
|
{
|
1411
1655
|
"kind": "javascript-module",
|
1412
|
-
"path": "components/
|
1656
|
+
"path": "components/badge/badge.component.js",
|
1413
1657
|
"declarations": [
|
1414
1658
|
{
|
1415
1659
|
"kind": "class",
|
1416
|
-
"description": "The `mdc-
|
1417
|
-
"name": "
|
1660
|
+
"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.",
|
1661
|
+
"name": "Badge",
|
1418
1662
|
"cssProperties": [
|
1419
1663
|
{
|
1420
|
-
"description": "
|
1421
|
-
"name": "--mdc-
|
1664
|
+
"description": "The foreground color of the primary badge.",
|
1665
|
+
"name": "--mdc-badge-primary-foreground-color"
|
1422
1666
|
},
|
1423
1667
|
{
|
1424
|
-
"description": "
|
1425
|
-
"name": "--mdc-
|
1668
|
+
"description": "The background color of the primary badge.",
|
1669
|
+
"name": "--mdc-badge-primary-background-color"
|
1426
1670
|
},
|
1427
1671
|
{
|
1428
|
-
"description": "
|
1429
|
-
"name": "--mdc-
|
1672
|
+
"description": "The foreground color of the secondary badge.",
|
1673
|
+
"name": "--mdc-badge-secondary-foreground-color"
|
1430
1674
|
},
|
1431
1675
|
{
|
1432
|
-
"description": "
|
1433
|
-
"name": "--mdc-
|
1676
|
+
"description": "The background color of the secondary badge.",
|
1677
|
+
"name": "--mdc-badge-secondary-background-color"
|
1434
1678
|
},
|
1435
1679
|
{
|
1436
|
-
"description": "
|
1437
|
-
"name": "--mdc-
|
1680
|
+
"description": "The foreground color of the success badge.",
|
1681
|
+
"name": "--mdc-badge-success-foreground-color"
|
1682
|
+
},
|
1683
|
+
{
|
1684
|
+
"description": "The background color of the success badge.",
|
1685
|
+
"name": "--mdc-badge-success-background-color"
|
1686
|
+
},
|
1687
|
+
{
|
1688
|
+
"description": "The foreground color of the warning badge.",
|
1689
|
+
"name": "--mdc-badge-warning-foreground-color"
|
1690
|
+
},
|
1691
|
+
{
|
1692
|
+
"description": "The background color of the warning badge.",
|
1693
|
+
"name": "--mdc-badge-warning-background-color"
|
1694
|
+
},
|
1695
|
+
{
|
1696
|
+
"description": "The foreground color of the error badge.",
|
1697
|
+
"name": "--mdc-badge-error-foreground-color"
|
1698
|
+
},
|
1699
|
+
{
|
1700
|
+
"description": "The background color of the error badge.",
|
1701
|
+
"name": "--mdc-badge-error-background-color"
|
1702
|
+
},
|
1703
|
+
{
|
1704
|
+
"description": "The background color of the badge overlay.",
|
1705
|
+
"name": "--mdc-badge-overlay-background-color"
|
1438
1706
|
}
|
1439
1707
|
],
|
1440
1708
|
"members": [
|
1441
1709
|
{
|
1442
1710
|
"kind": "field",
|
1443
|
-
"name": "
|
1711
|
+
"name": "type",
|
1444
1712
|
"type": {
|
1445
|
-
"text": "
|
1713
|
+
"text": "BadgeType | undefined"
|
1446
1714
|
},
|
1447
|
-
"description": "
|
1448
|
-
"attribute": "
|
1449
|
-
"
|
1450
|
-
"name": "AvatarComponentMixin",
|
1451
|
-
"module": "utils/mixins/AvatarComponentMixin.js"
|
1452
|
-
}
|
1715
|
+
"description": "Type of the badge\nCan be `dot` (notification) , `icon`, `counter`, `success`, `warning` or `error`.",
|
1716
|
+
"attribute": "type",
|
1717
|
+
"reflects": true
|
1453
1718
|
},
|
1454
1719
|
{
|
1455
1720
|
"kind": "field",
|
1456
|
-
"name": "
|
1721
|
+
"name": "variant",
|
1457
1722
|
"type": {
|
1458
|
-
"text": "
|
1723
|
+
"text": "IconVariant"
|
1459
1724
|
},
|
1460
|
-
"description": "
|
1461
|
-
"
|
1462
|
-
"
|
1463
|
-
|
1464
|
-
"module": "utils/mixins/AvatarComponentMixin.js"
|
1465
|
-
}
|
1725
|
+
"description": "Type of the variant can be `primary` or `secondary`.\nIt defines the background and foreground color of the icon.",
|
1726
|
+
"default": "primary",
|
1727
|
+
"attribute": "variant",
|
1728
|
+
"reflects": true
|
1466
1729
|
},
|
1467
1730
|
{
|
1468
1731
|
"kind": "field",
|
1469
|
-
"name": "
|
1732
|
+
"name": "counter",
|
1470
1733
|
"type": {
|
1471
|
-
"text": "
|
1734
|
+
"text": "number | undefined"
|
1472
1735
|
},
|
1473
|
-
"description": "
|
1474
|
-
"attribute": "
|
1475
|
-
"inheritedFrom": {
|
1476
|
-
"name": "AvatarComponentMixin",
|
1477
|
-
"module": "utils/mixins/AvatarComponentMixin.js"
|
1478
|
-
}
|
1736
|
+
"description": "Counter is the number which can be provided in the badge.",
|
1737
|
+
"attribute": "counter"
|
1479
1738
|
},
|
1480
1739
|
{
|
1481
1740
|
"kind": "field",
|
1482
|
-
"name": "
|
1741
|
+
"name": "maxCounter",
|
1483
1742
|
"type": {
|
1484
|
-
"text": "
|
1743
|
+
"text": "number"
|
1485
1744
|
},
|
1486
|
-
"description": "
|
1487
|
-
"default": "
|
1488
|
-
"attribute": "
|
1489
|
-
"reflects": true
|
1490
|
-
"inheritedFrom": {
|
1491
|
-
"name": "AvatarComponentMixin",
|
1492
|
-
"module": "utils/mixins/AvatarComponentMixin.js"
|
1493
|
-
}
|
1745
|
+
"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`.",
|
1746
|
+
"default": "99",
|
1747
|
+
"attribute": "max-counter",
|
1748
|
+
"reflects": true
|
1494
1749
|
},
|
1495
1750
|
{
|
1496
1751
|
"kind": "field",
|
1497
|
-
"name": "
|
1752
|
+
"name": "overlay",
|
1498
1753
|
"type": {
|
1499
|
-
"text": "
|
1754
|
+
"text": "boolean"
|
1500
1755
|
},
|
1501
|
-
"
|
1502
|
-
"
|
1503
|
-
"
|
1504
|
-
"name": "AvatarComponentMixin",
|
1505
|
-
"module": "utils/mixins/AvatarComponentMixin.js"
|
1506
|
-
}
|
1756
|
+
"default": "false",
|
1757
|
+
"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.",
|
1758
|
+
"attribute": "overlay"
|
1507
1759
|
},
|
1508
1760
|
{
|
1509
1761
|
"kind": "field",
|
1510
|
-
"name": "
|
1762
|
+
"name": "ariaLabel",
|
1511
1763
|
"type": {
|
1512
|
-
"text": "
|
1764
|
+
"text": "string | null"
|
1513
1765
|
},
|
1514
|
-
"default": "
|
1515
|
-
"description": "
|
1516
|
-
"attribute": "
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1766
|
+
"default": "null",
|
1767
|
+
"description": "Aria-label attribute to be set for accessibility",
|
1768
|
+
"attribute": "aria-label"
|
1769
|
+
},
|
1770
|
+
{
|
1771
|
+
"kind": "method",
|
1772
|
+
"name": "getCounterText",
|
1773
|
+
"privacy": "private",
|
1774
|
+
"return": {
|
1775
|
+
"type": {
|
1776
|
+
"text": ""
|
1777
|
+
}
|
1778
|
+
},
|
1779
|
+
"parameters": [
|
1780
|
+
{
|
1781
|
+
"name": "maxCounter",
|
1782
|
+
"type": {
|
1783
|
+
"text": "number"
|
1784
|
+
},
|
1785
|
+
"description": "the maximum limit which can be displayed on the badge"
|
1786
|
+
},
|
1787
|
+
{
|
1788
|
+
"name": "counter",
|
1789
|
+
"optional": true,
|
1790
|
+
"type": {
|
1791
|
+
"text": "number"
|
1792
|
+
},
|
1793
|
+
"description": "the number to be displayed on the badge"
|
1794
|
+
}
|
1795
|
+
],
|
1796
|
+
"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."
|
1797
|
+
},
|
1798
|
+
{
|
1799
|
+
"kind": "method",
|
1800
|
+
"name": "getBadgeIcon",
|
1801
|
+
"privacy": "private",
|
1802
|
+
"return": {
|
1803
|
+
"type": {
|
1804
|
+
"text": ""
|
1805
|
+
}
|
1806
|
+
},
|
1807
|
+
"parameters": [
|
1808
|
+
{
|
1809
|
+
"name": "iconName",
|
1810
|
+
"type": {
|
1811
|
+
"text": "string"
|
1812
|
+
},
|
1813
|
+
"description": "the name of the icon from the icon set"
|
1814
|
+
},
|
1815
|
+
{
|
1816
|
+
"name": "backgroundClassPostfix",
|
1817
|
+
"type": {
|
1818
|
+
"text": "string"
|
1819
|
+
},
|
1820
|
+
"description": "postfix for the class to style the badge icon."
|
1821
|
+
}
|
1822
|
+
],
|
1823
|
+
"description": "Method to generate the badge icon."
|
1824
|
+
},
|
1825
|
+
{
|
1826
|
+
"kind": "method",
|
1827
|
+
"name": "getBadgeDot",
|
1828
|
+
"privacy": "private",
|
1829
|
+
"return": {
|
1830
|
+
"type": {
|
1831
|
+
"text": ""
|
1832
|
+
}
|
1833
|
+
},
|
1834
|
+
"description": "Method to generate the badge dot template."
|
1835
|
+
},
|
1836
|
+
{
|
1837
|
+
"kind": "method",
|
1838
|
+
"name": "getBadgeCounterText",
|
1839
|
+
"privacy": "private",
|
1840
|
+
"return": {
|
1841
|
+
"type": {
|
1842
|
+
"text": ""
|
1843
|
+
}
|
1844
|
+
},
|
1845
|
+
"description": "Method to generate the badge text and counter template."
|
1846
|
+
},
|
1847
|
+
{
|
1848
|
+
"kind": "method",
|
1849
|
+
"name": "setRoleByAriaLabel",
|
1850
|
+
"privacy": "private",
|
1851
|
+
"return": {
|
1852
|
+
"type": {
|
1853
|
+
"text": "void"
|
1854
|
+
}
|
1855
|
+
},
|
1856
|
+
"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."
|
1857
|
+
},
|
1858
|
+
{
|
1859
|
+
"kind": "method",
|
1860
|
+
"name": "getBadgeContentBasedOnType",
|
1861
|
+
"privacy": "private",
|
1862
|
+
"return": {
|
1863
|
+
"type": {
|
1864
|
+
"text": ""
|
1865
|
+
}
|
1866
|
+
},
|
1867
|
+
"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."
|
1521
1868
|
},
|
1522
1869
|
{
|
1523
1870
|
"kind": "field",
|
@@ -1533,97 +1880,58 @@
|
|
1533
1880
|
}
|
1534
1881
|
}
|
1535
1882
|
],
|
1536
|
-
"mixins": [
|
1537
|
-
{
|
1538
|
-
"name": "AvatarComponentMixin",
|
1539
|
-
"module": "/src/utils/mixins/AvatarComponentMixin"
|
1540
|
-
},
|
1541
|
-
{
|
1542
|
-
"name": "IconNameMixin",
|
1543
|
-
"module": "/src/utils/mixins/IconNameMixin"
|
1544
|
-
}
|
1545
|
-
],
|
1546
|
-
"superclass": {
|
1547
|
-
"name": "Component",
|
1548
|
-
"module": "/src/models"
|
1549
|
-
},
|
1550
|
-
"tagName": "mdc-avatar",
|
1551
|
-
"jsDoc": "/**\n * The `mdc-avatar` component is used to represent a person or a space.\n * An avatar can be an icon, initials, counter and photo.\n *\n * To set the photo of an avatar,\n * you need to set \"src\" attribute.\n *\n * While the avatar image is loading, as a placeholder,\n * we will show the initials text.\n * If the initials are not specified then,\n * we will show `user-regular` icon as a placeholder.\n *\n * By default, if there are no attributes specified,\n * then the default avatar will be an icon with `user-regular` name.\n *\n * The avatar component is non clickable and non interactive/focusable component.\n * If the avatar is typing, then the loading indicator will be displayed.\n * If the counter type avatar is set to a negative number, then we will display 0.\n * The presence indicator will be hidden when the counter property is set.\n *\n * @dependency mdc-icon\n * @dependency mdc-presence\n * @dependency mdc-text\n *\n * @tagname mdc-avatar\n *\n * @cssproperty --mdc-avatar-default-background-color - Allows customization of the default background color.\n * @cssproperty --mdc-avatar-default-foreground-color - Allows customization of the default foreground color.\n * @cssproperty --mdc-avatar-loading-indicator-background-color -\n * Allows customization of the loading indicator background color.\n * @cssproperty --mdc-avatar-loading-indicator-foreground-color -\n * Allows customization of the loading indicator foreground color.\n * @cssproperty --mdc-avatar-loading-overlay-background-color -\n * Allows customization of the loading overlay background color.\n */",
|
1552
|
-
"customElement": true,
|
1553
1883
|
"attributes": [
|
1554
1884
|
{
|
1555
|
-
"name": "
|
1885
|
+
"name": "type",
|
1556
1886
|
"type": {
|
1557
|
-
"text": "
|
1887
|
+
"text": "BadgeType | undefined"
|
1558
1888
|
},
|
1559
|
-
"description": "
|
1560
|
-
"fieldName": "
|
1561
|
-
"inheritedFrom": {
|
1562
|
-
"name": "AvatarComponentMixin",
|
1563
|
-
"module": "src/utils/mixins/AvatarComponentMixin.ts"
|
1564
|
-
}
|
1889
|
+
"description": "Type of the badge\nCan be `dot` (notification) , `icon`, `counter`, `success`, `warning` or `error`.",
|
1890
|
+
"fieldName": "type"
|
1565
1891
|
},
|
1566
1892
|
{
|
1567
|
-
"name": "
|
1893
|
+
"name": "variant",
|
1568
1894
|
"type": {
|
1569
|
-
"text": "
|
1895
|
+
"text": "IconVariant"
|
1570
1896
|
},
|
1571
|
-
"description": "
|
1572
|
-
"
|
1573
|
-
"
|
1574
|
-
"name": "AvatarComponentMixin",
|
1575
|
-
"module": "src/utils/mixins/AvatarComponentMixin.ts"
|
1576
|
-
}
|
1897
|
+
"description": "Type of the variant can be `primary` or `secondary`.\nIt defines the background and foreground color of the icon.",
|
1898
|
+
"default": "primary",
|
1899
|
+
"fieldName": "variant"
|
1577
1900
|
},
|
1578
1901
|
{
|
1579
|
-
"name": "
|
1902
|
+
"name": "counter",
|
1580
1903
|
"type": {
|
1581
|
-
"text": "
|
1904
|
+
"text": "number | undefined"
|
1582
1905
|
},
|
1583
|
-
"description": "
|
1584
|
-
"fieldName": "
|
1585
|
-
"inheritedFrom": {
|
1586
|
-
"name": "AvatarComponentMixin",
|
1587
|
-
"module": "src/utils/mixins/AvatarComponentMixin.ts"
|
1588
|
-
}
|
1906
|
+
"description": "Counter is the number which can be provided in the badge.",
|
1907
|
+
"fieldName": "counter"
|
1589
1908
|
},
|
1590
1909
|
{
|
1591
|
-
"name": "
|
1910
|
+
"name": "max-counter",
|
1592
1911
|
"type": {
|
1593
|
-
"text": "
|
1912
|
+
"text": "number"
|
1594
1913
|
},
|
1595
|
-
"description": "
|
1596
|
-
"default": "
|
1597
|
-
"fieldName": "
|
1598
|
-
"inheritedFrom": {
|
1599
|
-
"name": "AvatarComponentMixin",
|
1600
|
-
"module": "src/utils/mixins/AvatarComponentMixin.ts"
|
1601
|
-
}
|
1914
|
+
"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`.",
|
1915
|
+
"default": "99",
|
1916
|
+
"fieldName": "maxCounter"
|
1602
1917
|
},
|
1603
1918
|
{
|
1604
|
-
"name": "
|
1919
|
+
"name": "overlay",
|
1605
1920
|
"type": {
|
1606
|
-
"text": "
|
1921
|
+
"text": "boolean"
|
1607
1922
|
},
|
1608
|
-
"
|
1609
|
-
"
|
1610
|
-
"
|
1611
|
-
"name": "AvatarComponentMixin",
|
1612
|
-
"module": "src/utils/mixins/AvatarComponentMixin.ts"
|
1613
|
-
}
|
1923
|
+
"default": "false",
|
1924
|
+
"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.",
|
1925
|
+
"fieldName": "overlay"
|
1614
1926
|
},
|
1615
1927
|
{
|
1616
|
-
"name": "
|
1928
|
+
"name": "aria-label",
|
1617
1929
|
"type": {
|
1618
|
-
"text": "
|
1930
|
+
"text": "string | null"
|
1619
1931
|
},
|
1620
|
-
"default": "
|
1621
|
-
"description": "
|
1622
|
-
"fieldName": "
|
1623
|
-
"inheritedFrom": {
|
1624
|
-
"name": "AvatarComponentMixin",
|
1625
|
-
"module": "src/utils/mixins/AvatarComponentMixin.ts"
|
1626
|
-
}
|
1932
|
+
"default": "null",
|
1933
|
+
"description": "Aria-label attribute to be set for accessibility",
|
1934
|
+
"fieldName": "ariaLabel"
|
1627
1935
|
},
|
1628
1936
|
{
|
1629
1937
|
"name": "icon-name",
|
@@ -1637,7 +1945,20 @@
|
|
1637
1945
|
"module": "src/utils/mixins/IconNameMixin.ts"
|
1638
1946
|
}
|
1639
1947
|
}
|
1640
|
-
]
|
1948
|
+
],
|
1949
|
+
"mixins": [
|
1950
|
+
{
|
1951
|
+
"name": "IconNameMixin",
|
1952
|
+
"module": "/src/utils/mixins/IconNameMixin"
|
1953
|
+
}
|
1954
|
+
],
|
1955
|
+
"superclass": {
|
1956
|
+
"name": "Component",
|
1957
|
+
"module": "/src/models"
|
1958
|
+
},
|
1959
|
+
"tagName": "mdc-badge",
|
1960
|
+
"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 */",
|
1961
|
+
"customElement": true
|
1641
1962
|
}
|
1642
1963
|
],
|
1643
1964
|
"exports": [
|
@@ -1645,8 +1966,8 @@
|
|
1645
1966
|
"kind": "js",
|
1646
1967
|
"name": "default",
|
1647
1968
|
"declaration": {
|
1648
|
-
"name": "
|
1649
|
-
"module": "components/
|
1969
|
+
"name": "Badge",
|
1970
|
+
"module": "components/badge/badge.component.js"
|
1650
1971
|
}
|
1651
1972
|
}
|
1652
1973
|
]
|
@@ -1986,821 +2307,500 @@
|
|
1986
2307
|
"description": "The color to set."
|
1987
2308
|
}
|
1988
2309
|
],
|
1989
|
-
"description": "Sets the color attribute for the button.\nDefaults to DEFAULTS.COLOR if invalid or for tertiary button.",
|
1990
|
-
"inheritedFrom": {
|
1991
|
-
"name": "ButtonComponentMixin",
|
1992
|
-
"module": "utils/mixins/ButtonComponentMixin.js"
|
1993
|
-
}
|
1994
|
-
},
|
1995
|
-
{
|
1996
|
-
"kind": "method",
|
1997
|
-
"name": "setSize",
|
1998
|
-
"privacy": "protected",
|
1999
|
-
"parameters": [
|
2000
|
-
{
|
2001
|
-
"name": "size",
|
2002
|
-
"type": {
|
2003
|
-
"text": "PillButtonSize | IconButtonSize"
|
2004
|
-
},
|
2005
|
-
"description": "The size to set."
|
2006
|
-
}
|
2007
|
-
],
|
2008
|
-
"description": "Sets the size attribute for the button component.\nValidates the size based on the button type (icon, pill, or tertiary).\nDefaults to DEFAULTS.SIZE if invalid.",
|
2009
|
-
"inheritedFrom": {
|
2010
|
-
"name": "ButtonComponentMixin",
|
2011
|
-
"module": "utils/mixins/ButtonComponentMixin.js"
|
2012
|
-
}
|
2013
|
-
},
|
2014
|
-
{
|
2015
|
-
"kind": "method",
|
2016
|
-
"name": "inferButtonType",
|
2017
|
-
"privacy": "protected",
|
2018
|
-
"description": "Infers the type of button based on the presence of slot and/or prefix and postfix icons.",
|
2019
|
-
"parameters": [
|
2020
|
-
{
|
2021
|
-
"description": "default slot of button",
|
2022
|
-
"name": "slot"
|
2023
|
-
}
|
2024
|
-
],
|
2025
|
-
"inheritedFrom": {
|
2026
|
-
"name": "ButtonComponentMixin",
|
2027
|
-
"module": "utils/mixins/ButtonComponentMixin.js"
|
2028
|
-
}
|
2029
|
-
},
|
2030
|
-
{
|
2031
|
-
"kind": "field",
|
2032
|
-
"name": "tabIndex",
|
2033
|
-
"type": {
|
2034
|
-
"text": "number"
|
2035
|
-
},
|
2036
|
-
"default": "0",
|
2037
|
-
"description": "This property specifies the tab order of the element.",
|
2038
|
-
"attribute": "tabIndex",
|
2039
|
-
"reflects": true,
|
2040
|
-
"inheritedFrom": {
|
2041
|
-
"name": "TabIndexMixin",
|
2042
|
-
"module": "utils/mixins/TabIndexMixin.js"
|
2043
|
-
}
|
2044
|
-
},
|
2045
|
-
{
|
2046
|
-
"kind": "field",
|
2047
|
-
"name": "disabled",
|
2048
|
-
"type": {
|
2049
|
-
"text": "boolean | undefined"
|
2050
|
-
},
|
2051
|
-
"description": "Indicates whether the component is disabled.\nWhen the component is disabled for user interaction; it is not focusable or clickable.",
|
2052
|
-
"default": "undefined",
|
2053
|
-
"attribute": "disabled",
|
2054
|
-
"reflects": true,
|
2055
|
-
"inheritedFrom": {
|
2056
|
-
"name": "DisabledMixin",
|
2057
|
-
"module": "utils/mixins/DisabledMixin.js"
|
2058
|
-
}
|
2059
|
-
},
|
2060
|
-
{
|
2061
|
-
"kind": "field",
|
2062
|
-
"name": "active",
|
2063
|
-
"type": {
|
2064
|
-
"text": "boolean | undefined"
|
2065
|
-
},
|
2066
|
-
"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.\n\nThis attribute is used to set the provided `ariaStateKey` to true or false.",
|
2067
|
-
"default": "undefined",
|
2068
|
-
"attribute": "active",
|
2069
|
-
"reflects": true,
|
2070
|
-
"inheritedFrom": {
|
2071
|
-
"name": "Buttonsimple",
|
2072
|
-
"module": "components/buttonsimple/buttonsimple.component.js"
|
2073
|
-
}
|
2074
|
-
},
|
2075
|
-
{
|
2076
|
-
"kind": "field",
|
2077
|
-
"name": "softDisabled",
|
2078
|
-
"type": {
|
2079
|
-
"text": "boolean | undefined"
|
2080
|
-
},
|
2081
|
-
"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.",
|
2082
|
-
"default": "undefined",
|
2083
|
-
"attribute": "soft-disabled",
|
2084
|
-
"reflects": true,
|
2085
|
-
"inheritedFrom": {
|
2086
|
-
"name": "Buttonsimple",
|
2087
|
-
"module": "components/buttonsimple/buttonsimple.component.js"
|
2088
|
-
}
|
2089
|
-
},
|
2090
|
-
{
|
2091
|
-
"kind": "field",
|
2092
|
-
"name": "ariaStateKey",
|
2093
|
-
"type": {
|
2094
|
-
"text": "string | undefined"
|
2095
|
-
},
|
2096
|
-
"description": "This property defines the ARIA state key, which will be toggled when the\nButton is set to `active`.\nThe default value is 'aria-pressed', which is commonly used for toggle buttons.\n\nConsumers can override this property to use a different ARIA state key if needed.\nIn case multiple aria attributes should be toggled, they can be passed in as\na comma separated string.\nFor example: `aria-pressed,aria-expanded`",
|
2097
|
-
"default": "'aria-pressed' (when)",
|
2098
|
-
"attribute": "ariaStateKey",
|
2099
|
-
"reflects": true,
|
2100
|
-
"inheritedFrom": {
|
2101
|
-
"name": "Buttonsimple",
|
2102
|
-
"module": "components/buttonsimple/buttonsimple.component.js"
|
2103
|
-
}
|
2104
|
-
},
|
2105
|
-
{
|
2106
|
-
"kind": "field",
|
2107
|
-
"name": "type",
|
2108
|
-
"type": {
|
2109
|
-
"text": "ButtonType"
|
2110
|
-
},
|
2111
|
-
"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.",
|
2112
|
-
"default": "button",
|
2113
|
-
"attribute": "type",
|
2114
|
-
"reflects": true,
|
2115
|
-
"inheritedFrom": {
|
2116
|
-
"name": "Buttonsimple",
|
2117
|
-
"module": "components/buttonsimple/buttonsimple.component.js"
|
2118
|
-
}
|
2119
|
-
},
|
2120
|
-
{
|
2121
|
-
"kind": "method",
|
2122
|
-
"name": "executeAction",
|
2123
|
-
"privacy": "protected",
|
2124
|
-
"inheritedFrom": {
|
2125
|
-
"name": "Buttonsimple",
|
2126
|
-
"module": "components/buttonsimple/buttonsimple.component.js"
|
2127
|
-
}
|
2128
|
-
},
|
2129
|
-
{
|
2130
|
-
"kind": "method",
|
2131
|
-
"name": "setActive",
|
2132
|
-
"privacy": "protected",
|
2133
|
-
"parameters": [
|
2134
|
-
{
|
2135
|
-
"name": "element",
|
2136
|
-
"type": {
|
2137
|
-
"text": "HTMLElement"
|
2138
|
-
},
|
2139
|
-
"description": "The button element"
|
2140
|
-
},
|
2141
|
-
{
|
2142
|
-
"name": "active",
|
2143
|
-
"optional": true,
|
2144
|
-
"type": {
|
2145
|
-
"text": "boolean"
|
2146
|
-
},
|
2147
|
-
"description": "The active state of the element"
|
2148
|
-
}
|
2149
|
-
],
|
2150
|
-
"description": "Sets the ariaStateKey attributes based on the active state of the button.",
|
2151
|
-
"inheritedFrom": {
|
2152
|
-
"name": "Buttonsimple",
|
2153
|
-
"module": "components/buttonsimple/buttonsimple.component.js"
|
2154
|
-
}
|
2155
|
-
},
|
2156
|
-
{
|
2157
|
-
"kind": "method",
|
2158
|
-
"name": "setSoftDisabled",
|
2159
|
-
"privacy": "private",
|
2160
|
-
"parameters": [
|
2161
|
-
{
|
2162
|
-
"name": "element",
|
2163
|
-
"type": {
|
2164
|
-
"text": "HTMLElement"
|
2165
|
-
},
|
2166
|
-
"description": "The button element."
|
2167
|
-
},
|
2168
|
-
{
|
2169
|
-
"name": "softDisabled",
|
2170
|
-
"optional": true,
|
2171
|
-
"type": {
|
2172
|
-
"text": "boolean"
|
2173
|
-
},
|
2174
|
-
"description": "The soft-disabled state."
|
2175
|
-
}
|
2176
|
-
],
|
2177
|
-
"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.",
|
2178
|
-
"inheritedFrom": {
|
2179
|
-
"name": "Buttonsimple",
|
2180
|
-
"module": "components/buttonsimple/buttonsimple.component.js"
|
2181
|
-
}
|
2182
|
-
},
|
2183
|
-
{
|
2184
|
-
"kind": "method",
|
2185
|
-
"name": "setDisabled",
|
2186
|
-
"privacy": "private",
|
2187
|
-
"parameters": [
|
2188
|
-
{
|
2189
|
-
"name": "element",
|
2190
|
-
"type": {
|
2191
|
-
"text": "HTMLElement"
|
2192
|
-
},
|
2193
|
-
"description": "The button element."
|
2194
|
-
},
|
2195
|
-
{
|
2196
|
-
"name": "disabled",
|
2197
|
-
"type": {
|
2198
|
-
"text": "boolean"
|
2199
|
-
},
|
2200
|
-
"description": "The disabled state."
|
2201
|
-
}
|
2202
|
-
],
|
2203
|
-
"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.",
|
2204
|
-
"inheritedFrom": {
|
2205
|
-
"name": "Buttonsimple",
|
2206
|
-
"module": "components/buttonsimple/buttonsimple.component.js"
|
2207
|
-
}
|
2208
|
-
},
|
2209
|
-
{
|
2210
|
-
"kind": "method",
|
2211
|
-
"name": "triggerClickEvent",
|
2212
|
-
"privacy": "private",
|
2213
|
-
"inheritedFrom": {
|
2214
|
-
"name": "Buttonsimple",
|
2215
|
-
"module": "components/buttonsimple/buttonsimple.component.js"
|
2216
|
-
}
|
2217
|
-
},
|
2218
|
-
{
|
2219
|
-
"kind": "method",
|
2220
|
-
"name": "handleBlur",
|
2221
|
-
"privacy": "private",
|
2222
|
-
"description": "In case the button is pressed and the focus is lost while pressing,\nthe pressed class is removed.",
|
2223
|
-
"inheritedFrom": {
|
2224
|
-
"name": "Buttonsimple",
|
2225
|
-
"module": "components/buttonsimple/buttonsimple.component.js"
|
2226
|
-
}
|
2227
|
-
},
|
2228
|
-
{
|
2229
|
-
"kind": "method",
|
2230
|
-
"name": "handleKeyDown",
|
2231
|
-
"privacy": "private",
|
2232
|
-
"parameters": [
|
2233
|
-
{
|
2234
|
-
"name": "event",
|
2235
|
-
"type": {
|
2236
|
-
"text": "KeyboardEvent"
|
2237
|
-
},
|
2238
|
-
"description": "The keyboard event."
|
2239
|
-
}
|
2240
|
-
],
|
2241
|
-
"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.\nIf the key is 'Space', the button's default is prevent to avoid scrolling etc in the host application.",
|
2242
|
-
"inheritedFrom": {
|
2243
|
-
"name": "Buttonsimple",
|
2244
|
-
"module": "components/buttonsimple/buttonsimple.component.js"
|
2245
|
-
}
|
2246
|
-
},
|
2247
|
-
{
|
2248
|
-
"kind": "method",
|
2249
|
-
"name": "handleKeyUp",
|
2250
|
-
"privacy": "private",
|
2251
|
-
"parameters": [
|
2252
|
-
{
|
2253
|
-
"name": "event",
|
2254
|
-
"type": {
|
2255
|
-
"text": "KeyboardEvent"
|
2256
|
-
},
|
2257
|
-
"description": "The keyboard event."
|
2258
|
-
}
|
2259
|
-
],
|
2260
|
-
"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.",
|
2261
|
-
"inheritedFrom": {
|
2262
|
-
"name": "Buttonsimple",
|
2263
|
-
"module": "components/buttonsimple/buttonsimple.component.js"
|
2264
|
-
}
|
2265
|
-
}
|
2266
|
-
],
|
2267
|
-
"attributes": [
|
2268
|
-
{
|
2269
|
-
"name": "size",
|
2270
|
-
"type": {
|
2271
|
-
"text": "ButtonSize"
|
2272
|
-
},
|
2273
|
-
"description": "Button sizing is based on the button type.\n- **Pill button**: 40, 32, 28, 24.\n- **Icon button**: 64, 52, 40, 32, 28, 24.\n- Tertiary icon button can also be 20.",
|
2274
|
-
"default": "32",
|
2275
|
-
"fieldName": "size",
|
2276
|
-
"inheritedFrom": {
|
2277
|
-
"name": "Buttonsimple",
|
2278
|
-
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2279
|
-
}
|
2280
|
-
},
|
2281
|
-
{
|
2282
|
-
"name": "inverted",
|
2283
|
-
"type": {
|
2284
|
-
"text": "boolean"
|
2285
|
-
},
|
2286
|
-
"description": "The button color can be inverted by setting the inverted attribute to true.\n\nOnly applies when variant is set to `primary`, color is set to `default`\nand button is not `active`.",
|
2287
|
-
"default": "false",
|
2288
|
-
"fieldName": "inverted"
|
2289
|
-
},
|
2290
|
-
{
|
2291
|
-
"name": "role",
|
2292
|
-
"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.",
|
2293
|
-
"default": "'button'",
|
2294
|
-
"fieldName": "role",
|
2295
|
-
"type": {
|
2296
|
-
"text": "string"
|
2297
|
-
},
|
2298
|
-
"inheritedFrom": {
|
2299
|
-
"name": "Buttonsimple",
|
2300
|
-
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2301
|
-
}
|
2302
|
-
},
|
2303
|
-
{
|
2304
|
-
"name": "prefix-icon",
|
2305
|
-
"type": {
|
2306
|
-
"text": "IconNames | undefined"
|
2307
|
-
},
|
2308
|
-
"description": "The name of the icon to display as a prefix.\nThe icon is displayed on the left side of the button.",
|
2309
|
-
"fieldName": "prefixIcon",
|
2310
|
-
"inheritedFrom": {
|
2311
|
-
"name": "ButtonComponentMixin",
|
2312
|
-
"module": "src/utils/mixins/ButtonComponentMixin.ts"
|
2313
|
-
}
|
2314
|
-
},
|
2315
|
-
{
|
2316
|
-
"name": "postfix-icon",
|
2317
|
-
"type": {
|
2318
|
-
"text": "IconNames | undefined"
|
2319
|
-
},
|
2320
|
-
"description": "The name of the icon to display as a postfix.\nThe icon is displayed on the right side of the button.",
|
2321
|
-
"fieldName": "postfixIcon",
|
2322
|
-
"inheritedFrom": {
|
2323
|
-
"name": "ButtonComponentMixin",
|
2324
|
-
"module": "src/utils/mixins/ButtonComponentMixin.ts"
|
2325
|
-
}
|
2326
|
-
},
|
2327
|
-
{
|
2328
|
-
"name": "variant",
|
2329
|
-
"type": {
|
2330
|
-
"text": "ButtonVariant"
|
2331
|
-
},
|
2332
|
-
"description": "There are 3 variants of button: primary, secondary, tertiary. They are styled differently.\n- **Primary**: Solid background color.\n- **Secondary**: Transparent background with a solid border.\n- **Tertiary**: No background or border, appears as plain text but retains all button functionalities.",
|
2333
|
-
"default": "primary",
|
2334
|
-
"fieldName": "variant",
|
2335
|
-
"inheritedFrom": {
|
2336
|
-
"name": "ButtonComponentMixin",
|
2337
|
-
"module": "src/utils/mixins/ButtonComponentMixin.ts"
|
2338
|
-
}
|
2339
|
-
},
|
2340
|
-
{
|
2341
|
-
"name": "color",
|
2342
|
-
"type": {
|
2343
|
-
"text": "ButtonColor"
|
2344
|
-
},
|
2345
|
-
"description": "There are 5 colors for button: positive, negative, accent, promotional, default.",
|
2346
|
-
"default": "default",
|
2347
|
-
"fieldName": "color",
|
2348
|
-
"inheritedFrom": {
|
2349
|
-
"name": "ButtonComponentMixin",
|
2350
|
-
"module": "src/utils/mixins/ButtonComponentMixin.ts"
|
2351
|
-
}
|
2352
|
-
},
|
2353
|
-
{
|
2354
|
-
"name": "tabIndex",
|
2355
|
-
"type": {
|
2356
|
-
"text": "number"
|
2357
|
-
},
|
2358
|
-
"default": "0",
|
2359
|
-
"description": "This property specifies the tab order of the element.",
|
2360
|
-
"fieldName": "tabIndex",
|
2361
|
-
"inheritedFrom": {
|
2362
|
-
"name": "TabIndexMixin",
|
2363
|
-
"module": "src/utils/mixins/TabIndexMixin.ts"
|
2364
|
-
}
|
2365
|
-
},
|
2366
|
-
{
|
2367
|
-
"name": "disabled",
|
2368
|
-
"type": {
|
2369
|
-
"text": "boolean | undefined"
|
2370
|
-
},
|
2371
|
-
"description": "Indicates whether the component is disabled.\nWhen the component is disabled for user interaction; it is not focusable or clickable.",
|
2372
|
-
"default": "undefined",
|
2373
|
-
"fieldName": "disabled",
|
2374
|
-
"inheritedFrom": {
|
2375
|
-
"name": "DisabledMixin",
|
2376
|
-
"module": "src/utils/mixins/DisabledMixin.ts"
|
2377
|
-
}
|
2378
|
-
},
|
2379
|
-
{
|
2380
|
-
"name": "active",
|
2381
|
-
"type": {
|
2382
|
-
"text": "boolean | undefined"
|
2383
|
-
},
|
2384
|
-
"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.\n\nThis attribute is used to set the provided `ariaStateKey` to true or false.",
|
2385
|
-
"default": "undefined",
|
2386
|
-
"fieldName": "active",
|
2387
|
-
"inheritedFrom": {
|
2388
|
-
"name": "Buttonsimple",
|
2389
|
-
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2390
|
-
}
|
2391
|
-
},
|
2392
|
-
{
|
2393
|
-
"name": "soft-disabled",
|
2394
|
-
"type": {
|
2395
|
-
"text": "boolean | undefined"
|
2396
|
-
},
|
2397
|
-
"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.",
|
2398
|
-
"default": "undefined",
|
2399
|
-
"fieldName": "softDisabled",
|
2400
|
-
"inheritedFrom": {
|
2401
|
-
"name": "Buttonsimple",
|
2402
|
-
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2403
|
-
}
|
2404
|
-
},
|
2405
|
-
{
|
2406
|
-
"name": "ariaStateKey",
|
2407
|
-
"type": {
|
2408
|
-
"text": "string | undefined"
|
2409
|
-
},
|
2410
|
-
"description": "This property defines the ARIA state key, which will be toggled when the\nButton is set to `active`.\nThe default value is 'aria-pressed', which is commonly used for toggle buttons.\n\nConsumers can override this property to use a different ARIA state key if needed.\nIn case multiple aria attributes should be toggled, they can be passed in as\na comma separated string.\nFor example: `aria-pressed,aria-expanded`",
|
2411
|
-
"default": "'aria-pressed' (when)",
|
2412
|
-
"fieldName": "ariaStateKey",
|
2413
|
-
"inheritedFrom": {
|
2414
|
-
"name": "Buttonsimple",
|
2415
|
-
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2416
|
-
}
|
2417
|
-
},
|
2418
|
-
{
|
2419
|
-
"name": "type",
|
2420
|
-
"type": {
|
2421
|
-
"text": "ButtonType"
|
2422
|
-
},
|
2423
|
-
"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.",
|
2424
|
-
"default": "button",
|
2425
|
-
"fieldName": "type",
|
2426
|
-
"inheritedFrom": {
|
2427
|
-
"name": "Buttonsimple",
|
2428
|
-
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2429
|
-
}
|
2430
|
-
}
|
2431
|
-
],
|
2432
|
-
"mixins": [
|
2433
|
-
{
|
2434
|
-
"name": "ButtonComponentMixin",
|
2435
|
-
"module": "/src/utils/mixins/ButtonComponentMixin"
|
2436
|
-
}
|
2437
|
-
],
|
2438
|
-
"superclass": {
|
2439
|
-
"name": "Buttonsimple",
|
2440
|
-
"module": "/src/components/buttonsimple/buttonsimple.component"
|
2441
|
-
},
|
2442
|
-
"tagName": "mdc-button",
|
2443
|
-
"jsDoc": "/**\n * `mdc-button` is a component that can be configured in various ways to suit different use cases.\n *\n * Button Variants:\n * - **Primary**: Solid background color.\n * - **Secondary**: Transparent background with a solid border.\n * - **Tertiary**: No background or border, appears as plain text but retains all button functionalities.\n *\n * Button Colors:\n * - **Positive**: Green color.\n * - **Negative**: Red color.\n * - **Accent**: Blue color.\n * - **Promotional**: Purple color.\n * - **Default**: White color.\n *\n * Button Sizes (in REM units):\n * - **Pill button**: 40, 32, 28, 24.\n * - **Icon button**: 64, 52, 40, 32, 28, 24.\n * - **Tertiary icon button**: 20.\n *\n * Button Types:\n * - **Pill button**: A button that contains text value. Commonly used for call to action, tags, or filters.\n * - **Pill button with icons**: A button containing an icon either on the left or right side of the button.\n * - **Icon button**: A button represented by just an icon without any text.\n * The type of button is inferred based on the presence of slot and/or prefix and postfix icons.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-button\n *\n * @slot - Text label of the button.\n */",
|
2444
|
-
"customElement": true,
|
2445
|
-
"events": [
|
2446
|
-
{
|
2447
|
-
"description": "(React: onClick) This event is dispatched when the button is clicked.",
|
2448
|
-
"name": "click",
|
2449
|
-
"reactName": "onClick",
|
2450
|
-
"inheritedFrom": {
|
2451
|
-
"name": "Buttonsimple",
|
2452
|
-
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2453
|
-
}
|
2454
|
-
},
|
2455
|
-
{
|
2456
|
-
"description": "(React: onKeyDown) This event is dispatched when a key is pressed down on the button.",
|
2457
|
-
"name": "keydown",
|
2458
|
-
"reactName": "onKeyDown",
|
2459
|
-
"inheritedFrom": {
|
2460
|
-
"name": "Buttonsimple",
|
2461
|
-
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2462
|
-
}
|
2463
|
-
},
|
2464
|
-
{
|
2465
|
-
"description": "(React: onKeyUp) This event is dispatched when a key is released on the button.",
|
2466
|
-
"name": "keyup",
|
2467
|
-
"reactName": "onKeyUp",
|
2468
|
-
"inheritedFrom": {
|
2469
|
-
"name": "Buttonsimple",
|
2470
|
-
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2471
|
-
}
|
2472
|
-
},
|
2473
|
-
{
|
2474
|
-
"description": "(React: onFocus) This event is dispatched when the button receives focus.",
|
2475
|
-
"name": "focus",
|
2476
|
-
"reactName": "onFocus",
|
2477
|
-
"inheritedFrom": {
|
2478
|
-
"name": "Buttonsimple",
|
2479
|
-
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2480
|
-
}
|
2481
|
-
}
|
2482
|
-
]
|
2483
|
-
}
|
2484
|
-
],
|
2485
|
-
"exports": [
|
2486
|
-
{
|
2487
|
-
"kind": "js",
|
2488
|
-
"name": "default",
|
2489
|
-
"declaration": {
|
2490
|
-
"name": "Button",
|
2491
|
-
"module": "components/button/button.component.js"
|
2492
|
-
}
|
2493
|
-
}
|
2494
|
-
]
|
2495
|
-
},
|
2496
|
-
{
|
2497
|
-
"kind": "javascript-module",
|
2498
|
-
"path": "components/badge/badge.component.js",
|
2499
|
-
"declarations": [
|
2500
|
-
{
|
2501
|
-
"kind": "class",
|
2502
|
-
"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.",
|
2503
|
-
"name": "Badge",
|
2504
|
-
"cssProperties": [
|
2505
|
-
{
|
2506
|
-
"description": "The foreground color of the primary badge.",
|
2507
|
-
"name": "--mdc-badge-primary-foreground-color"
|
2508
|
-
},
|
2509
|
-
{
|
2510
|
-
"description": "The background color of the primary badge.",
|
2511
|
-
"name": "--mdc-badge-primary-background-color"
|
2512
|
-
},
|
2513
|
-
{
|
2514
|
-
"description": "The foreground color of the secondary badge.",
|
2515
|
-
"name": "--mdc-badge-secondary-foreground-color"
|
2516
|
-
},
|
2517
|
-
{
|
2518
|
-
"description": "The background color of the secondary badge.",
|
2519
|
-
"name": "--mdc-badge-secondary-background-color"
|
2520
|
-
},
|
2521
|
-
{
|
2522
|
-
"description": "The foreground color of the success badge.",
|
2523
|
-
"name": "--mdc-badge-success-foreground-color"
|
2524
|
-
},
|
2525
|
-
{
|
2526
|
-
"description": "The background color of the success badge.",
|
2527
|
-
"name": "--mdc-badge-success-background-color"
|
2528
|
-
},
|
2529
|
-
{
|
2530
|
-
"description": "The foreground color of the warning badge.",
|
2531
|
-
"name": "--mdc-badge-warning-foreground-color"
|
2532
|
-
},
|
2533
|
-
{
|
2534
|
-
"description": "The background color of the warning badge.",
|
2535
|
-
"name": "--mdc-badge-warning-background-color"
|
2310
|
+
"description": "Sets the color attribute for the button.\nDefaults to DEFAULTS.COLOR if invalid or for tertiary button.",
|
2311
|
+
"inheritedFrom": {
|
2312
|
+
"name": "ButtonComponentMixin",
|
2313
|
+
"module": "utils/mixins/ButtonComponentMixin.js"
|
2314
|
+
}
|
2536
2315
|
},
|
2537
2316
|
{
|
2538
|
-
"
|
2539
|
-
"name": "
|
2317
|
+
"kind": "method",
|
2318
|
+
"name": "setSize",
|
2319
|
+
"privacy": "protected",
|
2320
|
+
"parameters": [
|
2321
|
+
{
|
2322
|
+
"name": "size",
|
2323
|
+
"type": {
|
2324
|
+
"text": "PillButtonSize | IconButtonSize"
|
2325
|
+
},
|
2326
|
+
"description": "The size to set."
|
2327
|
+
}
|
2328
|
+
],
|
2329
|
+
"description": "Sets the size attribute for the button component.\nValidates the size based on the button type (icon, pill, or tertiary).\nDefaults to DEFAULTS.SIZE if invalid.",
|
2330
|
+
"inheritedFrom": {
|
2331
|
+
"name": "ButtonComponentMixin",
|
2332
|
+
"module": "utils/mixins/ButtonComponentMixin.js"
|
2333
|
+
}
|
2540
2334
|
},
|
2541
2335
|
{
|
2542
|
-
"
|
2543
|
-
"name": "
|
2336
|
+
"kind": "method",
|
2337
|
+
"name": "inferButtonType",
|
2338
|
+
"privacy": "protected",
|
2339
|
+
"description": "Infers the type of button based on the presence of slot and/or prefix and postfix icons.",
|
2340
|
+
"parameters": [
|
2341
|
+
{
|
2342
|
+
"description": "default slot of button",
|
2343
|
+
"name": "slot"
|
2344
|
+
}
|
2345
|
+
],
|
2346
|
+
"inheritedFrom": {
|
2347
|
+
"name": "ButtonComponentMixin",
|
2348
|
+
"module": "utils/mixins/ButtonComponentMixin.js"
|
2349
|
+
}
|
2544
2350
|
},
|
2545
|
-
{
|
2546
|
-
"description": "The background color of the badge overlay.",
|
2547
|
-
"name": "--mdc-badge-overlay-background-color"
|
2548
|
-
}
|
2549
|
-
],
|
2550
|
-
"members": [
|
2551
2351
|
{
|
2552
2352
|
"kind": "field",
|
2553
|
-
"name": "
|
2353
|
+
"name": "tabIndex",
|
2554
2354
|
"type": {
|
2555
|
-
"text": "
|
2355
|
+
"text": "number"
|
2556
2356
|
},
|
2557
|
-
"
|
2558
|
-
"
|
2559
|
-
"
|
2357
|
+
"default": "0",
|
2358
|
+
"description": "This property specifies the tab order of the element.",
|
2359
|
+
"attribute": "tabIndex",
|
2360
|
+
"reflects": true,
|
2361
|
+
"inheritedFrom": {
|
2362
|
+
"name": "TabIndexMixin",
|
2363
|
+
"module": "utils/mixins/TabIndexMixin.js"
|
2364
|
+
}
|
2560
2365
|
},
|
2561
2366
|
{
|
2562
2367
|
"kind": "field",
|
2563
|
-
"name": "
|
2368
|
+
"name": "disabled",
|
2564
2369
|
"type": {
|
2565
|
-
"text": "
|
2370
|
+
"text": "boolean | undefined"
|
2566
2371
|
},
|
2567
|
-
"description": "
|
2568
|
-
"default": "
|
2569
|
-
"attribute": "
|
2570
|
-
"reflects": true
|
2372
|
+
"description": "Indicates whether the component is disabled.\nWhen the component is disabled for user interaction; it is not focusable or clickable.",
|
2373
|
+
"default": "undefined",
|
2374
|
+
"attribute": "disabled",
|
2375
|
+
"reflects": true,
|
2376
|
+
"inheritedFrom": {
|
2377
|
+
"name": "DisabledMixin",
|
2378
|
+
"module": "utils/mixins/DisabledMixin.js"
|
2379
|
+
}
|
2571
2380
|
},
|
2572
2381
|
{
|
2573
2382
|
"kind": "field",
|
2574
|
-
"name": "
|
2383
|
+
"name": "active",
|
2575
2384
|
"type": {
|
2576
|
-
"text": "
|
2385
|
+
"text": "boolean | undefined"
|
2577
2386
|
},
|
2578
|
-
"description": "
|
2579
|
-
"
|
2387
|
+
"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.\n\nThis attribute is used to set the provided `ariaStateKey` to true or false.",
|
2388
|
+
"default": "undefined",
|
2389
|
+
"attribute": "active",
|
2390
|
+
"reflects": true,
|
2391
|
+
"inheritedFrom": {
|
2392
|
+
"name": "Buttonsimple",
|
2393
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
2394
|
+
}
|
2580
2395
|
},
|
2581
2396
|
{
|
2582
2397
|
"kind": "field",
|
2583
|
-
"name": "
|
2398
|
+
"name": "softDisabled",
|
2584
2399
|
"type": {
|
2585
|
-
"text": "
|
2400
|
+
"text": "boolean | undefined"
|
2586
2401
|
},
|
2587
|
-
"description": "
|
2588
|
-
"default": "
|
2589
|
-
"attribute": "
|
2590
|
-
"reflects": true
|
2402
|
+
"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.",
|
2403
|
+
"default": "undefined",
|
2404
|
+
"attribute": "soft-disabled",
|
2405
|
+
"reflects": true,
|
2406
|
+
"inheritedFrom": {
|
2407
|
+
"name": "Buttonsimple",
|
2408
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
2409
|
+
}
|
2591
2410
|
},
|
2592
2411
|
{
|
2593
2412
|
"kind": "field",
|
2594
|
-
"name": "
|
2413
|
+
"name": "ariaStateKey",
|
2595
2414
|
"type": {
|
2596
|
-
"text": "
|
2415
|
+
"text": "string | undefined"
|
2597
2416
|
},
|
2598
|
-
"
|
2599
|
-
"
|
2600
|
-
"attribute": "
|
2417
|
+
"description": "This property defines the ARIA state key, which will be toggled when the\nButton is set to `active`.\nThe default value is 'aria-pressed', which is commonly used for toggle buttons.\n\nConsumers can override this property to use a different ARIA state key if needed.\nIn case multiple aria attributes should be toggled, they can be passed in as\na comma separated string.\nFor example: `aria-pressed,aria-expanded`",
|
2418
|
+
"default": "'aria-pressed' (when)",
|
2419
|
+
"attribute": "ariaStateKey",
|
2420
|
+
"reflects": true,
|
2421
|
+
"inheritedFrom": {
|
2422
|
+
"name": "Buttonsimple",
|
2423
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
2424
|
+
}
|
2601
2425
|
},
|
2602
2426
|
{
|
2603
2427
|
"kind": "field",
|
2604
|
-
"name": "
|
2428
|
+
"name": "type",
|
2605
2429
|
"type": {
|
2606
|
-
"text": "
|
2430
|
+
"text": "ButtonType"
|
2607
2431
|
},
|
2608
|
-
"
|
2609
|
-
"
|
2610
|
-
"attribute": "
|
2432
|
+
"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.",
|
2433
|
+
"default": "button",
|
2434
|
+
"attribute": "type",
|
2435
|
+
"reflects": true,
|
2436
|
+
"inheritedFrom": {
|
2437
|
+
"name": "Buttonsimple",
|
2438
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
2439
|
+
}
|
2611
2440
|
},
|
2612
2441
|
{
|
2613
2442
|
"kind": "method",
|
2614
|
-
"name": "
|
2615
|
-
"privacy": "
|
2616
|
-
"
|
2617
|
-
"
|
2618
|
-
|
2619
|
-
|
2620
|
-
|
2443
|
+
"name": "executeAction",
|
2444
|
+
"privacy": "protected",
|
2445
|
+
"inheritedFrom": {
|
2446
|
+
"name": "Buttonsimple",
|
2447
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
2448
|
+
}
|
2449
|
+
},
|
2450
|
+
{
|
2451
|
+
"kind": "method",
|
2452
|
+
"name": "setActive",
|
2453
|
+
"privacy": "protected",
|
2621
2454
|
"parameters": [
|
2622
2455
|
{
|
2623
|
-
"name": "
|
2456
|
+
"name": "element",
|
2624
2457
|
"type": {
|
2625
|
-
"text": "
|
2458
|
+
"text": "HTMLElement"
|
2626
2459
|
},
|
2627
|
-
"description": "
|
2460
|
+
"description": "The button element"
|
2628
2461
|
},
|
2629
2462
|
{
|
2630
|
-
"name": "
|
2463
|
+
"name": "active",
|
2631
2464
|
"optional": true,
|
2632
2465
|
"type": {
|
2633
|
-
"text": "
|
2466
|
+
"text": "boolean"
|
2634
2467
|
},
|
2635
|
-
"description": "
|
2468
|
+
"description": "The active state of the element"
|
2636
2469
|
}
|
2637
2470
|
],
|
2638
|
-
"description": "
|
2471
|
+
"description": "Sets the ariaStateKey attributes based on the active state of the button.",
|
2472
|
+
"inheritedFrom": {
|
2473
|
+
"name": "Buttonsimple",
|
2474
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
2475
|
+
}
|
2639
2476
|
},
|
2640
2477
|
{
|
2641
2478
|
"kind": "method",
|
2642
|
-
"name": "
|
2479
|
+
"name": "setSoftDisabled",
|
2643
2480
|
"privacy": "private",
|
2644
|
-
"
|
2645
|
-
|
2646
|
-
"
|
2481
|
+
"parameters": [
|
2482
|
+
{
|
2483
|
+
"name": "element",
|
2484
|
+
"type": {
|
2485
|
+
"text": "HTMLElement"
|
2486
|
+
},
|
2487
|
+
"description": "The button element."
|
2488
|
+
},
|
2489
|
+
{
|
2490
|
+
"name": "softDisabled",
|
2491
|
+
"optional": true,
|
2492
|
+
"type": {
|
2493
|
+
"text": "boolean"
|
2494
|
+
},
|
2495
|
+
"description": "The soft-disabled state."
|
2647
2496
|
}
|
2648
|
-
|
2497
|
+
],
|
2498
|
+
"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.",
|
2499
|
+
"inheritedFrom": {
|
2500
|
+
"name": "Buttonsimple",
|
2501
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
2502
|
+
}
|
2503
|
+
},
|
2504
|
+
{
|
2505
|
+
"kind": "method",
|
2506
|
+
"name": "setDisabled",
|
2507
|
+
"privacy": "private",
|
2649
2508
|
"parameters": [
|
2650
2509
|
{
|
2651
|
-
"name": "
|
2510
|
+
"name": "element",
|
2652
2511
|
"type": {
|
2653
|
-
"text": "
|
2512
|
+
"text": "HTMLElement"
|
2654
2513
|
},
|
2655
|
-
"description": "
|
2514
|
+
"description": "The button element."
|
2656
2515
|
},
|
2657
2516
|
{
|
2658
|
-
"name": "
|
2517
|
+
"name": "disabled",
|
2659
2518
|
"type": {
|
2660
|
-
"text": "
|
2519
|
+
"text": "boolean"
|
2661
2520
|
},
|
2662
|
-
"description": "
|
2521
|
+
"description": "The disabled state."
|
2663
2522
|
}
|
2664
2523
|
],
|
2665
|
-
"description": "
|
2524
|
+
"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.",
|
2525
|
+
"inheritedFrom": {
|
2526
|
+
"name": "Buttonsimple",
|
2527
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
2528
|
+
}
|
2666
2529
|
},
|
2667
2530
|
{
|
2668
2531
|
"kind": "method",
|
2669
|
-
"name": "
|
2532
|
+
"name": "triggerClickEvent",
|
2670
2533
|
"privacy": "private",
|
2671
|
-
"
|
2672
|
-
"
|
2673
|
-
|
2534
|
+
"inheritedFrom": {
|
2535
|
+
"name": "Buttonsimple",
|
2536
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
2537
|
+
}
|
2538
|
+
},
|
2539
|
+
{
|
2540
|
+
"kind": "method",
|
2541
|
+
"name": "handleBlur",
|
2542
|
+
"privacy": "private",
|
2543
|
+
"description": "In case the button is pressed and the focus is lost while pressing,\nthe pressed class is removed.",
|
2544
|
+
"inheritedFrom": {
|
2545
|
+
"name": "Buttonsimple",
|
2546
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
2547
|
+
}
|
2548
|
+
},
|
2549
|
+
{
|
2550
|
+
"kind": "method",
|
2551
|
+
"name": "handleKeyDown",
|
2552
|
+
"privacy": "private",
|
2553
|
+
"parameters": [
|
2554
|
+
{
|
2555
|
+
"name": "event",
|
2556
|
+
"type": {
|
2557
|
+
"text": "KeyboardEvent"
|
2558
|
+
},
|
2559
|
+
"description": "The keyboard event."
|
2674
2560
|
}
|
2675
|
-
|
2676
|
-
"description": "
|
2561
|
+
],
|
2562
|
+
"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.\nIf the key is 'Space', the button's default is prevent to avoid scrolling etc in the host application.",
|
2563
|
+
"inheritedFrom": {
|
2564
|
+
"name": "Buttonsimple",
|
2565
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
2566
|
+
}
|
2677
2567
|
},
|
2678
2568
|
{
|
2679
2569
|
"kind": "method",
|
2680
|
-
"name": "
|
2570
|
+
"name": "handleKeyUp",
|
2681
2571
|
"privacy": "private",
|
2682
|
-
"
|
2683
|
-
|
2684
|
-
"
|
2572
|
+
"parameters": [
|
2573
|
+
{
|
2574
|
+
"name": "event",
|
2575
|
+
"type": {
|
2576
|
+
"text": "KeyboardEvent"
|
2577
|
+
},
|
2578
|
+
"description": "The keyboard event."
|
2685
2579
|
}
|
2580
|
+
],
|
2581
|
+
"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.",
|
2582
|
+
"inheritedFrom": {
|
2583
|
+
"name": "Buttonsimple",
|
2584
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
2585
|
+
}
|
2586
|
+
}
|
2587
|
+
],
|
2588
|
+
"attributes": [
|
2589
|
+
{
|
2590
|
+
"name": "size",
|
2591
|
+
"type": {
|
2592
|
+
"text": "ButtonSize"
|
2686
2593
|
},
|
2687
|
-
"description": "
|
2594
|
+
"description": "Button sizing is based on the button type.\n- **Pill button**: 40, 32, 28, 24.\n- **Icon button**: 64, 52, 40, 32, 28, 24.\n- Tertiary icon button can also be 20.",
|
2595
|
+
"default": "32",
|
2596
|
+
"fieldName": "size",
|
2597
|
+
"inheritedFrom": {
|
2598
|
+
"name": "Buttonsimple",
|
2599
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2600
|
+
}
|
2688
2601
|
},
|
2689
2602
|
{
|
2690
|
-
"
|
2691
|
-
"
|
2692
|
-
|
2693
|
-
"return": {
|
2694
|
-
"type": {
|
2695
|
-
"text": "void"
|
2696
|
-
}
|
2603
|
+
"name": "inverted",
|
2604
|
+
"type": {
|
2605
|
+
"text": "boolean"
|
2697
2606
|
},
|
2698
|
-
"description": "
|
2607
|
+
"description": "The button color can be inverted by setting the inverted attribute to true.\n\nOnly applies when variant is set to `primary`, color is set to `default`\nand button is not `active`.",
|
2608
|
+
"default": "false",
|
2609
|
+
"fieldName": "inverted"
|
2699
2610
|
},
|
2700
2611
|
{
|
2701
|
-
"
|
2702
|
-
"
|
2703
|
-
"
|
2704
|
-
"
|
2705
|
-
|
2706
|
-
|
2707
|
-
}
|
2612
|
+
"name": "role",
|
2613
|
+
"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.",
|
2614
|
+
"default": "'button'",
|
2615
|
+
"fieldName": "role",
|
2616
|
+
"type": {
|
2617
|
+
"text": "string"
|
2708
2618
|
},
|
2709
|
-
"
|
2619
|
+
"inheritedFrom": {
|
2620
|
+
"name": "Buttonsimple",
|
2621
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2622
|
+
}
|
2710
2623
|
},
|
2711
2624
|
{
|
2712
|
-
"
|
2713
|
-
"name": "iconName",
|
2625
|
+
"name": "prefix-icon",
|
2714
2626
|
"type": {
|
2715
2627
|
"text": "IconNames | undefined"
|
2716
2628
|
},
|
2717
|
-
"description": "
|
2718
|
-
"
|
2629
|
+
"description": "The name of the icon to display as a prefix.\nThe icon is displayed on the left side of the button.",
|
2630
|
+
"fieldName": "prefixIcon",
|
2719
2631
|
"inheritedFrom": {
|
2720
|
-
"name": "
|
2721
|
-
"module": "utils/mixins/
|
2632
|
+
"name": "ButtonComponentMixin",
|
2633
|
+
"module": "src/utils/mixins/ButtonComponentMixin.ts"
|
2722
2634
|
}
|
2723
|
-
}
|
2724
|
-
],
|
2725
|
-
"attributes": [
|
2635
|
+
},
|
2726
2636
|
{
|
2727
|
-
"name": "
|
2637
|
+
"name": "postfix-icon",
|
2728
2638
|
"type": {
|
2729
|
-
"text": "
|
2639
|
+
"text": "IconNames | undefined"
|
2730
2640
|
},
|
2731
|
-
"description": "
|
2732
|
-
"fieldName": "
|
2641
|
+
"description": "The name of the icon to display as a postfix.\nThe icon is displayed on the right side of the button.",
|
2642
|
+
"fieldName": "postfixIcon",
|
2643
|
+
"inheritedFrom": {
|
2644
|
+
"name": "ButtonComponentMixin",
|
2645
|
+
"module": "src/utils/mixins/ButtonComponentMixin.ts"
|
2646
|
+
}
|
2733
2647
|
},
|
2734
2648
|
{
|
2735
2649
|
"name": "variant",
|
2736
2650
|
"type": {
|
2737
|
-
"text": "
|
2651
|
+
"text": "ButtonVariant"
|
2738
2652
|
},
|
2739
|
-
"description": "
|
2653
|
+
"description": "There are 3 variants of button: primary, secondary, tertiary. They are styled differently.\n- **Primary**: Solid background color.\n- **Secondary**: Transparent background with a solid border.\n- **Tertiary**: No background or border, appears as plain text but retains all button functionalities.",
|
2740
2654
|
"default": "primary",
|
2741
|
-
"fieldName": "variant"
|
2655
|
+
"fieldName": "variant",
|
2656
|
+
"inheritedFrom": {
|
2657
|
+
"name": "ButtonComponentMixin",
|
2658
|
+
"module": "src/utils/mixins/ButtonComponentMixin.ts"
|
2659
|
+
}
|
2742
2660
|
},
|
2743
2661
|
{
|
2744
|
-
"name": "
|
2662
|
+
"name": "color",
|
2745
2663
|
"type": {
|
2746
|
-
"text": "
|
2664
|
+
"text": "ButtonColor"
|
2747
2665
|
},
|
2748
|
-
"description": "
|
2749
|
-
"
|
2666
|
+
"description": "There are 5 colors for button: positive, negative, accent, promotional, default.",
|
2667
|
+
"default": "default",
|
2668
|
+
"fieldName": "color",
|
2669
|
+
"inheritedFrom": {
|
2670
|
+
"name": "ButtonComponentMixin",
|
2671
|
+
"module": "src/utils/mixins/ButtonComponentMixin.ts"
|
2672
|
+
}
|
2750
2673
|
},
|
2751
2674
|
{
|
2752
|
-
"name": "
|
2675
|
+
"name": "tabIndex",
|
2753
2676
|
"type": {
|
2754
2677
|
"text": "number"
|
2755
2678
|
},
|
2756
|
-
"
|
2757
|
-
"
|
2758
|
-
"fieldName": "
|
2679
|
+
"default": "0",
|
2680
|
+
"description": "This property specifies the tab order of the element.",
|
2681
|
+
"fieldName": "tabIndex",
|
2682
|
+
"inheritedFrom": {
|
2683
|
+
"name": "TabIndexMixin",
|
2684
|
+
"module": "src/utils/mixins/TabIndexMixin.ts"
|
2685
|
+
}
|
2759
2686
|
},
|
2760
2687
|
{
|
2761
|
-
"name": "
|
2688
|
+
"name": "disabled",
|
2762
2689
|
"type": {
|
2763
|
-
"text": "boolean"
|
2690
|
+
"text": "boolean | undefined"
|
2764
2691
|
},
|
2765
|
-
"
|
2766
|
-
"
|
2767
|
-
"fieldName": "
|
2692
|
+
"description": "Indicates whether the component is disabled.\nWhen the component is disabled for user interaction; it is not focusable or clickable.",
|
2693
|
+
"default": "undefined",
|
2694
|
+
"fieldName": "disabled",
|
2695
|
+
"inheritedFrom": {
|
2696
|
+
"name": "DisabledMixin",
|
2697
|
+
"module": "src/utils/mixins/DisabledMixin.ts"
|
2698
|
+
}
|
2768
2699
|
},
|
2769
2700
|
{
|
2770
|
-
"name": "
|
2701
|
+
"name": "active",
|
2771
2702
|
"type": {
|
2772
|
-
"text": "
|
2703
|
+
"text": "boolean | undefined"
|
2773
2704
|
},
|
2774
|
-
"
|
2775
|
-
"
|
2776
|
-
"fieldName": "
|
2705
|
+
"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.\n\nThis attribute is used to set the provided `ariaStateKey` to true or false.",
|
2706
|
+
"default": "undefined",
|
2707
|
+
"fieldName": "active",
|
2708
|
+
"inheritedFrom": {
|
2709
|
+
"name": "Buttonsimple",
|
2710
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2711
|
+
}
|
2777
2712
|
},
|
2778
2713
|
{
|
2779
|
-
"name": "
|
2714
|
+
"name": "soft-disabled",
|
2780
2715
|
"type": {
|
2781
|
-
"text": "
|
2716
|
+
"text": "boolean | undefined"
|
2782
2717
|
},
|
2783
|
-
"description": "
|
2784
|
-
"
|
2718
|
+
"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.",
|
2719
|
+
"default": "undefined",
|
2720
|
+
"fieldName": "softDisabled",
|
2785
2721
|
"inheritedFrom": {
|
2786
|
-
"name": "
|
2787
|
-
"module": "src/
|
2722
|
+
"name": "Buttonsimple",
|
2723
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2724
|
+
}
|
2725
|
+
},
|
2726
|
+
{
|
2727
|
+
"name": "ariaStateKey",
|
2728
|
+
"type": {
|
2729
|
+
"text": "string | undefined"
|
2730
|
+
},
|
2731
|
+
"description": "This property defines the ARIA state key, which will be toggled when the\nButton is set to `active`.\nThe default value is 'aria-pressed', which is commonly used for toggle buttons.\n\nConsumers can override this property to use a different ARIA state key if needed.\nIn case multiple aria attributes should be toggled, they can be passed in as\na comma separated string.\nFor example: `aria-pressed,aria-expanded`",
|
2732
|
+
"default": "'aria-pressed' (when)",
|
2733
|
+
"fieldName": "ariaStateKey",
|
2734
|
+
"inheritedFrom": {
|
2735
|
+
"name": "Buttonsimple",
|
2736
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2737
|
+
}
|
2738
|
+
},
|
2739
|
+
{
|
2740
|
+
"name": "type",
|
2741
|
+
"type": {
|
2742
|
+
"text": "ButtonType"
|
2743
|
+
},
|
2744
|
+
"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.",
|
2745
|
+
"default": "button",
|
2746
|
+
"fieldName": "type",
|
2747
|
+
"inheritedFrom": {
|
2748
|
+
"name": "Buttonsimple",
|
2749
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2788
2750
|
}
|
2789
2751
|
}
|
2790
2752
|
],
|
2791
2753
|
"mixins": [
|
2792
2754
|
{
|
2793
|
-
"name": "
|
2794
|
-
"module": "/src/utils/mixins/
|
2755
|
+
"name": "ButtonComponentMixin",
|
2756
|
+
"module": "/src/utils/mixins/ButtonComponentMixin"
|
2795
2757
|
}
|
2796
2758
|
],
|
2797
2759
|
"superclass": {
|
2798
|
-
"name": "
|
2799
|
-
"module": "/src/
|
2760
|
+
"name": "Buttonsimple",
|
2761
|
+
"module": "/src/components/buttonsimple/buttonsimple.component"
|
2800
2762
|
},
|
2801
|
-
"tagName": "mdc-
|
2802
|
-
"jsDoc": "/**\n *
|
2803
|
-
"customElement": true
|
2763
|
+
"tagName": "mdc-button",
|
2764
|
+
"jsDoc": "/**\n * `mdc-button` is a component that can be configured in various ways to suit different use cases.\n *\n * Button Variants:\n * - **Primary**: Solid background color.\n * - **Secondary**: Transparent background with a solid border.\n * - **Tertiary**: No background or border, appears as plain text but retains all button functionalities.\n *\n * Button Colors:\n * - **Positive**: Green color.\n * - **Negative**: Red color.\n * - **Accent**: Blue color.\n * - **Promotional**: Purple color.\n * - **Default**: White color.\n *\n * Button Sizes (in REM units):\n * - **Pill button**: 40, 32, 28, 24.\n * - **Icon button**: 64, 52, 40, 32, 28, 24.\n * - **Tertiary icon button**: 20.\n *\n * Button Types:\n * - **Pill button**: A button that contains text value. Commonly used for call to action, tags, or filters.\n * - **Pill button with icons**: A button containing an icon either on the left or right side of the button.\n * - **Icon button**: A button represented by just an icon without any text.\n * The type of button is inferred based on the presence of slot and/or prefix and postfix icons.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-button\n *\n * @slot - Text label of the button.\n */",
|
2765
|
+
"customElement": true,
|
2766
|
+
"events": [
|
2767
|
+
{
|
2768
|
+
"description": "(React: onClick) This event is dispatched when the button is clicked.",
|
2769
|
+
"name": "click",
|
2770
|
+
"reactName": "onClick",
|
2771
|
+
"inheritedFrom": {
|
2772
|
+
"name": "Buttonsimple",
|
2773
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2774
|
+
}
|
2775
|
+
},
|
2776
|
+
{
|
2777
|
+
"description": "(React: onKeyDown) This event is dispatched when a key is pressed down on the button.",
|
2778
|
+
"name": "keydown",
|
2779
|
+
"reactName": "onKeyDown",
|
2780
|
+
"inheritedFrom": {
|
2781
|
+
"name": "Buttonsimple",
|
2782
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2783
|
+
}
|
2784
|
+
},
|
2785
|
+
{
|
2786
|
+
"description": "(React: onKeyUp) This event is dispatched when a key is released on the button.",
|
2787
|
+
"name": "keyup",
|
2788
|
+
"reactName": "onKeyUp",
|
2789
|
+
"inheritedFrom": {
|
2790
|
+
"name": "Buttonsimple",
|
2791
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2792
|
+
}
|
2793
|
+
},
|
2794
|
+
{
|
2795
|
+
"description": "(React: onFocus) This event is dispatched when the button receives focus.",
|
2796
|
+
"name": "focus",
|
2797
|
+
"reactName": "onFocus",
|
2798
|
+
"inheritedFrom": {
|
2799
|
+
"name": "Buttonsimple",
|
2800
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
2801
|
+
}
|
2802
|
+
}
|
2803
|
+
]
|
2804
2804
|
}
|
2805
2805
|
],
|
2806
2806
|
"exports": [
|
@@ -2808,8 +2808,8 @@
|
|
2808
2808
|
"kind": "js",
|
2809
2809
|
"name": "default",
|
2810
2810
|
"declaration": {
|
2811
|
-
"name": "
|
2812
|
-
"module": "components/
|
2811
|
+
"name": "Button",
|
2812
|
+
"module": "components/button/button.component.js"
|
2813
2813
|
}
|
2814
2814
|
}
|
2815
2815
|
]
|