Skip to content

Commit

Permalink
Release catchup (#12148)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-blum authored Dec 5, 2024
1 parent a05e9bc commit 9fd006f
Show file tree
Hide file tree
Showing 21 changed files with 466 additions and 129 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/automerge-mastheadv2.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/e2e-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: e2e-integration

on:
push:
branches: [ main, release/v2*, feat/masthead-v2, feat/masthead-v2-dev ]
branches: [ main, release/v2* ]
schedule:
- cron: '0 20 * * 1-5'

Expand Down
9 changes: 8 additions & 1 deletion packages/styles/scss/components/card-group/_card-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,18 @@
&::after {
content: revert;
}

&::after {
display: block;
aspect-ratio: 16 / 9;
content: '';
grid-area: 1 / 1 / -1 / -1;
}
}

.#{$prefix}--card__content {
display: grid;
grid-row: span 10;
grid-area: 1 / 1 / -1 / -1;
grid-template-rows: subgrid;
row-gap: 0;
}
Expand Down
6 changes: 0 additions & 6 deletions packages/styles/scss/components/card/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,6 @@
flex-direction: column;
gap: $spacing-05;
}

::slotted(div) {
/* stylelint-disable declaration-no-important */
// need the !important to prevent CSS reset styles from overwritting margin for tags
margin-inline-start: -$spacing-02 !important;
}
}

:host(#{$c4d-prefix}-card[aspect-ratio='1:1']) .#{$prefix}--card__wrapper {
Expand Down
29 changes: 25 additions & 4 deletions packages/styles/scss/components/feature-card/_feature-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ $feature-flags: (
flex: 1 0 50%;
}

.#{$prefix}--card__image-wrapper {
aspect-ratio: 1 / 1;
}

.#{$prefix}--card__wrapper {
&::before,
&::after {
Expand Down Expand Up @@ -247,10 +251,27 @@ $feature-flags: (
}
}

:host(#{$c4d-prefix}-feature-card-footer)[color-scheme='inverse']
.#{$c4d-prefix}-ce--card__footer
::slotted(svg[slot='icon']) {
fill: $link-inverse;
:host(#{$c4d-prefix}-feature-card-footer)[color-scheme='inverse'] {
.#{$c4d-prefix}-ce--card__footer {
.#{$c4d-prefix}-ce--cta__icon,
::slotted(svg[slot='icon']) {
fill: $link-inverse;
}

&:hover {
.#{$c4d-prefix}-ce--cta__icon,
::slotted(svg[slot='icon']) {
fill: $link-inverse-hover;
}
}

&:active {
.#{$c4d-prefix}-ce--cta__icon,
::slotted(svg[slot='icon']) {
fill: $link-inverse-active;
}
}
}
}

:host(#{$c4d-prefix}-feature-card[size='large']) {
Expand Down
1 change: 1 addition & 0 deletions packages/styles/scss/components/leadspace/_leadspace.scss
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ $btn-min-width: 26;

:host(#{$c4d-prefix}-leadspace) ::slotted([slot='navigation']) {
z-index: 1;
max-inline-size: 40rem;
// need the !important to prevent CSS reset styles from overwritting margin for tags
/* stylelint-disable declaration-no-important */
padding-block-end: $spacing-05 !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
@use '@carbon/styles/scss/spacing' as *;
@use '@carbon/styles/scss/theme' as *;
@use '@carbon/styles/scss/utilities/convert';
@use '@carbon/type';

@include type.reset();

@mixin notice-choice {
.#{$prefix}--nc {
Expand All @@ -17,6 +20,7 @@
p,
.#{$prefix}--checkbox-group {
margin-block-end: $spacing-06;
@include type.type-style('legal-02');
}

a {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ $hover-transition-timing: 95ms;
@extend .#{$prefix}--col-lg-12;

box-sizing: border-box;
padding-block: $spacing-05 $spacing-09;
}

.#{$prefix}--tableofcontents {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
}

::slotted(#{$c4d-prefix}-content-group:not([slot])),
::slotted(#{$c4d-prefix}-cta-block-item-row:not([slot])),
::slotted([data-autoid^='c4d--tabs-']:not([slot])),
::slotted([data-autoid^='c4d--card']:not([slot])) {
margin-inline-start: 0;
Expand Down
17 changes: 8 additions & 9 deletions packages/web-components/.storybook/container.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// @license
//
// Copyright IBM Corp. 2020, 2021
// Copyright IBM Corp. 2020, 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 All @@ -25,28 +25,28 @@
@include grid.flex-grid();

:root {
@include theme($white, true);
@include theme($white);

height: 100%;
block-size: 100%;
}

:root[storybook-carbon-theme='g10'] {
@include theme($g10, true);
@include theme($g10);
}

:root[storybook-carbon-theme='g90'] {
@include theme($g90, true);
@include theme($g90);
}

:root[storybook-carbon-theme='g100'] {
@include theme($g100, true);
@include theme($g100);
}

body {
// `@include css-body` has `font-family: inherit` via `@include type-style('body-short-01')`,
// which kills `font-family` from `@include carbon--type-reset`
color: $text-primary;
background-color: $background;
color: $text-primary;
line-height: 1;
}

Expand All @@ -71,6 +71,5 @@ html {
}

.c4d-story-padding {
padding-top: $spacing-05;
padding-bottom: $spacing-05;
padding-block: $spacing-05;
}
12 changes: 8 additions & 4 deletions packages/web-components/src/components/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
* LICENSE file in the root directory of this source tree.
*/

import { LitElement, html } from 'lit';
import { html, LitElement } from 'lit';
import { property, query } from 'lit/decorators.js';
import settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';
import styles from './button.scss';
import StableSelectorMixin from '../../globals/mixins/stable-selector';
import { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
import CTAMixin from '../../component-mixins/cta/cta';
import CTAMixin, { ariaLabels, icons } from '../../component-mixins/cta/cta';
import CDSButton from '@carbon/web-components/es/components/button/button.js';
import { CTA_TYPE } from '../cta/defs';

import { ariaLabels, icons } from '../../component-mixins/cta/cta';
const { prefix, stablePrefix: c4dPrefix } = settings;

/**
Expand Down Expand Up @@ -89,7 +89,11 @@ class C4DButton extends CTAMixin(StableSelectorMixin(CDSButton)) {
*/
// @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to
private _handleVideoTitleUpdate = async (event) => {
if (event) {
if (
event &&
this.ctaType === CTA_TYPE.VIDEO &&
this.href === event.detail?.videoId
) {
const { videoDuration, videoName } = event.detail as any;
const { formatVideoDuration, formatVideoCaption } = this;
const formattedVideoDuration = formatVideoDuration({
Expand Down
4 changes: 3 additions & 1 deletion packages/web-components/src/components/card/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ class C4DCard extends CTAMixin(StableSelectorMixin(CDSLink)) {
formatVideoCaption: formatVideoCaptionInEffect,
formatVideoDuration: formatVideoDurationInEffect,
} = this;
const footer = this.querySelector(`${c4dPrefix}-card-footer`);
const footer = this.querySelector(
(this.constructor as typeof C4DCard).selectorFooter
);

const headingText = this.querySelector(
`${c4dPrefix}-card-heading`
Expand Down
Loading

0 comments on commit 9fd006f

Please sign in to comment.