Skip to content

Commit

Permalink
Merge branch 'main' into 10670-sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
janhassel authored Feb 18, 2022
2 parents 9460d36 + cdacbe8 commit 8b9560f
Show file tree
Hide file tree
Showing 262 changed files with 2,676 additions and 1,417 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ body:
- '@carbon/pictograms'
- '@carbon/pictograms-react'
- '@carbon/react'
- '@carbon/styles'
- '@carbon/themes'
- '@carbon/type'
- '@carbon/upgrade'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-react-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
node-version: '16.x'
- name: Install dependencies
run: yarn install --immutable --immutable-cache --check-cache
run: yarn install --immutable --immutable-cache
- name: Build project
run: yarn build
- name: Install ibmcloud CLI
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ packages/icons-react/next/**
**/_inlined/**

# Examples
**/examples/**
packages/**/examples/**
!packages/themes/examples/**

# Yarn
Expand Down
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.
Binary file removed .yarn/cache/del-npm-3.0.0-e5f4cb556d-88192c1041.zip
Binary file not shown.
Binary file removed .yarn/cache/depd-npm-2.0.0-b6c51a4b43-abbe19c768.zip
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/kew-npm-0.7.0-313b8dfdfe-f21ccf2456.zip
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/resolve-patch-b4a69197d3-a0dd7d16a8.zip
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/tmp-npm-0.0.30-0fd2e9c3eb-d3e97e8e73.zip
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.
1 change: 1 addition & 0 deletions config/stylelint-config-carbon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = {
require.resolve('stylelint-config-standard'),
require.resolve('stylelint-no-unsupported-browser-features'),
require.resolve('stylelint-config-idiomatic-order'),
require.resolve('stylelint-config-standard-scss'),
require.resolve('./rules/possible-errors'),
require.resolve('./rules/limit-language-features'),
require.resolve('./rules/stylistic-issues'),
Expand Down
17 changes: 9 additions & 8 deletions config/stylelint-config-carbon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,20 @@
"access": "public"
},
"peerDependencies": {
"stylelint": "^13.6.0"
"stylelint": "^14.3.0"
},
"dependencies": {
"stylelint-config-idiomatic-order": "^8.1.0",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^22.0.0",
"stylelint-no-unsupported-browser-features": "^5.0.1",
"stylelint-order": "^4.1.0",
"stylelint-prettier": "^1.2.0",
"stylelint-scss": "^3.19.0"
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^24.0.0",
"stylelint-config-standard-scss": "^3.0.0",
"stylelint-no-unsupported-browser-features": "^5.0.2",
"stylelint-order": "^5.0.0",
"stylelint-prettier": "^2.0.0",
"stylelint-scss": "^4.1.0"
},
"devDependencies": {
"prettier": "^2.2.1",
"stylelint": "^13.13.1"
"stylelint": "^14.3.0"
}
}
19 changes: 19 additions & 0 deletions config/stylelint-config-carbon/plugins/scss.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ module.exports = {
// @-rule
// Disallow unknown at-rules. Should be used instead of stylelint's at-rule-no-unknown.
'scss/at-rule-no-unknown': true,
// Disallow parentheses in conditional @ rules (if, elsif, while)
'scss/at-rule-conditional-no-parentheses': OFF,

// $-variable
// Require a newline after the colon in $-variable declarations.
Expand Down Expand Up @@ -89,6 +91,8 @@ module.exports = {
'scss/double-slash-comment-inline': 'never',
// Require or disallow whitespace after the // in //-comments
'scss/double-slash-comment-whitespace-inside': OFF,
// Disallow empty comments. Should be used instead of the stylelint's comment-no-empty because the core rule ignores SCSS-like comments.
'scss/comment-no-empty': OFF,

// Declaration
// Require or disallow properties with - in their names to be in a form of a nested group.
Expand Down Expand Up @@ -116,4 +120,19 @@ module.exports = {
// Disallow redundant nesting selectors (&).
'scss/selector-no-redundant-nesting-selector': true,
},
overrides: [
{
files: [
'./packages/components/**/*.scss',
'./packages/grid/scss/*.scss',
'./packages/layout/scss/*.scss',
'./packages/motion/**/*.scss',
'./packages/type/scss/*.scss',
'./packages/import-once/**/*.scss',
],
rules: {
'scss/no-global-function-names': OFF,
},
},
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ module.exports = {
'color-named': 'never',
// Disallow hex colors.
'color-no-hex': OFF,
// Specify modern or legacy notation for applicable color-functions.
// Currently causes errors with sass
'color-function-notation': OFF,
'alpha-value-notation': OFF,

// Function
// Specify a blacklist of disallowed functions.
Expand Down
4 changes: 2 additions & 2 deletions docs/migration/v11.md
Original file line number Diff line number Diff line change
Expand Up @@ -1270,8 +1270,8 @@ For full Sass API documentation, visit the
| `scss/grid.scss` | | Moved to `index.scss` |
| `scss/index.scss` | | Moved to `index.scss` |
| `scss/_css-grid.scss` | | New |
| `scss/_flexbox.scss` | | New |
| `scss/_mixins.scss` | | Moved to `scss/_flexbox.scss` |
| `scss/flex-grid.scss` | | New |
| `scss/_mixins.scss` | | Moved to `scss/flex-grid.scss` |
| `scss/_prefix.scss` | | Moved to `scss/_config.scss` |
| `scss/12.scss` | | This file has been removed, to configure the grid use `scss/_config.scss` |

Expand Down
24 changes: 24 additions & 0 deletions examples/codesandbox-styles/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
15 changes: 15 additions & 0 deletions examples/codesandbox-styles/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions examples/codesandbox-styles/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Carbon Styles Sandbox</title>
</head>
<body>
<button class="cds--btn cds--btn--primary">Hello world</button>
<script type="module" src="/main.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/codesandbox-styles/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './style.scss';
15 changes: 15 additions & 0 deletions examples/codesandbox-styles/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "codesandbox-styles",
"private": true,
"version": "0.0.0",
"scripts": {
"develop": "vite"
},
"devDependencies": {
"vite": "^2.8.0"
},
"dependencies": {
"@carbon/styles": "0.14.0",
"sass": "^1.49.7"
}
}
3 changes: 3 additions & 0 deletions examples/codesandbox-styles/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@use '@carbon/styles' with (
$font-path: '@ibm/plex'
);
24 changes: 24 additions & 0 deletions examples/codesandbox/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
13 changes: 13 additions & 0 deletions examples/codesandbox/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
18 changes: 18 additions & 0 deletions examples/codesandbox/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "codesandbox",
"private": true,
"version": "0.0.0",
"scripts": {
"develop": "vite"
},
"dependencies": {
"@carbon/react": "0.14.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@vitejs/plugin-react": "^1.0.7",
"sass": "^1.49.7",
"vite": "^2.8.0"
}
}
7 changes: 7 additions & 0 deletions examples/codesandbox/src/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Button } from '@carbon/react';

function App() {
return <Button>Hello world</Button>;
}

export default App
15 changes: 15 additions & 0 deletions examples/codesandbox/src/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions examples/codesandbox/src/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@use '@carbon/react' with (
$font-path: '@ibm/plex',
);
12 changes: 12 additions & 0 deletions examples/codesandbox/src/main.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import './index.scss'

import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'

ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
)
7 changes: 7 additions & 0 deletions examples/codesandbox/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
});
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"workspaces": [
"actions/*",
"config/*",
"examples/*",
"packages/*",
"www"
],
Expand Down Expand Up @@ -55,7 +56,7 @@
"all-contributors-cli": "^6.19.0",
"cross-env": "^7.0.0",
"cross-spawn": "^7.0.0",
"doctoc": "^1.4.0",
"doctoc": "^2.0.0",
"eslint": "^7.28.0",
"fs-extra": "^10.0.0",
"glob": "^7.1.4",
Expand All @@ -69,7 +70,7 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rimraf": "^3.0.0",
"stylelint": "^13.13.1"
"stylelint": "^14.3.0"
},
"commitlint": {
"extends": [
Expand Down
12 changes: 6 additions & 6 deletions packages/carbon-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/react",
"description": "React components for the Carbon Design System",
"version": "0.14.0-rc.0",
"version": "0.14.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -43,11 +43,11 @@
},
"dependencies": {
"@carbon/feature-flags": "^0.7.0",
"@carbon/icons-react": "^10.46.0-rc.0",
"@carbon/styles": "^0.14.0-rc.0",
"@carbon/icons-react": "^10.46.0",
"@carbon/styles": "^0.14.0",
"@carbon/telemetry": "0.0.0-alpha.6",
"carbon-components": "^10.53.0-rc.0",
"carbon-components-react": "^7.53.0-rc.0",
"carbon-components": "^10.53.0",
"carbon-components-react": "^7.53.0",
"carbon-icons": "^7.0.7"
},
"devDependencies": {
Expand All @@ -58,7 +58,7 @@
"@babel/plugin-transform-react-constant-elements": "^7.16.7",
"@babel/preset-env": "^7.16.7",
"@babel/preset-react": "^7.16.7",
"@carbon/themes": "^10.51.0-rc.0",
"@carbon/themes": "^10.51.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^21.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//

.demo-icon-example {
display: flex;
width: 10rem;
Expand Down
10 changes: 10 additions & 0 deletions packages/carbon-react/tasks/build-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ async function build() {
},
],
},
{
type: 'directory',
filepath: 'aspect-ratio',
files: [
{
type: 'file',
filepath: '_index.scss',
},
],
},
{
type: 'directory',
filepath: 'breadcrumb',
Expand Down
Loading

0 comments on commit 8b9560f

Please sign in to comment.