@aquera/nile-elements 2.0.10 → 2.0.12
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 +6 -0
- package/demo/app-shell.html +852 -0
- package/demo/nxtgen-classes.css +2 -2
- package/demo/nxtgen-properties.css +2 -2
- package/demo/nxtgen-utilities.css +2 -2
- package/demo/nxtgen.css +2 -2
- package/demo/utilities.css +2 -2
- package/demo/variables.css +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +595 -302
- package/dist/internal/app-shell-utility-control-styles.cjs.js +2 -0
- package/dist/internal/app-shell-utility-control-styles.cjs.js.map +1 -0
- package/dist/internal/app-shell-utility-control-styles.esm.js +16 -0
- package/dist/nile-app-shell/index.cjs.js +1 -1
- package/dist/nile-app-shell/index.esm.js +1 -1
- package/dist/nile-app-shell/nile-app-shell.cjs.js +1 -1
- package/dist/nile-app-shell/nile-app-shell.cjs.js.map +1 -1
- package/dist/nile-app-shell/nile-app-shell.css.cjs.js +1 -1
- package/dist/nile-app-shell/nile-app-shell.css.cjs.js.map +1 -1
- package/dist/nile-app-shell/nile-app-shell.css.esm.js +277 -96
- package/dist/nile-app-shell/nile-app-shell.esm.js +67 -11
- package/dist/nile-app-shell/shell-controller.cjs.js.map +1 -1
- package/dist/nile-app-shell-main/nile-app-shell-main.cjs.js.map +1 -1
- package/dist/nile-app-shell-nav-toggle/index.cjs.js +1 -1
- package/dist/nile-app-shell-nav-toggle/index.esm.js +1 -1
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js +1 -1
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js.map +1 -1
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.cjs.js +1 -1
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.cjs.js.map +1 -1
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.esm.js +7 -3
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.esm.js +3 -3
- package/dist/nile-app-shell-panel/index.cjs.js +1 -1
- package/dist/nile-app-shell-panel/index.esm.js +1 -1
- package/dist/nile-app-shell-panel/nile-app-shell-panel.cjs.js +1 -1
- package/dist/nile-app-shell-panel/nile-app-shell-panel.cjs.js.map +1 -1
- package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js +1 -1
- package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js.map +1 -1
- package/dist/nile-app-shell-panel/nile-app-shell-panel.css.esm.js +32 -8
- package/dist/nile-app-shell-panel/nile-app-shell-panel.esm.js +18 -5
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js.map +1 -1
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js.map +1 -1
- package/dist/src/internal/app-shell-utility-control-styles.d.ts +12 -0
- package/dist/src/internal/app-shell-utility-control-styles.js +29 -0
- package/dist/src/internal/app-shell-utility-control-styles.js.map +1 -0
- package/dist/src/nile-app-shell/nile-app-shell-regions.test.d.ts +3 -0
- package/dist/src/nile-app-shell/nile-app-shell-regions.test.js +210 -0
- package/dist/src/nile-app-shell/nile-app-shell-regions.test.js.map +1 -1
- package/dist/src/nile-app-shell/nile-app-shell.css.d.ts +1 -9
- package/dist/src/nile-app-shell/nile-app-shell.css.js +277 -103
- package/dist/src/nile-app-shell/nile-app-shell.css.js.map +1 -1
- package/dist/src/nile-app-shell/nile-app-shell.d.ts +90 -122
- package/dist/src/nile-app-shell/nile-app-shell.js +235 -144
- package/dist/src/nile-app-shell/nile-app-shell.js.map +1 -1
- package/dist/src/nile-app-shell/nile-app-shell.test.d.ts +4 -0
- package/dist/src/nile-app-shell/nile-app-shell.test.js +1116 -29
- package/dist/src/nile-app-shell/nile-app-shell.test.js.map +1 -1
- package/dist/src/nile-app-shell/shell-controller.d.ts +1 -8
- package/dist/src/nile-app-shell/shell-controller.js +2 -14
- package/dist/src/nile-app-shell/shell-controller.js.map +1 -1
- package/dist/src/nile-app-shell-main/nile-app-shell-main.d.ts +2 -6
- package/dist/src/nile-app-shell-main/nile-app-shell-main.js +2 -6
- package/dist/src/nile-app-shell-main/nile-app-shell-main.js.map +1 -1
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.d.ts +1 -4
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.js +7 -5
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.js.map +1 -1
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.d.ts +4 -8
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js +5 -6
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js.map +1 -1
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js +31 -6
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js.map +1 -1
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.d.ts +18 -13
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.js +45 -16
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.js.map +1 -1
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.d.ts +1 -4
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js +1 -4
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js.map +1 -1
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.d.ts +4 -12
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js +4 -12
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/version.cjs.js +1 -1
- package/dist/version.cjs.js.map +1 -1
- package/dist/version.esm.js +1 -1
- package/package.json +1 -1
- package/plop-templates/lit/lit.test.ts.hbs +22 -0
- package/plop-templates/lit/lit.ts.hbs +10 -5
- package/plopfile.js +12 -0
- package/src/internal/app-shell-utility-control-styles.ts +30 -0
- package/src/nile-app-shell/nile-app-shell-regions.test.ts +252 -0
- package/src/nile-app-shell/nile-app-shell.css.ts +277 -103
- package/src/nile-app-shell/nile-app-shell.test.ts +1363 -29
- package/src/nile-app-shell/nile-app-shell.ts +249 -149
- package/src/nile-app-shell/shell-controller.ts +2 -14
- package/src/nile-app-shell-main/nile-app-shell-main.ts +2 -6
- package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.ts +7 -5
- package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.ts +7 -11
- package/src/nile-app-shell-panel/nile-app-shell-panel.css.ts +31 -6
- package/src/nile-app-shell-panel/nile-app-shell-panel.ts +44 -16
- package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.ts +1 -4
- package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.ts +4 -12
- package/vscode-html-custom-data.json +85 -18
|
@@ -5,28 +5,31 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import { css } from 'lit';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
* One grid, two columns, one flex row. The grid owns the banner row, the
|
|
12
|
-
* optional shell-wide top bar, the side-nav track and the content column. The
|
|
13
|
-
* content column is a flex row holding the content container, the optional
|
|
14
|
-
* aside and — when docked — the AI panel. Nothing else in an app sets these
|
|
15
|
-
* boxes.
|
|
16
|
-
*/
|
|
8
|
+
import { utilityControlStyles } from '../internal/app-shell-utility-control-styles';
|
|
9
|
+
/** AppShell CSS: a grid of banner, top bar, side-nav track and content column, whose flex row holds the container, aside and docked AI panel. */
|
|
17
10
|
export const styles = css `
|
|
18
11
|
:host {
|
|
19
|
-
/* Geometry
|
|
20
|
-
|
|
21
|
-
--nile-app-shell-side-nav-width:
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
/* Geometry: design tokens where one exists, bare pixels where none does. */
|
|
13
|
+
/* The nav track mirrors nile-side-bar's own width expressions (enterprise 240/70, NxtGen 296/68); keep in step with nile-side-bar.css.ts. */
|
|
14
|
+
--nile-app-shell-side-nav-width: var(
|
|
15
|
+
--nile-width-240px,
|
|
16
|
+
var(--ng-spacing-296, 240px)
|
|
17
|
+
);
|
|
18
|
+
--nile-app-shell-side-nav-rail-width: var(
|
|
19
|
+
--nile-width-70px,
|
|
20
|
+
var(--ng-spacing-68, 70px)
|
|
21
|
+
);
|
|
22
|
+
--nile-app-shell-gutter: var(--nile-spacing-xs, var(--ng-spacing-xs));
|
|
24
23
|
--nile-app-shell-content-padding: var(
|
|
25
24
|
--nile-spacing-3xl,
|
|
26
25
|
var(--ng-spacing-3xl)
|
|
27
26
|
);
|
|
28
|
-
--nile-app-shell-top-bar-height:
|
|
29
|
-
|
|
27
|
+
--nile-app-shell-top-bar-height: 68px;
|
|
28
|
+
/* The panel header keeps its own height, distinct from the page header. */
|
|
29
|
+
--nile-app-shell-panel-header-height: 56px;
|
|
30
|
+
--nile-app-shell-tabs-height: 33px;
|
|
31
|
+
/* The leading app icon is its own 20px size, not the 32px utility box. */
|
|
32
|
+
--nile-app-shell-app-icon-size: 20px;
|
|
30
33
|
--nile-app-shell-panel-width: 480px;
|
|
31
34
|
--nile-app-shell-panel-min-width: 360px;
|
|
32
35
|
--nile-app-shell-aside-width: 320px;
|
|
@@ -34,9 +37,10 @@ export const styles = css `
|
|
|
34
37
|
--nile-app-shell-content-min-width: 640px;
|
|
35
38
|
--nile-app-shell-min-width: 768px;
|
|
36
39
|
--nile-app-shell-centered-width: 824px;
|
|
40
|
+
/* Both tokens are 32px; the literal is the floor with no theme sheet loaded. */
|
|
37
41
|
--nile-app-shell-utility-size: var(
|
|
38
42
|
--nile-spacing-4xl,
|
|
39
|
-
var(--ng-spacing-4xl)
|
|
43
|
+
var(--ng-spacing-4xl, 32px)
|
|
40
44
|
);
|
|
41
45
|
--nile-app-shell-radius: var(--nile-radius-xl, var(--ng-radius-2xl));
|
|
42
46
|
--nile-app-shell-duration: var(
|
|
@@ -76,8 +80,7 @@ export const styles = css `
|
|
|
76
80
|
height: 100dvh;
|
|
77
81
|
}
|
|
78
82
|
|
|
79
|
-
/* Effective rail state
|
|
80
|
-
forced rail at narrow widths. */
|
|
83
|
+
/* Effective rail state: the user's preference, or a forced rail when narrow. */
|
|
81
84
|
:host([rail]) {
|
|
82
85
|
--_side-nav-track: var(--nile-app-shell-side-nav-rail-width);
|
|
83
86
|
}
|
|
@@ -86,10 +89,19 @@ export const styles = css `
|
|
|
86
89
|
--_side-nav-track: 0px;
|
|
87
90
|
}
|
|
88
91
|
|
|
92
|
+
/* The Description axis: a present description adds the 8px its second line occupies. */
|
|
93
|
+
:host([has-description]) {
|
|
94
|
+
--nile-app-shell-top-bar-height: 76px;
|
|
95
|
+
}
|
|
96
|
+
|
|
89
97
|
/* The top bar compresses before the content does. */
|
|
90
98
|
@media (max-height: 600px) {
|
|
91
99
|
:host {
|
|
92
|
-
--nile-app-shell-top-bar-height:
|
|
100
|
+
--nile-app-shell-top-bar-height: 56px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:host([has-description]) {
|
|
104
|
+
--nile-app-shell-top-bar-height: 64px;
|
|
93
105
|
}
|
|
94
106
|
}
|
|
95
107
|
|
|
@@ -117,13 +129,12 @@ export const styles = css `
|
|
|
117
129
|
display: none;
|
|
118
130
|
}
|
|
119
131
|
|
|
120
|
-
/*
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
*/
|
|
132
|
+
/* A slotted sidebar fills the shell-owned track and drops its own surface and edge; set --nile-app-shell-side-nav-bg to restore one. */
|
|
133
|
+
/* width is deliberately not !important: the 100% lets a raw <nav> or nile-app-shell-side-nav fill the track, while a slotted
|
|
134
|
+
nile-side-bar sizes itself from the same tokens the track reads (see the :host geometry block). Tests 21/22 in
|
|
135
|
+
nile-app-shell-regions.test.ts lock the two together; change both or neither. */
|
|
125
136
|
::slotted([slot='side-nav']) {
|
|
126
|
-
width: 100
|
|
137
|
+
width: 100%;
|
|
127
138
|
height: 100%;
|
|
128
139
|
background: var(--nile-app-shell-side-nav-bg, transparent) !important;
|
|
129
140
|
border-right: var(--nile-app-shell-side-nav-border, 0) !important;
|
|
@@ -138,19 +149,19 @@ export const styles = css `
|
|
|
138
149
|
min-width: 0;
|
|
139
150
|
gap: var(--nile-app-shell-gutter);
|
|
140
151
|
padding: var(--nile-app-shell-gutter);
|
|
152
|
+
/* Flush against the nav track; the gutter insets the other three sides. */
|
|
153
|
+
padding-inline-start: 0;
|
|
141
154
|
box-sizing: border-box;
|
|
142
155
|
}
|
|
143
156
|
|
|
157
|
+
/* With no nav track there is nothing to sit flush against, so the start edge takes the gutter too. */
|
|
158
|
+
:host(:not([has-side-nav])) .content-section {
|
|
159
|
+
padding-inline-start: var(--nile-app-shell-gutter);
|
|
160
|
+
}
|
|
161
|
+
|
|
144
162
|
.container {
|
|
145
163
|
box-sizing: border-box;
|
|
146
|
-
/*
|
|
147
|
-
* The floor is the flex basis, not a min-width: a hard min-width cannot
|
|
148
|
-
* yield, so the row overflows and :host's overflow:hidden clips the
|
|
149
|
-
* regions after it. As a basis the container holds the floor while there
|
|
150
|
-
* is room and gives way when there is not. The shell keeps a docked panel
|
|
151
|
-
* off the row until it fits (see _dockRequirement), so the give-way path
|
|
152
|
-
* is the last resort, not the usual one.
|
|
153
|
-
*/
|
|
164
|
+
/* The floor is the flex basis, not a min-width, so the container yields instead of overflowing the clipped row. */
|
|
154
165
|
flex: 1 1 var(--nile-app-shell-content-min-width);
|
|
155
166
|
display: flex;
|
|
156
167
|
flex-direction: column;
|
|
@@ -158,24 +169,15 @@ export const styles = css `
|
|
|
158
169
|
overflow: hidden;
|
|
159
170
|
background: var(--nile-colors-white-base, var(--ng-colors-bg-secondary));
|
|
160
171
|
border: var(--nile-border-width-1, var(--ng-border-width-1)) solid
|
|
161
|
-
var(--nile-colors-neutral-
|
|
172
|
+
var(--nile-colors-neutral-500, var(--ng-colors-border-primary));
|
|
162
173
|
border-radius: var(--nile-app-shell-radius);
|
|
163
174
|
box-shadow: var(--nile-box-shadow-none, var(--ng-shadow-none));
|
|
164
|
-
/*
|
|
165
|
-
* The container — not the viewport — is the sizing context for page
|
|
166
|
-
* content. See the content-container note below for querying it.
|
|
167
|
-
*/
|
|
175
|
+
/* The container, not the viewport, is the sizing context for page content. */
|
|
168
176
|
container-type: inline-size;
|
|
169
177
|
container-name: nile-content;
|
|
170
178
|
}
|
|
171
179
|
|
|
172
|
-
/*
|
|
173
|
-
* Container queries cannot cross a shadow boundary: a rule in the page's
|
|
174
|
-
* stylesheet cannot see a container declared in here. The
|
|
175
|
-
* content-container attribute moves the context onto the slotted page root instead, so page CSS can
|
|
176
|
-
* write an @container nile-content query. It brings layout containment with
|
|
177
|
-
* it, so it is opt-in.
|
|
178
|
-
*/
|
|
180
|
+
/* content-container moves the size query context onto the slotted page root so page CSS can query nile-content; opt-in as it brings containment. */
|
|
179
181
|
:host([content-container]) slot:not([name])::slotted(*) {
|
|
180
182
|
container-type: inline-size;
|
|
181
183
|
container-name: nile-content;
|
|
@@ -199,12 +201,7 @@ export const styles = css `
|
|
|
199
201
|
padding-inline: var(--nile-app-shell-content-padding);
|
|
200
202
|
}
|
|
201
203
|
|
|
202
|
-
/*
|
|
203
|
-
page body; spanning the shell it carries the container's edge instead. */
|
|
204
|
-
.container > .top-bar {
|
|
205
|
-
border-bottom: var(--nile-border-width-1, var(--ng-border-width-1)) solid
|
|
206
|
-
var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
207
|
-
}
|
|
204
|
+
/* The header bar draws no bottom rule in any variant; the only divider comes from the tab rail (see .tabs). */
|
|
208
205
|
|
|
209
206
|
.shell-top-bar {
|
|
210
207
|
grid-area: top-bar;
|
|
@@ -228,32 +225,171 @@ export const styles = css `
|
|
|
228
225
|
flex: 1 1 auto;
|
|
229
226
|
}
|
|
230
227
|
|
|
231
|
-
|
|
228
|
+
/* The title block: the back arrow, then the stack (app icon, heading and badge, with the description under them); renders before the top-bar slot. */
|
|
229
|
+
.title-area {
|
|
230
|
+
display: flex;
|
|
231
|
+
/* Top-aligned, not centred: the back arrow belongs to the title's row, not the title-plus-description stack. */
|
|
232
|
+
align-items: flex-start;
|
|
233
|
+
/* Figma's Title Area gap: 16px from the arrow to the stack. */
|
|
234
|
+
gap: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
235
|
+
min-width: 0;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* The back arrow's line box: exactly the page title's line height, centring the arrow on the title row. */
|
|
239
|
+
.back-line {
|
|
240
|
+
flex: 0 0 auto;
|
|
241
|
+
display: inline-flex;
|
|
242
|
+
align-items: center;
|
|
243
|
+
min-height: var(--nile-line-height-medium, var(--ng-line-height-text-md));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.title-stack {
|
|
247
|
+
display: flex;
|
|
248
|
+
flex-direction: column;
|
|
249
|
+
justify-content: center;
|
|
250
|
+
gap: var(--nile-spacing-xxs, var(--ng-spacing-xxs));
|
|
251
|
+
min-width: 0;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.title-row {
|
|
232
255
|
display: flex;
|
|
233
256
|
align-items: center;
|
|
234
257
|
gap: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
258
|
+
min-width: 0;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.page-title {
|
|
262
|
+
margin: 0;
|
|
263
|
+
min-width: 0;
|
|
264
|
+
font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
|
|
265
|
+
font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));
|
|
266
|
+
line-height: var(--nile-line-height-medium, var(--ng-line-height-text-md));
|
|
267
|
+
font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));
|
|
268
|
+
color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
|
|
269
|
+
white-space: nowrap;
|
|
270
|
+
overflow: hidden;
|
|
271
|
+
text-overflow: ellipsis;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.description {
|
|
275
|
+
margin: 0;
|
|
276
|
+
min-width: 0;
|
|
277
|
+
font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
|
|
278
|
+
font-size: var(--nile-type-scale-1, var(--ng-font-size-text-xs));
|
|
279
|
+
line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-xs));
|
|
280
|
+
font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
|
|
281
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-quaternary-500));
|
|
282
|
+
white-space: nowrap;
|
|
283
|
+
overflow: hidden;
|
|
284
|
+
text-overflow: ellipsis;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* The badge sits on the title row and never shrinks the title away; each surface token pairs a Nile name with its NxtGen equivalent. */
|
|
288
|
+
.badge {
|
|
289
|
+
flex: 0 0 auto;
|
|
290
|
+
display: inline-flex;
|
|
291
|
+
align-items: center;
|
|
292
|
+
padding-inline: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
293
|
+
padding-block: var(--nile-spacing-xxs, var(--ng-spacing-xxs));
|
|
294
|
+
border: var(--nile-border-width-1, var(--ng-border-width-1)) solid
|
|
295
|
+
var(
|
|
296
|
+
--nile-colors-neutral-400,
|
|
297
|
+
var(--ng-componentcolors-utility-gray-200)
|
|
298
|
+
);
|
|
299
|
+
border-radius: var(--nile-radius-full, var(--ng-radius-full));
|
|
300
|
+
background: var(
|
|
301
|
+
--nile-colors-neutral-100,
|
|
302
|
+
var(--ng-componentcolors-utility-gray-50)
|
|
303
|
+
);
|
|
304
|
+
color: var(
|
|
305
|
+
--nile-colors-dark-500,
|
|
306
|
+
var(--ng-componentcolors-utility-gray-700)
|
|
307
|
+
);
|
|
308
|
+
font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
|
|
309
|
+
font-size: var(--nile-type-scale-1, var(--ng-font-size-text-xs));
|
|
310
|
+
line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-xs));
|
|
311
|
+
font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));
|
|
312
|
+
white-space: nowrap;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* headerBack: an icon-only native button, so the aria-label names it directly; the shell owns no history, so pressing it only emits nile-click { value: 'back' }. */
|
|
316
|
+
.back {
|
|
317
|
+
flex: 0 0 auto;
|
|
318
|
+
display: inline-flex;
|
|
319
|
+
align-items: center;
|
|
320
|
+
margin: 0;
|
|
321
|
+
padding: 0;
|
|
322
|
+
border: 0;
|
|
323
|
+
background: none;
|
|
324
|
+
cursor: pointer;
|
|
325
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-fg-quaternary-400));
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.back:hover {
|
|
329
|
+
color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/* App icon: a 20px block at the start of the title row, so the description lines up under it; shown whenever the app-icon slot has content. */
|
|
333
|
+
.app-icon {
|
|
334
|
+
position: relative;
|
|
335
|
+
flex: 0 0 auto;
|
|
336
|
+
display: inline-flex;
|
|
337
|
+
align-items: center;
|
|
338
|
+
justify-content: center;
|
|
339
|
+
width: var(--nile-app-shell-app-icon-size);
|
|
340
|
+
height: var(--nile-app-shell-app-icon-size);
|
|
341
|
+
border-radius: var(--nile-radius-sm, var(--ng-radius-sm));
|
|
342
|
+
overflow: hidden;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/* The slotted mark fills the wrapper edge to edge, clipped to the box. */
|
|
346
|
+
.app-icon slot::slotted(*) {
|
|
347
|
+
width: 100%;
|
|
348
|
+
height: 100%;
|
|
349
|
+
display: block;
|
|
350
|
+
object-fit: cover;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/* The wrapper takes no fill; the rim is a white-12% gradient drawn as a masked ::before, with literal mask fallbacks for the nxtgen-only tokens. */
|
|
354
|
+
.app-icon::before {
|
|
355
|
+
content: '';
|
|
356
|
+
position: absolute;
|
|
357
|
+
inset: 0;
|
|
358
|
+
border-radius: inherit;
|
|
359
|
+
pointer-events: none;
|
|
360
|
+
z-index: 1;
|
|
361
|
+
background: linear-gradient(
|
|
362
|
+
180deg,
|
|
363
|
+
rgb(255 255 255 / 12%) 0%,
|
|
364
|
+
rgb(255 255 255 / 0%) 100%
|
|
365
|
+
);
|
|
366
|
+
mask: var(
|
|
367
|
+
--ng-mask-rim,
|
|
368
|
+
linear-gradient(#000 0 0) content-box,
|
|
369
|
+
linear-gradient(#000 0 0)
|
|
370
|
+
);
|
|
371
|
+
mask-composite: var(--ng-mask-composite-exclude, exclude);
|
|
372
|
+
padding: 1.4px;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
:host(:not([has-app-icon])) .app-icon {
|
|
376
|
+
display: none;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/* Figma's Header Bar gap: 16px between every header action, the divider and Ask. */
|
|
380
|
+
.top-bar-actions {
|
|
381
|
+
display: flex;
|
|
382
|
+
align-items: center;
|
|
383
|
+
gap: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
235
384
|
margin-inline-start: auto;
|
|
236
385
|
}
|
|
237
386
|
|
|
238
|
-
/*
|
|
239
|
-
* An empty flex item still takes the row's gap before it, which pulls the
|
|
240
|
-
* bar's content 16px short of the padding edge and leaves a sliver of bare
|
|
241
|
-
* container at the end of the header. Nothing in the group, no box.
|
|
242
|
-
*/
|
|
387
|
+
/* Hidden when empty, so an empty group's gap does not pull the bar's content short of the padding edge. */
|
|
243
388
|
:host(:not([has-top-bar-actions]):not([has-ask])) .top-bar-actions {
|
|
244
389
|
display: none;
|
|
245
390
|
}
|
|
246
391
|
|
|
247
|
-
/*
|
|
248
|
-
* The Ask button. The one control in the bar the shell renders itself: it
|
|
249
|
-
* turns on the panel being mounted and it calls openPanel(), neither of
|
|
250
|
-
* which slotted markup can reach.
|
|
251
|
-
*
|
|
252
|
-
* It is a stock <nile-button variant="primary">: the shell sets no surface,
|
|
253
|
-
* radius, height or type of its own, so the button's appearance — and its
|
|
254
|
-
* focus ring, hover, disabled and loading states — stays the component's.
|
|
255
|
-
* The only rule here is the flex behaviour it needs as a top-bar item.
|
|
256
|
-
*/
|
|
392
|
+
/* The Ask button: a stock <nile-button variant="secondary"> the shell renders itself; the only rule here is its flex behaviour as a top-bar item. */
|
|
257
393
|
.ask {
|
|
258
394
|
flex: 0 0 auto;
|
|
259
395
|
}
|
|
@@ -270,37 +406,38 @@ export const styles = css `
|
|
|
270
406
|
height: 16px;
|
|
271
407
|
}
|
|
272
408
|
|
|
409
|
+
/* 10px after the 32px circle is 16px after the 20px glyph (6px overhang + 10), Figma's toggle-to-divider gap. */
|
|
273
410
|
.nav-toggle-group {
|
|
274
411
|
display: flex;
|
|
275
412
|
align-items: center;
|
|
276
|
-
gap: var(--nile-spacing-
|
|
413
|
+
gap: var(--nile-spacing-md-alt, var(--ng-spacing-md-alt));
|
|
277
414
|
}
|
|
278
415
|
|
|
279
|
-
/*
|
|
280
|
-
* Lands the 24px glyph box, not nile-button's 38px circle, on the
|
|
281
|
-
* container's 24px origin: (38 - 24) / 2 = 7.
|
|
282
|
-
*/
|
|
416
|
+
/* Lands the 20px glyph box, not the 32px utility circle, on the 24px origin: (32 - 20) / 2 = 6. */
|
|
283
417
|
.nav-toggle {
|
|
284
|
-
margin-inline-start: -
|
|
418
|
+
margin-inline-start: -6px;
|
|
285
419
|
}
|
|
286
420
|
|
|
421
|
+
/* Figma's Divider Line: a 16px 1px stroke that takes no layout width, so the items on both sides sit a clean 16px from it. Used after the nav toggle and, as ask-rule, before Ask. */
|
|
287
422
|
.rule {
|
|
288
423
|
flex: 0 0 auto;
|
|
289
424
|
width: var(--nile-border-width-1, var(--ng-border-width-1));
|
|
290
|
-
|
|
425
|
+
margin-inline-end: calc(-1 * var(--nile-border-width-1, var(--ng-border-width-1)));
|
|
426
|
+
height: 16px;
|
|
291
427
|
background: var(
|
|
292
428
|
--nile-colors-neutral-400,
|
|
293
429
|
var(--ng-colors-border-secondary)
|
|
294
430
|
);
|
|
295
431
|
}
|
|
296
432
|
|
|
433
|
+
/* ------------------------------------------------------- utility controls */
|
|
434
|
+
|
|
435
|
+
/* The shell's own icon controls (nav toggle, panel back and close): the shared utility-control recipe. */
|
|
436
|
+
${utilityControlStyles}
|
|
437
|
+
|
|
297
438
|
/* --------------------------------------------------------------- tab strip */
|
|
298
439
|
|
|
299
|
-
/*
|
|
300
|
-
* Hoisted out of the scroller so it never scrolls away. It sits flush under
|
|
301
|
-
* the top bar — the header carries no bottom rule of its own, so the two read
|
|
302
|
-
* as one block of chrome, with the single rule living at the strip's bottom.
|
|
303
|
-
*/
|
|
440
|
+
/* Hoisted out of the scroller so it never scrolls away; sits flush under the top bar and carries the header block's single bottom rule. */
|
|
304
441
|
.tabs {
|
|
305
442
|
box-sizing: border-box;
|
|
306
443
|
flex: 0 0 auto;
|
|
@@ -308,6 +445,7 @@ export const styles = css `
|
|
|
308
445
|
align-items: stretch;
|
|
309
446
|
gap: var(--nile-spacing-xs, var(--ng-spacing-xs));
|
|
310
447
|
min-width: 0;
|
|
448
|
+
/* A floor, not a fixed box: the strip is as tall as the row it holds plus its rule. */
|
|
311
449
|
min-height: var(--nile-app-shell-tabs-height);
|
|
312
450
|
padding-inline: var(--nile-app-shell-content-padding);
|
|
313
451
|
/* The strip carries the rule for the whole header block. */
|
|
@@ -317,14 +455,43 @@ export const styles = css `
|
|
|
317
455
|
scrollbar-width: none;
|
|
318
456
|
}
|
|
319
457
|
|
|
458
|
+
/* The header tab's 0/4/12/4 padding composes the 32px row; the 12px bottom gives the active indicator its band, set via the group's public padding hook. */
|
|
459
|
+
::slotted([slot='tabs']) {
|
|
460
|
+
--nile-nav-tab-padding: var(--nile-spacing-none, var(--ng-spacing-none))
|
|
461
|
+
var(--nile-spacing-xs, var(--ng-spacing-xs))
|
|
462
|
+
var(--nile-spacing-lg, var(--ng-spacing-lg))
|
|
463
|
+
var(--nile-spacing-xs, var(--ng-spacing-xs));
|
|
464
|
+
}
|
|
465
|
+
|
|
320
466
|
.tabs::-webkit-scrollbar {
|
|
321
467
|
display: none;
|
|
322
468
|
}
|
|
323
469
|
|
|
324
|
-
:host(:not([has-tabs])) .tabs
|
|
470
|
+
:host(:not([has-tabs])) .tabs,
|
|
471
|
+
:host([notabs]) .tabs {
|
|
325
472
|
display: none;
|
|
326
473
|
}
|
|
327
474
|
|
|
475
|
+
/* A slotted nile-nav-tab-group drops its own track (--track-width:0 on the host) and is bottom-aligned so its indicator sits on the region's single rule. */
|
|
476
|
+
/* Scoped to the group, not the slot, so bare tab controls are not stretched to an equal share of the strip. */
|
|
477
|
+
::slotted(nile-nav-tab-group[slot='tabs']) {
|
|
478
|
+
--track-width: 0px;
|
|
479
|
+
/*
|
|
480
|
+
* The active indicator (Figma: fg-brand-primary-alt) is NOT set here: the top placement hard-codes
|
|
481
|
+
* var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700)) inside nile-nav-tab-group's shadow tree, and
|
|
482
|
+
* remapping either token from here would also recolour nile-nav-tab's focus ring and focus label. Known limitation (spec A-7).
|
|
483
|
+
*/
|
|
484
|
+
/*
|
|
485
|
+
* The inactive label: nile-nav-tab paints it var(--nile-colors-dark-500, var(--ng-colors-text-secondary-700)), so the strip
|
|
486
|
+
* points the NxtGen fallback at text-quaternary-500. Enterprise defines --nile-colors-dark-500 and is untouched. Inside an
|
|
487
|
+
* underline group nothing else reads text-secondary-700 (only the group's other variants and side placements do).
|
|
488
|
+
*/
|
|
489
|
+
--ng-colors-text-secondary-700: var(--ng-colors-text-quaternary-500);
|
|
490
|
+
flex: 1 1 auto;
|
|
491
|
+
min-width: 0;
|
|
492
|
+
align-self: flex-end;
|
|
493
|
+
}
|
|
494
|
+
|
|
328
495
|
/* ------------------------------------------------------------------- main */
|
|
329
496
|
|
|
330
497
|
.main {
|
|
@@ -334,7 +501,9 @@ export const styles = css `
|
|
|
334
501
|
flex-direction: column;
|
|
335
502
|
min-height: 0;
|
|
336
503
|
overflow: auto;
|
|
504
|
+
/* Top and sides only: the page runs to the container's bottom edge. */
|
|
337
505
|
padding: var(--nile-app-shell-content-padding);
|
|
506
|
+
padding-block-end: 0;
|
|
338
507
|
}
|
|
339
508
|
|
|
340
509
|
.main:focus {
|
|
@@ -352,13 +521,7 @@ export const styles = css `
|
|
|
352
521
|
|
|
353
522
|
/* Centred when short, scrolls from the top when tall. */
|
|
354
523
|
:host([content-align='centered']) .main-inner {
|
|
355
|
-
/*
|
|
356
|
-
* width:100% + max-width leaves free space for the auto inline margins to
|
|
357
|
-
* split; dropping the width would let the auto margins cancel the flex
|
|
358
|
-
* stretch and shrink-wrap the column to its widest child. The block margins
|
|
359
|
-
* centre it while it is short and compute to 0 once it is taller, so a tall
|
|
360
|
-
* page scrolls from the top rather than clipping.
|
|
361
|
-
*/
|
|
524
|
+
/* width:100% + max-width leaves space for the auto margins to centre it while short, and scroll from the top when tall. */
|
|
362
525
|
width: 100%;
|
|
363
526
|
max-width: var(--nile-app-shell-centered-width);
|
|
364
527
|
margin: auto;
|
|
@@ -368,8 +531,7 @@ export const styles = css `
|
|
|
368
531
|
|
|
369
532
|
.aside {
|
|
370
533
|
box-sizing: border-box;
|
|
371
|
-
/* Gives before the page does, down to its own floor
|
|
372
|
-
the panel does: the page is the last region to be asked for room. */
|
|
534
|
+
/* Gives before the page does, down to its own floor. */
|
|
373
535
|
flex: 0 1 var(--nile-app-shell-aside-width);
|
|
374
536
|
min-width: var(--nile-app-shell-aside-min-width);
|
|
375
537
|
display: flex;
|
|
@@ -391,13 +553,7 @@ export const styles = css `
|
|
|
391
553
|
|
|
392
554
|
.panel {
|
|
393
555
|
box-sizing: border-box;
|
|
394
|
-
/*
|
|
395
|
-
* The panel pushes the page, it never covers it, so it has to be able to
|
|
396
|
-
* give a little: full width while the row can afford it, then shrinking to
|
|
397
|
-
* its min. Here the floor can be a real min-width — the container's floor
|
|
398
|
-
* is a flex basis that yields all the way, so the row still cannot
|
|
399
|
-
* overflow into :host's clip once the panel stops giving.
|
|
400
|
-
*/
|
|
556
|
+
/* The panel pushes the page rather than covering it: full width while the row affords it, shrinking to a real min-width floor. */
|
|
401
557
|
flex: 0 1 var(--nile-app-shell-panel-width);
|
|
402
558
|
width: var(--nile-app-shell-panel-width);
|
|
403
559
|
min-width: var(--nile-app-shell-panel-min-width);
|
|
@@ -451,13 +607,28 @@ export const styles = css `
|
|
|
451
607
|
flex: 0 0 auto;
|
|
452
608
|
display: flex;
|
|
453
609
|
align-items: center;
|
|
454
|
-
gap: var(--nile-spacing-
|
|
455
|
-
height: var(--nile-app-shell-
|
|
456
|
-
padding-inline: var(--nile-spacing-
|
|
610
|
+
gap: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
611
|
+
height: var(--nile-app-shell-panel-header-height);
|
|
612
|
+
padding-inline: var(--nile-spacing-3xl, var(--ng-spacing-3xl));
|
|
457
613
|
border-bottom: var(--nile-border-width-1, var(--ng-border-width-1)) solid
|
|
458
614
|
var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
459
615
|
}
|
|
460
616
|
|
|
617
|
+
/* The back control for a panel sub-view; stands where the brand mark does in the root view. */
|
|
618
|
+
.panel-back {
|
|
619
|
+
flex: 0 0 auto;
|
|
620
|
+
margin-inline-start: -6px;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/* Mirrors the back control's offset on the end edge: the 20px glyph, not the 32px circle, lands on the padding line. */
|
|
624
|
+
.panel-close {
|
|
625
|
+
margin-inline-end: -6px;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
:host([panelback]) .panel-mark {
|
|
629
|
+
display: none;
|
|
630
|
+
}
|
|
631
|
+
|
|
461
632
|
.panel-heading {
|
|
462
633
|
display: flex;
|
|
463
634
|
align-items: center;
|
|
@@ -482,7 +653,9 @@ export const styles = css `
|
|
|
482
653
|
|
|
483
654
|
.panel-title {
|
|
484
655
|
margin: 0;
|
|
485
|
-
|
|
656
|
+
/* Figma's Assistant Title: Text lg/Semibold, 18/28 on NxtGen. Enterprise keeps --nile-type-scale-3, and it defines no --ng-* tokens, so the line-height declaration is invalid there and the title inherits its line height exactly as before. */
|
|
657
|
+
font-size: var(--nile-type-scale-3, var(--ng-font-size-text-lg));
|
|
658
|
+
line-height: var(--ng-line-height-text-lg);
|
|
486
659
|
font-weight: var(
|
|
487
660
|
--nile-font-weight-semi-bold,
|
|
488
661
|
var(--ng-font-weight-semibold)
|
|
@@ -504,7 +677,8 @@ export const styles = css `
|
|
|
504
677
|
flex: 1 1 auto;
|
|
505
678
|
min-height: 0;
|
|
506
679
|
overflow: auto;
|
|
507
|
-
|
|
680
|
+
/* 16 under the header, 24 on the sides and bottom. */
|
|
681
|
+
padding: var(--nile-spacing-xl, var(--ng-spacing-xl)) var(--nile-spacing-3xl, var(--ng-spacing-3xl)) var(--nile-spacing-3xl, var(--ng-spacing-3xl));
|
|
508
682
|
display: flex;
|
|
509
683
|
flex-direction: column;
|
|
510
684
|
gap: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
@@ -512,7 +686,7 @@ export const styles = css `
|
|
|
512
686
|
|
|
513
687
|
.panel-footer {
|
|
514
688
|
flex: 0 0 auto;
|
|
515
|
-
padding: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
689
|
+
padding: var(--nile-spacing-xl, var(--ng-spacing-xl)) var(--nile-spacing-3xl, var(--ng-spacing-3xl)) var(--nile-spacing-3xl, var(--ng-spacing-3xl));
|
|
516
690
|
border-top: var(--nile-border-width-1, var(--ng-border-width-1)) solid
|
|
517
691
|
var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
518
692
|
}
|