@djangocfg/layouts 2.1.668 → 2.1.670
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/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# @djangocfg/layouts
|
|
8
8
|
|
|
9
|
-
Layouts, app shell, and providers for **Next.js App Router**. Part of **[DjangoCFG](https://djangocfg.
|
|
9
|
+
Layouts, app shell, and providers for **Next.js App Router**. Part of **[DjangoCFG](https://djangocfg.cmdop.ai)**.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
pnpm add @djangocfg/layouts
|
|
@@ -296,4 +296,4 @@ Extensions: `@djangocfg/ext-newsletter`, `ext-knowbase`, `ext-leads`, `ext-payme
|
|
|
296
296
|
|
|
297
297
|
## License
|
|
298
298
|
|
|
299
|
-
MIT — [DjangoCFG](https://djangocfg.
|
|
299
|
+
MIT — [DjangoCFG](https://djangocfg.cmdop.ai)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/layouts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.670",
|
|
4
4
|
"description": "Simple, straightforward layout components for Next.js - import and use with props",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"layouts",
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
],
|
|
15
15
|
"author": {
|
|
16
16
|
"name": "DjangoCFG",
|
|
17
|
-
"url": "https://djangocfg.
|
|
17
|
+
"url": "https://djangocfg.cmdop.ai"
|
|
18
18
|
},
|
|
19
|
-
"homepage": "https://djangocfg.
|
|
19
|
+
"homepage": "https://djangocfg.cmdop.ai",
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
|
-
"url": "https://github.com/
|
|
23
|
-
"directory": "packages/layouts"
|
|
22
|
+
"url": "git+https://github.com/commandoperator/cmdop-djangocfg.git",
|
|
23
|
+
"directory": "solution/projects/frontend/packages/layouts"
|
|
24
24
|
},
|
|
25
25
|
"bugs": {
|
|
26
|
-
"url": "https://github.com/
|
|
26
|
+
"url": "https://github.com/commandoperator/cmdop-djangocfg/issues"
|
|
27
27
|
},
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"main": "./src/index.ts",
|
|
@@ -91,12 +91,12 @@
|
|
|
91
91
|
"test": "vitest run"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
-
"@djangocfg/analytics": "^2.1.
|
|
95
|
-
"@djangocfg/api": "^2.1.
|
|
96
|
-
"@djangocfg/devtools": "^2.1.
|
|
97
|
-
"@djangocfg/i18n": "^2.1.
|
|
98
|
-
"@djangocfg/realtime": "^2.1.
|
|
99
|
-
"@djangocfg/ui-core": "^2.1.
|
|
94
|
+
"@djangocfg/analytics": "^2.1.670",
|
|
95
|
+
"@djangocfg/api": "^2.1.670",
|
|
96
|
+
"@djangocfg/devtools": "^2.1.670",
|
|
97
|
+
"@djangocfg/i18n": "^2.1.670",
|
|
98
|
+
"@djangocfg/realtime": "^2.1.670",
|
|
99
|
+
"@djangocfg/ui-core": "^2.1.670",
|
|
100
100
|
"@hookform/resolvers": "^5.2.2 || ^7.0.2",
|
|
101
101
|
"@tanstack/react-query": "^5.108.2",
|
|
102
102
|
"consola": "^3.4.2",
|
|
@@ -123,13 +123,13 @@
|
|
|
123
123
|
"qrcode.react": "^4.2.0"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
|
-
"@djangocfg/analytics": "^2.1.
|
|
127
|
-
"@djangocfg/api": "^2.1.
|
|
128
|
-
"@djangocfg/devtools": "^2.1.
|
|
129
|
-
"@djangocfg/i18n": "^2.1.
|
|
130
|
-
"@djangocfg/realtime": "^2.1.
|
|
131
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
132
|
-
"@djangocfg/ui-core": "^2.1.
|
|
126
|
+
"@djangocfg/analytics": "^2.1.670",
|
|
127
|
+
"@djangocfg/api": "^2.1.670",
|
|
128
|
+
"@djangocfg/devtools": "^2.1.670",
|
|
129
|
+
"@djangocfg/i18n": "^2.1.670",
|
|
130
|
+
"@djangocfg/realtime": "^2.1.670",
|
|
131
|
+
"@djangocfg/typescript-config": "^2.1.670",
|
|
132
|
+
"@djangocfg/ui-core": "^2.1.670",
|
|
133
133
|
"@storybook/react-vite": "^10.6.5",
|
|
134
134
|
"@tanstack/react-query": "5.108.2",
|
|
135
135
|
"@types/node": "^25.9.5",
|
|
@@ -72,6 +72,12 @@ describe('AccountMenu', () => {
|
|
|
72
72
|
expect(host!.querySelector('[aria-haspopup="menu"]')).toBeNull();
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
+
it('signed out: one focusable control, no button inside the link', async () => {
|
|
76
|
+
await mount(<AccountMenu><AccountAvatarTrigger /></AccountMenu>);
|
|
77
|
+
expect(host!.querySelector('a button, button a')).toBeNull();
|
|
78
|
+
expect(host!.querySelectorAll('a[href], button, [tabindex]:not([tabindex="-1"])')).toHaveLength(1);
|
|
79
|
+
});
|
|
80
|
+
|
|
75
81
|
it('signed out with authPath: link goes there; signIn="none" renders nothing', async () => {
|
|
76
82
|
await mount(<AccountMenu authPath="/login"><AccountAvatarTrigger /></AccountMenu>);
|
|
77
83
|
expect(host!.querySelector('a')?.getAttribute('href')).toBe('/login');
|
|
@@ -16,7 +16,7 @@ import { ArrowRight } from 'lucide-react';
|
|
|
16
16
|
import React from 'react';
|
|
17
17
|
|
|
18
18
|
import { useAppT } from '@djangocfg/i18n';
|
|
19
|
-
import { Button, Link, MenuBuilder } from '@djangocfg/ui-core/components';
|
|
19
|
+
import { Button, ButtonLink, Link, MenuBuilder } from '@djangocfg/ui-core/components';
|
|
20
20
|
import { useAuth } from '@djangocfg/api/auth';
|
|
21
21
|
import { isDev } from '@djangocfg/ui-core/lib';
|
|
22
22
|
|
|
@@ -74,11 +74,9 @@ export function AccountMenu({
|
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
76
|
return (
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
</Button>
|
|
81
|
-
</Link>
|
|
77
|
+
<ButtonLink href={authPath ?? routes.auth} variant="default" size="sm" className="h-9 rounded-full px-5">
|
|
78
|
+
{label}
|
|
79
|
+
</ButtonLink>
|
|
82
80
|
);
|
|
83
81
|
}
|
|
84
82
|
|