@vhyxui/react 0.1.0-alpha.1
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/dist/Alert-BJ1O0bnK.cjs +1 -0
- package/dist/Alert-am3ANPTH.js +99 -0
- package/dist/Badge-Fuc7l-1E.js +38 -0
- package/dist/Badge-RM7n86Rq.cjs +1 -0
- package/dist/Breadcrumb-Db7ASomJ.js +90 -0
- package/dist/Breadcrumb-StitgXXx.cjs +1 -0
- package/dist/Button-B32xz0b5.js +58 -0
- package/dist/Button-CfYG4zkG.cjs +1 -0
- package/dist/Card-D7ZNeWtE.js +75 -0
- package/dist/Card-d5xrWgQS.cjs +1 -0
- package/dist/Checkbox-DWl91ci_.js +92 -0
- package/dist/Checkbox-DvkT6QP9.cjs +1 -0
- package/dist/Dialog-CtYu14zl.js +245 -0
- package/dist/Dialog-gPT4noD8.cjs +1 -0
- package/dist/Drawer-BFJxsPG1.js +246 -0
- package/dist/Drawer-BygSIQQn.cjs +1 -0
- package/dist/Field-Bv07PL2M.js +120 -0
- package/dist/Field-D6FSsUGj.cjs +1 -0
- package/dist/Input-Dqt5q33I.js +151 -0
- package/dist/Input-OFmZxiHe.cjs +1 -0
- package/dist/Pagination-C1h7OTgM.js +128 -0
- package/dist/Pagination-CmmcBPNz.cjs +1 -0
- package/dist/Popover-BPFkS4xn.cjs +1 -0
- package/dist/Popover-MxUovsIt.js +194 -0
- package/dist/Progress-DWLr6Bq2.js +75 -0
- package/dist/Progress-FO-4WX0i.cjs +1 -0
- package/dist/RadioItem-BfkTHBxQ.cjs +1 -0
- package/dist/RadioItem-CzHSS_qK.js +141 -0
- package/dist/Select-C9yB2B8M.cjs +1 -0
- package/dist/Select-DjeJOdb7.js +327 -0
- package/dist/Separator-C5lPGzes.cjs +1 -0
- package/dist/Separator-DQT58t90.js +52 -0
- package/dist/Spinner-Cd5tcOLS.js +61 -0
- package/dist/Spinner-DSHhLV-r.cjs +1 -0
- package/dist/Switch-BU_Tcttb.cjs +1 -0
- package/dist/Switch-DOAZfSV0.js +64 -0
- package/dist/Tabs-BTfm4LbV.js +220 -0
- package/dist/Tabs-DuU02-UD.cjs +1 -0
- package/dist/Textarea-CLrctxHU.js +104 -0
- package/dist/Textarea-H6evM8L4.cjs +1 -0
- package/dist/Toast-0acAjZTB.js +167 -0
- package/dist/Toast-ndaxbpcV.cjs +1 -0
- package/dist/Tooltip-BAmErB_g.js +107 -0
- package/dist/Tooltip-CCd6VRvZ.cjs +1 -0
- package/dist/VhyxUIProvider-C9NxI-tU.cjs +1 -0
- package/dist/VhyxUIProvider-D1vNoiIk.js +34 -0
- package/dist/alert.cjs +1 -0
- package/dist/alert.d.ts +25 -0
- package/dist/alert.js +4 -0
- package/dist/badge.cjs +1 -0
- package/dist/badge.d.ts +31 -0
- package/dist/badge.js +4 -0
- package/dist/breadcrumb.cjs +1 -0
- package/dist/breadcrumb.d.ts +81 -0
- package/dist/breadcrumb.js +4 -0
- package/dist/button.cjs +1 -0
- package/dist/button.d.ts +36 -0
- package/dist/button.js +4 -0
- package/dist/card.cjs +1 -0
- package/dist/card.d.ts +72 -0
- package/dist/card.js +4 -0
- package/dist/checkbox.cjs +1 -0
- package/dist/checkbox.d.ts +33 -0
- package/dist/checkbox.js +4 -0
- package/dist/dialog.cjs +1 -0
- package/dist/dialog.d.ts +112 -0
- package/dist/dialog.js +4 -0
- package/dist/drawer.cjs +1 -0
- package/dist/drawer.d.ts +110 -0
- package/dist/drawer.js +4 -0
- package/dist/form.cjs +1 -0
- package/dist/form.d.ts +116 -0
- package/dist/form.js +6 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1184 -0
- package/dist/index.js +83 -0
- package/dist/input.cjs +1 -0
- package/dist/input.d.ts +31 -0
- package/dist/input.js +4 -0
- package/dist/jsx-runtime-BRMkMA8J.cjs +22 -0
- package/dist/jsx-runtime-CL69jGNW.js +279 -0
- package/dist/pagination.cjs +1 -0
- package/dist/pagination.d.ts +32 -0
- package/dist/pagination.js +4 -0
- package/dist/popover.cjs +1 -0
- package/dist/popover.d.ts +72 -0
- package/dist/popover.js +4 -0
- package/dist/progress.cjs +1 -0
- package/dist/progress.d.ts +35 -0
- package/dist/progress.js +4 -0
- package/dist/radio.cjs +1 -0
- package/dist/radio.d.ts +47 -0
- package/dist/radio.js +5 -0
- package/dist/select.cjs +1 -0
- package/dist/select.d.ts +97 -0
- package/dist/select.js +4 -0
- package/dist/separator.cjs +1 -0
- package/dist/separator.d.ts +21 -0
- package/dist/separator.js +4 -0
- package/dist/spinner.cjs +1 -0
- package/dist/spinner.d.ts +24 -0
- package/dist/spinner.js +4 -0
- package/dist/style.css +1 -0
- package/dist/switch.cjs +1 -0
- package/dist/switch.d.ts +28 -0
- package/dist/switch.js +4 -0
- package/dist/tabs.cjs +1 -0
- package/dist/tabs.d.ts +59 -0
- package/dist/tabs.js +4 -0
- package/dist/test-utils.cjs +1 -0
- package/dist/test-utils.d.ts +5 -0
- package/dist/test-utils.js +12 -0
- package/dist/textarea.cjs +1 -0
- package/dist/textarea.d.ts +34 -0
- package/dist/textarea.js +4 -0
- package/dist/toast.cjs +1 -0
- package/dist/toast.d.ts +28 -0
- package/dist/toast.js +5 -0
- package/dist/tooltip.cjs +1 -0
- package/dist/tooltip.d.ts +32 -0
- package/dist/tooltip.js +4 -0
- package/dist/useId-BGRmH6iF.js +8 -0
- package/dist/useId-D2AEOm2G.cjs +1 -0
- package/package.json +170 -0
- package/style.css +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BRMkMA8J.cjs"),i=require("react"),o=require("@vhyxui/core"),N=require("@vhyxseal/react"),C=require("./useId-D2AEOm2G.cjs"),b="_alert_tjvt2_1",s={alert:b,"alert-icon":"_alert-icon_tjvt2_51","alert-body":"_alert-body_tjvt2_60","alert-title":"_alert-title_tjvt2_68","alert-message":"_alert-message_tjvt2_73","alert-dismiss":"_alert-dismiss_tjvt2_80"},c=i.forwardRef(({variant:t="default",title:n,icon:d,dismissible:x=!1,onDismiss:a,contract:r,className:j,children:l,...m},_)=>{const p=C.useId("vhyx-alert"),[y,f]=i.useState(!1);if(y)return null;const h={...o.alertContract,...r,id:(r==null?void 0:r.id)??p},v=t==="danger"?"alert":"status",R=t==="danger"?"assertive":"polite",g=d??q(t);function E(){f(!0),a==null||a()}return e.jsxRuntimeExports.jsxs("div",{ref:_,role:v,"aria-live":R,className:[s.alert,j].filter(Boolean).join(" "),"data-variant":t,"data-vhyx-contract":JSON.stringify(h),...m,children:[e.jsxRuntimeExports.jsx("span",{className:s["alert-icon"],"aria-hidden":"true",children:g}),e.jsxRuntimeExports.jsxs("div",{className:s["alert-body"],children:[n&&e.jsxRuntimeExports.jsx("span",{className:s["alert-title"],children:n}),l&&e.jsxRuntimeExports.jsx("span",{className:s["alert-message"],children:l})]}),x&&e.jsxRuntimeExports.jsx("button",{type:"button",className:s["alert-dismiss"],onClick:E,"aria-label":"Dismiss",children:e.jsxRuntimeExports.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",children:[e.jsxRuntimeExports.jsx("line",{x1:"2",y1:"2",x2:"10",y2:"10"}),e.jsxRuntimeExports.jsx("line",{x1:"10",y1:"2",x2:"2",y2:"10"})]})})]})});c.displayName="VhyxAlert";const A={...o.alertContract,id:"vhyxui-alert"},u=N.withAgentContract(c,A);u.displayName="VhyxAlert";function q(t){switch(t){case"success":return"✓";case"danger":return"✕";case"warning":return"⚠";case"info":return"ℹ";default:return"●"}}exports.Alert=u;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-CL69jGNW.js";
|
|
2
|
+
import N, { useState as b } from "react";
|
|
3
|
+
import { alertContract as n } from "@vhyxui/core";
|
|
4
|
+
import { withAgentContract as A } from "@vhyxseal/react";
|
|
5
|
+
import { u as C } from "./useId-BGRmH6iF.js";
|
|
6
|
+
const w = "_alert_tjvt2_1", s = {
|
|
7
|
+
alert: w,
|
|
8
|
+
"alert-icon": "_alert-icon_tjvt2_51",
|
|
9
|
+
"alert-body": "_alert-body_tjvt2_60",
|
|
10
|
+
"alert-title": "_alert-title_tjvt2_68",
|
|
11
|
+
"alert-message": "_alert-message_tjvt2_73",
|
|
12
|
+
"alert-dismiss": "_alert-dismiss_tjvt2_80"
|
|
13
|
+
}, o = N.forwardRef(
|
|
14
|
+
({
|
|
15
|
+
variant: t = "default",
|
|
16
|
+
title: l,
|
|
17
|
+
icon: d,
|
|
18
|
+
dismissible: c = !1,
|
|
19
|
+
onDismiss: r,
|
|
20
|
+
contract: a,
|
|
21
|
+
className: u,
|
|
22
|
+
children: i,
|
|
23
|
+
...m
|
|
24
|
+
}, x) => {
|
|
25
|
+
const f = C("vhyx-alert"), [j, _] = b(!1);
|
|
26
|
+
if (j) return null;
|
|
27
|
+
const y = {
|
|
28
|
+
...n,
|
|
29
|
+
...a,
|
|
30
|
+
id: (a == null ? void 0 : a.id) ?? f
|
|
31
|
+
}, h = t === "danger" ? "alert" : "status", v = t === "danger" ? "assertive" : "polite", p = d ?? B(t);
|
|
32
|
+
function g() {
|
|
33
|
+
_(!0), r == null || r();
|
|
34
|
+
}
|
|
35
|
+
return /* @__PURE__ */ e.jsxs(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
ref: x,
|
|
39
|
+
role: h,
|
|
40
|
+
"aria-live": v,
|
|
41
|
+
className: [s.alert, u].filter(Boolean).join(" "),
|
|
42
|
+
"data-variant": t,
|
|
43
|
+
"data-vhyx-contract": JSON.stringify(y),
|
|
44
|
+
...m,
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ e.jsx("span", { className: s["alert-icon"], "aria-hidden": "true", children: p }),
|
|
47
|
+
/* @__PURE__ */ e.jsxs("div", { className: s["alert-body"], children: [
|
|
48
|
+
l && /* @__PURE__ */ e.jsx("span", { className: s["alert-title"], children: l }),
|
|
49
|
+
i && /* @__PURE__ */ e.jsx("span", { className: s["alert-message"], children: i })
|
|
50
|
+
] }),
|
|
51
|
+
c && /* @__PURE__ */ e.jsx(
|
|
52
|
+
"button",
|
|
53
|
+
{
|
|
54
|
+
type: "button",
|
|
55
|
+
className: s["alert-dismiss"],
|
|
56
|
+
onClick: g,
|
|
57
|
+
"aria-label": "Dismiss",
|
|
58
|
+
children: /* @__PURE__ */ e.jsxs(
|
|
59
|
+
"svg",
|
|
60
|
+
{
|
|
61
|
+
"aria-hidden": "true",
|
|
62
|
+
viewBox: "0 0 12 12",
|
|
63
|
+
fill: "none",
|
|
64
|
+
stroke: "currentColor",
|
|
65
|
+
strokeWidth: 1.5,
|
|
66
|
+
strokeLinecap: "round",
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ e.jsx("line", { x1: "2", y1: "2", x2: "10", y2: "10" }),
|
|
69
|
+
/* @__PURE__ */ e.jsx("line", { x1: "10", y1: "2", x2: "2", y2: "10" })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
o.displayName = "VhyxAlert";
|
|
81
|
+
const k = { ...n, id: "vhyxui-alert" }, I = A(o, k);
|
|
82
|
+
I.displayName = "VhyxAlert";
|
|
83
|
+
function B(t) {
|
|
84
|
+
switch (t) {
|
|
85
|
+
case "success":
|
|
86
|
+
return "✓";
|
|
87
|
+
case "danger":
|
|
88
|
+
return "✕";
|
|
89
|
+
case "warning":
|
|
90
|
+
return "⚠";
|
|
91
|
+
case "info":
|
|
92
|
+
return "ℹ";
|
|
93
|
+
default:
|
|
94
|
+
return "●";
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
I as A
|
|
99
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { j as m } from "./jsx-runtime-CL69jGNW.js";
|
|
2
|
+
import f from "react";
|
|
3
|
+
import { badgeContract as p } from "@vhyxui/core";
|
|
4
|
+
import { withAgentContract as b } from "@vhyxseal/react";
|
|
5
|
+
const u = "_badge_12qri_1", B = {
|
|
6
|
+
badge: u
|
|
7
|
+
}, r = f.forwardRef(
|
|
8
|
+
({
|
|
9
|
+
variant: o = "default",
|
|
10
|
+
size: d = "md",
|
|
11
|
+
dot: t = !1,
|
|
12
|
+
count: a,
|
|
13
|
+
max: e = 99,
|
|
14
|
+
className: s,
|
|
15
|
+
children: n,
|
|
16
|
+
...i
|
|
17
|
+
}, g) => {
|
|
18
|
+
const l = [B.badge, s].filter(Boolean).join(" "), c = () => t ? null : a !== void 0 ? a > e ? `${e}+` : String(a) : n;
|
|
19
|
+
return /* @__PURE__ */ m.jsx(
|
|
20
|
+
"span",
|
|
21
|
+
{
|
|
22
|
+
ref: g,
|
|
23
|
+
className: l,
|
|
24
|
+
"data-variant": o,
|
|
25
|
+
"data-size": d,
|
|
26
|
+
"data-dot": t ? !0 : void 0,
|
|
27
|
+
...i,
|
|
28
|
+
children: c()
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
r.displayName = "VhyxBadge";
|
|
34
|
+
const x = { ...p, id: "vhyxui-badge" }, y = b(r, x);
|
|
35
|
+
y.displayName = "VhyxBadge";
|
|
36
|
+
export {
|
|
37
|
+
y as B
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const b=require("./jsx-runtime-BRMkMA8J.cjs"),f=require("react"),B=require("@vhyxui/core"),x=require("@vhyxseal/react"),y="_badge_12qri_1",h={badge:y},r=f.forwardRef(({variant:n="default",size:d="md",dot:a=!1,count:e,max:t=99,className:i,children:o,...c},g)=>{const l=[h.badge,i].filter(Boolean).join(" "),u=()=>a?null:e!==void 0?e>t?`${t}+`:String(e):o;return b.jsxRuntimeExports.jsx("span",{ref:g,className:l,"data-variant":n,"data-size":d,"data-dot":a?!0:void 0,...c,children:u()})});r.displayName="VhyxBadge";const m={...B.badgeContract,id:"vhyxui-badge"},s=x.withAgentContract(r,m);s.displayName="VhyxBadge";exports.Badge=s;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { j as s } from "./jsx-runtime-CL69jGNW.js";
|
|
2
|
+
import j, { useMemo as c, createContext as N, useContext as g } from "react";
|
|
3
|
+
import { breadcrumbContract as l, Slot as C, VhyxUIError as I, VhyxUIErrorCode as v } from "@vhyxui/core";
|
|
4
|
+
import { withAgentContract as V } from "@vhyxseal/react";
|
|
5
|
+
import { u as k } from "./useId-BGRmH6iF.js";
|
|
6
|
+
const E = "_nav_u2x1y_1", w = "_list_u2x1y_6", S = "_item_u2x1y_16", P = "_separator_u2x1y_23", R = "_link_u2x1y_33", L = "_page_u2x1y_51", O = "_ellipsis_u2x1y_56", n = {
|
|
7
|
+
nav: E,
|
|
8
|
+
list: w,
|
|
9
|
+
item: S,
|
|
10
|
+
separator: P,
|
|
11
|
+
link: R,
|
|
12
|
+
page: L,
|
|
13
|
+
ellipsis: O
|
|
14
|
+
}, m = N(null);
|
|
15
|
+
function U(e) {
|
|
16
|
+
const a = g(m);
|
|
17
|
+
if (!a)
|
|
18
|
+
throw new I({
|
|
19
|
+
code: v.VHYXUI_MISSING_CONTEXT,
|
|
20
|
+
message: `${e} must be used within <Breadcrumb>`,
|
|
21
|
+
suggestion: "Wrap your component tree with <Breadcrumb>"
|
|
22
|
+
});
|
|
23
|
+
return a;
|
|
24
|
+
}
|
|
25
|
+
const u = j.forwardRef(
|
|
26
|
+
({
|
|
27
|
+
separator: e = "/",
|
|
28
|
+
maxItems: a,
|
|
29
|
+
contract: r,
|
|
30
|
+
className: t,
|
|
31
|
+
children: i,
|
|
32
|
+
...y
|
|
33
|
+
}, B) => {
|
|
34
|
+
const o = k("vhyx-breadcrumb"), _ = c(
|
|
35
|
+
() => ({ ...l, id: o, ...r }),
|
|
36
|
+
[o, r]
|
|
37
|
+
), f = c(
|
|
38
|
+
() => ({ separator: e }),
|
|
39
|
+
[e]
|
|
40
|
+
), h = [n.nav, t].filter(Boolean).join(" ");
|
|
41
|
+
return /* @__PURE__ */ s.jsx(m.Provider, { value: f, children: /* @__PURE__ */ s.jsx(
|
|
42
|
+
"nav",
|
|
43
|
+
{
|
|
44
|
+
ref: B,
|
|
45
|
+
"aria-label": "Breadcrumb",
|
|
46
|
+
className: h,
|
|
47
|
+
"data-vhyx-contract": JSON.stringify(_),
|
|
48
|
+
...y,
|
|
49
|
+
children: /* @__PURE__ */ s.jsx("ol", { className: n.list, children: i })
|
|
50
|
+
}
|
|
51
|
+
) });
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
u.displayName = "VhyxBreadcrumb";
|
|
55
|
+
function d({ children: e, className: a, ...r }) {
|
|
56
|
+
const t = U("Breadcrumb.Item"), i = [n.item, a].filter(Boolean).join(" ");
|
|
57
|
+
return /* @__PURE__ */ s.jsxs("li", { className: i, ...r, children: [
|
|
58
|
+
e,
|
|
59
|
+
/* @__PURE__ */ s.jsx("span", { className: n.separator, "aria-hidden": "true", children: t.separator })
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
d.displayName = "VhyxBreadcrumbItem";
|
|
63
|
+
function x({ children: e, className: a, asChild: r = !1, ...t }) {
|
|
64
|
+
const i = [n.link, a].filter(Boolean).join(" ");
|
|
65
|
+
return r ? /* @__PURE__ */ s.jsx(C, { className: i, ...t, children: e }) : /* @__PURE__ */ s.jsx("a", { className: i, ...t, children: e });
|
|
66
|
+
}
|
|
67
|
+
x.displayName = "VhyxBreadcrumbLink";
|
|
68
|
+
function p({ children: e, className: a, ...r }) {
|
|
69
|
+
const t = [n.page, a].filter(Boolean).join(" ");
|
|
70
|
+
return /* @__PURE__ */ s.jsx("span", { "aria-current": "page", className: t, ...r, children: e });
|
|
71
|
+
}
|
|
72
|
+
p.displayName = "VhyxBreadcrumbPage";
|
|
73
|
+
function b({ className: e, ...a }) {
|
|
74
|
+
const r = [n.ellipsis, e].filter(Boolean).join(" ");
|
|
75
|
+
return /* @__PURE__ */ s.jsx("span", { "aria-hidden": "true", className: r, ...a, children: "…" });
|
|
76
|
+
}
|
|
77
|
+
b.displayName = "VhyxBreadcrumbEllipsis";
|
|
78
|
+
const M = { ...l, id: "vhyxui-breadcrumb" }, T = Object.assign(
|
|
79
|
+
V(u, M),
|
|
80
|
+
{
|
|
81
|
+
Item: d,
|
|
82
|
+
Link: x,
|
|
83
|
+
Page: p,
|
|
84
|
+
Ellipsis: b
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
T.displayName = "VhyxBreadcrumb";
|
|
88
|
+
export {
|
|
89
|
+
T as B
|
|
90
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./jsx-runtime-BRMkMA8J.cjs"),c=require("react"),o=require("@vhyxui/core"),N=require("@vhyxseal/react"),C=require("./useId-D2AEOm2G.cjs"),g="_nav_u2x1y_1",E="_list_u2x1y_6",I="_item_u2x1y_16",R="_separator_u2x1y_23",v="_link_u2x1y_33",V="_page_u2x1y_51",k="_ellipsis_u2x1y_56",n={nav:g,list:E,item:I,separator:R,link:v,page:V,ellipsis:k},l=c.createContext(null);function w(e){const s=c.useContext(l);if(!s)throw new o.VhyxUIError({code:o.VhyxUIErrorCode.VHYXUI_MISSING_CONTEXT,message:`${e} must be used within <Breadcrumb>`,suggestion:"Wrap your component tree with <Breadcrumb>"});return s}const m=c.forwardRef(({separator:e="/",maxItems:s,contract:r,className:a,children:i,...j},B)=>{const u=C.useId("vhyx-breadcrumb"),_=c.useMemo(()=>({...o.breadcrumbContract,id:u,...r}),[u,r]),h=c.useMemo(()=>({separator:e}),[e]),f=[n.nav,a].filter(Boolean).join(" ");return t.jsxRuntimeExports.jsx(l.Provider,{value:h,children:t.jsxRuntimeExports.jsx("nav",{ref:B,"aria-label":"Breadcrumb",className:f,"data-vhyx-contract":JSON.stringify(_),...j,children:t.jsxRuntimeExports.jsx("ol",{className:n.list,children:i})})})});m.displayName="VhyxBreadcrumb";function x({children:e,className:s,...r}){const a=w("Breadcrumb.Item"),i=[n.item,s].filter(Boolean).join(" ");return t.jsxRuntimeExports.jsxs("li",{className:i,...r,children:[e,t.jsxRuntimeExports.jsx("span",{className:n.separator,"aria-hidden":"true",children:a.separator})]})}x.displayName="VhyxBreadcrumbItem";function d({children:e,className:s,asChild:r=!1,...a}){const i=[n.link,s].filter(Boolean).join(" ");return r?t.jsxRuntimeExports.jsx(o.Slot,{className:i,...a,children:e}):t.jsxRuntimeExports.jsx("a",{className:i,...a,children:e})}d.displayName="VhyxBreadcrumbLink";function p({children:e,className:s,...r}){const a=[n.page,s].filter(Boolean).join(" ");return t.jsxRuntimeExports.jsx("span",{"aria-current":"page",className:a,...r,children:e})}p.displayName="VhyxBreadcrumbPage";function b({className:e,...s}){const r=[n.ellipsis,e].filter(Boolean).join(" ");return t.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:r,...s,children:"…"})}b.displayName="VhyxBreadcrumbEllipsis";const q={...o.breadcrumbContract,id:"vhyxui-breadcrumb"},y=Object.assign(N.withAgentContract(m,q),{Item:x,Link:d,Page:p,Ellipsis:b});y.displayName="VhyxBreadcrumb";exports.Breadcrumb=y;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-CL69jGNW.js";
|
|
2
|
+
import C, { useMemo as S } from "react";
|
|
3
|
+
import { buttonContract as p, Slot as g } from "@vhyxui/core";
|
|
4
|
+
import { withAgentContract as I } from "@vhyxseal/react";
|
|
5
|
+
import { S as V } from "./Spinner-Cd5tcOLS.js";
|
|
6
|
+
import { u as E } from "./useId-BGRmH6iF.js";
|
|
7
|
+
const R = "_button_1wjdv_1", U = "_content_1wjdv_57", q = "_spinner_1wjdv_190", z = "_icon_1wjdv_198", a = {
|
|
8
|
+
button: R,
|
|
9
|
+
content: U,
|
|
10
|
+
spinner: q,
|
|
11
|
+
icon: z
|
|
12
|
+
}, f = C.forwardRef(
|
|
13
|
+
({
|
|
14
|
+
variant: r = "primary",
|
|
15
|
+
size: b = "md",
|
|
16
|
+
loading: n = !1,
|
|
17
|
+
icon: e,
|
|
18
|
+
iconPosition: i = "left",
|
|
19
|
+
iconOnly: s = !1,
|
|
20
|
+
asChild: h = !1,
|
|
21
|
+
contract: d,
|
|
22
|
+
className: v,
|
|
23
|
+
children: u,
|
|
24
|
+
disabled: x,
|
|
25
|
+
id: j,
|
|
26
|
+
"aria-label": c,
|
|
27
|
+
..._
|
|
28
|
+
}, l) => {
|
|
29
|
+
const y = E("vhyx-button"), o = j ?? y;
|
|
30
|
+
process.env.NODE_ENV !== "production" && s && !c && console.warn(
|
|
31
|
+
"[VhyxUI] <Button iconOnly> requires an aria-label for accessibility. Screen reader users will not be able to identify this button."
|
|
32
|
+
);
|
|
33
|
+
const N = S(() => ({ ...p, id: o, ...r === "destructive" ? { safetyLevel: "high", destructive: !0, requiresConfirmation: !0 } : {}, ...d }), [r, o, d]), w = x ?? n, B = [a.button, v].filter(Boolean).join(" "), m = {
|
|
34
|
+
id: o,
|
|
35
|
+
className: B,
|
|
36
|
+
"aria-busy": n ? !0 : void 0,
|
|
37
|
+
"aria-label": c,
|
|
38
|
+
"data-variant": r,
|
|
39
|
+
"data-size": b,
|
|
40
|
+
"data-loading": n ? !0 : void 0,
|
|
41
|
+
"data-icon-only": s ? !0 : void 0,
|
|
42
|
+
"data-vhyx-contract": JSON.stringify(N),
|
|
43
|
+
..._
|
|
44
|
+
};
|
|
45
|
+
return h ? /* @__PURE__ */ t.jsx(g, { ref: l, ...m, children: u }) : /* @__PURE__ */ t.jsxs("button", { ref: l, disabled: w, ...m, children: [
|
|
46
|
+
n && /* @__PURE__ */ t.jsx(V, { size: "sm", variant: "white", "aria-hidden": "true", label: "", className: a.spinner }),
|
|
47
|
+
e && i === "left" && !s && /* @__PURE__ */ t.jsx("span", { className: a.icon, "aria-hidden": "true", children: e }),
|
|
48
|
+
s && e ? /* @__PURE__ */ t.jsx("span", { className: a.icon, "aria-hidden": "true", children: e }) : !s && /* @__PURE__ */ t.jsx("span", { className: a.content, children: u }),
|
|
49
|
+
e && i === "right" && !s && /* @__PURE__ */ t.jsx("span", { className: a.icon, "aria-hidden": "true", children: e })
|
|
50
|
+
] });
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
f.displayName = "VhyxButton";
|
|
54
|
+
const D = { ...p, id: "vhyxui-button" }, A = I(f, D);
|
|
55
|
+
A.displayName = "VhyxButton";
|
|
56
|
+
export {
|
|
57
|
+
A as B
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./jsx-runtime-BRMkMA8J.cjs"),b=require("react"),i=require("@vhyxui/core"),C=require("@vhyxseal/react"),S=require("./Spinner-DSHhLV-r.cjs"),I=require("./useId-D2AEOm2G.cjs"),V="_button_1wjdv_1",g="_content_1wjdv_57",z="_spinner_1wjdv_190",D="_icon_1wjdv_198",n={button:V,content:g,spinner:z,icon:D},m=b.forwardRef(({variant:a="primary",size:j="md",loading:r=!1,icon:e,iconPosition:u="left",iconOnly:s=!1,asChild:f=!1,contract:c,className:v,children:d,disabled:_,id:y,"aria-label":l,...N},x)=>{const R=I.useId("vhyx-button"),o=y??R;process.env.NODE_ENV!=="production"&&s&&!l&&console.warn("[VhyxUI] <Button iconOnly> requires an aria-label for accessibility. Screen reader users will not be able to identify this button.");const w=b.useMemo(()=>{const B=a==="destructive"?{safetyLevel:"high",destructive:!0,requiresConfirmation:!0}:{};return{...i.buttonContract,id:o,...B,...c}},[a,o,c]),E=_??r,q=[n.button,v].filter(Boolean).join(" "),p={id:o,className:q,"aria-busy":r?!0:void 0,"aria-label":l,"data-variant":a,"data-size":j,"data-loading":r?!0:void 0,"data-icon-only":s?!0:void 0,"data-vhyx-contract":JSON.stringify(w),...N};return f?t.jsxRuntimeExports.jsx(i.Slot,{ref:x,...p,children:d}):t.jsxRuntimeExports.jsxs("button",{ref:x,disabled:E,...p,children:[r&&t.jsxRuntimeExports.jsx(S.Spinner,{size:"sm",variant:"white","aria-hidden":"true",label:"",className:n.spinner}),e&&u==="left"&&!s&&t.jsxRuntimeExports.jsx("span",{className:n.icon,"aria-hidden":"true",children:e}),s&&e?t.jsxRuntimeExports.jsx("span",{className:n.icon,"aria-hidden":"true",children:e}):!s&&t.jsxRuntimeExports.jsx("span",{className:n.content,children:d}),e&&u==="right"&&!s&&t.jsxRuntimeExports.jsx("span",{className:n.icon,"aria-hidden":"true",children:e})]})});m.displayName="VhyxButton";const U={...i.buttonContract,id:"vhyxui-button"},h=C.withAgentContract(m,U);h.displayName="VhyxButton";exports.Button=h;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-CL69jGNW.js";
|
|
2
|
+
import _ from "react";
|
|
3
|
+
import { cardContract as s } from "@vhyxui/core";
|
|
4
|
+
import { withAgentContract as p } from "@vhyxseal/react";
|
|
5
|
+
import { u as j } from "./useId-BGRmH6iF.js";
|
|
6
|
+
const g = "_card_wvqde_1", N = "_header_wvqde_35", B = "_body_wvqde_36", w = "_footer_wvqde_37", b = "_image_wvqde_102", d = {
|
|
7
|
+
card: g,
|
|
8
|
+
header: N,
|
|
9
|
+
body: B,
|
|
10
|
+
footer: w,
|
|
11
|
+
image: b
|
|
12
|
+
}, n = _.forwardRef(
|
|
13
|
+
({
|
|
14
|
+
variant: a = "default",
|
|
15
|
+
padding: e = "md",
|
|
16
|
+
interactive: o = !1,
|
|
17
|
+
contract: r,
|
|
18
|
+
className: f,
|
|
19
|
+
children: y,
|
|
20
|
+
...C
|
|
21
|
+
}, v) => {
|
|
22
|
+
const x = j("vhyx-card"), h = {
|
|
23
|
+
...s,
|
|
24
|
+
id: x,
|
|
25
|
+
...r
|
|
26
|
+
}, u = [d.card, f].filter(Boolean).join(" ");
|
|
27
|
+
return /* @__PURE__ */ t.jsx(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
ref: v,
|
|
31
|
+
className: u,
|
|
32
|
+
"data-variant": a,
|
|
33
|
+
"data-padding": e,
|
|
34
|
+
"data-interactive": o ? !0 : void 0,
|
|
35
|
+
"data-vhyx-contract": JSON.stringify(h),
|
|
36
|
+
...C,
|
|
37
|
+
children: y
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
n.displayName = "VhyxCard";
|
|
43
|
+
function i({ children: a, className: e, ...o }) {
|
|
44
|
+
const r = [d.header, e].filter(Boolean).join(" ");
|
|
45
|
+
return /* @__PURE__ */ t.jsx("div", { className: r, ...o, children: a });
|
|
46
|
+
}
|
|
47
|
+
i.displayName = "VhyxCardHeader";
|
|
48
|
+
function c({ children: a, className: e, ...o }) {
|
|
49
|
+
const r = [d.body, e].filter(Boolean).join(" ");
|
|
50
|
+
return /* @__PURE__ */ t.jsx("div", { className: r, ...o, children: a });
|
|
51
|
+
}
|
|
52
|
+
c.displayName = "VhyxCardBody";
|
|
53
|
+
function m({ children: a, className: e, ...o }) {
|
|
54
|
+
const r = [d.footer, e].filter(Boolean).join(" ");
|
|
55
|
+
return /* @__PURE__ */ t.jsx("div", { className: r, ...o, children: a });
|
|
56
|
+
}
|
|
57
|
+
m.displayName = "VhyxCardFooter";
|
|
58
|
+
function l({ children: a, className: e, ...o }) {
|
|
59
|
+
const r = [d.image, e].filter(Boolean).join(" ");
|
|
60
|
+
return /* @__PURE__ */ t.jsx("div", { className: r, ...o, children: a });
|
|
61
|
+
}
|
|
62
|
+
l.displayName = "VhyxCardImage";
|
|
63
|
+
const V = { ...s, id: "vhyxui-card" }, q = Object.assign(
|
|
64
|
+
p(n, V),
|
|
65
|
+
{
|
|
66
|
+
Header: i,
|
|
67
|
+
Body: c,
|
|
68
|
+
Footer: m,
|
|
69
|
+
Image: l
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
q.displayName = "VhyxCard";
|
|
73
|
+
export {
|
|
74
|
+
q as C
|
|
75
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("./jsx-runtime-BRMkMA8J.cjs"),_=require("react"),d=require("@vhyxui/core"),g=require("@vhyxseal/react"),p=require("./useId-D2AEOm2G.cjs"),N="_card_wvqde_1",q="_header_wvqde_35",R="_body_wvqde_36",B="_footer_wvqde_37",w="_image_wvqde_102",s={card:N,header:q,body:R,footer:B,image:w},n=_.forwardRef(({variant:e="default",padding:a="md",interactive:t=!1,contract:r,className:x,children:y,...C},f)=>{const j=p.useId("vhyx-card"),v={...d.cardContract,id:j,...r},h=[s.card,x].filter(Boolean).join(" ");return o.jsxRuntimeExports.jsx("div",{ref:f,className:h,"data-variant":e,"data-padding":a,"data-interactive":t?!0:void 0,"data-vhyx-contract":JSON.stringify(v),...C,children:y})});n.displayName="VhyxCard";function c({children:e,className:a,...t}){const r=[s.header,a].filter(Boolean).join(" ");return o.jsxRuntimeExports.jsx("div",{className:r,...t,children:e})}c.displayName="VhyxCardHeader";function i({children:e,className:a,...t}){const r=[s.body,a].filter(Boolean).join(" ");return o.jsxRuntimeExports.jsx("div",{className:r,...t,children:e})}i.displayName="VhyxCardBody";function l({children:e,className:a,...t}){const r=[s.footer,a].filter(Boolean).join(" ");return o.jsxRuntimeExports.jsx("div",{className:r,...t,children:e})}l.displayName="VhyxCardFooter";function m({children:e,className:a,...t}){const r=[s.image,a].filter(Boolean).join(" ");return o.jsxRuntimeExports.jsx("div",{className:r,...t,children:e})}m.displayName="VhyxCardImage";const b={...d.cardContract,id:"vhyxui-card"},u=Object.assign(g.withAgentContract(n,b),{Header:c,Body:i,Footer:l,Image:m});u.displayName="VhyxCard";exports.Card=u;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-CL69jGNW.js";
|
|
2
|
+
import M, { useState as V, useCallback as W } from "react";
|
|
3
|
+
import { checkboxContract as l, Slot as z } from "@vhyxui/core";
|
|
4
|
+
import { withAgentContract as A } from "@vhyxseal/react";
|
|
5
|
+
import { u as E } from "./useId-BGRmH6iF.js";
|
|
6
|
+
const J = "_checkbox_1jvht_1", O = "_indicator_1jvht_71", r = {
|
|
7
|
+
checkbox: J,
|
|
8
|
+
indicator: O,
|
|
9
|
+
"check-icon": "_check-icon_1jvht_80"
|
|
10
|
+
};
|
|
11
|
+
function P() {
|
|
12
|
+
return /* @__PURE__ */ e.jsx(
|
|
13
|
+
"svg",
|
|
14
|
+
{
|
|
15
|
+
"aria-hidden": "true",
|
|
16
|
+
viewBox: "0 0 12 12",
|
|
17
|
+
fill: "none",
|
|
18
|
+
stroke: "currentColor",
|
|
19
|
+
strokeWidth: 2,
|
|
20
|
+
strokeLinecap: "round",
|
|
21
|
+
strokeLinejoin: "round",
|
|
22
|
+
className: r["check-icon"],
|
|
23
|
+
children: /* @__PURE__ */ e.jsx("polyline", { points: "2,6 5,9 10,3" })
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
function q() {
|
|
28
|
+
return /* @__PURE__ */ e.jsx(
|
|
29
|
+
"svg",
|
|
30
|
+
{
|
|
31
|
+
"aria-hidden": "true",
|
|
32
|
+
viewBox: "0 0 12 12",
|
|
33
|
+
fill: "none",
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
strokeWidth: 2,
|
|
36
|
+
strokeLinecap: "round",
|
|
37
|
+
className: r["check-icon"],
|
|
38
|
+
children: /* @__PURE__ */ e.jsx("line", { x1: "2", y1: "6", x2: "10", y2: "6" })
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
const k = M.forwardRef(
|
|
43
|
+
({
|
|
44
|
+
checked: a,
|
|
45
|
+
defaultChecked: u = !1,
|
|
46
|
+
onCheckedChange: o,
|
|
47
|
+
indeterminate: m = !1,
|
|
48
|
+
size: f = "md",
|
|
49
|
+
asChild: b = !1,
|
|
50
|
+
contract: j,
|
|
51
|
+
className: p,
|
|
52
|
+
id: y,
|
|
53
|
+
disabled: i,
|
|
54
|
+
onClick: c,
|
|
55
|
+
children: v,
|
|
56
|
+
..._
|
|
57
|
+
}, d) => {
|
|
58
|
+
const N = E("vhyx-checkbox"), x = y ?? N, s = a !== void 0, [C, S] = V(u), t = m ? "indeterminate" : s ? a : C, I = t === "indeterminate" ? "mixed" : t, w = W(
|
|
59
|
+
(R) => {
|
|
60
|
+
if (c == null || c(R), i) return;
|
|
61
|
+
let n;
|
|
62
|
+
t === "indeterminate" ? n = !0 : n = !t, s || S(n), o == null || o(n);
|
|
63
|
+
},
|
|
64
|
+
[c, i, t, s, o]
|
|
65
|
+
), B = {
|
|
66
|
+
...l,
|
|
67
|
+
id: x,
|
|
68
|
+
...j
|
|
69
|
+
}, L = [r.checkbox, p].filter(Boolean).join(" "), h = {
|
|
70
|
+
id: x,
|
|
71
|
+
role: "checkbox",
|
|
72
|
+
"aria-checked": I,
|
|
73
|
+
disabled: i,
|
|
74
|
+
onClick: w,
|
|
75
|
+
className: L,
|
|
76
|
+
"data-state": t === "indeterminate" ? "indeterminate" : t ? "checked" : "unchecked",
|
|
77
|
+
"data-size": f,
|
|
78
|
+
"data-vhyx-contract": JSON.stringify(B),
|
|
79
|
+
..._
|
|
80
|
+
};
|
|
81
|
+
return b ? /* @__PURE__ */ e.jsx(z, { ref: d, ...h, children: v }) : /* @__PURE__ */ e.jsx("button", { ref: d, type: "button", ...h, children: /* @__PURE__ */ e.jsxs("span", { className: r.indicator, children: [
|
|
82
|
+
t === "indeterminate" && /* @__PURE__ */ e.jsx(q, {}),
|
|
83
|
+
t === !0 && /* @__PURE__ */ e.jsx(P, {})
|
|
84
|
+
] }) });
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
k.displayName = "VhyxCheckbox";
|
|
88
|
+
const D = { ...l, id: "vhyxui-checkbox" }, F = A(k, D);
|
|
89
|
+
F.displayName = "VhyxCheckbox";
|
|
90
|
+
export {
|
|
91
|
+
F as C
|
|
92
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./jsx-runtime-BRMkMA8J.cjs"),a=require("react"),x=require("@vhyxui/core"),M=require("@vhyxseal/react"),V=require("./useId-D2AEOm2G.cjs"),W="_checkbox_1jvht_1",z="_indicator_1jvht_71",r={checkbox:W,indicator:z,"check-icon":"_check-icon_1jvht_80"};function A(){return t.jsxRuntimeExports.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:r["check-icon"],children:t.jsxRuntimeExports.jsx("polyline",{points:"2,6 5,9 10,3"})})}function J(){return t.jsxRuntimeExports.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",className:r["check-icon"],children:t.jsxRuntimeExports.jsx("line",{x1:"2",y1:"6",x2:"10",y2:"6"})})}const k=a.forwardRef(({checked:d,defaultChecked:j=!1,onCheckedChange:n,indeterminate:b=!1,size:p="md",asChild:f=!1,contract:y,className:v,id:R,disabled:o,onClick:c,children:E,..._},u)=>{const C=V.useId("vhyx-checkbox"),h=R??C,i=d!==void 0,[N,I]=a.useState(j),e=b?"indeterminate":i?d:N,S=e==="indeterminate"?"mixed":e,q=a.useCallback(L=>{if(c==null||c(L),o)return;let s;e==="indeterminate"?s=!0:s=!e,i||I(s),n==null||n(s)},[c,o,e,i,n]),w={...x.checkboxContract,id:h,...y},B=[r.checkbox,v].filter(Boolean).join(" "),l={id:h,role:"checkbox","aria-checked":S,disabled:o,onClick:q,className:B,"data-state":e==="indeterminate"?"indeterminate":e?"checked":"unchecked","data-size":p,"data-vhyx-contract":JSON.stringify(w),..._};return f?t.jsxRuntimeExports.jsx(x.Slot,{ref:u,...l,children:E}):t.jsxRuntimeExports.jsx("button",{ref:u,type:"button",...l,children:t.jsxRuntimeExports.jsxs("span",{className:r.indicator,children:[e==="indeterminate"&&t.jsxRuntimeExports.jsx(J,{}),e===!0&&t.jsxRuntimeExports.jsx(A,{})]})})});k.displayName="VhyxCheckbox";const O={...x.checkboxContract,id:"vhyxui-checkbox"},m=M.withAgentContract(k,O);m.displayName="VhyxCheckbox";exports.Checkbox=m;
|