@trops/dash-core 0.1.572 → 0.1.573
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.esm.js +13 -17
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35302,24 +35302,20 @@ var ColorTile = function ColorTile(_ref) {
|
|
|
35302
35302
|
level: colorLevelName
|
|
35303
35303
|
}, rest));
|
|
35304
35304
|
|
|
35305
|
-
//
|
|
35306
|
-
|
|
35307
|
-
//
|
|
35308
|
-
//
|
|
35309
|
-
|
|
35310
|
-
//
|
|
35311
|
-
|
|
35312
|
-
|
|
35313
|
-
|
|
35314
|
-
|
|
35315
|
-
|
|
35316
|
-
// shade: shade !== null ? shade : colorFromTheme !== null && derivedShade,
|
|
35317
|
-
// stringColor,
|
|
35318
|
-
// ...rest
|
|
35319
|
-
// };
|
|
35320
|
-
|
|
35305
|
+
// If the channel value is a hex (custom-color theme — PRD
|
|
35306
|
+
// arbitrary-color-themes.md), `c.class` becomes `bg-#xxx-500`
|
|
35307
|
+
// which isn't a valid Tailwind class and renders as nothing
|
|
35308
|
+
// (the dark page background bleeds through, looking black).
|
|
35309
|
+
// Use inline style for hex backgrounds; named colors continue
|
|
35310
|
+
// through the className path so existing themes are unchanged.
|
|
35311
|
+
var colorIsHex = DashReact.isHexColor(colorName);
|
|
35312
|
+
var inlineStyle = colorIsHex ? {
|
|
35313
|
+
backgroundColor: colorName
|
|
35314
|
+
} : undefined;
|
|
35315
|
+
var bgClass = colorIsHex ? "" : c["class"];
|
|
35321
35316
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35322
|
-
className: "flex flex-col rounded-lg cursor-pointer items-center justify-center border-2 text-xs ".concat(selected === true ? "border-yellow-500" : "border-gray-800", " hover:border-yellow-500 border-gray-800 ").concat(
|
|
35317
|
+
className: "flex flex-col rounded-lg cursor-pointer items-center justify-center border-2 text-xs ".concat(selected === true ? "border-yellow-500" : "border-gray-800", " hover:border-yellow-500 border-gray-800 ").concat(bgClass, " ").concat(width, " ").concat(height),
|
|
35318
|
+
style: inlineStyle,
|
|
35323
35319
|
onClick: function onClick() {
|
|
35324
35320
|
return _onClick !== null ? _onClick(_objectSpread$F(_objectSpread$F({}, c), rest)) : null;
|
|
35325
35321
|
},
|