Skip to content

Commit

Permalink
Revert "chore(cwc): generate cwc internal vendor package (#9899)"
Browse files Browse the repository at this point in the history
This reverts commit 987c620.
  • Loading branch information
annawen1 authored Jan 23, 2023
1 parent 987c620 commit 4c267ae
Show file tree
Hide file tree
Showing 216 changed files with 616 additions and 678 deletions.
6 changes: 3 additions & 3 deletions packages/carbon-web-components/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2023
* Copyright IBM Corp. 2020, 2022
*
* 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 Down Expand Up @@ -171,9 +171,9 @@ module.exports = {
if (!config.resolve.alias) {
config.resolve.alias = {};
}
// In our development environment (where `@carbon/web-components/es/icons` may not have been built yet),
// In our development environment (where `carbon-web-components/es/icons` may not have been built yet),
// we load icons from `@carbon/icons` and use a WebPack loader to convert the icons to `lit-html` version
config.resolve.alias['@carbon/web-components/es/icons'] =
config.resolve.alias['carbon-web-components/es/icons'] =
'@carbon/icons/lib';

return config;
Expand Down
12 changes: 6 additions & 6 deletions packages/carbon-web-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ with no framework tax, no framework silo.
</a>
</p>

# `@carbon/web-components`
# `carbon-web-components`

`@carbon/web-components` is a variant of Carbon Design System with Custom
`carbon-web-components` is a variant of Carbon Design System with Custom
Elements v1 and Shadow DOM v1 specs.

> The original repository, `carbon-web-components`, has been archived. All
> future work for the package will take place in this monorepo. Please visit the
> The original `carbon-web-components` repository has been archived. All future
> work for the package will take place in this monorepo. Please visit the
> [original repository](https://github.com/carbon-design-system/carbon-web-components)
> for full history of the files.
Expand Down Expand Up @@ -294,7 +294,7 @@ import { AppComponent } from './app.component';
export class AppModule {}
```

The `.d.ts` files in `@carbon/web-components` package are compiled with
The `.d.ts` files in `carbon-web-components` package are compiled with
TypeScript 3.7. You can use TypeScript 3.7 in your Angular application with
upcoming Angular `9.0` release, or with the following instructions, so your
application can use those `.d.ts` files:
Expand All @@ -312,7 +312,7 @@ application can use those `.d.ts` files:
[![Edit carbon-web-components with React](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/carbon-design-system/carbon-web-components/tree/main/examples/codesandbox/react)

You can use wrapper React components in
`@carbon/web-components/es/components-react` generated
`carbon-web-components/es/components-react` generated
[automatically from the custom elements](./src/globals/wrappers/createReactCustomElementType.ts)
which allows you to use our components seamlessly in your React code. Here's an
example:
Expand Down
6 changes: 3 additions & 3 deletions packages/carbon-web-components/docs/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ You can use our form components with Redux Form by creating a React component th

```javascript
import { Field } from 'redux-form';
import BXFormItem from '@carbon/web-components/es/components-react/form/form-item';
import BXInput from '@carbon/web-components/es/components-react/input/input';
import BXFormItem from 'carbon-web-components/es/components-react/form/form-item';
import BXInput from 'carbon-web-components/es/components-react/input/input';

...

// A React component that wraps form components from `@carbon/web-components`
// A React component that wraps form components from `carbon-web-components`
const FieldImpl = ({ input, label, type, meta: { touched, error } }) => {
const validityMessage = !touched ? undefined : error;
return (
Expand Down
2 changes: 1 addition & 1 deletion packages/carbon-web-components/docs/styling-story.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ You can create a derived class of our component and override [static `styles` pr

```javascript
import { css, customElement } from 'lit-element';
import BXDropdown from '@carbon/web-components/es/components/dropdown/dropdown';
import BXDropdown from 'carbon-web-components/es/components/dropdown/dropdown';

@customElement('my-dropdown')
class MyDropdown extends BXDropdown {
Expand Down
4 changes: 2 additions & 2 deletions packages/carbon-web-components/docs/styling.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Using custom styles in components

As Shadow DOM (one of the Web Components specs that `@carbon/web-components` uses) promises, styles that `@carbon/web-components` defines does not affect styles in your application, or vice versa.
As Shadow DOM (one of the Web Components specs that `carbon-web-components` uses) promises, styles that `carbon-web-components` defines does not affect styles in your application, or vice versa.

However, in cases where your application or a Carbon-derived style guide wants to change the styles of our components, there are a few options.

Expand Down Expand Up @@ -93,7 +93,7 @@ You can create a derived class of our component and override [static `styles` pr

```javascript
import { css, customElement } from 'lit-element';
import BXDropdown from '@carbon/web-components/es/components/dropdown/dropdown';
import BXDropdown from 'carbon-web-components/es/components/dropdown/dropdown';

@customElement('my-dropdown')
class MyDropdown extends BXDropdown {
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 @@ -60,8 +60,8 @@ The first thing you need is **setting up a module bundler** to resolve ECMAScrip
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';
import '@carbon/web-components/es/components/dropdown/dropdown-item';
import 'carbon-web-components/es/components/dropdown/dropdown';
import 'carbon-web-components/es/components/dropdown/dropdown-item';
```

Once you've imported the component modules, you can use our components in the same manner as native HTML tags, for example:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2023
* Copyright IBM Corp. 2019, 2022
*
* 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 @@ -10,10 +10,10 @@
import { html } from 'lit-html';
import { action } from '@storybook/addon-actions';
import { boolean, select } from '@storybook/addon-knobs';
// Below path will be there when an application installs `@carbon/web-components` package.
// Below path will be there when an application installs `carbon-web-components` package.
// In our dev env, we auto-generate the file and re-map below path to to point to the generated file.
// @ts-ignore
import Add16 from '@carbon/web-components/es/icons/add/16';
import Add16 from 'carbon-web-components/es/icons/add/16';
import ifNonNull from '../../globals/directives/if-non-null';
import { BUTTON_KIND, BUTTON_SIZE, BUTTON_ICON_LAYOUT } from './button';
import './button-skeleton';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2023
* Copyright IBM Corp. 2019, 2022
*
* 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 @@ -12,14 +12,14 @@ import { html, property, LitElement } from 'lit-element';
import { repeat } from 'lit-html/directives/repeat';
import { action } from '@storybook/addon-actions';
import { boolean, select } from '@storybook/addon-knobs';
// Below path will be there when an application installs `@carbon/web-components` package.
// Below path will be there when an application installs `carbon-web-components` package.
// In our dev env, we auto-generate the file and re-map below path to to point to the generated file.
// @ts-ignore
import Delete16 from '@carbon/web-components/es/icons/delete/16';
import Delete16 from 'carbon-web-components/es/icons/delete/16';
// @ts-ignore
import Download16 from '@carbon/web-components/es/icons/download/16';
import Download16 from 'carbon-web-components/es/icons/download/16';
// @ts-ignore
import Settings16 from '@carbon/web-components/es/icons/settings/16';
import Settings16 from 'carbon-web-components/es/icons/settings/16';
import BXBtn from '../button/button';
import ifNonNull from '../../globals/directives/if-non-null';
import '../overflow-menu/overflow-menu';
Expand Down Expand Up @@ -114,9 +114,9 @@ class BXCEDemoDataTable extends LitElement {
* @param lhs A value.
* @param rhs Another value.
* @returns
* `0` if the given two values are equal
* A negative value to sort `lhs` to an index lower than `rhs`
* A positive value to sort `rhs` to an index lower than `lhs`
* * `0` if the given two values are equal
* * A negative value to sort `lhs` to an index lower than `rhs`
* * A positive value to sort `rhs` to an index lower than `lhs`
*/
private _compare(lhs, rhs) {
if (typeof lhs === 'number' && typeof rhs === 'number') {
Expand Down
12 changes: 6 additions & 6 deletions packages/carbon-web-components/src/components/icon/icon-story.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2023
* Copyright IBM Corp. 2019, 2022
*
* 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 { html, svg } from 'lit-html';

// Below path will be there when an application installs `@carbon/web-components` package.
// Below path will be there when an application installs `carbon-web-components` package.
// In our dev env, we auto-generate the file and re-map below path to to point to the generated file.
// @ts-ignore
import Add16 from '@carbon/web-components/es/icons/add/16';
import Add16 from 'carbon-web-components/es/icons/add/16';
// @ts-ignore
import Add20 from '@carbon/web-components/es/icons/add/20';
import Add20 from 'carbon-web-components/es/icons/add/20';
// @ts-ignore
import Add24 from '@carbon/web-components/es/icons/add/24';
import Add24 from 'carbon-web-components/es/icons/add/24';
// @ts-ignore
import Add32 from '@carbon/web-components/es/icons/add/32';
import Add32 from 'carbon-web-components/es/icons/add/32';

import storyDocs from './icon-story.mdx';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2023
* Copyright IBM Corp. 2019, 2022
*
* 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 @@ -10,10 +10,10 @@
import { html } from 'lit-element';
import { action } from '@storybook/addon-actions';
import { boolean, select } from '@storybook/addon-knobs';
// Below path will be there when an application installs `@carbon/web-components` package.
// Below path will be there when an application installs `carbon-web-components` package.
// In our dev env, we auto-generate the file and re-map below path to to point to the generated file.
// @ts-ignore
import Download16 from '@carbon/web-components/es/icons/download/16';
import Download16 from 'carbon-web-components/es/icons/download/16';
import textNullable from '../../../.storybook/knob-text-nullable';
import ifNonNull from '../../globals/directives/if-non-null';
import { LINK_SIZE } from './link';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2023
* Copyright IBM Corp. 2019, 2022
*
* 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 { html } from 'lit-element';
import { boolean, select } from '@storybook/addon-knobs';
// Below path will be there when an application installs `@carbon/web-components` package.
// Below path will be there when an application installs `carbon-web-components` package.
// In our dev env, we auto-generate the file and re-map below path to to point to the generated file.
// @ts-ignore
import Filter16 from '@carbon/web-components/es/icons/filter/16';
import Filter16 from 'carbon-web-components/es/icons/filter/16';
import textNullable from '../../../.storybook/knob-text-nullable';
import ifNonNull from '../../globals/directives/if-non-null';
import '../button/button';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2023
* Copyright IBM Corp. 2019, 2022
*
* 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 { html } from 'lit-element';
import { boolean, select } from '@storybook/addon-knobs';
// Below path will be there when an application installs `@carbon/web-components` package.
// Below path will be there when an application installs `carbon-web-components` package.
// In our dev env, we auto-generate the file and re-map below path to to point to the generated file.
// @ts-ignore
import Fade16 from '@carbon/web-components/es/icons/fade/16';
import Fade16 from 'carbon-web-components/es/icons/fade/16';
import contentStyles from 'carbon-components/scss/components/ui-shell/_content.scss';
import textNullable from '../../../.storybook/knob-text-nullable';
import ifNonNull from '../../globals/directives/if-non-null';
Expand Down
6 changes: 3 additions & 3 deletions packages/carbon-web-components/tests/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2023
* Copyright IBM Corp. 2019, 2022
*
* 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 Down Expand Up @@ -68,9 +68,9 @@ module.exports = function setupKarma(config) {
devtool: 'inline-source-maps',
resolve: {
alias: {
// In our development environment (where `@carbon/web-components/es/icons` may not have been built yet),
// In our development environment (where `carbon-web-components/es/icons` may not have been built yet),
// we load icons from `@carbon/icons` and use a Webpack loader to convert the icons to `lit-html` version
'@carbon/web-components/es/icons': '@carbon/icons/lib',
'carbon-web-components/es/icons': '@carbon/icons/lib',
},
extensions: ['.js', '.ts'],
},
Expand Down
4 changes: 2 additions & 2 deletions packages/web-components/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2023
* Copyright IBM Corp. 2020, 2022
*
* 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 @@ -12,7 +12,7 @@ import { classMap } from 'lit-html/directives/class-map';
import coreEvents from '@storybook/core-events';
import addons from '@storybook/addons';

import '../src/internal/vendor/@carbon/web-components/components/skip-to-content/skip-to-content.js';
import '@carbon/web-components/es/components/skip-to-content/skip-to-content.js';

import { withKnobs } from '@storybook/addon-knobs';
import { CURRENT_THEME } from '@carbon/storybook-addon-theme/es/shared';
Expand Down
4 changes: 2 additions & 2 deletions packages/web-components/.storybook/react/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2023
* Copyright IBM Corp. 2020, 2022
*
* 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 Down Expand Up @@ -58,7 +58,7 @@ class CreateReactCustomElementTypeProxyPlugin {
/**
* A WebPack resolver plugin that proxies module request for:
*
* * `@carbon/web-components/es/components-react/**` to the corresponsing local path in this project
* * `carbon-web-components/es/components-react/**` to the corresponsing local path in this project
* * `es/components`/`es/globals` to the corresponding source code, given the former may not have been built yet
* * `{es,src}/components-react/componentname/{defs,*-connect}` to `src/components/componentname/{defs,*-connect}`,
* given the former may not have been built yet
Expand Down
4 changes: 2 additions & 2 deletions packages/web-components/.storybook/react/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2023
* Copyright IBM Corp. 2020, 2022
*
* 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 @@ -12,7 +12,7 @@ import React, { StrictMode } from 'react';
import coreEvents from '@storybook/core-events';
import addons from '@storybook/addons';
import { withKnobs } from '@storybook/addon-knobs';
import BXSkipToContent from '../../src/internal/vendor/@carbon/web-components/components-react/skip-to-content/skip-to-content';
import BXSkipToContent from '@carbon/web-components/es/components-react/skip-to-content/skip-to-content';
import { CURRENT_THEME } from '@carbon/storybook-addon-theme/es/shared';
import containerStyles from './container.scss'; // eslint-disable-line import/first

Expand Down
22 changes: 1 addition & 21 deletions packages/web-components/gulp-tasks/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2023
* Copyright IBM Corp. 2020, 2022
*
* 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 Down Expand Up @@ -57,26 +57,6 @@ module.exports = {
sassDestDir: 'scss',
tasksDir: 'gulp-tasks',
testsDir: 'tests',
carbonWebComponentsCJSSrcDir: path.resolve(
__dirname,
'../../carbon-web-components/lib'
),
carbonWebComponentsESSrcDir: path.resolve(
__dirname,
'../../carbon-web-components/es'
),
carbonWebComponentsVendorSrcDir: path.resolve(
__dirname,
'../src/internal/vendor/@carbon/web-components'
),
carbonWebComponentsVendorESDstDir: path.resolve(
__dirname,
'../es/internal/vendor/@carbon/web-components'
),
carbonWebComponentsVendorCJSDstDir: path.resolve(
__dirname,
'../lib/internal/vendor/@carbon/web-components'
),
servicesCJSSrcDir: path.resolve(__dirname, '../../services/lib'),
servicesESSrcDir: path.resolve(__dirname, '../../services/es'),
servicesVendorSrcDir: path.resolve(
Expand Down
Loading

0 comments on commit 4c267ae

Please sign in to comment.