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
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
"jsx-a11y/mouse-events-have-key-events": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"jsx-a11y/no-noninteractive-element-to-interactive-role": "off",
"import/no-cycle": "off"
"jsx-a11y/no-noninteractive-element-to-interactive-role": "off"
},
"overrides": [
{
Expand Down
2 changes: 1 addition & 1 deletion UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
### Development workflow

- Added a slight delay to the Percy screenshot script to give time for components to render fully ([#704](https://github.com/Shopify/polaris-react/pull/704))
- Refactors to remove cyclical type imports ([#759](https://github.com/Shopify/polaris-react/pull/759) and [#754](https://github.com/Shopify/polaris-react/pull/754))
- Refactors to remove cyclical type imports ([#759](https://github.com/Shopify/polaris-react/pull/759), [#754](https://github.com/Shopify/polaris-react/pull/754), and [#767](https://github.com/Shopify/polaris-react/pull/767))

### Dependency upgrades
2 changes: 1 addition & 1 deletion src/components/ColorPicker/ColorPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {clamp} from '@shopify/javascript-utilities/math';
import {autobind} from '@shopify/javascript-utilities/decorators';

import {hsbToRgb} from '../../utilities/color-transformers';
import {HSBColor, HSBAColor} from './types';
import {HSBColor, HSBAColor} from '../../utilities/color-types';
import {AlphaPicker, HuePicker, Slidable, Position} from './components';
import * as styles from './ColorPicker.scss';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import {autobind} from '@shopify/javascript-utilities/decorators';
import Slidable, {Position} from '../Slidable';
import {HSBColor} from '../../types';
import {HSBColor} from '../../../../utilities/color-types';
import {hsbToRgb} from '../../../../utilities/color-transformers';
import * as styles from '../../ColorPicker.scss';
import {calculateDraggerY, alphaForDraggerY} from './utilities';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ColorPicker/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ColorPicker from './ColorPicker';

export * from './types';
export * from '../../utilities/color-types';
export * from '../../utilities/color-transformers';

export {Props} from './ColorPicker';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ThemeProvider/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import tokens from '@shopify/polaris-tokens';
import {noop} from '@shopify/javascript-utilities/other';
import {needsVariantList} from '../config';
import {HSLColor} from '../../ColorPicker';
import {HSLColor} from '../../../utilities/color-types';
import {
colorToHsla,
hslToString,
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/color-manipulation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {HSLColor, HSBColor} from '../components';
import {HSLColor, HSBColor} from './color-types';

export function lightenColor(color: HSLColor | string, lighten = 0) {
if (typeof color === 'string') {
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/color-transformers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
HSLColor,
HSLAColor,
HSBLAColor,
} from '../components';
} from './color-types';
import {compose} from './compose';

export function rgbString(color: RGBColor | RGBAColor) {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/utilities/color-validation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {RGBColor, RGBAColor} from '../components';
import {RGBColor, RGBAColor} from './color-types';

// implements: https://www.w3.org/WAI/ER/WD-AERT/#color-contrast
export function isLight({red, green, blue}: RGBColor | RGBAColor): boolean {
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/tests/color-manipulation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
createDarkColor,
createLightColor,
} from '../color-manipulation';
import {HSLColor} from '../../components';
import {HSLColor} from '../color-types';

describe('lightenColor', () => {
it("will return the color if it's of type string", () => {
Expand Down