@udixio/theme 2.1.12 → 2.1.14
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/CHANGELOG.md +20 -0
- package/dist/bin.cjs +1 -1
- package/dist/bin.js +1 -1
- package/dist/browser.cjs +2 -2
- package/dist/browser.js +32 -32
- package/dist/{font.plugin-BorVbapj.js → font.plugin-BXjaZrFM.js} +3 -3
- package/dist/{font.plugin-B6HEs4Om.cjs → font.plugin-CCt54Tnx.cjs} +1 -1
- package/dist/{load-from-path-CHmj8u_v.js → load-from-path-Cctfzaw6.js} +1 -1
- package/dist/{load-from-path-DVvlFI1M.cjs → load-from-path-CewyV1N6.cjs} +2 -2
- package/dist/{loader-BZta4ulw.cjs → loader-DKt7MGAX.cjs} +3 -10
- package/dist/{loader-DVtdg4Xh.js → loader-DnW57GzE.js} +31 -38
- package/dist/node.cjs +3 -3
- package/dist/node.js +34 -34
- package/dist/variant/variants/udixio.variant.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/variant/variants/udixio.variant.ts +7 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## 2.1.14 (2026-02-08)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- improve color theme ([e247e14](https://github.com/Udixio/UI/commit/e247e14))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Joël VIGREUX
|
|
10
|
+
|
|
11
|
+
## 2.1.13 (2026-02-02)
|
|
12
|
+
|
|
13
|
+
### 🩹 Fixes
|
|
14
|
+
|
|
15
|
+
- **theme:** remove debug `console.log` from `udixio ([e02f6ce](https://github.com/Udixio/UI/commit/e02f6ce))
|
|
16
|
+
|
|
17
|
+
### ❤️ Thank You
|
|
18
|
+
|
|
19
|
+
- Joël VIGREUX
|
|
20
|
+
|
|
1
21
|
## 2.1.12 (2026-01-30)
|
|
2
22
|
|
|
3
23
|
### 🚀 Features
|
package/dist/bin.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const commander = require("commander");
|
|
3
3
|
const chokidar = require("chokidar");
|
|
4
4
|
const chalk = require("chalk");
|
|
5
|
-
const loadFromPath = require("./load-from-path-
|
|
5
|
+
const loadFromPath = require("./load-from-path-CewyV1N6.cjs");
|
|
6
6
|
const program = new commander.Command();
|
|
7
7
|
async function runOnce(configPath) {
|
|
8
8
|
try {
|
package/dist/bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import chokidar from "chokidar";
|
|
3
3
|
import chalk from "chalk";
|
|
4
|
-
import { l as loadFromPath } from "./load-from-path-
|
|
4
|
+
import { l as loadFromPath } from "./load-from-path-Cctfzaw6.js";
|
|
5
5
|
const program = new Command();
|
|
6
6
|
async function runOnce(configPath) {
|
|
7
7
|
try {
|
package/dist/browser.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const loader = require("./loader-
|
|
4
|
-
const font_plugin = require("./font.plugin-
|
|
3
|
+
const loader = require("./loader-DKt7MGAX.cjs");
|
|
4
|
+
const font_plugin = require("./font.plugin-CCt54Tnx.cjs");
|
|
5
5
|
exports.API = loader.API;
|
|
6
6
|
exports.AppContainer = loader.AppContainer;
|
|
7
7
|
exports.AppModule = loader.AppModule;
|
package/dist/browser.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { A, a, b,
|
|
2
|
-
import { F as F2,
|
|
1
|
+
import { A, a, b, C, c, d, e, f, g, h, i, j, k, D, P, l, m, n, o, V, p, q, r, s, t, u, v, w, x, y, z, B, E, F, G } from "./loader-DnW57GzE.js";
|
|
2
|
+
import { F as F2, a as a2, P as P2, b as b2, d as d2 } from "./font.plugin-BXjaZrFM.js";
|
|
3
3
|
export {
|
|
4
4
|
A as API,
|
|
5
5
|
a as AppContainer,
|
|
6
6
|
b as AppModule,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
C as Color,
|
|
8
|
+
c as ColorAlias,
|
|
9
|
+
d as ColorApi,
|
|
10
|
+
e as ColorFromHex,
|
|
11
|
+
f as ColorFromPalette,
|
|
12
|
+
g as ColorManager,
|
|
13
|
+
h as ColorModule,
|
|
14
|
+
i as Context,
|
|
15
|
+
j as ContextModule,
|
|
16
|
+
k as ContrastCurve,
|
|
17
17
|
D as DynamicColor,
|
|
18
18
|
F2 as FontFamily,
|
|
19
|
-
|
|
19
|
+
a2 as FontPlugin,
|
|
20
20
|
P as Palette,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
l as PaletteApi,
|
|
22
|
+
m as PaletteModule,
|
|
23
23
|
P2 as PluginAbstract,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
n as PluginApi,
|
|
25
|
+
b2 as PluginImplAbstract,
|
|
26
|
+
o as PluginModule,
|
|
27
27
|
V as Variant,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
p as Variants,
|
|
29
|
+
q as bootstrap,
|
|
30
|
+
r as capitalizeFirstLetter,
|
|
31
|
+
s as defaultColors,
|
|
32
32
|
d2 as defineConfig,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
t as expressiveVariant,
|
|
34
|
+
u as getInitialToneFromBackground,
|
|
35
|
+
v as getPiecewiseHue,
|
|
36
|
+
w as getRotatedHue,
|
|
37
|
+
x as highestSurface,
|
|
38
|
+
y as loader,
|
|
39
|
+
z as neutralVariant,
|
|
40
40
|
B as tonalSpotVariant,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
E as toneDeltaPair,
|
|
42
|
+
F as variant,
|
|
43
|
+
G as vibrantVariant
|
|
44
44
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import "./loader-
|
|
4
|
+
import "./loader-DnW57GzE.js";
|
|
5
5
|
class PluginAbstract {
|
|
6
6
|
constructor(options) {
|
|
7
7
|
__publicField(this, "options");
|
|
@@ -222,7 +222,7 @@ class FontPluginImpl extends PluginImplAbstract {
|
|
|
222
222
|
export {
|
|
223
223
|
FontFamily as F,
|
|
224
224
|
PluginAbstract as P,
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
FontPlugin as a,
|
|
226
|
+
PluginImplAbstract as b,
|
|
227
227
|
defineConfig as d
|
|
228
228
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
require("./loader-
|
|
5
|
+
require("./loader-DKt7MGAX.cjs");
|
|
6
6
|
class PluginAbstract {
|
|
7
7
|
constructor(options) {
|
|
8
8
|
__publicField(this, "options");
|
|
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
|
-
const loader = require("./loader-
|
|
24
|
+
const loader = require("./loader-DKt7MGAX.cjs");
|
|
25
25
|
const fs = require("node:fs");
|
|
26
26
|
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
27
27
|
function _interopNamespaceDefault(e) {
|
|
@@ -44,7 +44,7 @@ const fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs);
|
|
|
44
44
|
async function resolveConfig(configPath = "./theme.config") {
|
|
45
45
|
const { createJiti } = await import("jiti");
|
|
46
46
|
const { resolve } = await import("pathe");
|
|
47
|
-
const jiti = createJiti(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("load-from-path-
|
|
47
|
+
const jiti = createJiti(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("load-from-path-CewyV1N6.cjs", document.baseURI).href, {
|
|
48
48
|
debug: process.env.NODE_ENV === "development",
|
|
49
49
|
fsCache: true,
|
|
50
50
|
interopDefault: true
|
|
@@ -3100,7 +3100,6 @@ const createMinContrastToneAdjuster = (ctx, colors, options) => {
|
|
|
3100
3100
|
const referenceTone = referenceKey ? colors.get(referenceKey).getTone() : highestSurface(ctx, colors).getTone();
|
|
3101
3101
|
const baseTone = colors.get(selfKey).options.tone;
|
|
3102
3102
|
let selfTone = baseTone;
|
|
3103
|
-
console.log("contrast ratio2", referenceTone, selfTone);
|
|
3104
3103
|
if (materialColorUtilities.Contrast.ratioOfTones(referenceTone, selfTone) < minContrast) {
|
|
3105
3104
|
const ratio = calculateToneAdjustmentPercentage(
|
|
3106
3105
|
referenceTone,
|
|
@@ -3121,7 +3120,7 @@ const udixioVariant = variant({
|
|
|
3121
3120
|
}),
|
|
3122
3121
|
secondary: ({ sourceColor }) => ({
|
|
3123
3122
|
hue: sourceColor.hue,
|
|
3124
|
-
chroma: sourceColor.chroma
|
|
3123
|
+
chroma: sourceColor.chroma * 0.5
|
|
3125
3124
|
}),
|
|
3126
3125
|
tertiary: ({ sourceColor }) => ({
|
|
3127
3126
|
hue: getRotatedHue(
|
|
@@ -3215,13 +3214,7 @@ const udixioVariant = variant({
|
|
|
3215
3214
|
[colorContainerKey]: {
|
|
3216
3215
|
palette: () => palettes.get(colorKey),
|
|
3217
3216
|
tone: () => {
|
|
3218
|
-
|
|
3219
|
-
return ctx.isDark ? tMinC(palettes.get(colorKey), 30, 40) : tMaxC(palettes.get(colorKey), 84, 90);
|
|
3220
|
-
} else if (ctx.variant.name === "expressive") {
|
|
3221
|
-
return ctx.isDark ? 15 : tMaxC(palettes.get(colorKey), 90, 95);
|
|
3222
|
-
} else {
|
|
3223
|
-
return ctx.isDark ? 25 : 90;
|
|
3224
|
-
}
|
|
3217
|
+
return ctx.isDark ? tMinC(palettes.get(colorKey), 35, 93) : tMaxC(palettes.get(colorKey), 0, 90);
|
|
3225
3218
|
},
|
|
3226
3219
|
isBackground: true,
|
|
3227
3220
|
background: () => highestSurface(ctx, colors2),
|
|
@@ -3583,7 +3576,7 @@ const udixioVariant = variant({
|
|
|
3583
3576
|
secondaryContainer: {
|
|
3584
3577
|
palette: () => palettes.get("secondary"),
|
|
3585
3578
|
tone: () => {
|
|
3586
|
-
return ctx.isDark ?
|
|
3579
|
+
return ctx.isDark ? tMinC(palettes.get("secondary"), 35, 93) : tMaxC(palettes.get("secondary"), 0, 90);
|
|
3587
3580
|
},
|
|
3588
3581
|
isBackground: true,
|
|
3589
3582
|
background: () => highestSurface(ctx, colors),
|
|
@@ -3099,7 +3099,6 @@ const createMinContrastToneAdjuster = (ctx, colors, options) => {
|
|
|
3099
3099
|
const referenceTone = referenceKey ? colors.get(referenceKey).getTone() : highestSurface(ctx, colors).getTone();
|
|
3100
3100
|
const baseTone = colors.get(selfKey).options.tone;
|
|
3101
3101
|
let selfTone = baseTone;
|
|
3102
|
-
console.log("contrast ratio2", referenceTone, selfTone);
|
|
3103
3102
|
if (Contrast.ratioOfTones(referenceTone, selfTone) < minContrast) {
|
|
3104
3103
|
const ratio = calculateToneAdjustmentPercentage(
|
|
3105
3104
|
referenceTone,
|
|
@@ -3120,7 +3119,7 @@ const udixioVariant = variant({
|
|
|
3120
3119
|
}),
|
|
3121
3120
|
secondary: ({ sourceColor }) => ({
|
|
3122
3121
|
hue: sourceColor.hue,
|
|
3123
|
-
chroma: sourceColor.chroma
|
|
3122
|
+
chroma: sourceColor.chroma * 0.5
|
|
3124
3123
|
}),
|
|
3125
3124
|
tertiary: ({ sourceColor }) => ({
|
|
3126
3125
|
hue: getRotatedHue(
|
|
@@ -3214,13 +3213,7 @@ const udixioVariant = variant({
|
|
|
3214
3213
|
[colorContainerKey]: {
|
|
3215
3214
|
palette: () => palettes.get(colorKey),
|
|
3216
3215
|
tone: () => {
|
|
3217
|
-
|
|
3218
|
-
return ctx.isDark ? tMinC(palettes.get(colorKey), 30, 40) : tMaxC(palettes.get(colorKey), 84, 90);
|
|
3219
|
-
} else if (ctx.variant.name === "expressive") {
|
|
3220
|
-
return ctx.isDark ? 15 : tMaxC(palettes.get(colorKey), 90, 95);
|
|
3221
|
-
} else {
|
|
3222
|
-
return ctx.isDark ? 25 : 90;
|
|
3223
|
-
}
|
|
3216
|
+
return ctx.isDark ? tMinC(palettes.get(colorKey), 35, 93) : tMaxC(palettes.get(colorKey), 0, 90);
|
|
3224
3217
|
},
|
|
3225
3218
|
isBackground: true,
|
|
3226
3219
|
background: () => highestSurface(ctx, colors2),
|
|
@@ -3582,7 +3575,7 @@ const udixioVariant = variant({
|
|
|
3582
3575
|
secondaryContainer: {
|
|
3583
3576
|
palette: () => palettes.get("secondary"),
|
|
3584
3577
|
tone: () => {
|
|
3585
|
-
return ctx.isDark ?
|
|
3578
|
+
return ctx.isDark ? tMinC(palettes.get("secondary"), 35, 93) : tMaxC(palettes.get("secondary"), 0, 90);
|
|
3586
3579
|
},
|
|
3587
3580
|
isBackground: true,
|
|
3588
3581
|
background: () => highestSurface(ctx, colors),
|
|
@@ -3877,37 +3870,37 @@ const loader = async (config, load = true) => {
|
|
|
3877
3870
|
export {
|
|
3878
3871
|
API as A,
|
|
3879
3872
|
tonalSpotVariant as B,
|
|
3880
|
-
|
|
3873
|
+
Color as C,
|
|
3881
3874
|
DynamicColor as D,
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3875
|
+
toneDeltaPair as E,
|
|
3876
|
+
variant as F,
|
|
3877
|
+
vibrantVariant as G,
|
|
3885
3878
|
Palette as P,
|
|
3886
3879
|
Variant as V,
|
|
3887
3880
|
AppContainer as a,
|
|
3888
3881
|
AppModule as b,
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3882
|
+
ColorAlias as c,
|
|
3883
|
+
ColorApi as d,
|
|
3884
|
+
ColorFromHex as e,
|
|
3885
|
+
ColorFromPalette as f,
|
|
3886
|
+
ColorManager as g,
|
|
3887
|
+
ColorModule as h,
|
|
3888
|
+
Context as i,
|
|
3889
|
+
ContextModule as j,
|
|
3890
|
+
ContrastCurve as k,
|
|
3891
|
+
PaletteApi as l,
|
|
3892
|
+
PaletteModule as m,
|
|
3893
|
+
PluginApi as n,
|
|
3894
|
+
PluginModule as o,
|
|
3895
|
+
Variants as p,
|
|
3896
|
+
bootstrap as q,
|
|
3897
|
+
capitalizeFirstLetter as r,
|
|
3898
|
+
defaultColors as s,
|
|
3899
|
+
expressiveVariant as t,
|
|
3900
|
+
getInitialToneFromBackground as u,
|
|
3901
|
+
getPiecewiseHue as v,
|
|
3902
|
+
getRotatedHue as w,
|
|
3903
|
+
highestSurface$1 as x,
|
|
3904
|
+
loader as y,
|
|
3905
|
+
neutralVariant as z
|
|
3913
3906
|
};
|
package/dist/node.cjs
CHANGED
|
@@ -22,9 +22,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
24
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
25
|
-
const loader = require("./loader-
|
|
26
|
-
const font_plugin = require("./font.plugin-
|
|
27
|
-
const loadFromPath = require("./load-from-path-
|
|
25
|
+
const loader = require("./loader-DKt7MGAX.cjs");
|
|
26
|
+
const font_plugin = require("./font.plugin-CCt54Tnx.cjs");
|
|
27
|
+
const loadFromPath = require("./load-from-path-CewyV1N6.cjs");
|
|
28
28
|
let unpluginInstance = null;
|
|
29
29
|
const createUnpluginTheme = async () => {
|
|
30
30
|
if (unpluginInstance) {
|
package/dist/node.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A, a, b,
|
|
2
|
-
import { F as F2,
|
|
3
|
-
import { l as loadFromPath } from "./load-from-path-
|
|
4
|
-
import { r as r2 } from "./load-from-path-
|
|
1
|
+
import { A, a, b, C, c, d, e, f, g, h, i, j, k, D, P, l, m, n, o, V, p, q, r, s, t, u, v, w, x, y, z, B, E, F, G } from "./loader-DnW57GzE.js";
|
|
2
|
+
import { F as F2, a as a2, P as P2, b as b2, d as d2 } from "./font.plugin-BXjaZrFM.js";
|
|
3
|
+
import { l as loadFromPath } from "./load-from-path-Cctfzaw6.js";
|
|
4
|
+
import { r as r2 } from "./load-from-path-Cctfzaw6.js";
|
|
5
5
|
let unpluginInstance = null;
|
|
6
6
|
const createUnpluginTheme = async () => {
|
|
7
7
|
if (unpluginInstance) {
|
|
@@ -128,48 +128,48 @@ export {
|
|
|
128
128
|
A as API,
|
|
129
129
|
a as AppContainer,
|
|
130
130
|
b as AppModule,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
131
|
+
C as Color,
|
|
132
|
+
c as ColorAlias,
|
|
133
|
+
d as ColorApi,
|
|
134
|
+
e as ColorFromHex,
|
|
135
|
+
f as ColorFromPalette,
|
|
136
|
+
g as ColorManager,
|
|
137
|
+
h as ColorModule,
|
|
138
|
+
i as Context,
|
|
139
|
+
j as ContextModule,
|
|
140
|
+
k as ContrastCurve,
|
|
141
141
|
D as DynamicColor,
|
|
142
142
|
F2 as FontFamily,
|
|
143
|
-
|
|
143
|
+
a2 as FontPlugin,
|
|
144
144
|
P as Palette,
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
l as PaletteApi,
|
|
146
|
+
m as PaletteModule,
|
|
147
147
|
P2 as PluginAbstract,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
n as PluginApi,
|
|
149
|
+
b2 as PluginImplAbstract,
|
|
150
|
+
o as PluginModule,
|
|
151
151
|
V as Variant,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
p as Variants,
|
|
153
|
+
q as bootstrap,
|
|
154
|
+
r as capitalizeFirstLetter,
|
|
155
|
+
s as defaultColors,
|
|
156
156
|
d2 as defineConfig,
|
|
157
157
|
esbuildPlugin,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
t as expressiveVariant,
|
|
159
|
+
u as getInitialToneFromBackground,
|
|
160
|
+
v as getPiecewiseHue,
|
|
161
|
+
w as getRotatedHue,
|
|
162
|
+
x as highestSurface,
|
|
163
163
|
loadFromPath,
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
y as loader,
|
|
165
|
+
z as neutralVariant,
|
|
166
166
|
r2 as resolveConfig,
|
|
167
167
|
rollupPlugin,
|
|
168
168
|
B as tonalSpotVariant,
|
|
169
|
-
|
|
169
|
+
E as toneDeltaPair,
|
|
170
170
|
unpluginUdixioTheme,
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
F as variant,
|
|
172
|
+
G as vibrantVariant,
|
|
173
173
|
vitePlugin,
|
|
174
174
|
webpackPlugin
|
|
175
175
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"udixio.variant.d.ts","sourceRoot":"","sources":["../../../src/variant/variants/udixio.variant.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,OAAO,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,EAEL,eAAe,EAIhB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAIL,QAAQ,EAER,YAAY,EAEb,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAyCxC,eAAO,MAAM,6BAA6B,GACxC,KAAK,OAAO,EACZ,QAAQ,YAAY,GAAG,QAAQ,EAC/B,SAAS;IACP,OAAO,EAAE,eAAe,CAAC;IACzB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,
|
|
1
|
+
{"version":3,"file":"udixio.variant.d.ts","sourceRoot":"","sources":["../../../src/variant/variants/udixio.variant.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,OAAO,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,EAEL,eAAe,EAIhB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAIL,QAAQ,EAER,YAAY,EAEb,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAyCxC,eAAO,MAAM,6BAA6B,GACxC,KAAK,OAAO,EACZ,QAAQ,YAAY,GAAG,QAAQ,EAC/B,SAAS;IACP,OAAO,EAAE,eAAe,CAAC;IACzB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,WAuBF,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,OA6vB1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -78,7 +78,6 @@ export const createMinContrastToneAdjuster = (
|
|
|
78
78
|
const baseTone = (colors.get(selfKey) as ColorFromPalette).options.tone;
|
|
79
79
|
|
|
80
80
|
let selfTone = baseTone;
|
|
81
|
-
console.log('contrast ratio2', referenceTone, selfTone);
|
|
82
81
|
if (Contrast.ratioOfTones(referenceTone, selfTone) < minContrast) {
|
|
83
82
|
const ratio = calculateToneAdjustmentPercentage(
|
|
84
83
|
referenceTone,
|
|
@@ -101,7 +100,7 @@ export const udixioVariant: Variant = variant({
|
|
|
101
100
|
}),
|
|
102
101
|
secondary: ({ sourceColor }) => ({
|
|
103
102
|
hue: sourceColor.hue,
|
|
104
|
-
chroma: sourceColor.chroma
|
|
103
|
+
chroma: sourceColor.chroma * 0.5,
|
|
105
104
|
}),
|
|
106
105
|
tertiary: ({ sourceColor }) => ({
|
|
107
106
|
hue: getRotatedHue(
|
|
@@ -209,15 +208,9 @@ export const udixioVariant: Variant = variant({
|
|
|
209
208
|
[colorContainerKey]: {
|
|
210
209
|
palette: () => palettes.get(colorKey),
|
|
211
210
|
tone: () => {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
: tMaxC(palettes.get(colorKey), 84, 90);
|
|
216
|
-
} else if (ctx.variant.name === 'expressive') {
|
|
217
|
-
return ctx.isDark ? 15 : tMaxC(palettes.get(colorKey), 90, 95);
|
|
218
|
-
} else {
|
|
219
|
-
return ctx.isDark ? 25 : 90;
|
|
220
|
-
}
|
|
211
|
+
return ctx.isDark
|
|
212
|
+
? tMinC(palettes.get(colorKey), 35, 93)
|
|
213
|
+
: tMaxC(palettes.get(colorKey), 0, 90);
|
|
221
214
|
},
|
|
222
215
|
isBackground: true,
|
|
223
216
|
background: () => highestSurface(ctx, colors),
|
|
@@ -592,7 +585,9 @@ export const udixioVariant: Variant = variant({
|
|
|
592
585
|
secondaryContainer: {
|
|
593
586
|
palette: () => palettes.get('secondary'),
|
|
594
587
|
tone: () => {
|
|
595
|
-
return ctx.isDark
|
|
588
|
+
return ctx.isDark
|
|
589
|
+
? tMinC(palettes.get('secondary'), 35, 93)
|
|
590
|
+
: tMaxC(palettes.get('secondary'), 0, 90);
|
|
596
591
|
},
|
|
597
592
|
isBackground: true,
|
|
598
593
|
background: () => highestSurface(ctx, colors),
|