Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feat/toggletip-alte…
Browse files Browse the repository at this point in the history
…rnate-icon
  • Loading branch information
sangeethababu9223 committed Apr 4, 2024
2 parents b1a15bc + 78015dc commit 165a551
Show file tree
Hide file tree
Showing 20 changed files with 229 additions and 35 deletions.
16 changes: 16 additions & 0 deletions packages/carbon-web-components/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.7.0-rc.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-04-02)

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





# [2.6.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-03-27)

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





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


Expand Down
2 changes: 1 addition & 1 deletion packages/carbon-web-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@carbon/web-components",
"version": "2.6.0-rc.0",
"version": "2.7.0-rc.0",
"publishConfig": {
"access": "public"
},
Expand Down
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.7.0-rc.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-04-02)

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





# [2.6.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-03-27)

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





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

**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.6.0-rc.0",
"version": "2.7.0-rc.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.6.0-rc.0",
"@carbon/ibmdotcom-utilities": "2.7.0-rc.0",
"@ibm/telemetry-js": "^1.3.0",
"axios": "^1.6.0",
"marked": "^4.0.10",
Expand Down
16 changes: 16 additions & 0 deletions packages/styles/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.7.0-rc.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-04-02)

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





# [2.6.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-03-27)

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





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


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.6.0-rc.0",
"version": "2.7.0-rc.0",
"license": "Apache-2.0",
"main": "dist/ibm-dotcom-styles.min.css",
"module": "src/scss",
Expand Down
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.7.0-rc.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-04-02)

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





# [2.6.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-03-27)

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





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


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.6.0-rc.0",
"version": "2.7.0-rc.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.6.0',
* Carbon for IBM.com v2.7.0',
*/
const settings = {
version: 'Carbon for IBM.com v2.6.0',
version: 'Carbon for IBM.com v2.7.0',
stablePrefix: 'c4d',
prefix: 'cds',
};
Expand Down
16 changes: 16 additions & 0 deletions packages/web-components/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.7.0-rc.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-04-02)

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





# [2.6.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-03-27)

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





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


Expand Down
15 changes: 14 additions & 1 deletion packages/web-components/docs/carbon-cdn-style-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ For more details, visit: https://www.ibm.com/standards/carbon/developing/buildin

## Carbon grid

The following includes Carbon grid and all corresponding grid classes.
The following includes Carbon grid (using flex grid) and all corresponding grid classes.

```html
// SPECIFIC VERSION
Expand All @@ -259,6 +259,19 @@ The following includes Carbon grid and all corresponding grid classes.
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/next/grid.css" />
```

The following includes Carbon grid (using CSS grid) and all corresponding grid classes.

```html
// SPECIFIC VERSION
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/version/[v2.x.y]/cssgrid.css" />

// LATEST tag
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/latest/cssgrid.css" />

// NEXT tag
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/next/cssgrid.css" />
```

[Learn more about the Carbon 2x Grid](https://carbondesignsystem.com/guidelines/2x-grid/overview)

## Carbon theme zoning classes
Expand Down
10 changes: 5 additions & 5 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.6.0-rc.0",
"version": "2.7.0-rc.0",
"description": "Carbon for IBM.com Web Components",
"license": "Apache-2.0",
"exports": {
Expand Down Expand Up @@ -91,13 +91,13 @@
"wca": "web-component-analyzer analyze src --outFile custom-elements.json"
},
"dependencies": {
"@carbon/ibmdotcom-services": "2.6.0-rc.0",
"@carbon/ibmdotcom-styles": "2.6.0-rc.0",
"@carbon/ibmdotcom-utilities": "2.6.0-rc.0",
"@carbon/ibmdotcom-services": "2.7.0-rc.0",
"@carbon/ibmdotcom-styles": "2.7.0-rc.0",
"@carbon/ibmdotcom-utilities": "2.7.0-rc.0",
"@carbon/layout": "11.21.0",
"@carbon/motion": "11.17.0",
"@carbon/styles": "1.53.0",
"@carbon/web-components": "2.6.0-rc.0",
"@carbon/web-components": "2.7.0-rc.0",
"@ibm/telemetry-js": "^1.3.0",
"lit": "^2.7.6",
"lodash-es": "^4.17.21",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ import { Tag } from '@carbon/react';
function App() {
return (
<C4DCard colorScheme="light">
<C4DImage slot="image" alt="alt text" defaultSrc="../image.png" />
<C4DImage slot="image" alt="alt text" default-src="../image.png" />
<C4DCardEyebrow>{eyebrow}</C4DCardEyebrow>
<C4DCardHeading>{heading}</C4DCardHeading>
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const Default = (args) => {
hasProfile,
hasSearch,
hasContact,
initialSearchTerm,
selectedMenuItem,
searchPlaceholder,
userStatus,
Expand All @@ -112,6 +113,7 @@ export const Default = (args) => {
<c4d-masthead-container
selected-menu-item="${ifDefined(selectedMenuItem)}"
user-status="${ifDefined(userStatus)}"
initial-search-term="${ifDefined(initialSearchTerm)}"
searchPlaceholder="${ifDefined(searchPlaceholder)}"
has-profile="${hasProfile}"
has-search="${hasSearch}"
Expand All @@ -129,6 +131,7 @@ export const Default = (args) => {
data-endpoint="${dataEndpoints['v2.1']}"
selected-menu-item="${ifNonEmpty(selectedMenuItem)}"
user-status="${ifNonEmpty(userStatus)}"
initial-search-term="${ifDefined(initialSearchTerm)}"
searchPlaceholder="${ifNonEmpty(searchPlaceholder)}"
has-profile="${hasProfile}"
has-search="${hasSearch}"
Expand Down Expand Up @@ -199,7 +202,8 @@ WithCustomTypeahead.story = {
};

export const searchOpenOnload = (args) => {
const { searchPlaceholder, useMock } = args?.MastheadComposite ?? {};
const { initialSearchTerm, searchPlaceholder, useMock } =
args?.MastheadComposite ?? {};
return html`
<style>
${styles}
Expand All @@ -215,6 +219,7 @@ export const searchOpenOnload = (args) => {
unauthenticatedProfileItems
)}"
activate-search="true"
initial-search-term="${ifDefined(initialSearchTerm)}"
searchPlaceholder="${ifDefined(
searchPlaceholder
)}"></c4d-masthead-container>
Expand All @@ -223,6 +228,7 @@ export const searchOpenOnload = (args) => {
<c4d-masthead-container
data-endpoint="${dataEndpoints['v2.1']}"
activate-search="true"
initial-search-term="${ifDefined(initialSearchTerm)}"
searchPlaceholder="${ifDefined(
searchPlaceholder
)}"></c4d-masthead-container>
Expand Down Expand Up @@ -538,6 +544,10 @@ export default {
['true', 'false'],
'true'
),
initialSearchTerm: textNullable(
'initial search term (initial-search-term)',
''
),
searchPlaceholder: textNullable(
'search placeholder (searchPlaceholder)',
'Search all of IBM'
Expand Down Expand Up @@ -566,6 +576,7 @@ export default {
platform: null,
hasProfile: 'true',
hasSearch: 'true',
initialSearchTerm: '',
searchPlaceholder: 'Search all of IBM',
selectedMenuItem: 'Services & Consulting',
userStatus: userStatuses.unauthenticated,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,7 @@ class C4DMastheadComposite extends HostListenerMixin(LitElement) {
currentSearchResults,
customTypeaheadAPI,
hasSearch,
initialSearchTerm,
inputTimeout,
language,
openSearchDropdown,
Expand All @@ -1106,6 +1107,7 @@ class C4DMastheadComposite extends HostListenerMixin(LitElement) {
?active="${activateSearch}"
.currentSearchResults="${ifDefined(currentSearchResults)}"
?custom-typeahead-api="${ifDefined(customTypeaheadAPI)}"
initial-search-term="${ifDefined(initialSearchTerm)}"
input-timeout="${inputTimeout}"
language="${ifDefined(language)}"
?open="${openSearchDropdown}"
Expand Down Expand Up @@ -1271,6 +1273,12 @@ class C4DMastheadComposite extends HostListenerMixin(LitElement) {
@property({ attribute: 'search-open-on-load' })
searchOpenOnload = this.activateSearch;

/**
* Sets a default query in the masthead's search input.
*/
@property({ attribute: 'initial-search-term', reflect: true })
initialSearchTerm?: string;

/**
* The profile items for authenticated state.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ button, the search bar will contract back to its single search button, ready to
be activated again.

```html
<c4d-search-with-typeahead></search-with-typeahead>
<c4d-search-with-typeahead></c4d-search-with-typeahead>
```

### Search Open On Load
Expand All @@ -48,7 +48,7 @@ page. The close functionality will still apply upon focusing out or clicking the
close button.

```html
<c4d-search-with-typeahead active></search-with-typeahead>
<c4d-search-with-typeahead active></c4d-search-with-typeahead>
```

### Search Should Remain Open
Expand All @@ -58,7 +58,15 @@ out or close button is clicked. You can combine the previous attribute with this
one to ensure it will always be open.

```html
<c4d-search-with-typeahead should-remain-open></search-with-typeahead>
<c4d-search-with-typeahead should-remain-open></c4d-search-with-typeahead>
```

### Initial Search Term

This will set a default query in the search's text input.

```html
<c4d-search-with-typeahead initial-search-term="Example search text"></c4d-search-with-typeahead>
```

## Slots
Expand Down
Loading

0 comments on commit 165a551

Please sign in to comment.