Skip to content
Merged
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
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ always-auth=false
@react:registry=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-react-release/
//artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-react-release/:always-auth=true

@a4u:registry=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-rsp-tmp-release/
@react-aria:registry=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-rsp-tmp-release/
@react-spectrum:registry=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-rsp-tmp-release/
@react-stately:registry=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-rsp-tmp-release/
Expand Down
4 changes: 2 additions & 2 deletions packages/@react-spectrum/alert/stories/Alert.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _123 from '@spectrum-icons/workflow/123';
import AdobeAnalyticsColor from '@spectrum-icons/color/AdobeAnalyticsColor';
import {Alert} from '../src/Alert';
import CalendarCheckColor from '@spectrum-icons/color/CalendarCheckColor';
import React from 'react';
import {storiesOf} from '@storybook/react';

Expand Down Expand Up @@ -48,7 +48,7 @@ function render(props = {}, children = 'This is a React Spectrum alert') {
{...props}>
{children}
<_123 />
<AdobeAnalyticsColor />
<CalendarCheckColor />
</Alert>
);
}
20 changes: 10 additions & 10 deletions packages/@react-spectrum/form/test/FormItem.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import _3DMaterials from '@spectrum-icons/workflow/3DMaterials';
import {cleanup, render, within} from '@testing-library/react';
import * as createId from '@react/react-spectrum/utils/createId';
import {FormItem} from '../';
import React from 'react';
import Twitter from '@spectrum-icons/workflow/Twitter';
import * as useId from '@react-aria/utils/src/useId';
import {FormItem as V2FormItem} from '@react/react-spectrum/Form';

Expand All @@ -13,7 +13,7 @@ describe('FormItem', () => {
let datatestid = 'formItem';
let useIdMock, createIdMock;

function renderFormItem(FormItemComponent, props, numChildren) {
function renderFormItem(FormItemComponent, props, numChildren) {
let component = (
<FormItemComponent data-testid={datatestid} {...props} >
{numChildren > 0 && <button data-testid="testbutton">test child</button>}
Expand All @@ -25,7 +25,7 @@ describe('FormItem', () => {

beforeAll(() => {
useIdMock = jest.spyOn(useId, 'useId').mockImplementation(() => id);
createIdMock = jest.spyOn(createId, 'default').mockImplementation(() => id);
createIdMock = jest.spyOn(createId, 'default').mockImplementation(() => id);
});

afterAll(() => {
Expand All @@ -35,7 +35,7 @@ describe('FormItem', () => {

afterEach(() => {
cleanup();
});
});

describe('with label', () => {
it.each`
Expand Down Expand Up @@ -63,7 +63,7 @@ describe('FormItem', () => {
${'v3 FormItem multiple children'} | ${FormItem} | ${2}
${'v2 FormItem multiple children'} | ${V2FormItem} | ${2}
`('$Name supports an icon with the label if provided', ({Component, numChildren}) => {
let tree = renderFormItem(Component, {label, labelFor, icon: <Twitter />}, numChildren);
let tree = renderFormItem(Component, {label, labelFor, icon: <_3DMaterials />}, numChildren);
let fieldLabel = tree.getByText(label);
expect(within(fieldLabel).getByRole('img')).toBeTruthy();
});
Expand Down Expand Up @@ -134,7 +134,7 @@ describe('FormItem', () => {
${'v3 FormItem multiple children'} | ${FormItem} | ${2}
${'v2 FormItem multiple children'} | ${V2FormItem} | ${2}
`('$Name doesn\'t support an icon if label isn\'t provided', ({Component, numChildren}) => {
let tree = renderFormItem(Component, {labelFor, icon: <Twitter />}, numChildren);
let tree = renderFormItem(Component, {labelFor, icon: <_3DMaterials />}, numChildren);
let fieldLabel = tree.getByTestId(datatestid);
expect(within(fieldLabel).queryByRole('img')).toBeFalsy();
});
Expand Down Expand Up @@ -197,10 +197,10 @@ describe('FormItem', () => {
expect(fieldLabel).toBeTruthy();
expect(fieldLabel).toHaveAttribute('for', 'second');
expect(fieldLabel).toHaveAttribute('id', 'first');

let button = tree.getByTestId('testbutton');
expect(button).toHaveAttribute('id', 'second');
expect(button).toHaveAttribute('aria-labelledby', 'first');
expect(button).toHaveAttribute('aria-labelledby', 'first');
});

it.each`
Expand Down Expand Up @@ -246,10 +246,10 @@ describe('FormItem', () => {
expect(firstButton).toBeTruthy();
expect(firstButton).not.toHaveAttribute('id');
expect(firstButton).not.toHaveAttribute('aria-labelledby');

let secondButton = tree.getByTestId('testbutton2');
expect(secondButton).not.toHaveAttribute('id');
expect(secondButton).not.toHaveAttribute('aria-labelledby');
expect(secondButton).not.toHaveAttribute('aria-labelledby');
});

it.each`
Expand Down
3 changes: 0 additions & 3 deletions packages/@react-spectrum/icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@a4u/react-spectrum-ui": "0.0.2",
"@a4u/react-spectrum-workflow": "0.0.6",
"@a4u/react-spectrum-workflow-color": "0.0.6",
"@adobe/spectrum-css-temp": "^3.0.0",
"@react-spectrum/provider": "^3.0.0",
"@react-spectrum/utils": "^3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@spectrum-icons/color/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"make-icons": "babel-node --presets @babel/env ./scripts/generateIcons.js -i '[]' && pwd && tsc --project './tsconfig.types.json'"
},
"dependencies": {
"@a4u/react-spectrum-workflow-color": "0.0.6",
"@adobe/react-spectrum-workflow-color": "^1.0.0",
"@react-spectrum/icon": "^3.0.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/@spectrum-icons/color/scripts/generateIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function template(iconName) {
iconRename = '_' + importName;
}
return (
`import {${iconName} as IconComponent} from '@a4u/react-spectrum-workflow-color/dist/${iconRename}';
`import {${iconName} as IconComponent} from '@adobe/react-spectrum-workflow-color/dist/${iconRename}';
import {Icon} from '@react-spectrum/icon';
import React from 'react';

Expand All @@ -21,4 +21,4 @@ export default function ${iconRename}(props) {
);
}

generateIcons(path.dirname(require.resolve('@a4u/react-spectrum-workflow-color')), path.join(__dirname, '..', 'src'), exportNameRegex, template);
generateIcons(path.dirname(require.resolve('@adobe/react-spectrum-workflow-color')), path.join(__dirname, '..', 'src'), exportNameRegex, template);
7 changes: 3 additions & 4 deletions packages/@spectrum-icons/color/stories/IconsColor.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import AdobeAnalyticsColor from '../AdobeAnalyticsColor';
import {Icon} from '@react-spectrum/icon';
import CalendarCheckColor from '../CalendarCheckColor';
import React from 'react';
import {storiesOf} from '@storybook/react';

storiesOf('Icons/Color', module)
.add(
'Color icon with sizes',
() => renderIconSizes(AdobeAnalyticsColor, {alt: 'Adobe Analytics Color'})
() => renderIconSizes(CalendarCheckColor, {alt: 'Adobe Analytics Color'})
);

function renderIconSizes(Component, props) {
let sizes = ['XXS', 'XS', 'S', 'M', 'L', 'XL', 'XXL'];
return (
<div>
{sizes.map(size => {
return <Component size={size} {...props} />
return <Component size={size} style={{padding: '15px'}} {...props} />
})}
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/@spectrum-icons/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"make-icons": "babel-node --presets @babel/env ./scripts/generateIcons.js -i '[]' && pwd && tsc --project './tsconfig.types.json'"
},
"dependencies": {
"@a4u/react-spectrum-ui": "0.0.2",
"@adobe/react-spectrum-ui": "^1.0.0",
"@react-spectrum/icon": "^3.0.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/@spectrum-icons/ui/scripts/generateIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let displayNameRegex = /.*?\.displayName = '(?<name>.*?)';/;

function template(iconName) {
return (
`import {${iconName} as IconComponent} from '@a4u/react-spectrum-ui/dist/${iconName}';
`import {${iconName} as IconComponent} from '@adobe/react-spectrum-ui/dist/${iconName}';
import {UIIcon} from '@react-spectrum/icon';
import React from 'react';

Expand All @@ -16,5 +16,5 @@ export default function ${iconName}(props) {
);
}

generateIcons(path.dirname(require.resolve('@a4u/react-spectrum-ui')), path.join(__dirname, '..', 'src'), displayNameRegex, template);
generateIcons(path.dirname(require.resolve('@adobe/react-spectrum-ui')), path.join(__dirname, '..', 'src'), displayNameRegex, template);

2 changes: 1 addition & 1 deletion packages/@spectrum-icons/workflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"make-icons": "babel-node --presets @babel/env ./scripts/generateIcons.js -i '[]' && pwd && tsc --project './tsconfig.types.json'"
},
"dependencies": {
"@a4u/react-spectrum-workflow": "0.0.6",
"@adobe/react-spectrum-workflow": "^1.0.0",
"@react-spectrum/icon": "^3.0.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/@spectrum-icons/workflow/scripts/generateIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function template(iconName) {
iconRename = '_' + importName;
}
return (
`import {${iconName} as IconComponent} from '@a4u/react-spectrum-workflow/dist/${importName}';
`import {${iconName} as IconComponent} from '@adobe/react-spectrum-workflow/dist/${importName}';
import {Icon} from '@react-spectrum/icon';
import React from 'react';

Expand All @@ -21,5 +21,5 @@ export default function ${iconRename}(props) {
);
}

generateIcons(path.dirname(require.resolve('@a4u/react-spectrum-workflow')), path.join(__dirname, '..', 'src'), exportNameRegex, template);
generateIcons(path.dirname(require.resolve('@adobe/react-spectrum-workflow')), path.join(__dirname, '..', 'src'), exportNameRegex, template);

Loading