@sanity/ui 3.0.0-static.17 → 3.0.0-static.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ import { c } from "react-compiler-runtime";
3
3
  import { getScopedTheme, getTheme_v2 } from "@sanity/ui/theme";
4
4
  import { createContext, useContext, useState, useEffect, useDebugValue, useSyncExternalStore, Children, isValidElement, cloneElement, useRef, useImperativeHandle, lazy, Suspense, useMemo, useCallback, useId, useLayoutEffect } from "react";
5
5
  import { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1 } from "styled-components";
6
- import { composeClassNames, box, label, textOverflow, avatar, avatarArrow, avatarInitials, avatarImage, avatarCounter, avatarStack, text, badge, animatedSpinnerIcon, spinner, buttonLoadingBox, button, card, checkbox, checkboxInput, code, container, heading, kbd, _arrow, _arrowStrokeMask, _arrowStroke, _arrowShape, BREAKPOINTS, srOnly, vars, popoverCard, radio, select, _inputElement, selectPresentation, stack, _switch, _switchElement, _switchPresentation, _switchTrack, _switchThumb, textArea, _inputPresentation, textInput, tooltipCard, tooltip, menu, menuDivider, _selectable } from "@sanity/ui/css";
6
+ import { BREAKPOINTS, composeClassNames, box, label, textOverflow, avatar, avatarArrow, avatarInitials, avatarImage, avatarCounter, avatarStack, text, badge, animatedSpinnerIcon, spinner, buttonLoadingBox, button, card, checkbox, checkboxInput, code, container, heading, kbd, _arrow, _arrowStrokeMask, _arrowStroke, _arrowShape, srOnly, vars, popoverCard, radio, select, _inputElement, selectPresentation, stack, _switch, _switchElement, _switchPresentation, _switchTrack, _switchThumb, textArea, _inputPresentation, textInput, tooltipCard, tooltip, menu, menuDivider, _selectable } from "@sanity/ui/css";
7
7
  import { isValidElementType } from "react-is";
8
8
  import { SpinnerIcon, CheckmarkIcon, RemoveIcon, ChevronDownIcon, CloseIcon, ChevronRightIcon } from "@sanity/icons";
9
9
  import { detectOverflow, flip, offset, shift, arrow, hide, useFloating, autoUpdate } from "@floating-ui/react-dom";
@@ -293,9 +293,9 @@ function useMatchMedia(mediaQueryString, getServerSnapshot2) {
293
293
  let t1;
294
294
  return $[2] !== mediaQueryString ? (t1 = () => window.matchMedia(mediaQueryString).matches, $[2] = mediaQueryString, $[3] = t1) : t1 = $[3], useSyncExternalStore(t0, t1, getServerSnapshot2);
295
295
  }
296
- const media = [360, 600, 900, 1200, 1800, 2400];
296
+ const media = Object.values(BREAKPOINTS);
297
297
  function _getMediaQuery(media2, index) {
298
- return index === 0 ? `screen and (max-width: ${media2[index] - 1}px)` : index === media2.length ? `screen and (min-width: ${media2[index - 1]}px)` : `screen and (min-width: ${media2[index - 1]}px) and (max-width: ${media2[index] - 1}px)`;
298
+ return index === 0 ? `screen and (max-width: ${media2[index + 1] - 1}px)` : index === media2.length ? `screen and (min-width: ${media2[index]}px)` : `screen and (min-width: ${media2[index]}px) and (max-width: ${media2[index + 1] - 1}px)`;
299
299
  }
300
300
  function _createMediaStore() {
301
301
  const mediaLen = media.length;