@aquera/nile-elements 2.0.11 → 2.0.13

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 (74) hide show
  1. package/README.md +7 -0
  2. package/demo/app-shell.html +21 -21
  3. package/dist/index.js +170 -167
  4. package/dist/nile-app-shell/nile-app-shell.cjs.js +1 -1
  5. package/dist/nile-app-shell/nile-app-shell.cjs.js.map +1 -1
  6. package/dist/nile-app-shell/nile-app-shell.css.cjs.js +1 -1
  7. package/dist/nile-app-shell/nile-app-shell.css.cjs.js.map +1 -1
  8. package/dist/nile-app-shell/nile-app-shell.css.esm.js +35 -32
  9. package/dist/nile-app-shell/nile-app-shell.esm.js +39 -34
  10. package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js +1 -1
  11. package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js.map +1 -1
  12. package/dist/nile-app-shell-panel/nile-app-shell-panel.css.esm.js +3 -1
  13. package/dist/nile-select/nile-select.cjs.js +2 -2
  14. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  15. package/dist/nile-select/nile-select.css.cjs.js +1 -1
  16. package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
  17. package/dist/nile-select/nile-select.css.esm.js +12 -17
  18. package/dist/nile-select/nile-select.esm.js +43 -42
  19. package/dist/nile-select/virtual-scroll-helper.cjs.js +1 -1
  20. package/dist/nile-select/virtual-scroll-helper.cjs.js.map +1 -1
  21. package/dist/nile-select/virtual-scroll-helper.esm.js +2 -0
  22. package/dist/nile-virtual-select/nile-virtual-select.cjs.js +4 -4
  23. package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
  24. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +1 -1
  25. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -1
  26. package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +12 -17
  27. package/dist/nile-virtual-select/nile-virtual-select.esm.js +26 -26
  28. package/dist/src/nile-app-shell/nile-app-shell-regions.test.js +9 -5
  29. package/dist/src/nile-app-shell/nile-app-shell-regions.test.js.map +1 -1
  30. package/dist/src/nile-app-shell/nile-app-shell.css.js +33 -30
  31. package/dist/src/nile-app-shell/nile-app-shell.css.js.map +1 -1
  32. package/dist/src/nile-app-shell/nile-app-shell.d.ts +22 -22
  33. package/dist/src/nile-app-shell/nile-app-shell.js +86 -76
  34. package/dist/src/nile-app-shell/nile-app-shell.js.map +1 -1
  35. package/dist/src/nile-app-shell/nile-app-shell.test.d.ts +1 -0
  36. package/dist/src/nile-app-shell/nile-app-shell.test.js +307 -89
  37. package/dist/src/nile-app-shell/nile-app-shell.test.js.map +1 -1
  38. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js +3 -1
  39. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js.map +1 -1
  40. package/dist/src/nile-select/nile-select.css.js +12 -17
  41. package/dist/src/nile-select/nile-select.css.js.map +1 -1
  42. package/dist/src/nile-select/nile-select.d.ts +18 -2
  43. package/dist/src/nile-select/nile-select.js +226 -64
  44. package/dist/src/nile-select/nile-select.js.map +1 -1
  45. package/dist/src/nile-select/nile-select.test.d.ts +1 -0
  46. package/dist/src/nile-select/nile-select.test.js +896 -17
  47. package/dist/src/nile-select/nile-select.test.js.map +1 -1
  48. package/dist/src/nile-select/virtual-scroll-helper.js +2 -0
  49. package/dist/src/nile-select/virtual-scroll-helper.js.map +1 -1
  50. package/dist/src/nile-virtual-select/nile-virtual-select.css.js +12 -17
  51. package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -1
  52. package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +10 -2
  53. package/dist/src/nile-virtual-select/nile-virtual-select.js +142 -30
  54. package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -1
  55. package/dist/src/nile-virtual-select/nile-virtual-select.test.d.ts +1 -0
  56. package/dist/src/nile-virtual-select/nile-virtual-select.test.js +331 -16
  57. package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +1 -1
  58. package/dist/src/version.js +1 -1
  59. package/dist/src/version.js.map +1 -1
  60. package/dist/tsconfig.tsbuildinfo +1 -1
  61. package/package.json +1 -1
  62. package/src/nile-app-shell/nile-app-shell-regions.test.ts +9 -5
  63. package/src/nile-app-shell/nile-app-shell.css.ts +33 -30
  64. package/src/nile-app-shell/nile-app-shell.test.ts +348 -105
  65. package/src/nile-app-shell/nile-app-shell.ts +89 -82
  66. package/src/nile-app-shell-panel/nile-app-shell-panel.css.ts +3 -1
  67. package/src/nile-select/nile-select.css.ts +12 -17
  68. package/src/nile-select/nile-select.test.ts +1112 -17
  69. package/src/nile-select/nile-select.ts +237 -67
  70. package/src/nile-select/virtual-scroll-helper.ts +2 -0
  71. package/src/nile-virtual-select/nile-virtual-select.css.ts +12 -17
  72. package/src/nile-virtual-select/nile-virtual-select.test.ts +404 -16
  73. package/src/nile-virtual-select/nile-virtual-select.ts +200 -79
  74. package/vscode-html-custom-data.json +36 -41
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent nile-elements following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "nile-elements",
6
- "version": "2.0.11",
6
+ "version": "2.0.13",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -405,8 +405,8 @@ describe('nile-side-bar in the shell track', () => {
405
405
  });
406
406
 
407
407
  /*
408
- * The HTML API, driven from markup. pageTitle, backLabel, noTabs, panelBack
409
- * and panelBackLabel deliberately declare no `attribute:` option, so Lit
408
+ * The HTML API, driven from markup. pageTitle, headerBack, headerBackLabel,
409
+ * noTabs, panelBack and panelBackLabel declare no kebab `attribute:` option, so Lit
410
410
  * observes the lowercased property name (pagetitle, notabs, ...) and markup
411
411
  * writes them camelCase — HTML lowercases `pageTitle=` to match.
412
412
  *
@@ -422,8 +422,8 @@ describe('nile-app-shell — the attributes the docs advertise', () => {
422
422
  <nile-app-shell
423
423
  style="width: 1440px; height: 600px;"
424
424
  pageTitle="Applications"
425
- backLabel="Integrations"
426
- leading="back"
425
+ headerBack
426
+ headerBackLabel="Integrations"
427
427
  noTabs
428
428
  panelBack
429
429
  panelBackLabel="Chat history"
@@ -440,7 +440,8 @@ describe('nile-app-shell — the attributes the docs advertise', () => {
440
440
 
441
441
  // Each attribute reached its property.
442
442
  expect(el.pageTitle, 'pageTitle').to.equal('Applications');
443
- expect(el.backLabel, 'backLabel').to.equal('Integrations');
443
+ expect(el.headerBack, 'headerBack').to.be.true;
444
+ expect(el.headerBackLabel, 'headerBackLabel').to.equal('Integrations');
444
445
  expect(el.noTabs, 'noTabs').to.be.true;
445
446
  expect(el.panelBack, 'panelBack').to.be.true;
446
447
  expect(el.panelBackLabel, 'panelBackLabel').to.equal('Chat history');
@@ -453,7 +454,10 @@ describe('nile-app-shell — the attributes the docs advertise', () => {
453
454
  // The reflecting pair round-trip to the lowercased name, not to kebab.
454
455
  expect(el.hasAttribute('notabs')).to.be.true;
455
456
  expect(el.hasAttribute('panelback')).to.be.true;
457
+ expect(el.hasAttribute('headerback')).to.be.true;
458
+ expect(el.getAttribute('headerbacklabel')).to.equal('Integrations');
456
459
  expect(el.hasAttribute('no-tabs')).to.be.false;
460
+ expect(el.hasAttribute('header-back')).to.be.false;
457
461
  el.noTabs = false;
458
462
  el.panelBack = false;
459
463
  await el.updateComplete;
@@ -227,21 +227,21 @@ export const styles = css`
227
227
  flex: 1 1 auto;
228
228
  }
229
229
 
230
- /* The title block: the header's own heading, the Leading axis and the badge; renders before the top-bar slot. */
230
+ /* 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. */
231
231
  .title-area {
232
232
  display: flex;
233
- /* Top-aligned, not centred: the leading element belongs to the title's row, not the title-plus-description stack. */
233
+ /* Top-aligned, not centred: the back arrow belongs to the title's row, not the title-plus-description stack. */
234
234
  align-items: flex-start;
235
- gap: var(--nile-spacing-md, var(--ng-spacing-md));
235
+ /* Figma's Title Area gap: 16px from the arrow to the stack. */
236
+ gap: var(--nile-spacing-xl, var(--ng-spacing-xl));
236
237
  min-width: 0;
237
238
  }
238
239
 
239
- /* The leading line box: exactly the page title's line height, centring whatever leading control sits in it. */
240
- .leading {
240
+ /* The back arrow's line box: exactly the page title's line height, centring the arrow on the title row. */
241
+ .back-line {
241
242
  flex: 0 0 auto;
242
243
  display: inline-flex;
243
244
  align-items: center;
244
- gap: var(--nile-spacing-md, var(--ng-spacing-md));
245
245
  min-height: var(--nile-line-height-medium, var(--ng-line-height-text-md));
246
246
  }
247
247
 
@@ -280,7 +280,7 @@ export const styles = css`
280
280
  font-size: var(--nile-type-scale-1, var(--ng-font-size-text-xs));
281
281
  line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-xs));
282
282
  font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
283
- color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));
283
+ color: var(--nile-colors-dark-500, var(--ng-colors-text-quaternary-500));
284
284
  white-space: nowrap;
285
285
  overflow: hidden;
286
286
  text-overflow: ellipsis;
@@ -314,36 +314,24 @@ export const styles = css`
314
314
  white-space: nowrap;
315
315
  }
316
316
 
317
- /* Leading=Back: drawn as a breadcrumb label; the shell owns no history, so pressing it only emits nile-header-back. */
317
+ /* 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' }. */
318
318
  .back {
319
319
  flex: 0 0 auto;
320
320
  display: inline-flex;
321
321
  align-items: center;
322
- gap: var(--nile-spacing-xs, var(--ng-spacing-xs));
323
322
  margin: 0;
324
323
  padding: 0;
325
324
  border: 0;
326
325
  background: none;
327
326
  cursor: pointer;
328
- font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
329
- font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));
330
- line-height: var(--nile-line-height-medium, var(--ng-line-height-text-md));
331
- font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));
332
- color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));
327
+ color: var(--nile-colors-dark-500, var(--ng-colors-fg-quaternary-400));
333
328
  }
334
329
 
335
330
  .back:hover {
336
331
  color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
337
332
  }
338
333
 
339
- .crumb-divider {
340
- flex: 0 0 auto;
341
- display: inline-flex;
342
- align-items: center;
343
- color: var(--nile-colors-dark-500, var(--ng-colors-fg-quaternary-400));
344
- }
345
-
346
- /* Leading=AppIcon: a 20px block before the title; the page slots the mark, the shell owns the box, surface and radius. */
334
+ /* 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. */
347
335
  .app-icon {
348
336
  position: relative;
349
337
  flex: 0 0 auto;
@@ -386,16 +374,15 @@ export const styles = css`
386
374
  padding: 1.4px;
387
375
  }
388
376
 
389
- :host(:not([leading='app-icon'])) .app-icon,
390
- :host(:not([leading='back'])) .back,
391
- :host(:not([leading='back'])) .crumb-divider {
377
+ :host(:not([has-app-icon])) .app-icon {
392
378
  display: none;
393
379
  }
394
380
 
381
+ /* Figma's Header Bar gap: 16px between every header action, the divider and Ask. */
395
382
  .top-bar-actions {
396
383
  display: flex;
397
384
  align-items: center;
398
- gap: var(--nile-spacing-md, var(--ng-spacing-md));
385
+ gap: var(--nile-spacing-xl, var(--ng-spacing-xl));
399
386
  margin-inline-start: auto;
400
387
  }
401
388
 
@@ -404,7 +391,7 @@ export const styles = css`
404
391
  display: none;
405
392
  }
406
393
 
407
- /* The Ask button: a stock <nile-button variant="primary"> the shell renders itself; the only rule here is its flex behaviour as a top-bar item. */
394
+ /* 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. */
408
395
  .ask {
409
396
  flex: 0 0 auto;
410
397
  }
@@ -421,10 +408,11 @@ export const styles = css`
421
408
  height: 16px;
422
409
  }
423
410
 
411
+ /* 10px after the 32px circle is 16px after the 20px glyph (6px overhang + 10), Figma's toggle-to-divider gap. */
424
412
  .nav-toggle-group {
425
413
  display: flex;
426
414
  align-items: center;
427
- gap: var(--nile-spacing-lg, var(--ng-spacing-lg));
415
+ gap: var(--nile-spacing-md-alt, var(--ng-spacing-md-alt));
428
416
  }
429
417
 
430
418
  /* Lands the 20px glyph box, not the 32px utility circle, on the 24px origin: (32 - 20) / 2 = 6. */
@@ -432,10 +420,12 @@ export const styles = css`
432
420
  margin-inline-start: -6px;
433
421
  }
434
422
 
423
+ /* 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. */
435
424
  .rule {
436
425
  flex: 0 0 auto;
437
426
  width: var(--nile-border-width-1, var(--ng-border-width-1));
438
- height: 24px;
427
+ margin-inline-end: calc(-1 * var(--nile-border-width-1, var(--ng-border-width-1)));
428
+ height: 16px;
439
429
  background: var(
440
430
  --nile-colors-neutral-400,
441
431
  var(--ng-colors-border-secondary)
@@ -488,6 +478,17 @@ export const styles = css`
488
478
  /* Scoped to the group, not the slot, so bare tab controls are not stretched to an equal share of the strip. */
489
479
  ::slotted(nile-nav-tab-group[slot='tabs']) {
490
480
  --track-width: 0px;
481
+ /*
482
+ * The active indicator (Figma: fg-brand-primary-alt) is NOT set here: the top placement hard-codes
483
+ * var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700)) inside nile-nav-tab-group's shadow tree, and
484
+ * remapping either token from here would also recolour nile-nav-tab's focus ring and focus label. Known limitation (spec A-7).
485
+ */
486
+ /*
487
+ * The inactive label: nile-nav-tab paints it var(--nile-colors-dark-500, var(--ng-colors-text-secondary-700)), so the strip
488
+ * points the NxtGen fallback at text-quaternary-500. Enterprise defines --nile-colors-dark-500 and is untouched. Inside an
489
+ * underline group nothing else reads text-secondary-700 (only the group's other variants and side placements do).
490
+ */
491
+ --ng-colors-text-secondary-700: var(--ng-colors-text-quaternary-500);
491
492
  flex: 1 1 auto;
492
493
  min-width: 0;
493
494
  align-self: flex-end;
@@ -654,7 +655,9 @@ export const styles = css`
654
655
 
655
656
  .panel-title {
656
657
  margin: 0;
657
- font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
658
+ /* 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. */
659
+ font-size: var(--nile-type-scale-3, var(--ng-font-size-text-lg));
660
+ line-height: var(--ng-line-height-text-lg);
658
661
  font-weight: var(
659
662
  --nile-font-weight-semi-bold,
660
663
  var(--ng-font-weight-semibold)