@salty-css/react 0.0.1-alpha.14 → 0.0.1-alpha.16

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ### Initial requirements
6
6
 
7
7
  1. Add `saltyPlugin` to vite or webpack config from `@salty-css/vite` or `@salty-css/webpack`
8
- 2. Create `salty-config.ts` to the root of your project
8
+ 2. Create `salty.config.ts` to the root of your project
9
9
  3. Import global styles to any regular .css file from `saltygen/index.css` (does not exist during first run, cli command coming later)
10
10
  4. Create salty components with styled only inside files that end with `.css.ts`, `.salty.ts` `.styled.ts` or `.styles.ts`
11
11
 
@@ -0,0 +1 @@
1
+ "use strict";function r(e){return e?typeof e!="string"?r(String(e)):e.replace(/\s/g,"-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,(n,t)=>(t>0?"-":"")+n.toLowerCase()):""}exports.dashCase=r;
@@ -0,0 +1,6 @@
1
+ function t(e) {
2
+ return e ? typeof e != "string" ? t(String(e)) : e.replace(/\s/g, "-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g, (r, n) => (n > 0 ? "-" : "") + r.toLowerCase()) : "";
3
+ }
4
+ export {
5
+ t as d
6
+ };
@@ -1 +1 @@
1
- "use strict";const K=require("react"),C=require("./dash-case-BSxADP5V.cjs");function $(t){var n,s,e="";if(typeof t=="string"||typeof t=="number")e+=t;else if(typeof t=="object")if(Array.isArray(t)){var c=t.length;for(n=0;n<c;n++)t[n]&&(s=$(t[n]))&&(e&&(e+=" "),e+=s)}else for(s in t)t[s]&&(e&&(e+=" "),e+=s);return e}function V(){for(var t,n,s=0,e="",c=arguments.length;s<c;s++)(t=arguments[s])&&(n=$(t))&&(e&&(e+=" "),e+=n);return e}const O=["passVariantProps"],N=(t,n,s,e)=>{const c=({extend:f=t,element:b=s.element,className:g="",children:v,passVariantProps:S,_vks:r=new Set,...l},w)=>{const i={passVariantProps:S};e&&Object.assign(i,e),l&&Object.assign(i,l);const u=new Set(g.split(" ")),y=typeof f=="function"||typeof f=="object",m=y&&"isStyled"in f,j=y?f:b||f;if(!j)throw new Error("No element provided");s.propValueKeys&&(i.style||(i.style={}),s.propValueKeys.forEach(a=>{const o=`css-${a}`,d=l[o];if(d===void 0)return;const p=`--props-${C.dashCase(a)}`;i.style[p]=d,r&&r.add(o)})),s.variantKeys&&s.variantKeys.forEach(a=>{const[o,d]=a.split("=");l[o]!==void 0?(u.add(`${o}-${l[o]}`),r&&r.add(o)):d!==void 0&&u.add(`${o}-${d}`)}),r&&(!y||!m&&!S)?r.forEach(a=>delete i[a]):m&&Object.assign(i,{_vks:r}),m||O.forEach(a=>delete i[a]);const E=V(n,...u);return K.createElement(j,{element:y?b:void 0,className:E,ref:w,...i},v)},h=K.forwardRef(c);return Object.assign(h,{isStyled:!0,className:n,toString:()=>`.${n}`}),h};exports.elementFactory=N;
1
+ "use strict";const K=require("react"),C=require("./dash-case-B_odFlTl.cjs");function $(t){var n,s,e="";if(typeof t=="string"||typeof t=="number")e+=t;else if(typeof t=="object")if(Array.isArray(t)){var c=t.length;for(n=0;n<c;n++)t[n]&&(s=$(t[n]))&&(e&&(e+=" "),e+=s)}else for(s in t)t[s]&&(e&&(e+=" "),e+=s);return e}function V(){for(var t,n,s=0,e="",c=arguments.length;s<c;s++)(t=arguments[s])&&(n=$(t))&&(e&&(e+=" "),e+=n);return e}const O=["passVariantProps"],N=(t,n,s,e)=>{const c=({extend:f=t,element:b=s.element,className:g="",children:v,passVariantProps:S,_vks:r=new Set,...l},w)=>{const i={passVariantProps:S};e&&Object.assign(i,e),l&&Object.assign(i,l);const u=new Set(g.split(" ")),y=typeof f=="function"||typeof f=="object",m=y&&"isStyled"in f,j=y?f:b||f;if(!j)throw new Error("No element provided");s.propValueKeys&&(i.style||(i.style={}),s.propValueKeys.forEach(a=>{const o=`css-${a}`,d=l[o];if(d===void 0)return;const p=`--props-${C.dashCase(a)}`;i.style[p]=d,r&&r.add(o)})),s.variantKeys&&s.variantKeys.forEach(a=>{const[o,d]=a.split("=");l[o]!==void 0?(u.add(`${o}-${l[o]}`),r&&r.add(o)):d!==void 0&&u.add(`${o}-${d}`)}),r&&(!y||!m&&!S)?r.forEach(a=>delete i[a]):m&&Object.assign(i,{_vks:r}),m||O.forEach(a=>delete i[a]);const E=V(n,...u);return K.createElement(j,{element:y?b:void 0,className:E,ref:w,...i},v)},h=K.forwardRef(c);return Object.assign(h,{isStyled:!0,className:n,toString:()=>`.${n}`}),h};exports.elementFactory=N;
@@ -1,5 +1,5 @@
1
1
  import { forwardRef as E, createElement as V } from "react";
2
- import { d as C } from "./dash-case-BLMDQfZk.js";
2
+ import { d as C } from "./dash-case-CGJ_UIZz.js";
3
3
  function j(t) {
4
4
  var n, s, e = "";
5
5
  if (typeof t == "string" || typeof t == "number") e += t;
package/keyframes.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./parse-styles-CsUEXYf5.cjs"),b=({animationName:u,params:l,appendInitialStyles:m,...t})=>{const s=u||c.toHash(t),n=(r={})=>{const{duration:e="500ms",easing:o="ease-in-out",delay:a="0s",iterationCount:i="1",direction:S="normal",fillMode:d="forwards",playState:p="running"}={...l,...r},$=`${s} ${e} ${o} ${a} ${i} ${S} ${d} ${p}`;if(!m)return $;const g=c.parseStyles(t.from||t["0%"],"");return`${$};${g}`},y=Object.entries(t).reduce((r,[e,o])=>{const a=c.parseStyles(o,""),i=typeof e=="number"?`${e}%`:e;return`${r}${i}{${a}}`},""),f=`@keyframes ${s} {${y}}`;return Object.assign(n,{toString:n,isKeyframes:!0,animationName:s,css:f,keyframes:t}),n};exports.keyframes=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./parse-styles-SPT4zc_H.cjs"),b=({animationName:u,params:l,appendInitialStyles:m,...t})=>{const s=u||c.toHash(t),n=(r={})=>{const{duration:e="500ms",easing:o="ease-in-out",delay:a="0s",iterationCount:i="1",direction:S="normal",fillMode:d="forwards",playState:p="running"}={...l,...r},$=`${s} ${e} ${o} ${a} ${i} ${S} ${d} ${p}`;if(!m)return $;const g=c.parseStyles(t.from||t["0%"],"");return`${$};${g}`},y=Object.entries(t).reduce((r,[e,o])=>{const a=c.parseStyles(o,""),i=typeof e=="number"?`${e}%`:e;return`${r}${i}{${a}}`},""),f=`@keyframes ${s} {${y}}`;return Object.assign(n,{toString:n,isKeyframes:!0,animationName:s,css:f,keyframes:t}),n};exports.keyframes=b;
package/keyframes.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as b, p as c } from "./parse-styles-jRJiQaik.js";
1
+ import { t as b, p as c } from "./parse-styles-T74HIH4_.js";
2
2
  const C = ({ animationName: m, params: u, appendInitialStyles: f, ...t }) => {
3
3
  const s = m || b(t), e = (r = {}) => {
4
4
  const {
package/media.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class n{constructor(e="@media"){this.base=e,this.next=t=>{const s=new String(t);return Object.assign(s,{get and(){return new n(`${t} and`)},get or(){return new n(`${t},`)}}),s}}custom(e){return this.next(`${this.base} ${e}`)}minWidth(e){const t=typeof e=="number"?`${e}px`:e,s=`${this.base} (min-width: ${t})`;return this.next(s)}maxWidth(e){const t=typeof e=="number"?`${e}px`:e,s=`${this.base} (max-width: ${t})`;return this.next(s)}minHeight(e){const t=typeof e=="number"?`${e}px`:e,s=`${this.base} (min-height: ${t})`;return this.next(s)}maxHeight(e){const t=typeof e=="number"?`${e}px`:e,s=`${this.base} (max-height: ${t})`;return this.next(s)}get portrait(){const e=`${this.base} (orientation: portrait)`;return this.next(e)}get landscape(){const e=`${this.base} (orientation: landscape)`;return this.next(e)}prefersColorScheme(e){const t=`${this.base} (prefers-color-scheme: ${e})`;return this.next(t)}get dark(){return this.prefersColorScheme("dark")}get light(){return this.prefersColorScheme("light")}get print(){const e=`${this.base} print`;return this.next(e)}get screen(){const e=`${this.base} screen`;return this.next(e)}get speech(){const e=`${this.base} speech`;return this.next(e)}get all(){const e=`${this.base} all`;return this.next(e)}get not(){const e=`${this.base} not`;return this.next(e)}get reducedMotion(){const e=`${this.base} (prefers-reduced-motion: reduce)`;return this.next(e)}}const r=new n;exports.MediaQueryFactory=n;exports.media=r;
1
+ "use strict";var a=Object.defineProperty;var o=(s,e,t)=>e in s?a(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var i=(s,e,t)=>o(s,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class r{constructor(e="@media"){i(this,"next",e=>{const t=new String(e);return Object.assign(t,{get and(){return new r(`${e} and`)},get or(){return new r(`${e},`)}}),t});this.base=e}custom(e){return this.next(`${this.base} ${e}`)}minWidth(e){const t=typeof e=="number"?`${e}px`:e,n=`${this.base} (min-width: ${t})`;return this.next(n)}maxWidth(e){const t=typeof e=="number"?`${e}px`:e,n=`${this.base} (max-width: ${t})`;return this.next(n)}minHeight(e){const t=typeof e=="number"?`${e}px`:e,n=`${this.base} (min-height: ${t})`;return this.next(n)}maxHeight(e){const t=typeof e=="number"?`${e}px`:e,n=`${this.base} (max-height: ${t})`;return this.next(n)}get portrait(){const e=`${this.base} (orientation: portrait)`;return this.next(e)}get landscape(){const e=`${this.base} (orientation: landscape)`;return this.next(e)}prefersColorScheme(e){const t=`${this.base} (prefers-color-scheme: ${e})`;return this.next(t)}get dark(){return this.prefersColorScheme("dark")}get light(){return this.prefersColorScheme("light")}get print(){const e=`${this.base} print`;return this.next(e)}get screen(){const e=`${this.base} screen`;return this.next(e)}get speech(){const e=`${this.base} speech`;return this.next(e)}get all(){const e=`${this.base} all`;return this.next(e)}get not(){const e=`${this.base} not`;return this.next(e)}get reducedMotion(){const e=`${this.base} (prefers-reduced-motion: reduce)`;return this.next(e)}}const h=new r;exports.MediaQueryFactory=r;exports.media=h;
package/media.js CHANGED
@@ -1,35 +1,39 @@
1
- class n {
1
+ var o = Object.defineProperty;
2
+ var a = (s, t, e) => t in s ? o(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var i = (s, t, e) => a(s, typeof t != "symbol" ? t + "" : t, e);
4
+ class r {
2
5
  constructor(t = "@media") {
3
- this.base = t, this.next = (e) => {
4
- const s = new String(e);
5
- return Object.assign(s, {
6
+ i(this, "next", (t) => {
7
+ const e = new String(t);
8
+ return Object.assign(e, {
6
9
  get and() {
7
- return new n(`${e} and`);
10
+ return new r(`${t} and`);
8
11
  },
9
12
  get or() {
10
- return new n(`${e},`);
13
+ return new r(`${t},`);
11
14
  }
12
- }), s;
13
- };
15
+ }), e;
16
+ });
17
+ this.base = t;
14
18
  }
15
19
  custom(t) {
16
20
  return this.next(`${this.base} ${t}`);
17
21
  }
18
22
  minWidth(t) {
19
- const e = typeof t == "number" ? `${t}px` : t, s = `${this.base} (min-width: ${e})`;
20
- return this.next(s);
23
+ const e = typeof t == "number" ? `${t}px` : t, n = `${this.base} (min-width: ${e})`;
24
+ return this.next(n);
21
25
  }
22
26
  maxWidth(t) {
23
- const e = typeof t == "number" ? `${t}px` : t, s = `${this.base} (max-width: ${e})`;
24
- return this.next(s);
27
+ const e = typeof t == "number" ? `${t}px` : t, n = `${this.base} (max-width: ${e})`;
28
+ return this.next(n);
25
29
  }
26
30
  minHeight(t) {
27
- const e = typeof t == "number" ? `${t}px` : t, s = `${this.base} (min-height: ${e})`;
28
- return this.next(s);
31
+ const e = typeof t == "number" ? `${t}px` : t, n = `${this.base} (min-height: ${e})`;
32
+ return this.next(n);
29
33
  }
30
34
  maxHeight(t) {
31
- const e = typeof t == "number" ? `${t}px` : t, s = `${this.base} (max-height: ${e})`;
32
- return this.next(s);
35
+ const e = typeof t == "number" ? `${t}px` : t, n = `${this.base} (max-height: ${e})`;
36
+ return this.next(n);
33
37
  }
34
38
  get portrait() {
35
39
  const t = `${this.base} (orientation: portrait)`;
@@ -74,8 +78,8 @@ class n {
74
78
  return this.next(t);
75
79
  }
76
80
  }
77
- const r = new n();
81
+ const u = new r();
78
82
  export {
79
- n as MediaQueryFactory,
80
- r as media
83
+ r as MediaQueryFactory,
84
+ u as media
81
85
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/react",
3
- "version": "0.0.1-alpha.14",
3
+ "version": "0.0.1-alpha.16",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./dist/index.d.ts",
@@ -39,5 +39,10 @@
39
39
  "import": "./media.js",
40
40
  "require": "./media.cjs"
41
41
  }
42
+ },
43
+ "dependencies": {
44
+ "@salty-css/core": "^0.0.1-alpha.16",
45
+ "clsx": ">=2.x",
46
+ "react": ">=18.3.x"
42
47
  }
43
48
  }
@@ -1,7 +1,7 @@
1
- "use strict";const V=require("./dash-case-BSxADP5V.cjs"),E=r=>String.fromCharCode(r+(r>25?39:97)),P=(r,s)=>{let t="",n;for(n=Math.abs(r);n>52;n=n/52|0)t=E(n%52)+t;return t=E(n%52)+t,t.length<s?t=t.padStart(s,"a"):t.length>s&&(t=t.slice(-s)),t},T=(r,s)=>{let t=s.length;for(;t;)r=r*33^s.charCodeAt(--t);return r},W=(r,s=3)=>{const t=T(5381,JSON.stringify(r))>>>0;return P(t,s)},q=(r,s)=>{if(typeof r!="string")return{result:r};if(!s)return{result:r};const t=[];return Object.values(s).forEach(n=>{const{pattern:p,transform:$}=n;r=r.replace(p,d=>{const{value:i,css:l}=$(d);return l&&t.push(l),i})}),{result:r,additionalCss:t}},M=r=>typeof r!="string"?{result:r}:/\{[^{}]+\}/g.test(r)?{result:r.replace(/\{([^{}]+)\}/g,(...n)=>`var(--${V.dashCase(n[1].replaceAll(".","-"))})`)}:{result:r},a=(r,s,t,n)=>{const p=[],$=Object.entries(r).reduce((i,[l,e])=>{const o=l.trim();if(typeof e=="function"&&(e=e()),typeof e=="object"){if(!e)return i;if(o==="variants")return Object.entries(e).forEach(([f,c])=>{c&&Object.entries(c).forEach(([m,b])=>{if(!b)return;const y=`${s}.${f}-${m}`,S=a(b,y,t);p.push(S)})}),i;if(o==="defaultVariants")return i;if(o==="compoundVariants")return e.forEach(f=>{const{css:c,...m}=f,b=Object.entries(m).reduce((S,[H,N])=>`${S}.${H}-${N}`,s),y=a(c,b,t);p.push(y)}),i;if(o.startsWith("@")){const f=a(e,s,t),c=`${o} {
1
+ "use strict";const V=require("./dash-case-B_odFlTl.cjs"),E=r=>String.fromCharCode(r+(r>25?39:97)),P=(r,s)=>{let t="",n;for(n=Math.abs(r);n>52;n=n/52|0)t=E(n%52)+t;return t=E(n%52)+t,t.length<s?t=t.padStart(s,"a"):t.length>s&&(t=t.slice(-s)),t},T=(r,s)=>{let t=s.length;for(;t;)r=r*33^s.charCodeAt(--t);return r},W=(r,s=3)=>{const t=T(5381,JSON.stringify(r))>>>0;return P(t,s)},q=(r,s)=>{if(typeof r!="string")return{result:r};if(!s)return{result:r};const t=[];return Object.values(s).forEach(n=>{const{pattern:p,transform:$}=n;r=r.replace(p,d=>{const{value:i,css:l}=$(d);return l&&t.push(l),i})}),{result:r,additionalCss:t}},M=r=>typeof r!="string"?{result:r}:/\{[^{}]+\}/g.test(r)?{result:r.replace(/\{([^{}]+)\}/g,(...n)=>`var(--${V.dashCase(n[1].replaceAll(".","-"))})`)}:{result:r},a=(r,s,t,n)=>{if(!r)return"";const p=[],$=Object.entries(r).reduce((i,[l,e])=>{const o=l.trim();if(typeof e=="function"&&(e=e()),typeof e=="object"){if(!e)return i;if(o==="variants")return Object.entries(e).forEach(([f,c])=>{c&&Object.entries(c).forEach(([m,b])=>{if(!b)return;const S=`${s}.${f}-${m}`,j=a(b,S,t);p.push(j)})}),i;if(o==="defaultVariants")return i;if(o==="compoundVariants")return e.forEach(f=>{const{css:c,...m}=f,b=Object.entries(m).reduce((j,[H,N])=>`${j}.${H}-${N}`,s),S=a(c,b,t);p.push(S)}),i;if(o.startsWith("@")){const f=a(e,s,t),c=`${o} {
2
2
  ${f.replace(`
3
3
  `,`
4
4
  `)}
5
- }`;return p.push(c),i}const u=l.includes("&")?o.replace("&",s):o.startsWith(":")?`${s}${o}`:`${s} ${o}`,h=a(e,u,t);return p.push(h),i}if(n!=null&&n.templates&&n.templates[o]){const h=e.split(".").reduce((c,m)=>c[m],n.templates[o]),f=a(h,"");return`${i}${f}`}const g=o.startsWith("-")?o:V.dashCase(o),j=(u,h=";")=>i=`${i}${u}${h}`,O=u=>j(`${g}:${u}`);if(typeof e=="number")return O(e);if(typeof e!="string")if("toString"in e)e=e.toString();else return i;const{modifiers:A}=n||{},k=function*(){yield M(e),yield q(e,A)}();for(const{result:u,additionalCss:h=[]}of k)e=u,h.forEach(f=>{const c=a(f,"");j(c,"")});return O(e)},"");if(!$)return p.join(`
5
+ }`;return p.push(c),i}const u=l.includes("&")?o.replace("&",s):o.startsWith(":")?`${s}${o}`:`${s} ${o}`,h=a(e,u,t);return p.push(h),i}if(n!=null&&n.templates&&n.templates[o]){const h=e.split(".").reduce((c,m)=>c[m],n.templates[o]),f=a(h,"");return`${i}${f}`}const g=o.startsWith("-")?o:V.dashCase(o),y=(u,h=";")=>i=`${i}${u}${h}`,O=u=>y(`${g}:${u}`);if(typeof e=="number")return O(e);if(typeof e!="string")if("toString"in e)e=e.toString();else return i;const{modifiers:A}=n||{},k=function*(){yield M(e),yield q(e,A)}();for(const{result:u,additionalCss:h=[]}of k)e=u,h.forEach(f=>{const c=a(f,"");y(c,"")});return O(e)},"");if(!$)return p.join(`
6
6
  `);if(!s)return $;let d="";return t!==void 0?d=`@layer l${t} { ${s} { ${$} } }`:d=`${s} { ${$} }`,[d,...p].join(`
7
7
  `)};exports.parseStyles=a;exports.toHash=W;
@@ -1,4 +1,4 @@
1
- import { d as V } from "./dash-case-BLMDQfZk.js";
1
+ import { d as V } from "./dash-case-CGJ_UIZz.js";
2
2
  const E = (r) => String.fromCharCode(r + (r > 25 ? 39 : 97)), T = (r, s) => {
3
3
  let t = "", n;
4
4
  for (n = Math.abs(r); n > 52; n = n / 52 | 0) t = E(n % 52) + t;
@@ -22,6 +22,7 @@ const E = (r) => String.fromCharCode(r + (r > 25 ? 39 : 97)), T = (r, s) => {
22
22
  });
23
23
  }), { result: r, additionalCss: t };
24
24
  }, M = (r) => typeof r != "string" ? { result: r } : /\{[^{}]+\}/g.test(r) ? { result: r.replace(/\{([^{}]+)\}/g, (...n) => `var(--${V(n[1].replaceAll(".", "-"))})`) } : { result: r }, $ = (r, s, t, n) => {
25
+ if (!r) return "";
25
26
  const c = [], a = Object.entries(r).reduce((i, [m, e]) => {
26
27
  const o = m.trim();
27
28
  if (typeof e == "function" && (e = e()), typeof e == "object") {
@@ -30,15 +31,15 @@ const E = (r) => String.fromCharCode(r + (r > 25 ? 39 : 97)), T = (r, s) => {
30
31
  return Object.entries(e).forEach(([f, p]) => {
31
32
  p && Object.entries(p).forEach(([l, b]) => {
32
33
  if (!b) return;
33
- const j = `${s}.${f}-${l}`, y = $(b, j, t);
34
- c.push(y);
34
+ const j = `${s}.${f}-${l}`, S = $(b, j, t);
35
+ c.push(S);
35
36
  });
36
37
  }), i;
37
38
  if (o === "defaultVariants")
38
39
  return i;
39
40
  if (o === "compoundVariants")
40
41
  return e.forEach((f) => {
41
- const { css: p, ...l } = f, b = Object.entries(l).reduce((y, [N, P]) => `${y}.${N}-${P}`, s), j = $(p, b, t);
42
+ const { css: p, ...l } = f, b = Object.entries(l).reduce((S, [N, P]) => `${S}.${N}-${P}`, s), j = $(p, b, t);
42
43
  c.push(j);
43
44
  }), i;
44
45
  if (o.startsWith("@")) {
@@ -56,7 +57,7 @@ const E = (r) => String.fromCharCode(r + (r > 25 ? 39 : 97)), T = (r, s) => {
56
57
  const h = e.split(".").reduce((p, l) => p[l], n.templates[o]), f = $(h, "");
57
58
  return `${i}${f}`;
58
59
  }
59
- const g = o.startsWith("-") ? o : V(o), S = (u, h = ";") => i = `${i}${u}${h}`, O = (u) => S(`${g}:${u}`);
60
+ const g = o.startsWith("-") ? o : V(o), y = (u, h = ";") => i = `${i}${u}${h}`, O = (u) => y(`${g}:${u}`);
60
61
  if (typeof e == "number") return O(e);
61
62
  if (typeof e != "string")
62
63
  if ("toString" in e) e = e.toString();
@@ -67,7 +68,7 @@ const E = (r) => String.fromCharCode(r + (r > 25 ? 39 : 97)), T = (r, s) => {
67
68
  for (const { result: u, additionalCss: h = [] } of k)
68
69
  e = u, h.forEach((f) => {
69
70
  const p = $(f, "");
70
- S(p, "");
71
+ y(p, "");
71
72
  });
72
73
  return O(e);
73
74
  }, "");
package/styled-client.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./element-factory-B9SpSdkZ.cjs"),l=(e,t,n="",o)=>r.elementFactory(e,t,o,{"data-component-name":n});exports.styledClient=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./element-factory-WgNOpLmJ.cjs"),l=(e,t,n="",o)=>r.elementFactory(e,t,o,{"data-component-name":n});exports.styledClient=l;
package/styled-client.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e as r } from "./element-factory-BQovXL0W.js";
1
+ import { e as r } from "./element-factory-uEk4VrqP.js";
2
2
  const m = (e, t, n = "", o) => r(e, t, o, {
3
3
  "data-component-name": n
4
4
  });
package/styled.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./parse-styles-CsUEXYf5.cjs"),h=require("./element-factory-B9SpSdkZ.cjs"),m=r=>Object.keys(r);class l{constructor(t,s){this.tagName=t,this.params=s}get hash(){return p.toHash(this.params.base||this.params)}get priority(){var t;return typeof this.tagName=="function"||typeof this.tagName=="object"?(((t=this.tagName.generator)==null?void 0:t.priority)||0)+1:0}get classNames(){const t=[this.hash],{className:s}=this.params;return s&&t.push(s),t.join(" ")}get cssClassName(){return this.hash}get cssDisplayNameVar(){return`--${this.hash}-display-name: ${this._callerName};`}get templateKeys(){var t;return(t=this._context)!=null&&t.config.templates?m(this._context.config.templates):[]}get css(){var a;const{base:t={},variants:s={},compoundVariants:e=[]}=this.params,n={...t,variants:s,compoundVariants:e};return p.parseStyles(n,`.${this.cssClassName}`,this.priority,(a=this._context)==null?void 0:a.config)}get props(){const{element:t}=this.params,s=this.params.variants?Object.keys(this.params.variants).map(a=>{var i;const o=(i=this.params.defaultVariants)==null?void 0:i[a];return o!==void 0?`${a}=${String(o)}`:a}):void 0,e=new Set([]),n=/\{props\.([\w\d]+)\}/gi.exec(JSON.stringify(this.params.base));return n&&n.forEach((a,o,i)=>{const c=i.at(1);c&&e.add(c)}),{element:t,variantKeys:s,propValueKeys:[...e]}}_withBuildContext(t){this._context=t;const{name:s,config:e}=t;return this._callerName=s,this}}const u=(r,t)=>{const s=new l(r,t),e=h.elementFactory(r,s.cssClassName,s.props,{"data-unoptimized-client-component":!0});return Object.assign(e,{generator:s}),e};exports.styled=u;
1
+ "use strict";var l=Object.defineProperty;var m=(e,t,s)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var c=(e,t,s)=>m(e,typeof t!="symbol"?t+"":t,s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./parse-styles-SPT4zc_H.cjs"),u=require("./element-factory-WgNOpLmJ.cjs"),y=e=>Object.keys(e);class g{constructor(t,s){c(this,"_callerName");c(this,"_context");this.tagName=t,this.params=s}get hash(){return h.toHash(this.params.base||this.params)}get priority(){var t;return typeof this.tagName=="function"||typeof this.tagName=="object"?(((t=this.tagName.generator)==null?void 0:t.priority)||0)+1:0}get classNames(){const t=[this.hash],{className:s}=this.params;return s&&t.push(s),t.join(" ")}get cssClassName(){return this.hash}get cssDisplayNameVar(){return`--${this.hash}-display-name: ${this._callerName};`}get templateKeys(){var t;return(t=this._context)!=null&&t.config.templates?y(this._context.config.templates):[]}get css(){var r;const{base:t={},variants:s={},compoundVariants:a=[]}=this.params,n={...t,variants:s,compoundVariants:a};return h.parseStyles(n,`.${this.cssClassName}`,this.priority,(r=this._context)==null?void 0:r.config)}get props(){const{element:t}=this.params,s=this.params.variants?Object.keys(this.params.variants).map(r=>{var i;const o=(i=this.params.defaultVariants)==null?void 0:i[r];return o!==void 0?`${r}=${String(o)}`:r}):void 0,a=new Set([]),n=/\{props\.([\w\d]+)\}/gi.exec(JSON.stringify(this.params.base));return n&&n.forEach((r,o,i)=>{const p=i.at(1);p&&a.add(p)}),{element:t,variantKeys:s,propValueKeys:[...a]}}_withBuildContext(t){this._context=t;const{name:s,config:a}=t;return this._callerName=s,this}}const f=(e,t)=>{const s=new g(e,t),a=u.elementFactory(e,s.cssClassName,s.props,{"data-unoptimized-client-component":!0});return Object.assign(a,{generator:s}),a};exports.styled=f;
package/styled.js CHANGED
@@ -1,12 +1,17 @@
1
- import { t as p, p as h } from "./parse-styles-jRJiQaik.js";
2
- import { e as m } from "./element-factory-BQovXL0W.js";
3
- const l = (r) => Object.keys(r);
4
- class u {
1
+ var m = Object.defineProperty;
2
+ var h = (e, t, s) => t in e ? m(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var c = (e, t, s) => h(e, typeof t != "symbol" ? t + "" : t, s);
4
+ import { t as l, p as u } from "./parse-styles-T74HIH4_.js";
5
+ import { e as g } from "./element-factory-uEk4VrqP.js";
6
+ const y = (e) => Object.keys(e);
7
+ class f {
5
8
  constructor(t, s) {
9
+ c(this, "_callerName");
10
+ c(this, "_context");
6
11
  this.tagName = t, this.params = s;
7
12
  }
8
13
  get hash() {
9
- return p(this.params.base || this.params);
14
+ return l(this.params.base || this.params);
10
15
  }
11
16
  get priority() {
12
17
  var t;
@@ -24,42 +29,42 @@ class u {
24
29
  }
25
30
  get templateKeys() {
26
31
  var t;
27
- return (t = this._context) != null && t.config.templates ? l(this._context.config.templates) : [];
32
+ return (t = this._context) != null && t.config.templates ? y(this._context.config.templates) : [];
28
33
  }
29
34
  get css() {
30
- var a;
31
- const { base: t = {}, variants: s = {}, compoundVariants: e = [] } = this.params, n = { ...t, variants: s, compoundVariants: e };
32
- return h(n, `.${this.cssClassName}`, this.priority, (a = this._context) == null ? void 0 : a.config);
35
+ var r;
36
+ const { base: t = {}, variants: s = {}, compoundVariants: a = [] } = this.params, n = { ...t, variants: s, compoundVariants: a };
37
+ return u(n, `.${this.cssClassName}`, this.priority, (r = this._context) == null ? void 0 : r.config);
33
38
  }
34
39
  get props() {
35
- const { element: t } = this.params, s = this.params.variants ? Object.keys(this.params.variants).map((a) => {
40
+ const { element: t } = this.params, s = this.params.variants ? Object.keys(this.params.variants).map((r) => {
36
41
  var i;
37
- const o = (i = this.params.defaultVariants) == null ? void 0 : i[a];
38
- return o !== void 0 ? `${a}=${String(o)}` : a;
39
- }) : void 0, e = /* @__PURE__ */ new Set([]), n = /\{props\.([\w\d]+)\}/gi.exec(JSON.stringify(this.params.base));
40
- return n && n.forEach((a, o, i) => {
41
- const c = i.at(1);
42
- c && e.add(c);
42
+ const o = (i = this.params.defaultVariants) == null ? void 0 : i[r];
43
+ return o !== void 0 ? `${r}=${String(o)}` : r;
44
+ }) : void 0, a = /* @__PURE__ */ new Set([]), n = /\{props\.([\w\d]+)\}/gi.exec(JSON.stringify(this.params.base));
45
+ return n && n.forEach((r, o, i) => {
46
+ const p = i.at(1);
47
+ p && a.add(p);
43
48
  }), {
44
49
  element: t,
45
50
  variantKeys: s,
46
- propValueKeys: [...e]
51
+ propValueKeys: [...a]
47
52
  };
48
53
  }
49
54
  _withBuildContext(t) {
50
55
  this._context = t;
51
- const { name: s, config: e } = t;
56
+ const { name: s, config: a } = t;
52
57
  return this._callerName = s, this;
53
58
  }
54
59
  }
55
- const f = (r, t) => {
56
- const s = new u(r, t), e = m(r, s.cssClassName, s.props, {
60
+ const _ = (e, t) => {
61
+ const s = new f(e, t), a = g(e, s.cssClassName, s.props, {
57
62
  "data-unoptimized-client-component": !0
58
63
  });
59
- return Object.assign(e, {
64
+ return Object.assign(a, {
60
65
  generator: s
61
- }), e;
66
+ }), a;
62
67
  };
63
68
  export {
64
- f as styled
69
+ _ as styled
65
70
  };
@@ -1,6 +0,0 @@
1
- function t(e) {
2
- return e ? typeof e != "string" ? String(e) : e.replace(/\s/g, "-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g, (r, n) => (n > 0 ? "-" : "") + r.toLowerCase()) : "";
3
- }
4
- export {
5
- t as d
6
- };
@@ -1 +0,0 @@
1
- "use strict";function t(e){return e?typeof e!="string"?String(e):e.replace(/\s/g,"-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,(r,n)=>(n>0?"-":"")+r.toLowerCase()):""}exports.dashCase=t;