@salty-css/react 0.0.1-alpha.115 → 0.0.1-alpha.117

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.
@@ -0,0 +1,67 @@
1
+ import { forwardRef as g, createElement as p } from "react";
2
+ import { p as N, d as A } from "./parse-tokens-YUi047xd.js";
3
+ function K(n) {
4
+ var s, e, t = "";
5
+ if (typeof n == "string" || typeof n == "number") t += n;
6
+ else if (typeof n == "object") if (Array.isArray(n)) {
7
+ var o = n.length;
8
+ for (s = 0; s < o; s++) n[s] && (e = K(n[s])) && (t && (t += " "), t += e);
9
+ } else for (e in n) n[e] && (t && (t += " "), t += e);
10
+ return t;
11
+ }
12
+ function R() {
13
+ for (var n, s, e = 0, t = "", o = arguments.length; e < o; e++) (n = arguments[e]) && (s = K(n)) && (t && (t += " "), t += s);
14
+ return t;
15
+ }
16
+ const F = ["passProps"], x = (n, s, e, t) => {
17
+ const j = g(({
18
+ extend: d = n,
19
+ element: S = e.element,
20
+ className: O = "",
21
+ children: $,
22
+ passProps: u = e.passProps,
23
+ _vks: c = /* @__PURE__ */ new Set(),
24
+ ...r
25
+ }, w) => {
26
+ const f = { passProps: u };
27
+ e.attr && Object.assign(f, e.attr), t && Object.assign(f, t), e.defaultProps && Object.assign(r, e.defaultProps), r && Object.assign(f, r);
28
+ const b = new Set(O.split(" ")), y = typeof d == "function" || typeof d == "object", h = y && "isStyled" in d, E = y ? d : S || d;
29
+ if (!E) throw new Error("No element provided");
30
+ const m = f.style || {};
31
+ f.style || (f.style = m), Object.entries(m).forEach(([i, a]) => {
32
+ const { result: l } = N(a);
33
+ m[i] = l;
34
+ }), e.propValueKeys && e.propValueKeys.forEach((i) => {
35
+ const a = `css-${i}`, l = r[a];
36
+ if (l === void 0) return;
37
+ const C = `--props-${A(i)}`;
38
+ m[C] = l, c && c.add(a);
39
+ }), e.variantKeys && e.variantKeys.forEach((i) => {
40
+ const [a, l] = i.split("=");
41
+ r[a] !== void 0 ? (b.add(`${a}-${r[a]}`), c && c.add(a)) : l !== void 0 && b.add(`${a}-${l}`);
42
+ }), c && (!y || !h) ? c.forEach((i) => {
43
+ if (!u) return delete f[i];
44
+ if (u !== !0 && !u.includes(i))
45
+ return delete f[i];
46
+ }) : h && Object.assign(f, { _vks: c }), h || F.forEach((i) => delete f[i]);
47
+ const V = R(s, ...b);
48
+ return p(
49
+ E,
50
+ {
51
+ element: y ? S : void 0,
52
+ className: V,
53
+ ref: w,
54
+ ...f
55
+ },
56
+ $
57
+ );
58
+ });
59
+ return Object.assign(j, {
60
+ isStyled: !0,
61
+ className: s,
62
+ toString: () => `.${s}`
63
+ }), j;
64
+ };
65
+ export {
66
+ x as e
67
+ };
@@ -0,0 +1 @@
1
+ "use strict";const K=require("react"),O=require("./parse-tokens-p68muVgG.cjs");function $(n){var s,e,t="";if(typeof n=="string"||typeof n=="number")t+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(s=0;s<u;s++)n[s]&&(e=$(n[s]))&&(t&&(t+=" "),t+=e)}else for(e in n)n[e]&&(t&&(t+=" "),t+=e);return t}function q(){for(var n,s,e=0,t="",u=arguments.length;e<u;e++)(n=arguments[e])&&(s=$(n))&&(t&&(t+=" "),t+=s);return t}const A=["passProps"],F=(n,s,e,t)=>{const u=({extend:d=n,element:S=e.element,className:w="",children:V,passProps:o=e.passProps,_vks:c=new Set,...r},C)=>{const f={passProps:o};e.attr&&Object.assign(f,e.attr),t&&Object.assign(f,t),e.defaultProps&&Object.assign(r,e.defaultProps),r&&Object.assign(f,r);const b=new Set(w.split(" ")),y=typeof d=="function"||typeof d=="object",h=y&&"isStyled"in d,E=y?d:S||d;if(!E)throw new Error("No element provided");const m=f.style||{};f.style||(f.style=m),Object.entries(m).forEach(([i,a])=>{const{result:l}=O.parseValueTokens(a);m[i]=l}),e.propValueKeys&&e.propValueKeys.forEach(i=>{const a=`css-${i}`,l=r[a];if(l===void 0)return;const N=`--props-${O.dashCase(i)}`;m[N]=l,c&&c.add(a)}),e.variantKeys&&e.variantKeys.forEach(i=>{const[a,l]=i.split("=");r[a]!==void 0?(b.add(`${a}-${r[a]}`),c&&c.add(a)):l!==void 0&&b.add(`${a}-${l}`)}),c&&(!y||!h)?c.forEach(i=>{if(!o)return delete f[i];if(o!==!0&&!o.includes(i))return delete f[i]}):h&&Object.assign(f,{_vks:c}),h||A.forEach(i=>delete f[i]);const g=q(s,...b);return K.createElement(E,{element:y?S:void 0,className:g,ref:C,...f},V)},j=K.forwardRef(u);return Object.assign(j,{isStyled:!0,className:s,toString:()=>`.${s}`}),j};exports.elementFactory=F;
package/keyframes.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./parse-styles-DjwCLt3X.cjs"),j=({animationName:m,params:l,appendInitialStyles:f,...t})=>{const r=m||u.toHash(t),o=(n={})=>{const{duration:e="500ms",easing:s="ease-in-out",delay:a="0s",iterationCount:i="1",direction:d="normal",fillMode:g="forwards",playState:p="running"}={...l,...n},c=`${r} ${e} ${s} ${a} ${i} ${d} ${g} ${p}`;if(!f)return c;const $=t.from||t["0%"];if(!$)return c;const b=u.parseStyles($,"");return`${c};${b}`},y=Object.entries(t).reduce((n,[e,s])=>{if(!s)return n;const a=u.parseStyles(s,""),i=typeof e=="number"?`${e}%`:e;return`${n}${i}{${a}}`},""),S=`@keyframes ${r} {${y}}`;return Object.assign(o,{toString:o,isKeyframes:!0,animationName:r,css:S,keyframes:t}),o};exports.keyframes=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./parse-styles-C52S0WXA.cjs"),j=({animationName:m,params:l,appendInitialStyles:f,...t})=>{const r=m||u.toHash(t),o=(n={})=>{const{duration:e="500ms",easing:s="ease-in-out",delay:a="0s",iterationCount:i="1",direction:d="normal",fillMode:g="forwards",playState:p="running"}={...l,...n},c=`${r} ${e} ${s} ${a} ${i} ${d} ${g} ${p}`;if(!f)return c;const $=t.from||t["0%"];if(!$)return c;const b=u.parseStyles($,"");return`${c};${b}`},y=Object.entries(t).reduce((n,[e,s])=>{if(!s)return n;const a=u.parseStyles(s,""),i=typeof e=="number"?`${e}%`:e;return`${n}${i}{${a}}`},""),S=`@keyframes ${r} {${y}}`;return Object.assign(o,{toString:o,isKeyframes:!0,animationName:r,css:S,keyframes:t}),o};exports.keyframes=j;
package/keyframes.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as j, p as m } from "./parse-styles-CVYekczt.js";
1
+ import { t as j, p as m } from "./parse-styles-b5rqGu2w.js";
2
2
  const N = ({ animationName: u, params: f, appendInitialStyles: l, ...t }) => {
3
3
  const e = u || j(t), o = (s = {}) => {
4
4
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/react",
3
- "version": "0.0.1-alpha.115",
3
+ "version": "0.0.1-alpha.117",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./dist/index.d.ts",
@@ -46,7 +46,7 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "@salty-css/core": "^0.0.1-alpha.115",
49
+ "@salty-css/core": "^0.0.1-alpha.117",
50
50
  "clsx": ">=2.x",
51
51
  "react": ">=19.x || >=18.3.x"
52
52
  }
@@ -1,4 +1,4 @@
1
- "use strict";const E=require("./parse-tokens-CRGUYhKC.cjs"),V=e=>String.fromCharCode(e+(e>25?39:97)),T=(e,r)=>{let t="",n;for(n=Math.abs(e);n>52;n=n/52|0)t=V(n%52)+t;return t=V(n%52)+t,t.length<r?t=t.padStart(r,"a"):t.length>r&&(t=t.slice(-r)),t},W=(e,r)=>{let t=r.length;for(;t;)e=e*33^r.charCodeAt(--t);return e},g=(e,r=3)=>{const t=W(5381,JSON.stringify(e))>>>0;return T(t,r)},k=(e,r)=>{if(typeof e!="string")return{result:e};if(!r)return{result:e};const t=[];return Object.values(r).forEach(n=>{const{pattern:c,transform:a}=n;e=e.replace(c,d=>{const{value:i,css:m}=a(d);return m&&t.push(m),i})}),{result:e,additionalCss:t}},$=(e,r,t,n)=>{if(!e)return"";const c=[],a=Object.entries(e).reduce((i,[m,s])=>{const o=m.trim();if(typeof s=="function"&&(s=s()),typeof s=="object"){if(!s)return i;if(o==="variants")return Object.entries(s).forEach(([p,f])=>{f&&Object.entries(f).forEach(([l,b])=>{if(!b)return;const S=`${r}.${p}-${l}`,j=$(b,S,t);c.push(j)})}),i;if(o==="defaultVariants")return i;if(o==="compoundVariants")return s.forEach(p=>{const{css:f,...l}=p,b=Object.entries(l).reduce((j,[N,P])=>`${j}.${N}-${P}`,r),S=$(f,b,t);c.push(S)}),i;if(o.startsWith("@")){const p=$(s,r,t),f=`${o} {
1
+ "use strict";const E=require("./parse-tokens-p68muVgG.cjs"),V=e=>String.fromCharCode(e+(e>25?39:97)),T=(e,r)=>{let t="",n;for(n=Math.abs(e);n>52;n=n/52|0)t=V(n%52)+t;return t=V(n%52)+t,t.length<r?t=t.padStart(r,"a"):t.length>r&&(t=t.slice(-r)),t},W=(e,r)=>{let t=r.length;for(;t;)e=e*33^r.charCodeAt(--t);return e},g=(e,r=3)=>{const t=W(5381,JSON.stringify(e))>>>0;return T(t,r)},k=(e,r)=>{if(typeof e!="string")return{result:e};if(!r)return{result:e};const t=[];return Object.values(r).forEach(n=>{const{pattern:c,transform:a}=n;e=e.replace(c,d=>{const{value:i,css:m}=a(d);return m&&t.push(m),i})}),{result:e,additionalCss:t}},$=(e,r,t,n)=>{if(!e)return"";const c=[],a=Object.entries(e).reduce((i,[m,s])=>{const o=m.trim();if(typeof s=="function"&&(s=s()),typeof s=="object"){if(!s)return i;if(o==="variants")return Object.entries(s).forEach(([p,f])=>{f&&Object.entries(f).forEach(([l,b])=>{if(!b)return;const S=`${r}.${p}-${l}`,j=$(b,S,t);c.push(j)})}),i;if(o==="defaultVariants")return i;if(o==="compoundVariants")return s.forEach(p=>{const{css:f,...l}=p,b=Object.entries(l).reduce((j,[N,P])=>`${j}.${N}-${P}`,r),S=$(f,b,t);c.push(S)}),i;if(o.startsWith("@")){const p=$(s,r,t),f=`${o} {
2
2
  ${p.replace(`
3
3
  `,`
4
4
  `)}
@@ -1,4 +1,4 @@
1
- import { d as W, p as g } from "./parse-tokens-DAW55Na6.js";
1
+ import { d as W, p as g } from "./parse-tokens-YUi047xd.js";
2
2
  const E = (e) => String.fromCharCode(e + (e > 25 ? 39 : 97)), H = (e, r) => {
3
3
  let t = "", n;
4
4
  for (n = Math.abs(e); n > 52; n = n / 52 | 0) t = E(n % 52) + t;
@@ -1,5 +1,5 @@
1
1
  function n(e) {
2
- return e ? typeof e != "string" ? n(String(e)) : e.replace(/\s/g, "-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g, (r, t) => (t > 0 ? "-" : "") + r.toLowerCase()) : "";
2
+ return e ? typeof e != "string" ? n(String(e)) : e.replace(/[\s.]/g, "-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g, (r, t) => (t > 0 ? "-" : "") + r.toLowerCase()) : "";
3
3
  }
4
4
  const o = (e) => typeof e != "string" ? { result: e } : /\{[^{}]+\}/g.test(e) ? { result: e.replace(/\{([^{}]+)\}/g, (...s) => `var(--${n(s[1].replaceAll(".", "-"))})`) } : { result: e };
5
5
  export {
@@ -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,(t,s)=>(s>0?"-":"")+t.toLowerCase()):""}const a=e=>typeof e!="string"?{result:e}:/\{[^{}]+\}/g.test(e)?{result:e.replace(/\{([^{}]+)\}/g,(...n)=>`var(--${r(n[1].replaceAll(".","-"))})`)}:{result:e};exports.dashCase=r;exports.parseValueTokens=a;
package/styled-client.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./element-factory-oJLHawcF.cjs"),n=(e,t,r)=>l.elementFactory(e,t,r);exports.styledClient=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./element-factory-D4kpeFoW.cjs"),n=(e,t,r)=>l.elementFactory(e,t,r);exports.styledClient=n;
package/styled-client.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e as o } from "./element-factory-CsNOsWc4.js";
1
+ import { e as o } from "./element-factory-C7JVLDq7.js";
2
2
  const l = (e, t, r) => o(e, t, r);
3
3
  export {
4
4
  l as styledClient
package/styled.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var y=Object.defineProperty;var g=(s,t,e)=>t in s?y(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var o=(s,t,e)=>g(s,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./parse-styles-DjwCLt3X.cjs"),f=require("./element-factory-oJLHawcF.cjs"),N=s=>Object.keys(s);class _{constructor(t,e){o(this,"_isProd");o(this,"_callerName");o(this,"_context");this.tagName=t,this.params=e}get hash(){return u.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:e}=this.params;return e&&t.push(e),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?N(this._context.config.templates):[]}get css(){var r;const{base:t={},variants:e={},compoundVariants:a=[]}=this.params,i={...t,variants:e,compoundVariants:a};return u.parseStyles(i,`.${this.cssClassName}`,this.priority,(r=this._context)==null?void 0:r.config)}get props(){const{element:t,variants:e={},compoundVariants:a=[],defaultVariants:i={}}=this.params,r=new Set([]),p=n=>{const c=i[n];c!==void 0?r.add(`${n}=${String(c)}`):r.add(n)};Object.keys(e).forEach(p),a.map(n=>Object.keys(n).forEach(p));const h=new Set([]),l=/\{props\.([\w\d]+)\}/gi.exec(JSON.stringify(this.params.base));return l&&l.forEach((n,c,d)=>{const m=d.at(1);m&&h.add(m)}),{element:t,variantKeys:[...r],propValueKeys:[...h],attr:{"data-component-name":this._isProd?void 0:this._callerName}}}_withBuildContext(t){this._context=t;const{name:e,config:a,prod:i}=t;return this._isProd=i,this._callerName=e,this}}const b=(s,t)=>{const e=new _(s,t),a=f.elementFactory(s,e.cssClassName,e.props,{"data-unoptimized-client-component":!0});return Object.assign(a,{generator:e}),a};exports.styled=b;
1
+ "use strict";var f=Object.defineProperty;var N=(s,t,e)=>t in s?f(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var o=(s,t,e)=>N(s,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./parse-styles-C52S0WXA.cjs"),_=require("./element-factory-D4kpeFoW.cjs"),b=s=>Object.keys(s);class S{constructor(t,e){o(this,"_isProd");o(this,"_callerName");o(this,"_context");this.tagName=t,this.params=e}get hash(){return d.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:e}=this.params;return e&&t.push(e),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?b(this._context.config.templates):[]}get css(){var i;const{base:t={},variants:e={},compoundVariants:a=[]}=this.params,n={...t,variants:e,compoundVariants:a};return d.parseStyles(n,`.${this.cssClassName}`,this.priority,(i=this._context)==null?void 0:i.config)}get props(){const{element:t,variants:e={},compoundVariants:a=[],defaultVariants:n={},defaultProps:i={},passProps:y}=this.params,c=new Set([]),l=r=>{const p=n[r];p!==void 0?c.add(`${r}=${String(p)}`):c.add(r)};Object.keys(e).forEach(l),a.map(r=>Object.keys(r).forEach(l));const h=new Set([]),m=/\{props\.([\w\d]+)\}/gi.exec(JSON.stringify(this.params.base));return m&&m.forEach((r,p,g)=>{const u=g.at(1);u&&h.add(u)}),{element:t,variantKeys:[...c],propValueKeys:[...h],passProps:y,defaultProps:i,attr:{"data-component-name":this._isProd?void 0:this._callerName}}}_withBuildContext(t){this._context=t;const{name:e,config:a,prod:n}=t;return this._isProd=n,this._callerName=e,this}}const v=(s,t)=>{const e=new S(s,t),a=_.elementFactory(s,e.cssClassName,e.props,{"data-unoptimized-client-component":!0});return Object.assign(a,{generator:e}),a};exports.styled=v;
package/styled.js CHANGED
@@ -1,10 +1,10 @@
1
- var u = Object.defineProperty;
2
- var y = (e, t, s) => t in e ? u(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var o = (e, t, s) => y(e, typeof t != "symbol" ? t + "" : t, s);
4
- import { t as f, p as g } from "./parse-styles-CVYekczt.js";
5
- import { e as N } from "./element-factory-CsNOsWc4.js";
6
- const _ = (e) => Object.keys(e);
7
- class b {
1
+ var y = Object.defineProperty;
2
+ var g = (e, t, s) => t in e ? y(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var o = (e, t, s) => g(e, typeof t != "symbol" ? t + "" : t, s);
4
+ import { t as N, p as _ } from "./parse-styles-b5rqGu2w.js";
5
+ import { e as b } from "./element-factory-C7JVLDq7.js";
6
+ const x = (e) => Object.keys(e);
7
+ class V {
8
8
  constructor(t, s) {
9
9
  o(this, "_isProd");
10
10
  o(this, "_callerName");
@@ -12,7 +12,7 @@ class b {
12
12
  this.tagName = t, this.params = s;
13
13
  }
14
14
  get hash() {
15
- return f(this.params.base || this.params);
15
+ return N(this.params.base || this.params);
16
16
  }
17
17
  get priority() {
18
18
  var t;
@@ -30,27 +30,29 @@ class b {
30
30
  }
31
31
  get templateKeys() {
32
32
  var t;
33
- return (t = this._context) != null && t.config.templates ? _(this._context.config.templates) : [];
33
+ return (t = this._context) != null && t.config.templates ? x(this._context.config.templates) : [];
34
34
  }
35
35
  get css() {
36
- var r;
37
- const { base: t = {}, variants: s = {}, compoundVariants: a = [] } = this.params, i = { ...t, variants: s, compoundVariants: a };
38
- return g(i, `.${this.cssClassName}`, this.priority, (r = this._context) == null ? void 0 : r.config);
36
+ var i;
37
+ const { base: t = {}, variants: s = {}, compoundVariants: a = [] } = this.params, n = { ...t, variants: s, compoundVariants: a };
38
+ return _(n, `.${this.cssClassName}`, this.priority, (i = this._context) == null ? void 0 : i.config);
39
39
  }
40
40
  get props() {
41
- const { element: t, variants: s = {}, compoundVariants: a = [], defaultVariants: i = {} } = this.params, r = /* @__PURE__ */ new Set([]), p = (n) => {
42
- const c = i[n];
43
- c !== void 0 ? r.add(`${n}=${String(c)}`) : r.add(n);
41
+ const { element: t, variants: s = {}, compoundVariants: a = [], defaultVariants: n = {}, defaultProps: i = {}, passProps: u } = this.params, c = /* @__PURE__ */ new Set([]), h = (r) => {
42
+ const p = n[r];
43
+ p !== void 0 ? c.add(`${r}=${String(p)}`) : c.add(r);
44
44
  };
45
- Object.keys(s).forEach(p), a.map((n) => Object.keys(n).forEach(p));
46
- const h = /* @__PURE__ */ new Set([]), m = /\{props\.([\w\d]+)\}/gi.exec(JSON.stringify(this.params.base));
47
- return m && m.forEach((n, c, d) => {
48
- const l = d.at(1);
49
- l && h.add(l);
45
+ Object.keys(s).forEach(h), a.map((r) => Object.keys(r).forEach(h));
46
+ const m = /* @__PURE__ */ new Set([]), l = /\{props\.([\w\d]+)\}/gi.exec(JSON.stringify(this.params.base));
47
+ return l && l.forEach((r, p, f) => {
48
+ const d = f.at(1);
49
+ d && m.add(d);
50
50
  }), {
51
51
  element: t,
52
- variantKeys: [...r],
53
- propValueKeys: [...h],
52
+ variantKeys: [...c],
53
+ propValueKeys: [...m],
54
+ passProps: u,
55
+ defaultProps: i,
54
56
  attr: {
55
57
  "data-component-name": this._isProd ? void 0 : this._callerName
56
58
  }
@@ -58,12 +60,12 @@ class b {
58
60
  }
59
61
  _withBuildContext(t) {
60
62
  this._context = t;
61
- const { name: s, config: a, prod: i } = t;
62
- return this._isProd = i, this._callerName = s, this;
63
+ const { name: s, config: a, prod: n } = t;
64
+ return this._isProd = n, this._callerName = s, this;
63
65
  }
64
66
  }
65
- const K = (e, t) => {
66
- const s = new b(e, t), a = N(e, s.cssClassName, s.props, {
67
+ const j = (e, t) => {
68
+ const s = new V(e, t), a = b(e, s.cssClassName, s.props, {
67
69
  "data-unoptimized-client-component": !0
68
70
  });
69
71
  return Object.assign(a, {
@@ -71,5 +73,5 @@ const K = (e, t) => {
71
73
  }), a;
72
74
  };
73
75
  export {
74
- K as styled
76
+ j as styled
75
77
  };
@@ -1,67 +0,0 @@
1
- import { forwardRef as C, createElement as V } from "react";
2
- import { p as N, d as A } from "./parse-tokens-DAW55Na6.js";
3
- function K(n) {
4
- var s, e, t = "";
5
- if (typeof n == "string" || typeof n == "number") t += n;
6
- else if (typeof n == "object") if (Array.isArray(n)) {
7
- var d = n.length;
8
- for (s = 0; s < d; s++) n[s] && (e = K(n[s])) && (t && (t += " "), t += e);
9
- } else for (e in n) n[e] && (t && (t += " "), t += e);
10
- return t;
11
- }
12
- function R() {
13
- for (var n, s, e = 0, t = "", d = arguments.length; e < d; e++) (n = arguments[e]) && (s = K(n)) && (t && (t += " "), t += s);
14
- return t;
15
- }
16
- const F = ["passVariantProps"], x = (n, s, e, t) => {
17
- const j = C(({
18
- extend: l = n,
19
- element: S = e.element,
20
- className: $ = "",
21
- children: w,
22
- passVariantProps: u,
23
- _vks: a = /* @__PURE__ */ new Set(),
24
- ...o
25
- }, O) => {
26
- const f = { passVariantProps: u };
27
- e.attr && Object.assign(f, e.attr), t && Object.assign(f, t), o && Object.assign(f, o);
28
- const b = new Set($.split(" ")), y = typeof l == "function" || typeof l == "object", h = y && "isStyled" in l, E = y ? l : S || l;
29
- if (!E) throw new Error("No element provided");
30
- const m = f.style || {};
31
- f.style || (f.style = m), Object.entries(m).forEach(([i, r]) => {
32
- const { result: c } = N(r);
33
- m[i] = c;
34
- }), e.propValueKeys && e.propValueKeys.forEach((i) => {
35
- const r = `css-${i}`, c = o[r];
36
- if (c === void 0) return;
37
- const p = `--props-${A(i)}`;
38
- m[p] = c, a && a.add(r);
39
- }), e.variantKeys && e.variantKeys.forEach((i) => {
40
- const [r, c] = i.split("=");
41
- o[r] !== void 0 ? (b.add(`${r}-${o[r]}`), a && a.add(r)) : c !== void 0 && b.add(`${r}-${c}`);
42
- }), a && (!y || !h) ? a.forEach((i) => {
43
- if (!u) return delete f[i];
44
- if (u !== !0 && !u.includes(i))
45
- return delete f[i];
46
- }) : h && Object.assign(f, { _vks: a }), h || F.forEach((i) => delete f[i]);
47
- const g = R(s, ...b);
48
- return V(
49
- E,
50
- {
51
- element: y ? S : void 0,
52
- className: g,
53
- ref: O,
54
- ...f
55
- },
56
- w
57
- );
58
- });
59
- return Object.assign(j, {
60
- isStyled: !0,
61
- className: s,
62
- toString: () => `.${s}`
63
- }), j;
64
- };
65
- export {
66
- x as e
67
- };
@@ -1 +0,0 @@
1
- "use strict";const K=require("react"),$=require("./parse-tokens-CRGUYhKC.cjs");function w(n){var s,e,t="";if(typeof n=="string"||typeof n=="number")t+=n;else if(typeof n=="object")if(Array.isArray(n)){var l=n.length;for(s=0;s<l;s++)n[s]&&(e=w(n[s]))&&(t&&(t+=" "),t+=e)}else for(e in n)n[e]&&(t&&(t+=" "),t+=e);return t}function q(){for(var n,s,e=0,t="",l=arguments.length;e<l;e++)(n=arguments[e])&&(s=w(n))&&(t&&(t+=" "),t+=s);return t}const A=["passVariantProps"],F=(n,s,e,t)=>{const l=({extend:o=n,element:S=e.element,className:O="",children:g,passVariantProps:d,_vks:c=new Set,...u},C)=>{const f={passVariantProps:d};e.attr&&Object.assign(f,e.attr),t&&Object.assign(f,t),u&&Object.assign(f,u);const b=new Set(O.split(" ")),y=typeof o=="function"||typeof o=="object",h=y&&"isStyled"in o,E=y?o:S||o;if(!E)throw new Error("No element provided");const m=f.style||{};f.style||(f.style=m),Object.entries(m).forEach(([i,r])=>{const{result:a}=$.parseValueTokens(r);m[i]=a}),e.propValueKeys&&e.propValueKeys.forEach(i=>{const r=`css-${i}`,a=u[r];if(a===void 0)return;const N=`--props-${$.dashCase(i)}`;m[N]=a,c&&c.add(r)}),e.variantKeys&&e.variantKeys.forEach(i=>{const[r,a]=i.split("=");u[r]!==void 0?(b.add(`${r}-${u[r]}`),c&&c.add(r)):a!==void 0&&b.add(`${r}-${a}`)}),c&&(!y||!h)?c.forEach(i=>{if(!d)return delete f[i];if(d!==!0&&!d.includes(i))return delete f[i]}):h&&Object.assign(f,{_vks:c}),h||A.forEach(i=>delete f[i]);const V=q(s,...b);return K.createElement(E,{element:y?S:void 0,className:V,ref:C,...f},g)},j=K.forwardRef(l);return Object.assign(j,{isStyled:!0,className:s,toString:()=>`.${s}`}),j};exports.elementFactory=F;
@@ -1 +0,0 @@
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,(t,s)=>(s>0?"-":"")+t.toLowerCase()):""}const a=e=>typeof e!="string"?{result:e}:/\{[^{}]+\}/g.test(e)?{result:e.replace(/\{([^{}]+)\}/g,(...n)=>`var(--${r(n[1].replaceAll(".","-"))})`)}:{result:e};exports.dashCase=r;exports.parseValueTokens=a;