@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.
- package/dist/index.js.map +1 -1
- package/dist/layout/index.stories.d.ts +1 -0
- package/dist/layout/index.stories.js +26 -0
- package/dist/layout/sidebar.component.js +50 -25
- package/dist/meta/index.js.map +1 -1
- package/dist/quantic-components.js +58 -32
- package/dist/quantic-components.js.map +1 -1
- package/dist/quantic-components.min.js +52 -28
- package/dist/quantic-components.min.js.map +1 -1
- package/dist/shared/shared.utils.d.ts +0 -7
- package/dist/shared/shared.utils.js +7 -4
- package/dist/tooltip/tooltip.js +2 -3
- package/dist/types/layout/index.stories.d.ts +1 -0
- package/dist/types/shared/shared.utils.d.ts +0 -7
- package/package.json +1 -1
|
@@ -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 =
|
|
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 =
|
|
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="
|
|
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="
|
|
64469
|
-
<
|
|
64470
|
-
|
|
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
|
-
|
|
64478
|
+
${this.isDesktopViewport && this.collapsible
|
|
64473
64479
|
? u$2 `<div class="toggle-container">
|
|
64474
|
-
|
|
64475
|
-
|
|
64476
|
-
|
|
64480
|
+
<quantic-sidebar-menu-item
|
|
64481
|
+
@click=${this.handleToggle}
|
|
64482
|
+
title=${this.isAsideExpanded
|
|
64477
64483
|
? 'Collapse sidebar'
|
|
64478
64484
|
: 'Expand sidebar'}
|
|
64479
|
-
|
|
64480
|
-
|
|
64481
|
-
|
|
64482
|
-
|
|
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
|
-
|
|
64485
|
-
|
|
64486
|
-
|
|
64490
|
+
slot="icon"
|
|
64491
|
+
size="sm"
|
|
64492
|
+
></quantic-icon-lucide-panel-left-close>`
|
|
64487
64493
|
: u$2 `<quantic-icon-lucide-panel-left
|
|
64488
|
-
|
|
64489
|
-
|
|
64490
|
-
|
|
64491
|
-
|
|
64492
|
-
|
|
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
|
-
.
|
|
64554
|
+
.scroll-area::-webkit-scrollbar {
|
|
64529
64555
|
width: 4px;
|
|
64530
64556
|
}
|
|
64531
64557
|
|
|
64532
|
-
.
|
|
64558
|
+
.scroll-area::-webkit-scrollbar-track {
|
|
64533
64559
|
background: transparent;
|
|
64534
64560
|
}
|
|
64535
64561
|
|
|
64536
|
-
.
|
|
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) .
|
|
64567
|
+
.main:not(.is-aside-expanded) .scroll-area {
|
|
64542
64568
|
padding: var(--quantic-spacing-1);
|
|
64543
64569
|
}
|
|
64544
64570
|
|