kaleido-ui 0.1.86 → 0.1.88
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/tokens/index.cjs +33 -0
- package/dist/tokens/index.d.cts +3 -1
- package/dist/tokens/index.d.ts +3 -1
- package/dist/tokens/index.js +32 -0
- package/dist/web/index.cjs +11 -1
- package/dist/web/index.js +11 -1
- package/package.json +2 -1
package/dist/tokens/index.cjs
CHANGED
|
@@ -30,6 +30,7 @@ __export(tokens_exports, {
|
|
|
30
30
|
fontWeight: () => fontWeight,
|
|
31
31
|
gradient: () => gradient,
|
|
32
32
|
iconBoxSize: () => iconBoxSize,
|
|
33
|
+
iconColors: () => iconColors,
|
|
33
34
|
iconSize: () => iconSize,
|
|
34
35
|
keyframes: () => keyframes,
|
|
35
36
|
layer: () => layer,
|
|
@@ -605,6 +606,37 @@ var themes = { light, dark };
|
|
|
605
606
|
function makeTheme(mode) {
|
|
606
607
|
return themes[mode];
|
|
607
608
|
}
|
|
609
|
+
|
|
610
|
+
// src/tokens/icon-colors.generated.ts
|
|
611
|
+
var iconColors = {
|
|
612
|
+
"arbitrum": "#1C3249",
|
|
613
|
+
"avalanche": "#E84142",
|
|
614
|
+
"bitcoin": "#F7931A",
|
|
615
|
+
"bnb": "#F3BA2E",
|
|
616
|
+
"btc": "#F7931A",
|
|
617
|
+
"eth": "#ECEFF0",
|
|
618
|
+
"ethereum": "#ECEFF0",
|
|
619
|
+
"hypercore": "#072723",
|
|
620
|
+
"hyperevm": "#072723",
|
|
621
|
+
"lightning": "#F7931A",
|
|
622
|
+
"litecoin": "#385D9A",
|
|
623
|
+
"monad": "#6E54FF",
|
|
624
|
+
"optimism": "#FE0420",
|
|
625
|
+
"plasma": "#162F29",
|
|
626
|
+
"polygon": "#843BED",
|
|
627
|
+
"sol": "#2BD9B9",
|
|
628
|
+
"solana": "#9548FC",
|
|
629
|
+
"tempo": "#BFBFBF",
|
|
630
|
+
"ton": "#30A1F5",
|
|
631
|
+
"tron": "#FF0013",
|
|
632
|
+
"trx": "#FF0013",
|
|
633
|
+
"usdb": "#01875A",
|
|
634
|
+
"usdc": "#2775C9",
|
|
635
|
+
"usdce": "#2775CA",
|
|
636
|
+
"usdt": "#26A17B",
|
|
637
|
+
"xrp": "#23292F",
|
|
638
|
+
"zcash": "#ECB449"
|
|
639
|
+
};
|
|
608
640
|
// Annotate the CommonJS export names for ESM import in node:
|
|
609
641
|
0 && (module.exports = {
|
|
610
642
|
animation,
|
|
@@ -617,6 +649,7 @@ function makeTheme(mode) {
|
|
|
617
649
|
fontWeight,
|
|
618
650
|
gradient,
|
|
619
651
|
iconBoxSize,
|
|
652
|
+
iconColors,
|
|
620
653
|
iconSize,
|
|
621
654
|
keyframes,
|
|
622
655
|
layer,
|
package/dist/tokens/index.d.cts
CHANGED
|
@@ -571,4 +571,6 @@ declare const themes: Record<ThemeMode, KaleidoTheme>;
|
|
|
571
571
|
/** Resolve the full palette for a mode. */
|
|
572
572
|
declare function makeTheme(mode: ThemeMode): KaleidoTheme;
|
|
573
573
|
|
|
574
|
-
|
|
574
|
+
declare const iconColors: Record<string, string>;
|
|
575
|
+
|
|
576
|
+
export { type AppSemanticToken, type KaleidoTheme, type NativeTypeLevel, type ThemeMode, animation, appSemanticDark, appSemanticLight, appSemanticOrder, appStatusSubtleAlpha, colors, fontFamily, fontWeight, gradient, iconBoxSize, iconColors, iconSize, keyframes, layer, letterSpacing, lightSemanticColors, makeTheme, nativeType, radius, shadow, sizing, themes, transition, typeScale };
|
package/dist/tokens/index.d.ts
CHANGED
|
@@ -571,4 +571,6 @@ declare const themes: Record<ThemeMode, KaleidoTheme>;
|
|
|
571
571
|
/** Resolve the full palette for a mode. */
|
|
572
572
|
declare function makeTheme(mode: ThemeMode): KaleidoTheme;
|
|
573
573
|
|
|
574
|
-
|
|
574
|
+
declare const iconColors: Record<string, string>;
|
|
575
|
+
|
|
576
|
+
export { type AppSemanticToken, type KaleidoTheme, type NativeTypeLevel, type ThemeMode, animation, appSemanticDark, appSemanticLight, appSemanticOrder, appStatusSubtleAlpha, colors, fontFamily, fontWeight, gradient, iconBoxSize, iconColors, iconSize, keyframes, layer, letterSpacing, lightSemanticColors, makeTheme, nativeType, radius, shadow, sizing, themes, transition, typeScale };
|
package/dist/tokens/index.js
CHANGED
|
@@ -557,6 +557,37 @@ var themes = { light, dark };
|
|
|
557
557
|
function makeTheme(mode) {
|
|
558
558
|
return themes[mode];
|
|
559
559
|
}
|
|
560
|
+
|
|
561
|
+
// src/tokens/icon-colors.generated.ts
|
|
562
|
+
var iconColors = {
|
|
563
|
+
"arbitrum": "#1C3249",
|
|
564
|
+
"avalanche": "#E84142",
|
|
565
|
+
"bitcoin": "#F7931A",
|
|
566
|
+
"bnb": "#F3BA2E",
|
|
567
|
+
"btc": "#F7931A",
|
|
568
|
+
"eth": "#ECEFF0",
|
|
569
|
+
"ethereum": "#ECEFF0",
|
|
570
|
+
"hypercore": "#072723",
|
|
571
|
+
"hyperevm": "#072723",
|
|
572
|
+
"lightning": "#F7931A",
|
|
573
|
+
"litecoin": "#385D9A",
|
|
574
|
+
"monad": "#6E54FF",
|
|
575
|
+
"optimism": "#FE0420",
|
|
576
|
+
"plasma": "#162F29",
|
|
577
|
+
"polygon": "#843BED",
|
|
578
|
+
"sol": "#2BD9B9",
|
|
579
|
+
"solana": "#9548FC",
|
|
580
|
+
"tempo": "#BFBFBF",
|
|
581
|
+
"ton": "#30A1F5",
|
|
582
|
+
"tron": "#FF0013",
|
|
583
|
+
"trx": "#FF0013",
|
|
584
|
+
"usdb": "#01875A",
|
|
585
|
+
"usdc": "#2775C9",
|
|
586
|
+
"usdce": "#2775CA",
|
|
587
|
+
"usdt": "#26A17B",
|
|
588
|
+
"xrp": "#23292F",
|
|
589
|
+
"zcash": "#ECB449"
|
|
590
|
+
};
|
|
560
591
|
export {
|
|
561
592
|
animation,
|
|
562
593
|
appSemanticDark,
|
|
@@ -568,6 +599,7 @@ export {
|
|
|
568
599
|
fontWeight,
|
|
569
600
|
gradient,
|
|
570
601
|
iconBoxSize,
|
|
602
|
+
iconColors,
|
|
571
603
|
iconSize,
|
|
572
604
|
keyframes,
|
|
573
605
|
layer,
|
package/dist/web/index.cjs
CHANGED
|
@@ -3749,6 +3749,16 @@ var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
|
3749
3749
|
function NetworkMiniBadge({ iconUrl, label }) {
|
|
3750
3750
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: cn(iconBadgeOverlayClass, "overflow-hidden"), children: iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src: iconUrl, alt: label ?? "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "flex h-full w-full items-center justify-center bg-muted text-xxs font-bold uppercase leading-none text-muted-foreground", children: label?.charAt(0) }) });
|
|
3751
3751
|
}
|
|
3752
|
+
function readableTagColor(color) {
|
|
3753
|
+
const raw = color.replace("#", "");
|
|
3754
|
+
const hex = raw.length === 3 ? raw.split("").map((char) => char + char).join("") : raw;
|
|
3755
|
+
if (!/^[0-9a-fA-F]{6}$/.test(hex)) return color;
|
|
3756
|
+
const r = parseInt(hex.slice(0, 2), 16);
|
|
3757
|
+
const g = parseInt(hex.slice(2, 4), 16);
|
|
3758
|
+
const b = parseInt(hex.slice(4, 6), 16);
|
|
3759
|
+
const luminance = (0.2126 * r + 0.7152 * g + 0.0722 * b) / 255;
|
|
3760
|
+
return luminance < 0.45 ? `color-mix(in srgb, ${color} 45%, white)` : color;
|
|
3761
|
+
}
|
|
3752
3762
|
function AssetSelector({
|
|
3753
3763
|
label,
|
|
3754
3764
|
selectedTicker,
|
|
@@ -3840,7 +3850,7 @@ function AssetSelector({
|
|
|
3840
3850
|
),
|
|
3841
3851
|
style: option.networkTag.color ? {
|
|
3842
3852
|
backgroundColor: `color-mix(in srgb, ${option.networkTag.color} 15%, transparent)`,
|
|
3843
|
-
color: option.networkTag.color
|
|
3853
|
+
color: readableTagColor(option.networkTag.color)
|
|
3844
3854
|
} : void 0,
|
|
3845
3855
|
children: option.networkTag.label
|
|
3846
3856
|
}
|
package/dist/web/index.js
CHANGED
|
@@ -3568,6 +3568,16 @@ import { Fragment as Fragment6, jsx as jsx38, jsxs as jsxs25 } from "react/jsx-r
|
|
|
3568
3568
|
function NetworkMiniBadge({ iconUrl, label }) {
|
|
3569
3569
|
return /* @__PURE__ */ jsx38("span", { className: cn(iconBadgeOverlayClass, "overflow-hidden"), children: iconUrl ? /* @__PURE__ */ jsx38("img", { src: iconUrl, alt: label ?? "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx38("span", { className: "flex h-full w-full items-center justify-center bg-muted text-xxs font-bold uppercase leading-none text-muted-foreground", children: label?.charAt(0) }) });
|
|
3570
3570
|
}
|
|
3571
|
+
function readableTagColor(color) {
|
|
3572
|
+
const raw = color.replace("#", "");
|
|
3573
|
+
const hex = raw.length === 3 ? raw.split("").map((char) => char + char).join("") : raw;
|
|
3574
|
+
if (!/^[0-9a-fA-F]{6}$/.test(hex)) return color;
|
|
3575
|
+
const r = parseInt(hex.slice(0, 2), 16);
|
|
3576
|
+
const g = parseInt(hex.slice(2, 4), 16);
|
|
3577
|
+
const b = parseInt(hex.slice(4, 6), 16);
|
|
3578
|
+
const luminance = (0.2126 * r + 0.7152 * g + 0.0722 * b) / 255;
|
|
3579
|
+
return luminance < 0.45 ? `color-mix(in srgb, ${color} 45%, white)` : color;
|
|
3580
|
+
}
|
|
3571
3581
|
function AssetSelector({
|
|
3572
3582
|
label,
|
|
3573
3583
|
selectedTicker,
|
|
@@ -3659,7 +3669,7 @@ function AssetSelector({
|
|
|
3659
3669
|
),
|
|
3660
3670
|
style: option.networkTag.color ? {
|
|
3661
3671
|
backgroundColor: `color-mix(in srgb, ${option.networkTag.color} 15%, transparent)`,
|
|
3662
|
-
color: option.networkTag.color
|
|
3672
|
+
color: readableTagColor(option.networkTag.color)
|
|
3663
3673
|
} : void 0,
|
|
3664
3674
|
children: option.networkTag.label
|
|
3665
3675
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kaleido-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.88",
|
|
4
4
|
"description": "KaleidoSwap shared UI library — design tokens, web components (Tailwind + Radix), and React Native components extending WDK UI Kit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
"autoprefixer": "^10.5.0",
|
|
118
118
|
"class-variance-authority": "^0.7.1",
|
|
119
119
|
"clsx": "^2.1.1",
|
|
120
|
+
"pngjs": "^7.0.0",
|
|
120
121
|
"postcss": "^8.4.49",
|
|
121
122
|
"react": "^19.0.0",
|
|
122
123
|
"react-dom": "^19.0.0",
|