Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/a11y/a11y.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ LICENSE file in the root directory of this source tree.
import * as React from 'react';
import axe from 'axe-core';

import { Layer, TetherBehavior, TETHER_PLACEMENT } from '../layer';
import Layer from '../layer/layer';
import TetherBehavior from '../layer/tether';
import { TETHER_PLACEMENT } from '../layer/constants';
import { ParagraphSmall, ParagraphXSmall } from '../typography';
import { styled } from '../styles';
import { styled } from '../styles/styled';
import { ThemeContext } from '../styles/theme-provider';

import type { ViolationProps } from './types';
Expand Down
3 changes: 2 additions & 1 deletion src/accordion/__tests__/accordion-disabled.scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { Accordion, Panel } from '..';
import Accordion from '../accordion';
import Panel from '../panel';

export function Scenario() {
return (
Expand Down
4 changes: 3 additions & 1 deletion src/accordion/__tests__/accordion-expanded.scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { Accordion, StatefulPanel, Panel } from '..';
import Accordion from '../accordion';
import StatefulPanel from '../stateful-panel';
import Panel from '../panel';

export function Scenario() {
return (
Expand Down
6 changes: 4 additions & 2 deletions src/accordion/__tests__/accordion-panel-override.scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { Accordion, Panel } from '..';
import Accordion from '../accordion';
import Panel from '../panel';

import { createTheme, lightThemePrimitives, ThemeProvider } from '../..';
import { createTheme, lightThemePrimitives } from '../../themes';
import { ThemeProvider } from '../../styles';

const themeWithIcons = createTheme(
{
Expand Down
3 changes: 2 additions & 1 deletion src/accordion/__tests__/accordion-stateless.scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { StatelessAccordion, Panel } from '..';
import StatelessAccordion from '../stateless-accordion';
import Panel from '../panel';

export function Scenario() {
const [expanded, setExpanded] = React.useState<React.Key[]>(['P1', 'P2']);
Expand Down
3 changes: 2 additions & 1 deletion src/accordion/__tests__/accordion.scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { Accordion, Panel } from '..';
import Accordion from '../accordion';
import Panel from '../panel';

export function Scenario() {
return (
Expand Down
3 changes: 2 additions & 1 deletion src/accordion/__tests__/accordion.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ LICENSE file in the root directory of this source tree.
import * as React from 'react';
import { render, fireEvent, getByText, getByTestId, queryAllByText } from '@testing-library/react';

import { Accordion, Panel } from '..';
import Accordion from '../accordion';
import Panel from '../panel';

describe('Accordion', () => {
it('renders basic configuration', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/accordion/__tests__/panel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LICENSE file in the root directory of this source tree.
import * as React from 'react';
import { render, fireEvent, getByText } from '@testing-library/react';

import { Panel } from '..';
import Panel from '../panel';

describe('Panel', () => {
it('applies aria-controls when provided', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/accordion/__tests__/stateful-panel-container.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LICENSE file in the root directory of this source tree.
import * as React from 'react';
import { render } from '@testing-library/react';

import { StatefulPanelContainer } from '..';
import StatefulPanelContainer from '../stateful-panel-container';

describe('StatefulPanelContainer', () => {
it('provides expected props to children function', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/accordion/styled-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import { styled } from '../styles';
import { styled } from '../styles/styled';
import { getSvgStyles } from '../icon/styled-components';
import type { SharedStylePropsArg } from './types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import type { NavItem } from '..';
import { AppNavBar, setItemActive } from '..';
import type { NavItem } from '../types';
import AppNavBar from '../app-nav-bar';
import { setItemActive } from '../utils';

export function Scenario() {
const [mainItems, setMainItems] = React.useState<NavItem[]>([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { ThemeProvider, LightTheme } from '../../index';
import type { NavItem } from '../index';
import { AppNavBar, setItemActive } from '../index';
import type { IconProps } from '../../icon';
import { ThemeProvider } from '../../styles';
import { LightTheme } from '../../themes';
import type { NavItem } from '../types';
import AppNavBar from '../app-nav-bar';
import { setItemActive } from '../utils';
import type { IconProps } from '../../icon/types';

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const XSmallFilled = ({ title, size, color, ...props }: IconProps) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { AppNavBar } from '..';
import AppNavBar from '../app-nav-bar';

const mainItems = [
{ label: 'Primary A' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { useStyletron } from '../../styles';
import { useStyletron } from '../../styles/styled';

import type { NavItem } from '..';
import { AppNavBar, setItemActive } from '..';
import type { NavItem } from '../types';
import AppNavBar from '../app-nav-bar';
import { setItemActive } from '../utils';

export function Scenario() {
const [css] = useStyletron();
Expand Down
5 changes: 3 additions & 2 deletions src/app-nav-bar/__tests__/app-nav-bar-overrides.scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import Delete from '../../icon/delete';
import Upload from '../../icon/upload';
import Overflow from '../../icon/overflow';

import type { NavItem } from '..';
import { AppNavBar, setItemActive } from '..';
import type { NavItem } from '../types';
import AppNavBar from '../app-nav-bar';
import { setItemActive } from '../utils';

const expandBorderStyles = (str) => {
const val = str.split(' ');
Expand Down
5 changes: 3 additions & 2 deletions src/app-nav-bar/__tests__/app-nav-bar-title-node.scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { useStyletron } from '../../styles';
import { useStyletron } from '../../styles/styled';

import { AppNavBar, setItemActive } from '..';
import AppNavBar from '../app-nav-bar';
import { setItemActive } from '../utils';

export function Scenario() {
const [css] = useStyletron();
Expand Down
5 changes: 3 additions & 2 deletions src/app-nav-bar/__tests__/app-nav-bar.scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import Delete from '../../icon/delete';
import Upload from '../../icon/upload';
import Overflow from '../../icon/overflow';

import type { NavItem } from '..';
import { AppNavBar, setItemActive } from '..';
import type { NavItem } from '../types';
import AppNavBar from '../app-nav-bar';
import { setItemActive } from '../utils';

export function Scenario() {
const [mainItems, setMainItems] = React.useState<NavItem[]>([
Expand Down
2 changes: 1 addition & 1 deletion src/app-nav-bar/__tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import { setItemActive } from '..';
import { setItemActive } from '../utils';

describe('setItemActive', () => {
it('sets specified item active', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/app-nav-bar/app-nav-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LICENSE file in the root directory of this source tree.
import * as React from 'react';

import { getOverrides } from '../helpers/overrides';
import { useStyletron } from '../styles';
import { useStyletron } from '../styles/styled';
import { isFocusVisible } from '../utils/focusVisible';

import { KIND, POSITION } from './constants';
Expand Down
12 changes: 8 additions & 4 deletions src/app-nav-bar/mobile-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { Button } from '../button';
import { Drawer, ANCHOR } from '../drawer';
import Button from '../button/button';
import Drawer from '../drawer/drawer';
import { ANCHOR } from '../drawer/constants';
import { getOverrides, mergeOverrides } from '../helpers/overrides';
import ArrowLeft from '../icon/arrow-left';
import MenuIcon from '../icon/menu';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { MenuAdapter, ListItemLabel, ARTWORK_SIZES, MenuAdapterProps } from '../list';
import { StatefulMenu } from '../menu';
import MenuAdapter from '../list/menu-adapter';
import ListItemLabel from '../list/list-item-label';
import { ARTWORK_SIZES } from '../list/constants';
import { MenuAdapterProps } from '../list/types';
import StatefulMenu from '../menu/stateful-menu';

import { StyledSideMenuButton, StyledUserMenuProfileListItem } from './styled-components';
import type { AppNavBarProps } from './types';
Expand Down
4 changes: 2 additions & 2 deletions src/app-nav-bar/styled-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import { styled, withStyle } from '../styles';
import { styled, withStyle } from '../styles/styled';
import { getMediaQueryPageMargins, getMinimumPageMargins } from '../helpers/responsive-helpers';
import { StyledListItem } from '../menu';
import { StyledListItem } from '../menu/styled-components';
import { KIND } from './constants';

const StyledButton = styled<
Expand Down
14 changes: 9 additions & 5 deletions src/app-nav-bar/user-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { Avatar } from '../avatar';
import { Button } from '../button';
import Avatar from '../avatar/avatar';
import Button from '../button/button';
import { getOverrides, mergeOverrides } from '../helpers/overrides';
import ChevronDownSmallFilled from '../icon/chevron-down';
import ChevronUpSmallFilled from '../icon/chevron-up';
import { MenuAdapter, ListItemLabel, ARTWORK_SIZES } from '../list';
import { StatefulMenu, StyledList } from '../menu';
import { StatefulPopover, PLACEMENT, TRIGGER_TYPE } from '../popover';
import MenuAdapter from '../list/menu-adapter';
import ListItemLabel from '../list/list-item-label';
import { ARTWORK_SIZES } from '../list/constants';
import StatefulMenu from '../menu/stateful-menu';
import { StyledList } from '../menu/styled-components';
import StatefulPopover from '../popover/stateful-popover';
import { PLACEMENT, TRIGGER_TYPE } from '../popover/constants';

import { StyledUserMenuButton, StyledUserMenuProfileListItem } from './styled-components';
import type { UserMenuProps, NavItem, AppNavBarOverrides } from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/app-nav-bar/user-profile-tile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { Avatar } from '../avatar';
import Avatar from '../avatar/avatar';
import { getOverrides } from '../helpers/overrides';
import { LabelMedium, ParagraphSmall } from '../typography';

Expand Down
3 changes: 2 additions & 1 deletion src/aspect-ratio-box/__tests__/aspect-ratio-box.scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ LICENSE file in the root directory of this source tree.
*/
import React from 'react';

import { AspectRatioBox, AspectRatioBoxBody } from '..';
import AspectRatioBox from '../aspect-ratio-box';
import AspectRatioBoxBody from '../aspect-ratio-box-body';

const bodyProps: React.ComponentProps<typeof AspectRatioBoxBody> = {
display: 'flex',
Expand Down
4 changes: 2 additions & 2 deletions src/aspect-ratio-box/aspect-ratio-box-body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import type { StyledBlockProps, BlockProps } from '../block';
import { Block } from '../block';
import type { StyledBlockProps, BlockProps } from '../block/types';
import Block from '../block/block';

interface AspectRatioBoxBodyComponentType<D extends React.ElementType> {
<C extends React.ElementType = D>(
Expand Down
3 changes: 2 additions & 1 deletion src/aspect-ratio-box/aspect-ratio-box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { Block, type StyledBlockProps } from '../block';
import Block from '../block/block';
import { StyledBlockProps } from '../block/types';
import { mergeOverrides } from '../helpers/overrides';
import type { AspectRatioBoxProps } from './types';

Expand Down
2 changes: 1 addition & 1 deletion src/aspect-ratio-box/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import type * as React from 'react';
import type { BlockProps } from '../block';
import type { BlockProps } from '../block/types';

export type AspectRatioBoxProps<T extends React.ElementType = React.ElementType> = {
/** Aspect ratio is width divided by height. */
Expand Down
2 changes: 1 addition & 1 deletion src/avatar/__tests__/avatar-custom-initials.scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { Avatar } from '..';
import Avatar from '../avatar';

export function Scenario() {
return <Avatar name="Product - Marketplace" initials="PM" />;
Expand Down
2 changes: 1 addition & 1 deletion src/avatar/__tests__/avatar-error.scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { Avatar } from '..';
import Avatar from '../avatar';

export function Scenario() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/avatar/__tests__/avatar-no-src.scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';

import { Avatar } from '..';
import Avatar from '../avatar';

export function Scenario() {
return (
Expand Down