+ {normalizedSlug}
{childrenAsArray[0]}
@@ -772,6 +920,12 @@ ExpandableTile.propTypes = {
*/
expanded: PropTypes.bool,
+ /**
+ * Specify if the `ExpandableTile` component should be rendered with rounded corners.
+ * Only valid when `slug` prop is present
+ */
+ hasRoundedCorners: PropTypes.bool,
+
/**
* An ID that can be provided to aria-labelledby
*/
diff --git a/packages/react/src/components/Tile/tile-story.scss b/packages/react/src/components/Tile/tile-story.scss
index 777faecd6462..64c83be7ab9a 100644
--- a/packages/react/src/components/Tile/tile-story.scss
+++ b/packages/react/src/components/Tile/tile-story.scss
@@ -1,4 +1,5 @@
@use '@carbon/react/scss/components/tile';
+@use '@carbon/react/scss/type';
.experimental-tile {
@include tile.tile($enable-experimental-tile-contrast: true);
@@ -7,3 +8,57 @@
div .cds--tile--selectable:not(:last-child) {
margin-block-end: 1rem;
}
+
+.slug-tile-container {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: flex-start;
+}
+
+.slug-tile-container .cds--tile {
+ max-width: 320px;
+ margin-right: 3rem;
+ margin-bottom: 3rem;
+ padding-bottom: 90px;
+}
+
+.slug-tile-container h4 {
+ margin-bottom: 1rem;
+}
+
+.slug-tile-container .ai-data {
+ margin-top: 16px;
+ padding: 16px 0;
+ display: flex;
+}
+
+.slug-tile-container .data-container {
+ width: 126px;
+}
+
+.slug-tile-container .data-container:first-of-type {
+ margin-right: 16px;
+}
+
+.slug-tile-container p {
+ @include type.type-style('body-01');
+}
+
+.slug-tile-container .data-container p {
+ @include type.type-style('label-02');
+}
+
+.slug-tile-container .arrow-right {
+ position: absolute;
+ bottom: 16px;
+ right: 16px;
+}
+
+.slug-tile-container .cds--tile-content__below-the-fold {
+ padding-top: 16px;
+}
+
+.slug-tile-container .cds--tile-content__below-the-fold p {
+ @include type.type-style('label-01');
+ margin: 8px 0 50px;
+}
diff --git a/packages/styles/scss/__tests__/theme-test.js b/packages/styles/scss/__tests__/theme-test.js
index 3d65ca32cc2d..1dd03d1c3206 100644
--- a/packages/styles/scss/__tests__/theme-test.js
+++ b/packages/styles/scss/__tests__/theme-test.js
@@ -136,6 +136,16 @@ describe('@carbon/styles/scss/theme', () => {
"slug-callout-gradient-bottom",
"slug-callout-aura-start",
"slug-callout-aura-end",
+ "slug-callout-gradient-top-hover",
+ "slug-callout-gradient-bottom-hover",
+ "slug-callout-aura-start-hover-01",
+ "slug-callout-aura-start-hover-02",
+ "slug-callout-aura-end-hover-01",
+ "slug-callout-aura-end-hover-02",
+ "slug-callout-gradient-top-selected",
+ "slug-callout-gradient-bottom-selected",
+ "slug-callout-aura-start-selected",
+ "slug-callout-aura-end-selected",
"ai-gradient-start-01",
"ai-gradient-start-02",
"ai-gradient-end",
diff --git a/packages/styles/scss/components/slug/_slug.scss b/packages/styles/scss/components/slug/_slug.scss
index 1e65431b014d..30f9a436c39a 100644
--- a/packages/styles/scss/components/slug/_slug.scss
+++ b/packages/styles/scss/components/slug/_slug.scss
@@ -4,6 +4,7 @@
@use '../../spacing' as *;
@use '../../theme' as *;
@use '../../type' as *;
+@use '../../utilities/ai-gradient' as *;
@use '../../utilities/convert';
$sizes: (
@@ -324,22 +325,12 @@ $sizes: (
// Slug callout styles
.#{$prefix}--slug.#{$prefix}--slug--enabled .#{$prefix}--slug-content {
+ @include callout-gradient();
+
border: 1px solid $border-subtle;
border-radius: 16px;
// 84px seems to make this fully opaque?
backdrop-filter: blur(25px);
- background: linear-gradient(
- 0deg,
- $slug-callout-aura-start 0%,
- $slug-callout-aura-end 33%,
- transparent 100%
- ),
- linear-gradient(
- 180deg,
- $slug-callout-gradient-top 0%,
- $slug-callout-gradient-bottom 100%
- )
- rgba(0, 0, 0, 0.01);
// box-shadow seems to match the spec better
// than the same values plugged into `drop-shadow`
// filter: drop-shadow(-45px 45px 100px rgba(0, 0, 0, 0.2));
diff --git a/packages/styles/scss/components/tile/_tile.scss b/packages/styles/scss/components/tile/_tile.scss
index c85eb0f499d2..4efab8b0ba02 100644
--- a/packages/styles/scss/components/tile/_tile.scss
+++ b/packages/styles/scss/components/tile/_tile.scss
@@ -13,6 +13,7 @@
@use '../../spacing' as *;
@use '../../theme' as *;
@use '../../type' as *;
+@use '../../utilities/ai-gradient' as *;
@use '../../utilities/button-reset';
@use '../../utilities/component-reset';
@use '../../utilities/focus-outline' as *;
@@ -368,6 +369,107 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
fill: $icon-disabled;
}
+ // Slug styles
+ .#{$prefix}--tile > .#{$prefix}--slug,
+ .#{$prefix}--tile--expandable > div > .#{$prefix}--slug,
+ .#{$prefix}--tile--clickable .#{$prefix}--tile--slug-icon {
+ position: absolute;
+ inset-block-start: $spacing-05;
+ inset-inline-end: $spacing-05;
+ }
+
+ .#{$prefix}--tile.#{$prefix}--tile--selectable > .#{$prefix}--slug {
+ inset-inline-end: $spacing-08;
+ }
+
+ .#{$prefix}--tile.#{$prefix}--tile--clickable > .#{$prefix}--slug {
+ pointer-events: none;
+ }
+
+ .#{$prefix}--tile--slug.#{$prefix}--tile {
+ @include callout-gradient();
+
+ border: 1px solid $border-tile;
+ }
+
+ .#{$prefix}--tile--slug.#{$prefix}--tile--expandable:hover {
+ @include callout-gradient();
+ }
+
+ .#{$prefix}--tile--slug.#{$prefix}--tile--selectable::before,
+ .#{$prefix}--tile--slug.#{$prefix}--tile--selectable::after,
+ .#{$prefix}--tile--slug.#{$prefix}--tile--clickable::before {
+ position: absolute;
+ display: block;
+ block-size: 100%;
+ content: '';
+ inline-size: 100%;
+ inset-block-start: 0;
+ inset-inline-start: 0;
+ opacity: 0;
+ transition: opacity $duration-fast-02 motion(standard, productive);
+ }
+
+ .#{$prefix}--tile--slug.#{$prefix}--tile--selectable::before,
+ .#{$prefix}--tile--slug.#{$prefix}--tile--clickable::before {
+ @include callout-gradient('hover');
+ }
+
+ .#{$prefix}--tile--slug.#{$prefix}--tile--selectable:hover::before,
+ .#{$prefix}--tile--slug.#{$prefix}--tile--clickable:hover::before {
+ opacity: 1;
+ }
+
+ .#{$prefix}--tile--slug.#{$prefix}--tile--selectable::after {
+ @include callout-gradient('selected');
+ }
+
+ .#{$prefix}--tile--slug.#{$prefix}--tile--is-selected::after {
+ opacity: 1;
+ }
+
+ .#{$prefix}--tile--slug.#{$prefix}--tile--is-selected {
+ border-color: $border-inverse;
+ }
+
+ .#{$prefix}--tile--slug.#{$prefix}--tile--selectable
+ .#{$prefix}--tile-content,
+ .#{$prefix}--tile--slug.#{$prefix}--tile--clickable
+ .#{$prefix}--tile-content {
+ position: relative;
+ z-index: 1;
+ cursor: pointer;
+ }
+
+ .#{$prefix}--tile--slug.#{$prefix}--tile--selectable > .#{$prefix}--slug,
+ .#{$prefix}--tile--slug.#{$prefix}--tile--selectable
+ > .#{$prefix}--tile__checkmark {
+ z-index: 1;
+ }
+
+ .#{$prefix}--tile--expandable:has(
+ .#{$prefix}--slug > .#{$prefix}--popover--open
+ ) {
+ overflow: visible;
+ }
+
+ // To Do: Replace svg overrides with actual AI icon
+ .#{$prefix}--tile--clickable .#{$prefix}--tile--slug-icon rect {
+ stroke: $icon-primary;
+ }
+
+ .#{$prefix}--tile--clickable .#{$prefix}--tile--slug-icon path {
+ fill: $icon-primary;
+ }
+
+ // Tile with slug and rounded corners
+ .#{$prefix}--tile--slug-rounded,
+ .#{$prefix}--tile--slug-rounded.#{$prefix}--tile--selectable::before,
+ .#{$prefix}--tile--slug-rounded.#{$prefix}--tile--selectable::after,
+ .#{$prefix}--tile--slug-rounded.#{$prefix}--tile--clickable::before {
+ border-radius: $spacing-05;
+ }
+
// Windows HCM fix
.#{$prefix}--tile__chevron svg,
.#{$prefix}--tile__checkmark svg,
diff --git a/packages/styles/scss/utilities/_ai-gradient.scss b/packages/styles/scss/utilities/_ai-gradient.scss
index ddf1beb042fe..b7b80c1abe70 100644
--- a/packages/styles/scss/utilities/_ai-gradient.scss
+++ b/packages/styles/scss/utilities/_ai-gradient.scss
@@ -9,12 +9,11 @@
/// Experimental - name and structure subject to change. Use at your own risk!
/// Adds AI gradient styles to a component
-/// @access public
+/// @access private
/// @param {String} $direction - Direction of gradient from: `left`, `right`, `top`, and `bottom`
/// @param {Number} $width - Percentage width of gradient with regards to parent component
/// @example @include ai-gradient('right', '33%');
/// @group utilities
-
@mixin ai-gradient($direction: 'right', $width: 33%) {
$deg: 0;
@if $direction == 'bottom' {
@@ -40,3 +39,58 @@
transparent 100%
);
}
+
+/// Experimental - name and structure subject to change. Use at your own risk!
+/// Adds callout gradient styles to a component
+/// @access private
+/// @example @include callout-gradient();
+/// @param {String} $type - Type of gradient, either 'default', 'selected' or 'hover'
+/// @group utilities
+@mixin callout-gradient($type: 'default') {
+ @if $type == 'hover' {
+ background: linear-gradient(
+ 0deg,
+ theme.$slug-callout-aura-start-hover-01 0%,
+ theme.$slug-callout-aura-end-hover-01 50%,
+ transparent 50%
+ ),
+ linear-gradient(
+ 0deg,
+ theme.$slug-callout-aura-start-hover-02 0%,
+ theme.$slug-callout-aura-end-hover-02 50%,
+ transparent 50%
+ ),
+ linear-gradient(
+ 180deg,
+ theme.$slug-callout-gradient-top-hover 0%,
+ theme.$slug-callout-gradient-bottom-hover 100%
+ )
+ rgba(0, 0, 0, 0.01);
+ } @else if $type == 'selected' {
+ background: linear-gradient(
+ 0deg,
+ theme.$slug-callout-aura-start-selected 0%,
+ theme.$slug-callout-aura-end-selected 50%,
+ transparent 50%
+ ),
+ linear-gradient(
+ 180deg,
+ theme.$slug-callout-gradient-top-selected 0%,
+ theme.$slug-callout-gradient-bottom-selected 100%
+ )
+ rgba(0, 0, 0, 0.01);
+ } @else {
+ background: linear-gradient(
+ 0deg,
+ theme.$slug-callout-aura-start 0%,
+ theme.$slug-callout-aura-end 50%,
+ transparent 50%
+ ),
+ linear-gradient(
+ 180deg,
+ theme.$slug-callout-gradient-top 0%,
+ theme.$slug-callout-gradient-bottom 100%
+ )
+ rgba(0, 0, 0, 0.01);
+ }
+}
diff --git a/packages/themes/src/g10.js b/packages/themes/src/g10.js
index 901a453a9a26..bd267a73db00 100644
--- a/packages/themes/src/g10.js
+++ b/packages/themes/src/g10.js
@@ -216,6 +216,16 @@ export const slugCalloutGradientTop = rgba(gray10, 0.85);
export const slugCalloutGradientBottom = rgba(gray20, 0.85);
export const slugCalloutAuraStart = rgba(blue10, 0.6);
export const slugCalloutAuraEnd = rgba(white, 0);
+export const slugCalloutGradientTopHover = rgba(gray20, 0.55);
+export const slugCalloutGradientBottomHover = rgba(gray20Hover, 0.55);
+export const slugCalloutAuraStartHover01 = rgba(white, 0.5);
+export const slugCalloutAuraEndHover01 = rgba(white, 0);
+export const slugCalloutAuraStartHover02 = rgba(blue20, 0.5);
+export const slugCalloutAuraEndHover02 = rgba(white, 0);
+export const slugCalloutGradientTopSelected = rgba(gray20, 0.85);
+export const slugCalloutGradientBottomSelected = rgba(gray20Hover, 0.85);
+export const slugCalloutAuraStartSelected = rgba(blue10, 0.6);
+export const slugCalloutAuraEndSelected = rgba(white, 0);
// Linear gradient tokens
export const aiGradientStart01 = rgba(coolGray10, 0.5);
export const aiGradientStart02 = rgba(blue10, 0.5);
diff --git a/packages/themes/src/g100.js b/packages/themes/src/g100.js
index c4ecdabcfc7d..8a46d6bda451 100644
--- a/packages/themes/src/g100.js
+++ b/packages/themes/src/g100.js
@@ -8,6 +8,7 @@
import {
// Blue
blue20,
+ blue20Hover,
blue40,
blue60,
blue70,
@@ -221,6 +222,16 @@ export const slugCalloutGradientTop = rgba(gray100, 0.85);
export const slugCalloutGradientBottom = rgba(gray90, 0.85);
export const slugCalloutAuraStart = rgba(blue20, 0.2);
export const slugCalloutAuraEnd = rgba(gray100, 0);
+export const slugCalloutGradientTopHover = rgba(gray80, 0.55);
+export const slugCalloutGradientBottomHover = rgba(gray80Hover, 0.55);
+export const slugCalloutAuraStartHover01 = rgba(blue20Hover, 0.3);
+export const slugCalloutAuraEndHover01 = rgba(gray100, 0);
+export const slugCalloutAuraStartHover02 = 'transparent';
+export const slugCalloutAuraEndHover02 = 'transparent';
+export const slugCalloutGradientTopSelected = rgba(gray80, 0.85);
+export const slugCalloutGradientBottomSelected = rgba(gray80Hover, 0.85);
+export const slugCalloutAuraStartSelected = rgba(blue20, 0.2);
+export const slugCalloutAuraEndSelected = rgba(gray100, 0);
// Linear gradient tokens
export const aiGradientStart01 = rgba(blue20, 0.2);
export const aiGradientStart02 = 'transparent';
diff --git a/packages/themes/src/g90.js b/packages/themes/src/g90.js
index 927b38703e95..6e0d751e139d 100644
--- a/packages/themes/src/g90.js
+++ b/packages/themes/src/g90.js
@@ -8,6 +8,7 @@
import {
// Blue
blue20,
+ blue20Hover,
blue40,
blue60,
blue70,
@@ -221,6 +222,16 @@ export const slugCalloutGradientTop = rgba(gray100, 0.85);
export const slugCalloutGradientBottom = rgba(gray90, 0.85);
export const slugCalloutAuraStart = rgba(blue20, 0.2);
export const slugCalloutAuraEnd = rgba(gray100, 0);
+export const slugCalloutGradientTopHover = rgba(gray80, 0.55);
+export const slugCalloutGradientBottomHover = rgba(gray80Hover, 0.55);
+export const slugCalloutAuraStartHover01 = rgba(blue20Hover, 0.3);
+export const slugCalloutAuraEndHover01 = rgba(gray100, 0);
+export const slugCalloutAuraStartHover02 = 'transparent';
+export const slugCalloutAuraEndHover02 = 'transparent';
+export const slugCalloutGradientTopSelected = rgba(gray80, 0.85);
+export const slugCalloutGradientBottomSelected = rgba(gray80Hover, 0.85);
+export const slugCalloutAuraStartSelected = rgba(blue20, 0.2);
+export const slugCalloutAuraEndSelected = rgba(gray100, 0);
// Linear gradient tokens
export const aiGradientStart01 = rgba(blue20, 0.2);
export const aiGradientStart02 = 'transparent';
diff --git a/packages/themes/src/tokens/__tests__/__snapshots__/v11-test.js.snap b/packages/themes/src/tokens/__tests__/__snapshots__/v11-test.js.snap
index b8e4a889f81d..bac8344e6b5b 100644
--- a/packages/themes/src/tokens/__tests__/__snapshots__/v11-test.js.snap
+++ b/packages/themes/src/tokens/__tests__/__snapshots__/v11-test.js.snap
@@ -247,6 +247,16 @@ Array [
"slug-callout-gradient-bottom",
"slug-callout-aura-start",
"slug-callout-aura-end",
+ "slug-callout-gradient-top-hover",
+ "slug-callout-gradient-bottom-hover",
+ "slug-callout-aura-start-hover-01",
+ "slug-callout-aura-start-hover-02",
+ "slug-callout-aura-end-hover-01",
+ "slug-callout-aura-end-hover-02",
+ "slug-callout-gradient-top-selected",
+ "slug-callout-gradient-bottom-selected",
+ "slug-callout-aura-start-selected",
+ "slug-callout-aura-end-selected",
"ai-gradient-start-01",
"ai-gradient-start-02",
"ai-gradient-end",
diff --git a/packages/themes/src/tokens/__tests__/metadata-test.js b/packages/themes/src/tokens/__tests__/metadata-test.js
index 6cb4c034a189..22c8a0071cc8 100644
--- a/packages/themes/src/tokens/__tests__/metadata-test.js
+++ b/packages/themes/src/tokens/__tests__/metadata-test.js
@@ -961,6 +961,46 @@ test('metadata', () => {
"name": "slug-callout-aura-end",
"type": "color",
},
+ Object {
+ "name": "slug-callout-gradient-top-hover",
+ "type": "color",
+ },
+ Object {
+ "name": "slug-callout-gradient-bottom-hover",
+ "type": "color",
+ },
+ Object {
+ "name": "slug-callout-aura-start-hover-01",
+ "type": "color",
+ },
+ Object {
+ "name": "slug-callout-aura-start-hover-02",
+ "type": "color",
+ },
+ Object {
+ "name": "slug-callout-aura-end-hover-01",
+ "type": "color",
+ },
+ Object {
+ "name": "slug-callout-aura-end-hover-02",
+ "type": "color",
+ },
+ Object {
+ "name": "slug-callout-gradient-top-selected",
+ "type": "color",
+ },
+ Object {
+ "name": "slug-callout-gradient-bottom-selected",
+ "type": "color",
+ },
+ Object {
+ "name": "slug-callout-aura-start-selected",
+ "type": "color",
+ },
+ Object {
+ "name": "slug-callout-aura-end-selected",
+ "type": "color",
+ },
Object {
"name": "ai-gradient-start-01",
"type": "color",
diff --git a/packages/themes/src/tokens/v11TokenGroup.js b/packages/themes/src/tokens/v11TokenGroup.js
index 205295029f6f..a9ee25a7810e 100644
--- a/packages/themes/src/tokens/v11TokenGroup.js
+++ b/packages/themes/src/tokens/v11TokenGroup.js
@@ -354,6 +354,16 @@ export const ai = TokenGroup.create({
'slug-callout-gradient-bottom',
'slug-callout-aura-start',
'slug-callout-aura-end',
+ 'slug-callout-gradient-top-hover',
+ 'slug-callout-gradient-bottom-hover',
+ 'slug-callout-aura-start-hover-01',
+ 'slug-callout-aura-start-hover-02',
+ 'slug-callout-aura-end-hover-01',
+ 'slug-callout-aura-end-hover-02',
+ 'slug-callout-gradient-top-selected',
+ 'slug-callout-gradient-bottom-selected',
+ 'slug-callout-aura-start-selected',
+ 'slug-callout-aura-end-selected',
'ai-gradient-start-01',
'ai-gradient-start-02',
'ai-gradient-end',
diff --git a/packages/themes/src/white.js b/packages/themes/src/white.js
index 58f1fefbc4d9..e2e0913439a3 100644
--- a/packages/themes/src/white.js
+++ b/packages/themes/src/white.js
@@ -216,6 +216,16 @@ export const slugCalloutGradientTop = rgba(gray10, 0.85);
export const slugCalloutGradientBottom = rgba(gray20, 0.85);
export const slugCalloutAuraStart = rgba(blue10, 0.6);
export const slugCalloutAuraEnd = rgba(white, 0);
+export const slugCalloutGradientTopHover = rgba(gray20, 0.55);
+export const slugCalloutGradientBottomHover = rgba(gray20Hover, 0.55);
+export const slugCalloutAuraStartHover01 = rgba(white, 0.5);
+export const slugCalloutAuraEndHover01 = rgba(white, 0);
+export const slugCalloutAuraStartHover02 = rgba(blue20, 0.5);
+export const slugCalloutAuraEndHover02 = rgba(white, 0);
+export const slugCalloutGradientTopSelected = rgba(gray20, 0.85);
+export const slugCalloutGradientBottomSelected = rgba(gray20Hover, 0.85);
+export const slugCalloutAuraStartSelected = rgba(blue10, 0.6);
+export const slugCalloutAuraEndSelected = rgba(white, 0);
// Linear gradient tokens
export const aiGradientStart01 = rgba(coolGray10, 0.5);
export const aiGradientStart02 = rgba(blue10, 0.5);