Skip to content

Commit a059f4e

Browse files
joshblackkodiakhq[bot]
authored andcommitted
feat(carbon-react): add public style entrypoints (#11009)
* chore(styles): add list for public files * chore(carbon-react): update build-styles task * feat(carbon-react): add in all public sass files * chore(styles): update files export to include full import path * chore(carbon-react): fix build-styles task * chore(styles): update file output * fix(carbon-react): update root index.scss * chore(styles): add relative path for tests * test(carbon-react): add scss tests * chore(project): update sass deps Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent e2c445f commit a059f4e

File tree

104 files changed

+1142
-624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+1142
-624
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Copyright IBM Corp. 2018, 2018
3+
*
4+
* This source code is licensed under the Apache-2.0 license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @jest-environment node
8+
*/
9+
10+
'use strict';
11+
12+
const { files } = require('@carbon/styles/files');
13+
const { SassRenderer } = require('@carbon/test-utils/scss');
14+
15+
const { render } = SassRenderer.create(__dirname);
16+
17+
const relativePaths = files.map((file) => {
18+
return file.relativePath;
19+
});
20+
21+
describe('@carbon/react/scss', () => {
22+
describe.each(relativePaths)('%s', (relativePath) => {
23+
it('should be importable', async () => {
24+
await expect(
25+
render(`@use '../${relativePath}' as test;`)
26+
).resolves.toBeDefined();
27+
});
28+
});
29+
});

packages/carbon-react/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Code generated by @carbon/react. DO NOT EDIT.
12
//
23
// Copyright IBM Corp. 2018, 2018
34
//

packages/carbon-react/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
"@babel/plugin-transform-react-constant-elements": "^7.16.7",
5959
"@babel/preset-env": "^7.16.7",
6060
"@babel/preset-react": "^7.16.7",
61-
"@carbon/themes": "^10.53.1",
61+
"@carbon/test-utils": "^10.21.0",
62+
"@carbon/themes": "^10.53.0",
6263
"@rollup/plugin-babel": "^5.3.0",
6364
"@rollup/plugin-commonjs": "^21.0.0",
6465
"@rollup/plugin-node-resolve": "^13.0.0",
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Code generated by @carbon/react. DO NOT EDIT.
2+
//
3+
// Copyright IBM Corp. 2018, 2018
4+
//
5+
// This source code is licensed under the Apache-2.0 license found in the
6+
// LICENSE file in the root directory of this source tree.
7+
//
8+
9+
@forward '@carbon/styles/scss/components';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Code generated by @carbon/react. DO NOT EDIT.
2+
//
3+
// Copyright IBM Corp. 2018, 2018
4+
//
5+
// This source code is licensed under the Apache-2.0 license found in the
6+
// LICENSE file in the root directory of this source tree.
7+
//
8+
9+
@forward '@carbon/styles/scss/components/accordion/accordion';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Code generated by @carbon/react. DO NOT EDIT.
2+
//
3+
// Copyright IBM Corp. 2018, 2018
4+
//
5+
// This source code is licensed under the Apache-2.0 license found in the
6+
// LICENSE file in the root directory of this source tree.
7+
//
8+
9+
@forward '@carbon/styles/scss/components/aspect-ratio/aspect-ratio';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Code generated by @carbon/react. DO NOT EDIT.
2+
//
3+
// Copyright IBM Corp. 2018, 2018
4+
//
5+
// This source code is licensed under the Apache-2.0 license found in the
6+
// LICENSE file in the root directory of this source tree.
7+
//
8+
9+
@forward '@carbon/styles/scss/components/breadcrumb/breadcrumb';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Code generated by @carbon/react. DO NOT EDIT.
2+
//
3+
// Copyright IBM Corp. 2018, 2018
4+
//
5+
// This source code is licensed under the Apache-2.0 license found in the
6+
// LICENSE file in the root directory of this source tree.
7+
//
8+
9+
@forward '@carbon/styles/scss/components/button/button';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Code generated by @carbon/react. DO NOT EDIT.
2+
//
3+
// Copyright IBM Corp. 2018, 2018
4+
//
5+
// This source code is licensed under the Apache-2.0 license found in the
6+
// LICENSE file in the root directory of this source tree.
7+
//
8+
9+
@forward '@carbon/styles/scss/components/button/tokens';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Code generated by @carbon/react. DO NOT EDIT.
2+
//
3+
// Copyright IBM Corp. 2018, 2018
4+
//
5+
// This source code is licensed under the Apache-2.0 license found in the
6+
// LICENSE file in the root directory of this source tree.
7+
//
8+
9+
@forward '@carbon/styles/scss/components/checkbox/checkbox';

0 commit comments

Comments
 (0)