@yuuvis/material 2.3.14 → 2.3.16
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/yuuvis-material-panes.mjs +180 -0
- package/fesm2022/yuuvis-material-panes.mjs.map +1 -0
- package/package.json +5 -1
- package/panes/README.md +191 -0
- package/panes/index.d.ts +8 -0
- package/panes/lib/pane/pane-aside/pane-aside.component.d.ts +5 -0
- package/panes/lib/pane/pane-body/pane-body.component.d.ts +5 -0
- package/panes/lib/pane/pane-header/pane-header.component.d.ts +18 -0
- package/panes/lib/pane/pane-top-bar/pane-top-bar.component.d.ts +22 -0
- package/panes/lib/pane/pane.component.d.ts +72 -0
- package/panes/lib/panes.module.d.ts +11 -0
- package/scss/themes/yuuvis-standard/mat-theme-config.scss +1 -1
- package/scss/token/_token.scss +4 -4
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, Component, output, signal, effect, contentChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1$1 from '@angular/material/icon';
|
|
6
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
7
|
+
import { YmtIconButtonDirective } from '@yuuvis/material';
|
|
8
|
+
|
|
9
|
+
class YmtPaneHeaderComponent {
|
|
10
|
+
/**
|
|
11
|
+
* Title of the pane
|
|
12
|
+
*/
|
|
13
|
+
title = input();
|
|
14
|
+
/**
|
|
15
|
+
* Subtitle of the pane
|
|
16
|
+
*/
|
|
17
|
+
subtitle = input();
|
|
18
|
+
/**
|
|
19
|
+
* TemplateRef for actions area in the pane header.
|
|
20
|
+
*/
|
|
21
|
+
actions = input();
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: YmtPaneHeaderComponent, isStandalone: true, selector: "ymt-pane-header", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: " <header>\n <h2>{{ title() }}</h2>\n <small>{{ subtitle() }}</small>\n @let a = actions();\n @if (a) {\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"a\"></ng-container>\n </div>\n }\n </header>", styles: [":host{--_header-padding: var(--header-padding, var(--ymt-spacing-xl));--_header-background: var(--header-background, transparent);--_header-border-color: var(--header-border-color, transparent)}:host header{display:grid;align-items:center;grid-template-columns:var(--_header-padding) 1fr auto;grid-template-rows:var(--_header-padding) auto auto var(--_header-padding);grid-template-areas:\". . actions\" \". title actions\" \". subtitle actions\" \". . actions\";flex:0 0 auto;background-color:var(--_header-background);border-block-end:1px solid var(--_header-border-color)}:host header h2{grid-area:title;margin:0;font:var(--ymt-font-title-large);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host header small{grid-area:subtitle;font:var(--ymt-font-subhead);color:var(--ymt-on-surface-type-subtle);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host header .actions{grid-area:actions;padding-inline:var(--ymt-spacing-xl);display:flex;gap:var(--ymt-spacing-xs)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
24
|
+
}
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneHeaderComponent, decorators: [{
|
|
26
|
+
type: Component,
|
|
27
|
+
args: [{ selector: 'ymt-pane-header', imports: [CommonModule], template: " <header>\n <h2>{{ title() }}</h2>\n <small>{{ subtitle() }}</small>\n @let a = actions();\n @if (a) {\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"a\"></ng-container>\n </div>\n }\n </header>", styles: [":host{--_header-padding: var(--header-padding, var(--ymt-spacing-xl));--_header-background: var(--header-background, transparent);--_header-border-color: var(--header-border-color, transparent)}:host header{display:grid;align-items:center;grid-template-columns:var(--_header-padding) 1fr auto;grid-template-rows:var(--_header-padding) auto auto var(--_header-padding);grid-template-areas:\". . actions\" \". title actions\" \". subtitle actions\" \". . actions\";flex:0 0 auto;background-color:var(--_header-background);border-block-end:1px solid var(--_header-border-color)}:host header h2{grid-area:title;margin:0;font:var(--ymt-font-title-large);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host header small{grid-area:subtitle;font:var(--ymt-font-subhead);color:var(--ymt-on-surface-type-subtle);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host header .actions{grid-area:actions;padding-inline:var(--ymt-spacing-xl);display:flex;gap:var(--ymt-spacing-xs)}\n"] }]
|
|
28
|
+
}] });
|
|
29
|
+
|
|
30
|
+
class YmtPaneTopBarComponent {
|
|
31
|
+
/**
|
|
32
|
+
* TemplateRef for actions area in the top bar.
|
|
33
|
+
*/
|
|
34
|
+
actions = input();
|
|
35
|
+
/**
|
|
36
|
+
* Position of the pane toggle button (default: 'none')
|
|
37
|
+
* Set to 'none' the pane toggle button in the top bar is hidden.
|
|
38
|
+
*/
|
|
39
|
+
paneToggle = input('none');
|
|
40
|
+
/**
|
|
41
|
+
* Event emitted when the pane toggle button is clicked.
|
|
42
|
+
*/
|
|
43
|
+
paneToggled = output();
|
|
44
|
+
paneCollapsed = signal(false);
|
|
45
|
+
#paneCollapsedEffect = effect(() => {
|
|
46
|
+
this.paneToggled.emit(this.paneCollapsed());
|
|
47
|
+
});
|
|
48
|
+
togglePane() {
|
|
49
|
+
this.paneCollapsed.set(!this.paneCollapsed());
|
|
50
|
+
}
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneTopBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: YmtPaneTopBarComponent, isStandalone: true, selector: "ymt-pane-top-bar", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, paneToggle: { classPropertyName: "paneToggle", publicName: "paneToggle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paneToggled: "paneToggled" }, host: { properties: { "class.inverse": "paneToggle() === \"end\"", "class.pane-toggle": "paneToggle() !== \"none\"" } }, ngImport: i0, template: " @let ta = actions();\n <div class=\"top-bar\">\n @if (paneToggle() != 'none') {\n <button class=\"pane-toggle\" ymt-icon-button icon-button-size=\"small\" (click)=\"togglePane()\">\n <mat-icon>{{ paneCollapsed() ? 'right_panel_open' : 'right_panel_close' }}</mat-icon>\n </button>\n }\n @if (ta) {\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n }\n </div>", styles: [":host{border-block-end:1px solid var(--ymt-outline-variant)}:host.inverse .top-bar{--flow: row-reverse}:host.inverse .top-bar button.pane-toggle{rotate:180deg}:host.pane-toggle .top-bar{justify-content:space-between}:host .top-bar{--flow: row;flex:0 0 auto;flex-flow:var(--flow);padding:var(--ymt-spacing-xs) var(--ymt-spacing-s);display:flex;justify-content:end;align-items:center}:host .top-bar .actions{display:flex;flex-flow:var(--flow);gap:var(--ymt-spacing-xs);align-items:center;justify-self:end}\n"], dependencies: [{ kind: "directive", type: YmtIconButtonDirective, selector: "button[ymtIconButton],button[ymt-icon-button],a[ymtIconButton],a[ymt-icon-button]", inputs: ["disabled", "disableRipple", "aria-disabled", "disabledInteractive", "icon-button-size"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
53
|
+
}
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneTopBarComponent, decorators: [{
|
|
55
|
+
type: Component,
|
|
56
|
+
args: [{ selector: 'ymt-pane-top-bar', imports: [YmtIconButtonDirective, MatIconModule, CommonModule], host: {
|
|
57
|
+
'[class.inverse]': 'paneToggle() === "end"',
|
|
58
|
+
'[class.pane-toggle]': 'paneToggle() !== "none"'
|
|
59
|
+
}, template: " @let ta = actions();\n <div class=\"top-bar\">\n @if (paneToggle() != 'none') {\n <button class=\"pane-toggle\" ymt-icon-button icon-button-size=\"small\" (click)=\"togglePane()\">\n <mat-icon>{{ paneCollapsed() ? 'right_panel_open' : 'right_panel_close' }}</mat-icon>\n </button>\n }\n @if (ta) {\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n }\n </div>", styles: [":host{border-block-end:1px solid var(--ymt-outline-variant)}:host.inverse .top-bar{--flow: row-reverse}:host.inverse .top-bar button.pane-toggle{rotate:180deg}:host.pane-toggle .top-bar{justify-content:space-between}:host .top-bar{--flow: row;flex:0 0 auto;flex-flow:var(--flow);padding:var(--ymt-spacing-xs) var(--ymt-spacing-s);display:flex;justify-content:end;align-items:center}:host .top-bar .actions{display:flex;flex-flow:var(--flow);gap:var(--ymt-spacing-xs);align-items:center;justify-self:end}\n"] }]
|
|
60
|
+
}] });
|
|
61
|
+
|
|
62
|
+
class YmtPaneAsideComponent {
|
|
63
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneAsideComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
64
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: YmtPaneAsideComponent, isStandalone: true, selector: "ymt-pane-aside", ngImport: i0, template: "<p>pane-aside works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
65
|
+
}
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneAsideComponent, decorators: [{
|
|
67
|
+
type: Component,
|
|
68
|
+
args: [{ selector: 'ymt-pane-aside', imports: [CommonModule], template: "<p>pane-aside works!</p>\n" }]
|
|
69
|
+
}] });
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Pane component.
|
|
73
|
+
*
|
|
74
|
+
* A pane has a header and a main area. You may choose to not show a header at all:
|
|
75
|
+
*
|
|
76
|
+
* ```html
|
|
77
|
+
* <ymt-pane [header]="false">
|
|
78
|
+
* Pane content goes here.
|
|
79
|
+
* </ymt-pane>
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* You can change the appearance of the header area via CSS variables:
|
|
83
|
+
* ```css
|
|
84
|
+
* ymt-pane {
|
|
85
|
+
* --header-area-background: var(--ymt-surface-container-low);
|
|
86
|
+
* --header-area-border-color: var(--ymt-outline-variant);
|
|
87
|
+
* }
|
|
88
|
+
* ```
|
|
89
|
+
*
|
|
90
|
+
* The main area has a padding by default. You can customize or remove the padding via
|
|
91
|
+
* CSS variables:
|
|
92
|
+
* ```css
|
|
93
|
+
* ymt-pane {
|
|
94
|
+
* --main-area-padding: 0;
|
|
95
|
+
* }
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* Add actions to a pane:
|
|
99
|
+
* ```html
|
|
100
|
+
* <ymt-pane title="My Pane" subTitle="Pane Subtitle">
|
|
101
|
+
* <ng-template #yuvPaneActions>
|
|
102
|
+
* <button ymt-icon-button><mat-icon>settings</mat-icon></button>
|
|
103
|
+
* <button ymt-icon-button><mat-icon>more</mat-icon></button>
|
|
104
|
+
* </ng-template>
|
|
105
|
+
* </ymt-pane>
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
*/
|
|
109
|
+
class YmtPaneComponent {
|
|
110
|
+
// paneHeader = contentChild(YmtPaneHeaderComponent);
|
|
111
|
+
// paneBody = contentChild(YmtPaneBodyComponent);
|
|
112
|
+
paneAside = contentChild(YmtPaneAsideComponent);
|
|
113
|
+
/**
|
|
114
|
+
* TemplateRef for actions area in the top bar.
|
|
115
|
+
* ```html
|
|
116
|
+
* <ymt-pane title="My Pane" subTitle="Pane Subtitle" [topBarActions]="topBarActions"></ymt-pane>
|
|
117
|
+
* <ng-template #topBarActions>
|
|
118
|
+
* <button ymt-icon-button icon-button-size="small"><mat-icon>settings</mat-icon></button>
|
|
119
|
+
* </ng-template>
|
|
120
|
+
* ```
|
|
121
|
+
* Make sure to set the `icon-button-size="small"` for proper alignment in the top bar.
|
|
122
|
+
*/
|
|
123
|
+
topBarActions = input();
|
|
124
|
+
/**
|
|
125
|
+
* Whether to show the top bar (default: true)
|
|
126
|
+
*/
|
|
127
|
+
topBar = input(true);
|
|
128
|
+
/**
|
|
129
|
+
* Position of the pane toggle button (default: 'none')
|
|
130
|
+
* Set to 'none' the pane toggle button in the top bar is hidden.
|
|
131
|
+
*/
|
|
132
|
+
paneToggle = input('none');
|
|
133
|
+
/**
|
|
134
|
+
* Event emitted when the pane toggle button is clicked.
|
|
135
|
+
*/
|
|
136
|
+
paneToggled = output();
|
|
137
|
+
collapsed = signal(false);
|
|
138
|
+
togglePane(collapsed) {
|
|
139
|
+
this.collapsed.set(collapsed);
|
|
140
|
+
this.paneToggled.emit(collapsed);
|
|
141
|
+
}
|
|
142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
143
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: YmtPaneComponent, isStandalone: true, selector: "ymt-pane", inputs: { topBarActions: { classPropertyName: "topBarActions", publicName: "topBarActions", isSignal: true, isRequired: false, transformFunction: null }, topBar: { classPropertyName: "topBar", publicName: "topBar", isSignal: true, isRequired: false, transformFunction: null }, paneToggle: { classPropertyName: "paneToggle", publicName: "paneToggle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paneToggled: "paneToggled" }, host: { properties: { "class.collapsed": "collapsed()" } }, queries: [{ propertyName: "paneAside", first: true, predicate: YmtPaneAsideComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (topBar()) {\n <ymt-pane-top-bar [actions]=\"topBarActions()\" [paneToggle]=\"paneToggle()\" \n (paneToggled)=\"togglePane($event)\"></ymt-pane-top-bar>\n}\n<ng-content></ng-content>\n", styles: [":host{--_header-area-padding: var(--header-area-padding, var(--ymt-spacing-xl));--_header-area-background: var(--header-area-background, transparent);--_header-area-border-color: var(--header-area-border-color, transparent);--_main-area-padding: var(--main-area-padding, var(--ymt-spacing-xl));background-color:var(--ymt-surface);color:var(--ymt-on-surface);border:1px solid var(--ymt-outline-variant);display:grid;grid-template-rows:auto auto 1fr;grid-template-columns:1fr;grid-template-areas:\"top-bar\" \"header\" \"main\";height:100%;border-radius:var(--ymt-corner-m)}:host.collapsed{overflow:hidden}:host.collapsed ::ng-deep ymt-pane-header,:host.collapsed ::ng-deep ymt-pane-body{display:none!important}:host.collapsed ::ng-deep ymt-pane-top-bar .actions{display:none!important}:host ymt-pane-top-bar{grid-area:top-bar}:host ymt-pane-header{--header-padding: var(--_header-area-padding);--header-background: var(--_header-area-background);--header-border-color: var(--_header-area-border-color);grid-area:header}:host ymt-pane-body{grid-area:main;overflow:hidden;padding:var(--_main-area-padding)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: YmtPaneTopBarComponent, selector: "ymt-pane-top-bar", inputs: ["actions", "paneToggle"], outputs: ["paneToggled"] }, { kind: "ngmodule", type: MatIconModule }] });
|
|
144
|
+
}
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneComponent, decorators: [{
|
|
146
|
+
type: Component,
|
|
147
|
+
args: [{ selector: 'ymt-pane', imports: [CommonModule, YmtPaneTopBarComponent, MatIconModule], host: {
|
|
148
|
+
'[class.collapsed]': 'collapsed()'
|
|
149
|
+
}, template: "@if (topBar()) {\n <ymt-pane-top-bar [actions]=\"topBarActions()\" [paneToggle]=\"paneToggle()\" \n (paneToggled)=\"togglePane($event)\"></ymt-pane-top-bar>\n}\n<ng-content></ng-content>\n", styles: [":host{--_header-area-padding: var(--header-area-padding, var(--ymt-spacing-xl));--_header-area-background: var(--header-area-background, transparent);--_header-area-border-color: var(--header-area-border-color, transparent);--_main-area-padding: var(--main-area-padding, var(--ymt-spacing-xl));background-color:var(--ymt-surface);color:var(--ymt-on-surface);border:1px solid var(--ymt-outline-variant);display:grid;grid-template-rows:auto auto 1fr;grid-template-columns:1fr;grid-template-areas:\"top-bar\" \"header\" \"main\";height:100%;border-radius:var(--ymt-corner-m)}:host.collapsed{overflow:hidden}:host.collapsed ::ng-deep ymt-pane-header,:host.collapsed ::ng-deep ymt-pane-body{display:none!important}:host.collapsed ::ng-deep ymt-pane-top-bar .actions{display:none!important}:host ymt-pane-top-bar{grid-area:top-bar}:host ymt-pane-header{--header-padding: var(--_header-area-padding);--header-background: var(--_header-area-background);--header-border-color: var(--_header-area-border-color);grid-area:header}:host ymt-pane-body{grid-area:main;overflow:hidden;padding:var(--_main-area-padding)}\n"] }]
|
|
150
|
+
}] });
|
|
151
|
+
|
|
152
|
+
class YmtPaneBodyComponent {
|
|
153
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
154
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: YmtPaneBodyComponent, isStandalone: true, selector: "ymt-pane-body", ngImport: i0, template: "!<ng-content></ng-content>!\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
155
|
+
}
|
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneBodyComponent, decorators: [{
|
|
157
|
+
type: Component,
|
|
158
|
+
args: [{ selector: 'ymt-pane-body', imports: [CommonModule], template: "!<ng-content></ng-content>!\n", styles: [":host{display:block}\n"] }]
|
|
159
|
+
}] });
|
|
160
|
+
|
|
161
|
+
const cmp = [YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneTopBarComponent, YmtPaneBodyComponent, YmtPaneAsideComponent];
|
|
162
|
+
class YmtPanesModule {
|
|
163
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPanesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
164
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: YmtPanesModule, imports: [YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneTopBarComponent, YmtPaneBodyComponent, YmtPaneAsideComponent], exports: [YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneTopBarComponent, YmtPaneBodyComponent, YmtPaneAsideComponent] });
|
|
165
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPanesModule, imports: [cmp] });
|
|
166
|
+
}
|
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPanesModule, decorators: [{
|
|
168
|
+
type: NgModule,
|
|
169
|
+
args: [{
|
|
170
|
+
imports: cmp,
|
|
171
|
+
exports: cmp
|
|
172
|
+
}]
|
|
173
|
+
}] });
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Generated bundle index. Do not edit.
|
|
177
|
+
*/
|
|
178
|
+
|
|
179
|
+
export { YmtPaneAsideComponent, YmtPaneBodyComponent, YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneTopBarComponent, YmtPanesModule };
|
|
180
|
+
//# sourceMappingURL=yuuvis-material-panes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yuuvis-material-panes.mjs","sources":["../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-header/pane-header.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-header/pane-header.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-top-bar/pane-top-bar.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-top-bar/pane-top-bar.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-aside/pane-aside.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-aside/pane-aside.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-body/pane-body.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-body/pane-body.component.html","../../../../../libs/yuuvis/material/panes/src/lib/panes.module.ts","../../../../../libs/yuuvis/material/panes/src/yuuvis-material-panes.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, input, TemplateRef } from '@angular/core';\n\n@Component({\n selector: 'ymt-pane-header',\n imports: [CommonModule],\n templateUrl: './pane-header.component.html',\n styleUrl: './pane-header.component.scss'\n})\nexport class YmtPaneHeaderComponent {\n /**\n * Title of the pane\n */\n title = input<string>();\n /**\n * Subtitle of the pane\n */\n subtitle = input<string>();\n /**\n * TemplateRef for actions area in the pane header.\n */\n actions = input<TemplateRef<any>>();\n}\n"," <header>\n <h2>{{ title() }}</h2>\n <small>{{ subtitle() }}</small>\n @let a = actions();\n @if (a) {\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"a\"></ng-container>\n </div>\n }\n </header>","import { Component, effect, input, output, signal, TemplateRef } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\nimport { YmtIconButtonDirective } from '@yuuvis/material';\n\n@Component({\n selector: 'ymt-pane-top-bar',\n imports: [YmtIconButtonDirective, MatIconModule, CommonModule],\n templateUrl: './pane-top-bar.component.html',\n styleUrl: './pane-top-bar.component.scss',\n host: {\n '[class.inverse]': 'paneToggle() === \"end\"',\n '[class.pane-toggle]': 'paneToggle() !== \"none\"'\n }\n})\nexport class YmtPaneTopBarComponent {\n /**\n * TemplateRef for actions area in the top bar.\n */\n actions = input<TemplateRef<any>>();\n /**\n * Position of the pane toggle button (default: 'none')\n * Set to 'none' the pane toggle button in the top bar is hidden.\n */\n paneToggle = input<'start' | 'end' | 'none'>('none');\n\n /**\n * Event emitted when the pane toggle button is clicked.\n */\n paneToggled = output<boolean>();\n\n paneCollapsed = signal<boolean>(false);\n #paneCollapsedEffect = effect(() => {\n this.paneToggled.emit(this.paneCollapsed());\n });\n\n togglePane() {\n this.paneCollapsed.set(!this.paneCollapsed());\n }\n}\n"," @let ta = actions();\n <div class=\"top-bar\">\n @if (paneToggle() != 'none') {\n <button class=\"pane-toggle\" ymt-icon-button icon-button-size=\"small\" (click)=\"togglePane()\">\n <mat-icon>{{ paneCollapsed() ? 'right_panel_open' : 'right_panel_close' }}</mat-icon>\n </button>\n }\n @if (ta) {\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n }\n </div>","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ymt-pane-aside',\n imports: [CommonModule],\n templateUrl: './pane-aside.component.html',\n styleUrl: './pane-aside.component.scss'\n})\nexport class YmtPaneAsideComponent {}\n","<p>pane-aside works!</p>\n","import { CommonModule } from '@angular/common';\nimport { Component, contentChild, input, output, signal, TemplateRef } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { YmtPaneAsideComponent } from './pane-aside/pane-aside.component';\nimport { YmtPaneTopBarComponent } from './pane-top-bar/pane-top-bar.component';\n\n/**\n * Pane component.\n *\n * A pane has a header and a main area. You may choose to not show a header at all:\n *\n * ```html\n * <ymt-pane [header]=\"false\">\n * Pane content goes here.\n * </ymt-pane>\n * ```\n *\n * You can change the appearance of the header area via CSS variables:\n * ```css\n * ymt-pane {\n * --header-area-background: var(--ymt-surface-container-low);\n * --header-area-border-color: var(--ymt-outline-variant);\n * }\n * ```\n *\n * The main area has a padding by default. You can customize or remove the padding via\n * CSS variables:\n * ```css\n * ymt-pane {\n * --main-area-padding: 0;\n * }\n * ```\n *\n * Add actions to a pane:\n * ```html\n * <ymt-pane title=\"My Pane\" subTitle=\"Pane Subtitle\">\n * <ng-template #yuvPaneActions>\n * <button ymt-icon-button><mat-icon>settings</mat-icon></button>\n * <button ymt-icon-button><mat-icon>more</mat-icon></button>\n * </ng-template>\n * </ymt-pane>\n * ```\n *\n */\n@Component({\n selector: 'ymt-pane',\n imports: [CommonModule, YmtPaneTopBarComponent, MatIconModule],\n templateUrl: './pane.component.html',\n styleUrl: './pane.component.scss',\n host: {\n '[class.collapsed]': 'collapsed()'\n }\n})\nexport class YmtPaneComponent {\n\n // paneHeader = contentChild(YmtPaneHeaderComponent);\n // paneBody = contentChild(YmtPaneBodyComponent);\n paneAside = contentChild(YmtPaneAsideComponent);\n\n /**\n * TemplateRef for actions area in the top bar.\n * ```html\n * <ymt-pane title=\"My Pane\" subTitle=\"Pane Subtitle\" [topBarActions]=\"topBarActions\"></ymt-pane>\n * <ng-template #topBarActions>\n * <button ymt-icon-button icon-button-size=\"small\"><mat-icon>settings</mat-icon></button>\n * </ng-template>\n * ```\n * Make sure to set the `icon-button-size=\"small\"` for proper alignment in the top bar.\n */\n topBarActions = input<TemplateRef<any>>();\n /**\n * Whether to show the top bar (default: true)\n */\n topBar = input<boolean>(true);\n\n /**\n * Position of the pane toggle button (default: 'none')\n * Set to 'none' the pane toggle button in the top bar is hidden.\n */\n paneToggle = input<'start' | 'end' | 'none'>('none');\n\n /**\n * Event emitted when the pane toggle button is clicked.\n */\n paneToggled = output<boolean>();\n\n collapsed = signal<boolean>(false);\n\n togglePane(collapsed: boolean) {\n this.collapsed.set(collapsed);\n this.paneToggled.emit(collapsed);\n }\n}\n","@if (topBar()) {\n <ymt-pane-top-bar [actions]=\"topBarActions()\" [paneToggle]=\"paneToggle()\" \n (paneToggled)=\"togglePane($event)\"></ymt-pane-top-bar>\n}\n<ng-content></ng-content>\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ymt-pane-body',\n imports: [CommonModule],\n templateUrl: './pane-body.component.html',\n styleUrl: './pane-body.component.scss'\n})\nexport class YmtPaneBodyComponent {}\n","!<ng-content></ng-content>!\n","import { NgModule } from '@angular/core';\nimport { YmtPaneHeaderComponent } from './pane/pane-header/pane-header.component';\nimport { YmtPaneTopBarComponent } from './pane/pane-top-bar/pane-top-bar.component';\nimport { YmtPaneComponent } from './pane/pane.component';\nimport { YmtPaneBodyComponent } from './pane/pane-body/pane-body.component';\nimport { YmtPaneAsideComponent } from './pane/pane-aside/pane-aside.component';\n\nconst cmp = [YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneTopBarComponent, YmtPaneBodyComponent, YmtPaneAsideComponent];\n\n@NgModule({\n imports: cmp,\n exports: cmp\n})\nexport class YmtPanesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2"],"mappings":";;;;;;;;MASa,sBAAsB,CAAA;AACjC;;AAEG;IACH,KAAK,GAAG,KAAK,EAAU;AACvB;;AAEG;IACH,QAAQ,GAAG,KAAK,EAAU;AAC1B;;AAEG;IACH,OAAO,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BAAsB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,qBAAqB,CAA7G,EAAA,OAAA,EAAA,CAAA,gBAAgB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,qBAAqB,CAAA,EAAA,CAAA;AAM7G,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHhB,GAAG,CAAA,EAAA,CAAA;;4FAGD,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,GAAG;AACZ,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACZD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuuvis/material",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.16",
|
|
4
4
|
"author": "OPTIMAL SYSTEMS GmbH <npm@optimal-systems.de>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
},
|
|
20
20
|
"./package.json": {
|
|
21
21
|
"default": "./package.json"
|
|
22
|
+
},
|
|
23
|
+
"./panes": {
|
|
24
|
+
"types": "./panes/index.d.ts",
|
|
25
|
+
"default": "./fesm2022/yuuvis-material-panes.mjs"
|
|
22
26
|
}
|
|
23
27
|
},
|
|
24
28
|
"module": "fesm2022/yuuvis-material.mjs",
|
package/panes/README.md
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# @yuuvis/material/panes
|
|
2
|
+
|
|
3
|
+
A collection of Angular components for creating structured pane layouts with headers, top bars, and customizable content areas.
|
|
4
|
+
|
|
5
|
+
## Components
|
|
6
|
+
|
|
7
|
+
### YmtPaneComponent
|
|
8
|
+
|
|
9
|
+
The main pane component that provides a structured layout with optional header and top bar areas.
|
|
10
|
+
|
|
11
|
+
#### Basic Usage
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<ymt-pane [title]="'My Pane'" [subtitle]="'Optional subtitle'">
|
|
15
|
+
Your pane content goes here.
|
|
16
|
+
</ymt-pane>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
#### Without Header
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<ymt-pane [header]="false">
|
|
23
|
+
Content without header area.
|
|
24
|
+
</ymt-pane>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### With Actions
|
|
28
|
+
|
|
29
|
+
Add action buttons to either the header or top bar areas:
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<ymt-pane>
|
|
33
|
+
<!-- Top bar actions (use small icon buttons) -->
|
|
34
|
+
<ng-template #yuvPaneTopBarActions>
|
|
35
|
+
<button ymt-icon-button icon-button-size="small">
|
|
36
|
+
<mat-icon>close</mat-icon>
|
|
37
|
+
</button>
|
|
38
|
+
</ng-template>
|
|
39
|
+
|
|
40
|
+
<!-- Header actions (regular icon buttons) -->
|
|
41
|
+
<ng-template #yuvPaneActions>
|
|
42
|
+
<button ymt-icon-button>
|
|
43
|
+
<mat-icon>settings</mat-icon>
|
|
44
|
+
</button>
|
|
45
|
+
<button ymt-icon-button>
|
|
46
|
+
<mat-icon>more_vert</mat-icon>
|
|
47
|
+
</button>
|
|
48
|
+
</ng-template>
|
|
49
|
+
|
|
50
|
+
<!-- Pane content -->
|
|
51
|
+
<p>Settings content...</p>
|
|
52
|
+
</ymt-pane>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
#### With Pane Toggle
|
|
56
|
+
|
|
57
|
+
Enable collapsible pane functionality:
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<ymt-pane
|
|
61
|
+
title="Collapsible Pane"
|
|
62
|
+
paneToggle="start"
|
|
63
|
+
(paneToggled)="onPaneToggled($event)">
|
|
64
|
+
Collapsible content here.
|
|
65
|
+
</ymt-pane>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
#### API
|
|
69
|
+
|
|
70
|
+
##### Inputs
|
|
71
|
+
|
|
72
|
+
| Input | Type | Default | Description |
|
|
73
|
+
|-------|------|---------|-------------|
|
|
74
|
+
| `title` | `string` | - | Title displayed in the header |
|
|
75
|
+
| `subtitle` | `string` | - | Subtitle displayed below the title |
|
|
76
|
+
| `header` | `boolean` | `true` | Whether to show the header area |
|
|
77
|
+
| `topBar` | `boolean` | `true` | Whether to show the top bar |
|
|
78
|
+
| `paneToggle` | `'start' \| 'end' \| 'none'` | `'none'` | Position of the toggle button |
|
|
79
|
+
|
|
80
|
+
##### Outputs
|
|
81
|
+
|
|
82
|
+
| Output | Type | Description |
|
|
83
|
+
|--------|------|-------------|
|
|
84
|
+
| `paneToggled` | `boolean` | Emitted when pane is collapsed/expanded |
|
|
85
|
+
|
|
86
|
+
##### Content Children
|
|
87
|
+
|
|
88
|
+
| Template Reference | Description |
|
|
89
|
+
|-------------------|-------------|
|
|
90
|
+
| `#yuvPaneTopBarActions` | Actions for the top bar (use small buttons) |
|
|
91
|
+
| `#yuvPaneActions` | Actions for the header area |
|
|
92
|
+
|
|
93
|
+
#### Customization
|
|
94
|
+
|
|
95
|
+
##### CSS Variables
|
|
96
|
+
|
|
97
|
+
Customize the appearance using CSS custom properties:
|
|
98
|
+
|
|
99
|
+
```css
|
|
100
|
+
ymt-pane {
|
|
101
|
+
/* Header area styling */
|
|
102
|
+
--header-area-background: var(--ymt-surface-container-low);
|
|
103
|
+
--header-area-border-color: var(--ymt-outline-variant);
|
|
104
|
+
|
|
105
|
+
/* Main content area padding */
|
|
106
|
+
--main-area-padding: 1rem;
|
|
107
|
+
|
|
108
|
+
/* Remove padding entirely */
|
|
109
|
+
--main-area-padding: 0;
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
##### Examples
|
|
114
|
+
|
|
115
|
+
**Minimal pane without padding:**
|
|
116
|
+
```css
|
|
117
|
+
.minimal-pane {
|
|
118
|
+
--main-area-padding: 0;
|
|
119
|
+
--header-area-background: transparent;
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Custom header styling:**
|
|
124
|
+
```css
|
|
125
|
+
.custom-header-pane {
|
|
126
|
+
--header-area-background: var(--ymt-primary-container);
|
|
127
|
+
--header-area-border-color: var(--ymt-primary);
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Installation
|
|
132
|
+
|
|
133
|
+
This is a secondary entry point of `@yuuvis/material`. Import it directly:
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
import { YmtPaneComponent } from '@yuuvis/material/panes';
|
|
137
|
+
|
|
138
|
+
@Component({
|
|
139
|
+
imports: [YmtPaneComponent],
|
|
140
|
+
// ...
|
|
141
|
+
})
|
|
142
|
+
export class MyComponent {}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Related Components
|
|
146
|
+
|
|
147
|
+
- **YmtPaneHeaderComponent**: Internal component for rendering pane headers
|
|
148
|
+
- **YmtPaneTopBarComponent**: Internal component for rendering top bars with toggle functionality
|
|
149
|
+
|
|
150
|
+
## Best Practices
|
|
151
|
+
|
|
152
|
+
1. Use `icon-button-size="small"` for buttons in the top bar actions template
|
|
153
|
+
2. Keep header and top bar actions minimal for better UX
|
|
154
|
+
3. Use the pane toggle feature for space-constrained layouts
|
|
155
|
+
4. Customize CSS variables instead of overriding component styles
|
|
156
|
+
5. Consider accessibility when using toggle functionality
|
|
157
|
+
|
|
158
|
+
## Examples
|
|
159
|
+
|
|
160
|
+
### Dashboard Layout
|
|
161
|
+
|
|
162
|
+
```html
|
|
163
|
+
<div class="dashboard">
|
|
164
|
+
<ymt-pane title="Navigation" paneToggle="start" class="sidebar">
|
|
165
|
+
<nav>...</nav>
|
|
166
|
+
</ymt-pane>
|
|
167
|
+
|
|
168
|
+
<ymt-pane title="Main Content" [topBar]="false" class="main">
|
|
169
|
+
<main>...</main>
|
|
170
|
+
</ymt-pane>
|
|
171
|
+
</div>
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Settings Panel
|
|
175
|
+
|
|
176
|
+
```html
|
|
177
|
+
<ymt-pane title="User Settings" subtitle="Manage your preferences">
|
|
178
|
+
<ng-template #yuvPaneActions>
|
|
179
|
+
<button ymt-icon-button (click)="save()">
|
|
180
|
+
<mat-icon>save</mat-icon>
|
|
181
|
+
</button>
|
|
182
|
+
<button ymt-icon-button (click)="reset()">
|
|
183
|
+
<mat-icon>refresh</mat-icon>
|
|
184
|
+
</button>
|
|
185
|
+
</ng-template>
|
|
186
|
+
|
|
187
|
+
<form>
|
|
188
|
+
<!-- Settings form content -->
|
|
189
|
+
</form>
|
|
190
|
+
</ymt-pane>
|
|
191
|
+
```
|
package/panes/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './lib/panes.module';
|
|
2
|
+
export * from './lib/pane/pane.component';
|
|
3
|
+
export * from './lib/pane/pane-header/pane-header.component';
|
|
4
|
+
export * from './lib/pane/pane-body/pane-body.component';
|
|
5
|
+
export * from './lib/pane/pane-aside/pane-aside.component';
|
|
6
|
+
export * from './lib/pane/pane-top-bar/pane-top-bar.component';
|
|
7
|
+
export * from './lib/pane/pane-body/pane-body.component';
|
|
8
|
+
export * from './lib/pane/pane-aside/pane-aside.component';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class YmtPaneAsideComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YmtPaneAsideComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<YmtPaneAsideComponent, "ymt-pane-aside", never, {}, {}, never, never, true, never>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class YmtPaneBodyComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YmtPaneBodyComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<YmtPaneBodyComponent, "ymt-pane-body", never, {}, {}, never, ["*"], true, never>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class YmtPaneHeaderComponent {
|
|
4
|
+
/**
|
|
5
|
+
* Title of the pane
|
|
6
|
+
*/
|
|
7
|
+
title: import("@angular/core").InputSignal<string | undefined>;
|
|
8
|
+
/**
|
|
9
|
+
* Subtitle of the pane
|
|
10
|
+
*/
|
|
11
|
+
subtitle: import("@angular/core").InputSignal<string | undefined>;
|
|
12
|
+
/**
|
|
13
|
+
* TemplateRef for actions area in the pane header.
|
|
14
|
+
*/
|
|
15
|
+
actions: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YmtPaneHeaderComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<YmtPaneHeaderComponent, "ymt-pane-header", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class YmtPaneTopBarComponent {
|
|
4
|
+
#private;
|
|
5
|
+
/**
|
|
6
|
+
* TemplateRef for actions area in the top bar.
|
|
7
|
+
*/
|
|
8
|
+
actions: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
|
|
9
|
+
/**
|
|
10
|
+
* Position of the pane toggle button (default: 'none')
|
|
11
|
+
* Set to 'none' the pane toggle button in the top bar is hidden.
|
|
12
|
+
*/
|
|
13
|
+
paneToggle: import("@angular/core").InputSignal<"start" | "end" | "none">;
|
|
14
|
+
/**
|
|
15
|
+
* Event emitted when the pane toggle button is clicked.
|
|
16
|
+
*/
|
|
17
|
+
paneToggled: import("@angular/core").OutputEmitterRef<boolean>;
|
|
18
|
+
paneCollapsed: import("@angular/core").WritableSignal<boolean>;
|
|
19
|
+
togglePane(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YmtPaneTopBarComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<YmtPaneTopBarComponent, "ymt-pane-top-bar", never, { "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "paneToggle": { "alias": "paneToggle"; "required": false; "isSignal": true; }; }, { "paneToggled": "paneToggled"; }, never, never, true, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { YmtPaneAsideComponent } from './pane-aside/pane-aside.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Pane component.
|
|
6
|
+
*
|
|
7
|
+
* A pane has a header and a main area. You may choose to not show a header at all:
|
|
8
|
+
*
|
|
9
|
+
* ```html
|
|
10
|
+
* <ymt-pane [header]="false">
|
|
11
|
+
* Pane content goes here.
|
|
12
|
+
* </ymt-pane>
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* You can change the appearance of the header area via CSS variables:
|
|
16
|
+
* ```css
|
|
17
|
+
* ymt-pane {
|
|
18
|
+
* --header-area-background: var(--ymt-surface-container-low);
|
|
19
|
+
* --header-area-border-color: var(--ymt-outline-variant);
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* The main area has a padding by default. You can customize or remove the padding via
|
|
24
|
+
* CSS variables:
|
|
25
|
+
* ```css
|
|
26
|
+
* ymt-pane {
|
|
27
|
+
* --main-area-padding: 0;
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* Add actions to a pane:
|
|
32
|
+
* ```html
|
|
33
|
+
* <ymt-pane title="My Pane" subTitle="Pane Subtitle">
|
|
34
|
+
* <ng-template #yuvPaneActions>
|
|
35
|
+
* <button ymt-icon-button><mat-icon>settings</mat-icon></button>
|
|
36
|
+
* <button ymt-icon-button><mat-icon>more</mat-icon></button>
|
|
37
|
+
* </ng-template>
|
|
38
|
+
* </ymt-pane>
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
export declare class YmtPaneComponent {
|
|
43
|
+
paneAside: import("@angular/core").Signal<YmtPaneAsideComponent | undefined>;
|
|
44
|
+
/**
|
|
45
|
+
* TemplateRef for actions area in the top bar.
|
|
46
|
+
* ```html
|
|
47
|
+
* <ymt-pane title="My Pane" subTitle="Pane Subtitle" [topBarActions]="topBarActions"></ymt-pane>
|
|
48
|
+
* <ng-template #topBarActions>
|
|
49
|
+
* <button ymt-icon-button icon-button-size="small"><mat-icon>settings</mat-icon></button>
|
|
50
|
+
* </ng-template>
|
|
51
|
+
* ```
|
|
52
|
+
* Make sure to set the `icon-button-size="small"` for proper alignment in the top bar.
|
|
53
|
+
*/
|
|
54
|
+
topBarActions: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to show the top bar (default: true)
|
|
57
|
+
*/
|
|
58
|
+
topBar: import("@angular/core").InputSignal<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* Position of the pane toggle button (default: 'none')
|
|
61
|
+
* Set to 'none' the pane toggle button in the top bar is hidden.
|
|
62
|
+
*/
|
|
63
|
+
paneToggle: import("@angular/core").InputSignal<"start" | "end" | "none">;
|
|
64
|
+
/**
|
|
65
|
+
* Event emitted when the pane toggle button is clicked.
|
|
66
|
+
*/
|
|
67
|
+
paneToggled: import("@angular/core").OutputEmitterRef<boolean>;
|
|
68
|
+
collapsed: import("@angular/core").WritableSignal<boolean>;
|
|
69
|
+
togglePane(collapsed: boolean): void;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YmtPaneComponent, never>;
|
|
71
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<YmtPaneComponent, "ymt-pane", never, { "topBarActions": { "alias": "topBarActions"; "required": false; "isSignal": true; }; "topBar": { "alias": "topBar"; "required": false; "isSignal": true; }; "paneToggle": { "alias": "paneToggle"; "required": false; "isSignal": true; }; }, { "paneToggled": "paneToggled"; }, ["paneAside"], ["*"], true, never>;
|
|
72
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./pane/pane.component";
|
|
3
|
+
import * as i2 from "./pane/pane-header/pane-header.component";
|
|
4
|
+
import * as i3 from "./pane/pane-top-bar/pane-top-bar.component";
|
|
5
|
+
import * as i4 from "./pane/pane-body/pane-body.component";
|
|
6
|
+
import * as i5 from "./pane/pane-aside/pane-aside.component";
|
|
7
|
+
export declare class YmtPanesModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YmtPanesModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<YmtPanesModule, never, [typeof i1.YmtPaneComponent, typeof i2.YmtPaneHeaderComponent, typeof i3.YmtPaneTopBarComponent, typeof i4.YmtPaneBodyComponent, typeof i5.YmtPaneAsideComponent], [typeof i1.YmtPaneComponent, typeof i2.YmtPaneHeaderComponent, typeof i3.YmtPaneTopBarComponent, typeof i4.YmtPaneBodyComponent, typeof i5.YmtPaneAsideComponent]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<YmtPanesModule>;
|
|
11
|
+
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
@function _create-mat-sys-token-overrides(){
|
|
25
25
|
@return (
|
|
26
|
-
'outline-variant': light-dark(map.get(theme-color.primary-palette(), 'neutral-variant', 90), map.get(theme-color.primary-palette(), 'neutral',
|
|
26
|
+
'outline-variant': light-dark(map.get(theme-color.primary-palette(), 'neutral-variant', 90), map.get(theme-color.primary-palette(), 'neutral', 12)),
|
|
27
27
|
'surface-variant': var(--mat-sys-surface),
|
|
28
28
|
'on-surface-variant': var(--mat-sys-on-surface),
|
|
29
29
|
|
package/scss/token/_token.scss
CHANGED
|
@@ -170,7 +170,7 @@ $_spacing-base: t.rem(16px);
|
|
|
170
170
|
outline-width: 1px,
|
|
171
171
|
outline: var(--mat-sys-outline),
|
|
172
172
|
outline-variant: var(--mat-sys-outline-variant),
|
|
173
|
-
outline-variant-emphasized: light-dark(#{ map.get(theme-color.primary-palette(), neutral, 80)}, #{map.get(theme-color.primary-palette(), neutral,
|
|
173
|
+
outline-variant-emphasized: light-dark(#{ map.get(theme-color.primary-palette(), neutral, 80)}, #{map.get(theme-color.primary-palette(), neutral, 25)}),
|
|
174
174
|
|
|
175
175
|
// Level
|
|
176
176
|
// Primary color (Could be used for text-color, surfaces, outlines)
|
|
@@ -183,7 +183,7 @@ $_spacing-base: t.rem(16px);
|
|
|
183
183
|
on-primary-container: var(--mat-sys-on-primary-container),
|
|
184
184
|
|
|
185
185
|
//Brand (Could be used for text-color, surfaces, outlines)
|
|
186
|
-
brand: light-dark(#{map.get(theme-color.primary-palette(), 'neutral', 10)}, #{map.get(theme-color.primary-palette(), 'neutral',
|
|
186
|
+
brand: light-dark(#{map.get(theme-color.primary-palette(), 'neutral', 10)}, #{map.get(theme-color.primary-palette(), 'neutral', 4)}),
|
|
187
187
|
on-brand: light-dark(#{map.get(theme-color.primary-palette(), 'neutral', 90)}, #{map.get(theme-color.primary-palette(), 'neutral', 90)}),
|
|
188
188
|
|
|
189
189
|
//Status
|
|
@@ -229,7 +229,7 @@ $_spacing-base: t.rem(16px);
|
|
|
229
229
|
//to ensure that the combination with on-surface-* is accessible
|
|
230
230
|
//If you are using a custom color instead of make sure that this color is accessible with all on-surface-* token
|
|
231
231
|
surface-panel: var(--mat-sys-surface-container-low),
|
|
232
|
-
surface-app: var(--mat-sys-surface-container-
|
|
232
|
+
surface-app: light-dark(var(--mat-sys-surface-container), var(--mat-sys-surface-container-lowest)),
|
|
233
233
|
|
|
234
234
|
scrim: var(--mat-sys-scrim),
|
|
235
235
|
scrim-opacity: 30,
|
|
@@ -252,7 +252,7 @@ $_spacing-base: t.rem(16px);
|
|
|
252
252
|
pane-surface: var(--mat-sys-surface),
|
|
253
253
|
pane-drag-handle: light-dark(#{map.get(theme-color.primary-palette(), 'neutral', 80)}, #{map.get(theme-color.primary-palette(), 'neutral', 80)}),
|
|
254
254
|
pane-surface-blank: rgb(from #FFFFFF r g b / 0),
|
|
255
|
-
pane-surface-floating: var(--mat-sys-surface),
|
|
255
|
+
pane-surface-floating: light-dark(var(--mat-sys-surface), var(--mat-sys-surface-container-lowest)),
|
|
256
256
|
on-pane-surface: var(--mat-sys-on-surface),
|
|
257
257
|
pane-surface-floating-inverse: rgb(from var(--mat-sys-inverse-surface) r g b / 0.9),
|
|
258
258
|
on-pane-surface-floating-inverse: light-dark(#{map.get(theme-color.primary-palette(), 'neutral', 95)}, #{map.get(theme-color.primary-palette(), 'neutral', 10)}),
|