Skip to content

Commit

Permalink
Fix integration issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Apr 30, 2021
1 parent 842f565 commit 3d9ae4e
Show file tree
Hide file tree
Showing 24 changed files with 38 additions and 36 deletions.
2 changes: 1 addition & 1 deletion packages/components/src/box-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { FlexItem, FlexBlock } from '../flex';
import AllInputControl from './all-input-control';
import InputControls from './input-controls';
import BoxControlIcon from './icon';
import Text from '../text';
import { Text } from '../text';
import LinkedButton from './linked-button';
import Visualizer from './visualizer';
import {
Expand Down
7 changes: 6 additions & 1 deletion packages/components/src/flex/flex/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ function Flex( props, forwardedRef ) {
*
* @example
* ```jsx
* import { Flex, FlexItem, FlexBlock, Text } from `@wordpress/components/ui`;
* import {
* __experimentalFlex as Flex,
* __experimentalFlexBlock as FlexBlock,
* __experimentalFlexItem as FlexItem,
* __experimentalText as Text
* } from `@wordpress/components`;
*
* function Example() {
* return (
Expand Down
5 changes: 2 additions & 3 deletions packages/components/src/flex/stories/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Internal dependencies
*/
import Flex from '../flex';
import FlexItem from '../flex-item';
import { View } from '../../view';
import { Flex, FlexItem } from '../';
import { View } from '../../ui/view';

export default {
component: Flex,
Expand Down
4 changes: 1 addition & 3 deletions packages/components/src/flex/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import { render } from '@testing-library/react';
* Internal dependencies
*/
import { View } from '../../ui/view';
import Flex from '../flex';
import FlexItem from '../flex-item';
import FlexBlock from '../flex-block';
import { Flex, FlexBlock, FlexItem } from '../';

describe( 'props', () => {
let base;
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export { default as Snackbar } from './snackbar';
export { default as SnackbarList } from './snackbar/list';
export { default as Spinner } from './spinner';
export { default as TabPanel } from './tab-panel';
export { default as __experimentalText } from './text';
export { Text as __experimentalText } from './text';
export { default as TextControl } from './text-control';
export { default as TextareaControl } from './textarea-control';
export { default as TextHighlight } from './text-highlight';
Expand All @@ -121,7 +121,7 @@ export {
TreeGridItem as __experimentalTreeGridItem,
} from './tree-grid';
export { default as TreeSelect } from './tree-select';
export { default as __experimentalTruncate } from './truncate';
export { Truncate as __experimentalTruncate } from './truncate';
export { default as __experimentalUnitControl } from './unit-control';
export { default as VisuallyHidden } from './visually-hidden';
export { default as IsolatedEventContainer } from './isolated-event-container';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import styled from '@emotion/styled';
* Internal dependencies
*/
import { Flex, FlexItem } from '../../flex';
import Text from '../../text';
import { Text } from '../../text';
import { color, rtl } from '../../utils/style-mixins';

const rootFloatLabelStyles = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { isRTL } from '@wordpress/i18n';
*/
import { G2, UI } from '../../utils/colors-values';
import Button from '../../button';
import Text from '../../text';
import { Text } from '../../text';
import { reduceMotion, space, rtl } from '../../utils';

export const NavigationUI = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import styled from '@emotion/styled';
/**
* Internal dependencies
*/
import Text from '../../../text';
import { Text } from '../../../text';
import { color } from '../../../utils/style-mixins';

export const Root = styled.div`
Expand Down
16 changes: 8 additions & 8 deletions packages/components/src/text/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Text
# Text (Experimental)

`Text` is a core component that renders text in the library, using the library's typography system.

Expand All @@ -23,7 +23,7 @@ function Example() {
Automatically calculate the appropriate line-height value for contents that render text and Control elements (e.g. `TextInput`).

```jsx
import { Text, TextInput } from '@wordpress/components';
import { __experimentalText as Text, TextInput } from '@wordpress/components';

function Example() {
return (
Expand All @@ -42,7 +42,7 @@ function Example() {
Adjusts the text alignment.

```jsx
import { Text } from '@wordpress/components';
import { __experimentalText as Text } from '@wordpress/components';

function Example() {
return (
Expand Down Expand Up @@ -107,7 +107,7 @@ Array of search words. String search terms are automatically cast to RegExps unl
Letters or words within `Text` can be highlighted using `highlightWords`.

```jsx
import { Text } from '@wordpress/components';
import { __experimentalText as Text } from '@wordpress/components';

function Example() {
return (
Expand Down Expand Up @@ -159,7 +159,7 @@ Clamps the text content to the specifiec `numberOfLines`, adding the `ellipsis`
The `Text` color can be adapted to a background color for optimal readability. `optimizeReadabilityFor` can accept CSS variables, in addition to standard CSS color values (e.g. Hex, RGB, HSL, etc...).

```jsx
import { Text, View } from '@wordpress/components';
import { __experimentalText as Text, View } from '@wordpress/components';

function Example() {
const backgroundColor = 'blue';
Expand All @@ -181,7 +181,7 @@ function Example() {
Adjusts text size based on the typography system. `Text` can render a wide range of font sizes, which are automatically calculated and adapted to the typography system. The `size` value can be a system preset, a `number`, or a custom unit value (`string`) such as `30em`.

```jsx
import { Text } from '@wordpress/components';
import { __experimentalText as Text } from '@wordpress/components';

function Example() {
return <Text size="largeTitle">Code is Poetry</Text>;
Expand All @@ -195,7 +195,7 @@ function Example() {
Enables text truncation. When `truncate` is set,we are able to truncate the long text in a variety of ways.

```jsx
import { Text } from '@wordpress/components';
import { __experimentalText as Text } from '@wordpress/components';

function Example() {
return (
Expand Down Expand Up @@ -223,7 +223,7 @@ Uppercases the text content.
Adjusts style variation of the text.

```jsx
import { Text } from '@wordpress/components';
import { __experimentalText as Text } from '@wordpress/components';

function Example() {
return <Text variant="muted">Code is Poetry</Text>;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/text/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import useText from './hook';
* @example
*
* ```jsx
* import { Text } from `@wordpress/components`;
* import { __experimentalText as Text } from `@wordpress/components`;
*
* function Example() {
* return <Text>Code is Poetry</Text>;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/text/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { default } from './component';
export { default as Text } from './component';
export { default as useText } from './hook';
2 changes: 1 addition & 1 deletion packages/components/src/text/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Text } from '..';

export default {
component: Text,
title: 'Components/Text',
title: 'G2 Components (Experimental)/Text',
};

export const _default = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { render } from '@testing-library/react';
*/
import { getFontSize } from '../../ui/utils/font-size';
import { COLORS } from '../../utils';
import Text from '..';
import { Text } from '../';

describe( 'Text', () => {
describe( 'snapshot tests', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/truncate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Usage

```jsx
import { Truncate } from '@wordpress/components/ui';
import { __experimentalTruncate as Truncate } from '@wordpress/components';

function Example() {
return (
Expand Down Expand Up @@ -50,7 +50,7 @@ Determines the max characters when `truncate` is set.
Clamps the text content to the specifiec `numberOfLines`, adding the `ellipsis` at the end.

```jsx
import { Truncate } from '@wordpress/components/ui';
import { __experimentalTruncate as Truncate } from '@wordpress/components';

function Example() {
return (
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/truncate/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import useTruncate from './hook';
*
* @example
* ```jsx
* import { Truncate } from `@wordpress/components/ui`;
* import { __experimentalTruncate as Truncate } from `@wordpress/components`;
*
* function Example() {
* return (
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/truncate/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { default } from './component';
export { default as Truncate } from './component';
export { default as useTruncate } from './hook';
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { render } from '@testing-library/react';
/**
* Internal dependencies
*/
import Truncate from '..';
import { Truncate } from '..';

describe( 'props', () => {
test( 'should render correctly', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { Grid } from '../grid';
import { Surface } from '../surface';
import Text from '../../text';
import { Text } from '../../text';
import { View } from '../view';
import { VStack } from '../v-stack';

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/ui/card/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Internal dependencies
*/
import { Grid } from '../../grid';
import Text from '../../../text';
import { Text } from '../../../text';
import { VStack } from '../../v-stack';
import { Card, CardBody, CardFooter } from '../index';
import { Divider } from '../../divider';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/ui/form-group/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Internal dependencies
*/
import { FormGroup, useFormGroupContextId } from '../index';
import Text from '../../../text';
import { Text } from '../../../text';

// @todo: Refactor this after adding next TextInput component.
const TextInput = ( { id: idProp, ...props } ) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/ui/surface/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { boolean, number, select } from '@storybook/addon-knobs';
* Internal dependencies
*/
import { Surface } from '../index';
import Text from '../../../text';
import { Text } from '../../../text';

export default {
component: Surface,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/ui/tooltip/stories/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Internal dependencies
*/
import Text from '../../../text';
import { Text } from '../../../text';
import { Tooltip } from '../index';

export default {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/ui/tooltip/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { render, screen } from '@testing-library/react';
/**
* Internal dependencies
*/
import Text from '../../../text';
import { Text } from '../../../text';
import { Tooltip } from '../index';

describe( 'props', () => {
Expand Down

0 comments on commit 3d9ae4e

Please sign in to comment.