@tidbcloud/uikit 2.0.0-beta.10 → 2.0.0-beta.11
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/CHANGELOG.md +6 -0
- package/dist/theme/theme.cjs +27 -18
- package/dist/theme/theme.js +27 -18
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/theme/theme.cjs
CHANGED
|
@@ -639,14 +639,38 @@ const theme = {
|
|
|
639
639
|
}
|
|
640
640
|
},
|
|
641
641
|
Radio: {
|
|
642
|
-
defaultProps: {
|
|
643
|
-
size: "xs"
|
|
644
|
-
},
|
|
645
642
|
styles(theme2, params) {
|
|
646
643
|
const color = params.color ?? "carbon";
|
|
647
644
|
const shade = color === "carbon" ? 9 : 7;
|
|
645
|
+
const size = params.size ?? "sm";
|
|
646
|
+
const sizes = {
|
|
647
|
+
xs: 14,
|
|
648
|
+
sm: 16,
|
|
649
|
+
md: 20,
|
|
650
|
+
lg: 24,
|
|
651
|
+
xl: 30
|
|
652
|
+
};
|
|
653
|
+
const iconSizes = {
|
|
654
|
+
xs: 5,
|
|
655
|
+
sm: 6,
|
|
656
|
+
md: 8,
|
|
657
|
+
lg: 10,
|
|
658
|
+
xl: 12
|
|
659
|
+
};
|
|
648
660
|
return {
|
|
661
|
+
icon: {
|
|
662
|
+
width: theme2.fn.size({ sizes: iconSizes, size }),
|
|
663
|
+
height: theme2.fn.size({ sizes: iconSizes, size }),
|
|
664
|
+
top: `calc(50% - ${theme2.fn.size({ sizes: iconSizes, size }) / 2}px)`,
|
|
665
|
+
left: `calc(50% - ${theme2.fn.size({ sizes: iconSizes, size }) / 2}px)`
|
|
666
|
+
},
|
|
667
|
+
label: {
|
|
668
|
+
lineHeight: `${theme2.fn.size({ sizes, size })}px`
|
|
669
|
+
},
|
|
649
670
|
radio: {
|
|
671
|
+
width: theme2.fn.size({ sizes, size }),
|
|
672
|
+
height: theme2.fn.size({ sizes, size }),
|
|
673
|
+
borderRadius: theme2.fn.size({ sizes, size }),
|
|
650
674
|
borderColor: theme2.colors[color][6],
|
|
651
675
|
"&:checked:not(:disabled)": {
|
|
652
676
|
background: theme2.colors[color][shade],
|
|
@@ -666,21 +690,6 @@ const theme = {
|
|
|
666
690
|
}
|
|
667
691
|
};
|
|
668
692
|
}
|
|
669
|
-
},
|
|
670
|
-
RadioGroup: {
|
|
671
|
-
defaultProps: {
|
|
672
|
-
size: "xs",
|
|
673
|
-
labelProps: {
|
|
674
|
-
size: "sm"
|
|
675
|
-
},
|
|
676
|
-
descriptionProps: {
|
|
677
|
-
size: "sm"
|
|
678
|
-
},
|
|
679
|
-
errorProps: {
|
|
680
|
-
size: "sm",
|
|
681
|
-
mt: 4
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
693
|
}
|
|
685
694
|
}
|
|
686
695
|
};
|
package/dist/theme/theme.js
CHANGED
|
@@ -637,14 +637,38 @@ const theme = {
|
|
|
637
637
|
}
|
|
638
638
|
},
|
|
639
639
|
Radio: {
|
|
640
|
-
defaultProps: {
|
|
641
|
-
size: "xs"
|
|
642
|
-
},
|
|
643
640
|
styles(theme2, params) {
|
|
644
641
|
const color = params.color ?? "carbon";
|
|
645
642
|
const shade = color === "carbon" ? 9 : 7;
|
|
643
|
+
const size = params.size ?? "sm";
|
|
644
|
+
const sizes = {
|
|
645
|
+
xs: 14,
|
|
646
|
+
sm: 16,
|
|
647
|
+
md: 20,
|
|
648
|
+
lg: 24,
|
|
649
|
+
xl: 30
|
|
650
|
+
};
|
|
651
|
+
const iconSizes = {
|
|
652
|
+
xs: 5,
|
|
653
|
+
sm: 6,
|
|
654
|
+
md: 8,
|
|
655
|
+
lg: 10,
|
|
656
|
+
xl: 12
|
|
657
|
+
};
|
|
646
658
|
return {
|
|
659
|
+
icon: {
|
|
660
|
+
width: theme2.fn.size({ sizes: iconSizes, size }),
|
|
661
|
+
height: theme2.fn.size({ sizes: iconSizes, size }),
|
|
662
|
+
top: `calc(50% - ${theme2.fn.size({ sizes: iconSizes, size }) / 2}px)`,
|
|
663
|
+
left: `calc(50% - ${theme2.fn.size({ sizes: iconSizes, size }) / 2}px)`
|
|
664
|
+
},
|
|
665
|
+
label: {
|
|
666
|
+
lineHeight: `${theme2.fn.size({ sizes, size })}px`
|
|
667
|
+
},
|
|
647
668
|
radio: {
|
|
669
|
+
width: theme2.fn.size({ sizes, size }),
|
|
670
|
+
height: theme2.fn.size({ sizes, size }),
|
|
671
|
+
borderRadius: theme2.fn.size({ sizes, size }),
|
|
648
672
|
borderColor: theme2.colors[color][6],
|
|
649
673
|
"&:checked:not(:disabled)": {
|
|
650
674
|
background: theme2.colors[color][shade],
|
|
@@ -664,21 +688,6 @@ const theme = {
|
|
|
664
688
|
}
|
|
665
689
|
};
|
|
666
690
|
}
|
|
667
|
-
},
|
|
668
|
-
RadioGroup: {
|
|
669
|
-
defaultProps: {
|
|
670
|
-
size: "xs",
|
|
671
|
-
labelProps: {
|
|
672
|
-
size: "sm"
|
|
673
|
-
},
|
|
674
|
-
descriptionProps: {
|
|
675
|
-
size: "sm"
|
|
676
|
-
},
|
|
677
|
-
errorProps: {
|
|
678
|
-
size: "sm",
|
|
679
|
-
mt: 4
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
691
|
}
|
|
683
692
|
}
|
|
684
693
|
};
|