@salty-css/react 0.0.1-alpha.253 → 0.0.1-alpha.254
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/README.md +1 -1
- package/class-name-client.cjs +1 -1
- package/class-name-client.d.ts +6 -2
- package/class-name-client.js +9 -5
- package/class-name.cjs +1 -1
- package/class-name.d.ts +7 -3
- package/class-name.js +18 -11
- package/package.json +2 -2
package/README.md
CHANGED
@@ -242,7 +242,7 @@ Example usage:
|
|
242
242
|
styled('span', {
|
243
243
|
base: {
|
244
244
|
// Use of static font family variable
|
245
|
-
fontFamily: '{
|
245
|
+
fontFamily: '{fontFamily.heading}',
|
246
246
|
// Use of responsive font size variable
|
247
247
|
fontSize: '{fontSize.heading.regular}',
|
248
248
|
// Use of conditional theme text color variable
|
package/class-name-client.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=t=>{const s=new String(t);return Object.assign(s,{get isClassName(){return!0},variant:(n,r)=>{const a=`${n}-${r}`,c=`${t} ${a}`;return e(c)}}),s};exports.className=e;
|
package/class-name-client.d.ts
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
-
|
1
|
+
interface ClassNameMethods {
|
2
2
|
isClassName: boolean;
|
3
|
-
|
3
|
+
variant: (name: string, value: string) => string & ClassNameFunction;
|
4
|
+
}
|
5
|
+
type ClassNameFunction = string & ClassNameMethods;
|
6
|
+
export declare const className: (classNameStr: string) => ClassNameFunction;
|
7
|
+
export {};
|
package/class-name-client.js
CHANGED
@@ -1,11 +1,15 @@
|
|
1
|
-
const
|
2
|
-
const
|
3
|
-
return Object.assign(
|
1
|
+
const c = (s) => {
|
2
|
+
const t = new String(s);
|
3
|
+
return Object.assign(t, {
|
4
4
|
get isClassName() {
|
5
5
|
return !0;
|
6
|
+
},
|
7
|
+
variant: (n, r) => {
|
8
|
+
const e = `${n}-${r}`, a = `${s} ${e}`;
|
9
|
+
return c(a);
|
6
10
|
}
|
7
|
-
}),
|
11
|
+
}), t;
|
8
12
|
};
|
9
13
|
export {
|
10
|
-
|
14
|
+
c as className
|
11
15
|
};
|
package/class-name.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./styles-generator-BYrIpvu6.cjs");class u extends i.StylesGenerator{constructor(s){super(s),this._params=s}}const m=t=>{const s=new u(t),r=a=>{const e=new String(a);return Object.assign(e,{get isClassName(){return!0},variant:(n,c)=>{const o=`${n}-${c}`,l=`${e} ${o}`;return r(l)},generator:s}),e};return r(s.cssClassName)};exports.className=m;
|
package/class-name.d.ts
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
import { StyledParams } from '@salty-css/core/types';
|
2
2
|
import { ClassNameGenerator } from '@salty-css/core/generators';
|
3
|
-
|
4
|
-
isClassName: boolean;
|
3
|
+
interface ClassNameMethods<STYLE_PARAMS extends StyledParams> {
|
5
4
|
generator: ClassNameGenerator<STYLE_PARAMS>;
|
6
|
-
|
5
|
+
isClassName: boolean;
|
6
|
+
variant: (name: string, value: string) => string & ClassNameFunction<STYLE_PARAMS>;
|
7
|
+
}
|
8
|
+
type ClassNameFunction<STYLE_PARAMS extends StyledParams> = string & ClassNameMethods<STYLE_PARAMS>;
|
9
|
+
export declare const className: <const STYLE_PARAMS extends StyledParams>(params: STYLE_PARAMS) => ClassNameFunction<STYLE_PARAMS>;
|
10
|
+
export {};
|
package/class-name.js
CHANGED
@@ -1,18 +1,25 @@
|
|
1
|
-
import { S as
|
2
|
-
class
|
1
|
+
import { S as i } from "./styles-generator-CwRnWDqg.js";
|
2
|
+
class m extends i {
|
3
3
|
constructor(s) {
|
4
4
|
super(s), this._params = s;
|
5
5
|
}
|
6
6
|
}
|
7
|
-
const
|
8
|
-
const s = new
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
const C = (e) => {
|
8
|
+
const s = new m(e), r = (a) => {
|
9
|
+
const t = new String(a);
|
10
|
+
return Object.assign(t, {
|
11
|
+
get isClassName() {
|
12
|
+
return !0;
|
13
|
+
},
|
14
|
+
variant: (n, o) => {
|
15
|
+
const c = `${n}-${o}`, l = `${t} ${c}`;
|
16
|
+
return r(l);
|
17
|
+
},
|
18
|
+
generator: s
|
19
|
+
}), t;
|
20
|
+
};
|
21
|
+
return r(s.cssClassName);
|
15
22
|
};
|
16
23
|
export {
|
17
|
-
|
24
|
+
C as className
|
18
25
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salty-css/react",
|
3
|
-
"version": "0.0.1-alpha.
|
3
|
+
"version": "0.0.1-alpha.254",
|
4
4
|
"main": "./dist/index.js",
|
5
5
|
"module": "./dist/index.mjs",
|
6
6
|
"typings": "./dist/index.d.ts",
|
@@ -66,7 +66,7 @@
|
|
66
66
|
}
|
67
67
|
},
|
68
68
|
"dependencies": {
|
69
|
-
"@salty-css/core": "^0.0.1-alpha.
|
69
|
+
"@salty-css/core": "^0.0.1-alpha.254",
|
70
70
|
"clsx": ">=2.x",
|
71
71
|
"react": ">=19.x || >=18.3.x"
|
72
72
|
}
|