zenkit-css 1.2.1 → 1.2.3

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.
@@ -237,3 +237,382 @@
237
237
  --nav-link-padding-y: 0.625rem;
238
238
  --nav-link-font-size: var(--text-lg);
239
239
  }
240
+
241
+ // ----------------------------------------
242
+ // Closable Tabs
243
+ // ----------------------------------------
244
+ .nav-link-closable {
245
+ display: inline-flex;
246
+ align-items: center;
247
+ gap: 0.5rem;
248
+ }
249
+
250
+ .nav-link-close {
251
+ display: inline-flex;
252
+ align-items: center;
253
+ justify-content: center;
254
+ width: 1.25rem;
255
+ height: 1.25rem;
256
+ margin-left: 0.25rem;
257
+ margin-right: -0.25rem;
258
+ padding: 0;
259
+ color: currentColor;
260
+ background-color: transparent;
261
+ border: none;
262
+ border-radius: var(--radius-full);
263
+ cursor: pointer;
264
+ opacity: 0.5;
265
+ transition: opacity $transition-fast ease-in-out,
266
+ background-color $transition-fast ease-in-out;
267
+
268
+ svg {
269
+ width: 0.75rem;
270
+ height: 0.75rem;
271
+ }
272
+
273
+ &:hover {
274
+ opacity: 1;
275
+ background-color: rgba(0, 0, 0, 0.1);
276
+ }
277
+ }
278
+
279
+ .nav-pills .nav-link.active .nav-link-close:hover {
280
+ background-color: rgba(255, 255, 255, 0.2);
281
+ }
282
+
283
+ // ----------------------------------------
284
+ // Scrollable Tabs
285
+ // ----------------------------------------
286
+ .nav-tabs-scrollable {
287
+ position: relative;
288
+ display: flex;
289
+ align-items: center;
290
+
291
+ .nav-tabs-scroll-container {
292
+ overflow-x: auto;
293
+ overflow-y: hidden;
294
+ -webkit-overflow-scrolling: touch;
295
+ scrollbar-width: none;
296
+ -ms-overflow-style: none;
297
+
298
+ &::-webkit-scrollbar {
299
+ display: none;
300
+ }
301
+ }
302
+
303
+ .nav {
304
+ flex-wrap: nowrap;
305
+ }
306
+
307
+ .nav-link {
308
+ white-space: nowrap;
309
+ }
310
+ }
311
+
312
+ // Scroll buttons
313
+ .nav-tabs-scroll-btn {
314
+ position: absolute;
315
+ top: 0;
316
+ bottom: 0;
317
+ display: flex;
318
+ align-items: center;
319
+ justify-content: center;
320
+ width: 2rem;
321
+ padding: 0;
322
+ color: var(--text-muted);
323
+ background-color: var(--bg);
324
+ border: none;
325
+ cursor: pointer;
326
+ z-index: 1;
327
+ transition: color $transition-fast ease-in-out,
328
+ opacity $transition-fast ease-in-out;
329
+
330
+ svg {
331
+ width: 1rem;
332
+ height: 1rem;
333
+ }
334
+
335
+ &:hover {
336
+ color: var(--text);
337
+ }
338
+
339
+ &:disabled {
340
+ opacity: 0.3;
341
+ cursor: not-allowed;
342
+ }
343
+ }
344
+
345
+ .nav-tabs-scroll-btn-start {
346
+ left: 0;
347
+ background: linear-gradient(to right, var(--bg) 60%, transparent);
348
+ padding-right: 0.5rem;
349
+ }
350
+
351
+ .nav-tabs-scroll-btn-end {
352
+ right: 0;
353
+ background: linear-gradient(to left, var(--bg) 60%, transparent);
354
+ padding-left: 0.5rem;
355
+ }
356
+
357
+ // ----------------------------------------
358
+ // Tab with Icon
359
+ // ----------------------------------------
360
+ .nav-link-icon {
361
+ display: inline-flex;
362
+ align-items: center;
363
+ justify-content: center;
364
+ margin-right: 0.5rem;
365
+
366
+ svg {
367
+ width: 1rem;
368
+ height: 1rem;
369
+ }
370
+ }
371
+
372
+ .nav-link-icon-only {
373
+ padding: var(--nav-link-padding-y);
374
+
375
+ svg {
376
+ width: 1.25rem;
377
+ height: 1.25rem;
378
+ }
379
+ }
380
+
381
+ // ----------------------------------------
382
+ // Tab Badge
383
+ // ----------------------------------------
384
+ .nav-link-badge {
385
+ display: inline-flex;
386
+ align-items: center;
387
+ justify-content: center;
388
+ min-width: 1.25rem;
389
+ height: 1.25rem;
390
+ margin-left: 0.5rem;
391
+ padding: 0 0.375rem;
392
+ font-size: var(--text-xs);
393
+ font-weight: $font-weight-semibold;
394
+ color: var(--white);
395
+ background-color: var(--primary);
396
+ border-radius: var(--radius-full);
397
+ }
398
+
399
+ .nav-link.active .nav-link-badge {
400
+ background-color: var(--white);
401
+ color: var(--primary);
402
+ }
403
+
404
+ .nav-pills .nav-link.active .nav-link-badge {
405
+ background-color: rgba(255, 255, 255, 0.3);
406
+ color: var(--white);
407
+ }
408
+
409
+ // ----------------------------------------
410
+ // Tabs with Dividers
411
+ // ----------------------------------------
412
+ .nav-tabs-divided {
413
+ .nav-item:not(:last-child)::after {
414
+ content: "";
415
+ display: block;
416
+ width: 1px;
417
+ height: 1rem;
418
+ background-color: var(--border);
419
+ margin: 0 0.5rem;
420
+ align-self: center;
421
+ }
422
+
423
+ .nav-item {
424
+ display: flex;
425
+ align-items: center;
426
+ }
427
+ }
428
+
429
+ // ----------------------------------------
430
+ // Animated Tabs Indicator
431
+ // ----------------------------------------
432
+ .nav-tabs-animated {
433
+ position: relative;
434
+
435
+ .nav-tabs-indicator {
436
+ position: absolute;
437
+ bottom: 0;
438
+ left: 0;
439
+ height: 2px;
440
+ background-color: var(--primary);
441
+ transition: transform $transition-base ease-in-out,
442
+ width $transition-base ease-in-out;
443
+ }
444
+ }
445
+
446
+ // ----------------------------------------
447
+ // Segmented Control Style
448
+ // ----------------------------------------
449
+ .nav-segmented {
450
+ display: inline-flex;
451
+ padding: 0.25rem;
452
+ background-color: var(--gray-100);
453
+ border-radius: var(--radius);
454
+ gap: 0.25rem;
455
+
456
+ .nav-link {
457
+ padding: 0.375rem 0.75rem;
458
+ font-size: var(--text-sm);
459
+ font-weight: $font-weight-medium;
460
+ color: var(--text-muted);
461
+ background-color: transparent;
462
+ border-radius: calc(var(--radius) - 2px);
463
+ transition: color $transition-fast ease-in-out,
464
+ background-color $transition-fast ease-in-out,
465
+ box-shadow $transition-fast ease-in-out;
466
+
467
+ &:hover {
468
+ color: var(--text);
469
+ }
470
+
471
+ &.active {
472
+ color: var(--text);
473
+ background-color: var(--bg);
474
+ box-shadow: var(--shadow-sm);
475
+ }
476
+ }
477
+ }
478
+
479
+ // ----------------------------------------
480
+ // Tabs Card Style
481
+ // ----------------------------------------
482
+ .nav-tabs-card {
483
+ background-color: var(--bg-muted);
484
+ border-radius: var(--radius) var(--radius) 0 0;
485
+ padding: 0.5rem 0.5rem 0;
486
+
487
+ .nav-link {
488
+ border-radius: var(--radius) var(--radius) 0 0;
489
+ margin-bottom: 0;
490
+
491
+ &.active {
492
+ background-color: var(--bg);
493
+ }
494
+ }
495
+ }
496
+
497
+ // ----------------------------------------
498
+ // Tabs Centered
499
+ // ----------------------------------------
500
+ .nav-centered {
501
+ justify-content: center;
502
+ }
503
+
504
+ .nav-end {
505
+ justify-content: flex-end;
506
+ }
507
+
508
+ // ----------------------------------------
509
+ // Tabs with Add Button
510
+ // ----------------------------------------
511
+ .nav-tabs-addable {
512
+ .nav-add-btn {
513
+ display: flex;
514
+ align-items: center;
515
+ justify-content: center;
516
+ width: 2rem;
517
+ height: 2rem;
518
+ margin-left: 0.25rem;
519
+ padding: 0;
520
+ color: var(--text-muted);
521
+ background-color: transparent;
522
+ border: 1px dashed var(--border);
523
+ border-radius: var(--radius);
524
+ cursor: pointer;
525
+ transition: color $transition-fast ease-in-out,
526
+ border-color $transition-fast ease-in-out,
527
+ background-color $transition-fast ease-in-out;
528
+
529
+ svg {
530
+ width: 1rem;
531
+ height: 1rem;
532
+ }
533
+
534
+ &:hover {
535
+ color: var(--primary);
536
+ border-color: var(--primary);
537
+ background-color: var(--primary-50);
538
+ }
539
+ }
540
+ }
541
+
542
+ // ----------------------------------------
543
+ // Tab Loading State
544
+ // ----------------------------------------
545
+ .nav-link-loading {
546
+ position: relative;
547
+ pointer-events: none;
548
+
549
+ &::after {
550
+ content: "";
551
+ position: absolute;
552
+ top: 50%;
553
+ left: 50%;
554
+ transform: translate(-50%, -50%);
555
+ width: 1rem;
556
+ height: 1rem;
557
+ border: 2px solid currentColor;
558
+ border-top-color: transparent;
559
+ border-radius: 50%;
560
+ animation: nav-link-spin 0.6s linear infinite;
561
+ opacity: 0.7;
562
+ }
563
+
564
+ > * {
565
+ opacity: 0;
566
+ }
567
+ }
568
+
569
+ @keyframes nav-link-spin {
570
+ to {
571
+ transform: translate(-50%, -50%) rotate(360deg);
572
+ }
573
+ }
574
+
575
+ // ----------------------------------------
576
+ // Dark Mode Enhancements
577
+ // ----------------------------------------
578
+ [data-theme="dark"] {
579
+ .nav-link-close:hover {
580
+ background-color: rgba(255, 255, 255, 0.1);
581
+ }
582
+
583
+ .nav-tabs-scroll-btn {
584
+ background-color: var(--gray-900);
585
+ }
586
+
587
+ .nav-tabs-scroll-btn-start {
588
+ background: linear-gradient(to right, var(--gray-900) 60%, transparent);
589
+ }
590
+
591
+ .nav-tabs-scroll-btn-end {
592
+ background: linear-gradient(to left, var(--gray-900) 60%, transparent);
593
+ }
594
+
595
+ .nav-segmented {
596
+ background-color: var(--gray-800);
597
+
598
+ .nav-link.active {
599
+ background-color: var(--gray-700);
600
+ }
601
+ }
602
+
603
+ .nav-tabs-card {
604
+ background-color: var(--gray-800);
605
+
606
+ .nav-link.active {
607
+ background-color: var(--gray-900);
608
+ }
609
+ }
610
+
611
+ .nav-tabs-addable .nav-add-btn {
612
+ border-color: var(--gray-600);
613
+
614
+ &:hover {
615
+ background-color: rgba($primary, 0.1);
616
+ }
617
+ }
618
+ }
@@ -277,3 +277,338 @@
277
277
  color: var(--text-muted);
278
278
  }
279
279
  }
280
+
281
+ // ----------------------------------------
282
+ // Toast Progress Bar
283
+ // ----------------------------------------
284
+ .toast-progress {
285
+ position: absolute;
286
+ bottom: 0;
287
+ left: 0;
288
+ height: 3px;
289
+ background-color: currentColor;
290
+ opacity: 0.3;
291
+ border-radius: 0 0 var(--toast-border-radius) var(--toast-border-radius);
292
+ animation: toast-progress-countdown 5s linear forwards;
293
+ }
294
+
295
+ .toast-progress-primary {
296
+ background-color: var(--primary);
297
+ }
298
+
299
+ .toast-progress-success {
300
+ background-color: var(--success);
301
+ }
302
+
303
+ .toast-progress-danger {
304
+ background-color: var(--danger);
305
+ }
306
+
307
+ .toast-progress-warning {
308
+ background-color: var(--warning);
309
+ }
310
+
311
+ .toast-progress-info {
312
+ background-color: var(--info);
313
+ }
314
+
315
+ // Progress animation durations
316
+ .toast-progress-3s {
317
+ animation-duration: 3s;
318
+ }
319
+
320
+ .toast-progress-5s {
321
+ animation-duration: 5s;
322
+ }
323
+
324
+ .toast-progress-10s {
325
+ animation-duration: 10s;
326
+ }
327
+
328
+ @keyframes toast-progress-countdown {
329
+ from {
330
+ width: 100%;
331
+ }
332
+ to {
333
+ width: 0%;
334
+ }
335
+ }
336
+
337
+ // Pause progress on hover
338
+ .toast:hover .toast-progress {
339
+ animation-play-state: paused;
340
+ }
341
+
342
+ // ----------------------------------------
343
+ // Toast Actions
344
+ // ----------------------------------------
345
+ .toast-actions {
346
+ display: flex;
347
+ align-items: center;
348
+ gap: 0.5rem;
349
+ margin-left: auto;
350
+ padding-left: 0.75rem;
351
+ }
352
+
353
+ .toast-action-btn {
354
+ display: inline-flex;
355
+ align-items: center;
356
+ justify-content: center;
357
+ padding: 0.25rem 0.75rem;
358
+ font-size: var(--text-xs);
359
+ font-weight: $font-weight-medium;
360
+ color: inherit;
361
+ background-color: rgba(255, 255, 255, 0.2);
362
+ border: none;
363
+ border-radius: var(--radius-sm);
364
+ cursor: pointer;
365
+ transition: background-color $transition-fast ease-in-out;
366
+ white-space: nowrap;
367
+
368
+ &:hover {
369
+ background-color: rgba(255, 255, 255, 0.3);
370
+ }
371
+ }
372
+
373
+ .toast-action-link {
374
+ display: inline-flex;
375
+ align-items: center;
376
+ padding: 0.25rem 0;
377
+ font-size: var(--text-xs);
378
+ font-weight: $font-weight-medium;
379
+ color: inherit;
380
+ text-decoration: underline;
381
+ text-underline-offset: 2px;
382
+ background: none;
383
+ border: none;
384
+ cursor: pointer;
385
+ transition: opacity $transition-fast ease-in-out;
386
+
387
+ &:hover {
388
+ opacity: 0.8;
389
+ }
390
+ }
391
+
392
+ // Light toast action styles
393
+ .toast-light .toast-action-btn,
394
+ .toast:not([class*="toast-"]) .toast-action-btn {
395
+ color: var(--text);
396
+ background-color: var(--gray-200);
397
+
398
+ &:hover {
399
+ background-color: var(--gray-300);
400
+ }
401
+ }
402
+
403
+ // ----------------------------------------
404
+ // Toast with Actions Layout
405
+ // ----------------------------------------
406
+ .toast-with-actions {
407
+ .toast-body {
408
+ display: flex;
409
+ align-items: center;
410
+ justify-content: space-between;
411
+ gap: 1rem;
412
+ }
413
+
414
+ .toast-content {
415
+ flex: 1;
416
+ min-width: 0;
417
+ }
418
+ }
419
+
420
+ // ----------------------------------------
421
+ // Toast Undo Action
422
+ // ----------------------------------------
423
+ .toast-undo {
424
+ .toast-body {
425
+ display: flex;
426
+ align-items: center;
427
+ gap: 1rem;
428
+ }
429
+
430
+ .toast-undo-btn {
431
+ display: inline-flex;
432
+ align-items: center;
433
+ padding: 0.25rem 0.5rem;
434
+ font-size: var(--text-sm);
435
+ font-weight: $font-weight-semibold;
436
+ color: var(--primary);
437
+ background: transparent;
438
+ border: none;
439
+ cursor: pointer;
440
+ transition: opacity $transition-fast ease-in-out;
441
+
442
+ &:hover {
443
+ opacity: 0.8;
444
+ }
445
+ }
446
+ }
447
+
448
+ // ----------------------------------------
449
+ // Toast Close Button Enhancement
450
+ // ----------------------------------------
451
+ .toast-close {
452
+ display: flex;
453
+ align-items: center;
454
+ justify-content: center;
455
+ width: 1.5rem;
456
+ height: 1.5rem;
457
+ margin-left: auto;
458
+ padding: 0;
459
+ color: currentColor;
460
+ background: transparent;
461
+ border: none;
462
+ border-radius: var(--radius-sm);
463
+ cursor: pointer;
464
+ opacity: 0.5;
465
+ transition: opacity $transition-fast ease-in-out,
466
+ background-color $transition-fast ease-in-out;
467
+
468
+ svg {
469
+ width: 0.875rem;
470
+ height: 0.875rem;
471
+ }
472
+
473
+ &:hover {
474
+ opacity: 1;
475
+ background-color: rgba(0, 0, 0, 0.1);
476
+ }
477
+ }
478
+
479
+ .toast-dark .toast-close:hover,
480
+ .toast-primary .toast-close:hover,
481
+ .toast-success .toast-close:hover,
482
+ .toast-danger .toast-close:hover,
483
+ .toast-info .toast-close:hover {
484
+ background-color: rgba(255, 255, 255, 0.2);
485
+ }
486
+
487
+ // ----------------------------------------
488
+ // Toast Promise States
489
+ // ----------------------------------------
490
+ .toast-loading {
491
+ .toast-loading-icon {
492
+ display: flex;
493
+ align-items: center;
494
+ justify-content: center;
495
+ width: 1.5rem;
496
+ height: 1.5rem;
497
+
498
+ &::after {
499
+ content: "";
500
+ width: 1rem;
501
+ height: 1rem;
502
+ border: 2px solid currentColor;
503
+ border-top-color: transparent;
504
+ border-radius: 50%;
505
+ animation: toast-spin 0.6s linear infinite;
506
+ }
507
+ }
508
+ }
509
+
510
+ @keyframes toast-spin {
511
+ to {
512
+ transform: rotate(360deg);
513
+ }
514
+ }
515
+
516
+ // ----------------------------------------
517
+ // Toast Slide Animations
518
+ // ----------------------------------------
519
+ .toast-slide-right {
520
+ animation: toast-slide-in-right $transition-base ease-out;
521
+ }
522
+
523
+ .toast-slide-left {
524
+ animation: toast-slide-in-left $transition-base ease-out;
525
+ }
526
+
527
+ .toast-slide-up {
528
+ animation: toast-slide-in-up $transition-base ease-out;
529
+ }
530
+
531
+ .toast-slide-down {
532
+ animation: toast-slide-in-down $transition-base ease-out;
533
+ }
534
+
535
+ @keyframes toast-slide-in-right {
536
+ from {
537
+ transform: translateX(100%);
538
+ opacity: 0;
539
+ }
540
+ to {
541
+ transform: translateX(0);
542
+ opacity: 1;
543
+ }
544
+ }
545
+
546
+ @keyframes toast-slide-in-left {
547
+ from {
548
+ transform: translateX(-100%);
549
+ opacity: 0;
550
+ }
551
+ to {
552
+ transform: translateX(0);
553
+ opacity: 1;
554
+ }
555
+ }
556
+
557
+ @keyframes toast-slide-in-up {
558
+ from {
559
+ transform: translateY(100%);
560
+ opacity: 0;
561
+ }
562
+ to {
563
+ transform: translateY(0);
564
+ opacity: 1;
565
+ }
566
+ }
567
+
568
+ @keyframes toast-slide-in-down {
569
+ from {
570
+ transform: translateY(-100%);
571
+ opacity: 0;
572
+ }
573
+ to {
574
+ transform: translateY(0);
575
+ opacity: 1;
576
+ }
577
+ }
578
+
579
+ // ----------------------------------------
580
+ // Toast Compact
581
+ // ----------------------------------------
582
+ .toast-compact {
583
+ --toast-padding-x: 0.5rem;
584
+ --toast-padding-y: 0.375rem;
585
+ --toast-max-width: 280px;
586
+ --toast-font-size: var(--text-xs);
587
+ }
588
+
589
+ // ----------------------------------------
590
+ // Toast Wide
591
+ // ----------------------------------------
592
+ .toast-wide {
593
+ --toast-max-width: 500px;
594
+ }
595
+
596
+ // ----------------------------------------
597
+ // Dark Mode
598
+ // ----------------------------------------
599
+ [data-theme="dark"] {
600
+ .toast {
601
+ --toast-bg: var(--gray-800);
602
+ --toast-border-color: var(--gray-700);
603
+ --toast-header-bg: var(--gray-900);
604
+ }
605
+
606
+ .toast-light .toast-action-btn,
607
+ .toast:not([class*="toast-"]) .toast-action-btn {
608
+ background-color: var(--gray-700);
609
+
610
+ &:hover {
611
+ background-color: var(--gray-600);
612
+ }
613
+ }
614
+ }