reaxify 0.0.39 → 0.0.41
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
|
|
1
|
+
"use client";"use strict";const m=require("../../node_modules/react/jsx-runtime.cjs.js"),o=require("../../helpers/cn.cjs.js"),f=require("react"),q=require("../../hooks/useClasses.cjs.js");require("../Form/index.cjs.js");const h=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function j({as:a,variant:e="horizontal",wrap:u=!1,className:s,children:c,...l}){const t=q(r=>r.stack),x=a||"div",v=f.useMemo(()=>{var n,i;return{horizontal:o("flex-row *:min-w-0",(n=t==null?void 0:t.variants)==null?void 0:n.horizontal),vertical:o("flex-col *:min-h-0",(i=t==null?void 0:t.variants)==null?void 0:i.vertical)}[e]},[e,t==null?void 0:t.variants]);return m.jsxRuntimeExports.jsx(x,{className:h.twMerge("flex",t==null?void 0:t.base,v,u&&"flex-wrap",s),...l,children:c})}module.exports=j;
|
|
@@ -4,14 +4,14 @@ import a from "../../helpers/cn.es.js";
|
|
|
4
4
|
import { useMemo as s } from "react";
|
|
5
5
|
import c from "../../hooks/useClasses.es.js";
|
|
6
6
|
import "../Form/index.es.js";
|
|
7
|
-
import { twMerge as
|
|
7
|
+
import { twMerge as h } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
8
8
|
function M({
|
|
9
9
|
as: e,
|
|
10
10
|
variant: r = "horizontal",
|
|
11
11
|
wrap: m = !1,
|
|
12
12
|
className: f,
|
|
13
|
-
children:
|
|
14
|
-
...
|
|
13
|
+
children: p,
|
|
14
|
+
...l
|
|
15
15
|
}) {
|
|
16
16
|
const t = c((o) => o.stack), u = e || "div", v = s(() => {
|
|
17
17
|
var n, i;
|
|
@@ -23,15 +23,15 @@ function M({
|
|
|
23
23
|
return /* @__PURE__ */ x.jsx(
|
|
24
24
|
u,
|
|
25
25
|
{
|
|
26
|
-
className:
|
|
27
|
-
"
|
|
26
|
+
className: h(
|
|
27
|
+
"flex",
|
|
28
28
|
t == null ? void 0 : t.base,
|
|
29
29
|
v,
|
|
30
30
|
m && "flex-wrap",
|
|
31
31
|
f
|
|
32
32
|
),
|
|
33
|
-
...
|
|
34
|
-
children:
|
|
33
|
+
...l,
|
|
34
|
+
children: p
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const m=require("../../node_modules/react/jsx-runtime.cjs.js"),
|
|
1
|
+
"use client";"use strict";const m=require("../../node_modules/react/jsx-runtime.cjs.js"),d=require("react"),x=require("../../hooks/useClasses.cjs.js");require("../Form/index.cjs.js");const u=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function g({as:o,variant:t="body-1",className:r,...s}){const e=x(n=>n.typography),a=d.useMemo(()=>o||{"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6","body-1":"p","body-2":"p","body-3":"p"}[t]||"p",[o,t]),h=d.useMemo(()=>{var i;return[{"heading-1":"text-5xl font-semibold","heading-2":"text-4xl font-semibold","heading-3":"text-3xl font-semibold","heading-4":"text-2xl font-semibold","heading-5":"text-xl font-medium","heading-6":"text-lg font-medium","body-1":"text-base font-normal","body-2":"text-sm font-normal","body-3":"text-xs font-normal"}[t],(i=e==null?void 0:e.variant)==null?void 0:i[t]]},[t,e==null?void 0:e.variant]);return m.jsxRuntimeExports.jsx(a,{className:u.twMerge(e==null?void 0:e.base,h,r),...s})}module.exports=g;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as
|
|
2
|
+
import { j as x } from "../../node_modules/react/jsx-runtime.es.js";
|
|
3
3
|
import { useMemo as m } from "react";
|
|
4
|
-
import
|
|
4
|
+
import p from "../../hooks/useClasses.es.js";
|
|
5
5
|
import "../Form/index.es.js";
|
|
6
|
-
import { twMerge as
|
|
6
|
+
import { twMerge as s } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
7
7
|
function y({
|
|
8
8
|
as: n,
|
|
9
9
|
variant: o = "body-1",
|
|
10
10
|
className: d,
|
|
11
11
|
...r
|
|
12
12
|
}) {
|
|
13
|
-
const t =
|
|
13
|
+
const t = p((e) => e.typography), a = m(() => n || {
|
|
14
14
|
"heading-1": "h1",
|
|
15
15
|
"heading-2": "h2",
|
|
16
16
|
"heading-3": "h3",
|
|
@@ -18,7 +18,8 @@ function y({
|
|
|
18
18
|
"heading-5": "h5",
|
|
19
19
|
"heading-6": "h6",
|
|
20
20
|
"body-1": "p",
|
|
21
|
-
"body-2": "p"
|
|
21
|
+
"body-2": "p",
|
|
22
|
+
"body-3": "p"
|
|
22
23
|
}[o] || "p", [n, o]), h = m(() => {
|
|
23
24
|
var i;
|
|
24
25
|
return [{
|
|
@@ -29,13 +30,14 @@ function y({
|
|
|
29
30
|
"heading-5": "text-xl font-medium",
|
|
30
31
|
"heading-6": "text-lg font-medium",
|
|
31
32
|
"body-1": "text-base font-normal",
|
|
32
|
-
"body-2": "text-sm font-normal"
|
|
33
|
+
"body-2": "text-sm font-normal",
|
|
34
|
+
"body-3": "text-xs font-normal"
|
|
33
35
|
}[o], (i = t == null ? void 0 : t.variant) == null ? void 0 : i[o]];
|
|
34
36
|
}, [o, t == null ? void 0 : t.variant]);
|
|
35
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ x.jsx(
|
|
36
38
|
a,
|
|
37
39
|
{
|
|
38
|
-
className:
|
|
40
|
+
className: s(t == null ? void 0 : t.base, h, d),
|
|
39
41
|
...r
|
|
40
42
|
}
|
|
41
43
|
);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface ExtendSize {
|
|
|
15
15
|
}
|
|
16
16
|
type BaseBadgeVariant = "solid" | "outline" | "soft";
|
|
17
17
|
type BaseButtonVariant = "solid" | "outline" | "text";
|
|
18
|
-
type BaseTypographyVariant = "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | "heading-6" | "body-1" | "body-2";
|
|
18
|
+
type BaseTypographyVariant = "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | "heading-6" | "body-1" | "body-2" | "body-3";
|
|
19
19
|
type BaseColor = "primary" | "secondary" | "success" | "info" | "warning" | "danger" | "dark" | "light";
|
|
20
20
|
type BaseSize = "sm" | "md" | "lg";
|
|
21
21
|
export type BadgeVariant = BaseBadgeVariant | keyof ExtendBadgeVariant;
|