Skip to content

Commit

Permalink
chore(cwc): update references in storybook and codesandbox examples (c…
Browse files Browse the repository at this point in the history
…arbon-design-system#9722)

### Related Ticket(s)

{{Provide url(s) to the related ticket(s) that this pull request addresses}}

### Description

Updating the carbon-web-components references in the carbon-web-components' storybook docs and codesandbox examples.

### Changelog

**Changed**

1. `carbon-web-components/es` ---> `@carbon/carbon-web-components/es`
2. CDN urls
   `https://1.www.s81c.com/common/carbon/web-components/...` --> `https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/...`
3. Codesandbox links in the storybook docs
  `https://codesandbox.io/s/github/carbon-design-system/carbon-web-components/tree/main/examples/codesandbox/basic/components/...` --> `https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/basic/components/...`


<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
  • Loading branch information
annawen1 authored Dec 5, 2022
1 parent 971cf24 commit 695b4e3
Show file tree
Hide file tree
Showing 135 changed files with 1,032 additions and 648 deletions.
32 changes: 16 additions & 16 deletions web-components/packages/carbon-web-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ version `v1.16.0`):
<!-- By `latest` tag -->
<script
type="module"
src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/accordion.min.js"
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/accordion.min.js"
></script>

<!-- By specific version -->
<script
type="module"
src="https://1.www.s81c.com/common/carbon/web-components/version/v1.16.0/accordion.min.js"
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/version/v1.16.0/accordion.min.js"
></script>
```

Expand Down Expand Up @@ -141,13 +141,13 @@ extention from `.min.js` to `.rtl.min.js`. For example:
<!-- By `latest` tag (RTL) -->
<script
type="module"
src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/accordion.rtl.min.js"
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/accordion.rtl.min.js"
></script>

<!-- By specific version (RTL) -->
<script
type="module"
src="https://1.www.s81c.com/common/carbon/web-components/version/v1.16.0/accordion.rtl.min.js"
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/version/v1.16.0/accordion.rtl.min.js"
></script>
```

Expand All @@ -162,7 +162,7 @@ directly used once the script tag has been added to the page. For example:
<head>
<script
type="module"
src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/dropdown.min.js"
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/dropdown.min.js"
></script>
<style type="text/css">
// Suppresses the custom element until it has been defined
Expand Down Expand Up @@ -195,18 +195,18 @@ artifacts:

#### How to install

To install `carbon-web-components` in your project, you will need to run the
following command using [npm](https://www.npmjs.com/):
To install `@carbon/carbon-web-components` in your project, you will need to run
the following command using [npm](https://www.npmjs.com/):

```bash
npm install --save carbon-web-components
npm install --save @carbon/carbon-web-components
```

If you prefer [Yarn](https://yarnpkg.com/en/), use the following command
instead:

```bash
yarn add carbon-web-components
yarn add @carbon/carbon-web-components
```

> NOTE: Carbon and Lit dependencies will be managed by Carbon Web Components
Expand All @@ -229,7 +229,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-web-components/tree/main/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 All @@ -239,8 +239,8 @@ Once you set up a module bundler, you can start importing our component modules,
for example:
```javascript
import 'carbon-web-components/es/components/dropdown/dropdown.js';
import 'carbon-web-components/es/components/dropdown/dropdown-item.js';
import '@carbon/carbon-web-components/es/components/dropdown/dropdown.js';
import '@carbon/carbon-web-components/es/components/dropdown/dropdown-item.js';
```
Once you've imported the component modules, you can use our components in the
Expand Down Expand Up @@ -325,8 +325,8 @@ example:
```javascript
import React from 'react';
import { render } from 'react-dom';
import BXDropdown from 'carbon-web-components/es/components-react/dropdown/dropdown.js';
import BXDropdownItem from 'carbon-web-components/es/components-react/dropdown/dropdown-item.js';
import BXDropdown from '@carbon/carbon-web-components/es/components-react/dropdown/dropdown.js';
import BXDropdownItem from '@carbon/carbon-web-components/es/components-react/dropdown/dropdown-item.js';

const App = () => (
<BXDropdown triggerContent="Select an item">
Expand Down Expand Up @@ -379,8 +379,8 @@ any additional steps!
## List of available components

View available web components at:
https://web-components.carbondesignsystem.com/. You can see usage information in
several ways:
https://www.ibm.com/standards/carbon/carbon-web-components. You can see usage
information in several ways:

1. Going to Docs tab, where it shows the usage and available attributes,
properties and custom events.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*/

import { Component } from '@angular/core';
import 'carbon-web-components/es/components/dropdown/dropdown';
import 'carbon-web-components/es/components/dropdown/dropdown-item';
import '@carbon/carbon-web-components/es/components/dropdown/dropdown';
import '@carbon/carbon-web-components/es/components/dropdown/dropdown-item';

@Component({
selector: 'app-root',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/accordion.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/accordion.min.js"></script>
</head>
<body>
<bx-accordion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/accordion/index.js';
import '@carbon/carbon-web-components/es/components/accordion/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/breadcrumb.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/breadcrumb.min.js"></script>
</head>
<body>
<bx-breadcrumb>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/breadcrumb/index.js';
import '@carbon/carbon-web-components/es/components/breadcrumb/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/button.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/button.min.js"></script>
</head>
<body>
<bx-btn href="https://www.ibm.com">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/button/index.js';
import '@carbon/carbon-web-components/es/components/button/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/checkbox.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/checkbox.min.js"></script>
</head>
<body>
<bx-checkbox label-text="Lorem Ipsum"></bx-checkbox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/checkbox/index.js';
import '@carbon/carbon-web-components/es/components/checkbox/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/code-snippet.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/code-snippet.min.js"></script>
</head>
<body>
<bx-code-snippet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/code-snippet/index.js';
import '@carbon/carbon-web-components/es/components/code-snippet/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/combo-box.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/combo-box.min.js"></script>
</head>
<body>
<bx-combo-box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/combo-box/index.js';
import '@carbon/carbon-web-components/es/components/combo-box/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/content-switcher.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/content-switcher.min.js"></script>
</head>
<body>
<bx-content-switcher>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/content-switcher/index.js';
import '@carbon/carbon-web-components/es/components/content-switcher/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/copy-button.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/copy-button.min.js"></script>
</head>
<body>
<bx-copy-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/copy-button/index.js';
import '@carbon/carbon-web-components/es/components/copy-button/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/data-table.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/pagination.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/data-table.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/pagination.min.js"></script>
</head>
<body>
<h1>Default tabe</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/data-table/index.js';
import 'carbon-web-components/es/components/pagination/index.js';
import '@carbon/carbon-web-components/es/components/data-table/index.js';
import '@carbon/carbon-web-components/es/components/pagination/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/date-picker.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/date-picker.min.js"></script>
</head>
<body>
<bx-date-picker>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/date-picker/index.js';
import '@carbon/carbon-web-components/es/components/date-picker/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/dropdown.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/dropdown.min.js"></script>
</head>
<body>
<bx-dropdown value="bar">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/dropdown/index.js';
import '@carbon/carbon-web-components/es/components/dropdown/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/file-uploader.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/file-uploader.min.js"></script>
</head>
<body>
<bx-file-uploader helper-text="Only .jpg and .png files. 500kb max file size" label-text="Account photo">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/file-uploader/index.js';
import '@carbon/carbon-web-components/es/components/file-uploader/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/inline-loading.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/inline-loading.min.js"></script>
</head>
<body>
<bx-inline-loading status="active">Loading data...</bx-inline-loading>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/inline-loading/index.js';
import '@carbon/carbon-web-components/es/components/inline-loading/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/input.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/input.min.js"></script>
</head>
<body>
<bx-form-item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/form/index.js';
import 'carbon-web-components/es/components/input/index.js';
import '@carbon/carbon-web-components/es/components/form/index.js';
import '@carbon/carbon-web-components/es/components/input/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/link.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/link.min.js"></script>
</head>
<body>
<bx-link href="https://www.ibm.com">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/link/index.js';
import '@carbon/carbon-web-components/es/components/link/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/list.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/list.min.js"></script>
</head>
<body>
<h3>bx-ordered-list</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/list/index.js';
import '@carbon/carbon-web-components/es/components/list/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/loading.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/loading.min.js"></script>
</head>
<body>
<div style="position: relative; padding: 3rem; display: flex;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/loading/index.js';
import '@carbon/carbon-web-components/es/components/loading/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/modal.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/carbon-web-components/tag/latest/modal.min.js"></script>
</head>
<body>
<bx-btn id="modal-example-button">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/modal/index.js';
import 'carbon-web-components/es/components/button/index.js';
import '@carbon/carbon-web-components/es/components/modal/index.js';
import '@carbon/carbon-web-components/es/components/button/index.js';
Loading

0 comments on commit 695b4e3

Please sign in to comment.