Skip to content

Commit

Permalink
Merge branch 'main' into migrate-promo-banner-fromCAEMtoC4IBM
Browse files Browse the repository at this point in the history
  • Loading branch information
m4olivei committed Nov 12, 2024
2 parents 947e2b8 + 30a3323 commit 32cc198
Show file tree
Hide file tree
Showing 35 changed files with 1,463 additions and 101 deletions.
16 changes: 16 additions & 0 deletions packages/services/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.15.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-11-05)

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





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

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





# [2.14.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-10-25)

**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.14.0",
"version": "2.15.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -47,7 +47,7 @@
},
"dependencies": {
"@babel/runtime": "^7.16.3",
"@carbon/ibmdotcom-utilities": "2.14.0",
"@carbon/ibmdotcom-utilities": "2.15.0",
"@ibm/telemetry-js": "^1.5.0",
"axios": "^1.6.8",
"marked": "^4.0.10",
Expand Down
57 changes: 57 additions & 0 deletions packages/services/src/services/SAPCommerce/SAPCommerce.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* @license
*
* Copyright IBM Corp. 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.
*/

import Cookies from 'js-cookie';

const _cookieName = 'activeCartId';

class SAPCommerceAPI {
/**
* Check if the user has an active cart by looking for the non-empty cookie.
*
* @returns {boolean}
*/
static hasActiveCart() {
const activeCartId = SAPCommerceAPI.getActiveCartId();
// Return true if the activeCartId cookie is non-empty.
return activeCartId !== '';
}

/**
* Returns the active cart id.
*
* @returns {string}
* The active cart id if there is one, otherwise empty string.
*/
static getActiveCartId() {
const activeCartId = Cookies.get(_cookieName);
return activeCartId && typeof activeCartId === 'string'
? activeCartId.trim()
: '';
}

/**
* Set the active cart id.
*
* @param {string} activeCartId
* The active cart id.
*/
static setActiveCartId(activeCartId) {
Cookies.set(_cookieName, activeCartId.trim());
}

/**
* Remove the active cart id.
*/
static removeActiveCartId() {
Cookies.remove(_cookieName);
}
}

export default SAPCommerceAPI;
9 changes: 9 additions & 0 deletions packages/services/src/services/SAPCommerce/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @license
*
* Copyright IBM Corp. 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.
*/
export { default as SAPCommerceAPI } from './SAPCommerce.js';
3 changes: 2 additions & 1 deletion packages/services/src/services/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corp. 2016, 2021
* Copyright IBM Corp. 2016, 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 @@ -13,6 +13,7 @@ export * from './Locale';
export * from './MarketingSearch';
export * from './MastheadLogo';
export * from './Profile';
export * from './SAPCommerce';
export * from './SearchTypeahead';
export * from './Translation';
export * from './KalturaPlayer';
20 changes: 20 additions & 0 deletions packages/styles/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.15.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-11-05)

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





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


### Bug Fixes

* **deps:** update dependency @carbon/icons-react to v11.51.0 ([#12072](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/issues/12072)) ([5f11b87](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/commit/5f11b87366a75b203874991438e31f7c902f48ed))
* **deps:** update dependency @carbon/layout to v11.27.0 ([#12073](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/issues/12073)) ([321a1e2](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/commit/321a1e25b6be654cd096fc8c2b9b0980effff669))





# [2.14.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-10-25)


Expand Down
2 changes: 1 addition & 1 deletion packages/styles/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/ibmdotcom-styles",
"description": "Carbon for IBM.com Styles",
"version": "2.14.0",
"version": "2.15.0",
"license": "Apache-2.0",
"main": "dist/ibm-dotcom-styles.min.css",
"module": "src/scss",
Expand Down
6 changes: 4 additions & 2 deletions packages/styles/scss/components/card/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@
content: '';
inset: 0;
}

.#{$prefix}--card__footer-wrapper {
margin-block-start: auto;
}
}

// Card with pictogram placement style
Expand Down Expand Up @@ -466,8 +470,6 @@
:host(#{$c4d-prefix}-card-in-card-footer) a,
:host(#{$c4d-prefix}-feature-card-footer) a,
:host(#{$c4d-prefix}-feature-cta-footer) a {
/* Moves the footer down to the bottom in the card */
margin-block-start: auto;
text-decoration: none;

&:focus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,14 @@
}

:host(#{$c4d-prefix}-pricing-table-cell[icon]) {
&[icon='checkmark'] {
&[icon='checkmark'] svg {
color: $support-success;
}

svg {
flex-shrink: 0;
margin-inline-end: $spacing-03;
}
}

.#{$prefix}--pricing-table-highlight-label,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,23 @@
vertical-align: sub;

svg {
flex-shrink: 0;
fill: $icon-secondary;
}
}

.#{$prefix}--structured-list-cell[icon],
:host(#{$c4d-prefix}-structured-list-cell[icon]) {
&[icon='checkmark'] {
&[icon='checkmark'] svg {
color: $support-success;
}

svg {
margin-inline-end: $spacing-03;
}
}

.#{$prefix}--structured-list-cell-icon-text-container {
display: flex;
}
}
16 changes: 16 additions & 0 deletions packages/utilities/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.15.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-11-05)

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





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

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





# [2.14.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-10-25)

**Note:** Version bump only for package @carbon/ibmdotcom-utilities
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/ibmdotcom-utilities",
"description": "Carbon for IBM.com Utilities",
"version": "2.14.0",
"version": "2.15.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/utilities/src/utilities/settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
* @type {object} Settings object
* @property {string} [stablePrefix=c4d] stable prefix
* @property {string} [prefix=cds] core Carbon prefix
* Carbon for IBM.com v2.14.0',
* Carbon for IBM.com v2.15.1',
*/
const settings = {
version: 'Carbon for IBM.com v2.14.0',
version: 'Carbon for IBM.com v2.15.1',
stablePrefix: 'c4d',
prefix: 'cds',
};
Expand Down
20 changes: 20 additions & 0 deletions packages/web-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.15.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-11-05)

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





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


### Bug Fixes

* **cta:** prevent an infinate loop of fetching video details ([#12084](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/issues/12084)) ([9964cf1](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/commit/9964cf1130ea56d4ef1fcb9cc57526b953860a60))
* **deps:** update dependency @carbon/layout to v11.27.0 ([#12073](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/issues/12073)) ([321a1e2](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/commit/321a1e25b6be654cd096fc8c2b9b0980effff669))





# [2.14.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-10-25)


Expand Down
8 changes: 4 additions & 4 deletions packages/web-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@carbon/ibmdotcom-web-components",
"version": "2.14.0",
"version": "2.15.0",
"description": "Carbon for IBM.com Web Components",
"license": "Apache-2.0",
"exports": {
Expand Down Expand Up @@ -91,9 +91,9 @@
"wca": "web-component-analyzer analyze src --outFile custom-elements.json"
},
"dependencies": {
"@carbon/ibmdotcom-services": "2.14.0",
"@carbon/ibmdotcom-styles": "2.14.0",
"@carbon/ibmdotcom-utilities": "2.14.0",
"@carbon/ibmdotcom-services": "2.15.0",
"@carbon/ibmdotcom-styles": "2.15.0",
"@carbon/ibmdotcom-utilities": "2.15.0",
"@carbon/layout": "11.27.0",
"@carbon/motion": "11.22.0",
"@carbon/styles": "1.65.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/components/card/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class C4DCard extends CTAMixin(StableSelectorMixin(CDSLink)) {
${hasPictogram && this.pictogramPlacement === PICTOGRAM_PLACEMENT.TOP
? this._renderCopy()
: ''}
<div part="footer-wrapper" class="${prefix}--card__footer">
<div part="footer-wrapper" class="${prefix}--card__footer-wrapper">
<slot name="footer"></slot>
</div>
</div>
Expand Down
Loading

0 comments on commit 32cc198

Please sign in to comment.