analytica-frontend-lib 1.0.40 → 1.0.42
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/ProgressBar/index.js +9 -12
- package/dist/ProgressBar/index.js.map +1 -1
- package/dist/ProgressBar/index.mjs +9 -12
- package/dist/ProgressBar/index.mjs.map +1 -1
- package/dist/ProgressCircle/index.js +11 -7
- package/dist/ProgressCircle/index.js.map +1 -1
- package/dist/ProgressCircle/index.mjs +11 -7
- package/dist/ProgressCircle/index.mjs.map +1 -1
- package/dist/Radio/index.js +8 -34
- package/dist/Radio/index.js.map +1 -1
- package/dist/Radio/index.mjs +8 -34
- package/dist/Radio/index.mjs.map +1 -1
- package/dist/index.css +53 -9
- package/dist/index.css.map +1 -1
- package/dist/index.js +28 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -53
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +53 -9
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -776,48 +776,34 @@ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
|
776
776
|
var SIZE_CLASSES4 = {
|
|
777
777
|
small: {
|
|
778
778
|
radio: "w-5 h-5",
|
|
779
|
-
// 20px x 20px
|
|
780
779
|
textSize: "sm",
|
|
781
780
|
spacing: "gap-1.5",
|
|
782
|
-
// 6px
|
|
783
781
|
borderWidth: "border-2",
|
|
784
|
-
dotSize: "w-
|
|
785
|
-
// 6px inner dot
|
|
782
|
+
dotSize: "w-2 h-2",
|
|
786
783
|
labelHeight: "h-5"
|
|
787
784
|
},
|
|
788
785
|
medium: {
|
|
789
786
|
radio: "w-6 h-6",
|
|
790
|
-
// 24px x 24px
|
|
791
787
|
textSize: "md",
|
|
792
788
|
spacing: "gap-2",
|
|
793
|
-
// 8px
|
|
794
789
|
borderWidth: "border-2",
|
|
795
|
-
dotSize: "w-2 h-2",
|
|
796
|
-
// 8px inner dot
|
|
790
|
+
dotSize: "w-2.5 h-2.5",
|
|
797
791
|
labelHeight: "h-6"
|
|
798
792
|
},
|
|
799
793
|
large: {
|
|
800
794
|
radio: "w-7 h-7",
|
|
801
|
-
// 28px x 28px
|
|
802
795
|
textSize: "lg",
|
|
803
796
|
spacing: "gap-2",
|
|
804
|
-
// 8px
|
|
805
797
|
borderWidth: "border-2",
|
|
806
|
-
|
|
807
|
-
dotSize: "w-2.5 h-2.5",
|
|
808
|
-
// 10px inner dot
|
|
798
|
+
dotSize: "w-3 h-3",
|
|
809
799
|
labelHeight: "h-7"
|
|
810
800
|
},
|
|
811
801
|
extraLarge: {
|
|
812
802
|
radio: "w-8 h-8",
|
|
813
|
-
// 32px x 32px (larger than large)
|
|
814
803
|
textSize: "xl",
|
|
815
804
|
spacing: "gap-3",
|
|
816
|
-
// 12px
|
|
817
805
|
borderWidth: "border-2",
|
|
818
|
-
|
|
819
|
-
dotSize: "w-3 h-3",
|
|
820
|
-
// 12px inner dot
|
|
806
|
+
dotSize: "w-3.5 h-3.5",
|
|
821
807
|
labelHeight: "h-8"
|
|
822
808
|
}
|
|
823
809
|
};
|
|
@@ -829,39 +815,27 @@ var STATE_CLASSES2 = {
|
|
|
829
815
|
},
|
|
830
816
|
hovered: {
|
|
831
817
|
unchecked: "border-border-500 bg-background",
|
|
832
|
-
// #8C8D8D hover state for unchecked
|
|
833
818
|
checked: "border-info-700 bg-background"
|
|
834
|
-
// Adjust checked border for hover
|
|
835
819
|
},
|
|
836
820
|
focused: {
|
|
837
821
|
unchecked: "border-border-400 bg-background",
|
|
838
|
-
// #A5A3A3 for unchecked radio
|
|
839
822
|
checked: "border-primary-950 bg-background"
|
|
840
|
-
// #124393 for checked radio
|
|
841
823
|
},
|
|
842
824
|
invalid: {
|
|
843
825
|
unchecked: "border-border-400 bg-background",
|
|
844
|
-
// #A5A3A3 for unchecked radio
|
|
845
826
|
checked: "border-primary-950 bg-background"
|
|
846
|
-
// #124393 for checked radio
|
|
847
827
|
},
|
|
848
828
|
disabled: {
|
|
849
829
|
unchecked: "border-border-400 bg-background cursor-not-allowed",
|
|
850
|
-
// #A5A3A3 for unchecked radio
|
|
851
830
|
checked: "border-primary-950 bg-background cursor-not-allowed"
|
|
852
|
-
// #124393 for checked radio
|
|
853
831
|
}
|
|
854
832
|
};
|
|
855
833
|
var DOT_CLASSES = {
|
|
856
834
|
default: "bg-primary-950",
|
|
857
835
|
hovered: "bg-info-700",
|
|
858
|
-
// #1C61B2 hover state for checked dot
|
|
859
836
|
focused: "bg-primary-950",
|
|
860
|
-
// #124393 for focused checked dot
|
|
861
837
|
invalid: "bg-primary-950",
|
|
862
|
-
// #124393 for invalid checked dot
|
|
863
838
|
disabled: "bg-primary-950"
|
|
864
|
-
// #124393 for disabled checked dot
|
|
865
839
|
};
|
|
866
840
|
var Radio = forwardRef6(
|
|
867
841
|
({
|
|
@@ -947,7 +921,7 @@ var Radio = forwardRef6(
|
|
|
947
921
|
label && /* @__PURE__ */ jsx11(
|
|
948
922
|
"div",
|
|
949
923
|
{
|
|
950
|
-
className: `flex flex-row items-center ${sizeClasses.labelHeight}`,
|
|
924
|
+
className: `flex flex-row items-center ${sizeClasses.labelHeight} flex-1 min-w-0`,
|
|
951
925
|
children: /* @__PURE__ */ jsx11(
|
|
952
926
|
Text_default,
|
|
953
927
|
{
|
|
@@ -955,7 +929,7 @@ var Radio = forwardRef6(
|
|
|
955
929
|
htmlFor: inputId,
|
|
956
930
|
size: sizeClasses.textSize,
|
|
957
931
|
weight: "normal",
|
|
958
|
-
className: `${getCursorClass()} select-none leading-normal flex items-center font-roboto ${labelClassName}`,
|
|
932
|
+
className: `${getCursorClass()} select-none leading-normal flex items-center font-roboto truncate ${labelClassName}`,
|
|
959
933
|
color: getTextColor(),
|
|
960
934
|
children: label
|
|
961
935
|
}
|
|
@@ -970,7 +944,7 @@ var Radio = forwardRef6(
|
|
|
970
944
|
{
|
|
971
945
|
size: "sm",
|
|
972
946
|
weight: "normal",
|
|
973
|
-
className: "mt-1.5",
|
|
947
|
+
className: "mt-1.5 truncate",
|
|
974
948
|
color: "text-error-600",
|
|
975
949
|
children: errorMessage
|
|
976
950
|
}
|
|
@@ -980,7 +954,7 @@ var Radio = forwardRef6(
|
|
|
980
954
|
{
|
|
981
955
|
size: "sm",
|
|
982
956
|
weight: "normal",
|
|
983
|
-
className: "mt-1.5",
|
|
957
|
+
className: "mt-1.5 truncate",
|
|
984
958
|
color: "text-text-500",
|
|
985
959
|
children: helperText
|
|
986
960
|
}
|
|
@@ -1467,7 +1441,6 @@ var SIZE_CLASSES7 = {
|
|
|
1467
1441
|
// 4px height (h-1 = 4px in Tailwind)
|
|
1468
1442
|
bar: "h-1",
|
|
1469
1443
|
// 4px height for the fill bar
|
|
1470
|
-
labelSize: "xs",
|
|
1471
1444
|
spacing: "gap-2",
|
|
1472
1445
|
// 8px gap between label and progress bar
|
|
1473
1446
|
layout: "flex-col",
|
|
@@ -1480,8 +1453,6 @@ var SIZE_CLASSES7 = {
|
|
|
1480
1453
|
// 8px height (h-2 = 8px in Tailwind)
|
|
1481
1454
|
bar: "h-2",
|
|
1482
1455
|
// 8px height for the fill bar
|
|
1483
|
-
labelSize: "xs",
|
|
1484
|
-
// 12px font size (xs in Tailwind)
|
|
1485
1456
|
spacing: "gap-2",
|
|
1486
1457
|
// 8px gap between progress bar and label
|
|
1487
1458
|
layout: "flex-row items-center",
|
|
@@ -1523,25 +1494,25 @@ var ProgressBar = ({
|
|
|
1523
1494
|
return /* @__PURE__ */ jsxs13(
|
|
1524
1495
|
"div",
|
|
1525
1496
|
{
|
|
1526
|
-
className: `flex ${sizeClasses.layout} ${sizeClasses.spacing} ${className}`,
|
|
1497
|
+
className: `flex ${sizeClasses.layout} ${size === "medium" ? "gap-2" : sizeClasses.spacing} ${className}`,
|
|
1527
1498
|
children: [
|
|
1528
1499
|
size === "small" && (label || showPercentage) && /* @__PURE__ */ jsxs13("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
1529
1500
|
label && /* @__PURE__ */ jsx18(
|
|
1530
1501
|
Text_default,
|
|
1531
1502
|
{
|
|
1532
1503
|
as: "div",
|
|
1533
|
-
size:
|
|
1504
|
+
size: "xs",
|
|
1534
1505
|
weight: "medium",
|
|
1535
|
-
className: `text-text-950 ${labelClassName}`,
|
|
1506
|
+
className: `text-text-950 leading-none tracking-normal text-center ${labelClassName}`,
|
|
1536
1507
|
children: label
|
|
1537
1508
|
}
|
|
1538
1509
|
),
|
|
1539
1510
|
showPercentage && /* @__PURE__ */ jsxs13(
|
|
1540
1511
|
Text_default,
|
|
1541
1512
|
{
|
|
1542
|
-
size:
|
|
1513
|
+
size: "xs",
|
|
1543
1514
|
weight: "medium",
|
|
1544
|
-
className: `text-text-
|
|
1515
|
+
className: `text-text-950 leading-none tracking-normal text-center ${percentageClassName}`,
|
|
1545
1516
|
children: [
|
|
1546
1517
|
Math.round(percentage),
|
|
1547
1518
|
"%"
|
|
@@ -1576,9 +1547,9 @@ var ProgressBar = ({
|
|
|
1576
1547
|
size === "medium" && showPercentage && /* @__PURE__ */ jsxs13(
|
|
1577
1548
|
Text_default,
|
|
1578
1549
|
{
|
|
1579
|
-
size:
|
|
1550
|
+
size: "xs",
|
|
1580
1551
|
weight: "medium",
|
|
1581
|
-
className: `text-text-950 text-center flex-none
|
|
1552
|
+
className: `text-text-950 leading-none tracking-normal text-center flex-none ${percentageClassName}`,
|
|
1582
1553
|
children: [
|
|
1583
1554
|
Math.round(percentage),
|
|
1584
1555
|
"%"
|
|
@@ -1589,9 +1560,9 @@ var ProgressBar = ({
|
|
|
1589
1560
|
Text_default,
|
|
1590
1561
|
{
|
|
1591
1562
|
as: "div",
|
|
1592
|
-
size:
|
|
1563
|
+
size: "xs",
|
|
1593
1564
|
weight: "medium",
|
|
1594
|
-
className: `text-text-950 flex-none ${labelClassName}`,
|
|
1565
|
+
className: `text-text-950 leading-none tracking-normal text-center flex-none ${labelClassName}`,
|
|
1595
1566
|
children: label
|
|
1596
1567
|
}
|
|
1597
1568
|
)
|
|
@@ -1614,11 +1585,13 @@ var SIZE_CLASSES8 = {
|
|
|
1614
1585
|
textWeight: "medium",
|
|
1615
1586
|
// font-weight: 500
|
|
1616
1587
|
labelSize: "2xs",
|
|
1617
|
-
//
|
|
1588
|
+
// Will be overridden with custom 8px in className
|
|
1618
1589
|
labelWeight: "bold",
|
|
1619
1590
|
// font-weight: 700
|
|
1620
|
-
spacing: "gap-
|
|
1621
|
-
//
|
|
1591
|
+
spacing: "gap-0",
|
|
1592
|
+
// Reduced gap between percentage and label for better spacing
|
|
1593
|
+
contentWidth: "max-w-[50px]"
|
|
1594
|
+
// Reduced width to fit text inside circle
|
|
1622
1595
|
},
|
|
1623
1596
|
medium: {
|
|
1624
1597
|
container: "w-[152px] h-[152px]",
|
|
@@ -1633,8 +1606,10 @@ var SIZE_CLASSES8 = {
|
|
|
1633
1606
|
// 12px for status label (font-size: 12px)
|
|
1634
1607
|
labelWeight: "medium",
|
|
1635
1608
|
// font-weight: 500 (changed from bold)
|
|
1636
|
-
spacing: "gap-1"
|
|
1609
|
+
spacing: "gap-1",
|
|
1637
1610
|
// 4px gap between percentage and label
|
|
1611
|
+
contentWidth: "max-w-[90px]"
|
|
1612
|
+
// Reduced width to fit text inside circle
|
|
1638
1613
|
}
|
|
1639
1614
|
};
|
|
1640
1615
|
var VARIANT_CLASSES3 = {
|
|
@@ -1734,14 +1709,14 @@ var ProgressCircle = ({
|
|
|
1734
1709
|
/* @__PURE__ */ jsxs14(
|
|
1735
1710
|
"div",
|
|
1736
1711
|
{
|
|
1737
|
-
className: `relative z-10 flex flex-col items-center justify-center ${sizeClasses.spacing}`,
|
|
1712
|
+
className: `relative z-10 flex flex-col items-center justify-center ${sizeClasses.spacing} ${sizeClasses.contentWidth}`,
|
|
1738
1713
|
children: [
|
|
1739
1714
|
showPercentage && /* @__PURE__ */ jsxs14(
|
|
1740
1715
|
Text_default,
|
|
1741
1716
|
{
|
|
1742
1717
|
size: sizeClasses.textSize,
|
|
1743
1718
|
weight: sizeClasses.textWeight,
|
|
1744
|
-
className: `text-center ${variantClasses.textColor} ${percentageClassName}`,
|
|
1719
|
+
className: `text-center w-full ${variantClasses.textColor} ${percentageClassName}`,
|
|
1745
1720
|
children: [
|
|
1746
1721
|
Math.round(percentage),
|
|
1747
1722
|
"%"
|
|
@@ -1754,7 +1729,7 @@ var ProgressCircle = ({
|
|
|
1754
1729
|
as: "span",
|
|
1755
1730
|
size: sizeClasses.labelSize,
|
|
1756
1731
|
weight: sizeClasses.labelWeight,
|
|
1757
|
-
className: `${variantClasses.labelColor} text-center uppercase tracking-wide ${labelClassName}`,
|
|
1732
|
+
className: `${variantClasses.labelColor} text-center uppercase tracking-wide truncate w-full ${size === "small" ? "text-[8px] leading-[9px]" : ""} ${labelClassName}`,
|
|
1758
1733
|
children: label
|
|
1759
1734
|
}
|
|
1760
1735
|
)
|