@rblabs-dev/axiom 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -13
- package/app-shell/package.json +4 -0
- package/brand-lockup/package.json +4 -0
- package/central-sign-in/package.json +4 -0
- package/cli/build-brand-assets.mjs +12 -18
- package/cli/project.mjs +6 -0
- package/cli/verify-production-assets.mjs +71 -6
- package/confirm-dialog/package.json +4 -0
- package/core/package.json +4 -0
- package/empty-state/package.json +4 -0
- package/fesm2022/rblabs-dev-axiom-app-shell.mjs +375 -0
- package/fesm2022/rblabs-dev-axiom-app-shell.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-brand-lockup.mjs +154 -0
- package/fesm2022/rblabs-dev-axiom-brand-lockup.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-central-sign-in.mjs +375 -0
- package/fesm2022/rblabs-dev-axiom-central-sign-in.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-confirm-dialog.mjs +329 -0
- package/fesm2022/rblabs-dev-axiom-confirm-dialog.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-core.mjs +181 -0
- package/fesm2022/rblabs-dev-axiom-core.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-empty-state.mjs +252 -0
- package/fesm2022/rblabs-dev-axiom-empty-state.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-message.mjs +194 -0
- package/fesm2022/rblabs-dev-axiom-message.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-monogram.mjs +102 -0
- package/fesm2022/rblabs-dev-axiom-monogram.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-page-header.mjs +199 -0
- package/fesm2022/rblabs-dev-axiom-page-header.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-panel.mjs +207 -0
- package/fesm2022/rblabs-dev-axiom-panel.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-public-shell.mjs +165 -0
- package/fesm2022/rblabs-dev-axiom-public-shell.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-shell-footer.mjs +73 -0
- package/fesm2022/rblabs-dev-axiom-shell-footer.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-status-chip.mjs +161 -0
- package/fesm2022/rblabs-dev-axiom-status-chip.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-technical-value.mjs +173 -0
- package/fesm2022/rblabs-dev-axiom-technical-value.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom-theme-toggle.mjs +117 -0
- package/fesm2022/rblabs-dev-axiom-theme-toggle.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom.mjs +15 -2955
- package/fonts/LICENSE +93 -0
- package/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/message/package.json +4 -0
- package/monogram/package.json +4 -0
- package/package.json +77 -2
- package/page-header/package.json +4 -0
- package/panel/package.json +4 -0
- package/public-shell/package.json +4 -0
- package/shell-footer/package.json +4 -0
- package/status-chip/package.json +4 -0
- package/styles/_fonts.scss +7 -7
- package/styles/_index.scss +1 -1
- package/technical-value/package.json +4 -0
- package/theme-toggle/package.json +4 -0
- package/types/rblabs-dev-axiom-app-shell.d.ts +50 -0
- package/types/rblabs-dev-axiom-brand-lockup.d.ts +35 -0
- package/types/rblabs-dev-axiom-central-sign-in.d.ts +82 -0
- package/types/rblabs-dev-axiom-confirm-dialog.d.ts +76 -0
- package/types/rblabs-dev-axiom-core.d.ts +116 -0
- package/types/rblabs-dev-axiom-empty-state.d.ts +55 -0
- package/types/rblabs-dev-axiom-message.d.ts +48 -0
- package/types/rblabs-dev-axiom-monogram.d.ts +12 -0
- package/types/rblabs-dev-axiom-page-header.d.ts +44 -0
- package/types/rblabs-dev-axiom-panel.d.ts +44 -0
- package/types/rblabs-dev-axiom-public-shell.d.ts +28 -0
- package/types/rblabs-dev-axiom-shell-footer.d.ts +17 -0
- package/types/rblabs-dev-axiom-status-chip.d.ts +40 -0
- package/types/rblabs-dev-axiom-technical-value.d.ts +35 -0
- package/types/rblabs-dev-axiom-theme-toggle.d.ts +12 -0
- package/types/rblabs-dev-axiom.d.ts +15 -675
- package/fesm2022/rblabs-dev-axiom.mjs.map +0 -1
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ViewEncapsulation, input } from "@angular/core";
|
|
3
|
+
import { MatIcon } from "@angular/material/icon";
|
|
4
|
+
import { RB_TONE_ICONS } from "@rblabs-dev/axiom/core";
|
|
5
|
+
var RbPageHeaderComponent = class RbPageHeaderComponent {
|
|
6
|
+
title = input.required(...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
7
|
+
eyebrow = input("", ...ngDevMode ? [{ debugName: "eyebrow" }] : /* istanbul ignore next */ []);
|
|
8
|
+
description = input("", ...ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []);
|
|
9
|
+
metrics = input([], ...ngDevMode ? [{ debugName: "metrics" }] : /* istanbul ignore next */ []);
|
|
10
|
+
toneIcon(metric) {
|
|
11
|
+
return RB_TONE_ICONS[metric.tone ?? "neutral"];
|
|
12
|
+
}
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
14
|
+
minVersion: "12.0.0",
|
|
15
|
+
version: "22.2.3",
|
|
16
|
+
ngImport: i0,
|
|
17
|
+
type: RbPageHeaderComponent,
|
|
18
|
+
deps: [],
|
|
19
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
20
|
+
});
|
|
21
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
22
|
+
minVersion: "17.0.0",
|
|
23
|
+
version: "22.2.3",
|
|
24
|
+
type: RbPageHeaderComponent,
|
|
25
|
+
isStandalone: true,
|
|
26
|
+
selector: "rb-page-header",
|
|
27
|
+
inputs: {
|
|
28
|
+
title: {
|
|
29
|
+
classPropertyName: "title",
|
|
30
|
+
publicName: "title",
|
|
31
|
+
isSignal: true,
|
|
32
|
+
isRequired: true,
|
|
33
|
+
transformFunction: null
|
|
34
|
+
},
|
|
35
|
+
eyebrow: {
|
|
36
|
+
classPropertyName: "eyebrow",
|
|
37
|
+
publicName: "eyebrow",
|
|
38
|
+
isSignal: true,
|
|
39
|
+
isRequired: false,
|
|
40
|
+
transformFunction: null
|
|
41
|
+
},
|
|
42
|
+
description: {
|
|
43
|
+
classPropertyName: "description",
|
|
44
|
+
publicName: "description",
|
|
45
|
+
isSignal: true,
|
|
46
|
+
isRequired: false,
|
|
47
|
+
transformFunction: null
|
|
48
|
+
},
|
|
49
|
+
metrics: {
|
|
50
|
+
classPropertyName: "metrics",
|
|
51
|
+
publicName: "metrics",
|
|
52
|
+
isSignal: true,
|
|
53
|
+
isRequired: false,
|
|
54
|
+
transformFunction: null
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
host: {
|
|
58
|
+
properties: { "attr.title": "null" },
|
|
59
|
+
classAttribute: "rb-page-header"
|
|
60
|
+
},
|
|
61
|
+
ngImport: i0,
|
|
62
|
+
template: `
|
|
63
|
+
<header class="rb-page-header__main">
|
|
64
|
+
<div class="rb-page-header__copy">
|
|
65
|
+
@if (eyebrow()) {
|
|
66
|
+
<p class="rb-page-header__eyebrow">{{ eyebrow() }}</p>
|
|
67
|
+
}
|
|
68
|
+
<h1 class="rb-page-header__title">{{ title() }}</h1>
|
|
69
|
+
@if (description()) {
|
|
70
|
+
<p class="rb-page-header__description">{{ description() }}</p>
|
|
71
|
+
}
|
|
72
|
+
</div>
|
|
73
|
+
<div class="rb-page-header__actions"><ng-content select="[rbActions]" /></div>
|
|
74
|
+
</header>
|
|
75
|
+
@if (metrics().length > 0) {
|
|
76
|
+
<dl class="rb-page-header__metrics">
|
|
77
|
+
@for (metric of metrics(); track metric.label) {
|
|
78
|
+
<div class="rb-page-header__metric" [attr.data-tone]="metric.tone ?? 'neutral'">
|
|
79
|
+
<dt class="rb-page-header__metric-label">{{ metric.label }}</dt>
|
|
80
|
+
<dd class="rb-page-header__metric-value">
|
|
81
|
+
@if (toneIcon(metric); as icon) {
|
|
82
|
+
<mat-icon fontSet="material-symbols-outlined" aria-hidden="true">{{
|
|
83
|
+
icon
|
|
84
|
+
}}</mat-icon>
|
|
85
|
+
}
|
|
86
|
+
<span>{{ metric.value }}</span>
|
|
87
|
+
</dd>
|
|
88
|
+
</div>
|
|
89
|
+
}
|
|
90
|
+
</dl>
|
|
91
|
+
}
|
|
92
|
+
`,
|
|
93
|
+
isInline: true,
|
|
94
|
+
styles: ["rb-page-header{display:grid;gap:var(--rb-space-5);min-width:0}rb-page-header .rb-page-header__main{display:flex;gap:var(--rb-space-5);align-items:flex-start;justify-content:space-between;min-width:0}@media(width<40rem){rb-page-header .rb-page-header__main{flex-direction:column;gap:var(--rb-space-4)}}rb-page-header .rb-page-header__copy{display:grid;gap:var(--rb-space-2);min-width:0;max-width:48rem}rb-page-header .rb-page-header__eyebrow{margin:0;color:var(--rb-color-primary);font:var(--rb-type-label-small);letter-spacing:var(--rb-type-label-small-tracking);text-transform:uppercase}rb-page-header .rb-page-header__title{margin:0;color:var(--rb-color-text-strong);font:var(--rb-type-page-title);letter-spacing:var(--rb-type-page-title-tracking);overflow-wrap:anywhere}rb-page-header .rb-page-header__description{margin:0;color:var(--rb-color-text-muted);font:var(--rb-type-body-large)}rb-page-header .rb-page-header__actions{display:flex;flex:none;flex-wrap:wrap;gap:var(--rb-space-2);align-items:center;justify-content:flex-end}@media(width<40rem){rb-page-header .rb-page-header__actions{justify-content:flex-start}}rb-page-header .rb-page-header__actions:empty{display:none}rb-page-header .rb-page-header__metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr));gap:var(--rb-space-3);margin:0}rb-page-header .rb-page-header__metric{display:grid;gap:var(--rb-space-1);align-content:start;min-width:0;padding:var(--rb-space-3) var(--rb-space-4);border:1px solid var(--rb-color-border);border-radius:var(--rb-radius-md);background-color:var(--rb-color-surface)}rb-page-header .rb-page-header__metric-label{color:var(--rb-color-text-subtle);font:var(--rb-type-label-small);letter-spacing:var(--rb-type-label-small-tracking);text-transform:uppercase}rb-page-header .rb-page-header__metric-value{display:flex;gap:var(--rb-space-2);align-items:center;min-width:0;margin:0;color:var(--rb-color-text-strong);font:var(--rb-type-title-large);letter-spacing:var(--rb-type-title-large-tracking);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}rb-page-header .rb-page-header__metric-value .mat-icon{flex:none;width:var(--rb-size-icon-md);height:var(--rb-size-icon-md);font-size:var(--rb-size-icon-md)}rb-page-header .rb-page-header__metric[data-tone=active]{border-color:var(--rb-color-info-border)}rb-page-header .rb-page-header__metric[data-tone=active] .mat-icon{color:var(--rb-color-info)}rb-page-header .rb-page-header__metric[data-tone=success]{border-color:var(--rb-color-success-border)}rb-page-header .rb-page-header__metric[data-tone=success] .mat-icon{color:var(--rb-color-success)}rb-page-header .rb-page-header__metric[data-tone=warning]{border-color:var(--rb-color-warning-border)}rb-page-header .rb-page-header__metric[data-tone=warning] .mat-icon{color:var(--rb-color-warning)}rb-page-header .rb-page-header__metric[data-tone=danger]{border-color:var(--rb-color-danger-border)}rb-page-header .rb-page-header__metric[data-tone=danger] .mat-icon{color:var(--rb-color-danger)}\n"],
|
|
95
|
+
dependencies: [{
|
|
96
|
+
kind: "component",
|
|
97
|
+
type: MatIcon,
|
|
98
|
+
selector: "mat-icon",
|
|
99
|
+
inputs: [
|
|
100
|
+
"color",
|
|
101
|
+
"inline",
|
|
102
|
+
"svgIcon",
|
|
103
|
+
"fontSet",
|
|
104
|
+
"fontIcon"
|
|
105
|
+
],
|
|
106
|
+
exportAs: ["matIcon"]
|
|
107
|
+
}],
|
|
108
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
109
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
113
|
+
minVersion: "12.0.0",
|
|
114
|
+
version: "22.2.3",
|
|
115
|
+
ngImport: i0,
|
|
116
|
+
type: RbPageHeaderComponent,
|
|
117
|
+
decorators: [{
|
|
118
|
+
type: Component,
|
|
119
|
+
args: [{
|
|
120
|
+
selector: "rb-page-header",
|
|
121
|
+
imports: [MatIcon],
|
|
122
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
123
|
+
encapsulation: ViewEncapsulation.None,
|
|
124
|
+
host: {
|
|
125
|
+
class: "rb-page-header",
|
|
126
|
+
"[attr.title]": "null"
|
|
127
|
+
},
|
|
128
|
+
template: `
|
|
129
|
+
<header class="rb-page-header__main">
|
|
130
|
+
<div class="rb-page-header__copy">
|
|
131
|
+
@if (eyebrow()) {
|
|
132
|
+
<p class="rb-page-header__eyebrow">{{ eyebrow() }}</p>
|
|
133
|
+
}
|
|
134
|
+
<h1 class="rb-page-header__title">{{ title() }}</h1>
|
|
135
|
+
@if (description()) {
|
|
136
|
+
<p class="rb-page-header__description">{{ description() }}</p>
|
|
137
|
+
}
|
|
138
|
+
</div>
|
|
139
|
+
<div class="rb-page-header__actions"><ng-content select="[rbActions]" /></div>
|
|
140
|
+
</header>
|
|
141
|
+
@if (metrics().length > 0) {
|
|
142
|
+
<dl class="rb-page-header__metrics">
|
|
143
|
+
@for (metric of metrics(); track metric.label) {
|
|
144
|
+
<div class="rb-page-header__metric" [attr.data-tone]="metric.tone ?? 'neutral'">
|
|
145
|
+
<dt class="rb-page-header__metric-label">{{ metric.label }}</dt>
|
|
146
|
+
<dd class="rb-page-header__metric-value">
|
|
147
|
+
@if (toneIcon(metric); as icon) {
|
|
148
|
+
<mat-icon fontSet="material-symbols-outlined" aria-hidden="true">{{
|
|
149
|
+
icon
|
|
150
|
+
}}</mat-icon>
|
|
151
|
+
}
|
|
152
|
+
<span>{{ metric.value }}</span>
|
|
153
|
+
</dd>
|
|
154
|
+
</div>
|
|
155
|
+
}
|
|
156
|
+
</dl>
|
|
157
|
+
}
|
|
158
|
+
`,
|
|
159
|
+
styles: ["rb-page-header{display:grid;gap:var(--rb-space-5);min-width:0}rb-page-header .rb-page-header__main{display:flex;gap:var(--rb-space-5);align-items:flex-start;justify-content:space-between;min-width:0}@media(width<40rem){rb-page-header .rb-page-header__main{flex-direction:column;gap:var(--rb-space-4)}}rb-page-header .rb-page-header__copy{display:grid;gap:var(--rb-space-2);min-width:0;max-width:48rem}rb-page-header .rb-page-header__eyebrow{margin:0;color:var(--rb-color-primary);font:var(--rb-type-label-small);letter-spacing:var(--rb-type-label-small-tracking);text-transform:uppercase}rb-page-header .rb-page-header__title{margin:0;color:var(--rb-color-text-strong);font:var(--rb-type-page-title);letter-spacing:var(--rb-type-page-title-tracking);overflow-wrap:anywhere}rb-page-header .rb-page-header__description{margin:0;color:var(--rb-color-text-muted);font:var(--rb-type-body-large)}rb-page-header .rb-page-header__actions{display:flex;flex:none;flex-wrap:wrap;gap:var(--rb-space-2);align-items:center;justify-content:flex-end}@media(width<40rem){rb-page-header .rb-page-header__actions{justify-content:flex-start}}rb-page-header .rb-page-header__actions:empty{display:none}rb-page-header .rb-page-header__metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr));gap:var(--rb-space-3);margin:0}rb-page-header .rb-page-header__metric{display:grid;gap:var(--rb-space-1);align-content:start;min-width:0;padding:var(--rb-space-3) var(--rb-space-4);border:1px solid var(--rb-color-border);border-radius:var(--rb-radius-md);background-color:var(--rb-color-surface)}rb-page-header .rb-page-header__metric-label{color:var(--rb-color-text-subtle);font:var(--rb-type-label-small);letter-spacing:var(--rb-type-label-small-tracking);text-transform:uppercase}rb-page-header .rb-page-header__metric-value{display:flex;gap:var(--rb-space-2);align-items:center;min-width:0;margin:0;color:var(--rb-color-text-strong);font:var(--rb-type-title-large);letter-spacing:var(--rb-type-title-large-tracking);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}rb-page-header .rb-page-header__metric-value .mat-icon{flex:none;width:var(--rb-size-icon-md);height:var(--rb-size-icon-md);font-size:var(--rb-size-icon-md)}rb-page-header .rb-page-header__metric[data-tone=active]{border-color:var(--rb-color-info-border)}rb-page-header .rb-page-header__metric[data-tone=active] .mat-icon{color:var(--rb-color-info)}rb-page-header .rb-page-header__metric[data-tone=success]{border-color:var(--rb-color-success-border)}rb-page-header .rb-page-header__metric[data-tone=success] .mat-icon{color:var(--rb-color-success)}rb-page-header .rb-page-header__metric[data-tone=warning]{border-color:var(--rb-color-warning-border)}rb-page-header .rb-page-header__metric[data-tone=warning] .mat-icon{color:var(--rb-color-warning)}rb-page-header .rb-page-header__metric[data-tone=danger]{border-color:var(--rb-color-danger-border)}rb-page-header .rb-page-header__metric[data-tone=danger] .mat-icon{color:var(--rb-color-danger)}\n"]
|
|
160
|
+
}]
|
|
161
|
+
}],
|
|
162
|
+
propDecorators: {
|
|
163
|
+
title: [{
|
|
164
|
+
type: i0.Input,
|
|
165
|
+
args: [{
|
|
166
|
+
isSignal: true,
|
|
167
|
+
alias: "title",
|
|
168
|
+
required: true
|
|
169
|
+
}]
|
|
170
|
+
}],
|
|
171
|
+
eyebrow: [{
|
|
172
|
+
type: i0.Input,
|
|
173
|
+
args: [{
|
|
174
|
+
isSignal: true,
|
|
175
|
+
alias: "eyebrow",
|
|
176
|
+
required: false
|
|
177
|
+
}]
|
|
178
|
+
}],
|
|
179
|
+
description: [{
|
|
180
|
+
type: i0.Input,
|
|
181
|
+
args: [{
|
|
182
|
+
isSignal: true,
|
|
183
|
+
alias: "description",
|
|
184
|
+
required: false
|
|
185
|
+
}]
|
|
186
|
+
}],
|
|
187
|
+
metrics: [{
|
|
188
|
+
type: i0.Input,
|
|
189
|
+
args: [{
|
|
190
|
+
isSignal: true,
|
|
191
|
+
alias: "metrics",
|
|
192
|
+
required: false
|
|
193
|
+
}]
|
|
194
|
+
}]
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
export { RbPageHeaderComponent };
|
|
198
|
+
|
|
199
|
+
//# sourceMappingURL=rblabs-dev-axiom-page-header.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rblabs-dev-axiom-page-header.mjs","names":[],"sources":["../../../projects/axiom/page-header/src/page-header.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation, input } from '@angular/core';\nimport { MatIcon } from '@angular/material/icon';\nimport { RB_TONE_ICONS, RbStatusTone } from '@rblabs-dev/axiom/core';\n\nexport interface RbPageHeaderMetric {\n label: string;\n value: string | number;\n /** Adds a tone color and icon to the value; the label and value carry the meaning. */\n tone?: RbStatusTone;\n}\n\n/**\n * The page's single `<h1>` with its eyebrow, description, summary metrics and page actions\n * (docs/design-system.md, section 15.1). Elements marked `rbActions` are projected next to the\n * title.\n */\n@Component({\n selector: 'rb-page-header',\n imports: [MatIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'rb-page-header',\n // `title` is an input; a static `title=\"…\"` would also leave a native tooltip on the host.\n '[attr.title]': 'null',\n },\n template: `\n <header class=\"rb-page-header__main\">\n <div class=\"rb-page-header__copy\">\n @if (eyebrow()) {\n <p class=\"rb-page-header__eyebrow\">{{ eyebrow() }}</p>\n }\n <h1 class=\"rb-page-header__title\">{{ title() }}</h1>\n @if (description()) {\n <p class=\"rb-page-header__description\">{{ description() }}</p>\n }\n </div>\n <div class=\"rb-page-header__actions\"><ng-content select=\"[rbActions]\" /></div>\n </header>\n @if (metrics().length > 0) {\n <dl class=\"rb-page-header__metrics\">\n @for (metric of metrics(); track metric.label) {\n <div class=\"rb-page-header__metric\" [attr.data-tone]=\"metric.tone ?? 'neutral'\">\n <dt class=\"rb-page-header__metric-label\">{{ metric.label }}</dt>\n <dd class=\"rb-page-header__metric-value\">\n @if (toneIcon(metric); as icon) {\n <mat-icon fontSet=\"material-symbols-outlined\" aria-hidden=\"true\">{{\n icon\n }}</mat-icon>\n }\n <span>{{ metric.value }}</span>\n </dd>\n </div>\n }\n </dl>\n }\n `,\n styleUrl: './page-header.scss',\n})\nexport class RbPageHeaderComponent {\n readonly title = input.required<string>();\n /** Short context line above the title, such as the app area. */\n readonly eyebrow = input<string>('');\n readonly description = input<string>('');\n readonly metrics = input<readonly RbPageHeaderMetric[]>([]);\n\n protected toneIcon(metric: RbPageHeaderMetric): string | null {\n return RB_TONE_ICONS[metric.tone ?? 'neutral'];\n }\n}\n"],"mappings":";;;;AA2DA,IAAa,wBAAb,MAAa,sBAAqB;CACvB,QAAQ,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAEhC,UAAU,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC3B,cAAc,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,UAAU,MAAqC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAEjD,SAAS,QAA0B;EAC3C,OAAO,cAAc,OAAO,QAAQ;CACtC;CATW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAqB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAArB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAqB,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,SAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,aAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,SAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA,EAAA,cAAA,OAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UAjCtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BT,UAAA;EAAA,QAAA,CAAA,k9FAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MAtCS;GAAO,UAAA;GAAA,QAAA;IAAA;IAAA;IAAA;IAAA;IAAA;GAAA;GAAA,UAAA,CAAA,SAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAyCN,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EA3CjC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAgB,SACjB,CAAC,OAAO;GAAC,iBACD,wBAAwB;GAAM,eAChC,kBAAkB;GAAI,MAC/B;IACJ,OAAO;IAEP,gBAAgB;GACjB;GAAA,UACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BT,QAAA,CAAA,k9FAAA;EAAA,CAAA"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ViewEncapsulation, booleanAttribute, input } from "@angular/core";
|
|
3
|
+
var RbPanelComponent = class RbPanelComponent {
|
|
4
|
+
title = input("", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
5
|
+
description = input("", ...ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []);
|
|
6
|
+
variant = input("default", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
7
|
+
headingLevel = input(2, ...ngDevMode ? [{ debugName: "headingLevel" }] : /* istanbul ignore next */ []);
|
|
8
|
+
flush = input(false, {
|
|
9
|
+
...ngDevMode ? { debugName: "flush" } : /* istanbul ignore next */ {},
|
|
10
|
+
transform: booleanAttribute
|
|
11
|
+
});
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
13
|
+
minVersion: "12.0.0",
|
|
14
|
+
version: "22.2.3",
|
|
15
|
+
ngImport: i0,
|
|
16
|
+
type: RbPanelComponent,
|
|
17
|
+
deps: [],
|
|
18
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
19
|
+
});
|
|
20
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
21
|
+
minVersion: "17.0.0",
|
|
22
|
+
version: "22.2.3",
|
|
23
|
+
type: RbPanelComponent,
|
|
24
|
+
isStandalone: true,
|
|
25
|
+
selector: "rb-panel",
|
|
26
|
+
inputs: {
|
|
27
|
+
title: {
|
|
28
|
+
classPropertyName: "title",
|
|
29
|
+
publicName: "title",
|
|
30
|
+
isSignal: true,
|
|
31
|
+
isRequired: false,
|
|
32
|
+
transformFunction: null
|
|
33
|
+
},
|
|
34
|
+
description: {
|
|
35
|
+
classPropertyName: "description",
|
|
36
|
+
publicName: "description",
|
|
37
|
+
isSignal: true,
|
|
38
|
+
isRequired: false,
|
|
39
|
+
transformFunction: null
|
|
40
|
+
},
|
|
41
|
+
variant: {
|
|
42
|
+
classPropertyName: "variant",
|
|
43
|
+
publicName: "variant",
|
|
44
|
+
isSignal: true,
|
|
45
|
+
isRequired: false,
|
|
46
|
+
transformFunction: null
|
|
47
|
+
},
|
|
48
|
+
headingLevel: {
|
|
49
|
+
classPropertyName: "headingLevel",
|
|
50
|
+
publicName: "headingLevel",
|
|
51
|
+
isSignal: true,
|
|
52
|
+
isRequired: false,
|
|
53
|
+
transformFunction: null
|
|
54
|
+
},
|
|
55
|
+
flush: {
|
|
56
|
+
classPropertyName: "flush",
|
|
57
|
+
publicName: "flush",
|
|
58
|
+
isSignal: true,
|
|
59
|
+
isRequired: false,
|
|
60
|
+
transformFunction: null
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
host: {
|
|
64
|
+
properties: {
|
|
65
|
+
"attr.title": "null",
|
|
66
|
+
"attr.data-variant": "variant()",
|
|
67
|
+
"attr.data-flush": "flush() ? \"\" : null"
|
|
68
|
+
},
|
|
69
|
+
classAttribute: "rb-panel"
|
|
70
|
+
},
|
|
71
|
+
ngImport: i0,
|
|
72
|
+
template: `
|
|
73
|
+
@if (title() || description()) {
|
|
74
|
+
<header class="rb-panel__header">
|
|
75
|
+
<div class="rb-panel__heading">
|
|
76
|
+
@if (title()) {
|
|
77
|
+
@switch (headingLevel()) {
|
|
78
|
+
@case (3) {
|
|
79
|
+
<h3 class="rb-panel__title">{{ title() }}</h3>
|
|
80
|
+
}
|
|
81
|
+
@case (4) {
|
|
82
|
+
<h4 class="rb-panel__title">{{ title() }}</h4>
|
|
83
|
+
}
|
|
84
|
+
@case (5) {
|
|
85
|
+
<h5 class="rb-panel__title">{{ title() }}</h5>
|
|
86
|
+
}
|
|
87
|
+
@case (6) {
|
|
88
|
+
<h6 class="rb-panel__title">{{ title() }}</h6>
|
|
89
|
+
}
|
|
90
|
+
@default {
|
|
91
|
+
<h2 class="rb-panel__title">{{ title() }}</h2>
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
@if (description()) {
|
|
96
|
+
<p class="rb-panel__description">{{ description() }}</p>
|
|
97
|
+
}
|
|
98
|
+
</div>
|
|
99
|
+
<div class="rb-panel__actions"><ng-content select="[rbActions]" /></div>
|
|
100
|
+
</header>
|
|
101
|
+
}
|
|
102
|
+
<div class="rb-panel__body"><ng-content /></div>
|
|
103
|
+
`,
|
|
104
|
+
isInline: true,
|
|
105
|
+
styles: ["rb-panel{display:block;min-width:0;border:1px solid var(--rb-color-border);border-radius:var(--rb-radius-lg);background-color:var(--rb-color-surface);color:var(--rb-color-text);box-shadow:var(--rb-elevation-1)}rb-panel[data-variant=soft]{background-color:var(--rb-color-surface-sunken);box-shadow:var(--rb-elevation-0)}rb-panel[data-variant=elevated]{border-color:transparent;background-color:var(--rb-color-surface-raised);box-shadow:var(--rb-elevation-2)}rb-panel[data-variant=danger]{border-color:var(--rb-color-danger-border)}rb-panel[data-variant=danger] .rb-panel__title{color:var(--rb-color-danger)}rb-panel .rb-panel__header{display:flex;gap:var(--rb-space-4);align-items:flex-start;justify-content:space-between;padding:var(--rb-space-5) var(--rb-space-6);border-block-end:1px solid var(--rb-color-border)}@media(width<40rem){rb-panel .rb-panel__header{flex-direction:column;gap:var(--rb-space-3);padding:var(--rb-space-4)}}rb-panel[data-variant=danger] .rb-panel__header{border-block-end-color:var(--rb-color-danger-border)}rb-panel .rb-panel__heading{display:grid;gap:var(--rb-space-1);min-width:0}rb-panel .rb-panel__title{margin:0;color:var(--rb-color-text-strong);font:var(--rb-type-title-medium);letter-spacing:var(--rb-type-title-medium-tracking);overflow-wrap:anywhere}rb-panel .rb-panel__description{margin:0;color:var(--rb-color-text-muted);font:var(--rb-type-body-medium)}rb-panel .rb-panel__actions{display:flex;flex:none;flex-wrap:wrap;gap:var(--rb-space-2);align-items:center}rb-panel .rb-panel__actions:empty{display:none}rb-panel .rb-panel__body{min-width:0;padding:var(--rb-space-6)}@media(width<40rem){rb-panel .rb-panel__body{padding:var(--rb-space-4)}}rb-panel[data-flush] .rb-panel__body{padding:0}rb-panel[data-flush] .rb-panel__body>.rb-table-scroll{border:0;border-radius:0 0 var(--rb-radius-lg) var(--rb-radius-lg);background-color:transparent}\n"],
|
|
106
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
107
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
111
|
+
minVersion: "12.0.0",
|
|
112
|
+
version: "22.2.3",
|
|
113
|
+
ngImport: i0,
|
|
114
|
+
type: RbPanelComponent,
|
|
115
|
+
decorators: [{
|
|
116
|
+
type: Component,
|
|
117
|
+
args: [{
|
|
118
|
+
selector: "rb-panel",
|
|
119
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
120
|
+
encapsulation: ViewEncapsulation.None,
|
|
121
|
+
host: {
|
|
122
|
+
class: "rb-panel",
|
|
123
|
+
"[attr.title]": "null",
|
|
124
|
+
"[attr.data-variant]": "variant()",
|
|
125
|
+
"[attr.data-flush]": "flush() ? \"\" : null"
|
|
126
|
+
},
|
|
127
|
+
template: `
|
|
128
|
+
@if (title() || description()) {
|
|
129
|
+
<header class="rb-panel__header">
|
|
130
|
+
<div class="rb-panel__heading">
|
|
131
|
+
@if (title()) {
|
|
132
|
+
@switch (headingLevel()) {
|
|
133
|
+
@case (3) {
|
|
134
|
+
<h3 class="rb-panel__title">{{ title() }}</h3>
|
|
135
|
+
}
|
|
136
|
+
@case (4) {
|
|
137
|
+
<h4 class="rb-panel__title">{{ title() }}</h4>
|
|
138
|
+
}
|
|
139
|
+
@case (5) {
|
|
140
|
+
<h5 class="rb-panel__title">{{ title() }}</h5>
|
|
141
|
+
}
|
|
142
|
+
@case (6) {
|
|
143
|
+
<h6 class="rb-panel__title">{{ title() }}</h6>
|
|
144
|
+
}
|
|
145
|
+
@default {
|
|
146
|
+
<h2 class="rb-panel__title">{{ title() }}</h2>
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
@if (description()) {
|
|
151
|
+
<p class="rb-panel__description">{{ description() }}</p>
|
|
152
|
+
}
|
|
153
|
+
</div>
|
|
154
|
+
<div class="rb-panel__actions"><ng-content select="[rbActions]" /></div>
|
|
155
|
+
</header>
|
|
156
|
+
}
|
|
157
|
+
<div class="rb-panel__body"><ng-content /></div>
|
|
158
|
+
`,
|
|
159
|
+
styles: ["rb-panel{display:block;min-width:0;border:1px solid var(--rb-color-border);border-radius:var(--rb-radius-lg);background-color:var(--rb-color-surface);color:var(--rb-color-text);box-shadow:var(--rb-elevation-1)}rb-panel[data-variant=soft]{background-color:var(--rb-color-surface-sunken);box-shadow:var(--rb-elevation-0)}rb-panel[data-variant=elevated]{border-color:transparent;background-color:var(--rb-color-surface-raised);box-shadow:var(--rb-elevation-2)}rb-panel[data-variant=danger]{border-color:var(--rb-color-danger-border)}rb-panel[data-variant=danger] .rb-panel__title{color:var(--rb-color-danger)}rb-panel .rb-panel__header{display:flex;gap:var(--rb-space-4);align-items:flex-start;justify-content:space-between;padding:var(--rb-space-5) var(--rb-space-6);border-block-end:1px solid var(--rb-color-border)}@media(width<40rem){rb-panel .rb-panel__header{flex-direction:column;gap:var(--rb-space-3);padding:var(--rb-space-4)}}rb-panel[data-variant=danger] .rb-panel__header{border-block-end-color:var(--rb-color-danger-border)}rb-panel .rb-panel__heading{display:grid;gap:var(--rb-space-1);min-width:0}rb-panel .rb-panel__title{margin:0;color:var(--rb-color-text-strong);font:var(--rb-type-title-medium);letter-spacing:var(--rb-type-title-medium-tracking);overflow-wrap:anywhere}rb-panel .rb-panel__description{margin:0;color:var(--rb-color-text-muted);font:var(--rb-type-body-medium)}rb-panel .rb-panel__actions{display:flex;flex:none;flex-wrap:wrap;gap:var(--rb-space-2);align-items:center}rb-panel .rb-panel__actions:empty{display:none}rb-panel .rb-panel__body{min-width:0;padding:var(--rb-space-6)}@media(width<40rem){rb-panel .rb-panel__body{padding:var(--rb-space-4)}}rb-panel[data-flush] .rb-panel__body{padding:0}rb-panel[data-flush] .rb-panel__body>.rb-table-scroll{border:0;border-radius:0 0 var(--rb-radius-lg) var(--rb-radius-lg);background-color:transparent}\n"]
|
|
160
|
+
}]
|
|
161
|
+
}],
|
|
162
|
+
propDecorators: {
|
|
163
|
+
title: [{
|
|
164
|
+
type: i0.Input,
|
|
165
|
+
args: [{
|
|
166
|
+
isSignal: true,
|
|
167
|
+
alias: "title",
|
|
168
|
+
required: false
|
|
169
|
+
}]
|
|
170
|
+
}],
|
|
171
|
+
description: [{
|
|
172
|
+
type: i0.Input,
|
|
173
|
+
args: [{
|
|
174
|
+
isSignal: true,
|
|
175
|
+
alias: "description",
|
|
176
|
+
required: false
|
|
177
|
+
}]
|
|
178
|
+
}],
|
|
179
|
+
variant: [{
|
|
180
|
+
type: i0.Input,
|
|
181
|
+
args: [{
|
|
182
|
+
isSignal: true,
|
|
183
|
+
alias: "variant",
|
|
184
|
+
required: false
|
|
185
|
+
}]
|
|
186
|
+
}],
|
|
187
|
+
headingLevel: [{
|
|
188
|
+
type: i0.Input,
|
|
189
|
+
args: [{
|
|
190
|
+
isSignal: true,
|
|
191
|
+
alias: "headingLevel",
|
|
192
|
+
required: false
|
|
193
|
+
}]
|
|
194
|
+
}],
|
|
195
|
+
flush: [{
|
|
196
|
+
type: i0.Input,
|
|
197
|
+
args: [{
|
|
198
|
+
isSignal: true,
|
|
199
|
+
alias: "flush",
|
|
200
|
+
required: false
|
|
201
|
+
}]
|
|
202
|
+
}]
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
export { RbPanelComponent };
|
|
206
|
+
|
|
207
|
+
//# sourceMappingURL=rblabs-dev-axiom-panel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rblabs-dev-axiom-panel.mjs","names":[],"sources":["../../../projects/axiom/panel/src/panel.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n input,\n} from '@angular/core';\n\nexport type RbPanelVariant = 'default' | 'soft' | 'elevated' | 'danger';\nexport type RbHeadingLevel = 2 | 3 | 4 | 5 | 6;\n\n/**\n * Content container with an optional header (docs/design-system.md, section 15.2). Elements marked\n * `rbActions` are projected into the header next to the title.\n */\n@Component({\n selector: 'rb-panel',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'rb-panel',\n // `title` is an input; a static `title=\"…\"` would also leave a native tooltip on the host.\n '[attr.title]': 'null',\n '[attr.data-variant]': 'variant()',\n '[attr.data-flush]': 'flush() ? \"\" : null',\n },\n template: `\n @if (title() || description()) {\n <header class=\"rb-panel__header\">\n <div class=\"rb-panel__heading\">\n @if (title()) {\n @switch (headingLevel()) {\n @case (3) {\n <h3 class=\"rb-panel__title\">{{ title() }}</h3>\n }\n @case (4) {\n <h4 class=\"rb-panel__title\">{{ title() }}</h4>\n }\n @case (5) {\n <h5 class=\"rb-panel__title\">{{ title() }}</h5>\n }\n @case (6) {\n <h6 class=\"rb-panel__title\">{{ title() }}</h6>\n }\n @default {\n <h2 class=\"rb-panel__title\">{{ title() }}</h2>\n }\n }\n }\n @if (description()) {\n <p class=\"rb-panel__description\">{{ description() }}</p>\n }\n </div>\n <div class=\"rb-panel__actions\"><ng-content select=\"[rbActions]\" /></div>\n </header>\n }\n <div class=\"rb-panel__body\"><ng-content /></div>\n `,\n styleUrl: './panel.scss',\n})\nexport class RbPanelComponent {\n readonly title = input<string>('');\n readonly description = input<string>('');\n readonly variant = input<RbPanelVariant>('default');\n /** Heading level of the title; follows the document outline, not the visual size. */\n readonly headingLevel = input<RbHeadingLevel>(2);\n /** Removes the body padding, for a table or list that runs to the panel's edges. */\n readonly flush = input(false, { transform: booleanAttribute });\n}\n"],"mappings":";;AA4DA,IAAa,mBAAb,MAAa,iBAAgB;CAClB,QAAQ,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACzB,cAAc,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,UAAU,MAAsB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAE1C,eAAe,MAAsB,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAEvC,QAAQ,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CAPhD,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAgB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAhB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAgB,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,aAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,SAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,cAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA;IAAA,cAAA;IAAA,qBAAA;IAAA,mBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UAlCjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BT,UAAA;EAAA,QAAA,CAAA,01DAAA;EAAA,iBAAA,GAAA,wBAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAGU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgB,YAAA,CAAA;EA7C5B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAU,iBACH,wBAAwB;GAAM,eAChC,kBAAkB;GAAI,MAC/B;IACJ,OAAO;IAEP,gBAAgB;IAChB,uBAAuB;IACvB,qBAAqB;GACtB;GAAA,UACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BT,QAAA,CAAA,01DAAA;EAAA,CAAA"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ViewEncapsulation, input, viewChild } from "@angular/core";
|
|
3
|
+
import { RbBrandLockupComponent } from "@rblabs-dev/axiom/brand-lockup";
|
|
4
|
+
import { RbShellFooterComponent } from "@rblabs-dev/axiom/shell-footer";
|
|
5
|
+
import { RbThemeToggleComponent } from "@rblabs-dev/axiom/theme-toggle";
|
|
6
|
+
var RbPublicShellComponent = class RbPublicShellComponent {
|
|
7
|
+
appName = input.required(...ngDevMode ? [{ debugName: "appName" }] : /* istanbul ignore next */ []);
|
|
8
|
+
homeLink = input("/", ...ngDevMode ? [{ debugName: "homeLink" }] : /* istanbul ignore next */ []);
|
|
9
|
+
main = viewChild.required("main", ...ngDevMode ? [{ debugName: "main" }] : /* istanbul ignore next */ []);
|
|
10
|
+
skipToMain(event) {
|
|
11
|
+
event.preventDefault();
|
|
12
|
+
this.main().nativeElement.focus();
|
|
13
|
+
}
|
|
14
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
15
|
+
minVersion: "12.0.0",
|
|
16
|
+
version: "22.2.3",
|
|
17
|
+
ngImport: i0,
|
|
18
|
+
type: RbPublicShellComponent,
|
|
19
|
+
deps: [],
|
|
20
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
21
|
+
});
|
|
22
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
23
|
+
minVersion: "17.2.0",
|
|
24
|
+
version: "22.2.3",
|
|
25
|
+
type: RbPublicShellComponent,
|
|
26
|
+
isStandalone: true,
|
|
27
|
+
selector: "rb-public-shell",
|
|
28
|
+
inputs: {
|
|
29
|
+
appName: {
|
|
30
|
+
classPropertyName: "appName",
|
|
31
|
+
publicName: "appName",
|
|
32
|
+
isSignal: true,
|
|
33
|
+
isRequired: true,
|
|
34
|
+
transformFunction: null
|
|
35
|
+
},
|
|
36
|
+
homeLink: {
|
|
37
|
+
classPropertyName: "homeLink",
|
|
38
|
+
publicName: "homeLink",
|
|
39
|
+
isSignal: true,
|
|
40
|
+
isRequired: false,
|
|
41
|
+
transformFunction: null
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
host: { classAttribute: "rb-public-shell" },
|
|
45
|
+
viewQueries: [{
|
|
46
|
+
propertyName: "main",
|
|
47
|
+
first: true,
|
|
48
|
+
predicate: ["main"],
|
|
49
|
+
descendants: true,
|
|
50
|
+
isSignal: true
|
|
51
|
+
}],
|
|
52
|
+
ngImport: i0,
|
|
53
|
+
template: `
|
|
54
|
+
<a class="rb-skip-link" href="#main-content" (click)="skipToMain($event)"
|
|
55
|
+
>Skip to main content</a
|
|
56
|
+
>
|
|
57
|
+
|
|
58
|
+
<header class="rb-public-shell__header">
|
|
59
|
+
<rb-brand-lockup [appName]="appName()" [link]="homeLink()" />
|
|
60
|
+
<div class="rb-public-shell__actions">
|
|
61
|
+
<ng-content select="[rbShellActions]" />
|
|
62
|
+
<rb-theme-toggle />
|
|
63
|
+
</div>
|
|
64
|
+
</header>
|
|
65
|
+
|
|
66
|
+
<main #main class="rb-public-shell__main" id="main-content" tabindex="-1">
|
|
67
|
+
<ng-content />
|
|
68
|
+
</main>
|
|
69
|
+
|
|
70
|
+
<rb-shell-footer [appName]="appName()"><ng-content select="[rbShellFooter]" /></rb-shell-footer>
|
|
71
|
+
`,
|
|
72
|
+
isInline: true,
|
|
73
|
+
styles: ["rb-public-shell{display:flex;flex-direction:column;min-block-size:100dvh;background:radial-gradient(circle at 12% 18%,var(--rb-color-primary-soft),transparent 26rem),radial-gradient(circle at 88% 82%,var(--rb-color-primary-soft),transparent 30rem),var(--rb-color-bg)}rb-public-shell .rb-public-shell__header{display:flex;flex:none;gap:var(--rb-space-4);align-items:center;justify-content:space-between;inline-size:min(100%,var(--rb-size-content-max));min-block-size:var(--rb-size-shell-topbar);margin-inline:auto;padding-inline:var(--rb-space-page)}rb-public-shell .rb-public-shell__actions{display:flex;gap:var(--rb-space-2);align-items:center}rb-public-shell .rb-public-shell__main{display:grid;flex:1 0 auto;align-content:center;justify-items:center;inline-size:min(100%,var(--rb-size-content-max));margin-inline:auto;padding:var(--rb-space-8) var(--rb-space-page)}rb-public-shell .rb-public-shell__main:focus{outline:none}@media(width<40rem){rb-public-shell .rb-public-shell__main{align-content:start;padding-block:var(--rb-space-4) var(--rb-space-8)}}rb-public-shell rb-shell-footer{flex:none;border-block-start-color:transparent}\n"],
|
|
74
|
+
dependencies: [
|
|
75
|
+
{
|
|
76
|
+
kind: "component",
|
|
77
|
+
type: RbBrandLockupComponent,
|
|
78
|
+
selector: "rb-brand-lockup",
|
|
79
|
+
inputs: [
|
|
80
|
+
"appName",
|
|
81
|
+
"link",
|
|
82
|
+
"compact"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
kind: "component",
|
|
87
|
+
type: RbShellFooterComponent,
|
|
88
|
+
selector: "rb-shell-footer",
|
|
89
|
+
inputs: ["appName"]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
kind: "component",
|
|
93
|
+
type: RbThemeToggleComponent,
|
|
94
|
+
selector: "rb-theme-toggle"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
98
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
102
|
+
minVersion: "12.0.0",
|
|
103
|
+
version: "22.2.3",
|
|
104
|
+
ngImport: i0,
|
|
105
|
+
type: RbPublicShellComponent,
|
|
106
|
+
decorators: [{
|
|
107
|
+
type: Component,
|
|
108
|
+
args: [{
|
|
109
|
+
selector: "rb-public-shell",
|
|
110
|
+
imports: [
|
|
111
|
+
RbBrandLockupComponent,
|
|
112
|
+
RbShellFooterComponent,
|
|
113
|
+
RbThemeToggleComponent
|
|
114
|
+
],
|
|
115
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
116
|
+
encapsulation: ViewEncapsulation.None,
|
|
117
|
+
host: { class: "rb-public-shell" },
|
|
118
|
+
template: `
|
|
119
|
+
<a class="rb-skip-link" href="#main-content" (click)="skipToMain($event)"
|
|
120
|
+
>Skip to main content</a
|
|
121
|
+
>
|
|
122
|
+
|
|
123
|
+
<header class="rb-public-shell__header">
|
|
124
|
+
<rb-brand-lockup [appName]="appName()" [link]="homeLink()" />
|
|
125
|
+
<div class="rb-public-shell__actions">
|
|
126
|
+
<ng-content select="[rbShellActions]" />
|
|
127
|
+
<rb-theme-toggle />
|
|
128
|
+
</div>
|
|
129
|
+
</header>
|
|
130
|
+
|
|
131
|
+
<main #main class="rb-public-shell__main" id="main-content" tabindex="-1">
|
|
132
|
+
<ng-content />
|
|
133
|
+
</main>
|
|
134
|
+
|
|
135
|
+
<rb-shell-footer [appName]="appName()"><ng-content select="[rbShellFooter]" /></rb-shell-footer>
|
|
136
|
+
`,
|
|
137
|
+
styles: ["rb-public-shell{display:flex;flex-direction:column;min-block-size:100dvh;background:radial-gradient(circle at 12% 18%,var(--rb-color-primary-soft),transparent 26rem),radial-gradient(circle at 88% 82%,var(--rb-color-primary-soft),transparent 30rem),var(--rb-color-bg)}rb-public-shell .rb-public-shell__header{display:flex;flex:none;gap:var(--rb-space-4);align-items:center;justify-content:space-between;inline-size:min(100%,var(--rb-size-content-max));min-block-size:var(--rb-size-shell-topbar);margin-inline:auto;padding-inline:var(--rb-space-page)}rb-public-shell .rb-public-shell__actions{display:flex;gap:var(--rb-space-2);align-items:center}rb-public-shell .rb-public-shell__main{display:grid;flex:1 0 auto;align-content:center;justify-items:center;inline-size:min(100%,var(--rb-size-content-max));margin-inline:auto;padding:var(--rb-space-8) var(--rb-space-page)}rb-public-shell .rb-public-shell__main:focus{outline:none}@media(width<40rem){rb-public-shell .rb-public-shell__main{align-content:start;padding-block:var(--rb-space-4) var(--rb-space-8)}}rb-public-shell rb-shell-footer{flex:none;border-block-start-color:transparent}\n"]
|
|
138
|
+
}]
|
|
139
|
+
}],
|
|
140
|
+
propDecorators: {
|
|
141
|
+
appName: [{
|
|
142
|
+
type: i0.Input,
|
|
143
|
+
args: [{
|
|
144
|
+
isSignal: true,
|
|
145
|
+
alias: "appName",
|
|
146
|
+
required: true
|
|
147
|
+
}]
|
|
148
|
+
}],
|
|
149
|
+
homeLink: [{
|
|
150
|
+
type: i0.Input,
|
|
151
|
+
args: [{
|
|
152
|
+
isSignal: true,
|
|
153
|
+
alias: "homeLink",
|
|
154
|
+
required: false
|
|
155
|
+
}]
|
|
156
|
+
}],
|
|
157
|
+
main: [{
|
|
158
|
+
type: i0.ViewChild,
|
|
159
|
+
args: ["main", { isSignal: true }]
|
|
160
|
+
}]
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
export { RbPublicShellComponent };
|
|
164
|
+
|
|
165
|
+
//# sourceMappingURL=rblabs-dev-axiom-public-shell.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rblabs-dev-axiom-public-shell.mjs","names":[],"sources":["../../../projects/axiom/public-shell/src/public-shell.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n input,\n viewChild,\n} from '@angular/core';\nimport { RbBrandLockupComponent } from '@rblabs-dev/axiom/brand-lockup';\nimport { RbShellFooterComponent } from '@rblabs-dev/axiom/shell-footer';\nimport { RbThemeToggleComponent } from '@rblabs-dev/axiom/theme-toggle';\n\n/**\n * Frame for landing, sign-in and other public pages (docs/design-system.md, section 16.2): skip\n * link, a header with the brand lockup and theme toggle, a centered content area on the brand\n * background, and the standard footer.\n */\n@Component({\n selector: 'rb-public-shell',\n imports: [RbBrandLockupComponent, RbShellFooterComponent, RbThemeToggleComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'rb-public-shell' },\n template: `\n <a class=\"rb-skip-link\" href=\"#main-content\" (click)=\"skipToMain($event)\"\n >Skip to main content</a\n >\n\n <header class=\"rb-public-shell__header\">\n <rb-brand-lockup [appName]=\"appName()\" [link]=\"homeLink()\" />\n <div class=\"rb-public-shell__actions\">\n <ng-content select=\"[rbShellActions]\" />\n <rb-theme-toggle />\n </div>\n </header>\n\n <main #main class=\"rb-public-shell__main\" id=\"main-content\" tabindex=\"-1\">\n <ng-content />\n </main>\n\n <rb-shell-footer [appName]=\"appName()\"><ng-content select=\"[rbShellFooter]\" /></rb-shell-footer>\n `,\n styleUrl: './public-shell.scss',\n})\nexport class RbPublicShellComponent {\n /** Shown in the lockup and the footer: `Admin`, `Auth`, `Rover`, `Photogrammetry`… */\n readonly appName = input.required<string>();\n /** The lockup's link target, as a `routerLink` value. */\n readonly homeLink = input<string | readonly unknown[]>('/');\n\n private readonly main = viewChild.required<ElementRef<HTMLElement>>('main');\n\n /** See RbAppShellComponent: keeps the skip link on the current route. */\n protected skipToMain(event: Event): void {\n event.preventDefault();\n this.main().nativeElement.focus();\n }\n}\n"],"mappings":";;;;;AA4CA,IAAa,yBAAb,MAAa,uBAAsB;CAExB,UAAU,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAElC,WAAW,MAAmC,KAAI,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAE1C,OAAO,UAAU,SAAkC,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAGjE,WAAW,OAAY;EAC/B,MAAM,eAAc;EACpB,KAAK,KAAI,CAAE,CAAC,cAAc,MAAK;CACjC;CAZW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAsB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAtB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAsB,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,SAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA,EAAA,gBAAA,kBAAA;EAAA,aAAA,CAAA;GAAA,cAAA;GAAA,OAAA;GAAA,WAAA,CAAA,MAAA;GAAA,aAAA;GAAA,UAAA;EAAA,CAAA;EAAA,UAAA;EAAA,UArBvB;;;;;;;;;;;;;;;;;;;EAkBT,UAAA;EAAA,QAAA,CAAA,mnCAAA;EAAA,cAAA;GAAA;IAAA,MAAA;IAAA,MAtBS;IAAsB,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAsB,UAAA;IAAA,QAAA,CAAA,SAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAsB,UAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAyBrE,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EA3BlC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAiB,SAClB;IAAC;IAAwB;IAAwB;GAAsB;GAAC,iBAChE,wBAAwB;GAAM,eAChC,kBAAkB;GAAI,MAC/B,EAAE,OAAO,kBAAiB;GAAE,UACxB;;;;;;;;;;;;;;;;;;;GAkBT,QAAA,CAAA,mnCAAA;EAAA,CAAA;CASmE,CAAA;CAAA,gBAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|