@djangocfg/ui-nextjs 2.1.197 → 2.1.200

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": "@djangocfg/ui-nextjs",
3
- "version": "2.1.197",
3
+ "version": "2.1.200",
4
4
  "description": "Next.js UI component library with Radix UI primitives, Tailwind CSS styling, charts, and form components",
5
5
  "keywords": [
6
6
  "ui-components",
@@ -80,10 +80,10 @@
80
80
  "check": "tsc --noEmit"
81
81
  },
82
82
  "peerDependencies": {
83
- "@djangocfg/api": "^2.1.197",
84
- "@djangocfg/nextjs": "^2.1.197",
85
- "@djangocfg/ui-core": "^2.1.197",
86
- "@djangocfg/ui-tools": "^2.1.197",
83
+ "@djangocfg/api": "^2.1.200",
84
+ "@djangocfg/nextjs": "^2.1.200",
85
+ "@djangocfg/ui-core": "^2.1.200",
86
+ "@djangocfg/ui-tools": "^2.1.200",
87
87
  "@types/react": "^19.1.0",
88
88
  "@types/react-dom": "^19.1.0",
89
89
  "consola": "^3.4.2",
@@ -106,7 +106,7 @@
106
106
  "react-chartjs-2": "^5.3.0"
107
107
  },
108
108
  "devDependencies": {
109
- "@djangocfg/typescript-config": "^2.1.197",
109
+ "@djangocfg/typescript-config": "^2.1.200",
110
110
  "@radix-ui/react-dropdown-menu": "^2.1.16",
111
111
  "@radix-ui/react-slot": "^1.2.4",
112
112
  "@types/node": "^24.7.2",
@@ -7,7 +7,7 @@ import { buttonVariants } from '@djangocfg/ui-core/components';
7
7
  import type { VariantProps } from 'class-variance-authority';
8
8
  import { cn } from '@djangocfg/ui-core/lib';
9
9
 
10
- type IntlLinkProps = React.ComponentProps<typeof Link>;
10
+ type BaseLinkProps = React.ComponentProps<typeof Link>;
11
11
 
12
12
  // ============================================================================
13
13
  // NextLink - Styled Next.js Link (text link style)
@@ -30,9 +30,9 @@ export interface NextLinkProps
30
30
  * <NextLink href="/docs" className="text-primary hover:underline">Docs</NextLink>
31
31
  */
32
32
  const NextLink = React.forwardRef<HTMLAnchorElement, NextLinkProps>(
33
- ({ children, ...props }, ref) => {
33
+ ({ children, locale: _locale, ...props }, ref) => {
34
34
  return (
35
- <Link ref={ref} {...props as IntlLinkProps}>
35
+ <Link ref={ref} {...props as BaseLinkProps}>
36
36
  {children}
37
37
  </Link>
38
38
  );
@@ -74,12 +74,12 @@ export interface NextButtonLinkProps
74
74
  * <NextButtonLink href="/page" prefetch={false} replace>Go</NextButtonLink>
75
75
  */
76
76
  const NextButtonLink = React.forwardRef<HTMLAnchorElement, NextButtonLinkProps>(
77
- ({ className, variant, size, children, ...props }, ref) => {
77
+ ({ className, variant, size, children, locale: _locale, ...props }, ref) => {
78
78
  return (
79
79
  <Link
80
80
  className={cn(buttonVariants({ variant, size, className }))}
81
81
  ref={ref}
82
- {...props as IntlLinkProps}
82
+ {...props as BaseLinkProps}
83
83
  >
84
84
  {children}
85
85
  </Link>
@@ -1,30 +1,12 @@
1
1
  /**
2
2
  * Internal navigation utilities for ui-nextjs
3
3
  *
4
- * Uses next-intl's createNavigation() with routing to produce
5
- * locale-aware Link, usePathname, useRouter, etc.
4
+ * Uses standard next/link and next/navigation to avoid requiring
5
+ * NextIntlClientProvider in the component tree. This makes ui-nextjs
6
+ * work both with and without next-intl i18n setup.
6
7
  *
7
- * These are used internally by ui-nextjs components (breadcrumb, pagination, sidebar, etc.)
8
- * so that all links automatically include the locale prefix.
9
- *
10
- * IMPORTANT: routing config must be passed to createNavigation() for SSR context resolution.
11
- * Without it, next-intl falls back to `[locale]` pattern which Next.js rejects as dynamic href.
12
- *
13
- * NOTE: Uses defineRouting directly from next-intl to avoid circular dependency
14
- * on @djangocfg/nextjs (which depends on ui-nextjs).
8
+ * Apps that need locale-aware links should use their own navigation
9
+ * module (e.g. @i18n/navigation) created via next-intl's createNavigation().
15
10
  */
16
- import { createNavigation } from 'next-intl/navigation';
17
- import { defineRouting } from 'next-intl/routing';
18
-
19
- const routing = defineRouting({
20
- locales: ['en', 'ru', 'ko', 'ja', 'de', 'fr', 'zh', 'it', 'es', 'nl', 'ar', 'tr', 'pt-BR', 'pl', 'sv', 'no', 'da'],
21
- defaultLocale: 'en',
22
- localePrefix: 'as-needed',
23
- });
24
-
25
- export const {
26
- Link,
27
- usePathname,
28
- useRouter,
29
- redirect,
30
- } = createNavigation(routing);
11
+ export { default as Link } from 'next/link';
12
+ export { usePathname, useRouter, redirect } from 'next/navigation';