@salty-css/react 0.0.1-alpha.187 → 0.0.1-alpha.189
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/class-name-BOBdg_Ln.js +36 -0
- package/class-name-DmDKHwBz.cjs +1 -0
- package/className.cjs +1 -1
- package/className.js +6 -38
- package/config.cjs +1 -1
- package/config.js +10 -13
- package/index.cjs +1 -0
- package/index.d.ts +1 -0
- package/index.js +12 -0
- package/package.json +6 -2
@@ -0,0 +1,36 @@
|
|
1
|
+
var i = Object.defineProperty;
|
2
|
+
var c = (t, s, a) => s in t ? i(t, s, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[s] = a;
|
3
|
+
var r = (t, s, a) => c(t, typeof s != "symbol" ? s + "" : s, a);
|
4
|
+
import { t as o, p as m } from "./parse-styles-lB6EJuGj.js";
|
5
|
+
import { d as n } from "./parse-tokens-YUi047xd.js";
|
6
|
+
class N {
|
7
|
+
constructor(s) {
|
8
|
+
r(this, "_isProd");
|
9
|
+
r(this, "_callerName");
|
10
|
+
this.params = s;
|
11
|
+
}
|
12
|
+
get hash() {
|
13
|
+
return o(this.params.base || this.params);
|
14
|
+
}
|
15
|
+
get cssClassName() {
|
16
|
+
return this.hash;
|
17
|
+
}
|
18
|
+
get classNames() {
|
19
|
+
const s = [this.hash], { className: a } = this.params;
|
20
|
+
return a && s.push(a), s.join(" ");
|
21
|
+
}
|
22
|
+
get cssFileName() {
|
23
|
+
return this._callerName ? `cl_${n(this._callerName)}-${this.hash}.css` : `${this.hash}.css`;
|
24
|
+
}
|
25
|
+
get css() {
|
26
|
+
const { base: s = {}, variants: a = {}, compoundVariants: e = [] } = this.params, h = { ...s, variants: a, compoundVariants: e };
|
27
|
+
return m(h, `.${this.cssClassName}`);
|
28
|
+
}
|
29
|
+
_withBuildContext(s) {
|
30
|
+
const { name: a, prod: e } = s;
|
31
|
+
return this._isProd = e, this._callerName = a, this;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
export {
|
35
|
+
N as C
|
36
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";var i=Object.defineProperty;var n=(e,s,a)=>s in e?i(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a;var r=(e,s,a)=>n(e,typeof s!="symbol"?s+"":s,a);const c=require("./parse-styles-JzVmxd-u.cjs"),o=require("./parse-tokens-p68muVgG.cjs");class l{constructor(s){r(this,"_isProd");r(this,"_callerName");this.params=s}get hash(){return c.toHash(this.params.base||this.params)}get cssClassName(){return this.hash}get classNames(){const s=[this.hash],{className:a}=this.params;return a&&s.push(a),s.join(" ")}get cssFileName(){return this._callerName?`cl_${o.dashCase(this._callerName)}-${this.hash}.css`:`${this.hash}.css`}get css(){const{base:s={},variants:a={},compoundVariants:t=[]}=this.params,h={...s,variants:a,compoundVariants:t};return c.parseStyles(h,`.${this.cssClassName}`)}_withBuildContext(s){const{name:a,prod:t}=s;return this._isProd=t,this._callerName=a,this}}exports.ClassNameFactory=l;
|
package/className.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./class-name-DmDKHwBz.cjs"),r=t=>{const s=new a.ClassNameFactory(t),e=new String(s.cssClassName);return Object.assign(e,{get isClassName(){return!0},factory:s}),e};exports.className=r;
|
package/className.js
CHANGED
@@ -1,45 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
import { d as m } from "./parse-tokens-YUi047xd.js";
|
6
|
-
class l {
|
7
|
-
constructor(s) {
|
8
|
-
r(this, "_isProd");
|
9
|
-
r(this, "_callerName");
|
10
|
-
this.params = s;
|
11
|
-
}
|
12
|
-
get hash() {
|
13
|
-
return n(this.params.base || this.params);
|
14
|
-
}
|
15
|
-
get cssClassName() {
|
16
|
-
return this.hash;
|
17
|
-
}
|
18
|
-
get classNames() {
|
19
|
-
const s = [this.hash], { className: a } = this.params;
|
20
|
-
return a && s.push(a), s.join(" ");
|
21
|
-
}
|
22
|
-
get cssFileName() {
|
23
|
-
return this._callerName ? `cl_${m(this._callerName)}-${this.hash}.css` : `${this.hash}.css`;
|
24
|
-
}
|
25
|
-
get css() {
|
26
|
-
const { base: s = {}, variants: a = {}, compoundVariants: e = [] } = this.params, c = { ...s, variants: a, compoundVariants: e };
|
27
|
-
return o(c, `.${this.cssClassName}`);
|
28
|
-
}
|
29
|
-
_withBuildContext(s) {
|
30
|
-
const { name: a, prod: e } = s;
|
31
|
-
return this._isProd = e, this._callerName = a, this;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
const g = (t) => {
|
35
|
-
const s = new l(t), a = new String(s.cssClassName);
|
36
|
-
return Object.assign(a, {
|
1
|
+
import { C as e } from "./class-name-BOBdg_Ln.js";
|
2
|
+
const n = (a) => {
|
3
|
+
const s = new e(a), t = new String(s.cssClassName);
|
4
|
+
return Object.assign(t, {
|
37
5
|
get isClassName() {
|
38
6
|
return !0;
|
39
7
|
},
|
40
8
|
factory: s
|
41
|
-
}),
|
9
|
+
}), t;
|
42
10
|
};
|
43
11
|
export {
|
44
|
-
|
12
|
+
n as className
|
45
13
|
};
|
package/config.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=e=>e;class r{constructor(t){this._current=t}get isGlobalDefine(){return!0}}const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=e=>e;class r{constructor(t){this._current=t}get isGlobalDefine(){return!0}}const l=e=>new r(e);class n{constructor(t){this._current=t}get isDefineVariables(){return!0}}const i=e=>new n(e);class s{constructor(t){this._current=t}get isDefineTemplates(){return!0}}const o=e=>new s(e);exports.GlobalStylesFactory=r;exports.TemplatesFactory=s;exports.VariablesFactory=n;exports.defineConfig=a;exports.defineGlobalStyles=l;exports.defineTemplates=o;exports.defineVariables=i;
|
package/config.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
const
|
2
|
-
class
|
1
|
+
const c = (e) => e;
|
2
|
+
class r {
|
3
3
|
constructor(t) {
|
4
4
|
this._current = t;
|
5
5
|
}
|
@@ -7,8 +7,8 @@ class n {
|
|
7
7
|
return !0;
|
8
8
|
}
|
9
9
|
}
|
10
|
-
const a = (e) => new
|
11
|
-
class
|
10
|
+
const a = (e) => new r(e);
|
11
|
+
class n {
|
12
12
|
constructor(t) {
|
13
13
|
this._current = t;
|
14
14
|
}
|
@@ -16,7 +16,7 @@ class r {
|
|
16
16
|
return !0;
|
17
17
|
}
|
18
18
|
}
|
19
|
-
const o = (e) => new
|
19
|
+
const o = (e) => new n(e);
|
20
20
|
class s {
|
21
21
|
constructor(t) {
|
22
22
|
this._current = t;
|
@@ -25,16 +25,13 @@ class s {
|
|
25
25
|
return !0;
|
26
26
|
}
|
27
27
|
}
|
28
|
-
const
|
28
|
+
const i = (e) => new s(e);
|
29
29
|
export {
|
30
|
-
|
30
|
+
r as GlobalStylesFactory,
|
31
31
|
s as TemplatesFactory,
|
32
|
-
|
33
|
-
|
34
|
-
i as defineConfig,
|
32
|
+
n as VariablesFactory,
|
33
|
+
c as defineConfig,
|
35
34
|
a as defineGlobalStyles,
|
36
|
-
|
37
|
-
c as defineStaticVariables,
|
38
|
-
f as defineTemplates,
|
35
|
+
i as defineTemplates,
|
39
36
|
o as defineVariables
|
40
37
|
};
|
package/index.cjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./keyframes.cjs"),t=require("./media.cjs"),n=require("./class-name-DmDKHwBz.cjs"),u=r=>`{${r}}`,c=(...r)=>r.flat().reduce((a,e)=>e!=null&&e._current?{...a,...e._current}:{...a,...e},{});exports.keyframes=o.keyframes;exports.MediaQueryFactory=t.MediaQueryFactory;exports.media=t.media;exports.ClassNameFactory=n.ClassNameFactory;exports.mergeStyles=c;exports.token=u;
|
package/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from '@salty-css/core/css';
|
package/index.js
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
import { keyframes as u } from "./keyframes.js";
|
2
|
+
import { MediaQueryFactory as c, media as p } from "./media.js";
|
3
|
+
import { C as d } from "./class-name-BOBdg_Ln.js";
|
4
|
+
const t = (e) => `{${e}}`, a = (...e) => e.flat().reduce((o, r) => r != null && r._current ? { ...o, ...r._current } : { ...o, ...r }, {});
|
5
|
+
export {
|
6
|
+
d as ClassNameFactory,
|
7
|
+
c as MediaQueryFactory,
|
8
|
+
u as keyframes,
|
9
|
+
p as media,
|
10
|
+
a as mergeStyles,
|
11
|
+
t as token
|
12
|
+
};
|
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.189",
|
4
4
|
"main": "./dist/index.js",
|
5
5
|
"module": "./dist/index.mjs",
|
6
6
|
"typings": "./dist/index.d.ts",
|
@@ -28,6 +28,10 @@
|
|
28
28
|
"name": "react"
|
29
29
|
},
|
30
30
|
"exports": {
|
31
|
+
".": {
|
32
|
+
"import": "./index.js",
|
33
|
+
"require": "./index.cjs"
|
34
|
+
},
|
31
35
|
"./styled": {
|
32
36
|
"import": "./styled.js",
|
33
37
|
"require": "./styled.cjs"
|
@@ -54,7 +58,7 @@
|
|
54
58
|
}
|
55
59
|
},
|
56
60
|
"dependencies": {
|
57
|
-
"@salty-css/core": "^0.0.1-alpha.
|
61
|
+
"@salty-css/core": "^0.0.1-alpha.189",
|
58
62
|
"clsx": ">=2.x",
|
59
63
|
"react": ">=19.x || >=18.3.x"
|
60
64
|
}
|