Skip to content

Commit

Permalink
Merge pull request #997 from carbon-design-system/dev
Browse files Browse the repository at this point in the history
chore: publish `v1.42`
  • Loading branch information
SimonFinney authored Jun 10, 2021
2 parents 63d5d00 + b3c3432 commit 78f4cc2
Show file tree
Hide file tree
Showing 41 changed files with 902 additions and 114 deletions.
Binary file removed .yarn/offline-mirror/cssfontparser-1.2.1.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/jest-canvas-mock-2.1.2.tgz
Binary file not shown.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ To install Carbon for IBM Security in your project, you'll need to run one of th

```bash
# npm - https://www.npmjs.com
npm i -S @carbon/ibm-security
npm i @carbon/ibm-security

# Yarn - https://yarnpkg.com
yarn add @carbon/ibm-security
```

### Distribution tags

Please use [distribution tags](https://docs.npmjs.com/cli/dist-tag) to install the most relevant version of this framework. e.g. `npm i -S @carbon/ibm-security@latest`:
Please use [distribution tags](https://docs.npmjs.com/cli/dist-tag) to install the most relevant version of this library. e.g. `npm i @carbon/ibm-security@latest`:

- `@latest` - Stable
- `@canary` - Unstable prerelease
Expand All @@ -69,10 +69,10 @@ const { ComponentName } = require('@carbon/ibm-security');

To add a component style to your build, import the component directly. Importing a component this way will bring in any dependencies that component has as well. The import system removes duplicate dependencies, so shared dependencies between components will not create extra CSS.

In addition, to resolve your `@import` declarations, you will need to setup `sass` so that `node_modules` is included in the [`includePaths`](https://github.com/sass/node-sass#includepaths) option.
In addition, to resolve your import declarations, you will need to setup `sass` so that `node_modules` is included in the [`includePaths`](https://github.com/sass/node-sass#includepaths) option.

```scss
@import '@carbon/ibm-security/scss/components/ComponentName/index';
@use '@carbon/ibm-security/scss/components/ComponentName';
```

#### Feature flags
Expand All @@ -86,7 +86,7 @@ $security--feature-flags: (
security--css-custom-property-theming: false,
);

@import '@carbon/ibm-security/scss/components/ComponentName/index';
@use '@carbon/ibm-security/scss/components/ComponentName';
```

Also refer to [feature flags in Carbon](https://github.com/carbon-design-system/carbon/blob/main/packages/components/src/globals/scss/_feature-flags.scss).
Expand Down
8 changes: 4 additions & 4 deletions docs/migration/carbon-for-ibm-security/color.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Also refer to [migration in Carbon](https://github.com/carbon-design-system/carb

### Imports

| `carbon-addons-security` | `@carbon/ibm-security` |
| ----------------------------------------- | ---------------------------------------------------------- |
| `import { white } from '@ibmduo/colors';` | `import { white } from '@carbon/colors';` |
| `@import '@ibmduo/colors/**/*';` | `@import '@carbon/ibm-security/scss/globals/color/index';` |
| `carbon-addons-security` | `@carbon/ibm-security` |
| ----------------------------------------- | ------------------------------------------------- |
| `import { white } from '@ibmduo/colors';` | `import { white } from '@carbon/colors';` |
| `@use '@ibmduo/colors/**/*';` | `@use '@carbon/ibm-security/scss/globals/color';` |

### Variables

Expand Down
6 changes: 3 additions & 3 deletions docs/migration/carbon-for-ibm-security/grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Also refer to [migration in Carbon](https://github.com/carbon-design-system/carb

### Imports

| `carbon-addons-security` | `@carbon/ibm-security` |
| ------------------------------ | --------------------------------------------------------- |
| `@import '@ibmduo/grid/**/*';` | `@import '@carbon/ibm-security/scss/globals/grid/index';` |
| `carbon-addons-security` | `@carbon/ibm-security` |
| --------------------------- | ------------------------------------------------ |
| `@use '@ibmduo/grid/**/*';` | `@use '@carbon/ibm-security/scss/globals/grid';` |

### Feature flags

Expand Down
8 changes: 4 additions & 4 deletions docs/migration/carbon-for-ibm-security/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Also refer to [migration in Carbon](https://github.com/carbon-design-system/carb

### Imports

| `carbon-addons-security` | `@carbon/ibm-security` |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| `import { spacing } from '@ibm-security/carbon-addons-security/lib/scss-exports';` | `import { spacing } from '@carbon/layout';` |
| `@import '@ibmduo/grid/**/*';` | `@import '@carbon/ibm-security/scss/globals/layout/index';` |
| `carbon-addons-security` | `@carbon/ibm-security` |
| ---------------------------------------------------------------------------------- | -------------------------------------------------- |
| `import { spacing } from '@ibm-security/carbon-addons-security/lib/scss-exports';` | `import { spacing } from '@carbon/layout';` |
| `@use '@ibmduo/grid/**/*';` | `@use '@carbon/ibm-security/scss/globals/layout';` |

### Functions

Expand Down
6 changes: 3 additions & 3 deletions docs/migration/carbon-for-ibm-security/type.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Also refer to [migration in Carbon](https://github.com/carbon-design-system/carb

### Imports

| `carbon-addons-security` | `@carbon/ibm-security` |
| ------------------------------ | --------------------------------------------------------- |
| `@import '@ibmduo/type/**/*';` | `@import '@carbon/ibm-security/scss/globals/type/index';` |
| `carbon-addons-security` | `@carbon/ibm-security` |
| --------------------------- | ------------------------------------------------ |
| `@use '@ibmduo/type/**/*';` | `@use '@carbon/ibm-security/scss/globals/type';` |

### Classes

Expand Down
2 changes: 1 addition & 1 deletion docs/themes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Currently, only 2 themes are supported: **Gray 100**, activated by default, and
If your project is using Sass, you can include the following in your Sass file:

```scss
@import '@carbon/ibm-security/scss/globals/theme/index';
@use '@carbon/ibm-security/scss/globals/theme';
```

This will include theming styles and tokens for the **Gray 100 theme _by default_**.
Expand Down
12 changes: 12 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @file Jest configuration.
* @copyright IBM Security 2021
*/

module.exports = {
collectCoverage: true,
rootDir: 'src',
setupFilesAfterEnv: ['<rootDir>/../config/jest'],
snapshotSerializers: ['enzyme-to-json/serializer'],
testTimeout: 10000,
};
17 changes: 1 addition & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@carbon/ibm-security",
"version": "1.41.0",
"version": "1.42.0-prerelease.3",
"description": "Carbon for IBM Security",
"license": "Apache-2.0",
"main": "lib/index.js",
Expand Down Expand Up @@ -151,7 +151,6 @@
"handlebars": "^4.4.3",
"husky": "^3.0.9",
"jest": "^24.7.1",
"jest-canvas-mock": "^2.1.0",
"lint-staged": "^9.4.2",
"node-sass": "^4.7.2",
"npm-run-all": "^4.1.5",
Expand Down Expand Up @@ -191,20 +190,6 @@
"scss",
"macros"
],
"jest": {
"collectCoverage": true,
"coverageDirectory": "<rootDir>/../coverage",
"rootDir": "src",
"watchman": false,
"setupFilesAfterEnv": [
"<rootDir>/../config/jest",
"jest-canvas-mock"
],
"snapshotSerializers": [
"enzyme-to-json/serializer"
],
"testURL": "http://localhost/"
},
"publishConfig": {
"access": "public"
},
Expand Down
131 changes: 115 additions & 16 deletions src/__tests__/scss/__snapshots__/SCSS.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11463,6 +11463,121 @@ li.bx--accordion__item--disabled:last-of-type {
background-color: var(--cds-hover-ui, #353535);
}

.security--layout-module--list-item {
display: flex;
padding: 1rem;
background-color: var(--cds-ui-01, #262626);
border: none;
border-top: 0.0625rem solid var(--cds-ui-03, #393939);
}

.security--layout-module--list-item:last-of-type {
border-bottom: 0.0625rem solid var(--cds-ui-03, #393939);
}

.security--layout-module--list-item--a, .security--layout-module--list-item--button {
transition-duration: 0.2s;
transition-property: background-color;
transition-timing-function: cubic-bezier(0.2, 0, 0.38, 0.9);
color: inherit;
text-decoration: none;
cursor: pointer;
}

.security--layout-module--list-item--button {
font-family: inherit;
text-align: left;
width: 100%;
}

.security--layout-module--list-item--a:focus, .security--layout-module--list-item--a:hover, .security--layout-module--list-item--button:focus, .security--layout-module--list-item--button:hover {
background-color: var(--cds-hover-ui, #353535);
}

.security--layout-module--list-item--a:focus, .security--layout-module--list-item--button:focus {
outline: 2px solid var(--cds-focus, #ffffff);
outline-offset: -2px;
}

@media screen and (prefers-contrast) {
.security--layout-module--list-item--a:focus, .security--layout-module--list-item--button:focus {
outline-style: dotted;
}
}

.security--layout-module--list-item__farside-column {
margin-left: auto;
}

.security--layout-module--list-item__title, .security--layout-module--list-item__description {
margin-top: 0;
}

.security--layout-module--list-item__icon {
margin-right: 1rem;
margin-bottom: 1rem;
}

.security--layout-module--list-item__avatar {
margin-top: 0.25rem;
margin-right: 0.75rem;
}

.security--layout-module--list-item__avatar:first-child {
margin-top: 0;
}

.security--layout-module--list-item__profile-image {
margin-right: 0.75rem;
height: 24px;
width: 24px;
}

.security--layout-module--list-item__title {
font-size: var(--cds-body-short-01-font-size, 0.875rem);
font-weight: var(--cds-body-short-01-font-weight, 400);
line-height: var(--cds-body-short-01-line-height, 1.29);
letter-spacing: var(--cds-body-short-01-letter-spacing, 0.16px);
}

.security--layout-module--list-item__description, .security--layout-module--list-item__label {
color: var(--cds-text-02, #c6c6c6);
}

.security--layout-module--list-item__description {
font-size: var(--cds-body-short-01-font-size, 0.875rem);
font-weight: var(--cds-body-short-01-font-weight, 400);
line-height: var(--cds-body-short-01-line-height, 1.29);
letter-spacing: var(--cds-body-short-01-letter-spacing, 0.16px);
}

.security--layout-module--list-item__label {
font-size: var(--cds-label-01-font-size, 0.75rem);
font-weight: var(--cds-label-01-font-weight, 400);
line-height: var(--cds-label-01-line-height, 1.34);
letter-spacing: var(--cds-label-01-letter-spacing, 0.32px);
display: block;
padding-top: 0.25rem;
}

.security--layout-module--list-item__title, .security--layout-module--list-item__description, .security--layout-module--list-item__label {
margin-bottom: 0.25rem;
}

.security--layout-module--list-item__title:last-child, .security--layout-module--list-item__description:last-child, .security--layout-module--list-item__label:last-child {
margin-bottom: 0;
}

.security--layout-module--list-item .bx--tag {
margin-top: -0.25rem;
margin-bottom: -0.25rem;
}

.security--layout-module--list-item__component {
padding-top: 1rem;
margin-bottom: 0;
}

.security--layout-module--title-bar {
display: flex;
}
Expand Down Expand Up @@ -27929,22 +28044,6 @@ a.bx--tabs__nav-link:focus, a.bx--tabs__nav-link:active {
fill: var(--cds-disabled-02, #525252);
}

.bx--tile-group {
box-sizing: border-box;
margin: 0;
padding: 0;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
border: 0;
}

.bx--tile-group *,
.bx--tile-group *::before,
.bx--tile-group *::after {
box-sizing: inherit;
}

.bx--time-picker {
display: flex;
align-items: flex-end;
Expand Down
3 changes: 1 addition & 2 deletions src/components/Breadcrumb/_index.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
////
/// Breadcrumb component.
/// @group breadcrumb
/// @copyright IBM Security 2019 - 2020
/// @copyright IBM Security 2019 - 2021
////

@import '@carbon/themes/scss/tokens';
@import '@carbon/type/scss/styles';
@import 'carbon-components/scss/components/breadcrumb/breadcrumb';

@import 'carbon-components/scss/globals/scss/css--reset';
@import 'carbon-components/scss/globals/scss/vars';

@import '../../globals/namespace/index';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* @file Button cluster module tests.
* @copyright IBM Security 2020
*/

import { render } from '@testing-library/react';
import React from 'react';

import { ButtonClusterModule } from '../../../..';

const { name } = ButtonClusterModule;

describe(name, () => {
test('has no accessibility violations', async () => {
const { container } = render(
<ButtonClusterModule>{name}</ButtonClusterModule>
);

await expect(container).toHaveNoAxeViolations();
await expect(container).toHaveNoDAPViolations(name);
});

test(`adds content for the '${name}'`, () => {
expect(
render(<ButtonClusterModule>{name}</ButtonClusterModule>).getByText(name)
).toBeInTheDocument();
});

test('adds additional props to the containing node', () => {
const dataTestId = 'dataTestId';

expect(
render(
<ButtonClusterModule data-testid={dataTestId}>
{name}
</ButtonClusterModule>
).getByTestId(dataTestId)
).toBeInTheDocument();
});
});
Loading

0 comments on commit 78f4cc2

Please sign in to comment.