@nonoun/native-dashboard 0.4.4 → 0.4.6

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.
@@ -116,6 +116,118 @@
116
116
  padding-inline-start: 0;
117
117
  }
118
118
 
119
+ /* ── Semantic layout selectors ── */
120
+ /* WHY: Semantic HTML alternatives to n-dashboard-breadcrumb, n-dashboard-canvas,
121
+ n-dashboard-panel. Both old and new selectors work simultaneously.
122
+ Layout: native-app > section > nav (breadcrumb) + section.content > main */
123
+
124
+ /* Breadcrumb bar — <nav> direct child of the content column */
125
+ :where(native-app) > :where(:not([slot])) > :where(nav) {
126
+ display: grid;
127
+ grid-template-columns: 1fr;
128
+ align-items: center;
129
+ min-height: var(--n-sidebar-item-height);
130
+ gap: calc(var(--n-space) * 2);
131
+ padding-block: var(--n-space);
132
+ padding-inline: calc(var(--n-space-k) * var(--n-space));
133
+ flex-shrink: 0;
134
+ min-width: 0;
135
+ }
136
+
137
+ /* Breadcrumb adaptive grid — leading + trailing */
138
+ :where(native-app) > :where(:not([slot])) > :where(nav):has(> :first-child + * + aside) {
139
+ grid-template-columns: auto 1fr auto;
140
+ }
141
+
142
+ /* Breadcrumb — leading only */
143
+ :where(native-app) > :where(:not([slot])) > :where(nav):has(> :first-child + *):not(:has(> aside)) {
144
+ grid-template-columns: auto 1fr;
145
+ }
146
+
147
+ /* Breadcrumb — trailing only */
148
+ :where(native-app) > :where(:not([slot])) > :where(nav):has(> aside):not(:has(> :first-child + * + aside)) {
149
+ grid-template-columns: 1fr auto;
150
+ }
151
+
152
+ /* Trailing actions in breadcrumb */
153
+ :where(native-app) > :where(:not([slot])) > :where(nav) > :where(aside) {
154
+ display: flex;
155
+ align-items: center;
156
+ gap: calc(var(--n-space) * 2);
157
+ }
158
+
159
+ /* Canvas — content area (main + aside panels) */
160
+ :where(native-app) :where(section.content) {
161
+ display: flex;
162
+ flex: 1;
163
+ min-height: 0;
164
+ gap: calc(var(--n-space-k) * var(--n-space));
165
+ padding: 0 calc(var(--n-space-k) * var(--n-space)) calc(var(--n-space-k) * var(--n-space));
166
+ }
167
+
168
+ /* Main content panel */
169
+ :where(native-app) :where(section.content) > :where(main) {
170
+ --n-ground: var(--n-panel);
171
+
172
+ flex: 1;
173
+ min-width: 0;
174
+ overflow-y: auto;
175
+ scrollbar-width: none;
176
+ display: flex;
177
+ flex-direction: column;
178
+ background: var(--n-ground);
179
+ border-radius: var(--n-radius);
180
+ }
181
+
182
+ :where(native-app) :where(section.content) > :where(main)[show-scrollbar] {
183
+ scrollbar-width: thin;
184
+ }
185
+
186
+ /* Semantic sub-containers inside main */
187
+ :where(native-app) :where(section.content) > :where(main):has(> header, > footer) {
188
+ overflow: hidden;
189
+ }
190
+
191
+ :where(native-app) :where(section.content) > :where(main):has(> header, > footer) > :where(section) {
192
+ flex: 1 1 0%;
193
+ min-height: 0;
194
+ overflow-y: auto;
195
+ scrollbar-width: none;
196
+ display: flex;
197
+ flex-direction: column;
198
+ }
199
+
200
+ :where(native-app) :where(section.content) > :where(main) > :where(header) {
201
+ flex: none;
202
+ border-bottom: 1px solid var(--n-border-muted);
203
+ background: var(--n-ground);
204
+ z-index: 1;
205
+ }
206
+
207
+ :where(native-app) :where(section.content) > :where(main) > :where(footer) {
208
+ flex: none;
209
+ border-top: 1px solid var(--n-border-muted);
210
+ background: var(--n-ground);
211
+ }
212
+
213
+ /* Content max-width centering (same as app-panel.css semantic selectors) */
214
+ :where(native-app) :where(section.content) > :where(main) > :where(header) > *,
215
+ :where(native-app) :where(section.content) > :where(main) > :where(section) > *,
216
+ :where(native-app) :where(section.content) > :where(main) > :where(footer) > * {
217
+ max-width: var(--n-dashboard-panel-content-max-width, none);
218
+ width: 100%;
219
+ margin-inline: auto;
220
+ }
221
+
222
+ /* Collapsed padding — semantic selectors */
223
+ :where(native-app)[collapsed] :where(section.content) {
224
+ padding-inline-start: 0;
225
+ }
226
+
227
+ :where(native-app)[collapsed] > :where(:not([slot])) > :where(nav) {
228
+ padding-inline-start: 0;
229
+ }
230
+
119
231
  /* ── Sidebar Header ── */
120
232
  /* WHY: Absolute-positioned overlay pinned to top of aside. Content scrolls
121
233
  underneath it. z-index: 2 sits above content (z-index: 0). */
@@ -798,6 +910,19 @@
798
910
  gap: calc(var(--n-space) * 2);
799
911
  }
800
912
 
913
+ /* ── Semantic slot selectors ── */
914
+ /* WHY: <aside> as trailing slot alternative to [slot="trailing"]. */
915
+
916
+ :where(n-dashboard-breadcrumb):has(> :first-child + * + aside) {
917
+ grid-template-columns: auto 1fr auto;
918
+ }
919
+
920
+ :where(n-dashboard-breadcrumb) > :where(aside) {
921
+ display: flex;
922
+ align-items: center;
923
+ gap: calc(var(--n-space) * 2);
924
+ }
925
+
801
926
  }
802
927
 
803
928
  @layer ui {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nonoun/native-dashboard",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "Dashboard layout and navigation components for @nonoun/native-ui",
5
5
  "license": "MIT",
6
6
  "type": "module",