tanxin-ui 0.4.5 → 0.4.7
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/tanxin-ui.es.js +12 -0
- package/dist/tanxin-ui.umd.js +12 -12
- package/es/button/src/button.js +2 -1
- package/es/drawer/src/drawer.js +1 -1
- package/es/loading/src/loading.js +1 -1
- package/es/message-box/src/message-box-item.js +1 -1
- package/es/modal/src/modal.js +1 -1
- package/es/utils/colorPalette.js +13 -2
- package/lib/button/src/button.js +1 -0
- package/lib/drawer/src/drawer.js +1 -1
- package/lib/loading/src/loading.js +1 -1
- package/lib/message-box/src/message-box-item.js +1 -1
- package/lib/modal/src/modal.js +1 -1
- package/lib/utils/colorPalette.js +17 -1
- package/package.json +1 -1
- /package/es/utils/{ScrollbarWidth.js → ScrollbarWidth2.js} +0 -0
- /package/es/utils/{scrollbarWidth2.js → scrollbarWidth.js} +0 -0
- /package/lib/utils/{ScrollbarWidth.js → ScrollbarWidth2.js} +0 -0
- /package/lib/utils/{scrollbarWidth2.js → scrollbarWidth.js} +0 -0
package/dist/tanxin-ui.es.js
CHANGED
|
@@ -1757,6 +1757,17 @@ function colorPalette(color, index2) {
|
|
|
1757
1757
|
]);
|
|
1758
1758
|
return rgbToStr(resRgb);
|
|
1759
1759
|
}
|
|
1760
|
+
function colorHsl(color, index2) {
|
|
1761
|
+
const isLight2 = index2 <= 6;
|
|
1762
|
+
const rgb = strToRgb(color);
|
|
1763
|
+
const hsv = rgbToHsv(rgb);
|
|
1764
|
+
const i2 = isLight2 ? lightColorCount + 1 - index2 : index2 - lightColorCount - 1;
|
|
1765
|
+
return tinycolor({
|
|
1766
|
+
h: getHue(hsv[0], i2, isLight2),
|
|
1767
|
+
s: getSaturation(hsv[1], i2, isLight2),
|
|
1768
|
+
v: getValue$2(hsv[2], i2, isLight2)
|
|
1769
|
+
}).toHslString().replace(/hsl\((.*)\)/, "$1");
|
|
1770
|
+
}
|
|
1760
1771
|
var SearchOutline = defineComponent({
|
|
1761
1772
|
name: "SearchOutline",
|
|
1762
1773
|
render() {
|
|
@@ -1919,6 +1930,7 @@ var Button = defineComponent({
|
|
|
1919
1930
|
style["--color-5"] = colorPalette(color.value, 5);
|
|
1920
1931
|
style["--color-6"] = colorPalette(color.value, 6);
|
|
1921
1932
|
style["--color-7"] = colorPalette(color.value, 7);
|
|
1933
|
+
style["--color-1-hsl"] = colorHsl(color.value, 1);
|
|
1922
1934
|
}
|
|
1923
1935
|
return style;
|
|
1924
1936
|
});
|