sgh-navbar 0.1.4 → 0.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 +12 -224
- package/fesm2022/sgh-navbar.mjs +36 -189
- package/fesm2022/sgh-navbar.mjs.map +1 -1
- package/lib/sidenav/sublevel-menu.component.d.ts +0 -5
- package/lib/toolbar/sub-client-dialog/sub-client-dialog.component.d.ts +5 -29
- package/lib/toolbar/toolbar.component.d.ts +1 -20
- package/package.json +8 -39
package/README.md
CHANGED
|
@@ -22,29 +22,24 @@ A comprehensive Angular navigation library that provides a responsive sidebar na
|
|
|
22
22
|
## Features
|
|
23
23
|
|
|
24
24
|
✨ **Rich Feature Set**
|
|
25
|
-
- 🎨 **Multiple Themes** - Built-in theme switching
|
|
26
|
-
- 🔧 **Highly Configurable** - Extensive customization options
|
|
27
|
-
- 📱 **Responsive Design** - Mobile-
|
|
28
|
-
- 🧭 **Navigation Management** - Multi-level menu support with
|
|
29
|
-
- 👥 **Client Management** -
|
|
25
|
+
- 🎨 **Multiple Themes** - Built-in theme switching (Default, Light, Blue)
|
|
26
|
+
- 🔧 **Highly Configurable** - Extensive customization options
|
|
27
|
+
- 📱 **Responsive Design** - Mobile-friendly collapsible navigation
|
|
28
|
+
- 🧭 **Navigation Management** - Multi-level menu support with animations
|
|
29
|
+
- 👥 **Client Management** - Built-in client/sub-client selection
|
|
30
30
|
- 🍞 **Breadcrumbs** - Automatic breadcrumb generation
|
|
31
|
-
- 🔔 **Notifications** -
|
|
32
|
-
- 👤 **User Profile** -
|
|
33
|
-
- ⚡ **Performance Optimized** -
|
|
31
|
+
- 🔔 **Notifications** - Notification panel support
|
|
32
|
+
- 👤 **User Profile** - Profile dropdown integration
|
|
33
|
+
- ⚡ **Performance Optimized** - Lazy loading and memory leak prevention
|
|
34
34
|
- 🎯 **Type Safe** - Full TypeScript support
|
|
35
|
-
- ♿ **Accessible** - WCAG compliant with ARIA labels and keyboard navigation
|
|
36
|
-
- 🌓 **Dark Mode** - Automatic dark mode support
|
|
37
|
-
- 🎭 **Modern UI** - Glassmorphism effects with backdrop blur
|
|
38
|
-
- 🔍 **Enhanced Search** - Redesigned search bar with submit button
|
|
39
|
-
- 🎬 **Smooth Animations** - Professional transitions and micro-interactions
|
|
40
35
|
|
|
41
36
|
## Installation
|
|
42
37
|
|
|
43
38
|
### Prerequisites
|
|
44
39
|
|
|
45
|
-
- Angular
|
|
46
|
-
- Angular Material
|
|
47
|
-
- Angular CDK
|
|
40
|
+
- Angular 20.x
|
|
41
|
+
- Angular Material 20.x
|
|
42
|
+
- Angular CDK 20.x
|
|
48
43
|
- RxJS 7.x
|
|
49
44
|
|
|
50
45
|
### Install via npm
|
|
@@ -162,123 +157,6 @@ body {
|
|
|
162
157
|
}
|
|
163
158
|
```
|
|
164
159
|
|
|
165
|
-
## Modern Toolbar Redesign ✨
|
|
166
|
-
|
|
167
|
-
The toolbar component has been completely redesigned with a modern, professional look and enhanced user experience.
|
|
168
|
-
|
|
169
|
-
### 🎨 Design Improvements
|
|
170
|
-
|
|
171
|
-
#### **Layout Structure**
|
|
172
|
-
```
|
|
173
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
174
|
-
│ [Logo] [☰] [🔍 Search.................→] [🔔³] [⚙] [👤] │
|
|
175
|
-
│ ↑ ↑ ↑ ↑ ↑ ↑ │
|
|
176
|
-
│ Fixed Menu Flexible Center Notifications │
|
|
177
|
-
│ Left Toggle (grows to fill) Settings │
|
|
178
|
-
│ Profile │
|
|
179
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
#### **Key Visual Enhancements**
|
|
183
|
-
- **Glassmorphism**: Backdrop blur effects on toolbar and dropdowns
|
|
184
|
-
- **Modern Shadows**: Multiple shadow levels for depth hierarchy
|
|
185
|
-
- **Smooth Transitions**: 150ms fast and 300ms base transitions
|
|
186
|
-
- **Hover Effects**: Subtle lift animations with color changes
|
|
187
|
-
- **Active States**: Button press feedback with scale effects
|
|
188
|
-
- **Rounded Corners**: 12px-16px border radius for modern look
|
|
189
|
-
- **Notification Badge**: Animated pulsing badge with count display
|
|
190
|
-
- **Focus States**: Clear keyboard navigation indicators
|
|
191
|
-
|
|
192
|
-
#### **Component Redesign**
|
|
193
|
-
|
|
194
|
-
**🔤 Logo**
|
|
195
|
-
- Adaptive sizing: 42px (desktop), 36px (mobile), 48px (large screens)
|
|
196
|
-
- Hover scale effect with drop shadow
|
|
197
|
-
- Positioned at far left with proper constraints
|
|
198
|
-
|
|
199
|
-
**🍔 Menu Toggle**
|
|
200
|
-
- 42x42px button with 12px border radius
|
|
201
|
-
- Hover effects with background and icon scale
|
|
202
|
-
- Positioned next to logo for easy access
|
|
203
|
-
|
|
204
|
-
**🔍 Search Bar**
|
|
205
|
-
- Modern rounded design with icon-first layout
|
|
206
|
-
- Hover: Background change with border highlight
|
|
207
|
-
- Focus: Primary color border with glow effect
|
|
208
|
-
- Submit button with arrow icon and slide animation
|
|
209
|
-
- Adaptive sizing: 600px max (desktop), 400px (tablet), hidden (mobile)
|
|
210
|
-
|
|
211
|
-
**🔔 Notification Button**
|
|
212
|
-
- Animated notification badge showing count
|
|
213
|
-
- Pulsing animation to attract attention
|
|
214
|
-
- Modern dropdown with smooth slide-in animation
|
|
215
|
-
|
|
216
|
-
**⚙️ Settings Menu**
|
|
217
|
-
- Icons added to menu items for visual clarity
|
|
218
|
-
- Enhanced theme selector with custom radio buttons
|
|
219
|
-
- Improved client selector with search functionality
|
|
220
|
-
|
|
221
|
-
**👤 Profile Button**
|
|
222
|
-
- Larger icon for better visibility
|
|
223
|
-
- Redesigned dropdown card with modern styling
|
|
224
|
-
|
|
225
|
-
### 📱 Responsive Breakpoints
|
|
226
|
-
|
|
227
|
-
| Screen Size | Toolbar Height | Logo Size | Search | Special Features |
|
|
228
|
-
|-------------|---------------|-----------|---------|------------------|
|
|
229
|
-
| **Mobile** (≤768px) | 56px | 36px × 140px | Hidden | Tighter spacing, overlay mode |
|
|
230
|
-
| **Tablet** (≤1024px) | 64px | 42px × 200px | 400px max | Optimized spacing |
|
|
231
|
-
| **Desktop** (default) | 64px | 42px × 200px | 600px max | Full features |
|
|
232
|
-
| **Large** (≥1920px) | 64px | 48px × 240px | 700px max | Enhanced sizing |
|
|
233
|
-
|
|
234
|
-
### ♿ Accessibility Features
|
|
235
|
-
|
|
236
|
-
- **ARIA Labels**: All interactive elements have descriptive labels
|
|
237
|
-
- **Keyboard Navigation**: Full keyboard support with visible focus indicators
|
|
238
|
-
- **Screen Reader**: Semantic HTML with proper roles and labels
|
|
239
|
-
- **High Contrast**: Special styles for high contrast mode
|
|
240
|
-
- **Reduced Motion**: Respects user's motion preferences
|
|
241
|
-
- **Focus Management**: Proper focus trapping in dropdowns
|
|
242
|
-
|
|
243
|
-
### 🌓 Dark Mode Support
|
|
244
|
-
|
|
245
|
-
Automatic dark mode detection with proper color adjustments:
|
|
246
|
-
```scss
|
|
247
|
-
// Dark mode colors
|
|
248
|
-
--sgh-toolbar-bg: rgba(15, 23, 42, 0.95)
|
|
249
|
-
--sgh-surface-color: #1e293b
|
|
250
|
-
--sgh-text-primary: #f1f5f9
|
|
251
|
-
--sgh-border-color: #334155
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
### 🎬 Animations & Transitions
|
|
255
|
-
|
|
256
|
-
- **Dropdown Slide-In**: 250ms cubic-bezier animation
|
|
257
|
-
- **Button Hover**: 150ms fast transition
|
|
258
|
-
- **Badge Pulse**: 2s infinite subtle pulse
|
|
259
|
-
- **Icon Scale**: Smooth scale on hover
|
|
260
|
-
- **Submit Arrow**: Slide animation on hover
|
|
261
|
-
|
|
262
|
-
### 🎨 Customization with CSS Variables
|
|
263
|
-
|
|
264
|
-
```scss
|
|
265
|
-
// Primary customizable variables
|
|
266
|
-
--sgh-primary-color: #3b82f6
|
|
267
|
-
--sgh-toolbar-bg: rgba(255, 255, 255, 0.95)
|
|
268
|
-
--sgh-text-primary: #1e293b
|
|
269
|
-
--sgh-text-secondary: #64748b
|
|
270
|
-
--sgh-border-color: #e2e8f0
|
|
271
|
-
--sgh-hover-bg: rgba(59, 130, 246, 0.08)
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
### 🚀 Performance Optimizations
|
|
275
|
-
|
|
276
|
-
- Hardware-accelerated transforms
|
|
277
|
-
- Optimized animations using `transform` and `opacity`
|
|
278
|
-
- Efficient CSS with proper specificity
|
|
279
|
-
- Minimal repaints and reflows
|
|
280
|
-
- Debounced search input handling
|
|
281
|
-
|
|
282
160
|
## Components
|
|
283
161
|
|
|
284
162
|
### Main Component: `<lib-sgh-navbar>`
|
|
@@ -678,97 +556,7 @@ npm publish
|
|
|
678
556
|
| 18 | 0.0.52 | Angular 18 support |
|
|
679
557
|
| 19 | 0.0.54 | Angular 19 support, Major fixes and improvements |
|
|
680
558
|
| 19 | 0.0.57 | Enhanced layout behavior, responsive design improvements |
|
|
681
|
-
|
|
|
682
|
-
| 19 | 0.1.4 | **Security Hardening** - Comprehensive security fixes including XSS prevention, input validation, and type safety |
|
|
683
|
-
|
|
684
|
-
### Latest Changes (v0.1.4) - Security Hardening
|
|
685
|
-
|
|
686
|
-
#### **Critical Security Fixes**
|
|
687
|
-
- **XSS Prevention**: Implemented `DomSanitizer` with `SecurityContext.HTML` for all dynamic HTML content rendering
|
|
688
|
-
- **Theme Validation**: Added strict theme whitelist to prevent CSS injection attacks via malicious theme values
|
|
689
|
-
- **URL Validation**: Image sources are now validated against a whitelist of allowed protocols (`http:`, `https:`, `data:`)
|
|
690
|
-
|
|
691
|
-
#### **Input Validation**
|
|
692
|
-
- **Dialog Data Validation**: Sub-client dialog now validates all input data with proper type checking
|
|
693
|
-
- **Null Safety**: Added comprehensive null checks throughout components to prevent runtime errors
|
|
694
|
-
- **Type-Safe Interfaces**: Replaced `any` types with proper TypeScript interfaces for better compile-time safety
|
|
695
|
-
|
|
696
|
-
#### **Code Quality Improvements**
|
|
697
|
-
- **Strict Equality**: Changed all loose equality checks (`==`) to strict equality (`===`)
|
|
698
|
-
- **Development Logging**: Console statements wrapped in `ngDevMode` checks for production builds
|
|
699
|
-
- **Input Sanitization**: All user-provided data is sanitized before rendering or processing
|
|
700
|
-
|
|
701
|
-
#### **Security Best Practices**
|
|
702
|
-
- Implemented defense-in-depth strategy with multiple validation layers
|
|
703
|
-
- Added proper error handling for malformed input data
|
|
704
|
-
- Enhanced type safety to catch potential issues at compile time
|
|
705
|
-
|
|
706
|
-
### Previous Changes (v0.0.58) - Modern Toolbar Redesign
|
|
707
|
-
|
|
708
|
-
#### **Complete Toolbar Overhaul**
|
|
709
|
-
- ✅ **Modern UI Design**: Complete redesign with glassmorphism and modern aesthetics
|
|
710
|
-
- ✅ **Enhanced Layout**: Logo at far left, hamburger menu next to logo, responsive search bar, action buttons on right
|
|
711
|
-
- ✅ **Semantic HTML**: Changed to `<header>` tag with proper ARIA roles and labels
|
|
712
|
-
- ✅ **Improved Search**: New search bar design with icon-first layout and submit button
|
|
713
|
-
- ✅ **Notification Badge**: Animated badge showing notification count with pulse effect
|
|
714
|
-
- ✅ **Better Icons**: Updated FontAwesome icons (fa-cog, fa-user-circle) for better clarity
|
|
715
|
-
|
|
716
|
-
#### **Visual Enhancements**
|
|
717
|
-
- ✅ **Glassmorphism**: Backdrop blur effects on toolbar and all dropdowns
|
|
718
|
-
- ✅ **Modern Shadows**: 4-level shadow system (sm, md, lg, xl) for proper depth
|
|
719
|
-
- ✅ **Smooth Animations**: Professional transitions (150ms fast, 300ms base)
|
|
720
|
-
- ✅ **Hover Effects**: Subtle lift animations with color changes on all interactive elements
|
|
721
|
-
- ✅ **Active States**: Button press feedback with scale effects
|
|
722
|
-
- ✅ **Rounded Corners**: Consistent 12-16px border radius throughout
|
|
723
|
-
- ✅ **Focus States**: Clear keyboard navigation indicators for accessibility
|
|
724
|
-
|
|
725
|
-
#### **Enhanced Components**
|
|
726
|
-
- ✅ **Settings Menu**: Added icons to menu items, modern theme selector with custom radio buttons
|
|
727
|
-
- ✅ **Client Menu**: Enhanced with search icon, check icon for selected items, "no results" state
|
|
728
|
-
- ✅ **Notification List**: Redesigned with modern card styling and smooth animations
|
|
729
|
-
- ✅ **Profile Dropdown**: New card-based design with proper spacing
|
|
730
|
-
|
|
731
|
-
#### **Responsive Design**
|
|
732
|
-
- ✅ **Mobile (≤768px)**: 56px height, 36px logo, hidden search, tighter spacing
|
|
733
|
-
- ✅ **Tablet (≤1024px)**: Optimized spacing with 400px search max-width
|
|
734
|
-
- ✅ **Desktop**: Full features with 600px search max-width
|
|
735
|
-
- ✅ **Large Screens (≥1920px)**: Enhanced sizing with 700px search and 48px logo
|
|
736
|
-
|
|
737
|
-
#### **Accessibility Improvements**
|
|
738
|
-
- ✅ **ARIA Labels**: Complete aria-label coverage on all buttons and interactive elements
|
|
739
|
-
- ✅ **Keyboard Navigation**: Full keyboard support with visible focus indicators
|
|
740
|
-
- ✅ **Screen Readers**: Proper semantic HTML with roles and labels
|
|
741
|
-
- ✅ **High Contrast Mode**: Special styling for high contrast display
|
|
742
|
-
- ✅ **Reduced Motion**: Respects `prefers-reduced-motion` user preference
|
|
743
|
-
- ✅ **Tooltips**: Title attributes on all action buttons
|
|
744
|
-
|
|
745
|
-
#### **Performance & Technical**
|
|
746
|
-
- ✅ **CSS Variables**: Complete design system with customizable CSS custom properties
|
|
747
|
-
- ✅ **Hardware Acceleration**: Optimized animations using transform and opacity
|
|
748
|
-
- ✅ **Efficient CSS**: Proper specificity and minimal repaints
|
|
749
|
-
- ✅ **Dark Mode**: Automatic dark mode detection with proper color adjustments
|
|
750
|
-
- ✅ **Print Styles**: Toolbar hidden in print mode
|
|
751
|
-
- ✅ **Cross-browser**: Fallbacks for backdrop-filter and other modern CSS
|
|
752
|
-
|
|
753
|
-
#### **Code Quality**
|
|
754
|
-
- ✅ **Better Structure**: Organized SCSS with clear sections and comments
|
|
755
|
-
- ✅ **Maintainability**: Variables-based design system for easy customization
|
|
756
|
-
- ✅ **Documentation**: Comprehensive inline comments explaining each section
|
|
757
|
-
- ✅ **Best Practices**: Following Angular and SCSS best practices
|
|
758
|
-
|
|
759
|
-
### Previous Changes (v0.0.55-57)
|
|
760
|
-
- ✅ Fixed notification component typo
|
|
761
|
-
- ✅ Added proper TypeScript types throughout
|
|
762
|
-
- ✅ Updated component selectors to use sgh- prefix
|
|
763
|
-
- ✅ Extracted hardcoded configurations
|
|
764
|
-
- ✅ Added proper error handling and null checks
|
|
765
|
-
- ✅ Improved performance and memory management
|
|
766
|
-
- ✅ Added comprehensive documentation
|
|
767
|
-
- ✅ **Enhanced Layout Behavior**: Content area now properly moves right and adjusts width when sidebar is open
|
|
768
|
-
- ✅ **Responsive Design**: Smart layout adjustments for desktop (content shifts), tablet (content shifts), and mobile (overlay mode)
|
|
769
|
-
- ✅ **Smooth Animations**: Added smooth transitions for layout changes and content positioning
|
|
770
|
-
- ✅ **Visual Enhancements**: Added subtle shadows and overlay effects for better depth perception
|
|
771
|
-
- ✅ **Fixed Toggle Logic**: Resolved double-click toggle issue - sidebar now toggles correctly with single click
|
|
559
|
+
| 20 | 0.2.00 | Angular 20 support |
|
|
772
560
|
|
|
773
561
|
## Browser Support
|
|
774
562
|
|