reaxify 0.0.92 → 0.0.93
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const y=require("react/jsx-runtime"),a=require("../../helpers/cn.cjs.js"),w=require("../../hooks/useClasses.cjs.js"),l=require("react"),k=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function q({as:u,variant:d="solid",color:n="primary",size:s="md",className:x,children:c,...p}){const r=w(e=>e.badge),h=u||"span",m=l.useMemo(()=>{var t,g,b;if(!n)return"border-transparent";const e={primary:{solid:"bg-primary text-white border-primary",outline:"bg-transparent text-primary border-primary",soft:"bg-light-primary text-dark-primary border-light-primary"},secondary:{solid:"bg-secondary text-white border-secondary",outline:"bg-transparent text-secondary border-secondary",soft:"bg-light-secondary text-dark-secondary border-light-secondary"},success:{solid:"bg-success text-white border-success",outline:"bg-transparent text-success border-success",soft:"bg-light-success text-dark-success border-light-success"},info:{solid:"bg-info text-white border-info",outline:"bg-transparent text-info border-info",soft:"bg-light-info text-dark-info border-light-info"},warning:{solid:"bg-warning text-white border-warning",outline:"bg-transparent text-warning border-warning",soft:"bg-light-warning text-dark-warning border-light-warning"},danger:{solid:"bg-danger text-white border-danger",outline:"bg-transparent text-danger border-danger",soft:"bg-light-danger text-dark-danger border-light-danger"},dark:{solid:"bg-dark text-white border-dark",outline:"bg-transparent text-dark border-dark",soft:"bg-dark text-
|
|
1
|
+
"use client";"use strict";const y=require("react/jsx-runtime"),a=require("../../helpers/cn.cjs.js"),w=require("../../hooks/useClasses.cjs.js"),l=require("react"),k=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function q({as:u,variant:d="solid",color:n="primary",size:s="md",className:x,children:c,...p}){const r=w(e=>e.badge),h=u||"span",m=l.useMemo(()=>{var t,g,b;if(!n)return"border-transparent";const e={primary:{solid:"bg-primary text-white border-primary",outline:"bg-transparent text-primary border-primary",soft:"bg-light-primary text-dark-primary border-light-primary"},secondary:{solid:"bg-secondary text-white border-secondary",outline:"bg-transparent text-secondary border-secondary",soft:"bg-light-secondary text-dark-secondary border-light-secondary"},success:{solid:"bg-success text-white border-success",outline:"bg-transparent text-success border-success",soft:"bg-light-success text-dark-success border-light-success"},info:{solid:"bg-info text-white border-info",outline:"bg-transparent text-info border-info",soft:"bg-light-info text-dark-info border-light-info"},warning:{solid:"bg-warning text-white border-warning",outline:"bg-transparent text-warning border-warning",soft:"bg-light-warning text-dark-warning border-light-warning"},danger:{solid:"bg-danger text-white border-danger",outline:"bg-transparent text-danger border-danger",soft:"bg-light-danger text-dark-danger border-light-danger"},dark:{solid:"bg-dark text-white border-dark",outline:"bg-transparent text-dark border-dark",soft:"bg-dark text-white border-dark"},light:{solid:"bg-light text-dark border-light",outline:"bg-transparent text-dark border-light",soft:"bg-light text-dark border-light"}},o=(t=e==null?void 0:e[n])==null?void 0:t[d],i=(b=(g=r==null?void 0:r.color)==null?void 0:g[n])==null?void 0:b[d];return[o,i]},[n,d,r==null?void 0:r.color]),f=l.useMemo(()=>{var o,i,t;if(!s)return null;const e={sm:a("text-xs py-0.5 px-1.5",(o=r==null?void 0:r.size)==null?void 0:o.sm),md:a("text-sm py-[0.1875rem] px-2",(i=r==null?void 0:r.size)==null?void 0:i.md),lg:a("text-base py-1 px-3",(t=r==null?void 0:r.size)==null?void 0:t.lg)};return e==null?void 0:e[s]},[s,r==null?void 0:r.size]);return y.jsx(h,{className:k.twMerge("inline-flex border border-border items-center text-center font-medium align-middle whitespace-nowrap rounded",r==null?void 0:r.base,m,f,x),...p,children:c})}module.exports=q;
|
|
@@ -50,7 +50,7 @@ function B({
|
|
|
50
50
|
dark: {
|
|
51
51
|
solid: "bg-dark text-white border-dark",
|
|
52
52
|
outline: "bg-transparent text-dark border-dark",
|
|
53
|
-
soft: "bg-dark text-
|
|
53
|
+
soft: "bg-dark text-white border-dark"
|
|
54
54
|
},
|
|
55
55
|
light: {
|
|
56
56
|
solid: "bg-light text-dark border-light",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const l=require("react/jsx-runtime"),r=require("react"),W=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),E=require("../../helpers/cn.cjs.js"),F=require("../../hooks/useClasses.cjs.js"),H=require("../../hooks/useCreateRipple.cjs.js"),I=require("../Alert/index.cjs.js"),J=require("../ButtonGroup/index.cjs.js"),K=require("../Drawer/index.cjs.js"),L=require("../Modal/index.cjs.js"),O=require("../Spinner/index.cjs.js");function Q({as:f,variant:h,color:m,size:y,loading:w,stopPropagation:k=!1,preventDefault:C=!1,closeModal:v=!1,closeDrawer:q=!1,className:z,onClick:b,children:j,disabled:M,...R}){const t=F(e=>e.button),a=r.useContext(J.ButtonGroupContext),N=r.useContext(L.ModalContext),$=r.useContext(K.DrawerContext),c=r.useContext(I.AlertContext),D=H(),_=f||"button",u=h??a.variant??c.buttonVariant??"solid",i=m??a.color??c.color??"primary",o=y??a.size??"md",d=w??a.loading??!1,s=r.useMemo(()=>{var g,x,p;if(!i)return"border-transparent";const e={primary:{solid:"bg-primary text-white border-primary",outline:"bg-transparent text-primary border-primary",text:"bg-transparent text-primary border-transparent",soft:"bg-light-primary text-dark-primary border-light-primary"},secondary:{solid:"bg-secondary text-white border-secondary",outline:"bg-transparent text-secondary border-secondary",text:"bg-transparent text-secondary border-transparent",soft:"bg-light-secondary text-dark-secondary border-light-secondary"},success:{solid:"bg-success text-white border-success",outline:"bg-transparent text-success border-success",text:"bg-transparent text-success border-transparent",soft:"bg-light-success text-dark-success border-light-success"},info:{solid:"bg-info text-white border-info",outline:"bg-transparent text-info border-info",text:"bg-transparent text-info border-transparent",soft:"bg-light-info text-dark-info border-light-info"},warning:{solid:"bg-warning text-white border-warning",outline:"bg-transparent text-warning border-warning",text:"bg-transparent text-warning border-transparent",soft:"bg-light-warning text-dark-warning border-light-warning"},danger:{solid:"bg-danger text-white border-danger",outline:"bg-transparent text-danger border-danger",text:"bg-transparent text-danger border-transparent",soft:"bg-light-danger text-dark-danger border-light-danger"},dark:{solid:"bg-dark text-white border-dark",outline:"bg-transparent text-dark border-dark",text:"bg-transparent text-dark border-transparent",soft:"bg-dark text-
|
|
1
|
+
"use client";"use strict";const l=require("react/jsx-runtime"),r=require("react"),W=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),E=require("../../helpers/cn.cjs.js"),F=require("../../hooks/useClasses.cjs.js"),H=require("../../hooks/useCreateRipple.cjs.js"),I=require("../Alert/index.cjs.js"),J=require("../ButtonGroup/index.cjs.js"),K=require("../Drawer/index.cjs.js"),L=require("../Modal/index.cjs.js"),O=require("../Spinner/index.cjs.js");function Q({as:f,variant:h,color:m,size:y,loading:w,stopPropagation:k=!1,preventDefault:C=!1,closeModal:v=!1,closeDrawer:q=!1,className:z,onClick:b,children:j,disabled:M,...R}){const t=F(e=>e.button),a=r.useContext(J.ButtonGroupContext),N=r.useContext(L.ModalContext),$=r.useContext(K.DrawerContext),c=r.useContext(I.AlertContext),D=H(),_=f||"button",u=h??a.variant??c.buttonVariant??"solid",i=m??a.color??c.color??"primary",o=y??a.size??"md",d=w??a.loading??!1,s=r.useMemo(()=>{var g,x,p;if(!i)return"border-transparent";const e={primary:{solid:"bg-primary text-white border-primary",outline:"bg-transparent text-primary border-primary",text:"bg-transparent text-primary border-transparent",soft:"bg-light-primary text-dark-primary border-light-primary"},secondary:{solid:"bg-secondary text-white border-secondary",outline:"bg-transparent text-secondary border-secondary",text:"bg-transparent text-secondary border-transparent",soft:"bg-light-secondary text-dark-secondary border-light-secondary"},success:{solid:"bg-success text-white border-success",outline:"bg-transparent text-success border-success",text:"bg-transparent text-success border-transparent",soft:"bg-light-success text-dark-success border-light-success"},info:{solid:"bg-info text-white border-info",outline:"bg-transparent text-info border-info",text:"bg-transparent text-info border-transparent",soft:"bg-light-info text-dark-info border-light-info"},warning:{solid:"bg-warning text-white border-warning",outline:"bg-transparent text-warning border-warning",text:"bg-transparent text-warning border-transparent",soft:"bg-light-warning text-dark-warning border-light-warning"},danger:{solid:"bg-danger text-white border-danger",outline:"bg-transparent text-danger border-danger",text:"bg-transparent text-danger border-transparent",soft:"bg-light-danger text-dark-danger border-light-danger"},dark:{solid:"bg-dark text-white border-dark",outline:"bg-transparent text-dark border-dark",text:"bg-transparent text-dark border-transparent",soft:"bg-dark text-white border-dark"},light:{solid:"bg-light text-dark border-light",outline:"bg-transparent text-dark border-light",text:"bg-transparent text-dark border-transparent",soft:"bg-light text-dark border-light"}},n=(x=(g=t==null?void 0:t.color)==null?void 0:g[i])==null?void 0:x[u],V=(p=e==null?void 0:e[i])==null?void 0:p[u];return E(V,n)},[i,u,t==null?void 0:t.color]),B=r.useMemo(()=>s==null?void 0:s.split(" ").find(e=>e.startsWith("text-")),[s]),G=r.useMemo(()=>{var n;if(!o)return null;const e={sm:"text-sm py-1 px-3.5",md:"text-base py-1.5 px-4",lg:"text-xl py-1.5 px-6",icon:"size-9 p-0 inline-flex items-center justify-center rounded-full [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5"};return[e==null?void 0:e[o],(n=t==null?void 0:t.size)==null?void 0:n[o]]},[o,t==null?void 0:t.size]),A=r.useMemo(()=>{var e,n;return d?["disabled:opacity-100 disabled:cursor-wait disabled:text-transparent",(e=t==null?void 0:t.loading)==null?void 0:e.active]:["disabled:opacity-75 disabled:cursor-not-allowed",(n=t==null?void 0:t.loading)==null?void 0:n.inactive]},[d,t==null?void 0:t.loading]),P=e=>{D(e),v&&N.onClose(),q&&$.onClose(),k&&e.stopPropagation(),C&&e.preventDefault(),b==null||b(e)};return l.jsxs(_,{role:"button",className:W.twMerge("relative inline-block no-underline whitespace-nowrap font-medium text-center rounded border border-border cursor-pointer transition-[box-shadow,opacity,color,background-color,border-color] [user-select:none]","focus-visible:outline-none after:content-[''] after:bg-current after:opacity-25 after:absolute after:-inset-y-px after:inset-x-2 after:rounded-full after:mx-auto after:pointer-events-none after:scale-0 focus-visible:after:scale-100 after:transition-transform after:[corner-shape:squircle]",t==null?void 0:t.base,s,G,A,a.buttonClasses,z),onClick:P,disabled:M||d,...R,children:[j,d&&l.jsx("span",{className:"absolute inset-0 size-full flex items-center justify-center bg-transparent p-2",children:l.jsx(O,{size:o==="icon"?"sm":o,color:null,className:B})}),l.jsx("span",{"data-name":"ripple-group",className:"absolute size-full inset-0 overflow-hidden rounded-[inherit] pointer-events-none"})]})}module.exports=Q;
|
|
@@ -70,13 +70,13 @@ function it({
|
|
|
70
70
|
solid: "bg-dark text-white border-dark",
|
|
71
71
|
outline: "bg-transparent text-dark border-dark",
|
|
72
72
|
text: "bg-transparent text-dark border-transparent",
|
|
73
|
-
soft: "bg-dark text-
|
|
73
|
+
soft: "bg-dark text-white border-dark"
|
|
74
74
|
},
|
|
75
75
|
light: {
|
|
76
76
|
solid: "bg-light text-dark border-light",
|
|
77
77
|
outline: "bg-transparent text-dark border-light",
|
|
78
78
|
text: "bg-transparent text-dark border-transparent",
|
|
79
|
-
soft: "bg-light
|
|
79
|
+
soft: "bg-light text-dark border-light"
|
|
80
80
|
}
|
|
81
81
|
}, e = (x = (u = t == null ? void 0 : t.color) == null ? void 0 : u[i]) == null ? void 0 : x[g], W = (f = r == null ? void 0 : r[i]) == null ? void 0 : f[g];
|
|
82
82
|
return H(W, e);
|