@levo-so/react 0.1.86 → 0.1.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.
- package/dist/audience/components/block.js +31 -0
- package/dist/audience/components/component.js +19 -0
- package/dist/audience/components/page.js +16 -0
- package/dist/components/Dialog.js +57 -0
- package/dist/components/DialogWrapper.js +20 -0
- package/dist/components/Sonner.d.ts +1 -1
- package/dist/components/Sonner.d.ts.map +1 -1
- package/dist/components/Sonner.js +32 -0
- package/dist/components/Spinner.js +7 -0
- package/dist/components/Tabs.js +27 -0
- package/dist/components/Tooltip.js +24 -0
- package/dist/components/button/Button.js +24 -0
- package/dist/components/button/buttonVariants.d.ts +1 -1
- package/dist/components/button/buttonVariants.d.ts.map +1 -1
- package/dist/components/button/buttonVariants.js +38 -0
- package/dist/constants/fileUploadPresets.js +80 -0
- package/dist/index.js +24 -495
- package/dist/membership/components/Button.js +22 -0
- package/dist/membership/components/Container.js +59 -0
- package/dist/membership/components/Core.js +18 -0
- package/dist/membership/components/Popup.js +37 -0
- package/dist/membership/index.js +10 -0
- package/dist/membership/useLevoOAuth.js +57 -0
- package/dist/providers/LevoProvider.js +20 -0
- package/dist/styles/index.css +2 -0
- package/dist/utils/byteToSize.js +18 -0
- package/dist/utils/cn.js +6 -0
- package/dist/utils/errorHandler.js +9 -0
- package/dist/utils/isDateObject.js +4 -0
- package/dist/utils/isEmptyObject.js +5 -0
- package/dist/utils/isNullOrUndefined.js +4 -0
- package/dist/utils/isObject.js +6 -0
- package/package.json +32 -32
- package/dist/index.css +0 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/utils/byteToSize.ts
|
|
2
|
+
var e = (e, t = 2) => {
|
|
3
|
+
if (e === 0) return "0 B";
|
|
4
|
+
let n = 1024, r = t < 0 ? 0 : t, i = [
|
|
5
|
+
"Bytes",
|
|
6
|
+
"KB",
|
|
7
|
+
"MB",
|
|
8
|
+
"GB",
|
|
9
|
+
"TB",
|
|
10
|
+
"PB",
|
|
11
|
+
"EB",
|
|
12
|
+
"ZB",
|
|
13
|
+
"YB"
|
|
14
|
+
], a = Math.floor(Math.log(e) / Math.log(n));
|
|
15
|
+
return `${Number.parseFloat((e / n ** a).toFixed(r))} ${i[a]}`;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { e as default };
|
package/dist/utils/cn.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { errorToast as e } from "../components/Sonner.js";
|
|
2
|
+
import { getLevoError as t } from "@levo-so/core";
|
|
3
|
+
//#region src/utils/errorHandler.ts
|
|
4
|
+
var n = (n) => {
|
|
5
|
+
let r = t(n);
|
|
6
|
+
return r?.code === "REQUEST_TIMEOUT" || r?.code === "NETWORK_ERROR" || r?.status === 408 || r?.status === 0 || e(r?.message || "", r?.title || "Error", { id: `${r?.title || ""}-${r?.message || ""}` }), r;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as errorHandler };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { isDateObject as e } from "./isDateObject.js";
|
|
2
|
+
import { isNullOrUndefined as t } from "./isNullOrUndefined.js";
|
|
3
|
+
//#region src/utils/isObject.ts
|
|
4
|
+
var n = (e) => typeof e == "object", r = (r) => !t(r) && !Array.isArray(r) && n(r) && !e(r);
|
|
5
|
+
//#endregion
|
|
6
|
+
export { r as isObject, n as isObjectType };
|
package/package.json
CHANGED
|
@@ -1,31 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levo-so/react",
|
|
3
|
-
"version": "0.1.86",
|
|
4
|
-
"author": "Levo Engineering <devs@theinternetfolks.com>",
|
|
5
3
|
"description": "Levo suite for React based applications",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"**/*.css"
|
|
9
|
-
],
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"dist/**/*",
|
|
15
|
-
"!dist/**/*.d.ts.map",
|
|
16
|
-
"package.json"
|
|
17
|
-
],
|
|
18
|
-
"peerDependencies": {
|
|
19
|
-
"react": ">=18",
|
|
20
|
-
"react-dom": ">=18",
|
|
21
|
-
"@levo-so/core": "0.1.82",
|
|
22
|
-
"@levo-so/insights": "0.1.86"
|
|
23
|
-
},
|
|
4
|
+
"version": "0.1.105",
|
|
5
|
+
"author": "Levo Engineering <devs@theinternetfolks.com>",
|
|
24
6
|
"dependencies": {
|
|
25
7
|
"class-variance-authority": "0.7.0",
|
|
26
8
|
"clsx": "2.1.1",
|
|
27
|
-
"lodash-es": "4.
|
|
28
|
-
"lucide-react": "0.
|
|
9
|
+
"lodash-es": "4.18.1",
|
|
10
|
+
"lucide-react": "0.575.0",
|
|
29
11
|
"radix-ui": "1.4.3",
|
|
30
12
|
"react-icons": "5.2.1",
|
|
31
13
|
"sonner": "2.0.7",
|
|
@@ -42,16 +24,13 @@
|
|
|
42
24
|
"rollup-preserve-directives": "1.1.3",
|
|
43
25
|
"tailwind-merge": "2.4.0",
|
|
44
26
|
"typescript": "5.9.3",
|
|
45
|
-
"vite": "8.0.
|
|
27
|
+
"vite": "8.0.8",
|
|
46
28
|
"vite-plugin-dts": "4.5.4",
|
|
47
|
-
"@levo-so/core": "0.1.
|
|
48
|
-
"@levo-
|
|
49
|
-
"@levo/
|
|
50
|
-
"@levo/
|
|
29
|
+
"@levo-so/core": "0.1.105",
|
|
30
|
+
"@levo/tw-config": "0.0.0",
|
|
31
|
+
"@levo-so/insights": "0.1.105",
|
|
32
|
+
"@levo/ts-config": "0.0.0"
|
|
51
33
|
},
|
|
52
|
-
"main": "./dist/index.js",
|
|
53
|
-
"module": "./dist/index.js",
|
|
54
|
-
"types": "./dist/index.d.ts",
|
|
55
34
|
"exports": {
|
|
56
35
|
"./index.css": "./dist/index.css",
|
|
57
36
|
".": {
|
|
@@ -59,10 +38,31 @@
|
|
|
59
38
|
"default": "./dist/index.js"
|
|
60
39
|
}
|
|
61
40
|
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist/**/*",
|
|
43
|
+
"!dist/**/*.d.ts.map",
|
|
44
|
+
"package.json"
|
|
45
|
+
],
|
|
46
|
+
"main": "./dist/index.js",
|
|
47
|
+
"module": "./dist/index.js",
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"react": ">=18",
|
|
50
|
+
"react-dom": ">=18",
|
|
51
|
+
"@levo-so/core": "0.1.105",
|
|
52
|
+
"@levo-so/insights": "0.1.105"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public"
|
|
56
|
+
},
|
|
57
|
+
"sideEffects": [
|
|
58
|
+
"**/*.css"
|
|
59
|
+
],
|
|
60
|
+
"type": "module",
|
|
61
|
+
"types": "./dist/index.d.ts",
|
|
62
62
|
"scripts": {
|
|
63
|
-
"clean": "rimraf dist node_modules .turbo",
|
|
64
|
-
"check-types": "tsc --noEmit",
|
|
65
63
|
"build": "vite build",
|
|
64
|
+
"check-types": "tsc --noEmit",
|
|
65
|
+
"clean": "npx rimraf dist node_modules .turbo",
|
|
66
66
|
"dev": "vite build --watch"
|
|
67
67
|
}
|
|
68
68
|
}
|