@govtechsg/sgds-web-component 3.19.0-rc.0 → 3.19.0-rc.1

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.
Files changed (153) hide show
  1. package/base/card.js +1 -1
  2. package/base/option.js +1 -1
  3. package/components/Accordion/accordion-item.js +1 -1
  4. package/components/Accordion/index.umd.min.js +1 -1
  5. package/components/Alert/index.umd.min.js +8 -8
  6. package/components/Alert/index.umd.min.js.map +1 -1
  7. package/components/Badge/index.umd.min.js +9 -9
  8. package/components/Badge/index.umd.min.js.map +1 -1
  9. package/components/Breadcrumb/index.umd.min.js +2 -2
  10. package/components/Card/index.umd.min.js +1 -1
  11. package/components/Checkbox/checkbox-group.js +1 -1
  12. package/components/Checkbox/checkbox.js +1 -1
  13. package/components/Checkbox/index.umd.min.js +2238 -32
  14. package/components/Checkbox/index.umd.min.js.map +1 -1
  15. package/components/Checkbox/sgds-checkbox-group.d.ts +5 -0
  16. package/components/Checkbox/sgds-checkbox-group.js +6 -6
  17. package/components/Checkbox/sgds-checkbox-group.js.map +1 -1
  18. package/components/Checkbox/sgds-checkbox.d.ts +5 -0
  19. package/components/Checkbox/sgds-checkbox.js +6 -6
  20. package/components/Checkbox/sgds-checkbox.js.map +1 -1
  21. package/components/CloseButton/close-button.js +1 -1
  22. package/components/CloseButton/index.umd.min.js +6 -6
  23. package/components/CloseButton/index.umd.min.js.map +1 -1
  24. package/components/CloseButton/sgds-close-button.js +1 -1
  25. package/components/CloseButton/sgds-close-button.js.map +1 -1
  26. package/components/ComboBox/index.umd.min.js +7 -12
  27. package/components/ComboBox/index.umd.min.js.map +1 -1
  28. package/components/Datepicker/datepicker-calendar2.js +1 -1
  29. package/components/Datepicker/index.umd.min.js +2 -2
  30. package/components/Datepicker/index.umd.min.js.map +1 -1
  31. package/components/Drawer/index.umd.min.js +8 -8
  32. package/components/Drawer/index.umd.min.js.map +1 -1
  33. package/components/Dropdown/dropdown-item.js +1 -1
  34. package/components/Dropdown/index.umd.min.js +1 -1
  35. package/components/FileUpload/index.umd.min.js +8 -8
  36. package/components/FileUpload/index.umd.min.js.map +1 -1
  37. package/components/Footer/index.umd.min.js +1 -1
  38. package/components/IconCard/index.umd.min.js +1 -1
  39. package/components/ImageCard/index.umd.min.js +1 -1
  40. package/components/Input/index.umd.min.js +1 -1
  41. package/components/Input/index.umd.min.js.map +1 -1
  42. package/components/Link/index.umd.min.js +1 -1
  43. package/components/Link/link.js +1 -1
  44. package/components/Mainnav/index.umd.min.js +3 -3
  45. package/components/Mainnav/mainnav-dropdown.js +1 -1
  46. package/components/Mainnav/mainnav-item.js +1 -1
  47. package/components/Modal/index.umd.min.js +9 -9
  48. package/components/Modal/index.umd.min.js.map +1 -1
  49. package/components/OverflowMenu/index.umd.min.js +1 -1
  50. package/components/Pagination/index.umd.min.js +1 -1
  51. package/components/Pagination/pagination.js +1 -1
  52. package/components/QuantityToggle/index.umd.min.js +2 -2
  53. package/components/QuantityToggle/index.umd.min.js.map +1 -1
  54. package/components/Radio/index.umd.min.js +2 -2
  55. package/components/Radio/index.umd.min.js.map +1 -1
  56. package/components/Radio/radio-group.js +1 -1
  57. package/components/Select/index.umd.min.js +2 -2
  58. package/components/Select/index.umd.min.js.map +1 -1
  59. package/components/Sidenav/index.umd.min.js +2 -2
  60. package/components/Sidenav/sidenav-item.js +1 -1
  61. package/components/Sidenav/sidenav-link.js +1 -1
  62. package/components/Subnav/index.umd.min.js +1 -1
  63. package/components/Subnav/subnav-item.js +1 -1
  64. package/components/Switch/index.umd.min.js +1 -1
  65. package/components/Switch/switch.js +1 -1
  66. package/components/SystemBanner/index.umd.min.js +2 -2
  67. package/components/SystemBanner/index.umd.min.js.map +1 -1
  68. package/components/Tab/index.umd.min.js +1 -1
  69. package/components/Tab/tab.js +1 -1
  70. package/components/Table/index.umd.min.js +1 -1
  71. package/components/Table/index.umd.min.js.map +1 -1
  72. package/components/Table/table.js +1 -1
  73. package/components/Textarea/index.umd.min.js +10 -10
  74. package/components/Textarea/index.umd.min.js.map +1 -1
  75. package/components/Textarea/textarea.js +1 -1
  76. package/components/ThumbnailCard/index.umd.min.js +1 -1
  77. package/components/Toast/index.umd.min.js +5 -5
  78. package/components/Toast/index.umd.min.js.map +1 -1
  79. package/components/index.umd.min.js +58 -68
  80. package/components/index.umd.min.js.map +1 -1
  81. package/css/fouc.css +2 -2
  82. package/custom-elements.json +908 -908
  83. package/index.umd.min.js +25 -35
  84. package/index.umd.min.js.map +1 -1
  85. package/package.json +1 -1
  86. package/react/base/card.cjs.js +1 -1
  87. package/react/base/card.js +1 -1
  88. package/react/base/option.cjs.js +1 -1
  89. package/react/base/option.js +1 -1
  90. package/react/components/Accordion/accordion-item.cjs.js +1 -1
  91. package/react/components/Accordion/accordion-item.js +1 -1
  92. package/react/components/Checkbox/checkbox-group.cjs.js +1 -1
  93. package/react/components/Checkbox/checkbox-group.js +1 -1
  94. package/react/components/Checkbox/checkbox.cjs.js +1 -1
  95. package/react/components/Checkbox/checkbox.js +1 -1
  96. package/react/components/Checkbox/sgds-checkbox-group.cjs.js +6 -6
  97. package/react/components/Checkbox/sgds-checkbox-group.cjs.js.map +1 -1
  98. package/react/components/Checkbox/sgds-checkbox-group.js +6 -6
  99. package/react/components/Checkbox/sgds-checkbox-group.js.map +1 -1
  100. package/react/components/Checkbox/sgds-checkbox.cjs.js +6 -6
  101. package/react/components/Checkbox/sgds-checkbox.cjs.js.map +1 -1
  102. package/react/components/Checkbox/sgds-checkbox.js +6 -6
  103. package/react/components/Checkbox/sgds-checkbox.js.map +1 -1
  104. package/react/components/CloseButton/close-button.cjs.js +1 -1
  105. package/react/components/CloseButton/close-button.js +1 -1
  106. package/react/components/CloseButton/sgds-close-button.cjs.js +1 -1
  107. package/react/components/CloseButton/sgds-close-button.cjs.js.map +1 -1
  108. package/react/components/CloseButton/sgds-close-button.js +1 -1
  109. package/react/components/CloseButton/sgds-close-button.js.map +1 -1
  110. package/react/components/Datepicker/datepicker-calendar.cjs2.js +1 -1
  111. package/react/components/Datepicker/datepicker-calendar2.js +1 -1
  112. package/react/components/Dropdown/dropdown-item.cjs.js +1 -1
  113. package/react/components/Dropdown/dropdown-item.js +1 -1
  114. package/react/components/Link/link.cjs.js +1 -1
  115. package/react/components/Link/link.js +1 -1
  116. package/react/components/Mainnav/mainnav-dropdown.cjs.js +1 -1
  117. package/react/components/Mainnav/mainnav-dropdown.js +1 -1
  118. package/react/components/Mainnav/mainnav-item.cjs.js +1 -1
  119. package/react/components/Mainnav/mainnav-item.js +1 -1
  120. package/react/components/Pagination/pagination.cjs.js +1 -1
  121. package/react/components/Pagination/pagination.js +1 -1
  122. package/react/components/Radio/radio-group.cjs.js +1 -1
  123. package/react/components/Radio/radio-group.js +1 -1
  124. package/react/components/Sidenav/sidenav-item.cjs.js +1 -1
  125. package/react/components/Sidenav/sidenav-item.js +1 -1
  126. package/react/components/Sidenav/sidenav-link.cjs.js +1 -1
  127. package/react/components/Sidenav/sidenav-link.js +1 -1
  128. package/react/components/Subnav/subnav-item.cjs.js +1 -1
  129. package/react/components/Subnav/subnav-item.js +1 -1
  130. package/react/components/Switch/switch.cjs.js +1 -1
  131. package/react/components/Switch/switch.js +1 -1
  132. package/react/components/Tab/tab.cjs.js +1 -1
  133. package/react/components/Tab/tab.js +1 -1
  134. package/react/components/Table/table.cjs.js +1 -1
  135. package/react/components/Table/table.js +1 -1
  136. package/react/components/Textarea/textarea.cjs.js +1 -1
  137. package/react/components/Textarea/textarea.js +1 -1
  138. package/react/index.cjs.js +6 -6
  139. package/react/index.d.ts +2 -2
  140. package/react/index.js +2 -2
  141. package/react/styles/form-check.cjs.js +1 -1
  142. package/react/styles/form-check.js +1 -1
  143. package/react/styles/form-hint.cjs.js +1 -1
  144. package/react/styles/form-hint.js +1 -1
  145. package/react/styles/form-label.cjs.js +1 -1
  146. package/react/styles/form-label.js +1 -1
  147. package/react/styles/form-text-control.cjs.js +1 -1
  148. package/react/styles/form-text-control.js +1 -1
  149. package/styles/form-check.js +1 -1
  150. package/styles/form-hint.js +1 -1
  151. package/styles/form-label.js +1 -1
  152. package/styles/form-text-control.js +1 -1
  153. package/types/react.d.ts +40 -40
@@ -919,65 +919,86 @@
919
919
  },
920
920
  {
921
921
  "kind": "javascript-module",
922
- "path": "src/components/Badge/sgds-badge.ts",
922
+ "path": "src/components/Button/sgds-button.ts",
923
923
  "declarations": [
924
924
  {
925
925
  "kind": "class",
926
926
  "description": "",
927
- "name": "SgdsBadge",
927
+ "name": "SgdsButton",
928
928
  "slots": [
929
929
  {
930
- "description": "slot for badge",
930
+ "description": "The button's label.",
931
931
  "name": "default"
932
932
  },
933
933
  {
934
- "description": "The slot for icon to the left of the badge text",
935
- "name": "icon"
934
+ "description": "The slot for icon to the left of the button text",
935
+ "name": "leftIcon"
936
+ },
937
+ {
938
+ "description": "The slot for icon to the right of the button text",
939
+ "name": "rightIcon"
936
940
  }
937
941
  ],
938
942
  "members": [
939
943
  {
940
944
  "kind": "field",
941
- "name": "show",
945
+ "name": "type",
942
946
  "type": {
943
- "text": "boolean"
947
+ "text": "\"button\" | \"submit\" | \"reset\""
944
948
  },
945
- "default": "false",
946
- "description": "Controls the appearance of the dismissible badge. This prop only applies when dismissible is true",
947
- "attribute": "show",
949
+ "default": "\"button\"",
950
+ "description": "The behavior of the button with default as `type='button', `reset` resets all the controls to their initial values and `submit` submits the form data to the server",
951
+ "attribute": "type",
948
952
  "reflects": true
949
953
  },
950
954
  {
951
955
  "kind": "field",
952
- "name": "variant",
956
+ "name": "form",
953
957
  "type": {
954
- "text": "\"primary\" | \"accent\" | \"success\" | \"danger\" | \"warning\" | \"cyan\" | \"purple\" | \"neutral\" | \"white\" | \"info\""
958
+ "text": "string"
955
959
  },
956
- "default": "\"primary\"",
957
- "description": "One or more badge variant combinations.\nVariants include: `primary`, `accent`, `success`, `danger`, `warning`, `cyan`, `purple`, `neutral`, `white`, `info`.\n\n(@deprecated) The `info` variant is deprecated. Use `primary` instead.",
958
- "attribute": "variant",
960
+ "description": "The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\nvalue of this attribute must be an id of a form in the same document or shadow root as the button.",
961
+ "attribute": "form",
959
962
  "reflects": true
960
963
  },
961
964
  {
962
965
  "kind": "field",
963
- "name": "outlined",
966
+ "name": "formAction",
964
967
  "type": {
965
- "text": "boolean"
968
+ "text": "string"
966
969
  },
967
- "default": "false",
968
- "description": "Manually set the outlined state to false",
969
- "attribute": "outlined",
970
+ "description": "Used to override the form owner's `action` attribute.",
971
+ "attribute": "formaction",
970
972
  "reflects": true
971
973
  },
972
974
  {
973
975
  "kind": "field",
974
- "name": "dismissible",
976
+ "name": "formMethod",
977
+ "type": {
978
+ "text": "\"post\" | \"get\""
979
+ },
980
+ "description": "Used to override the form owner's `method` attribute.",
981
+ "attribute": "formmethod",
982
+ "reflects": true
983
+ },
984
+ {
985
+ "kind": "field",
986
+ "name": "formNoValidate",
975
987
  "type": {
976
988
  "text": "boolean"
977
989
  },
978
- "default": "false",
979
- "description": "Manually set the dismissible state of the button to `false`",
980
- "attribute": "dismissible",
990
+ "description": "Used to override the form owner's `novalidate` attribute.",
991
+ "attribute": "formnovalidate",
992
+ "reflects": true
993
+ },
994
+ {
995
+ "kind": "field",
996
+ "name": "formTarget",
997
+ "type": {
998
+ "text": "| \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | string"
999
+ },
1000
+ "description": "Used to override the form owner's `target` attribute.",
1001
+ "attribute": "formtarget",
981
1002
  "reflects": true
982
1003
  },
983
1004
  {
@@ -987,187 +1008,611 @@
987
1008
  "text": "boolean"
988
1009
  },
989
1010
  "default": "false",
990
- "description": "Manually enable full width",
1011
+ "description": "When set, the button will be in full width.",
991
1012
  "attribute": "fullWidth",
992
1013
  "reflects": true
993
1014
  },
994
1015
  {
995
1016
  "kind": "field",
996
- "name": "truncated",
1017
+ "name": "hasLeftIconSlot",
997
1018
  "type": {
998
1019
  "text": "boolean"
999
1020
  },
1000
- "privacy": "private",
1001
- "default": "false"
1021
+ "default": "false",
1022
+ "description": "Used only for SSR to indicate the presence of the `leftIcon` slot.",
1023
+ "attribute": "hasLeftIconSlot"
1002
1024
  },
1003
1025
  {
1004
1026
  "kind": "field",
1005
- "name": "text",
1027
+ "name": "hasRightIconSlot",
1006
1028
  "type": {
1007
- "text": "string"
1029
+ "text": "boolean"
1008
1030
  },
1009
- "privacy": "private",
1010
- "default": "\"\""
1011
- },
1012
- {
1013
- "kind": "method",
1014
- "name": "close",
1015
- "privacy": "public",
1016
- "description": "Closes the badge",
1017
- "type": {}
1018
- },
1019
- {
1020
- "kind": "method",
1021
- "name": "_handleLabelSlotChange",
1022
- "privacy": "private",
1023
- "parameters": [
1024
- {
1025
- "name": "e",
1026
- "type": {
1027
- "text": "Event"
1028
- }
1029
- }
1030
- ],
1031
- "type": {}
1031
+ "default": "false",
1032
+ "description": "Used only for SSR to indicate the presence of the `rightIcon` slot.",
1033
+ "attribute": "hasRightIconSlot"
1032
1034
  },
1033
1035
  {
1034
- "kind": "method",
1035
- "name": "_renderBadge",
1036
+ "kind": "field",
1037
+ "name": "hasSlotController",
1036
1038
  "privacy": "private",
1039
+ "default": "new HasSlotController(this, \"leftIcon\", \"rightIcon\")",
1037
1040
  "type": {}
1038
1041
  },
1039
1042
  {
1040
1043
  "kind": "method",
1041
- "name": "emit",
1042
- "parameters": [
1043
- {
1044
- "name": "name",
1045
- "type": {
1046
- "text": "string"
1047
- }
1048
- },
1049
- {
1050
- "name": "options",
1051
- "optional": true,
1052
- "type": {
1053
- "text": "CustomEventInit<T>"
1054
- }
1055
- }
1056
- ],
1057
- "description": "Emits a custom event with more convenient defaults.",
1058
- "type": {},
1059
- "inheritedFrom": {
1060
- "name": "SgdsElement",
1061
- "module": "src/base/sgds-element.ts"
1062
- }
1063
- },
1064
- {
1065
- "kind": "method",
1066
- "name": "define",
1067
- "static": true,
1044
+ "name": "_handleClick",
1045
+ "privacy": "protected",
1068
1046
  "parameters": [
1069
1047
  {
1070
- "name": "name",
1071
- "type": {
1072
- "text": "string"
1073
- }
1074
- },
1075
- {
1076
- "name": "elementConstructor",
1077
- "default": "this"
1078
- },
1079
- {
1080
- "name": "options",
1081
- "default": "{}",
1048
+ "name": "event",
1082
1049
  "type": {
1083
- "text": "ElementDefinitionOptions"
1050
+ "text": "MouseEvent"
1084
1051
  }
1085
1052
  }
1086
1053
  ],
1087
1054
  "type": {},
1088
1055
  "inheritedFrom": {
1089
- "name": "SgdsElement",
1090
- "module": "src/base/sgds-element.ts"
1056
+ "name": "ButtonElement",
1057
+ "module": "src/base/button-element.ts"
1091
1058
  }
1092
- }
1093
- ],
1094
- "events": [
1095
- {
1096
- "description": "Emitted when the badge appears.",
1097
- "name": "sgds-show",
1098
- "reactName": "onSgdsShow"
1099
1059
  },
1100
1060
  {
1101
- "description": "Emitted when the badge is starting to close but has not closed.",
1102
- "name": "sgds-hide",
1103
- "reactName": "onSgdsHide"
1104
- },
1105
- {
1106
- "description": "Emitted after the badge has appeared",
1107
- "name": "sgds-after-show",
1108
- "reactName": "onSgdsAfterShow"
1061
+ "kind": "field",
1062
+ "name": "_clickHandler",
1063
+ "privacy": "private",
1064
+ "type": {}
1109
1065
  },
1110
1066
  {
1111
- "description": "Emitted after the badge has closed",
1112
- "name": "sgds-after-hide",
1113
- "reactName": "onSgdsAfterHide"
1114
- }
1115
- ],
1116
- "attributes": [
1117
- {
1118
- "name": "show",
1067
+ "kind": "field",
1068
+ "name": "variant",
1119
1069
  "type": {
1120
- "text": "boolean"
1070
+ "text": "\"primary\" | \"outline\" | \"ghost\" | \"danger\""
1121
1071
  },
1122
- "default": "false",
1123
- "description": "Controls the appearance of the dismissible badge. This prop only applies when dismissible is true",
1124
- "fieldName": "show"
1072
+ "default": "\"primary\"",
1073
+ "description": "Sets the visual variants such as: `primary`, `outline`, `ghost`. `danger` is @deprecated since v3.5.6",
1074
+ "attribute": "variant",
1075
+ "reflects": true,
1076
+ "inheritedFrom": {
1077
+ "name": "ButtonElement",
1078
+ "module": "src/base/button-element.ts"
1079
+ }
1125
1080
  },
1126
1081
  {
1127
- "name": "variant",
1082
+ "kind": "field",
1083
+ "name": "tone",
1128
1084
  "type": {
1129
- "text": "BadgeVariant"
1085
+ "text": "\"brand\" | \"danger\" | \"fixed-light\" | \"neutral\""
1130
1086
  },
1131
- "default": "\"primary\"",
1132
- "description": "One or more badge variant combinations.\nVariants include: `primary`, `accent`, `success`, `danger`, `warning`, `cyan`, `purple`, `neutral`, `white`, `info`.\n\n(@deprecated) The `info` variant is deprecated. Use `primary` instead.",
1133
- "fieldName": "variant"
1087
+ "default": "\"brand\"",
1088
+ "description": "Sets the visual colour of the button: `brand`, `danger`, `fixed-light`, `neutral`",
1089
+ "attribute": "tone",
1090
+ "reflects": true,
1091
+ "inheritedFrom": {
1092
+ "name": "ButtonElement",
1093
+ "module": "src/base/button-element.ts"
1094
+ }
1134
1095
  },
1135
1096
  {
1136
- "name": "outlined",
1097
+ "kind": "field",
1098
+ "name": "size",
1137
1099
  "type": {
1138
- "text": "boolean"
1100
+ "text": "\"xs\" | \"sm\" | \"md\" | \"lg\""
1139
1101
  },
1140
- "default": "false",
1141
- "description": "Manually set the outlined state to false",
1142
- "fieldName": "outlined"
1102
+ "default": "\"md\"",
1103
+ "description": "Specifies a small, medium or large button, the size is medium by default.",
1104
+ "attribute": "size",
1105
+ "reflects": true,
1106
+ "inheritedFrom": {
1107
+ "name": "ButtonElement",
1108
+ "module": "src/base/button-element.ts"
1109
+ }
1143
1110
  },
1144
1111
  {
1145
- "name": "dismissible",
1112
+ "kind": "field",
1113
+ "name": "active",
1146
1114
  "type": {
1147
1115
  "text": "boolean"
1148
1116
  },
1149
1117
  "default": "false",
1150
- "description": "Manually set the dismissible state of the button to `false`",
1151
- "fieldName": "dismissible"
1118
+ "description": "Manually set the visual state of the button to `:active`",
1119
+ "attribute": "active",
1120
+ "reflects": true,
1121
+ "inheritedFrom": {
1122
+ "name": "ButtonElement",
1123
+ "module": "src/base/button-element.ts"
1124
+ }
1152
1125
  },
1153
1126
  {
1154
- "name": "fullWidth",
1127
+ "kind": "field",
1128
+ "name": "disabled",
1155
1129
  "type": {
1156
1130
  "text": "boolean"
1157
1131
  },
1158
1132
  "default": "false",
1159
- "description": "Manually enable full width",
1160
- "fieldName": "fullWidth"
1161
- }
1162
- ],
1163
- "superclass": {
1164
- "name": "SgdsElement",
1165
- "module": "/src/base/sgds-element"
1133
+ "description": "The disabled state of the button",
1134
+ "attribute": "disabled",
1135
+ "reflects": true,
1136
+ "inheritedFrom": {
1137
+ "name": "ButtonElement",
1138
+ "module": "src/base/button-element.ts"
1139
+ }
1140
+ },
1141
+ {
1142
+ "kind": "field",
1143
+ "name": "href",
1144
+ "type": {
1145
+ "text": "string"
1146
+ },
1147
+ "description": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.",
1148
+ "attribute": "href",
1149
+ "reflects": true,
1150
+ "inheritedFrom": {
1151
+ "name": "ButtonElement",
1152
+ "module": "src/base/button-element.ts"
1153
+ }
1154
+ },
1155
+ {
1156
+ "kind": "field",
1157
+ "name": "target",
1158
+ "type": {
1159
+ "text": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\""
1160
+ },
1161
+ "default": "\"_self\"",
1162
+ "description": "Where to display the linked URL, as the name for a browsing context. Forwards to the HTMLAnchor target attribute",
1163
+ "attribute": "target",
1164
+ "reflects": true,
1165
+ "inheritedFrom": {
1166
+ "name": "ButtonElement",
1167
+ "module": "src/base/button-element.ts"
1168
+ }
1169
+ },
1170
+ {
1171
+ "kind": "field",
1172
+ "name": "download",
1173
+ "type": {
1174
+ "text": "string"
1175
+ },
1176
+ "description": "Tells the browser to download the linked file as this filename. Only used when `href` is set.",
1177
+ "attribute": "download",
1178
+ "reflects": true,
1179
+ "inheritedFrom": {
1180
+ "name": "ButtonElement",
1181
+ "module": "src/base/button-element.ts"
1182
+ }
1183
+ },
1184
+ {
1185
+ "kind": "field",
1186
+ "name": "ariaLabel",
1187
+ "type": {
1188
+ "text": "string"
1189
+ },
1190
+ "description": "The aria-label attribute to passed to button element when necessary",
1191
+ "attribute": "ariaLabel",
1192
+ "inheritedFrom": {
1193
+ "name": "ButtonElement",
1194
+ "module": "src/base/button-element.ts"
1195
+ }
1196
+ },
1197
+ {
1198
+ "kind": "field",
1199
+ "name": "loading",
1200
+ "type": {
1201
+ "text": "boolean"
1202
+ },
1203
+ "description": "When true, shows a loading spinner",
1204
+ "attribute": "loading",
1205
+ "inheritedFrom": {
1206
+ "name": "ButtonElement",
1207
+ "module": "src/base/button-element.ts"
1208
+ }
1209
+ },
1210
+ {
1211
+ "kind": "method",
1212
+ "name": "focus",
1213
+ "privacy": "public",
1214
+ "parameters": [
1215
+ {
1216
+ "name": "options",
1217
+ "optional": true,
1218
+ "type": {
1219
+ "text": "FocusOptions"
1220
+ }
1221
+ }
1222
+ ],
1223
+ "description": "Sets focus on the button.",
1224
+ "type": {},
1225
+ "inheritedFrom": {
1226
+ "name": "ButtonElement",
1227
+ "module": "src/base/button-element.ts"
1228
+ }
1229
+ },
1230
+ {
1231
+ "kind": "method",
1232
+ "name": "click",
1233
+ "privacy": "public",
1234
+ "description": "Simulates a click on the button.",
1235
+ "type": {},
1236
+ "inheritedFrom": {
1237
+ "name": "ButtonElement",
1238
+ "module": "src/base/button-element.ts"
1239
+ }
1240
+ },
1241
+ {
1242
+ "kind": "method",
1243
+ "name": "blur",
1244
+ "privacy": "public",
1245
+ "description": "Removes focus from the button.",
1246
+ "type": {},
1247
+ "inheritedFrom": {
1248
+ "name": "ButtonElement",
1249
+ "module": "src/base/button-element.ts"
1250
+ }
1251
+ },
1252
+ {
1253
+ "kind": "method",
1254
+ "name": "_handleBlur",
1255
+ "privacy": "protected",
1256
+ "type": {},
1257
+ "inheritedFrom": {
1258
+ "name": "ButtonElement",
1259
+ "module": "src/base/button-element.ts"
1260
+ }
1261
+ },
1262
+ {
1263
+ "kind": "method",
1264
+ "name": "_handleFocus",
1265
+ "privacy": "protected",
1266
+ "type": {},
1267
+ "inheritedFrom": {
1268
+ "name": "ButtonElement",
1269
+ "module": "src/base/button-element.ts"
1270
+ }
1271
+ },
1272
+ {
1273
+ "kind": "method",
1274
+ "name": "_handleKeydown",
1275
+ "privacy": "protected",
1276
+ "parameters": [
1277
+ {
1278
+ "name": "event",
1279
+ "type": {
1280
+ "text": "KeyboardEvent"
1281
+ }
1282
+ }
1283
+ ],
1284
+ "type": {},
1285
+ "inheritedFrom": {
1286
+ "name": "ButtonElement",
1287
+ "module": "src/base/button-element.ts"
1288
+ }
1289
+ },
1290
+ {
1291
+ "kind": "method",
1292
+ "name": "_assignSpinnerSize",
1293
+ "privacy": "protected",
1294
+ "parameters": [
1295
+ {
1296
+ "name": "buttonSize",
1297
+ "type": {
1298
+ "text": "\"xs\" | \"sm\" | \"md\" | \"lg\""
1299
+ }
1300
+ }
1301
+ ],
1302
+ "type": {},
1303
+ "inheritedFrom": {
1304
+ "name": "ButtonElement",
1305
+ "module": "src/base/button-element.ts"
1306
+ }
1307
+ },
1308
+ {
1309
+ "kind": "method",
1310
+ "name": "_assignSpinnerTone",
1311
+ "privacy": "protected",
1312
+ "return": {
1313
+ "type": {
1314
+ "text": "SpinnerTone"
1315
+ }
1316
+ },
1317
+ "parameters": [
1318
+ {
1319
+ "name": "buttonTone",
1320
+ "type": {
1321
+ "text": "ButtonTone"
1322
+ }
1323
+ },
1324
+ {
1325
+ "name": "buttonVariant",
1326
+ "type": {
1327
+ "text": "ButtonVariant"
1328
+ }
1329
+ }
1330
+ ],
1331
+ "type": {},
1332
+ "inheritedFrom": {
1333
+ "name": "ButtonElement",
1334
+ "module": "src/base/button-element.ts"
1335
+ }
1336
+ },
1337
+ {
1338
+ "kind": "method",
1339
+ "name": "emit",
1340
+ "parameters": [
1341
+ {
1342
+ "name": "name",
1343
+ "type": {
1344
+ "text": "string"
1345
+ }
1346
+ },
1347
+ {
1348
+ "name": "options",
1349
+ "optional": true,
1350
+ "type": {
1351
+ "text": "CustomEventInit<T>"
1352
+ }
1353
+ }
1354
+ ],
1355
+ "description": "Emits a custom event with more convenient defaults.",
1356
+ "type": {},
1357
+ "inheritedFrom": {
1358
+ "name": "SgdsElement",
1359
+ "module": "src/base/sgds-element.ts"
1360
+ }
1361
+ },
1362
+ {
1363
+ "kind": "method",
1364
+ "name": "define",
1365
+ "static": true,
1366
+ "parameters": [
1367
+ {
1368
+ "name": "name",
1369
+ "type": {
1370
+ "text": "string"
1371
+ }
1372
+ },
1373
+ {
1374
+ "name": "elementConstructor",
1375
+ "default": "this"
1376
+ },
1377
+ {
1378
+ "name": "options",
1379
+ "default": "{}",
1380
+ "type": {
1381
+ "text": "ElementDefinitionOptions"
1382
+ }
1383
+ }
1384
+ ],
1385
+ "type": {},
1386
+ "inheritedFrom": {
1387
+ "name": "SgdsElement",
1388
+ "module": "src/base/sgds-element.ts"
1389
+ }
1390
+ }
1391
+ ],
1392
+ "events": [
1393
+ {
1394
+ "description": "Emitted when the button is blurred.",
1395
+ "name": "sgds-blur",
1396
+ "reactName": "onSgdsBlur"
1397
+ },
1398
+ {
1399
+ "description": "Emitted when the button is focused.",
1400
+ "name": "sgds-focus",
1401
+ "reactName": "onSgdsFocus"
1402
+ }
1403
+ ],
1404
+ "attributes": [
1405
+ {
1406
+ "name": "type",
1407
+ "type": {
1408
+ "text": "\"button\" | \"submit\" | \"reset\""
1409
+ },
1410
+ "default": "\"button\"",
1411
+ "description": "The behavior of the button with default as `type='button', `reset` resets all the controls to their initial values and `submit` submits the form data to the server",
1412
+ "fieldName": "type"
1413
+ },
1414
+ {
1415
+ "name": "form",
1416
+ "type": {
1417
+ "text": "string"
1418
+ },
1419
+ "description": "The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\nvalue of this attribute must be an id of a form in the same document or shadow root as the button.",
1420
+ "fieldName": "form"
1421
+ },
1422
+ {
1423
+ "name": "formaction",
1424
+ "type": {
1425
+ "text": "string"
1426
+ },
1427
+ "description": "Used to override the form owner's `action` attribute.",
1428
+ "fieldName": "formAction"
1429
+ },
1430
+ {
1431
+ "name": "formmethod",
1432
+ "type": {
1433
+ "text": "\"post\" | \"get\""
1434
+ },
1435
+ "description": "Used to override the form owner's `method` attribute.",
1436
+ "fieldName": "formMethod"
1437
+ },
1438
+ {
1439
+ "name": "formnovalidate",
1440
+ "type": {
1441
+ "text": "boolean"
1442
+ },
1443
+ "description": "Used to override the form owner's `novalidate` attribute.",
1444
+ "fieldName": "formNoValidate"
1445
+ },
1446
+ {
1447
+ "name": "formtarget",
1448
+ "type": {
1449
+ "text": "| \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | string"
1450
+ },
1451
+ "description": "Used to override the form owner's `target` attribute.",
1452
+ "fieldName": "formTarget"
1453
+ },
1454
+ {
1455
+ "name": "fullWidth",
1456
+ "type": {
1457
+ "text": "boolean"
1458
+ },
1459
+ "default": "false",
1460
+ "description": "When set, the button will be in full width.",
1461
+ "fieldName": "fullWidth"
1462
+ },
1463
+ {
1464
+ "name": "hasLeftIconSlot",
1465
+ "type": {
1466
+ "text": "boolean"
1467
+ },
1468
+ "default": "false",
1469
+ "description": "Used only for SSR to indicate the presence of the `leftIcon` slot.",
1470
+ "fieldName": "hasLeftIconSlot"
1471
+ },
1472
+ {
1473
+ "name": "hasRightIconSlot",
1474
+ "type": {
1475
+ "text": "boolean"
1476
+ },
1477
+ "default": "false",
1478
+ "description": "Used only for SSR to indicate the presence of the `rightIcon` slot.",
1479
+ "fieldName": "hasRightIconSlot"
1480
+ },
1481
+ {
1482
+ "name": "variant",
1483
+ "type": {
1484
+ "text": "ButtonVariant"
1485
+ },
1486
+ "default": "\"primary\"",
1487
+ "description": "Sets the visual variants such as: `primary`, `outline`, `ghost`. `danger` is @deprecated since v3.5.6",
1488
+ "fieldName": "variant",
1489
+ "inheritedFrom": {
1490
+ "name": "ButtonElement",
1491
+ "module": "src/base/button-element.ts"
1492
+ }
1493
+ },
1494
+ {
1495
+ "name": "tone",
1496
+ "type": {
1497
+ "text": "ButtonTone"
1498
+ },
1499
+ "default": "\"brand\"",
1500
+ "description": "Sets the visual colour of the button: `brand`, `danger`, `fixed-light`, `neutral`",
1501
+ "fieldName": "tone",
1502
+ "inheritedFrom": {
1503
+ "name": "ButtonElement",
1504
+ "module": "src/base/button-element.ts"
1505
+ }
1506
+ },
1507
+ {
1508
+ "name": "size",
1509
+ "type": {
1510
+ "text": "\"xs\" | \"sm\" | \"md\" | \"lg\""
1511
+ },
1512
+ "default": "\"md\"",
1513
+ "description": "Specifies a small, medium or large button, the size is medium by default.",
1514
+ "fieldName": "size",
1515
+ "inheritedFrom": {
1516
+ "name": "ButtonElement",
1517
+ "module": "src/base/button-element.ts"
1518
+ }
1519
+ },
1520
+ {
1521
+ "name": "active",
1522
+ "type": {
1523
+ "text": "boolean"
1524
+ },
1525
+ "default": "false",
1526
+ "description": "Manually set the visual state of the button to `:active`",
1527
+ "fieldName": "active",
1528
+ "inheritedFrom": {
1529
+ "name": "ButtonElement",
1530
+ "module": "src/base/button-element.ts"
1531
+ }
1532
+ },
1533
+ {
1534
+ "name": "disabled",
1535
+ "type": {
1536
+ "text": "boolean"
1537
+ },
1538
+ "default": "false",
1539
+ "description": "The disabled state of the button",
1540
+ "fieldName": "disabled",
1541
+ "inheritedFrom": {
1542
+ "name": "ButtonElement",
1543
+ "module": "src/base/button-element.ts"
1544
+ }
1545
+ },
1546
+ {
1547
+ "name": "href",
1548
+ "type": {
1549
+ "text": "string"
1550
+ },
1551
+ "description": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.",
1552
+ "fieldName": "href",
1553
+ "inheritedFrom": {
1554
+ "name": "ButtonElement",
1555
+ "module": "src/base/button-element.ts"
1556
+ }
1557
+ },
1558
+ {
1559
+ "name": "target",
1560
+ "type": {
1561
+ "text": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\""
1562
+ },
1563
+ "default": "\"_self\"",
1564
+ "description": "Where to display the linked URL, as the name for a browsing context. Forwards to the HTMLAnchor target attribute",
1565
+ "fieldName": "target",
1566
+ "inheritedFrom": {
1567
+ "name": "ButtonElement",
1568
+ "module": "src/base/button-element.ts"
1569
+ }
1570
+ },
1571
+ {
1572
+ "name": "download",
1573
+ "type": {
1574
+ "text": "string"
1575
+ },
1576
+ "description": "Tells the browser to download the linked file as this filename. Only used when `href` is set.",
1577
+ "fieldName": "download",
1578
+ "inheritedFrom": {
1579
+ "name": "ButtonElement",
1580
+ "module": "src/base/button-element.ts"
1581
+ }
1582
+ },
1583
+ {
1584
+ "name": "ariaLabel",
1585
+ "type": {
1586
+ "text": "string"
1587
+ },
1588
+ "description": "The aria-label attribute to passed to button element when necessary",
1589
+ "fieldName": "ariaLabel",
1590
+ "inheritedFrom": {
1591
+ "name": "ButtonElement",
1592
+ "module": "src/base/button-element.ts"
1593
+ }
1594
+ },
1595
+ {
1596
+ "name": "loading",
1597
+ "type": {
1598
+ "text": "boolean"
1599
+ },
1600
+ "description": "When true, shows a loading spinner",
1601
+ "fieldName": "loading",
1602
+ "inheritedFrom": {
1603
+ "name": "ButtonElement",
1604
+ "module": "src/base/button-element.ts"
1605
+ }
1606
+ }
1607
+ ],
1608
+ "superclass": {
1609
+ "name": "ButtonElement",
1610
+ "module": "/src/base/button-element"
1166
1611
  },
1167
- "summary": "Badges can be used to highlight important bits of information such as labels, notifications & status.\nWhen the text exceeds the width, it will be truncated with a tooltip that will be displayed on hover.",
1168
- "tagName": "sgds-badge",
1612
+ "summary": "Custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more.",
1613
+ "tagName": "sgds-button",
1169
1614
  "customElement": true,
1170
- "modulePath": "src/components/Badge/sgds-badge.ts",
1615
+ "modulePath": "src/components/Button/sgds-button.ts",
1171
1616
  "cssProperties": [],
1172
1617
  "cssParts": [],
1173
1618
  "cssStates": []
@@ -1176,18 +1621,18 @@
1176
1621
  "exports": [
1177
1622
  {
1178
1623
  "kind": "js",
1179
- "name": "SgdsBadge",
1624
+ "name": "SgdsButton",
1180
1625
  "declaration": {
1181
- "name": "SgdsBadge",
1182
- "module": "src/components/Badge/sgds-badge.ts"
1626
+ "name": "SgdsButton",
1627
+ "module": "src/components/Button/sgds-button.ts"
1183
1628
  }
1184
1629
  },
1185
1630
  {
1186
1631
  "kind": "js",
1187
1632
  "name": "default",
1188
1633
  "declaration": {
1189
- "name": "SgdsBadge",
1190
- "module": "src/components/Badge/sgds-badge.ts"
1634
+ "name": "SgdsButton",
1635
+ "module": "src/components/Button/sgds-button.ts"
1191
1636
  }
1192
1637
  }
1193
1638
  ]
@@ -1490,419 +1935,288 @@
1490
1935
  },
1491
1936
  {
1492
1937
  "kind": "javascript-module",
1493
- "path": "src/components/Button/sgds-button.ts",
1938
+ "path": "src/components/Card/sgds-card.ts",
1494
1939
  "declarations": [
1495
1940
  {
1496
1941
  "kind": "class",
1497
1942
  "description": "",
1498
- "name": "SgdsButton",
1499
- "slots": [
1500
- {
1501
- "description": "The button's label.",
1502
- "name": "default"
1503
- },
1504
- {
1505
- "description": "The slot for icon to the left of the button text",
1506
- "name": "leftIcon"
1507
- },
1508
- {
1509
- "description": "The slot for icon to the right of the button text",
1510
- "name": "rightIcon"
1511
- }
1512
- ],
1513
- "members": [
1514
- {
1515
- "kind": "field",
1516
- "name": "type",
1517
- "type": {
1518
- "text": "\"button\" | \"submit\" | \"reset\""
1519
- },
1520
- "default": "\"button\"",
1521
- "description": "The behavior of the button with default as `type='button', `reset` resets all the controls to their initial values and `submit` submits the form data to the server",
1522
- "attribute": "type",
1523
- "reflects": true
1524
- },
1525
- {
1526
- "kind": "field",
1527
- "name": "form",
1528
- "type": {
1529
- "text": "string"
1530
- },
1531
- "description": "The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\nvalue of this attribute must be an id of a form in the same document or shadow root as the button.",
1532
- "attribute": "form",
1533
- "reflects": true
1534
- },
1943
+ "name": "SgdsCard",
1944
+ "slots": [
1535
1945
  {
1536
- "kind": "field",
1537
- "name": "formAction",
1538
- "type": {
1539
- "text": "string"
1540
- },
1541
- "description": "Used to override the form owner's `action` attribute.",
1542
- "attribute": "formaction",
1543
- "reflects": true
1946
+ "description": "The content area of the card, placed directly under the title. Accepts any HTML or custom elements.",
1947
+ "name": "default"
1544
1948
  },
1545
1949
  {
1546
- "kind": "field",
1547
- "name": "formMethod",
1548
- "type": {
1549
- "text": "\"post\" | \"get\""
1550
- },
1551
- "description": "Used to override the form owner's `method` attribute.",
1552
- "attribute": "formmethod",
1553
- "reflects": true
1950
+ "description": "Accepts an element for an overflow or contextual menu, positioned at the top-right corner of the card. Typically used for action menus or dropdowns.",
1951
+ "name": "menu"
1554
1952
  },
1555
1953
  {
1556
- "kind": "field",
1557
- "name": "formNoValidate",
1558
- "type": {
1559
- "text": "boolean"
1560
- },
1561
- "description": "Used to override the form owner's `novalidate` attribute.",
1562
- "attribute": "formnovalidate",
1563
- "reflects": true
1954
+ "description": "Accepts an element to be displayed above the card content. When used, it overrides image and icon slot content.",
1955
+ "name": "upper"
1564
1956
  },
1565
1957
  {
1566
- "kind": "field",
1567
- "name": "formTarget",
1568
- "type": {
1569
- "text": "| \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | string"
1570
- },
1571
- "description": "Used to override the form owner's `target` attribute.",
1572
- "attribute": "formtarget",
1573
- "reflects": true
1958
+ "description": "Accepts an image or svg element of the card. Only a single element is allowed to be passed in.",
1959
+ "name": "image"
1574
1960
  },
1575
1961
  {
1576
- "kind": "field",
1577
- "name": "fullWidth",
1578
- "type": {
1579
- "text": "boolean"
1580
- },
1581
- "default": "false",
1582
- "description": "When set, the button will be in full width.",
1583
- "attribute": "fullWidth",
1584
- "reflects": true
1962
+ "description": "Accepts an icon element to visually represent the card. Only a single element is allowed to be passed in.",
1963
+ "name": "icon"
1585
1964
  },
1586
1965
  {
1587
- "kind": "field",
1588
- "name": "hasLeftIconSlot",
1589
- "type": {
1590
- "text": "boolean"
1591
- },
1592
- "default": "false",
1593
- "description": "Used only for SSR to indicate the presence of the `leftIcon` slot.",
1594
- "attribute": "hasLeftIconSlot"
1966
+ "description": "The subtitle of the card",
1967
+ "name": "subtitle"
1595
1968
  },
1596
1969
  {
1597
- "kind": "field",
1598
- "name": "hasRightIconSlot",
1599
- "type": {
1600
- "text": "boolean"
1601
- },
1602
- "default": "false",
1603
- "description": "Used only for SSR to indicate the presence of the `rightIcon` slot.",
1604
- "attribute": "hasRightIconSlot"
1970
+ "description": "The title of the card",
1971
+ "name": "title"
1605
1972
  },
1606
1973
  {
1607
- "kind": "field",
1608
- "name": "hasSlotController",
1609
- "privacy": "private",
1610
- "default": "new HasSlotController(this, \"leftIcon\", \"rightIcon\")",
1611
- "type": {}
1974
+ "description": "The paragrapher text of the card",
1975
+ "name": "description"
1612
1976
  },
1613
1977
  {
1614
- "kind": "method",
1615
- "name": "_handleClick",
1616
- "privacy": "protected",
1617
- "parameters": [
1618
- {
1619
- "name": "event",
1620
- "type": {
1621
- "text": "MouseEvent"
1622
- }
1623
- }
1624
- ],
1625
- "type": {},
1626
- "inheritedFrom": {
1627
- "name": "ButtonElement",
1628
- "module": "src/base/button-element.ts"
1629
- }
1978
+ "description": "Accepts any additional content to be displayed below the card description, such as badges, metadata, or supplementary information.",
1979
+ "name": "lower"
1630
1980
  },
1631
1981
  {
1632
- "kind": "field",
1633
- "name": "_clickHandler",
1634
- "privacy": "private",
1635
- "type": {}
1982
+ "description": "Footer area of the card. Accepts links, actions, or any custom content.",
1983
+ "name": "footer"
1636
1984
  },
1985
+ {
1986
+ "description": "(@deprecated) Deprecated since 3.3.2 in favour of `footer` slot. Legacy slot for anchor elements. Use `footer` instead.",
1987
+ "name": "link"
1988
+ }
1989
+ ],
1990
+ "members": [
1637
1991
  {
1638
1992
  "kind": "field",
1639
- "name": "variant",
1993
+ "name": "footerNode",
1640
1994
  "type": {
1641
- "text": "\"primary\" | \"outline\" | \"ghost\" | \"danger\""
1995
+ "text": "HTMLElement[]"
1642
1996
  },
1643
- "default": "\"primary\"",
1644
- "description": "Sets the visual variants such as: `primary`, `outline`, `ghost`. `danger` is @deprecated since v3.5.6",
1645
- "attribute": "variant",
1646
- "reflects": true,
1647
- "inheritedFrom": {
1648
- "name": "ButtonElement",
1649
- "module": "src/base/button-element.ts"
1650
- }
1997
+ "privacy": "private"
1651
1998
  },
1652
1999
  {
1653
2000
  "kind": "field",
1654
- "name": "tone",
2001
+ "name": "linkNode",
1655
2002
  "type": {
1656
- "text": "\"brand\" | \"danger\" | \"fixed-light\" | \"neutral\""
2003
+ "text": "HTMLAnchorElement[] | SgdsLink[]"
1657
2004
  },
1658
- "default": "\"brand\"",
1659
- "description": "Sets the visual colour of the button: `brand`, `danger`, `fixed-light`, `neutral`",
1660
- "attribute": "tone",
1661
- "reflects": true,
1662
- "inheritedFrom": {
1663
- "name": "ButtonElement",
1664
- "module": "src/base/button-element.ts"
1665
- }
2005
+ "privacy": "private"
1666
2006
  },
1667
2007
  {
1668
2008
  "kind": "field",
1669
- "name": "size",
2009
+ "name": "imagePosition",
1670
2010
  "type": {
1671
- "text": "\"xs\" | \"sm\" | \"md\" | \"lg\""
2011
+ "text": "CardImagePosition"
1672
2012
  },
1673
- "default": "\"md\"",
1674
- "description": "Specifies a small, medium or large button, the size is medium by default.",
1675
- "attribute": "size",
1676
- "reflects": true,
1677
- "inheritedFrom": {
1678
- "name": "ButtonElement",
1679
- "module": "src/base/button-element.ts"
1680
- }
2013
+ "default": "\"before\"",
2014
+ "description": "Sets the image position of the card. Available options: `before`, `after`",
2015
+ "attribute": "imagePosition",
2016
+ "reflects": true
1681
2017
  },
1682
2018
  {
1683
2019
  "kind": "field",
1684
- "name": "active",
2020
+ "name": "imageAdjustment",
1685
2021
  "type": {
1686
- "text": "boolean"
2022
+ "text": "CardImageAdjustment"
1687
2023
  },
1688
- "default": "false",
1689
- "description": "Manually set the visual state of the button to `:active`",
1690
- "attribute": "active",
1691
- "reflects": true,
1692
- "inheritedFrom": {
1693
- "name": "ButtonElement",
1694
- "module": "src/base/button-element.ts"
1695
- }
2024
+ "default": "\"default\"",
2025
+ "description": "Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio`",
2026
+ "attribute": "imageAdjustment",
2027
+ "reflects": true
1696
2028
  },
1697
2029
  {
1698
2030
  "kind": "field",
1699
- "name": "disabled",
2031
+ "name": "hasImageSlot",
1700
2032
  "type": {
1701
2033
  "text": "boolean"
1702
2034
  },
1703
2035
  "default": "false",
1704
- "description": "The disabled state of the button",
1705
- "attribute": "disabled",
1706
- "reflects": true,
1707
- "inheritedFrom": {
1708
- "name": "ButtonElement",
1709
- "module": "src/base/button-element.ts"
1710
- }
2036
+ "description": "Used only for SSR to indicate the presence of the `image` slot.",
2037
+ "attribute": "hasImageSlot"
1711
2038
  },
1712
2039
  {
1713
2040
  "kind": "field",
1714
- "name": "href",
2041
+ "name": "hasIconSlot",
1715
2042
  "type": {
1716
- "text": "string"
2043
+ "text": "boolean"
1717
2044
  },
1718
- "description": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.",
1719
- "attribute": "href",
1720
- "reflects": true,
1721
- "inheritedFrom": {
1722
- "name": "ButtonElement",
1723
- "module": "src/base/button-element.ts"
1724
- }
2045
+ "default": "false",
2046
+ "description": "Used only for SSR to indicate the presence of the `icon` slot.",
2047
+ "attribute": "hasIconSlot"
1725
2048
  },
1726
2049
  {
1727
2050
  "kind": "field",
1728
- "name": "target",
2051
+ "name": "hasUpperSlot",
1729
2052
  "type": {
1730
- "text": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\""
2053
+ "text": "boolean"
1731
2054
  },
1732
- "default": "\"_self\"",
1733
- "description": "Where to display the linked URL, as the name for a browsing context. Forwards to the HTMLAnchor target attribute",
1734
- "attribute": "target",
1735
- "reflects": true,
1736
- "inheritedFrom": {
1737
- "name": "ButtonElement",
1738
- "module": "src/base/button-element.ts"
1739
- }
2055
+ "default": "false",
2056
+ "description": "Used only for SSR to indicate the presence of the `upper` slot.",
2057
+ "attribute": "hasUpperSlot"
1740
2058
  },
1741
2059
  {
1742
2060
  "kind": "field",
1743
- "name": "download",
2061
+ "name": "linkSlotItems",
1744
2062
  "type": {
1745
- "text": "string"
2063
+ "text": "HTMLAnchorElement | null"
1746
2064
  },
1747
- "description": "Tells the browser to download the linked file as this filename. Only used when `href` is set.",
1748
- "attribute": "download",
1749
- "reflects": true,
1750
- "inheritedFrom": {
1751
- "name": "ButtonElement",
1752
- "module": "src/base/button-element.ts"
1753
- }
2065
+ "privacy": "private"
1754
2066
  },
1755
2067
  {
1756
2068
  "kind": "field",
1757
- "name": "ariaLabel",
2069
+ "name": "footerSlotItems",
1758
2070
  "type": {
1759
- "text": "string"
2071
+ "text": "HTMLAnchorElement | null"
1760
2072
  },
1761
- "description": "The aria-label attribute to passed to button element when necessary",
1762
- "attribute": "ariaLabel",
1763
- "inheritedFrom": {
1764
- "name": "ButtonElement",
1765
- "module": "src/base/button-element.ts"
1766
- }
2073
+ "privacy": "private"
1767
2074
  },
1768
2075
  {
1769
2076
  "kind": "field",
1770
- "name": "loading",
1771
- "type": {
1772
- "text": "boolean"
1773
- },
1774
- "description": "When true, shows a loading spinner",
1775
- "attribute": "loading",
1776
- "inheritedFrom": {
1777
- "name": "ButtonElement",
1778
- "module": "src/base/button-element.ts"
1779
- }
2077
+ "name": "hasSlotController",
2078
+ "privacy": "private",
2079
+ "default": "new HasSlotController(this, \"image\", \"icon\", \"upper\")",
2080
+ "type": {}
1780
2081
  },
1781
2082
  {
1782
2083
  "kind": "method",
1783
- "name": "focus",
1784
- "privacy": "public",
2084
+ "name": "handleImgSlotChange",
1785
2085
  "parameters": [
1786
2086
  {
1787
- "name": "options",
1788
- "optional": true,
2087
+ "name": "e",
1789
2088
  "type": {
1790
- "text": "FocusOptions"
2089
+ "text": "Event"
1791
2090
  }
1792
2091
  }
1793
- ],
1794
- "description": "Sets focus on the button.",
1795
- "type": {},
2092
+ ],
2093
+ "type": {}
2094
+ },
2095
+ {
2096
+ "kind": "field",
2097
+ "name": "stretchedLink",
2098
+ "type": {
2099
+ "text": "boolean"
2100
+ },
2101
+ "default": "false",
2102
+ "description": "Extends the link passed in either `footer` or `link`(deprecated) slot.",
2103
+ "attribute": "stretchedLink",
2104
+ "reflects": true,
1796
2105
  "inheritedFrom": {
1797
- "name": "ButtonElement",
1798
- "module": "src/base/button-element.ts"
2106
+ "name": "CardElement",
2107
+ "module": "src/base/card-element.ts"
1799
2108
  }
1800
2109
  },
1801
2110
  {
1802
- "kind": "method",
1803
- "name": "click",
1804
- "privacy": "public",
1805
- "description": "Simulates a click on the button.",
1806
- "type": {},
2111
+ "kind": "field",
2112
+ "name": "disabled",
2113
+ "type": {
2114
+ "text": "boolean"
2115
+ },
2116
+ "default": "false",
2117
+ "description": "Disables the card",
2118
+ "attribute": "disabled",
2119
+ "reflects": true,
1807
2120
  "inheritedFrom": {
1808
- "name": "ButtonElement",
1809
- "module": "src/base/button-element.ts"
2121
+ "name": "CardElement",
2122
+ "module": "src/base/card-element.ts"
1810
2123
  }
1811
2124
  },
1812
2125
  {
1813
- "kind": "method",
1814
- "name": "blur",
1815
- "privacy": "public",
1816
- "description": "Removes focus from the button.",
1817
- "type": {},
2126
+ "kind": "field",
2127
+ "name": "hideBorder",
2128
+ "type": {
2129
+ "text": "boolean"
2130
+ },
2131
+ "default": "false",
2132
+ "description": "When true, hides the default border of the card.",
2133
+ "attribute": "hideBorder",
2134
+ "reflects": true,
1818
2135
  "inheritedFrom": {
1819
- "name": "ButtonElement",
1820
- "module": "src/base/button-element.ts"
2136
+ "name": "CardElement",
2137
+ "module": "src/base/card-element.ts"
1821
2138
  }
1822
2139
  },
1823
2140
  {
1824
- "kind": "method",
1825
- "name": "_handleBlur",
1826
- "privacy": "protected",
1827
- "type": {},
2141
+ "kind": "field",
2142
+ "name": "tinted",
2143
+ "type": {
2144
+ "text": "boolean"
2145
+ },
2146
+ "default": "false",
2147
+ "description": "When true, applies a tinted background color to the card.",
2148
+ "attribute": "tinted",
2149
+ "reflects": true,
1828
2150
  "inheritedFrom": {
1829
- "name": "ButtonElement",
1830
- "module": "src/base/button-element.ts"
2151
+ "name": "CardElement",
2152
+ "module": "src/base/card-element.ts"
1831
2153
  }
1832
2154
  },
1833
2155
  {
1834
- "kind": "method",
1835
- "name": "_handleFocus",
1836
- "privacy": "protected",
1837
- "type": {},
2156
+ "kind": "field",
2157
+ "name": "orientation",
2158
+ "type": {
2159
+ "text": "CardOrientation"
2160
+ },
2161
+ "default": "\"vertical\"",
2162
+ "description": "Sets the orientation of the card. Available options: `vertical`, `horizontal`",
2163
+ "attribute": "orientation",
2164
+ "reflects": true,
1838
2165
  "inheritedFrom": {
1839
- "name": "ButtonElement",
1840
- "module": "src/base/button-element.ts"
2166
+ "name": "CardElement",
2167
+ "module": "src/base/card-element.ts"
1841
2168
  }
1842
2169
  },
1843
2170
  {
1844
2171
  "kind": "method",
1845
- "name": "_handleKeydown",
1846
- "privacy": "protected",
2172
+ "name": "handleTitleSlotChange",
1847
2173
  "parameters": [
1848
2174
  {
1849
- "name": "event",
2175
+ "name": "e",
1850
2176
  "type": {
1851
- "text": "KeyboardEvent"
2177
+ "text": "Event"
1852
2178
  }
1853
2179
  }
1854
2180
  ],
1855
2181
  "type": {},
1856
2182
  "inheritedFrom": {
1857
- "name": "ButtonElement",
1858
- "module": "src/base/button-element.ts"
2183
+ "name": "CardElement",
2184
+ "module": "src/base/card-element.ts"
1859
2185
  }
1860
2186
  },
1861
2187
  {
1862
2188
  "kind": "method",
1863
- "name": "_assignSpinnerSize",
2189
+ "name": "_forwardAnchorAttributes",
1864
2190
  "privacy": "protected",
1865
2191
  "parameters": [
1866
2192
  {
1867
- "name": "buttonSize",
2193
+ "name": "anchor",
1868
2194
  "type": {
1869
- "text": "\"xs\" | \"sm\" | \"md\" | \"lg\""
2195
+ "text": "HTMLAnchorElement | null"
1870
2196
  }
1871
2197
  }
1872
2198
  ],
1873
2199
  "type": {},
1874
2200
  "inheritedFrom": {
1875
- "name": "ButtonElement",
1876
- "module": "src/base/button-element.ts"
2201
+ "name": "CardElement",
2202
+ "module": "src/base/card-element.ts"
1877
2203
  }
1878
2204
  },
1879
2205
  {
1880
2206
  "kind": "method",
1881
- "name": "_assignSpinnerTone",
1882
- "privacy": "protected",
1883
- "return": {
1884
- "type": {
1885
- "text": "SpinnerTone"
1886
- }
1887
- },
2207
+ "name": "warnLinkSlotMisused",
1888
2208
  "parameters": [
1889
2209
  {
1890
- "name": "buttonTone",
1891
- "type": {
1892
- "text": "ButtonTone"
1893
- }
1894
- },
1895
- {
1896
- "name": "buttonVariant",
2210
+ "name": "e",
1897
2211
  "type": {
1898
- "text": "ButtonVariant"
2212
+ "text": "Event"
1899
2213
  }
1900
2214
  }
1901
2215
  ],
1902
2216
  "type": {},
1903
2217
  "inheritedFrom": {
1904
- "name": "ButtonElement",
1905
- "module": "src/base/button-element.ts"
2218
+ "name": "CardElement",
2219
+ "module": "src/base/card-element.ts"
1906
2220
  }
1907
2221
  },
1908
2222
  {
@@ -1960,526 +2274,254 @@
1960
2274
  }
1961
2275
  }
1962
2276
  ],
1963
- "events": [
1964
- {
1965
- "description": "Emitted when the button is blurred.",
1966
- "name": "sgds-blur",
1967
- "reactName": "onSgdsBlur"
1968
- },
1969
- {
1970
- "description": "Emitted when the button is focused.",
1971
- "name": "sgds-focus",
1972
- "reactName": "onSgdsFocus"
1973
- }
1974
- ],
1975
2277
  "attributes": [
1976
2278
  {
1977
- "name": "type",
1978
- "type": {
1979
- "text": "\"button\" | \"submit\" | \"reset\""
1980
- },
1981
- "default": "\"button\"",
1982
- "description": "The behavior of the button with default as `type='button', `reset` resets all the controls to their initial values and `submit` submits the form data to the server",
1983
- "fieldName": "type"
1984
- },
1985
- {
1986
- "name": "form",
1987
- "type": {
1988
- "text": "string"
1989
- },
1990
- "description": "The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\nvalue of this attribute must be an id of a form in the same document or shadow root as the button.",
1991
- "fieldName": "form"
1992
- },
1993
- {
1994
- "name": "formaction",
1995
- "type": {
1996
- "text": "string"
1997
- },
1998
- "description": "Used to override the form owner's `action` attribute.",
1999
- "fieldName": "formAction"
2000
- },
2001
- {
2002
- "name": "formmethod",
2003
- "type": {
2004
- "text": "\"post\" | \"get\""
2005
- },
2006
- "description": "Used to override the form owner's `method` attribute.",
2007
- "fieldName": "formMethod"
2008
- },
2009
- {
2010
- "name": "formnovalidate",
2011
- "type": {
2012
- "text": "boolean"
2013
- },
2014
- "description": "Used to override the form owner's `novalidate` attribute.",
2015
- "fieldName": "formNoValidate"
2016
- },
2017
- {
2018
- "name": "formtarget",
2019
- "type": {
2020
- "text": "| \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | string"
2021
- },
2022
- "description": "Used to override the form owner's `target` attribute.",
2023
- "fieldName": "formTarget"
2024
- },
2025
- {
2026
- "name": "fullWidth",
2279
+ "name": "imagePosition",
2027
2280
  "type": {
2028
- "text": "boolean"
2281
+ "text": "CardImagePosition"
2029
2282
  },
2030
- "default": "false",
2031
- "description": "When set, the button will be in full width.",
2032
- "fieldName": "fullWidth"
2283
+ "default": "\"before\"",
2284
+ "description": "Sets the image position of the card. Available options: `before`, `after`",
2285
+ "fieldName": "imagePosition"
2033
2286
  },
2034
2287
  {
2035
- "name": "hasLeftIconSlot",
2288
+ "name": "imageAdjustment",
2036
2289
  "type": {
2037
- "text": "boolean"
2290
+ "text": "CardImageAdjustment"
2038
2291
  },
2039
- "default": "false",
2040
- "description": "Used only for SSR to indicate the presence of the `leftIcon` slot.",
2041
- "fieldName": "hasLeftIconSlot"
2292
+ "default": "\"default\"",
2293
+ "description": "Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio`",
2294
+ "fieldName": "imageAdjustment"
2042
2295
  },
2043
2296
  {
2044
- "name": "hasRightIconSlot",
2297
+ "name": "hasImageSlot",
2045
2298
  "type": {
2046
2299
  "text": "boolean"
2047
- },
2048
- "default": "false",
2049
- "description": "Used only for SSR to indicate the presence of the `rightIcon` slot.",
2050
- "fieldName": "hasRightIconSlot"
2051
- },
2052
- {
2053
- "name": "variant",
2054
- "type": {
2055
- "text": "ButtonVariant"
2056
- },
2057
- "default": "\"primary\"",
2058
- "description": "Sets the visual variants such as: `primary`, `outline`, `ghost`. `danger` is @deprecated since v3.5.6",
2059
- "fieldName": "variant",
2060
- "inheritedFrom": {
2061
- "name": "ButtonElement",
2062
- "module": "src/base/button-element.ts"
2063
- }
2064
- },
2065
- {
2066
- "name": "tone",
2067
- "type": {
2068
- "text": "ButtonTone"
2069
- },
2070
- "default": "\"brand\"",
2071
- "description": "Sets the visual colour of the button: `brand`, `danger`, `fixed-light`, `neutral`",
2072
- "fieldName": "tone",
2073
- "inheritedFrom": {
2074
- "name": "ButtonElement",
2075
- "module": "src/base/button-element.ts"
2076
- }
2077
- },
2078
- {
2079
- "name": "size",
2080
- "type": {
2081
- "text": "\"xs\" | \"sm\" | \"md\" | \"lg\""
2082
- },
2083
- "default": "\"md\"",
2084
- "description": "Specifies a small, medium or large button, the size is medium by default.",
2085
- "fieldName": "size",
2086
- "inheritedFrom": {
2087
- "name": "ButtonElement",
2088
- "module": "src/base/button-element.ts"
2089
- }
2300
+ },
2301
+ "default": "false",
2302
+ "description": "Used only for SSR to indicate the presence of the `image` slot.",
2303
+ "fieldName": "hasImageSlot"
2090
2304
  },
2091
2305
  {
2092
- "name": "active",
2306
+ "name": "hasIconSlot",
2093
2307
  "type": {
2094
2308
  "text": "boolean"
2095
2309
  },
2096
2310
  "default": "false",
2097
- "description": "Manually set the visual state of the button to `:active`",
2098
- "fieldName": "active",
2099
- "inheritedFrom": {
2100
- "name": "ButtonElement",
2101
- "module": "src/base/button-element.ts"
2102
- }
2311
+ "description": "Used only for SSR to indicate the presence of the `icon` slot.",
2312
+ "fieldName": "hasIconSlot"
2103
2313
  },
2104
2314
  {
2105
- "name": "disabled",
2315
+ "name": "hasUpperSlot",
2106
2316
  "type": {
2107
2317
  "text": "boolean"
2108
2318
  },
2109
2319
  "default": "false",
2110
- "description": "The disabled state of the button",
2111
- "fieldName": "disabled",
2112
- "inheritedFrom": {
2113
- "name": "ButtonElement",
2114
- "module": "src/base/button-element.ts"
2115
- }
2320
+ "description": "Used only for SSR to indicate the presence of the `upper` slot.",
2321
+ "fieldName": "hasUpperSlot"
2116
2322
  },
2117
2323
  {
2118
- "name": "href",
2324
+ "name": "stretchedLink",
2119
2325
  "type": {
2120
- "text": "string"
2326
+ "text": "boolean"
2121
2327
  },
2122
- "description": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.",
2123
- "fieldName": "href",
2328
+ "default": "false",
2329
+ "description": "Extends the link passed in either `footer` or `link`(deprecated) slot.",
2330
+ "fieldName": "stretchedLink",
2124
2331
  "inheritedFrom": {
2125
- "name": "ButtonElement",
2126
- "module": "src/base/button-element.ts"
2332
+ "name": "CardElement",
2333
+ "module": "src/base/card-element.ts"
2127
2334
  }
2128
2335
  },
2129
2336
  {
2130
- "name": "target",
2337
+ "name": "disabled",
2131
2338
  "type": {
2132
- "text": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\""
2339
+ "text": "boolean"
2133
2340
  },
2134
- "default": "\"_self\"",
2135
- "description": "Where to display the linked URL, as the name for a browsing context. Forwards to the HTMLAnchor target attribute",
2136
- "fieldName": "target",
2341
+ "default": "false",
2342
+ "description": "Disables the card",
2343
+ "fieldName": "disabled",
2137
2344
  "inheritedFrom": {
2138
- "name": "ButtonElement",
2139
- "module": "src/base/button-element.ts"
2345
+ "name": "CardElement",
2346
+ "module": "src/base/card-element.ts"
2140
2347
  }
2141
2348
  },
2142
2349
  {
2143
- "name": "download",
2350
+ "name": "hideBorder",
2144
2351
  "type": {
2145
- "text": "string"
2352
+ "text": "boolean"
2146
2353
  },
2147
- "description": "Tells the browser to download the linked file as this filename. Only used when `href` is set.",
2148
- "fieldName": "download",
2354
+ "default": "false",
2355
+ "description": "When true, hides the default border of the card.",
2356
+ "fieldName": "hideBorder",
2149
2357
  "inheritedFrom": {
2150
- "name": "ButtonElement",
2151
- "module": "src/base/button-element.ts"
2358
+ "name": "CardElement",
2359
+ "module": "src/base/card-element.ts"
2152
2360
  }
2153
2361
  },
2154
2362
  {
2155
- "name": "ariaLabel",
2363
+ "name": "tinted",
2156
2364
  "type": {
2157
- "text": "string"
2365
+ "text": "boolean"
2158
2366
  },
2159
- "description": "The aria-label attribute to passed to button element when necessary",
2160
- "fieldName": "ariaLabel",
2367
+ "default": "false",
2368
+ "description": "When true, applies a tinted background color to the card.",
2369
+ "fieldName": "tinted",
2161
2370
  "inheritedFrom": {
2162
- "name": "ButtonElement",
2163
- "module": "src/base/button-element.ts"
2371
+ "name": "CardElement",
2372
+ "module": "src/base/card-element.ts"
2164
2373
  }
2165
2374
  },
2166
2375
  {
2167
- "name": "loading",
2376
+ "name": "orientation",
2168
2377
  "type": {
2169
- "text": "boolean"
2378
+ "text": "CardOrientation"
2170
2379
  },
2171
- "description": "When true, shows a loading spinner",
2172
- "fieldName": "loading",
2380
+ "default": "\"vertical\"",
2381
+ "description": "Sets the orientation of the card. Available options: `vertical`, `horizontal`",
2382
+ "fieldName": "orientation",
2173
2383
  "inheritedFrom": {
2174
- "name": "ButtonElement",
2175
- "module": "src/base/button-element.ts"
2384
+ "name": "CardElement",
2385
+ "module": "src/base/card-element.ts"
2176
2386
  }
2177
2387
  }
2178
2388
  ],
2179
2389
  "superclass": {
2180
- "name": "ButtonElement",
2181
- "module": "/src/base/button-element"
2390
+ "name": "CardElement",
2391
+ "module": "/src/base/card-element"
2182
2392
  },
2183
- "summary": "Custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more.",
2184
- "tagName": "sgds-button",
2393
+ "summary": "Cards can be used for headers and footers, a wide variety of content, contain contextual background colors and images.",
2394
+ "tagName": "sgds-card",
2185
2395
  "customElement": true,
2186
- "modulePath": "src/components/Button/sgds-button.ts",
2396
+ "modulePath": "src/components/Card/sgds-card.ts",
2187
2397
  "cssProperties": [],
2188
2398
  "cssParts": [],
2189
- "cssStates": []
2399
+ "cssStates": [],
2400
+ "events": []
2190
2401
  }
2191
2402
  ],
2192
2403
  "exports": [
2193
2404
  {
2194
2405
  "kind": "js",
2195
- "name": "SgdsButton",
2406
+ "name": "SgdsCard",
2196
2407
  "declaration": {
2197
- "name": "SgdsButton",
2198
- "module": "src/components/Button/sgds-button.ts"
2408
+ "name": "SgdsCard",
2409
+ "module": "src/components/Card/sgds-card.ts"
2199
2410
  }
2200
2411
  },
2201
2412
  {
2202
2413
  "kind": "js",
2203
2414
  "name": "default",
2204
2415
  "declaration": {
2205
- "name": "SgdsButton",
2206
- "module": "src/components/Button/sgds-button.ts"
2416
+ "name": "SgdsCard",
2417
+ "module": "src/components/Card/sgds-card.ts"
2207
2418
  }
2208
2419
  }
2209
2420
  ]
2210
2421
  },
2211
2422
  {
2212
2423
  "kind": "javascript-module",
2213
- "path": "src/components/Card/sgds-card.ts",
2424
+ "path": "src/components/Badge/sgds-badge.ts",
2214
2425
  "declarations": [
2215
2426
  {
2216
2427
  "kind": "class",
2217
2428
  "description": "",
2218
- "name": "SgdsCard",
2429
+ "name": "SgdsBadge",
2219
2430
  "slots": [
2220
2431
  {
2221
- "description": "The content area of the card, placed directly under the title. Accepts any HTML or custom elements.",
2432
+ "description": "slot for badge",
2222
2433
  "name": "default"
2223
2434
  },
2224
2435
  {
2225
- "description": "Accepts an element for an overflow or contextual menu, positioned at the top-right corner of the card. Typically used for action menus or dropdowns.",
2226
- "name": "menu"
2227
- },
2228
- {
2229
- "description": "Accepts an element to be displayed above the card content. When used, it overrides image and icon slot content.",
2230
- "name": "upper"
2231
- },
2232
- {
2233
- "description": "Accepts an image or svg element of the card. Only a single element is allowed to be passed in.",
2234
- "name": "image"
2235
- },
2236
- {
2237
- "description": "Accepts an icon element to visually represent the card. Only a single element is allowed to be passed in.",
2436
+ "description": "The slot for icon to the left of the badge text",
2238
2437
  "name": "icon"
2239
- },
2240
- {
2241
- "description": "The subtitle of the card",
2242
- "name": "subtitle"
2243
- },
2244
- {
2245
- "description": "The title of the card",
2246
- "name": "title"
2247
- },
2248
- {
2249
- "description": "The paragrapher text of the card",
2250
- "name": "description"
2251
- },
2252
- {
2253
- "description": "Accepts any additional content to be displayed below the card description, such as badges, metadata, or supplementary information.",
2254
- "name": "lower"
2255
- },
2256
- {
2257
- "description": "Footer area of the card. Accepts links, actions, or any custom content.",
2258
- "name": "footer"
2259
- },
2260
- {
2261
- "description": "(@deprecated) Deprecated since 3.3.2 in favour of `footer` slot. Legacy slot for anchor elements. Use `footer` instead.",
2262
- "name": "link"
2263
2438
  }
2264
2439
  ],
2265
2440
  "members": [
2266
2441
  {
2267
2442
  "kind": "field",
2268
- "name": "footerNode",
2269
- "type": {
2270
- "text": "HTMLElement[]"
2271
- },
2272
- "privacy": "private"
2273
- },
2274
- {
2275
- "kind": "field",
2276
- "name": "linkNode",
2277
- "type": {
2278
- "text": "HTMLAnchorElement[] | SgdsLink[]"
2279
- },
2280
- "privacy": "private"
2281
- },
2282
- {
2283
- "kind": "field",
2284
- "name": "imagePosition",
2285
- "type": {
2286
- "text": "CardImagePosition"
2287
- },
2288
- "default": "\"before\"",
2289
- "description": "Sets the image position of the card. Available options: `before`, `after`",
2290
- "attribute": "imagePosition",
2291
- "reflects": true
2292
- },
2293
- {
2294
- "kind": "field",
2295
- "name": "imageAdjustment",
2296
- "type": {
2297
- "text": "CardImageAdjustment"
2298
- },
2299
- "default": "\"default\"",
2300
- "description": "Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio`",
2301
- "attribute": "imageAdjustment",
2302
- "reflects": true
2303
- },
2304
- {
2305
- "kind": "field",
2306
- "name": "hasImageSlot",
2307
- "type": {
2308
- "text": "boolean"
2309
- },
2310
- "default": "false",
2311
- "description": "Used only for SSR to indicate the presence of the `image` slot.",
2312
- "attribute": "hasImageSlot"
2313
- },
2314
- {
2315
- "kind": "field",
2316
- "name": "hasIconSlot",
2317
- "type": {
2318
- "text": "boolean"
2319
- },
2320
- "default": "false",
2321
- "description": "Used only for SSR to indicate the presence of the `icon` slot.",
2322
- "attribute": "hasIconSlot"
2323
- },
2324
- {
2325
- "kind": "field",
2326
- "name": "hasUpperSlot",
2443
+ "name": "show",
2327
2444
  "type": {
2328
2445
  "text": "boolean"
2329
2446
  },
2330
2447
  "default": "false",
2331
- "description": "Used only for SSR to indicate the presence of the `upper` slot.",
2332
- "attribute": "hasUpperSlot"
2333
- },
2334
- {
2335
- "kind": "field",
2336
- "name": "linkSlotItems",
2337
- "type": {
2338
- "text": "HTMLAnchorElement | null"
2339
- },
2340
- "privacy": "private"
2341
- },
2342
- {
2343
- "kind": "field",
2344
- "name": "footerSlotItems",
2345
- "type": {
2346
- "text": "HTMLAnchorElement | null"
2347
- },
2348
- "privacy": "private"
2349
- },
2350
- {
2351
- "kind": "field",
2352
- "name": "hasSlotController",
2353
- "privacy": "private",
2354
- "default": "new HasSlotController(this, \"image\", \"icon\", \"upper\")",
2355
- "type": {}
2356
- },
2357
- {
2358
- "kind": "method",
2359
- "name": "handleImgSlotChange",
2360
- "parameters": [
2361
- {
2362
- "name": "e",
2363
- "type": {
2364
- "text": "Event"
2365
- }
2366
- }
2367
- ],
2368
- "type": {}
2448
+ "description": "Controls the appearance of the dismissible badge. This prop only applies when dismissible is true",
2449
+ "attribute": "show",
2450
+ "reflects": true
2369
2451
  },
2370
2452
  {
2371
2453
  "kind": "field",
2372
- "name": "stretchedLink",
2454
+ "name": "variant",
2373
2455
  "type": {
2374
- "text": "boolean"
2456
+ "text": "\"primary\" | \"accent\" | \"success\" | \"danger\" | \"warning\" | \"cyan\" | \"purple\" | \"neutral\" | \"white\" | \"info\""
2375
2457
  },
2376
- "default": "false",
2377
- "description": "Extends the link passed in either `footer` or `link`(deprecated) slot.",
2378
- "attribute": "stretchedLink",
2379
- "reflects": true,
2380
- "inheritedFrom": {
2381
- "name": "CardElement",
2382
- "module": "src/base/card-element.ts"
2383
- }
2458
+ "default": "\"primary\"",
2459
+ "description": "One or more badge variant combinations.\nVariants include: `primary`, `accent`, `success`, `danger`, `warning`, `cyan`, `purple`, `neutral`, `white`, `info`.\n\n(@deprecated) The `info` variant is deprecated. Use `primary` instead.",
2460
+ "attribute": "variant",
2461
+ "reflects": true
2384
2462
  },
2385
2463
  {
2386
2464
  "kind": "field",
2387
- "name": "disabled",
2465
+ "name": "outlined",
2388
2466
  "type": {
2389
2467
  "text": "boolean"
2390
2468
  },
2391
2469
  "default": "false",
2392
- "description": "Disables the card",
2393
- "attribute": "disabled",
2394
- "reflects": true,
2395
- "inheritedFrom": {
2396
- "name": "CardElement",
2397
- "module": "src/base/card-element.ts"
2398
- }
2470
+ "description": "Manually set the outlined state to false",
2471
+ "attribute": "outlined",
2472
+ "reflects": true
2399
2473
  },
2400
2474
  {
2401
2475
  "kind": "field",
2402
- "name": "hideBorder",
2476
+ "name": "dismissible",
2403
2477
  "type": {
2404
2478
  "text": "boolean"
2405
2479
  },
2406
2480
  "default": "false",
2407
- "description": "When true, hides the default border of the card.",
2408
- "attribute": "hideBorder",
2409
- "reflects": true,
2410
- "inheritedFrom": {
2411
- "name": "CardElement",
2412
- "module": "src/base/card-element.ts"
2413
- }
2481
+ "description": "Manually set the dismissible state of the button to `false`",
2482
+ "attribute": "dismissible",
2483
+ "reflects": true
2414
2484
  },
2415
2485
  {
2416
2486
  "kind": "field",
2417
- "name": "tinted",
2487
+ "name": "fullWidth",
2418
2488
  "type": {
2419
2489
  "text": "boolean"
2420
2490
  },
2421
2491
  "default": "false",
2422
- "description": "When true, applies a tinted background color to the card.",
2423
- "attribute": "tinted",
2424
- "reflects": true,
2425
- "inheritedFrom": {
2426
- "name": "CardElement",
2427
- "module": "src/base/card-element.ts"
2428
- }
2492
+ "description": "Manually enable full width",
2493
+ "attribute": "fullWidth",
2494
+ "reflects": true
2429
2495
  },
2430
2496
  {
2431
2497
  "kind": "field",
2432
- "name": "orientation",
2498
+ "name": "truncated",
2433
2499
  "type": {
2434
- "text": "CardOrientation"
2500
+ "text": "boolean"
2435
2501
  },
2436
- "default": "\"vertical\"",
2437
- "description": "Sets the orientation of the card. Available options: `vertical`, `horizontal`",
2438
- "attribute": "orientation",
2439
- "reflects": true,
2440
- "inheritedFrom": {
2441
- "name": "CardElement",
2442
- "module": "src/base/card-element.ts"
2443
- }
2502
+ "privacy": "private",
2503
+ "default": "false"
2444
2504
  },
2445
2505
  {
2446
- "kind": "method",
2447
- "name": "handleTitleSlotChange",
2448
- "parameters": [
2449
- {
2450
- "name": "e",
2451
- "type": {
2452
- "text": "Event"
2453
- }
2454
- }
2455
- ],
2456
- "type": {},
2457
- "inheritedFrom": {
2458
- "name": "CardElement",
2459
- "module": "src/base/card-element.ts"
2460
- }
2506
+ "kind": "field",
2507
+ "name": "text",
2508
+ "type": {
2509
+ "text": "string"
2510
+ },
2511
+ "privacy": "private",
2512
+ "default": "\"\""
2461
2513
  },
2462
2514
  {
2463
2515
  "kind": "method",
2464
- "name": "_forwardAnchorAttributes",
2465
- "privacy": "protected",
2466
- "parameters": [
2467
- {
2468
- "name": "anchor",
2469
- "type": {
2470
- "text": "HTMLAnchorElement | null"
2471
- }
2472
- }
2473
- ],
2474
- "type": {},
2475
- "inheritedFrom": {
2476
- "name": "CardElement",
2477
- "module": "src/base/card-element.ts"
2478
- }
2516
+ "name": "close",
2517
+ "privacy": "public",
2518
+ "description": "Closes the badge",
2519
+ "type": {}
2479
2520
  },
2480
2521
  {
2481
2522
  "kind": "method",
2482
- "name": "warnLinkSlotMisused",
2523
+ "name": "_handleLabelSlotChange",
2524
+ "privacy": "private",
2483
2525
  "parameters": [
2484
2526
  {
2485
2527
  "name": "e",
@@ -2488,11 +2530,13 @@
2488
2530
  }
2489
2531
  }
2490
2532
  ],
2491
- "type": {},
2492
- "inheritedFrom": {
2493
- "name": "CardElement",
2494
- "module": "src/base/card-element.ts"
2495
- }
2533
+ "type": {}
2534
+ },
2535
+ {
2536
+ "kind": "method",
2537
+ "name": "_renderBadge",
2538
+ "privacy": "private",
2539
+ "type": {}
2496
2540
  },
2497
2541
  {
2498
2542
  "kind": "method",
@@ -2549,147 +2593,103 @@
2549
2593
  }
2550
2594
  }
2551
2595
  ],
2552
- "attributes": [
2596
+ "events": [
2553
2597
  {
2554
- "name": "imagePosition",
2555
- "type": {
2556
- "text": "CardImagePosition"
2557
- },
2558
- "default": "\"before\"",
2559
- "description": "Sets the image position of the card. Available options: `before`, `after`",
2560
- "fieldName": "imagePosition"
2598
+ "description": "Emitted when the badge appears.",
2599
+ "name": "sgds-show",
2600
+ "reactName": "onSgdsShow"
2561
2601
  },
2562
2602
  {
2563
- "name": "imageAdjustment",
2564
- "type": {
2565
- "text": "CardImageAdjustment"
2566
- },
2567
- "default": "\"default\"",
2568
- "description": "Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio`",
2569
- "fieldName": "imageAdjustment"
2603
+ "description": "Emitted when the badge is starting to close but has not closed.",
2604
+ "name": "sgds-hide",
2605
+ "reactName": "onSgdsHide"
2570
2606
  },
2571
2607
  {
2572
- "name": "hasImageSlot",
2573
- "type": {
2574
- "text": "boolean"
2575
- },
2576
- "default": "false",
2577
- "description": "Used only for SSR to indicate the presence of the `image` slot.",
2578
- "fieldName": "hasImageSlot"
2608
+ "description": "Emitted after the badge has appeared",
2609
+ "name": "sgds-after-show",
2610
+ "reactName": "onSgdsAfterShow"
2579
2611
  },
2580
2612
  {
2581
- "name": "hasIconSlot",
2582
- "type": {
2583
- "text": "boolean"
2584
- },
2585
- "default": "false",
2586
- "description": "Used only for SSR to indicate the presence of the `icon` slot.",
2587
- "fieldName": "hasIconSlot"
2588
- },
2613
+ "description": "Emitted after the badge has closed",
2614
+ "name": "sgds-after-hide",
2615
+ "reactName": "onSgdsAfterHide"
2616
+ }
2617
+ ],
2618
+ "attributes": [
2589
2619
  {
2590
- "name": "hasUpperSlot",
2620
+ "name": "show",
2591
2621
  "type": {
2592
2622
  "text": "boolean"
2593
2623
  },
2594
2624
  "default": "false",
2595
- "description": "Used only for SSR to indicate the presence of the `upper` slot.",
2596
- "fieldName": "hasUpperSlot"
2625
+ "description": "Controls the appearance of the dismissible badge. This prop only applies when dismissible is true",
2626
+ "fieldName": "show"
2597
2627
  },
2598
2628
  {
2599
- "name": "stretchedLink",
2629
+ "name": "variant",
2600
2630
  "type": {
2601
- "text": "boolean"
2631
+ "text": "BadgeVariant"
2602
2632
  },
2603
- "default": "false",
2604
- "description": "Extends the link passed in either `footer` or `link`(deprecated) slot.",
2605
- "fieldName": "stretchedLink",
2606
- "inheritedFrom": {
2607
- "name": "CardElement",
2608
- "module": "src/base/card-element.ts"
2609
- }
2633
+ "default": "\"primary\"",
2634
+ "description": "One or more badge variant combinations.\nVariants include: `primary`, `accent`, `success`, `danger`, `warning`, `cyan`, `purple`, `neutral`, `white`, `info`.\n\n(@deprecated) The `info` variant is deprecated. Use `primary` instead.",
2635
+ "fieldName": "variant"
2610
2636
  },
2611
2637
  {
2612
- "name": "disabled",
2638
+ "name": "outlined",
2613
2639
  "type": {
2614
2640
  "text": "boolean"
2615
2641
  },
2616
2642
  "default": "false",
2617
- "description": "Disables the card",
2618
- "fieldName": "disabled",
2619
- "inheritedFrom": {
2620
- "name": "CardElement",
2621
- "module": "src/base/card-element.ts"
2622
- }
2643
+ "description": "Manually set the outlined state to false",
2644
+ "fieldName": "outlined"
2623
2645
  },
2624
2646
  {
2625
- "name": "hideBorder",
2647
+ "name": "dismissible",
2626
2648
  "type": {
2627
2649
  "text": "boolean"
2628
2650
  },
2629
2651
  "default": "false",
2630
- "description": "When true, hides the default border of the card.",
2631
- "fieldName": "hideBorder",
2632
- "inheritedFrom": {
2633
- "name": "CardElement",
2634
- "module": "src/base/card-element.ts"
2635
- }
2652
+ "description": "Manually set the dismissible state of the button to `false`",
2653
+ "fieldName": "dismissible"
2636
2654
  },
2637
2655
  {
2638
- "name": "tinted",
2656
+ "name": "fullWidth",
2639
2657
  "type": {
2640
2658
  "text": "boolean"
2641
2659
  },
2642
2660
  "default": "false",
2643
- "description": "When true, applies a tinted background color to the card.",
2644
- "fieldName": "tinted",
2645
- "inheritedFrom": {
2646
- "name": "CardElement",
2647
- "module": "src/base/card-element.ts"
2648
- }
2649
- },
2650
- {
2651
- "name": "orientation",
2652
- "type": {
2653
- "text": "CardOrientation"
2654
- },
2655
- "default": "\"vertical\"",
2656
- "description": "Sets the orientation of the card. Available options: `vertical`, `horizontal`",
2657
- "fieldName": "orientation",
2658
- "inheritedFrom": {
2659
- "name": "CardElement",
2660
- "module": "src/base/card-element.ts"
2661
- }
2661
+ "description": "Manually enable full width",
2662
+ "fieldName": "fullWidth"
2662
2663
  }
2663
2664
  ],
2664
2665
  "superclass": {
2665
- "name": "CardElement",
2666
- "module": "/src/base/card-element"
2666
+ "name": "SgdsElement",
2667
+ "module": "/src/base/sgds-element"
2667
2668
  },
2668
- "summary": "Cards can be used for headers and footers, a wide variety of content, contain contextual background colors and images.",
2669
- "tagName": "sgds-card",
2669
+ "summary": "Badges can be used to highlight important bits of information such as labels, notifications & status.\nWhen the text exceeds the width, it will be truncated with a tooltip that will be displayed on hover.",
2670
+ "tagName": "sgds-badge",
2670
2671
  "customElement": true,
2671
- "modulePath": "src/components/Card/sgds-card.ts",
2672
+ "modulePath": "src/components/Badge/sgds-badge.ts",
2672
2673
  "cssProperties": [],
2673
2674
  "cssParts": [],
2674
- "cssStates": [],
2675
- "events": []
2675
+ "cssStates": []
2676
2676
  }
2677
2677
  ],
2678
2678
  "exports": [
2679
2679
  {
2680
2680
  "kind": "js",
2681
- "name": "SgdsCard",
2681
+ "name": "SgdsBadge",
2682
2682
  "declaration": {
2683
- "name": "SgdsCard",
2684
- "module": "src/components/Card/sgds-card.ts"
2683
+ "name": "SgdsBadge",
2684
+ "module": "src/components/Badge/sgds-badge.ts"
2685
2685
  }
2686
2686
  },
2687
2687
  {
2688
2688
  "kind": "js",
2689
2689
  "name": "default",
2690
2690
  "declaration": {
2691
- "name": "SgdsCard",
2692
- "module": "src/components/Card/sgds-card.ts"
2691
+ "name": "SgdsBadge",
2692
+ "module": "src/components/Badge/sgds-badge.ts"
2693
2693
  }
2694
2694
  }
2695
2695
  ]
@@ -26733,7 +26733,7 @@
26733
26733
  "package": {
26734
26734
  "name": "@govtechsg/sgds-web-component",
26735
26735
  "description": "",
26736
- "version": "3.19.0-rc.0",
26736
+ "version": "3.19.0-rc.1",
26737
26737
  "author": "GovTechSG",
26738
26738
  "license": "MIT"
26739
26739
  }