Skip to content

Commit

Permalink
Fix circular references
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Nov 11, 2024
1 parent 2eabe8b commit 854a820
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/aria-announcer/useAriaAnnouncer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useContext, useEffect, useMemo, useRef } from "react";
import { debounce } from "../utils";
import { debounce } from "../utils/debounce";
import {
type AriaAnnouncer,
AriaAnnouncerContext,
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/breakpoints/BreakpointProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { type ReactNode, useContext, useState } from "react";
import { createContext, useIsomorphicLayoutEffect } from "../utils";
import { createContext } from "../utils/createContext";
import { useIsomorphicLayoutEffect } from "../utils/useIsomorphicLayoutEffect";
import type { Breakpoints } from "./Breakpoints";

type Breakpoint = keyof Breakpoints;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/salt-provider/SaltProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import type {
Mode,
ThemeName,
} from "../theme";
import { useIsomorphicLayoutEffect } from "../utils";
import { useIsomorphicLayoutEffect } from "../utils/useIsomorphicLayoutEffect";
import { ViewportProvider } from "../viewport";
import saltProviderCss from "./SaltProvider.css";

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/utils/useValueEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
*/

import { type Dispatch, type MutableRefObject, useRef, useState } from "react";
import { useIsomorphicLayoutEffect } from "../index";
import { useEventCallback } from "./useEventCallback";
import { useIsomorphicLayoutEffect } from "./useIsomorphicLayoutEffect";

type SetValueAction<S> = (prev: S) => Generator<any, void, unknown>;

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/viewport/ViewportProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type ReactNode, createContext, useContext, useState } from "react";
import { useIsomorphicLayoutEffect } from "../utils";
import { useIsomorphicLayoutEffect } from "../utils/useIsomorphicLayoutEffect";

const ViewportContext = createContext<number | null>(null);

Expand Down
2 changes: 1 addition & 1 deletion packages/lab/src/date-picker/DatePickerActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
type RangeDatePickerState,
type SingleDatePickerState,
useDatePickerContext,
} from "./index";
} from "./DatePickerContext";
import "./DatePickerActions.css";
import { useComponentCssInjection } from "@salt-ds/styles";
import { useWindow } from "@salt-ds/window";
Expand Down
2 changes: 1 addition & 1 deletion packages/lab/src/date-picker/DatePickerSinglePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import {
getCurrentLocale,
} from "../calendar";
import { Calendar, type SingleDateSelection } from "../calendar";
import { useDatePickerContext } from "./DatePickerContext";
import datePickerPanelCss from "./DatePickerPanel.css";
import { useDatePickerContext } from "./index";

/**
* Props for the DatePickerSinglePanel component.
Expand Down
5 changes: 4 additions & 1 deletion packages/lab/src/responsive/useOverflowLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import type {
OverflowLayoutHookProps,
} from "./overflowTypes";

import { type ResizeHandler, useResizeObserver } from "../responsive";
import {
type ResizeHandler,
useResizeObserver,
} from "../responsive/useResizeObserver";
import { getIsOverflowed, measureContainerOverflow } from "./overflowUtils";
import { useDynamicCollapse } from "./useDynamicCollapse";
import { useInstantCollapse } from "./useInstantCollapse";
Expand Down
6 changes: 5 additions & 1 deletion packages/lab/src/window/ElectronWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import {
} from "@salt-ds/core";
import { forwardRef, useCallback, useEffect, useRef, useState } from "react";
import ReactDOM from "react-dom";
import { Window as SaltWindow, type WindowProps, isDesktop } from "../window";
import {
Window as SaltWindow,
type WindowProps,
isDesktop,
} from "./WindowContext";

import { useComponentCssInjection } from "@salt-ds/styles";
import { useWindow } from "@salt-ds/window";
Expand Down

0 comments on commit 854a820

Please sign in to comment.