@vhyxui/react 0.3.1-alpha → 0.4.0-alpha

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.
Files changed (237) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +65 -0
  3. package/dist/Accordion-qtPur3CA.js +81 -0
  4. package/dist/Accordion-z3QDvyGf.cjs +1 -0
  5. package/dist/Alert-D4EFVKUy.js +99 -0
  6. package/dist/Alert-DWB9Gtpv.cjs +1 -0
  7. package/dist/Avatar-CDoAvY0m.js +51 -0
  8. package/dist/Avatar-afXJdutp.cjs +1 -0
  9. package/dist/Badge-DOhfKlXt.cjs +1 -0
  10. package/dist/Badge-Z6crWSLX.js +38 -0
  11. package/dist/Breadcrumb-CbPmH-b4.js +90 -0
  12. package/dist/Breadcrumb-DWRxQvbb.cjs +1 -0
  13. package/dist/Button-CnNtk6HV.cjs +1 -0
  14. package/dist/Button-DN5vy24q.js +60 -0
  15. package/dist/Card-CI7DyOJg.js +79 -0
  16. package/dist/Card-CZUQhd45.cjs +1 -0
  17. package/dist/Center-BmKeGEa1.cjs +1 -0
  18. package/dist/Center-DFq5m7mf.js +22 -0
  19. package/dist/Checkbox-D-5qaOEj.js +92 -0
  20. package/dist/Checkbox-DOd4SIx2.cjs +1 -0
  21. package/dist/Container-CcsVyA6r.cjs +1 -0
  22. package/dist/Container-DPKIgeDZ.js +21 -0
  23. package/dist/Dialog-B7Mhq9Qc.cjs +1 -0
  24. package/dist/Dialog-DhIanyWH.js +258 -0
  25. package/dist/Drawer-8maigAH9.cjs +1 -0
  26. package/dist/Drawer-BKizItfr.js +259 -0
  27. package/dist/Field-DJvjEmzE.cjs +1 -0
  28. package/dist/Field-Dx9gXxGL.js +120 -0
  29. package/dist/Grid-Bzzb0usH.cjs +1 -0
  30. package/dist/Grid-x_OHCzGV.js +25 -0
  31. package/dist/Heading-BPqfnM8i.js +14 -0
  32. package/dist/Heading-icKRWRno.cjs +1 -0
  33. package/dist/Input-B0dEXpG8.js +151 -0
  34. package/dist/Input-CdS0oZyf.cjs +1 -0
  35. package/dist/Kbd-C2vxklhy.cjs +1 -0
  36. package/dist/Kbd-DGURpjWN.js +22 -0
  37. package/dist/Pagination-CiE9Jzm0.cjs +1 -0
  38. package/dist/Pagination-UQ53MWnR.js +128 -0
  39. package/dist/{Popover-j9pNswBn.js → Popover-0QvSlzcQ.js} +53 -53
  40. package/dist/Popover-Chf2ikqa.cjs +1 -0
  41. package/dist/Progress-DdWZRQVS.js +75 -0
  42. package/dist/Progress-lItZES-D.cjs +1 -0
  43. package/dist/RadioItem-BbIH7LoA.js +141 -0
  44. package/dist/RadioItem-Cfxch4Gj.cjs +1 -0
  45. package/dist/Select-CgjfJSB8.js +350 -0
  46. package/dist/Select-D_oVKzzK.cjs +1 -0
  47. package/dist/SelectField-DBGtOECg.js +49 -0
  48. package/dist/SelectField-DdkU9fXq.cjs +1 -0
  49. package/dist/Separator-BwR51KpL.js +52 -0
  50. package/dist/Separator-CTncQd7E.cjs +1 -0
  51. package/dist/Skeleton-C1LTpmVC.js +20 -0
  52. package/dist/Skeleton-CpzYhkFp.cjs +1 -0
  53. package/dist/Spinner-BJnT9SOB.cjs +1 -0
  54. package/dist/{Spinner-BYi9eTfl.js → Spinner-Dz68qwGs.js} +25 -25
  55. package/dist/Stack--mNjuxZe.cjs +1 -0
  56. package/dist/Stack-CfwjUv0j.js +49 -0
  57. package/dist/Switch-I712svE0.cjs +1 -0
  58. package/dist/{Switch-DOAZfSV0.js → Switch-bIbcXIMH.js} +22 -22
  59. package/dist/Table-C2TUkSZv.cjs +1 -0
  60. package/dist/Table-C_jZjmPK.js +67 -0
  61. package/dist/Tabs-CbmdCTVE.js +220 -0
  62. package/dist/Tabs-Dfuu2ZVq.cjs +1 -0
  63. package/dist/Text-CgsfCbWf.cjs +1 -0
  64. package/dist/Text-Dl4z0gus.js +26 -0
  65. package/dist/Text.module-CEBydIO4.js +7 -0
  66. package/dist/Text.module-gGopk2Yk.cjs +1 -0
  67. package/dist/TextField-B492c5Ct.js +31 -0
  68. package/dist/TextField-Bp-b0-hG.cjs +1 -0
  69. package/dist/{Textarea-CLrctxHU.js → Textarea-cloHZ5Sz.js} +41 -41
  70. package/dist/Textarea-uXK6PrFb.cjs +1 -0
  71. package/dist/TextareaField-C5naVyA1.cjs +1 -0
  72. package/dist/TextareaField-CrRndsuY.js +31 -0
  73. package/dist/Toast-CESL8AKT.cjs +1 -0
  74. package/dist/Toast-DYqE0PjM.js +167 -0
  75. package/dist/Tooltip-B-PpSm6T.cjs +1 -0
  76. package/dist/{Tooltip-BAmErB_g.js → Tooltip-DCCaNX5W.js} +34 -34
  77. package/dist/VhyxUIProvider-3f3b9ukY.cjs +1 -0
  78. package/dist/VhyxUIProvider-B2UHeumk.js +58 -0
  79. package/dist/VisuallyHidden-BWdnOImJ.cjs +1 -0
  80. package/dist/VisuallyHidden-CPTxPvL_.js +18 -0
  81. package/dist/accordion.cjs +1 -0
  82. package/dist/accordion.d.ts +48 -0
  83. package/dist/accordion.js +5 -0
  84. package/dist/alert.cjs +1 -1
  85. package/dist/alert.js +3 -2
  86. package/dist/avatar.cjs +1 -0
  87. package/dist/avatar.d.ts +53 -0
  88. package/dist/avatar.js +7 -0
  89. package/dist/badge.cjs +1 -1
  90. package/dist/badge.js +2 -1
  91. package/dist/breadcrumb.cjs +1 -1
  92. package/dist/breadcrumb.js +3 -2
  93. package/dist/button.cjs +1 -1
  94. package/dist/button.js +3 -2
  95. package/dist/card.cjs +1 -1
  96. package/dist/card.js +3 -2
  97. package/dist/center.cjs +1 -0
  98. package/dist/center.d.ts +20 -0
  99. package/dist/center.js +5 -0
  100. package/dist/checkbox.cjs +1 -1
  101. package/dist/checkbox.js +3 -2
  102. package/dist/container.cjs +1 -0
  103. package/dist/container.d.ts +23 -0
  104. package/dist/container.js +5 -0
  105. package/dist/cx-OWdTFKLx.js +15 -0
  106. package/dist/cx-dgWA95G6.cjs +1 -0
  107. package/dist/dialog.cjs +1 -1
  108. package/dist/dialog.d.ts +0 -1
  109. package/dist/dialog.js +3 -2
  110. package/dist/drawer.cjs +1 -1
  111. package/dist/drawer.d.ts +0 -1
  112. package/dist/drawer.js +3 -2
  113. package/dist/env-Cqd4Y-Z7.cjs +1 -0
  114. package/dist/env-lFT_FRkA.js +19 -0
  115. package/dist/form.cjs +1 -1
  116. package/dist/form.d.ts +6 -6
  117. package/dist/form.js +5 -4
  118. package/dist/grid.cjs +1 -0
  119. package/dist/grid.d.ts +35 -0
  120. package/dist/grid.js +5 -0
  121. package/dist/heading.cjs +1 -0
  122. package/dist/heading.d.ts +25 -0
  123. package/dist/heading.js +5 -0
  124. package/dist/index.cjs +1 -1
  125. package/dist/index.d.ts +440 -20
  126. package/dist/index.js +96 -62
  127. package/dist/input.cjs +1 -1
  128. package/dist/input.js +3 -2
  129. package/dist/kbd.cjs +1 -0
  130. package/dist/kbd.d.ts +16 -0
  131. package/dist/kbd.js +5 -0
  132. package/dist/pagination.cjs +1 -1
  133. package/dist/pagination.js +2 -1
  134. package/dist/popover.cjs +1 -1
  135. package/dist/popover.js +3 -2
  136. package/dist/progress.cjs +1 -1
  137. package/dist/progress.js +2 -1
  138. package/dist/radio.cjs +1 -1
  139. package/dist/radio.js +4 -3
  140. package/dist/select.cjs +1 -1
  141. package/dist/select.d.ts +3 -3
  142. package/dist/select.js +3 -2
  143. package/dist/selectfield.cjs +1 -1
  144. package/dist/selectfield.d.ts +6 -6
  145. package/dist/selectfield.js +3 -2
  146. package/dist/separator.cjs +1 -1
  147. package/dist/separator.js +3 -2
  148. package/dist/skeleton.cjs +1 -0
  149. package/dist/skeleton.d.ts +22 -0
  150. package/dist/skeleton.js +5 -0
  151. package/dist/spinner.cjs +1 -1
  152. package/dist/spinner.js +3 -2
  153. package/dist/stack.cjs +1 -0
  154. package/dist/stack.d.ts +58 -0
  155. package/dist/stack.js +7 -0
  156. package/dist/style.css +2 -1
  157. package/dist/switch.cjs +1 -1
  158. package/dist/switch.js +3 -2
  159. package/dist/table.cjs +1 -0
  160. package/dist/table.d.ts +65 -0
  161. package/dist/table.js +5 -0
  162. package/dist/tabs.cjs +1 -1
  163. package/dist/tabs.js +3 -2
  164. package/dist/test-utils.cjs +1 -1
  165. package/dist/test-utils.d.ts +14 -2
  166. package/dist/test-utils.js +5 -5
  167. package/dist/text.cjs +1 -0
  168. package/dist/text.d.ts +38 -0
  169. package/dist/text.js +5 -0
  170. package/dist/textarea.cjs +1 -1
  171. package/dist/textarea.js +2 -1
  172. package/dist/textareafield.cjs +1 -1
  173. package/dist/textareafield.d.ts +6 -6
  174. package/dist/textareafield.js +2 -1
  175. package/dist/textfield.cjs +1 -1
  176. package/dist/textfield.d.ts +6 -6
  177. package/dist/textfield.js +3 -2
  178. package/dist/toast.cjs +1 -1
  179. package/dist/toast.js +4 -3
  180. package/dist/tooltip.cjs +1 -1
  181. package/dist/tooltip.js +3 -2
  182. package/dist/utils.cjs +1 -0
  183. package/dist/utils.d.ts +28 -0
  184. package/dist/utils.js +8 -0
  185. package/dist/visually-hidden.cjs +1 -0
  186. package/dist/visually-hidden.d.ts +16 -0
  187. package/dist/visually-hidden.js +5 -0
  188. package/package.json +166 -72
  189. package/dist/Alert-BJ1O0bnK.cjs +0 -1
  190. package/dist/Alert-am3ANPTH.js +0 -99
  191. package/dist/Badge-Bbxb4wyt.js +0 -38
  192. package/dist/Badge-SBO9tGzn.cjs +0 -1
  193. package/dist/Breadcrumb-Db7ASomJ.js +0 -90
  194. package/dist/Breadcrumb-StitgXXx.cjs +0 -1
  195. package/dist/Button-DDMc7-3S.js +0 -58
  196. package/dist/Button-akOSYEu9.cjs +0 -1
  197. package/dist/Card-DSCA-Igh.cjs +0 -1
  198. package/dist/Card-Dh9Pcmfa.js +0 -79
  199. package/dist/Checkbox-DWl91ci_.js +0 -92
  200. package/dist/Checkbox-DvkT6QP9.cjs +0 -1
  201. package/dist/Dialog-CtYu14zl.js +0 -245
  202. package/dist/Dialog-gPT4noD8.cjs +0 -1
  203. package/dist/Drawer-BFJxsPG1.js +0 -246
  204. package/dist/Drawer-BygSIQQn.cjs +0 -1
  205. package/dist/Field-Bv07PL2M.js +0 -120
  206. package/dist/Field-D6FSsUGj.cjs +0 -1
  207. package/dist/Input-BS_t1bl-.js +0 -151
  208. package/dist/Input-UQ2fQwE7.cjs +0 -1
  209. package/dist/Pagination-C1h7OTgM.js +0 -128
  210. package/dist/Pagination-CmmcBPNz.cjs +0 -1
  211. package/dist/Popover-BlCmIF9J.cjs +0 -1
  212. package/dist/Progress-DWLr6Bq2.js +0 -75
  213. package/dist/Progress-FO-4WX0i.cjs +0 -1
  214. package/dist/RadioItem-BfkTHBxQ.cjs +0 -1
  215. package/dist/RadioItem-CzHSS_qK.js +0 -141
  216. package/dist/Select-BkJNe4Lc.cjs +0 -1
  217. package/dist/Select-DfV10hZt.js +0 -350
  218. package/dist/SelectField-B6N0uub8.js +0 -49
  219. package/dist/SelectField-Dxl2Mgbv.cjs +0 -1
  220. package/dist/Separator-C5lPGzes.cjs +0 -1
  221. package/dist/Separator-DQT58t90.js +0 -52
  222. package/dist/Spinner-CeIDpqkx.cjs +0 -1
  223. package/dist/Switch-BU_Tcttb.cjs +0 -1
  224. package/dist/Tabs-BTfm4LbV.js +0 -220
  225. package/dist/Tabs-DuU02-UD.cjs +0 -1
  226. package/dist/TextField-C3r-6jr6.cjs +0 -1
  227. package/dist/TextField-DtXQQJJk.js +0 -31
  228. package/dist/Textarea-H6evM8L4.cjs +0 -1
  229. package/dist/TextareaField-CpqPinvx.js +0 -31
  230. package/dist/TextareaField-D234Lyi_.cjs +0 -1
  231. package/dist/Toast-DHyfbt0C.js +0 -167
  232. package/dist/Toast-DVvbVxTf.cjs +0 -1
  233. package/dist/Tooltip-CCd6VRvZ.cjs +0 -1
  234. package/dist/VhyxUIProvider-DI8J763o.js +0 -31
  235. package/dist/VhyxUIProvider-oVy4G3P4.cjs +0 -1
  236. package/dist/jsx-runtime-BRMkMA8J.cjs +0 -22
  237. package/dist/jsx-runtime-CL69jGNW.js +0 -279
@@ -0,0 +1,167 @@
1
+ import { jsxs as l, Fragment as b, jsx as s } from "react/jsx-runtime";
2
+ import { useState as g, useEffect as u, useCallback as v, useRef as y } from "react";
3
+ import { toastContract as T } from "@vhyxui/core";
4
+ import { withAgentContract as x } from "@vhyxseal/react";
5
+ let r = [], p = 5;
6
+ const f = /* @__PURE__ */ new Set();
7
+ let _ = 0;
8
+ function m() {
9
+ for (const t of f)
10
+ t();
11
+ }
12
+ function N(t) {
13
+ t.maxToasts !== void 0 && (p = t.maxToasts);
14
+ }
15
+ function h() {
16
+ return r;
17
+ }
18
+ function E(t) {
19
+ _ += 1;
20
+ const o = `vhyx-toast-${_}`, e = { ...t, id: o }, a = [...r];
21
+ return a.length >= p && a.shift(), r = [...a, e], m(), o;
22
+ }
23
+ function q(t) {
24
+ r = r.filter((o) => o.id !== t), m();
25
+ }
26
+ function L() {
27
+ r = [], m();
28
+ }
29
+ function C(t) {
30
+ return f.add(t), () => {
31
+ f.delete(t);
32
+ };
33
+ }
34
+ const k = "_region_lqmlf_3", w = "_toast_lqmlf_12", n = {
35
+ region: k,
36
+ toast: w,
37
+ "toast-content": "_toast-content_lqmlf_74",
38
+ "toast-icon": "_toast-icon_lqmlf_103",
39
+ "toast-body": "_toast-body_lqmlf_117",
40
+ "toast-message": "_toast-message_lqmlf_125",
41
+ "toast-description": "_toast-description_lqmlf_133",
42
+ "toast-action": "_toast-action_lqmlf_142",
43
+ "toast-dismiss": "_toast-dismiss_lqmlf_168"
44
+ };
45
+ function I({
46
+ position: t = "bottom-right",
47
+ maxToasts: o = 5,
48
+ defaultDuration: e = 5e3,
49
+ children: a
50
+ }) {
51
+ const [i, c] = g(() => h());
52
+ return u(() => {
53
+ N({ maxToasts: o });
54
+ }, [o]), u(() => C(() => {
55
+ c(h());
56
+ }), []), /* @__PURE__ */ l(b, { children: [
57
+ a,
58
+ /* @__PURE__ */ s(
59
+ "div",
60
+ {
61
+ role: "status",
62
+ "aria-live": "polite",
63
+ "aria-atomic": "false",
64
+ "aria-label": "Notifications",
65
+ className: n.region,
66
+ "data-position": t,
67
+ children: i.map((d) => /* @__PURE__ */ s(
68
+ S,
69
+ {
70
+ item: d,
71
+ defaultDuration: e
72
+ },
73
+ d.id
74
+ ))
75
+ }
76
+ )
77
+ ] });
78
+ }
79
+ function S({
80
+ item: t,
81
+ defaultDuration: o
82
+ }) {
83
+ const e = v(() => q(t.id), [t.id]), a = y(null), i = t.duration ?? o;
84
+ return u(() => {
85
+ if (!(!isFinite(i) || i <= 0))
86
+ return a.current = setTimeout(e, i), () => {
87
+ a.current && clearTimeout(a.current);
88
+ };
89
+ }, [e, i]), /* @__PURE__ */ s(
90
+ "div",
91
+ {
92
+ role: "status",
93
+ "aria-live": "polite",
94
+ className: n.toast,
95
+ "data-variant": t.variant,
96
+ "data-state": "open",
97
+ children: /* @__PURE__ */ l("div", { className: n["toast-content"], children: [
98
+ /* @__PURE__ */ s("span", { className: n["toast-icon"], "aria-hidden": "true", children: j(t.variant) }),
99
+ /* @__PURE__ */ l("div", { className: n["toast-body"], children: [
100
+ /* @__PURE__ */ s("span", { className: n["toast-message"], children: t.message }),
101
+ t.description && /* @__PURE__ */ s("span", { className: n["toast-description"], children: t.description })
102
+ ] }),
103
+ t.action && /* @__PURE__ */ s(
104
+ "button",
105
+ {
106
+ type: "button",
107
+ className: n["toast-action"],
108
+ onClick: () => {
109
+ var c;
110
+ (c = t.action) == null || c.onClick(), e();
111
+ },
112
+ children: t.action.label
113
+ }
114
+ ),
115
+ t.dismissible !== !1 && /* @__PURE__ */ s(
116
+ "button",
117
+ {
118
+ type: "button",
119
+ className: n["toast-dismiss"],
120
+ onClick: e,
121
+ "aria-label": "Dismiss",
122
+ children: /* @__PURE__ */ l(
123
+ "svg",
124
+ {
125
+ "aria-hidden": "true",
126
+ viewBox: "0 0 12 12",
127
+ fill: "none",
128
+ stroke: "currentColor",
129
+ strokeWidth: 1.5,
130
+ strokeLinecap: "round",
131
+ children: [
132
+ /* @__PURE__ */ s("line", { x1: "2", y1: "2", x2: "10", y2: "10" }),
133
+ /* @__PURE__ */ s("line", { x1: "10", y1: "2", x2: "2", y2: "10" })
134
+ ]
135
+ }
136
+ )
137
+ }
138
+ )
139
+ ] })
140
+ }
141
+ );
142
+ }
143
+ function j(t) {
144
+ switch (t) {
145
+ case "success":
146
+ return "✓";
147
+ case "danger":
148
+ return "✕";
149
+ case "warning":
150
+ return "⚠";
151
+ case "info":
152
+ return "ℹ";
153
+ default:
154
+ return "●";
155
+ }
156
+ }
157
+ const A = { ...T, id: "vhyxui-toast" }, O = Object.assign(
158
+ x(I, A),
159
+ { displayName: "VhyxToast" }
160
+ );
161
+ export {
162
+ O as T,
163
+ I as a,
164
+ E as b,
165
+ q as c,
166
+ L as d
167
+ };
@@ -0,0 +1 @@
1
+ "use strict";const h=require("react/jsx-runtime"),o=require("react"),q=require("react-dom"),B=require("@vhyxui/core"),L=require("@vhyxseal/react"),O=require("./useId-D2AEOm2G.cjs"),P="_tooltip_jlaje_1",F={tooltip:P};function v({content:x,side:n="top",align:C="center",delayDuration:y=400,skipDelayDuration:E=300,children:s}){const b=O.useId("vhyx-tooltip"),[l,u]=o.useState(!1),[g,k]=o.useState({top:0,left:0}),T=o.useRef(null),p=o.useRef(null),d=o.useRef(null),i=o.useCallback(()=>{p.current&&clearTimeout(p.current),d.current&&clearTimeout(d.current)},[]);o.useEffect(()=>()=>i(),[i]);const m=o.useCallback(()=>{const e=T.current;if(!e)return;const t=e.getBoundingClientRect(),a=6;let r=0,c=0;n==="top"?(r=t.top-a,c=t.left+t.width/2):n==="bottom"?(r=t.bottom+a,c=t.left+t.width/2):n==="right"?(r=t.top+t.height/2,c=t.right+a):(r=t.top+t.height/2,c=t.left-a),k({top:r,left:c})},[n]),w=o.useCallback(()=>{i(),p.current=setTimeout(()=>{m(),u(!0)},y)},[i,y,m]),f=o.useCallback((e=0)=>{i(),e>0?d.current=setTimeout(()=>u(!1),e):u(!1)},[i]);o.useEffect(()=>{if(!l)return;function e(t){t.key==="Escape"&&f(0)}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[l,f]);const M=o.cloneElement(s,{ref:o.useCallback(e=>{T.current=e;const t=s.ref;typeof t=="function"?t(e):t&&typeof t=="object"&&(t.current=e)},[]),"aria-describedby":l?b:void 0,onMouseEnter:e=>{const t=s.props.onMouseEnter;typeof t=="function"&&t(e),w()},onMouseLeave:e=>{const t=s.props.onMouseLeave;typeof t=="function"&&t(e),f(E)},onFocus:e=>{const t=s.props.onFocus;typeof t=="function"&&t(e),m(),u(!0)},onBlur:e=>{const t=s.props.onBlur;typeof t=="function"&&t(e),f(0)}}),j=l?q.createPortal(h.jsx("div",{id:b,role:"tooltip",className:F.tooltip,"data-side":n,"data-align":C,style:{position:"fixed",top:g.top,left:g.left,zIndex:550,transform:n==="top"||n==="bottom"?"translateX(-50%)":"translateY(-50%)"},children:x}),document.body):null;return h.jsxs(h.Fragment,{children:[M,j]})}v.displayName="VhyxTooltip";const I={...B.tooltipContract,id:"vhyxui-tooltip"},R=L.withAgentContract(v,I);R.displayName="VhyxTooltip";exports.Tooltip=R;
@@ -1,48 +1,48 @@
1
- import { j as h } from "./jsx-runtime-CL69jGNW.js";
2
- import P, { useState as b, useRef as y, useCallback as c, useEffect as E } from "react";
3
- import k from "react-dom";
4
- import { tooltipContract as F } from "@vhyxui/core";
5
- import { withAgentContract as I } from "@vhyxseal/react";
6
- import { u as N } from "./useId-BGRmH6iF.js";
7
- const V = "_tooltip_jlaje_1", _ = {
8
- tooltip: V
1
+ import { jsx as O, jsxs as P, Fragment as k } from "react/jsx-runtime";
2
+ import F, { useState as b, useRef as h, useCallback as c, useEffect as x } from "react";
3
+ import I from "react-dom";
4
+ import { tooltipContract as N } from "@vhyxui/core";
5
+ import { withAgentContract as V } from "@vhyxseal/react";
6
+ import { u as _ } from "./useId-BGRmH6iF.js";
7
+ const A = "_tooltip_jlaje_1", S = {
8
+ tooltip: A
9
9
  };
10
- function R({
11
- content: j,
10
+ function E({
11
+ content: R,
12
12
  side: e = "top",
13
13
  align: w = "center",
14
- delayDuration: g = 400,
14
+ delayDuration: y = 400,
15
15
  skipDelayDuration: M = 300,
16
16
  children: n
17
17
  }) {
18
- const x = N("vhyx-tooltip"), [l, f] = b(!1), [T, C] = b({ top: 0, left: 0 }), v = y(null), a = y(null), m = y(null), i = c(() => {
18
+ const g = _("vhyx-tooltip"), [l, f] = b(!1), [T, C] = b({ top: 0, left: 0 }), v = h(null), a = h(null), m = h(null), i = c(() => {
19
19
  a.current && clearTimeout(a.current), m.current && clearTimeout(m.current);
20
20
  }, []);
21
- E(() => () => i(), [i]);
21
+ x(() => () => i(), [i]);
22
22
  const d = c(() => {
23
23
  const o = v.current;
24
24
  if (!o) return;
25
25
  const t = o.getBoundingClientRect(), p = 6;
26
- let s = 0, r = 0;
27
- e === "top" ? (s = t.top - p, r = t.left + t.width / 2) : e === "bottom" ? (s = t.bottom + p, r = t.left + t.width / 2) : e === "right" ? (s = t.top + t.height / 2, r = t.right + p) : (s = t.top + t.height / 2, r = t.left - p), C({ top: s, left: r });
28
- }, [e]), B = c(() => {
26
+ let r = 0, s = 0;
27
+ e === "top" ? (r = t.top - p, s = t.left + t.width / 2) : e === "bottom" ? (r = t.bottom + p, s = t.left + t.width / 2) : e === "right" ? (r = t.top + t.height / 2, s = t.right + p) : (r = t.top + t.height / 2, s = t.left - p), C({ top: r, left: s });
28
+ }, [e]), j = c(() => {
29
29
  i(), a.current = setTimeout(() => {
30
30
  d(), f(!0);
31
- }, g);
32
- }, [i, g, d]), u = c(
31
+ }, y);
32
+ }, [i, y, d]), u = c(
33
33
  (o = 0) => {
34
34
  i(), o > 0 ? m.current = setTimeout(() => f(!1), o) : f(!1);
35
35
  },
36
36
  [i]
37
37
  );
38
- E(() => {
38
+ x(() => {
39
39
  if (!l) return;
40
40
  function o(t) {
41
41
  t.key === "Escape" && u(0);
42
42
  }
43
43
  return document.addEventListener("keydown", o), () => document.removeEventListener("keydown", o);
44
44
  }, [l, u]);
45
- const L = P.cloneElement(
45
+ const B = F.cloneElement(
46
46
  n,
47
47
  {
48
48
  ref: c(
@@ -54,10 +54,10 @@ function R({
54
54
  // eslint-disable-next-line react-hooks/exhaustive-deps
55
55
  []
56
56
  ),
57
- "aria-describedby": l ? x : void 0,
57
+ "aria-describedby": l ? g : void 0,
58
58
  onMouseEnter: (o) => {
59
59
  const t = n.props.onMouseEnter;
60
- typeof t == "function" && t(o), B();
60
+ typeof t == "function" && t(o), j();
61
61
  },
62
62
  onMouseLeave: (o) => {
63
63
  const t = n.props.onMouseLeave;
@@ -72,13 +72,13 @@ function R({
72
72
  typeof t == "function" && t(o), u(0);
73
73
  }
74
74
  }
75
- ), O = l ? k.createPortal(
76
- /* @__PURE__ */ h.jsx(
75
+ ), L = l ? I.createPortal(
76
+ /* @__PURE__ */ O(
77
77
  "div",
78
78
  {
79
- id: x,
79
+ id: g,
80
80
  role: "tooltip",
81
- className: _.tooltip,
81
+ className: S.tooltip,
82
82
  "data-side": e,
83
83
  "data-align": w,
84
84
  style: {
@@ -89,19 +89,19 @@ function R({
89
89
  // --vhyx-z-tooltip
90
90
  transform: e === "top" || e === "bottom" ? "translateX(-50%)" : "translateY(-50%)"
91
91
  },
92
- children: j
92
+ children: R
93
93
  }
94
94
  ),
95
95
  document.body
96
96
  ) : null;
97
- return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
98
- L,
99
- O
97
+ return /* @__PURE__ */ P(k, { children: [
98
+ B,
99
+ L
100
100
  ] });
101
101
  }
102
- R.displayName = "VhyxTooltip";
103
- const A = { ...F, id: "vhyxui-tooltip" }, S = I(R, A);
104
- S.displayName = "VhyxTooltip";
102
+ E.displayName = "VhyxTooltip";
103
+ const z = { ...N, id: "vhyxui-tooltip" }, G = V(E, z);
104
+ G.displayName = "VhyxTooltip";
105
105
  export {
106
- S as T
106
+ G as T
107
107
  };
@@ -0,0 +1 @@
1
+ "use strict";const r=require("react/jsx-runtime"),f=require("react"),h=require("@vhyxseal/react"),v=require("./Toast-CESL8AKT.cjs"),o=require("./env-Cqd4Y-Z7.cjs"),p={"skip-link":"_skip-link_1u818_1"};function a(e){if(e&&e.trim().length>0)return e.trim();const t=o.readPublicEnv("NEXT_PUBLIC_VHYX_DOMAIN")??o.readPublicEnv("VITE_VHYX_DOMAIN");return t||(typeof window<"u"&&window.location.hostname?window.location.hostname:"localhost")}function y(e){f.useEffect(()=>{if(e===void 0||typeof document>"u")return;const t=document.documentElement;if(e!=="system"){t.setAttribute("data-theme",e);return}if(typeof window.matchMedia!="function"){t.setAttribute("data-theme","light");return}const n=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>t.setAttribute("data-theme",n.matches?"dark":"light");return i(),n.addEventListener("change",i),()=>n.removeEventListener("change",i)},[e])}function c({children:e,toastPosition:t="bottom-right",maxToasts:n=5,defaultDuration:i=4e3,domain:d,theme:u,agentContracts:l=!0,skipLink:m=!0}){y(u);const s=r.jsxs(r.Fragment,{children:[m&&r.jsx("a",{href:"#vhyx-main",className:p["skip-link"],children:"Skip to main content"}),r.jsx(v.ToastProvider,{position:t,maxToasts:n,defaultDuration:i,children:e})]});return l?r.jsx(h.SealProvider,{config:{domain:a(d),domainVerified:!1,verificationToken:""},dev:o.isDev(),children:s}):s}c.displayName="VhyxUIProvider";exports.VhyxUIProvider=c;exports.resolveSealDomain=a;
@@ -0,0 +1,58 @@
1
+ import { jsx as r, jsxs as f, Fragment as u } from "react/jsx-runtime";
2
+ import { useEffect as l } from "react";
3
+ import { SealProvider as h } from "@vhyxseal/react";
4
+ import { a as p } from "./Toast-DYqE0PjM.js";
5
+ import { i as v, r as a } from "./env-lFT_FRkA.js";
6
+ const y = {
7
+ "skip-link": "_skip-link_1u818_1"
8
+ };
9
+ function k(e) {
10
+ if (e && e.trim().length > 0) return e.trim();
11
+ const t = a("NEXT_PUBLIC_VHYX_DOMAIN") ?? a("VITE_VHYX_DOMAIN");
12
+ return t || (typeof window < "u" && window.location.hostname ? window.location.hostname : "localhost");
13
+ }
14
+ function w(e) {
15
+ l(() => {
16
+ if (e === void 0 || typeof document > "u") return;
17
+ const t = document.documentElement;
18
+ if (e !== "system") {
19
+ t.setAttribute("data-theme", e);
20
+ return;
21
+ }
22
+ if (typeof window.matchMedia != "function") {
23
+ t.setAttribute("data-theme", "light");
24
+ return;
25
+ }
26
+ const i = window.matchMedia("(prefers-color-scheme: dark)"), n = () => t.setAttribute("data-theme", i.matches ? "dark" : "light");
27
+ return n(), i.addEventListener("change", n), () => i.removeEventListener("change", n);
28
+ }, [e]);
29
+ }
30
+ function g({
31
+ children: e,
32
+ toastPosition: t = "bottom-right",
33
+ maxToasts: i = 5,
34
+ defaultDuration: n = 4e3,
35
+ domain: s,
36
+ theme: d,
37
+ agentContracts: c = !0,
38
+ skipLink: m = !0
39
+ }) {
40
+ w(d);
41
+ const o = /* @__PURE__ */ f(u, { children: [
42
+ m && /* @__PURE__ */ r("a", { href: "#vhyx-main", className: y["skip-link"], children: "Skip to main content" }),
43
+ /* @__PURE__ */ r(p, { position: t, maxToasts: i, defaultDuration: n, children: e })
44
+ ] });
45
+ return c ? /* @__PURE__ */ r(
46
+ h,
47
+ {
48
+ config: { domain: k(s), domainVerified: !1, verificationToken: "" },
49
+ dev: v(),
50
+ children: o
51
+ }
52
+ ) : o;
53
+ }
54
+ g.displayName = "VhyxUIProvider";
55
+ export {
56
+ g as V,
57
+ k as r
58
+ };
@@ -0,0 +1 @@
1
+ "use strict";const t=require("react/jsx-runtime"),s={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0};function r({as:i="span",style:e,...n}){return t.jsx(i,{style:{...s,...e},...n})}exports.VisuallyHidden=r;
@@ -0,0 +1,18 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ const n = {
3
+ position: "absolute",
4
+ width: 1,
5
+ height: 1,
6
+ padding: 0,
7
+ margin: -1,
8
+ overflow: "hidden",
9
+ clip: "rect(0, 0, 0, 0)",
10
+ whiteSpace: "nowrap",
11
+ border: 0
12
+ };
13
+ function a({ as: i = "span", style: e, ...o }) {
14
+ return /* @__PURE__ */ t(i, { style: { ...n, ...e }, ...o });
15
+ }
16
+ export {
17
+ a as V
18
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Accordion-z3QDvyGf.cjs");exports.Accordion=e.Accordion;
@@ -0,0 +1,48 @@
1
+ import { ComponentContract } from '@vhyxui/core';
2
+ import { default as default_2 } from 'react';
3
+
4
+ export declare const Accordion: AccordionComponent;
5
+
6
+ declare type AccordionComponent = default_2.ForwardRefExoticComponent<AccordionProps & default_2.RefAttributes<HTMLDivElement>> & {
7
+ Item: typeof AccordionItem;
8
+ };
9
+
10
+ /** A single collapsible section. */
11
+ declare const AccordionItem: default_2.ForwardRefExoticComponent<AccordionItemProps & default_2.RefAttributes<HTMLDetailsElement>>;
12
+
13
+ /** One entry for the data-driven `items` shorthand. */
14
+ export declare interface AccordionItemData {
15
+ value: string;
16
+ title: default_2.ReactNode;
17
+ content: default_2.ReactNode;
18
+ disabled?: boolean;
19
+ }
20
+
21
+ /** Props for Accordion.Item. */
22
+ export declare interface AccordionItemProps extends Omit<default_2.DetailsHTMLAttributes<HTMLDetailsElement>, 'title' | 'open'> {
23
+ /** Unique value within the accordion. */
24
+ value: string;
25
+ /** Header content. */
26
+ title: default_2.ReactNode;
27
+ disabled?: boolean;
28
+ }
29
+
30
+ /** Props for Accordion. */
31
+ export declare interface AccordionProps extends Omit<default_2.HTMLAttributes<HTMLDivElement>, 'defaultValue'> {
32
+ /** `single` keeps at most one section open. @default 'single' */
33
+ type?: 'single' | 'multiple';
34
+ /** Initially open section values (uncontrolled). */
35
+ defaultValue?: string[];
36
+ /** Open section values (controlled). */
37
+ value?: string[];
38
+ /** Called with the next list of open values. */
39
+ onValueChange?: (value: string[]) => void;
40
+ /** `ghost` removes the outer border. @default 'default' */
41
+ variant?: 'default' | 'ghost';
42
+ /** Shorthand: render items from data instead of children. */
43
+ items?: AccordionItemData[];
44
+ /** VhyxSeal contract override. */
45
+ contract?: Partial<ComponentContract>;
46
+ }
47
+
48
+ export { }
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ import { A as e } from "./Accordion-qtPur3CA.js";
3
+ export {
4
+ e as Accordion
5
+ };
package/dist/alert.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Alert-BJ1O0bnK.cjs");exports.Alert=e.Alert;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Alert-DWB9Gtpv.cjs");exports.Alert=e.Alert;
package/dist/alert.js CHANGED
@@ -1,4 +1,5 @@
1
- import { A as o } from "./Alert-am3ANPTH.js";
1
+ "use client";
2
+ import { A as t } from "./Alert-D4EFVKUy.js";
2
3
  export {
3
- o as Alert
4
+ t as Alert
4
5
  };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Avatar-afXJdutp.cjs");exports.Avatar=t.Avatar;exports.AvatarGroup=t.AvatarGroup;exports.getInitials=t.getInitials;
@@ -0,0 +1,53 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * Avatar — image with automatic initials fallback and optional presence dot.
5
+ * @example
6
+ * <Avatar name="Ada Lovelace" src="/ada.png" status="online" />
7
+ */
8
+ export declare const Avatar: default_2.ForwardRefExoticComponent<AvatarProps & default_2.RefAttributes<HTMLSpanElement>>;
9
+
10
+ /**
11
+ * AvatarGroup — overlapping stack of avatars with "+N" overflow.
12
+ * @example
13
+ * <AvatarGroup max={3}>{people.map(p => <Avatar key={p.id} name={p.name} />)}</AvatarGroup>
14
+ */
15
+ export declare function AvatarGroup({ max, size, className, children, ...rest }: AvatarGroupProps): default_2.ReactElement;
16
+
17
+ /** Props for AvatarGroup. */
18
+ export declare interface AvatarGroupProps extends default_2.HTMLAttributes<HTMLDivElement> {
19
+ /** Show at most this many avatars, then a "+N" chip. */
20
+ max?: number;
21
+ /** Size applied to the overflow chip. @default 'md' */
22
+ size?: AvatarSize;
23
+ children: default_2.ReactNode;
24
+ }
25
+
26
+ /** Props for Avatar. */
27
+ export declare interface AvatarProps extends default_2.HTMLAttributes<HTMLSpanElement> {
28
+ /** Image URL. Falls back to initials when missing or when it fails to load. */
29
+ src?: string;
30
+ /** Person or entity name — used for alt text and initials. */
31
+ name: string;
32
+ /** @default 'md' */
33
+ size?: AvatarSize;
34
+ /** @default 'circle' */
35
+ shape?: 'circle' | 'square';
36
+ /** Presence dot in the corner. */
37
+ status?: AvatarStatus;
38
+ }
39
+
40
+ /** Avatar sizes. */
41
+ export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
42
+
43
+ /** Presence indicator. */
44
+ export declare type AvatarStatus = 'online' | 'busy' | 'away' | 'offline';
45
+
46
+ /**
47
+ * Derives up to two initials from a name.
48
+ * @example
49
+ * getInitials('Ada Lovelace') // 'AL'
50
+ */
51
+ export declare function getInitials(name: string): string;
52
+
53
+ export { }
package/dist/avatar.js ADDED
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { A as r, a as s, g as e } from "./Avatar-CDoAvY0m.js";
3
+ export {
4
+ r as Avatar,
5
+ s as AvatarGroup,
6
+ e as getInitials
7
+ };
package/dist/badge.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Badge-SBO9tGzn.cjs");exports.Badge=e.Badge;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Badge-DOhfKlXt.cjs");exports.Badge=e.Badge;
package/dist/badge.js CHANGED
@@ -1,4 +1,5 @@
1
- import { B as o } from "./Badge-Bbxb4wyt.js";
1
+ "use client";
2
+ import { B as o } from "./Badge-Z6crWSLX.js";
2
3
  export {
3
4
  o as Badge
4
5
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Breadcrumb-StitgXXx.cjs");exports.Breadcrumb=e.Breadcrumb;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Breadcrumb-DWRxQvbb.cjs");exports.Breadcrumb=e.Breadcrumb;
@@ -1,4 +1,5 @@
1
- import { B as e } from "./Breadcrumb-Db7ASomJ.js";
1
+ "use client";
2
+ import { B as a } from "./Breadcrumb-CbPmH-b4.js";
2
3
  export {
3
- e as Breadcrumb
4
+ a as Breadcrumb
4
5
  };
package/dist/button.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Button-akOSYEu9.cjs");exports.Button=t.Button;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Button-CnNtk6HV.cjs");exports.Button=t.Button;
package/dist/button.js CHANGED
@@ -1,4 +1,5 @@
1
- import { B as r } from "./Button-DDMc7-3S.js";
1
+ "use client";
2
+ import { B as o } from "./Button-DN5vy24q.js";
2
3
  export {
3
- r as Button
4
+ o as Button
4
5
  };
package/dist/card.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Card-DSCA-Igh.cjs");exports.Card=e.Card;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Card-CZUQhd45.cjs");exports.Card=e.Card;
package/dist/card.js CHANGED
@@ -1,4 +1,5 @@
1
- import { C as o } from "./Card-Dh9Pcmfa.js";
1
+ "use client";
2
+ import { C as a } from "./Card-CI7DyOJg.js";
2
3
  export {
3
- o as Card
4
+ a as Card
4
5
  };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Center-BmKeGEa1.cjs");exports.Center=e.Center;
@@ -0,0 +1,20 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * Center — centers its children on both axes.
5
+ * @example
6
+ * <Center fullHeight><Spinner /></Center>
7
+ */
8
+ export declare const Center: default_2.ForwardRefExoticComponent<CenterProps & default_2.RefAttributes<HTMLElement>>;
9
+
10
+ /** Props for Center. */
11
+ export declare interface CenterProps extends default_2.HTMLAttributes<HTMLElement> {
12
+ /** Element to render. @default 'div' */
13
+ as?: default_2.ElementType;
14
+ /** Use `inline-flex` instead of `flex`. */
15
+ inline?: boolean;
16
+ /** Fill the viewport height — handy for auth and empty screens. */
17
+ fullHeight?: boolean;
18
+ }
19
+
20
+ export { }
package/dist/center.js ADDED
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ import { C as t } from "./Center-DFq5m7mf.js";
3
+ export {
4
+ t as Center
5
+ };
package/dist/checkbox.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Checkbox-DvkT6QP9.cjs");exports.Checkbox=e.Checkbox;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Checkbox-DOd4SIx2.cjs");exports.Checkbox=e.Checkbox;
package/dist/checkbox.js CHANGED
@@ -1,4 +1,5 @@
1
- import { C as r } from "./Checkbox-DWl91ci_.js";
1
+ "use client";
2
+ import { C as c } from "./Checkbox-D-5qaOEj.js";
2
3
  export {
3
- r as Checkbox
4
+ c as Checkbox
4
5
  };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Container-CcsVyA6r.cjs");exports.Container=e.Container;
@@ -0,0 +1,23 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * Container — centers content with a readable max width and responsive gutters.
5
+ * @example
6
+ * <Container size="md"><Prose /></Container>
7
+ */
8
+ export declare const Container: default_2.ForwardRefExoticComponent<ContainerProps & default_2.RefAttributes<HTMLElement>>;
9
+
10
+ /** Props for Container. */
11
+ export declare interface ContainerProps extends default_2.HTMLAttributes<HTMLElement> {
12
+ /** Element to render. @default 'div' */
13
+ as?: default_2.ElementType;
14
+ /** Maximum width. @default 'lg' */
15
+ size?: ContainerSize;
16
+ /** Remove horizontal padding. */
17
+ flush?: boolean;
18
+ }
19
+
20
+ /** Max-width presets: sm 640 · md 768 · lg 1024 · xl 1280 · full. */
21
+ export declare type ContainerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
22
+
23
+ export { }