@moontra/moonui-pro 2.25.20 → 2.26.2

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.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 });
@@ -74671,13 +74687,21 @@ function SidebarInternal({
74671
74687
  const handleItemClick = useCallback((item) => {
74672
74688
  if (item.action) {
74673
74689
  item.action();
74674
- } else if (item.href && onNavigate) {
74675
- onNavigate(item.href);
74690
+ } else if (item.href) {
74691
+ if (enableNProgress) {
74692
+ NProgress.start();
74693
+ setTimeout(() => NProgress.done(), 500);
74694
+ }
74695
+ if (onNavigate) {
74696
+ onNavigate(item.href);
74697
+ } else {
74698
+ window.location.href = item.href;
74699
+ }
74676
74700
  if (isMobile) {
74677
74701
  setIsOpen(false);
74678
74702
  }
74679
74703
  }
74680
- }, [onNavigate, isMobile]);
74704
+ }, [onNavigate, isMobile, enableNProgress]);
74681
74705
  useEffect(() => {
74682
74706
  setCurrentSearchQuery(searchQuery);
74683
74707
  }, [searchQuery]);
@@ -75138,6 +75162,7 @@ function NavbarInternal({
75138
75162
  hideOnScroll = false,
75139
75163
  showScrollProgress = false,
75140
75164
  maxWidth = "2xl",
75165
+ enableNProgress = true,
75141
75166
  className,
75142
75167
  activePath,
75143
75168
  onNavigate
@@ -75152,6 +75177,17 @@ function NavbarInternal({
75152
75177
  const [scrollProgress, setScrollProgress] = useState(0);
75153
75178
  const lastScrollY = useRef(0);
75154
75179
  const navRef = useRef(null);
75180
+ useEffect(() => {
75181
+ if (enableNProgress) {
75182
+ NProgress.configure({
75183
+ easing: "ease",
75184
+ speed: 800,
75185
+ showSpinner: false,
75186
+ trickleSpeed: 200,
75187
+ minimum: 0.2
75188
+ });
75189
+ }
75190
+ }, [enableNProgress]);
75155
75191
  useEffect(() => {
75156
75192
  const checkMobile = () => {
75157
75193
  setIsMobile(window.innerWidth < mobileBreakpoint);
@@ -75202,13 +75238,21 @@ function NavbarInternal({
75202
75238
  const handleItemClick = useCallback((item) => {
75203
75239
  if (item.action) {
75204
75240
  item.action();
75205
- } else if (item.href && onNavigate) {
75206
- onNavigate(item.href);
75241
+ } else if (item.href) {
75242
+ if (enableNProgress) {
75243
+ NProgress.start();
75244
+ setTimeout(() => NProgress.done(), 500);
75245
+ }
75246
+ if (onNavigate) {
75247
+ onNavigate(item.href);
75248
+ } else {
75249
+ window.location.href = item.href;
75250
+ }
75207
75251
  if (isMobile) {
75208
75252
  setIsOpen(false);
75209
75253
  }
75210
75254
  }
75211
- }, [onNavigate, isMobile]);
75255
+ }, [onNavigate, isMobile, enableNProgress]);
75212
75256
  const handleSearch = useCallback((value) => {
75213
75257
  setSearchValue(value);
75214
75258
  onSearch?.(value);
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -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.25.20",
3
+ "version": "2.26.2",
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",