@nubitio/admin 1.1.1 → 1.2.0
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 +34 -0
- package/dist/index.cjs +272 -152
- package/dist/index.d.cts +69 -144
- package/dist/index.d.mts +70 -145
- package/dist/index.mjs +272 -153
- package/dist/style.css +167 -4
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -45,6 +45,40 @@ export function App() {
|
|
|
45
45
|
|
|
46
46
|
## Exports
|
|
47
47
|
|
|
48
|
+
### Nubit workspace layout (opt-in)
|
|
49
|
+
|
|
50
|
+
The existing layout remains the default. `variant="workspace"` places the sidebar
|
|
51
|
+
alongside the header on large screens and retains the overlay menu on smaller
|
|
52
|
+
screens. Application-specific search and company/branch selection stay outside
|
|
53
|
+
the library:
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
<AdminShell
|
|
57
|
+
variant="workspace"
|
|
58
|
+
title="Sales"
|
|
59
|
+
menuItems={menu}
|
|
60
|
+
brand={<CompanyLogo />}
|
|
61
|
+
headerContent={<WorkspaceSearch />}
|
|
62
|
+
sidebarContext={<CompanyBranchPicker />}
|
|
63
|
+
bottomNavigation={<AdminBottomNavigation items={mobileDestinations} />}
|
|
64
|
+
>
|
|
65
|
+
{children}
|
|
66
|
+
</AdminShell>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`brand` and `sidebarContext` are hidden in compact mode. The bottom-navigation
|
|
70
|
+
slot renders only on extra-small screens, reserves its own space (including the
|
|
71
|
+
device safe area), and does not cover the main content. `AdminBottomNavigation`
|
|
72
|
+
uses router links and marks the longest matching destination with `aria-current`.
|
|
73
|
+
Pass only authorized destinations. Its `label` prop names the navigation landmark.
|
|
74
|
+
|
|
75
|
+
All slots and `variant` are also available through `createNubitApp({ shell: … })`.
|
|
76
|
+
Set `visualStyle: 'nubit'` to opt into the Figma token foundation when using the
|
|
77
|
+
app factory; see the UI package README for font setup.
|
|
78
|
+
|
|
79
|
+
Preview in the demo: `/dashboard?visualStyle=nubit`. Search navigates between demo
|
|
80
|
+
pages; the context label is illustrative, not an ERP company selector.
|
|
81
|
+
|
|
48
82
|
- `AdminShell` — full layout: sidebar + header + content area
|
|
49
83
|
- `AdminHeader` — standalone header with action slots
|
|
50
84
|
- `AdminSidebarMenu` — standalone sidebar menu
|