@starasia/admin 14.55.1 → 14.57.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.
@@ -21,12 +21,14 @@ export interface NavRailProps {
21
21
  onExpandPanel: () => void;
22
22
  /** @default true */
23
23
  showLabels?: boolean;
24
+ /** Tema rail — diteruskan dari `AppLayout` `sidebarTheme`. */
25
+ theme?: "light" | "dark";
24
26
  }
25
27
  /**
26
28
  * Rail navigasi desktop — kolom ikon di kiri panel sidebar. Dirakit oleh
27
29
  * `AppLayout` saat prop `rail` diisi; consumer tidak merender ini sendiri.
28
30
  */
29
- export declare function NavRail({ items, bottomItems, activeKey, onSelect, onAction, logo, panelCollapsed, onExpandPanel, showLabels, }: NavRailProps): React.JSX.Element;
31
+ export declare function NavRail({ items, bottomItems, activeKey, onSelect, onAction, logo, panelCollapsed, onExpandPanel, showLabels, theme, }: NavRailProps): React.JSX.Element;
30
32
  export interface MobileRailTabsProps {
31
33
  items: SidebarRailItem[];
32
34
  activeKey: string;
@@ -89,7 +89,23 @@ interface AppLayoutProps {
89
89
  * drawer. Tanpa prop ini layout sama persis dengan sebelumnya.
90
90
  */
91
91
  rail?: SidebarRailConfig;
92
+ /**
93
+ * Tema panel sidebar (+ rail & footer-nya), terlepas dari tema halaman.
94
+ * `"dark"` memasang `data-theme="dark"` di elemen sidebar, jadi SEMUA token
95
+ * di dalamnya (teks, ikon, border, hover, menu aktif, input pencarian) ikut
96
+ * versi gelap — mis. sidebar gelap di atas konten terang. Dropdown/menu yang
97
+ * di-portal ke `document.body` tetap mengikuti tema halaman.
98
+ *
99
+ * Warna latar sidebar diatur token `--sa-app-sidebar-bg` (default
100
+ * `--sa-background-primary-inverse` dari tema yang berlaku), mis.
101
+ * `:root { --sa-app-sidebar-bg: #111820; }`.
102
+ *
103
+ * Tidak diisi → sidebar mengikuti tema halaman (perilaku lama).
104
+ */
105
+ sidebarTheme?: SidebarTheme;
92
106
  }
107
+ /** Tema panel sidebar `AppLayout` — lihat prop `sidebarTheme`. */
108
+ export type SidebarTheme = "light" | "dark";
93
109
  /**
94
110
  * AppLayout - Main application layout component based on workspace pattern
95
111
  * Features:
@@ -103,5 +119,5 @@ interface AppLayoutProps {
103
119
  * - Embed mode for iframes
104
120
  * - Header actions slot for caller-composed controls (e.g. ModuleSwitcher)
105
121
  */
106
- export declare function AppLayout({ children, headerLeftSlot, profile, isLoadingProfile, onLogout, isLoggingOut, loadingComponent, sidebarHeaderContent, headerActions, profileRole, profileMenuButtons, profileMenuItems, logoutButton, resizableSidebar, rail, }: AppLayoutProps): React.JSX.Element;
122
+ export declare function AppLayout({ children, headerLeftSlot, profile, isLoadingProfile, onLogout, isLoggingOut, loadingComponent, sidebarHeaderContent, headerActions, profileRole, profileMenuButtons, profileMenuItems, logoutButton, resizableSidebar, rail, sidebarTheme, }: AppLayoutProps): React.JSX.Element;
107
123
  export {};
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Token permukaan sidebar `AppLayout` — bisa di-set app di CSS tanpa layer, mis.
3
+ *
4
+ * :root {
5
+ * --sa-app-sidebar-bg: #1c2627;
6
+ * --sa-app-sidebar-active-bg: #c8102e;
7
+ * --sa-app-sidebar-active-fg: #ffffff;
8
+ * }
9
+ *
10
+ * Fallback = tampilan bawaan, jadi tanpa token tidak ada yang berubah.
11
+ */
12
+ /** Latar panel sidebar, footer, & rail. */
13
+ export declare const SIDEBAR_BG = "var(--sa-app-sidebar-bg, var(--sa-background-primary-inverse))";
14
+ /**
15
+ * Item navigasi AKTIF di sidebar & rail (menu induk, sub-menu, tombol rail, tab rail
16
+ * mobile). Dipasang inline hanya saat aktif; item aktif juga diberi `data-active`.
17
+ * Fallback = nilai lama (`bg="white"` → `--sa-background-primary`, teks primary,
18
+ * border subtle, tanpa bayangan).
19
+ */
20
+ export declare const SIDEBAR_ACTIVE_BG = "var(--sa-app-sidebar-active-bg, var(--sa-background-primary, #ffffff))";
21
+ export declare const SIDEBAR_ACTIVE_FG = "var(--sa-app-sidebar-active-fg, var(--sa-text-primary, #292a2e))";
22
+ export declare const SIDEBAR_ACTIVE_BORDER = "var(--sa-app-sidebar-active-border, var(--sa-border-subtle, #0b120e24))";
23
+ export declare const SIDEBAR_ACTIVE_SHADOW = "var(--sa-app-sidebar-active-shadow, none)";