@genesislcap/foundation-header 14.179.0 → 14.180.0
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/dist/custom-elements.json +1151 -181
- package/dist/dts/components/zero-components.d.ts +5 -0
- package/dist/dts/components/zero-components.d.ts.map +1 -0
- package/dist/dts/config/config.d.ts +33 -0
- package/dist/dts/config/config.d.ts.map +1 -0
- package/dist/dts/config/configure.d.ts +26 -0
- package/dist/dts/config/configure.d.ts.map +1 -0
- package/dist/dts/config/index.d.ts +2 -0
- package/dist/dts/config/index.d.ts.map +1 -1
- package/dist/dts/config/templates.d.ts +35 -0
- package/dist/dts/config/templates.d.ts.map +1 -0
- package/dist/dts/main/index.d.ts +1 -1
- package/dist/dts/main/index.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +81 -15
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/main.styles.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/tags/index.d.ts +2 -0
- package/dist/dts/tags/index.d.ts.map +1 -0
- package/dist/dts/tags/tags.d.ts +40 -0
- package/dist/dts/tags/tags.d.ts.map +1 -0
- package/dist/esm/components/zero-components.js +49 -0
- package/dist/esm/config/config.js +18 -0
- package/dist/esm/config/configure.js +55 -0
- package/dist/esm/config/index.js +2 -0
- package/dist/esm/config/templates.js +15 -0
- package/dist/esm/main/index.js +1 -1
- package/dist/esm/main/main.js +66 -2
- package/dist/esm/main/main.styles.js +59 -134
- package/dist/esm/main/main.template.js +32 -41
- package/dist/esm/tags/index.js +1 -0
- package/dist/esm/tags/tags.js +43 -0
- package/dist/foundation-header.api.json +287 -0
- package/dist/foundation-header.d.ts +216 -15
- package/docs/api/foundation-header.configure.md +45 -0
- package/docs/api/foundation-header.defaultheaderconfig.md +13 -0
- package/docs/api/foundation-header.foundationheader.loadremotes.md +15 -0
- package/docs/api/foundation-header.foundationheader.md +27 -0
- package/docs/api/foundation-header.headerconfig.md +21 -0
- package/docs/api/foundation-header.headerconfig.templateoptions.md +18 -0
- package/docs/api/foundation-header.md +15 -0
- package/docs/api/foundation-header.navigation.headerconfig.md +11 -0
- package/docs/api/foundation-header.navigation.md +1 -0
- package/docs/api/foundation-header.zeroheader.md +37 -0
- package/docs/api-report.md +48 -0
- package/package.json +19 -19
- package/dist/dts/components/components.d.ts +0 -9
- package/dist/dts/components/components.d.ts.map +0 -1
- package/dist/dts/components/index.d.ts +0 -2
- package/dist/dts/components/index.d.ts.map +0 -1
- package/dist/esm/components/components.js +0 -42
- package/dist/esm/components/index.js +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getApp } from '@genesislcap/foundation-shell/app';
|
|
2
|
-
import { neutralLayer2 } from '@microsoft/fast-components';
|
|
3
2
|
import { css } from '@microsoft/fast-element';
|
|
4
|
-
import {
|
|
3
|
+
import { optionTag, iconTag, flyoutTag } from '../tags';
|
|
5
4
|
/**
|
|
6
5
|
* Base styles for the foundation-header
|
|
7
6
|
*
|
|
@@ -15,16 +14,14 @@ export const MainStyles = css `
|
|
|
15
14
|
flex-direction: row;
|
|
16
15
|
|
|
17
16
|
--primary-gradient-angle: -113.5deg;
|
|
18
|
-
--design-unit: 2.5;
|
|
19
17
|
}
|
|
20
18
|
|
|
21
|
-
zero-design-system-provider,
|
|
22
19
|
.dynamic-template {
|
|
23
20
|
width: 100%;
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
.nav-listbox {
|
|
27
|
-
background:
|
|
24
|
+
background: var(--neutral-layer-2);
|
|
28
25
|
display: flex;
|
|
29
26
|
flex: 1;
|
|
30
27
|
flex-direction: row;
|
|
@@ -33,94 +30,61 @@ export const MainStyles = css `
|
|
|
33
30
|
box-shadow: 0 0 15px 0 rgb(0 0 0 / 30%);
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
.nav-button {
|
|
34
|
+
height: calc(var(--base-height-multiplier) * (var(--design-unit) - 1) * 1px);
|
|
35
|
+
margin: 0;
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
.nav-leftside {
|
|
41
|
-
background:
|
|
39
|
+
background: var(--neutral-layer-2);
|
|
42
40
|
flex: 1;
|
|
41
|
+
display: flex;
|
|
43
42
|
flex-direction: row;
|
|
44
43
|
align-items: center;
|
|
45
|
-
margin-left: calc(var(--design-unit) *
|
|
46
|
-
|
|
44
|
+
margin-left: calc(var(--design-unit) * 4px);
|
|
45
|
+
gap: calc(var(--design-unit) * 2px);
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
.nav-leftside:focus-within {
|
|
50
49
|
box-shadow: none;
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
::slotted(
|
|
54
|
-
.nav-listbox
|
|
52
|
+
::slotted(${optionTag}),
|
|
53
|
+
.nav-listbox .nav-leftside ${optionTag} {
|
|
55
54
|
margin: 0 calc(var(--design-unit) * 2px);
|
|
56
|
-
padding: 0 calc(var(--design-unit) *
|
|
57
|
-
|
|
58
|
-
--
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
::slotted(fast-option.selected),
|
|
62
|
-
.nav-listbox fast-option.selected {
|
|
63
|
-
background: ${backgroundNavOption};
|
|
64
|
-
color: ${ColorHEX.white};
|
|
55
|
+
padding: 0 calc(var(--design-unit) * 2px);
|
|
56
|
+
height: calc(var(--base-height-multiplier) * (var(--design-unit) - 1) * 1px + 2px);
|
|
57
|
+
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
58
|
+
border: calc(var(--stroke-width) * 1px) solid
|
|
59
|
+
color-mix(in srgb, var(--neutral-foreground-rest), transparent 90%);
|
|
65
60
|
}
|
|
66
61
|
|
|
67
|
-
::slotted(
|
|
68
|
-
.nav-
|
|
69
|
-
background
|
|
70
|
-
color:
|
|
62
|
+
::slotted(${optionTag}.selected),
|
|
63
|
+
.nav-leftside ${optionTag}.selected {
|
|
64
|
+
background: color-mix(in srgb, var(--accent-fill-rest), transparent 95%);
|
|
65
|
+
color: var(--neutral-foreground-rest);
|
|
71
66
|
}
|
|
72
67
|
|
|
73
|
-
::slotted(
|
|
74
|
-
.nav-
|
|
75
|
-
background-color:
|
|
76
|
-
color:
|
|
68
|
+
::slotted(${optionTag}:not(.selected)),
|
|
69
|
+
.nav-leftside ${optionTag}:not(.selected) {
|
|
70
|
+
background-color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 90%);
|
|
71
|
+
color: var(--neutral-foreground-rest);
|
|
77
72
|
}
|
|
78
73
|
|
|
79
|
-
.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
transform: translateY(-50%);
|
|
84
|
-
font-size: 25px;
|
|
85
|
-
opacity: 80%;
|
|
86
|
-
cursor: pointer;
|
|
74
|
+
::slotted(${optionTag}:not(.selected):hover),
|
|
75
|
+
.nav-leftside ${optionTag}:not(.selected):hover {
|
|
76
|
+
background-color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%);
|
|
77
|
+
color: var(--neutral-foreground-rest);
|
|
87
78
|
}
|
|
88
79
|
|
|
89
|
-
.logout-container
|
|
80
|
+
.logout-container ${iconTag} {
|
|
90
81
|
padding: 0 calc(var(--design-unit) * 3px);
|
|
91
82
|
}
|
|
92
83
|
|
|
93
|
-
.nav-
|
|
94
|
-
margin-right: calc(var(--design-unit) * 3px);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.user-container zero-icon {
|
|
98
|
-
font-size: 20px;
|
|
99
|
-
margin-right: calc(var(--design-unit) * 2px);
|
|
100
|
-
color: #879ba6;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.group-container zero-icon {
|
|
104
|
-
padding-right: 10px;
|
|
105
|
-
color: #879ba6;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.nav-listbox .bars-container zero-icon {
|
|
84
|
+
.nav-visibility-icon {
|
|
109
85
|
cursor: pointer;
|
|
110
|
-
font-size:
|
|
111
|
-
|
|
112
|
-
linear-gradient(
|
|
113
|
-
var(--primary-gradient-angle),
|
|
114
|
-
${PrimaryRapidColorHEX.blue} 0%,
|
|
115
|
-
${PrimaryRapidColorHEX.purple} 100%
|
|
116
|
-
)
|
|
117
|
-
top/100% 1px,
|
|
118
|
-
linear-gradient(
|
|
119
|
-
var(--primary-gradient-angle),
|
|
120
|
-
${PrimaryRapidColorHEX.blue} 0%,
|
|
121
|
-
${PrimaryRapidColorHEX.purple} 100%
|
|
122
|
-
)
|
|
123
|
-
bottom/100% 1px;
|
|
86
|
+
font-size: var(--type-ramp-plus-4-font-size);
|
|
87
|
+
color: var(--neutral-fill-strong-rest);
|
|
124
88
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
125
89
|
-webkit-background-clip: text;
|
|
126
90
|
-webkit-text-fill-color: transparent;
|
|
@@ -129,12 +93,11 @@ export const MainStyles = css `
|
|
|
129
93
|
.logo-container {
|
|
130
94
|
display: flex;
|
|
131
95
|
align-items: center;
|
|
132
|
-
margin-right: calc(var(--design-unit) * 3px);
|
|
133
96
|
}
|
|
134
97
|
|
|
135
98
|
.logo {
|
|
136
|
-
height: calc(var(--design-unit) *
|
|
137
|
-
width: calc(var(--design-unit) *
|
|
99
|
+
height: calc(var(--design-unit) * 5px);
|
|
100
|
+
width: calc(var(--design-unit) * 6px);
|
|
138
101
|
}
|
|
139
102
|
|
|
140
103
|
.nav-rightside {
|
|
@@ -143,83 +106,30 @@ export const MainStyles = css `
|
|
|
143
106
|
flex-direction: row;
|
|
144
107
|
align-items: center;
|
|
145
108
|
justify-content: flex-end;
|
|
146
|
-
margin-right: calc(var(--design-unit) *
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.user-container {
|
|
151
|
-
background-color: ${defaultBackgroundItem};
|
|
152
|
-
padding: calc(var(--design-unit) * 1px);
|
|
153
|
-
font-size: 14px;
|
|
154
|
-
display: flex;
|
|
155
|
-
align-items: center;
|
|
156
|
-
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
157
|
-
cursor: pointer;
|
|
109
|
+
margin-right: calc(var(--design-unit) * 4px);
|
|
110
|
+
gap: calc(var(--design-unit) * 2px);
|
|
158
111
|
}
|
|
159
112
|
|
|
160
113
|
.icon-container {
|
|
161
|
-
font-size:
|
|
114
|
+
font-size: var(--type-ramp-plus-4-font-size);
|
|
162
115
|
padding: calc(var(--design-unit) * 3px);
|
|
163
|
-
|
|
164
|
-
color: #879ba6;
|
|
116
|
+
color: var(--neutral-fill-strong-rest);
|
|
165
117
|
cursor: pointer;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
.connection-indicator-container {
|
|
169
|
-
margin-right: calc(var(--design-unit) * 4px);
|
|
118
|
+
position: relative;
|
|
170
119
|
}
|
|
171
120
|
|
|
172
121
|
.open-nav {
|
|
173
122
|
width: 300px;
|
|
174
123
|
}
|
|
175
124
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
var(--primary-gradient-angle),
|
|
180
|
-
${PrimaryRapidColorHEX.blue} 0%,
|
|
181
|
-
${PrimaryRapidColorHEX.purple} 100%
|
|
182
|
-
)
|
|
183
|
-
top/100% 1px,
|
|
184
|
-
linear-gradient(
|
|
185
|
-
var(--primary-gradient-angle),
|
|
186
|
-
${PrimaryRapidColorHEX.blue} 0%,
|
|
187
|
-
${PrimaryRapidColorHEX.purple} 100%
|
|
188
|
-
)
|
|
189
|
-
bottom/100% 1px;
|
|
190
|
-
background-origin: border-box;
|
|
191
|
-
background-size: cover;
|
|
192
|
-
background-repeat: no-repeat;
|
|
193
|
-
width: 100%;
|
|
194
|
-
height: 15%;
|
|
195
|
-
max-height: 120px;
|
|
196
|
-
display: flex;
|
|
197
|
-
flex-direction: row;
|
|
198
|
-
align-items: center;
|
|
199
|
-
position: relative;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.top-layout img {
|
|
203
|
-
width: 50px;
|
|
204
|
-
margin-left: calc(var(--design-unit) * 6px);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.top-layout zero-icon:hover {
|
|
208
|
-
opacity: 100%;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.group-container {
|
|
212
|
-
height: 100%;
|
|
213
|
-
display: flex;
|
|
214
|
-
flex-direction: column;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
::slotted(zero-tree-view) {
|
|
125
|
+
::slotted(zero-tree-view),
|
|
126
|
+
::slotted(rapid-tree-view),
|
|
127
|
+
::slotted(foundation-tree-view) {
|
|
218
128
|
--type-ramp-base-font-size: 12px;
|
|
219
129
|
}
|
|
220
130
|
|
|
221
131
|
::slotted(div) {
|
|
222
|
-
color:
|
|
132
|
+
color: var(--accent-fill-rest);
|
|
223
133
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
224
134
|
margin-bottom: calc(var(--design-unit) * 4px);
|
|
225
135
|
padding-left: calc(var(--design-unit) * 4px);
|
|
@@ -238,7 +148,8 @@ export const MainStyles = css `
|
|
|
238
148
|
.logout-container {
|
|
239
149
|
align-items: center;
|
|
240
150
|
background-color: var(--neutral-fill-rest);
|
|
241
|
-
border: calc(var(--stroke-width) * 1px) solid
|
|
151
|
+
border: calc(var(--stroke-width) * 1px) solid
|
|
152
|
+
color-mix(in srgb, var(--neutral-foreground-rest), transparent 90%);
|
|
242
153
|
cursor: pointer;
|
|
243
154
|
display: flex;
|
|
244
155
|
flex-direction: row;
|
|
@@ -262,4 +173,18 @@ export const MainStyles = css `
|
|
|
262
173
|
.language-selector:focus-within {
|
|
263
174
|
border-color: #333;
|
|
264
175
|
}
|
|
176
|
+
|
|
177
|
+
${flyoutTag}::part(flyout),
|
|
178
|
+
${flyoutTag}::part(footer) {
|
|
179
|
+
padding: 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
${flyoutTag}::part(header),
|
|
183
|
+
${flyoutTag}::part(content) {
|
|
184
|
+
padding: calc(var(--design-unit) * 2px);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.notifications-button {
|
|
188
|
+
padding-right: calc((var(--design-unit) - 1) * 2px);
|
|
189
|
+
}
|
|
265
190
|
`.withBehaviors(getApp().registerStylesTarget('header'));
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { getApp } from '@genesislcap/foundation-shell/app';
|
|
2
2
|
import { html, repeat, when } from '@microsoft/fast-element';
|
|
3
|
+
import { buttonTag, iconTag, flyoutTag, optionTag, connectionIndicatorTag, selectTag, providerTag, } from '../tags';
|
|
3
4
|
const app = getApp();
|
|
4
5
|
const sideNavTemplate = html `
|
|
5
|
-
|
|
6
|
+
<${flyoutTag}
|
|
6
7
|
position="left"
|
|
7
8
|
?closed=${(x) => !x.sideNavOpen}
|
|
8
9
|
@closed=${(x) => x.toggleNavVisibility()}
|
|
@@ -22,43 +23,46 @@ const sideNavTemplate = html `
|
|
|
22
23
|
data-test-id="logout-button"
|
|
23
24
|
@click=${(x) => x.logout()}
|
|
24
25
|
>
|
|
25
|
-
|
|
26
|
+
<${iconTag} name="sign-out-alt"></${iconTag}>
|
|
26
27
|
Sign out
|
|
27
28
|
</div>
|
|
28
|
-
|
|
29
|
+
</${flyoutTag}>
|
|
29
30
|
`;
|
|
30
31
|
const defaultRouteNavItemsTemplate = html `
|
|
31
|
-
|
|
32
|
+
<${buttonTag}
|
|
32
33
|
appearance="neutral-grey"
|
|
34
|
+
class="nav-button"
|
|
35
|
+
value="1"
|
|
33
36
|
@click=${(x) => x.navigateTo('protected')}
|
|
34
37
|
data-test-id="home-button"
|
|
35
38
|
>
|
|
36
|
-
|
|
39
|
+
<${iconTag} name="home"></${iconTag}>
|
|
37
40
|
Home
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
</${buttonTag}>
|
|
42
|
+
<${optionTag} @click=${(x) => x.navigateTo('not-found')} data-test-id="profiles-button">
|
|
43
|
+
<${iconTag} name="users"></${iconTag}>
|
|
41
44
|
Profiles
|
|
42
|
-
|
|
45
|
+
</${optionTag}>
|
|
43
46
|
`;
|
|
44
47
|
const routeNavItemsTemplate = html `
|
|
45
48
|
<template>
|
|
46
49
|
${repeat((x) => x.routeNavItems, html `
|
|
47
|
-
|
|
50
|
+
<${buttonTag}
|
|
48
51
|
appearance="neutral-grey"
|
|
52
|
+
class="nav-button"
|
|
49
53
|
slot="routes"
|
|
50
54
|
@click=${(x, c) => c.parent.navigateTo(x.routePath)}
|
|
51
55
|
data-test-id="${(x) => `${x.routePath}-button`}"
|
|
52
56
|
>
|
|
53
57
|
${when((x) => x.icon, html `
|
|
54
|
-
|
|
58
|
+
<${iconTag}
|
|
55
59
|
name="${(x) => x.icon.name}"
|
|
56
60
|
variant="${(x) => x.icon.variant}"
|
|
57
61
|
size="${(x) => x.icon.size}"
|
|
58
|
-
|
|
62
|
+
></${iconTag}>
|
|
59
63
|
`)}
|
|
60
64
|
${(x, c) => c.parent.toLocalisedText(x.title)}
|
|
61
|
-
|
|
65
|
+
</${buttonTag}>
|
|
62
66
|
`)}
|
|
63
67
|
</template>
|
|
64
68
|
`;
|
|
@@ -87,7 +91,7 @@ export const NavTemplate = html `
|
|
|
87
91
|
@click=${(x) => x.toggleNavVisibility()}
|
|
88
92
|
data-test-id="hamburger-menu"
|
|
89
93
|
>
|
|
90
|
-
|
|
94
|
+
<${iconTag} name="bars" part="nav-visibility-icon" class="nav-visibility-icon"></${iconTag}>
|
|
91
95
|
</div>
|
|
92
96
|
`)}
|
|
93
97
|
<div class="logo-container" data-test-id="nav-bar-logo">
|
|
@@ -106,41 +110,26 @@ export const NavTemplate = html `
|
|
|
106
110
|
data-test-id="luminance-toggle-button"
|
|
107
111
|
part="luminance-button"
|
|
108
112
|
>
|
|
109
|
-
|
|
113
|
+
<${iconTag}
|
|
110
114
|
@click=${(x) => x.luminanceIconEvent()}
|
|
111
115
|
variant="regular"
|
|
112
116
|
name="moon"
|
|
113
117
|
part="luminance-icon"
|
|
114
|
-
|
|
118
|
+
></${iconTag}>
|
|
115
119
|
</div>
|
|
116
120
|
`)}
|
|
117
121
|
${when((x) => x.showMiscToggleButton, html `
|
|
118
122
|
<div class="icon-container" data-test-id="misc-toggle-button" part="misc-button">
|
|
119
|
-
|
|
120
|
-
</div>
|
|
121
|
-
`)}
|
|
122
|
-
${when((x) => x.showNotificationsButton, html `
|
|
123
|
-
<div
|
|
124
|
-
class="icon-container"
|
|
125
|
-
data-test-id="notifications-button"
|
|
126
|
-
part="notifications-button"
|
|
127
|
-
>
|
|
128
|
-
<zero-icon
|
|
129
|
-
variant="regular"
|
|
130
|
-
@click=${(x) => x.notificationIconEvent()}
|
|
131
|
-
name="bell"
|
|
132
|
-
part="notifications-icon"
|
|
133
|
-
></zero-icon>
|
|
134
|
-
<slot name="notifications-icon-end"></slot>
|
|
123
|
+
<${iconTag} @click=${(x) => x.miscIconEvent()} name="th" part="misc-icon"></${iconTag}>
|
|
135
124
|
</div>
|
|
136
125
|
`)}
|
|
137
126
|
${when((x) => x.showConnectionIndicator, html `
|
|
138
127
|
<div class="connection-indicator-container" data-test-id="connection-indicator">
|
|
139
|
-
|
|
128
|
+
<${connectionIndicatorTag} show-label="false"></${connectionIndicatorTag}>
|
|
140
129
|
</div>
|
|
141
130
|
`)}
|
|
142
131
|
${when((x) => x.showLanguageSelector && x.languageOptions, html `
|
|
143
|
-
|
|
132
|
+
<${selectTag}
|
|
144
133
|
class="language-selector"
|
|
145
134
|
position="below"
|
|
146
135
|
data-test-id="language-selector"
|
|
@@ -148,20 +137,20 @@ export const NavTemplate = html `
|
|
|
148
137
|
@change="${(x, c) => x.changeLanguage(c.event)}"
|
|
149
138
|
>
|
|
150
139
|
${repeat((x) => x.languageOptions.availableLanguages, html `
|
|
151
|
-
|
|
140
|
+
<${optionTag}
|
|
152
141
|
value="${(x) => x}"
|
|
153
142
|
?selected="${(x, c) => x === c.parent.languageOptions.selectedLanguage}"
|
|
154
143
|
>
|
|
155
144
|
${(x) => x.toUpperCase()}
|
|
156
|
-
|
|
145
|
+
</${optionTag}>
|
|
157
146
|
`)}
|
|
158
|
-
|
|
147
|
+
</${selectTag}>
|
|
159
148
|
`)}
|
|
160
149
|
|
|
161
|
-
|
|
162
|
-
|
|
150
|
+
<${buttonTag} appearance="neutral-grey" data-test-id="user-button" class="nav-button">
|
|
151
|
+
<${iconTag} name="user-circle"></${iconTag}>
|
|
163
152
|
${(x) => x.userName}
|
|
164
|
-
|
|
153
|
+
</${buttonTag}>
|
|
165
154
|
</div>
|
|
166
155
|
${app.registerElementsTarget(['header', 'header-end'])}
|
|
167
156
|
</div>
|
|
@@ -180,7 +169,9 @@ export const NavTemplate = html `
|
|
|
180
169
|
* @internal
|
|
181
170
|
*/
|
|
182
171
|
export const DynamicTemplate = html `
|
|
183
|
-
|
|
172
|
+
<${providerTag} data-test-id="header-provider">
|
|
173
|
+
<div class="dynamic-template">${(x) => x.selectTemplate()}</div>
|
|
174
|
+
</${providerTag}>
|
|
184
175
|
`;
|
|
185
176
|
/**
|
|
186
177
|
* Loading template for the Navigation class
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tags';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { tagFor } from '@genesislcap/foundation-ui';
|
|
2
|
+
import { DI } from '@microsoft/fast-foundation';
|
|
3
|
+
import { HeaderConfig } from '../config/config';
|
|
4
|
+
import { defaultTemplateOptions } from '../config/templates';
|
|
5
|
+
/**
|
|
6
|
+
* It's important this file isn't referenced ahead of a `configure` call, otherwise these values may remain fixed at
|
|
7
|
+
* their defaults. Consumers must use the `/config` subpath to help avoid this. Files with references to tags should be
|
|
8
|
+
* lazily loaded. There is an alternative `getTags` utility at the end which could offer another approach, but direct
|
|
9
|
+
* tag exports and inline template references feel cleaner than having to convert all component `template` and `styles`
|
|
10
|
+
* exports to functions to call `getTags` on execution.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export const { templateOptions = defaultTemplateOptions } = DI.getOrCreateDOMContainer().get(HeaderConfig);
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export const iconTag = tagFor(templateOptions.icon);
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export const buttonTag = tagFor(templateOptions.button);
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export const connectionIndicatorTag = tagFor(templateOptions.connectionIndicator);
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export const selectTag = tagFor(templateOptions.select);
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export const optionTag = tagFor(templateOptions.option);
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export const flyoutTag = tagFor(templateOptions.flyout);
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export const providerTag = tagFor(templateOptions.provider);
|