@flusys/ng-layout 1.1.0-beta → 2.0.0-rc.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 CHANGED
@@ -87,17 +87,21 @@ Recursive menu item component using attribute selector `[app-menuitem]`.
87
87
 
88
88
  #### AppFooter
89
89
 
90
- Displays company name (from `LAYOUT_AUTH_STATE`) or app name fallback.
90
+ Displays product branding information from `LayoutService`:
91
+ - **appName** - Application name from `APP_CONFIG` or default
92
+ - **authorName** - Author/company name with link
93
+ - **authorUrl** - Link to author website
91
94
 
92
95
  #### AppProfile
93
96
 
94
97
  User profile dropdown in topbar.
95
98
 
96
99
  **Features:**
97
- - User info display (picture, name, email)
100
+ - User info display (picture, name, email) with text truncation for long values
98
101
  - Profile route link
99
102
  - Copy SignUp Link button (generates link with company slug)
100
103
  - Logout button with toast feedback
104
+ - Responsive dropdown width (`w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[280px] max-w-[320px]`)
101
105
  - Uses `LAYOUT_AUTH_API` and `LAYOUT_AUTH_STATE` tokens (optional injection)
102
106
 
103
107
  #### AppCompanyBranchSelector
@@ -128,11 +132,12 @@ Company and branch switcher in topbar. Shown when company feature is enabled.
128
132
  App launcher grid in topbar for quick access to related applications.
129
133
 
130
134
  **Features:**
131
- - 3-column grid of app icons with names
135
+ - Responsive grid: 2 columns on mobile, 3 columns on desktop (`grid-cols-2 sm:grid-cols-3`)
132
136
  - External links (open in new tabs)
133
137
  - Icon support: PrimeNG, Material, or image URLs
134
138
  - Permission filtering via `permissionLogic`
135
139
  - Only visible when `layoutService.hasApps()` is true
140
+ - App names truncated to prevent overflow
136
141
 
137
142
  **Configuration:**
138
143
  ```typescript
@@ -198,6 +203,8 @@ export class AppComponent {
198
203
  | `userProfile` | `Signal<UserProfile \| null>` | Current user display data |
199
204
  | `companyProfile` | `Signal<CompanyProfile \| null>` | Current company display data |
200
205
  | `appName` | `Signal<string>` | App name for fallback display |
206
+ | `authorName` | `Signal<string>` | Author/company name for footer |
207
+ | `authorUrl` | `Signal<string>` | Author website URL for footer |
201
208
  | `menu` | `Computed<IMenuItem[]>` | Permission-filtered menu items |
202
209
  | `apps` | `Computed<ILauncherApp[]>` | Permission-filtered launcher apps |
203
210
 
@@ -548,11 +555,59 @@ export class AppComponent implements OnInit {
548
555
  - Theme preferences persist automatically to localStorage
549
556
  - Test both light and dark themes for contrast
550
557
 
558
+ **Dark Mode CSS Variables:**
559
+ All components use PrimeNG CSS variables for automatic dark mode support:
560
+ ```css
561
+ /* Backgrounds */
562
+ background-color: var(--surface-overlay); /* Dropdown panels */
563
+ bg-emphasis /* Hover states */
564
+
565
+ /* Text */
566
+ text-color /* Primary text */
567
+ text-muted-color /* Secondary text */
568
+
569
+ /* Borders */
570
+ border-surface /* Standard borders */
571
+
572
+ /* Primary colors */
573
+ bg-primary /* Primary backgrounds */
574
+ text-primary-contrast /* Text on primary */
575
+ ```
576
+
551
577
  ### Responsive Design
552
578
  - Use Tailwind for responsive utilities
553
579
  - Layout automatically handles responsive behavior (static → overlay on mobile)
554
580
  - Menu closes on navigation and outside clicks
555
581
 
582
+ **Dropdown Panel Pattern:**
583
+ ```css
584
+ /* Full width on mobile, auto-width on desktop with min/max constraints */
585
+ class="w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[280px] max-w-[320px]"
586
+ ```
587
+
588
+ **Component Responsive Widths:**
589
+ | Component | Pattern |
590
+ |-----------|---------|
591
+ | `AppConfigurator` | `w-[calc(100vw-2rem)] sm:w-72 max-w-72` |
592
+ | `AppProfile` | `w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[280px] max-w-[320px]` |
593
+ | `AppCompanyBranchSelector` | `w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[300px] max-w-[360px]` |
594
+ | `AppLauncher` | `w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[280px] max-w-[320px]` |
595
+ | `AppFloatingConfigurator` | Position: `top-4 md:top-8 right-2 md:right-8` |
596
+
597
+ **Grid Responsiveness:**
598
+ ```css
599
+ /* 2 columns mobile, 3 columns desktop */
600
+ class="grid grid-cols-2 sm:grid-cols-3 gap-2"
601
+ ```
602
+
603
+ **Text Truncation:**
604
+ ```html
605
+ <!-- Prevent overflow on long names/emails -->
606
+ <div class="flex flex-col min-w-0 flex-1">
607
+ <span class="truncate">{{ userName() }}</span>
608
+ </div>
609
+ ```
610
+
556
611
  ## Common Issues
557
612
 
558
613
  ### Menu Not Showing
@@ -653,5 +708,5 @@ Layout automatically handles responsive behavior. Ensure you're using the `AppLa
653
708
 
654
709
  ---
655
710
 
656
- **Last Updated:** 2026-02-16
711
+ **Last Updated:** 2026-02-21
657
712
  **Angular Version:** 21