@vertz/ui-primitives 0.2.38 → 0.2.42

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 (233) hide show
  1. package/dist/shared/chunk-06m8prfg.js +52 -0
  2. package/dist/shared/chunk-0n9jj8xr.js +24 -0
  3. package/dist/shared/chunk-1ben27xq.js +317 -0
  4. package/dist/shared/chunk-1j2mj0sa.js +45 -0
  5. package/dist/shared/chunk-250hj18f.js +243 -0
  6. package/dist/shared/chunk-2h4m9c71.js +38 -0
  7. package/dist/shared/chunk-2sbx20hv.js +128 -0
  8. package/dist/shared/chunk-2ye674gr.js +70 -0
  9. package/dist/shared/chunk-34d8385y.js +15 -0
  10. package/dist/shared/chunk-4d7bm8h0.js +113 -0
  11. package/dist/shared/chunk-4zjgxr7x.js +157 -0
  12. package/dist/shared/chunk-5c150wvr.js +140 -0
  13. package/dist/shared/chunk-5gycdypd.js +58 -0
  14. package/dist/shared/chunk-6mm7fhp8.js +105 -0
  15. package/dist/shared/chunk-6zmnqvh6.js +109 -0
  16. package/dist/shared/{chunk-yy3ft5mb.js → chunk-7amn5d71.js} +2 -2
  17. package/dist/shared/chunk-7pbff2hg.js +118 -0
  18. package/dist/shared/chunk-7zpjshwz.js +194 -0
  19. package/dist/shared/chunk-993ff51d.js +155 -0
  20. package/dist/shared/chunk-9pdt5aw7.js +24 -0
  21. package/dist/shared/chunk-a71m4xkv.js +106 -0
  22. package/dist/shared/chunk-aj8m39pk.js +127 -0
  23. package/dist/shared/chunk-ajawpc05.js +305 -0
  24. package/dist/shared/chunk-b7mzwqhj.js +125 -0
  25. package/dist/shared/chunk-bb887de4.js +200 -0
  26. package/dist/shared/chunk-bfsmbrxc.js +111 -0
  27. package/dist/shared/chunk-c2f63m5n.js +56 -0
  28. package/dist/shared/chunk-c5r3s5km.js +263 -0
  29. package/dist/shared/chunk-caba5bhd.js +427 -0
  30. package/dist/shared/chunk-crym07yc.js +264 -0
  31. package/dist/shared/{chunk-5964gmv0.js → chunk-csjtyvam.js} +62 -88
  32. package/dist/shared/chunk-d6rtejz3.js +128 -0
  33. package/dist/shared/chunk-dvaf0bmq.js +140 -0
  34. package/dist/shared/chunk-dwkv9ya6.js +22 -0
  35. package/dist/shared/chunk-e0ckxrjg.js +41 -0
  36. package/dist/shared/chunk-ennxcymj.js +225 -0
  37. package/dist/shared/{chunk-1jd1n0dt.js → chunk-ey38de46.js} +19 -47
  38. package/dist/shared/chunk-f0v1gs5e.js +52 -0
  39. package/dist/shared/chunk-f86rsf84.js +231 -0
  40. package/dist/shared/chunk-fdse46x5.js +21 -0
  41. package/dist/shared/chunk-gj4hrssn.js +135 -0
  42. package/dist/shared/chunk-gyvq4gk9.js +24 -0
  43. package/dist/shared/chunk-hbnps9sq.js +229 -0
  44. package/dist/shared/{chunk-fhss32ya.js → chunk-hdmpyeq9.js} +43 -132
  45. package/dist/shared/chunk-hgnkd4he.js +256 -0
  46. package/dist/shared/chunk-hpcyffm7.js +185 -0
  47. package/dist/shared/chunk-hpmvwx0h.js +99 -0
  48. package/dist/shared/chunk-hz0e504p.js +69 -0
  49. package/dist/shared/chunk-hzk4wfq9.js +43 -0
  50. package/dist/shared/chunk-j7znzkpa.js +48 -0
  51. package/dist/shared/chunk-j9kxgrnn.js +167 -0
  52. package/dist/shared/chunk-jetwnv0w.js +130 -0
  53. package/dist/shared/chunk-jjdg26c1.js +155 -0
  54. package/dist/shared/chunk-k0m4yh86.js +123 -0
  55. package/dist/shared/chunk-k43q9cjr.js +82 -0
  56. package/dist/shared/chunk-k9k8tbr5.js +119 -0
  57. package/dist/shared/chunk-meaj7br1.js +232 -0
  58. package/dist/shared/chunk-mgj0n08k.js +34 -0
  59. package/dist/shared/chunk-mjz4rp6c.js +46 -0
  60. package/dist/shared/chunk-n4rr5gme.js +239 -0
  61. package/dist/shared/chunk-nk55etpp.js +65 -0
  62. package/dist/shared/chunk-nkh1ks3k.js +264 -0
  63. package/dist/shared/chunk-pgvpvbpe.js +26 -0
  64. package/dist/shared/chunk-pma8gnv7.js +178 -0
  65. package/dist/shared/chunk-q7xv6xze.js +131 -0
  66. package/dist/shared/chunk-qey801nq.js +22 -0
  67. package/dist/shared/chunk-s6b4c3tj.js +58 -0
  68. package/dist/shared/chunk-sq27a4h0.js +36 -0
  69. package/dist/shared/chunk-taa5pj15.js +103 -0
  70. package/dist/shared/chunk-tc5rpvyx.js +127 -0
  71. package/dist/shared/chunk-tescm0b3.js +192 -0
  72. package/dist/shared/chunk-tkftdwnq.js +71 -0
  73. package/dist/shared/chunk-tqhnjcfp.js +116 -0
  74. package/dist/shared/chunk-vfknb5ht.js +183 -0
  75. package/dist/shared/chunk-vsc369w3.js +185 -0
  76. package/dist/shared/chunk-whq9s8v5.js +301 -0
  77. package/dist/shared/{chunk-hze1f32t.js → chunk-wrqddgaj.js} +1 -1
  78. package/dist/shared/chunk-yzbmkx4r.js +155 -0
  79. package/dist/shared/chunk-zaen0ajc.js +347 -0
  80. package/dist/src/accordion/accordion-composed.js +1 -1
  81. package/dist/src/accordion/accordion.js +1 -1
  82. package/dist/src/alert/alert-composed.js +1 -1
  83. package/dist/src/alert-dialog/alert-dialog-composed.js +1 -1
  84. package/dist/src/alert-dialog/alert-dialog.js +1 -1
  85. package/dist/src/avatar/avatar-composed.js +1 -1
  86. package/dist/src/badge/badge-composed.js +1 -1
  87. package/dist/src/badge/badge.js +1 -1
  88. package/dist/src/breadcrumb/breadcrumb-composed.js +1 -1
  89. package/dist/src/button/button-composed.js +1 -1
  90. package/dist/src/button/button.js +1 -1
  91. package/dist/src/calendar/calendar-composed.js +1 -1
  92. package/dist/src/calendar/calendar.js +1 -1
  93. package/dist/src/card/card-composed.js +1 -1
  94. package/dist/src/carousel/carousel-composed.js +1 -1
  95. package/dist/src/carousel/carousel.js +1 -1
  96. package/dist/src/checkbox/checkbox-composed.js +1 -1
  97. package/dist/src/checkbox/checkbox.js +1 -1
  98. package/dist/src/collapsible/collapsible-composed.js +1 -1
  99. package/dist/src/collapsible/collapsible.js +1 -1
  100. package/dist/src/combobox/combobox-composed.js +1 -1
  101. package/dist/src/combobox/combobox.js +1 -1
  102. package/dist/src/command/command-composed.js +1 -1
  103. package/dist/src/command/command.js +1 -1
  104. package/dist/src/composed/with-styles.js +1 -1
  105. package/dist/src/context-menu/context-menu-composed.js +1 -1
  106. package/dist/src/context-menu/context-menu.js +1 -1
  107. package/dist/src/date-picker/date-picker-composed.js +1 -1
  108. package/dist/src/date-picker/date-picker.js +1 -1
  109. package/dist/src/dialog/dialog-composed.js +1 -1
  110. package/dist/src/dialog/dialog-stack-parts.js +1 -1
  111. package/dist/src/dialog/dialog.js +1 -1
  112. package/dist/src/dropdown-menu/dropdown-menu-composed.js +1 -1
  113. package/dist/src/dropdown-menu/dropdown-menu.js +1 -1
  114. package/dist/src/empty-state/empty-state-composed.js +1 -1
  115. package/dist/src/form-group/form-group-composed.js +1 -1
  116. package/dist/src/hover-card/hover-card-composed.js +1 -1
  117. package/dist/src/hover-card/hover-card.js +1 -1
  118. package/dist/src/input/input-composed.js +1 -1
  119. package/dist/src/label/label-composed.js +1 -1
  120. package/dist/src/list/list-composed.js +1 -1
  121. package/dist/src/menu/menu-composed.js +1 -1
  122. package/dist/src/menu/menu.js +1 -1
  123. package/dist/src/menubar/menubar-composed.js +1 -1
  124. package/dist/src/menubar/menubar.js +1 -1
  125. package/dist/src/navigation-menu/navigation-menu-composed.js +1 -1
  126. package/dist/src/navigation-menu/navigation-menu.js +1 -1
  127. package/dist/src/pagination/pagination-composed.js +1 -1
  128. package/dist/src/popover/popover-composed.js +1 -1
  129. package/dist/src/popover/popover.js +1 -1
  130. package/dist/src/progress/progress-composed.js +1 -1
  131. package/dist/src/progress/progress.js +1 -1
  132. package/dist/src/radio/radio-composed.js +1 -1
  133. package/dist/src/radio/radio.js +1 -1
  134. package/dist/src/resizable-panel/resizable-panel-composed.js +1 -1
  135. package/dist/src/resizable-panel/resizable-panel.js +1 -1
  136. package/dist/src/scroll-area/scroll-area-composed.js +1 -1
  137. package/dist/src/scroll-area/scroll-area.js +1 -1
  138. package/dist/src/select/select-composed.js +1 -1
  139. package/dist/src/select/select.js +1 -1
  140. package/dist/src/separator/separator-composed.js +1 -1
  141. package/dist/src/sheet/sheet-composed.js +1 -1
  142. package/dist/src/sheet/sheet.js +1 -1
  143. package/dist/src/skeleton/skeleton-composed.js +1 -1
  144. package/dist/src/slider/slider-composed.js +1 -1
  145. package/dist/src/slider/slider.js +1 -1
  146. package/dist/src/switch/switch-composed.js +1 -1
  147. package/dist/src/switch/switch.js +1 -1
  148. package/dist/src/table/table-composed.js +1 -1
  149. package/dist/src/tabs/tabs-composed.js +1 -1
  150. package/dist/src/tabs/tabs.js +1 -1
  151. package/dist/src/textarea/textarea-composed.js +1 -1
  152. package/dist/src/toast/toast.js +1 -1
  153. package/dist/src/toggle/toggle-composed.js +1 -1
  154. package/dist/src/toggle/toggle.js +1 -1
  155. package/dist/src/toggle-group/toggle-group-composed.js +1 -1
  156. package/dist/src/toggle-group/toggle-group.js +1 -1
  157. package/dist/src/tooltip/tooltip-composed.js +1 -1
  158. package/dist/src/tooltip/tooltip.js +1 -1
  159. package/package.json +3 -3
  160. package/dist/shared/chunk-144kbnmx.js +0 -95
  161. package/dist/shared/chunk-1ewxfgsa.js +0 -167
  162. package/dist/shared/chunk-1hm0mbke.js +0 -258
  163. package/dist/shared/chunk-22rt6ws9.js +0 -69
  164. package/dist/shared/chunk-2ssqz188.js +0 -162
  165. package/dist/shared/chunk-33he7ay9.js +0 -218
  166. package/dist/shared/chunk-3jack97k.js +0 -509
  167. package/dist/shared/chunk-75pegjs7.js +0 -26
  168. package/dist/shared/chunk-862x7dja.js +0 -398
  169. package/dist/shared/chunk-8pk1pn5h.js +0 -215
  170. package/dist/shared/chunk-8t0nm721.js +0 -152
  171. package/dist/shared/chunk-94twh4s4.js +0 -28
  172. package/dist/shared/chunk-9yb26c0w.js +0 -232
  173. package/dist/shared/chunk-a82r2pnq.js +0 -67
  174. package/dist/shared/chunk-axpbdpgx.js +0 -177
  175. package/dist/shared/chunk-b3j6mym6.js +0 -203
  176. package/dist/shared/chunk-b4zzg457.js +0 -410
  177. package/dist/shared/chunk-b9qxfcsy.js +0 -60
  178. package/dist/shared/chunk-bc2qqkhr.js +0 -194
  179. package/dist/shared/chunk-bv12nkdm.js +0 -149
  180. package/dist/shared/chunk-bvxc1ww4.js +0 -164
  181. package/dist/shared/chunk-czv0kqj4.js +0 -107
  182. package/dist/shared/chunk-d83ag07h.js +0 -189
  183. package/dist/shared/chunk-de18ashk.js +0 -134
  184. package/dist/shared/chunk-dvk4h36t.js +0 -140
  185. package/dist/shared/chunk-dxvnerw2.js +0 -353
  186. package/dist/shared/chunk-e399pzdq.js +0 -241
  187. package/dist/shared/chunk-e4qha9as.js +0 -180
  188. package/dist/shared/chunk-eb2d9v6k.js +0 -68
  189. package/dist/shared/chunk-ect26sp5.js +0 -353
  190. package/dist/shared/chunk-ev367pq3.js +0 -102
  191. package/dist/shared/chunk-fjykbv0v.js +0 -214
  192. package/dist/shared/chunk-gdddk6nh.js +0 -96
  193. package/dist/shared/chunk-ghkw5bjq.js +0 -55
  194. package/dist/shared/chunk-hfjtkytb.js +0 -310
  195. package/dist/shared/chunk-hpvjfj0j.js +0 -31
  196. package/dist/shared/chunk-jpyjk616.js +0 -52
  197. package/dist/shared/chunk-k6d53tne.js +0 -206
  198. package/dist/shared/chunk-knzg86am.js +0 -168
  199. package/dist/shared/chunk-ktbf6xrt.js +0 -179
  200. package/dist/shared/chunk-m8y2p66x.js +0 -252
  201. package/dist/shared/chunk-metxdt5x.js +0 -28
  202. package/dist/shared/chunk-mgae1d93.js +0 -157
  203. package/dist/shared/chunk-mtx2cfbx.js +0 -175
  204. package/dist/shared/chunk-n436p5cb.js +0 -260
  205. package/dist/shared/chunk-nj420k31.js +0 -54
  206. package/dist/shared/chunk-nsmvdxgp.js +0 -213
  207. package/dist/shared/chunk-pcms04vq.js +0 -162
  208. package/dist/shared/chunk-pqskzq8t.js +0 -79
  209. package/dist/shared/chunk-pwr60kyd.js +0 -321
  210. package/dist/shared/chunk-pzknpa1y.js +0 -327
  211. package/dist/shared/chunk-q77y3rg4.js +0 -189
  212. package/dist/shared/chunk-qhnany7w.js +0 -179
  213. package/dist/shared/chunk-r3pffzss.js +0 -13
  214. package/dist/shared/chunk-rdr0rtpr.js +0 -131
  215. package/dist/shared/chunk-rj52ty6r.js +0 -147
  216. package/dist/shared/chunk-rnqc7735.js +0 -125
  217. package/dist/shared/chunk-rtk30950.js +0 -202
  218. package/dist/shared/chunk-s0xgd8vg.js +0 -266
  219. package/dist/shared/chunk-s415735j.js +0 -357
  220. package/dist/shared/chunk-s62e7jf4.js +0 -30
  221. package/dist/shared/chunk-snd8e6r8.js +0 -418
  222. package/dist/shared/chunk-spng4yb9.js +0 -73
  223. package/dist/shared/chunk-t887wwjc.js +0 -168
  224. package/dist/shared/chunk-tn0m98j8.js +0 -42
  225. package/dist/shared/chunk-v0b5pkcq.js +0 -30
  226. package/dist/shared/chunk-v5tj7veh.js +0 -284
  227. package/dist/shared/chunk-vkscwzpr.js +0 -294
  228. package/dist/shared/chunk-vv187snj.js +0 -112
  229. package/dist/shared/chunk-xv4wd0kf.js +0 -293
  230. package/dist/shared/chunk-y1hpsqzy.js +0 -185
  231. package/dist/shared/chunk-yfzddvxc.js +0 -71
  232. package/dist/shared/chunk-yzgzx2dh.js +0 -311
  233. package/dist/shared/chunk-z5j7ztf2.js +0 -467
@@ -0,0 +1,38 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-q7xbcj9q.js";
4
+
5
+ // src/alert/alert-composed.tsx
6
+ import { jsxDEV as jsxDEV_7x81h0kn } from "@vertz/ui/jsx-dev-runtime";
7
+ import { createContext, useContext } from "@vertz/ui";
8
+ var AlertContext = createContext(undefined, "@vertz/ui-primitives::AlertContext");
9
+ function AlertTitle({ children, className, class: classProp }) {
10
+ const ctx = useContext(AlertContext);
11
+ return jsxDEV_7x81h0kn("h5", {
12
+ class: cn(ctx?.classes?.title, className ?? classProp),
13
+ children
14
+ }, undefined, false, undefined, this);
15
+ }
16
+ function AlertDescription({ children, className, class: classProp }) {
17
+ const ctx = useContext(AlertContext);
18
+ return jsxDEV_7x81h0kn("div", {
19
+ class: cn(ctx?.classes?.description, className ?? classProp),
20
+ children
21
+ }, undefined, false, undefined, this);
22
+ }
23
+ function ComposedAlertRoot({ children, classes, className, class: classProp }) {
24
+ return jsxDEV_7x81h0kn(AlertContext.Provider, {
25
+ value: { classes },
26
+ children: jsxDEV_7x81h0kn("div", {
27
+ role: "alert",
28
+ class: cn(classes?.root, className ?? classProp),
29
+ children
30
+ }, undefined, false, undefined, this)
31
+ }, undefined, false, undefined, this);
32
+ }
33
+ var ComposedAlert = Object.assign(ComposedAlertRoot, {
34
+ Title: AlertTitle,
35
+ Description: AlertDescription
36
+ });
37
+
38
+ export { ComposedAlert };
@@ -0,0 +1,128 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-q7xbcj9q.js";
4
+ import {
5
+ createFloatingPosition,
6
+ resolveLayoutElement
7
+ } from "./chunk-vef3sepw.js";
8
+ import {
9
+ uniqueId
10
+ } from "./chunk-8y1jf6xr.js";
11
+
12
+ // src/tooltip/tooltip-composed.tsx
13
+ import { jsxDEV as jsxDEV_7x81h0kn } from "@vertz/ui/jsx-dev-runtime";
14
+ import { createContext, ref, useContext } from "@vertz/ui";
15
+ var TooltipContext = createContext(undefined, "@vertz/ui-primitives::TooltipContext");
16
+ function useTooltipContext(componentName) {
17
+ const ctx = useContext(TooltipContext);
18
+ if (!ctx) {
19
+ throw new Error(`<Tooltip.${componentName}> must be used inside <Tooltip>. ` + "Ensure it is a direct or nested child of the Tooltip root component.");
20
+ }
21
+ return ctx;
22
+ }
23
+ function TooltipTrigger({ children }) {
24
+ const ctx = useTooltipContext("Trigger");
25
+ const idx = ctx._triggerCount.value++;
26
+ if (idx > 0)
27
+ console.warn("Duplicate <Tooltip.Trigger> detected – only the first is used");
28
+ const childNodes = Array.isArray(children) ? children : [children];
29
+ const childEl = childNodes.find((c) => c instanceof HTMLElement);
30
+ if (childEl) {
31
+ childEl.setAttribute("aria-describedby", ctx.contentId);
32
+ }
33
+ return jsxDEV_7x81h0kn("span", {
34
+ style: { display: "contents" },
35
+ "data-tooltip-trigger": "",
36
+ "aria-describedby": ctx.contentId,
37
+ onMouseenter: () => ctx.show(),
38
+ onMouseleave: () => ctx.hide(),
39
+ onFocus: () => ctx.show(),
40
+ onBlur: () => ctx.hide(),
41
+ children
42
+ }, undefined, false, undefined, this);
43
+ }
44
+ function TooltipContent({ children, className: cls, class: classProp }) {
45
+ const ctx = useTooltipContext("Content");
46
+ const idx = ctx._contentCount.value++;
47
+ if (idx > 0)
48
+ console.warn("Duplicate <Tooltip.Content> detected – only the first is used");
49
+ const isOpen = ctx.isOpen();
50
+ return jsxDEV_7x81h0kn("div", {
51
+ ref: ctx.contentRef,
52
+ role: "tooltip",
53
+ id: ctx.contentId,
54
+ "data-tooltip-content": "",
55
+ "aria-hidden": isOpen ? "false" : "true",
56
+ "data-state": isOpen ? "open" : "closed",
57
+ style: { display: isOpen ? "" : "none" },
58
+ class: cn(ctx.classes?.content, cls ?? classProp),
59
+ children
60
+ }, undefined, false, undefined, this);
61
+ }
62
+ function ComposedTooltipRoot({
63
+ children,
64
+ classes,
65
+ delay = 300,
66
+ positioning
67
+ }) {
68
+ const contentId = uniqueId("tooltip");
69
+ const contentRef = ref();
70
+ let isOpen = false;
71
+ const state = {
72
+ showTimeout: null,
73
+ floatingCleanup: null
74
+ };
75
+ function applyPositioning() {
76
+ const content = contentRef.current;
77
+ const triggerSpan = content?.parentElement?.querySelector("[data-tooltip-trigger]");
78
+ if (!triggerSpan || !content)
79
+ return;
80
+ const trigger = resolveLayoutElement(triggerSpan);
81
+ content.style.position = "fixed";
82
+ const floatingOpts = positioning ?? { placement: "top", offset: 4 };
83
+ const result = createFloatingPosition(trigger, content, floatingOpts);
84
+ state.floatingCleanup = result.cleanup;
85
+ }
86
+ function show() {
87
+ if (state.showTimeout !== null)
88
+ return;
89
+ state.showTimeout = setTimeout(() => {
90
+ state.showTimeout = null;
91
+ isOpen = true;
92
+ applyPositioning();
93
+ }, delay);
94
+ }
95
+ function hide() {
96
+ if (state.showTimeout !== null) {
97
+ clearTimeout(state.showTimeout);
98
+ state.showTimeout = null;
99
+ }
100
+ isOpen = false;
101
+ state.floatingCleanup?.();
102
+ state.floatingCleanup = null;
103
+ }
104
+ const ctx = {
105
+ isOpen: () => isOpen,
106
+ contentId,
107
+ contentRef,
108
+ classes,
109
+ show,
110
+ hide,
111
+ _triggerCount: { value: 0 },
112
+ _contentCount: { value: 0 }
113
+ };
114
+ return jsxDEV_7x81h0kn(TooltipContext.Provider, {
115
+ value: ctx,
116
+ children: jsxDEV_7x81h0kn("span", {
117
+ style: { display: "contents" },
118
+ "data-tooltip-root": "",
119
+ children
120
+ }, undefined, false, undefined, this)
121
+ }, undefined, false, undefined, this);
122
+ }
123
+ var ComposedTooltip = Object.assign(ComposedTooltipRoot, {
124
+ Trigger: TooltipTrigger,
125
+ Content: TooltipContent
126
+ });
127
+
128
+ export { ComposedTooltip };
@@ -0,0 +1,70 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-q7xbcj9q.js";
4
+
5
+ // src/breadcrumb/breadcrumb-composed.tsx
6
+ import { jsxDEV as jsxDEV_7x81h0kn } from "@vertz/ui/jsx-dev-runtime";
7
+ import { createContext, Link, useContext } from "@vertz/ui";
8
+ var BreadcrumbContext = createContext(undefined, "@vertz/ui-primitives::BreadcrumbContext");
9
+ function BreadcrumbItem({
10
+ children,
11
+ href,
12
+ current,
13
+ className,
14
+ class: classProp
15
+ }) {
16
+ const ctx = useContext(BreadcrumbContext);
17
+ const separatorText = ctx?.separator ?? "/";
18
+ if (href && current) {
19
+ console.warn('Breadcrumb.Item: both "href" and "current" are set. "current" takes precedence — the link will not render.');
20
+ }
21
+ const content = current ? jsxDEV_7x81h0kn("span", {
22
+ "aria-current": "page",
23
+ class: cn(ctx?.classes?.page, className ?? classProp),
24
+ children
25
+ }, undefined, false, undefined, this) : href ? jsxDEV_7x81h0kn(Link, {
26
+ href,
27
+ className: cn(ctx?.classes?.link, className ?? classProp),
28
+ children: children ?? ""
29
+ }, undefined, false, undefined, this) : jsxDEV_7x81h0kn("span", {
30
+ class: cn(ctx?.classes?.link, className ?? classProp),
31
+ children
32
+ }, undefined, false, undefined, this);
33
+ return jsxDEV_7x81h0kn("li", {
34
+ class: cn(ctx?.classes?.item),
35
+ children: [
36
+ jsxDEV_7x81h0kn("span", {
37
+ role: "presentation",
38
+ "aria-hidden": "true",
39
+ class: cn(ctx?.classes?.separator),
40
+ children: separatorText
41
+ }, undefined, false, undefined, this),
42
+ content
43
+ ]
44
+ }, undefined, true, undefined, this);
45
+ }
46
+ function ComposedBreadcrumbRoot({
47
+ children,
48
+ separator = "/",
49
+ classes,
50
+ className,
51
+ class: classProp
52
+ }) {
53
+ return jsxDEV_7x81h0kn(BreadcrumbContext.Provider, {
54
+ value: { classes, separator },
55
+ children: jsxDEV_7x81h0kn("nav", {
56
+ "aria-label": "Breadcrumb",
57
+ class: cn(classes?.nav, className ?? classProp),
58
+ children: jsxDEV_7x81h0kn("ol", {
59
+ class: cn(classes?.list),
60
+ style: { listStyle: "none", margin: "0", padding: "0" },
61
+ children
62
+ }, undefined, false, undefined, this)
63
+ }, undefined, false, undefined, this)
64
+ }, undefined, false, undefined, this);
65
+ }
66
+ var ComposedBreadcrumb = Object.assign(ComposedBreadcrumbRoot, {
67
+ Item: BreadcrumbItem
68
+ });
69
+
70
+ export { ComposedBreadcrumb };
@@ -0,0 +1,15 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-q7xbcj9q.js";
4
+
5
+ // src/input/input-composed.tsx
6
+ import { jsxDEV as jsxDEV_7x81h0kn } from "@vertz/ui/jsx-dev-runtime";
7
+ function ComposedInputRoot({ classes, className, class: classProp, ...props }) {
8
+ return jsxDEV_7x81h0kn("input", {
9
+ class: cn(classes?.base, className ?? classProp),
10
+ ...props
11
+ }, undefined, false, undefined, this);
12
+ }
13
+ var ComposedInput = ComposedInputRoot;
14
+
15
+ export { ComposedInput };
@@ -0,0 +1,113 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-q7xbcj9q.js";
4
+
5
+ // src/pagination/pagination-composed.tsx
6
+ import { jsxDEV as jsxDEV_7x81h0kn } from "@vertz/ui/jsx-dev-runtime";
7
+ function generatePaginationRange(current, total, siblings) {
8
+ const range = [];
9
+ const left = Math.max(2, current - siblings);
10
+ const right = Math.min(total - 1, current + siblings);
11
+ range.push(1);
12
+ if (left > 2) {
13
+ range.push("...");
14
+ }
15
+ for (let idx = left;idx <= right; idx++) {
16
+ if (idx !== 1 && idx !== total) {
17
+ range.push(idx);
18
+ }
19
+ }
20
+ if (right < total - 1) {
21
+ range.push("...");
22
+ }
23
+ if (total > 1) {
24
+ range.push(total);
25
+ }
26
+ return range;
27
+ }
28
+ function PageButton({ page, currentPage, onPageChange, classes }) {
29
+ if (page === currentPage) {
30
+ return jsxDEV_7x81h0kn("button", {
31
+ type: "button",
32
+ class: cn(classes?.linkActive),
33
+ "aria-current": "page",
34
+ children: String(page)
35
+ }, undefined, false, undefined, this);
36
+ }
37
+ return jsxDEV_7x81h0kn("button", {
38
+ type: "button",
39
+ class: cn(classes?.link),
40
+ onClick: () => onPageChange(page),
41
+ children: String(page)
42
+ }, undefined, false, undefined, this);
43
+ }
44
+ function buildPageItems(range, classes, currentPage, onPageChange, ellipsisContent) {
45
+ return range.map((page) => page === "..." ? jsxDEV_7x81h0kn("li", {
46
+ class: cn(classes?.item),
47
+ children: jsxDEV_7x81h0kn("span", {
48
+ "aria-hidden": "true",
49
+ class: cn(classes?.ellipsis),
50
+ children: ellipsisContent
51
+ }, undefined, false, undefined, this)
52
+ }, undefined, false, undefined, this) : jsxDEV_7x81h0kn("li", {
53
+ class: cn(classes?.item),
54
+ children: jsxDEV_7x81h0kn(PageButton, {
55
+ page,
56
+ currentPage,
57
+ onPageChange,
58
+ classes
59
+ }, undefined, false, undefined, this)
60
+ }, undefined, false, undefined, this));
61
+ }
62
+ function ComposedPaginationRoot({
63
+ currentPage,
64
+ totalPages,
65
+ onPageChange,
66
+ siblingCount = 1,
67
+ classes,
68
+ className,
69
+ class: classProp,
70
+ prevContent = "Previous",
71
+ nextContent = "Next",
72
+ ellipsisContent = "..."
73
+ }) {
74
+ const range = generatePaginationRange(currentPage, totalPages, siblingCount);
75
+ const pageItems = () => buildPageItems(range, classes, currentPage, onPageChange, ellipsisContent);
76
+ return jsxDEV_7x81h0kn("nav", {
77
+ "aria-label": "Pagination",
78
+ class: cn(classes?.nav, className ?? classProp),
79
+ children: jsxDEV_7x81h0kn("ul", {
80
+ class: cn(classes?.list),
81
+ children: [
82
+ jsxDEV_7x81h0kn("li", {
83
+ class: cn(classes?.item),
84
+ children: jsxDEV_7x81h0kn("button", {
85
+ type: "button",
86
+ class: cn(classes?.navButton),
87
+ style: { paddingLeft: "0.375rem", paddingRight: "0.625rem" },
88
+ "aria-label": "Previous page",
89
+ disabled: currentPage <= 1,
90
+ onClick: () => onPageChange(currentPage - 1),
91
+ children: prevContent
92
+ }, undefined, false, undefined, this)
93
+ }, undefined, false, undefined, this),
94
+ pageItems,
95
+ jsxDEV_7x81h0kn("li", {
96
+ class: cn(classes?.item),
97
+ children: jsxDEV_7x81h0kn("button", {
98
+ type: "button",
99
+ class: cn(classes?.navButton),
100
+ style: { paddingLeft: "0.625rem", paddingRight: "0.375rem" },
101
+ "aria-label": "Next page",
102
+ disabled: currentPage >= totalPages,
103
+ onClick: () => onPageChange(currentPage + 1),
104
+ children: nextContent
105
+ }, undefined, false, undefined, this)
106
+ }, undefined, false, undefined, this)
107
+ ]
108
+ }, undefined, true, undefined, this)
109
+ }, undefined, false, undefined, this);
110
+ }
111
+ var ComposedPagination = ComposedPaginationRoot;
112
+
113
+ export { ComposedPagination };
@@ -0,0 +1,157 @@
1
+ import {
2
+ createFloatingPosition
3
+ } from "./chunk-vef3sepw.js";
4
+ import {
5
+ uniqueId
6
+ } from "./chunk-8y1jf6xr.js";
7
+ import {
8
+ Keys,
9
+ isKey
10
+ } from "./chunk-7867pr13.js";
11
+ import {
12
+ setDataState,
13
+ setExpanded,
14
+ setHidden,
15
+ setHiddenAnimated
16
+ } from "./chunk-vevfhpc9.js";
17
+ import {
18
+ applyAttrs
19
+ } from "./chunk-2db2dnp3.js";
20
+
21
+ // src/hover-card/hover-card.tsx
22
+ import { jsxDEV as jsxDEV_7x81h0kn } from "@vertz/ui/jsx-dev-runtime";
23
+ import { signal } from "@vertz/ui";
24
+ function HoverCardRoot(options = {}) {
25
+ const { openDelay = 700, closeDelay = 300, onOpenChange, positioning, ...attrs } = options;
26
+ const contentId = uniqueId("hovercard");
27
+ const state = { open: signal(false) };
28
+ let openTimeout = null;
29
+ let closeTimeout = null;
30
+ let floatingCleanup = null;
31
+ function cancelTimers() {
32
+ if (openTimeout) {
33
+ clearTimeout(openTimeout);
34
+ openTimeout = null;
35
+ }
36
+ if (closeTimeout) {
37
+ clearTimeout(closeTimeout);
38
+ closeTimeout = null;
39
+ }
40
+ }
41
+ function cancelCloseTimer() {
42
+ if (closeTimeout) {
43
+ clearTimeout(closeTimeout);
44
+ closeTimeout = null;
45
+ }
46
+ }
47
+ function positionContent() {
48
+ if (positioning) {
49
+ floatingCleanup?.();
50
+ const effectivePlacement = positioning.placement ?? "bottom";
51
+ const result = createFloatingPosition(trigger, content, {
52
+ ...positioning,
53
+ placement: effectivePlacement
54
+ });
55
+ floatingCleanup = result.cleanup;
56
+ }
57
+ }
58
+ function show() {
59
+ cancelTimers();
60
+ if (state.open.peek())
61
+ return;
62
+ openTimeout = setTimeout(() => {
63
+ state.open.value = true;
64
+ setExpanded(trigger, true);
65
+ setHidden(content, false);
66
+ setDataState(content, "open");
67
+ positionContent();
68
+ onOpenChange?.(true);
69
+ openTimeout = null;
70
+ }, openDelay);
71
+ }
72
+ function showImmediate() {
73
+ cancelTimers();
74
+ state.open.value = true;
75
+ setExpanded(trigger, true);
76
+ setHidden(content, false);
77
+ setDataState(content, "open");
78
+ positionContent();
79
+ onOpenChange?.(true);
80
+ }
81
+ function hide() {
82
+ cancelTimers();
83
+ if (!state.open.peek())
84
+ return;
85
+ closeTimeout = setTimeout(() => {
86
+ state.open.value = false;
87
+ setExpanded(trigger, false);
88
+ setDataState(content, "closed");
89
+ setHiddenAnimated(content, true);
90
+ floatingCleanup?.();
91
+ floatingCleanup = null;
92
+ onOpenChange?.(false);
93
+ closeTimeout = null;
94
+ }, closeDelay);
95
+ }
96
+ function hideImmediate() {
97
+ cancelTimers();
98
+ state.open.value = false;
99
+ setExpanded(trigger, false);
100
+ setDataState(content, "closed");
101
+ setHiddenAnimated(content, true);
102
+ floatingCleanup?.();
103
+ floatingCleanup = null;
104
+ onOpenChange?.(false);
105
+ }
106
+ function handleTriggerBlur(event) {
107
+ const related = event.relatedTarget;
108
+ if (related && (trigger.contains(related) || content.contains(related)))
109
+ return;
110
+ hide();
111
+ }
112
+ function handleTriggerKeydown(event) {
113
+ if (isKey(event, Keys.Escape) && state.open.peek()) {
114
+ hideImmediate();
115
+ }
116
+ }
117
+ function handleContentFocusout(event) {
118
+ const related = event.relatedTarget;
119
+ if (related && (trigger.contains(related) || content.contains(related)))
120
+ return;
121
+ hide();
122
+ }
123
+ function handleContentKeydown(event) {
124
+ if (isKey(event, Keys.Escape)) {
125
+ hideImmediate();
126
+ trigger.focus();
127
+ }
128
+ }
129
+ const trigger = jsxDEV_7x81h0kn("span", {
130
+ "aria-haspopup": "dialog",
131
+ "aria-expanded": "false",
132
+ onMouseenter: show,
133
+ onMouseleave: hide,
134
+ onFocus: showImmediate,
135
+ onBlur: handleTriggerBlur,
136
+ onKeydown: handleTriggerKeydown
137
+ }, undefined, false, undefined, this);
138
+ const content = jsxDEV_7x81h0kn("div", {
139
+ role: "dialog",
140
+ id: contentId,
141
+ "aria-hidden": "true",
142
+ "data-state": "closed",
143
+ style: { display: "none" },
144
+ onMouseenter: cancelCloseTimer,
145
+ onMouseleave: hide,
146
+ onFocusin: cancelCloseTimer,
147
+ onFocusout: handleContentFocusout,
148
+ onKeydown: handleContentKeydown
149
+ }, undefined, false, undefined, this);
150
+ applyAttrs(trigger, attrs);
151
+ return { trigger, content, state };
152
+ }
153
+ var HoverCard = {
154
+ Root: HoverCardRoot
155
+ };
156
+
157
+ export { HoverCard };
@@ -0,0 +1,140 @@
1
+ import {
2
+ applyAttrs
3
+ } from "./chunk-2db2dnp3.js";
4
+
5
+ // src/scroll-area/scroll-area.tsx
6
+ import { jsxDEV as jsxDEV_7x81h0kn } from "@vertz/ui/jsx-dev-runtime";
7
+ import { signal } from "@vertz/ui";
8
+ function ScrollAreaRoot(options = {}) {
9
+ const { orientation = "vertical", type: _type, ...attrs } = options;
10
+ const state = {
11
+ scrollTop: signal(0),
12
+ scrollLeft: signal(0)
13
+ };
14
+ let isDraggingY = false;
15
+ let startY = 0;
16
+ let startScrollTop = 0;
17
+ let isDraggingX = false;
18
+ let startX = 0;
19
+ let startScrollLeft = 0;
20
+ function syncThumbY() {
21
+ const { scrollTop, scrollHeight, clientHeight } = viewport;
22
+ if (scrollHeight <= clientHeight) {
23
+ thumbY.style.height = "0";
24
+ return;
25
+ }
26
+ const ratio = clientHeight / scrollHeight;
27
+ thumbY.style.height = `${ratio * 100}%`;
28
+ const scrollRatio = scrollTop / (scrollHeight - clientHeight);
29
+ thumbY.style.transform = `translateY(${scrollRatio * (1 / ratio - 1) * 100}%)`;
30
+ state.scrollTop.value = scrollTop;
31
+ }
32
+ function syncThumbX() {
33
+ const { scrollLeft, scrollWidth, clientWidth } = viewport;
34
+ if (scrollWidth <= clientWidth) {
35
+ thumbX.style.width = "0";
36
+ return;
37
+ }
38
+ const ratio = clientWidth / scrollWidth;
39
+ thumbX.style.width = `${ratio * 100}%`;
40
+ const scrollRatio = scrollLeft / (scrollWidth - clientWidth);
41
+ thumbX.style.transform = `translateX(${scrollRatio * (1 / ratio - 1) * 100}%)`;
42
+ state.scrollLeft.value = scrollLeft;
43
+ }
44
+ function update() {
45
+ syncThumbY();
46
+ syncThumbX();
47
+ }
48
+ function handleViewportScroll() {
49
+ if (orientation === "vertical" || orientation === "both")
50
+ syncThumbY();
51
+ if (orientation === "horizontal" || orientation === "both")
52
+ syncThumbX();
53
+ }
54
+ function handleThumbYDown(e) {
55
+ isDraggingY = true;
56
+ startY = e.clientY;
57
+ startScrollTop = viewport.scrollTop;
58
+ thumbY.setPointerCapture(e.pointerId);
59
+ e.preventDefault();
60
+ }
61
+ function handleThumbYMove(e) {
62
+ if (!isDraggingY)
63
+ return;
64
+ const delta = e.clientY - startY;
65
+ const scrollbarHeight = scrollbarY.clientHeight;
66
+ const scrollRange = viewport.scrollHeight - viewport.clientHeight;
67
+ if (scrollbarHeight > 0) {
68
+ viewport.scrollTop = startScrollTop + delta / scrollbarHeight * scrollRange;
69
+ }
70
+ }
71
+ function handleThumbYUp(e) {
72
+ isDraggingY = false;
73
+ thumbY.releasePointerCapture(e.pointerId);
74
+ }
75
+ function handleThumbXDown(e) {
76
+ isDraggingX = true;
77
+ startX = e.clientX;
78
+ startScrollLeft = viewport.scrollLeft;
79
+ thumbX.setPointerCapture(e.pointerId);
80
+ e.preventDefault();
81
+ }
82
+ function handleThumbXMove(e) {
83
+ if (!isDraggingX)
84
+ return;
85
+ const delta = e.clientX - startX;
86
+ const scrollbarWidth = scrollbarX.clientWidth;
87
+ const scrollRange = viewport.scrollWidth - viewport.clientWidth;
88
+ if (scrollbarWidth > 0) {
89
+ viewport.scrollLeft = startScrollLeft + delta / scrollbarWidth * scrollRange;
90
+ }
91
+ }
92
+ function handleThumbXUp(e) {
93
+ isDraggingX = false;
94
+ thumbX.releasePointerCapture(e.pointerId);
95
+ }
96
+ const thumbY = jsxDEV_7x81h0kn("div", {
97
+ onPointerdown: handleThumbYDown,
98
+ onPointermove: handleThumbYMove,
99
+ onPointerup: handleThumbYUp
100
+ }, undefined, false, undefined, this);
101
+ const scrollbarY = jsxDEV_7x81h0kn("div", {
102
+ "aria-hidden": "true",
103
+ "data-orientation": "vertical",
104
+ children: thumbY
105
+ }, undefined, false, undefined, this);
106
+ const thumbX = jsxDEV_7x81h0kn("div", {
107
+ onPointerdown: handleThumbXDown,
108
+ onPointermove: handleThumbXMove,
109
+ onPointerup: handleThumbXUp
110
+ }, undefined, false, undefined, this);
111
+ const scrollbarX = jsxDEV_7x81h0kn("div", {
112
+ "aria-hidden": "true",
113
+ "data-orientation": "horizontal",
114
+ children: thumbX
115
+ }, undefined, false, undefined, this);
116
+ const content = jsxDEV_7x81h0kn("div", {}, undefined, false, undefined, this);
117
+ const showY = orientation === "vertical" || orientation === "both";
118
+ const showX = orientation === "horizontal" || orientation === "both";
119
+ const viewport = jsxDEV_7x81h0kn("div", {
120
+ style: { overflow: "scroll" },
121
+ onScroll: handleViewportScroll,
122
+ children: content
123
+ }, undefined, false, undefined, this);
124
+ viewport.style.scrollbarWidth = "none";
125
+ const root = jsxDEV_7x81h0kn("div", {
126
+ style: { position: "relative", overflow: "hidden" },
127
+ children: [
128
+ viewport,
129
+ showY && scrollbarY,
130
+ showX && scrollbarX
131
+ ]
132
+ }, undefined, true, undefined, this);
133
+ applyAttrs(root, attrs);
134
+ return { root, viewport, content, scrollbarY, thumbY, scrollbarX, thumbX, state, update };
135
+ }
136
+ var ScrollArea = {
137
+ Root: ScrollAreaRoot
138
+ };
139
+
140
+ export { ScrollArea };