@govtechsg/sgds-web-component 3.21.2-rc.5 → 3.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/base/select-element.d.ts +2 -0
  2. package/base/select-element.js +5 -0
  3. package/base/select-element.js.map +1 -1
  4. package/components/Breadcrumb/index.umd.min.js +1 -1
  5. package/components/Breadcrumb/index.umd.min.js.map +1 -1
  6. package/components/ComboBox/index.umd.min.js +4 -2
  7. package/components/ComboBox/index.umd.min.js.map +1 -1
  8. package/components/ComboBox/sgds-combo-box.js +2 -0
  9. package/components/ComboBox/sgds-combo-box.js.map +1 -1
  10. package/components/Datepicker/index.umd.min.js +3 -2
  11. package/components/Datepicker/index.umd.min.js.map +1 -1
  12. package/components/Footer/index.umd.min.js +1 -1
  13. package/components/Footer/index.umd.min.js.map +1 -1
  14. package/components/Input/index.umd.min.js +3 -2
  15. package/components/Input/index.umd.min.js.map +1 -1
  16. package/components/Input/sgds-input.d.ts +2 -0
  17. package/components/Input/sgds-input.js +6 -0
  18. package/components/Input/sgds-input.js.map +1 -1
  19. package/components/Link/index.umd.min.js +1 -1
  20. package/components/Link/index.umd.min.js.map +1 -1
  21. package/components/Link/link.js +1 -1
  22. package/components/QuantityToggle/index.umd.min.js +3 -2
  23. package/components/QuantityToggle/index.umd.min.js.map +1 -1
  24. package/components/Select/index.umd.min.js +2 -2
  25. package/components/Select/index.umd.min.js.map +1 -1
  26. package/components/Subnav/index.umd.min.js +1 -1
  27. package/components/Subnav/index.umd.min.js.map +1 -1
  28. package/components/index.umd.min.js +9 -6
  29. package/components/index.umd.min.js.map +1 -1
  30. package/css/fouc.css +2 -2
  31. package/css/grid.css +4 -30
  32. package/css/grid.js +1 -1
  33. package/custom-elements.json +491 -395
  34. package/index.umd.min.js +9 -6
  35. package/index.umd.min.js.map +1 -1
  36. package/package.json +1 -1
  37. package/react/base/select-element.cjs.js +5 -0
  38. package/react/base/select-element.cjs.js.map +1 -1
  39. package/react/base/select-element.js +5 -0
  40. package/react/base/select-element.js.map +1 -1
  41. package/react/components/ComboBox/sgds-combo-box.cjs.js +2 -0
  42. package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
  43. package/react/components/ComboBox/sgds-combo-box.js +2 -0
  44. package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
  45. package/react/components/Input/sgds-input.cjs.js +6 -0
  46. package/react/components/Input/sgds-input.cjs.js.map +1 -1
  47. package/react/components/Input/sgds-input.js +6 -0
  48. package/react/components/Input/sgds-input.js.map +1 -1
  49. package/react/components/Link/link.cjs.js +1 -1
  50. package/react/components/Link/link.js +1 -1
  51. package/react/css/grid.cjs.js +1 -1
  52. package/react/css/grid.js +1 -1
  53. package/react/index.cjs.js +4 -4
  54. package/react/index.d.ts +2 -2
  55. package/react/index.js +2 -2
  56. package/themes/root.css +0 -2
  57. package/types/react.d.ts +54 -165
@@ -939,107 +939,241 @@
939
939
  },
940
940
  {
941
941
  "kind": "javascript-module",
942
- "path": "src/components/Badge/sgds-badge.ts",
942
+ "path": "src/components/Card/sgds-card.ts",
943
943
  "declarations": [
944
944
  {
945
945
  "kind": "class",
946
946
  "description": "",
947
- "name": "SgdsBadge",
947
+ "name": "SgdsCard",
948
948
  "slots": [
949
949
  {
950
- "description": "slot for badge",
950
+ "description": "The content area of the card, placed directly under the title. Accepts any HTML or custom elements.",
951
951
  "name": "default"
952
952
  },
953
953
  {
954
- "description": "The slot for icon to the left of the badge text",
954
+ "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.",
955
+ "name": "menu"
956
+ },
957
+ {
958
+ "description": "Accepts an element to be displayed above the card content. When used, it overrides image and icon slot content.",
959
+ "name": "upper"
960
+ },
961
+ {
962
+ "description": "Accepts an image or svg element of the card. Only a single element is allowed to be passed in.",
963
+ "name": "image"
964
+ },
965
+ {
966
+ "description": "Accepts an icon element to visually represent the card. Only a single element is allowed to be passed in.",
955
967
  "name": "icon"
968
+ },
969
+ {
970
+ "description": "The subtitle of the card",
971
+ "name": "subtitle"
972
+ },
973
+ {
974
+ "description": "The title of the card",
975
+ "name": "title"
976
+ },
977
+ {
978
+ "description": "The paragrapher text of the card",
979
+ "name": "description"
980
+ },
981
+ {
982
+ "description": "Accepts any additional content to be displayed below the card description, such as badges, metadata, or supplementary information.",
983
+ "name": "lower"
984
+ },
985
+ {
986
+ "description": "Footer area of the card. Accepts links, actions, or any custom content.",
987
+ "name": "footer"
988
+ },
989
+ {
990
+ "description": "(@deprecated) Deprecated since 3.3.2 in favour of `footer` slot. Legacy slot for anchor elements. Use `footer` instead.",
991
+ "name": "link"
956
992
  }
957
993
  ],
958
994
  "members": [
959
995
  {
960
996
  "kind": "field",
961
- "name": "show",
997
+ "name": "footerNode",
962
998
  "type": {
963
- "text": "boolean"
999
+ "text": "HTMLElement[]"
964
1000
  },
965
- "default": "false",
966
- "description": "Controls the appearance of the dismissible badge. This prop only applies when dismissible is true",
967
- "attribute": "show",
1001
+ "privacy": "private"
1002
+ },
1003
+ {
1004
+ "kind": "field",
1005
+ "name": "linkNode",
1006
+ "type": {
1007
+ "text": "HTMLAnchorElement[] | SgdsLink[]"
1008
+ },
1009
+ "privacy": "private"
1010
+ },
1011
+ {
1012
+ "kind": "field",
1013
+ "name": "imagePosition",
1014
+ "type": {
1015
+ "text": "CardImagePosition"
1016
+ },
1017
+ "default": "\"before\"",
1018
+ "description": "Sets the image position of the card. Available options: `before`, `after`",
1019
+ "attribute": "imagePosition",
968
1020
  "reflects": true
969
1021
  },
970
1022
  {
971
1023
  "kind": "field",
972
- "name": "variant",
1024
+ "name": "imageAdjustment",
973
1025
  "type": {
974
- "text": "\"primary\" | \"accent\" | \"success\" | \"danger\" | \"warning\" | \"cyan\" | \"purple\" | \"neutral\" | \"white\" | \"info\""
1026
+ "text": "CardImageAdjustment"
975
1027
  },
976
- "default": "\"primary\"",
977
- "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.",
978
- "attribute": "variant",
1028
+ "default": "\"default\"",
1029
+ "description": "Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio`",
1030
+ "attribute": "imageAdjustment",
979
1031
  "reflects": true
980
1032
  },
981
1033
  {
982
1034
  "kind": "field",
983
- "name": "outlined",
1035
+ "name": "hasImageSlot",
984
1036
  "type": {
985
1037
  "text": "boolean"
986
1038
  },
987
1039
  "default": "false",
988
- "description": "Manually set the outlined state to false",
989
- "attribute": "outlined",
990
- "reflects": true
1040
+ "description": "Used only for SSR to indicate the presence of the `image` slot.",
1041
+ "attribute": "hasImageSlot"
991
1042
  },
992
1043
  {
993
1044
  "kind": "field",
994
- "name": "dismissible",
1045
+ "name": "hasIconSlot",
995
1046
  "type": {
996
1047
  "text": "boolean"
997
1048
  },
998
1049
  "default": "false",
999
- "description": "Manually set the dismissible state of the button to `false`",
1000
- "attribute": "dismissible",
1001
- "reflects": true
1050
+ "description": "Used only for SSR to indicate the presence of the `icon` slot.",
1051
+ "attribute": "hasIconSlot"
1002
1052
  },
1003
1053
  {
1004
1054
  "kind": "field",
1005
- "name": "fullWidth",
1055
+ "name": "hasUpperSlot",
1006
1056
  "type": {
1007
1057
  "text": "boolean"
1008
1058
  },
1009
1059
  "default": "false",
1010
- "description": "Manually enable full width",
1011
- "attribute": "fullWidth",
1012
- "reflects": true
1060
+ "description": "Used only for SSR to indicate the presence of the `upper` slot.",
1061
+ "attribute": "hasUpperSlot"
1013
1062
  },
1014
1063
  {
1015
1064
  "kind": "field",
1016
- "name": "truncated",
1065
+ "name": "linkSlotItems",
1017
1066
  "type": {
1018
- "text": "boolean"
1067
+ "text": "HTMLAnchorElement | null"
1019
1068
  },
1020
- "privacy": "private",
1021
- "default": "false"
1069
+ "privacy": "private"
1022
1070
  },
1023
1071
  {
1024
1072
  "kind": "field",
1025
- "name": "text",
1073
+ "name": "footerSlotItems",
1026
1074
  "type": {
1027
- "text": "string"
1075
+ "text": "HTMLAnchorElement | null"
1028
1076
  },
1077
+ "privacy": "private"
1078
+ },
1079
+ {
1080
+ "kind": "field",
1081
+ "name": "hasSlotController",
1029
1082
  "privacy": "private",
1030
- "default": "\"\""
1083
+ "default": "new HasSlotController(this, \"image\", \"icon\", \"upper\")",
1084
+ "type": {}
1031
1085
  },
1032
1086
  {
1033
1087
  "kind": "method",
1034
- "name": "close",
1035
- "privacy": "public",
1036
- "description": "Closes the badge",
1088
+ "name": "handleImgSlotChange",
1089
+ "parameters": [
1090
+ {
1091
+ "name": "e",
1092
+ "type": {
1093
+ "text": "Event"
1094
+ }
1095
+ }
1096
+ ],
1037
1097
  "type": {}
1038
1098
  },
1099
+ {
1100
+ "kind": "field",
1101
+ "name": "stretchedLink",
1102
+ "type": {
1103
+ "text": "boolean"
1104
+ },
1105
+ "default": "false",
1106
+ "description": "Extends the link passed in either `footer` or `link`(deprecated) slot.",
1107
+ "attribute": "stretchedLink",
1108
+ "reflects": true,
1109
+ "inheritedFrom": {
1110
+ "name": "CardElement",
1111
+ "module": "src/base/card-element.ts"
1112
+ }
1113
+ },
1114
+ {
1115
+ "kind": "field",
1116
+ "name": "disabled",
1117
+ "type": {
1118
+ "text": "boolean"
1119
+ },
1120
+ "default": "false",
1121
+ "description": "Disables the card",
1122
+ "attribute": "disabled",
1123
+ "reflects": true,
1124
+ "inheritedFrom": {
1125
+ "name": "CardElement",
1126
+ "module": "src/base/card-element.ts"
1127
+ }
1128
+ },
1129
+ {
1130
+ "kind": "field",
1131
+ "name": "hideBorder",
1132
+ "type": {
1133
+ "text": "boolean"
1134
+ },
1135
+ "default": "false",
1136
+ "description": "When true, hides the default border of the card.",
1137
+ "attribute": "hideBorder",
1138
+ "reflects": true,
1139
+ "inheritedFrom": {
1140
+ "name": "CardElement",
1141
+ "module": "src/base/card-element.ts"
1142
+ }
1143
+ },
1144
+ {
1145
+ "kind": "field",
1146
+ "name": "tinted",
1147
+ "type": {
1148
+ "text": "boolean"
1149
+ },
1150
+ "default": "false",
1151
+ "description": "When true, applies a tinted background color to the card.",
1152
+ "attribute": "tinted",
1153
+ "reflects": true,
1154
+ "inheritedFrom": {
1155
+ "name": "CardElement",
1156
+ "module": "src/base/card-element.ts"
1157
+ }
1158
+ },
1159
+ {
1160
+ "kind": "field",
1161
+ "name": "orientation",
1162
+ "type": {
1163
+ "text": "CardOrientation"
1164
+ },
1165
+ "default": "\"vertical\"",
1166
+ "description": "Sets the orientation of the card. Available options: `vertical`, `horizontal`",
1167
+ "attribute": "orientation",
1168
+ "reflects": true,
1169
+ "inheritedFrom": {
1170
+ "name": "CardElement",
1171
+ "module": "src/base/card-element.ts"
1172
+ }
1173
+ },
1039
1174
  {
1040
1175
  "kind": "method",
1041
- "name": "_handleLabelSlotChange",
1042
- "privacy": "private",
1176
+ "name": "handleTitleSlotChange",
1043
1177
  "parameters": [
1044
1178
  {
1045
1179
  "name": "e",
@@ -1048,13 +1182,46 @@
1048
1182
  }
1049
1183
  }
1050
1184
  ],
1051
- "type": {}
1185
+ "type": {},
1186
+ "inheritedFrom": {
1187
+ "name": "CardElement",
1188
+ "module": "src/base/card-element.ts"
1189
+ }
1052
1190
  },
1053
1191
  {
1054
1192
  "kind": "method",
1055
- "name": "_renderBadge",
1056
- "privacy": "private",
1057
- "type": {}
1193
+ "name": "_forwardAnchorAttributes",
1194
+ "privacy": "protected",
1195
+ "parameters": [
1196
+ {
1197
+ "name": "anchor",
1198
+ "type": {
1199
+ "text": "HTMLAnchorElement | null"
1200
+ }
1201
+ }
1202
+ ],
1203
+ "type": {},
1204
+ "inheritedFrom": {
1205
+ "name": "CardElement",
1206
+ "module": "src/base/card-element.ts"
1207
+ }
1208
+ },
1209
+ {
1210
+ "kind": "method",
1211
+ "name": "warnLinkSlotMisused",
1212
+ "parameters": [
1213
+ {
1214
+ "name": "e",
1215
+ "type": {
1216
+ "text": "Event"
1217
+ }
1218
+ }
1219
+ ],
1220
+ "type": {},
1221
+ "inheritedFrom": {
1222
+ "name": "CardElement",
1223
+ "module": "src/base/card-element.ts"
1224
+ }
1058
1225
  },
1059
1226
  {
1060
1227
  "kind": "method",
@@ -1111,103 +1278,147 @@
1111
1278
  }
1112
1279
  }
1113
1280
  ],
1114
- "events": [
1281
+ "attributes": [
1115
1282
  {
1116
- "description": "Emitted when the badge appears.",
1117
- "name": "sgds-show",
1118
- "reactName": "onSgdsShow"
1283
+ "name": "imagePosition",
1284
+ "type": {
1285
+ "text": "CardImagePosition"
1286
+ },
1287
+ "default": "\"before\"",
1288
+ "description": "Sets the image position of the card. Available options: `before`, `after`",
1289
+ "fieldName": "imagePosition"
1119
1290
  },
1120
1291
  {
1121
- "description": "Emitted when the badge is starting to close but has not closed.",
1122
- "name": "sgds-hide",
1123
- "reactName": "onSgdsHide"
1292
+ "name": "imageAdjustment",
1293
+ "type": {
1294
+ "text": "CardImageAdjustment"
1295
+ },
1296
+ "default": "\"default\"",
1297
+ "description": "Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio`",
1298
+ "fieldName": "imageAdjustment"
1124
1299
  },
1125
1300
  {
1126
- "description": "Emitted after the badge has appeared",
1127
- "name": "sgds-after-show",
1128
- "reactName": "onSgdsAfterShow"
1301
+ "name": "hasImageSlot",
1302
+ "type": {
1303
+ "text": "boolean"
1304
+ },
1305
+ "default": "false",
1306
+ "description": "Used only for SSR to indicate the presence of the `image` slot.",
1307
+ "fieldName": "hasImageSlot"
1129
1308
  },
1130
1309
  {
1131
- "description": "Emitted after the badge has closed",
1132
- "name": "sgds-after-hide",
1133
- "reactName": "onSgdsAfterHide"
1134
- }
1135
- ],
1136
- "attributes": [
1310
+ "name": "hasIconSlot",
1311
+ "type": {
1312
+ "text": "boolean"
1313
+ },
1314
+ "default": "false",
1315
+ "description": "Used only for SSR to indicate the presence of the `icon` slot.",
1316
+ "fieldName": "hasIconSlot"
1317
+ },
1137
1318
  {
1138
- "name": "show",
1319
+ "name": "hasUpperSlot",
1139
1320
  "type": {
1140
1321
  "text": "boolean"
1141
1322
  },
1142
1323
  "default": "false",
1143
- "description": "Controls the appearance of the dismissible badge. This prop only applies when dismissible is true",
1144
- "fieldName": "show"
1324
+ "description": "Used only for SSR to indicate the presence of the `upper` slot.",
1325
+ "fieldName": "hasUpperSlot"
1145
1326
  },
1146
1327
  {
1147
- "name": "variant",
1328
+ "name": "stretchedLink",
1148
1329
  "type": {
1149
- "text": "BadgeVariant"
1330
+ "text": "boolean"
1150
1331
  },
1151
- "default": "\"primary\"",
1152
- "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.",
1153
- "fieldName": "variant"
1332
+ "default": "false",
1333
+ "description": "Extends the link passed in either `footer` or `link`(deprecated) slot.",
1334
+ "fieldName": "stretchedLink",
1335
+ "inheritedFrom": {
1336
+ "name": "CardElement",
1337
+ "module": "src/base/card-element.ts"
1338
+ }
1154
1339
  },
1155
1340
  {
1156
- "name": "outlined",
1341
+ "name": "disabled",
1157
1342
  "type": {
1158
1343
  "text": "boolean"
1159
1344
  },
1160
1345
  "default": "false",
1161
- "description": "Manually set the outlined state to false",
1162
- "fieldName": "outlined"
1346
+ "description": "Disables the card",
1347
+ "fieldName": "disabled",
1348
+ "inheritedFrom": {
1349
+ "name": "CardElement",
1350
+ "module": "src/base/card-element.ts"
1351
+ }
1352
+ },
1353
+ {
1354
+ "name": "hideBorder",
1355
+ "type": {
1356
+ "text": "boolean"
1357
+ },
1358
+ "default": "false",
1359
+ "description": "When true, hides the default border of the card.",
1360
+ "fieldName": "hideBorder",
1361
+ "inheritedFrom": {
1362
+ "name": "CardElement",
1363
+ "module": "src/base/card-element.ts"
1364
+ }
1163
1365
  },
1164
1366
  {
1165
- "name": "dismissible",
1367
+ "name": "tinted",
1166
1368
  "type": {
1167
1369
  "text": "boolean"
1168
1370
  },
1169
1371
  "default": "false",
1170
- "description": "Manually set the dismissible state of the button to `false`",
1171
- "fieldName": "dismissible"
1372
+ "description": "When true, applies a tinted background color to the card.",
1373
+ "fieldName": "tinted",
1374
+ "inheritedFrom": {
1375
+ "name": "CardElement",
1376
+ "module": "src/base/card-element.ts"
1377
+ }
1172
1378
  },
1173
1379
  {
1174
- "name": "fullWidth",
1380
+ "name": "orientation",
1175
1381
  "type": {
1176
- "text": "boolean"
1382
+ "text": "CardOrientation"
1177
1383
  },
1178
- "default": "false",
1179
- "description": "Manually enable full width",
1180
- "fieldName": "fullWidth"
1384
+ "default": "\"vertical\"",
1385
+ "description": "Sets the orientation of the card. Available options: `vertical`, `horizontal`",
1386
+ "fieldName": "orientation",
1387
+ "inheritedFrom": {
1388
+ "name": "CardElement",
1389
+ "module": "src/base/card-element.ts"
1390
+ }
1181
1391
  }
1182
1392
  ],
1183
1393
  "superclass": {
1184
- "name": "SgdsElement",
1185
- "module": "/src/base/sgds-element"
1394
+ "name": "CardElement",
1395
+ "module": "/src/base/card-element"
1186
1396
  },
1187
- "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.",
1188
- "tagName": "sgds-badge",
1397
+ "summary": "Cards can be used for headers and footers, a wide variety of content, contain contextual background colors and images.",
1398
+ "tagName": "sgds-card",
1189
1399
  "customElement": true,
1190
- "modulePath": "src/components/Badge/sgds-badge.ts",
1400
+ "modulePath": "src/components/Card/sgds-card.ts",
1191
1401
  "cssProperties": [],
1192
1402
  "cssParts": [],
1193
- "cssStates": []
1403
+ "cssStates": [],
1404
+ "events": []
1194
1405
  }
1195
1406
  ],
1196
1407
  "exports": [
1197
1408
  {
1198
1409
  "kind": "js",
1199
- "name": "SgdsBadge",
1410
+ "name": "SgdsCard",
1200
1411
  "declaration": {
1201
- "name": "SgdsBadge",
1202
- "module": "src/components/Badge/sgds-badge.ts"
1412
+ "name": "SgdsCard",
1413
+ "module": "src/components/Card/sgds-card.ts"
1203
1414
  }
1204
1415
  },
1205
1416
  {
1206
1417
  "kind": "js",
1207
1418
  "name": "default",
1208
1419
  "declaration": {
1209
- "name": "SgdsBadge",
1210
- "module": "src/components/Badge/sgds-badge.ts"
1420
+ "name": "SgdsCard",
1421
+ "module": "src/components/Card/sgds-card.ts"
1211
1422
  }
1212
1423
  }
1213
1424
  ]
@@ -2272,276 +2483,107 @@
2272
2483
  },
2273
2484
  {
2274
2485
  "kind": "javascript-module",
2275
- "path": "src/components/Card/sgds-card.ts",
2486
+ "path": "src/components/Badge/sgds-badge.ts",
2276
2487
  "declarations": [
2277
2488
  {
2278
2489
  "kind": "class",
2279
2490
  "description": "",
2280
- "name": "SgdsCard",
2491
+ "name": "SgdsBadge",
2281
2492
  "slots": [
2282
2493
  {
2283
- "description": "The content area of the card, placed directly under the title. Accepts any HTML or custom elements.",
2494
+ "description": "slot for badge",
2284
2495
  "name": "default"
2285
2496
  },
2286
2497
  {
2287
- "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.",
2288
- "name": "menu"
2289
- },
2290
- {
2291
- "description": "Accepts an element to be displayed above the card content. When used, it overrides image and icon slot content.",
2292
- "name": "upper"
2293
- },
2294
- {
2295
- "description": "Accepts an image or svg element of the card. Only a single element is allowed to be passed in.",
2296
- "name": "image"
2297
- },
2298
- {
2299
- "description": "Accepts an icon element to visually represent the card. Only a single element is allowed to be passed in.",
2498
+ "description": "The slot for icon to the left of the badge text",
2300
2499
  "name": "icon"
2301
- },
2302
- {
2303
- "description": "The subtitle of the card",
2304
- "name": "subtitle"
2305
- },
2306
- {
2307
- "description": "The title of the card",
2308
- "name": "title"
2309
- },
2310
- {
2311
- "description": "The paragrapher text of the card",
2312
- "name": "description"
2313
- },
2314
- {
2315
- "description": "Accepts any additional content to be displayed below the card description, such as badges, metadata, or supplementary information.",
2316
- "name": "lower"
2317
- },
2318
- {
2319
- "description": "Footer area of the card. Accepts links, actions, or any custom content.",
2320
- "name": "footer"
2321
- },
2322
- {
2323
- "description": "(@deprecated) Deprecated since 3.3.2 in favour of `footer` slot. Legacy slot for anchor elements. Use `footer` instead.",
2324
- "name": "link"
2325
2500
  }
2326
2501
  ],
2327
2502
  "members": [
2328
2503
  {
2329
2504
  "kind": "field",
2330
- "name": "footerNode",
2331
- "type": {
2332
- "text": "HTMLElement[]"
2333
- },
2334
- "privacy": "private"
2335
- },
2336
- {
2337
- "kind": "field",
2338
- "name": "linkNode",
2339
- "type": {
2340
- "text": "HTMLAnchorElement[] | SgdsLink[]"
2341
- },
2342
- "privacy": "private"
2343
- },
2344
- {
2345
- "kind": "field",
2346
- "name": "imagePosition",
2347
- "type": {
2348
- "text": "CardImagePosition"
2349
- },
2350
- "default": "\"before\"",
2351
- "description": "Sets the image position of the card. Available options: `before`, `after`",
2352
- "attribute": "imagePosition",
2353
- "reflects": true
2354
- },
2355
- {
2356
- "kind": "field",
2357
- "name": "imageAdjustment",
2358
- "type": {
2359
- "text": "CardImageAdjustment"
2360
- },
2361
- "default": "\"default\"",
2362
- "description": "Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio`",
2363
- "attribute": "imageAdjustment",
2364
- "reflects": true
2365
- },
2366
- {
2367
- "kind": "field",
2368
- "name": "hasImageSlot",
2369
- "type": {
2370
- "text": "boolean"
2371
- },
2372
- "default": "false",
2373
- "description": "Used only for SSR to indicate the presence of the `image` slot.",
2374
- "attribute": "hasImageSlot"
2375
- },
2376
- {
2377
- "kind": "field",
2378
- "name": "hasIconSlot",
2379
- "type": {
2380
- "text": "boolean"
2381
- },
2382
- "default": "false",
2383
- "description": "Used only for SSR to indicate the presence of the `icon` slot.",
2384
- "attribute": "hasIconSlot"
2385
- },
2386
- {
2387
- "kind": "field",
2388
- "name": "hasUpperSlot",
2505
+ "name": "show",
2389
2506
  "type": {
2390
2507
  "text": "boolean"
2391
2508
  },
2392
2509
  "default": "false",
2393
- "description": "Used only for SSR to indicate the presence of the `upper` slot.",
2394
- "attribute": "hasUpperSlot"
2395
- },
2396
- {
2397
- "kind": "field",
2398
- "name": "linkSlotItems",
2399
- "type": {
2400
- "text": "HTMLAnchorElement | null"
2401
- },
2402
- "privacy": "private"
2403
- },
2404
- {
2405
- "kind": "field",
2406
- "name": "footerSlotItems",
2407
- "type": {
2408
- "text": "HTMLAnchorElement | null"
2409
- },
2410
- "privacy": "private"
2411
- },
2412
- {
2413
- "kind": "field",
2414
- "name": "hasSlotController",
2415
- "privacy": "private",
2416
- "default": "new HasSlotController(this, \"image\", \"icon\", \"upper\")",
2417
- "type": {}
2418
- },
2419
- {
2420
- "kind": "method",
2421
- "name": "handleImgSlotChange",
2422
- "parameters": [
2423
- {
2424
- "name": "e",
2425
- "type": {
2426
- "text": "Event"
2427
- }
2428
- }
2429
- ],
2430
- "type": {}
2510
+ "description": "Controls the appearance of the dismissible badge. This prop only applies when dismissible is true",
2511
+ "attribute": "show",
2512
+ "reflects": true
2431
2513
  },
2432
2514
  {
2433
2515
  "kind": "field",
2434
- "name": "stretchedLink",
2516
+ "name": "variant",
2435
2517
  "type": {
2436
- "text": "boolean"
2518
+ "text": "\"primary\" | \"accent\" | \"success\" | \"danger\" | \"warning\" | \"cyan\" | \"purple\" | \"neutral\" | \"white\" | \"info\""
2437
2519
  },
2438
- "default": "false",
2439
- "description": "Extends the link passed in either `footer` or `link`(deprecated) slot.",
2440
- "attribute": "stretchedLink",
2441
- "reflects": true,
2442
- "inheritedFrom": {
2443
- "name": "CardElement",
2444
- "module": "src/base/card-element.ts"
2445
- }
2520
+ "default": "\"primary\"",
2521
+ "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.",
2522
+ "attribute": "variant",
2523
+ "reflects": true
2446
2524
  },
2447
2525
  {
2448
2526
  "kind": "field",
2449
- "name": "disabled",
2527
+ "name": "outlined",
2450
2528
  "type": {
2451
2529
  "text": "boolean"
2452
2530
  },
2453
2531
  "default": "false",
2454
- "description": "Disables the card",
2455
- "attribute": "disabled",
2456
- "reflects": true,
2457
- "inheritedFrom": {
2458
- "name": "CardElement",
2459
- "module": "src/base/card-element.ts"
2460
- }
2532
+ "description": "Manually set the outlined state to false",
2533
+ "attribute": "outlined",
2534
+ "reflects": true
2461
2535
  },
2462
2536
  {
2463
2537
  "kind": "field",
2464
- "name": "hideBorder",
2538
+ "name": "dismissible",
2465
2539
  "type": {
2466
2540
  "text": "boolean"
2467
2541
  },
2468
2542
  "default": "false",
2469
- "description": "When true, hides the default border of the card.",
2470
- "attribute": "hideBorder",
2471
- "reflects": true,
2472
- "inheritedFrom": {
2473
- "name": "CardElement",
2474
- "module": "src/base/card-element.ts"
2475
- }
2543
+ "description": "Manually set the dismissible state of the button to `false`",
2544
+ "attribute": "dismissible",
2545
+ "reflects": true
2476
2546
  },
2477
2547
  {
2478
2548
  "kind": "field",
2479
- "name": "tinted",
2549
+ "name": "fullWidth",
2480
2550
  "type": {
2481
2551
  "text": "boolean"
2482
2552
  },
2483
2553
  "default": "false",
2484
- "description": "When true, applies a tinted background color to the card.",
2485
- "attribute": "tinted",
2486
- "reflects": true,
2487
- "inheritedFrom": {
2488
- "name": "CardElement",
2489
- "module": "src/base/card-element.ts"
2490
- }
2554
+ "description": "Manually enable full width",
2555
+ "attribute": "fullWidth",
2556
+ "reflects": true
2491
2557
  },
2492
2558
  {
2493
2559
  "kind": "field",
2494
- "name": "orientation",
2560
+ "name": "truncated",
2495
2561
  "type": {
2496
- "text": "CardOrientation"
2497
- },
2498
- "default": "\"vertical\"",
2499
- "description": "Sets the orientation of the card. Available options: `vertical`, `horizontal`",
2500
- "attribute": "orientation",
2501
- "reflects": true,
2502
- "inheritedFrom": {
2503
- "name": "CardElement",
2504
- "module": "src/base/card-element.ts"
2505
- }
2562
+ "text": "boolean"
2563
+ },
2564
+ "privacy": "private",
2565
+ "default": "false"
2506
2566
  },
2507
2567
  {
2508
- "kind": "method",
2509
- "name": "handleTitleSlotChange",
2510
- "parameters": [
2511
- {
2512
- "name": "e",
2513
- "type": {
2514
- "text": "Event"
2515
- }
2516
- }
2517
- ],
2518
- "type": {},
2519
- "inheritedFrom": {
2520
- "name": "CardElement",
2521
- "module": "src/base/card-element.ts"
2522
- }
2568
+ "kind": "field",
2569
+ "name": "text",
2570
+ "type": {
2571
+ "text": "string"
2572
+ },
2573
+ "privacy": "private",
2574
+ "default": "\"\""
2523
2575
  },
2524
2576
  {
2525
2577
  "kind": "method",
2526
- "name": "_forwardAnchorAttributes",
2527
- "privacy": "protected",
2528
- "parameters": [
2529
- {
2530
- "name": "anchor",
2531
- "type": {
2532
- "text": "HTMLAnchorElement | null"
2533
- }
2534
- }
2535
- ],
2536
- "type": {},
2537
- "inheritedFrom": {
2538
- "name": "CardElement",
2539
- "module": "src/base/card-element.ts"
2540
- }
2578
+ "name": "close",
2579
+ "privacy": "public",
2580
+ "description": "Closes the badge",
2581
+ "type": {}
2541
2582
  },
2542
2583
  {
2543
2584
  "kind": "method",
2544
- "name": "warnLinkSlotMisused",
2585
+ "name": "_handleLabelSlotChange",
2586
+ "privacy": "private",
2545
2587
  "parameters": [
2546
2588
  {
2547
2589
  "name": "e",
@@ -2550,11 +2592,13 @@
2550
2592
  }
2551
2593
  }
2552
2594
  ],
2553
- "type": {},
2554
- "inheritedFrom": {
2555
- "name": "CardElement",
2556
- "module": "src/base/card-element.ts"
2557
- }
2595
+ "type": {}
2596
+ },
2597
+ {
2598
+ "kind": "method",
2599
+ "name": "_renderBadge",
2600
+ "privacy": "private",
2601
+ "type": {}
2558
2602
  },
2559
2603
  {
2560
2604
  "kind": "method",
@@ -2611,147 +2655,103 @@
2611
2655
  }
2612
2656
  }
2613
2657
  ],
2614
- "attributes": [
2658
+ "events": [
2615
2659
  {
2616
- "name": "imagePosition",
2617
- "type": {
2618
- "text": "CardImagePosition"
2619
- },
2620
- "default": "\"before\"",
2621
- "description": "Sets the image position of the card. Available options: `before`, `after`",
2622
- "fieldName": "imagePosition"
2660
+ "description": "Emitted when the badge appears.",
2661
+ "name": "sgds-show",
2662
+ "reactName": "onSgdsShow"
2623
2663
  },
2624
2664
  {
2625
- "name": "imageAdjustment",
2626
- "type": {
2627
- "text": "CardImageAdjustment"
2628
- },
2629
- "default": "\"default\"",
2630
- "description": "Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio`",
2631
- "fieldName": "imageAdjustment"
2665
+ "description": "Emitted when the badge is starting to close but has not closed.",
2666
+ "name": "sgds-hide",
2667
+ "reactName": "onSgdsHide"
2632
2668
  },
2633
2669
  {
2634
- "name": "hasImageSlot",
2635
- "type": {
2636
- "text": "boolean"
2637
- },
2638
- "default": "false",
2639
- "description": "Used only for SSR to indicate the presence of the `image` slot.",
2640
- "fieldName": "hasImageSlot"
2670
+ "description": "Emitted after the badge has appeared",
2671
+ "name": "sgds-after-show",
2672
+ "reactName": "onSgdsAfterShow"
2641
2673
  },
2642
2674
  {
2643
- "name": "hasIconSlot",
2644
- "type": {
2645
- "text": "boolean"
2646
- },
2647
- "default": "false",
2648
- "description": "Used only for SSR to indicate the presence of the `icon` slot.",
2649
- "fieldName": "hasIconSlot"
2650
- },
2675
+ "description": "Emitted after the badge has closed",
2676
+ "name": "sgds-after-hide",
2677
+ "reactName": "onSgdsAfterHide"
2678
+ }
2679
+ ],
2680
+ "attributes": [
2651
2681
  {
2652
- "name": "hasUpperSlot",
2682
+ "name": "show",
2653
2683
  "type": {
2654
2684
  "text": "boolean"
2655
2685
  },
2656
2686
  "default": "false",
2657
- "description": "Used only for SSR to indicate the presence of the `upper` slot.",
2658
- "fieldName": "hasUpperSlot"
2687
+ "description": "Controls the appearance of the dismissible badge. This prop only applies when dismissible is true",
2688
+ "fieldName": "show"
2659
2689
  },
2660
2690
  {
2661
- "name": "stretchedLink",
2691
+ "name": "variant",
2662
2692
  "type": {
2663
- "text": "boolean"
2693
+ "text": "BadgeVariant"
2664
2694
  },
2665
- "default": "false",
2666
- "description": "Extends the link passed in either `footer` or `link`(deprecated) slot.",
2667
- "fieldName": "stretchedLink",
2668
- "inheritedFrom": {
2669
- "name": "CardElement",
2670
- "module": "src/base/card-element.ts"
2671
- }
2695
+ "default": "\"primary\"",
2696
+ "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.",
2697
+ "fieldName": "variant"
2672
2698
  },
2673
2699
  {
2674
- "name": "disabled",
2700
+ "name": "outlined",
2675
2701
  "type": {
2676
2702
  "text": "boolean"
2677
2703
  },
2678
2704
  "default": "false",
2679
- "description": "Disables the card",
2680
- "fieldName": "disabled",
2681
- "inheritedFrom": {
2682
- "name": "CardElement",
2683
- "module": "src/base/card-element.ts"
2684
- }
2705
+ "description": "Manually set the outlined state to false",
2706
+ "fieldName": "outlined"
2685
2707
  },
2686
2708
  {
2687
- "name": "hideBorder",
2709
+ "name": "dismissible",
2688
2710
  "type": {
2689
2711
  "text": "boolean"
2690
2712
  },
2691
2713
  "default": "false",
2692
- "description": "When true, hides the default border of the card.",
2693
- "fieldName": "hideBorder",
2694
- "inheritedFrom": {
2695
- "name": "CardElement",
2696
- "module": "src/base/card-element.ts"
2697
- }
2714
+ "description": "Manually set the dismissible state of the button to `false`",
2715
+ "fieldName": "dismissible"
2698
2716
  },
2699
2717
  {
2700
- "name": "tinted",
2718
+ "name": "fullWidth",
2701
2719
  "type": {
2702
2720
  "text": "boolean"
2703
2721
  },
2704
2722
  "default": "false",
2705
- "description": "When true, applies a tinted background color to the card.",
2706
- "fieldName": "tinted",
2707
- "inheritedFrom": {
2708
- "name": "CardElement",
2709
- "module": "src/base/card-element.ts"
2710
- }
2711
- },
2712
- {
2713
- "name": "orientation",
2714
- "type": {
2715
- "text": "CardOrientation"
2716
- },
2717
- "default": "\"vertical\"",
2718
- "description": "Sets the orientation of the card. Available options: `vertical`, `horizontal`",
2719
- "fieldName": "orientation",
2720
- "inheritedFrom": {
2721
- "name": "CardElement",
2722
- "module": "src/base/card-element.ts"
2723
- }
2723
+ "description": "Manually enable full width",
2724
+ "fieldName": "fullWidth"
2724
2725
  }
2725
2726
  ],
2726
2727
  "superclass": {
2727
- "name": "CardElement",
2728
- "module": "/src/base/card-element"
2728
+ "name": "SgdsElement",
2729
+ "module": "/src/base/sgds-element"
2729
2730
  },
2730
- "summary": "Cards can be used for headers and footers, a wide variety of content, contain contextual background colors and images.",
2731
- "tagName": "sgds-card",
2731
+ "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.",
2732
+ "tagName": "sgds-badge",
2732
2733
  "customElement": true,
2733
- "modulePath": "src/components/Card/sgds-card.ts",
2734
+ "modulePath": "src/components/Badge/sgds-badge.ts",
2734
2735
  "cssProperties": [],
2735
2736
  "cssParts": [],
2736
- "cssStates": [],
2737
- "events": []
2737
+ "cssStates": []
2738
2738
  }
2739
2739
  ],
2740
2740
  "exports": [
2741
2741
  {
2742
2742
  "kind": "js",
2743
- "name": "SgdsCard",
2743
+ "name": "SgdsBadge",
2744
2744
  "declaration": {
2745
- "name": "SgdsCard",
2746
- "module": "src/components/Card/sgds-card.ts"
2745
+ "name": "SgdsBadge",
2746
+ "module": "src/components/Badge/sgds-badge.ts"
2747
2747
  }
2748
2748
  },
2749
2749
  {
2750
2750
  "kind": "js",
2751
2751
  "name": "default",
2752
2752
  "declaration": {
2753
- "name": "SgdsCard",
2754
- "module": "src/components/Card/sgds-card.ts"
2753
+ "name": "SgdsBadge",
2754
+ "module": "src/components/Badge/sgds-badge.ts"
2755
2755
  }
2756
2756
  }
2757
2757
  ]
@@ -4790,6 +4790,21 @@
4790
4790
  "module": "src/base/select-element.ts"
4791
4791
  }
4792
4792
  },
4793
+ {
4794
+ "kind": "field",
4795
+ "name": "autocomplete",
4796
+ "type": {
4797
+ "text": "string"
4798
+ },
4799
+ "default": "\"on\"",
4800
+ "description": "Controlling of autocomplete behaviour",
4801
+ "attribute": "autocomplete",
4802
+ "reflects": true,
4803
+ "inheritedFrom": {
4804
+ "name": "SelectElement",
4805
+ "module": "src/base/select-element.ts"
4806
+ }
4807
+ },
4793
4808
  {
4794
4809
  "kind": "method",
4795
4810
  "name": "setInvalid",
@@ -5670,6 +5685,19 @@
5670
5685
  "module": "src/base/select-element.ts"
5671
5686
  }
5672
5687
  },
5688
+ {
5689
+ "name": "autocomplete",
5690
+ "type": {
5691
+ "text": "string"
5692
+ },
5693
+ "default": "\"on\"",
5694
+ "description": "Controlling of autocomplete behaviour",
5695
+ "fieldName": "autocomplete",
5696
+ "inheritedFrom": {
5697
+ "name": "SelectElement",
5698
+ "module": "src/base/select-element.ts"
5699
+ }
5700
+ },
5673
5701
  {
5674
5702
  "name": "menuList",
5675
5703
  "type": {
@@ -11780,6 +11808,17 @@
11780
11808
  "attribute": "readonly",
11781
11809
  "reflects": true
11782
11810
  },
11811
+ {
11812
+ "kind": "field",
11813
+ "name": "autocomplete",
11814
+ "type": {
11815
+ "text": "string"
11816
+ },
11817
+ "default": "\"on\"",
11818
+ "description": "Controlling of autocomplete behaviour",
11819
+ "attribute": "autocomplete",
11820
+ "reflects": true
11821
+ },
11783
11822
  {
11784
11823
  "kind": "field",
11785
11824
  "name": "step",
@@ -12368,6 +12407,15 @@
12368
12407
  "description": "Makes the input readonly.",
12369
12408
  "fieldName": "readonly"
12370
12409
  },
12410
+ {
12411
+ "name": "autocomplete",
12412
+ "type": {
12413
+ "text": "string"
12414
+ },
12415
+ "default": "\"on\"",
12416
+ "description": "Controlling of autocomplete behaviour",
12417
+ "fieldName": "autocomplete"
12418
+ },
12371
12419
  {
12372
12420
  "name": "step",
12373
12421
  "type": {
@@ -16797,6 +16845,21 @@
16797
16845
  "module": "src/base/select-element.ts"
16798
16846
  }
16799
16847
  },
16848
+ {
16849
+ "kind": "field",
16850
+ "name": "autocomplete",
16851
+ "type": {
16852
+ "text": "string"
16853
+ },
16854
+ "default": "\"on\"",
16855
+ "description": "Controlling of autocomplete behaviour",
16856
+ "attribute": "autocomplete",
16857
+ "reflects": true,
16858
+ "inheritedFrom": {
16859
+ "name": "SelectElement",
16860
+ "module": "src/base/select-element.ts"
16861
+ }
16862
+ },
16800
16863
  {
16801
16864
  "kind": "method",
16802
16865
  "name": "setInvalid",
@@ -17606,6 +17669,19 @@
17606
17669
  "module": "src/base/select-element.ts"
17607
17670
  }
17608
17671
  },
17672
+ {
17673
+ "name": "autocomplete",
17674
+ "type": {
17675
+ "text": "string"
17676
+ },
17677
+ "default": "\"on\"",
17678
+ "description": "Controlling of autocomplete behaviour",
17679
+ "fieldName": "autocomplete",
17680
+ "inheritedFrom": {
17681
+ "name": "SelectElement",
17682
+ "module": "src/base/select-element.ts"
17683
+ }
17684
+ },
17609
17685
  {
17610
17686
  "name": "menuList",
17611
17687
  "type": {
@@ -26749,6 +26825,17 @@
26749
26825
  "attribute": "invalid",
26750
26826
  "reflects": true
26751
26827
  },
26828
+ {
26829
+ "kind": "field",
26830
+ "name": "autocomplete",
26831
+ "type": {
26832
+ "text": "string"
26833
+ },
26834
+ "default": "\"on\"",
26835
+ "description": "Controlling of autocomplete behaviour",
26836
+ "attribute": "autocomplete",
26837
+ "reflects": true
26838
+ },
26752
26839
  {
26753
26840
  "kind": "method",
26754
26841
  "name": "setInvalid",
@@ -27389,6 +27476,15 @@
27389
27476
  "description": "Marks the component as invalid. Replace the pseudo :invalid selector.",
27390
27477
  "fieldName": "invalid"
27391
27478
  },
27479
+ {
27480
+ "name": "autocomplete",
27481
+ "type": {
27482
+ "text": "string"
27483
+ },
27484
+ "default": "\"on\"",
27485
+ "description": "Controlling of autocomplete behaviour",
27486
+ "fieldName": "autocomplete"
27487
+ },
27392
27488
  {
27393
27489
  "name": "menuList",
27394
27490
  "type": {
@@ -27538,7 +27634,7 @@
27538
27634
  "package": {
27539
27635
  "name": "@govtechsg/sgds-web-component",
27540
27636
  "description": "",
27541
- "version": "3.21.2-rc.5",
27637
+ "version": "3.22.0",
27542
27638
  "author": "GovTechSG",
27543
27639
  "license": "MIT"
27544
27640
  }