@shoplflow/base 0.15.1 → 0.15.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.
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1016,8 +1016,9 @@ exports.ChipToggle = ChipToggle;
|
|
|
1016
1016
|
// src/utils/getNextColor.ts
|
|
1017
1017
|
var getNextColor = (color, step = 1) => {
|
|
1018
1018
|
const colorName = color.replace(/[0-9]|_/g, "");
|
|
1019
|
-
const
|
|
1020
|
-
const
|
|
1019
|
+
const colorNumberString = color.replace(/[a-z]|_/g, "");
|
|
1020
|
+
const decimalColorNumber = Number(colorNumberString) * 0.01;
|
|
1021
|
+
const nextColorNumber = Math.floor(decimalColorNumber) + 100 * step;
|
|
1021
1022
|
const nextColorToken = `${colorName}${nextColorNumber}`;
|
|
1022
1023
|
const colorKeysOfColorName = Object.keys(exports.colorTokens).filter((colorToken) => colorToken.includes(colorName)).sort((a, b) => Number(a.replace(/[a-z]|_/g, "")) - Number(b.replace(/[a-z]|_/g, "")));
|
|
1023
1024
|
const colorTokenKeys = Object.keys(exports.colorTokens);
|