Skip to content

Commit

Permalink
chore: adjust mediaQueries imports
Browse files Browse the repository at this point in the history
  • Loading branch information
DSil committed Mar 21, 2024
1 parent 074102e commit 96ea55c
Show file tree
Hide file tree
Showing 36 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion packages/orbit-components/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Preview } from "@storybook/react";

import "../src/tailwind.css";
import { QUERIES } from "../src/utils/mediaQuery/consts";
import { QUERIES } from "../src/utils/mediaQuery";
import orbitDecorator from "./orbitDecorator";
import theme from "../src/defaultTheme";

Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Box/helpers/getBackground.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Props } from "../types";
import type { QUERIES } from "../../utils/mediaQuery/consts";
import type { QUERIES } from "../../utils/mediaQuery";
import { backgroundColorClasses } from "../../common/tailwind/backgroundColor";

const getBackgroundClass = (background: Props["background"], viewport?: QUERIES): string | null => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Props } from "../types";
import type { QUERIES } from "../../utils/mediaQuery/consts";
import type { QUERIES } from "../../utils/mediaQuery";
import { borderRadiusClasses } from "./tailwindClasses";

const getBorderRadiusClass = (
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Box/helpers/getColor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Props } from "../types";
import type { QUERIES } from "../../utils/mediaQuery/consts";
import type { QUERIES } from "../../utils/mediaQuery";
import { colorClasses } from "../../common/tailwind/color";

const getColorClass = (color: Props["color"], viewport?: QUERIES): string | null => {
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Box/helpers/getElevation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Props } from "../types";
import type { QUERIES } from "../../utils/mediaQuery/consts";
import type { QUERIES } from "../../utils/mediaQuery";
import { shadowClasses } from "./tailwindClasses";

const getElevationClass = (elevation: Props["elevation"], viewport?: QUERIES): string | null => {
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Box/helpers/getMargin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Props } from "../types";
import type { QUERIES } from "../../utils/mediaQuery/consts";
import type { QUERIES } from "../../utils/mediaQuery";
import {
marginBottomClasses,
marginClasses,
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Box/helpers/getOverflow.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Props } from "../types";
import type { QUERIES } from "../../utils/mediaQuery/consts";
import type { QUERIES } from "../../utils/mediaQuery";
import { overflowClasses } from "./tailwindClasses";

const getOverflowClass = (overflow: Props["overflow"], viewport?: QUERIES): string | null => {
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Box/helpers/getPadding.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Props } from "../types";
import type { QUERIES } from "../../utils/mediaQuery/consts";
import type { QUERIES } from "../../utils/mediaQuery";
import {
paddingBottomClasses,
paddingClasses,
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Box/helpers/getPosition.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Props } from "../types";
import type { QUERIES } from "../../utils/mediaQuery/consts";
import type { QUERIES } from "../../utils/mediaQuery";
import { positionClasses } from "./tailwindClasses";

const getPositionClass = (position: Props["position"], viewport?: QUERIES): string | null => {
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Box/helpers/getTextAlign.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Props } from "../types";
import type { QUERIES } from "../../utils/mediaQuery/consts";
import type { QUERIES } from "../../utils/mediaQuery";
import { textAlignClasses } from "../../common/tailwind/textAlign";

const getTextAlignClass = (textAlign: Props["textAlign"], viewport?: QUERIES): string | null => {
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Box/helpers/getWrap.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Props } from "../types";
import type { QUERIES } from "../../utils/mediaQuery/consts";
import type { QUERIES } from "../../utils/mediaQuery";
import { wrapClasses } from "../../common/tailwind/wrap";

const getWrapClass = (wrap: Props["wrap"], viewport?: QUERIES): string | null => {
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Box/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Props } from "../types";
import type { QUERIES } from "../../utils/mediaQuery/consts";
import type { QUERIES } from "../../utils/mediaQuery";
import getWrapClass from "./getWrap";
import getPositionClass from "./getPosition";
import getTextAlignClass from "./getTextAlign";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export enum POSITION {
ABSOLUTE = "absolute",
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Box/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as React from "react";
import cx from "clsx";

import { QUERIES } from "../utils/mediaQuery/consts";
import { QUERIES } from "../utils/mediaQuery";
import type { Props } from "./types";
import getTailwindClasses from "./helpers";

Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Heading/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import cx from "clsx";
import { ELEMENT_OPTIONS, TYPE_OPTIONS, ALIGN } from "./consts";
import { textAlignClasses } from "../common/tailwind/textAlign";
import { spaceAfterClasses } from "../common/tailwind/spaceAfter";
import { QUERIES } from "../utils/mediaQuery/consts";
import { QUERIES } from "../utils/mediaQuery";
import type { Props } from "./types";
import { typeClasses } from "./twClasses";

Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Heading/twClasses.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TYPE_OPTIONS } from "./consts";
import { QUERIES } from "../utils/mediaQuery/consts";
import { QUERIES } from "../utils/mediaQuery";

export const typeClasses: {
[K in QUERIES | TYPE_OPTIONS]: K extends QUERIES ? Record<TYPE_OPTIONS, string> : string;
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Inline/Inline.ct-story.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";

import { SPACINGS } from "../utils/layout/consts";
import { QUERIES } from "../utils/mediaQuery/consts";
import { QUERIES } from "../utils/mediaQuery";
import type { MediaQuery } from "./types";

import Inline from ".";
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Inline/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SPACINGS } from "../utils/layout/consts";
import type { MediaQuery } from "./types";
import { getJustifyClasses, getAlignItemsClasses } from "../common/tailwind";
import { QUERIES } from "../utils/mediaQuery/consts";
import { QUERIES } from "../utils/mediaQuery";

// TODO refactor to gap once we no longer support iOS Safari < 14.5
const spacingClasses: {
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Inline/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as React from "react";
import cx from "clsx";

import { QUERIES } from "../utils/mediaQuery/consts";
import { QUERIES } from "../utils/mediaQuery";
import { getTailwindClasses } from "./helpers";
import type { Props } from "./types";

Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Stack/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
getSpacingClasses,
getSpaceAfterClasses,
} from "../common/tailwind";
import { QUERIES } from "../utils/mediaQuery/consts";
import { QUERIES } from "../utils/mediaQuery";
import { DIRECTION } from "../common/tailwind/direction";
import { SPACING } from "../common/tailwind/spacing";
import { ALIGN } from "../common/tailwind/alignItems";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export enum ALIGN_CONTENT {
START = "start",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export enum ALIGN {
START = "start",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { PaletteColors } from "@kiwicom/orbit-design-tokens";

import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export const backgroundColorClasses: {
[K in QUERIES | keyof PaletteColors]: K extends QUERIES
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/common/tailwind/color.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { PaletteColors } from "@kiwicom/orbit-design-tokens";

import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export const colorClasses: {
[K in QUERIES | keyof PaletteColors]: K extends QUERIES
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/common/tailwind/direction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export enum DIRECTION {
ROW = "row",
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/common/tailwind/display.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export enum DISPLAY {
NONE = "none",
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/common/tailwind/grow.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export enum GROW {
true = "grow",
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/common/tailwind/justify.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export enum JUSTIFY {
START = "start",
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/common/tailwind/margin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { CSSProperties } from "react";

import type { ObjectProperty } from "../types";
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export enum SIZES {
NONE = "none",
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/common/tailwind/padding.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export enum SIZES {
NONE = "none",
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/common/tailwind/shrink.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export enum SHRINK {
shrink = "shrink",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";
import { SPACINGS_AFTER } from "../getSpacingToken";
import type { SpaceAfterSizes as SpaceAfter } from "../types";

Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/common/tailwind/spacing.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import cx from "clsx";

import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";
import type { Direction } from "../../Stack/types";

export enum SPACING {
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/common/tailwind/textAlign.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

export enum TEXT_ALIGN {
START = "start",
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/common/tailwind/wrap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QUERIES } from "../../utils/mediaQuery/consts";
import { QUERIES } from "../../utils/mediaQuery";

enum WRAP {
WRAP = "wrap",
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/utils/Grid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cx from "clsx";

import type { Props, BasicProps } from "./types";
import { spaceAfterClasses } from "../../common/tailwind";
import { QUERIES } from "../mediaQuery/consts";
import { QUERIES } from "../mediaQuery";

const inlineClasses: Record<QUERIES, { inline: string; grid: string }> = {
mediumMobile: { inline: "mm:inline-grid", grid: "mm:grid" },
Expand Down

0 comments on commit 96ea55c

Please sign in to comment.