@lesterarte/sefin-ui 0.0.31 → 0.0.34
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.
|
@@ -6094,7 +6094,7 @@ class SidebarComponent {
|
|
|
6094
6094
|
/** Navigation items array */
|
|
6095
6095
|
navItems = [];
|
|
6096
6096
|
/** Mobile mode flag */
|
|
6097
|
-
isMobile =
|
|
6097
|
+
isMobile = null;
|
|
6098
6098
|
/** Sidebar open state (for mobile) */
|
|
6099
6099
|
isOpen = false;
|
|
6100
6100
|
/** Sidebar collapsed state (for desktop) */
|
|
@@ -6111,8 +6111,21 @@ class SidebarComponent {
|
|
|
6111
6111
|
showFooter = true;
|
|
6112
6112
|
/** Toggle collapse event */
|
|
6113
6113
|
toggleCollapse = new EventEmitter();
|
|
6114
|
+
/** Toggle open event (for mobile) */
|
|
6115
|
+
toggleOpen = new EventEmitter();
|
|
6116
|
+
/** Close event (for mobile) */
|
|
6117
|
+
close = new EventEmitter();
|
|
6114
6118
|
currentRoute = '';
|
|
6115
6119
|
routerSubscription;
|
|
6120
|
+
mediaQueryHandler;
|
|
6121
|
+
mediaQuery;
|
|
6122
|
+
_autoDetectedMobile = false;
|
|
6123
|
+
// Getter that combines explicit input with auto-detected value
|
|
6124
|
+
get effectiveIsMobile() {
|
|
6125
|
+
// If parent explicitly sets isMobile (not null), use that value
|
|
6126
|
+
// Otherwise, use auto-detected value
|
|
6127
|
+
return this.isMobile !== null ? this.isMobile : this._autoDetectedMobile;
|
|
6128
|
+
}
|
|
6116
6129
|
primaryColor = '#55C3D8'; // Color primario de SEFIN
|
|
6117
6130
|
textColor = '#383838'; // Color de texto por defecto
|
|
6118
6131
|
constructor(router, cdr, sanitizer) {
|
|
@@ -6120,6 +6133,15 @@ class SidebarComponent {
|
|
|
6120
6133
|
this.cdr = cdr;
|
|
6121
6134
|
this.sanitizer = sanitizer;
|
|
6122
6135
|
}
|
|
6136
|
+
ngOnChanges(changes) {
|
|
6137
|
+
// Initialize auto-detection if isMobile is not explicitly set
|
|
6138
|
+
if (changes['isMobile'] && this.isMobile === null && typeof window !== 'undefined' && window.matchMedia) {
|
|
6139
|
+
if (!this.mediaQuery) {
|
|
6140
|
+
this.mediaQuery = window.matchMedia('(max-width: 768px)');
|
|
6141
|
+
this._autoDetectedMobile = this.mediaQuery.matches;
|
|
6142
|
+
}
|
|
6143
|
+
}
|
|
6144
|
+
}
|
|
6123
6145
|
ngOnInit() {
|
|
6124
6146
|
// Track current route for active state
|
|
6125
6147
|
this.routerSubscription = this.router.events
|
|
@@ -6129,18 +6151,60 @@ class SidebarComponent {
|
|
|
6129
6151
|
this.currentRoute = event.urlAfterRedirects;
|
|
6130
6152
|
// Auto-expand parent items if child is active
|
|
6131
6153
|
this.updateExpandedStates();
|
|
6154
|
+
// Close sidebar on mobile when navigating
|
|
6155
|
+
if (this.effectiveIsMobile && this.isOpen) {
|
|
6156
|
+
this.handleClose();
|
|
6157
|
+
}
|
|
6132
6158
|
this.cdr.markForCheck();
|
|
6133
6159
|
}
|
|
6134
6160
|
});
|
|
6135
6161
|
// Set initial route
|
|
6136
6162
|
this.currentRoute = this.router.url;
|
|
6137
6163
|
this.updateExpandedStates();
|
|
6164
|
+
// Detect screen size changes (only if isMobile is not explicitly set by parent)
|
|
6165
|
+
if (typeof window !== 'undefined' && window.matchMedia && this.isMobile === null) {
|
|
6166
|
+
if (!this.mediaQuery) {
|
|
6167
|
+
this.mediaQuery = window.matchMedia('(max-width: 768px)');
|
|
6168
|
+
this._autoDetectedMobile = this.mediaQuery.matches;
|
|
6169
|
+
}
|
|
6170
|
+
// Listen to media query changes (modern approach)
|
|
6171
|
+
if (this.mediaQuery.addEventListener && !this.mediaQueryHandler) {
|
|
6172
|
+
this.mediaQueryHandler = (e) => {
|
|
6173
|
+
this._autoDetectedMobile = e.matches;
|
|
6174
|
+
// Close sidebar when switching to desktop
|
|
6175
|
+
if (!e.matches && this.isOpen) {
|
|
6176
|
+
this.handleClose();
|
|
6177
|
+
}
|
|
6178
|
+
this.cdr.markForCheck();
|
|
6179
|
+
};
|
|
6180
|
+
this.mediaQuery.addEventListener('change', this.mediaQueryHandler);
|
|
6181
|
+
}
|
|
6182
|
+
else if (this.mediaQuery.addListener && !this.mediaQueryHandler) {
|
|
6183
|
+
// Fallback for older browsers
|
|
6184
|
+
this.mediaQueryHandler = (e) => {
|
|
6185
|
+
this._autoDetectedMobile = e.matches;
|
|
6186
|
+
if (!e.matches && this.isOpen) {
|
|
6187
|
+
this.handleClose();
|
|
6188
|
+
}
|
|
6189
|
+
this.cdr.markForCheck();
|
|
6190
|
+
};
|
|
6191
|
+
this.mediaQuery.addListener(this.mediaQueryHandler);
|
|
6192
|
+
}
|
|
6193
|
+
}
|
|
6138
6194
|
this.cdr.markForCheck();
|
|
6139
6195
|
}
|
|
6140
6196
|
ngOnDestroy() {
|
|
6141
6197
|
if (this.routerSubscription) {
|
|
6142
6198
|
this.routerSubscription.unsubscribe();
|
|
6143
6199
|
}
|
|
6200
|
+
if (this.mediaQuery && this.mediaQueryHandler) {
|
|
6201
|
+
if (this.mediaQuery.removeEventListener) {
|
|
6202
|
+
this.mediaQuery.removeEventListener('change', this.mediaQueryHandler);
|
|
6203
|
+
}
|
|
6204
|
+
else if (this.mediaQuery.removeListener) {
|
|
6205
|
+
this.mediaQuery.removeListener(this.mediaQueryHandler);
|
|
6206
|
+
}
|
|
6207
|
+
}
|
|
6144
6208
|
}
|
|
6145
6209
|
updateExpandedStates() {
|
|
6146
6210
|
this.navItems.forEach((item) => {
|
|
@@ -6186,6 +6250,23 @@ class SidebarComponent {
|
|
|
6186
6250
|
handleToggleCollapse() {
|
|
6187
6251
|
this.toggleCollapse.emit();
|
|
6188
6252
|
}
|
|
6253
|
+
handleToggleOpen() {
|
|
6254
|
+
this.toggleOpen.emit();
|
|
6255
|
+
}
|
|
6256
|
+
handleClose() {
|
|
6257
|
+
this.close.emit();
|
|
6258
|
+
}
|
|
6259
|
+
handleOverlayClick() {
|
|
6260
|
+
if (this.effectiveIsMobile && this.isOpen) {
|
|
6261
|
+
this.handleClose();
|
|
6262
|
+
}
|
|
6263
|
+
}
|
|
6264
|
+
handleEscapeKey(event) {
|
|
6265
|
+
if (event.key === 'Escape' && this.effectiveIsMobile && this.isOpen) {
|
|
6266
|
+
event.preventDefault();
|
|
6267
|
+
this.handleClose();
|
|
6268
|
+
}
|
|
6269
|
+
}
|
|
6189
6270
|
/**
|
|
6190
6271
|
* Get SVG icon as SafeHtml based on icon name
|
|
6191
6272
|
*/
|
|
@@ -6196,6 +6277,8 @@ class SidebarComponent {
|
|
|
6196
6277
|
'chevron-left': 'M15 18l-6-6 6-6',
|
|
6197
6278
|
'chevron-right': 'M9 18l6-6-6-6',
|
|
6198
6279
|
'chevron-down': 'M6 9l6 6 6-6',
|
|
6280
|
+
'menu': 'M3 12H21M3 6H21M3 18H21',
|
|
6281
|
+
'x': 'M18 6L6 18M6 6L18 18',
|
|
6199
6282
|
'settings': 'M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z',
|
|
6200
6283
|
'bell': 'M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9',
|
|
6201
6284
|
'edit': 'M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7',
|
|
@@ -6208,11 +6291,11 @@ class SidebarComponent {
|
|
|
6208
6291
|
return this.sanitizer.bypassSecurityTrustHtml(svg);
|
|
6209
6292
|
}
|
|
6210
6293
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SidebarComponent, deps: [{ token: i1$2.Router }, { token: i0.ChangeDetectorRef }, { token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
6211
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SidebarComponent, isStandalone: true, selector: "sefin-sidebar", inputs: { navItems: "navItems", isMobile: "isMobile", isOpen: "isOpen", isCollapsed: "isCollapsed", headerTitle: "headerTitle", headerSubtitle: "headerSubtitle", headerIcon: "headerIcon", footerVersion: "footerVersion", showFooter: "showFooter" }, outputs: { toggleCollapse: "toggleCollapse" }, ngImport: i0, template: "<aside\n class=\"sefin-sidebar\"\n [class.sefin-sidebar--mobile]=\"isMobile\"\n [class.sefin-sidebar--open]=\"isOpen\"\n [class.sefin-sidebar--collapsed]=\"isCollapsed && !isMobile\"\n>\n <div class=\"sefin-sidebar__header\">\n @if (!isCollapsed || isMobile) {\n <div class=\"sefin-sidebar__header-content\">\n <div class=\"sefin-sidebar__header-icon-container\">\n <span class=\"sefin-sidebar__header-icon\" [innerHTML]=\"getIconSvg(headerIcon, 24)\"></span>\n </div>\n <div class=\"sefin-sidebar__header-text\">\n <h1 class=\"sefin-sidebar__header-title\">{{ headerTitle }}</h1>\n <span class=\"sefin-sidebar__header-subtitle\">{{ headerSubtitle }}</span>\n </div>\n </div>\n }\n @if (!isMobile) {\n <button\n type=\"button\"\n class=\"sefin-sidebar__toggle\"\n (click)=\"handleToggleCollapse()\"\n [attr.aria-label]=\"isCollapsed ? 'Expand sidebar' : 'Collapse sidebar'\"\n [attr.aria-expanded]=\"!isCollapsed\"\n >\n <span class=\"sefin-sidebar__toggle-icon\" [innerHTML]=\"getIconSvg(isCollapsed ? 'chevron-right' : 'chevron-left', 16)\"></span>\n </button>\n }\n </div>\n\n <nav class=\"sefin-sidebar__nav\">\n <ul class=\"sefin-sidebar__nav-list\">\n @for (item of navItems; track item.label) {\n <li class=\"sefin-sidebar__nav-item\" [class.sefin-sidebar__nav-item--has-children]=\"hasChildren(item)\">\n <!-- Parent item -->\n <button\n type=\"button\"\n class=\"sefin-sidebar__nav-link\"\n [class.sefin-sidebar__nav-link--expandable]=\"hasChildren(item)\"\n [class.sefin-sidebar__nav-link--expanded]=\"item.expanded\"\n [class.sefin-sidebar__nav-link--active]=\"hasActiveChild(item, currentRoute)\"\n [attr.aria-expanded]=\"hasChildren(item) ? item.expanded : null\"\n [attr.aria-label]=\"isCollapsed && !isMobile ? item.label : null\"\n (click)=\"hasChildren(item) ? toggleExpand(item) : navigate(item.route || '')\"\n >\n @if (item.icon) {\n <div class=\"sefin-sidebar__nav-icon-wrapper\">\n <span class=\"sefin-sidebar__nav-icon\" [innerHTML]=\"getIconSvg(item.icon, 20)\"></span>\n </div>\n }\n @if (!isCollapsed || isMobile) {\n <span class=\"sefin-sidebar__nav-label\">{{ item.label }}</span>\n @if (hasChildren(item)) {\n <div class=\"sefin-sidebar__nav-expand-icon-wrapper\" [class.sefin-sidebar__nav-expand-icon-wrapper--expanded]=\"item.expanded\">\n <span class=\"sefin-sidebar__nav-expand-icon\" [innerHTML]=\"getIconSvg('chevron-down', 16)\"></span>\n </div>\n }\n }\n </button>\n <!-- Children items -->\n @if (hasChildren(item) && item.expanded && (!isCollapsed || isMobile)) {\n <ul class=\"sefin-sidebar__nav-sub-list\">\n @for (child of item.children; track child.label) {\n <li class=\"sefin-sidebar__nav-sub-item\" [class.sefin-sidebar__nav-sub-item--has-children]=\"hasChildren(child)\">\n <!-- Level 1: Section headers (non-clickable) -->\n <div class=\"sefin-sidebar__nav-section-header\">\n <span class=\"sefin-sidebar__section-header-text\">{{ child.label }}</span>\n </div>\n <!-- Level 2: Grandchildren items (clickable with bullets) -->\n @if (hasChildren(child)) {\n <ul class=\"sefin-sidebar__nav-sub-sub-list\">\n @for (grandchild of child.children; track grandchild.label) {\n <li class=\"sefin-sidebar__nav-sub-sub-item\">\n <button\n type=\"button\"\n class=\"sefin-sidebar__nav-link sefin-sidebar__nav-link--sub-sub\"\n [class.sefin-sidebar__nav-link--active]=\"isActive(grandchild.route || '')\"\n [attr.aria-current]=\"isActive(grandchild.route || '') ? 'page' : null\"\n (click)=\"navigate(grandchild.route || '')\"\n >\n @if (!isActive(grandchild.route || '')) {\n <div class=\"sefin-sidebar__nav-bullet\"></div>\n }\n <span class=\"sefin-sidebar__nav-label\">{{ grandchild.label }}</span>\n </button>\n </li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n </nav>\n \n @if (showFooter) {\n <div class=\"sefin-sidebar__footer\">\n <div class=\"sefin-sidebar__footer-content\">\n <span class=\"sefin-sidebar__footer-text\">{{ footerVersion }}</span>\n </div>\n </div>\n }\n</aside>\n", styles: [".sefin-sidebar{width:288px;min-width:288px;height:100vh;background:#fff;border-right:1px solid #e8e8e8;display:flex;flex-direction:column;position:fixed;left:0;top:0;z-index:100;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);transition:width .3s ease-in-out,transform .3s ease-in-out}.sefin-sidebar__header{padding:var(--sefin-spacing-xl, 1.5rem);border-bottom:1px solid #e8e8e8;display:flex;align-items:center;position:relative;background:linear-gradient(to right,#55c3d8,#4aafc4);min-height:auto}.sefin-sidebar__header .sefin-sidebar__header-content{display:flex;align-items:center;gap:var(--sefin-spacing-md, .75rem);width:100%}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-icon-container{width:40px;height:40px;border-radius:12px;background:#fff3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;flex-shrink:0}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-icon-container .sefin-sidebar__header-icon{color:#fff;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-icon-container .sefin-sidebar__header-icon svg{width:24px;height:24px;color:#fff;fill:none;stroke:currentColor}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text{display:flex;flex-direction:column;gap:0}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text .sefin-sidebar__header-title{color:#fff;font-size:18px;font-weight:700;line-height:1.2;margin:0;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text .sefin-sidebar__header-subtitle{color:#fffc;font-size:12px;line-height:1.2;margin:0;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__header:after{content:\"\";position:absolute;right:-20px;top:50%;transform:translateY(-50%);width:56px;height:56px;z-index:100;pointer-events:none}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__header{padding:var(--sefin-spacing-xl, 1.5rem) var(--sefin-spacing-sm, .5rem);justify-content:center}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__header .sefin-sidebar__header-content{flex-direction:column}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text{display:none}.sefin-sidebar__footer{padding:var(--sefin-spacing-md, 1rem);border-top:1px solid #e8e8e8}.sefin-sidebar__footer .sefin-sidebar__footer-content{background:#f5f5f5;border-radius:8px;padding:var(--sefin-spacing-sm, .75rem);text-align:center}.sefin-sidebar__footer .sefin-sidebar__footer-content .sefin-sidebar__footer-text{color:#828282;font-size:12px;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__toggle{position:absolute;right:-18px;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:50%;border:none;background:linear-gradient(135deg,#fff,#f8f9fa);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 8px #0000001a,0 0 0 1px #0000000d,inset 0 1px #ffffffe6;transition:all .3s cubic-bezier(.4,0,.2,1);z-index:101;color:var(--sefin-color-text, #4a5568);padding:0;margin:0;line-height:0}.sefin-sidebar__toggle .sefin-sidebar__toggle-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0;transition:transform .3s cubic-bezier(.4,0,.2,1);pointer-events:none}.sefin-sidebar__toggle .sefin-sidebar__toggle-icon svg{width:18px;height:18px;color:currentColor;fill:none;stroke:currentColor;pointer-events:none}.sefin-sidebar__toggle:before{content:\"\";position:absolute;inset:0;border-radius:50%;background:linear-gradient(135deg,rgba(255,255,255,.3) 0%,transparent 50%);pointer-events:none;opacity:.5}.sefin-sidebar__toggle:hover{background:linear-gradient(135deg,#55c3d8,#4db8cc);color:#fff;transform:translateY(-50%) scale(1.08);box-shadow:0 4px 20px #55c3d866,0 0 0 1px #55c3d833,inset 0 1px #ffffff4d}.sefin-sidebar__toggle:hover:before{opacity:.2;background:linear-gradient(135deg,rgba(255,255,255,.4) 0%,transparent 50%)}.sefin-sidebar__toggle:hover .sefin-sidebar__toggle-icon{transform:scale(1.1)}.sefin-sidebar__toggle:active{transform:translateY(-50%) scale(1.02);box-shadow:0 2px 12px #55c3d880,0 0 0 1px #55c3d84d,inset 0 2px 4px #0000001a}.sefin-sidebar__toggle:focus{outline:2px solid var(--sefin-color-primary, #55c3d8);outline-offset:4px;outline-style:solid}.sefin-sidebar--collapsed .sefin-sidebar__toggle{right:-18px}.sefin-sidebar__nav{flex:1;padding:var(--sefin-spacing-sm, .75rem);overflow:hidden}.sefin-sidebar__nav-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.sefin-sidebar__nav-item{margin:0}.sefin-sidebar__nav-item.sefin-sidebar__nav-item--has-children{margin-bottom:4px}.sefin-sidebar__nav-link{width:100%;display:flex;align-items:center;gap:var(--sefin-spacing-md, .75rem);padding:var(--sefin-spacing-sm, .75rem) var(--sefin-spacing-md, 1rem);background:none;border:none;outline:none;text-align:left;cursor:pointer;color:#383838;font-size:var(--sefin-font-size-base, 1rem);font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);transition:all .2s ease-in-out;position:relative;border-radius:12px;margin:0;justify-content:flex-start;overflow:hidden;min-width:0;font-weight:500}.sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active){background:#e6f7fb;color:#55c3d8}.sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-label{color:#55c3d8}.sefin-sidebar__nav-link:focus{outline:none}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--active{background:linear-gradient(to right,#55c3d8,#4aafc4);color:#fff;font-weight:500;box-shadow:0 4px 6px #55c3d84d;border:none}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-label{color:#fff}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--expandable{font-weight:500}.sefin-sidebar__nav-icon-wrapper{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;border-radius:8px;background:#e6f7fb;transition:all .2s ease-in-out}.sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px}.sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{width:20px;height:20px;color:#55c3d8;fill:none;stroke:currentColor}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-icon-wrapper{background:#fff3}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{color:#fff;fill:none;stroke:currentColor}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active:hover .sefin-sidebar__nav-icon-wrapper{background:#fff3}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active:hover .sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{color:#fff;fill:none;stroke:currentColor}.sefin-sidebar .sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-icon-wrapper{background:#55c3d8}.sefin-sidebar .sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{color:#fff;fill:none;stroke:currentColor}.sefin-sidebar__nav-expand-icon-wrapper{margin-left:auto;transition:transform .2s ease;display:flex;align-items:center;justify-content:center}.sefin-sidebar__nav-expand-icon-wrapper.sefin-sidebar__nav-expand-icon-wrapper--expanded{transform:rotate(180deg)}.sefin-sidebar__nav-expand-icon-wrapper .sefin-sidebar__nav-expand-icon svg{color:#828282;width:16px;height:16px;fill:none;stroke:currentColor;transition:color .2s ease-in-out}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-expand-icon-wrapper .sefin-sidebar__nav-expand-icon svg{color:#fff}.sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-expand-icon-wrapper .sefin-sidebar__nav-expand-icon svg{color:#55c3d8}.sefin-sidebar__nav-label{flex:1;white-space:normal;word-wrap:break-word;overflow-wrap:break-word;opacity:1;transition:opacity .2s ease;min-width:0;overflow:hidden;display:block;line-height:1.4;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__nav-sub-list{list-style:none;margin:4px 0 8px;padding:0;animation:slideDown .2s ease-out}.sefin-sidebar__nav-sub-item{margin:0 0 2px}.sefin-sidebar__nav-sub-item.sefin-sidebar__nav-sub-item--has-children{margin-bottom:4px}.sefin-sidebar__nav-section-header{padding:var(--sefin-spacing-md, 1rem) var(--sefin-spacing-md, 1rem) var(--sefin-spacing-xs, .5rem) var(--sefin-spacing-md, 1rem)}.sefin-sidebar__nav-section-header .sefin-sidebar__section-header-text{color:#828282;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__nav-sub-sub-list{list-style:none;margin:2px 0 8px;padding:0;animation:slideDown .2s ease-out;display:flex;flex-direction:column;gap:2px}.sefin-sidebar__nav-sub-sub-item{margin:0 0 2px}.sefin-sidebar__nav-link--sub-sub{width:100%;display:flex;align-items:center;gap:var(--sefin-spacing-md, .75rem);padding:var(--sefin-spacing-sm, .75rem) var(--sefin-spacing-md, 1rem);background:none;border:none;outline:none;text-align:left;cursor:pointer;color:#4f4f4f;font-size:var(--sefin-font-size-sm, .875rem);font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);transition:all .2s ease-in-out;position:relative;border-radius:12px;margin:0 var(--sefin-spacing-md, .5rem);justify-content:flex-start;overflow:hidden;min-width:0}.sefin-sidebar__nav-link--sub-sub:hover:not(.sefin-sidebar__nav-link--active){background:#e6f7fb;color:#55c3d8}.sefin-sidebar__nav-link--sub-sub:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-bullet{background:#55c3d8}.sefin-sidebar__nav-link--sub-sub:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-label{color:#55c3d8}.sefin-sidebar__nav-link--sub-sub:focus{outline:none}.sefin-sidebar__nav-link--sub-sub.sefin-sidebar__nav-link--active{background:linear-gradient(to right,#55c3d8,#4aafc4);color:#fff;font-weight:500;box-shadow:0 4px 6px #55c3d84d;border:none}.sefin-sidebar__nav-link--sub-sub.sefin-sidebar__nav-link--active .sefin-sidebar__nav-label{color:#fff}.sefin-sidebar__nav-bullet{width:6px;height:6px;border-radius:50%;background:#cecece;transition:background-color .2s ease-in-out;flex-shrink:0}.sefin-sidebar .sefin-sidebar__nav-link--sub-sub.sefin-sidebar__nav-link--active .sefin-sidebar__nav-bullet{display:none}@keyframes slideDown{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:1000px}}.sefin-sidebar.sefin-sidebar--collapsed{width:80px;min-width:80px}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-link{justify-content:center;padding:var(--sefin-spacing-md, 1rem);border-radius:12px;margin:0}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-label{opacity:0;width:0;overflow:hidden}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-expand-icon,.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-sub-list,.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-sub-sub-list{display:none}.sefin-sidebar.sefin-sidebar--mobile{transform:translate(-100%)}.sefin-sidebar.sefin-sidebar--mobile.sefin-sidebar--open{transform:translate(0)}@media(max-width:768px){.sefin-sidebar{transform:translate(-100%)}.sefin-sidebar.sefin-sidebar--open{transform:translate(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
6294
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SidebarComponent, isStandalone: true, selector: "sefin-sidebar", inputs: { navItems: "navItems", isMobile: "isMobile", isOpen: "isOpen", isCollapsed: "isCollapsed", headerTitle: "headerTitle", headerSubtitle: "headerSubtitle", headerIcon: "headerIcon", footerVersion: "footerVersion", showFooter: "showFooter" }, outputs: { toggleCollapse: "toggleCollapse", toggleOpen: "toggleOpen", close: "close" }, host: { listeners: { "document:keydown": "handleEscapeKey($event)" } }, usesOnChanges: true, ngImport: i0, template: "<!-- Overlay for mobile -->\n@if (effectiveIsMobile && isOpen) {\n <div\n class=\"sefin-sidebar__overlay\"\n (click)=\"handleOverlayClick()\"\n [attr.aria-hidden]=\"!isOpen\"\n role=\"presentation\"\n ></div>\n}\n\n<aside\n class=\"sefin-sidebar\"\n [class.sefin-sidebar--mobile]=\"effectiveIsMobile\"\n [class.sefin-sidebar--open]=\"isOpen\"\n [class.sefin-sidebar--collapsed]=\"isCollapsed && !effectiveIsMobile\"\n [attr.aria-hidden]=\"effectiveIsMobile && !isOpen\"\n>\n <div class=\"sefin-sidebar__header\">\n @if (!isCollapsed || effectiveIsMobile) {\n <div class=\"sefin-sidebar__header-content\">\n <div class=\"sefin-sidebar__header-icon-container\">\n <span class=\"sefin-sidebar__header-icon\" [innerHTML]=\"getIconSvg(headerIcon, 24)\"></span>\n </div>\n <div class=\"sefin-sidebar__header-text\">\n <h1 class=\"sefin-sidebar__header-title\">{{ headerTitle }}</h1>\n <span class=\"sefin-sidebar__header-subtitle\">{{ headerSubtitle }}</span>\n </div>\n </div>\n }\n @if (effectiveIsMobile) {\n <button\n type=\"button\"\n class=\"sefin-sidebar__close-button\"\n (click)=\"handleClose()\"\n aria-label=\"Close sidebar\"\n >\n <span class=\"sefin-sidebar__close-icon\" [innerHTML]=\"getIconSvg('x', 20)\"></span>\n </button>\n }\n @if (!effectiveIsMobile) {\n <button\n type=\"button\"\n class=\"sefin-sidebar__toggle\"\n (click)=\"handleToggleCollapse()\"\n [attr.aria-label]=\"isCollapsed ? 'Expand sidebar' : 'Collapse sidebar'\"\n [attr.aria-expanded]=\"!isCollapsed\"\n >\n <span class=\"sefin-sidebar__toggle-icon\" [innerHTML]=\"getIconSvg(isCollapsed ? 'chevron-right' : 'chevron-left', 16)\"></span>\n </button>\n }\n </div>\n\n <nav class=\"sefin-sidebar__nav\">\n <ul class=\"sefin-sidebar__nav-list\">\n @for (item of navItems; track item.label) {\n <li class=\"sefin-sidebar__nav-item\" [class.sefin-sidebar__nav-item--has-children]=\"hasChildren(item)\">\n <!-- Parent item -->\n <button\n type=\"button\"\n class=\"sefin-sidebar__nav-link\"\n [class.sefin-sidebar__nav-link--expandable]=\"hasChildren(item)\"\n [class.sefin-sidebar__nav-link--expanded]=\"item.expanded\"\n [class.sefin-sidebar__nav-link--active]=\"hasActiveChild(item, currentRoute)\"\n [attr.aria-expanded]=\"hasChildren(item) ? item.expanded : null\"\n [attr.aria-label]=\"isCollapsed && !effectiveIsMobile ? item.label : null\"\n (click)=\"hasChildren(item) ? toggleExpand(item) : navigate(item.route || '')\"\n >\n @if (item.icon) {\n <div class=\"sefin-sidebar__nav-icon-wrapper\">\n <span class=\"sefin-sidebar__nav-icon\" [innerHTML]=\"getIconSvg(item.icon, 20)\"></span>\n </div>\n }\n @if (!isCollapsed || effectiveIsMobile) {\n <span class=\"sefin-sidebar__nav-label\">{{ item.label }}</span>\n @if (hasChildren(item)) {\n <div class=\"sefin-sidebar__nav-expand-icon-wrapper\" [class.sefin-sidebar__nav-expand-icon-wrapper--expanded]=\"item.expanded\">\n <span class=\"sefin-sidebar__nav-expand-icon\" [innerHTML]=\"getIconSvg('chevron-down', 16)\"></span>\n </div>\n }\n }\n </button>\n <!-- Children items -->\n @if (hasChildren(item) && item.expanded && (!isCollapsed || effectiveIsMobile)) {\n <ul class=\"sefin-sidebar__nav-sub-list\">\n @for (child of item.children; track child.label) {\n <li class=\"sefin-sidebar__nav-sub-item\" [class.sefin-sidebar__nav-sub-item--has-children]=\"hasChildren(child)\">\n <!-- Level 1: Section headers (non-clickable) -->\n <div class=\"sefin-sidebar__nav-section-header\">\n <span class=\"sefin-sidebar__section-header-text\">{{ child.label }}</span>\n </div>\n <!-- Level 2: Grandchildren items (clickable with bullets) -->\n @if (hasChildren(child)) {\n <ul class=\"sefin-sidebar__nav-sub-sub-list\">\n @for (grandchild of child.children; track grandchild.label) {\n <li class=\"sefin-sidebar__nav-sub-sub-item\">\n <button\n type=\"button\"\n class=\"sefin-sidebar__nav-link sefin-sidebar__nav-link--sub-sub\"\n [class.sefin-sidebar__nav-link--active]=\"isActive(grandchild.route || '')\"\n [attr.aria-current]=\"isActive(grandchild.route || '') ? 'page' : null\"\n (click)=\"navigate(grandchild.route || '')\"\n >\n @if (!isActive(grandchild.route || '')) {\n <div class=\"sefin-sidebar__nav-bullet\"></div>\n }\n <span class=\"sefin-sidebar__nav-label\">{{ grandchild.label }}</span>\n </button>\n </li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n </nav>\n \n @if (showFooter) {\n <div class=\"sefin-sidebar__footer\">\n <div class=\"sefin-sidebar__footer-content\">\n <span class=\"sefin-sidebar__footer-text\">{{ footerVersion }}</span>\n </div>\n </div>\n }\n</aside>\n", styles: [".sefin-sidebar{width:288px;min-width:288px;height:100vh;background:#fff;border-right:1px solid #e8e8e8;display:flex;flex-direction:column;position:fixed;left:0;top:0;z-index:100;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);transition:width .3s ease-in-out,transform .3s ease-in-out}.sefin-sidebar__header{padding:var(--sefin-spacing-xl, 1.5rem);border-bottom:1px solid #e8e8e8;display:flex;align-items:center;position:relative;background:linear-gradient(to right,#55c3d8,#4aafc4);min-height:auto}.sefin-sidebar__header .sefin-sidebar__header-content{display:flex;align-items:center;gap:var(--sefin-spacing-md, .75rem);width:100%}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-icon-container{width:40px;height:40px;border-radius:12px;background:#fff3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;flex-shrink:0}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-icon-container .sefin-sidebar__header-icon{color:#fff;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-icon-container .sefin-sidebar__header-icon svg{width:24px;height:24px;color:#fff;fill:none;stroke:currentColor}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text{display:flex;flex-direction:column;gap:0}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text .sefin-sidebar__header-title{color:#fff;font-size:18px;font-weight:700;line-height:1.2;margin:0;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text .sefin-sidebar__header-subtitle{color:#fffc;font-size:12px;line-height:1.2;margin:0;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__header:after{content:\"\";position:absolute;right:-20px;top:50%;transform:translateY(-50%);width:56px;height:56px;z-index:100;pointer-events:none}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__header{padding:var(--sefin-spacing-xl, 1.5rem) var(--sefin-spacing-sm, .5rem);justify-content:center}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__header .sefin-sidebar__header-content{flex-direction:column}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text{display:none}.sefin-sidebar__footer{padding:var(--sefin-spacing-md, 1rem);border-top:1px solid #e8e8e8}.sefin-sidebar__footer .sefin-sidebar__footer-content{background:#f5f5f5;border-radius:8px;padding:var(--sefin-spacing-sm, .75rem);text-align:center}.sefin-sidebar__footer .sefin-sidebar__footer-content .sefin-sidebar__footer-text{color:#828282;font-size:12px;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__toggle{position:absolute;right:-18px;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:50%;border:none;background:linear-gradient(135deg,#fff,#f8f9fa);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 8px #0000001a,0 0 0 1px #0000000d,inset 0 1px #ffffffe6;transition:all .3s cubic-bezier(.4,0,.2,1);z-index:101;color:var(--sefin-color-text, #4a5568);padding:0;margin:0;line-height:0}.sefin-sidebar__toggle .sefin-sidebar__toggle-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0;transition:transform .3s cubic-bezier(.4,0,.2,1);pointer-events:none}.sefin-sidebar__toggle .sefin-sidebar__toggle-icon svg{width:18px;height:18px;color:currentColor;fill:none;stroke:currentColor;pointer-events:none}.sefin-sidebar__toggle:before{content:\"\";position:absolute;inset:0;border-radius:50%;background:linear-gradient(135deg,rgba(255,255,255,.3) 0%,transparent 50%);pointer-events:none;opacity:.5}.sefin-sidebar__toggle:hover{background:linear-gradient(135deg,#55c3d8,#4db8cc);color:#fff;transform:translateY(-50%) scale(1.08);box-shadow:0 4px 20px #55c3d866,0 0 0 1px #55c3d833,inset 0 1px #ffffff4d}.sefin-sidebar__toggle:hover:before{opacity:.2;background:linear-gradient(135deg,rgba(255,255,255,.4) 0%,transparent 50%)}.sefin-sidebar__toggle:hover .sefin-sidebar__toggle-icon{transform:scale(1.1)}.sefin-sidebar__toggle:active{transform:translateY(-50%) scale(1.02);box-shadow:0 2px 12px #55c3d880,0 0 0 1px #55c3d84d,inset 0 2px 4px #0000001a}.sefin-sidebar__toggle:focus{outline:2px solid var(--sefin-color-primary, #55c3d8);outline-offset:4px;outline-style:solid}.sefin-sidebar--collapsed .sefin-sidebar__toggle{right:-18px}.sefin-sidebar__close-button{position:absolute;right:var(--sefin-spacing-md, 1rem);top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:50%;border:none;background:#fff3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease-in-out;z-index:101;color:#fff;padding:0;margin:0;line-height:0}.sefin-sidebar__close-button .sefin-sidebar__close-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex-shrink:0;pointer-events:none}.sefin-sidebar__close-button .sefin-sidebar__close-icon svg{width:20px;height:20px;color:currentColor;fill:none;stroke:currentColor;stroke-width:2;pointer-events:none}.sefin-sidebar__close-button:hover{background:#ffffff4d;transform:translateY(-50%) scale(1.05)}.sefin-sidebar__close-button:active{transform:translateY(-50%) scale(.95)}.sefin-sidebar__close-button:focus{outline:2px solid rgba(255,255,255,.5);outline-offset:2px}.sefin-sidebar__nav{flex:1;padding:var(--sefin-spacing-sm, .75rem);overflow:hidden}.sefin-sidebar__nav-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.sefin-sidebar__nav-item{margin:0}.sefin-sidebar__nav-item.sefin-sidebar__nav-item--has-children{margin-bottom:4px}.sefin-sidebar__nav-link{width:100%;display:flex;align-items:center;gap:var(--sefin-spacing-md, .75rem);padding:var(--sefin-spacing-sm, .75rem) var(--sefin-spacing-md, 1rem);background:none;border:none;outline:none;text-align:left;cursor:pointer;color:#383838;font-size:var(--sefin-font-size-base, 1rem);font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);transition:all .2s ease-in-out;position:relative;border-radius:12px;margin:0;justify-content:flex-start;overflow:hidden;min-width:0;font-weight:500}.sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active){background:#e6f7fb;color:#55c3d8}.sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-label{color:#55c3d8}.sefin-sidebar__nav-link:focus{outline:none}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--active{background:linear-gradient(to right,#55c3d8,#4aafc4);color:#fff;font-weight:500;box-shadow:0 4px 6px #55c3d84d;border:none}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-label{color:#fff}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--expandable{font-weight:500}.sefin-sidebar__nav-icon-wrapper{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;border-radius:8px;background:#e6f7fb;transition:all .2s ease-in-out}.sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px}.sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{width:20px;height:20px;color:#55c3d8;fill:none;stroke:currentColor}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-icon-wrapper{background:#fff3}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{color:#fff;fill:none;stroke:currentColor}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active:hover .sefin-sidebar__nav-icon-wrapper{background:#fff3}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active:hover .sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{color:#fff;fill:none;stroke:currentColor}.sefin-sidebar .sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-icon-wrapper{background:#55c3d8}.sefin-sidebar .sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{color:#fff;fill:none;stroke:currentColor}.sefin-sidebar__nav-expand-icon-wrapper{margin-left:auto;transition:transform .2s ease;display:flex;align-items:center;justify-content:center}.sefin-sidebar__nav-expand-icon-wrapper.sefin-sidebar__nav-expand-icon-wrapper--expanded{transform:rotate(180deg)}.sefin-sidebar__nav-expand-icon-wrapper .sefin-sidebar__nav-expand-icon svg{color:#828282;width:16px;height:16px;fill:none;stroke:currentColor;transition:color .2s ease-in-out}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-expand-icon-wrapper .sefin-sidebar__nav-expand-icon svg{color:#fff}.sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-expand-icon-wrapper .sefin-sidebar__nav-expand-icon svg{color:#55c3d8}.sefin-sidebar__nav-label{flex:1;white-space:normal;word-wrap:break-word;overflow-wrap:break-word;opacity:1;transition:opacity .2s ease;min-width:0;overflow:hidden;display:block;line-height:1.4;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__nav-sub-list{list-style:none;margin:4px 0 8px;padding:0;animation:slideDown .2s ease-out}.sefin-sidebar__nav-sub-item{margin:0 0 2px}.sefin-sidebar__nav-sub-item.sefin-sidebar__nav-sub-item--has-children{margin-bottom:4px}.sefin-sidebar__nav-section-header{padding:var(--sefin-spacing-md, 1rem) var(--sefin-spacing-md, 1rem) var(--sefin-spacing-xs, .5rem) var(--sefin-spacing-md, 1rem)}.sefin-sidebar__nav-section-header .sefin-sidebar__section-header-text{color:#828282;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__nav-sub-sub-list{list-style:none;margin:2px 0 8px;padding:0;animation:slideDown .2s ease-out;display:flex;flex-direction:column;gap:2px}.sefin-sidebar__nav-sub-sub-item{margin:0 0 2px}.sefin-sidebar__nav-link--sub-sub{width:100%;display:flex;align-items:center;gap:var(--sefin-spacing-md, .75rem);padding:var(--sefin-spacing-sm, .75rem) var(--sefin-spacing-md, 1rem);background:none;border:none;outline:none;text-align:left;cursor:pointer;color:#4f4f4f;font-size:var(--sefin-font-size-sm, .875rem);font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);transition:all .2s ease-in-out;position:relative;border-radius:12px;margin:0 var(--sefin-spacing-md, .5rem);justify-content:flex-start;overflow:hidden;min-width:0}.sefin-sidebar__nav-link--sub-sub:hover:not(.sefin-sidebar__nav-link--active){background:#e6f7fb;color:#55c3d8}.sefin-sidebar__nav-link--sub-sub:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-bullet{background:#55c3d8}.sefin-sidebar__nav-link--sub-sub:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-label{color:#55c3d8}.sefin-sidebar__nav-link--sub-sub:focus{outline:none}.sefin-sidebar__nav-link--sub-sub.sefin-sidebar__nav-link--active{background:linear-gradient(to right,#55c3d8,#4aafc4);color:#fff;font-weight:500;box-shadow:0 4px 6px #55c3d84d;border:none}.sefin-sidebar__nav-link--sub-sub.sefin-sidebar__nav-link--active .sefin-sidebar__nav-label{color:#fff}.sefin-sidebar__nav-bullet{width:6px;height:6px;border-radius:50%;background:#cecece;transition:background-color .2s ease-in-out;flex-shrink:0}.sefin-sidebar .sefin-sidebar__nav-link--sub-sub.sefin-sidebar__nav-link--active .sefin-sidebar__nav-bullet{display:none}@keyframes slideDown{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:1000px}}.sefin-sidebar.sefin-sidebar--collapsed{width:80px;min-width:80px}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-link{justify-content:center;padding:var(--sefin-spacing-md, 1rem);border-radius:12px;margin:0}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-label{opacity:0;width:0;overflow:hidden}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-expand-icon,.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-sub-list,.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-sub-sub-list{display:none}.sefin-sidebar.sefin-sidebar--mobile{transform:translate(-100%);z-index:1000}.sefin-sidebar.sefin-sidebar--mobile.sefin-sidebar--open{transform:translate(0)}.sefin-sidebar__overlay{position:fixed;inset:0;background:#00000080;z-index:999;animation:fadeIn .2s ease-in-out;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@media(max-width:768px){.sefin-sidebar{display:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
6212
6295
|
}
|
|
6213
6296
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
6214
6297
|
type: Component,
|
|
6215
|
-
args: [{ selector: 'sefin-sidebar', standalone: true, imports: [CommonModule, RouterModule], changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, template: "<aside\n class=\"sefin-sidebar\"\n [class.sefin-sidebar--mobile]=\"isMobile\"\n [class.sefin-sidebar--open]=\"isOpen\"\n [class.sefin-sidebar--collapsed]=\"isCollapsed && !isMobile\"\n>\n <div class=\"sefin-sidebar__header\">\n @if (!isCollapsed || isMobile) {\n <div class=\"sefin-sidebar__header-content\">\n <div class=\"sefin-sidebar__header-icon-container\">\n <span class=\"sefin-sidebar__header-icon\" [innerHTML]=\"getIconSvg(headerIcon, 24)\"></span>\n </div>\n <div class=\"sefin-sidebar__header-text\">\n <h1 class=\"sefin-sidebar__header-title\">{{ headerTitle }}</h1>\n <span class=\"sefin-sidebar__header-subtitle\">{{ headerSubtitle }}</span>\n </div>\n </div>\n }\n @if (!isMobile) {\n <button\n type=\"button\"\n class=\"sefin-sidebar__toggle\"\n (click)=\"handleToggleCollapse()\"\n [attr.aria-label]=\"isCollapsed ? 'Expand sidebar' : 'Collapse sidebar'\"\n [attr.aria-expanded]=\"!isCollapsed\"\n >\n <span class=\"sefin-sidebar__toggle-icon\" [innerHTML]=\"getIconSvg(isCollapsed ? 'chevron-right' : 'chevron-left', 16)\"></span>\n </button>\n }\n </div>\n\n <nav class=\"sefin-sidebar__nav\">\n <ul class=\"sefin-sidebar__nav-list\">\n @for (item of navItems; track item.label) {\n <li class=\"sefin-sidebar__nav-item\" [class.sefin-sidebar__nav-item--has-children]=\"hasChildren(item)\">\n <!-- Parent item -->\n <button\n type=\"button\"\n class=\"sefin-sidebar__nav-link\"\n [class.sefin-sidebar__nav-link--expandable]=\"hasChildren(item)\"\n [class.sefin-sidebar__nav-link--expanded]=\"item.expanded\"\n [class.sefin-sidebar__nav-link--active]=\"hasActiveChild(item, currentRoute)\"\n [attr.aria-expanded]=\"hasChildren(item) ? item.expanded : null\"\n [attr.aria-label]=\"isCollapsed && !isMobile ? item.label : null\"\n (click)=\"hasChildren(item) ? toggleExpand(item) : navigate(item.route || '')\"\n >\n @if (item.icon) {\n <div class=\"sefin-sidebar__nav-icon-wrapper\">\n <span class=\"sefin-sidebar__nav-icon\" [innerHTML]=\"getIconSvg(item.icon, 20)\"></span>\n </div>\n }\n @if (!isCollapsed || isMobile) {\n <span class=\"sefin-sidebar__nav-label\">{{ item.label }}</span>\n @if (hasChildren(item)) {\n <div class=\"sefin-sidebar__nav-expand-icon-wrapper\" [class.sefin-sidebar__nav-expand-icon-wrapper--expanded]=\"item.expanded\">\n <span class=\"sefin-sidebar__nav-expand-icon\" [innerHTML]=\"getIconSvg('chevron-down', 16)\"></span>\n </div>\n }\n }\n </button>\n <!-- Children items -->\n @if (hasChildren(item) && item.expanded && (!isCollapsed || isMobile)) {\n <ul class=\"sefin-sidebar__nav-sub-list\">\n @for (child of item.children; track child.label) {\n <li class=\"sefin-sidebar__nav-sub-item\" [class.sefin-sidebar__nav-sub-item--has-children]=\"hasChildren(child)\">\n <!-- Level 1: Section headers (non-clickable) -->\n <div class=\"sefin-sidebar__nav-section-header\">\n <span class=\"sefin-sidebar__section-header-text\">{{ child.label }}</span>\n </div>\n <!-- Level 2: Grandchildren items (clickable with bullets) -->\n @if (hasChildren(child)) {\n <ul class=\"sefin-sidebar__nav-sub-sub-list\">\n @for (grandchild of child.children; track grandchild.label) {\n <li class=\"sefin-sidebar__nav-sub-sub-item\">\n <button\n type=\"button\"\n class=\"sefin-sidebar__nav-link sefin-sidebar__nav-link--sub-sub\"\n [class.sefin-sidebar__nav-link--active]=\"isActive(grandchild.route || '')\"\n [attr.aria-current]=\"isActive(grandchild.route || '') ? 'page' : null\"\n (click)=\"navigate(grandchild.route || '')\"\n >\n @if (!isActive(grandchild.route || '')) {\n <div class=\"sefin-sidebar__nav-bullet\"></div>\n }\n <span class=\"sefin-sidebar__nav-label\">{{ grandchild.label }}</span>\n </button>\n </li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n </nav>\n \n @if (showFooter) {\n <div class=\"sefin-sidebar__footer\">\n <div class=\"sefin-sidebar__footer-content\">\n <span class=\"sefin-sidebar__footer-text\">{{ footerVersion }}</span>\n </div>\n </div>\n }\n</aside>\n", styles: [".sefin-sidebar{width:288px;min-width:288px;height:100vh;background:#fff;border-right:1px solid #e8e8e8;display:flex;flex-direction:column;position:fixed;left:0;top:0;z-index:100;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);transition:width .3s ease-in-out,transform .3s ease-in-out}.sefin-sidebar__header{padding:var(--sefin-spacing-xl, 1.5rem);border-bottom:1px solid #e8e8e8;display:flex;align-items:center;position:relative;background:linear-gradient(to right,#55c3d8,#4aafc4);min-height:auto}.sefin-sidebar__header .sefin-sidebar__header-content{display:flex;align-items:center;gap:var(--sefin-spacing-md, .75rem);width:100%}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-icon-container{width:40px;height:40px;border-radius:12px;background:#fff3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;flex-shrink:0}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-icon-container .sefin-sidebar__header-icon{color:#fff;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-icon-container .sefin-sidebar__header-icon svg{width:24px;height:24px;color:#fff;fill:none;stroke:currentColor}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text{display:flex;flex-direction:column;gap:0}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text .sefin-sidebar__header-title{color:#fff;font-size:18px;font-weight:700;line-height:1.2;margin:0;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text .sefin-sidebar__header-subtitle{color:#fffc;font-size:12px;line-height:1.2;margin:0;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__header:after{content:\"\";position:absolute;right:-20px;top:50%;transform:translateY(-50%);width:56px;height:56px;z-index:100;pointer-events:none}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__header{padding:var(--sefin-spacing-xl, 1.5rem) var(--sefin-spacing-sm, .5rem);justify-content:center}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__header .sefin-sidebar__header-content{flex-direction:column}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text{display:none}.sefin-sidebar__footer{padding:var(--sefin-spacing-md, 1rem);border-top:1px solid #e8e8e8}.sefin-sidebar__footer .sefin-sidebar__footer-content{background:#f5f5f5;border-radius:8px;padding:var(--sefin-spacing-sm, .75rem);text-align:center}.sefin-sidebar__footer .sefin-sidebar__footer-content .sefin-sidebar__footer-text{color:#828282;font-size:12px;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__toggle{position:absolute;right:-18px;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:50%;border:none;background:linear-gradient(135deg,#fff,#f8f9fa);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 8px #0000001a,0 0 0 1px #0000000d,inset 0 1px #ffffffe6;transition:all .3s cubic-bezier(.4,0,.2,1);z-index:101;color:var(--sefin-color-text, #4a5568);padding:0;margin:0;line-height:0}.sefin-sidebar__toggle .sefin-sidebar__toggle-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0;transition:transform .3s cubic-bezier(.4,0,.2,1);pointer-events:none}.sefin-sidebar__toggle .sefin-sidebar__toggle-icon svg{width:18px;height:18px;color:currentColor;fill:none;stroke:currentColor;pointer-events:none}.sefin-sidebar__toggle:before{content:\"\";position:absolute;inset:0;border-radius:50%;background:linear-gradient(135deg,rgba(255,255,255,.3) 0%,transparent 50%);pointer-events:none;opacity:.5}.sefin-sidebar__toggle:hover{background:linear-gradient(135deg,#55c3d8,#4db8cc);color:#fff;transform:translateY(-50%) scale(1.08);box-shadow:0 4px 20px #55c3d866,0 0 0 1px #55c3d833,inset 0 1px #ffffff4d}.sefin-sidebar__toggle:hover:before{opacity:.2;background:linear-gradient(135deg,rgba(255,255,255,.4) 0%,transparent 50%)}.sefin-sidebar__toggle:hover .sefin-sidebar__toggle-icon{transform:scale(1.1)}.sefin-sidebar__toggle:active{transform:translateY(-50%) scale(1.02);box-shadow:0 2px 12px #55c3d880,0 0 0 1px #55c3d84d,inset 0 2px 4px #0000001a}.sefin-sidebar__toggle:focus{outline:2px solid var(--sefin-color-primary, #55c3d8);outline-offset:4px;outline-style:solid}.sefin-sidebar--collapsed .sefin-sidebar__toggle{right:-18px}.sefin-sidebar__nav{flex:1;padding:var(--sefin-spacing-sm, .75rem);overflow:hidden}.sefin-sidebar__nav-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.sefin-sidebar__nav-item{margin:0}.sefin-sidebar__nav-item.sefin-sidebar__nav-item--has-children{margin-bottom:4px}.sefin-sidebar__nav-link{width:100%;display:flex;align-items:center;gap:var(--sefin-spacing-md, .75rem);padding:var(--sefin-spacing-sm, .75rem) var(--sefin-spacing-md, 1rem);background:none;border:none;outline:none;text-align:left;cursor:pointer;color:#383838;font-size:var(--sefin-font-size-base, 1rem);font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);transition:all .2s ease-in-out;position:relative;border-radius:12px;margin:0;justify-content:flex-start;overflow:hidden;min-width:0;font-weight:500}.sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active){background:#e6f7fb;color:#55c3d8}.sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-label{color:#55c3d8}.sefin-sidebar__nav-link:focus{outline:none}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--active{background:linear-gradient(to right,#55c3d8,#4aafc4);color:#fff;font-weight:500;box-shadow:0 4px 6px #55c3d84d;border:none}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-label{color:#fff}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--expandable{font-weight:500}.sefin-sidebar__nav-icon-wrapper{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;border-radius:8px;background:#e6f7fb;transition:all .2s ease-in-out}.sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px}.sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{width:20px;height:20px;color:#55c3d8;fill:none;stroke:currentColor}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-icon-wrapper{background:#fff3}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{color:#fff;fill:none;stroke:currentColor}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active:hover .sefin-sidebar__nav-icon-wrapper{background:#fff3}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active:hover .sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{color:#fff;fill:none;stroke:currentColor}.sefin-sidebar .sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-icon-wrapper{background:#55c3d8}.sefin-sidebar .sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{color:#fff;fill:none;stroke:currentColor}.sefin-sidebar__nav-expand-icon-wrapper{margin-left:auto;transition:transform .2s ease;display:flex;align-items:center;justify-content:center}.sefin-sidebar__nav-expand-icon-wrapper.sefin-sidebar__nav-expand-icon-wrapper--expanded{transform:rotate(180deg)}.sefin-sidebar__nav-expand-icon-wrapper .sefin-sidebar__nav-expand-icon svg{color:#828282;width:16px;height:16px;fill:none;stroke:currentColor;transition:color .2s ease-in-out}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-expand-icon-wrapper .sefin-sidebar__nav-expand-icon svg{color:#fff}.sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-expand-icon-wrapper .sefin-sidebar__nav-expand-icon svg{color:#55c3d8}.sefin-sidebar__nav-label{flex:1;white-space:normal;word-wrap:break-word;overflow-wrap:break-word;opacity:1;transition:opacity .2s ease;min-width:0;overflow:hidden;display:block;line-height:1.4;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__nav-sub-list{list-style:none;margin:4px 0 8px;padding:0;animation:slideDown .2s ease-out}.sefin-sidebar__nav-sub-item{margin:0 0 2px}.sefin-sidebar__nav-sub-item.sefin-sidebar__nav-sub-item--has-children{margin-bottom:4px}.sefin-sidebar__nav-section-header{padding:var(--sefin-spacing-md, 1rem) var(--sefin-spacing-md, 1rem) var(--sefin-spacing-xs, .5rem) var(--sefin-spacing-md, 1rem)}.sefin-sidebar__nav-section-header .sefin-sidebar__section-header-text{color:#828282;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__nav-sub-sub-list{list-style:none;margin:2px 0 8px;padding:0;animation:slideDown .2s ease-out;display:flex;flex-direction:column;gap:2px}.sefin-sidebar__nav-sub-sub-item{margin:0 0 2px}.sefin-sidebar__nav-link--sub-sub{width:100%;display:flex;align-items:center;gap:var(--sefin-spacing-md, .75rem);padding:var(--sefin-spacing-sm, .75rem) var(--sefin-spacing-md, 1rem);background:none;border:none;outline:none;text-align:left;cursor:pointer;color:#4f4f4f;font-size:var(--sefin-font-size-sm, .875rem);font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);transition:all .2s ease-in-out;position:relative;border-radius:12px;margin:0 var(--sefin-spacing-md, .5rem);justify-content:flex-start;overflow:hidden;min-width:0}.sefin-sidebar__nav-link--sub-sub:hover:not(.sefin-sidebar__nav-link--active){background:#e6f7fb;color:#55c3d8}.sefin-sidebar__nav-link--sub-sub:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-bullet{background:#55c3d8}.sefin-sidebar__nav-link--sub-sub:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-label{color:#55c3d8}.sefin-sidebar__nav-link--sub-sub:focus{outline:none}.sefin-sidebar__nav-link--sub-sub.sefin-sidebar__nav-link--active{background:linear-gradient(to right,#55c3d8,#4aafc4);color:#fff;font-weight:500;box-shadow:0 4px 6px #55c3d84d;border:none}.sefin-sidebar__nav-link--sub-sub.sefin-sidebar__nav-link--active .sefin-sidebar__nav-label{color:#fff}.sefin-sidebar__nav-bullet{width:6px;height:6px;border-radius:50%;background:#cecece;transition:background-color .2s ease-in-out;flex-shrink:0}.sefin-sidebar .sefin-sidebar__nav-link--sub-sub.sefin-sidebar__nav-link--active .sefin-sidebar__nav-bullet{display:none}@keyframes slideDown{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:1000px}}.sefin-sidebar.sefin-sidebar--collapsed{width:80px;min-width:80px}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-link{justify-content:center;padding:var(--sefin-spacing-md, 1rem);border-radius:12px;margin:0}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-label{opacity:0;width:0;overflow:hidden}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-expand-icon,.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-sub-list,.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-sub-sub-list{display:none}.sefin-sidebar.sefin-sidebar--mobile{transform:translate(-100%)}.sefin-sidebar.sefin-sidebar--mobile.sefin-sidebar--open{transform:translate(0)}@media(max-width:768px){.sefin-sidebar{transform:translate(-100%)}.sefin-sidebar.sefin-sidebar--open{transform:translate(0)}}\n"] }]
|
|
6298
|
+
args: [{ selector: 'sefin-sidebar', standalone: true, imports: [CommonModule, RouterModule], changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, template: "<!-- Overlay for mobile -->\n@if (effectiveIsMobile && isOpen) {\n <div\n class=\"sefin-sidebar__overlay\"\n (click)=\"handleOverlayClick()\"\n [attr.aria-hidden]=\"!isOpen\"\n role=\"presentation\"\n ></div>\n}\n\n<aside\n class=\"sefin-sidebar\"\n [class.sefin-sidebar--mobile]=\"effectiveIsMobile\"\n [class.sefin-sidebar--open]=\"isOpen\"\n [class.sefin-sidebar--collapsed]=\"isCollapsed && !effectiveIsMobile\"\n [attr.aria-hidden]=\"effectiveIsMobile && !isOpen\"\n>\n <div class=\"sefin-sidebar__header\">\n @if (!isCollapsed || effectiveIsMobile) {\n <div class=\"sefin-sidebar__header-content\">\n <div class=\"sefin-sidebar__header-icon-container\">\n <span class=\"sefin-sidebar__header-icon\" [innerHTML]=\"getIconSvg(headerIcon, 24)\"></span>\n </div>\n <div class=\"sefin-sidebar__header-text\">\n <h1 class=\"sefin-sidebar__header-title\">{{ headerTitle }}</h1>\n <span class=\"sefin-sidebar__header-subtitle\">{{ headerSubtitle }}</span>\n </div>\n </div>\n }\n @if (effectiveIsMobile) {\n <button\n type=\"button\"\n class=\"sefin-sidebar__close-button\"\n (click)=\"handleClose()\"\n aria-label=\"Close sidebar\"\n >\n <span class=\"sefin-sidebar__close-icon\" [innerHTML]=\"getIconSvg('x', 20)\"></span>\n </button>\n }\n @if (!effectiveIsMobile) {\n <button\n type=\"button\"\n class=\"sefin-sidebar__toggle\"\n (click)=\"handleToggleCollapse()\"\n [attr.aria-label]=\"isCollapsed ? 'Expand sidebar' : 'Collapse sidebar'\"\n [attr.aria-expanded]=\"!isCollapsed\"\n >\n <span class=\"sefin-sidebar__toggle-icon\" [innerHTML]=\"getIconSvg(isCollapsed ? 'chevron-right' : 'chevron-left', 16)\"></span>\n </button>\n }\n </div>\n\n <nav class=\"sefin-sidebar__nav\">\n <ul class=\"sefin-sidebar__nav-list\">\n @for (item of navItems; track item.label) {\n <li class=\"sefin-sidebar__nav-item\" [class.sefin-sidebar__nav-item--has-children]=\"hasChildren(item)\">\n <!-- Parent item -->\n <button\n type=\"button\"\n class=\"sefin-sidebar__nav-link\"\n [class.sefin-sidebar__nav-link--expandable]=\"hasChildren(item)\"\n [class.sefin-sidebar__nav-link--expanded]=\"item.expanded\"\n [class.sefin-sidebar__nav-link--active]=\"hasActiveChild(item, currentRoute)\"\n [attr.aria-expanded]=\"hasChildren(item) ? item.expanded : null\"\n [attr.aria-label]=\"isCollapsed && !effectiveIsMobile ? item.label : null\"\n (click)=\"hasChildren(item) ? toggleExpand(item) : navigate(item.route || '')\"\n >\n @if (item.icon) {\n <div class=\"sefin-sidebar__nav-icon-wrapper\">\n <span class=\"sefin-sidebar__nav-icon\" [innerHTML]=\"getIconSvg(item.icon, 20)\"></span>\n </div>\n }\n @if (!isCollapsed || effectiveIsMobile) {\n <span class=\"sefin-sidebar__nav-label\">{{ item.label }}</span>\n @if (hasChildren(item)) {\n <div class=\"sefin-sidebar__nav-expand-icon-wrapper\" [class.sefin-sidebar__nav-expand-icon-wrapper--expanded]=\"item.expanded\">\n <span class=\"sefin-sidebar__nav-expand-icon\" [innerHTML]=\"getIconSvg('chevron-down', 16)\"></span>\n </div>\n }\n }\n </button>\n <!-- Children items -->\n @if (hasChildren(item) && item.expanded && (!isCollapsed || effectiveIsMobile)) {\n <ul class=\"sefin-sidebar__nav-sub-list\">\n @for (child of item.children; track child.label) {\n <li class=\"sefin-sidebar__nav-sub-item\" [class.sefin-sidebar__nav-sub-item--has-children]=\"hasChildren(child)\">\n <!-- Level 1: Section headers (non-clickable) -->\n <div class=\"sefin-sidebar__nav-section-header\">\n <span class=\"sefin-sidebar__section-header-text\">{{ child.label }}</span>\n </div>\n <!-- Level 2: Grandchildren items (clickable with bullets) -->\n @if (hasChildren(child)) {\n <ul class=\"sefin-sidebar__nav-sub-sub-list\">\n @for (grandchild of child.children; track grandchild.label) {\n <li class=\"sefin-sidebar__nav-sub-sub-item\">\n <button\n type=\"button\"\n class=\"sefin-sidebar__nav-link sefin-sidebar__nav-link--sub-sub\"\n [class.sefin-sidebar__nav-link--active]=\"isActive(grandchild.route || '')\"\n [attr.aria-current]=\"isActive(grandchild.route || '') ? 'page' : null\"\n (click)=\"navigate(grandchild.route || '')\"\n >\n @if (!isActive(grandchild.route || '')) {\n <div class=\"sefin-sidebar__nav-bullet\"></div>\n }\n <span class=\"sefin-sidebar__nav-label\">{{ grandchild.label }}</span>\n </button>\n </li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n </nav>\n \n @if (showFooter) {\n <div class=\"sefin-sidebar__footer\">\n <div class=\"sefin-sidebar__footer-content\">\n <span class=\"sefin-sidebar__footer-text\">{{ footerVersion }}</span>\n </div>\n </div>\n }\n</aside>\n", styles: [".sefin-sidebar{width:288px;min-width:288px;height:100vh;background:#fff;border-right:1px solid #e8e8e8;display:flex;flex-direction:column;position:fixed;left:0;top:0;z-index:100;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);transition:width .3s ease-in-out,transform .3s ease-in-out}.sefin-sidebar__header{padding:var(--sefin-spacing-xl, 1.5rem);border-bottom:1px solid #e8e8e8;display:flex;align-items:center;position:relative;background:linear-gradient(to right,#55c3d8,#4aafc4);min-height:auto}.sefin-sidebar__header .sefin-sidebar__header-content{display:flex;align-items:center;gap:var(--sefin-spacing-md, .75rem);width:100%}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-icon-container{width:40px;height:40px;border-radius:12px;background:#fff3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;flex-shrink:0}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-icon-container .sefin-sidebar__header-icon{color:#fff;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-icon-container .sefin-sidebar__header-icon svg{width:24px;height:24px;color:#fff;fill:none;stroke:currentColor}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text{display:flex;flex-direction:column;gap:0}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text .sefin-sidebar__header-title{color:#fff;font-size:18px;font-weight:700;line-height:1.2;margin:0;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text .sefin-sidebar__header-subtitle{color:#fffc;font-size:12px;line-height:1.2;margin:0;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__header:after{content:\"\";position:absolute;right:-20px;top:50%;transform:translateY(-50%);width:56px;height:56px;z-index:100;pointer-events:none}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__header{padding:var(--sefin-spacing-xl, 1.5rem) var(--sefin-spacing-sm, .5rem);justify-content:center}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__header .sefin-sidebar__header-content{flex-direction:column}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__header .sefin-sidebar__header-content .sefin-sidebar__header-text{display:none}.sefin-sidebar__footer{padding:var(--sefin-spacing-md, 1rem);border-top:1px solid #e8e8e8}.sefin-sidebar__footer .sefin-sidebar__footer-content{background:#f5f5f5;border-radius:8px;padding:var(--sefin-spacing-sm, .75rem);text-align:center}.sefin-sidebar__footer .sefin-sidebar__footer-content .sefin-sidebar__footer-text{color:#828282;font-size:12px;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__toggle{position:absolute;right:-18px;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:50%;border:none;background:linear-gradient(135deg,#fff,#f8f9fa);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 8px #0000001a,0 0 0 1px #0000000d,inset 0 1px #ffffffe6;transition:all .3s cubic-bezier(.4,0,.2,1);z-index:101;color:var(--sefin-color-text, #4a5568);padding:0;margin:0;line-height:0}.sefin-sidebar__toggle .sefin-sidebar__toggle-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0;transition:transform .3s cubic-bezier(.4,0,.2,1);pointer-events:none}.sefin-sidebar__toggle .sefin-sidebar__toggle-icon svg{width:18px;height:18px;color:currentColor;fill:none;stroke:currentColor;pointer-events:none}.sefin-sidebar__toggle:before{content:\"\";position:absolute;inset:0;border-radius:50%;background:linear-gradient(135deg,rgba(255,255,255,.3) 0%,transparent 50%);pointer-events:none;opacity:.5}.sefin-sidebar__toggle:hover{background:linear-gradient(135deg,#55c3d8,#4db8cc);color:#fff;transform:translateY(-50%) scale(1.08);box-shadow:0 4px 20px #55c3d866,0 0 0 1px #55c3d833,inset 0 1px #ffffff4d}.sefin-sidebar__toggle:hover:before{opacity:.2;background:linear-gradient(135deg,rgba(255,255,255,.4) 0%,transparent 50%)}.sefin-sidebar__toggle:hover .sefin-sidebar__toggle-icon{transform:scale(1.1)}.sefin-sidebar__toggle:active{transform:translateY(-50%) scale(1.02);box-shadow:0 2px 12px #55c3d880,0 0 0 1px #55c3d84d,inset 0 2px 4px #0000001a}.sefin-sidebar__toggle:focus{outline:2px solid var(--sefin-color-primary, #55c3d8);outline-offset:4px;outline-style:solid}.sefin-sidebar--collapsed .sefin-sidebar__toggle{right:-18px}.sefin-sidebar__close-button{position:absolute;right:var(--sefin-spacing-md, 1rem);top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:50%;border:none;background:#fff3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease-in-out;z-index:101;color:#fff;padding:0;margin:0;line-height:0}.sefin-sidebar__close-button .sefin-sidebar__close-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex-shrink:0;pointer-events:none}.sefin-sidebar__close-button .sefin-sidebar__close-icon svg{width:20px;height:20px;color:currentColor;fill:none;stroke:currentColor;stroke-width:2;pointer-events:none}.sefin-sidebar__close-button:hover{background:#ffffff4d;transform:translateY(-50%) scale(1.05)}.sefin-sidebar__close-button:active{transform:translateY(-50%) scale(.95)}.sefin-sidebar__close-button:focus{outline:2px solid rgba(255,255,255,.5);outline-offset:2px}.sefin-sidebar__nav{flex:1;padding:var(--sefin-spacing-sm, .75rem);overflow:hidden}.sefin-sidebar__nav-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.sefin-sidebar__nav-item{margin:0}.sefin-sidebar__nav-item.sefin-sidebar__nav-item--has-children{margin-bottom:4px}.sefin-sidebar__nav-link{width:100%;display:flex;align-items:center;gap:var(--sefin-spacing-md, .75rem);padding:var(--sefin-spacing-sm, .75rem) var(--sefin-spacing-md, 1rem);background:none;border:none;outline:none;text-align:left;cursor:pointer;color:#383838;font-size:var(--sefin-font-size-base, 1rem);font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);transition:all .2s ease-in-out;position:relative;border-radius:12px;margin:0;justify-content:flex-start;overflow:hidden;min-width:0;font-weight:500}.sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active){background:#e6f7fb;color:#55c3d8}.sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-label{color:#55c3d8}.sefin-sidebar__nav-link:focus{outline:none}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--active{background:linear-gradient(to right,#55c3d8,#4aafc4);color:#fff;font-weight:500;box-shadow:0 4px 6px #55c3d84d;border:none}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-label{color:#fff}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--expandable{font-weight:500}.sefin-sidebar__nav-icon-wrapper{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;border-radius:8px;background:#e6f7fb;transition:all .2s ease-in-out}.sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px}.sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{width:20px;height:20px;color:#55c3d8;fill:none;stroke:currentColor}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-icon-wrapper{background:#fff3}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{color:#fff;fill:none;stroke:currentColor}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active:hover .sefin-sidebar__nav-icon-wrapper{background:#fff3}.sefin-sidebar .sefin-sidebar__nav-link.sefin-sidebar__nav-link--active:hover .sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{color:#fff;fill:none;stroke:currentColor}.sefin-sidebar .sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-icon-wrapper{background:#55c3d8}.sefin-sidebar .sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-icon-wrapper .sefin-sidebar__nav-icon svg{color:#fff;fill:none;stroke:currentColor}.sefin-sidebar__nav-expand-icon-wrapper{margin-left:auto;transition:transform .2s ease;display:flex;align-items:center;justify-content:center}.sefin-sidebar__nav-expand-icon-wrapper.sefin-sidebar__nav-expand-icon-wrapper--expanded{transform:rotate(180deg)}.sefin-sidebar__nav-expand-icon-wrapper .sefin-sidebar__nav-expand-icon svg{color:#828282;width:16px;height:16px;fill:none;stroke:currentColor;transition:color .2s ease-in-out}.sefin-sidebar__nav-link.sefin-sidebar__nav-link--active .sefin-sidebar__nav-expand-icon-wrapper .sefin-sidebar__nav-expand-icon svg{color:#fff}.sefin-sidebar__nav-link:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-expand-icon-wrapper .sefin-sidebar__nav-expand-icon svg{color:#55c3d8}.sefin-sidebar__nav-label{flex:1;white-space:normal;word-wrap:break-word;overflow-wrap:break-word;opacity:1;transition:opacity .2s ease;min-width:0;overflow:hidden;display:block;line-height:1.4;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__nav-sub-list{list-style:none;margin:4px 0 8px;padding:0;animation:slideDown .2s ease-out}.sefin-sidebar__nav-sub-item{margin:0 0 2px}.sefin-sidebar__nav-sub-item.sefin-sidebar__nav-sub-item--has-children{margin-bottom:4px}.sefin-sidebar__nav-section-header{padding:var(--sefin-spacing-md, 1rem) var(--sefin-spacing-md, 1rem) var(--sefin-spacing-xs, .5rem) var(--sefin-spacing-md, 1rem)}.sefin-sidebar__nav-section-header .sefin-sidebar__section-header-text{color:#828282;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.sefin-sidebar__nav-sub-sub-list{list-style:none;margin:2px 0 8px;padding:0;animation:slideDown .2s ease-out;display:flex;flex-direction:column;gap:2px}.sefin-sidebar__nav-sub-sub-item{margin:0 0 2px}.sefin-sidebar__nav-link--sub-sub{width:100%;display:flex;align-items:center;gap:var(--sefin-spacing-md, .75rem);padding:var(--sefin-spacing-sm, .75rem) var(--sefin-spacing-md, 1rem);background:none;border:none;outline:none;text-align:left;cursor:pointer;color:#4f4f4f;font-size:var(--sefin-font-size-sm, .875rem);font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);transition:all .2s ease-in-out;position:relative;border-radius:12px;margin:0 var(--sefin-spacing-md, .5rem);justify-content:flex-start;overflow:hidden;min-width:0}.sefin-sidebar__nav-link--sub-sub:hover:not(.sefin-sidebar__nav-link--active){background:#e6f7fb;color:#55c3d8}.sefin-sidebar__nav-link--sub-sub:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-bullet{background:#55c3d8}.sefin-sidebar__nav-link--sub-sub:hover:not(.sefin-sidebar__nav-link--active) .sefin-sidebar__nav-label{color:#55c3d8}.sefin-sidebar__nav-link--sub-sub:focus{outline:none}.sefin-sidebar__nav-link--sub-sub.sefin-sidebar__nav-link--active{background:linear-gradient(to right,#55c3d8,#4aafc4);color:#fff;font-weight:500;box-shadow:0 4px 6px #55c3d84d;border:none}.sefin-sidebar__nav-link--sub-sub.sefin-sidebar__nav-link--active .sefin-sidebar__nav-label{color:#fff}.sefin-sidebar__nav-bullet{width:6px;height:6px;border-radius:50%;background:#cecece;transition:background-color .2s ease-in-out;flex-shrink:0}.sefin-sidebar .sefin-sidebar__nav-link--sub-sub.sefin-sidebar__nav-link--active .sefin-sidebar__nav-bullet{display:none}@keyframes slideDown{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:1000px}}.sefin-sidebar.sefin-sidebar--collapsed{width:80px;min-width:80px}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-link{justify-content:center;padding:var(--sefin-spacing-md, 1rem);border-radius:12px;margin:0}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-label{opacity:0;width:0;overflow:hidden}.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-expand-icon,.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-sub-list,.sefin-sidebar.sefin-sidebar--collapsed .sefin-sidebar__nav-sub-sub-list{display:none}.sefin-sidebar.sefin-sidebar--mobile{transform:translate(-100%);z-index:1000}.sefin-sidebar.sefin-sidebar--mobile.sefin-sidebar--open{transform:translate(0)}.sefin-sidebar__overlay{position:fixed;inset:0;background:#00000080;z-index:999;animation:fadeIn .2s ease-in-out;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@media(max-width:768px){.sefin-sidebar{display:none}}\n"] }]
|
|
6216
6299
|
}], ctorParameters: () => [{ type: i1$2.Router }, { type: i0.ChangeDetectorRef }, { type: i1$1.DomSanitizer }], propDecorators: { navItems: [{
|
|
6217
6300
|
type: Input
|
|
6218
6301
|
}], isMobile: [{
|
|
@@ -6233,12 +6316,106 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
6233
6316
|
type: Input
|
|
6234
6317
|
}], toggleCollapse: [{
|
|
6235
6318
|
type: Output
|
|
6319
|
+
}], toggleOpen: [{
|
|
6320
|
+
type: Output
|
|
6321
|
+
}], close: [{
|
|
6322
|
+
type: Output
|
|
6323
|
+
}], handleEscapeKey: [{
|
|
6324
|
+
type: HostListener,
|
|
6325
|
+
args: ['document:keydown', ['$event']]
|
|
6236
6326
|
}] } });
|
|
6237
6327
|
|
|
6238
6328
|
/**
|
|
6239
6329
|
* Sidebar component exports
|
|
6240
6330
|
*/
|
|
6241
6331
|
|
|
6332
|
+
class DrawerComponent {
|
|
6333
|
+
/** Drawer open state */
|
|
6334
|
+
isOpen = false;
|
|
6335
|
+
/** Drawer position/anchor (left, right, top, bottom) */
|
|
6336
|
+
position = 'left';
|
|
6337
|
+
/** Drawer width (for left/right positions) */
|
|
6338
|
+
width = '288px';
|
|
6339
|
+
/** Drawer height (for top/bottom positions) */
|
|
6340
|
+
height = '300px';
|
|
6341
|
+
/** Whether to show overlay backdrop */
|
|
6342
|
+
showOverlay = true;
|
|
6343
|
+
/** Whether to close on overlay click */
|
|
6344
|
+
closeOnOverlayClick = true;
|
|
6345
|
+
/** Whether to close on escape key */
|
|
6346
|
+
closeOnEscape = true;
|
|
6347
|
+
/** Close event */
|
|
6348
|
+
close = new EventEmitter();
|
|
6349
|
+
/** Overlay click handler */
|
|
6350
|
+
handleOverlayClick() {
|
|
6351
|
+
if (this.isOpen && this.closeOnOverlayClick) {
|
|
6352
|
+
this.handleClose();
|
|
6353
|
+
}
|
|
6354
|
+
}
|
|
6355
|
+
/** Close handler */
|
|
6356
|
+
handleClose() {
|
|
6357
|
+
this.close.emit();
|
|
6358
|
+
}
|
|
6359
|
+
/** Escape key handler */
|
|
6360
|
+
handleEscapeKey(event) {
|
|
6361
|
+
if (event.key === 'Escape' && this.isOpen && this.closeOnEscape) {
|
|
6362
|
+
event.preventDefault();
|
|
6363
|
+
this.handleClose();
|
|
6364
|
+
}
|
|
6365
|
+
}
|
|
6366
|
+
/** Get drawer container classes */
|
|
6367
|
+
get drawerClasses() {
|
|
6368
|
+
const classes = ['sefin-drawer'];
|
|
6369
|
+
classes.push(`sefin-drawer--${this.position}`);
|
|
6370
|
+
if (this.isOpen) {
|
|
6371
|
+
classes.push('sefin-drawer--open');
|
|
6372
|
+
}
|
|
6373
|
+
return classes.join(' ');
|
|
6374
|
+
}
|
|
6375
|
+
/** Get drawer container styles */
|
|
6376
|
+
get drawerStyles() {
|
|
6377
|
+
const styles = {};
|
|
6378
|
+
if (this.position === 'left' || this.position === 'right') {
|
|
6379
|
+
styles['width'] = this.width;
|
|
6380
|
+
styles['max-width'] = '90vw';
|
|
6381
|
+
}
|
|
6382
|
+
else {
|
|
6383
|
+
styles['height'] = this.height;
|
|
6384
|
+
styles['max-height'] = '90vh';
|
|
6385
|
+
}
|
|
6386
|
+
return styles;
|
|
6387
|
+
}
|
|
6388
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: DrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6389
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: DrawerComponent, isStandalone: true, selector: "sefin-drawer", inputs: { isOpen: "isOpen", position: "position", width: "width", height: "height", showOverlay: "showOverlay", closeOnOverlayClick: "closeOnOverlayClick", closeOnEscape: "closeOnEscape" }, outputs: { close: "close" }, host: { listeners: { "document:keydown": "handleEscapeKey($event)" } }, ngImport: i0, template: "<!-- Overlay for drawer -->\n@if (isOpen && showOverlay) {\n <div\n class=\"sefin-drawer__overlay\"\n (click)=\"handleOverlayClick()\"\n [attr.aria-hidden]=\"!isOpen\"\n role=\"presentation\"\n ></div>\n}\n\n<aside\n [class]=\"drawerClasses\"\n [ngStyle]=\"drawerStyles\"\n [attr.aria-hidden]=\"!isOpen\"\n role=\"dialog\"\n [attr.aria-modal]=\"isOpen\"\n>\n <div class=\"sefin-drawer__content\">\n <ng-content></ng-content>\n </div>\n</aside>\n", styles: [".sefin-drawer{position:fixed;z-index:1000;background:#fff;display:flex;flex-direction:column;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);box-shadow:0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f,0 5px 5px -3px #0003;transition:transform .3s ease-in-out}.sefin-drawer.sefin-drawer--left{top:0;left:0;height:100vh;width:288px;border-right:1px solid #e8e8e8;transform:translate(-100%)}.sefin-drawer.sefin-drawer--left.sefin-drawer--open{transform:translate(0)}.sefin-drawer.sefin-drawer--right{top:0;right:0;height:100vh;width:288px;border-left:1px solid #e8e8e8;transform:translate(100%)}.sefin-drawer.sefin-drawer--right.sefin-drawer--open{transform:translate(0)}.sefin-drawer.sefin-drawer--top{top:0;left:0;right:0;width:100vw;height:300px;border-bottom:1px solid #e8e8e8;transform:translateY(-100%)}.sefin-drawer.sefin-drawer--top.sefin-drawer--open{transform:translateY(0)}.sefin-drawer.sefin-drawer--bottom{bottom:0;left:0;right:0;width:100vw;height:300px;border-top:1px solid #e8e8e8;transform:translateY(100%)}.sefin-drawer.sefin-drawer--bottom.sefin-drawer--open{transform:translateY(0)}.sefin-drawer__content{flex:1;overflow:auto;display:flex;flex-direction:column;height:100%}.sefin-drawer__overlay{position:fixed;inset:0;background:#00000080;z-index:999;animation:fadeIn .2s ease-in-out;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
6390
|
+
}
|
|
6391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: DrawerComponent, decorators: [{
|
|
6392
|
+
type: Component,
|
|
6393
|
+
args: [{ selector: 'sefin-drawer', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!-- Overlay for drawer -->\n@if (isOpen && showOverlay) {\n <div\n class=\"sefin-drawer__overlay\"\n (click)=\"handleOverlayClick()\"\n [attr.aria-hidden]=\"!isOpen\"\n role=\"presentation\"\n ></div>\n}\n\n<aside\n [class]=\"drawerClasses\"\n [ngStyle]=\"drawerStyles\"\n [attr.aria-hidden]=\"!isOpen\"\n role=\"dialog\"\n [attr.aria-modal]=\"isOpen\"\n>\n <div class=\"sefin-drawer__content\">\n <ng-content></ng-content>\n </div>\n</aside>\n", styles: [".sefin-drawer{position:fixed;z-index:1000;background:#fff;display:flex;flex-direction:column;font-family:var(--sefin-font-family-base, \"Pluto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);box-shadow:0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f,0 5px 5px -3px #0003;transition:transform .3s ease-in-out}.sefin-drawer.sefin-drawer--left{top:0;left:0;height:100vh;width:288px;border-right:1px solid #e8e8e8;transform:translate(-100%)}.sefin-drawer.sefin-drawer--left.sefin-drawer--open{transform:translate(0)}.sefin-drawer.sefin-drawer--right{top:0;right:0;height:100vh;width:288px;border-left:1px solid #e8e8e8;transform:translate(100%)}.sefin-drawer.sefin-drawer--right.sefin-drawer--open{transform:translate(0)}.sefin-drawer.sefin-drawer--top{top:0;left:0;right:0;width:100vw;height:300px;border-bottom:1px solid #e8e8e8;transform:translateY(-100%)}.sefin-drawer.sefin-drawer--top.sefin-drawer--open{transform:translateY(0)}.sefin-drawer.sefin-drawer--bottom{bottom:0;left:0;right:0;width:100vw;height:300px;border-top:1px solid #e8e8e8;transform:translateY(100%)}.sefin-drawer.sefin-drawer--bottom.sefin-drawer--open{transform:translateY(0)}.sefin-drawer__content{flex:1;overflow:auto;display:flex;flex-direction:column;height:100%}.sefin-drawer__overlay{position:fixed;inset:0;background:#00000080;z-index:999;animation:fadeIn .2s ease-in-out;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}\n"] }]
|
|
6394
|
+
}], propDecorators: { isOpen: [{
|
|
6395
|
+
type: Input
|
|
6396
|
+
}], position: [{
|
|
6397
|
+
type: Input
|
|
6398
|
+
}], width: [{
|
|
6399
|
+
type: Input
|
|
6400
|
+
}], height: [{
|
|
6401
|
+
type: Input
|
|
6402
|
+
}], showOverlay: [{
|
|
6403
|
+
type: Input
|
|
6404
|
+
}], closeOnOverlayClick: [{
|
|
6405
|
+
type: Input
|
|
6406
|
+
}], closeOnEscape: [{
|
|
6407
|
+
type: Input
|
|
6408
|
+
}], close: [{
|
|
6409
|
+
type: Output
|
|
6410
|
+
}], handleEscapeKey: [{
|
|
6411
|
+
type: HostListener,
|
|
6412
|
+
args: ['document:keydown', ['$event']]
|
|
6413
|
+
}] } });
|
|
6414
|
+
|
|
6415
|
+
/**
|
|
6416
|
+
* Drawer component exports
|
|
6417
|
+
*/
|
|
6418
|
+
|
|
6242
6419
|
/**
|
|
6243
6420
|
* Organisms index
|
|
6244
6421
|
*/
|
|
@@ -6254,5 +6431,5 @@ const STYLES_PATH = './styles/index.scss';
|
|
|
6254
6431
|
* Generated bundle index. Do not edit.
|
|
6255
6432
|
*/
|
|
6256
6433
|
|
|
6257
|
-
export { AccordionItemComponent, AlertComponent, AutocompleteComponent, AvatarComponent, BORDER_RADIUS_TOKENS, BRAND_THEME, BadgeComponent, BreadcrumbsComponent, ButtonComponent, ButtonGroupComponent, COLOR_TOKENS, CardComponent, CheckboxComponent, ChipComponent, ContainerComponent, DARK_THEME, DESIGN_TOKENS, DatepickerComponent, DividerComponent, FabButtonComponent, FormFieldComponent, IconButtonComponent, IconComponent, ImageComponent, LIGHT_THEME, LinkComponent, PaginationComponent, ProgressBarComponent, RadioComponent, RateComponent, SHADOW_TOKENS, SPACING_TOKENS, STYLES_PATH, SelectComponent, SidebarComponent, SpacerComponent, SpinnerComponent, StackComponent, SwitchComponent, TYPOGRAPHY_TOKENS, TabComponent, TableComponent, TagComponent, TextFieldComponent, TextareaComponent, ThemeLoader, ToastComponent, TooltipComponent, TypographyComponent, buildDisplayedColumns };
|
|
6434
|
+
export { AccordionItemComponent, AlertComponent, AutocompleteComponent, AvatarComponent, BORDER_RADIUS_TOKENS, BRAND_THEME, BadgeComponent, BreadcrumbsComponent, ButtonComponent, ButtonGroupComponent, COLOR_TOKENS, CardComponent, CheckboxComponent, ChipComponent, ContainerComponent, DARK_THEME, DESIGN_TOKENS, DatepickerComponent, DividerComponent, DrawerComponent, FabButtonComponent, FormFieldComponent, IconButtonComponent, IconComponent, ImageComponent, LIGHT_THEME, LinkComponent, PaginationComponent, ProgressBarComponent, RadioComponent, RateComponent, SHADOW_TOKENS, SPACING_TOKENS, STYLES_PATH, SelectComponent, SidebarComponent, SpacerComponent, SpinnerComponent, StackComponent, SwitchComponent, TYPOGRAPHY_TOKENS, TabComponent, TableComponent, TagComponent, TextFieldComponent, TextareaComponent, ThemeLoader, ToastComponent, TooltipComponent, TypographyComponent, buildDisplayedColumns };
|
|
6258
6435
|
//# sourceMappingURL=lesterarte-sefin-ui.mjs.map
|