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 chore/carbon-upgrade-1.50.0
  • Loading branch information
kennylam committed Feb 13, 2024
2 parents 484c1e2 + b484efc commit c1e5300
Show file tree
Hide file tree
Showing 74 changed files with 1,137 additions and 569 deletions.
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.
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.
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.
Binary file not shown.
19 changes: 19 additions & 0 deletions packages/carbon-web-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.3.0](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-02-12)

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





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


### Bug Fixes

* **datatable:** is sortable not working in table header cell ([#11516](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/issues/11516)) ([8da0be7](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/commit/8da0be77b80cdd5faecfd273e5bf41e8e0da5a80))





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


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"targets": [
"last 1 version",
"Firefox ESR",
"not opera > 0",
"not op_mini > 0",
"not op_mob > 0",
"not android > 0",
"not edge > 0",
"not ie > 0",
"not ie_mob > 0"
]
}
]
],
"plugins": [["@babel/plugin-transform-runtime", { "version": "7.3.0" }]]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.cache
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"includePaths": [
"node_modules",
"../../node_modules"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
@license
Copyright IBM Corp. 2020
This source code is licensed under the Apache-2.0 license found in the
LICENSE file in the root directory of this source tree.
-->

<html>
<head>
<title>@carbon/ibmdotcom-web-components example</title>
<meta charset="UTF-8"/>
<link rel="stylesheet"
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"/>
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/grid.css" />
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/themes.css" />
<style>
/* Suppress custom element until styles are loaded */
cds-chat-button:not(:defined) {
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/chat-button.min.js"></script>
</head>
<body class="cds-theme-zone-white">
<cds-chat-button>
Chat button
</cds-chat-button>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
@license
Copyright IBM Corp. 2020
This source code is licensed under the Apache-2.0 license found in the
LICENSE file in the root directory of this source tree.
-->

<html>
<head>
<title>carbon-web-components example</title>
<meta charset="UTF-8" />
<link rel="stylesheet"
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"/>

<link rel="stylesheet" href="src/styles.scss" />
<style>
/* Suppress custom element until styles are loaded */
cds-chat-button:not(:defined) {
display: none;
}
</style>
<script type="module" src="src/index.js"></script>
</head>
<body>
<cds-chat-button>
Chat button
</cds-chat-button>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "carbon-web-components-chat-button-example",
"version": "0.1.0",
"private": true,
"description": "Sample project for getting started with the Web Components from Carbon.",
"license": "Apache-2",
"main": "index.html",
"scripts": {
"build": "parcel build *.html --no-minify --public-url ./",
"clean": "rimraf node_modules dist .cache",
"start": "parcel index.html --port=9000 --no-hmr"
},
"dependencies": {
"@carbon/styles": "^1.34.0",
"@carbon/web-components": "latest",
"sass": "^1.64.1"
},
"devDependencies": {
"@babel/core": "^7.0.0-0",
"parcel-bundler": "1.12.3",
"rimraf": "^3.0.2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"template": "node"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* @license
*
* 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.
*/

import '@carbon/web-components/es/components/chat-button/index.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* @license
*
* 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.
*/

@use '@carbon/styles/scss/reset';
@use '@carbon/styles/scss/theme';
@use '@carbon/styles/scss/themes';

@use '@carbon/styles/scss/components/button/tokens' as button-tokens;
@include theme.add-component-tokens(button-tokens.$button-tokens);


:root {
@include theme.theme(themes.$white);
background-color: var(--cds-background);
color: var(--cds-text-primary);
}
4 changes: 2 additions & 2 deletions 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.3.0-rc.0",
"version": "2.3.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -90,7 +90,7 @@
"@babel/template": "~7.12.0",
"@babel/traverse": "~7.23.7",
"@carbon/icon-helpers": "10.46.0",
"@carbon/icons": "10.48.3",
"@carbon/icons": "11.36.0",
"@open-wc/semantic-dom-diff": "~0.18.0",
"@percy-io/in-percy": "^0.1.11",
"@percy/cli": "^1.27.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $css--plex: true !default;
@use '@carbon/styles/scss/components/popover/index';
@use '@carbon/styles/scss/components/code-snippet/code-snippet' as *;
@use '@carbon/styles/scss/components/tooltip';
@use '@carbon/styles/scss/components/chat-button' as *;
@use '@carbon/styles/scss/layout' as *;

@include code-snippet;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* @license
*
* 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.
*/

import { classMap } from 'lit/directives/class-map.js';
import { LitElement, html } from 'lit';
import { property } from 'lit/decorators.js';
import { prefix } from '../../globals/settings';
import { CHAT_BUTTON_SIZE } from './defs';
import styles from './chat-button.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

export { CHAT_BUTTON_SIZE };
/**
* Chat button skeleton.
*
* @element cds-chat-button-skeleton
*/
@customElement(`${prefix}-chat-button-skeleton`)
class CDSChatButtonSkeleton extends LitElement {
/**
* Specify the size of the `ChatButtonSkeleton`, from the following list of sizes: 'sm', 'md', 'lg'
*/
@property({ reflect: true })
size = CHAT_BUTTON_SIZE.LARGE;

render() {
const skeletonClasses = classMap({
[`${prefix}--skeleton`]: true,
[`${prefix}--btn`]: true,
[`${prefix}--chat-btn`]: true,
[`${prefix}--layout--size-${this.size}`]: this.size,
});

return html` <div class="${skeletonClasses}"></div> `;
}

static styles = styles;
}

export default CDSChatButtonSkeleton;
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { Props, Description } from '@storybook/addon-docs/blocks';
import { cdnJs, cdnCss } from '../../globals/internal/storybook-cdn';

# Chat Button

> 💡 Check our
> [CodeSandbox](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/basic/components/chat-button)
> example implementation.
[![Edit carbon-web-components](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/basic/components/chat-button)

## Getting started

Here's a quick example to get you started.

### JS (via import)

```javascript
import '@carbon/web-components/es/components/chat-button/index.js';
```

<Description markdown={`${cdnJs({ components: ['chat-button'] })}`} />
<Description markdown={`${cdnCss()}`} />

```javascript
import '@carbon/web-components/es/components/chat-button/index.js';
import Add16 from '@carbon/web-components/es/icons/add/16';

function App() {
return html`<cds-chat-button>
Primary ${Add16({ slot: 'icon' })}
</cds-chat-button>`;
}
```

## `<cds-chat-button>` attributes and properties

<Props of="cds-chat-button" />
````
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// 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.
//
div[class*='test-button-'] {
margin-block-end: 4rem;

/* stylelint-disable */
& > * {
margin-inline-end: 2rem;
}
/* stylelint-enable */
}
Loading

0 comments on commit c1e5300

Please sign in to comment.