keycloakify 10.0.0-rc.114 → 10.0.0-rc.115
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/lib/getKcClsx.js +2 -4
- package/lib/getKcClsx.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/getKcClsx.ts +2 -6
package/lib/getKcClsx.js
CHANGED
@@ -42,11 +42,9 @@ export function createGetKcClsx(params) {
|
|
42
42
|
return clsx_withTransform({
|
43
43
|
args,
|
44
44
|
transform: classKey => {
|
45
|
+
var _a;
|
45
46
|
assert(is(classKey));
|
46
|
-
|
47
|
-
return clsx(classKey, doUseDefaultCss && !(className === null || className === void 0 ? void 0 : className.split(" ").includes("CLEAR"))
|
48
|
-
? defaultClasses[classKey]
|
49
|
-
: undefined, className);
|
47
|
+
return clsx(classKey, (_a = classes === null || classes === void 0 ? void 0 : classes[classKey]) !== null && _a !== void 0 ? _a : (doUseDefaultCss ? defaultClasses[classKey] : undefined));
|
50
48
|
}
|
51
49
|
});
|
52
50
|
}
|
package/lib/getKcClsx.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getKcClsx.js","sourceRoot":"","sources":["../src/lib/getKcClsx.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,MAAM,UAAU,eAAe,CAA0B,MAExD;IACG,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;IAElC,SAAS,aAAa,CAClB,OAAiC,EACjC,OAAiC;QAEjC,IAAI,OAAO,CAAC,eAAe,KAAK,OAAO,CAAC,eAAe,EAAE;YACrD,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,OAAO,CAAC,OAAO,KAAK,O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CAAC,MAAM,CAAC;SACvB;QAED,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;QAE5C,SAAS,MAAM,CAAC,GAAG,IAAuB;YACtC,OAAO,kBAAkB,CAAC;gBACtB,IAAI;gBACJ,SAAS,EAAE,QAAQ,CAAC,EAAE;;oBAClB,MAAM,CAAC,EAAE,CAAW,QAAQ,CAAC,CAAC,CAAC;oBAE/B,OAAO,IAAI,CACP,QAAQ,EACR,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,QAAQ,CAAC,mCACf,CAAC,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAC/D,CAAC;gBACN,CAAC;aACJ,CAAC,CAAC;QACP,CAAC;QAED,KAAK,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC;QAEvC,OAAO,EAAE,MAAM,EAAE,CAAC;IACtB,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,CAAC;AACzB,CAAC"}
|
package/package.json
CHANGED
package/src/lib/getKcClsx.ts
CHANGED
@@ -71,14 +71,10 @@ export function createGetKcClsx<ClassKey extends string>(params: {
|
|
71
71
|
transform: classKey => {
|
72
72
|
assert(is<ClassKey>(classKey));
|
73
73
|
|
74
|
-
const className = classes?.[classKey];
|
75
|
-
|
76
74
|
return clsx(
|
77
75
|
classKey,
|
78
|
-
|
79
|
-
? defaultClasses[classKey]
|
80
|
-
: undefined,
|
81
|
-
className
|
76
|
+
classes?.[classKey] ??
|
77
|
+
(doUseDefaultCss ? defaultClasses[classKey] : undefined)
|
82
78
|
);
|
83
79
|
}
|
84
80
|
});
|