Skip to content

Commit

Permalink
components: Promote Elevation
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend committed May 18, 2021
1 parent c290539 commit ef2bc09
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 14 deletions.
6 changes: 6 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,12 @@
"markdown_source": "../packages/components/src/duotone-picker/README.md",
"parent": "components"
},
{
"title": "Elevation",
"slug": "elevation",
"markdown_source": "../packages/components/src/elevation/README.md",
"parent": "components"
},
{
"title": "ExternalLink",
"slug": "external-link",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
The shadow effect is generated using the `value` prop.

```jsx
import { Elevation, Surface, Text, View } from '@wordpress/components/ui';
import { Elevation, Surface, Text, View } from '@wordpress/components';

function Example() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Internal dependencies
*/
import { useElevation } from './hook';
import { createComponent } from '../utils';
import { createComponent } from '../ui/utils';

/**
* `Elevation` is a core component that renders shadow, using the library's shadow system.
Expand All @@ -11,7 +11,7 @@ import { createComponent } from '../utils';
*
* @example
* ```jsx
* import { Elevation, Surface, Text, View } from `@wordpress/components/ui`;
* import { Elevation, Surface, Text, View } from `@wordpress/components`;
*
* function Example() {
* return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import { useContextSystem } from '../context';
import { useContextSystem } from '../ui/context';
import * as styles from './styles';
import CONFIG from '../../utils/config-values';
import CONFIG from '../utils/config-values';

/**
* @param {number} value
Expand All @@ -29,7 +29,7 @@ export function getBoxShadow( value ) {
}

/**
* @param {import('../context').ViewOwnProps<import('./types').Props, 'div'>} props
* @param {import('../ui/context').ViewOwnProps<import('./types').Props, 'div'>} props
*/
export function useElevation( props ) {
const {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import { number } from '@storybook/addon-knobs';
* Internal dependencies
*/
import { Elevation } from '../index';
import { Grid } from '../../../grid';
import { View } from '../../../view';
import { HStack } from '../../../h-stack';
import { Divider } from '../../../divider';
import { Grid } from '../../grid';
import { View } from '../../view';
import { HStack } from '../../h-stack';
import { Divider } from '../../divider';
import {
ExampleGrid,
ExampleGridItem,
ExampleMetaContent,
} from '../../__storybook-utils';
} from '../../ui/__storybook-utils';

/**
* WordPress dependencies
Expand All @@ -24,7 +24,7 @@ import { useCallback } from '@wordpress/element';

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

const ElevationWrapper = ( { children } ) => (
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions packages/components/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export { default as DropZoneProvider } from './drop-zone/provider';
export { default as Dropdown } from './dropdown';
export { default as DropdownMenu } from './dropdown-menu';
export { DuotoneSwatch, DuotonePicker } from './duotone-picker';
export { Elevation as __experimentalElevation } from './elevation';
export { default as ExternalLink } from './external-link';
export { Flex, FlexBlock, FlexItem } from './flex';
export { default as FocalPointPicker } from './focal-point-picker';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/ui/card/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useMemo } from '@wordpress/element';
* Internal dependencies
*/
import { contextConnect } from '../context';
import { Elevation } from '../elevation';
import { Elevation } from '../../elevation';
import { View } from '../../view';
import * as styles from './styles';
import { useCard } from './hook';
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/ui/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * from './card';
export * from './control-group';
export * from './control-label';
export * from './elevation';
export * from './form-group';
export * from './shortcut';
export * from './spinner';
Expand Down
1 change: 1 addition & 0 deletions packages/components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"src/base-control/**/*",
"src/dashicon/**/*",
"src/draggable/**/*",
"src/elevation/**/*",
"src/flex/**/*",
"src/form-group/**/*",
"src/scroll-lock/**/*",
Expand Down

0 comments on commit ef2bc09

Please sign in to comment.