@nonoun/native-dashboard 0.4.5 → 0.4.8

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.
@@ -33,7 +33,7 @@
33
33
 
34
34
  :where(native-app):not([data-ready])[collapsed]::before {
35
35
  content: '';
36
- width: 48px;
36
+ width: var(--n-sidebar-collapsed-width, 48px);
37
37
  flex-shrink: 0;
38
38
  background: var(--n-body);
39
39
  border-right: 1px solid var(--n-border-muted);
@@ -85,8 +85,8 @@
85
85
  in this file and in child component CSS. */
86
86
 
87
87
  :where(native-app)[collapsed] > :where([slot="sidebar"]) {
88
- width: 48px;
89
- min-width: 48px;
88
+ width: var(--n-sidebar-collapsed-width, 48px);
89
+ min-width: var(--n-sidebar-collapsed-width, 48px);
90
90
  }
91
91
 
92
92
  /* ── Resize Handle ── */
@@ -149,8 +149,21 @@
149
149
  grid-template-columns: 1fr auto;
150
150
  }
151
151
 
152
+ /* Leading cell — flex container for toggle button + breadcrumb */
153
+ :where(native-app) > :where(:not([slot])) > :where(nav) > :first-child {
154
+ display: flex;
155
+ align-items: center;
156
+ gap: calc(var(--n-space) * 2);
157
+ }
158
+
159
+ /* Label area — prevent overflow */
160
+ :where(native-app) > :where(:not([slot])) > :where(nav) > :nth-child(2) {
161
+ min-width: 0;
162
+ }
163
+
152
164
  /* Trailing actions in breadcrumb */
153
- :where(native-app) > :where(:not([slot])) > :where(nav) > :where(aside) {
165
+ :where(native-app) > :where(:not([slot])) > :where(nav) > :where(aside),
166
+ :where(native-app) > :where(:not([slot])) > :where(nav) > :where([slot="trailing"]) {
154
167
  display: flex;
155
168
  align-items: center;
156
169
  gap: calc(var(--n-space) * 2);
@@ -184,6 +197,14 @@
184
197
  }
185
198
 
186
199
  /* Semantic sub-containers inside main */
200
+
201
+ :where(native-app) :where(section.content) > :where(main) > :where(header),
202
+ :where(native-app) :where(section.content) > :where(main) > :where(section),
203
+ :where(native-app) :where(section.content) > :where(main) > :where(footer) {
204
+ padding: var(--n-dashboard-panel-content-padding, 0);
205
+ box-sizing: border-box;
206
+ }
207
+
187
208
  :where(native-app) :where(section.content) > :where(main):has(> header, > footer) {
188
209
  overflow: hidden;
189
210
  }
@@ -195,6 +216,11 @@
195
216
  scrollbar-width: none;
196
217
  display: flex;
197
218
  flex-direction: column;
219
+ gap: var(--n-dashboard-panel-content-gap, 0);
220
+ }
221
+
222
+ :where(native-app) :where(section.content) > :where(main)[show-scrollbar] > :where(section) {
223
+ scrollbar-width: thin;
198
224
  }
199
225
 
200
226
  :where(native-app) :where(section.content) > :where(main) > :where(header) {
@@ -210,7 +236,7 @@
210
236
  background: var(--n-ground);
211
237
  }
212
238
 
213
- /* Content max-width centering (same as app-panel.css semantic selectors) */
239
+ /* Content max-width centering (same as dashboard-panel.css semantic selectors) */
214
240
  :where(native-app) :where(section.content) > :where(main) > :where(header) > *,
215
241
  :where(native-app) :where(section.content) > :where(main) > :where(section) > *,
216
242
  :where(native-app) :where(section.content) > :where(main) > :where(footer) > * {
@@ -219,6 +245,62 @@
219
245
  margin-inline: auto;
220
246
  }
221
247
 
248
+ /* Aside panel — semantic equivalent of n-dashboard-panel[aside] */
249
+ :where(native-app) :where(section.content) > :where(aside) {
250
+ --n-ground: var(--n-panel);
251
+
252
+ position: relative;
253
+ width: 0;
254
+ min-width: 0;
255
+ max-width: 480px;
256
+ overflow: clip;
257
+ padding: 0;
258
+ flex-shrink: 0;
259
+ background: var(--n-ground);
260
+ border-radius: var(--n-radius);
261
+ transition:
262
+ width var(--n-duration) var(--n-easing),
263
+ min-width var(--n-duration) var(--n-easing),
264
+ padding var(--n-duration) var(--n-easing),
265
+ margin var(--n-duration) var(--n-easing);
266
+ }
267
+
268
+ :where(native-app) :where(section.content) > :where(aside)[open] {
269
+ width: var(--n-aside-width, 360px);
270
+ min-width: var(--n-aside-min-width, 280px);
271
+ margin-inline-start: calc(var(--n-space-k) * var(--n-space));
272
+ overflow-y: auto;
273
+ padding: calc(var(--n-space-k) * var(--n-space));
274
+ }
275
+
276
+ /* WHY: When n-chat manages its own sub-container padding and scroll,
277
+ the layout container delegates — no own padding, no own scroll. */
278
+ :where(native-app) :where(section.content) > :where(aside)[open]:has(> n-chat) {
279
+ padding: 0;
280
+ overflow: visible;
281
+ }
282
+
283
+ /* WHY: Disable width transition while dragging — it fights the pointer. */
284
+ :where(native-app) :where(section.content) > :where(aside)[resizing] {
285
+ transition: none;
286
+ }
287
+
288
+ /* Aside resize handle */
289
+ :where(native-app) :where(section.content) > :where(aside) :where(.layout-resize-handle) {
290
+ position: absolute;
291
+ top: 0;
292
+ left: 0;
293
+ width: 4px;
294
+ height: 100%;
295
+ cursor: col-resize;
296
+ z-index: 1;
297
+ }
298
+
299
+ :where(native-app) :where(section.content) > :where(aside) :where(.layout-resize-handle):hover,
300
+ :where(native-app) :where(section.content) > :where(aside)[resizing] :where(.layout-resize-handle) {
301
+ background: var(--n-border-muted);
302
+ }
303
+
222
304
  /* Collapsed padding — semantic selectors */
223
305
  :where(native-app)[collapsed] :where(section.content) {
224
306
  padding-inline-start: 0;
@@ -398,7 +480,7 @@
398
480
  margin-block: var(--n-popover-viewport-margin);
399
481
  margin-inline: 0;
400
482
  margin-inline-start: var(--n-popover-gap);
401
- min-width: 200px;
483
+ min-width: var(--n-sidebar-popover-min-width, 200px);
402
484
  max-height: var(--n-popover-max-height);
403
485
  overflow-y: auto;
404
486
  }
@@ -541,7 +623,7 @@
541
623
  }
542
624
 
543
625
  /* Badge in nav item — push to trailing edge */
544
- :where(n-sidebar-nav-item) > :where(n-badge) {
626
+ :where(n-sidebar-nav-item) > :where(.badge) {
545
627
  margin-inline-start: auto;
546
628
  flex-shrink: 0;
547
629
  }
@@ -754,7 +836,7 @@
754
836
  margin-block: var(--n-popover-viewport-margin);
755
837
  margin-inline: 0;
756
838
  margin-inline-start: var(--n-popover-gap);
757
- min-width: 200px;
839
+ min-width: var(--n-sidebar-popover-min-width, 200px);
758
840
  max-height: var(--n-popover-max-height);
759
841
  overflow-y: auto;
760
842
  }
@@ -1038,20 +1120,20 @@
1038
1120
  /* WHY: When n-body is present, delegate overflow to it so
1039
1121
  header/footer stay fixed while body scrolls. */
1040
1122
 
1041
- :where(n-dashboard-panel):has(> n-body) {
1123
+ :where(n-dashboard-panel):has(> .body) {
1042
1124
  overflow: hidden;
1043
1125
  padding: 0;
1044
1126
  }
1045
- :where(n-dashboard-panel) > :where(n-body) {
1127
+ :where(n-dashboard-panel) > :where(.body) {
1046
1128
  overflow-y: auto;
1047
1129
  scrollbar-width: none;
1048
1130
  }
1049
1131
 
1050
- :where(n-dashboard-panel) > :where(n-header) {
1132
+ :where(n-dashboard-panel) > :where(header) {
1051
1133
  border-bottom: 1px solid var(--n-border-muted);
1052
1134
  }
1053
1135
 
1054
- :where(n-dashboard-panel) > :where(n-footer) {
1136
+ :where(n-dashboard-panel) > :where(footer) {
1055
1137
  border-top: 1px solid var(--n-border-muted);
1056
1138
  }
1057
1139
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nonoun/native-dashboard",
3
- "version": "0.4.5",
3
+ "version": "0.4.8",
4
4
  "description": "Dashboard layout and navigation components for @nonoun/native-ui",
5
5
  "license": "MIT",
6
6
  "type": "module",