mirror of
https://github.com/HackPlan/polaris-react.git
synced 2026-01-12 22:44:36 +08:00
fix rebase issues
This commit is contained in:
@@ -196,7 +196,6 @@
|
||||
"hoist-non-react-statics": "^3.3.0",
|
||||
"lodash": "^4.17.4",
|
||||
"react-beautiful-dnd": "^11.0.4",
|
||||
"react-transition-group": "^2.4.0",
|
||||
"tslib": "^1.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,14 +231,6 @@ export default function Item({
|
||||
const showExpanded = !iconOnly && selected || expanded || childIsActive;
|
||||
const showExpandedPopover = iconOnly && (selected || childIsActive);
|
||||
|
||||
const compoundItemClassName = classNames(
|
||||
itemClassName,
|
||||
styles.Item,
|
||||
disabled && styles['Item-disabled'],
|
||||
selected && (subNavigationItems.length === 0 || iconOnly) && styles['Item-selected'],
|
||||
showExpanded && styles.subNavigationActive,
|
||||
);
|
||||
|
||||
let secondaryNavigationMarkup: ReactNode = null;
|
||||
|
||||
const longestMatch = matchingSubNavigationItems.sort(
|
||||
|
||||
@@ -376,7 +376,6 @@ class ResourceList extends React.Component<CombinedProps, State> {
|
||||
bulkActions,
|
||||
filterControl,
|
||||
loading,
|
||||
showHeader = false,
|
||||
sortOptions,
|
||||
sortValue,
|
||||
alternateTool,
|
||||
@@ -459,11 +458,6 @@ class ResourceList extends React.Component<CombinedProps, State> {
|
||||
</div>
|
||||
) : null;
|
||||
|
||||
const needsHeader =
|
||||
this.selectable ||
|
||||
(sortOptions && sortOptions.length > 0) ||
|
||||
alternateTool;
|
||||
|
||||
const headerWrapperOverlay = loading ? (
|
||||
<div className={styles['HeaderWrapper-overlay']} />
|
||||
) : null;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
@import '../../styles/common';
|
||||
@import '../../components/ResourceList/variables';
|
||||
|
||||
$fixed-column-width: rem(145px);
|
||||
$breakpoint: 768px;
|
||||
|
||||
|
||||
@@ -16,7 +16,10 @@ import Checkbox from '../Checkbox';
|
||||
|
||||
import {classNames} from '../../utilities/css';
|
||||
import {headerCell} from '../shared';
|
||||
import {withAppProvider, WithAppProviderProps} from '../AppProvider';
|
||||
import {
|
||||
withAppProvider,
|
||||
WithAppProviderProps,
|
||||
} from '../../utilities/with-app-provider';
|
||||
import EventListener from '../EventListener';
|
||||
import {
|
||||
Cell,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@import '../../../ResourceList/variables.scss';
|
||||
@import '../../../../styles/common';
|
||||
@import '../../../ResourceList/variables';
|
||||
|
||||
$bulk-actions-button-stacking-order: (
|
||||
focused: 20,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import {CSSTransition, Transition} from 'react-transition-group';
|
||||
import React, { createRef } from 'react';
|
||||
import {CSSTransition, Transition} from '@material-ui/react-transition-group';
|
||||
import debounce from 'lodash/debounce';
|
||||
import {durationBase} from '@shopify/polaris-tokens';
|
||||
import {classNames} from '../../../../utilities/css';
|
||||
@@ -8,7 +8,10 @@ import ActionList from '../../../ActionList';
|
||||
import Popover from '../../../Popover';
|
||||
import Button from '../../../Button';
|
||||
import EventListener from '../../../EventListener';
|
||||
import {withAppProvider, WithAppProviderProps} from '../../../AppProvider';
|
||||
import {
|
||||
withAppProvider,
|
||||
WithAppProviderProps,
|
||||
} from '../../../../utilities/with-app-provider';
|
||||
import CheckableButton from '../CheckableButton';
|
||||
import {BulkActionButton} from './components';
|
||||
import styles from './BulkActions.scss';
|
||||
@@ -73,6 +76,9 @@ export class BulkActions extends React.PureComponent<CombinedProps, State> {
|
||||
private containerNode: HTMLElement | null;
|
||||
private largeScreenButtonsNode: HTMLElement | null;
|
||||
private moreActionsNode: HTMLElement | null;
|
||||
private checkableWrapperNode = createRef<HTMLDivElement>();
|
||||
private largeScreenGroupNode = createRef<HTMLDivElement>();
|
||||
private smallScreenGroupNode = createRef<HTMLDivElement>();
|
||||
private promotedActionsWidths: number[] = [];
|
||||
private bulkActionsWidth = 0;
|
||||
private addedMoreActionsWidthForMeasuring = 0;
|
||||
@@ -357,7 +363,12 @@ export class BulkActions extends React.PureComponent<CombinedProps, State> {
|
||||
};
|
||||
|
||||
const smallScreenGroup = (
|
||||
<Transition timeout={0} in={selectMode} key="smallGroup">
|
||||
<Transition
|
||||
timeout={0}
|
||||
in={selectMode}
|
||||
key="smallGroup"
|
||||
findDOMNode={this.findSmallScreenGroupNode}
|
||||
>
|
||||
{(status: TransitionStatus) => {
|
||||
const smallScreenGroupClassName = classNames(
|
||||
styles.Group,
|
||||
@@ -368,6 +379,7 @@ export class BulkActions extends React.PureComponent<CombinedProps, State> {
|
||||
<div className={smallScreenGroupClassName}>
|
||||
<div className={styles.ButtonGroup}>
|
||||
<CSSTransition
|
||||
findDOMNode={this.findCheckableWrapperNode}
|
||||
in={selectMode}
|
||||
timeout={durationBase}
|
||||
classNames={slideClasses}
|
||||
@@ -386,7 +398,12 @@ export class BulkActions extends React.PureComponent<CombinedProps, State> {
|
||||
);
|
||||
|
||||
const largeScreenGroup = (
|
||||
<Transition timeout={0} in={selectMode} key="largeGroup">
|
||||
<Transition
|
||||
timeout={0}
|
||||
in={selectMode}
|
||||
key="largeGroup"
|
||||
findDOMNode={this.findLargeScreenGroupNode}
|
||||
>
|
||||
{(status: TransitionStatus) => {
|
||||
const largeScreenGroupClassName = classNames(
|
||||
styles.Group,
|
||||
@@ -457,6 +474,18 @@ export class BulkActions extends React.PureComponent<CombinedProps, State> {
|
||||
this.promotedActionsWidths.push(width);
|
||||
}
|
||||
};
|
||||
|
||||
private findLargeScreenGroupNode = () => {
|
||||
return this.largeScreenGroupNode.current;
|
||||
};
|
||||
|
||||
private findCheckableWrapperNode = () => {
|
||||
return this.checkableWrapperNode.current;
|
||||
};
|
||||
|
||||
private findSmallScreenGroupNode = () => {
|
||||
return this.smallScreenGroupNode.current;
|
||||
};
|
||||
}
|
||||
|
||||
function instanceOfBulkActionListSectionArray(
|
||||
|
||||
@@ -3,7 +3,10 @@ import {CaretUpMinor, CaretDownMinor} from '@shopify/polaris-icons';
|
||||
|
||||
import {classNames} from '../../../../utilities/css';
|
||||
import {headerCell} from '../../../shared';
|
||||
import {withAppProvider, WithAppProviderProps} from '../../../AppProvider';
|
||||
import {
|
||||
withAppProvider,
|
||||
WithAppProviderProps,
|
||||
} from '../../../../utilities/with-app-provider';
|
||||
import Icon from '../../../Icon';
|
||||
import {SortDirection} from '../../types';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@import '../../../ResourceList/variables.scss';
|
||||
@import '../../../../styles/common';
|
||||
@import '../../../ResourceList/variables';
|
||||
|
||||
$button-vertical-padding: (
|
||||
resource-list(button-min-height) - line-height(body) - rem(2px)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import React from 'react';
|
||||
import {classNames} from '../../../../utilities/css';
|
||||
import Checkbox from '../../../Checkbox';
|
||||
import {withAppProvider, WithAppProviderProps} from '../../../AppProvider';
|
||||
|
||||
import {
|
||||
withAppProvider,
|
||||
WithAppProviderProps,
|
||||
} from '../../../../utilities/with-app-provider';
|
||||
import styles from './CheckableButton.scss';
|
||||
|
||||
export interface Props {
|
||||
|
||||
@@ -2,7 +2,10 @@ import React from 'react';
|
||||
import {ChevronLeftMinor, ChevronRightMinor} from '@shopify/polaris-icons';
|
||||
|
||||
import {classNames} from '../../../../utilities/css';
|
||||
import {withAppProvider, WithAppProviderProps} from '../../../AppProvider';
|
||||
import {
|
||||
withAppProvider,
|
||||
WithAppProviderProps,
|
||||
} from '../../../../utilities/with-app-provider';
|
||||
import Button from '../../../Button';
|
||||
|
||||
import {ColumnVisibilityData} from '../../types';
|
||||
|
||||
10
yarn.lock
10
yarn.lock
@@ -14864,16 +14864,6 @@ react-textarea-autosize@^7.1.0:
|
||||
"@babel/runtime" "^7.1.2"
|
||||
prop-types "^15.6.0"
|
||||
|
||||
react-transition-group@^2.4.0:
|
||||
version "2.9.0"
|
||||
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.9.0.tgz#df9cdb025796211151a436c69a8f3b97b5b07c8d"
|
||||
integrity sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==
|
||||
dependencies:
|
||||
dom-helpers "^3.4.0"
|
||||
loose-envify "^1.4.0"
|
||||
prop-types "^15.6.2"
|
||||
react-lifecycles-compat "^3.0.4"
|
||||
|
||||
react@^16.8.3, react@^16.8.6:
|
||||
version "16.8.6"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe"
|
||||
|
||||
Reference in New Issue
Block a user