Skip to content

Commit

Permalink
feat(tile): slug ai updates (carbon-design-system#11484)
Browse files Browse the repository at this point in the history
### Related Ticket(s)

Follows: carbon-design-system/carbon#15596 & carbon-design-system/carbon#15591
### Description

Updates Tile with carbon gradient
### Changelog

**Changed**

- new carbon upgrade (using RC atm -> will need to update to full release)
- updated tile slug styles like core
- the new core styles fix an error with number-input slug revert styles


<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
  • Loading branch information
ariellalgilmore authored Feb 2, 2024
1 parent f398f7b commit 5006fcb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion packages/carbon-web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"dependencies": {
"@babel/runtime": "^7.16.3",
"@carbon/ibm-products-styles": "2.20.1",
"@carbon/styles": "1.48.1",
"@carbon/styles": "1.49.0",
"flatpickr": "4.6.1",
"lit": "^2.7.6",
"lodash-es": "^4.17.21"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@

// Slug

:host(#{$prefix}-modal) .#{$prefix}--modal-container {
@include callout-gradient('default');
:host(#{$prefix}-modal[slug]) .#{$prefix}--modal-container {
@include callout-gradient('');

background-color: $layer;
}

:host(#{$prefix}-modal[has-two-buttons]) .#{$prefix}--modal-container {
:host(#{$prefix}-modal[slug][has-two-buttons]) .#{$prefix}--modal-container {
@include callout-gradient('default', 64px);

background-color: $layer;
Expand Down
6 changes: 0 additions & 6 deletions packages/carbon-web-components/src/components/slug/slug.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ $colorMap: (
}
}

:host(#{$prefix}-slug[enabled][with-actions]) {
.#{$prefix}--toggletip-content {
max-inline-size: to-rem(334px);
}
}

:host(#{$prefix}-slug[enabled]:not([with-actions])) {
.#{$prefix}--toggletip-content {
max-inline-size: to-rem(320px);
Expand Down
28 changes: 16 additions & 12 deletions packages/carbon-web-components/src/components/tile/tile.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright IBM Corp. 2019, 2023
// Copyright IBM Corp. 2019, 2024
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -95,10 +95,6 @@ $css--plex: true !default;
.#{$prefix}--tile__chevron {
@extend .#{$prefix}--tile__chevron;
}

::slotted(#{$prefix}-slug) {
inset-inline-end: $spacing-08;
}
}

:host(#{$prefix}-radio-tile),
Expand Down Expand Up @@ -178,9 +174,11 @@ $css--plex: true !default;
:host(#{$prefix}-expandable-tile[slug]),
:host(#{$prefix}-clickable-tile[slug]) .#{$prefix}--tile,
:host(#{$prefix}-selectable-tile[slug]) .#{$prefix}--tile {
@include callout-gradient();
@include callout-gradient('default', 0, 'layer');

border: 1px solid $border-tile;
border: 1px solid transparent;
box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow,
0 4px 10px 2px $ai-drop-shadow;
}

:host(#{$prefix}-tile),
Expand All @@ -194,8 +192,12 @@ $css--plex: true !default;
}
}

:host(#{$prefix}-selectable-tile) ::slotted(#{$prefix}-slug) {
inset-inline-end: $spacing-08;
}

:host(#{$prefix}-expandable-tile[slug]):hover {
@include callout-gradient();
@include callout-gradient('default', 0, 'layer');
}

:host(#{$prefix}-selectable-tile[slug]) .#{$prefix}--tile::before,
Expand All @@ -214,7 +216,9 @@ $css--plex: true !default;

:host(#{$prefix}-selectable-tile[slug]) .#{$prefix}--tile::before,
:host(#{$prefix}-clickable-tile[slug]) .#{$prefix}--tile::before {
@include callout-gradient('hover');
@include callout-gradient('hover', 0, 'layer');

box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow;
}

:host(#{$prefix}-selectable-tile[slug]) .#{$prefix}--tile:hover::before,
Expand All @@ -230,9 +234,9 @@ $css--plex: true !default;
}

:host(#{$prefix}-selectable-tile[slug]) .#{$prefix}--tile--is-selected::after {
@include callout-gradient('selected');
@include callout-gradient('selected', 0, 'layer');

opacity: 1;
box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow;
}

:host(#{$prefix}-expandable-tile[slug]) {
Expand All @@ -246,6 +250,6 @@ $css--plex: true !default;
@extend .#{$prefix}--tile--slug-rounded;

.#{$prefix}--tile__chevron {
border-end-end-radius: $spacing-05;
border-end-end-radius: $spacing-03;
}
}

0 comments on commit 5006fcb

Please sign in to comment.