Skip to content

Commit

Permalink
Merge branch 'main' of github.com:carbon-design-system/carbon-for-ibm…
Browse files Browse the repository at this point in the history
…-dotcom into deps/update-carbon-packages
  • Loading branch information
kennylam committed Jan 18, 2024
2 parents 212117d + 0950a2e commit 6202732
Show file tree
Hide file tree
Showing 95 changed files with 1,620 additions and 7,352 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Build project
run: yarn lerna run --ignore build
run: yarn lerna run build

- name: Set env vars
uses: ./.github/actions/set-dotenv
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Build project
run: yarn lerna run --ignore --ignore @carbon/ibmdotcom-web-components --ignore @carbon/web-components build
run: yarn lerna run --ignore @carbon/ibmdotcom-web-components --ignore @carbon/web-components build
- name: Set env vars
uses: ./.github/actions/set-dotenv
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests-parallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Download any existing cache
id: yarn-cache
with:
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
name: storybook-build
path: packages/web-components/storybook-static

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Retrieve yarn cache
id: yarn-cache
with:
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions 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/styles": "^1.46.0",
"@carbon/styles": "1.47.0",
"flatpickr": "4.6.1",
"lit": "^2.7.6",
"lodash-es": "^4.17.21"
Expand All @@ -89,8 +89,8 @@
"@babel/preset-modules": "^0.1.5",
"@babel/template": "~7.12.0",
"@babel/traverse": "~7.23.0",
"@carbon/icon-helpers": "^10.45.1",
"@carbon/icons": "^11.31.0",
"@carbon/icon-helpers": "10.45.1",
"@carbon/icons": "11.31.0",
"@open-wc/semantic-dom-diff": "~0.18.0",
"@percy-io/in-percy": "^0.1.11",
"@percy/cli": "^1.27.4",
Expand Down
12 changes: 10 additions & 2 deletions packages/carbon-web-components/src/components/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ class CDSTooltip extends HostListenerMixin(CDSPopover) {
@property({ reflect: true })
size = false;

/**
* Specify the timeout reference for the tooltip
*/
@property({ reflect: true })
timeoutId = 0;

/**
* Specify whether the tooltip should be open when it first renders
*/
Expand All @@ -77,7 +83,8 @@ class CDSTooltip extends HostListenerMixin(CDSPopover) {
* Handles `mouseover` event on this element.
*/
private _handleHover = async () => {
setTimeout(async () => {
window.clearTimeout(this.timeoutId);
this.timeoutId = window.setTimeout(async () => {
this.open = true;
const { open, updateComplete } = this;
if (open) {
Expand All @@ -93,7 +100,8 @@ class CDSTooltip extends HostListenerMixin(CDSPopover) {
* Handles `mouseleave` event on this element.
*/
private _handleHoverOut = async () => {
setTimeout(async () => {
window.clearTimeout(this.timeoutId);
this.timeoutId = window.setTimeout(async () => {
const { open } = this;
if (open) {
this.open = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,10 @@ const mockTranslation: Partial<Translation> = {
},
{
title: 'menu-title-foo',
menuSections: [
submenu: [
{
menuItems: [
{
title: 'menu-item-title-bar',
url: 'https://carbon-design-system.github.io/carbon-for-ibm-dotcom/canary/web-components/bar',
},
],
title: 'menu-item-title-bar',
url: 'https://carbon-design-system.github.io/carbon-for-ibm-dotcom/canary/web-components/bar',
},
],
},
Expand All @@ -54,7 +50,7 @@ const mockTranslation: Partial<Translation> = {
};

const endpoint =
'/common/carbon-for-ibm-dotcom/translations/masthead-footer/v2';
'/common/carbon-for-ibm-dotcom/translations/masthead-footer/v2.1';

describe('Redux actions for `TranslateAPI`', () => {
it('dispatches the action to set translation data', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,10 @@ const mockTranslation: Partial<Translation> = {
},
{
title: 'menu-title-foo',
menuSections: [
submenu: [
{
menuItems: [
{
title: 'menu-item-title-bar',
url: 'https://carbon-design-system.github.io/carbon-for-ibm-dotcom/canary/web-components/bar',
},
],
title: 'menu-item-title-bar',
url: 'https://carbon-design-system.github.io/carbon-for-ibm-dotcom/canary/web-components/bar',
},
],
},
Expand Down
137 changes: 41 additions & 96 deletions packages/services-store/src/types/translateAPI.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2023
* 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 Down Expand Up @@ -29,69 +29,29 @@ export interface BasicLinkSet {
links: BasicLink[];
}

/**
* A feature in mega panel.
*/
export interface MegapanelFeature {
heading?: string;
imageUrl?: string;
linkTitle?: string;
linkUrl?: string;
}

/**
* A content in mega panel.
*/
export interface MegapanelContent {
headingTitle?: string;
headingUrl?: string;
description?: string;
quickLinks: BasicLinkSet;
feature: MegapanelFeature;
export interface L0Menu {
items: L0MenuItem[];
}

/**
* A menu item in masthead.
*/
export interface MastheadMenuItem {
title: string;
titleEnglish?: string;
url?: string;
highlighted?: boolean;
megaPanelViewAll?: boolean;
megapanelContent?: MegapanelContent;
export interface L0MenuItem extends BasicLink {
submenu?: L0Megamenu | BasicLink[];
}

/**
* A menu section in masthead.
*/
export interface MastheadMenuSection {
heading?: string;
menuItems: MastheadMenuItem[];
export interface L0Megamenu {
sections: Megapanel[];
highlights?: MegapanelLinkGroup[];
viewAll?: BasicLink;
}

/**
* An item in masthead.
*/
export interface MastheadLink {
title: string;
titleEnglish?: string;
url?: string;
hasMenu?: boolean;
hasMegapanel?: boolean;
megamenuLayout?: 'tab' | 'list';
menuSections?: MastheadMenuSection[];
export interface Megapanel {
heading?: BasicLink;
groups: MegapanelLinkGroup[];
viewAll?: BasicLink;
}

/**
* A menu section for masthead
*
* @deprecated
*/
export interface LegacyMastheadL1 {
title: string;
url?: string;
menuItems?: MastheadLink[];
export interface MegapanelLinkGroup {
heading?: BasicLink;
links?: BasicLink[];
}

/**
Expand Down Expand Up @@ -176,12 +136,13 @@ export interface MastheadLogoData {

/**
* Cloud Masthead Profile content
*
* @deprecated
*/
export interface MastheadProfileContent {
iconLabel: string;
links: MastheadProfileItem[];
ctaButtons: MastheadProfileItem[];
contactUsButton: string;
}

/**
Expand All @@ -194,11 +155,16 @@ export interface MiscLabels {
* The translation data for ibm.com sites
*/
export interface Translation {
/**
* Main masthead navigation data.
*
* @deprecated Use masthead.nav instead.
*/
mastheadNav: {
/**
* The nav links.
*/
links: MastheadLink[];
links: L0MenuItem[];
};

/**
Expand All @@ -211,8 +177,25 @@ export interface Translation {
*/
footerThin: BasicLink[];

/**
* Masthead items other than main navigation
*/
masthead: {
logo: MastheadLogoData;
nav: L0MenuItem[];
contact: MastheadProfileItem;
profileMenu: {
unauthenticated: MastheadProfileItem[];
authenticated: MastheadProfileItem[];
signedin: MastheadProfileContent;
signedout: MastheadProfileContent;
};
};

/**
* The profile menus.
*
* @deprecated Use masthead.profileMenu instead.
*/
profileMenu: {
/**
Expand All @@ -226,18 +209,6 @@ export interface Translation {
signedout: MastheadProfileItem[];
};

/**
* Cloud masthead items
*/
masthead: {
logo: MastheadLogoData;
contact: MastheadProfileContent;
profileMenu: {
signedout: MastheadProfileContent;
signedin: MastheadProfileContent;
};
};

/**
* Miscellaneous translations
*/
Expand Down Expand Up @@ -296,29 +267,3 @@ export interface TranslateAPIState {
*/
errorsRequestTranslation?: { [language: string]: Error };
}

// New for v2.1.0
export interface L0Menu {
items: L0MenuItem[];
}

export interface L0MenuItem extends BasicLink {
submenu?: L0Megamenu | BasicLink[];
}

export interface L0Megamenu {
sections: Megapanel[];
highlights?: MegapanelLinkGroup[];
viewAll?: BasicLink;
}

export interface Megapanel {
heading?: BasicLink;
groups: MegapanelLinkGroup[];
viewAll?: BasicLink;
}

export interface MegapanelLinkGroup {
heading?: BasicLink;
links?: BasicLink[];
}
39 changes: 39 additions & 0 deletions packages/services/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,45 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.1.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-01-17)

**Note:** Version bump only for package @carbon/ibmdotcom-services





# [2.1.0-rc.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-01-09)


### Bug Fixes

* **tests:** fix unit test snapshots and misc fixes ([#11203](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/issues/11203)) ([766682c](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/commit/766682cb732c86950f2a345bdbd5ad871dd5d9c5))



# 1.53.0 (2023-11-15)



# 1.53.0-rc.2 (2023-11-06)



# 1.53.0-rc.1 (2023-11-02)



# 1.52.0-rc.0 (2023-10-03)



# 1.51.0 (2023-09-19)





# [2.0.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2023-12-11)

**Note:** Version bump only for package @carbon/ibmdotcom-services
Expand Down
4 changes: 2 additions & 2 deletions packages/services/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/ibmdotcom-services",
"description": "Carbon for IBM.com Services",
"version": "2.0.0",
"version": "2.1.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -46,7 +46,7 @@
},
"dependencies": {
"@babel/runtime": "^7.16.3",
"@carbon/ibmdotcom-utilities": "2.0.0",
"@carbon/ibmdotcom-utilities": "2.1.0",
"@carbon/telemetry": "0.1.0",
"axios": "^1.6.0",
"marked": "^4.0.10",
Expand Down
Loading

0 comments on commit 6202732

Please sign in to comment.