Skip to content

Commit

Permalink
Merge branch 'master' into 7765-controlled-password-story
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Feb 12, 2021
2 parents b2ac85d + dbe33f4 commit dc357c6
Show file tree
Hide file tree
Showing 11 changed files with 141 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ Array [
"expressiveHeading05",
"expressiveHeading06",
"expressiveParagraph01",
"fast01",
"fast02",
"field01",
"field02",
"fluid",
Expand Down Expand Up @@ -184,6 +186,8 @@ Array [
"magenta90",
"miniUnit",
"miniUnits",
"moderate01",
"moderate02",
"motion",
"orange",
"orange40",
Expand Down Expand Up @@ -231,6 +235,8 @@ Array [
"selectedUI",
"skeleton01",
"skeleton02",
"slow01",
"slow02",
"spacing",
"spacing01",
"spacing02",
Expand Down
47 changes: 47 additions & 0 deletions packages/motion/__tests__/__snapshots__/motion-test.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`@carbon/motion @carbon/motion/scss/motion.scss 1`] = `
Array [
"fast-01",
"fast-02",
"moderate-01",
"moderate-02",
"slow-01",
"slow-02",
"carbon--easings",
]
`;

exports[`@carbon/motion Public API 1`] = `
Object {
"easings": Object {
"entrance": Object {
"expressive": "cubic-bezier(0, 0, 0.3, 1)",
"productive": "cubic-bezier(0, 0, 0.38, 0.9)",
},
"exit": Object {
"expressive": "cubic-bezier(0.4, 0.14, 1, 1)",
"productive": "cubic-bezier(0.2, 0, 1, 0.9)",
},
"standard": Object {
"expressive": "cubic-bezier(0.4, 0.14, 0.3, 1)",
"productive": "cubic-bezier(0.2, 0, 0.38, 0.9)",
},
},
"fast01": "70ms",
"fast02": "110ms",
"moderate01": "150ms",
"moderate02": "240ms",
"motion": [Function],
"slow01": "400ms",
"slow02": "700ms",
"unstable_tokens": Array [
"fast01",
"fast02",
"moderate01",
"moderate02",
"slow01",
"slow02",
],
}
`;
30 changes: 30 additions & 0 deletions packages/motion/__tests__/motion-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Copyright IBM Corp. 2018, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* @jest-environment node
*/

import { SassRenderer } from '@carbon/test-utils/scss';
import * as CarbonMotion from '../src';

const { render } = SassRenderer.create(__dirname);

describe('@carbon/motion', () => {
test('Public API', () => {
expect(CarbonMotion).toMatchSnapshot();
});

test('@carbon/motion/scss/motion.scss', async () => {
const { getValue } = await render(`
@use 'sass:meta';
@use '../scss/motion';
$_: get-value(meta.module-variables('motion'));
`);
const variables = getValue(0);
expect(Object.keys(variables)).toMatchSnapshot();
});
});
24 changes: 24 additions & 0 deletions packages/motion/scss/motion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,30 @@
// LICENSE file in the root directory of this source tree.
//

/// @access public
/// @group @carbon/motion
$fast-01: 70ms !default;

/// @access public
/// @group @carbon/motion
$fast-02: 110ms !default;

/// @access public
/// @group @carbon/motion
$moderate-01: 150ms !default;

/// @access public
/// @group @carbon/motion
$moderate-02: 240ms !default;

/// @access public
/// @group @carbon/motion
$slow-01: 400ms !default;

/// @access public
/// @group @carbon/motion
$slow-02: 700ms !default;

/// Common component easings
/// @type Map
/// @access public
Expand Down
16 changes: 16 additions & 0 deletions packages/motion/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
* LICENSE file in the root directory of this source tree.
*/

export const fast01 = '70ms';
export const fast02 = '110ms';
export const moderate01 = '150ms';
export const moderate02 = '240ms';
export const slow01 = '400ms';
export const slow02 = '700ms';

export const unstable_tokens = [
'fast01',
'fast02',
'moderate01',
'moderate02',
'slow01',
'slow02',
];

export const easings = {
standard: {
productive: 'cubic-bezier(0.2, 0, 0.38, 0.9)',
Expand Down
5 changes: 4 additions & 1 deletion packages/react/src/components/DataTable/TableBatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ const TableBatchActions = ({
);

return (
<div {...rest} className={batchActionsClasses}>
<div
{...rest}
aria-hidden={!shouldShowBatchActions}
className={batchActionsClasses}>
<div className={`${prefix}--batch-summary`}>
<p className={`${prefix}--batch-summary__para`}>
<span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2016,6 +2016,7 @@ exports[`DataTable should render 1`] = `
translateWithId={[Function]}
>
<div
aria-hidden={true}
className="bx--batch-actions"
>
<div
Expand Down Expand Up @@ -3021,6 +3022,7 @@ exports[`DataTable sticky header should render 1`] = `
translateWithId={[Function]}
>
<div
aria-hidden={true}
className="bx--batch-actions"
>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ exports[`DataTable.TableBatchActions should render 1`] = `
translateWithId={[Function]}
>
<div
aria-hidden={true}
className="bx--batch-actions custom-class"
>
<div
Expand Down Expand Up @@ -62,6 +63,7 @@ exports[`DataTable.TableBatchActions should render 2`] = `
translateWithId={[Function]}
>
<div
aria-hidden={false}
className="bx--batch-actions bx--batch-actions--active custom-class"
>
<div
Expand Down
4 changes: 0 additions & 4 deletions packages/storybook-addon-carbon-theme/.npmignore

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ exports[`styles expressiveParagraph01 should be printable 1`] = `
"font-size: 1.5rem;
font-weight: 300;
line-height: 1.334;
letter-spacing: 0;
lg: [object Object];
max: [object Object];"
letter-spacing: 0;"
`;

exports[`styles heading01 should be printable 1`] = `
Expand Down
16 changes: 9 additions & 7 deletions packages/type/src/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,15 @@ export const expressiveParagraph01 = {
fontWeight: fontWeights.light,
lineHeight: 1.334,
letterSpacing: 0,
lg: {
fontSize: rem(scale[6]),
lineHeight: 1.29,
},
max: {
fontSize: rem(scale[7]),
lineHeight: 1.25,
breakpoints: {
lg: {
fontSize: rem(scale[6]),
lineHeight: 1.29,
},
max: {
fontSize: rem(scale[7]),
lineHeight: 1.25,
},
},
};

Expand Down

0 comments on commit dc357c6

Please sign in to comment.