@rubeusteam/rb-angular-components 0.0.1-dev.1 → 0.0.2-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/rubeusteam-rb-angular-components.mjs +749 -29
- package/fesm2022/rubeusteam-rb-angular-components.mjs.map +1 -1
- package/lib/components/rb-header/rb-header.component.d.ts +42 -0
- package/lib/components/rb-help-panel/rb-help-panel.component.d.ts +28 -0
- package/lib/components/rb-sidebar-navigation/rb-sidebar-navigation.component.d.ts +81 -0
- package/lib/directives/rb-overflow-tooltip/rb-overflow-tooltip.directive.d.ts +14 -0
- package/lib/interfaces/rb-header.interface.d.ts +19 -0
- package/lib/interfaces/rb-help-panel.interface.d.ts +17 -0
- package/lib/interfaces/rb-sidebar-navigation.interface.d.ts +19 -0
- package/package.json +2 -2
- package/public-api.d.ts +7 -0
- package/src/lib/styles/README.md +0 -83
- package/src/lib/styles/_crud.scss +0 -34
- package/src/lib/styles/_dialog.scss +0 -59
- package/src/lib/styles/_layout.scss +0 -86
- package/src/lib/styles/_typography.scss +0 -62
- package/src/lib/styles/index.scss +0 -5
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, ElementRef } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
3
|
+
import { RbHeaderUserProfile, RbHeaderApp, RbHeaderProfileMenuItem } from '../../interfaces/rb-header.interface';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class RbHeaderComponent {
|
|
6
|
+
private sanitizer;
|
|
7
|
+
private changeDetectorRef;
|
|
8
|
+
private readonly document;
|
|
9
|
+
private readonly destroyRef;
|
|
10
|
+
pageTitle: string;
|
|
11
|
+
userProfile?: RbHeaderUserProfile;
|
|
12
|
+
appsList: RbHeaderApp[];
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
profileMenu: RbHeaderProfileMenuItem[];
|
|
15
|
+
onHelpClick: EventEmitter<void>;
|
|
16
|
+
onAppsClick: EventEmitter<void>;
|
|
17
|
+
onViewAllAppsClick: EventEmitter<void>;
|
|
18
|
+
onProfileMenuItemClick: EventEmitter<RbHeaderProfileMenuItem>;
|
|
19
|
+
onLogoutClick: EventEmitter<void>;
|
|
20
|
+
onProfileMenuClick: EventEmitter<void>;
|
|
21
|
+
isAppsMenuOpen: boolean;
|
|
22
|
+
isProfileMenuOpen: boolean;
|
|
23
|
+
appsMenuRef?: ElementRef;
|
|
24
|
+
appsButtonRef?: ElementRef;
|
|
25
|
+
appsContainerRef?: ElementRef<HTMLElement>;
|
|
26
|
+
profileButtonRef?: ElementRef;
|
|
27
|
+
profileMenuRef?: ElementRef;
|
|
28
|
+
constructor(sanitizer: DomSanitizer, changeDetectorRef: ChangeDetectorRef);
|
|
29
|
+
get rubeusApps(): RbHeaderApp[];
|
|
30
|
+
get nonRubeusApps(): RbHeaderApp[];
|
|
31
|
+
getSafeSvg(svgString?: string): SafeHtml | null;
|
|
32
|
+
private readonly handleDocumentPointerDown;
|
|
33
|
+
handleAppsClick(): void;
|
|
34
|
+
handleAppSelect(app: RbHeaderApp): void;
|
|
35
|
+
handleViewAllAppsClick(): void;
|
|
36
|
+
handleHelpClick(): void;
|
|
37
|
+
handleProfileClick(): void;
|
|
38
|
+
handleProfileMenuItemClick(item: RbHeaderProfileMenuItem): void;
|
|
39
|
+
handleLogoutClick(): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RbHeaderComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RbHeaderComponent, "rb-header", never, { "pageTitle": { "alias": "pageTitle"; "required": false; }; "userProfile": { "alias": "userProfile"; "required": false; }; "appsList": { "alias": "appsList"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "profileMenu": { "alias": "profileMenu"; "required": false; }; }, { "onHelpClick": "onHelpClick"; "onAppsClick": "onAppsClick"; "onViewAllAppsClick": "onViewAllAppsClick"; "onProfileMenuItemClick": "onProfileMenuItemClick"; "onLogoutClick": "onLogoutClick"; "onProfileMenuClick": "onProfileMenuClick"; }, never, never, true, never>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { RbHelpArticle, RbHelpIntegrationProvider } from '../../interfaces/rb-help-panel.interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class RbHelpPanelComponent implements OnInit, OnChanges {
|
|
5
|
+
private destroyRef;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
panelTitle: string;
|
|
8
|
+
routeContext?: string;
|
|
9
|
+
integrationProvider?: RbHelpIntegrationProvider;
|
|
10
|
+
onClose: EventEmitter<void>;
|
|
11
|
+
onClickKnowledgeBase: EventEmitter<void>;
|
|
12
|
+
onClickCommunity: EventEmitter<void>;
|
|
13
|
+
onClickNews: EventEmitter<void>;
|
|
14
|
+
onClickMyTickets: EventEmitter<void>;
|
|
15
|
+
onClickChat: EventEmitter<void>;
|
|
16
|
+
searchQuery: string;
|
|
17
|
+
articles: RbHelpArticle[];
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
private searchSubject;
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
22
|
+
loadInitialArticles(): void;
|
|
23
|
+
onSearchChange(query: string): void;
|
|
24
|
+
handleClose(): void;
|
|
25
|
+
openArticle(article: RbHelpArticle): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RbHelpPanelComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RbHelpPanelComponent, "rb-help-panel", never, { "isOpen": { "alias": "isOpen"; "required": false; }; "panelTitle": { "alias": "panelTitle"; "required": false; }; "routeContext": { "alias": "routeContext"; "required": false; }; "integrationProvider": { "alias": "integrationProvider"; "required": false; }; }, { "onClose": "onClose"; "onClickKnowledgeBase": "onClickKnowledgeBase"; "onClickCommunity": "onClickCommunity"; "onClickNews": "onClickNews"; "onClickMyTickets": "onClickMyTickets"; "onClickChat": "onClickChat"; }, never, never, true, never>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { RbSidebarNavigationItem } from '../../interfaces/rb-sidebar-navigation.interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class RbSidebarNavigationComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
5
|
+
private router;
|
|
6
|
+
private elementRef;
|
|
7
|
+
private routerSubscription?;
|
|
8
|
+
logoUrl: string;
|
|
9
|
+
logoTextUrl: string;
|
|
10
|
+
logoName: string;
|
|
11
|
+
private _items;
|
|
12
|
+
set items(value: RbSidebarNavigationItem[]);
|
|
13
|
+
get items(): RbSidebarNavigationItem[];
|
|
14
|
+
initiallyFixed: boolean;
|
|
15
|
+
private _secondaryItems;
|
|
16
|
+
private selectedSecondaryItemId;
|
|
17
|
+
secondaryTitle: string;
|
|
18
|
+
set secondaryItems(value: RbSidebarNavigationItem[]);
|
|
19
|
+
get secondaryItems(): RbSidebarNavigationItem[];
|
|
20
|
+
backgroundColor: string;
|
|
21
|
+
textColor: string;
|
|
22
|
+
activeTextColor: string;
|
|
23
|
+
hoverBackgroundColor: string;
|
|
24
|
+
private _width;
|
|
25
|
+
set width(value: string | number);
|
|
26
|
+
get width(): string | number;
|
|
27
|
+
set sidebarWidth(value: string | number);
|
|
28
|
+
get sidebarWidth(): string | number;
|
|
29
|
+
private _secondaryWidth;
|
|
30
|
+
set secondaryWidth(value: string | number);
|
|
31
|
+
get secondaryWidth(): string | number;
|
|
32
|
+
set secondarySidebarWidth(value: string | number);
|
|
33
|
+
get secondarySidebarWidth(): string | number;
|
|
34
|
+
private _closedWidth;
|
|
35
|
+
set closedWidth(value: string | number);
|
|
36
|
+
get closedWidth(): string | number;
|
|
37
|
+
private _sectionGap;
|
|
38
|
+
set sectionGap(value: string | number);
|
|
39
|
+
get sectionGap(): string | number;
|
|
40
|
+
get formattedWidth(): string;
|
|
41
|
+
get formattedSecondaryWidth(): string;
|
|
42
|
+
get formattedClosedWidth(): string;
|
|
43
|
+
get formattedSectionGap(): string;
|
|
44
|
+
private formatCssUnit;
|
|
45
|
+
toggleIcon: string;
|
|
46
|
+
itemClick: EventEmitter<RbSidebarNavigationItem>;
|
|
47
|
+
logoClick: EventEmitter<void | RbSidebarNavigationItem>;
|
|
48
|
+
isFixed: boolean;
|
|
49
|
+
isHovered: boolean;
|
|
50
|
+
isOverlayActive: boolean;
|
|
51
|
+
private hoverTimeout?;
|
|
52
|
+
private overlayCloseTimeout?;
|
|
53
|
+
get hasSecondary(): boolean;
|
|
54
|
+
private closePrimaryForSecondaryMenu;
|
|
55
|
+
private sortItems;
|
|
56
|
+
ngOnInit(): void;
|
|
57
|
+
ngAfterViewInit(): void;
|
|
58
|
+
get isOpen(): boolean;
|
|
59
|
+
set isOpen(value: boolean);
|
|
60
|
+
onMouseEnter(): void;
|
|
61
|
+
onMouseLeave(): void;
|
|
62
|
+
ngOnDestroy(): void;
|
|
63
|
+
toggleFixed(): void;
|
|
64
|
+
private finishOverlayAfterClosingTransition;
|
|
65
|
+
private clearHoverTimeout;
|
|
66
|
+
private clearOverlayCloseTimeout;
|
|
67
|
+
onLogoClicked(): void;
|
|
68
|
+
onItemClicked(item: RbSidebarNavigationItem): void;
|
|
69
|
+
toggleItem(item: RbSidebarNavigationItem): void;
|
|
70
|
+
isChildActive(item: RbSidebarNavigationItem): boolean;
|
|
71
|
+
isParentActive(item: RbSidebarNavigationItem): boolean;
|
|
72
|
+
isSecondaryItemActive(item: RbSidebarNavigationItem): boolean;
|
|
73
|
+
private isRouteActive;
|
|
74
|
+
getSectionTitleLabel(item: RbSidebarNavigationItem): string;
|
|
75
|
+
getNavItemLabel(item: RbSidebarNavigationItem): string;
|
|
76
|
+
getSubmenuItemLabel(item: RbSidebarNavigationItem): string;
|
|
77
|
+
scrollToActiveItem(smooth?: boolean): void;
|
|
78
|
+
private performScrollToActiveItem;
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RbSidebarNavigationComponent, never>;
|
|
80
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RbSidebarNavigationComponent, "rb-sidebar-navigation", never, { "logoUrl": { "alias": "logoUrl"; "required": false; }; "logoTextUrl": { "alias": "logoTextUrl"; "required": false; }; "logoName": { "alias": "logoName"; "required": false; }; "items": { "alias": "items"; "required": false; }; "initiallyFixed": { "alias": "initiallyFixed"; "required": false; }; "secondaryTitle": { "alias": "secondaryTitle"; "required": false; }; "secondaryItems": { "alias": "secondaryItems"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "textColor": { "alias": "textColor"; "required": false; }; "activeTextColor": { "alias": "activeTextColor"; "required": false; }; "hoverBackgroundColor": { "alias": "hoverBackgroundColor"; "required": false; }; "width": { "alias": "width"; "required": false; }; "sidebarWidth": { "alias": "sidebarWidth"; "required": false; }; "secondaryWidth": { "alias": "secondaryWidth"; "required": false; }; "secondarySidebarWidth": { "alias": "secondarySidebarWidth"; "required": false; }; "closedWidth": { "alias": "closedWidth"; "required": false; }; "sectionGap": { "alias": "sectionGap"; "required": false; }; "toggleIcon": { "alias": "toggleIcon"; "required": false; }; }, { "itemClick": "itemClick"; "logoClick": "logoClick"; }, never, never, true, never>;
|
|
81
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class RbOverflowTooltipDirective implements AfterViewInit, OnDestroy {
|
|
4
|
+
private readonly elementRef;
|
|
5
|
+
private readonly tooltip;
|
|
6
|
+
private resizeObserver?;
|
|
7
|
+
private mutationObserver?;
|
|
8
|
+
rbOverflowTooltip: string;
|
|
9
|
+
ngAfterViewInit(): void;
|
|
10
|
+
ngOnDestroy(): void;
|
|
11
|
+
updateTooltip(): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RbOverflowTooltipDirective, never>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RbOverflowTooltipDirective, "[rbOverflowTooltip]", never, { "rbOverflowTooltip": { "alias": "rbOverflowTooltip"; "required": false; }; }, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface RbHeaderUserProfile {
|
|
2
|
+
name: string;
|
|
3
|
+
base: string;
|
|
4
|
+
avatarUrl: string;
|
|
5
|
+
}
|
|
6
|
+
export interface RbHeaderApp {
|
|
7
|
+
name: string;
|
|
8
|
+
iconUrl?: string;
|
|
9
|
+
iconSvg?: string;
|
|
10
|
+
url?: string;
|
|
11
|
+
action?: () => void;
|
|
12
|
+
isRubeusApp?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface RbHeaderProfileMenuItem {
|
|
15
|
+
id?: string;
|
|
16
|
+
label: string;
|
|
17
|
+
iconSvg?: string;
|
|
18
|
+
iconUrl?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export interface RbHelpArticle {
|
|
3
|
+
id: string | number;
|
|
4
|
+
title: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
category?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface RbHelpIntegrationProvider {
|
|
9
|
+
/**
|
|
10
|
+
* Método para carregar artigos da página atual ao abrir o painel
|
|
11
|
+
*/
|
|
12
|
+
fetchInitialArticles(routeContext?: string): Observable<RbHelpArticle[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Método para pesquisar artigos no zendesk
|
|
15
|
+
*/
|
|
16
|
+
searchArticles(query: string): Observable<RbHelpArticle[]>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface RbSidebarNavigationItem {
|
|
2
|
+
id: string;
|
|
3
|
+
icon: string;
|
|
4
|
+
label: string;
|
|
5
|
+
route?: string;
|
|
6
|
+
action?: () => void;
|
|
7
|
+
children?: RbSidebarNavigationItem[];
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
isSectionTitle?: boolean;
|
|
10
|
+
hasDivider?: boolean;
|
|
11
|
+
usageCount?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface RbSidebarNavigationConfig {
|
|
14
|
+
logoUrl?: string;
|
|
15
|
+
logoName?: string;
|
|
16
|
+
items: RbSidebarNavigationItem[];
|
|
17
|
+
bottomButtonIconOpen?: string;
|
|
18
|
+
bottomButtonIconClosed?: string;
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rubeusteam/rb-angular-components",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.2-dev.1",
|
|
4
|
+
"description": "Correções e adições no componente de crud",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"angular",
|
package/public-api.d.ts
CHANGED
|
@@ -7,13 +7,20 @@ export * from './lib/components/rb-filter-dropdown/rb-filter-dropdown.component'
|
|
|
7
7
|
export * from './lib/components/rb-copy-confirm-dialog/rb-copy-confirm-dialog.component';
|
|
8
8
|
export * from './lib/components/rb-change-log-dialog/rb-change-log-dialog.component';
|
|
9
9
|
export * from './lib/components/rb-columns-sort-setting/rb-columns-sort-setting.component';
|
|
10
|
+
export * from './lib/components/rb-sidebar-navigation/rb-sidebar-navigation.component';
|
|
11
|
+
export * from './lib/components/rb-header/rb-header.component';
|
|
10
12
|
export * from './lib/pipes/rb-custom/rb-custom.pipe';
|
|
11
13
|
export * from './lib/pipes/rb-conditional-class/rb-conditional-class.pipe';
|
|
12
14
|
export * from './lib/pipes/is-array.pipe';
|
|
13
15
|
export * from './lib/directives/rb-dynamic-button/rb-dynamic-button.directive';
|
|
16
|
+
export * from './lib/directives/rb-overflow-tooltip/rb-overflow-tooltip.directive';
|
|
14
17
|
export * from './lib/interfaces/rb-crud.interface';
|
|
15
18
|
export * from './lib/interfaces/button.interface';
|
|
16
19
|
export * from './lib/interfaces/rb-dialog.interface';
|
|
17
20
|
export * from './lib/interfaces/rb-filter.interface';
|
|
18
21
|
export * from './lib/interfaces/rb-change-log-dialog.interface';
|
|
19
22
|
export * from './lib/interfaces/rb-conditional-class.interface';
|
|
23
|
+
export * from './lib/interfaces/rb-sidebar-navigation.interface';
|
|
24
|
+
export * from './lib/interfaces/rb-header.interface';
|
|
25
|
+
export * from './lib/interfaces/rb-help-panel.interface';
|
|
26
|
+
export * from './lib/components/rb-help-panel/rb-help-panel.component';
|
package/src/lib/styles/README.md
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Tipografia - rb-angular-components
|
|
3
|
-
|
|
4
|
-
No diretório styles, contém o arquivo `typography.scss` onde se define **tipografia** da biblioteca `rb-angular-components` contém as classes CSS responsáveis por estilizar os textos nos componentes. As classes estão baseadas no Rubeus Style Guide, que pode ser facilmente aplicado em qualquer elemento de texto na sua aplicação.
|
|
5
|
-
|
|
6
|
-
## Como utilizar
|
|
7
|
-
|
|
8
|
-
Existem duas formas de utilizar os estilos de tipografia: inserindo diretamente no arquivo `styles.scss` ou configurando no `angular.json`. Ambas as abordagens permitem que você use as classes de tipografia em toda a sua aplicação.
|
|
9
|
-
|
|
10
|
-
### Alternativa 1: Inserindo pelo `styles.scss`
|
|
11
|
-
|
|
12
|
-
A primeira alternativa é importar o arquivo de estilos diretamente no seu arquivo global de estilos, como o `styles.scss` ou `styles.css`. Para isso, basta adicionar a seguinte linha no início do seu arquivo:
|
|
13
|
-
|
|
14
|
-
```scss
|
|
15
|
-
@import 'node_modules/rb-angular-components/styles/typography.scss';
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Esta abordagem é a mais simples e é adequada para projetos que já possuem um arquivo global de estilos.
|
|
20
|
-
|
|
21
|
-
#### Exemplo de uso:
|
|
22
|
-
|
|
23
|
-
Após a importação do arquivo de tipografia no `styles.scss`, você pode usar as classes de tipografia diretamente nos elementos HTML do seu projeto.
|
|
24
|
-
|
|
25
|
-
```html
|
|
26
|
-
<div>
|
|
27
|
-
<h1 class="rb-h1">Título Principal</h1>
|
|
28
|
-
<p class="rb-font-body rb-large">Texto grande para o corpo.</p>
|
|
29
|
-
<p class="rb-font-body rb-medium">Texto médio para o corpo.</p>
|
|
30
|
-
<p class="rb-font-body rb-small">Texto pequeno para o corpo.</p>
|
|
31
|
-
<h2 class="rb-h2">Subtítulo</h2>
|
|
32
|
-
<p class="rb-font-body">Texto padrão no corpo.</p>
|
|
33
|
-
</div>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Alternativa 2: Inserindo pelo `angular.json`
|
|
37
|
-
|
|
38
|
-
A segunda alternativa é configurar os estilos diretamente no arquivo `angular.json`. Isso garante que o arquivo de tipografia seja carregado globalmente em toda a aplicação, sem a necessidade de importação manual no `styles.scss`.
|
|
39
|
-
|
|
40
|
-
Para isso, siga os seguintes passos:
|
|
41
|
-
|
|
42
|
-
1. Abra o arquivo `angular.json`.
|
|
43
|
-
2. Encontre a seção `"styles"` dentro do seu projeto, que fica em `projects -> <nome-do-projeto> -> architect -> build`.
|
|
44
|
-
3. Adicione o caminho do arquivo de tipografia na lista de estilos.
|
|
45
|
-
|
|
46
|
-
```json
|
|
47
|
-
{
|
|
48
|
-
"projects": {
|
|
49
|
-
"<nome-do-projeto>": {
|
|
50
|
-
"architect": {
|
|
51
|
-
"build": {
|
|
52
|
-
"styles": [
|
|
53
|
-
"src/styles.scss",
|
|
54
|
-
"node_modules/rb-angular-components/styles/typography.scss",
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Com isso, o arquivo de tipografia será carregado automaticamente, sem necessidade de importação explícita no `styles.scss`.
|
|
64
|
-
|
|
65
|
-
#### Exemplo de uso:
|
|
66
|
-
|
|
67
|
-
Após adicionar a referência no `angular.json`, você pode usar as classes de tipografia nos elementos HTML, assim como no exemplo anterior:
|
|
68
|
-
|
|
69
|
-
```html
|
|
70
|
-
<div>
|
|
71
|
-
<h1 class="rb-font-heading rb-h1">Título Principal</h1>
|
|
72
|
-
<p class="rb-font-body rb-large">Texto grande para o corpo.</p>
|
|
73
|
-
<p class="rb-font-body rb-medium">Texto médio para o corpo.</p>
|
|
74
|
-
<p class="rb-font-body rb-small">Texto pequeno para o corpo.</p>
|
|
75
|
-
<h2 class="rb-font-heading rb-h2">Subtítulo</h2>
|
|
76
|
-
<p class="rb-font-body">Texto padrão no corpo.</p>
|
|
77
|
-
</div>
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Conclusão
|
|
81
|
-
|
|
82
|
-
As classes de tipografia são uma maneira prática e simples de garantir consistência visual no seu projeto. Você pode escolher a melhor abordagem para seu caso, seja inserindo os estilos pelo `styles.scss` ou configurando no `angular.json`. Ambas as opções oferecem flexibilidade e facilidade de manutenção.
|
|
83
|
-
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
.rb-menu-crud .mat-mdc-menu-content{
|
|
2
|
-
background: #F8FAF9;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.rb-menu-crud .mat-menu-item,
|
|
6
|
-
.rb-menu-crud .mat-mdc-menu-item {
|
|
7
|
-
color: #2E3131;
|
|
8
|
-
font-style: normal;
|
|
9
|
-
font-weight: 400;
|
|
10
|
-
line-height: var(24px);
|
|
11
|
-
letter-spacing: var(0.5px);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.rb-menu-crud .mat-icon {
|
|
15
|
-
color: #505353;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.rb-menu-crud button[color="warn"],
|
|
19
|
-
.rb-menu-crud button[color="warn"] span {
|
|
20
|
-
color: var(--mat-menu-item-text-color-warn, #7E0007);
|
|
21
|
-
mat-icon {
|
|
22
|
-
color: #93000A;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.rb-menu-crud hr {
|
|
27
|
-
color: #C4C7C6;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.rb-table-container thead {
|
|
31
|
-
position: sticky;
|
|
32
|
-
top: 0;
|
|
33
|
-
z-index: 2;
|
|
34
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
.rb-dialog-header {
|
|
2
|
-
display: flex;
|
|
3
|
-
padding: 4px 16px 4px 32px;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
align-items: center;
|
|
6
|
-
align-self: stretch;
|
|
7
|
-
background: rgba(239, 241, 240, 1); // Palettes/Neutral 95
|
|
8
|
-
color: rgba(80, 83, 83, 1); //Palettes/Neutral 35
|
|
9
|
-
|
|
10
|
-
h2{
|
|
11
|
-
font-family: Roboto;
|
|
12
|
-
font-size: 16px;
|
|
13
|
-
font-style: normal;
|
|
14
|
-
font-weight: 500;
|
|
15
|
-
line-height: 23.4px;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.rb-dialog-content {
|
|
20
|
-
text-align: center;
|
|
21
|
-
color: rgba(14, 18, 17, 1); // Palettes/Neutral 5
|
|
22
|
-
display: flex;
|
|
23
|
-
padding: 32px;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
align-items: center;
|
|
26
|
-
align-self: stretch;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.rb-dialog-content.bg-white {
|
|
30
|
-
background-color: #ffffff;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.rb-dialog-actions {
|
|
34
|
-
display: flex;
|
|
35
|
-
align-self: stretch;
|
|
36
|
-
padding: 16px 32px;
|
|
37
|
-
border-top: solid 1px rgba(225, 227, 226, 1); // Palettes/Neutral 90
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.width-100 {
|
|
41
|
-
width: 100%;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
mat-dialog-content.rb-dialog-content.has-crud {
|
|
45
|
-
padding: 0;
|
|
46
|
-
.rb-crud-container {
|
|
47
|
-
margin-top: 0;
|
|
48
|
-
|
|
49
|
-
.mat-mdc-header-cell {
|
|
50
|
-
vertical-align: middle;
|
|
51
|
-
}
|
|
52
|
-
td, th {
|
|
53
|
-
padding: 0 16px;
|
|
54
|
-
}
|
|
55
|
-
th {
|
|
56
|
-
border-bottom: 1px solid rgb(225, 227, 226);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/* Display */
|
|
2
|
-
.rb-row {
|
|
3
|
-
display: flex;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
/* Direction */
|
|
7
|
-
.rb-flex-row {
|
|
8
|
-
flex-direction: row;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.rb-flex-row-reverse {
|
|
12
|
-
flex-direction: row-reverse;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.rb-flex-column {
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.rb-flex-column-reverse {
|
|
20
|
-
flex-direction: column-reverse;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* Align */
|
|
24
|
-
|
|
25
|
-
.rb-align-items-start {
|
|
26
|
-
align-items: flex-start;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.rb-align-items-center {
|
|
30
|
-
align-items: center;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.rb-align-items-end {
|
|
34
|
-
align-items: flex-end;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.rb-align-items-stretch {
|
|
38
|
-
align-items: stretch;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.rb-align-items-baseline {
|
|
42
|
-
align-items: baseline;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/* Justify */
|
|
47
|
-
|
|
48
|
-
.rb-justify-content-start {
|
|
49
|
-
justify-content: flex-start;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.rb-justify-content-center {
|
|
53
|
-
justify-content: center;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.rb-justify-content-end {
|
|
57
|
-
justify-content: flex-end;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.rb-justify-content-around {
|
|
61
|
-
justify-content: space-around;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.rb-justify-content-between {
|
|
65
|
-
justify-content: space-between;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.rb-justify-content-evenly {
|
|
69
|
-
justify-content: space-evenly;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* Wrap */
|
|
73
|
-
|
|
74
|
-
.rb-flex-wrap {
|
|
75
|
-
flex-wrap: wrap;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.rb-flex-nowrap {
|
|
79
|
-
flex-wrap: nowrap;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.rb-flex-wrap-reverse {
|
|
83
|
-
flex-wrap: wrap-reverse;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--font-plain: 'Roboto', sans-serif;
|
|
3
|
-
--font-heading: 'Poppins', sans-serif;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
/* Fontes de corpo */
|
|
7
|
-
|
|
8
|
-
.rb-font-body {
|
|
9
|
-
font-family: var(--font-plain);
|
|
10
|
-
font-weight: regular;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.rb-large {
|
|
14
|
-
font-size: 1rem; // 16px
|
|
15
|
-
line-height: 1.5rem; // 24px
|
|
16
|
-
letter-spacing: 0.03125rem; // 0.5px
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.rb-medium {
|
|
20
|
-
font-size: 0.875rem; // 14px
|
|
21
|
-
line-height: 1.25rem; // 20px
|
|
22
|
-
letter-spacing: 0.015625rem; // 0.25px
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.rb-small {
|
|
26
|
-
font-size: 0.75rem; // 12px
|
|
27
|
-
line-height: 1rem; // 16px
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/* Fontes de títulos */
|
|
32
|
-
|
|
33
|
-
.rb-font-heading {
|
|
34
|
-
font-family: var(--font-heading);
|
|
35
|
-
font-weight: bold;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.rb-h1 {
|
|
39
|
-
font-size: 2.4375rem; // 39px
|
|
40
|
-
line-height: 4.425rem; // 70.8px
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.rb-h2 {
|
|
44
|
-
font-size: 1.9375rem; // 31px
|
|
45
|
-
line-height: 3.525rem; // 56.4px
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.rb-h3 {
|
|
49
|
-
font-size: 1.5625rem; // 25px
|
|
50
|
-
line-height: 2.85rem; // 45.6px
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.rb-h4 {
|
|
54
|
-
font-size: 1.25rem; // 20px
|
|
55
|
-
line-height: 2.25rem; // 36px
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.rb-h5 {
|
|
59
|
-
font-size: 1rem; // 16px
|
|
60
|
-
line-height: 1.8rem; // 28.8px
|
|
61
|
-
}
|
|
62
|
-
|