Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Revert "Move Button and Label components to `@woocommerce/blocks-chec…
Browse files Browse the repository at this point in the history
…kout` package (#4222)"

This reverts commit c98fba2.
  • Loading branch information
opr committed Jun 28, 2021
1 parent dbb183f commit a1c0a42
Show file tree
Hide file tree
Showing 24 changed files with 20 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { __, _n, sprintf } from '@wordpress/i18n';
import { Button } from '@woocommerce/blocks-checkout';
import Button from '@woocommerce/base-components/button';
import { Icon, done as doneIcon } from '@woocommerce/icons';
import { useState, useEffect } from '@wordpress/element';
import { useAddToCartFormContext } from '@woocommerce/base-context';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import PropTypes from 'prop-types';
import { __ } from '@wordpress/i18n';
import classnames from 'classnames';
import { Label } from '@woocommerce/blocks-checkout';
import Label from '@woocommerce/base-components/label';
import {
useInnerBlockLayoutContext,
useProductDataContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* External dependencies
*/
import { __, sprintf } from '@wordpress/i18n';
import Label from '@woocommerce/base-components/label';
import ProductPrice from '@woocommerce/base-components/product-price';
import ProductName from '@woocommerce/base-components/product-name';
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
import {
__experimentalApplyCheckoutFilter,
mustContain,
Label,
} from '@woocommerce/blocks-checkout';
import PropTypes from 'prop-types';
import Dinero from 'dinero.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { __ } from '@wordpress/i18n';
import { useCheckoutSubmit } from '@woocommerce/base-context/hooks';
import { Icon, done } from '@woocommerce/icons';
import { Button } from '@woocommerce/blocks-checkout';
import Button from '@woocommerce/base-components/button';

const PlaceOrderButton = () => {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { Button } from '@woocommerce/blocks-checkout';
import Button from '@woocommerce/base-components/button';
import { useState } from '@wordpress/element';
import isShallowEqual from '@wordpress/is-shallow-equal';
import { useValidationContext } from '@woocommerce/base-context';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { _n, sprintf } from '@wordpress/i18n';
import { decodeEntities } from '@wordpress/html-entities';
import type { ReactElement } from 'react';
import type { PackageRateOption } from '@woocommerce/type-defs/shipping';
import { Panel, Label } from '@woocommerce/blocks-checkout';
import { Panel } from '@woocommerce/blocks-checkout';
import Label from '@woocommerce/base-components/label';
import { useSelectShippingRate } from '@woocommerce/base-context/hooks';
import type { CartShippingPackageShippingRate } from '@woocommerce/type-defs/cart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
*/
import { __ } from '@wordpress/i18n';
import { useState, useEffect, useRef } from '@wordpress/element';
import { Button, Panel, Label } from '@woocommerce/blocks-checkout';
import Button from '@woocommerce/base-components/button';
import { ValidatedTextInput } from '@woocommerce/base-components/text-input';
import Label from '@woocommerce/base-components/label';
import LoadingMask from '@woocommerce/base-components/loading-mask';
import PropTypes from 'prop-types';
import { withInstanceId } from '@woocommerce/base-hocs/with-instance-id';
import {
ValidationInputError,
useValidationContext,
} from '@woocommerce/base-context';
import { Panel } from '@woocommerce/blocks-checkout';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion assets/js/base/components/filter-submit-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { __ } from '@wordpress/i18n';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Label } from '@woocommerce/blocks-checkout';
import Label from '@woocommerce/base-components/label';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion assets/js/base/components/load-more-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import PropTypes from 'prop-types';
import { Label } from '@woocommerce/blocks-checkout';
import Label from '@woocommerce/base-components/label';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion assets/js/base/components/pagination/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { __, sprintf } from '@wordpress/i18n';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Label } from '@woocommerce/blocks-checkout';
import Label from '@woocommerce/base-components/label';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion assets/js/base/components/sort-select/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Label } from '@woocommerce/blocks-checkout';
import Label from '@woocommerce/base-components/label';
import { withInstanceId } from '@woocommerce/base-hocs/with-instance-id';

/**
Expand Down
2 changes: 1 addition & 1 deletion assets/js/base/components/text-input/text-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import { forwardRef, InputHTMLAttributes } from 'react';
import classnames from 'classnames';
import { useState } from '@wordpress/element';
import { Label } from '@woocommerce/blocks-checkout';

/**
* Internal dependencies
*/
import Label from '../label';
import './style.scss';

interface TextInputProps
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/active-filters/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useQueryStateByKey } from '@woocommerce/base-context/hooks';
import { useMemo } from '@wordpress/element';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import { Label } from '@woocommerce/blocks-checkout';
import Label from '@woocommerce/base-components/label';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/active-filters/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { __, sprintf } from '@wordpress/i18n';
import { formatPrice } from '@woocommerce/price-format';
import { RemovableChip } from '@woocommerce/base-components/chip';
import { Label } from '@woocommerce/blocks-checkout';
import Label from '@woocommerce/base-components/label';

/**
* Format a min/max price range to display.
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/attribute-filter/label.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { _n, sprintf } from '@wordpress/i18n';
import { Label } from '@woocommerce/blocks-checkout';
import Label from '@woocommerce/base-components/label';

/**
* The label for an attribute term filter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { __ } from '@wordpress/i18n';
import { useState, useEffect } from '@wordpress/element';
import { PaymentMethodIcons } from '@woocommerce/base-components/cart-checkout';
import { Button } from '@woocommerce/blocks-checkout';
import Button from '@woocommerce/base-components/button';
import { CHECKOUT_URL } from '@woocommerce/block-settings';
import { useCheckoutContext } from '@woocommerce/base-context';
import { usePaymentMethods } from '@woocommerce/base-context/hooks';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { usePaymentMethods } from '@woocommerce/base-context/hooks';
import { __ } from '@wordpress/i18n';
import { Label } from '@woocommerce/blocks-checkout';
import Label from '@woocommerce/base-components/label';
import { usePaymentMethodDataContext } from '@woocommerce/base-context';

/**
Expand Down
2 changes: 0 additions & 2 deletions packages/checkout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ export { default as ExperimentalDiscountsMeta } from './discounts-meta';
export { default as ExperimentalOrderShippingPackages } from './order-shipping-packages';
export { default as Panel } from './panel';
export { SlotFillProvider } from 'wordpress-components';
export { default as Button } from './button';
export { default as Label } from './label';

0 comments on commit a1c0a42

Please sign in to comment.