@moontra/moonui-pro 2.25.20 → 2.26.1
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/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.global.js +110 -106
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +38 -2
- package/dist/styles/nprogress.d.ts +2 -0
- package/dist/styles/nprogress.mjs +32 -0
- package/package.json +3 -1
package/dist/index.mjs
CHANGED
|
@@ -36,6 +36,7 @@ import 'react-grid-layout/css/styles.css';
|
|
|
36
36
|
import { useForm } from 'react-hook-form';
|
|
37
37
|
import confetti from 'canvas-confetti';
|
|
38
38
|
import { flexRender, useReactTable, getCoreRowModel, getPaginationRowModel, getSortedRowModel, getFilteredRowModel } from '@tanstack/react-table';
|
|
39
|
+
import NProgress from 'nprogress';
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
42
|
* @moontra/moonui-pro v2.0.9
|
|
@@ -74494,6 +74495,9 @@ var TableRow2 = t__default.memo(({
|
|
|
74494
74495
|
});
|
|
74495
74496
|
TableRow2.displayName = "TableRow";
|
|
74496
74497
|
var MoonUIDataTablePro = DataTable;
|
|
74498
|
+
|
|
74499
|
+
// src/styles/nprogress.css
|
|
74500
|
+
styleInject("#nprogress {\n pointer-events: none;\n}\n#nprogress .bar {\n background: linear-gradient(90deg, #8b5cf6 0%, #d946ef 50%, #8b5cf6 100%);\n background-size: 200% 100%;\n animation: gradient-shift 2s ease infinite;\n position: fixed;\n z-index: 9999;\n top: 0;\n left: 0;\n width: 100%;\n height: 3px;\n box-shadow: 0 0 10px rgba(139, 92, 246, 0.5), 0 0 5px rgba(217, 70, 239, 0.5);\n}\n#nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 15px rgba(139, 92, 246, 0.7), 0 0 8px rgba(217, 70, 239, 0.7);\n opacity: 1.0;\n transform: rotate(3deg) translate(0px, -4px);\n}\n#nprogress .spinner {\n display: none;\n}\n@keyframes gradient-shift {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n 100% {\n background-position: 0% 50%;\n }\n}\n.dark #nprogress .bar {\n background: linear-gradient(90deg, #a78bfa 0%, #e879f9 50%, #a78bfa 100%);\n box-shadow: 0 0 15px rgba(167, 139, 250, 0.6), 0 0 8px rgba(232, 121, 249, 0.6);\n}\n.dark #nprogress .peg {\n box-shadow: 0 0 20px rgba(167, 139, 250, 0.8), 0 0 10px rgba(232, 121, 249, 0.8);\n}\n");
|
|
74497
74501
|
var SearchInput = t__default.memo(({
|
|
74498
74502
|
searchInputRef,
|
|
74499
74503
|
searchPlaceholder,
|
|
@@ -74574,6 +74578,7 @@ function SidebarInternal({
|
|
|
74574
74578
|
onStateChange,
|
|
74575
74579
|
customStyles,
|
|
74576
74580
|
fullWidthItems = true,
|
|
74581
|
+
enableNProgress = true,
|
|
74577
74582
|
className,
|
|
74578
74583
|
activePath,
|
|
74579
74584
|
onNavigate
|
|
@@ -74585,6 +74590,17 @@ function SidebarInternal({
|
|
|
74585
74590
|
const [currentSearchQuery, setCurrentSearchQuery] = useState(searchQuery);
|
|
74586
74591
|
const [pinnedItems, setPinnedItems] = useState([]);
|
|
74587
74592
|
const searchInputRef = useRef(null);
|
|
74593
|
+
useEffect(() => {
|
|
74594
|
+
if (enableNProgress) {
|
|
74595
|
+
NProgress.configure({
|
|
74596
|
+
easing: "ease",
|
|
74597
|
+
speed: 800,
|
|
74598
|
+
showSpinner: false,
|
|
74599
|
+
trickleSpeed: 200,
|
|
74600
|
+
minimum: 0.2
|
|
74601
|
+
});
|
|
74602
|
+
}
|
|
74603
|
+
}, [enableNProgress]);
|
|
74588
74604
|
const mouseX = useMotionValue(0);
|
|
74589
74605
|
const mouseY = useMotionValue(0);
|
|
74590
74606
|
const springX = useSpring(mouseX, { stiffness: 300, damping: 30 });
|
|
@@ -74672,12 +74688,16 @@ function SidebarInternal({
|
|
|
74672
74688
|
if (item.action) {
|
|
74673
74689
|
item.action();
|
|
74674
74690
|
} else if (item.href && onNavigate) {
|
|
74691
|
+
if (enableNProgress) {
|
|
74692
|
+
NProgress.start();
|
|
74693
|
+
setTimeout(() => NProgress.done(), 500);
|
|
74694
|
+
}
|
|
74675
74695
|
onNavigate(item.href);
|
|
74676
74696
|
if (isMobile) {
|
|
74677
74697
|
setIsOpen(false);
|
|
74678
74698
|
}
|
|
74679
74699
|
}
|
|
74680
|
-
}, [onNavigate, isMobile]);
|
|
74700
|
+
}, [onNavigate, isMobile, enableNProgress]);
|
|
74681
74701
|
useEffect(() => {
|
|
74682
74702
|
setCurrentSearchQuery(searchQuery);
|
|
74683
74703
|
}, [searchQuery]);
|
|
@@ -75138,6 +75158,7 @@ function NavbarInternal({
|
|
|
75138
75158
|
hideOnScroll = false,
|
|
75139
75159
|
showScrollProgress = false,
|
|
75140
75160
|
maxWidth = "2xl",
|
|
75161
|
+
enableNProgress = true,
|
|
75141
75162
|
className,
|
|
75142
75163
|
activePath,
|
|
75143
75164
|
onNavigate
|
|
@@ -75152,6 +75173,17 @@ function NavbarInternal({
|
|
|
75152
75173
|
const [scrollProgress, setScrollProgress] = useState(0);
|
|
75153
75174
|
const lastScrollY = useRef(0);
|
|
75154
75175
|
const navRef = useRef(null);
|
|
75176
|
+
useEffect(() => {
|
|
75177
|
+
if (enableNProgress) {
|
|
75178
|
+
NProgress.configure({
|
|
75179
|
+
easing: "ease",
|
|
75180
|
+
speed: 800,
|
|
75181
|
+
showSpinner: false,
|
|
75182
|
+
trickleSpeed: 200,
|
|
75183
|
+
minimum: 0.2
|
|
75184
|
+
});
|
|
75185
|
+
}
|
|
75186
|
+
}, [enableNProgress]);
|
|
75155
75187
|
useEffect(() => {
|
|
75156
75188
|
const checkMobile = () => {
|
|
75157
75189
|
setIsMobile(window.innerWidth < mobileBreakpoint);
|
|
@@ -75203,12 +75235,16 @@ function NavbarInternal({
|
|
|
75203
75235
|
if (item.action) {
|
|
75204
75236
|
item.action();
|
|
75205
75237
|
} else if (item.href && onNavigate) {
|
|
75238
|
+
if (enableNProgress) {
|
|
75239
|
+
NProgress.start();
|
|
75240
|
+
setTimeout(() => NProgress.done(), 500);
|
|
75241
|
+
}
|
|
75206
75242
|
onNavigate(item.href);
|
|
75207
75243
|
if (isMobile) {
|
|
75208
75244
|
setIsOpen(false);
|
|
75209
75245
|
}
|
|
75210
75246
|
}
|
|
75211
|
-
}, [onNavigate, isMobile]);
|
|
75247
|
+
}, [onNavigate, isMobile, enableNProgress]);
|
|
75212
75248
|
const handleSearch = useCallback((value) => {
|
|
75213
75249
|
setSearchValue(value);
|
|
75214
75250
|
onSearch?.(value);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @moontra/moonui-pro v2.0.9
|
|
3
|
+
* Premium UI components for MoonUI
|
|
4
|
+
* (c) 2025 MoonUI. All rights reserved.
|
|
5
|
+
* @license Commercial - https://moonui.dev/license
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// #style-inject:#style-inject
|
|
9
|
+
function styleInject(css, { insertAt } = {}) {
|
|
10
|
+
if (!css || typeof document === "undefined")
|
|
11
|
+
return;
|
|
12
|
+
const head = document.head || document.getElementsByTagName("head")[0];
|
|
13
|
+
const style = document.createElement("style");
|
|
14
|
+
style.type = "text/css";
|
|
15
|
+
if (insertAt === "top") {
|
|
16
|
+
if (head.firstChild) {
|
|
17
|
+
head.insertBefore(style, head.firstChild);
|
|
18
|
+
} else {
|
|
19
|
+
head.appendChild(style);
|
|
20
|
+
}
|
|
21
|
+
} else {
|
|
22
|
+
head.appendChild(style);
|
|
23
|
+
}
|
|
24
|
+
if (style.styleSheet) {
|
|
25
|
+
style.styleSheet.cssText = css;
|
|
26
|
+
} else {
|
|
27
|
+
style.appendChild(document.createTextNode(css));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// src/styles/nprogress.css
|
|
32
|
+
styleInject("#nprogress {\n pointer-events: none;\n}\n#nprogress .bar {\n background: linear-gradient(90deg, #8b5cf6 0%, #d946ef 50%, #8b5cf6 100%);\n background-size: 200% 100%;\n animation: gradient-shift 2s ease infinite;\n position: fixed;\n z-index: 9999;\n top: 0;\n left: 0;\n width: 100%;\n height: 3px;\n box-shadow: 0 0 10px rgba(139, 92, 246, 0.5), 0 0 5px rgba(217, 70, 239, 0.5);\n}\n#nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 15px rgba(139, 92, 246, 0.7), 0 0 8px rgba(217, 70, 239, 0.7);\n opacity: 1.0;\n transform: rotate(3deg) translate(0px, -4px);\n}\n#nprogress .spinner {\n display: none;\n}\n@keyframes gradient-shift {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n 100% {\n background-position: 0% 50%;\n }\n}\n.dark #nprogress .bar {\n background: linear-gradient(90deg, #a78bfa 0%, #e879f9 50%, #a78bfa 100%);\n box-shadow: 0 0 15px rgba(167, 139, 250, 0.6), 0 0 8px rgba(232, 121, 249, 0.6);\n}\n.dark #nprogress .peg {\n box-shadow: 0 0 20px rgba(167, 139, 250, 0.8), 0 0 10px rgba(232, 121, 249, 0.8);\n}\n");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.26.1",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
"@radix-ui/react-tooltip": "^1.2.7",
|
|
99
99
|
"@tanstack/react-table": "^8.20.5",
|
|
100
100
|
"@types/crypto-js": "^4.2.2",
|
|
101
|
+
"@types/nprogress": "^0.2.3",
|
|
101
102
|
"canvas-confetti": "^1.9.3",
|
|
102
103
|
"class-variance-authority": "^0.7.0",
|
|
103
104
|
"clsx": "^2.1.1",
|
|
@@ -107,6 +108,7 @@
|
|
|
107
108
|
"framer-motion": "^11.11.17",
|
|
108
109
|
"fuse.js": "^7.0.0",
|
|
109
110
|
"lucide-react": "^0.525.0",
|
|
111
|
+
"nprogress": "^0.2.0",
|
|
110
112
|
"react-beautiful-dnd": "^13.1.1",
|
|
111
113
|
"react-colorful": "^5.6.1",
|
|
112
114
|
"react-day-picker": "^9.8.0",
|