@aquera/nile-elements 2.0.9 → 2.0.11

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.
Files changed (142) hide show
  1. package/README.md +11 -0
  2. package/demo/app-shell.html +852 -0
  3. package/demo/nxtgen-classes.css +5 -5
  4. package/demo/nxtgen-dark.css +25 -25
  5. package/demo/nxtgen-properties.css +2 -2
  6. package/demo/nxtgen-utilities.css +5 -5
  7. package/demo/nxtgen.css +5 -5
  8. package/demo/utilities.css +2 -2
  9. package/demo/variables.css +2 -2
  10. package/dist/index.cjs.js +1 -1
  11. package/dist/index.esm.js +1 -1
  12. package/dist/index.js +594 -308
  13. package/dist/internal/app-shell-utility-control-styles.cjs.js +2 -0
  14. package/dist/internal/app-shell-utility-control-styles.cjs.js.map +1 -0
  15. package/dist/internal/app-shell-utility-control-styles.esm.js +16 -0
  16. package/dist/nile-app-shell/index.cjs.js +1 -1
  17. package/dist/nile-app-shell/index.esm.js +1 -1
  18. package/dist/nile-app-shell/nile-app-shell.cjs.js +1 -1
  19. package/dist/nile-app-shell/nile-app-shell.cjs.js.map +1 -1
  20. package/dist/nile-app-shell/nile-app-shell.css.cjs.js +1 -1
  21. package/dist/nile-app-shell/nile-app-shell.css.cjs.js.map +1 -1
  22. package/dist/nile-app-shell/nile-app-shell.css.esm.js +270 -92
  23. package/dist/nile-app-shell/nile-app-shell.esm.js +61 -10
  24. package/dist/nile-app-shell/shell-controller.cjs.js.map +1 -1
  25. package/dist/nile-app-shell-main/nile-app-shell-main.cjs.js.map +1 -1
  26. package/dist/nile-app-shell-nav-toggle/index.cjs.js +1 -1
  27. package/dist/nile-app-shell-nav-toggle/index.esm.js +1 -1
  28. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js +1 -1
  29. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js.map +1 -1
  30. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.cjs.js +1 -1
  31. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.cjs.js.map +1 -1
  32. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.esm.js +7 -3
  33. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.esm.js +3 -3
  34. package/dist/nile-app-shell-panel/index.cjs.js +1 -1
  35. package/dist/nile-app-shell-panel/index.esm.js +1 -1
  36. package/dist/nile-app-shell-panel/nile-app-shell-panel.cjs.js +1 -1
  37. package/dist/nile-app-shell-panel/nile-app-shell-panel.cjs.js.map +1 -1
  38. package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js +1 -1
  39. package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js.map +1 -1
  40. package/dist/nile-app-shell-panel/nile-app-shell-panel.css.esm.js +29 -7
  41. package/dist/nile-app-shell-panel/nile-app-shell-panel.esm.js +18 -5
  42. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js.map +1 -1
  43. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js.map +1 -1
  44. package/dist/nile-badge/nile-badge.css.cjs.js +1 -1
  45. package/dist/nile-badge/nile-badge.css.cjs.js.map +1 -1
  46. package/dist/nile-badge/nile-badge.css.esm.js +2 -2
  47. package/dist/nile-button-toggle/nile-button-toggle.css.cjs.js +1 -1
  48. package/dist/nile-button-toggle/nile-button-toggle.css.cjs.js.map +1 -1
  49. package/dist/nile-button-toggle/nile-button-toggle.css.esm.js +2 -2
  50. package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
  51. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  52. package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
  53. package/dist/nile-menu-item/nile-menu-item.css.cjs.js +1 -1
  54. package/dist/nile-menu-item/nile-menu-item.css.cjs.js.map +1 -1
  55. package/dist/nile-menu-item/nile-menu-item.css.esm.js +1 -1
  56. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +1 -1
  57. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -1
  58. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +5 -2
  59. package/dist/nile-toast/nile-toast.css.cjs.js +1 -1
  60. package/dist/nile-toast/nile-toast.css.cjs.js.map +1 -1
  61. package/dist/nile-toast/nile-toast.css.esm.js +5 -5
  62. package/dist/src/internal/app-shell-utility-control-styles.d.ts +12 -0
  63. package/dist/src/internal/app-shell-utility-control-styles.js +29 -0
  64. package/dist/src/internal/app-shell-utility-control-styles.js.map +1 -0
  65. package/dist/src/nile-app-shell/nile-app-shell-regions.test.d.ts +3 -0
  66. package/dist/src/nile-app-shell/nile-app-shell-regions.test.js +206 -0
  67. package/dist/src/nile-app-shell/nile-app-shell-regions.test.js.map +1 -1
  68. package/dist/src/nile-app-shell/nile-app-shell.css.d.ts +1 -9
  69. package/dist/src/nile-app-shell/nile-app-shell.css.js +270 -99
  70. package/dist/src/nile-app-shell/nile-app-shell.css.js.map +1 -1
  71. package/dist/src/nile-app-shell/nile-app-shell.d.ts +90 -122
  72. package/dist/src/nile-app-shell/nile-app-shell.js +224 -143
  73. package/dist/src/nile-app-shell/nile-app-shell.js.map +1 -1
  74. package/dist/src/nile-app-shell/nile-app-shell.test.d.ts +3 -0
  75. package/dist/src/nile-app-shell/nile-app-shell.test.js +898 -29
  76. package/dist/src/nile-app-shell/nile-app-shell.test.js.map +1 -1
  77. package/dist/src/nile-app-shell/shell-controller.d.ts +1 -8
  78. package/dist/src/nile-app-shell/shell-controller.js +2 -14
  79. package/dist/src/nile-app-shell/shell-controller.js.map +1 -1
  80. package/dist/src/nile-app-shell-main/nile-app-shell-main.d.ts +2 -6
  81. package/dist/src/nile-app-shell-main/nile-app-shell-main.js +2 -6
  82. package/dist/src/nile-app-shell-main/nile-app-shell-main.js.map +1 -1
  83. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.d.ts +1 -4
  84. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.js +7 -5
  85. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.js.map +1 -1
  86. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.d.ts +4 -8
  87. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js +5 -6
  88. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js.map +1 -1
  89. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js +28 -5
  90. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js.map +1 -1
  91. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.d.ts +18 -13
  92. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.js +45 -16
  93. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.js.map +1 -1
  94. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.d.ts +1 -4
  95. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js +1 -4
  96. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js.map +1 -1
  97. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.d.ts +4 -12
  98. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js +4 -12
  99. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js.map +1 -1
  100. package/dist/src/nile-badge/nile-badge.css.js +2 -2
  101. package/dist/src/nile-badge/nile-badge.css.js.map +1 -1
  102. package/dist/src/nile-button-toggle/nile-button-toggle.css.js +2 -2
  103. package/dist/src/nile-button-toggle/nile-button-toggle.css.js.map +1 -1
  104. package/dist/src/nile-code-editor/nile-code-editor.d.ts +1 -1
  105. package/dist/src/nile-code-editor/nile-code-editor.js +2 -2
  106. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  107. package/dist/src/nile-menu-item/nile-menu-item.css.js +1 -1
  108. package/dist/src/nile-menu-item/nile-menu-item.css.js.map +1 -1
  109. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +5 -2
  110. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -1
  111. package/dist/src/nile-toast/nile-toast.css.js +5 -5
  112. package/dist/src/nile-toast/nile-toast.css.js.map +1 -1
  113. package/dist/src/version.js +1 -1
  114. package/dist/src/version.js.map +1 -1
  115. package/dist/tsconfig.tsbuildinfo +1 -1
  116. package/dist/version.cjs.js +1 -1
  117. package/dist/version.cjs.js.map +1 -1
  118. package/dist/version.esm.js +1 -1
  119. package/package.json +1 -1
  120. package/plop-templates/lit/lit.test.ts.hbs +22 -0
  121. package/plop-templates/lit/lit.ts.hbs +10 -5
  122. package/plopfile.js +12 -0
  123. package/src/internal/app-shell-utility-control-styles.ts +30 -0
  124. package/src/nile-app-shell/nile-app-shell-regions.test.ts +248 -0
  125. package/src/nile-app-shell/nile-app-shell.css.ts +270 -99
  126. package/src/nile-app-shell/nile-app-shell.test.ts +1120 -29
  127. package/src/nile-app-shell/nile-app-shell.ts +241 -148
  128. package/src/nile-app-shell/shell-controller.ts +2 -14
  129. package/src/nile-app-shell-main/nile-app-shell-main.ts +2 -6
  130. package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.ts +7 -5
  131. package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.ts +7 -11
  132. package/src/nile-app-shell-panel/nile-app-shell-panel.css.ts +28 -5
  133. package/src/nile-app-shell-panel/nile-app-shell-panel.ts +44 -16
  134. package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.ts +1 -4
  135. package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.ts +4 -12
  136. package/src/nile-badge/nile-badge.css.ts +2 -2
  137. package/src/nile-button-toggle/nile-button-toggle.css.ts +2 -2
  138. package/src/nile-code-editor/nile-code-editor.ts +2 -2
  139. package/src/nile-menu-item/nile-menu-item.css.ts +1 -1
  140. package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +5 -2
  141. package/src/nile-toast/nile-toast.css.ts +5 -5
  142. package/vscode-html-custom-data.json +114 -37
@@ -6,11 +6,9 @@
6
6
  */
7
7
 
8
8
  import { css } from 'lit';
9
+ import { utilityControlStyles } from '../internal/app-shell-utility-control-styles';
9
10
 
10
- /**
11
- * AppShellNavToggle CSS. The button itself is the shared utility recipe; this
12
- * file only handles the host box and the rule.
13
- */
11
+ /** AppShellNavToggle CSS: the host box, the rule, and the utility-control recipe, since this element also mounts outside a shell. */
14
12
  export const styles = css`
15
13
  :host {
16
14
  display: inline-flex;
@@ -22,10 +20,14 @@ export const styles = css`
22
20
  display: none;
23
21
  }
24
22
 
23
+ /* Lands the 20px glyph box, not the 32px utility circle, on the 24px origin: (32 - 20) / 2 = 6. */
25
24
  .toggle {
26
- margin-inline-start: var(--nile-app-shell-nav-toggle-offset, -7px);
25
+ margin-inline-start: var(--nile-app-shell-nav-toggle-offset, -6px);
27
26
  }
28
27
 
28
+ /* The toggle itself: the shared utility-control recipe. */
29
+ ${utilityControlStyles}
30
+
29
31
  .rule {
30
32
  flex: 0 0 auto;
31
33
  width: var(--nile-border-width-1, var(--ng-border-width-1));
@@ -14,9 +14,7 @@ import NileElement from '../internal/nile-element';
14
14
  import type { NileAppShell } from '../nile-app-shell/nile-app-shell';
15
15
 
16
16
  /**
17
- * @summary The side-nav toggle, as a standalone control. `nile-app-shell`
18
- * renders one in its own top bar; mount this in a header you build yourself, or
19
- * a route has no way to expand the rail.
17
+ * @summary The side-nav toggle as a standalone control, for a header you build yourself.
20
18
  *
21
19
  * @status stable
22
20
  * @since 2.0
@@ -29,7 +27,8 @@ import type { NileAppShell } from '../nile-app-shell/nile-app-shell';
29
27
  * @csspart button - The toggle button.
30
28
  * @csspart rule - The trailing vertical rule.
31
29
  *
32
- * @cssproperty [--nile-app-shell-nav-toggle-offset=-4px] - Optical start offset.
30
+ * @cssproperty [--nile-app-shell-nav-toggle-offset=-6px] - Optical start offset, so the glyph lands on the bar's text origin.
31
+ * @cssproperty [--nile-app-shell-utility-size=32px] - Box the toggle sits in; the hit area and hover surface, not a visible chip.
33
32
  */
34
33
  @customElement('nile-app-shell-nav-toggle')
35
34
  export class NileAppShellNavToggle extends NileElement {
@@ -41,10 +40,7 @@ export class NileAppShellNavToggle extends NileElement {
41
40
  @property({ type: Boolean, reflect: true, attribute: 'with-rule' })
42
41
  withRule: boolean = false;
43
42
 
44
- /**
45
- * The shell to drive. Defaults to the nearest `nile-app-shell` ancestor, or
46
- * the element with this id.
47
- */
43
+ /** The shell to drive. Defaults to the nearest `nile-app-shell` ancestor, or the element with this id. */
48
44
  @property({ type: String })
49
45
  shell?: string;
50
46
 
@@ -98,7 +94,7 @@ export class NileAppShellNavToggle extends NileElement {
98
94
  const expanded = !this._rail;
99
95
  return html`
100
96
  <nile-button
101
- class="toggle"
97
+ class="toggle utility-control"
102
98
  part="button"
103
99
  variant="ghost"
104
100
  circle
@@ -113,8 +109,8 @@ export class NileAppShellNavToggle extends NileElement {
113
109
  @click=${this._onClick}
114
110
  >
115
111
  ${renderGlyph(
116
- expanded ? 'ng-panel-left-close' : 'ng-panel-left-open',
117
- 24,
112
+ expanded ? 'ng-panel-left' : 'ng-panel-right',
113
+ 20,
118
114
  'currentColor'
119
115
  )}
120
116
  </nile-button>
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  import { css } from 'lit';
9
+ import { utilityControlStyles } from '../internal/app-shell-utility-control-styles';
9
10
 
10
11
  export const styles = css`
11
12
  :host {
@@ -23,14 +24,15 @@ export const styles = css`
23
24
  display: none;
24
25
  }
25
26
 
27
+ /* The panel header keeps its own height, never the page header's; the literal is the floor for a panel mounted outside a shell. */
26
28
  .header {
27
29
  box-sizing: border-box;
28
30
  flex: 0 0 auto;
29
31
  display: flex;
30
32
  align-items: center;
31
- gap: var(--nile-spacing-lg, var(--ng-spacing-lg));
32
- height: var(--nile-app-shell-top-bar-height, 56px);
33
- padding-inline: var(--nile-spacing-xl, var(--ng-spacing-xl));
33
+ gap: var(--nile-spacing-md, var(--ng-spacing-md));
34
+ height: var(--nile-app-shell-panel-header-height, 56px);
35
+ padding-inline: var(--nile-spacing-3xl, var(--ng-spacing-3xl));
34
36
  border-bottom: var(--nile-border-width-1, var(--ng-border-width-1)) solid
35
37
  var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
36
38
  }
@@ -39,6 +41,21 @@ export const styles = css`
39
41
  display: none;
40
42
  }
41
43
 
44
+ /* The back control for a sub-view; stands where the brand mark does in the root view. */
45
+ .back {
46
+ flex: 0 0 auto;
47
+ margin-inline-start: -6px;
48
+ }
49
+
50
+ /* Mirrors the back control's offset on the end edge: the 20px glyph, not the 32px circle, lands on the padding line. */
51
+ .close {
52
+ margin-inline-end: -6px;
53
+ }
54
+
55
+ :host([back]) .mark {
56
+ display: none;
57
+ }
58
+
42
59
  .heading {
43
60
  display: flex;
44
61
  align-items: center;
@@ -85,6 +102,11 @@ export const styles = css`
85
102
  display: none;
86
103
  }
87
104
 
105
+ /* ------------------------------------------------------- utility controls */
106
+
107
+ /* The header's own icon controls (back and close): the shared utility-control recipe. */
108
+ ${utilityControlStyles}
109
+
88
110
  .body {
89
111
  flex: 1 1 auto;
90
112
  min-height: 0;
@@ -92,7 +114,8 @@ export const styles = css`
92
114
  display: flex;
93
115
  flex-direction: column;
94
116
  gap: var(--nile-spacing-xl, var(--ng-spacing-xl));
95
- padding: var(--nile-spacing-xl, var(--ng-spacing-xl));
117
+ /* 16 under the header, 24 on the sides and bottom. */
118
+ 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));
96
119
  }
97
120
 
98
121
  :host([no-padding]) .body {
@@ -101,7 +124,7 @@ export const styles = css`
101
124
 
102
125
  .footer {
103
126
  flex: 0 0 auto;
104
- padding: var(--nile-spacing-xl, var(--ng-spacing-xl));
127
+ 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));
105
128
  border-top: var(--nile-border-width-1, var(--ng-border-width-1)) solid
106
129
  var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
107
130
  }
@@ -15,10 +15,7 @@ import NileElement from '../internal/nile-element';
15
15
  import type { NileAppShellPanelMode } from '../nile-app-shell/nile-app-shell';
16
16
 
17
17
  /**
18
- * @summary The shell's right region — the AI assistant panel. Assigns itself to
19
- * the shell's `panel` slot and takes over the panel chrome: heading, actions,
20
- * close button, scroll region and composer footer. The shell keeps the geometry
21
- * — 480px docked, an overlay drawer when narrow — and the open/closed state.
18
+ * @summary The shell's right region — the AI assistant panel; takes over the panel chrome while the shell keeps the geometry and open state.
22
19
  *
23
20
  * @status stable
24
21
  * @since 2.0
@@ -29,20 +26,25 @@ import type { NileAppShellPanelMode } from '../nile-app-shell/nile-app-shell';
29
26
  * @dependency nile-glyph
30
27
  *
31
28
  * @slot - The panel body. Scrolls.
32
- * @slot header - Replaces the default heading (mark plus label).
33
- * @slot actions - Controls added before the close button.
29
+ * @slot header - Replaces the default heading (mark plus label); the back control renders before it.
30
+ * @slot actions - Controls added before the close button; size and clear their `base` part from page CSS to match the header's bare glyphs.
34
31
  * @slot footer - A composer, docked below the scroll region.
35
32
  *
36
- * @event nile-close - Emitted when the close button is pressed, after the shell
37
- * has been told to close. Cancelable is not honoured; listen to it to react,
38
- * and use `no-close` to own the control yourself.
33
+ * @event nile-close - Emitted when the close button is pressed, after the shell has been told to close.
34
+ * @event nile-back - Emitted when the back control is pressed; the page swaps its own content back.
35
+ * @event nile-panel-back - Emitted right after `nile-back` for the same press, matching the shell's built-in panel chrome, so a page listening on the shell keeps working when it slots this component. Listen for one of the two, not both, or one press is handled twice.
39
36
  *
40
37
  * @csspart header - The header bar.
38
+ * @csspart back - The back control, shown by `back`.
41
39
  * @csspart title - The default heading text.
42
40
  * @csspart actions - The header action group.
43
41
  * @csspart close - The close button.
44
42
  * @csspart body - The scrolling body.
45
43
  * @csspart footer - The footer.
44
+ *
45
+ * @cssproperty [--nile-app-shell-utility-size=32px] - Box the header's back and close controls sit in.
46
+ *
47
+ * @method goBack() - Emit `nile-back` then `nile-panel-back`, as the back control does.
46
48
  */
47
49
  @customElement('nile-app-shell-panel')
48
50
  export class NileAppShellPanel extends NileElement {
@@ -60,6 +62,14 @@ export class NileAppShellPanel extends NileElement {
60
62
  @property({ type: Boolean, reflect: true, attribute: 'no-header' })
61
63
  noHeader: boolean = false;
62
64
 
65
+ /** Shows a back control at the start of the header for a sub-view; the panel keeps no view stack and only emits `nile-back`. */
66
+ @property({ type: Boolean, reflect: true })
67
+ back: boolean = false;
68
+
69
+ /** Accessible name of the back control. */
70
+ @property({ type: String })
71
+ backLabel: string = 'Back';
72
+
63
73
  /** Drops the close button — for a panel the page closes its own way. */
64
74
  @property({ type: Boolean, reflect: true, attribute: 'no-close' })
65
75
  noClose: boolean = false;
@@ -72,10 +82,7 @@ export class NileAppShellPanel extends NileElement {
72
82
  @property({ type: String })
73
83
  shell?: string;
74
84
 
75
- /**
76
- * Mirrors the shell's panel mode. Set by the shell; treat it as read-only and
77
- * style against it (`nile-app-shell-panel[mode='overlay']`).
78
- */
85
+ /** Mirrors the shell's panel mode. Set by the shell; treat it as read-only and style against it (`nile-app-shell-panel[mode='overlay']`). */
79
86
  @property({ type: String, reflect: true })
80
87
  mode: NileAppShellPanelMode = 'docked';
81
88
 
@@ -99,6 +106,12 @@ export class NileAppShellPanel extends NileElement {
99
106
  this.setAttribute('aria-label', this.label);
100
107
  }
101
108
 
109
+ /** Announce that the back control was pressed, as the page owns which view it goes back to: `nile-back`, then `nile-panel-back` for pages written against the shell's built-in panel chrome. */
110
+ public goBack(): void {
111
+ this.emit('nile-back');
112
+ this.emit('nile-panel-back');
113
+ }
114
+
102
115
  /** Close the panel through the shell. */
103
116
  public close(): void {
104
117
  this.shellLink.shell?.closePanel();
@@ -118,16 +131,31 @@ export class NileAppShellPanel extends NileElement {
118
131
  public render(): TemplateResult {
119
132
  return html`
120
133
  <header class="header" part="header">
134
+ ${this.back
135
+ ? html`<nile-button
136
+ class="back utility-control"
137
+ part="back"
138
+ variant="ghost"
139
+ circle
140
+ title=${this.backLabel}
141
+ aria-label=${this.backLabel}
142
+ @click=${() => this.goBack()}
143
+ >
144
+ ${renderGlyph('ng-arrow-left', 20, 'currentColor')}
145
+ </nile-button>`
146
+ : ''}
121
147
  <slot name="header">
122
148
  <span class="heading">
123
- <span class="mark">${renderGlyph('ng-sparkles', 20, 'currentColor')}</span>
149
+ <span class="mark"
150
+ >${renderGlyph('ng-sparkles', 20, 'currentColor')}</span
151
+ >
124
152
  <h2 class="title" part="title">${this.label}</h2>
125
153
  </span>
126
154
  </slot>
127
155
  <div class="actions" part="actions">
128
156
  <slot name="actions"></slot>
129
157
  <nile-button
130
- class="close"
158
+ class="close utility-control"
131
159
  part="close"
132
160
  variant="ghost"
133
161
  circle
@@ -135,7 +163,7 @@ export class NileAppShellPanel extends NileElement {
135
163
  aria-label="Close ${this.label}"
136
164
  @click=${() => this.close()}
137
165
  >
138
- ${renderGlyph('ng-x-close', 24, 'currentColor')}
166
+ ${renderGlyph('ng-x-close', 20, 'currentColor')}
139
167
  </nile-button>
140
168
  </div>
141
169
  </header>
@@ -7,10 +7,7 @@
7
7
 
8
8
  import { css } from 'lit';
9
9
 
10
- /**
11
- * AppShellSideNav CSS. The shell owns the track width; this owns what happens
12
- * inside it — a pinned header, a scrolling body, a pinned footer.
13
- */
10
+ /** AppShellSideNav CSS: the shell owns the track width, this owns what happens inside it — a pinned header, a scrolling body, a pinned footer. */
14
11
  export const styles = css`
15
12
  :host {
16
13
  box-sizing: border-box;
@@ -12,9 +12,7 @@ import { AppShellController } from '../nile-app-shell/shell-controller';
12
12
  import NileElement from '../internal/nile-element';
13
13
 
14
14
  /**
15
- * @summary The shell's left region — the navigation track. Assigns itself to the
16
- * shell's `side-nav` slot and mirrors the shell's rail state, so nav content can
17
- * style against it.
15
+ * @summary The shell's left region — the navigation track; mirrors the shell's rail state so nav content can style against it.
18
16
  *
19
17
  * @status stable
20
18
  * @since 2.0
@@ -31,10 +29,8 @@ import NileElement from '../internal/nile-element';
31
29
  * @csspart body - The scrolling nav body.
32
30
  * @csspart footer - The pinned footer.
33
31
  *
34
- * @cssproperty [--nile-app-shell-side-nav-padding=12px] - Body inset. 12 + 40 +
35
- * 12 is what makes a 64px rail.
36
- * @cssproperty [--nile-app-shell-side-nav-bg=transparent] - Surface behind the
37
- * nav. Transparent by default: the nav and the page share one.
32
+ * @cssproperty [--nile-app-shell-side-nav-padding=12px] - Body inset.
33
+ * @cssproperty [--nile-app-shell-side-nav-bg=transparent] - Surface behind the nav; transparent so the nav and page share one.
38
34
  */
39
35
  @customElement('nile-app-shell-side-nav')
40
36
  export class NileAppShellSideNav extends NileElement {
@@ -44,11 +40,7 @@ export class NileAppShellSideNav extends NileElement {
44
40
 
45
41
  private shellLink = new AppShellController(this);
46
42
 
47
- /**
48
- * Mirrors the shell's effective rail state — the user's preference, or a rail
49
- * forced by the shell's width. Set by the shell; treat it as read-only and
50
- * style against it (`nile-app-shell-side-nav[collapsed] .label`).
51
- */
43
+ /** Mirrors the shell's effective rail state. Set by the shell; treat it as read-only and style against it (`nile-app-shell-side-nav[collapsed] .label`). */
52
44
  @property({ type: Boolean, reflect: true })
53
45
  collapsed: boolean = false;
54
46
 
@@ -144,7 +144,7 @@ export const styles = css`
144
144
  color: var(--nile-badge-color-font-gray, var(--ng-componentcolors-utility-gray-700));
145
145
  border-width: var(--nile-badge-color-border-width, var(--ng-border-width-1));
146
146
  border-style: solid;
147
- border-color: var(--nile-badge-color-border-color-gray, var(--ng-componentcolors-utility-gray-200));
147
+ border-color: var(--nile-badge-color-border-color-gray, var(--ng-componentcolors-utility-gray-300));
148
148
  background: var(--nile-badge-color-background-gray, var(--ng-componentcolors-utility-gray-50));
149
149
  }
150
150
 
@@ -193,7 +193,7 @@ export const styles = css`
193
193
  }
194
194
 
195
195
  .badge--gray.badge--pill-outline {
196
- border: var(--nile-badge-color-border-width-pill-outline, var(--ng-border-width-1)) solid var(--nile-badge-color-pill-outline-gray, var(--ng-componentcolors-utility-gray-200));
196
+ border: var(--nile-badge-color-border-width-pill-outline, var(--ng-border-width-1)) solid var(--nile-badge-color-pill-outline-gray, var(--ng-componentcolors-utility-gray-300));
197
197
  }
198
198
 
199
199
 
@@ -74,12 +74,12 @@ export const styles = css`
74
74
 
75
75
  .nile-button-toggle__active {
76
76
  background-color: var( --nile-colors-neutral-500, var(--ng-colors-bg-brand-primary) );
77
- color: var(--nile-colors-dark-900, var(--ng-colors-bg-brand-solid));
77
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-brand-primary-900));
78
78
  }
79
79
 
80
80
  .nile-button-toggle__active:hover {
81
81
  background-color: var(--nile-colors-neutral-500, var(--ng-colors-bg-brand-primary));
82
- color: var(--nile-colors-dark-900, var(--ng-colors-bg-brand-solid));
82
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-brand-primary-900));
83
83
  }
84
84
 
85
85
  .nile-button-toggle__disabled {
@@ -672,9 +672,9 @@ export class NileCodeEditor extends NileElement {
672
672
  return (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000 < 128;
673
673
  }
674
674
 
675
- /** Applied in dark only so light is untouched.*/
675
+ /** One Dark in dark mode; light keeps CodeMirror's own active-line highlight. */
676
676
  getDarkThemeExtension(): Extension {
677
- return this.isDarkTheme() ? [oneDarkTheme, highlightActiveLine()] : [];
677
+ return [highlightActiveLine(), ...(this.isDarkTheme() ? [oneDarkTheme] : [])];
678
678
  }
679
679
 
680
680
  getDefaultSyntaxHighlightingExtension(){
@@ -94,7 +94,7 @@ export const styles = css`
94
94
  }
95
95
 
96
96
  :host(:hover:not([active], [aria-disabled='true'], :focus-visible)) .menu-item {
97
- background-color: var(--nile-colors-neutral-100,var(--ng-colors-bg-secondary-hover));
97
+ background-color: var(--nile-colors-neutral-100,var(--ng-colors-bg-primary-hover));
98
98
  color: var(--nile-colors-dark-900,var(--ng-colors-text-secondary-hover));
99
99
  }
100
100
 
@@ -12,6 +12,7 @@ export const styles = css`
12
12
  position: relative;
13
13
  display: block;
14
14
  font-family: inherit;
15
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
15
16
  }
16
17
 
17
18
 
@@ -41,6 +42,7 @@ export const styles = css`
41
42
  width: 100%;
42
43
  padding: 12px;
43
44
  background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
45
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
44
46
  border-radius: 0 0 8px 8px;
45
47
  outline: none;
46
48
  tab-size: 4;
@@ -81,6 +83,7 @@ nile-rte-preview {
81
83
  background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
82
84
  box-sizing: border-box;
83
85
  word-wrap: break-word;
86
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
84
87
  }
85
88
 
86
89
  nile-rich-text-editor[disabled] nile-rte-preview {
@@ -246,7 +249,7 @@ nile-rte-preview figure.rte-image img {
246
249
  nile-rte-preview figure.rte-image figcaption {
247
250
  margin-top: 6px;
248
251
  font-size: 0.875em;
249
- color: var(--nile-colors-neutral-600, var(--ng-colors-text-secondary));
252
+ color: var(--nile-colors-neutral-600, var(--ng-colors-text-tertiary-600));
250
253
  }
251
254
 
252
255
  .editor figure.rte-image {
@@ -273,7 +276,7 @@ nile-rich-text-editor[disabled] .editor figure.rte-image {
273
276
 
274
277
  .editor.empty::before {
275
278
  content: attr(data-placeholder);
276
- color: var(--nile-colors-neutral-500, var(--ng-colors-text-secondary));
279
+ color: var(--nile-colors-neutral-500, var(--ng-colors-text-placeholder));
277
280
  position: absolute;
278
281
  font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));
279
282
  pointer-events: none;
@@ -58,7 +58,7 @@ export const styles = css`
58
58
  }
59
59
 
60
60
  .alert--success {
61
- border: 1px solid var(--nile-toast-color-border-success, var(--ng-colors-border-secondary-alt));
61
+ border: 1px solid var(--nile-toast-color-border-success, var(--ng-colors-border-primary));
62
62
  background: var(--nile-toast-color-background-success, var(--ng-colors-bg-primary-alt));
63
63
  box-shadow: var(--nile-toast-color-box-shadow, var(--ng-shadow-xs));
64
64
  }
@@ -68,7 +68,7 @@ export const styles = css`
68
68
  }
69
69
 
70
70
  .alert--info {
71
- border: 1px solid var(--nile-toast-color-border-info, var(--ng-colors-border-secondary-alt));
71
+ border: 1px solid var(--nile-toast-color-border-info, var(--ng-colors-border-primary));
72
72
  background: var(--nile-toast-color-background-info, var(--ng-colors-bg-primary-alt));
73
73
  box-shadow: var(--nile-toast-color-box-shadow, var(--ng-shadow-xs));
74
74
  }
@@ -78,7 +78,7 @@ export const styles = css`
78
78
  }
79
79
 
80
80
  .alert--warning {
81
- border: 1px solid var(--nile-toast-color-border-warning, var(--ng-colors-border-secondary-alt));
81
+ border: 1px solid var(--nile-toast-color-border-warning, var(--ng-colors-border-primary));
82
82
  background: var(--nile-toast-color-background-warning, var(--ng-colors-bg-primary-alt));
83
83
  box-shadow: var(--nile-toast-color-box-shadow, var(--ng-shadow-xs));
84
84
  }
@@ -88,7 +88,7 @@ export const styles = css`
88
88
  }
89
89
 
90
90
  .alert--error {
91
- border: 1px solid var(--nile-toast-color-border-error, var(--ng-colors-border-secondary-alt));
91
+ border: 1px solid var(--nile-toast-color-border-error, var(--ng-colors-border-primary));
92
92
  background: var(--nile-toast-color-background-error, var(--ng-colors-bg-primary-alt));
93
93
  box-shadow: var(--nile-toast-color-box-shadow, var(--ng-shadow-xs));
94
94
  }
@@ -98,7 +98,7 @@ export const styles = css`
98
98
  }
99
99
 
100
100
  .alert--gray {
101
- border: 1px solid var(--nile-toast-color-border-gray, var(--ng-colors-border-secondary-alt));
101
+ border: 1px solid var(--nile-toast-color-border-gray, var(--ng-colors-border-primary));
102
102
  background: var(--nile-toast-color-background-gray, var(--ng-colors-bg-primary-alt));
103
103
  box-shadow: var(--nile-toast-color-box-shadow, var(--ng-shadow-xs));
104
104
  }