@kbach/react 0.2.5 → 0.2.6
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/{chunk-IYY3U6L2.mjs → chunk-7YSVROUJ.mjs} +19 -0
- package/dist/{chunk-23GRUDYB.mjs → chunk-XW4LEBBB.mjs} +1 -1
- package/dist/index.js +19 -0
- package/dist/index.mjs +1 -1
- package/dist/jsx-dev-runtime.js +19 -0
- package/dist/jsx-dev-runtime.mjs +2 -2
- package/dist/jsx-runtime.js +19 -0
- package/dist/jsx-runtime.mjs +2 -2
- package/package.json +1 -1
|
@@ -1043,6 +1043,25 @@ function resolveColor(value, colors, isArbitrary) {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
|
+
if (hex && !hex.startsWith("#") && !hex.startsWith("rgb") && hex !== "transparent" && hex !== "currentColor") {
|
|
1047
|
+
if (hex in colors) {
|
|
1048
|
+
const alias = colors[hex];
|
|
1049
|
+
if (typeof alias === "string") hex = alias;
|
|
1050
|
+
else if (typeof alias === "object" && "6" in alias) hex = alias["6"] ?? hex;
|
|
1051
|
+
} else {
|
|
1052
|
+
const aliasLastDash = hex.lastIndexOf("-");
|
|
1053
|
+
if (aliasLastDash > 0) {
|
|
1054
|
+
const aliasColorName = hex.slice(0, aliasLastDash);
|
|
1055
|
+
const aliasShade = hex.slice(aliasLastDash + 1);
|
|
1056
|
+
const aliasScale = colors[aliasColorName];
|
|
1057
|
+
if (aliasScale && typeof aliasScale === "object") {
|
|
1058
|
+
hex = aliasScale[aliasShade] ?? null;
|
|
1059
|
+
} else if (typeof aliasScale === "string") {
|
|
1060
|
+
hex = aliasScale;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1046
1065
|
if (!hex) return null;
|
|
1047
1066
|
if (!opacityPart) return hex;
|
|
1048
1067
|
let alpha;
|
package/dist/index.js
CHANGED
|
@@ -1143,6 +1143,25 @@ function resolveColor(value, colors, isArbitrary) {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
|
+
if (hex && !hex.startsWith("#") && !hex.startsWith("rgb") && hex !== "transparent" && hex !== "currentColor") {
|
|
1147
|
+
if (hex in colors) {
|
|
1148
|
+
const alias = colors[hex];
|
|
1149
|
+
if (typeof alias === "string") hex = alias;
|
|
1150
|
+
else if (typeof alias === "object" && "6" in alias) hex = alias["6"] ?? hex;
|
|
1151
|
+
} else {
|
|
1152
|
+
const aliasLastDash = hex.lastIndexOf("-");
|
|
1153
|
+
if (aliasLastDash > 0) {
|
|
1154
|
+
const aliasColorName = hex.slice(0, aliasLastDash);
|
|
1155
|
+
const aliasShade = hex.slice(aliasLastDash + 1);
|
|
1156
|
+
const aliasScale = colors[aliasColorName];
|
|
1157
|
+
if (aliasScale && typeof aliasScale === "object") {
|
|
1158
|
+
hex = aliasScale[aliasShade] ?? null;
|
|
1159
|
+
} else if (typeof aliasScale === "string") {
|
|
1160
|
+
hex = aliasScale;
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1146
1165
|
if (!hex) return null;
|
|
1147
1166
|
if (!opacityPart) return hex;
|
|
1148
1167
|
let alpha;
|
package/dist/index.mjs
CHANGED
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -1112,6 +1112,25 @@ function resolveColor(value, colors, isArbitrary) {
|
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
|
+
if (hex && !hex.startsWith("#") && !hex.startsWith("rgb") && hex !== "transparent" && hex !== "currentColor") {
|
|
1116
|
+
if (hex in colors) {
|
|
1117
|
+
const alias = colors[hex];
|
|
1118
|
+
if (typeof alias === "string") hex = alias;
|
|
1119
|
+
else if (typeof alias === "object" && "6" in alias) hex = alias["6"] ?? hex;
|
|
1120
|
+
} else {
|
|
1121
|
+
const aliasLastDash = hex.lastIndexOf("-");
|
|
1122
|
+
if (aliasLastDash > 0) {
|
|
1123
|
+
const aliasColorName = hex.slice(0, aliasLastDash);
|
|
1124
|
+
const aliasShade = hex.slice(aliasLastDash + 1);
|
|
1125
|
+
const aliasScale = colors[aliasColorName];
|
|
1126
|
+
if (aliasScale && typeof aliasScale === "object") {
|
|
1127
|
+
hex = aliasScale[aliasShade] ?? null;
|
|
1128
|
+
} else if (typeof aliasScale === "string") {
|
|
1129
|
+
hex = aliasScale;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1115
1134
|
if (!hex) return null;
|
|
1116
1135
|
if (!opacityPart) return hex;
|
|
1117
1136
|
let alpha;
|
package/dist/jsx-dev-runtime.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
Fragment,
|
|
3
3
|
jsx,
|
|
4
4
|
jsxs
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-XW4LEBBB.mjs";
|
|
6
|
+
import "./chunk-7YSVROUJ.mjs";
|
|
7
7
|
|
|
8
8
|
// src/jsx-dev-runtime.tsx
|
|
9
9
|
function jsxDEV(type, props, key, isStaticChildren, _source, _self) {
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -1111,6 +1111,25 @@ function resolveColor(value, colors, isArbitrary) {
|
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
|
+
if (hex && !hex.startsWith("#") && !hex.startsWith("rgb") && hex !== "transparent" && hex !== "currentColor") {
|
|
1115
|
+
if (hex in colors) {
|
|
1116
|
+
const alias = colors[hex];
|
|
1117
|
+
if (typeof alias === "string") hex = alias;
|
|
1118
|
+
else if (typeof alias === "object" && "6" in alias) hex = alias["6"] ?? hex;
|
|
1119
|
+
} else {
|
|
1120
|
+
const aliasLastDash = hex.lastIndexOf("-");
|
|
1121
|
+
if (aliasLastDash > 0) {
|
|
1122
|
+
const aliasColorName = hex.slice(0, aliasLastDash);
|
|
1123
|
+
const aliasShade = hex.slice(aliasLastDash + 1);
|
|
1124
|
+
const aliasScale = colors[aliasColorName];
|
|
1125
|
+
if (aliasScale && typeof aliasScale === "object") {
|
|
1126
|
+
hex = aliasScale[aliasShade] ?? null;
|
|
1127
|
+
} else if (typeof aliasScale === "string") {
|
|
1128
|
+
hex = aliasScale;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1114
1133
|
if (!hex) return null;
|
|
1115
1134
|
if (!opacityPart) return hex;
|
|
1116
1135
|
let alpha;
|
package/dist/jsx-runtime.mjs
CHANGED