@akveo/nga-theme
Version:
@akveo/nga-theme
156 lines (155 loc) • 4.43 kB
TypeScript
/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
import { OnInit, OnDestroy } from '@angular/core';
import { NgaSidebarService } from './sidebar.service';
/**
* Sidebar header container.
*
* Placeholder which contains a sidebar header content,
* placed at the very top of the sidebar outside of the scroll area.
*/
export declare class NgaSidebarHeaderComponent {
}
/**
* Sidebar content container.
*
* Placeholder which contains a sidebar main content.
*/
export declare class NgaSidebarContentComponent {
}
/**
* Sidebar footer container.
*
* Placeholder which contains a sidebar footer content,
* placed at the very bottom of the sidebar outside of the scroll area.
*/
export declare class NgaSidebarFooterComponent {
}
/**
* Main sidebar component.
*
* Sidebar can be place on the left or right side of the layout, can be fixed (shown above the content)
* or can push the layout when opened.
*
* @styles Available component styles
*
* $nga-sidebar-foreground: $nga-foreground-inverse !default;
* $nga-sidebar-background: $nga-background-inverse !default;
* $nga-sidebar-height: 100vh !default;
* $nga-sidebar-width: 12rem !default;
* $nga-sidebar-width-compact: 4rem !default;
* $nga-sidebar-padding: $nga-padding !default;
* $nga-sidebar-header-height: 3.5rem !default;
* $nga-sidebar-footer-height: 3.5rem !default;
*
* @example Min sidebar example
*
* ```
* <nga-sidebar><nga-sidebar-content>Sidebar content</nga-sidebar-content></nga-sidebar>
* ```
*
* @example Fixed sidebar
*
* Example of fixed sidebar located on the left side, initially collapsed.
*
* ```
* <nga-sidebar left fixed state="collapsed">
* <nga-sidebar-header>Header</nga-sidebar-header>
* <nga-sidebar-content>
* Menu or another component here
* </nga-sidebar-content>
* <nga-sidebar-footer>
* Footer components here
* </nga-sidebar-footer>
* </nga-sidebar>
* ```
*/
export declare class NgaSidebarComponent implements OnInit, OnDestroy {
private sidebarService;
static readonly STATE_EXPANDED: string;
static readonly STATE_COLLAPSED: string;
static readonly STATE_COMPACTED: string;
protected stateValue: string;
fixedValue: boolean;
rightValue: boolean;
leftValue: boolean;
readonly expanded: boolean;
readonly collapsed: boolean;
readonly compacted: boolean;
/**
* Places sidebar on the left side
* @type {boolean}
*/
right: boolean;
/**
* Places sidebar on the right side
* @type {boolean}
*/
left: boolean;
/**
* Makes sidebar fixed (shown above the layout content)
* @type {boolean}
*/
fixed: boolean;
/**
* Initial sidebar state, `expanded`|`collapsed`|`compacted`
* @type {string}
*/
state: string;
/**
* Tags a sidebar with some ID, can be later used in sidebar service
* to determine which sidebar triggered the action, if multiple sidebars exist on the page.
*
* @type {string}
*/
tag: string;
private toggleSubscription;
private expandSubscription;
private collapseSubscription;
constructor(sidebarService: NgaSidebarService);
ngOnInit(): void;
ngOnDestroy(): void;
/**
* Some Static method
* // TODO: remove this
*
* @param {string} test
* @param {any} anotherOne
* @returns {number}
*/
static someTestMethod(test: string, anotherOne: any): number;
/**
* Returns some value
* // TODO: remove this
*
* @returns number
*/
returnSomeValue(): number;
/**
* Collapses the sidebar
*/
collapse(): void;
/**
* Expands the sidebar
*/
expand(): void;
/**
* Compacts the sidebar (minimizes)
*/
compact(): void;
/**
* Toggles sidebar state (expanded|collapsed|compacted)
* @param {boolean} compact If true, then sidebar state will be changed between expanded & compacted,
* otherwise - between expanded & collapsed. False by default.
*
* @example Toggle sidebar state
*
* ```
* this.sidebar.toggle(true);
* ```
*/
toggle(compact?: boolean): void;
}