@orsetra/shared-ui 1.1.21 → 1.1.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orsetra/shared-ui",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "Shared UI components for Orsetra platform",
5
5
  "main": "./index.ts",
6
6
  "types": "./index.ts",
@@ -87,7 +87,7 @@
87
87
  "moment": "^2.30.1",
88
88
  "next-themes": "^0.4.4",
89
89
  "react-avatar": "^5.0.3",
90
- "react-cookies": "^0.1.1",
90
+ "js-cookie": "^3.0.5",
91
91
  "react-day-picker": "8.10.1",
92
92
  "react-easy-crop": "^5.0.8",
93
93
  "react-hook-form": "^7.54.0",
@@ -100,6 +100,7 @@
100
100
  "zod": "^3.24.1"
101
101
  },
102
102
  "devDependencies": {
103
+ "@types/js-cookie": "^3.0.6",
103
104
  "@types/lodash": "^4.17.24",
104
105
  "@types/react": "^19",
105
106
  "next": "^16.0.7",
package/utils/cache.ts CHANGED
@@ -1,9 +1,9 @@
1
- import cookie from 'react-cookies';
1
+ import Cookies from 'js-cookie';
2
2
 
3
3
  export function setData(key: string, value: string, expire?: Date) {
4
- cookie.save(key, value, { expires: expire });
4
+ Cookies.set(key, value, { expires: expire });
5
5
  }
6
6
 
7
7
  export function getData(key: string) {
8
- return cookie.load(key);
8
+ return Cookies.get(key);
9
9
  }
@@ -1,23 +0,0 @@
1
- declare module 'react-cookies' {
2
- export interface CookieOptions {
3
- path?: string;
4
- expires?: Date;
5
- maxAge?: number;
6
- domain?: string;
7
- secure?: boolean;
8
- httpOnly?: boolean;
9
- sameSite?: boolean | 'none' | 'lax' | 'strict';
10
- }
11
-
12
- export interface Cookies {
13
- save(name: string, value: any, options?: CookieOptions): void;
14
- load(name: string): any;
15
- remove(name: string, options?: CookieOptions): void;
16
- select(regex: RegExp): { [key: string]: any };
17
- plugToRequest(req: any, res: any): { [key: string]: any };
18
- setRawCookie(rawCookie: string): void;
19
- }
20
-
21
- const cookie: Cookies;
22
- export default cookie;
23
- }