@ziadshalaby/ngx-zs-component 2.0.8 → 2.0.9
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/fesm2022/ziadshalaby-ngx-zs-component.mjs +456 -161
- package/fesm2022/ziadshalaby-ngx-zs-component.mjs.map +1 -1
- package/index.d.ts +131 -20
- package/output.css +345 -42
- package/package.json +1 -1
|
@@ -379,152 +379,424 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
379
379
|
args: [{ selector: 'ZS-nav-item', imports: [CommonModule, RouterModule], template: "<!-- ========================= Conditional Rendering ========================= -->\n@if (item()) {\n @if (item().children?.length) {\n\n <!-- ========================= Parent Item with Dropdown ========================= -->\n <div class=\"zs:relative zs:w-full\">\n\n <!-- ========================= Main Toggle Button ========================= -->\n <button\n type=\"button\"\n (click)=\"toggle()\"\n [ngClass]=\"getItemClasses(item())\"\n class=\"zs:flex zs:w-full zs:items-center zs:gap-2 zs:rounded-md zs:px-3 zs:py-2 zs:text-left \n zs:text-sm zs:font-medium zs:md:text-base\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"'submenu-' + index()\"\n >\n <div class=\"zs:flex zs:items-center\">\n @if (item().icon) {\n <i [ngClass]=\"[\n item().icon, \n item().iconClass ?? '',\n (item().icon && item().label) ? 'zs:mr-2' : ''\n ]\" aria-hidden=\"true\"></i>\n }\n <span class=\"zs:wrap-break-word\" [ngClass]=\"labelLineClass(item())\">{{ item().label }}</span>\n </div>\n <i class=\"fas fa-chevron-down zs:ml-auto zs:p-0.5 zs:text-xs\" aria-hidden=\"true\"></i>\n </button>\n\n <!-- ========================= Dropdown Menu ========================= -->\n <div\n [id]=\"'submenu-' + index()\"\n [ngClass]=\"{\n 'zs:block': isOpen(),\n 'zs:hidden': !isOpen(),\n 'zs:absolute zs:left-6 zs:w-50 zs:mt-1 zs:py-1 zs:bg-white zs:dark:bg-gray-800 \n zs:rounded-md shadow-md-all shadow-md-all-night': item().childrenOpenWindow,\n 'zs:px-4 zs:mt-1': !item().childrenOpenWindow\n }\"\n class=\"{{ zIndices.navItemDropdown }}\"\n role=\"menu\"\n [attr.aria-label]=\"item().label + ' submenu'\"\n >\n @for (child of item().children; track $index) {\n <ZS-nav-item\n [item]=\"child\"\n [collectionName]=\"collectionName() + '-' + index()\"\n (anyItemClickedEv)=\"handleChildClick($event)\"\n role=\"menuitem\"\n ></ZS-nav-item>\n }\n </div>\n\n </div>\n\n } @else {\n\n <!-- ========================= Leaf Item (No Children) ========================= -->\n <a\n [routerLink]=\"item().routerLink\"\n [routerLinkActive]=\"item().routerLinkActive ?? ''\"\n #rla=\"routerLinkActive\"\n [ngClass]=\"rla.isActive ? '' : getItemClasses(item())\"\n class=\"zs:flex zs:items-center zs:rounded-md zs:px-3 zs:py-2 \n zs:text-sm zs:font-medium zs:md:text-base\"\n (click)=\"onItemClick()\"\n role=\"menuitem\"\n >\n @if (item().icon) {\n <i [ngClass]=\"[\n item().icon,\n rla.isActive ? '' : item().iconClass ?? '',\n (item().icon && item().label) ? 'zs:mr-2' : ''\n ]\"\n aria-hidden=\"true\"></i>\n }\n <span class=\"zs:wrap-break-word zs:line-clamp-3\" [ngClass]=\"labelLineClass(item())\">{{ item().label }}</span>\n </a>\n }\n}" }]
|
|
380
380
|
}], ctorParameters: () => [], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], collectionName: [{ type: i0.Input, args: [{ isSignal: true, alias: "collectionName", required: true }] }], anyItemClickedEv: [{ type: i0.Output, args: ["anyItemClickedEv"] }] } });
|
|
381
381
|
|
|
382
|
-
|
|
382
|
+
// Unified palette map with all configurations
|
|
383
|
+
const unifiedPaletteMap = new Map([
|
|
383
384
|
[
|
|
384
385
|
'secondary',
|
|
385
386
|
{
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
387
|
+
input: {
|
|
388
|
+
border: 'zs:border-slate-300 zs:dark:border-slate-600',
|
|
389
|
+
borderHover: 'zs:hover:border-slate-500 zs:dark:hover:border-slate-400',
|
|
390
|
+
inputBg: 'zs:bg-slate-50 zs:dark:bg-slate-900',
|
|
391
|
+
text: 'zs:text-slate-800 zs:dark:text-slate-300',
|
|
392
|
+
},
|
|
393
|
+
ring: {
|
|
394
|
+
ring: 'zs:focus-within:ring-slate-400 zs:dark:focus-within:ring-slate-600',
|
|
395
|
+
},
|
|
396
|
+
buttonSolid: {
|
|
397
|
+
btnBG: 'zs:bg-slate-500 zs:dark:bg-slate-700',
|
|
398
|
+
btnBGHover: 'zs:hover:bg-slate-600',
|
|
399
|
+
},
|
|
400
|
+
buttonOutline: {
|
|
401
|
+
border: 'zs:border-slate-500 zs:dark:border-slate-500',
|
|
402
|
+
btnBGHover: 'zs:hover:bg-slate-600 zs:dark:hover:bg-slate-600',
|
|
403
|
+
text: 'zs:text-slate-500 zs:dark:text-slate-500'
|
|
404
|
+
},
|
|
405
|
+
select: {
|
|
406
|
+
bgSelect: 'zs:bg-slate-200 zs:dark:bg-slate-800',
|
|
407
|
+
cleartext: 'zs:text-slate-700 zs:dark:text-slate-500',
|
|
408
|
+
cleartexthover: 'zs:hover:text-slate-500 zs:dark:hover:text-slate-300',
|
|
409
|
+
},
|
|
410
|
+
checkbox: {
|
|
411
|
+
checkBoxText: 'zs:text-slate-500 zs:dark:text-slate-700',
|
|
412
|
+
checkBoxTextHover: 'zs:hover:text-slate-600',
|
|
413
|
+
},
|
|
414
|
+
card: {
|
|
415
|
+
border: 'zs:border-slate-300 zs:dark:border-slate-700',
|
|
416
|
+
borderHover: 'zs:hover:border-slate-600 zs:dark:hover:border-slate-500',
|
|
417
|
+
},
|
|
418
|
+
modal: {
|
|
419
|
+
border: 'zs:border-slate-300 zs:dark:border-slate-600',
|
|
420
|
+
text: 'zs:text-slate-800 zs:dark:text-slate-300',
|
|
421
|
+
},
|
|
422
|
+
page404: {
|
|
423
|
+
btnBG: 'zs:bg-slate-500 zs:dark:bg-slate-700',
|
|
424
|
+
btnBGHover: 'zs:hover:bg-slate-600',
|
|
425
|
+
iconText: 'zs:text-slate-500 zs:dark:text-slate-700',
|
|
426
|
+
},
|
|
397
427
|
},
|
|
398
428
|
],
|
|
399
429
|
[
|
|
400
430
|
'primary',
|
|
401
431
|
{
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
432
|
+
input: {
|
|
433
|
+
border: 'zs:border-blue-200 zs:dark:border-blue-700',
|
|
434
|
+
borderHover: 'zs:hover:border-blue-400 zs:dark:hover:border-blue-500',
|
|
435
|
+
inputBg: 'zs:bg-white zs:dark:bg-slate-900',
|
|
436
|
+
text: 'zs:text-blue-900 zs:dark:text-blue-100',
|
|
437
|
+
},
|
|
438
|
+
ring: {
|
|
439
|
+
ring: 'zs:focus-within:ring-blue-400 zs:dark:focus-within:ring-blue-500',
|
|
440
|
+
},
|
|
441
|
+
buttonSolid: {
|
|
442
|
+
btnBG: 'zs:bg-blue-500 zs:dark:bg-blue-700',
|
|
443
|
+
btnBGHover: 'zs:hover:bg-blue-600',
|
|
444
|
+
},
|
|
445
|
+
buttonOutline: {
|
|
446
|
+
border: 'zs:border-blue-500 zs:dark:border-blue-600',
|
|
447
|
+
btnBGHover: 'zs:hover:bg-blue-600',
|
|
448
|
+
text: 'zs:text-blue-500 zs:dark:text-blue-500'
|
|
449
|
+
},
|
|
450
|
+
select: {
|
|
451
|
+
bgSelect: 'zs:bg-blue-200 zs:dark:bg-blue-800',
|
|
452
|
+
cleartext: 'zs:text-blue-800 zs:dark:text-blue-500',
|
|
453
|
+
cleartexthover: 'zs:hover:text-blue-600 zs:dark:hover:text-blue-300',
|
|
454
|
+
},
|
|
455
|
+
checkbox: {
|
|
456
|
+
checkBoxText: 'zs:text-blue-500 zs:dark:text-blue-700',
|
|
457
|
+
checkBoxTextHover: 'zs:hover:text-blue-600',
|
|
458
|
+
},
|
|
459
|
+
card: {
|
|
460
|
+
border: 'zs:border-blue-300 zs:dark:border-blue-700',
|
|
461
|
+
borderHover: 'zs:hover:border-blue-600 zs:dark:hover:border-blue-500',
|
|
462
|
+
},
|
|
463
|
+
modal: {
|
|
464
|
+
border: 'zs:border-blue-200 zs:dark:border-blue-700',
|
|
465
|
+
text: 'zs:text-blue-900 zs:dark:text-blue-100',
|
|
466
|
+
},
|
|
467
|
+
page404: {
|
|
468
|
+
btnBG: 'zs:bg-blue-500 zs:dark:bg-blue-700',
|
|
469
|
+
btnBGHover: 'zs:hover:bg-blue-600',
|
|
470
|
+
iconText: 'zs:text-blue-500 zs:dark:text-blue-700',
|
|
471
|
+
},
|
|
413
472
|
},
|
|
414
473
|
],
|
|
415
474
|
[
|
|
416
475
|
'success',
|
|
417
476
|
{
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
477
|
+
input: {
|
|
478
|
+
border: 'zs:border-green-300 zs:dark:border-green-600',
|
|
479
|
+
borderHover: 'zs:hover:border-green-500 zs:dark:hover:border-green-400',
|
|
480
|
+
inputBg: 'zs:bg-white zs:dark:bg-slate-900',
|
|
481
|
+
text: 'zs:text-green-800 zs:dark:text-green-300',
|
|
482
|
+
},
|
|
483
|
+
ring: {
|
|
484
|
+
ring: 'zs:focus-within:ring-green-400 zs:dark:focus-within:ring-green-600',
|
|
485
|
+
},
|
|
486
|
+
buttonSolid: {
|
|
487
|
+
btnBG: 'zs:bg-green-500 zs:dark:bg-green-700',
|
|
488
|
+
btnBGHover: 'zs:hover:bg-green-600',
|
|
489
|
+
},
|
|
490
|
+
buttonOutline: {
|
|
491
|
+
border: 'zs:border-green-500 zs:dark:border-green-600',
|
|
492
|
+
btnBGHover: 'zs:hover:bg-green-600',
|
|
493
|
+
text: 'zs:text-green-500 zs:dark:text-green-600'
|
|
494
|
+
},
|
|
495
|
+
select: {
|
|
496
|
+
bgSelect: 'zs:bg-green-200 zs:dark:bg-green-800',
|
|
497
|
+
cleartext: 'zs:text-green-800 zs:dark:text-green-500',
|
|
498
|
+
cleartexthover: 'zs:hover:text-green-600 zs:dark:hover:text-green-300',
|
|
499
|
+
},
|
|
500
|
+
checkbox: {
|
|
501
|
+
checkBoxText: 'zs:text-green-500 zs:dark:text-green-700',
|
|
502
|
+
checkBoxTextHover: 'zs:hover:text-green-600',
|
|
503
|
+
},
|
|
504
|
+
card: {
|
|
505
|
+
border: 'zs:border-green-300 zs:dark:border-green-700',
|
|
506
|
+
borderHover: 'zs:hover:border-green-600 zs:dark:hover:border-green-500',
|
|
507
|
+
},
|
|
508
|
+
modal: {
|
|
509
|
+
border: 'zs:border-green-300 zs:dark:border-green-600',
|
|
510
|
+
text: 'zs:text-green-800 zs:dark:text-green-300',
|
|
511
|
+
},
|
|
512
|
+
page404: {
|
|
513
|
+
btnBG: 'zs:bg-green-500 zs:dark:bg-green-700',
|
|
514
|
+
btnBGHover: 'zs:hover:bg-green-600',
|
|
515
|
+
iconText: 'zs:text-green-500 zs:dark:text-green-700',
|
|
516
|
+
},
|
|
429
517
|
},
|
|
430
518
|
],
|
|
431
519
|
[
|
|
432
520
|
'danger',
|
|
433
521
|
{
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
522
|
+
input: {
|
|
523
|
+
border: 'zs:border-red-300 zs:dark:border-red-600',
|
|
524
|
+
borderHover: 'zs:hover:border-red-500 zs:dark:hover:border-red-400',
|
|
525
|
+
inputBg: 'zs:bg-white zs:dark:bg-slate-900',
|
|
526
|
+
text: 'zs:text-red-800 zs:dark:text-red-300',
|
|
527
|
+
},
|
|
528
|
+
ring: {
|
|
529
|
+
ring: 'zs:focus-within:ring-red-400 zs:dark:focus-within:ring-red-600',
|
|
530
|
+
},
|
|
531
|
+
buttonSolid: {
|
|
532
|
+
btnBG: 'zs:bg-red-500 zs:dark:bg-red-700',
|
|
533
|
+
btnBGHover: 'zs:hover:bg-red-600',
|
|
534
|
+
},
|
|
535
|
+
buttonOutline: {
|
|
536
|
+
border: 'zs:border-red-500 zs:dark:border-red-600',
|
|
537
|
+
btnBGHover: 'zs:hover:bg-red-600',
|
|
538
|
+
text: 'zs:text-red-500 zs:dark:text-red-600'
|
|
539
|
+
},
|
|
540
|
+
select: {
|
|
541
|
+
bgSelect: 'zs:bg-red-200 zs:dark:bg-red-800',
|
|
542
|
+
cleartext: 'zs:text-red-800 zs:dark:text-red-500',
|
|
543
|
+
cleartexthover: 'zs:hover:text-red-600 zs:dark:hover:text-red-300',
|
|
544
|
+
},
|
|
545
|
+
checkbox: {
|
|
546
|
+
checkBoxText: 'zs:text-red-500 zs:dark:text-red-700',
|
|
547
|
+
checkBoxTextHover: 'zs:hover:text-red-600',
|
|
548
|
+
},
|
|
549
|
+
card: {
|
|
550
|
+
border: 'zs:border-red-300 zs:dark:border-red-700',
|
|
551
|
+
borderHover: 'zs:hover:border-red-600 zs:dark:hover:border-red-500',
|
|
552
|
+
},
|
|
553
|
+
modal: {
|
|
554
|
+
border: 'zs:border-red-300 zs:dark:border-red-600',
|
|
555
|
+
text: 'zs:text-red-800 zs:dark:text-red-300',
|
|
556
|
+
},
|
|
557
|
+
page404: {
|
|
558
|
+
btnBG: 'zs:bg-red-500 zs:dark:bg-red-700',
|
|
559
|
+
btnBGHover: 'zs:hover:bg-red-600',
|
|
560
|
+
iconText: 'zs:text-red-500 zs:dark:text-red-700',
|
|
561
|
+
},
|
|
445
562
|
},
|
|
446
563
|
],
|
|
447
564
|
[
|
|
448
565
|
'warning',
|
|
449
566
|
{
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
567
|
+
input: {
|
|
568
|
+
border: 'zs:border-yellow-300 zs:dark:border-yellow-600',
|
|
569
|
+
borderHover: 'zs:hover:border-yellow-500 zs:dark:hover:border-yellow-400',
|
|
570
|
+
inputBg: 'zs:bg-white zs:dark:bg-slate-900',
|
|
571
|
+
text: 'zs:text-amber-800 zs:dark:text-amber-300',
|
|
572
|
+
},
|
|
573
|
+
ring: {
|
|
574
|
+
ring: 'zs:focus-within:ring-yellow-400 zs:dark:focus-within:ring-yellow-600',
|
|
575
|
+
},
|
|
576
|
+
buttonSolid: {
|
|
577
|
+
btnBG: 'zs:bg-amber-500 zs:dark:bg-amber-700',
|
|
578
|
+
btnBGHover: 'zs:hover:bg-amber-600',
|
|
579
|
+
},
|
|
580
|
+
buttonOutline: {
|
|
581
|
+
border: 'zs:border-amber-500 zs:dark:border-amber-600',
|
|
582
|
+
btnBGHover: 'zs:hover:bg-amber-600',
|
|
583
|
+
text: 'zs:text-amber-500 zs:dark:text-amber-600'
|
|
584
|
+
},
|
|
585
|
+
select: {
|
|
586
|
+
bgSelect: 'zs:bg-amber-200 zs:dark:bg-amber-800',
|
|
587
|
+
cleartext: 'zs:text-amber-800 zs:dark:text-amber-500',
|
|
588
|
+
cleartexthover: 'zs:hover:text-amber-600 zs:dark:hover:text-amber-300',
|
|
589
|
+
},
|
|
590
|
+
checkbox: {
|
|
591
|
+
checkBoxText: 'zs:text-amber-500 zs:dark:text-amber-700',
|
|
592
|
+
checkBoxTextHover: 'zs:hover:text-amber-600',
|
|
593
|
+
},
|
|
594
|
+
card: {
|
|
595
|
+
border: 'zs:border-yellow-300 zs:dark:border-yellow-700',
|
|
596
|
+
borderHover: 'zs:hover:border-yellow-600 zs:dark:hover:border-yellow-500',
|
|
597
|
+
},
|
|
598
|
+
modal: {
|
|
599
|
+
border: 'zs:border-yellow-300 zs:dark:border-yellow-600',
|
|
600
|
+
text: 'zs:text-amber-800 zs:dark:text-amber-300',
|
|
601
|
+
},
|
|
602
|
+
page404: {
|
|
603
|
+
btnBG: 'zs:bg-amber-500 zs:dark:bg-amber-700',
|
|
604
|
+
btnBGHover: 'zs:hover:bg-amber-600',
|
|
605
|
+
iconText: 'zs:text-amber-500 zs:dark:text-amber-700',
|
|
606
|
+
},
|
|
461
607
|
},
|
|
462
608
|
],
|
|
463
609
|
[
|
|
464
610
|
'info',
|
|
465
611
|
{
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
612
|
+
input: {
|
|
613
|
+
border: 'zs:border-cyan-300 zs:dark:border-cyan-600',
|
|
614
|
+
borderHover: 'zs:hover:border-cyan-500 zs:dark:hover:border-cyan-400',
|
|
615
|
+
inputBg: 'zs:bg-white zs:dark:bg-slate-900',
|
|
616
|
+
text: 'zs:text-cyan-800 zs:dark:text-cyan-300',
|
|
617
|
+
},
|
|
618
|
+
ring: {
|
|
619
|
+
ring: 'zs:focus-within:ring-cyan-400 zs:dark:focus-within:ring-cyan-600',
|
|
620
|
+
},
|
|
621
|
+
buttonSolid: {
|
|
622
|
+
btnBG: 'zs:bg-cyan-500 zs:dark:bg-cyan-700',
|
|
623
|
+
btnBGHover: 'zs:hover:bg-cyan-600',
|
|
624
|
+
},
|
|
625
|
+
buttonOutline: {
|
|
626
|
+
border: 'zs:border-cyan-500 zs:dark:border-cyan-600',
|
|
627
|
+
btnBGHover: 'zs:hover:bg-cyan-600',
|
|
628
|
+
text: 'zs:text-cyan-500 zs:dark:text-cyan-600'
|
|
629
|
+
},
|
|
630
|
+
select: {
|
|
631
|
+
bgSelect: 'zs:bg-cyan-200 zs:dark:bg-cyan-800',
|
|
632
|
+
cleartext: 'zs:text-cyan-800 zs:dark:text-cyan-500',
|
|
633
|
+
cleartexthover: 'zs:hover:text-cyan-600 zs:dark:hover:text-cyan-300',
|
|
634
|
+
},
|
|
635
|
+
checkbox: {
|
|
636
|
+
checkBoxText: 'zs:text-cyan-500 zs:dark:text-cyan-700',
|
|
637
|
+
checkBoxTextHover: 'zs:hover:text-cyan-600',
|
|
638
|
+
},
|
|
639
|
+
card: {
|
|
640
|
+
border: 'zs:border-cyan-300 zs:dark:border-cyan-700',
|
|
641
|
+
borderHover: 'zs:hover:border-cyan-600 zs:dark:hover:border-cyan-500',
|
|
642
|
+
},
|
|
643
|
+
modal: {
|
|
644
|
+
border: 'zs:border-cyan-300 zs:dark:border-cyan-600',
|
|
645
|
+
text: 'zs:text-cyan-800 zs:dark:text-cyan-300',
|
|
646
|
+
},
|
|
647
|
+
page404: {
|
|
648
|
+
btnBG: 'zs:bg-cyan-500 zs:dark:bg-cyan-700',
|
|
649
|
+
btnBGHover: 'zs:hover:bg-cyan-600',
|
|
650
|
+
iconText: 'zs:text-cyan-500 zs:dark:text-cyan-700',
|
|
651
|
+
},
|
|
477
652
|
},
|
|
478
653
|
],
|
|
479
654
|
[
|
|
480
655
|
'dark',
|
|
481
656
|
{
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
657
|
+
input: {
|
|
658
|
+
border: 'zs:border-slate-900 zs:dark:border-slate-700',
|
|
659
|
+
borderHover: 'zs:hover:border-gray-500 zs:dark:hover:border-slate-500',
|
|
660
|
+
inputBg: 'zs:bg-slate-300 zs:dark:bg-slate-900',
|
|
661
|
+
text: 'zs:text-slate-900 zs:dark:text-slate-300',
|
|
662
|
+
},
|
|
663
|
+
ring: {
|
|
664
|
+
ring: 'zs:focus-within:ring-slate-700 zs:dark:focus-within:ring-slate-600',
|
|
665
|
+
},
|
|
666
|
+
buttonSolid: {
|
|
667
|
+
btnBG: 'zs:bg-slate-900 zs:dark:bg-slate-700',
|
|
668
|
+
btnBGHover: 'zs:hover:bg-slate-800 zs:dark:hover:bg-slate-700/70',
|
|
669
|
+
},
|
|
670
|
+
buttonOutline: {
|
|
671
|
+
border: 'zs:border-slate-900 zs:dark:border-slate-500',
|
|
672
|
+
btnBGHover: 'zs:hover:bg-slate-800 zs:dark:hover:bg-slate-700/70',
|
|
673
|
+
text: 'zs:text-slate-900 zs:dark:text-slate-500'
|
|
674
|
+
},
|
|
675
|
+
select: {
|
|
676
|
+
bgSelect: 'zs:bg-slate-400 zs:dark:bg-slate-800',
|
|
677
|
+
cleartext: 'zs:text-slate-700 zs:dark:text-slate-500',
|
|
678
|
+
cleartexthover: 'zs:hover:text-slate-900 zs:dark:hover:text-slate-700',
|
|
679
|
+
},
|
|
680
|
+
checkbox: {
|
|
681
|
+
checkBoxText: 'zs:text-slate-900 zs:dark:text-slate-700',
|
|
682
|
+
checkBoxTextHover: 'zs:hover:text-slate-700/70',
|
|
683
|
+
},
|
|
684
|
+
card: {
|
|
685
|
+
border: 'zs:border-slate-900 zs:dark:border-slate-700',
|
|
686
|
+
borderHover: 'zs:hover:border-gray-600 zs:dark:hover:border-slate-500',
|
|
687
|
+
},
|
|
688
|
+
modal: {
|
|
689
|
+
border: 'zs:border-slate-900 zs:dark:border-slate-700',
|
|
690
|
+
text: 'zs:text-slate-900 zs:dark:text-slate-300',
|
|
691
|
+
},
|
|
692
|
+
page404: {
|
|
693
|
+
btnBG: 'zs:bg-slate-900 zs:dark:bg-slate-700',
|
|
694
|
+
btnBGHover: 'zs:hover:bg-slate-800 zs:dark:hover:bg-slate-700/70',
|
|
695
|
+
iconText: 'zs:text-slate-900 zs:dark:text-slate-700',
|
|
696
|
+
},
|
|
493
697
|
},
|
|
494
698
|
],
|
|
495
699
|
[
|
|
496
700
|
'violet',
|
|
497
701
|
{
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
702
|
+
input: {
|
|
703
|
+
border: 'zs:border-violet-300 zs:dark:border-violet-600',
|
|
704
|
+
borderHover: 'zs:hover:border-violet-500 zs:dark:hover:border-violet-400',
|
|
705
|
+
inputBg: 'zs:bg-white zs:dark:bg-slate-900',
|
|
706
|
+
text: 'zs:text-violet-800 zs:dark:text-violet-300',
|
|
707
|
+
},
|
|
708
|
+
ring: {
|
|
709
|
+
ring: 'zs:focus-within:ring-violet-400 zs:dark:focus-within:ring-violet-600',
|
|
710
|
+
},
|
|
711
|
+
buttonSolid: {
|
|
712
|
+
btnBG: 'zs:bg-violet-500 zs:dark:bg-violet-700',
|
|
713
|
+
btnBGHover: 'zs:hover:bg-violet-600',
|
|
714
|
+
},
|
|
715
|
+
buttonOutline: {
|
|
716
|
+
border: 'zs:border-violet-500 zs:dark:border-violet-600',
|
|
717
|
+
btnBGHover: 'zs:hover:bg-violet-600',
|
|
718
|
+
text: 'zs:text-violet-500 zs:dark:text-violet-600'
|
|
719
|
+
},
|
|
720
|
+
select: {
|
|
721
|
+
bgSelect: 'zs:bg-violet-200 zs:dark:bg-violet-800',
|
|
722
|
+
cleartext: 'zs:text-violet-800 zs:dark:text-violet-500',
|
|
723
|
+
cleartexthover: 'zs:hover:text-violet-600 zs:dark:hover:text-violet-300',
|
|
724
|
+
},
|
|
725
|
+
checkbox: {
|
|
726
|
+
checkBoxText: 'zs:text-violet-500 zs:dark:text-violet-700',
|
|
727
|
+
checkBoxTextHover: 'zs:hover:text-violet-600',
|
|
728
|
+
},
|
|
729
|
+
card: {
|
|
730
|
+
border: 'zs:border-violet-300 zs:dark:border-violet-700',
|
|
731
|
+
borderHover: 'zs:hover:border-violet-600 zs:dark:hover:border-violet-500',
|
|
732
|
+
},
|
|
733
|
+
modal: {
|
|
734
|
+
border: 'zs:border-violet-300 zs:dark:border-violet-600',
|
|
735
|
+
text: 'zs:text-violet-800 zs:dark:text-violet-300',
|
|
736
|
+
},
|
|
737
|
+
page404: {
|
|
738
|
+
btnBG: 'zs:bg-violet-500 zs:dark:bg-violet-700',
|
|
739
|
+
btnBGHover: 'zs:hover:bg-violet-600',
|
|
740
|
+
iconText: 'zs:text-violet-500 zs:dark:text-violet-700',
|
|
741
|
+
},
|
|
509
742
|
},
|
|
510
743
|
],
|
|
511
744
|
[
|
|
512
745
|
'teal',
|
|
513
746
|
{
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
747
|
+
input: {
|
|
748
|
+
border: 'zs:border-teal-300 zs:dark:border-teal-600',
|
|
749
|
+
borderHover: 'zs:hover:border-teal-500 zs:dark:hover:border-teal-400',
|
|
750
|
+
inputBg: 'zs:bg-white zs:dark:bg-slate-900',
|
|
751
|
+
text: 'zs:text-teal-800 zs:dark:text-teal-300',
|
|
752
|
+
},
|
|
753
|
+
ring: {
|
|
754
|
+
ring: 'zs:focus-within:ring-teal-400 zs:dark:focus-within:ring-teal-600',
|
|
755
|
+
},
|
|
756
|
+
buttonSolid: {
|
|
757
|
+
btnBG: 'zs:bg-teal-500 zs:dark:bg-teal-700',
|
|
758
|
+
btnBGHover: 'zs:hover:bg-teal-600',
|
|
759
|
+
},
|
|
760
|
+
buttonOutline: {
|
|
761
|
+
border: 'zs:border-teal-500 zs:dark:border-teal-600',
|
|
762
|
+
btnBGHover: 'zs:hover:bg-teal-600',
|
|
763
|
+
text: 'zs:text-teal-500 zs:dark:text-teal-600'
|
|
764
|
+
},
|
|
765
|
+
select: {
|
|
766
|
+
bgSelect: 'zs:bg-teal-200 zs:dark:bg-teal-800',
|
|
767
|
+
cleartext: 'zs:text-teal-800 zs:dark:text-teal-500',
|
|
768
|
+
cleartexthover: 'zs:hover:text-teal-600 zs:dark:hover:text-teal-300',
|
|
769
|
+
},
|
|
770
|
+
checkbox: {
|
|
771
|
+
checkBoxText: 'zs:text-teal-500 zs:dark:text-teal-700',
|
|
772
|
+
checkBoxTextHover: 'zs:hover:text-teal-600',
|
|
773
|
+
},
|
|
774
|
+
card: {
|
|
775
|
+
border: 'zs:border-teal-300 zs:dark:border-teal-700',
|
|
776
|
+
borderHover: 'zs:hover:border-teal-600 zs:dark:hover:border-teal-500',
|
|
777
|
+
},
|
|
778
|
+
modal: {
|
|
779
|
+
border: 'zs:border-teal-300 zs:dark:border-teal-600',
|
|
780
|
+
text: 'zs:text-teal-800 zs:dark:text-teal-300',
|
|
781
|
+
},
|
|
782
|
+
page404: {
|
|
783
|
+
btnBG: 'zs:bg-teal-500 zs:dark:bg-teal-700',
|
|
784
|
+
btnBGHover: 'zs:hover:bg-teal-600',
|
|
785
|
+
iconText: 'zs:text-teal-500 zs:dark:text-teal-700',
|
|
786
|
+
},
|
|
525
787
|
},
|
|
526
788
|
],
|
|
527
789
|
]);
|
|
790
|
+
// Helper functions for backward compatibility
|
|
791
|
+
const inputPaletteMap = new Map(Array.from(unifiedPaletteMap).map(([key, value]) => [key, value.input]));
|
|
792
|
+
const ringPaletteMap = new Map(Array.from(unifiedPaletteMap).map(([key, value]) => [key, value.ring]));
|
|
793
|
+
const buttonSolidPaletteMap = new Map(Array.from(unifiedPaletteMap).map(([key, value]) => [key, value.buttonSolid]));
|
|
794
|
+
const buttonOutlinePaletteMap = new Map(Array.from(unifiedPaletteMap).map(([key, value]) => [key, value.buttonOutline]));
|
|
795
|
+
const selectPaletteMap = new Map(Array.from(unifiedPaletteMap).map(([key, value]) => [key, value.select]));
|
|
796
|
+
const checkboxTextPaletteMap = new Map(Array.from(unifiedPaletteMap).map(([key, value]) => [key, value.checkbox]));
|
|
797
|
+
const cardPaletteMap = new Map(Array.from(unifiedPaletteMap).map(([key, value]) => [key, value.card]));
|
|
798
|
+
const modalPaletteMap = new Map(Array.from(unifiedPaletteMap).map(([key, value]) => [key, value.modal]));
|
|
799
|
+
const page404PaletteMap = new Map(Array.from(unifiedPaletteMap).map(([key, value]) => [key, value.page404]));
|
|
528
800
|
const ColorMapping = new Map([
|
|
529
801
|
['slate', { text: 'zs:text-slate-600 zs:dark:text-slate-400', bg: 'zs:bg-slate-600 zs:dark:bg-slate-400', border: 'zs:border-slate-600 zs:dark:border-slate-400' }],
|
|
530
802
|
['gray', { text: 'zs:text-gray-600 zs:dark:text-gray-400', bg: 'zs:bg-gray-600 zs:dark:bg-gray-400', border: 'zs:border-gray-600 zs:dark:border-gray-400' }],
|
|
@@ -655,16 +927,13 @@ class Card {
|
|
|
655
927
|
const variant = this.variant();
|
|
656
928
|
const clickable = this.clickable();
|
|
657
929
|
const bodyClass = this.bodyClass();
|
|
658
|
-
const
|
|
659
|
-
|
|
660
|
-
borderHover: '',
|
|
661
|
-
ring: '',
|
|
662
|
-
};
|
|
930
|
+
const ringPalette = ringPaletteMap.get(style);
|
|
931
|
+
const cardPalette = cardPaletteMap.get(style);
|
|
663
932
|
const base = 'zs:w-full zs:h-full zs:overflow-hidden zs:flex zs:flex-col zs:gap-4 zs:rounded-lg zs:transition-all zs:duration-300';
|
|
664
933
|
// ---------------------
|
|
665
934
|
// Border Handling
|
|
666
935
|
// ---------------------
|
|
667
|
-
const border = (variant?.border ?? true) ? `zs:border ${
|
|
936
|
+
const border = (variant?.border ?? true) ? `zs:border ${cardPalette.border}` : 'zs:border-0';
|
|
668
937
|
// ---------------------
|
|
669
938
|
// Shadow Handling
|
|
670
939
|
// ---------------------
|
|
@@ -674,12 +943,12 @@ class Card {
|
|
|
674
943
|
// ---------------------
|
|
675
944
|
// Hover Border Handling
|
|
676
945
|
// ---------------------
|
|
677
|
-
const hoverBorder = (variant?.border_hover ?? true) ?
|
|
946
|
+
const hoverBorder = (variant?.border_hover ?? true) ? cardPalette.borderHover : '';
|
|
678
947
|
// ---------------------
|
|
679
948
|
// Clickable / Focus Effects
|
|
680
949
|
// ---------------------
|
|
681
950
|
const clickEffects = clickable
|
|
682
|
-
? `zs:cursor-pointer zs:hover:scale-[1.02] zs:active:scale-[0.97] zs:focus-visible:ring-2 ${
|
|
951
|
+
? `zs:cursor-pointer zs:hover:scale-[1.02] zs:active:scale-[0.97] zs:focus-visible:ring-2 ${ringPalette.ring}`
|
|
683
952
|
: '';
|
|
684
953
|
// ---------------------
|
|
685
954
|
// Combine Classes
|
|
@@ -1064,7 +1333,6 @@ class Button {
|
|
|
1064
1333
|
// ==============================================
|
|
1065
1334
|
// Computed Properties
|
|
1066
1335
|
// ==============================================
|
|
1067
|
-
palette = computed(() => FormPaletteMap.get(this.btnStyle()), ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
1068
1336
|
solidTextColor = computed(() => {
|
|
1069
1337
|
if (['primary', 'dark', 'violet', 'secondary'].includes(this.btnStyle()))
|
|
1070
1338
|
return 'zs:text-slate-100';
|
|
@@ -1073,20 +1341,29 @@ class Button {
|
|
|
1073
1341
|
baseClasses = computed(() => {
|
|
1074
1342
|
const size = this.size();
|
|
1075
1343
|
const variant = this.variant();
|
|
1076
|
-
const
|
|
1077
|
-
const
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1344
|
+
const solidPalette = buttonSolidPaletteMap.get(this.btnStyle());
|
|
1345
|
+
const outlinePalette = buttonOutlinePaletteMap.get(this.btnStyle());
|
|
1346
|
+
const ringConfig = ringPaletteMap.get(this.btnStyle());
|
|
1347
|
+
const solidPadding = {
|
|
1348
|
+
xs: 'zs:px-2 zs:py-1',
|
|
1349
|
+
sm: 'zs:px-3.5 zs:py-1.75',
|
|
1350
|
+
md: 'zs:px-5 zs:py-2.5',
|
|
1351
|
+
lg: 'zs:px-6.5 zs:py-3.25',
|
|
1352
|
+
xl: 'zs:px-8 zs:py-4',
|
|
1353
|
+
}[size];
|
|
1354
|
+
const outlinePadding = {
|
|
1355
|
+
xs: 'zs:px-[calc(--spacing(2)-1px)] zs:py-[calc(--spacing(2)-1px)]',
|
|
1356
|
+
sm: 'zs:px-[calc(--spacing(3.5)-1px)] zs:py-[calc(--spacing(1.75)-1px)]',
|
|
1357
|
+
md: 'zs:px-[calc(--spacing(5)-1px)] zs:py-[calc(--spacing(2.5)-1px)]',
|
|
1358
|
+
lg: 'zs:px-[calc(--spacing(6.5)-1px)] zs:py-[calc(--spacing(3.25)-1px)]',
|
|
1359
|
+
xl: 'zs:px-[calc(--spacing(8)-1px)] zs:py-[calc(--spacing(4)-1px)]',
|
|
1360
|
+
}[size];
|
|
1361
|
+
const solidClasses = this.join(solidPalette.btnBG, solidPalette.btnBGHover, 'zs:hover:scale-[1.02]', 'zs:shadow-md zs:dark:shadow-slate-700/50', 'zs:hover:shadow-lg', 'zs:active:shadow-sm', ['dark', 'secondary'].includes(this.btnStyle()) ? 'zs:dark:hover:shadow-sm' : '', this.solidTextColor());
|
|
1362
|
+
const outlineClasses = this.join('zs:bg-transparent', 'zs:border-[1px]', outlinePalette.border, outlinePalette.btnBGHover, outlinePalette.text, 'zs:hover:text-gray-50', 'zs:hover:shadow-sm');
|
|
1086
1363
|
const stateClasses = this.disabled()
|
|
1087
1364
|
? 'zs:opacity-60 zs:cursor-not-allowed zs:shadow-none'
|
|
1088
|
-
: this.join('zs:
|
|
1089
|
-
return this.join(
|
|
1365
|
+
: this.join('zs:active:scale-[0.97]', 'zs:transition-[background-color,color,border-color,box-shadow,opacity]', 'zs:duration-200', 'zs:ease-in-out', 'zs:inline-flex zs:items-center zs:justify-center', 'zs:focus-visible:ring-2', 'zs:select-none', 'zs:outline-hidden', ['xl'].includes(size) ? 'zs:rounded-xl' : 'zs:rounded-lg');
|
|
1366
|
+
return this.join(variant === 'solid' ? solidPadding : outlinePadding, variant === 'solid' ? solidClasses : outlineClasses, stateClasses, ringConfig.ring);
|
|
1090
1367
|
}, ...(ngDevMode ? [{ debugName: "baseClasses" }] : []));
|
|
1091
1368
|
// ==============================================
|
|
1092
1369
|
// Methods
|
|
@@ -1147,7 +1424,7 @@ class Modal {
|
|
|
1147
1424
|
show: true,
|
|
1148
1425
|
text: 'Cancel',
|
|
1149
1426
|
btnStyle: 'secondary',
|
|
1150
|
-
variant: '
|
|
1427
|
+
variant: 'outline',
|
|
1151
1428
|
size: 'md',
|
|
1152
1429
|
icon: null,
|
|
1153
1430
|
disabled: false
|
|
@@ -1178,7 +1455,7 @@ class Modal {
|
|
|
1178
1455
|
// ==============================================
|
|
1179
1456
|
// Computed Signals
|
|
1180
1457
|
// ==============================================
|
|
1181
|
-
palette = computed(() =>
|
|
1458
|
+
palette = computed(() => modalPaletteMap.get(this.modalStyle()), ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
1182
1459
|
isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
1183
1460
|
positionClass = computed(() => positionMap[this.position()], ...(ngDevMode ? [{ debugName: "positionClass" }] : []));
|
|
1184
1461
|
setTimeId;
|
|
@@ -1212,11 +1489,11 @@ class Modal {
|
|
|
1212
1489
|
this.close();
|
|
1213
1490
|
}
|
|
1214
1491
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Modal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1215
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: Modal, isStandalone: true, selector: "ZS-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, modalStyle: { classPropertyName: "modalStyle", publicName: "modalStyle", isSignal: true, isRequired: false, transformFunction: null }, showCancelIcon: { classPropertyName: "showCancelIcon", publicName: "showCancelIcon", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, cancelConfig: { classPropertyName: "cancelConfig", publicName: "cancelConfig", isSignal: true, isRequired: false, transformFunction: null }, confirmConfig: { classPropertyName: "confirmConfig", publicName: "confirmConfig", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, closeOnOverlay: { classPropertyName: "closeOnOverlay", publicName: "closeOnOverlay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", confirmEv: "confirmEv", cancelEv: "cancelEv", closedEv: "closedEv" }, host: { listeners: { "document:keydown.escape": "onEscape()" } }, ngImport: i0, template: "<!-- ========================= Overlay ========================= -->\n@if (isOpen()) {\n <div #modalRef\n class=\"zs:fixed zs:inset-0 zs:flex {{ zIndices.modal }} zs:bg-black/50 zs:dark:bg-black/70 zs:transition-all zs:duration-300\"\n [ngClass]=\"[positionClass(), open() ? 'animate-fadeIn' : 'animate-fadeOut']\"\n (click)=\"onOverlayClick($event)\"\n role=\"presentation\"\n [attr.inert]=\"isOpen() ? null : ''\"\n >\n\n <!-- ========================= Modal Container ========================= -->\n <div\n class=\"zs:relative zs:m-4 zs:bg-white zs:dark:bg-slate-900 zs:w-full zs:max-w-lg zs:mx-4 \n zs:rounded-2xl zs:shadow-lg zs:transition-all zs:duration-300 zs:outline-hidden\"\n [ngClass]=\"[\n 'zs:border', \n palette().border,\n palette().text,\n open() ? 'animate-modalIn' : 'animate-modalOut'\n ]\"\n (click)=\"$event.stopPropagation()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"'modal-title'\"\n [attr.aria-describedby]=\"'modal-body'\"\n tabindex=\"0\"\n (keydown.escape)=\"close()\"\n >\n\n <!-- ========================= Modal Header ========================= -->\n <div\n class=\"zs:flex zs:items-center zs:justify-between zs:px-4 zs:py-3 zs:border-b\"\n [class]=\"palette().border\"\n >\n <h3 id=\"modal-title\" class=\"zs:font-semibold zs:text-lg\">\n {{ title() }}\n </h3>\n @if(showCancelIcon()) {\n <button \n class=\"zs:text-xl zs:hover:opacity-85 zs:cursor-pointer zs:transition-colors zs:duration-200 zs:focus:outline-hidden zs:focus-visible:ring-2 zs:focus-visible:ring-offset-2 zs:focus-visible:ring-blue-500 zs:rounded-md
|
|
1492
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: Modal, isStandalone: true, selector: "ZS-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, modalStyle: { classPropertyName: "modalStyle", publicName: "modalStyle", isSignal: true, isRequired: false, transformFunction: null }, showCancelIcon: { classPropertyName: "showCancelIcon", publicName: "showCancelIcon", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, cancelConfig: { classPropertyName: "cancelConfig", publicName: "cancelConfig", isSignal: true, isRequired: false, transformFunction: null }, confirmConfig: { classPropertyName: "confirmConfig", publicName: "confirmConfig", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, closeOnOverlay: { classPropertyName: "closeOnOverlay", publicName: "closeOnOverlay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", confirmEv: "confirmEv", cancelEv: "cancelEv", closedEv: "closedEv" }, host: { listeners: { "document:keydown.escape": "onEscape()" } }, ngImport: i0, template: "<!-- ========================= Overlay ========================= -->\n@if (isOpen()) {\n <div #modalRef\n class=\"zs:fixed zs:inset-0 zs:flex {{ zIndices.modal }} zs:bg-black/50 zs:dark:bg-black/70 zs:transition-all zs:duration-300\"\n [ngClass]=\"[positionClass(), open() ? 'animate-fadeIn' : 'animate-fadeOut']\"\n (click)=\"onOverlayClick($event)\"\n role=\"presentation\"\n [attr.inert]=\"isOpen() ? null : ''\"\n >\n\n <!-- ========================= Modal Container ========================= -->\n <div\n class=\"zs:relative zs:m-4 zs:bg-white zs:dark:bg-slate-900 zs:w-full zs:max-w-lg zs:mx-4 \n zs:rounded-2xl zs:shadow-lg zs:transition-all zs:duration-300 zs:outline-hidden\"\n [ngClass]=\"[\n 'zs:border', \n palette().border,\n palette().text,\n open() ? 'animate-modalIn' : 'animate-modalOut'\n ]\"\n (click)=\"$event.stopPropagation()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"'modal-title'\"\n [attr.aria-describedby]=\"'modal-body'\"\n tabindex=\"0\"\n (keydown.escape)=\"close()\"\n >\n\n <!-- ========================= Modal Header ========================= -->\n <div\n class=\"zs:flex zs:items-center zs:justify-between zs:px-4 zs:py-3 zs:border-b\"\n [class]=\"palette().border\"\n >\n <h3 id=\"modal-title\" class=\"zs:font-semibold zs:text-lg\">\n {{ title() }}\n </h3>\n @if(showCancelIcon()) {\n <button \n class=\"zs:text-xl zs:hover:opacity-85 zs:cursor-pointer zs:transition-colors \n zs:duration-200 zs:focus:outline-hidden zs:focus-visible:ring-2 \n zs:focus-visible:ring-offset-2 zs:focus-visible:ring-blue-500 \n zs:rounded-md zs:hover:scale-[1.02] zs:active:scale-[0.97]\"\n (click)=\"close()\"\n aria-label=\"Close dialog\"\n >\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n }\n </div>\n\n <!-- ========================= Modal Body ========================= -->\n <div id=\"modal-body\" class=\"zs:p-4 scroll zs:max-h-[75vh] scroll-{{ modalStyle() }}\">\n <ng-content></ng-content>\n </div>\n\n <!-- ========================= Modal Footer ========================= -->\n @if (showFooter()) {\n <div\n class=\"zs:flex zs:justify-end zs:gap-3 zs:p-4 zs:border-t\"\n [class]=\"palette().border\"\n >\n @if (cancelMerged().show) {\n <ZS-button\n [btnStyle]=\"cancelMerged().btnStyle\"\n variant=\"solid\"\n type=\"button\"\n (clickedEv)=\"cancelEv.emit()\"\n [icon]=\"cancelMerged().icon\"\n [disabled]=\"cancelMerged().disabled\"\n [size]=\"cancelMerged().size\"\n [variant]=\"cancelMerged().variant\"\n aria-label=\"Cancel\"\n >\n {{ cancelMerged().text}}\n </ZS-button>\n }\n @if (confirmMerged().show) {\n <ZS-button\n type=\"button\"\n [btnStyle]=\"confirmMerged().btnStyle\"\n (clickedEv)=\"confirmEv.emit()\"\n [icon]=\"confirmMerged().icon\"\n [disabled]=\"confirmMerged().disabled\"\n [size]=\"confirmMerged().size\"\n [variant]=\"confirmMerged().variant\"\n aria-label=\"Confirm\"\n >\n {{ confirmMerged().text}}\n </ZS-button>\n }\n </div>\n }\n </div>\n </div>\n}", styles: ["@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes modalIn{0%{opacity:0;transform:scale(.9) translateY(10px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes modalOut{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.9) translateY(10px)}}.animate-fadeIn{animation:fadeIn .25s ease-out forwards}.animate-modalIn{animation:modalIn .25s ease-out forwards}.animate-fadeOut{animation:fadeOut .25s ease-in forwards}.animate-modalOut{animation:modalOut .25s ease-in forwards}\n"], dependencies: [{ kind: "component", type: Button, selector: "ZS-button", inputs: ["Id", "btnStyle", "variant", "size", "disabled", "icon", "type"], outputs: ["clickedEv"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1216
1493
|
}
|
|
1217
1494
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Modal, decorators: [{
|
|
1218
1495
|
type: Component,
|
|
1219
|
-
args: [{ selector: 'ZS-modal', imports: [Button, CommonModule], template: "<!-- ========================= Overlay ========================= -->\n@if (isOpen()) {\n <div #modalRef\n class=\"zs:fixed zs:inset-0 zs:flex {{ zIndices.modal }} zs:bg-black/50 zs:dark:bg-black/70 zs:transition-all zs:duration-300\"\n [ngClass]=\"[positionClass(), open() ? 'animate-fadeIn' : 'animate-fadeOut']\"\n (click)=\"onOverlayClick($event)\"\n role=\"presentation\"\n [attr.inert]=\"isOpen() ? null : ''\"\n >\n\n <!-- ========================= Modal Container ========================= -->\n <div\n class=\"zs:relative zs:m-4 zs:bg-white zs:dark:bg-slate-900 zs:w-full zs:max-w-lg zs:mx-4 \n zs:rounded-2xl zs:shadow-lg zs:transition-all zs:duration-300 zs:outline-hidden\"\n [ngClass]=\"[\n 'zs:border', \n palette().border,\n palette().text,\n open() ? 'animate-modalIn' : 'animate-modalOut'\n ]\"\n (click)=\"$event.stopPropagation()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"'modal-title'\"\n [attr.aria-describedby]=\"'modal-body'\"\n tabindex=\"0\"\n (keydown.escape)=\"close()\"\n >\n\n <!-- ========================= Modal Header ========================= -->\n <div\n class=\"zs:flex zs:items-center zs:justify-between zs:px-4 zs:py-3 zs:border-b\"\n [class]=\"palette().border\"\n >\n <h3 id=\"modal-title\" class=\"zs:font-semibold zs:text-lg\">\n {{ title() }}\n </h3>\n @if(showCancelIcon()) {\n <button \n class=\"zs:text-xl zs:hover:opacity-85 zs:cursor-pointer zs:transition-colors zs:duration-200 zs:focus:outline-hidden zs:focus-visible:ring-2 zs:focus-visible:ring-offset-2 zs:focus-visible:ring-blue-500 zs:rounded-md
|
|
1496
|
+
args: [{ selector: 'ZS-modal', imports: [Button, CommonModule], template: "<!-- ========================= Overlay ========================= -->\n@if (isOpen()) {\n <div #modalRef\n class=\"zs:fixed zs:inset-0 zs:flex {{ zIndices.modal }} zs:bg-black/50 zs:dark:bg-black/70 zs:transition-all zs:duration-300\"\n [ngClass]=\"[positionClass(), open() ? 'animate-fadeIn' : 'animate-fadeOut']\"\n (click)=\"onOverlayClick($event)\"\n role=\"presentation\"\n [attr.inert]=\"isOpen() ? null : ''\"\n >\n\n <!-- ========================= Modal Container ========================= -->\n <div\n class=\"zs:relative zs:m-4 zs:bg-white zs:dark:bg-slate-900 zs:w-full zs:max-w-lg zs:mx-4 \n zs:rounded-2xl zs:shadow-lg zs:transition-all zs:duration-300 zs:outline-hidden\"\n [ngClass]=\"[\n 'zs:border', \n palette().border,\n palette().text,\n open() ? 'animate-modalIn' : 'animate-modalOut'\n ]\"\n (click)=\"$event.stopPropagation()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"'modal-title'\"\n [attr.aria-describedby]=\"'modal-body'\"\n tabindex=\"0\"\n (keydown.escape)=\"close()\"\n >\n\n <!-- ========================= Modal Header ========================= -->\n <div\n class=\"zs:flex zs:items-center zs:justify-between zs:px-4 zs:py-3 zs:border-b\"\n [class]=\"palette().border\"\n >\n <h3 id=\"modal-title\" class=\"zs:font-semibold zs:text-lg\">\n {{ title() }}\n </h3>\n @if(showCancelIcon()) {\n <button \n class=\"zs:text-xl zs:hover:opacity-85 zs:cursor-pointer zs:transition-colors \n zs:duration-200 zs:focus:outline-hidden zs:focus-visible:ring-2 \n zs:focus-visible:ring-offset-2 zs:focus-visible:ring-blue-500 \n zs:rounded-md zs:hover:scale-[1.02] zs:active:scale-[0.97]\"\n (click)=\"close()\"\n aria-label=\"Close dialog\"\n >\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n }\n </div>\n\n <!-- ========================= Modal Body ========================= -->\n <div id=\"modal-body\" class=\"zs:p-4 scroll zs:max-h-[75vh] scroll-{{ modalStyle() }}\">\n <ng-content></ng-content>\n </div>\n\n <!-- ========================= Modal Footer ========================= -->\n @if (showFooter()) {\n <div\n class=\"zs:flex zs:justify-end zs:gap-3 zs:p-4 zs:border-t\"\n [class]=\"palette().border\"\n >\n @if (cancelMerged().show) {\n <ZS-button\n [btnStyle]=\"cancelMerged().btnStyle\"\n variant=\"solid\"\n type=\"button\"\n (clickedEv)=\"cancelEv.emit()\"\n [icon]=\"cancelMerged().icon\"\n [disabled]=\"cancelMerged().disabled\"\n [size]=\"cancelMerged().size\"\n [variant]=\"cancelMerged().variant\"\n aria-label=\"Cancel\"\n >\n {{ cancelMerged().text}}\n </ZS-button>\n }\n @if (confirmMerged().show) {\n <ZS-button\n type=\"button\"\n [btnStyle]=\"confirmMerged().btnStyle\"\n (clickedEv)=\"confirmEv.emit()\"\n [icon]=\"confirmMerged().icon\"\n [disabled]=\"confirmMerged().disabled\"\n [size]=\"confirmMerged().size\"\n [variant]=\"confirmMerged().variant\"\n aria-label=\"Confirm\"\n >\n {{ confirmMerged().text}}\n </ZS-button>\n }\n </div>\n }\n </div>\n </div>\n}", styles: ["@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes modalIn{0%{opacity:0;transform:scale(.9) translateY(10px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes modalOut{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.9) translateY(10px)}}.animate-fadeIn{animation:fadeIn .25s ease-out forwards}.animate-modalIn{animation:modalIn .25s ease-out forwards}.animate-fadeOut{animation:fadeOut .25s ease-in forwards}.animate-modalOut{animation:modalOut .25s ease-in forwards}\n"] }]
|
|
1220
1497
|
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], modalStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalStyle", required: false }] }], showCancelIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCancelIcon", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], cancelConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelConfig", required: false }] }], confirmConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmConfig", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], closeOnOverlay: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnOverlay", required: false }] }], confirmEv: [{ type: i0.Output, args: ["confirmEv"] }], cancelEv: [{ type: i0.Output, args: ["cancelEv"] }], closedEv: [{ type: i0.Output, args: ["closedEv"] }], onEscape: [{
|
|
1221
1498
|
type: HostListener,
|
|
1222
1499
|
args: ['document:keydown.escape']
|
|
@@ -1358,14 +1635,14 @@ class Page404 {
|
|
|
1358
1635
|
if (this.pageStyle() === 'normal')
|
|
1359
1636
|
return {
|
|
1360
1637
|
btnBG: 'zs:bg-sky-500 zs:dark:bg-sky-600',
|
|
1361
|
-
|
|
1638
|
+
btnBGHover: 'zs:hover:bg-sky-600 zs:dark:hover:bg-sky-500',
|
|
1362
1639
|
iconText: 'zs:text-sky-600 zs:dark:text-sky-500'
|
|
1363
1640
|
};
|
|
1364
|
-
const pallete =
|
|
1641
|
+
const pallete = page404PaletteMap.get(this.pageStyle());
|
|
1365
1642
|
return {
|
|
1366
1643
|
btnBG: pallete.btnBG,
|
|
1367
|
-
|
|
1368
|
-
iconText: pallete.
|
|
1644
|
+
btnBGHover: pallete.btnBGHover,
|
|
1645
|
+
iconText: pallete.iconText
|
|
1369
1646
|
};
|
|
1370
1647
|
}, ...(ngDevMode ? [{ debugName: "style" }] : []));
|
|
1371
1648
|
// ========================================================================
|
|
@@ -1373,11 +1650,11 @@ class Page404 {
|
|
|
1373
1650
|
// ========================================================================
|
|
1374
1651
|
onAction = output();
|
|
1375
1652
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Page404, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1376
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: Page404, isStandalone: true, selector: "ZS-page404", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, pageStyle: { classPropertyName: "pageStyle", publicName: "pageStyle", isSignal: true, isRequired: false, transformFunction: null }, showButton: { classPropertyName: "showButton", publicName: "showButton", isSignal: true, isRequired: false, transformFunction: null }, buttonText: { classPropertyName: "buttonText", publicName: "buttonText", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<!-- ========================= Page 404 Container ========================= -->\n<div class=\"zs:flex zs:flex-col zs:items-center zs:justify-center zs:min-h-[90vh]\n zs:text-center zs:transition-colors zs:duration-500 zs:animate-fadeIn\"\n [ngClass]=\"[style().iconText]\"\n >\n\n <!-- ========================= Icon ========================= --> \n <div class=\"zs:text-[136px] zs:mb-8 animate-float zs:opacity-90 zs:leading-none\">\n <i class=\"fa-solid\" [class]=\"icon()\"></i>\n </div>\n\n <!-- ========================= Title ========================= -->\n <h1 class=\"zs:text-6xl zs:font-black zs:tracking-widest zs:mb-2 \n zs:text-rose-600 zs:dark:text-rose-500 zs:select-none\n zs:drop-shadow-[0_0_8px_rgba(239,68,68,0.5)]\">\n 404\n </h1>\n\n\n <!-- ========================= Message ========================= -->\n <h2 class=\"zs:text-2xl zs:text-rose-600/80 zs:dark:text-rose-800/80 zs:font-semibold zs:mb-4\">\n {{ title() }}\n </h2>\n <p class=\"zs:text-base zs:max-w-md zs:text-gray-600 zs:dark:text-gray-400 zs:mb-8\">\n {{ message() }}\n </p>\n\n <!-- ========================= Button ========================= -->\n @if (showButton()) {\n <a\n [routerLink]=\"routerLink()\"\n (click)=\"onAction.emit()\"\n class=\"zs:px-6 zs:py-2 zs:rounded-full\n zs:text-white zs:font-medium zs:shadow-md\n zs:hover:shadow-lg zs:flex zs:items-center \n zs:justify-center zs:transition-all zs:duration-300 zs:ease-out \n zs:gap-1.5\"\n [ngClass]=\"[style().btnBG, style().
|
|
1653
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: Page404, isStandalone: true, selector: "ZS-page404", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, pageStyle: { classPropertyName: "pageStyle", publicName: "pageStyle", isSignal: true, isRequired: false, transformFunction: null }, showButton: { classPropertyName: "showButton", publicName: "showButton", isSignal: true, isRequired: false, transformFunction: null }, buttonText: { classPropertyName: "buttonText", publicName: "buttonText", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<!-- ========================= Page 404 Container ========================= -->\n<div class=\"zs:flex zs:flex-col zs:items-center zs:justify-center zs:min-h-[90vh]\n zs:text-center zs:transition-colors zs:duration-500 zs:animate-fadeIn\"\n [ngClass]=\"[style().iconText]\"\n >\n\n <!-- ========================= Icon ========================= --> \n <div class=\"zs:text-[136px] zs:mb-8 animate-float zs:opacity-90 zs:leading-none\">\n <i class=\"fa-solid\" [class]=\"icon()\"></i>\n </div>\n\n <!-- ========================= Title ========================= -->\n <h1 class=\"zs:text-6xl zs:font-black zs:tracking-widest zs:mb-2 \n zs:text-rose-600 zs:dark:text-rose-500 zs:select-none\n zs:drop-shadow-[0_0_8px_rgba(239,68,68,0.5)]\">\n 404\n </h1>\n\n\n <!-- ========================= Message ========================= -->\n <h2 class=\"zs:text-2xl zs:text-rose-600/80 zs:dark:text-rose-800/80 zs:font-semibold zs:mb-4\">\n {{ title() }}\n </h2>\n <p class=\"zs:text-base zs:max-w-md zs:text-gray-600 zs:dark:text-gray-400 zs:mb-8\">\n {{ message() }}\n </p>\n\n <!-- ========================= Button ========================= -->\n @if (showButton()) {\n <a\n [routerLink]=\"routerLink()\"\n (click)=\"onAction.emit()\"\n class=\"zs:px-6 zs:py-2 zs:rounded-full\n zs:text-white zs:font-medium zs:shadow-md\n zs:hover:shadow-lg zs:flex zs:items-center \n zs:justify-center zs:transition-all zs:duration-300 zs:ease-out \n zs:gap-1.5\"\n [ngClass]=\"[style().btnBG, style().btnBGHover]\"\n >\n <i class=\"fa-solid fa-house\"></i>\n {{ buttonText() }}\n </a>\n }\n</div>\n", styles: ["@keyframes float{0%{transform:translateY(0)}50%{transform:translateY(-10px)}to{transform:translateY(0)}}.animate-float{animation:float 3s ease-in-out infinite}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1377
1654
|
}
|
|
1378
1655
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Page404, decorators: [{
|
|
1379
1656
|
type: Component,
|
|
1380
|
-
args: [{ selector: 'ZS-page404', imports: [RouterModule, CommonModule], template: "<!-- ========================= Page 404 Container ========================= -->\n<div class=\"zs:flex zs:flex-col zs:items-center zs:justify-center zs:min-h-[90vh]\n zs:text-center zs:transition-colors zs:duration-500 zs:animate-fadeIn\"\n [ngClass]=\"[style().iconText]\"\n >\n\n <!-- ========================= Icon ========================= --> \n <div class=\"zs:text-[136px] zs:mb-8 animate-float zs:opacity-90 zs:leading-none\">\n <i class=\"fa-solid\" [class]=\"icon()\"></i>\n </div>\n\n <!-- ========================= Title ========================= -->\n <h1 class=\"zs:text-6xl zs:font-black zs:tracking-widest zs:mb-2 \n zs:text-rose-600 zs:dark:text-rose-500 zs:select-none\n zs:drop-shadow-[0_0_8px_rgba(239,68,68,0.5)]\">\n 404\n </h1>\n\n\n <!-- ========================= Message ========================= -->\n <h2 class=\"zs:text-2xl zs:text-rose-600/80 zs:dark:text-rose-800/80 zs:font-semibold zs:mb-4\">\n {{ title() }}\n </h2>\n <p class=\"zs:text-base zs:max-w-md zs:text-gray-600 zs:dark:text-gray-400 zs:mb-8\">\n {{ message() }}\n </p>\n\n <!-- ========================= Button ========================= -->\n @if (showButton()) {\n <a\n [routerLink]=\"routerLink()\"\n (click)=\"onAction.emit()\"\n class=\"zs:px-6 zs:py-2 zs:rounded-full\n zs:text-white zs:font-medium zs:shadow-md\n zs:hover:shadow-lg zs:flex zs:items-center \n zs:justify-center zs:transition-all zs:duration-300 zs:ease-out \n zs:gap-1.5\"\n [ngClass]=\"[style().btnBG, style().
|
|
1657
|
+
args: [{ selector: 'ZS-page404', imports: [RouterModule, CommonModule], template: "<!-- ========================= Page 404 Container ========================= -->\n<div class=\"zs:flex zs:flex-col zs:items-center zs:justify-center zs:min-h-[90vh]\n zs:text-center zs:transition-colors zs:duration-500 zs:animate-fadeIn\"\n [ngClass]=\"[style().iconText]\"\n >\n\n <!-- ========================= Icon ========================= --> \n <div class=\"zs:text-[136px] zs:mb-8 animate-float zs:opacity-90 zs:leading-none\">\n <i class=\"fa-solid\" [class]=\"icon()\"></i>\n </div>\n\n <!-- ========================= Title ========================= -->\n <h1 class=\"zs:text-6xl zs:font-black zs:tracking-widest zs:mb-2 \n zs:text-rose-600 zs:dark:text-rose-500 zs:select-none\n zs:drop-shadow-[0_0_8px_rgba(239,68,68,0.5)]\">\n 404\n </h1>\n\n\n <!-- ========================= Message ========================= -->\n <h2 class=\"zs:text-2xl zs:text-rose-600/80 zs:dark:text-rose-800/80 zs:font-semibold zs:mb-4\">\n {{ title() }}\n </h2>\n <p class=\"zs:text-base zs:max-w-md zs:text-gray-600 zs:dark:text-gray-400 zs:mb-8\">\n {{ message() }}\n </p>\n\n <!-- ========================= Button ========================= -->\n @if (showButton()) {\n <a\n [routerLink]=\"routerLink()\"\n (click)=\"onAction.emit()\"\n class=\"zs:px-6 zs:py-2 zs:rounded-full\n zs:text-white zs:font-medium zs:shadow-md\n zs:hover:shadow-lg zs:flex zs:items-center \n zs:justify-center zs:transition-all zs:duration-300 zs:ease-out \n zs:gap-1.5\"\n [ngClass]=\"[style().btnBG, style().btnBGHover]\"\n >\n <i class=\"fa-solid fa-house\"></i>\n {{ buttonText() }}\n </a>\n }\n</div>\n", styles: ["@keyframes float{0%{transform:translateY(0)}50%{transform:translateY(-10px)}to{transform:translateY(0)}}.animate-float{animation:float 3s ease-in-out infinite}\n"] }]
|
|
1381
1658
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], pageStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageStyle", required: false }] }], showButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButton", required: false }] }], buttonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonText", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
|
|
1382
1659
|
|
|
1383
1660
|
// ========================================================================
|
|
@@ -1761,7 +2038,11 @@ class Checkbox {
|
|
|
1761
2038
|
// ==============================================
|
|
1762
2039
|
// Computed Signals
|
|
1763
2040
|
// ==============================================
|
|
1764
|
-
palette = computed(() =>
|
|
2041
|
+
palette = computed(() => {
|
|
2042
|
+
const checkboxTextPalette = checkboxTextPaletteMap.get(this.inputStyle());
|
|
2043
|
+
const ringPalette = ringPaletteMap.get(this.inputStyle());
|
|
2044
|
+
return { checkboxTextPalette, ringPalette };
|
|
2045
|
+
}, ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
1765
2046
|
iconClasses = computed(() => {
|
|
1766
2047
|
const v = this.variant();
|
|
1767
2048
|
const s = this.shape();
|
|
@@ -1820,11 +2101,11 @@ class Checkbox {
|
|
|
1820
2101
|
}
|
|
1821
2102
|
}
|
|
1822
2103
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Checkbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1823
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: Checkbox, isStandalone: true, selector: "ZS-checkbox", inputs: { Id: { classPropertyName: "Id", publicName: "Id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<div class=\"zs:flex zs:items-center zs:justify-start zs:w-full zs:select-none\">\n <!-- ===================== Checkbox Wrapper ===================== -->\n <div\n class=\"zs:cursor-pointer group leading-none\"\n >\n <!-- ===================== Hidden Input (Native for screen readers) ===================== -->\n <input\n type=\"checkbox\"\n class=\"zs:hidden\"\n [id]=\"Id()\"\n [checked]=\"isChecked()\"\n [disabled]=\"disabledOrReadonly()\"\n (change)=\"toggleChecked()\"\n />\n\n <!-- ===================== Custom Accessible Checkbox ===================== -->\n <span\n role=\"'checkbox'\"\n tabindex=\"0\"\n [attr.aria-checked]=\"isChecked()\"\n [attr.aria-disabled]=\"disabledOrReadonly()\"\n [attr.aria-labelledby]=\"Id() + '-label'\"\n [ngClass]=\"[\n sizeClass(),\n palette().checkBoxText,\n palette().checkBoxTextHover,\n palette().ring,\n 'zs:leading-none zs:inline-flex zs:items-center zs:justify-center zs:focus:outline-hidden zs:focus-visible:ring-2'\n ]\"\n (click)=\"toggleChecked()\"\n (keydown)=\"onKeyDown($event)\"\n >\n <i [class]=\"iconClasses()\"></i>\n </span>\n </div>\n\n <!-- ===================== Label (ZS-label component) ===================== -->\n <ZS-label [class]=\"(label() || hint()) ? 'zs:ml-1' : ''\"\n [id]=\"Id() + '-label'\"\n [label]=\"label()\"\n [hint]=\"hint()\"\n [hintId]=\"Id() + '-hint'\"\n [size]=\"size()\"\n [for]=\"Id()\"\n ></ZS-label>\n</div>", styles: [""], dependencies: [{ kind: "component", type: Label, selector: "ZS-label", inputs: ["label", "hint", "hintId", "size", "required", "for"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2104
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: Checkbox, isStandalone: true, selector: "ZS-checkbox", inputs: { Id: { classPropertyName: "Id", publicName: "Id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<div class=\"zs:flex zs:items-center zs:justify-start zs:w-full zs:select-none\">\n <!-- ===================== Checkbox Wrapper ===================== -->\n <div\n class=\"zs:cursor-pointer group leading-none\"\n >\n <!-- ===================== Hidden Input (Native for screen readers) ===================== -->\n <input\n type=\"checkbox\"\n class=\"zs:hidden\"\n [id]=\"Id()\"\n [checked]=\"isChecked()\"\n [disabled]=\"disabledOrReadonly()\"\n (change)=\"toggleChecked()\"\n />\n\n <!-- ===================== Custom Accessible Checkbox ===================== -->\n <span\n role=\"'checkbox'\"\n tabindex=\"0\"\n [attr.aria-checked]=\"isChecked()\"\n [attr.aria-disabled]=\"disabledOrReadonly()\"\n [attr.aria-labelledby]=\"Id() + '-label'\"\n [ngClass]=\"[\n sizeClass(),\n palette().checkboxTextPalette.checkBoxText,\n palette().checkboxTextPalette.checkBoxTextHover,\n palette().ringPalette.ring,\n 'zs:leading-none zs:inline-flex zs:items-center zs:justify-center zs:focus:outline-hidden zs:focus-visible:ring-2'\n ]\"\n (click)=\"toggleChecked()\"\n (keydown)=\"onKeyDown($event)\"\n >\n <i [class]=\"iconClasses()\"></i>\n </span>\n </div>\n\n <!-- ===================== Label (ZS-label component) ===================== -->\n <ZS-label [class]=\"(label() || hint()) ? 'zs:ml-1' : ''\"\n [id]=\"Id() + '-label'\"\n [label]=\"label()\"\n [hint]=\"hint()\"\n [hintId]=\"Id() + '-hint'\"\n [size]=\"size()\"\n [for]=\"Id()\"\n ></ZS-label>\n</div>", styles: [""], dependencies: [{ kind: "component", type: Label, selector: "ZS-label", inputs: ["label", "hint", "hintId", "size", "required", "for"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1824
2105
|
}
|
|
1825
2106
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Checkbox, decorators: [{
|
|
1826
2107
|
type: Component,
|
|
1827
|
-
args: [{ selector: 'ZS-checkbox', imports: [Label, CommonModule], template: "<div class=\"zs:flex zs:items-center zs:justify-start zs:w-full zs:select-none\">\n <!-- ===================== Checkbox Wrapper ===================== -->\n <div\n class=\"zs:cursor-pointer group leading-none\"\n >\n <!-- ===================== Hidden Input (Native for screen readers) ===================== -->\n <input\n type=\"checkbox\"\n class=\"zs:hidden\"\n [id]=\"Id()\"\n [checked]=\"isChecked()\"\n [disabled]=\"disabledOrReadonly()\"\n (change)=\"toggleChecked()\"\n />\n\n <!-- ===================== Custom Accessible Checkbox ===================== -->\n <span\n role=\"'checkbox'\"\n tabindex=\"0\"\n [attr.aria-checked]=\"isChecked()\"\n [attr.aria-disabled]=\"disabledOrReadonly()\"\n [attr.aria-labelledby]=\"Id() + '-label'\"\n [ngClass]=\"[\n sizeClass(),\n palette().checkBoxText,\n palette().checkBoxTextHover,\n palette().ring,\n 'zs:leading-none zs:inline-flex zs:items-center zs:justify-center zs:focus:outline-hidden zs:focus-visible:ring-2'\n ]\"\n (click)=\"toggleChecked()\"\n (keydown)=\"onKeyDown($event)\"\n >\n <i [class]=\"iconClasses()\"></i>\n </span>\n </div>\n\n <!-- ===================== Label (ZS-label component) ===================== -->\n <ZS-label [class]=\"(label() || hint()) ? 'zs:ml-1' : ''\"\n [id]=\"Id() + '-label'\"\n [label]=\"label()\"\n [hint]=\"hint()\"\n [hintId]=\"Id() + '-hint'\"\n [size]=\"size()\"\n [for]=\"Id()\"\n ></ZS-label>\n</div>" }]
|
|
2108
|
+
args: [{ selector: 'ZS-checkbox', imports: [Label, CommonModule], template: "<div class=\"zs:flex zs:items-center zs:justify-start zs:w-full zs:select-none\">\n <!-- ===================== Checkbox Wrapper ===================== -->\n <div\n class=\"zs:cursor-pointer group leading-none\"\n >\n <!-- ===================== Hidden Input (Native for screen readers) ===================== -->\n <input\n type=\"checkbox\"\n class=\"zs:hidden\"\n [id]=\"Id()\"\n [checked]=\"isChecked()\"\n [disabled]=\"disabledOrReadonly()\"\n (change)=\"toggleChecked()\"\n />\n\n <!-- ===================== Custom Accessible Checkbox ===================== -->\n <span\n role=\"'checkbox'\"\n tabindex=\"0\"\n [attr.aria-checked]=\"isChecked()\"\n [attr.aria-disabled]=\"disabledOrReadonly()\"\n [attr.aria-labelledby]=\"Id() + '-label'\"\n [ngClass]=\"[\n sizeClass(),\n palette().checkboxTextPalette.checkBoxText,\n palette().checkboxTextPalette.checkBoxTextHover,\n palette().ringPalette.ring,\n 'zs:leading-none zs:inline-flex zs:items-center zs:justify-center zs:focus:outline-hidden zs:focus-visible:ring-2'\n ]\"\n (click)=\"toggleChecked()\"\n (keydown)=\"onKeyDown($event)\"\n >\n <i [class]=\"iconClasses()\"></i>\n </span>\n </div>\n\n <!-- ===================== Label (ZS-label component) ===================== -->\n <ZS-label [class]=\"(label() || hint()) ? 'zs:ml-1' : ''\"\n [id]=\"Id() + '-label'\"\n [label]=\"label()\"\n [hint]=\"hint()\"\n [hintId]=\"Id() + '-hint'\"\n [size]=\"size()\"\n [for]=\"Id()\"\n ></ZS-label>\n</div>" }]
|
|
1828
2109
|
}], propDecorators: { Id: [{ type: i0.Input, args: [{ isSignal: true, alias: "Id", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], isReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "isReadonly", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
1829
2110
|
|
|
1830
2111
|
// ==============================================================================
|
|
@@ -1894,7 +2175,11 @@ class FileInput {
|
|
|
1894
2175
|
// ==============================================================================
|
|
1895
2176
|
// Computed Properties
|
|
1896
2177
|
// ==============================================================================
|
|
1897
|
-
palette = computed(() =>
|
|
2178
|
+
palette = computed(() => {
|
|
2179
|
+
const inputPalette = inputPaletteMap.get(this.inputStyle());
|
|
2180
|
+
const ringPalette = ringPaletteMap.get(this.inputStyle());
|
|
2181
|
+
return { inputPalette, ringPalette };
|
|
2182
|
+
}, ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
1898
2183
|
hasFiles = computed(() => this.files().size > 0, ...(ngDevMode ? [{ debugName: "hasFiles" }] : []));
|
|
1899
2184
|
totalSize = computed(() => this.filesMapToList().reduce((sum, f) => sum + f.size, 0), ...(ngDevMode ? [{ debugName: "totalSize" }] : []));
|
|
1900
2185
|
disabledOrReadonly = computed(() => this.disabled() || this.isReadonly(), ...(ngDevMode ? [{ debugName: "disabledOrReadonly" }] : []));
|
|
@@ -2052,11 +2337,11 @@ class FileInput {
|
|
|
2052
2337
|
});
|
|
2053
2338
|
}
|
|
2054
2339
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FileInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2055
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: FileInput, isStandalone: true, selector: "ZS-file", inputs: { Id: { classPropertyName: "Id", publicName: "Id", isSignal: true, isRequired: false, transformFunction: null }, iName: { classPropertyName: "iName", publicName: "iName", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, validateFns: { classPropertyName: "validateFns", publicName: "validateFns", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, allowPreview: { classPropertyName: "allowPreview", publicName: "allowPreview", isSignal: true, isRequired: false, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changeEv: "changeEv", files: "filesChange", touched: "touchedChange" }, viewQueries: [{ propertyName: "fileInputRef", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"zs:flex zs:flex-col zs:gap-2 zs:w-full\"\n [ngClass]=\"disabled() ? 'zs:opacity-60' : ''\"\n role=\"group\"\n [attr.aria-labelledby]=\"Id() + '-label'\"\n [attr.aria-describedby]=\"Id() + '-hint ' + Id() + '-error'\"\n>\n <!-- ========================= Label & Hint ========================= -->\n <ZS-label [class]=\"(label() || hint()) ? 'zs:mb-1' : ''\"\n [label]=\"label()\"\n [hint]=\"hint()\"\n [required]=\"required()\"\n [hintId]=\"Id() + '-hint'\"\n [for]=\"Id()\"\n [id]=\"Id() + '-label'\"\n >\n </ZS-label>\n\n <!-- ================= Input ================= -->\n <div\n [class]=\"[\n 'zs:relative zs:rounded-xl zs:flex zs:flex-col zs:justify-center zs:items-center zs:gap-2 zs:border-2 zs:border-dashed zs:transition-all zs:duration-200',\n palette().border,\n palette().ring,\n palette().borderHover,\n palette().inputBg\n ].join(' ')\"\n [ngClass]=\"disabledOrReadonly() ? 'cursor-not-allowed' : 'cursor-pointer'\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-disabled]=\"disabledOrReadonly()\"\n [attr.aria-label]=\"placeholder() || 'Upload file'\"\n (keydown.enter)=\"!disabledOrReadonly() && fileInput.click()\"\n (keydown.space)=\"!disabledOrReadonly() && fileInput.click()\"\n >\n <input\n #fileInput\n type=\"file\"\n [id]=\"Id()\"\n [name]=\"iName()\"\n [attr.accept]=\"accept()\"\n [attr.multiple]=\"multiple() ? '' : null\"\n [attr.autofocus]=\"autofocus() ? true : null\"\n class=\"zs:absolute zs:inset-0 zs:opacity-0 zs:cursor-pointer\"\n [disabled]=\"disabledOrReadonly()\"\n (change)=\"handleFileChange($event)\"\n [attr.aria-required]=\"required()\"\n [attr.aria-invalid]=\"!!error().length\"\n [attr.aria-describedby]=\"Id() + '-hint ' + Id() + '-error'\"\n />\n\n <div class=\"zs:flex zs:flex-col zs:items-center zs:justify-center zs:text-center zs:py-6 zs:pointer-events-none zs:select-none\">\n <i class=\"fa-solid fa-upload text-3xl mb-2\" [ngClass]=\"palette().text\" aria-hidden=\"true\"></i>\n <p class=\"zs:text-sm zs:text-gray-500 zs:dark:text-gray-400\">\n {{ placeholder() }}\n </p>\n </div>\n </div>\n\n <!-- ================= Files Preview ================= -->\n @if (hasFiles()) {\n <div\n class=\"zs:flex zs:flex-col zs:gap-2 zs:mt-3\"\n role=\"list\"\n aria-label=\"Uploaded files\"\n >\n @for (entry of files().entries(); track entry[0]) {\n <div\n class=\"zs:flex zs:flex-col zs:gap-1 zs:p-2 zs:rounded-lg zs:border zs:focus:outline-hidden zs:focus:ring-2 zs:focus:ring-offset-2\"\n [ngClass]=\"[palette().border, palette().inputBg]\"\n role=\"listitem\"\n tabindex=\"0\"\n >\n <span class=\"zs:block zs:text-sm zs:font-medium zs:truncate\">\n {{ entry[1].name }}\n </span>\n\n <div class=\"zs:flex zs:items-center zs:justify-between zs:gap-4\">\n <div class=\"zs:flex zs:items-center zs:gap-1\">\n <i class=\"text-lg fa-solid fa-file\" [ngClass]=\"palette().text\" aria-hidden=\"true\"></i>\n <span class=\"zs:text-xs zs:text-gray-500\">\n {{ formatSize(entry[1].size) }}\n </span>\n </div>\n\n <div class=\"zs:flex zs:gap-2\">\n @if (allowPreview() && entry[1].url?.startsWith('blob:')) {\n <ZS-button\n type=\"button\"\n (clickedEv)=\"preview(entry[1].url)\"\n [btnStyle]=\"inputStyle()\"\n size=\"sm\"\n aria-label=\"Preview {{ entry[1].name }}\"\n >\n Preview\n </ZS-button>\n }\n\n @if (!disabledOrReadonly()) {\n <ZS-button\n type=\"button\"\n variant=\"outline\"\n btnStyle=\"danger\"\n (clickedEv)=\"removeFile(entry[0])\"\n icon=\"fa-solid fa-trash\"\n aria-label=\"Remove {{ entry[1].name }}\"\n >\n </ZS-button>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- ========================= Error Messages ========================= -->\n <ZS-input-errors\n [Id]=\"Id() + '-error'\"\n [errors]=\"[error()]\"\n aria-live=\"assertive\"\n role=\"alert\"\n >\n </ZS-input-errors>\n</div>\n", styles: [":host{@apply block w-full;}input[type=file]:disabled{@apply cursor-not-allowed opacity-60;}\n"], dependencies: [{ kind: "component", type: Label, selector: "ZS-label", inputs: ["label", "hint", "hintId", "size", "required", "for"] }, { kind: "component", type: InputErrors, selector: "ZS-input-errors", inputs: ["Id", "errors"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: Button, selector: "ZS-button", inputs: ["Id", "btnStyle", "variant", "size", "disabled", "icon", "type"], outputs: ["clickedEv"] }] });
|
|
2340
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: FileInput, isStandalone: true, selector: "ZS-file", inputs: { Id: { classPropertyName: "Id", publicName: "Id", isSignal: true, isRequired: false, transformFunction: null }, iName: { classPropertyName: "iName", publicName: "iName", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, validateFns: { classPropertyName: "validateFns", publicName: "validateFns", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, allowPreview: { classPropertyName: "allowPreview", publicName: "allowPreview", isSignal: true, isRequired: false, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changeEv: "changeEv", files: "filesChange", touched: "touchedChange" }, viewQueries: [{ propertyName: "fileInputRef", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"zs:flex zs:flex-col zs:gap-2 zs:w-full\"\n [ngClass]=\"disabled() ? 'zs:opacity-60' : ''\"\n role=\"group\"\n [attr.aria-labelledby]=\"Id() + '-label'\"\n [attr.aria-describedby]=\"Id() + '-hint ' + Id() + '-error'\"\n>\n <!-- ========================= Label & Hint ========================= -->\n <ZS-label [class]=\"(label() || hint()) ? 'zs:mb-1' : ''\"\n [label]=\"label()\"\n [hint]=\"hint()\"\n [required]=\"required()\"\n [hintId]=\"Id() + '-hint'\"\n [for]=\"Id()\"\n [id]=\"Id() + '-label'\"\n >\n </ZS-label>\n\n <!-- ================= Input ================= -->\n <div\n [class]=\"[\n 'zs:relative zs:rounded-xl zs:flex zs:flex-col zs:justify-center zs:items-center zs:gap-2 zs:border-2 zs:border-dashed zs:transition-all zs:duration-200',\n palette().inputPalette.border,\n palette().ringPalette.ring,\n palette().inputPalette.borderHover,\n palette().inputPalette.inputBg\n ].join(' ')\"\n [ngClass]=\"disabledOrReadonly() ? 'cursor-not-allowed' : 'cursor-pointer'\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-disabled]=\"disabledOrReadonly()\"\n [attr.aria-label]=\"placeholder() || 'Upload file'\"\n (keydown.enter)=\"!disabledOrReadonly() && fileInput.click()\"\n (keydown.space)=\"!disabledOrReadonly() && fileInput.click()\"\n >\n <input\n #fileInput\n type=\"file\"\n [id]=\"Id()\"\n [name]=\"iName()\"\n [attr.accept]=\"accept()\"\n [attr.multiple]=\"multiple() ? '' : null\"\n [attr.autofocus]=\"autofocus() ? true : null\"\n class=\"zs:absolute zs:inset-0 zs:opacity-0 zs:cursor-pointer\"\n [disabled]=\"disabledOrReadonly()\"\n (change)=\"handleFileChange($event)\"\n [attr.aria-required]=\"required()\"\n [attr.aria-invalid]=\"!!error().length\"\n [attr.aria-describedby]=\"Id() + '-hint ' + Id() + '-error'\"\n />\n\n <div class=\"zs:flex zs:flex-col zs:items-center zs:justify-center zs:text-center zs:py-6 zs:pointer-events-none zs:select-none\">\n <i class=\"fa-solid fa-upload text-3xl mb-2\" [ngClass]=\"palette().inputPalette.text\" aria-hidden=\"true\"></i>\n <p class=\"zs:text-sm zs:text-gray-500 zs:dark:text-gray-400\">\n {{ placeholder() }}\n </p>\n </div>\n </div>\n\n <!-- ================= Files Preview ================= -->\n @if (hasFiles()) {\n <div\n class=\"zs:flex zs:flex-col zs:gap-2 zs:mt-3\"\n role=\"list\"\n aria-label=\"Uploaded files\"\n >\n @for (entry of files().entries(); track entry[0]) {\n <div\n class=\"zs:flex zs:flex-col zs:gap-1 zs:p-2 zs:rounded-lg zs:border zs:focus:outline-hidden zs:focus:ring-2 zs:focus:ring-offset-2\"\n [ngClass]=\"[palette().inputPalette.border, palette().inputPalette.inputBg]\"\n role=\"listitem\"\n tabindex=\"0\"\n >\n <span class=\"zs:block zs:text-sm zs:font-medium zs:truncate\">\n {{ entry[1].name }}\n </span>\n\n <div class=\"zs:flex zs:items-center zs:justify-between zs:gap-4\">\n <div class=\"zs:flex zs:items-center zs:gap-1\">\n <i class=\"text-lg fa-solid fa-file\" [ngClass]=\"palette().inputPalette.text\" aria-hidden=\"true\"></i>\n <span class=\"zs:text-xs zs:text-gray-500\">\n {{ formatSize(entry[1].size) }}\n </span>\n </div>\n\n <div class=\"zs:flex zs:gap-2\">\n @if (allowPreview() && entry[1].url?.startsWith('blob:')) {\n <ZS-button\n type=\"button\"\n (clickedEv)=\"preview(entry[1].url)\"\n [btnStyle]=\"inputStyle()\"\n size=\"sm\"\n aria-label=\"Preview {{ entry[1].name }}\"\n >\n Preview\n </ZS-button>\n }\n\n @if (!disabledOrReadonly()) {\n <ZS-button\n type=\"button\"\n variant=\"outline\"\n btnStyle=\"danger\"\n (clickedEv)=\"removeFile(entry[0])\"\n icon=\"fa-solid fa-trash\"\n aria-label=\"Remove {{ entry[1].name }}\"\n >\n </ZS-button>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- ========================= Error Messages ========================= -->\n <ZS-input-errors\n [Id]=\"Id() + '-error'\"\n [errors]=\"[error()]\"\n aria-live=\"assertive\"\n role=\"alert\"\n >\n </ZS-input-errors>\n</div>\n", styles: [":host{@apply block w-full;}input[type=file]:disabled{@apply cursor-not-allowed opacity-60;}\n"], dependencies: [{ kind: "component", type: Label, selector: "ZS-label", inputs: ["label", "hint", "hintId", "size", "required", "for"] }, { kind: "component", type: InputErrors, selector: "ZS-input-errors", inputs: ["Id", "errors"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: Button, selector: "ZS-button", inputs: ["Id", "btnStyle", "variant", "size", "disabled", "icon", "type"], outputs: ["clickedEv"] }] });
|
|
2056
2341
|
}
|
|
2057
2342
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FileInput, decorators: [{
|
|
2058
2343
|
type: Component,
|
|
2059
|
-
args: [{ selector: 'ZS-file', imports: [Label, InputErrors, CommonModule, Button], template: "<div\n class=\"zs:flex zs:flex-col zs:gap-2 zs:w-full\"\n [ngClass]=\"disabled() ? 'zs:opacity-60' : ''\"\n role=\"group\"\n [attr.aria-labelledby]=\"Id() + '-label'\"\n [attr.aria-describedby]=\"Id() + '-hint ' + Id() + '-error'\"\n>\n <!-- ========================= Label & Hint ========================= -->\n <ZS-label [class]=\"(label() || hint()) ? 'zs:mb-1' : ''\"\n [label]=\"label()\"\n [hint]=\"hint()\"\n [required]=\"required()\"\n [hintId]=\"Id() + '-hint'\"\n [for]=\"Id()\"\n [id]=\"Id() + '-label'\"\n >\n </ZS-label>\n\n <!-- ================= Input ================= -->\n <div\n [class]=\"[\n 'zs:relative zs:rounded-xl zs:flex zs:flex-col zs:justify-center zs:items-center zs:gap-2 zs:border-2 zs:border-dashed zs:transition-all zs:duration-200',\n palette().border,\n palette().ring,\n palette().borderHover,\n palette().inputBg\n ].join(' ')\"\n [ngClass]=\"disabledOrReadonly() ? 'cursor-not-allowed' : 'cursor-pointer'\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-disabled]=\"disabledOrReadonly()\"\n [attr.aria-label]=\"placeholder() || 'Upload file'\"\n (keydown.enter)=\"!disabledOrReadonly() && fileInput.click()\"\n (keydown.space)=\"!disabledOrReadonly() && fileInput.click()\"\n >\n <input\n #fileInput\n type=\"file\"\n [id]=\"Id()\"\n [name]=\"iName()\"\n [attr.accept]=\"accept()\"\n [attr.multiple]=\"multiple() ? '' : null\"\n [attr.autofocus]=\"autofocus() ? true : null\"\n class=\"zs:absolute zs:inset-0 zs:opacity-0 zs:cursor-pointer\"\n [disabled]=\"disabledOrReadonly()\"\n (change)=\"handleFileChange($event)\"\n [attr.aria-required]=\"required()\"\n [attr.aria-invalid]=\"!!error().length\"\n [attr.aria-describedby]=\"Id() + '-hint ' + Id() + '-error'\"\n />\n\n <div class=\"zs:flex zs:flex-col zs:items-center zs:justify-center zs:text-center zs:py-6 zs:pointer-events-none zs:select-none\">\n <i class=\"fa-solid fa-upload text-3xl mb-2\" [ngClass]=\"palette().text\" aria-hidden=\"true\"></i>\n <p class=\"zs:text-sm zs:text-gray-500 zs:dark:text-gray-400\">\n {{ placeholder() }}\n </p>\n </div>\n </div>\n\n <!-- ================= Files Preview ================= -->\n @if (hasFiles()) {\n <div\n class=\"zs:flex zs:flex-col zs:gap-2 zs:mt-3\"\n role=\"list\"\n aria-label=\"Uploaded files\"\n >\n @for (entry of files().entries(); track entry[0]) {\n <div\n class=\"zs:flex zs:flex-col zs:gap-1 zs:p-2 zs:rounded-lg zs:border zs:focus:outline-hidden zs:focus:ring-2 zs:focus:ring-offset-2\"\n [ngClass]=\"[palette().border, palette().inputBg]\"\n role=\"listitem\"\n tabindex=\"0\"\n >\n <span class=\"zs:block zs:text-sm zs:font-medium zs:truncate\">\n {{ entry[1].name }}\n </span>\n\n <div class=\"zs:flex zs:items-center zs:justify-between zs:gap-4\">\n <div class=\"zs:flex zs:items-center zs:gap-1\">\n <i class=\"text-lg fa-solid fa-file\" [ngClass]=\"palette().text\" aria-hidden=\"true\"></i>\n <span class=\"zs:text-xs zs:text-gray-500\">\n {{ formatSize(entry[1].size) }}\n </span>\n </div>\n\n <div class=\"zs:flex zs:gap-2\">\n @if (allowPreview() && entry[1].url?.startsWith('blob:')) {\n <ZS-button\n type=\"button\"\n (clickedEv)=\"preview(entry[1].url)\"\n [btnStyle]=\"inputStyle()\"\n size=\"sm\"\n aria-label=\"Preview {{ entry[1].name }}\"\n >\n Preview\n </ZS-button>\n }\n\n @if (!disabledOrReadonly()) {\n <ZS-button\n type=\"button\"\n variant=\"outline\"\n btnStyle=\"danger\"\n (clickedEv)=\"removeFile(entry[0])\"\n icon=\"fa-solid fa-trash\"\n aria-label=\"Remove {{ entry[1].name }}\"\n >\n </ZS-button>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- ========================= Error Messages ========================= -->\n <ZS-input-errors\n [Id]=\"Id() + '-error'\"\n [errors]=\"[error()]\"\n aria-live=\"assertive\"\n role=\"alert\"\n >\n </ZS-input-errors>\n</div>\n", styles: [":host{@apply block w-full;}input[type=file]:disabled{@apply cursor-not-allowed opacity-60;}\n"] }]
|
|
2344
|
+
args: [{ selector: 'ZS-file', imports: [Label, InputErrors, CommonModule, Button], template: "<div\n class=\"zs:flex zs:flex-col zs:gap-2 zs:w-full\"\n [ngClass]=\"disabled() ? 'zs:opacity-60' : ''\"\n role=\"group\"\n [attr.aria-labelledby]=\"Id() + '-label'\"\n [attr.aria-describedby]=\"Id() + '-hint ' + Id() + '-error'\"\n>\n <!-- ========================= Label & Hint ========================= -->\n <ZS-label [class]=\"(label() || hint()) ? 'zs:mb-1' : ''\"\n [label]=\"label()\"\n [hint]=\"hint()\"\n [required]=\"required()\"\n [hintId]=\"Id() + '-hint'\"\n [for]=\"Id()\"\n [id]=\"Id() + '-label'\"\n >\n </ZS-label>\n\n <!-- ================= Input ================= -->\n <div\n [class]=\"[\n 'zs:relative zs:rounded-xl zs:flex zs:flex-col zs:justify-center zs:items-center zs:gap-2 zs:border-2 zs:border-dashed zs:transition-all zs:duration-200',\n palette().inputPalette.border,\n palette().ringPalette.ring,\n palette().inputPalette.borderHover,\n palette().inputPalette.inputBg\n ].join(' ')\"\n [ngClass]=\"disabledOrReadonly() ? 'cursor-not-allowed' : 'cursor-pointer'\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-disabled]=\"disabledOrReadonly()\"\n [attr.aria-label]=\"placeholder() || 'Upload file'\"\n (keydown.enter)=\"!disabledOrReadonly() && fileInput.click()\"\n (keydown.space)=\"!disabledOrReadonly() && fileInput.click()\"\n >\n <input\n #fileInput\n type=\"file\"\n [id]=\"Id()\"\n [name]=\"iName()\"\n [attr.accept]=\"accept()\"\n [attr.multiple]=\"multiple() ? '' : null\"\n [attr.autofocus]=\"autofocus() ? true : null\"\n class=\"zs:absolute zs:inset-0 zs:opacity-0 zs:cursor-pointer\"\n [disabled]=\"disabledOrReadonly()\"\n (change)=\"handleFileChange($event)\"\n [attr.aria-required]=\"required()\"\n [attr.aria-invalid]=\"!!error().length\"\n [attr.aria-describedby]=\"Id() + '-hint ' + Id() + '-error'\"\n />\n\n <div class=\"zs:flex zs:flex-col zs:items-center zs:justify-center zs:text-center zs:py-6 zs:pointer-events-none zs:select-none\">\n <i class=\"fa-solid fa-upload text-3xl mb-2\" [ngClass]=\"palette().inputPalette.text\" aria-hidden=\"true\"></i>\n <p class=\"zs:text-sm zs:text-gray-500 zs:dark:text-gray-400\">\n {{ placeholder() }}\n </p>\n </div>\n </div>\n\n <!-- ================= Files Preview ================= -->\n @if (hasFiles()) {\n <div\n class=\"zs:flex zs:flex-col zs:gap-2 zs:mt-3\"\n role=\"list\"\n aria-label=\"Uploaded files\"\n >\n @for (entry of files().entries(); track entry[0]) {\n <div\n class=\"zs:flex zs:flex-col zs:gap-1 zs:p-2 zs:rounded-lg zs:border zs:focus:outline-hidden zs:focus:ring-2 zs:focus:ring-offset-2\"\n [ngClass]=\"[palette().inputPalette.border, palette().inputPalette.inputBg]\"\n role=\"listitem\"\n tabindex=\"0\"\n >\n <span class=\"zs:block zs:text-sm zs:font-medium zs:truncate\">\n {{ entry[1].name }}\n </span>\n\n <div class=\"zs:flex zs:items-center zs:justify-between zs:gap-4\">\n <div class=\"zs:flex zs:items-center zs:gap-1\">\n <i class=\"text-lg fa-solid fa-file\" [ngClass]=\"palette().inputPalette.text\" aria-hidden=\"true\"></i>\n <span class=\"zs:text-xs zs:text-gray-500\">\n {{ formatSize(entry[1].size) }}\n </span>\n </div>\n\n <div class=\"zs:flex zs:gap-2\">\n @if (allowPreview() && entry[1].url?.startsWith('blob:')) {\n <ZS-button\n type=\"button\"\n (clickedEv)=\"preview(entry[1].url)\"\n [btnStyle]=\"inputStyle()\"\n size=\"sm\"\n aria-label=\"Preview {{ entry[1].name }}\"\n >\n Preview\n </ZS-button>\n }\n\n @if (!disabledOrReadonly()) {\n <ZS-button\n type=\"button\"\n variant=\"outline\"\n btnStyle=\"danger\"\n (clickedEv)=\"removeFile(entry[0])\"\n icon=\"fa-solid fa-trash\"\n aria-label=\"Remove {{ entry[1].name }}\"\n >\n </ZS-button>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- ========================= Error Messages ========================= -->\n <ZS-input-errors\n [Id]=\"Id() + '-error'\"\n [errors]=\"[error()]\"\n aria-live=\"assertive\"\n role=\"alert\"\n >\n </ZS-input-errors>\n</div>\n", styles: [":host{@apply block w-full;}input[type=file]:disabled{@apply cursor-not-allowed opacity-60;}\n"] }]
|
|
2060
2345
|
}], propDecorators: { Id: [{ type: i0.Input, args: [{ isSignal: true, alias: "Id", required: false }] }], iName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iName", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], isReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "isReadonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], validateFns: [{ type: i0.Input, args: [{ isSignal: true, alias: "validateFns", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], maxSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSize", required: false }] }], allowPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowPreview", required: false }] }], maxFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFiles", required: false }] }], changeEv: [{ type: i0.Output, args: ["changeEv"] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }, { type: i0.Output, args: ["filesChange"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], fileInputRef: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }] } });
|
|
2061
2346
|
|
|
2062
2347
|
// ==============================================================================
|
|
@@ -2173,9 +2458,10 @@ class Input {
|
|
|
2173
2458
|
containerClasses = computed(() => {
|
|
2174
2459
|
const baseClasses = 'zs:border zs:transition-all zs:duration-150 zs:focus-within:ring-2';
|
|
2175
2460
|
const hasError = this.error().length;
|
|
2176
|
-
let styleConfig =
|
|
2461
|
+
let styleConfig = inputPaletteMap.get(this.inputStyle());
|
|
2462
|
+
const ringConfig = ringPaletteMap.get(this.inputStyle());
|
|
2177
2463
|
if (hasError) {
|
|
2178
|
-
styleConfig =
|
|
2464
|
+
styleConfig = inputPaletteMap.get('danger');
|
|
2179
2465
|
}
|
|
2180
2466
|
const disabledClass = this.disabled() ? 'zs:opacity-60' : '';
|
|
2181
2467
|
const interactionClass = this.disabledOrReadonly()
|
|
@@ -2187,7 +2473,7 @@ class Input {
|
|
|
2187
2473
|
styleConfig.borderHover,
|
|
2188
2474
|
styleConfig.inputBg,
|
|
2189
2475
|
styleConfig.text,
|
|
2190
|
-
|
|
2476
|
+
ringConfig.ring,
|
|
2191
2477
|
disabledClass,
|
|
2192
2478
|
interactionClass,
|
|
2193
2479
|
]
|
|
@@ -2431,9 +2717,6 @@ class Range {
|
|
|
2431
2717
|
// Computed Properties
|
|
2432
2718
|
// ==============================================
|
|
2433
2719
|
disabledOrReadonly = computed(() => this.disabled() || this.isReadonly(), ...(ngDevMode ? [{ debugName: "disabledOrReadonly" }] : []));
|
|
2434
|
-
palette = computed(() => {
|
|
2435
|
-
return FormPaletteMap.get(this.inputStyle()) ?? FormPaletteMap.get('secondary');
|
|
2436
|
-
}, ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
2437
2720
|
percent = computed(() => {
|
|
2438
2721
|
const range = this.max() - this.min();
|
|
2439
2722
|
return ((this.value() - this.min()) / range) * 100;
|
|
@@ -2469,6 +2752,11 @@ class Range {
|
|
|
2469
2752
|
};
|
|
2470
2753
|
return sizeClasses[this.size()];
|
|
2471
2754
|
}, ...(ngDevMode ? [{ debugName: "gapCLasses" }] : []));
|
|
2755
|
+
palette = computed(() => {
|
|
2756
|
+
const buttonSolidPalette = buttonSolidPaletteMap.get(this.inputStyle());
|
|
2757
|
+
const inputPalette = inputPaletteMap.get(this.inputStyle());
|
|
2758
|
+
return { buttonSolidPalette, inputPalette };
|
|
2759
|
+
}, ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
2472
2760
|
rangeClasses = computed(() => {
|
|
2473
2761
|
const base = 'zs:relative zs:w-full zs:rounded-full zs:cursor-pointer';
|
|
2474
2762
|
const sizeClasses = this.rangeSizeClasses('height');
|
|
@@ -2476,9 +2764,9 @@ class Range {
|
|
|
2476
2764
|
const interactionClass = !this.disabledOrReadonly() ? 'zs:group' : '';
|
|
2477
2765
|
return [
|
|
2478
2766
|
sizeClasses,
|
|
2479
|
-
this.palette().border,
|
|
2480
|
-
this.palette().inputBg,
|
|
2481
|
-
this.palette().text,
|
|
2767
|
+
this.palette().inputPalette.border,
|
|
2768
|
+
this.palette().inputPalette.inputBg,
|
|
2769
|
+
this.palette().inputPalette.text,
|
|
2482
2770
|
base,
|
|
2483
2771
|
disabledClass,
|
|
2484
2772
|
interactionClass
|
|
@@ -2486,8 +2774,8 @@ class Range {
|
|
|
2486
2774
|
}, ...(ngDevMode ? [{ debugName: "rangeClasses" }] : []));
|
|
2487
2775
|
ThumbClasses = computed(() => {
|
|
2488
2776
|
return [
|
|
2489
|
-
this.palette().btnBG,
|
|
2490
|
-
this.palette().btnBGHover,
|
|
2777
|
+
this.palette().buttonSolidPalette.btnBG,
|
|
2778
|
+
this.palette().buttonSolidPalette.btnBGHover,
|
|
2491
2779
|
this.dragging() ? 'zs:scale-110 zs:shadow-lg' : '',
|
|
2492
2780
|
this.rangeSizeClasses('size')
|
|
2493
2781
|
].join(' ');
|
|
@@ -2561,11 +2849,11 @@ class Range {
|
|
|
2561
2849
|
});
|
|
2562
2850
|
}
|
|
2563
2851
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Range, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2564
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: Range, isStandalone: true, selector: "ZS-range", inputs: { Id: { classPropertyName: "Id", publicName: "Id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, viewQueries: [{ propertyName: "trackRef", first: true, predicate: ["track"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- ========================= Label ========================= -->\n<div class=\"zs:flex zs:flex-col zs:w-full zs:select-none\">\n <ZS-label [class]=\"(label() || hint()) ? 'zs:mb-1' : ''\"\n [label]=\"label()\"\n [hint]=\"hint()\"\n [hintId]=\"Id() + '-hint'\"\n [size]=\"size()\"\n [for]=\"Id()\"\n ></ZS-label>\n\n <!-- ========================= Slider Container ========================= -->\n <div class=\"zs:flex zs:items-center\"\n [class]=\"gapCLasses()\">\n \n <!-- ========================= Track ========================= -->\n <div\n #track\n [class]=\"rangeClasses()\"\n (mousedown)=\"onMouseDown($event)\"\n >\n \n <!-- ========================= Track Background ========================= -->\n <div\n class=\"zs:absolute zs:inset-0 zs:rounded-full zs:bg-linear-to-r zs:from-gray-200 zs:to-gray-300 zs:transition-all zs:duration-300 zs:group-hover:brightness-110\"\n [ngClass]=\"[\n ['secondary', 'dark'].includes(inputStyle()) ? 'zs:dark:from-gray-500 zs:dark:to-gray-600' : 'zs:dark:from-gray-700 zs:dark:to-gray-800',\n disabledOrReadonly() ? 'zs:cursor-not-allowed' : ''\n ]\"\n ></div>\n\n <!-- ========================= Fill (Progress) ========================= -->\n <div\n class=\"zs:absolute zs:left-0 zs:rounded-full zs:top-0 zs:h-full zs:transition-all zs:duration-200 zs:ease-out zs:shadow-sm\"\n [style.width.%]=\"percent()\"\n [ngClass]=\"[\n disabledOrReadonly() ? 'zs:cursor-not-allowed' : '',\n palette().btnBG,\n palette().btnBGHover\n ]\"\n ></div>\n\n <!-- ========================= Thumb (Handle) ========================= -->\n <div\n class=\"zs:absolute zs:top-1/2 zs:rounded-full zs:flex zs:items-center zs:justify-center \n zs:-translate-y-1/2 zs:transition-all zs:duration-200 zs:ease-out zs:shadow-md \n zs:group-hover:scale-110\"\n [style.left]=\"calcThumbPosition()\"\n [ngClass]=\"[ThumbClasses(), disabledOrReadonly() ? 'zs:cursor-not-allowed' : '']\"\n role=\"slider\"\n tabindex=\"0\"\n [attr.id]=\"Id()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-disabled]=\"disabledOrReadonly() || null\"\n [attr.aria-readonly]=\"isReadonly() || null\"\n [attr.aria-labelledby]=\"Id() + '-label'\"\n [attr.aria-describedby]=\"hint() ? Id() + '-hint' : null\"\n aria-orientation=\"horizontal\"\n >\n <i class=\"fa-solid fa-circle zs:text-white\" [ngClass]=\"dotCLasses()\"></i>\n </div>\n </div>\n\n <!-- ========================= Value Display ========================= -->\n @if (showValue()) {\n <div class=\"zs:text-sm zs:text-gray-600 zs:dark:text-gray-300 zs:font-medium\">\n {{ value() }}\n </div>\n }\n </div>\n</div>", styles: [".thumb-active{transition:transform .1s ease-in-out}\n"], dependencies: [{ kind: "component", type: Label, selector: "ZS-label", inputs: ["label", "hint", "hintId", "size", "required", "for"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2852
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: Range, isStandalone: true, selector: "ZS-range", inputs: { Id: { classPropertyName: "Id", publicName: "Id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, viewQueries: [{ propertyName: "trackRef", first: true, predicate: ["track"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- ========================= Label ========================= -->\n<div class=\"zs:flex zs:flex-col zs:w-full zs:select-none\">\n <ZS-label [class]=\"(label() || hint()) ? 'zs:mb-1' : ''\"\n [label]=\"label()\"\n [hint]=\"hint()\"\n [hintId]=\"Id() + '-hint'\"\n [size]=\"size()\"\n [for]=\"Id()\"\n ></ZS-label>\n\n <!-- ========================= Slider Container ========================= -->\n <div class=\"zs:flex zs:items-center\"\n [class]=\"gapCLasses()\">\n \n <!-- ========================= Track ========================= -->\n <div\n #track\n [class]=\"rangeClasses()\"\n (mousedown)=\"onMouseDown($event)\"\n >\n \n <!-- ========================= Track Background ========================= -->\n <div\n class=\"zs:absolute zs:inset-0 zs:rounded-full zs:bg-linear-to-r zs:from-gray-200 zs:to-gray-300 zs:transition-all zs:duration-300 zs:group-hover:brightness-110\"\n [ngClass]=\"[\n ['secondary', 'dark'].includes(inputStyle()) ? 'zs:dark:from-gray-500 zs:dark:to-gray-600' : 'zs:dark:from-gray-700 zs:dark:to-gray-800',\n disabledOrReadonly() ? 'zs:cursor-not-allowed' : ''\n ]\"\n ></div>\n\n <!-- ========================= Fill (Progress) ========================= -->\n <div\n class=\"zs:absolute zs:left-0 zs:rounded-full zs:top-0 zs:h-full zs:transition-all zs:duration-200 zs:ease-out zs:shadow-sm\"\n [style.width.%]=\"percent()\"\n [ngClass]=\"[\n disabledOrReadonly() ? 'zs:cursor-not-allowed' : '',\n palette().buttonSolidPalette.btnBG,\n palette().buttonSolidPalette.btnBGHover\n ]\"\n ></div>\n\n <!-- ========================= Thumb (Handle) ========================= -->\n <div\n class=\"zs:absolute zs:top-1/2 zs:rounded-full zs:flex zs:items-center zs:justify-center \n zs:-translate-y-1/2 zs:transition-all zs:duration-200 zs:ease-out zs:shadow-md \n zs:group-hover:scale-110\"\n [style.left]=\"calcThumbPosition()\"\n [ngClass]=\"[ThumbClasses(), disabledOrReadonly() ? 'zs:cursor-not-allowed' : '']\"\n role=\"slider\"\n tabindex=\"0\"\n [attr.id]=\"Id()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-disabled]=\"disabledOrReadonly() || null\"\n [attr.aria-readonly]=\"isReadonly() || null\"\n [attr.aria-labelledby]=\"Id() + '-label'\"\n [attr.aria-describedby]=\"hint() ? Id() + '-hint' : null\"\n aria-orientation=\"horizontal\"\n >\n <i class=\"fa-solid fa-circle zs:text-white\" [ngClass]=\"dotCLasses()\"></i>\n </div>\n </div>\n\n <!-- ========================= Value Display ========================= -->\n @if (showValue()) {\n <div class=\"zs:text-sm zs:text-gray-600 zs:dark:text-gray-300 zs:font-medium\">\n {{ value() }}\n </div>\n }\n </div>\n</div>", styles: [".thumb-active{transition:transform .1s ease-in-out}\n"], dependencies: [{ kind: "component", type: Label, selector: "ZS-label", inputs: ["label", "hint", "hintId", "size", "required", "for"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2565
2853
|
}
|
|
2566
2854
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Range, decorators: [{
|
|
2567
2855
|
type: Component,
|
|
2568
|
-
args: [{ selector: 'ZS-range', imports: [Label, CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- ========================= Label ========================= -->\n<div class=\"zs:flex zs:flex-col zs:w-full zs:select-none\">\n <ZS-label [class]=\"(label() || hint()) ? 'zs:mb-1' : ''\"\n [label]=\"label()\"\n [hint]=\"hint()\"\n [hintId]=\"Id() + '-hint'\"\n [size]=\"size()\"\n [for]=\"Id()\"\n ></ZS-label>\n\n <!-- ========================= Slider Container ========================= -->\n <div class=\"zs:flex zs:items-center\"\n [class]=\"gapCLasses()\">\n \n <!-- ========================= Track ========================= -->\n <div\n #track\n [class]=\"rangeClasses()\"\n (mousedown)=\"onMouseDown($event)\"\n >\n \n <!-- ========================= Track Background ========================= -->\n <div\n class=\"zs:absolute zs:inset-0 zs:rounded-full zs:bg-linear-to-r zs:from-gray-200 zs:to-gray-300 zs:transition-all zs:duration-300 zs:group-hover:brightness-110\"\n [ngClass]=\"[\n ['secondary', 'dark'].includes(inputStyle()) ? 'zs:dark:from-gray-500 zs:dark:to-gray-600' : 'zs:dark:from-gray-700 zs:dark:to-gray-800',\n disabledOrReadonly() ? 'zs:cursor-not-allowed' : ''\n ]\"\n ></div>\n\n <!-- ========================= Fill (Progress) ========================= -->\n <div\n class=\"zs:absolute zs:left-0 zs:rounded-full zs:top-0 zs:h-full zs:transition-all zs:duration-200 zs:ease-out zs:shadow-sm\"\n [style.width.%]=\"percent()\"\n [ngClass]=\"[\n disabledOrReadonly() ? 'zs:cursor-not-allowed' : '',\n palette().btnBG,\n palette().btnBGHover\n ]\"\n ></div>\n\n <!-- ========================= Thumb (Handle) ========================= -->\n <div\n class=\"zs:absolute zs:top-1/2 zs:rounded-full zs:flex zs:items-center zs:justify-center \n zs:-translate-y-1/2 zs:transition-all zs:duration-200 zs:ease-out zs:shadow-md \n zs:group-hover:scale-110\"\n [style.left]=\"calcThumbPosition()\"\n [ngClass]=\"[ThumbClasses(), disabledOrReadonly() ? 'zs:cursor-not-allowed' : '']\"\n role=\"slider\"\n tabindex=\"0\"\n [attr.id]=\"Id()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-disabled]=\"disabledOrReadonly() || null\"\n [attr.aria-readonly]=\"isReadonly() || null\"\n [attr.aria-labelledby]=\"Id() + '-label'\"\n [attr.aria-describedby]=\"hint() ? Id() + '-hint' : null\"\n aria-orientation=\"horizontal\"\n >\n <i class=\"fa-solid fa-circle zs:text-white\" [ngClass]=\"dotCLasses()\"></i>\n </div>\n </div>\n\n <!-- ========================= Value Display ========================= -->\n @if (showValue()) {\n <div class=\"zs:text-sm zs:text-gray-600 zs:dark:text-gray-300 zs:font-medium\">\n {{ value() }}\n </div>\n }\n </div>\n</div>", styles: [".thumb-active{transition:transform .1s ease-in-out}\n"] }]
|
|
2856
|
+
args: [{ selector: 'ZS-range', imports: [Label, CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- ========================= Label ========================= -->\n<div class=\"zs:flex zs:flex-col zs:w-full zs:select-none\">\n <ZS-label [class]=\"(label() || hint()) ? 'zs:mb-1' : ''\"\n [label]=\"label()\"\n [hint]=\"hint()\"\n [hintId]=\"Id() + '-hint'\"\n [size]=\"size()\"\n [for]=\"Id()\"\n ></ZS-label>\n\n <!-- ========================= Slider Container ========================= -->\n <div class=\"zs:flex zs:items-center\"\n [class]=\"gapCLasses()\">\n \n <!-- ========================= Track ========================= -->\n <div\n #track\n [class]=\"rangeClasses()\"\n (mousedown)=\"onMouseDown($event)\"\n >\n \n <!-- ========================= Track Background ========================= -->\n <div\n class=\"zs:absolute zs:inset-0 zs:rounded-full zs:bg-linear-to-r zs:from-gray-200 zs:to-gray-300 zs:transition-all zs:duration-300 zs:group-hover:brightness-110\"\n [ngClass]=\"[\n ['secondary', 'dark'].includes(inputStyle()) ? 'zs:dark:from-gray-500 zs:dark:to-gray-600' : 'zs:dark:from-gray-700 zs:dark:to-gray-800',\n disabledOrReadonly() ? 'zs:cursor-not-allowed' : ''\n ]\"\n ></div>\n\n <!-- ========================= Fill (Progress) ========================= -->\n <div\n class=\"zs:absolute zs:left-0 zs:rounded-full zs:top-0 zs:h-full zs:transition-all zs:duration-200 zs:ease-out zs:shadow-sm\"\n [style.width.%]=\"percent()\"\n [ngClass]=\"[\n disabledOrReadonly() ? 'zs:cursor-not-allowed' : '',\n palette().buttonSolidPalette.btnBG,\n palette().buttonSolidPalette.btnBGHover\n ]\"\n ></div>\n\n <!-- ========================= Thumb (Handle) ========================= -->\n <div\n class=\"zs:absolute zs:top-1/2 zs:rounded-full zs:flex zs:items-center zs:justify-center \n zs:-translate-y-1/2 zs:transition-all zs:duration-200 zs:ease-out zs:shadow-md \n zs:group-hover:scale-110\"\n [style.left]=\"calcThumbPosition()\"\n [ngClass]=\"[ThumbClasses(), disabledOrReadonly() ? 'zs:cursor-not-allowed' : '']\"\n role=\"slider\"\n tabindex=\"0\"\n [attr.id]=\"Id()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-disabled]=\"disabledOrReadonly() || null\"\n [attr.aria-readonly]=\"isReadonly() || null\"\n [attr.aria-labelledby]=\"Id() + '-label'\"\n [attr.aria-describedby]=\"hint() ? Id() + '-hint' : null\"\n aria-orientation=\"horizontal\"\n >\n <i class=\"fa-solid fa-circle zs:text-white\" [ngClass]=\"dotCLasses()\"></i>\n </div>\n </div>\n\n <!-- ========================= Value Display ========================= -->\n @if (showValue()) {\n <div class=\"zs:text-sm zs:text-gray-600 zs:dark:text-gray-300 zs:font-medium\">\n {{ value() }}\n </div>\n }\n </div>\n</div>", styles: [".thumb-active{transition:transform .1s ease-in-out}\n"] }]
|
|
2569
2857
|
}], ctorParameters: () => [], propDecorators: { Id: [{ type: i0.Input, args: [{ isSignal: true, alias: "Id", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], isReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "isReadonly", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], trackRef: [{ type: i0.ViewChild, args: ['track', { isSignal: true }] }] } });
|
|
2570
2858
|
|
|
2571
2859
|
// =================================================================================================
|
|
@@ -2617,11 +2905,13 @@ class Select {
|
|
|
2617
2905
|
// =================================================================================================
|
|
2618
2906
|
styleEntry = computed(() => {
|
|
2619
2907
|
const hasError = this.error().length;
|
|
2620
|
-
let
|
|
2908
|
+
let inputEntry = inputPaletteMap.get(this.inputStyle());
|
|
2909
|
+
let selectEntry = selectPaletteMap.get(this.inputStyle());
|
|
2621
2910
|
if (hasError) {
|
|
2622
|
-
|
|
2911
|
+
selectEntry = selectPaletteMap.get('danger');
|
|
2912
|
+
inputEntry = inputPaletteMap.get('danger');
|
|
2623
2913
|
}
|
|
2624
|
-
return
|
|
2914
|
+
return { inputEntry, selectEntry };
|
|
2625
2915
|
}, ...(ngDevMode ? [{ debugName: "styleEntry" }] : []));
|
|
2626
2916
|
disabledOrReadonly = computed(() => this.disabled() || this.isReadonly(), ...(ngDevMode ? [{ debugName: "disabledOrReadonly" }] : []));
|
|
2627
2917
|
filteredItems = computed(() => {
|
|
@@ -2642,22 +2932,27 @@ class Select {
|
|
|
2642
2932
|
const cursorCls = this.disabledOrReadonly()
|
|
2643
2933
|
? 'zs:cursor-not-allowed'
|
|
2644
2934
|
: 'zs:cursor-text';
|
|
2935
|
+
const inputEntry = this.styleEntry().inputEntry;
|
|
2645
2936
|
return [
|
|
2646
2937
|
base,
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2938
|
+
inputEntry.border,
|
|
2939
|
+
inputEntry.borderHover,
|
|
2940
|
+
inputEntry.inputBg,
|
|
2941
|
+
inputEntry.text,
|
|
2651
2942
|
disabledCls,
|
|
2652
2943
|
cursorCls
|
|
2653
2944
|
].filter(Boolean).join(' ');
|
|
2654
2945
|
}, ...(ngDevMode ? [{ debugName: "containerClasses" }] : []));
|
|
2655
2946
|
clearClass = computed(() => {
|
|
2656
2947
|
const base = 'zs:mt-2 zs:text-sm zs:flex zs:items-center zs:transition-colors';
|
|
2657
|
-
return [
|
|
2948
|
+
return [
|
|
2949
|
+
base,
|
|
2950
|
+
this.styleEntry().selectEntry.cleartext,
|
|
2951
|
+
this.styleEntry().selectEntry.cleartexthover
|
|
2952
|
+
].filter(Boolean).join(' ');
|
|
2658
2953
|
}, ...(ngDevMode ? [{ debugName: "clearClass" }] : []));
|
|
2659
2954
|
showItemsClass = computed(() => {
|
|
2660
|
-
return this.styleEntry()
|
|
2955
|
+
return this.styleEntry().selectEntry.bgSelect ?? '';
|
|
2661
2956
|
}, ...(ngDevMode ? [{ debugName: "showItemsClass" }] : []));
|
|
2662
2957
|
error = computed(() => {
|
|
2663
2958
|
const selectedItems = this.selectedItems();
|
|
@@ -2683,7 +2978,7 @@ class Select {
|
|
|
2683
2978
|
// =================================================================================================
|
|
2684
2979
|
getBgSelectClasses = (selected) => {
|
|
2685
2980
|
return selected
|
|
2686
|
-
? `${this.styleEntry().bgSelect} zs:hover:opacity-80`
|
|
2981
|
+
? `${this.styleEntry().selectEntry.bgSelect} zs:hover:opacity-80`
|
|
2687
2982
|
: 'zs:hover:bg-gray-200/50 zs:dark:hover:bg-gray-600/40';
|
|
2688
2983
|
};
|
|
2689
2984
|
// =================================================================================================
|
|
@@ -2863,5 +3158,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
2863
3158
|
* Generated bundle index. Do not edit.
|
|
2864
3159
|
*/
|
|
2865
3160
|
|
|
2866
|
-
export { ALERT_CONFIG, Alert, AlertService, Button, Card, Carousel, Checkbox, ColorMapping, Connection, ExtractorService, FileInput, Form,
|
|
3161
|
+
export { ALERT_CONFIG, Alert, AlertService, Button, Card, Carousel, Checkbox, ColorMapping, Connection, ExtractorService, FileInput, Form, Input, InputErrors, Label, Modal, NavItem, NavItemService, Navbar, NgxZsComponent, Page404, Pagination, Range, ScrollToTop, Select, Spinner, ThemeToggle, Toggle, buttonOutlinePaletteMap, buttonSolidPaletteMap, cardPaletteMap, checkboxTextPaletteMap, inputPaletteMap, modalPaletteMap, page404PaletteMap, ringPaletteMap, selectPaletteMap, unifiedPaletteMap };
|
|
2867
3162
|
//# sourceMappingURL=ziadshalaby-ngx-zs-component.mjs.map
|