Skip to content

Commit

Permalink
Merge branch 'main' into fix/radio-button-slot
Browse files Browse the repository at this point in the history
  • Loading branch information
kennylam authored Jan 4, 2024
2 parents 5c7adf8 + 6c24220 commit 776a284
Show file tree
Hide file tree
Showing 73 changed files with 189 additions and 200 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.
12 changes: 6 additions & 6 deletions docs/cwc-v2-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For Carbon v11 migration guidance, see their
[migration guide](https://github.com/carbon-design-system/carbon/blob/main/docs/migration/v11.md).


> When using @carbon/web-components v2 you need to include theming to get all the token values necessary for the components. This includes using white theme, see the accordion codesandbox example [here](https://codesandbox.io/p/sandbox/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/cwc-v2/packages/carbon-web-components/examples/codesandbox/basic/components/accordion?file=/index.html:1,1)
> When using @carbon/web-components v2 you need to include theming to get all the token values necessary for the components. This includes using white theme, see the accordion codesandbox example [here](https://codesandbox.io/p/sandbox/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/basic/components/accordion?file=/index.html:1,1)
## List of component changes

Expand Down Expand Up @@ -97,7 +97,7 @@ For Carbon v11 migration guidance, see their
- `direction` property expects 'top' or 'bottom' value
- `size="md"` is now used instead of `size=""`
- `label-text` is now `title-text`
- `trigger-content` is now `label`
- `trigger-content` is now `label`
- New attributes: `hide-label`, `invalid`, `invalid-text`, `read-only`, `warn`, `warn-text`
- Removed `color-scheme` property

Expand All @@ -117,7 +117,7 @@ For Carbon v11 migration guidance, see their

- New optional `table-head` component
- New and old interactive features/logic are now built-in to the component -- can still be customizable
- New properties: `batch-expansion`, `collator`, `expandable`, `filterRows`, `is-selectable`, `is-sortable`, `locale`,
- New properties: `batch-expansion`, `collator`, `expandable`, `filterRows`, `is-selectable`, `is-sortable`, `locale`,
`overflow-menu-on-hover`, `radio`, `use-static-width`, `use-zebra-styles`
- `size` now accepts `xs`, `sm`, `md`, `lg`, and `xl`, instead of `compact`, `short`, `''`, and `tall`
- `table-toolbar` can now be further customized with extra features
Expand Down Expand Up @@ -174,7 +174,7 @@ For Carbon v11 migration guidance, see their
- `size` property expected values have been changed from '' (default), 'sm' --> 'sm', 'md' (default)
- New a11y `clear-selection-description` and `clear-selection-text` properties
- New `locale` property to specify locale of the multi-select, used when sorting the list of items
- New `selection-feedback` property: `'fixed', 'top', 'top-after-reopen'` options for sorting list items once selection occurs
- New `selection-feedback` property: `'fixed', 'top', 'top-after-reopen'` options for sorting list items once selection occurs
- New `warn` and `warn-text` properties for warn state

### notification
Expand Down Expand Up @@ -236,7 +236,7 @@ For Carbon v11 migration guidance, see their
### slider

- New `required` property to specify if slider is required
- New `readonly` property
- New `readonly` property
- New `max-label` and `min-label` a11y properties
- New `invalid` and `invalid-text` property for invalid state - when input entered in the text-input is above or lower than given max / min, the invalid state will be triggered automatically
- New `step-multiplier` property to determine how much the value should increase / decrease by Shift + arrow keys
Expand All @@ -249,7 +249,7 @@ For Carbon v11 migration guidance, see their
- `size` property expected values have been changed from '' (default), 'sm', and 'xl' --> 'sm', 'md' (default), and 'lg'
- Can use custom icon over magnifying glass
- `closeButtonAssistiveText` is now `closeButtonLabelText`
- New properties: `autocomplete`, `expandable`,
- New properties: `autocomplete`, `expandable`,

### select

Expand Down
14 changes: 7 additions & 7 deletions packages/carbon-web-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ directly used once the script tag has been added to the page. For example:
Our example at [CodeSandbox](https://codesandbox.io) shows usage with only CDN
artifacts:

[![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/feat/cwc-v2/packages/carbon-web-components/examples/codesandbox/cdn)
[![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/cdn)

### Using ES imports

Expand Down Expand Up @@ -224,7 +224,7 @@ yarn add @carbon/web-components
Our example at [CodeSandbox](https://codesandbox.io) shows the most basic usage:
[![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/feat/cwc-v2/packages/carbon-web-components/examples/codesandbox/basic)
[![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)
The first thing you need is **setting up a module bundler** to resolve
ECMAScript `import`s. The above example uses [Webpack](https://webpack.js.org),
Expand Down Expand Up @@ -307,7 +307,7 @@ application can use those `.d.ts` files:

### React

[![Edit carbon-web-components with React](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/cwc-v2/packages/carbon-web-components/examples/codesandbox/react)
[![Edit carbon-web-components with React](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/react)

You can use wrapper React components in
`@carbon/web-components/es/components-react` generated
Expand Down Expand Up @@ -341,15 +341,15 @@ To run the wrapper React components in SSR environment requires Node `12.16.3`
or above that supports
["conditional mapping" feature](https://github.com/jkrems/proposal-pkg-exports#2-conditional-mapping):

[![Edit carbon-web-components with React SSR](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/cwc-v2/packages/carbon-web-components/examples/codesandbox/react-ssr)
[![Edit carbon-web-components with React SSR](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/react-ssr)

Same Node version requirement applies to Next.js:

[![Edit carbon-web-components with React SSR](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/cwc-v2/packages/carbon-web-components/examples/codesandbox/next)
[![Edit carbon-web-components with React SSR](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/next)

### Vue

[![Edit carbon-web-components with Vue](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/cwc-v2/packages/carbon-web-components/examples/codesandbox/vue)
[![Edit carbon-web-components with Vue](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/vue)

Vue users can use our components in the same manner as native HTML tags, without
any additional steps!
Expand Down Expand Up @@ -393,7 +393,7 @@ To support IE, you need a couple additional setups:

Here's an example code that shows such setup:

[![Edit carbon-web-components with IE](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/cwc-v2/packages/carbon-web-components/examples/codesandbox/ie)
[![Edit carbon-web-components with IE](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/ie)

## Coding conventions

Expand Down
2 changes: 1 addition & 1 deletion packages/carbon-web-components/docs/form-story.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ button.addEventListener('click', () => {
```

<iframe
src="https://stackblitz.com/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/main/packages/carbon-web-components/examples/codesandbox/form/basic?embed=1&file=src%2Findex.js&hideExplorer=1&hideNavigation=1&theme=light&terminalHeight=0&hidedevtools=1"
src="https://stackblitz.com/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/form/basic?embed=1&file=src%2Findex.js&hideExplorer=1&hideNavigation=1&theme=light&terminalHeight=0&hidedevtools=1"
style={{ width: '100%', height: '500px', border: 'solid rgba(0,0,0,0.1) 1px', boxShadow: 'rgba(0,0,0,0.1) 0 1px 3px 0' }}
title="carbon-web-components-getting-started"
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>
Expand Down
4 changes: 2 additions & 2 deletions packages/carbon-web-components/docs/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ button.addEventListener('click', () => {
});
```

[![Edit carbon-web-components with formdata event](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/cwc-v2/packages/carbon-web-components/examples/codesandbox/form/basic)
[![Edit carbon-web-components with formdata event](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/form/basic)

## Redux Form

Expand Down Expand Up @@ -60,4 +60,4 @@ const FieldImpl = ({ input, label, type, meta: { touched, error } }) => {
<Field name="username" type="text" component={FieldImpl} label="Username" />
```

[![Edit carbon-web-components with Redux Form](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/carbon-design-system/carbon-web-components/tree/feat/cwc-v2/examples/codesandbox/form/redux-form)
[![Edit carbon-web-components with Redux Form](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/carbon-design-system/carbon-web-components/tree/main/examples/codesandbox/form/redux-form)
4 changes: 2 additions & 2 deletions packages/carbon-web-components/docs/styling-story.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Changes to CSS Custom Properties of the Carbon theme are reflected in the color
scheme of `@carbon/web-components` components:

<iframe
src="https://stackblitz.com/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/main/packages/carbon-web-components/examples/codesandbox/styling/theme-zoning?embed=1&file=src%2Findex.js&hideExplorer=1&hideNavigation=1&theme=light&terminalHeight=0&hidedevtools=1"
src="https://stackblitz.com/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/styling/theme-zoning?embed=1&file=src%2Findex.js&hideExplorer=1&hideNavigation=1&theme=light&terminalHeight=0&hidedevtools=1"
style={{
width: '100%',
height: '700px',
Expand Down Expand Up @@ -108,7 +108,7 @@ class MyDropdown extends CDSDropdown {
```

<iframe
src="https://stackblitz.com/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/main/packages/carbon-web-components/examples/codesandbox/styling/custom-style?embed=1&file=src%2Findex.js&hideExplorer=1&hideNavigation=1&theme=light&terminalHeight=0&hidedevtools=1"
src="https://stackblitz.com/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/styling/custom-style?embed=1&file=src%2Findex.js&hideExplorer=1&hideNavigation=1&theme=light&terminalHeight=0&hidedevtools=1"
style={{
width: '100%',
height: '500px',
Expand Down
6 changes: 3 additions & 3 deletions packages/carbon-web-components/docs/styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ to change the styles of our components, there are a few options.
Changes to CSS Custom Properties of the Carbon theme are reflected in the color
scheme of `@carbon/web-components` components:

[![Edit carbon-web-components with custom style](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/cwc-v2/packages/carbon-web-components/examples/codesandbox/styling/theme-zoning)
[![Edit carbon-web-components with custom style](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/styling/theme-zoning)

For example, if you add CSS like below:

Expand Down Expand Up @@ -80,7 +80,7 @@ to let our custom elements modules load RTL version of `CSSResult` module that
is shipped alongside with default `CSSResult` modules, instead of loading the
default version:

[![Edit @carbon/web-components with custom style](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/cwc-v2/packages/carbon-web-components/examples/codesandbox/rtl?)
[![Edit @carbon/web-components with custom style](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/rtl?)

```javascript
const reCssBundle = /\.css\.js$/i;
Expand All @@ -105,7 +105,7 @@ You can create a derived class of our component and override
[static `styles` property](https://lit-element.polymer-project.org/guide/styles#static-styles),
like:

[![Edit @carbon/web-components with custom style](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/cwc-v2/packages/carbon-web-components/examples/codesandbox/styling/custom-style)
[![Edit @carbon/web-components with custom style](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/styling/custom-style)

```javascript
import { css, customElement } from 'lit';
Expand Down
4 changes: 2 additions & 2 deletions packages/carbon-web-components/docs/welcome-story.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ yarn add @carbon/web-components

### Basic usage

Our example at [Stackblitz](https://stackblitz.com/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/main/packages/carbon-web-components/examples/codesandbox/basic) shows the most basic usage:
Our example at [Stackblitz](https://stackblitz.com/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/basic) shows the most basic usage:

<iframe
src="https://stackblitz.com/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/main/packages/carbon-web-components/examples/codesandbox/basic?embed=1&file=src%2Findex.js&hideExplorer=1&hideNavigation=1&theme=light&terminalHeight=0&hidedevtools=1"
src="https://stackblitz.com/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/basic?embed=1&file=src%2Findex.js&hideExplorer=1&hideNavigation=1&theme=light&terminalHeight=0&hidedevtools=1"
style={{ width: '100%', height: '500px', border: 'solid rgba(0,0,0,0.1) 1px', boxShadow: 'rgba(0,0,0,0.1) 0 1px 3px 0' }}
title="carbon-web-components-getting-started"
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
Expand Down
5 changes: 1 addition & 4 deletions packages/carbon-web-components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/web-components",
"private": true,
"version": "2.1.0",
"version": "2.1.1",
"publishConfig": {
"access": "public"
},
Expand All @@ -13,15 +13,12 @@
"module": "es/index.js",
"exports": {
"./es/components-react/*": {
"node": "./lib/components-react-node/*",
"default": "./es/components-react/*"
},
"./es/components/*": {
"node": "./lib/components/*",
"default": "./es/components/*"
},
"./es/globals/": {
"node": "./lib/globals/",
"default": "./es/globals/"
},
"./es": "./es/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { cdnJs, cdnCss } from '../../globals/internal/storybook-cdn';
# Accordion

> 💡 Check our
> [CodeSandbox](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/main/packages/carbon-web-components/examples/codesandbox/basic/components/accordion)
> [CodeSandbox](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/basic/components/accordion)
> 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/feat/main/packages/carbon-web-components/examples/codesandbox/basic/components/accordion)
[![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/accordion)

The accordion component delivers large amounts of content in a small space
through progressive disclosure. That is, the user gets key details about the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { cdnJs, cdnCss } from '../../globals/internal/storybook-cdn';
# Breadcrumb

> 💡 Check our
> [CodeSandbox](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/main/packages/carbon-web-components/examples/codesandbox/basic/components/breadcrumb)
> [CodeSandbox](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/basic/components/breadcrumb)
> 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/feat/main/packages/carbon-web-components/examples/codesandbox/basic/components/breadcrumb)
[![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/breadcrumb)

## Getting started

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import Add16 from '@carbon/web-components/es/icons/add/16';
# Button

> 💡 Check our
> [CodeSandbox](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/feat/main/packages/carbon-web-components/examples/codesandbox/basic/components/button)
> [CodeSandbox](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/basic/components/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/feat/main/packages/carbon-web-components/examples/codesandbox/basic/components/button)
[![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/button)

## Overview

Expand Down
Loading

0 comments on commit 776a284

Please sign in to comment.