analytica-frontend-lib 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +302 -97
- package/dist/index.d.mts +15 -8
- package/dist/index.d.ts +15 -8
- package/dist/index.js +42 -31
- package/dist/index.mjs +43 -32
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -26,8 +26,6 @@
|
|
|
26
26
|
--text-xs--line-height: calc(1 / 0.75);
|
|
27
27
|
--text-sm: 0.875rem;
|
|
28
28
|
--text-sm--line-height: calc(1.25 / 0.875);
|
|
29
|
-
--text-base: 1rem;
|
|
30
|
-
--text-base--line-height: calc(1.5 / 1);
|
|
31
29
|
--text-lg: 1.125rem;
|
|
32
30
|
--text-lg--line-height: calc(1.75 / 1.125);
|
|
33
31
|
--text-xl: 1.25rem;
|
|
@@ -49,21 +47,31 @@
|
|
|
49
47
|
--font-weight-bold: 700;
|
|
50
48
|
--font-weight-extrabold: 800;
|
|
51
49
|
--font-weight-black: 900;
|
|
52
|
-
--default-transition-duration: 150ms;
|
|
53
|
-
--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
54
50
|
--default-font-family: var(--font-sans);
|
|
55
51
|
--default-mono-font-family: var(--font-mono);
|
|
52
|
+
--color-primary-400: #525252;
|
|
53
|
+
--color-primary-500: #333333;
|
|
56
54
|
--color-primary-600: #292929;
|
|
57
55
|
--color-primary-700: #1f1f1f;
|
|
56
|
+
--color-primary-800: #0d0d0d;
|
|
58
57
|
--color-primary-950: #080808;
|
|
59
|
-
--color-secondary: #fdfdfd;
|
|
60
|
-
--color-secondary-200: #f2f2f2;
|
|
61
|
-
--color-secondary-300: #ededed;
|
|
62
58
|
--color-text: #fefeff;
|
|
59
|
+
--color-text-700: #525252;
|
|
60
|
+
--color-text-900: #262627;
|
|
63
61
|
--color-text-950: #171717;
|
|
64
62
|
--color-background: #ffffff;
|
|
63
|
+
--color-background-50: #f6f6f6;
|
|
64
|
+
--color-success-300: #66b584;
|
|
65
|
+
--color-success-400: #489766;
|
|
66
|
+
--color-success-500: #348352;
|
|
67
|
+
--color-success-600: #2a7948;
|
|
68
|
+
--color-success-700: #206f3e;
|
|
69
|
+
--color-error-300: #f87171;
|
|
70
|
+
--color-error-400: #ef4444;
|
|
71
|
+
--color-error-500: #e63535;
|
|
65
72
|
--color-error-600: #dc2626;
|
|
66
73
|
--color-error-700: #b91c1c;
|
|
74
|
+
--color-indicator-info: #5399ec;
|
|
67
75
|
--font-weight-hairline: 100;
|
|
68
76
|
--text-2xs: 0.625rem;
|
|
69
77
|
--text-2xs--line-height: calc(1 / 0.625);
|
|
@@ -271,21 +279,48 @@
|
|
|
271
279
|
}
|
|
272
280
|
}
|
|
273
281
|
@layer utilities {
|
|
282
|
+
.my-4 {
|
|
283
|
+
margin-block: calc(var(--spacing) * 4);
|
|
284
|
+
}
|
|
285
|
+
.mr-2 {
|
|
286
|
+
margin-right: calc(var(--spacing) * 2);
|
|
287
|
+
}
|
|
288
|
+
.mb-2 {
|
|
289
|
+
margin-bottom: calc(var(--spacing) * 2);
|
|
290
|
+
}
|
|
291
|
+
.ml-2 {
|
|
292
|
+
margin-left: calc(var(--spacing) * 2);
|
|
293
|
+
}
|
|
274
294
|
.flex {
|
|
275
295
|
display: flex;
|
|
276
296
|
}
|
|
297
|
+
.inline-flex {
|
|
298
|
+
display: inline-flex;
|
|
299
|
+
}
|
|
300
|
+
.table {
|
|
301
|
+
display: table;
|
|
302
|
+
}
|
|
277
303
|
.transform {
|
|
278
304
|
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
|
279
305
|
}
|
|
306
|
+
.cursor-pointer {
|
|
307
|
+
cursor: pointer;
|
|
308
|
+
}
|
|
280
309
|
.flex-col {
|
|
281
310
|
flex-direction: column;
|
|
282
311
|
}
|
|
312
|
+
.flex-row {
|
|
313
|
+
flex-direction: row;
|
|
314
|
+
}
|
|
283
315
|
.flex-wrap {
|
|
284
316
|
flex-wrap: wrap;
|
|
285
317
|
}
|
|
286
318
|
.items-center {
|
|
287
319
|
align-items: center;
|
|
288
320
|
}
|
|
321
|
+
.justify-center {
|
|
322
|
+
justify-content: center;
|
|
323
|
+
}
|
|
289
324
|
.gap-2 {
|
|
290
325
|
gap: calc(var(--spacing) * 2);
|
|
291
326
|
}
|
|
@@ -298,17 +333,43 @@
|
|
|
298
333
|
.rounded-full {
|
|
299
334
|
border-radius: calc(infinity * 1px);
|
|
300
335
|
}
|
|
336
|
+
.border {
|
|
337
|
+
border-style: var(--tw-border-style);
|
|
338
|
+
border-width: 1px;
|
|
339
|
+
}
|
|
340
|
+
.border-2 {
|
|
341
|
+
border-style: var(--tw-border-style);
|
|
342
|
+
border-width: 2px;
|
|
343
|
+
}
|
|
344
|
+
.border-error-300 {
|
|
345
|
+
border-color: var(--color-error-300);
|
|
346
|
+
}
|
|
347
|
+
.border-error-500 {
|
|
348
|
+
border-color: var(--color-error-500);
|
|
349
|
+
}
|
|
350
|
+
.border-primary-950 {
|
|
351
|
+
border-color: var(--color-primary-950);
|
|
352
|
+
}
|
|
353
|
+
.border-success-300 {
|
|
354
|
+
border-color: var(--color-success-300);
|
|
355
|
+
}
|
|
356
|
+
.border-success-500 {
|
|
357
|
+
border-color: var(--color-success-500);
|
|
358
|
+
}
|
|
301
359
|
.bg-background {
|
|
302
360
|
background-color: var(--color-background);
|
|
303
361
|
}
|
|
304
|
-
.bg-error-
|
|
305
|
-
background-color: var(--color-error-
|
|
362
|
+
.bg-error-500 {
|
|
363
|
+
background-color: var(--color-error-500);
|
|
306
364
|
}
|
|
307
|
-
.bg-primary-
|
|
308
|
-
background-color: var(--color-primary-
|
|
365
|
+
.bg-primary-950 {
|
|
366
|
+
background-color: var(--color-primary-950);
|
|
309
367
|
}
|
|
310
|
-
.bg-
|
|
311
|
-
background-color: var(--color-
|
|
368
|
+
.bg-success-500 {
|
|
369
|
+
background-color: var(--color-success-500);
|
|
370
|
+
}
|
|
371
|
+
.bg-transparent {
|
|
372
|
+
background-color: transparent;
|
|
312
373
|
}
|
|
313
374
|
.p-4 {
|
|
314
375
|
padding: calc(var(--spacing) * 4);
|
|
@@ -316,8 +377,8 @@
|
|
|
316
377
|
.p-8 {
|
|
317
378
|
padding: calc(var(--spacing) * 8);
|
|
318
379
|
}
|
|
319
|
-
.px-3 {
|
|
320
|
-
padding-inline: calc(var(--spacing) * 3);
|
|
380
|
+
.px-3\.5 {
|
|
381
|
+
padding-inline: calc(var(--spacing) * 3.5);
|
|
321
382
|
}
|
|
322
383
|
.px-4 {
|
|
323
384
|
padding-inline: calc(var(--spacing) * 4);
|
|
@@ -325,15 +386,24 @@
|
|
|
325
386
|
.px-5 {
|
|
326
387
|
padding-inline: calc(var(--spacing) * 5);
|
|
327
388
|
}
|
|
328
|
-
.
|
|
329
|
-
padding-
|
|
389
|
+
.px-6 {
|
|
390
|
+
padding-inline: calc(var(--spacing) * 6);
|
|
391
|
+
}
|
|
392
|
+
.px-7 {
|
|
393
|
+
padding-inline: calc(var(--spacing) * 7);
|
|
330
394
|
}
|
|
331
395
|
.py-2 {
|
|
332
396
|
padding-block: calc(var(--spacing) * 2);
|
|
333
397
|
}
|
|
398
|
+
.py-2\.5 {
|
|
399
|
+
padding-block: calc(var(--spacing) * 2.5);
|
|
400
|
+
}
|
|
334
401
|
.py-3 {
|
|
335
402
|
padding-block: calc(var(--spacing) * 3);
|
|
336
403
|
}
|
|
404
|
+
.py-3\.5 {
|
|
405
|
+
padding-block: calc(var(--spacing) * 3.5);
|
|
406
|
+
}
|
|
337
407
|
.text-2xl {
|
|
338
408
|
font-size: var(--text-2xl);
|
|
339
409
|
line-height: var(--tw-leading, var(--text-2xl--line-height));
|
|
@@ -358,10 +428,6 @@
|
|
|
358
428
|
font-size: var(--text-6xl);
|
|
359
429
|
line-height: var(--tw-leading, var(--text-6xl--line-height));
|
|
360
430
|
}
|
|
361
|
-
.text-base {
|
|
362
|
-
font-size: var(--text-base);
|
|
363
|
-
line-height: var(--tw-leading, var(--text-base--line-height));
|
|
364
|
-
}
|
|
365
431
|
.text-lg {
|
|
366
432
|
font-size: var(--text-lg);
|
|
367
433
|
line-height: var(--tw-leading, var(--text-lg--line-height));
|
|
@@ -414,83 +480,246 @@
|
|
|
414
480
|
--tw-font-weight: var(--font-weight-semibold);
|
|
415
481
|
font-weight: var(--font-weight-semibold);
|
|
416
482
|
}
|
|
483
|
+
.text-error-500 {
|
|
484
|
+
color: var(--color-error-500);
|
|
485
|
+
}
|
|
417
486
|
.text-primary-950 {
|
|
418
487
|
color: var(--color-primary-950);
|
|
419
488
|
}
|
|
420
|
-
.text-
|
|
421
|
-
color: var(--color-
|
|
489
|
+
.text-success-500 {
|
|
490
|
+
color: var(--color-success-500);
|
|
422
491
|
}
|
|
423
492
|
.text-text {
|
|
424
493
|
color: var(--color-text);
|
|
425
494
|
}
|
|
495
|
+
.text-text-700 {
|
|
496
|
+
color: var(--color-text-700);
|
|
497
|
+
}
|
|
498
|
+
.text-text-900 {
|
|
499
|
+
color: var(--color-text-900);
|
|
500
|
+
}
|
|
426
501
|
.text-text-950 {
|
|
427
502
|
color: var(--color-text-950);
|
|
428
503
|
}
|
|
429
|
-
.
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
504
|
+
.outline {
|
|
505
|
+
outline-style: var(--tw-outline-style);
|
|
506
|
+
outline-width: 1px;
|
|
507
|
+
}
|
|
508
|
+
.hover\:border-error-400 {
|
|
509
|
+
&:hover {
|
|
510
|
+
@media (hover: hover) {
|
|
511
|
+
border-color: var(--color-error-400);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
.hover\:border-error-600 {
|
|
516
|
+
&:hover {
|
|
517
|
+
@media (hover: hover) {
|
|
518
|
+
border-color: var(--color-error-600);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
.hover\:border-primary-400 {
|
|
523
|
+
&:hover {
|
|
524
|
+
@media (hover: hover) {
|
|
525
|
+
border-color: var(--color-primary-400);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
.hover\:border-primary-800 {
|
|
530
|
+
&:hover {
|
|
531
|
+
@media (hover: hover) {
|
|
532
|
+
border-color: var(--color-primary-800);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
.hover\:border-success-400 {
|
|
537
|
+
&:hover {
|
|
538
|
+
@media (hover: hover) {
|
|
539
|
+
border-color: var(--color-success-400);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
.hover\:border-success-600 {
|
|
544
|
+
&:hover {
|
|
545
|
+
@media (hover: hover) {
|
|
546
|
+
border-color: var(--color-success-600);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
.hover\:bg-background-50 {
|
|
459
551
|
&:hover {
|
|
460
552
|
@media (hover: hover) {
|
|
461
|
-
background-color: var(--color-
|
|
553
|
+
background-color: var(--color-background-50);
|
|
462
554
|
}
|
|
463
555
|
}
|
|
464
556
|
}
|
|
465
|
-
.hover\:bg-
|
|
557
|
+
.hover\:bg-error-600 {
|
|
466
558
|
&:hover {
|
|
467
559
|
@media (hover: hover) {
|
|
468
|
-
background-color: var(--color-
|
|
560
|
+
background-color: var(--color-error-600);
|
|
469
561
|
}
|
|
470
562
|
}
|
|
471
563
|
}
|
|
472
|
-
.hover\:bg-
|
|
564
|
+
.hover\:bg-primary-800 {
|
|
473
565
|
&:hover {
|
|
474
566
|
@media (hover: hover) {
|
|
475
|
-
background-color: var(--color-
|
|
567
|
+
background-color: var(--color-primary-800);
|
|
476
568
|
}
|
|
477
569
|
}
|
|
478
570
|
}
|
|
479
|
-
.
|
|
571
|
+
.hover\:bg-success-600 {
|
|
572
|
+
&:hover {
|
|
573
|
+
@media (hover: hover) {
|
|
574
|
+
background-color: var(--color-success-600);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
.hover\:text-error-400 {
|
|
579
|
+
&:hover {
|
|
580
|
+
@media (hover: hover) {
|
|
581
|
+
color: var(--color-error-400);
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
.hover\:text-primary-400 {
|
|
586
|
+
&:hover {
|
|
587
|
+
@media (hover: hover) {
|
|
588
|
+
color: var(--color-primary-400);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
.hover\:text-success-400 {
|
|
593
|
+
&:hover {
|
|
594
|
+
@media (hover: hover) {
|
|
595
|
+
color: var(--color-success-400);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
.focus\:border-2 {
|
|
600
|
+
&:focus {
|
|
601
|
+
border-style: var(--tw-border-style);
|
|
602
|
+
border-width: 2px;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
.focus\:border-indicator-info {
|
|
606
|
+
&:focus {
|
|
607
|
+
border-color: var(--color-indicator-info);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
.focus\:bg-error-500 {
|
|
611
|
+
&:focus {
|
|
612
|
+
background-color: var(--color-error-500);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
.focus\:bg-primary-950 {
|
|
616
|
+
&:focus {
|
|
617
|
+
background-color: var(--color-primary-950);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
.focus\:bg-success-500 {
|
|
621
|
+
&:focus {
|
|
622
|
+
background-color: var(--color-success-500);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
.focus\:text-error-600 {
|
|
626
|
+
&:focus {
|
|
627
|
+
color: var(--color-error-600);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
.focus\:text-primary-600 {
|
|
480
631
|
&:focus {
|
|
481
|
-
|
|
482
|
-
box-shadow:
|
|
483
|
-
var(--tw-inset-shadow),
|
|
484
|
-
var(--tw-inset-ring-shadow),
|
|
485
|
-
var(--tw-ring-offset-shadow),
|
|
486
|
-
var(--tw-ring-shadow),
|
|
487
|
-
var(--tw-shadow);
|
|
632
|
+
color: var(--color-primary-600);
|
|
488
633
|
}
|
|
489
634
|
}
|
|
490
|
-
.focus\:
|
|
635
|
+
.focus\:text-success-600 {
|
|
491
636
|
&:focus {
|
|
492
|
-
--
|
|
493
|
-
|
|
637
|
+
color: var(--color-success-600);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
.active\:border-error-700 {
|
|
641
|
+
&:active {
|
|
642
|
+
border-color: var(--color-error-700);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
.active\:border-primary-700 {
|
|
646
|
+
&:active {
|
|
647
|
+
border-color: var(--color-primary-700);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
.active\:border-success-700 {
|
|
651
|
+
&:active {
|
|
652
|
+
border-color: var(--color-success-700);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
.active\:bg-error-700 {
|
|
656
|
+
&:active {
|
|
657
|
+
background-color: var(--color-error-700);
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
.active\:bg-primary-700 {
|
|
661
|
+
&:active {
|
|
662
|
+
background-color: var(--color-primary-700);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
.active\:bg-success-700 {
|
|
666
|
+
&:active {
|
|
667
|
+
background-color: var(--color-success-700);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
.active\:text-error-700 {
|
|
671
|
+
&:active {
|
|
672
|
+
color: var(--color-error-700);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
.active\:text-primary-700 {
|
|
676
|
+
&:active {
|
|
677
|
+
color: var(--color-primary-700);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
.active\:text-success-700 {
|
|
681
|
+
&:active {
|
|
682
|
+
color: var(--color-success-700);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
.disabled\:cursor-not-allowed {
|
|
686
|
+
&:disabled {
|
|
687
|
+
cursor: not-allowed;
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
.disabled\:border-error-500 {
|
|
691
|
+
&:disabled {
|
|
692
|
+
border-color: var(--color-error-500);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
.disabled\:border-primary-500 {
|
|
696
|
+
&:disabled {
|
|
697
|
+
border-color: var(--color-primary-500);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
.disabled\:border-success-500 {
|
|
701
|
+
&:disabled {
|
|
702
|
+
border-color: var(--color-success-500);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
.disabled\:bg-error-500 {
|
|
706
|
+
&:disabled {
|
|
707
|
+
background-color: var(--color-error-500);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
.disabled\:bg-primary-500 {
|
|
711
|
+
&:disabled {
|
|
712
|
+
background-color: var(--color-primary-500);
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
.disabled\:bg-success-500 {
|
|
716
|
+
&:disabled {
|
|
717
|
+
background-color: var(--color-success-500);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
.disabled\:opacity-40 {
|
|
721
|
+
&:disabled {
|
|
722
|
+
opacity: 40%;
|
|
494
723
|
}
|
|
495
724
|
}
|
|
496
725
|
}
|
|
@@ -819,21 +1048,9 @@
|
|
|
819
1048
|
@property --tw-rotate-z { syntax: "*"; inherits: false; }
|
|
820
1049
|
@property --tw-skew-x { syntax: "*"; inherits: false; }
|
|
821
1050
|
@property --tw-skew-y { syntax: "*"; inherits: false; }
|
|
1051
|
+
@property --tw-border-style { syntax: "*"; inherits: false; initial-value: solid; }
|
|
822
1052
|
@property --tw-font-weight { syntax: "*"; inherits: false; }
|
|
823
|
-
@property --tw-
|
|
824
|
-
@property --tw-shadow-color { syntax: "*"; inherits: false; }
|
|
825
|
-
@property --tw-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
|
|
826
|
-
@property --tw-inset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
|
|
827
|
-
@property --tw-inset-shadow-color { syntax: "*"; inherits: false; }
|
|
828
|
-
@property --tw-inset-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
|
|
829
|
-
@property --tw-ring-color { syntax: "*"; inherits: false; }
|
|
830
|
-
@property --tw-ring-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
|
|
831
|
-
@property --tw-inset-ring-color { syntax: "*"; inherits: false; }
|
|
832
|
-
@property --tw-inset-ring-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
|
|
833
|
-
@property --tw-ring-inset { syntax: "*"; inherits: false; }
|
|
834
|
-
@property --tw-ring-offset-width { syntax: "<length>"; inherits: false; initial-value: 0px; }
|
|
835
|
-
@property --tw-ring-offset-color { syntax: "*"; inherits: false; initial-value: #fff; }
|
|
836
|
-
@property --tw-ring-offset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
|
|
1053
|
+
@property --tw-outline-style { syntax: "*"; inherits: false; initial-value: solid; }
|
|
837
1054
|
@layer properties {
|
|
838
1055
|
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
839
1056
|
*,
|
|
@@ -845,21 +1062,9 @@
|
|
|
845
1062
|
--tw-rotate-z: initial;
|
|
846
1063
|
--tw-skew-x: initial;
|
|
847
1064
|
--tw-skew-y: initial;
|
|
1065
|
+
--tw-border-style: solid;
|
|
848
1066
|
--tw-font-weight: initial;
|
|
849
|
-
--tw-
|
|
850
|
-
--tw-shadow-color: initial;
|
|
851
|
-
--tw-shadow-alpha: 100%;
|
|
852
|
-
--tw-inset-shadow: 0 0 #0000;
|
|
853
|
-
--tw-inset-shadow-color: initial;
|
|
854
|
-
--tw-inset-shadow-alpha: 100%;
|
|
855
|
-
--tw-ring-color: initial;
|
|
856
|
-
--tw-ring-shadow: 0 0 #0000;
|
|
857
|
-
--tw-inset-ring-color: initial;
|
|
858
|
-
--tw-inset-ring-shadow: 0 0 #0000;
|
|
859
|
-
--tw-ring-inset: initial;
|
|
860
|
-
--tw-ring-offset-width: 0px;
|
|
861
|
-
--tw-ring-offset-color: #fff;
|
|
862
|
-
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1067
|
+
--tw-outline-style: solid;
|
|
863
1068
|
}
|
|
864
1069
|
}
|
|
865
1070
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -7,34 +7,41 @@ import { ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithoutRef
|
|
|
7
7
|
type ButtonProps = {
|
|
8
8
|
/** Content to be displayed inside the button */
|
|
9
9
|
children: ReactNode;
|
|
10
|
+
/** Ícone à esquerda do texto */
|
|
11
|
+
iconLeft?: ReactNode;
|
|
12
|
+
/** Ícone à direita do texto */
|
|
13
|
+
iconRight?: ReactNode;
|
|
14
|
+
/** Size of the button */
|
|
15
|
+
size?: 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
|
|
10
16
|
/** Visual variant of the button */
|
|
11
|
-
variant?: '
|
|
12
|
-
/**
|
|
13
|
-
|
|
17
|
+
variant?: 'solid' | 'outline' | 'link';
|
|
18
|
+
/** Action type of the button */
|
|
19
|
+
action?: 'primary' | 'positive' | 'negative';
|
|
14
20
|
/** Additional CSS classes to apply */
|
|
15
21
|
className?: string;
|
|
16
22
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
17
23
|
/**
|
|
18
24
|
* Button component for Analytica Ensino platforms
|
|
19
25
|
*
|
|
20
|
-
* A flexible button component with multiple variants and
|
|
26
|
+
* A flexible button component with multiple variants, sizes and actions.
|
|
21
27
|
* Fully compatible with Next.js 15 and React 19.
|
|
22
28
|
*
|
|
23
29
|
* @param children - The content to display inside the button
|
|
24
|
-
* @param
|
|
25
|
-
* @param
|
|
30
|
+
* @param size - The size variant (extra-small, small, medium, large, extra-large)
|
|
31
|
+
* @param variant - The visual style variant (solid, outline, link)
|
|
32
|
+
* @param action - The action type (primary, positive, negative)
|
|
26
33
|
* @param className - Additional CSS classes
|
|
27
34
|
* @param props - All other standard button HTML attributes
|
|
28
35
|
* @returns A styled button element
|
|
29
36
|
*
|
|
30
37
|
* @example
|
|
31
38
|
* ```tsx
|
|
32
|
-
* <Button variant="primary" size="
|
|
39
|
+
* <Button variant="solid" action="primary" size="medium" onClick={() => console.log('clicked')}>
|
|
33
40
|
* Click me
|
|
34
41
|
* </Button>
|
|
35
42
|
* ```
|
|
36
43
|
*/
|
|
37
|
-
declare const Button: ({ children,
|
|
44
|
+
declare const Button: ({ children, iconLeft, iconRight, size, variant, action, className, disabled, type, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
38
45
|
|
|
39
46
|
/**
|
|
40
47
|
* Base text component props
|
package/dist/index.d.ts
CHANGED
|
@@ -7,34 +7,41 @@ import { ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithoutRef
|
|
|
7
7
|
type ButtonProps = {
|
|
8
8
|
/** Content to be displayed inside the button */
|
|
9
9
|
children: ReactNode;
|
|
10
|
+
/** Ícone à esquerda do texto */
|
|
11
|
+
iconLeft?: ReactNode;
|
|
12
|
+
/** Ícone à direita do texto */
|
|
13
|
+
iconRight?: ReactNode;
|
|
14
|
+
/** Size of the button */
|
|
15
|
+
size?: 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
|
|
10
16
|
/** Visual variant of the button */
|
|
11
|
-
variant?: '
|
|
12
|
-
/**
|
|
13
|
-
|
|
17
|
+
variant?: 'solid' | 'outline' | 'link';
|
|
18
|
+
/** Action type of the button */
|
|
19
|
+
action?: 'primary' | 'positive' | 'negative';
|
|
14
20
|
/** Additional CSS classes to apply */
|
|
15
21
|
className?: string;
|
|
16
22
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
17
23
|
/**
|
|
18
24
|
* Button component for Analytica Ensino platforms
|
|
19
25
|
*
|
|
20
|
-
* A flexible button component with multiple variants and
|
|
26
|
+
* A flexible button component with multiple variants, sizes and actions.
|
|
21
27
|
* Fully compatible with Next.js 15 and React 19.
|
|
22
28
|
*
|
|
23
29
|
* @param children - The content to display inside the button
|
|
24
|
-
* @param
|
|
25
|
-
* @param
|
|
30
|
+
* @param size - The size variant (extra-small, small, medium, large, extra-large)
|
|
31
|
+
* @param variant - The visual style variant (solid, outline, link)
|
|
32
|
+
* @param action - The action type (primary, positive, negative)
|
|
26
33
|
* @param className - Additional CSS classes
|
|
27
34
|
* @param props - All other standard button HTML attributes
|
|
28
35
|
* @returns A styled button element
|
|
29
36
|
*
|
|
30
37
|
* @example
|
|
31
38
|
* ```tsx
|
|
32
|
-
* <Button variant="primary" size="
|
|
39
|
+
* <Button variant="solid" action="primary" size="medium" onClick={() => console.log('clicked')}>
|
|
33
40
|
* Click me
|
|
34
41
|
* </Button>
|
|
35
42
|
* ```
|
|
36
43
|
*/
|
|
37
|
-
declare const Button: ({ children,
|
|
44
|
+
declare const Button: ({ children, iconLeft, iconRight, size, variant, action, className, disabled, type, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
38
45
|
|
|
39
46
|
/**
|
|
40
47
|
* Base text component props
|
package/dist/index.js
CHANGED
|
@@ -27,46 +27,57 @@ module.exports = __toCommonJS(index_exports);
|
|
|
27
27
|
|
|
28
28
|
// src/components/Button/Button.tsx
|
|
29
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
+
var VARIANT_ACTION_CLASSES = {
|
|
31
|
+
solid: {
|
|
32
|
+
primary: "bg-primary-950 text-text border-2 border-primary-950 hover:bg-primary-800 hover:border-primary-800 focus:bg-primary-950 focus:border-indicator-info active:bg-primary-700 active:border-primary-700 disabled:bg-primary-500 disabled:border-primary-500 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
33
|
+
positive: "bg-success-500 text-text border-2 border-success-500 hover:bg-success-600 hover:border-success-600 focus:bg-success-500 focus:border-indicator-info active:bg-success-700 active:border-success-700 disabled:bg-success-500 disabled:border-success-500 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
34
|
+
negative: "bg-error-500 text-text border-2 border-error-500 hover:bg-error-600 hover:border-error-600 focus:bg-error-500 focus:border-indicator-info active:bg-error-700 active:border-error-700 disabled:bg-error-500 disabled:border-error-500 disabled:opacity-40 disabled:cursor-not-allowed"
|
|
35
|
+
},
|
|
36
|
+
outline: {
|
|
37
|
+
primary: "bg-transparent text-primary-950 border border-primary-950 hover:bg-background-50 hover:text-primary-400 hover:border-primary-400 focus:text-primary-600 focus:border-2 focus:border-indicator-info active:text-primary-700 active:border-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
38
|
+
positive: "bg-transparent text-success-500 border border-success-300 hover:bg-background-50 hover:text-success-400 hover:border-success-400 focus:text-success-600 focus:border-2 focus:border-indicator-info active:text-success-700 active:border-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
39
|
+
negative: "bg-transparent text-error-500 border border-error-300 hover:bg-background-50 hover:text-error-400 hover:border-error-400 focus:text-error-600 focus:border-2 focus:border-indicator-info active:text-error-700 active:border-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
|
|
40
|
+
},
|
|
41
|
+
link: {
|
|
42
|
+
primary: "bg-transparent text-primary-950 hover:text-primary-400 focus:text-primary-600 focus:border-2 focus:border-indicator-info active:text-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
43
|
+
positive: "bg-transparent text-success-500 hover:text-success-400 focus:text-success-600 focus:border-2 focus:border-indicator-info active:text-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
44
|
+
negative: "bg-transparent text-error-500 hover:text-error-400 focus:text-error-600 focus:border-2 focus:border-indicator-info active:text-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var SIZE_CLASSES = {
|
|
48
|
+
"extra-small": "text-xs px-3.5 py-2",
|
|
49
|
+
small: "text-sm px-4 py-2.5",
|
|
50
|
+
medium: "text-md px-5 py-2.5",
|
|
51
|
+
large: "text-lg px-6 py-3",
|
|
52
|
+
"extra-large": "text-lg px-7 py-3.5"
|
|
53
|
+
};
|
|
30
54
|
var Button = ({
|
|
31
55
|
children,
|
|
32
|
-
|
|
33
|
-
|
|
56
|
+
iconLeft,
|
|
57
|
+
iconRight,
|
|
58
|
+
size = "medium",
|
|
59
|
+
variant = "solid",
|
|
60
|
+
action = "primary",
|
|
34
61
|
className = "",
|
|
62
|
+
disabled,
|
|
63
|
+
type = "button",
|
|
35
64
|
...props
|
|
36
65
|
}) => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
variantClasses = "bg-secondary-200 hover:bg-secondary-300 text-primary-950";
|
|
42
|
-
break;
|
|
43
|
-
case "danger":
|
|
44
|
-
variantClasses = "bg-error-600 hover:bg-error-700 text-secondary";
|
|
45
|
-
break;
|
|
46
|
-
case "primary":
|
|
47
|
-
default:
|
|
48
|
-
variantClasses = "bg-primary-600 hover:bg-primary-700 text-secondary";
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
switch (size) {
|
|
52
|
-
case "sm":
|
|
53
|
-
sizeClasses = "text-sm px-3 py-1.5";
|
|
54
|
-
break;
|
|
55
|
-
case "lg":
|
|
56
|
-
sizeClasses = "text-lg px-5 py-3";
|
|
57
|
-
break;
|
|
58
|
-
case "md":
|
|
59
|
-
default:
|
|
60
|
-
sizeClasses = "text-base px-4 py-2";
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
const baseClasses = "rounded-full font-medium focus:outline-none focus:ring transition";
|
|
64
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
|
+
const sizeClasses = SIZE_CLASSES[size];
|
|
67
|
+
const variantClasses = VARIANT_ACTION_CLASSES[variant][action];
|
|
68
|
+
const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-medium";
|
|
69
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
65
70
|
"button",
|
|
66
71
|
{
|
|
67
72
|
className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
|
|
73
|
+
disabled,
|
|
74
|
+
type,
|
|
68
75
|
...props,
|
|
69
|
-
children
|
|
76
|
+
children: [
|
|
77
|
+
iconLeft && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "mr-2 flex items-center", children: iconLeft }),
|
|
78
|
+
children,
|
|
79
|
+
iconRight && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-2 flex items-center", children: iconRight })
|
|
80
|
+
]
|
|
70
81
|
}
|
|
71
82
|
);
|
|
72
83
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1,45 +1,56 @@
|
|
|
1
1
|
// src/components/Button/Button.tsx
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
var VARIANT_ACTION_CLASSES = {
|
|
4
|
+
solid: {
|
|
5
|
+
primary: "bg-primary-950 text-text border-2 border-primary-950 hover:bg-primary-800 hover:border-primary-800 focus:bg-primary-950 focus:border-indicator-info active:bg-primary-700 active:border-primary-700 disabled:bg-primary-500 disabled:border-primary-500 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
6
|
+
positive: "bg-success-500 text-text border-2 border-success-500 hover:bg-success-600 hover:border-success-600 focus:bg-success-500 focus:border-indicator-info active:bg-success-700 active:border-success-700 disabled:bg-success-500 disabled:border-success-500 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
7
|
+
negative: "bg-error-500 text-text border-2 border-error-500 hover:bg-error-600 hover:border-error-600 focus:bg-error-500 focus:border-indicator-info active:bg-error-700 active:border-error-700 disabled:bg-error-500 disabled:border-error-500 disabled:opacity-40 disabled:cursor-not-allowed"
|
|
8
|
+
},
|
|
9
|
+
outline: {
|
|
10
|
+
primary: "bg-transparent text-primary-950 border border-primary-950 hover:bg-background-50 hover:text-primary-400 hover:border-primary-400 focus:text-primary-600 focus:border-2 focus:border-indicator-info active:text-primary-700 active:border-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
11
|
+
positive: "bg-transparent text-success-500 border border-success-300 hover:bg-background-50 hover:text-success-400 hover:border-success-400 focus:text-success-600 focus:border-2 focus:border-indicator-info active:text-success-700 active:border-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
12
|
+
negative: "bg-transparent text-error-500 border border-error-300 hover:bg-background-50 hover:text-error-400 hover:border-error-400 focus:text-error-600 focus:border-2 focus:border-indicator-info active:text-error-700 active:border-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
|
|
13
|
+
},
|
|
14
|
+
link: {
|
|
15
|
+
primary: "bg-transparent text-primary-950 hover:text-primary-400 focus:text-primary-600 focus:border-2 focus:border-indicator-info active:text-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
16
|
+
positive: "bg-transparent text-success-500 hover:text-success-400 focus:text-success-600 focus:border-2 focus:border-indicator-info active:text-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
17
|
+
negative: "bg-transparent text-error-500 hover:text-error-400 focus:text-error-600 focus:border-2 focus:border-indicator-info active:text-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
var SIZE_CLASSES = {
|
|
21
|
+
"extra-small": "text-xs px-3.5 py-2",
|
|
22
|
+
small: "text-sm px-4 py-2.5",
|
|
23
|
+
medium: "text-md px-5 py-2.5",
|
|
24
|
+
large: "text-lg px-6 py-3",
|
|
25
|
+
"extra-large": "text-lg px-7 py-3.5"
|
|
26
|
+
};
|
|
3
27
|
var Button = ({
|
|
4
28
|
children,
|
|
5
|
-
|
|
6
|
-
|
|
29
|
+
iconLeft,
|
|
30
|
+
iconRight,
|
|
31
|
+
size = "medium",
|
|
32
|
+
variant = "solid",
|
|
33
|
+
action = "primary",
|
|
7
34
|
className = "",
|
|
35
|
+
disabled,
|
|
36
|
+
type = "button",
|
|
8
37
|
...props
|
|
9
38
|
}) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
variantClasses = "bg-secondary-200 hover:bg-secondary-300 text-primary-950";
|
|
15
|
-
break;
|
|
16
|
-
case "danger":
|
|
17
|
-
variantClasses = "bg-error-600 hover:bg-error-700 text-secondary";
|
|
18
|
-
break;
|
|
19
|
-
case "primary":
|
|
20
|
-
default:
|
|
21
|
-
variantClasses = "bg-primary-600 hover:bg-primary-700 text-secondary";
|
|
22
|
-
break;
|
|
23
|
-
}
|
|
24
|
-
switch (size) {
|
|
25
|
-
case "sm":
|
|
26
|
-
sizeClasses = "text-sm px-3 py-1.5";
|
|
27
|
-
break;
|
|
28
|
-
case "lg":
|
|
29
|
-
sizeClasses = "text-lg px-5 py-3";
|
|
30
|
-
break;
|
|
31
|
-
case "md":
|
|
32
|
-
default:
|
|
33
|
-
sizeClasses = "text-base px-4 py-2";
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
const baseClasses = "rounded-full font-medium focus:outline-none focus:ring transition";
|
|
37
|
-
return /* @__PURE__ */ jsx(
|
|
39
|
+
const sizeClasses = SIZE_CLASSES[size];
|
|
40
|
+
const variantClasses = VARIANT_ACTION_CLASSES[variant][action];
|
|
41
|
+
const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-medium";
|
|
42
|
+
return /* @__PURE__ */ jsxs(
|
|
38
43
|
"button",
|
|
39
44
|
{
|
|
40
45
|
className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
|
|
46
|
+
disabled,
|
|
47
|
+
type,
|
|
41
48
|
...props,
|
|
42
|
-
children
|
|
49
|
+
children: [
|
|
50
|
+
iconLeft && /* @__PURE__ */ jsx("span", { className: "mr-2 flex items-center", children: iconLeft }),
|
|
51
|
+
children,
|
|
52
|
+
iconRight && /* @__PURE__ */ jsx("span", { className: "ml-2 flex items-center", children: iconRight })
|
|
53
|
+
]
|
|
43
54
|
}
|
|
44
55
|
);
|
|
45
56
|
};
|
package/package.json
CHANGED