@devxcrew/ui 1.0.81
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 +43 -0
- package/assist/AGENT-GUIDE.md +29 -0
- package/assist/README.md +22 -0
- package/assist/documentation/CHANGELOG.md +72 -0
- package/assist/documentation/audit.md +33 -0
- package/assist/documentation/package-reference.md +49 -0
- package/assist/documentation/project-inventory.md +13 -0
- package/assist/governance/rules.md +23 -0
- package/assist/operations/github.md +9 -0
- package/assist/operations/npm-release.md +14 -0
- package/assist/operations/versioning.md +58 -0
- package/dist/src/blocks/menu/sidemenu/app-sidebar.d.ts +46 -0
- package/dist/src/blocks/menu/sidemenu/app-sidebar.js +30 -0
- package/dist/src/blocks/menu/sidemenu/nav-documents.d.ts +8 -0
- package/dist/src/blocks/menu/sidemenu/nav-documents.js +8 -0
- package/dist/src/blocks/menu/sidemenu/nav-main.d.ts +8 -0
- package/dist/src/blocks/menu/sidemenu/nav-main.js +8 -0
- package/dist/src/blocks/menu/sidemenu/nav-secondary.d.ts +10 -0
- package/dist/src/blocks/menu/sidemenu/nav-secondary.js +5 -0
- package/dist/src/blocks/menu/sidemenu/nav-user.d.ts +7 -0
- package/dist/src/blocks/menu/sidemenu/nav-user.js +10 -0
- package/dist/src/blocks/menu/sidemenu/section-cards.d.ts +1 -0
- package/dist/src/blocks/menu/sidemenu/section-cards.js +7 -0
- package/dist/src/blocks/menu/sidemenu/sub/sidemenu-section.d.ts +21 -0
- package/dist/src/blocks/menu/sidemenu/sub/sidemenu-section.js +25 -0
- package/dist/src/blocks/menu/sidemenu/top-menu.d.ts +18 -0
- package/dist/src/blocks/menu/sidemenu/top-menu.js +44 -0
- package/dist/src/components/Field.d.ts +29 -0
- package/dist/src/components/Field.js +79 -0
- package/dist/src/components/StatusBadge.d.ts +6 -0
- package/dist/src/components/StatusBadge.js +11 -0
- package/dist/src/components/accordion.d.ts +7 -0
- package/dist/src/components/accordion.js +13 -0
- package/dist/src/components/alert-dialog.d.ts +20 -0
- package/dist/src/components/alert-dialog.js +26 -0
- package/dist/src/components/alert.d.ts +8 -0
- package/dist/src/components/alert.js +22 -0
- package/dist/src/components/aspect-ratio.d.ts +3 -0
- package/dist/src/components/aspect-ratio.js +3 -0
- package/dist/src/components/avatar.d.ts +6 -0
- package/dist/src/components/avatar.js +12 -0
- package/dist/src/components/badge.d.ts +9 -0
- package/dist/src/components/badge.js +20 -0
- package/dist/src/components/breadcrumb.d.ts +19 -0
- package/dist/src/components/breadcrumb.js +23 -0
- package/dist/src/components/button-group.d.ts +11 -0
- package/dist/src/components/button-group.js +27 -0
- package/dist/src/components/button.d.ts +13 -0
- package/dist/src/components/button.js +40 -0
- package/dist/src/components/calendar.d.ts +8 -0
- package/dist/src/components/calendar.js +73 -0
- package/dist/src/components/card.d.ts +12 -0
- package/dist/src/components/card.js +16 -0
- package/dist/src/components/carousel.d.ts +18 -0
- package/dist/src/components/carousel.js +99 -0
- package/dist/src/components/chart.d.ts +75 -0
- package/dist/src/components/chart.js +120 -0
- package/dist/src/components/checkbox.d.ts +4 -0
- package/dist/src/components/checkbox.js +8 -0
- package/dist/src/components/collapsible.d.ts +5 -0
- package/dist/src/components/collapsible.js +6 -0
- package/dist/src/components/command.d.ts +80 -0
- package/dist/src/components/command.js +29 -0
- package/dist/src/components/context-menu.d.ts +27 -0
- package/dist/src/components/context-menu.js +35 -0
- package/dist/src/components/dialog.d.ts +19 -0
- package/dist/src/components/dialog.js +23 -0
- package/dist/src/components/drawer.d.ts +22 -0
- package/dist/src/components/drawer.js +22 -0
- package/dist/src/components/dropdown-menu.d.ts +27 -0
- package/dist/src/components/dropdown-menu.js +36 -0
- package/dist/src/components/empty.d.ts +11 -0
- package/dist/src/components/empty.js +33 -0
- package/dist/src/components/global-loader.d.ts +8 -0
- package/dist/src/components/global-loader.js +10 -0
- package/dist/src/components/hover-card.d.ts +6 -0
- package/dist/src/components/hover-card.js +9 -0
- package/dist/src/components/input-group.d.ts +16 -0
- package/dist/src/components/input-group.js +63 -0
- package/dist/src/components/input-otp.d.ts +36 -0
- package/dist/src/components/input-otp.js +18 -0
- package/dist/src/components/input.d.ts +3 -0
- package/dist/src/components/input.js +8 -0
- package/dist/src/components/item.d.ts +23 -0
- package/dist/src/components/item.js +66 -0
- package/dist/src/components/kbd.d.ts +3 -0
- package/dist/src/components/kbd.js +9 -0
- package/dist/src/components/label.d.ts +5 -0
- package/dist/src/components/label.js +10 -0
- package/dist/src/components/menubar.d.ts +28 -0
- package/dist/src/components/menubar.js +48 -0
- package/dist/src/components/navigation-menu.d.ts +12 -0
- package/dist/src/components/navigation-menu.js +22 -0
- package/dist/src/components/pagination.d.ts +28 -0
- package/dist/src/components/pagination.js +23 -0
- package/dist/src/components/popover.d.ts +7 -0
- package/dist/src/components/popover.js +10 -0
- package/dist/src/components/progress.d.ts +4 -0
- package/dist/src/components/progress.js +8 -0
- package/dist/src/components/radio-group.d.ts +5 -0
- package/dist/src/components/radio-group.js +14 -0
- package/dist/src/components/resizable.d.ts +7 -0
- package/dist/src/components/resizable.js +9 -0
- package/dist/src/components/scroll-area.d.ts +5 -0
- package/dist/src/components/scroll-area.js +9 -0
- package/dist/src/components/select.d.ts +13 -0
- package/dist/src/components/select.js +26 -0
- package/dist/src/components/separator.d.ts +4 -0
- package/dist/src/components/separator.js +7 -0
- package/dist/src/components/sheet.d.ts +25 -0
- package/dist/src/components/sheet.js +37 -0
- package/dist/src/components/sidebar.d.ts +65 -0
- package/dist/src/components/sidebar.js +222 -0
- package/dist/src/components/skeleton.d.ts +2 -0
- package/dist/src/components/skeleton.js +6 -0
- package/dist/src/components/slider.d.ts +4 -0
- package/dist/src/components/slider.js +7 -0
- package/dist/src/components/sonner.d.ts +4 -0
- package/dist/src/components/sonner.js +21 -0
- package/dist/src/components/spinner.d.ts +2 -0
- package/dist/src/components/spinner.js +7 -0
- package/dist/src/components/switch.d.ts +4 -0
- package/dist/src/components/switch.js +7 -0
- package/dist/src/components/table.d.ts +10 -0
- package/dist/src/components/table.js +20 -0
- package/dist/src/components/tabs.d.ts +7 -0
- package/dist/src/components/tabs.js +12 -0
- package/dist/src/components/textarea.d.ts +3 -0
- package/dist/src/components/textarea.js +8 -0
- package/dist/src/components/toast.d.ts +15 -0
- package/dist/src/components/toast.js +33 -0
- package/dist/src/components/toaster.d.ts +1 -0
- package/dist/src/components/toaster.js +9 -0
- package/dist/src/components/toggle-group.d.ts +12 -0
- package/dist/src/components/toggle-group.js +20 -0
- package/dist/src/components/toggle.d.ts +12 -0
- package/dist/src/components/toggle.js +26 -0
- package/dist/src/components/tooltip.d.ts +7 -0
- package/dist/src/components/tooltip.js +10 -0
- package/dist/src/components/tree.d.ts +102 -0
- package/dist/src/components/tree.js +280 -0
- package/dist/src/components/use-mobile.d.ts +1 -0
- package/dist/src/components/use-mobile.js +15 -0
- package/dist/src/components/use-toast.d.ts +37 -0
- package/dist/src/components/use-toast.js +122 -0
- package/dist/src/design-system/component-defaults.d.ts +7 -0
- package/dist/src/design-system/component-defaults.js +49 -0
- package/dist/src/design-system/index.d.ts +11 -0
- package/dist/src/design-system/index.js +28 -0
- package/dist/src/design-system/types.d.ts +10 -0
- package/dist/src/design-system/types.js +1 -0
- package/dist/src/design-system/variants/clear/tokens.d.ts +2 -0
- package/dist/src/design-system/variants/clear/tokens.js +9 -0
- package/dist/src/design-system/variants/compact/tokens.d.ts +2 -0
- package/dist/src/design-system/variants/compact/tokens.js +9 -0
- package/dist/src/design-system/variants/default/tokens.d.ts +2 -0
- package/dist/src/design-system/variants/default/tokens.js +9 -0
- package/dist/src/design-system/variants/palette/tokens.d.ts +8 -0
- package/dist/src/design-system/variants/palette/tokens.js +63 -0
- package/dist/src/index.d.ts +69 -0
- package/dist/src/index.js +69 -0
- package/dist/src/layouts/admin-layout.d.ts +3 -0
- package/dist/src/layouts/admin-layout.js +5 -0
- package/dist/src/layouts/app-layout.d.ts +27 -0
- package/dist/src/layouts/app-layout.js +22 -0
- package/dist/src/layouts/application-layout.d.ts +3 -0
- package/dist/src/layouts/application-layout.js +5 -0
- package/dist/src/layouts/auth-layout.d.ts +13 -0
- package/dist/src/layouts/auth-layout.js +24 -0
- package/dist/src/layouts/super-layout.d.ts +3 -0
- package/dist/src/layouts/super-layout.js +5 -0
- package/dist/src/layouts/web-layout.d.ts +8 -0
- package/dist/src/layouts/web-layout.js +4 -0
- package/dist/src/lib/use-debounced-value.d.ts +1 -0
- package/dist/src/lib/use-debounced-value.js +9 -0
- package/dist/src/lib/utils.d.ts +2 -0
- package/dist/src/lib/utils.js +5 -0
- package/dist/src/styles.css +1037 -0
- package/dist/src/typeset.css +452 -0
- package/dist/src/workspace/actions.d.ts +5 -0
- package/dist/src/workspace/actions.js +6 -0
- package/dist/src/workspace/animated-tabs.d.ts +16 -0
- package/dist/src/workspace/animated-tabs.js +8 -0
- package/dist/src/workspace/autocomplete.d.ts +15 -0
- package/dist/src/workspace/autocomplete.js +21 -0
- package/dist/src/workspace/date-picker.d.ts +7 -0
- package/dist/src/workspace/date-picker.js +62 -0
- package/dist/src/workspace/drag-drop.d.ts +12 -0
- package/dist/src/workspace/drag-drop.js +18 -0
- package/dist/src/workspace/editor.d.ts +7 -0
- package/dist/src/workspace/editor.js +356 -0
- package/dist/src/workspace/field.d.ts +13 -0
- package/dist/src/workspace/field.js +10 -0
- package/dist/src/workspace/filters.d.ts +15 -0
- package/dist/src/workspace/filters.js +19 -0
- package/dist/src/workspace/header.d.ts +9 -0
- package/dist/src/workspace/header.js +6 -0
- package/dist/src/workspace/index.d.ts +31 -0
- package/dist/src/workspace/index.js +27 -0
- package/dist/src/workspace/line-table.d.ts +21 -0
- package/dist/src/workspace/line-table.js +11 -0
- package/dist/src/workspace/lookup.d.ts +45 -0
- package/dist/src/workspace/lookup.js +301 -0
- package/dist/src/workspace/minimal-editor.d.ts +7 -0
- package/dist/src/workspace/minimal-editor.js +29 -0
- package/dist/src/workspace/motion.d.ts +2 -0
- package/dist/src/workspace/motion.js +3 -0
- package/dist/src/workspace/page.d.ts +11 -0
- package/dist/src/workspace/page.js +6 -0
- package/dist/src/workspace/pagination.d.ts +14 -0
- package/dist/src/workspace/pagination.js +13 -0
- package/dist/src/workspace/panel.d.ts +9 -0
- package/dist/src/workspace/panel.js +6 -0
- package/dist/src/workspace/presets/common-list.d.ts +12 -0
- package/dist/src/workspace/presets/common-list.js +13 -0
- package/dist/src/workspace/presets/entry-list.d.ts +22 -0
- package/dist/src/workspace/presets/entry-list.js +23 -0
- package/dist/src/workspace/presets/master-list.d.ts +31 -0
- package/dist/src/workspace/presets/master-list.js +25 -0
- package/dist/src/workspace/print.d.ts +10 -0
- package/dist/src/workspace/print.js +52 -0
- package/dist/src/workspace/protected-indicator.d.ts +3 -0
- package/dist/src/workspace/protected-indicator.js +7 -0
- package/dist/src/workspace/row-actions.d.ts +19 -0
- package/dist/src/workspace/row-actions.js +13 -0
- package/dist/src/workspace/section.d.ts +8 -0
- package/dist/src/workspace/section.js +6 -0
- package/dist/src/workspace/select.d.ts +13 -0
- package/dist/src/workspace/select.js +6 -0
- package/dist/src/workspace/show.d.ts +13 -0
- package/dist/src/workspace/show.js +12 -0
- package/dist/src/workspace/status.d.ts +28 -0
- package/dist/src/workspace/status.js +40 -0
- package/dist/src/workspace/table.d.ts +25 -0
- package/dist/src/workspace/table.js +40 -0
- package/dist/src/workspace/totals.d.ts +9 -0
- package/dist/src/workspace/totals.js +6 -0
- package/dist/src/workspace/types.d.ts +39 -0
- package/dist/src/workspace/types.js +2 -0
- package/dist/src/workspace/upsert.d.ts +68 -0
- package/dist/src/workspace/upsert.js +41 -0
- package/dist/src/workspace/utils.d.ts +4 -0
- package/dist/src/workspace/utils.js +40 -0
- package/package.json +181 -0
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# @devxcrew/ui
|
|
2
|
+
|
|
3
|
+
React controls, application layouts, workspace primitives, and shared visual settings.
|
|
4
|
+
|
|
5
|
+
## Start
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install
|
|
9
|
+
npm run check
|
|
10
|
+
npm run pack
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Each repository owns package-lock.json, node_modules, dist, and its version.
|
|
14
|
+
The release archive is written to dist/releases.
|
|
15
|
+
|
|
16
|
+
## Integration
|
|
17
|
+
|
|
18
|
+
Use a React 19 frontend with a bundler such as Vite. Install React and React DOM in the app. Import @devxcrew/ui/styles.css. Include the installed package dist/src folder in Tailwind source scanning. Prefer subpath imports to keep feature dependencies out of simple pages.
|
|
19
|
+
|
|
20
|
+
Compiled UI modules target frontend bundlers and contain extensionless internal imports. Direct Node.js execution and unbundled browser imports are not supported. The package has no unit tests yet. The starter provides browser coverage for API connectivity, theme controls, mobile layout, and failure recovery, not every exported control.
|
|
21
|
+
|
|
22
|
+
## Agent reference
|
|
23
|
+
|
|
24
|
+
Start with [Assist](assist/README.md) and [the agent guide](assist/AGENT-GUIDE.md).
|
|
25
|
+
Read [package details](assist/documentation/package-reference.md), [audit notes](assist/documentation/audit.md), and [the changelog](assist/documentation/CHANGELOG.md).
|
|
26
|
+
|
|
27
|
+
## Maintenance tools
|
|
28
|
+
|
|
29
|
+
This repository installs @devxcrew/tools as a development dependency.
|
|
30
|
+
Install a pinned tools version from the configured npm registry.
|
|
31
|
+
The common implementation lives in D:\codexsun\shared\tools.
|
|
32
|
+
For distributed repositories, install a pinned tools version from the private registry.
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npm run version:show
|
|
36
|
+
npm run version:bump -- --dry-run --title "Package update"
|
|
37
|
+
npm run changelog:append -- --title "Maintenance" --note "Describe the verified change."
|
|
38
|
+
npm run github:now -- --dry-run
|
|
39
|
+
npm run lines:fix
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Read [versioning](assist/operations/versioning.md) before a release.
|
|
43
|
+
Remote repositories and registry publishing are not configured.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# UI Agent Guide
|
|
2
|
+
|
|
3
|
+
## Required reading
|
|
4
|
+
|
|
5
|
+
Read governance/rules.md and documentation/package-reference.md before changing code.
|
|
6
|
+
Read operations/versioning.md before changing versions or release tools.
|
|
7
|
+
Inspect the owning source, public export, dependency declaration, and tests.
|
|
8
|
+
|
|
9
|
+
## Ownership
|
|
10
|
+
|
|
11
|
+
Own reusable controls, accessible interaction primitives, layout wrappers, styling tokens, dark mode surfaces, and design variants. Apps supply branding, navigation, user actions, workspaces, business forms, and permissions.
|
|
12
|
+
|
|
13
|
+
Keep this repository independent. Import sibling packages only through published public exports.
|
|
14
|
+
Treat @devxcrew/tools as development tooling, never as a runtime dependency.
|
|
15
|
+
|
|
16
|
+
## Verification
|
|
17
|
+
|
|
18
|
+
Run npm run check, npm run format:check, and npm run pack.
|
|
19
|
+
Build validates exports and keeps tests out of the release output.
|
|
20
|
+
Install published npm versions in the starter and run its build and clone verification after packaging changes.
|
|
21
|
+
Use starter browser tests after frontend behavior or frontend dependency changes.
|
|
22
|
+
Report unverified integrations clearly. Do not equate mocks or scope tests with live database evidence.
|
|
23
|
+
|
|
24
|
+
## Documentation
|
|
25
|
+
|
|
26
|
+
Update package-reference.md when a public contract or integration requirement changes.
|
|
27
|
+
Append concrete changes under the current changelog version.
|
|
28
|
+
Do not create historical CXApp product entries or task-specific handoff files.
|
|
29
|
+
Do not bump versions unless requested. Do not run Docker.
|
package/assist/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# UI Assist Pack
|
|
2
|
+
|
|
3
|
+
This folder is the active reference for humans and agents maintaining @devxcrew/ui.
|
|
4
|
+
It uses the CXApp Assist layout without its product-specific plans or lockstep workspace rules.
|
|
5
|
+
|
|
6
|
+
## Reading order
|
|
7
|
+
|
|
8
|
+
1. Read AGENT-GUIDE.md.
|
|
9
|
+
2. Read governance/rules.md.
|
|
10
|
+
3. Read documentation/package-reference.md and the affected public exports.
|
|
11
|
+
4. Read operations/versioning.md for tooling or release work.
|
|
12
|
+
|
|
13
|
+
## Folder guide
|
|
14
|
+
|
|
15
|
+
- documentation/package-reference.md: ownership, exports, dependencies, integration and limits.
|
|
16
|
+
- documentation/project-inventory.md: current repository layout.
|
|
17
|
+
- documentation/audit.md: reviewed findings and verification limits.
|
|
18
|
+
- documentation/CHANGELOG.md: active version state and history.
|
|
19
|
+
- governance/rules.md: maintenance boundaries and checks.
|
|
20
|
+
- operations/versioning.md: version, changelog, GitHub and LF commands.
|
|
21
|
+
|
|
22
|
+
Historical changelog entries are evidence, not current instructions.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Version State
|
|
4
|
+
|
|
5
|
+
Current version: 1.0.81
|
|
6
|
+
|
|
7
|
+
Release tag: v-1.0.81
|
|
8
|
+
|
|
9
|
+
Changelog label: v 1.0.81
|
|
10
|
+
|
|
11
|
+
History starts with this standalone package baseline. CXApp business history is not copied.
|
|
12
|
+
|
|
13
|
+
## v-1.0.81
|
|
14
|
+
|
|
15
|
+
### [v 1.0.81] 2026-10-02 12:08 pm - Devxcrew replacement release
|
|
16
|
+
|
|
17
|
+
#### Database Changes
|
|
18
|
+
|
|
19
|
+
- Database update: No (manual).
|
|
20
|
+
|
|
21
|
+
#### App Codebase Changes
|
|
22
|
+
|
|
23
|
+
- Use @devxcrew/tools for shared maintenance and devxcrew repository metadata.
|
|
24
|
+
|
|
25
|
+
## v-1.0.80
|
|
26
|
+
|
|
27
|
+
### [v 1.0.80] 2026-10-02 11:52 am - Tools ownership and naming migration
|
|
28
|
+
|
|
29
|
+
#### Database Changes
|
|
30
|
+
|
|
31
|
+
- Database update: No (manual).
|
|
32
|
+
|
|
33
|
+
#### App Codebase Changes
|
|
34
|
+
|
|
35
|
+
- Moved shared maintenance to @devxcrew/tools. CLI now creates apps only. Uses devxcrew commands, platform imports, and .devxcrew-tools.json profiles. Registry lock regeneration awaits the tools release.
|
|
36
|
+
|
|
37
|
+
### [v 1.0.80] 2026-10-02 11:30 am - Fresh devxcrew repository
|
|
38
|
+
|
|
39
|
+
#### Database Changes
|
|
40
|
+
|
|
41
|
+
- Database update: No (manual).
|
|
42
|
+
|
|
43
|
+
#### App Codebase Changes
|
|
44
|
+
|
|
45
|
+
- Started fresh Git history under devxcrew with a short repository name. Npm publishing is deferred.
|
|
46
|
+
|
|
47
|
+
### [v 1.0.80] 2026-10-02 11:06 am - Public npm package preparation
|
|
48
|
+
|
|
49
|
+
#### Database Changes
|
|
50
|
+
|
|
51
|
+
- Database update: No (manual).
|
|
52
|
+
|
|
53
|
+
#### App Codebase Changes
|
|
54
|
+
|
|
55
|
+
- Prepared @devxcrew package metadata, independent GitHub checks, and OIDC publishing. Uses @devxcrew/cli 1.0.0 from npm.
|
|
56
|
+
|
|
57
|
+
### [v 1.0.80] 2026-10-02 10:04 am - Independent package maintenance and audit
|
|
58
|
+
|
|
59
|
+
#### Database Changes
|
|
60
|
+
|
|
61
|
+
- Database update: No (manual).
|
|
62
|
+
- No database migration, provisioning, or live persistence validation was performed.
|
|
63
|
+
|
|
64
|
+
#### App Codebase Changes
|
|
65
|
+
|
|
66
|
+
- Maintained this package as an independent npm project and local Git repository.
|
|
67
|
+
- Added Assist references, governance, package inventory, audit notes, and release documentation.
|
|
68
|
+
- Reused @codexsun/cli for builds, boundaries, exports, GitHub review, version bumps, changelogs, and LF normalization.
|
|
69
|
+
- Preserved independent package versions and application-owned business modules.
|
|
70
|
+
- Package checks, compiled exports, production dependency audit, GitHub dry run, and version-bump dry run passed.
|
|
71
|
+
|
|
72
|
+
- UI has no unit tests. Two starter browser tests passed for the shared shell and API failure recovery.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Package Audit
|
|
2
|
+
|
|
3
|
+
Reviewed on 2026-10-02. This audit covers source ownership, dependency declarations, public exports, packaging, maintenance tools, and integration limits.
|
|
4
|
+
|
|
5
|
+
## Findings and actions
|
|
6
|
+
|
|
7
|
+
- Confirmed React and React DOM are peer dependencies supplied by the app.
|
|
8
|
+
- Confirmed no backend package or product-private source import is present.
|
|
9
|
+
- Added compiled export and CSS asset checks.
|
|
10
|
+
- UI unit coverage remains absent. Starter browser tests cover the shared shell only.
|
|
11
|
+
- Root barrel imports can include optional editor/chart dependencies. Prefer subpath imports.
|
|
12
|
+
- App-provided navigation and branding prevent shared product-specific menus.
|
|
13
|
+
|
|
14
|
+
## Maintenance findings
|
|
15
|
+
|
|
16
|
+
- Local repositories previously copied build and boundary scripts. They now consume one versioned @codexsun/cli archive.
|
|
17
|
+
- Assist references and active changelogs were missing. Added the CXApp documentation layout and release naming conventions.
|
|
18
|
+
- Text files used mixed line endings. Added shared LF check/fix commands, .gitattributes and .editorconfig.
|
|
19
|
+
- Package versions stay independent. Version tools update only the selected repository and preserve dependency ranges.
|
|
20
|
+
|
|
21
|
+
## Evidence and limits
|
|
22
|
+
|
|
23
|
+
Package checks include parsed source boundaries, version alignment, LF checks, TypeScript, lint and existing tests.
|
|
24
|
+
Build checks every declared compiled export and excludes test files.
|
|
25
|
+
The common tooling has fixture tests for versions, history, dry runs, LF exclusions, output validation, and GitHub review.
|
|
26
|
+
Starter checks cover consuming the archives. Verification results are recorded in the current changelog.
|
|
27
|
+
No remote push, registry publish, Docker, central identity, or live database deployment is part of this audit.
|
|
28
|
+
|
|
29
|
+
## Recorded checks
|
|
30
|
+
|
|
31
|
+
- Package boundaries, version alignment, LF checks, TypeScript, lint and compiled exports passed.
|
|
32
|
+
- npm audit --omit=dev reported zero known vulnerabilities for this package lockfile on 2026-10-02.
|
|
33
|
+
- GitHub and version-bump dry runs passed without mutations.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# UI Package Reference
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
React controls, application layouts, workspace primitives, and shared visual settings.
|
|
6
|
+
|
|
7
|
+
## Ownership
|
|
8
|
+
|
|
9
|
+
Own reusable controls, accessible interaction primitives, layout wrappers, styling tokens, dark mode surfaces, and design variants. Apps supply branding, navigation, user actions, workspaces, business forms, and permissions.
|
|
10
|
+
|
|
11
|
+
## Public exports
|
|
12
|
+
|
|
13
|
+
| Export | Responsibility |
|
|
14
|
+
| --------------------------------- | --------------------------------------------------------------------------------- |
|
|
15
|
+
| components/* | Radix-based controls, inputs, dialogs, tables, charts, loading states and editors |
|
|
16
|
+
| layouts/* | App, administration, authentication, public-web and role shell wrappers |
|
|
17
|
+
| blocks/* | Composable navigation and shell blocks |
|
|
18
|
+
| workspace, workspace/_, presets/_ | Workspace sections, actions, forms, tables, totals and presentation primitives |
|
|
19
|
+
| design-system | Shared design variants and browser settings |
|
|
20
|
+
| lib/* | Common React hooks and class-name helpers |
|
|
21
|
+
| styles.css | Tailwind styles, Geist fonts, print styles and design tokens |
|
|
22
|
+
|
|
23
|
+
## Runtime and build
|
|
24
|
+
|
|
25
|
+
Use ESM, Node.js >=26.5 and npm >=12.0.1.
|
|
26
|
+
TypeScript 6.0.3 builds JavaScript and declarations into dist/src.
|
|
27
|
+
The root package manifest exports compiled files.
|
|
28
|
+
npm pack runs prepack and rebuilds the release. Tests and local tools are excluded from runtime output.
|
|
29
|
+
|
|
30
|
+
## Integration
|
|
31
|
+
|
|
32
|
+
Use a React 19 frontend with a bundler such as Vite. Install React and React DOM in the app. Import @devxcrew/ui/styles.css. Include the installed package dist/src folder in Tailwind source scanning. Prefer subpath imports to keep feature dependencies out of simple pages.
|
|
33
|
+
|
|
34
|
+
## Dependencies
|
|
35
|
+
|
|
36
|
+
Runtime and peer requirements are declared in package.json.
|
|
37
|
+
@devxcrew/tools is a development dependency for build, boundaries, exports, versions, changelogs, GitHub review and LF checks.
|
|
38
|
+
The configured npm registry supplies the CLI development dependency.
|
|
39
|
+
React and React DOM are peer dependencies. Radix, Tailwind, fonts, charts, editors, and workspace libraries remain runtime dependencies.
|
|
40
|
+
|
|
41
|
+
## Limits
|
|
42
|
+
|
|
43
|
+
Compiled UI modules target frontend bundlers and contain extensionless internal imports. Direct Node.js execution and unbundled browser imports are not supported. The package has no unit tests yet. The starter provides browser coverage for API connectivity, theme controls, mobile layout, and failure recovery, not every exported control.
|
|
44
|
+
|
|
45
|
+
## Extension rules
|
|
46
|
+
|
|
47
|
+
Add only reusable capabilities with explicit public contracts.
|
|
48
|
+
Keep company-specific business concepts in app modules.
|
|
49
|
+
Apps choose their own release versions, secrets, database adapters and deployment schedules.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Project Inventory
|
|
2
|
+
|
|
3
|
+
- package.json: npm identity, runtime exports, dependency contracts and common tool scripts.
|
|
4
|
+
- package-lock.json: independent reproducible installation.
|
|
5
|
+
- src: package-owned TypeScript or React implementation.
|
|
6
|
+
- assist: agent reference, governance, release notes and audit record.
|
|
7
|
+
- .devxcrew-tools.json: package profile for the common tools.
|
|
8
|
+
- .gitattributes and .editorconfig: LF text policy and binary exceptions.
|
|
9
|
+
- dist/src: generated JavaScript, declarations and CSS.
|
|
10
|
+
- dist/releases: generated npm archives.
|
|
11
|
+
|
|
12
|
+
Build, boundary and release tool implementations live only in @devxcrew/tools.
|
|
13
|
+
This repository has its own local Git history. No remote is configured by this task.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Package Governance
|
|
2
|
+
|
|
3
|
+
## Repository
|
|
4
|
+
|
|
5
|
+
Use npm from this repository root. Keep one local dependency tree and one lockfile.
|
|
6
|
+
Put generated outputs under dist. Install shared dependencies only from the npm registry.
|
|
7
|
+
Use LF for text. Mark binary archives and fonts as binary in .gitattributes.
|
|
8
|
+
|
|
9
|
+
## Boundaries
|
|
10
|
+
|
|
11
|
+
Own reusable controls, accessible interaction primitives, layout wrappers, styling tokens, dark mode surfaces, and design variants. Apps supply branding, navigation, user actions, workspaces, business forms, and permissions.
|
|
12
|
+
|
|
13
|
+
Do not add product schemas, customer-specific workflows, invoice rules, or tenant provisioning here.
|
|
14
|
+
Use public package exports. Declare runtime and peer dependencies explicitly.
|
|
15
|
+
Do not import sibling private source or copy shared maintenance tools.
|
|
16
|
+
|
|
17
|
+
## Checks
|
|
18
|
+
|
|
19
|
+
Run npm run check, npm run format:check, and npm run pack.
|
|
20
|
+
Run meaningful regression tests for fixes. Keep tests out of published runtime files.
|
|
21
|
+
Preserve historical changelog entries. Keep current version, lockfile and changelog state aligned.
|
|
22
|
+
Run github:now with --dry-run for review. Publishing, commits, tags and pushes require authorization.
|
|
23
|
+
Docker remains deferred.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# GitHub repository
|
|
2
|
+
|
|
3
|
+
Source: https://github.com/devxcrew/ui.
|
|
4
|
+
|
|
5
|
+
This repository starts with fresh Git history from the current source.
|
|
6
|
+
Use the main branch. Keep versions independent.
|
|
7
|
+
The npm package is @devxcrew/ui.
|
|
8
|
+
Npm publishing and trusted publisher setup are deferred to the package phase.
|
|
9
|
+
Earlier published npm versions retain their original repository metadata.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Npm releases
|
|
2
|
+
|
|
3
|
+
Source: https://github.com/devxcrew/ui.
|
|
4
|
+
Package: @devxcrew/ui.
|
|
5
|
+
|
|
6
|
+
Publish tools first, then framework and UI, then platform, then CLI.
|
|
7
|
+
Apps consume pinned npm versions. Never use file or link dependencies.
|
|
8
|
+
Regenerate lockfiles with npm install after the required versions exist.
|
|
9
|
+
Run npm run check, npm run format:check, and npm run pack.
|
|
10
|
+
Previously published versions are immutable. Change the version before republishing changed source.
|
|
11
|
+
The CLI command changed to devxcrew-cli and needs a major release.
|
|
12
|
+
The tools command is devxcrew-tools. Profile files are .devxcrew-tools.json.
|
|
13
|
+
GitHub OIDC publishing must target the current devxcrew repository and its actual workflow file.
|
|
14
|
+
Configure trusted publishing during the release phase. Do not reuse the old CODEXSUN publishing trust.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Versioning and Releases
|
|
2
|
+
|
|
3
|
+
## Version policy
|
|
4
|
+
|
|
5
|
+
This repository versions independently. Do not change sibling package or app versions.
|
|
6
|
+
Use numeric semantic versions. Patch fixes behavior, minor adds compatible features, and major changes contracts.
|
|
7
|
+
Keep CXApp naming conventions: release tag v-<version>, changelog label v <version>, and commit subject #<patch> - <title>.
|
|
8
|
+
Tag names in Version State describe the intended release name. They do not prove a Git tag exists.
|
|
9
|
+
|
|
10
|
+
## Active changelog
|
|
11
|
+
|
|
12
|
+
Use assist/documentation/CHANGELOG.md.
|
|
13
|
+
Keep Current version, Release tag, and Changelog label in its Version State block.
|
|
14
|
+
Use concrete ## v-<version> sections and ### [v <version>] YYYY-MM-DD h:mm am - Title entries.
|
|
15
|
+
Use Asia/Kolkata timestamps and separate Database Changes from App Codebase Changes.
|
|
16
|
+
Keep historical entries unchanged. Append work under the current version until a bump is requested.
|
|
17
|
+
|
|
18
|
+
## Common commands
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm run version:show
|
|
22
|
+
npm run check:versions
|
|
23
|
+
npm run version:bump -- --dry-run --title "Release title"
|
|
24
|
+
npm run version:bump -- --title "Release title" --note "Describe changes."
|
|
25
|
+
npm run version:bump -- --release minor --title "Feature release"
|
|
26
|
+
npm run changelog:append -- --title "Progress" --note "Describe verified work."
|
|
27
|
+
npm run lines:check
|
|
28
|
+
npm run lines:fix
|
|
29
|
+
npm run github:now -- --dry-run
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Version bump defaults to patch. It updates this manifest, lockfile root versions and changelog only.
|
|
33
|
+
It does not change dependency ranges, sibling versions, create commits, or create tags.
|
|
34
|
+
Use --database-update Yes only when database work occurred. The default is No.
|
|
35
|
+
|
|
36
|
+
## GitHub helper
|
|
37
|
+
|
|
38
|
+
Run github:now in an interactive terminal after configuring a remote and upstream branch.
|
|
39
|
+
It shows the current changelog subject and working tree. It offers an optional patch bump.
|
|
40
|
+
It asks before fetching, staging, committing, and pushing.
|
|
41
|
+
It refuses a branch behind its upstream instead of auto-stashing or merging local changes.
|
|
42
|
+
First commit and first upstream configuration use ordinary Git commands.
|
|
43
|
+
Dry run is read-only and works before a remote or first commit exists.
|
|
44
|
+
|
|
45
|
+
## Release checks
|
|
46
|
+
|
|
47
|
+
Run npm run check, npm run format:check, and npm run pack.
|
|
48
|
+
Install the published npm version in consuming apps and run their checks before upgrading deployment versions.
|
|
49
|
+
Run npm run release:check before authorized publishing.
|
|
50
|
+
Set registry credentials for the @devxcrew scope. Run npm run release only when publishing is authorized.
|
|
51
|
+
|
|
52
|
+
## Tools updates
|
|
53
|
+
|
|
54
|
+
Publish an authorized tools version from D:\codexsun\shared\tools.
|
|
55
|
+
Install it with npm install --save-dev --save-exact @devxcrew/tools@<version>.
|
|
56
|
+
Commit the manifest and registry-generated lockfile together.
|
|
57
|
+
Never add a new copy of its source scripts to this repository.
|
|
58
|
+
Docker execution remains deferred.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type LucideIcon } from "lucide-react";
|
|
3
|
+
import { type SidemenuItem } from "./sub/sidemenu-section";
|
|
4
|
+
import { Sidebar } from "../../../components/sidebar";
|
|
5
|
+
type SidebarBrandOption = {
|
|
6
|
+
id: string;
|
|
7
|
+
logoDarkSrc?: string;
|
|
8
|
+
logoSrc?: string;
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
title: string;
|
|
11
|
+
};
|
|
12
|
+
export type SidebarBrand = {
|
|
13
|
+
href?: string;
|
|
14
|
+
logoAlt?: string;
|
|
15
|
+
logoDarkSrc?: string;
|
|
16
|
+
logoSrc?: string;
|
|
17
|
+
options?: SidebarBrandOption[];
|
|
18
|
+
optionsLabel?: string;
|
|
19
|
+
onOptionSelect?: (id: string) => void;
|
|
20
|
+
onSecondaryOptionSelect?: (id: string) => void;
|
|
21
|
+
selectedOptionId?: string;
|
|
22
|
+
selectedSecondaryOptionId?: string;
|
|
23
|
+
secondaryOptions?: SidebarBrandOption[];
|
|
24
|
+
secondaryOptionsLabel?: string;
|
|
25
|
+
subtitle: string;
|
|
26
|
+
title: string;
|
|
27
|
+
};
|
|
28
|
+
export type SidebarUser = {
|
|
29
|
+
email: string;
|
|
30
|
+
fallback: string;
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
export type SidebarUserMenuItem = {
|
|
34
|
+
icon: LucideIcon;
|
|
35
|
+
title: string;
|
|
36
|
+
url?: string;
|
|
37
|
+
};
|
|
38
|
+
type AppSidebarProps = React.ComponentProps<typeof Sidebar> & {
|
|
39
|
+
brand: SidebarBrand;
|
|
40
|
+
items: SidemenuItem[];
|
|
41
|
+
user: SidebarUser;
|
|
42
|
+
userMenuItems?: SidebarUserMenuItem[];
|
|
43
|
+
versionLabel?: string;
|
|
44
|
+
};
|
|
45
|
+
export declare function AppSidebar({ brand, className, items, user, userMenuItems, versionLabel, ...props }: AppSidebarProps): React.JSX.Element;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { BadgeCheckIcon, ChevronsUpDownIcon } from "lucide-react";
|
|
5
|
+
import { SidemenuSection } from "./sub/sidemenu-section";
|
|
6
|
+
import { Avatar, AvatarFallback } from "../../../components/avatar";
|
|
7
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "../../../components/dropdown-menu";
|
|
8
|
+
import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarRail } from "../../../components/sidebar";
|
|
9
|
+
const defaultUserMenuItems = [];
|
|
10
|
+
export function AppSidebar({ brand, className, items, user, userMenuItems = defaultUserMenuItems, versionLabel = "", ...props }) {
|
|
11
|
+
return (_jsxs(Sidebar, { collapsible: "icon", variant: "inset", className: className, ...props, children: [_jsx(SidebarHeader, { children: _jsx(SidebarBrandMenu, { brand: brand }) }), _jsx(SidebarContent, { children: _jsx(SidemenuSection, { items: items }) }), _jsxs(SidebarFooter, { className: "border-t", children: [_jsx("div", { className: "px-2 text-xs text-muted-foreground group-data-[collapsible=icon]:hidden", children: versionLabel }), _jsx(SidebarMenu, { children: _jsx(SidebarMenuItem, { children: _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(SidebarMenuButton, { size: "lg", className: "h-14", children: [_jsx(Avatar, { className: "size-9 border bg-background", children: _jsx(AvatarFallback, { children: user.fallback }) }), _jsxs("div", { className: "min-w-0 flex-1 text-left leading-tight group-data-[collapsible=icon]:hidden", children: [_jsx("div", { className: "truncate font-semibold", children: user.name }), _jsx("div", { className: "truncate text-xs text-muted-foreground", children: user.email })] }), _jsx(ChevronsUpDownIcon, { className: "ml-auto size-4 text-muted-foreground group-data-[collapsible=icon]:hidden" })] }) }), _jsxs(DropdownMenuContent, { align: "end", side: "right", className: "w-56 p-2", children: [_jsxs("div", { className: "flex items-center gap-3 p-2", children: [_jsx(Avatar, { className: "size-9 border bg-background", children: _jsx(AvatarFallback, { children: user.fallback }) }), _jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "truncate font-semibold", children: user.name }), _jsx("div", { className: "truncate text-xs text-muted-foreground", children: user.email })] })] }), _jsx(DropdownMenuSeparator, {}), userMenuItems.map((item, index) => (_jsxs(React.Fragment, { children: [index === userMenuItems.length - 1 ? _jsx(DropdownMenuSeparator, {}) : null, _jsx(DropdownMenuItem, { asChild: Boolean(item.url), children: item.url ? (_jsxs("a", { href: item.url, children: [_jsx(item.icon, {}), item.title] })) : (_jsxs(_Fragment, { children: [_jsx(item.icon, {}), item.title] })) })] }, item.title)))] })] }) }) })] }), _jsx(SidebarRail, {})] }));
|
|
12
|
+
}
|
|
13
|
+
function SidebarBrandMenu({ brand }) {
|
|
14
|
+
const options = brand.options ?? [];
|
|
15
|
+
const secondaryOptions = brand.secondaryOptions ?? [];
|
|
16
|
+
const active = options.find((option) => option.id === brand.selectedOptionId) ?? options[0];
|
|
17
|
+
const current = active ?? brand;
|
|
18
|
+
const trigger = (_jsxs(SidebarMenuButton, { size: "lg", tooltip: current.title, className: "h-14", children: [_jsx(BrandIdentity, { brand: current, fallback: brand }), options.length || secondaryOptions.length ? (_jsx(ChevronsUpDownIcon, { className: "ml-auto size-4 text-sidebar-foreground/60 group-data-[collapsible=icon]:hidden" })) : null] }));
|
|
19
|
+
return (_jsx(SidebarMenu, { children: _jsx(SidebarMenuItem, { children: options.length || secondaryOptions.length ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: trigger }), _jsxs(DropdownMenuContent, { align: "start", side: "right", className: "w-64 p-1", children: [brand.optionsLabel ? (_jsx("div", { className: "px-2 pb-1 pt-1.5 text-[0.68rem] font-semibold uppercase tracking-wide text-muted-foreground", children: brand.optionsLabel })) : null, options.map((option) => (_jsxs(DropdownMenuItem, { onSelect: () => brand.onOptionSelect?.(option.id), children: [_jsx(BrandLogo, { brand: option, fallback: brand, compact: true }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "truncate font-medium", children: option.title }), option.subtitle ? (_jsx("div", { className: "truncate text-xs text-muted-foreground", children: option.subtitle })) : null] }), option.id === brand.selectedOptionId ? (_jsx(BadgeCheckIcon, { className: "size-4 text-primary" })) : null] }, option.id))), options.length && secondaryOptions.length ? _jsx(DropdownMenuSeparator, {}) : null, brand.secondaryOptionsLabel ? (_jsx("div", { className: "px-2 pb-1 pt-1.5 text-[0.68rem] font-semibold uppercase tracking-wide text-muted-foreground", children: brand.secondaryOptionsLabel })) : null, secondaryOptions.map((option) => (_jsxs(DropdownMenuItem, { onSelect: () => brand.onSecondaryOptionSelect?.(option.id), children: [_jsxs("div", { className: "min-w-0 flex-1 px-1", children: [_jsx("div", { className: "truncate font-medium", children: option.title }), option.subtitle ? (_jsx("div", { className: "truncate text-xs text-muted-foreground", children: option.subtitle })) : null] }), option.id === brand.selectedSecondaryOptionId ? (_jsx(BadgeCheckIcon, { className: "size-4 text-primary" })) : null] }, option.id)))] })] })) : (_jsx("a", { href: brand.href ?? "/workspace", children: trigger })) }) }));
|
|
20
|
+
}
|
|
21
|
+
function BrandIdentity({ brand, fallback }) {
|
|
22
|
+
return (_jsxs(_Fragment, { children: [_jsx(BrandLogo, { brand: brand, fallback: fallback }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-none group-data-[collapsible=icon]:hidden", children: [_jsx("span", { className: "truncate font-semibold", children: brand.title }), _jsx("span", { className: "truncate text-xs text-muted-foreground", children: brand.subtitle ?? fallback.subtitle })] })] }));
|
|
23
|
+
}
|
|
24
|
+
function BrandLogo({ brand, compact = false, fallback }) {
|
|
25
|
+
const size = compact ? "size-7" : "size-8";
|
|
26
|
+
const imageSize = compact ? "size-4" : "size-5";
|
|
27
|
+
const lightSource = brand.logoSrc ?? fallback.logoSrc;
|
|
28
|
+
const darkSource = brand.logoDarkSrc ?? fallback.logoDarkSrc ?? lightSource;
|
|
29
|
+
return (_jsxs("div", { className: `flex aspect-square ${size} shrink-0 items-center justify-center overflow-hidden rounded-lg border bg-background`, children: [lightSource ? (_jsx("img", { alt: brand.logoAlt ?? fallback.logoAlt ?? brand.title, className: `${imageSize} dark:hidden`, src: lightSource })) : (_jsx("span", { className: "text-sm font-semibold dark:hidden", children: brand.title.slice(0, 1) })), darkSource ? (_jsx("img", { alt: brand.logoAlt ?? fallback.logoAlt ?? brand.title, className: `hidden ${imageSize} dark:block`, src: darkSource })) : (_jsx("span", { className: "hidden text-sm font-semibold dark:block", children: brand.title.slice(0, 1) }))] }));
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FolderIcon, MoreHorizontalIcon, ShareIcon } from "lucide-react";
|
|
3
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../../components/dropdown-menu";
|
|
4
|
+
import { SidebarGroup, SidebarGroupLabel, SidebarMenu, SidebarMenuAction, SidebarMenuButton, SidebarMenuItem, useSidebar } from "../../../components/sidebar";
|
|
5
|
+
export function NavDocuments({ items }) {
|
|
6
|
+
const { isMobile } = useSidebar();
|
|
7
|
+
return (_jsxs(SidebarGroup, { className: "group-data-[collapsible=icon]:hidden", children: [_jsx(SidebarGroupLabel, { children: "Documents" }), _jsxs(SidebarMenu, { children: [items.map((item) => (_jsxs(SidebarMenuItem, { children: [_jsx(SidebarMenuButton, { asChild: true, children: _jsxs("a", { href: item.url, children: [_jsx(item.icon, {}), _jsx("span", { children: item.name })] }) }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(SidebarMenuAction, { showOnHover: true, className: "rounded-sm data-[state=open]:bg-accent", children: [_jsx(MoreHorizontalIcon, {}), _jsx("span", { className: "sr-only", children: "More" })] }) }), _jsxs(DropdownMenuContent, { className: "w-24 rounded-lg", side: isMobile ? "bottom" : "right", align: isMobile ? "end" : "start", children: [_jsxs(DropdownMenuItem, { children: [_jsx(FolderIcon, {}), _jsx("span", { children: "Open" })] }), _jsxs(DropdownMenuItem, { children: [_jsx(ShareIcon, {}), _jsx("span", { children: "Share" })] })] })] })] }, item.name))), _jsx(SidebarMenuItem, { children: _jsxs(SidebarMenuButton, { className: "text-sidebar-foreground/70", children: [_jsx(MoreHorizontalIcon, { className: "text-sidebar-foreground/70" }), _jsx("span", { children: "More" })] }) })] })] }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { MailIcon, PlusCircleIcon } from "lucide-react";
|
|
4
|
+
import { Button } from "../../../components/button";
|
|
5
|
+
import { SidebarGroup, SidebarGroupContent, SidebarMenu, SidebarMenuButton, SidebarMenuItem } from "../../../components/sidebar";
|
|
6
|
+
export function NavMain({ items }) {
|
|
7
|
+
return (_jsx(SidebarGroup, { children: _jsxs(SidebarGroupContent, { className: "flex flex-col gap-2", children: [_jsx(SidebarMenu, { children: _jsxs(SidebarMenuItem, { className: "flex items-center gap-2", children: [_jsxs(SidebarMenuButton, { tooltip: "Quick Create", className: "min-w-8 bg-primary text-primary-foreground duration-200 ease-linear hover:bg-primary/90 hover:text-primary-foreground active:bg-primary/90 active:text-primary-foreground", children: [_jsx(PlusCircleIcon, {}), _jsx("span", { children: "Quick Create" })] }), _jsxs(Button, { size: "icon", className: "h-9 w-9 shrink-0 group-data-[collapsible=icon]:opacity-0", variant: "outline", children: [_jsx(MailIcon, {}), _jsx("span", { className: "sr-only", children: "Inbox" })] })] }) }), _jsx(SidebarMenu, { children: items.map((item) => (_jsx(SidebarMenuItem, { children: _jsx(SidebarMenuButton, { asChild: true, tooltip: item.title, children: _jsxs("a", { href: item.url, children: [item.icon && _jsx(item.icon, {}), _jsx("span", { children: item.title })] }) }) }, item.title))) })] }) }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { LucideIcon } from "lucide-react";
|
|
3
|
+
import { SidebarGroup } from "../../../components/sidebar";
|
|
4
|
+
export declare function NavSecondary({ items, ...props }: {
|
|
5
|
+
items: {
|
|
6
|
+
title: string;
|
|
7
|
+
url: string;
|
|
8
|
+
icon: LucideIcon;
|
|
9
|
+
}[];
|
|
10
|
+
} & React.ComponentPropsWithoutRef<typeof SidebarGroup>): React.JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SidebarGroup, SidebarGroupContent, SidebarMenu, SidebarMenuButton, SidebarMenuItem } from "../../../components/sidebar";
|
|
3
|
+
export function NavSecondary({ items, ...props }) {
|
|
4
|
+
return (_jsx(SidebarGroup, { ...props, children: _jsx(SidebarGroupContent, { children: _jsx(SidebarMenu, { children: items.map((item) => (_jsx(SidebarMenuItem, { children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs("a", { href: item.url, children: [_jsx(item.icon, {}), _jsx("span", { children: item.title })] }) }) }, item.title))) }) }) }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { BellIcon, LogOutIcon, MoreVerticalIcon, UserCircleIcon } from "lucide-react";
|
|
4
|
+
import { Avatar, AvatarFallback, AvatarImage } from "../../../components/avatar";
|
|
5
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "../../../components/dropdown-menu";
|
|
6
|
+
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar } from "../../../components/sidebar";
|
|
7
|
+
export function NavUser({ user }) {
|
|
8
|
+
const { isMobile } = useSidebar();
|
|
9
|
+
return (_jsx(SidebarMenu, { children: _jsx(SidebarMenuItem, { children: _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(SidebarMenuButton, { size: "lg", className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground", children: [_jsxs(Avatar, { className: "h-8 w-8 rounded-lg grayscale", children: [_jsx(AvatarImage, { src: user.avatar, alt: user.name }), _jsx(AvatarFallback, { className: "rounded-lg", children: "CN" })] }), _jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [_jsx("span", { className: "truncate font-medium", children: user.name }), _jsx("span", { className: "truncate text-xs text-muted-foreground", children: user.email })] }), _jsx(MoreVerticalIcon, { className: "ml-auto size-4" })] }) }), _jsxs(DropdownMenuContent, { className: "w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg", side: isMobile ? "bottom" : "right", align: "end", sideOffset: 4, children: [_jsx(DropdownMenuLabel, { className: "p-0 font-normal", children: _jsxs("div", { className: "flex items-center gap-2 px-1 py-1.5 text-left text-sm", children: [_jsxs(Avatar, { className: "h-8 w-8 rounded-lg", children: [_jsx(AvatarImage, { src: user.avatar, alt: user.name }), _jsx(AvatarFallback, { className: "rounded-lg", children: "CN" })] }), _jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [_jsx("span", { className: "truncate font-medium", children: user.name }), _jsx("span", { className: "truncate text-xs text-muted-foreground", children: user.email })] })] }) }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuGroup, { children: [_jsxs(DropdownMenuItem, { children: [_jsx(UserCircleIcon, {}), "Account"] }), _jsxs(DropdownMenuItem, { children: [_jsx(BellIcon, {}), "Notifications"] })] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { children: [_jsx(LogOutIcon, {}), "Log out"] })] })] }) }) }));
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SectionCards(): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TrendingDownIcon, TrendingUpIcon } from "lucide-react";
|
|
3
|
+
import { Badge } from "../../../components/badge";
|
|
4
|
+
import { Card, CardDescription, CardFooter, CardHeader, CardTitle } from "../../../components/card";
|
|
5
|
+
export function SectionCards() {
|
|
6
|
+
return (_jsxs("div", { className: "*:data-[slot=card]:shadow-xs @xl/main:grid-cols-2 @5xl/main:grid-cols-4 grid grid-cols-1 gap-4 px-4 *:data-[slot=card]:bg-gradient-to-t *:data-[slot=card]:from-primary/5 *:data-[slot=card]:to-card dark:*:data-[slot=card]:bg-card lg:px-6", children: [_jsxs(Card, { className: "@container/card", children: [_jsxs(CardHeader, { className: "relative", children: [_jsx(CardDescription, { children: "Total Revenue" }), _jsx(CardTitle, { className: "@[250px]/card:text-3xl text-2xl font-semibold tabular-nums", children: "$1,250.00" }), _jsx("div", { className: "absolute right-4 top-4", children: _jsxs(Badge, { variant: "outline", className: "flex gap-1 rounded-lg text-xs", children: [_jsx(TrendingUpIcon, { className: "size-3" }), "+12.5%"] }) })] }), _jsxs(CardFooter, { className: "flex-col items-start gap-1 text-sm", children: [_jsxs("div", { className: "line-clamp-1 flex gap-2 font-medium", children: ["Trending up this month ", _jsx(TrendingUpIcon, { className: "size-4" })] }), _jsx("div", { className: "text-muted-foreground", children: "Visitors for the last 6 months" })] })] }), _jsxs(Card, { className: "@container/card", children: [_jsxs(CardHeader, { className: "relative", children: [_jsx(CardDescription, { children: "New Customers" }), _jsx(CardTitle, { className: "@[250px]/card:text-3xl text-2xl font-semibold tabular-nums", children: "1,234" }), _jsx("div", { className: "absolute right-4 top-4", children: _jsxs(Badge, { variant: "outline", className: "flex gap-1 rounded-lg text-xs", children: [_jsx(TrendingDownIcon, { className: "size-3" }), "-20%"] }) })] }), _jsxs(CardFooter, { className: "flex-col items-start gap-1 text-sm", children: [_jsxs("div", { className: "line-clamp-1 flex gap-2 font-medium", children: ["Down 20% this period ", _jsx(TrendingDownIcon, { className: "size-4" })] }), _jsx("div", { className: "text-muted-foreground", children: "Acquisition needs attention" })] })] }), _jsxs(Card, { className: "@container/card", children: [_jsxs(CardHeader, { className: "relative", children: [_jsx(CardDescription, { children: "Active Accounts" }), _jsx(CardTitle, { className: "@[250px]/card:text-3xl text-2xl font-semibold tabular-nums", children: "45,678" }), _jsx("div", { className: "absolute right-4 top-4", children: _jsxs(Badge, { variant: "outline", className: "flex gap-1 rounded-lg text-xs", children: [_jsx(TrendingUpIcon, { className: "size-3" }), "+12.5%"] }) })] }), _jsxs(CardFooter, { className: "flex-col items-start gap-1 text-sm", children: [_jsxs("div", { className: "line-clamp-1 flex gap-2 font-medium", children: ["Strong user retention ", _jsx(TrendingUpIcon, { className: "size-4" })] }), _jsx("div", { className: "text-muted-foreground", children: "Engagement exceed targets" })] })] }), _jsxs(Card, { className: "@container/card", children: [_jsxs(CardHeader, { className: "relative", children: [_jsx(CardDescription, { children: "Growth Rate" }), _jsx(CardTitle, { className: "@[250px]/card:text-3xl text-2xl font-semibold tabular-nums", children: "4.5%" }), _jsx("div", { className: "absolute right-4 top-4", children: _jsxs(Badge, { variant: "outline", className: "flex gap-1 rounded-lg text-xs", children: [_jsx(TrendingUpIcon, { className: "size-3" }), "+4.5%"] }) })] }), _jsxs(CardFooter, { className: "flex-col items-start gap-1 text-sm", children: [_jsxs("div", { className: "line-clamp-1 flex gap-2 font-medium", children: ["Steady performance ", _jsx(TrendingUpIcon, { className: "size-4" })] }), _jsx("div", { className: "text-muted-foreground", children: "Meets growth projections" })] })] })] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type LucideIcon } from "lucide-react";
|
|
2
|
+
export type SidemenuSubItem = {
|
|
3
|
+
icon?: LucideIcon;
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
items?: SidemenuSubItem[];
|
|
6
|
+
onSelect?: () => void;
|
|
7
|
+
title: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
};
|
|
10
|
+
export type SidemenuItem = {
|
|
11
|
+
title: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
icon: LucideIcon;
|
|
14
|
+
isActive?: boolean;
|
|
15
|
+
onSelect?: () => void;
|
|
16
|
+
items?: SidemenuSubItem[];
|
|
17
|
+
};
|
|
18
|
+
export declare function SidemenuSection({ items, title }: {
|
|
19
|
+
items: SidemenuItem[];
|
|
20
|
+
title?: string;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../components/collapsible";
|
|
4
|
+
import { SidebarGroup, SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem } from "../../../../components/sidebar";
|
|
5
|
+
export function SidemenuSection({ items, title }) {
|
|
6
|
+
return (_jsxs(SidebarGroup, { children: [title ? _jsx(SidebarGroupLabel, { children: title }) : null, _jsx(SidebarMenu, { children: items.map((item) => {
|
|
7
|
+
const subItems = item.items ?? [];
|
|
8
|
+
const hasItems = subItems.length > 0;
|
|
9
|
+
return (_jsx(Collapsible, { asChild: true, defaultOpen: item.isActive ?? false, className: "group/collapsible", children: _jsxs(SidebarMenuItem, { children: [hasItems ? (_jsx(CollapsibleTrigger, { asChild: true, children: _jsxs(SidebarMenuButton, { tooltip: item.title, children: [_jsx(item.icon, {}), _jsx("span", { className: "group-data-[collapsible=icon]:hidden", children: item.title }), _jsx(SidemenuChevron, { className: "group-data-[collapsible=icon]:hidden group-data-[state=open]/collapsible:rotate-45" })] }) })) : (_jsx(SidebarMenuButton, { asChild: true, isActive: item.isActive ?? false, tooltip: item.title, children: item.onSelect ? (_jsxs("button", { type: "button", onClick: item.onSelect, children: [_jsx(item.icon, {}), _jsx("span", { className: "group-data-[collapsible=icon]:hidden", children: item.title })] })) : (_jsxs("a", { href: item.url ?? "#", children: [_jsx(item.icon, {}), _jsx("span", { className: "group-data-[collapsible=icon]:hidden", children: item.title })] })) })), hasItems ? (_jsx(CollapsibleContent, { children: _jsx(SidebarMenuSub, { children: subItems.map((subItem) => (_jsx(SidemenuSubItemNode, { item: subItem }, subItem.title))) }) })) : null] }) }, `${item.title}-${item.isActive ? "active" : "idle"}`));
|
|
10
|
+
}) })] }));
|
|
11
|
+
}
|
|
12
|
+
function SidemenuSubItemNode({ item }) {
|
|
13
|
+
const children = item.items ?? [];
|
|
14
|
+
const hasChildren = children.length > 0;
|
|
15
|
+
const childActive = children.some((child) => child.isActive || child.items?.some((nested) => nested.isActive));
|
|
16
|
+
const active = item.isActive ?? childActive;
|
|
17
|
+
const Icon = item.icon;
|
|
18
|
+
if (hasChildren) {
|
|
19
|
+
return (_jsx(SidebarMenuSubItem, { children: _jsx(Collapsible, { asChild: true, defaultOpen: active, className: "group/sub-collapsible", children: _jsxs("div", { children: [_jsx(CollapsibleTrigger, { asChild: true, children: _jsx(SidebarMenuSubButton, { asChild: true, isActive: active, children: _jsxs("button", { type: "button", children: [Icon ? _jsx(Icon, { className: "size-4 shrink-0" }) : null, _jsx("span", { children: item.title }), _jsx(SidemenuChevron, { className: "group-data-[state=open]/sub-collapsible:rotate-45" })] }) }) }), _jsx(CollapsibleContent, { children: _jsx(SidebarMenuSub, { className: "mx-2 mr-0 gap-0.5 py-0.5", children: children.map((child) => (_jsx(SidemenuSubItemNode, { item: child }, child.title))) }) })] }) }) }));
|
|
20
|
+
}
|
|
21
|
+
return (_jsx(SidebarMenuSubItem, { children: _jsx(SidebarMenuSubButton, { asChild: true, isActive: active, children: item.onSelect ? (_jsxs("button", { type: "button", onClick: item.onSelect, children: [Icon ? _jsx(Icon, { className: "size-4 shrink-0" }) : null, _jsx("span", { children: item.title })] })) : (_jsxs("a", { href: item.url ?? "#", children: [Icon ? _jsx(Icon, { className: "size-4 shrink-0" }) : null, _jsx("span", { children: item.title })] })) }) }));
|
|
22
|
+
}
|
|
23
|
+
function SidemenuChevron({ className = "" }) {
|
|
24
|
+
return (_jsx("span", { "aria-hidden": "true", className: `ml-auto size-2 shrink-0 rotate-[-45deg] border-b border-r border-muted-foreground transition-transform duration-200 ${className}` }));
|
|
25
|
+
}
|