Skip to content

Commit

Permalink
Merge branch 'main' of github.com:carbon-design-system/carbon into re…
Browse files Browse the repository at this point in the history
…factor/update-components-to-use-prefix
  • Loading branch information
joshblack committed Mar 18, 2022
2 parents faeabc1 + 2ecfa37 commit f407ad7
Show file tree
Hide file tree
Showing 42 changed files with 229 additions and 1,222 deletions.
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/got-npm-11.8.0-f85797ae8b-f73312ccac.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/keyv-npm-4.0.3-4018fb536e-770134225c.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 12 additions & 1 deletion packages/carbon-react/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const stories = glob
'../src/**/*.stories.js',
'../src/**/*.stories.mdx',
'../../react/src/**/next/*.stories.js',
'../../react/src/**/next/**/*.stories.js',
'../../react/src/**/next/*.stories.mdx',
'../../react/src/**/*-story.js',
],
Expand All @@ -32,7 +33,17 @@ const stories = glob
.filter((match) => {
const filepath = path.resolve(__dirname, match);
const basename = path.basename(match, '.js');
const denylist = new Set(['TooltipDefinition-story']);
const denylist = new Set([
'TooltipDefinition-story',
'DataTable-basic-story',
'DataTable-batch-actions-story',
'DataTable-filtering-story',
'DataTable-selection-story',
'DataTable-sorting-story',
'DataTable-toolbar-story',
'DataTable-dynamic-content-story',
'DataTable-expansion-story',
]);

if (denylist.has(basename)) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion packages/carbon-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@carbon/feature-flags": "^0.7.0",
"@carbon/icons-react": "^10.48.0",
"@carbon/styles": "^0.16.0",
"@carbon/telemetry": "0.0.0-alpha.6",
"@carbon/telemetry": "0.1.0",
"carbon-components": "^10.55.0",
"carbon-components-react": "^7.55.0",
"carbon-icons": "^7.0.7"
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"semantic-release": "semantic-release"
},
"dependencies": {
"@carbon/telemetry": "0.0.0-alpha.6",
"@carbon/telemetry": "0.1.0",
"flatpickr": "4.6.1",
"lodash.debounce": "^4.0.8",
"warning": "^3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/icons-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"dependencies": {
"@carbon/icon-helpers": "^10.28.0",
"@carbon/telemetry": "0.0.0-alpha.6",
"@carbon/telemetry": "0.1.0",
"prop-types": "^15.7.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/pictograms-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"dependencies": {
"@carbon/icon-helpers": "^10.28.0",
"@carbon/telemetry": "0.0.0-alpha.6",
"@carbon/telemetry": "0.1.0",
"prop-types": "^15.7.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@carbon/feature-flags": "^0.7.0",
"@carbon/icons-react": "^10.48.0",
"@carbon/layout": "^10.37.0",
"@carbon/telemetry": "0.0.0-alpha.6",
"@carbon/telemetry": "0.1.0",
"classnames": "2.3.1",
"copy-to-clipboard": "^3.3.1",
"downshift": "5.2.1",
Expand Down
28 changes: 15 additions & 13 deletions packages/react/src/components/DataTable/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { composeEventHandlers } from '../../tools/events';
import { defaultFilterRows } from './tools/filter';
import { defaultSortRow } from './tools/sorting';
import setupGetInstanceId from './tools/instanceId';
import * as FeatureFlags from '@carbon/feature-flags';

const getInstanceId = setupGetInstanceId();

Expand Down Expand Up @@ -116,19 +117,20 @@ export default class DataTable extends React.Component {

/**
* Change the row height of table. Currently supports `xs`, `sm`, `md`, `lg`, and `xl`.
* The previous terms (`compact`, `short`, `normal`, and `tall`) will be removed in the next major release.
*/
size: PropTypes.oneOf([
'compact',
'short',
'normal',
'tall',
'xs',
'sm',
'md',
'lg',
'xl',
]),
size: FeatureFlags.enabled('enable-v11-release')
? PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl'])
: PropTypes.oneOf([
'compact',
'short',
'normal',
'tall',
'xs',
'sm',
'md',
'lg',
'xl',
]),

/**
* Optional hook to manually control sorting of the rows.
Expand Down Expand Up @@ -163,7 +165,7 @@ export default class DataTable extends React.Component {
sortRow: defaultSortRow,
filterRows: defaultFilterRows,
locale: 'en',
size: 'normal',
size: FeatureFlags.enabled('enable-v11-release') ? 'lg' : 'normal',
overflowMenuOnHover: true,
translateWithId,
};
Expand Down
26 changes: 14 additions & 12 deletions packages/react/src/components/DataTable/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import * as FeatureFlags from '@carbon/feature-flags';
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
Expand Down Expand Up @@ -79,19 +80,20 @@ Table.propTypes = {

/**
* Change the row height of table. Currently supports `xs`, `sm`, `md`, `lg`, and `xl`.
* The previous terms (`compact`, `short`, `normal`, and `tall`) will be removed in the next major release.
*/
size: PropTypes.oneOf([
'compact',
'short',
'normal',
'tall',
'xs',
'sm',
'md',
'lg',
'xl',
]),
size: FeatureFlags.enabled('enable-v11-release')
? PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl'])
: PropTypes.oneOf([
'compact',
'short',
'normal',
'tall',
'xs',
'sm',
'md',
'lg',
'xl',
]),

/**
* `false` If true, will keep the header sticky (only data rows will scroll)
Expand Down
8 changes: 5 additions & 3 deletions packages/react/src/components/DataTable/TableToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import * as FeatureFlags from '@carbon/feature-flags';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
Expand Down Expand Up @@ -36,10 +37,11 @@ TableToolbar.propTypes = {
children: PropTypes.node,

/**
* `normal` Change the row height of table
* V11: remove small, normal
* `lg` Change the row height of table
*/
size: PropTypes.oneOf(['small', 'sm', 'normal', 'lg']),
size: FeatureFlags.enabled('enable-v11-release')
? PropTypes.oneOf(['sm', 'lg'])
: PropTypes.oneOf(['small', 'sm', 'normal', 'lg']),
};

TableToolbar.defaultProps = {
Expand Down
Loading

0 comments on commit f407ad7

Please sign in to comment.