@crowdfarming/oliva-ds 1.29.0-rc.8 → 1.30.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.
|
@@ -3200,16 +3200,21 @@ class OverlayComponent {
|
|
|
3200
3200
|
destroyRef = inject(DestroyRef);
|
|
3201
3201
|
focusTrapFactory = inject(FocusTrapFactory);
|
|
3202
3202
|
router = inject(Router);
|
|
3203
|
+
// Portal and container management
|
|
3203
3204
|
triggerButtonRef;
|
|
3204
3205
|
portal;
|
|
3205
3206
|
portalOutlet;
|
|
3206
3207
|
portalContainer;
|
|
3207
|
-
|
|
3208
|
+
boundPortalClickHandler;
|
|
3209
|
+
// Focus and accessibility management
|
|
3208
3210
|
focusTrap;
|
|
3209
3211
|
previouslyFocusedElement;
|
|
3210
3212
|
triggerKeydownHandler;
|
|
3213
|
+
inertElements = [];
|
|
3214
|
+
escapeKeyHandler;
|
|
3215
|
+
// Scroll and navigation management
|
|
3216
|
+
originalBodyOverflow;
|
|
3211
3217
|
navigationSub;
|
|
3212
|
-
boundPortalClickHandler;
|
|
3213
3218
|
// Helper to get the correct document context (important for Storybook)
|
|
3214
3219
|
getDocument() {
|
|
3215
3220
|
return this.elementRef.nativeElement.ownerDocument || document;
|
|
@@ -3235,19 +3240,22 @@ class OverlayComponent {
|
|
|
3235
3240
|
this.destroyFocusTrap();
|
|
3236
3241
|
this.cleanupTriggerListener();
|
|
3237
3242
|
this.navigationSub?.unsubscribe();
|
|
3243
|
+
this.removeEscapeKeyListener();
|
|
3238
3244
|
});
|
|
3239
3245
|
}
|
|
3246
|
+
// ================== MOBILE DETECTION ==================
|
|
3240
3247
|
updateMobileDetection() {
|
|
3241
3248
|
this._isMobile.set(isPlatformBrowser(this.platformId)
|
|
3242
3249
|
? window.innerWidth <= OverlayComponent.MOBILE_BREAKPOINT
|
|
3243
3250
|
: false);
|
|
3244
3251
|
}
|
|
3252
|
+
// ================== TRIGGER MANAGEMENT ==================
|
|
3245
3253
|
setTriggerButton(element) {
|
|
3246
3254
|
this.triggerButtonRef = element;
|
|
3247
3255
|
this.triggerKeydownHandler = (event) => {
|
|
3248
|
-
if (event.key === '
|
|
3256
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
3249
3257
|
event.preventDefault();
|
|
3250
|
-
this.
|
|
3258
|
+
this.toggleOverlay();
|
|
3251
3259
|
}
|
|
3252
3260
|
};
|
|
3253
3261
|
element.addEventListener('keydown', this.triggerKeydownHandler);
|
|
@@ -3266,12 +3274,18 @@ class OverlayComponent {
|
|
|
3266
3274
|
onEscapeKey() {
|
|
3267
3275
|
this.closeOverlay();
|
|
3268
3276
|
}
|
|
3277
|
+
// ================== OVERLAY LIFECYCLE ==================
|
|
3269
3278
|
openOverlay() {
|
|
3270
3279
|
this.initializeOverlayState();
|
|
3271
3280
|
this.prepareOverlayForOpening();
|
|
3272
3281
|
this.createOverlayPortal();
|
|
3273
3282
|
this.configureScrollBehavior();
|
|
3274
3283
|
this.finalizeOverlayOpening();
|
|
3284
|
+
setTimeout(() => {
|
|
3285
|
+
this.trapFocus();
|
|
3286
|
+
this.makeOutsideElementsInert();
|
|
3287
|
+
this.setupEscapeKeyListener();
|
|
3288
|
+
}, 0);
|
|
3275
3289
|
}
|
|
3276
3290
|
initializeOverlayState() {
|
|
3277
3291
|
this._isClosing.set(false);
|
|
@@ -3295,13 +3309,16 @@ class OverlayComponent {
|
|
|
3295
3309
|
this._isOpen.set(true);
|
|
3296
3310
|
this.addResizeListener();
|
|
3297
3311
|
this.listenToNavigation();
|
|
3298
|
-
this.focusFirstElementInOverlay();
|
|
3299
3312
|
}
|
|
3300
3313
|
closeOverlay() {
|
|
3301
3314
|
this.initializeOverlayClosing();
|
|
3302
3315
|
this.cleanupOverlayResources();
|
|
3303
3316
|
this.restoreScrollBehavior();
|
|
3304
3317
|
this.destroyOverlayComponents();
|
|
3318
|
+
// Restore focus AFTER destroying DOM to avoid interference
|
|
3319
|
+
requestAnimationFrame(() => {
|
|
3320
|
+
this.restoreFocusToTrigger();
|
|
3321
|
+
});
|
|
3305
3322
|
this.scheduleOverlayFinalization();
|
|
3306
3323
|
}
|
|
3307
3324
|
initializeOverlayClosing() {
|
|
@@ -3323,6 +3340,8 @@ class OverlayComponent {
|
|
|
3323
3340
|
destroyOverlayComponents() {
|
|
3324
3341
|
this.destroyFocusTrap();
|
|
3325
3342
|
this.destroyPortal();
|
|
3343
|
+
// Ensure elements are restored after destroying components
|
|
3344
|
+
this.restoreOutsideElements();
|
|
3326
3345
|
}
|
|
3327
3346
|
scheduleOverlayFinalization() {
|
|
3328
3347
|
setTimeout(() => {
|
|
@@ -3332,50 +3351,8 @@ class OverlayComponent {
|
|
|
3332
3351
|
finalizeOverlayClosing() {
|
|
3333
3352
|
this._isOpen.set(false);
|
|
3334
3353
|
this._isClosing.set(false);
|
|
3335
|
-
this.restoreFocusToPreviousElement();
|
|
3336
|
-
}
|
|
3337
|
-
async restoreFocusToPreviousElement() {
|
|
3338
|
-
const doc = this.getDocument();
|
|
3339
|
-
const elementToFocus = this.triggerButtonRef ?? this.previouslyFocusedElement;
|
|
3340
|
-
if (!elementToFocus)
|
|
3341
|
-
return;
|
|
3342
|
-
await new Promise(requestAnimationFrame);
|
|
3343
|
-
if (doc.contains(elementToFocus)) {
|
|
3344
|
-
elementToFocus.focus({ preventScroll: true });
|
|
3345
|
-
}
|
|
3346
|
-
else {
|
|
3347
|
-
this.focusFirstFocusableElementInPage();
|
|
3348
|
-
}
|
|
3349
|
-
this.previouslyFocusedElement = undefined;
|
|
3350
|
-
}
|
|
3351
|
-
focusFirstFocusableElementInPage() {
|
|
3352
|
-
const focusableSelectors = [
|
|
3353
|
-
'button:not([disabled])',
|
|
3354
|
-
'input:not([disabled])',
|
|
3355
|
-
'select:not([disabled])',
|
|
3356
|
-
'textarea:not([disabled])',
|
|
3357
|
-
'a[href]',
|
|
3358
|
-
'[tabindex]:not([tabindex="-1"])'
|
|
3359
|
-
];
|
|
3360
|
-
const firstFocusable = this.getDocument().querySelector(focusableSelectors.join(', '));
|
|
3361
|
-
if (firstFocusable) {
|
|
3362
|
-
firstFocusable.focus();
|
|
3363
|
-
}
|
|
3364
|
-
}
|
|
3365
|
-
focusTriggerOrFirstElement() {
|
|
3366
|
-
if (this.triggerButtonRef) {
|
|
3367
|
-
this.triggerButtonRef.focus();
|
|
3368
|
-
return;
|
|
3369
|
-
}
|
|
3370
|
-
this.focusFirstFocusableElementInPage();
|
|
3371
|
-
}
|
|
3372
|
-
focusTriggerOrLastElement() {
|
|
3373
|
-
if (this.triggerButtonRef) {
|
|
3374
|
-
this.triggerButtonRef.focus();
|
|
3375
|
-
return;
|
|
3376
|
-
}
|
|
3377
|
-
this.focusLastElementInMainPage();
|
|
3378
3354
|
}
|
|
3355
|
+
// ================== EVENT HANDLING ==================
|
|
3379
3356
|
onPortalClick = (event) => {
|
|
3380
3357
|
if (!this.isOpen() || this.isClosing())
|
|
3381
3358
|
return;
|
|
@@ -3391,6 +3368,7 @@ class OverlayComponent {
|
|
|
3391
3368
|
}
|
|
3392
3369
|
this.closeOverlay();
|
|
3393
3370
|
};
|
|
3371
|
+
// ================== POSITIONING ==================
|
|
3394
3372
|
calculatePosition() {
|
|
3395
3373
|
if (!this.triggerButtonRef)
|
|
3396
3374
|
return;
|
|
@@ -3457,6 +3435,7 @@ class OverlayComponent {
|
|
|
3457
3435
|
const w = parseFloat(this.width());
|
|
3458
3436
|
return isNaN(w) ? OverlayComponent.DEFAULT_MENU_WIDTH : w;
|
|
3459
3437
|
}
|
|
3438
|
+
// ================== RESIZE HANDLING ==================
|
|
3460
3439
|
addResizeListener() {
|
|
3461
3440
|
if (!isPlatformBrowser(this.platformId))
|
|
3462
3441
|
return;
|
|
@@ -3484,6 +3463,7 @@ class OverlayComponent {
|
|
|
3484
3463
|
this.calculatePosition();
|
|
3485
3464
|
}
|
|
3486
3465
|
};
|
|
3466
|
+
// ================== PORTAL MANAGEMENT ==================
|
|
3487
3467
|
createPortal() {
|
|
3488
3468
|
if (!this.menuTemplate || !this.contentTemplate)
|
|
3489
3469
|
return;
|
|
@@ -3492,7 +3472,7 @@ class OverlayComponent {
|
|
|
3492
3472
|
this.setupPortalEventListeners();
|
|
3493
3473
|
this.createPortalOutlet();
|
|
3494
3474
|
this.attachPortalContent();
|
|
3495
|
-
|
|
3475
|
+
// Focus trap will be set up in openOverlay()
|
|
3496
3476
|
this.applyMenuPositioning();
|
|
3497
3477
|
}
|
|
3498
3478
|
createPortalTemplate() {
|
|
@@ -3530,9 +3510,6 @@ class OverlayComponent {
|
|
|
3530
3510
|
return;
|
|
3531
3511
|
this.portalOutlet.attach(this.portal);
|
|
3532
3512
|
}
|
|
3533
|
-
setupFocusTrap() {
|
|
3534
|
-
this.createFocusTrap();
|
|
3535
|
-
}
|
|
3536
3513
|
applyMenuPositioning() {
|
|
3537
3514
|
const menuEl = this.portalContainer?.querySelector('.c-overlay__menu');
|
|
3538
3515
|
if (!menuEl)
|
|
@@ -3580,6 +3557,7 @@ class OverlayComponent {
|
|
|
3580
3557
|
}
|
|
3581
3558
|
this.portalContainer = undefined;
|
|
3582
3559
|
}
|
|
3560
|
+
// ================== SCROLL MANAGEMENT ==================
|
|
3583
3561
|
blockBodyScroll() {
|
|
3584
3562
|
if (!isPlatformBrowser(this.platformId))
|
|
3585
3563
|
return;
|
|
@@ -3609,68 +3587,75 @@ class OverlayComponent {
|
|
|
3609
3587
|
}
|
|
3610
3588
|
this.originalBodyOverflow = undefined;
|
|
3611
3589
|
}
|
|
3612
|
-
|
|
3613
|
-
|
|
3590
|
+
// ================== FOCUS MANAGEMENT ==================
|
|
3591
|
+
trapFocus() {
|
|
3592
|
+
if (!this.portalContainer) {
|
|
3614
3593
|
return;
|
|
3615
|
-
const menuEl = this.portalContainer.querySelector('.c-overlay__menu');
|
|
3616
|
-
if (menuEl) {
|
|
3617
|
-
this.setupManualFocusManagement(menuEl);
|
|
3618
3594
|
}
|
|
3619
|
-
|
|
3620
|
-
setupManualFocusManagement(menuEl) {
|
|
3595
|
+
// Search for menu element in entire document, not just within portalContainer
|
|
3621
3596
|
const doc = this.getDocument();
|
|
3622
|
-
const
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3597
|
+
const menuEl = doc.querySelector('.c-overlay__menu');
|
|
3598
|
+
if (!menuEl) {
|
|
3599
|
+
setTimeout(() => this.trapFocus(), 10);
|
|
3600
|
+
return;
|
|
3601
|
+
}
|
|
3602
|
+
// CDK FocusTrap
|
|
3603
|
+
this.focusTrap = this.focusTrapFactory.create(menuEl);
|
|
3604
|
+
this.focusTrap.focusInitialElement();
|
|
3605
|
+
}
|
|
3606
|
+
// ================== ESCAPE KEY HANDLING ==================
|
|
3607
|
+
setupEscapeKeyListener() {
|
|
3608
|
+
if (!isPlatformBrowser(this.platformId))
|
|
3609
|
+
return;
|
|
3610
|
+
this.escapeKeyHandler = (event) => {
|
|
3611
|
+
if (event.key === 'Escape' && this.isOpen() && !this.isClosing()) {
|
|
3636
3612
|
event.preventDefault();
|
|
3637
3613
|
this.closeOverlay();
|
|
3638
|
-
this.focusTriggerOrLastElement();
|
|
3639
|
-
return;
|
|
3640
3614
|
}
|
|
3641
3615
|
};
|
|
3642
|
-
|
|
3643
|
-
menuEl._keydownHandler = keydownHandler;
|
|
3616
|
+
this.getDocument().addEventListener('keydown', this.escapeKeyHandler);
|
|
3644
3617
|
}
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
'[tabindex]:not([tabindex="-1"])'
|
|
3653
|
-
];
|
|
3654
|
-
return Array.from(container.querySelectorAll(focusableSelectors.join(', ')));
|
|
3618
|
+
removeEscapeKeyListener() {
|
|
3619
|
+
if (!isPlatformBrowser(this.platformId))
|
|
3620
|
+
return;
|
|
3621
|
+
if (this.escapeKeyHandler) {
|
|
3622
|
+
this.getDocument().removeEventListener('keydown', this.escapeKeyHandler);
|
|
3623
|
+
this.escapeKeyHandler = undefined;
|
|
3624
|
+
}
|
|
3655
3625
|
}
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3626
|
+
// ================== FOCUS RESTORATION ==================
|
|
3627
|
+
restoreFocusToTrigger() {
|
|
3628
|
+
const doc = this.getDocument();
|
|
3629
|
+
// Prefer to return focus to trigger button
|
|
3630
|
+
if (this.triggerButtonRef && doc.contains(this.triggerButtonRef)) {
|
|
3631
|
+
const focusableElement = this.findFocusableButton(this.triggerButtonRef);
|
|
3632
|
+
if (focusableElement) {
|
|
3633
|
+
focusableElement.focus({ preventScroll: true });
|
|
3634
|
+
return;
|
|
3635
|
+
}
|
|
3636
|
+
}
|
|
3637
|
+
// Si no hay trigger, devolvemos el foco al elemento que estaba activo antes
|
|
3638
|
+
if (this.previouslyFocusedElement && doc.contains(this.previouslyFocusedElement)) {
|
|
3639
|
+
const focusableElement = this.findFocusableButton(this.previouslyFocusedElement);
|
|
3640
|
+
if (focusableElement) {
|
|
3641
|
+
focusableElement.focus({ preventScroll: true });
|
|
3642
|
+
return;
|
|
3643
|
+
}
|
|
3671
3644
|
}
|
|
3645
|
+
// Safety fallback
|
|
3646
|
+
doc.body.focus();
|
|
3672
3647
|
}
|
|
3673
|
-
|
|
3648
|
+
findFocusableButton(element) {
|
|
3649
|
+
// If element is already a focusable button, return it
|
|
3650
|
+
if (element.tagName === 'BUTTON' && !element.hasAttribute('disabled')) {
|
|
3651
|
+
return element;
|
|
3652
|
+
}
|
|
3653
|
+
// If it's a lib-button or custom component, search for internal button
|
|
3654
|
+
const button = element.querySelector('button:not([disabled])');
|
|
3655
|
+
if (button) {
|
|
3656
|
+
return button;
|
|
3657
|
+
}
|
|
3658
|
+
// Search for any focusable element inside
|
|
3674
3659
|
const focusableSelectors = [
|
|
3675
3660
|
'button:not([disabled])',
|
|
3676
3661
|
'input:not([disabled])',
|
|
@@ -3679,52 +3664,41 @@ class OverlayComponent {
|
|
|
3679
3664
|
'a[href]',
|
|
3680
3665
|
'[tabindex]:not([tabindex="-1"])'
|
|
3681
3666
|
];
|
|
3682
|
-
const
|
|
3683
|
-
|
|
3684
|
-
return !this.portalContainer?.contains(el) && this.isElementVisible(el);
|
|
3685
|
-
});
|
|
3686
|
-
if (mainPageFocusable.length > 0) {
|
|
3687
|
-
mainPageFocusable[mainPageFocusable.length - 1].focus();
|
|
3688
|
-
}
|
|
3667
|
+
const focusable = element.querySelector(focusableSelectors.join(', '));
|
|
3668
|
+
return focusable;
|
|
3689
3669
|
}
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3670
|
+
releaseFocusTrap() {
|
|
3671
|
+
if (this.focusTrap) {
|
|
3672
|
+
this.focusTrap.destroy();
|
|
3673
|
+
this.focusTrap = undefined;
|
|
3674
|
+
}
|
|
3675
|
+
this.removeEscapeKeyListener();
|
|
3693
3676
|
}
|
|
3694
|
-
|
|
3695
|
-
|
|
3677
|
+
// ================== INERT OUTSIDE ELEMENTS ==================
|
|
3678
|
+
makeOutsideElementsInert() {
|
|
3679
|
+
if (!isPlatformBrowser(this.platformId))
|
|
3696
3680
|
return;
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3681
|
+
this.inertElements = [];
|
|
3682
|
+
const doc = this.getDocument();
|
|
3683
|
+
const bodyChildren = Array.from(doc.body.children);
|
|
3684
|
+
bodyChildren.forEach(el => {
|
|
3685
|
+
if (el !== this.portalContainer && !el.hasAttribute('aria-hidden')) {
|
|
3686
|
+
el.inert = true; // Hace que no sean focusables ni interactuables
|
|
3687
|
+
this.inertElements.push(el);
|
|
3702
3688
|
}
|
|
3703
|
-
}
|
|
3689
|
+
});
|
|
3704
3690
|
}
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
'[tabindex]:not([tabindex="-1"])',
|
|
3713
|
-
'[contenteditable="true"]'
|
|
3714
|
-
].join(', ');
|
|
3715
|
-
const focusableElements = container.querySelectorAll(focusableSelectors);
|
|
3716
|
-
return focusableElements.length > 0 ? focusableElements[0] : null;
|
|
3691
|
+
restoreOutsideElements() {
|
|
3692
|
+
if (!isPlatformBrowser(this.platformId))
|
|
3693
|
+
return;
|
|
3694
|
+
this.inertElements.forEach(el => {
|
|
3695
|
+
el.inert = false;
|
|
3696
|
+
});
|
|
3697
|
+
this.inertElements = [];
|
|
3717
3698
|
}
|
|
3718
3699
|
destroyFocusTrap() {
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
this.focusTrap = undefined;
|
|
3722
|
-
}
|
|
3723
|
-
const menuEl = this.portalContainer?.querySelector('.c-overlay__menu');
|
|
3724
|
-
if (menuEl && menuEl._keydownHandler) {
|
|
3725
|
-
menuEl.removeEventListener('keydown', menuEl._keydownHandler);
|
|
3726
|
-
delete menuEl._keydownHandler;
|
|
3727
|
-
}
|
|
3700
|
+
this.releaseFocusTrap();
|
|
3701
|
+
this.restoreOutsideElements();
|
|
3728
3702
|
}
|
|
3729
3703
|
cleanupTriggerListener() {
|
|
3730
3704
|
if (this.triggerButtonRef && this.triggerKeydownHandler) {
|
|
@@ -5328,11 +5302,11 @@ class ModalComponent {
|
|
|
5328
5302
|
}
|
|
5329
5303
|
}
|
|
5330
5304
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5331
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: ModalComponent, isStandalone: true, selector: "lib-modal", viewQueries: [{ propertyName: "modalContentRef", first: true, predicate: ["modalContent"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isModalOpen()) {\n<div class=\"c-modal\" [ngClass]=\"getClasses()\">\n <!-- Backdrop -->\n <div\n class=\"c-modal__backdrop\"\n [ngClass]=\"getBackdropClasses()\"\n (click)=\"onBackdropClick()\"\n (keydown.escape)=\"onEscapeKey()\"\n tabindex=\"0\"\n role=\"button\"\n aria-label=\"Close modal\"\n ></div>\n\n <!-- Modal Content -->\n <div\n class=\"c-modal__content\"\n [ngClass]=\"getContentClasses()\"\n (keydown.escape)=\"onEscapeKey()\"\n role=\"dialog\"\n tabindex=\"-1\"\n [attr.aria-labelledby]=\"getTitle() ? 'modal-title' : null\"\n [attr.aria-describedby]=\"getDescription() ? 'modal-description' : null\"\n >\n <!-- Header -->\n @if (getTitle() || getShowCloseButton()) {\n <div class=\"c-modal__content__header\">\n <div class=\"c-modal__content__header__left\">\n @if (getTitle()) {\n <p id=\"modal-title\" class=\"c-modal__content__header__title\">\n {{ getTitle() }}\n </p>\n }\n </div>\n @if (getShowCloseButton()) {\n <div class=\"c-modal__content__header__right\">\n <lib-button-icon\n iconName=\"x-regular\"\n size=\"sm\"\n variant=\"neutral\"\n (click)=\"onCloseButtonClick()\"\n aria-label=\"Close modal\"\n ></lib-button-icon>\n </div>\n }\n </div>\n }\n\n <!-- Description -->\n <div class=\"c-modal__content__body\">\n @if (getDescription()) {\n <div id=\"modal-description\" class=\"c-modal__content__body__description\">\n <p>{{ getDescription() }}</p>\n </div>\n }\n\n <!-- Body Content -->\n <div #modalContent class=\"c-modal__content__body__content\">\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- Footer with Buttons -->\n @if (getPrimaryButton() || getSecondaryButton()) {\n <div class=\"c-modal__content__footer\">\n @if (getSecondaryButton()) {\n <lib-button\n class=\"c-modal__content__footer__button secondary\"\n [text]=\"getSecondaryButton()!.text\"\n [variant]=\"getSecondaryButton()!.variant\"\n [disabled]=\"getSecondaryButton()!.disabled ?? false\"\n [loading]=\"getSecondaryButton()!.loading ?? false\"\n [fullWidth]=\"true\"\n (clicked)=\"onSecondaryButtonClick()\"\n ></lib-button>\n } @if (getPrimaryButton()) {\n <lib-button\n class=\"c-modal__content__footer__button primary\"\n [text]=\"getPrimaryButton()!.text\"\n [variant]=\"getPrimaryButton()!.variant\"\n [disabled]=\"getPrimaryButton()!.disabled ?? false\"\n [loading]=\"getPrimaryButton()!.loading ?? false\"\n [fullWidth]=\"true\"\n (clicked)=\"onPrimaryButtonClick()\"\n ></lib-button>\n }\n </div>\n }\n </div>\n</div>\n}\n", styles: [".c-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:
|
|
5305
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: ModalComponent, isStandalone: true, selector: "lib-modal", viewQueries: [{ propertyName: "modalContentRef", first: true, predicate: ["modalContent"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isModalOpen()) {\n<div class=\"c-modal\" [ngClass]=\"getClasses()\">\n <!-- Backdrop -->\n <div\n class=\"c-modal__backdrop\"\n [ngClass]=\"getBackdropClasses()\"\n (click)=\"onBackdropClick()\"\n (keydown.escape)=\"onEscapeKey()\"\n tabindex=\"0\"\n role=\"button\"\n aria-label=\"Close modal\"\n ></div>\n\n <!-- Modal Content -->\n <div\n class=\"c-modal__content\"\n [ngClass]=\"getContentClasses()\"\n (keydown.escape)=\"onEscapeKey()\"\n role=\"dialog\"\n tabindex=\"-1\"\n [attr.aria-labelledby]=\"getTitle() ? 'modal-title' : null\"\n [attr.aria-describedby]=\"getDescription() ? 'modal-description' : null\"\n >\n <!-- Header -->\n @if (getTitle() || getShowCloseButton()) {\n <div class=\"c-modal__content__header\">\n <div class=\"c-modal__content__header__left\">\n @if (getTitle()) {\n <p id=\"modal-title\" class=\"c-modal__content__header__title\">\n {{ getTitle() }}\n </p>\n }\n </div>\n @if (getShowCloseButton()) {\n <div class=\"c-modal__content__header__right\">\n <lib-button-icon\n iconName=\"x-regular\"\n size=\"sm\"\n variant=\"neutral\"\n (click)=\"onCloseButtonClick()\"\n aria-label=\"Close modal\"\n ></lib-button-icon>\n </div>\n }\n </div>\n }\n\n <!-- Description -->\n <div class=\"c-modal__content__body\">\n @if (getDescription()) {\n <div id=\"modal-description\" class=\"c-modal__content__body__description\">\n <p>{{ getDescription() }}</p>\n </div>\n }\n\n <!-- Body Content -->\n <div #modalContent class=\"c-modal__content__body__content\">\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- Footer with Buttons -->\n @if (getPrimaryButton() || getSecondaryButton()) {\n <div class=\"c-modal__content__footer\">\n @if (getSecondaryButton()) {\n <lib-button\n class=\"c-modal__content__footer__button secondary\"\n [text]=\"getSecondaryButton()!.text\"\n [variant]=\"getSecondaryButton()!.variant\"\n [disabled]=\"getSecondaryButton()!.disabled ?? false\"\n [loading]=\"getSecondaryButton()!.loading ?? false\"\n [fullWidth]=\"true\"\n (clicked)=\"onSecondaryButtonClick()\"\n ></lib-button>\n } @if (getPrimaryButton()) {\n <lib-button\n class=\"c-modal__content__footer__button primary\"\n [text]=\"getPrimaryButton()!.text\"\n [variant]=\"getPrimaryButton()!.variant\"\n [disabled]=\"getPrimaryButton()!.disabled ?? false\"\n [loading]=\"getPrimaryButton()!.loading ?? false\"\n [fullWidth]=\"true\"\n (clicked)=\"onPrimaryButtonClick()\"\n ></lib-button>\n }\n </div>\n }\n </div>\n</div>\n}\n", styles: [".c-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.c-modal--open{opacity:1;visibility:visible}.c-modal__content{background-color:var(--color-core-background-surface-floating);padding:var(--space-container-padding-sm) 0;box-shadow:var(--elevation-floating);border-radius:var(--size-border-radius-lg);overflow:hidden;display:flex;flex-direction:column;width:100%}.c-modal__content--open{transform:scale(1)}.c-modal__content--sm{max-width:416px}.c-modal__content--md{max-width:636px}.c-modal__content--lg{max-width:856px}.c-modal__content__header{display:flex;align-items:center;padding:0 var(--space-container-padding-sm) var(--space-container-padding-sm);gap:var(--space-container-gap-sm)}.c-modal__content__header__right{flex:1;display:flex;justify-content:flex-end}.c-modal__content__header__title{margin:0;font-family:var(--typography-label-lg-strong-family),sans-serif;font-weight:var(--typography-label-lg-strong-weight);font-size:var(--typography-label-lg-strong-size);line-height:var(--typography-label-lg-strong-line-height);letter-spacing:var(--typography-label-lg-strong-letter-spacing);color:var(--color-core-content-default)}.c-modal__content__body{display:flex;flex-direction:column;flex:1;gap:var(--space-container-gap-md);padding:0 var(--space-container-padding-sm)}.c-modal__content__body__description p{margin:0;color:var(--color-core-content-soft);font-family:var(--typography-body-md-family),sans-serif;font-weight:var(--typography-body-md-weight);font-size:var(--typography-body-md-size);line-height:var(--typography-body-md-line-height);letter-spacing:var(--typography-body-md-letter-spacing)}.c-modal__content__body__content{overflow-y:auto;margin:-2px;padding:2px}.c-modal__content--sm .c-modal__content__body__content{max-height:200px}.c-modal__content--md .c-modal__content__body__content{min-height:200px;max-height:600px}.c-modal__content--lg .c-modal__content__body__content{min-height:600px;max-height:800px}.c-modal__content__footer{display:flex;justify-content:flex-end;gap:var(--space-component-gap-md);padding:var(--space-container-padding-sm) var(--space-container-padding-sm) 0}@media (max-width: 768px){.c-modal__content__footer{flex-direction:column;gap:var(--space-component-gap-md)}}@media (max-width: 768px){.c-modal__content__footer__button{width:100%}}.c-modal__content__footer__button.primary{order:2}.c-modal__content__footer__button.secondary{order:1}.c-modal__backdrop{position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--color-effect-overlay);opacity:0;transition:opacity .2s ease-in-out}.c-modal__backdrop--open{opacity:1}@media (max-width: 768px){.c-modal{align-items:flex-end}.c-modal--sm .c-modal__content,.c-modal--md .c-modal__content{position:fixed;bottom:0;left:0;right:0;width:100%;max-width:none;transform:translateY(100%);transition:transform .3s ease-in-out;border-bottom-left-radius:0;border-bottom-right-radius:0}.c-modal--sm.c-modal--open .c-modal__content,.c-modal--md.c-modal--open .c-modal__content{transform:none;perspective:none;contain:none}.c-modal--lg{align-items:stretch}.c-modal--lg .c-modal__content{position:fixed;inset:0;width:100%;height:100%;max-width:none;border-radius:0;transform:scale(.95);transition:transform .3s ease-in-out}.c-modal--lg.c-modal--open .c-modal__content{transform:scale(1)}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["text", "ariaLabel", "disabled", "loading", "skeletonActive", "variant", "size", "loadingText", "fullWidth", "iconBefore", "iconAfter", "type"], outputs: ["clicked"] }, { kind: "component", type: ButtonIconComponent, selector: "lib-button-icon", inputs: ["ariaLabel", "variant", "size", "iconName", "disabled", "loading", "skeletonActive"], outputs: ["clicked"] }] });
|
|
5332
5306
|
}
|
|
5333
5307
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: ModalComponent, decorators: [{
|
|
5334
5308
|
type: Component,
|
|
5335
|
-
args: [{ selector: 'lib-modal', imports: [NgClass, ButtonComponent, ButtonIconComponent], template: "@if (isModalOpen()) {\n<div class=\"c-modal\" [ngClass]=\"getClasses()\">\n <!-- Backdrop -->\n <div\n class=\"c-modal__backdrop\"\n [ngClass]=\"getBackdropClasses()\"\n (click)=\"onBackdropClick()\"\n (keydown.escape)=\"onEscapeKey()\"\n tabindex=\"0\"\n role=\"button\"\n aria-label=\"Close modal\"\n ></div>\n\n <!-- Modal Content -->\n <div\n class=\"c-modal__content\"\n [ngClass]=\"getContentClasses()\"\n (keydown.escape)=\"onEscapeKey()\"\n role=\"dialog\"\n tabindex=\"-1\"\n [attr.aria-labelledby]=\"getTitle() ? 'modal-title' : null\"\n [attr.aria-describedby]=\"getDescription() ? 'modal-description' : null\"\n >\n <!-- Header -->\n @if (getTitle() || getShowCloseButton()) {\n <div class=\"c-modal__content__header\">\n <div class=\"c-modal__content__header__left\">\n @if (getTitle()) {\n <p id=\"modal-title\" class=\"c-modal__content__header__title\">\n {{ getTitle() }}\n </p>\n }\n </div>\n @if (getShowCloseButton()) {\n <div class=\"c-modal__content__header__right\">\n <lib-button-icon\n iconName=\"x-regular\"\n size=\"sm\"\n variant=\"neutral\"\n (click)=\"onCloseButtonClick()\"\n aria-label=\"Close modal\"\n ></lib-button-icon>\n </div>\n }\n </div>\n }\n\n <!-- Description -->\n <div class=\"c-modal__content__body\">\n @if (getDescription()) {\n <div id=\"modal-description\" class=\"c-modal__content__body__description\">\n <p>{{ getDescription() }}</p>\n </div>\n }\n\n <!-- Body Content -->\n <div #modalContent class=\"c-modal__content__body__content\">\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- Footer with Buttons -->\n @if (getPrimaryButton() || getSecondaryButton()) {\n <div class=\"c-modal__content__footer\">\n @if (getSecondaryButton()) {\n <lib-button\n class=\"c-modal__content__footer__button secondary\"\n [text]=\"getSecondaryButton()!.text\"\n [variant]=\"getSecondaryButton()!.variant\"\n [disabled]=\"getSecondaryButton()!.disabled ?? false\"\n [loading]=\"getSecondaryButton()!.loading ?? false\"\n [fullWidth]=\"true\"\n (clicked)=\"onSecondaryButtonClick()\"\n ></lib-button>\n } @if (getPrimaryButton()) {\n <lib-button\n class=\"c-modal__content__footer__button primary\"\n [text]=\"getPrimaryButton()!.text\"\n [variant]=\"getPrimaryButton()!.variant\"\n [disabled]=\"getPrimaryButton()!.disabled ?? false\"\n [loading]=\"getPrimaryButton()!.loading ?? false\"\n [fullWidth]=\"true\"\n (clicked)=\"onPrimaryButtonClick()\"\n ></lib-button>\n }\n </div>\n }\n </div>\n</div>\n}\n", styles: [".c-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:
|
|
5309
|
+
args: [{ selector: 'lib-modal', imports: [NgClass, ButtonComponent, ButtonIconComponent], template: "@if (isModalOpen()) {\n<div class=\"c-modal\" [ngClass]=\"getClasses()\">\n <!-- Backdrop -->\n <div\n class=\"c-modal__backdrop\"\n [ngClass]=\"getBackdropClasses()\"\n (click)=\"onBackdropClick()\"\n (keydown.escape)=\"onEscapeKey()\"\n tabindex=\"0\"\n role=\"button\"\n aria-label=\"Close modal\"\n ></div>\n\n <!-- Modal Content -->\n <div\n class=\"c-modal__content\"\n [ngClass]=\"getContentClasses()\"\n (keydown.escape)=\"onEscapeKey()\"\n role=\"dialog\"\n tabindex=\"-1\"\n [attr.aria-labelledby]=\"getTitle() ? 'modal-title' : null\"\n [attr.aria-describedby]=\"getDescription() ? 'modal-description' : null\"\n >\n <!-- Header -->\n @if (getTitle() || getShowCloseButton()) {\n <div class=\"c-modal__content__header\">\n <div class=\"c-modal__content__header__left\">\n @if (getTitle()) {\n <p id=\"modal-title\" class=\"c-modal__content__header__title\">\n {{ getTitle() }}\n </p>\n }\n </div>\n @if (getShowCloseButton()) {\n <div class=\"c-modal__content__header__right\">\n <lib-button-icon\n iconName=\"x-regular\"\n size=\"sm\"\n variant=\"neutral\"\n (click)=\"onCloseButtonClick()\"\n aria-label=\"Close modal\"\n ></lib-button-icon>\n </div>\n }\n </div>\n }\n\n <!-- Description -->\n <div class=\"c-modal__content__body\">\n @if (getDescription()) {\n <div id=\"modal-description\" class=\"c-modal__content__body__description\">\n <p>{{ getDescription() }}</p>\n </div>\n }\n\n <!-- Body Content -->\n <div #modalContent class=\"c-modal__content__body__content\">\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- Footer with Buttons -->\n @if (getPrimaryButton() || getSecondaryButton()) {\n <div class=\"c-modal__content__footer\">\n @if (getSecondaryButton()) {\n <lib-button\n class=\"c-modal__content__footer__button secondary\"\n [text]=\"getSecondaryButton()!.text\"\n [variant]=\"getSecondaryButton()!.variant\"\n [disabled]=\"getSecondaryButton()!.disabled ?? false\"\n [loading]=\"getSecondaryButton()!.loading ?? false\"\n [fullWidth]=\"true\"\n (clicked)=\"onSecondaryButtonClick()\"\n ></lib-button>\n } @if (getPrimaryButton()) {\n <lib-button\n class=\"c-modal__content__footer__button primary\"\n [text]=\"getPrimaryButton()!.text\"\n [variant]=\"getPrimaryButton()!.variant\"\n [disabled]=\"getPrimaryButton()!.disabled ?? false\"\n [loading]=\"getPrimaryButton()!.loading ?? false\"\n [fullWidth]=\"true\"\n (clicked)=\"onPrimaryButtonClick()\"\n ></lib-button>\n }\n </div>\n }\n </div>\n</div>\n}\n", styles: [".c-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.c-modal--open{opacity:1;visibility:visible}.c-modal__content{background-color:var(--color-core-background-surface-floating);padding:var(--space-container-padding-sm) 0;box-shadow:var(--elevation-floating);border-radius:var(--size-border-radius-lg);overflow:hidden;display:flex;flex-direction:column;width:100%}.c-modal__content--open{transform:scale(1)}.c-modal__content--sm{max-width:416px}.c-modal__content--md{max-width:636px}.c-modal__content--lg{max-width:856px}.c-modal__content__header{display:flex;align-items:center;padding:0 var(--space-container-padding-sm) var(--space-container-padding-sm);gap:var(--space-container-gap-sm)}.c-modal__content__header__right{flex:1;display:flex;justify-content:flex-end}.c-modal__content__header__title{margin:0;font-family:var(--typography-label-lg-strong-family),sans-serif;font-weight:var(--typography-label-lg-strong-weight);font-size:var(--typography-label-lg-strong-size);line-height:var(--typography-label-lg-strong-line-height);letter-spacing:var(--typography-label-lg-strong-letter-spacing);color:var(--color-core-content-default)}.c-modal__content__body{display:flex;flex-direction:column;flex:1;gap:var(--space-container-gap-md);padding:0 var(--space-container-padding-sm)}.c-modal__content__body__description p{margin:0;color:var(--color-core-content-soft);font-family:var(--typography-body-md-family),sans-serif;font-weight:var(--typography-body-md-weight);font-size:var(--typography-body-md-size);line-height:var(--typography-body-md-line-height);letter-spacing:var(--typography-body-md-letter-spacing)}.c-modal__content__body__content{overflow-y:auto;margin:-2px;padding:2px}.c-modal__content--sm .c-modal__content__body__content{max-height:200px}.c-modal__content--md .c-modal__content__body__content{min-height:200px;max-height:600px}.c-modal__content--lg .c-modal__content__body__content{min-height:600px;max-height:800px}.c-modal__content__footer{display:flex;justify-content:flex-end;gap:var(--space-component-gap-md);padding:var(--space-container-padding-sm) var(--space-container-padding-sm) 0}@media (max-width: 768px){.c-modal__content__footer{flex-direction:column;gap:var(--space-component-gap-md)}}@media (max-width: 768px){.c-modal__content__footer__button{width:100%}}.c-modal__content__footer__button.primary{order:2}.c-modal__content__footer__button.secondary{order:1}.c-modal__backdrop{position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--color-effect-overlay);opacity:0;transition:opacity .2s ease-in-out}.c-modal__backdrop--open{opacity:1}@media (max-width: 768px){.c-modal{align-items:flex-end}.c-modal--sm .c-modal__content,.c-modal--md .c-modal__content{position:fixed;bottom:0;left:0;right:0;width:100%;max-width:none;transform:translateY(100%);transition:transform .3s ease-in-out;border-bottom-left-radius:0;border-bottom-right-radius:0}.c-modal--sm.c-modal--open .c-modal__content,.c-modal--md.c-modal--open .c-modal__content{transform:none;perspective:none;contain:none}.c-modal--lg{align-items:stretch}.c-modal--lg .c-modal__content{position:fixed;inset:0;width:100%;height:100%;max-width:none;border-radius:0;transform:scale(.95);transition:transform .3s ease-in-out}.c-modal--lg.c-modal--open .c-modal__content{transform:scale(1)}}\n"] }]
|
|
5336
5310
|
}], ctorParameters: () => [] });
|
|
5337
5311
|
|
|
5338
5312
|
class ModalService {
|
|
@@ -7205,11 +7179,11 @@ class TileComponent {
|
|
|
7205
7179
|
return this.variant === 'neutral' && this.name ? this.name : null;
|
|
7206
7180
|
}
|
|
7207
7181
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7208
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: TileComponent, isStandalone: true, selector: "lib-tile", inputs: { variant: "variant", paddingSize: "paddingSize", title: "title", name: "name", selected: "selected", disabled: "disabled", isLoading: "isLoading" }, outputs: { selectedChange: "selectedChange" }, ngImport: i0, template: "<div\n class=\"c-tile\"\n [class.c-tile--selected]=\"selected\"\n [class.c-tile--neutral]=\"variant === 'neutral'\"\n [class.c-tile--disabled]=\"disabled\"\n [class.c-tile--padding-xs]=\"paddingSize === 'xs'\"\n [class.is-loading]=\"isLoading\"\n [attr.name]=\"tileName\"\n [tabindex]=\"variant === 'neutral' ? 0 : -1\"\n role=\"button\"\n (click)=\"onClick()\"\n (keyup.enter)=\"onClick()\"\n>\n <div class=\"c-tile__wrapper\">\n @if (isLoading) {\n <div class=\"c-tile__skeleton\">\n <span aria-hidden=\"true\"></span>\n </div>\n } @else {\n <p
|
|
7182
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: TileComponent, isStandalone: true, selector: "lib-tile", inputs: { variant: "variant", paddingSize: "paddingSize", title: "title", name: "name", selected: "selected", disabled: "disabled", isLoading: "isLoading" }, outputs: { selectedChange: "selectedChange" }, ngImport: i0, template: "<div\n class=\"c-tile\"\n [class.c-tile--selected]=\"selected\"\n [class.c-tile--neutral]=\"variant === 'neutral'\"\n [class.c-tile--disabled]=\"disabled\"\n [class.c-tile--padding-xs]=\"paddingSize === 'xs'\"\n [class.is-loading]=\"isLoading\"\n [attr.name]=\"tileName\"\n [tabindex]=\"variant === 'neutral' ? 0 : -1\"\n role=\"button\"\n (click)=\"onClick()\"\n (keyup.enter)=\"onClick()\"\n>\n @if (title) {\n <div class=\"c-tile__wrapper\">\n @if (isLoading) {\n <div class=\"c-tile__skeleton\">\n <span aria-hidden=\"true\"></span>\n </div>\n } @else {\n <p class=\"c-tile__title\">{{ title }}</p>\n }\n <lib-radio\n *ngIf=\"variant === 'radio'\"\n [name]=\"controlName\"\n label=\"\"\n [disabled]=\"disabled\"\n [value]=\"selected ? 'true' : ''\"\n [checked]=\"selected\"\n (click)=\"onRadioClick($event)\"\n class=\"c-tile__check\"\n ></lib-radio>\n <lib-checkbox\n *ngIf=\"variant === 'checkbox'\"\n [name]=\"controlName\"\n label=\"\"\n [disabled]=\"disabled\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n ></lib-checkbox>\n </div>\n }\n <div class=\"c-tile__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".c-tile{display:flex;padding:var(--space-component-padding-lg);flex-direction:column;align-items:flex-start;border-radius:var(--size-border-radius-md);border:var(--size-border-width-sm) solid var(--color-tile-border-default);background:var(--color-tile-background-default);cursor:pointer}.c-tile:has(.c-tile__content:not(:empty)){gap:var(--space-container-gap-sm)}.c-tile:hover{border:var(--size-border-width-sm) solid var(--color-tile-border-hover);background:var(--color-tile-background-hover)}.c-tile--padding-xs{padding:4px}.c-tile--disabled{border:var(--size-border-width-sm) solid var(--color-tile-border-disabled);background:var(--color-tile-background-disabled);cursor:not-allowed}.c-tile--disabled:hover,.c-tile--disabled.c-tile--selected,.c-tile--disabled.c-tile--selected:hover{border:var(--size-border-width-sm) solid var(--color-tile-border-disabled);background:var(--color-tile-background-disabled)}.c-tile__wrapper{display:flex;gap:var(--space-component-gap-sm);width:100%;height:100%;align-items:center;justify-content:space-between}.c-tile__content{width:100%}.c-tile--selected,.c-tile--selected:hover{border:var(--size-border-width-sm, 1px) solid var(--color-tile-checked-border-default, #217870);background:var(--color-tile-checked-background-default, #edfdfa)}.c-tile:focus-visible{box-shadow:var(--focus-outset);outline:none}.c-tile__title{flex-grow:1;margin:0;color:var(--color-tile-content-default);font-family:var(--typography-label-md-strong-family);font-size:var(--typography-label-md-strong-size);font-style:normal;font-weight:var(--typography-label-md-strong-weight);line-height:var(--typography-label-md-strong-line-height);letter-spacing:var(--typography-label-md-strong-letter-spacing)}.c-tile--disabled .c-tile__title{color:var(--color-tile-content-disabled)}.c-tile.is-loading .c-tile__skeleton{flex-grow:1;display:flex;align-items:center;max-width:70px}.c-tile.is-loading .c-tile__skeleton span{display:block;width:100%;height:8px;background:var(--color-effect-skeleton-strong);border-radius:var(--size-border-radius-sm)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: RadioComponent, selector: "lib-radio", inputs: ["name", "label", "value", "disabled", "checked", "error", "isLoading", "id"], outputs: ["optionSelected"] }, { kind: "component", type: CheckboxComponent, selector: "lib-checkbox", inputs: ["label", "state", "errorActive", "skeletonActive", "disabled", "name", "value", "innerHTML", "ariaLabel"], outputs: ["changed"] }] });
|
|
7209
7183
|
}
|
|
7210
7184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TileComponent, decorators: [{
|
|
7211
7185
|
type: Component,
|
|
7212
|
-
args: [{ selector: 'lib-tile', imports: [CommonModule, RadioComponent, CheckboxComponent], template: "<div\n class=\"c-tile\"\n [class.c-tile--selected]=\"selected\"\n [class.c-tile--neutral]=\"variant === 'neutral'\"\n [class.c-tile--disabled]=\"disabled\"\n [class.c-tile--padding-xs]=\"paddingSize === 'xs'\"\n [class.is-loading]=\"isLoading\"\n [attr.name]=\"tileName\"\n [tabindex]=\"variant === 'neutral' ? 0 : -1\"\n role=\"button\"\n (click)=\"onClick()\"\n (keyup.enter)=\"onClick()\"\n>\n <div class=\"c-tile__wrapper\">\n @if (isLoading) {\n <div class=\"c-tile__skeleton\">\n <span aria-hidden=\"true\"></span>\n </div>\n } @else {\n <p
|
|
7186
|
+
args: [{ selector: 'lib-tile', imports: [CommonModule, RadioComponent, CheckboxComponent], template: "<div\n class=\"c-tile\"\n [class.c-tile--selected]=\"selected\"\n [class.c-tile--neutral]=\"variant === 'neutral'\"\n [class.c-tile--disabled]=\"disabled\"\n [class.c-tile--padding-xs]=\"paddingSize === 'xs'\"\n [class.is-loading]=\"isLoading\"\n [attr.name]=\"tileName\"\n [tabindex]=\"variant === 'neutral' ? 0 : -1\"\n role=\"button\"\n (click)=\"onClick()\"\n (keyup.enter)=\"onClick()\"\n>\n @if (title) {\n <div class=\"c-tile__wrapper\">\n @if (isLoading) {\n <div class=\"c-tile__skeleton\">\n <span aria-hidden=\"true\"></span>\n </div>\n } @else {\n <p class=\"c-tile__title\">{{ title }}</p>\n }\n <lib-radio\n *ngIf=\"variant === 'radio'\"\n [name]=\"controlName\"\n label=\"\"\n [disabled]=\"disabled\"\n [value]=\"selected ? 'true' : ''\"\n [checked]=\"selected\"\n (click)=\"onRadioClick($event)\"\n class=\"c-tile__check\"\n ></lib-radio>\n <lib-checkbox\n *ngIf=\"variant === 'checkbox'\"\n [name]=\"controlName\"\n label=\"\"\n [disabled]=\"disabled\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n ></lib-checkbox>\n </div>\n }\n <div class=\"c-tile__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".c-tile{display:flex;padding:var(--space-component-padding-lg);flex-direction:column;align-items:flex-start;border-radius:var(--size-border-radius-md);border:var(--size-border-width-sm) solid var(--color-tile-border-default);background:var(--color-tile-background-default);cursor:pointer}.c-tile:has(.c-tile__content:not(:empty)){gap:var(--space-container-gap-sm)}.c-tile:hover{border:var(--size-border-width-sm) solid var(--color-tile-border-hover);background:var(--color-tile-background-hover)}.c-tile--padding-xs{padding:4px}.c-tile--disabled{border:var(--size-border-width-sm) solid var(--color-tile-border-disabled);background:var(--color-tile-background-disabled);cursor:not-allowed}.c-tile--disabled:hover,.c-tile--disabled.c-tile--selected,.c-tile--disabled.c-tile--selected:hover{border:var(--size-border-width-sm) solid var(--color-tile-border-disabled);background:var(--color-tile-background-disabled)}.c-tile__wrapper{display:flex;gap:var(--space-component-gap-sm);width:100%;height:100%;align-items:center;justify-content:space-between}.c-tile__content{width:100%}.c-tile--selected,.c-tile--selected:hover{border:var(--size-border-width-sm, 1px) solid var(--color-tile-checked-border-default, #217870);background:var(--color-tile-checked-background-default, #edfdfa)}.c-tile:focus-visible{box-shadow:var(--focus-outset);outline:none}.c-tile__title{flex-grow:1;margin:0;color:var(--color-tile-content-default);font-family:var(--typography-label-md-strong-family);font-size:var(--typography-label-md-strong-size);font-style:normal;font-weight:var(--typography-label-md-strong-weight);line-height:var(--typography-label-md-strong-line-height);letter-spacing:var(--typography-label-md-strong-letter-spacing)}.c-tile--disabled .c-tile__title{color:var(--color-tile-content-disabled)}.c-tile.is-loading .c-tile__skeleton{flex-grow:1;display:flex;align-items:center;max-width:70px}.c-tile.is-loading .c-tile__skeleton span{display:block;width:100%;height:8px;background:var(--color-effect-skeleton-strong);border-radius:var(--size-border-radius-sm)}\n"] }]
|
|
7213
7187
|
}], propDecorators: { variant: [{
|
|
7214
7188
|
type: Input
|
|
7215
7189
|
}], paddingSize: [{
|