xtreme-ui 0.0.103 → 0.0.105

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.
@@ -1,8 +1,13 @@
1
- import { TScreenType } from './types';
2
- export declare const useScreenType: () => {
1
+ export type TScreenType = 'mobile' | 'tablet' | 'desktop';
2
+ type Breakpoints = {
3
+ mobile?: string;
4
+ tablet?: string;
5
+ };
6
+ export declare const useScreenType: (customBreakpoints?: Breakpoints) => {
3
7
  screenType: TScreenType;
4
8
  isMobile: boolean;
5
9
  isTablet: boolean;
6
10
  isDesktop: boolean;
7
11
  };
12
+ export {};
8
13
  //# sourceMappingURL=useScreen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useScreen.d.ts","sourceRoot":"","sources":["../../../src/components/hooks/useScreen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAOtC,eAAO,MAAM,aAAa;;;;;CAsBzB,CAAC"}
1
+ {"version":3,"file":"useScreen.d.ts","sourceRoot":"","sources":["../../../src/components/hooks/useScreen.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE1D,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAOF,eAAO,MAAM,aAAa,GAAI,oBAAoB,WAAW;;;;;CAwB5D,CAAC"}
@@ -1,23 +1,23 @@
1
1
  "use client";
2
- import { useState as n, useEffect as c } from "react";
3
- const o = {
2
+ import { useState as c, useEffect as l } from "react";
3
+ const b = {
4
4
  mobile: "(max-width: 639px)",
5
5
  tablet: "(min-width: 640px) and (max-width: 1023px)"
6
- }, l = () => {
7
- const [e, i] = n("desktop");
8
- return c(() => {
9
- const t = {
10
- mobile: window.matchMedia(o.mobile),
11
- tablet: window.matchMedia(o.tablet)
12
- }, a = () => i(t.mobile.matches ? "mobile" : t.tablet.matches ? "tablet" : "desktop");
13
- return a(), Object.values(t).forEach((s) => s.addEventListener("change", a)), () => Object.values(t).forEach((s) => s.removeEventListener("change", a));
14
- }, []), {
15
- screenType: e,
16
- isMobile: e === "mobile",
17
- isTablet: e === "tablet",
18
- isDesktop: e === "desktop"
6
+ }, m = (i) => {
7
+ const e = { ...b, ...i }, [t, n] = c("desktop");
8
+ return l(() => {
9
+ const a = {
10
+ mobile: window.matchMedia(e.mobile),
11
+ tablet: window.matchMedia(e.tablet)
12
+ }, o = () => n(a.mobile.matches ? "mobile" : a.tablet.matches ? "tablet" : "desktop");
13
+ return o(), Object.values(a).forEach((s) => s.addEventListener("change", o)), () => Object.values(a).forEach((s) => s.removeEventListener("change", o));
14
+ }, [e.mobile, e.tablet]), {
15
+ screenType: t,
16
+ isMobile: t === "mobile",
17
+ isTablet: t === "tablet",
18
+ isDesktop: t === "desktop"
19
19
  };
20
20
  };
21
21
  export {
22
- l as useScreenType
22
+ m as useScreenType
23
23
  };
@@ -9,10 +9,10 @@ export declare const THEME_SCHEME: readonly [{
9
9
  readonly icon: "e163";
10
10
  }, {
11
11
  readonly name: EThemeScheme.light;
12
- readonly icon: "f763";
12
+ readonly icon: "e28f";
13
13
  }, {
14
14
  readonly name: EThemeScheme.dark;
15
- readonly icon: "f754";
15
+ readonly icon: "f186";
16
16
  }];
17
17
  export declare const ThemeColorsPreset: Record<string, TThemeColor>;
18
18
  export declare const defaultColorPreset: TThemeColor;
@@ -5,8 +5,8 @@ const o = {
5
5
  themeColor: "xThemeColor"
6
6
  }, m = [
7
7
  { name: e.auto, icon: "e163" },
8
- { name: e.light, icon: "f763" },
9
- { name: e.dark, icon: "f754" }
8
+ { name: e.light, icon: "e28f" },
9
+ { name: e.dark, icon: "f186" }
10
10
  ], h = {
11
11
  cherry: { h: 350, s: 70, l: 50 },
12
12
  blush: { h: 335, s: 75, l: 55 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtreme-ui",
3
- "version": "0.0.103",
3
+ "version": "0.0.105",
4
4
  "type": "module",
5
5
  "description": "Collection of reusable components that can be used in web projects",
6
6
  "main": "dist/index.js",
@@ -24,11 +24,11 @@
24
24
  "clsx": "^2.1.1",
25
25
  "color-namer": "^1.4.0",
26
26
  "colord": "^2.9.3",
27
- "globals": "^16.1.0",
27
+ "globals": "^16.2.0",
28
28
  "react-calendar": "^5.1.0",
29
29
  "react-clock": "^5.1.0",
30
30
  "react-datetime-picker": "^6.0.1",
31
- "react-easy-crop": "^5.4.1",
31
+ "react-easy-crop": "^5.4.2",
32
32
  "react-select": "^5.10.1",
33
33
  "use-file-picker": "^2.1.2"
34
34
  },
@@ -44,16 +44,16 @@
44
44
  "@storybook/react": "^8.6.14",
45
45
  "@storybook/react-vite": "^8.6.14",
46
46
  "@storybook/test": "^8.6.14",
47
- "@types/lodash": "^4.17.16",
48
- "@types/node": "^22.15.19",
49
- "@types/react": "^19.1.4",
47
+ "@types/lodash": "^4.17.17",
48
+ "@types/node": "^22.15.21",
49
+ "@types/react": "^19.1.5",
50
50
  "@types/react-dom": "^19.1.5",
51
51
  "@typescript-eslint/eslint-plugin": "^8.32.1",
52
52
  "@typescript-eslint/parser": "^8.32.1",
53
- "@vitejs/plugin-react": "^4.4.1",
54
- "@vitejs/plugin-react-swc": "^3.9.0",
53
+ "@vitejs/plugin-react": "^4.5.0",
54
+ "@vitejs/plugin-react-swc": "^3.10.0",
55
55
  "eslint": "^9.27.0",
56
- "eslint-import-resolver-typescript": "^4.3.5",
56
+ "eslint-import-resolver-typescript": "^4.4.0",
57
57
  "eslint-plugin-import": "^2.31.0",
58
58
  "eslint-plugin-react": "^7.37.5",
59
59
  "eslint-plugin-react-hooks": "^5.2.0",
@@ -62,7 +62,7 @@
62
62
  "lodash": "^4.17.21",
63
63
  "react": "^19.1.0",
64
64
  "react-dom": "^19.1.0",
65
- "react-router-dom": "^7.6.0",
65
+ "react-router-dom": "^7.6.1",
66
66
  "sass": "^1.89.0",
67
67
  "storybook": "^8.6.14",
68
68
  "stylelint": "^16.19.1",