@ctrliq/quantic-components 1.62.1 → 1.63.0

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.
@@ -52539,15 +52539,18 @@
52539
52539
  }
52540
52540
  /**
52541
52541
  * Generates a unique ID with an optional prefix.
52542
- * Uses crypto.randomUUID() when available, falls back to Math.random().
52543
52542
  *
52544
52543
  * @param prefix Optional prefix for the generated ID
52545
52544
  * @returns A unique ID string
52546
52545
  */
52546
+ function randomUUID() {
52547
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
52548
+ const r = (Math.random() * 16) | 0;
52549
+ return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);
52550
+ });
52551
+ }
52547
52552
  function generateId(prefix) {
52548
- const id = typeof crypto !== 'undefined'
52549
- ? crypto.randomUUID()
52550
- : Math.random().toString(36).substring(2);
52553
+ const id = randomUUID();
52551
52554
  return prefix ? `${prefix}-${id}` : id;
52552
52555
  }
52553
52556
  /**
@@ -63973,9 +63976,7 @@
63973
63976
  this.disabled = false;
63974
63977
  this.offset = 8;
63975
63978
  this.open = false;
63976
- this.tooltipId = `tooltip-${typeof crypto !== 'undefined'
63977
- ? crypto.randomUUID()
63978
- : Math.random().toString(36)}`;
63979
+ this.tooltipId = generateId('tooltip');
63979
63980
  this.contentElements = [];
63980
63981
  this.handleMouseEnter = () => {
63981
63982
  if (this.disabled || this.open)
@@ -64461,36 +64462,42 @@
64461
64462
  aria-label=${this.ariaLabel}
64462
64463
  aria-expanded=${this.isAsideExpanded !== false ? 'true' : 'false'}
64463
64464
  >
64464
- <div class="body">
64465
- <slot @slotchange=${this.handleAutoHide}></slot>
64465
+ <div class="header">
64466
+ <slot name="header" @slotchange=${this.handleAutoHide}></slot>
64466
64467
  </div>
64467
64468
 
64468
- <div class="footer">
64469
- <slot name="footer" @slotchange=${this.handleAutoHide}></slot>
64470
- </div>
64469
+ <div class="scroll-area">
64470
+ <div class="body">
64471
+ <slot @slotchange=${this.handleAutoHide}></slot>
64472
+ </div>
64473
+
64474
+ <div class="footer">
64475
+ <slot name="footer" @slotchange=${this.handleAutoHide}></slot>
64476
+ </div>
64471
64477
 
64472
- ${this.isDesktopViewport && this.collapsible
64478
+ ${this.isDesktopViewport && this.collapsible
64473
64479
  ? u$2 `<div class="toggle-container">
64474
- <quantic-sidebar-menu-item
64475
- @click=${this.handleToggle}
64476
- title=${this.isAsideExpanded
64480
+ <quantic-sidebar-menu-item
64481
+ @click=${this.handleToggle}
64482
+ title=${this.isAsideExpanded
64477
64483
  ? 'Collapse sidebar'
64478
64484
  : 'Expand sidebar'}
64479
- label=${this.isAsideExpanded ? 'Collapse' : 'Expand sidebar'}
64480
- variant=${SidebarMenuItemVariant.Secondary}
64481
- >
64482
- ${this.isAsideExpanded
64485
+ label=${this.isAsideExpanded ? 'Collapse' : 'Expand sidebar'}
64486
+ variant=${SidebarMenuItemVariant.Secondary}
64487
+ >
64488
+ ${this.isAsideExpanded
64483
64489
  ? u$2 `<quantic-icon-lucide-panel-left-close
64484
- slot="icon"
64485
- size="sm"
64486
- ></quantic-icon-lucide-panel-left-close>`
64490
+ slot="icon"
64491
+ size="sm"
64492
+ ></quantic-icon-lucide-panel-left-close>`
64487
64493
  : u$2 `<quantic-icon-lucide-panel-left
64488
- slot="icon"
64489
- size="sm"
64490
- ></quantic-icon-lucide-panel-left>`}
64491
- </quantic-sidebar-menu-item>
64492
- </div>`
64494
+ slot="icon"
64495
+ size="sm"
64496
+ ></quantic-icon-lucide-panel-left>`}
64497
+ </quantic-sidebar-menu-item>
64498
+ </div>`
64493
64499
  : null}
64500
+ </div>
64494
64501
  </nav>
64495
64502
  `;
64496
64503
  }
@@ -64502,6 +64509,7 @@
64502
64509
  category: 'navigation',
64503
64510
  subComponents: ['quantic-sidebar-menu-item', 'quantic-sidebar-menu-item-group'],
64504
64511
  slots: {
64512
+ header: { description: 'Optional sticky header rendered above the scrollable content.' },
64505
64513
  '': { description: 'Primary nav items (quantic-sidebar-menu-item or quantic-sidebar-menu-item-group).' },
64506
64514
  footer: { description: 'Footer nav items pinned to the bottom of the sidebar.' },
64507
64515
  },
@@ -64517,6 +64525,24 @@
64517
64525
  flex-direction: column;
64518
64526
  height: 100%;
64519
64527
  flex: 1;
64528
+ box-sizing: border-box;
64529
+ overflow: hidden;
64530
+ }
64531
+
64532
+ .header {
64533
+ padding: var(--quantic-spacing-2);
64534
+ padding-bottom: 0;
64535
+ flex-shrink: 0;
64536
+ }
64537
+
64538
+ .header:has(slot[hidden]) {
64539
+ display: none;
64540
+ }
64541
+
64542
+ .scroll-area {
64543
+ flex: 1;
64544
+ display: flex;
64545
+ flex-direction: column;
64520
64546
  padding: var(--quantic-spacing-2);
64521
64547
  box-sizing: border-box;
64522
64548
  overflow-x: hidden;
@@ -64525,20 +64551,20 @@
64525
64551
  scrollbar-color: var(--quantic-border-secondary) transparent;
64526
64552
  }
64527
64553
 
64528
- .main::-webkit-scrollbar {
64554
+ .scroll-area::-webkit-scrollbar {
64529
64555
  width: 4px;
64530
64556
  }
64531
64557
 
64532
- .main::-webkit-scrollbar-track {
64558
+ .scroll-area::-webkit-scrollbar-track {
64533
64559
  background: transparent;
64534
64560
  }
64535
64561
 
64536
- .main::-webkit-scrollbar-thumb {
64562
+ .scroll-area::-webkit-scrollbar-thumb {
64537
64563
  background: var(--quantic-border-secondary);
64538
64564
  border-radius: var(--quantic-radius-full);
64539
64565
  }
64540
64566
 
64541
- .main:not(.is-aside-expanded) .main {
64567
+ .main:not(.is-aside-expanded) .scroll-area {
64542
64568
  padding: var(--quantic-spacing-1);
64543
64569
  }
64544
64570