@tidbcloud/uikit 2.0.0-beta.90 → 2.0.0-beta.91

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tidbcloud/uikit
2
2
 
3
+ ## 2.0.0-beta.91
4
+
5
+ ### Patch Changes
6
+
7
+ - useColorScheme returning value includes auto now for easier manage
8
+
3
9
  ## 2.0.0-beta.90
4
10
 
5
11
  ### Patch Changes
@@ -28,6 +28,5 @@ declare module '@mantine/core' {
28
28
  sx?: EmotionSx
29
29
  }
30
30
  }
31
- export type * from '@mantine/hooks';
32
31
  export { useClickOutside, useColorScheme as useSystemColorScheme, useElementSize, useEventListener, useFocusReturn, useFocusTrap, useFocusWithin, useFullscreen, useHotkeys, useHover, useInViewport, useIntersection, useMediaQuery, useMouse, useMove, useMutationObserver, useOrientation, useReducedMotion, useResizeObserver, useScrollIntoView, useViewportSize, useWindowEvent, useWindowScroll, useCounter, useDebouncedCallback, useDebouncedState, useDebouncedValue, useDisclosure, useId, useInputState, useListState, useLocalStorage, useMap, usePagination, usePrevious, useQueue, useSet, useSetState, useStateHistory, useThrottledCallback, useThrottledState, useThrottledValue, useToggle, useUncontrolled, useValidatedState, useClipboard, useDocumentTitle, useDocumentVisibility, useEyeDropper, useFavicon, useFetch, useHash, useHeadroom, useIdle, useInterval, useMergedRef, useNetwork, useOs, usePageLeave, useTextSelection, useTimeout, useDidUpdate, useForceUpdate, useIsFirstRender, useIsomorphicEffect, useLogger, useMounted, useShallowEffect } from '@mantine/hooks';
33
32
  export { useURLQueryState } from './useURLQueryState.js';
@@ -28,6 +28,5 @@ declare module '@mantine/core' {
28
28
  sx?: EmotionSx
29
29
  }
30
30
  }
31
- export type * from '@mantine/hooks';
32
31
  export { useClickOutside, useColorScheme as useSystemColorScheme, useElementSize, useEventListener, useFocusReturn, useFocusTrap, useFocusWithin, useFullscreen, useHotkeys, useHover, useInViewport, useIntersection, useMediaQuery, useMouse, useMove, useMutationObserver, useOrientation, useReducedMotion, useResizeObserver, useScrollIntoView, useViewportSize, useWindowEvent, useWindowScroll, useCounter, useDebouncedCallback, useDebouncedState, useDebouncedValue, useDisclosure, useId, useInputState, useListState, useLocalStorage, useMap, usePagination, usePrevious, useQueue, useSet, useSetState, useStateHistory, useThrottledCallback, useThrottledState, useThrottledValue, useToggle, useUncontrolled, useValidatedState, useClipboard, useDocumentTitle, useDocumentVisibility, useEyeDropper, useFavicon, useFetch, useHash, useHeadroom, useIdle, useInterval, useMergedRef, useNetwork, useOs, usePageLeave, useTextSelection, useTimeout, useDidUpdate, useForceUpdate, useIsFirstRender, useIsomorphicEffect, useLogger, useMounted, useShallowEffect } from '@mantine/hooks';
33
32
  export { useURLQueryState } from './useURLQueryState.js';
@@ -15,7 +15,7 @@ const useColorScheme = (defaultValue, options = { getInitialValueInEffect: false
15
15
  setColorScheme((prev) => prev === "light" ? "dark" : "light");
16
16
  };
17
17
  return {
18
- colorScheme: colorScheme === "auto" ? systemColorScheme : colorScheme,
18
+ colorScheme,
19
19
  setColorScheme,
20
20
  systemColorScheme,
21
21
  toggleColorScheme
@@ -2,7 +2,7 @@ export declare const useColorScheme: (defaultValue: "light" | "dark" | "auto", o
2
2
  getInitialValueInEffect: boolean;
3
3
  key: string;
4
4
  }) => {
5
- colorScheme: "light" | "dark";
5
+ colorScheme: "light" | "dark" | "auto";
6
6
  setColorScheme: (val: "light" | "dark" | "auto" | ((prevState: "light" | "dark" | "auto") => "light" | "dark" | "auto")) => void;
7
7
  systemColorScheme: "light" | "dark";
8
8
  toggleColorScheme: () => void;
@@ -2,7 +2,7 @@ export declare const useColorScheme: (defaultValue: "light" | "dark" | "auto", o
2
2
  getInitialValueInEffect: boolean;
3
3
  key: string;
4
4
  }) => {
5
- colorScheme: "light" | "dark";
5
+ colorScheme: "light" | "dark" | "auto";
6
6
  setColorScheme: (val: "light" | "dark" | "auto" | ((prevState: "light" | "dark" | "auto") => "light" | "dark" | "auto")) => void;
7
7
  systemColorScheme: "light" | "dark";
8
8
  toggleColorScheme: () => void;
@@ -13,7 +13,7 @@ const useColorScheme = (defaultValue, options = { getInitialValueInEffect: false
13
13
  setColorScheme((prev) => prev === "light" ? "dark" : "light");
14
14
  };
15
15
  return {
16
- colorScheme: colorScheme === "auto" ? systemColorScheme : colorScheme,
16
+ colorScheme,
17
17
  setColorScheme,
18
18
  systemColorScheme,
19
19
  toggleColorScheme
@@ -17,7 +17,7 @@ function ThemeProvider({
17
17
  notifications,
18
18
  modals
19
19
  }) {
20
- const systemColorScheme = useColorScheme.useColorScheme("light", {
20
+ const systemColorScheme = useColorScheme.useColorScheme(colorScheme === "auto" ? void 0 : colorScheme, {
21
21
  getInitialValueInEffect: false
22
22
  });
23
23
  const colorSchemeResult = colorScheme === "auto" ? systemColorScheme : colorScheme;
@@ -15,7 +15,7 @@ function ThemeProvider({
15
15
  notifications,
16
16
  modals
17
17
  }) {
18
- const systemColorScheme = useColorScheme("light", {
18
+ const systemColorScheme = useColorScheme(colorScheme === "auto" ? void 0 : colorScheme, {
19
19
  getInitialValueInEffect: false
20
20
  });
21
21
  const colorSchemeResult = colorScheme === "auto" ? systemColorScheme : colorScheme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tidbcloud/uikit",
3
- "version": "2.0.0-beta.90",
3
+ "version": "2.0.0-beta.91",
4
4
  "description": "tidbcloud uikit",
5
5
  "type": "module",
6
6
  "main": "dist/primitive/index.cjs",