@govtechsg/sgds-web-component 3.3.3-rc.2 → 3.4.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 (161) hide show
  1. package/Masthead/index.js +1 -1
  2. package/base/card-element.d.ts +2 -1
  3. package/base/card-element.js +2 -10
  4. package/base/card-element.js.map +1 -1
  5. package/base/card.js +1 -1
  6. package/base/sgds-element2.js +1 -1
  7. package/components/Accordion/index.umd.js +1 -1
  8. package/components/Alert/index.umd.js +1 -1
  9. package/components/Badge/index.umd.js +1 -1
  10. package/components/Breadcrumb/index.umd.js +1 -1
  11. package/components/Button/index.umd.js +1 -1
  12. package/components/Card/index.umd.js +3716 -3705
  13. package/components/Card/index.umd.js.map +1 -1
  14. package/components/Card/sgds-card.d.ts +8 -1
  15. package/components/Card/sgds-card.js +47 -14
  16. package/components/Card/sgds-card.js.map +1 -1
  17. package/components/Checkbox/index.umd.js +1 -1
  18. package/components/ComboBox/index.umd.js +9 -1
  19. package/components/ComboBox/index.umd.js.map +1 -1
  20. package/components/ComboBox/sgds-combo-box.d.ts +4 -0
  21. package/components/ComboBox/sgds-combo-box.js +8 -0
  22. package/components/ComboBox/sgds-combo-box.js.map +1 -1
  23. package/components/Datepicker/index.umd.js +1 -1
  24. package/components/DescriptionList/index.umd.js +1 -1
  25. package/components/Divider/index.umd.js +1 -1
  26. package/components/Drawer/drawer.js +1 -1
  27. package/components/Drawer/index.umd.js +17 -4
  28. package/components/Drawer/index.umd.js.map +1 -1
  29. package/components/Drawer/sgds-drawer.d.ts +8 -0
  30. package/components/Drawer/sgds-drawer.js +15 -2
  31. package/components/Drawer/sgds-drawer.js.map +1 -1
  32. package/components/Dropdown/index.umd.js +1 -1
  33. package/components/FileUpload/index.umd.js +1 -1
  34. package/components/Footer/index.umd.js +1 -1
  35. package/components/Icon/index.umd.js +1 -1
  36. package/components/IconButton/index.umd.js +1 -1
  37. package/components/IconCard/index.umd.js +93 -137
  38. package/components/IconCard/index.umd.js.map +1 -1
  39. package/components/IconCard/sgds-icon-card.d.ts +7 -2
  40. package/components/IconCard/sgds-icon-card.js +39 -12
  41. package/components/IconCard/sgds-icon-card.js.map +1 -1
  42. package/components/IconList/index.umd.js +1 -1
  43. package/components/ImageCard/index.umd.js +91 -136
  44. package/components/ImageCard/index.umd.js.map +1 -1
  45. package/components/ImageCard/sgds-image-card.d.ts +7 -2
  46. package/components/ImageCard/sgds-image-card.js +37 -11
  47. package/components/ImageCard/sgds-image-card.js.map +1 -1
  48. package/components/Input/index.umd.js +1 -1
  49. package/components/Link/index.umd.js +1 -1
  50. package/components/Mainnav/index.umd.js +44 -63
  51. package/components/Mainnav/index.umd.js.map +1 -1
  52. package/components/Mainnav/mainnav-context.d.ts +4 -1
  53. package/components/Mainnav/mainnav-context.js +3 -2
  54. package/components/Mainnav/mainnav-context.js.map +1 -1
  55. package/components/Mainnav/sgds-mainnav-dropdown.d.ts +1 -3
  56. package/components/Mainnav/sgds-mainnav-dropdown.js +13 -33
  57. package/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
  58. package/components/Mainnav/sgds-mainnav-item.js +4 -2
  59. package/components/Mainnav/sgds-mainnav-item.js.map +1 -1
  60. package/components/Mainnav/sgds-mainnav.d.ts +4 -2
  61. package/components/Mainnav/sgds-mainnav.js +26 -28
  62. package/components/Mainnav/sgds-mainnav.js.map +1 -1
  63. package/components/Masthead/index.umd.js +1 -1
  64. package/components/Modal/index.umd.js +1 -1
  65. package/components/OverflowMenu/index.umd.js +1 -1
  66. package/components/Pagination/index.umd.js +1 -1
  67. package/components/ProgressBar/index.umd.js +1 -1
  68. package/components/QuantityToggle/index.umd.js +1 -1
  69. package/components/Radio/index.umd.js +1 -1
  70. package/components/Select/index.umd.js +12 -1
  71. package/components/Select/index.umd.js.map +1 -1
  72. package/components/Select/sgds-select.d.ts +5 -0
  73. package/components/Select/sgds-select.js +11 -0
  74. package/components/Select/sgds-select.js.map +1 -1
  75. package/components/Sidenav/index.umd.js +1 -1
  76. package/components/Skeleton/index.umd.js +1 -1
  77. package/components/Spinner/index.umd.js +1 -1
  78. package/components/Stepper/index.umd.js +1 -1
  79. package/components/Subnav/index.umd.js +1 -1
  80. package/components/Switch/index.umd.js +1 -1
  81. package/components/Tab/index.umd.js +1 -1
  82. package/components/Table/index.umd.js +1 -1
  83. package/components/TableOfContents/index.umd.js +1 -1
  84. package/components/Textarea/index.umd.js +1 -1
  85. package/components/ThumbnailCard/index.umd.js +93 -142
  86. package/components/ThumbnailCard/index.umd.js.map +1 -1
  87. package/components/ThumbnailCard/sgds-thumbnail-card.d.ts +7 -2
  88. package/components/ThumbnailCard/sgds-thumbnail-card.js +38 -16
  89. package/components/ThumbnailCard/sgds-thumbnail-card.js.map +1 -1
  90. package/components/ThumbnailCard/thumbnail-card.js +1 -1
  91. package/components/Toast/index.umd.js +1 -1
  92. package/components/Tooltip/index.umd.js +1 -1
  93. package/components/index.umd.js +238 -121
  94. package/components/index.umd.js.map +1 -1
  95. package/index.umd.js +238 -121
  96. package/index.umd.js.map +1 -1
  97. package/package.json +1 -1
  98. package/react/base/card-element.cjs.js +2 -10
  99. package/react/base/card-element.cjs.js.map +1 -1
  100. package/react/base/card-element.js +2 -10
  101. package/react/base/card-element.js.map +1 -1
  102. package/react/base/card.cjs.js +1 -1
  103. package/react/base/card.js +1 -1
  104. package/react/base/sgds-element.cjs2.js +1 -1
  105. package/react/base/sgds-element2.js +1 -1
  106. package/react/combo-box/index.cjs.js +3 -0
  107. package/react/combo-box/index.cjs.js.map +1 -1
  108. package/react/combo-box/index.js +3 -0
  109. package/react/combo-box/index.js.map +1 -1
  110. package/react/components/Card/sgds-card.cjs.js +46 -13
  111. package/react/components/Card/sgds-card.cjs.js.map +1 -1
  112. package/react/components/Card/sgds-card.js +47 -14
  113. package/react/components/Card/sgds-card.js.map +1 -1
  114. package/react/components/ComboBox/sgds-combo-box.cjs.js +8 -0
  115. package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
  116. package/react/components/ComboBox/sgds-combo-box.js +8 -0
  117. package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
  118. package/react/components/Drawer/drawer.cjs.js +1 -1
  119. package/react/components/Drawer/drawer.js +1 -1
  120. package/react/components/Drawer/sgds-drawer.cjs.js +15 -2
  121. package/react/components/Drawer/sgds-drawer.cjs.js.map +1 -1
  122. package/react/components/Drawer/sgds-drawer.js +15 -2
  123. package/react/components/Drawer/sgds-drawer.js.map +1 -1
  124. package/react/components/IconCard/sgds-icon-card.cjs.js +38 -11
  125. package/react/components/IconCard/sgds-icon-card.cjs.js.map +1 -1
  126. package/react/components/IconCard/sgds-icon-card.js +39 -12
  127. package/react/components/IconCard/sgds-icon-card.js.map +1 -1
  128. package/react/components/ImageCard/sgds-image-card.cjs.js +36 -10
  129. package/react/components/ImageCard/sgds-image-card.cjs.js.map +1 -1
  130. package/react/components/ImageCard/sgds-image-card.js +37 -11
  131. package/react/components/ImageCard/sgds-image-card.js.map +1 -1
  132. package/react/components/Mainnav/mainnav-context.cjs.js +4 -2
  133. package/react/components/Mainnav/mainnav-context.cjs.js.map +1 -1
  134. package/react/components/Mainnav/mainnav-context.js +3 -2
  135. package/react/components/Mainnav/mainnav-context.js.map +1 -1
  136. package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js +12 -32
  137. package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js.map +1 -1
  138. package/react/components/Mainnav/sgds-mainnav-dropdown.js +13 -33
  139. package/react/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
  140. package/react/components/Mainnav/sgds-mainnav-item.cjs.js +4 -2
  141. package/react/components/Mainnav/sgds-mainnav-item.cjs.js.map +1 -1
  142. package/react/components/Mainnav/sgds-mainnav-item.js +4 -2
  143. package/react/components/Mainnav/sgds-mainnav-item.js.map +1 -1
  144. package/react/components/Mainnav/sgds-mainnav.cjs.js +25 -27
  145. package/react/components/Mainnav/sgds-mainnav.cjs.js.map +1 -1
  146. package/react/components/Mainnav/sgds-mainnav.js +26 -28
  147. package/react/components/Mainnav/sgds-mainnav.js.map +1 -1
  148. package/react/components/Select/sgds-select.cjs.js +11 -0
  149. package/react/components/Select/sgds-select.cjs.js.map +1 -1
  150. package/react/components/Select/sgds-select.js +11 -0
  151. package/react/components/Select/sgds-select.js.map +1 -1
  152. package/react/components/ThumbnailCard/sgds-thumbnail-card.cjs.js +37 -15
  153. package/react/components/ThumbnailCard/sgds-thumbnail-card.cjs.js.map +1 -1
  154. package/react/components/ThumbnailCard/sgds-thumbnail-card.js +38 -16
  155. package/react/components/ThumbnailCard/sgds-thumbnail-card.js.map +1 -1
  156. package/react/components/ThumbnailCard/thumbnail-card.cjs.js +1 -1
  157. package/react/components/ThumbnailCard/thumbnail-card.js +1 -1
  158. package/react/select/index.cjs.js +3 -0
  159. package/react/select/index.cjs.js.map +1 -1
  160. package/react/select/index.js +3 -0
  161. package/react/select/index.js.map +1 -1
@@ -4322,6 +4322,56 @@
4322
4322
  });
4323
4323
  }
4324
4324
 
4325
+ /**
4326
+ * @license
4327
+ * Copyright 2021 Google LLC
4328
+ * SPDX-License-Identifier: BSD-3-Clause
4329
+ */
4330
+ /**
4331
+ * A property decorator that converts a class property into a getter that
4332
+ * returns the `assignedElements` of the given `slot`. Provides a declarative
4333
+ * way to use
4334
+ * [`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).
4335
+ *
4336
+ * Can be passed an optional {@linkcode QueryAssignedElementsOptions} object.
4337
+ *
4338
+ * Example usage:
4339
+ * ```ts
4340
+ * class MyElement {
4341
+ * @queryAssignedElements({ slot: 'list' })
4342
+ * listItems!: Array<HTMLElement>;
4343
+ * @queryAssignedElements()
4344
+ * unnamedSlotEls!: Array<HTMLElement>;
4345
+ *
4346
+ * render() {
4347
+ * return html`
4348
+ * <slot name="list"></slot>
4349
+ * <slot></slot>
4350
+ * `;
4351
+ * }
4352
+ * }
4353
+ * ```
4354
+ *
4355
+ * Note, the type of this property should be annotated as `Array<HTMLElement>`.
4356
+ *
4357
+ * @category Decorator
4358
+ */
4359
+ function queryAssignedElements(options) {
4360
+ return ((obj, name) => {
4361
+ const { slot, selector } = options ?? {};
4362
+ const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;
4363
+ return desc(obj, name, {
4364
+ get() {
4365
+ const slotEl = this.renderRoot?.querySelector(slotSelector);
4366
+ const elements = slotEl?.assignedElements(options) ?? [];
4367
+ return (selector === undefined
4368
+ ? elements
4369
+ : elements.filter((node) => node.matches(selector)));
4370
+ },
4371
+ });
4372
+ });
4373
+ }
4374
+
4325
4375
  /**
4326
4376
  * @license
4327
4377
  * Copyright 2017 Google LLC
@@ -4499,7 +4549,7 @@
4499
4549
  */
4500
4550
  const classMap = directive(ClassMapDirective);
4501
4551
 
4502
- var css_248z$8 = css`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-body);margin:0;*,:after,:before{box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;
4552
+ var css_248z$7 = css`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-body);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;
4503
4553
 
4504
4554
  /**
4505
4555
  * @cssprop --sgds-{stateColor} - State colors in hexadecimal value
@@ -4556,76 +4606,11 @@
4556
4606
  });
4557
4607
  }
4558
4608
  }
4559
- SgdsElement.styles = [css_248z$8];
4609
+ SgdsElement.styles = [css_248z$7];
4560
4610
  /** @internal */
4561
4611
  SgdsElement.dependencies = {};
4562
4612
 
4563
- var css_248z$7 = css`:host{display:inline-flex}.nav-link::slotted(a){color:var(--sgds-link-color-default);cursor:pointer;line-height:var(--sgds-line-height-body);text-decoration:none!important}.nav-link::slotted(a:focus),.nav-link::slotted(a:focus-visible),.nav-link::slotted(a:hover),.nav-link::slotted(a[active]){color:var( --sgds-link-color-emphasis)}.nav-link::slotted(a:focus),.nav-link::slotted(a:focus-visible){outline:0}.nav-link::slotted(a:focus-visible:not([disabled])){box-shadow:var(--sgds-box-shadow-focus)}.nav-link::slotted(a[disabled]){cursor:not-allowed;opacity:var(--sgds-opacity-50)}:host([variant=danger]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-danger-color-default);color:var(--sgds-link-color-default,--sgds-danger-color-default)}:host([variant=danger]) .nav-link::slotted(a:focus),:host([variant=danger]) .nav-link::slotted(a:focus-visible),:host([variant=danger]) .nav-link::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-danger-color-emphasis);color:var(--sgds-link-color-emphasis,--sgds-danger-color-emphasis)}:host([variant=neutral]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default)}:host([variant=neutral]) .nav-link::slotted(a:focus),:host([variant=neutral]) .nav-link::slotted(a:focus-visible),:host([variant=neutral]) .nav-link::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,--sgds-color-default)}:host([variant=light]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-light);color:var(--sgds-link-color-default,--sgds-color-fixed-light)}:host([variant=light]) .nav-link::slotted(a:focus),:host([variant=light]) .nav-link::slotted(a:focus-visible),:host([variant=light]) .nav-link::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-link-color-emphasis,--sgds-color-fixed-light)}:host([variant=dark]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-dark);color:var(--sgds-link-color-default,--sgds-color-fixed-dark)}:host([variant=dark]) .nav-link::slotted(a:focus),:host([variant=dark]) .nav-link::slotted(a:focus-visible),:host([variant=dark]) .nav-link::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-fixed-dark);color:var(--sgds-link-color-emphasis,--sgds-color-fixed-dark)}:host([size=lg]) .nav-link::slotted(a){font-size:var(--sgds-font-size-3)!important}:host([size=sm]) .nav-link::slotted(a){font-size:var(--sgds-font-size-1)!important;line-height:var(--sgds-line-height-min)}:host([size=xs]) .nav-link::slotted(a){font-size:var(--sgds-font-size-0)!important;line-height:var(--sgds-line-height-16)}`;
4564
-
4565
- /**
4566
- * @summary Link allows users to click and navigate their way from page to page
4567
- *
4568
- * @slot default - Pass in a single anchor tag here
4569
- */
4570
- class SgdsLink extends SgdsElement {
4571
- constructor() {
4572
- super(...arguments);
4573
- /** Determines the size of the link */
4574
- this.size = "md";
4575
- /** when true, sets the active stylings of the link */
4576
- this.variant = "primary";
4577
- }
4578
- _processAnchor(anchor) {
4579
- if (anchor.hasAttribute("disabled")) {
4580
- anchor.setAttribute("href", "javascript:void(0)");
4581
- anchor.setAttribute("tabindex", "-1");
4582
- }
4583
- else {
4584
- anchor.setAttribute("tabindex", "0");
4585
- }
4586
- }
4587
- _processIcon(anchor) {
4588
- const icons = anchor.querySelectorAll("sgds-icon");
4589
- icons.forEach(icon => {
4590
- icon.classList.remove("icon-left", "icon-right");
4591
- if (!icon.previousElementSibling && !icon.previousSibling) {
4592
- icon.classList.add("icon-left");
4593
- }
4594
- if (!icon.nextElementSibling && !icon.nextSibling) {
4595
- icon.classList.add("icon-right");
4596
- }
4597
- });
4598
- }
4599
- _handleSlotChange(e) {
4600
- const anchor = e.target
4601
- .assignedElements()
4602
- .find(el => el.tagName.toLowerCase() === "a");
4603
- if (anchor) {
4604
- this._processAnchor(anchor);
4605
- this._processIcon(anchor);
4606
- }
4607
- }
4608
- firstUpdated() {
4609
- const anchor = this.querySelector("a");
4610
- if (anchor) {
4611
- this._processAnchor(anchor);
4612
- this._processIcon(anchor);
4613
- }
4614
- }
4615
- render() {
4616
- /** When removing href, link is no longer focusable */
4617
- return html$1 `<slot class="nav-link" @slotchange=${this._handleSlotChange}></slot>`;
4618
- }
4619
- }
4620
- SgdsLink.styles = [...SgdsElement.styles, css_248z$7];
4621
- __decorate([
4622
- property({ type: String, reflect: true })
4623
- ], SgdsLink.prototype, "size", void 0);
4624
- __decorate([
4625
- property({ type: String, reflect: true })
4626
- ], SgdsLink.prototype, "variant", void 0);
4627
-
4628
- var css_248z$6 = css`:host([disabled]){cursor:not-allowed}:host([orientation=horizontal]) .card{flex-direction:row}:host(:not([hideBorder])) .card{border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([orientation=horizontal]) .card-body{flex:1}:host([orientation=horizontal]) .card-media{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-xl)}:host([orientation=horizontal]) .card-image{width:40%}:host([imagePosition=after]) .card-image{order:1}:host([orientation=vertical][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-left-radius:var(--sgds-border-radius-none);border-top-right-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-bottom-left-radius:var(--sgds-border-radius-none);border-top-left-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal]) slot[name=image]::slotted(img){border-bottom-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:var(--sgds-border-radius-none);height:100%;object-fit:cover}:host([orientation=vertical][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-sm) var(--sgds-margin-sm)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-none) var(--sgds-margin-sm) var(--sgds-margin-sm)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-margin-none)}:host([orientation][imageAdjustment="padding around"]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1))}:host([orientation=vertical]:not([imageAdjustment="aspect ratio"])) slot[name=image]::slotted(img){height:auto}:host([orientation=vertical][imageAdjustment="aspect ratio"]) slot[name=image]::slotted(img){object-fit:cover}.card{word-wrap:break-word;background-clip:border-box;background-color:var(--sgds-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);box-shadow:none;display:flex;flex-direction:column;height:100%;min-width:0;position:relative;transition:box-shadow .3s ease}a.card{color:initial;text-decoration:none}@media (prefers-reduced-motion:reduce){.card{transition:none}}.card.disabled{opacity:var(--sgds-opacity-50);pointer-events:none}a.card:focus{outline:0}a.card:not(.disabled):focus-visible{box-shadow:var(--sgds-box-shadow-focus)}.card-tinted-bg{border-radius:var(--sgds-border-radius-md);bottom:0;left:0;opacity:var(--sgds-opacity-0);position:absolute;right:0;top:0}.card-image{flex:1;position:relative}.card-media{align-items:flex-start;display:flex;justify-content:space-between;line-height:0;padding:var(--sgds-padding-xl) var(--sgds-padding-xl) var(--sgds-padding-none)}.card-thumbnail{align-items:center;border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-full);display:flex;height:var(--sgds-dimension-80);justify-content:center;width:var(--sgds-dimension-80)}.card-body{color:var(--sgds-body-color-default);display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-xl);padding:var(--sgds-padding-xl);z-index:1}.card-header-container{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}.card-header{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.card-title{--sgds-font-size-5:var(--sgds-font-size-4);--sgds-font-size-6:var(--sgds-font-size-4);--sgds-margin-2-xs:var(--sgds-margin-none);--sgds-font-weight-bold:var(--sgds-font-weight-semibold);color:var(--sgds-body-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold)}.card-subtitle,.card-text,.card-title{margin-bottom:var(--sgds-margin-none)}slot[name=subtitle]::slotted(*){--sgds-margin-2-xs:var(--sgds-margin-none);--sgds-margin-xs:var(--sgds-margin-none);--sgds-font-size-4:var(--sgds-font-size-1);--sgds-font-size-5:var(--sgds-font-size-1);--sgds-font-size-6:var(--sgds-font-size-1);--sgds-font-weight-bold:var(--sgds-font-weight-semibold);--sgds-line-height-heading:var(--sgds-line-height-min);--sgds-letter-spacing-tight:var(--sgds-letter-spacing-wide);color:var(--sgds-color-default);font-size:var(--sgds-font-size-1);font-weight:var(--sgds-font-weight-semibold);letter-spacing:var(--sgds-letter-spacing-wide);line-height:var(--sgds-line-height-min);margin:var(--sgds-margin-none);text-transform:uppercase}slot[name=title]::slotted(a){--sgds-font-size-2:var(--sgds-font-size-4);--sgds-font-weight-regular:var(--sgds-font-weight-semibold);color:var(--sgds-link-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold);text-decoration:none!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle)}slot[name=image]::slotted(img){border-top-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));display:block;width:100%}slot[name=link]::slotted(*){font-weight:700;margin-top:auto;padding-top:var(--sgds-padding-sm)}slot[name=link]::slotted(a){color:var(--sgds-link-color-default);height:auto!important;text-decoration:none!important}slot[name=link]::slotted(a:focus),slot[name=link]::slotted(a:hover),slot[name=title]::slotted(a:focus),slot[name=title]::slotted(a:hover){color:var(--sgds-link-color-emphasis)}slot[name=link]::slotted(a:focus),slot[name=title]::slotted(a:focus){outline:0}slot[name=link]::slotted(a:focus-visible),slot[name=title]::slotted(a:focus-visible){box-shadow:var(--sgds-box-shadow-focus)}`;
4613
+ var css_248z$6 = css`:host([disabled]){cursor:not-allowed}:host([stretchedLink]) slot[name=footer]::slotted(a),:host([stretchedLink]) slot[name=footer]::slotted(sgds-link),:host([stretchedLink]) slot[name=link]::slotted(a),:host([stretchedLink]) slot[name=link]::slotted(sgds-link){display:none}:host([orientation=horizontal]) .card{flex-direction:row}:host(:not([hideBorder])) .card{border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([orientation=horizontal]) .card-body{flex:1}:host([orientation=horizontal]) .card-media{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-xl)}:host([orientation=horizontal]) .card-image{width:40%}:host([imagePosition=after]) .card-image{order:1}:host([orientation=vertical][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-left-radius:var(--sgds-border-radius-none);border-top-right-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-bottom-left-radius:var(--sgds-border-radius-none);border-top-left-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal]) slot[name=image]::slotted(img){border-bottom-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:var(--sgds-border-radius-none);height:100%;object-fit:cover}:host([orientation=vertical][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-sm) var(--sgds-margin-sm)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-none) var(--sgds-margin-sm) var(--sgds-margin-sm)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-margin-none)}:host([orientation][imageAdjustment="padding around"]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1))}:host([orientation=vertical]:not([imageAdjustment="aspect ratio"])) slot[name=image]::slotted(img){height:auto}:host([orientation=vertical][imageAdjustment="aspect ratio"]) slot[name=image]::slotted(img){object-fit:cover}.card{word-wrap:break-word;background-clip:border-box;background-color:var(--sgds-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);box-shadow:none;display:flex;flex-direction:column;height:100%;min-width:0;position:relative;transition:box-shadow .3s ease}a.card{color:initial;text-decoration:none}@media (prefers-reduced-motion:reduce){.card{transition:none}}.card.disabled{opacity:var(--sgds-opacity-50);pointer-events:none}a.card:focus{outline:0}a.card:not(.disabled):focus-visible{box-shadow:var(--sgds-box-shadow-focus)}.card-tinted-bg{border-radius:var(--sgds-border-radius-md);bottom:0;left:0;opacity:var(--sgds-opacity-0);position:absolute;right:0;top:0}.card-image{flex:1;position:relative}.card-media{align-items:flex-start;display:flex;justify-content:space-between;line-height:0;padding:var(--sgds-padding-xl) var(--sgds-padding-xl) var(--sgds-padding-none)}.card-body{color:var(--sgds-body-color-default);display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-xl);padding:var(--sgds-padding-xl);z-index:1}.card-header-container{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}.card-header{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.card-title{--sgds-font-size-5:var(--sgds-font-size-4);--sgds-font-size-6:var(--sgds-font-size-4);--sgds-margin-2-xs:var(--sgds-margin-none);--sgds-font-weight-bold:var(--sgds-font-weight-semibold);color:var(--sgds-body-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold);margin-bottom:var(--sgds-margin-none)}slot[name=subtitle]::slotted(*){--sgds-margin-2-xs:var(--sgds-margin-none);--sgds-margin-xs:var(--sgds-margin-none);--sgds-font-size-4:var(--sgds-font-size-1);--sgds-font-size-5:var(--sgds-font-size-1);--sgds-font-size-6:var(--sgds-font-size-1);--sgds-font-weight-bold:var(--sgds-font-weight-semibold);--sgds-line-height-heading:var(--sgds-line-height-min);--sgds-letter-spacing-tight:var(--sgds-letter-spacing-wide);color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-1);font-weight:var(--sgds-font-weight-semibold);letter-spacing:var(--sgds-letter-spacing-wide);line-height:var(--sgds-line-height-min);margin:var(--sgds-margin-none);text-transform:uppercase}slot[name=title]::slotted(a){--sgds-font-size-2:var(--sgds-font-size-4);--sgds-font-weight-regular:var(--sgds-font-weight-semibold);color:var(--sgds-link-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold);text-decoration:none!important}slot[name=description]::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none);color:var(--sgds-color-subtle);margin-bottom:var(--sgds-paragraph-spacing-xl,--sgds-margin-none)}slot[name=image]::slotted(img){border-top-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));display:block;width:100%}slot[name=footer]::slotted(*),slot[name=link]::slotted(*){margin-top:auto;padding-top:var(--sgds-padding-sm);width:fit-content}slot[name=footer]::slotted(a),slot[name=link]::slotted(a){color:var(--sgds-link-color-default);height:auto!important;text-decoration:none!important}slot[name=footer]::slotted(a:focus),slot[name=footer]::slotted(a:hover),slot[name=link]::slotted(a:focus),slot[name=link]::slotted(a:hover),slot[name=title]::slotted(a:focus),slot[name=title]::slotted(a:hover){color:var(--sgds-link-color-emphasis)}slot[name=footer]::slotted(a:focus),slot[name=link]::slotted(a:focus),slot[name=title]::slotted(a:focus){outline:0}slot[name=footer]::slotted(a:focus-visible),slot[name=link]::slotted(a:focus-visible),slot[name=title]::slotted(a:focus-visible){box-shadow:var(--sgds-box-shadow-focus)}`;
4629
4614
 
4630
4615
  var css_248z$5 = css`.text-primary{color:var(--sgds-primary-rgb)!important}.text-secondary{color:var(--sgds-secondary-rgb)!important}.text-success{color:var(--sgds-success-rgb)!important}.text-info{color:var(--sgds-info-rgb)!important}.text-warning{color:var(--sgds-warning-rgb)!important}.text-danger{color:var(--sgds-danger-rgb)!important}.text-light{color:var(--sgds-light-rgb)!important}.text-dark{color:var(--sgds-dark-rgb)!important}.text-muted{color:var(--sgds-secondary-color)!important}`;
4631
4616
 
@@ -4640,7 +4625,8 @@
4640
4625
  class CardElement extends SgdsElement {
4641
4626
  constructor() {
4642
4627
  super(...arguments);
4643
- /** Extends the link passed in slot[name="link"] to the entire card */
4628
+ /** Extends the link passed in the `link` slot to the entire card. Prefer using the `footer` slot for links going forward. The `link` slot is still supported for backward compatibility, but is **deprecated** and will be removed in a future release.
4629
+ */
4644
4630
  this.stretchedLink = false;
4645
4631
  /** Disables the card */
4646
4632
  this.disabled = false;
@@ -4664,14 +4650,6 @@
4664
4650
  if (childNodes.length > 1) {
4665
4651
  return console.error("Multiple elements passed into SgdsCard's link slot");
4666
4652
  }
4667
- if (!this.stretchedLink)
4668
- return;
4669
- if (childNodes[0] instanceof HTMLAnchorElement || childNodes[0] instanceof SgdsLink) {
4670
- const hyperlink = (childNodes[0].querySelector("a") || childNodes[0]);
4671
- this.card.setAttribute("href", hyperlink.href);
4672
- const linkSlot = this.shadowRoot.querySelector("slot[name='link']");
4673
- linkSlot.style.display = "none";
4674
- }
4675
4653
  }
4676
4654
  }
4677
4655
  CardElement.styles = [...SgdsElement.styles, css_248z$5, css_248z$4, css_248z$3, css_248z$2, css_248z$1, css_248z$6];
@@ -4694,56 +4672,6 @@
4694
4672
  property({ type: String, reflect: true })
4695
4673
  ], CardElement.prototype, "orientation", void 0);
4696
4674
 
4697
- class HasSlotController {
4698
- constructor(host, ...slotNames) {
4699
- this.slotNames = [];
4700
- (this.host = host).addController(this);
4701
- this.slotNames = slotNames;
4702
- this.handleSlotChange = this.handleSlotChange.bind(this);
4703
- }
4704
- hasDefaultSlot() {
4705
- return [...this.host.childNodes].some(node => {
4706
- var _a;
4707
- if (node.nodeType === node.TEXT_NODE && ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== "") {
4708
- return true;
4709
- }
4710
- if (node.nodeType === node.ELEMENT_NODE) {
4711
- const el = node;
4712
- const tagName = el.tagName.toLowerCase();
4713
- // Ignore visually hidden elements since they aren't rendered
4714
- if (tagName === "sl-visually-hidden") {
4715
- return false;
4716
- }
4717
- // If it doesn't have a slot attribute, it's part of the default slot
4718
- if (!el.hasAttribute("slot")) {
4719
- return true;
4720
- }
4721
- }
4722
- return false;
4723
- });
4724
- }
4725
- hasNamedSlot(name) {
4726
- return this.host.querySelector(`:scope > [slot="${name}"]`) !== null;
4727
- }
4728
- test(slotName) {
4729
- return slotName === "[default]" ? this.hasDefaultSlot() : this.hasNamedSlot(slotName);
4730
- }
4731
- hostConnected() {
4732
- var _a;
4733
- (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener("slotchange", this.handleSlotChange);
4734
- }
4735
- hostDisconnected() {
4736
- var _a;
4737
- (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeEventListener("slotchange", this.handleSlotChange);
4738
- }
4739
- handleSlotChange(event) {
4740
- const slot = event.target;
4741
- if ((this.slotNames.includes("[default]") && !slot.name) || (slot.name && this.slotNames.includes(slot.name))) {
4742
- this.host.requestUpdate();
4743
- }
4744
- }
4745
- }
4746
-
4747
4675
  var css_248z = css`:host([noPadding]) .card{border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent)}:host(:not([noPadding])) .card:not(.disabled):hover{box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 8px 16px 0 hsla(0,0%,5%,.12)}:host([orientation=vertical][noPadding]) .card-body{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none)}:host([orientation=vertical][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none)}:host([orientation=horizontal][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl)}:host([orientation=horizontal][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none)}:host([tinted]:not([noPadding])) .card-tinted-bg{background-color:var(--sgds-bg-translucent-subtle);opacity:var(--sgds-opacity-50)}:host([orientation][noPadding]) .card-media{padding:var(--sgds-padding-none)}`;
4748
4676
 
4749
4677
  /**
@@ -4755,16 +4683,30 @@
4755
4683
  * @slot title - The title of the card
4756
4684
  * @slot description - The paragrapher text of the card
4757
4685
  * @slot lower - Accepts any additional content to be displayed below the card description, such as badges, metadata, or supplementary information.
4758
- * @slot link - Accepts an anchor element. Only a single element is allowed to be passed in.
4686
+ * @slot footer - Footer area of the card. Accepts links, actions, or any custom content.
4687
+ * @slot link - (@deprecated) Deprecated since 3.3.2 in favour of `footer` slot.
4688
+ * Legacy slot for anchor elements. Use `footer` instead.
4759
4689
  */
4760
4690
  class SgdsIconCard extends CardElement {
4761
4691
  constructor() {
4762
4692
  super(...arguments);
4763
4693
  /** Removes the card's internal padding when set to true. */
4764
4694
  this.noPadding = false;
4765
- this.hasSlotController = new HasSlotController(this, "description");
4695
+ }
4696
+ get linkSlotItems() {
4697
+ if (!this.linkNode || this.linkNode.length === 0)
4698
+ return null;
4699
+ const element = this.linkNode[0];
4700
+ return (element.querySelector("a") || element);
4701
+ }
4702
+ get footerSlotItems() {
4703
+ if (!this.footerNode || this.footerNode.length === 0)
4704
+ return null;
4705
+ const element = this.footerNode[0];
4706
+ return (element.querySelector("a") || element);
4766
4707
  }
4767
4708
  firstUpdated() {
4709
+ var _a, _b;
4768
4710
  if (this._iconNode.length === 0) {
4769
4711
  if ((this.orientation === "vertical" && this._upperNode.length === 0) || this.orientation === "horizontal") {
4770
4712
  const media = this.shadowRoot.querySelector(".card-media");
@@ -4774,14 +4716,24 @@
4774
4716
  body.style.padding = "0px";
4775
4717
  }
4776
4718
  }
4719
+ if (this.stretchedLink) {
4720
+ const footerHref = (_a = this.footerSlotItems) === null || _a === void 0 ? void 0 : _a.href;
4721
+ const linkHref = (_b = this.linkSlotItems) === null || _b === void 0 ? void 0 : _b.href;
4722
+ if (footerHref) {
4723
+ this.card.setAttribute("href", footerHref);
4724
+ }
4725
+ else if (linkHref) {
4726
+ this.card.setAttribute("href", linkHref);
4727
+ }
4728
+ }
4777
4729
  }
4778
4730
  render() {
4779
4731
  const tag = this.stretchedLink ? literal `a` : literal `div`;
4780
4732
  const cardTabIndex = !this.stretchedLink || this.disabled ? -1 : 0;
4781
- const hasDescriptionSlot = this.hasSlotController.test("description");
4782
4733
  return html `
4783
4734
  <${tag}
4784
- class="card ${classMap({
4735
+ class="${classMap({
4736
+ card: true,
4785
4737
  disabled: this.disabled
4786
4738
  })}"
4787
4739
  tabindex=${cardTabIndex}
@@ -4800,13 +4752,11 @@
4800
4752
  </div>
4801
4753
  <slot></slot>
4802
4754
  </div>
4803
- ${hasDescriptionSlot
4804
- ? html `<p class="card-text">
4805
- <slot name="description"></slot>
4806
- </p>`
4807
- : nothing}
4755
+ <slot name="description"></slot>
4808
4756
  <slot name="lower"></slot>
4809
- <slot name="link" @slotchange=${this.handleLinkSlotChange}></slot>
4757
+ <slot name="footer">
4758
+ <slot name="link" @slotchange=${this.handleLinkSlotChange}></slot>
4759
+ </slot>
4810
4760
  </div>
4811
4761
  </${tag}>
4812
4762
  `;
@@ -4819,6 +4769,12 @@
4819
4769
  __decorate([
4820
4770
  queryAssignedNodes({ slot: "upper", flatten: true })
4821
4771
  ], SgdsIconCard.prototype, "_upperNode", void 0);
4772
+ __decorate([
4773
+ queryAssignedElements({ slot: "footer" })
4774
+ ], SgdsIconCard.prototype, "footerNode", void 0);
4775
+ __decorate([
4776
+ queryAssignedElements({ slot: "link" })
4777
+ ], SgdsIconCard.prototype, "linkNode", void 0);
4822
4778
  __decorate([
4823
4779
  property({ type: Boolean, reflect: true })
4824
4780
  ], SgdsIconCard.prototype, "noPadding", void 0);