@vertz/ui-primitives 0.2.22 → 0.2.24

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 (236) hide show
  1. package/dist/shared/chunk-00fqgnq1.js +218 -0
  2. package/dist/shared/chunk-1hm0mbke.js +258 -0
  3. package/dist/shared/chunk-20kwns82.js +293 -0
  4. package/dist/shared/chunk-3jack97k.js +509 -0
  5. package/dist/shared/chunk-455p0jbk.js +241 -0
  6. package/dist/shared/chunk-4gyg71bn.js +178 -0
  7. package/dist/shared/chunk-4z006v1j.js +467 -0
  8. package/dist/shared/chunk-585ysr70.js +149 -0
  9. package/dist/shared/chunk-67sn29eh.js +125 -0
  10. package/dist/shared/chunk-75pegjs7.js +26 -0
  11. package/dist/shared/chunk-7a2nqmeh.js +167 -0
  12. package/dist/shared/chunk-7wem1bhb.js +252 -0
  13. package/dist/shared/chunk-8evj43jn.js +284 -0
  14. package/dist/shared/chunk-8t0nm721.js +152 -0
  15. package/dist/shared/chunk-94twh4s4.js +28 -0
  16. package/dist/shared/chunk-98y1sw9y.js +398 -0
  17. package/dist/shared/chunk-99tk72t3.js +69 -0
  18. package/dist/shared/chunk-9eedsnnk.js +164 -0
  19. package/dist/shared/chunk-9hv3vc72.js +215 -0
  20. package/dist/shared/chunk-aa3w85hn.js +321 -0
  21. package/dist/shared/chunk-axpbdpgx.js +177 -0
  22. package/dist/shared/chunk-b4zzg457.js +410 -0
  23. package/dist/shared/chunk-brk0drrk.js +202 -0
  24. package/dist/shared/chunk-czv0kqj4.js +107 -0
  25. package/dist/shared/chunk-d83ag07h.js +189 -0
  26. package/dist/shared/chunk-de18ashk.js +134 -0
  27. package/dist/shared/chunk-dvk4h36t.js +140 -0
  28. package/dist/shared/chunk-e1jcf22s.js +79 -0
  29. package/dist/shared/chunk-e3h0ddmx.js +168 -0
  30. package/dist/shared/chunk-e6660g7e.js +179 -0
  31. package/dist/shared/chunk-eq4d9b0w.js +147 -0
  32. package/dist/shared/chunk-ev367pq3.js +102 -0
  33. package/dist/shared/chunk-f0wy7k56.js +183 -0
  34. package/dist/shared/chunk-fjykbv0v.js +214 -0
  35. package/dist/shared/chunk-ghkw5bjq.js +55 -0
  36. package/dist/shared/chunk-gqb1n1hj.js +60 -0
  37. package/dist/shared/chunk-hdvdfd1c.js +96 -0
  38. package/dist/shared/chunk-hfjtkytb.js +310 -0
  39. package/dist/shared/chunk-hpvjfj0j.js +31 -0
  40. package/dist/shared/chunk-hxmxvp56.js +67 -0
  41. package/dist/shared/chunk-j9m2f0rd.js +162 -0
  42. package/dist/shared/chunk-jdygp28a.js +260 -0
  43. package/dist/shared/chunk-jpyjk616.js +52 -0
  44. package/dist/shared/chunk-jqre4qtw.js +180 -0
  45. package/dist/shared/{chunk-myq79qew.js → chunk-jsa3byag.js} +48 -28
  46. package/dist/shared/chunk-jzy1bkdk.js +203 -0
  47. package/dist/shared/chunk-knzg86am.js +168 -0
  48. package/dist/shared/chunk-kskxxc2q.js +228 -0
  49. package/dist/shared/chunk-metxdt5x.js +28 -0
  50. package/dist/shared/chunk-mhn2aazf.js +353 -0
  51. package/dist/shared/chunk-mtx2cfbx.js +175 -0
  52. package/dist/shared/chunk-nj420k31.js +54 -0
  53. package/dist/shared/chunk-nsmvdxgp.js +213 -0
  54. package/dist/shared/{chunk-w9dag6ce.js → chunk-pdzmg245.js} +133 -85
  55. package/dist/shared/chunk-pzknpa1y.js +327 -0
  56. package/dist/shared/chunk-q1ff3xp3.js +95 -0
  57. package/dist/shared/chunk-q7xbcj9q.js +7 -0
  58. package/dist/shared/chunk-qhnany7w.js +179 -0
  59. package/dist/shared/chunk-qrm43tr3.js +357 -0
  60. package/dist/shared/{chunk-jda3v59q.js → chunk-qsp7sfhp.js} +2 -2
  61. package/dist/shared/{chunk-dhyr0s9n.js → chunk-qwqnjjg8.js} +1 -1
  62. package/dist/shared/chunk-r0rz7z03.js +266 -0
  63. package/dist/shared/chunk-r3ngaa64.js +418 -0
  64. package/dist/shared/chunk-r3pffzss.js +13 -0
  65. package/dist/shared/chunk-rrt62bp0.js +353 -0
  66. package/dist/shared/chunk-s24gkmna.js +131 -0
  67. package/dist/shared/chunk-s62e7jf4.js +30 -0
  68. package/dist/shared/chunk-spng4yb9.js +73 -0
  69. package/dist/shared/chunk-tn0m98j8.js +42 -0
  70. package/dist/shared/chunk-v0b5pkcq.js +30 -0
  71. package/dist/shared/chunk-v11kd39k.js +162 -0
  72. package/dist/shared/{chunk-0mcr52hc.js → chunk-vef3sepw.js} +17 -1
  73. package/dist/shared/chunk-vkscwzpr.js +294 -0
  74. package/dist/shared/chunk-vv187snj.js +112 -0
  75. package/dist/shared/chunk-vy874zxe.js +68 -0
  76. package/dist/shared/chunk-wqsek87j.js +311 -0
  77. package/dist/shared/chunk-wtkxz2te.js +157 -0
  78. package/dist/shared/chunk-y1hpsqzy.js +185 -0
  79. package/dist/shared/chunk-y4mmmayp.js +206 -0
  80. package/dist/shared/chunk-yfzddvxc.js +71 -0
  81. package/dist/src/accordion/accordion-composed.d.ts +30 -0
  82. package/dist/src/accordion/accordion-composed.js +6 -0
  83. package/dist/src/accordion/accordion.js +1 -1
  84. package/dist/src/alert/alert-composed.d.ts +26 -0
  85. package/dist/src/alert/alert-composed.js +6 -0
  86. package/dist/src/alert-dialog/alert-dialog-composed.d.ts +40 -0
  87. package/dist/src/alert-dialog/alert-dialog-composed.js +6 -0
  88. package/dist/src/alert-dialog/alert-dialog.js +1 -1
  89. package/dist/src/avatar/avatar-composed.d.ts +33 -0
  90. package/dist/src/avatar/avatar-composed.js +6 -0
  91. package/dist/src/badge/badge-composed.d.ts +33 -0
  92. package/dist/src/badge/badge-composed.js +6 -0
  93. package/dist/src/badge/badge.js +1 -1
  94. package/dist/src/breadcrumb/breadcrumb-composed.d.ts +34 -0
  95. package/dist/src/breadcrumb/breadcrumb-composed.js +6 -0
  96. package/dist/src/button/button-composed.d.ts +34 -0
  97. package/dist/src/button/button-composed.js +6 -0
  98. package/dist/src/button/button.js +1 -1
  99. package/dist/src/calendar/calendar-composed.d.ts +42 -0
  100. package/dist/src/calendar/calendar-composed.js +6 -0
  101. package/dist/src/calendar/calendar.js +1 -1
  102. package/dist/src/card/card-composed.d.ts +34 -0
  103. package/dist/src/card/card-composed.js +6 -0
  104. package/dist/src/carousel/carousel-composed.d.ts +32 -0
  105. package/dist/src/carousel/carousel-composed.js +6 -0
  106. package/dist/src/carousel/carousel.js +1 -1
  107. package/dist/src/checkbox/checkbox-composed.d.ts +18 -0
  108. package/dist/src/checkbox/checkbox-composed.js +6 -0
  109. package/dist/src/checkbox/checkbox.js +1 -1
  110. package/dist/src/collapsible/collapsible-composed.d.ts +26 -0
  111. package/dist/src/collapsible/collapsible-composed.js +6 -0
  112. package/dist/src/collapsible/collapsible.js +1 -1
  113. package/dist/src/combobox/combobox-composed.d.ts +30 -0
  114. package/dist/src/combobox/combobox-composed.js +6 -0
  115. package/dist/src/combobox/combobox.js +1 -1
  116. package/dist/src/command/command-composed.d.ts +67 -0
  117. package/dist/src/command/command-composed.js +6 -0
  118. package/dist/src/command/command.js +1 -1
  119. package/dist/src/composed/with-styles.d.ts +38 -0
  120. package/dist/src/composed/with-styles.js +6 -0
  121. package/dist/src/context-menu/context-menu-composed.d.ts +51 -0
  122. package/dist/src/context-menu/context-menu-composed.js +6 -0
  123. package/dist/src/context-menu/context-menu.js +1 -1
  124. package/dist/src/date-picker/date-picker-composed.d.ts +77 -0
  125. package/dist/src/date-picker/date-picker-composed.js +6 -0
  126. package/dist/src/date-picker/date-picker.js +1 -1
  127. package/dist/src/dialog/dialog-composed.d.ts +36 -0
  128. package/dist/src/dialog/dialog-composed.js +6 -0
  129. package/dist/src/dialog/dialog-stack-parts.d.ts +16 -0
  130. package/dist/src/dialog/dialog-stack-parts.js +18 -0
  131. package/dist/src/dialog/dialog.js +1 -1
  132. package/dist/src/dropdown-menu/dropdown-menu-composed.d.ts +51 -0
  133. package/dist/src/dropdown-menu/dropdown-menu-composed.js +6 -0
  134. package/dist/src/dropdown-menu/dropdown-menu.js +1 -1
  135. package/dist/src/empty-state/empty-state-composed.d.ts +30 -0
  136. package/dist/src/empty-state/empty-state-composed.js +6 -0
  137. package/dist/src/form-group/form-group-composed.d.ts +24 -0
  138. package/dist/src/form-group/form-group-composed.js +6 -0
  139. package/dist/src/hover-card/hover-card-composed.d.ts +38 -0
  140. package/dist/src/hover-card/hover-card-composed.js +6 -0
  141. package/dist/src/hover-card/hover-card.js +1 -1
  142. package/dist/src/index.d.ts +1284 -804
  143. package/dist/src/index.js +78 -5281
  144. package/dist/src/input/input-composed.d.ts +35 -0
  145. package/dist/src/input/input-composed.js +6 -0
  146. package/dist/src/label/label-composed.d.ts +32 -0
  147. package/dist/src/label/label-composed.js +6 -0
  148. package/dist/src/menu/menu-composed.d.ts +51 -0
  149. package/dist/src/menu/menu-composed.js +6 -0
  150. package/dist/src/menu/menu.js +1 -1
  151. package/dist/src/menubar/menubar-composed.d.ts +56 -0
  152. package/dist/src/menubar/menubar-composed.js +6 -0
  153. package/dist/src/menubar/menubar.js +1 -1
  154. package/dist/src/navigation-menu/navigation-menu-composed.d.ts +56 -0
  155. package/dist/src/navigation-menu/navigation-menu-composed.js +6 -0
  156. package/dist/src/navigation-menu/navigation-menu.js +1 -1
  157. package/dist/src/pagination/pagination-composed.d.ts +30 -0
  158. package/dist/src/pagination/pagination-composed.js +6 -0
  159. package/dist/src/popover/popover-composed.d.ts +36 -0
  160. package/dist/src/popover/popover-composed.js +6 -0
  161. package/dist/src/popover/popover.js +1 -1
  162. package/dist/src/progress/progress-composed.d.ts +17 -0
  163. package/dist/src/progress/progress-composed.js +6 -0
  164. package/dist/src/progress/progress.js +1 -1
  165. package/dist/src/radio/radio-composed.d.ts +24 -0
  166. package/dist/src/radio/radio-composed.js +6 -0
  167. package/dist/src/radio/radio.js +1 -1
  168. package/dist/src/resizable-panel/resizable-panel-composed.d.ts +33 -0
  169. package/dist/src/resizable-panel/resizable-panel-composed.js +6 -0
  170. package/dist/src/resizable-panel/resizable-panel.js +1 -1
  171. package/dist/src/scroll-area/scroll-area-composed.d.ts +17 -0
  172. package/dist/src/scroll-area/scroll-area-composed.js +6 -0
  173. package/dist/src/scroll-area/scroll-area.js +1 -1
  174. package/dist/src/select/select-composed.d.ts +53 -0
  175. package/dist/src/select/select-composed.js +6 -0
  176. package/dist/src/select/select.js +1 -1
  177. package/dist/src/separator/separator-composed.d.ts +32 -0
  178. package/dist/src/separator/separator-composed.js +6 -0
  179. package/dist/src/sheet/sheet-composed.d.ts +34 -0
  180. package/dist/src/sheet/sheet-composed.js +6 -0
  181. package/dist/src/sheet/sheet.js +1 -1
  182. package/dist/src/skeleton/skeleton-composed.d.ts +65 -0
  183. package/dist/src/skeleton/skeleton-composed.js +6 -0
  184. package/dist/src/slider/slider-composed.d.ts +22 -0
  185. package/dist/src/slider/slider-composed.js +6 -0
  186. package/dist/src/slider/slider.js +1 -1
  187. package/dist/src/switch/switch-composed.d.ts +17 -0
  188. package/dist/src/switch/switch-composed.js +6 -0
  189. package/dist/src/switch/switch.js +1 -1
  190. package/dist/src/table/table-composed.d.ts +34 -0
  191. package/dist/src/table/table-composed.js +6 -0
  192. package/dist/src/tabs/tabs-composed.d.ts +33 -0
  193. package/dist/src/tabs/tabs-composed.js +6 -0
  194. package/dist/src/tabs/tabs.js +1 -1
  195. package/dist/src/textarea/textarea-composed.d.ts +35 -0
  196. package/dist/src/textarea/textarea-composed.js +6 -0
  197. package/dist/src/toast/toast.js +1 -1
  198. package/dist/src/toggle/toggle-composed.d.ts +16 -0
  199. package/dist/src/toggle/toggle-composed.js +6 -0
  200. package/dist/src/toggle/toggle.js +1 -1
  201. package/dist/src/toggle-group/toggle-group-composed.d.ts +24 -0
  202. package/dist/src/toggle-group/toggle-group-composed.js +6 -0
  203. package/dist/src/toggle-group/toggle-group.js +1 -1
  204. package/dist/src/tooltip/tooltip-composed.d.ts +36 -0
  205. package/dist/src/tooltip/tooltip-composed.js +6 -0
  206. package/dist/src/tooltip/tooltip.js +1 -1
  207. package/dist/src/utils.js +1 -1
  208. package/package.json +3 -3
  209. package/dist/shared/chunk-07yzsaaw.js +0 -165
  210. package/dist/shared/chunk-279bzynx.js +0 -132
  211. package/dist/shared/chunk-27xs9apd.js +0 -288
  212. package/dist/shared/chunk-2k8gxzdf.js +0 -151
  213. package/dist/shared/chunk-3rp73gkd.js +0 -175
  214. package/dist/shared/chunk-4rf1m34c.js +0 -267
  215. package/dist/shared/chunk-56reyd5r.js +0 -64
  216. package/dist/shared/chunk-7bxsf80c.js +0 -60
  217. package/dist/shared/chunk-8qtexw5s.js +0 -199
  218. package/dist/shared/chunk-9ezgd78r.js +0 -142
  219. package/dist/shared/chunk-ajpj10z0.js +0 -282
  220. package/dist/shared/chunk-c46v0fsw.js +0 -117
  221. package/dist/shared/chunk-e4mm5e59.js +0 -178
  222. package/dist/shared/chunk-fqa5bwn1.js +0 -128
  223. package/dist/shared/chunk-g8hnc95b.js +0 -219
  224. package/dist/shared/chunk-j2tdpxgc.js +0 -185
  225. package/dist/shared/chunk-k8nabsxm.js +0 -330
  226. package/dist/shared/chunk-kcnq15je.js +0 -175
  227. package/dist/shared/chunk-mqs4qq0b.js +0 -46
  228. package/dist/shared/chunk-pg2yjn8f.js +0 -88
  229. package/dist/shared/chunk-rb53v045.js +0 -71
  230. package/dist/shared/chunk-s6a2yph8.js +0 -239
  231. package/dist/shared/chunk-vhx3sqw6.js +0 -196
  232. package/dist/shared/chunk-w318par6.js +0 -204
  233. package/dist/shared/chunk-wcdq7bew.js +0 -133
  234. package/dist/shared/chunk-z0gwkzgp.js +0 -34
  235. package/dist/shared/chunk-z850et33.js +0 -161
  236. package/dist/shared/chunk-zyfc6cx3.js +0 -61
@@ -0,0 +1,34 @@
1
+ type SheetSide = "left" | "right" | "top" | "bottom";
2
+ import { ChildValue } from "@vertz/ui";
3
+ interface SheetClasses {
4
+ overlay?: string;
5
+ content?: string;
6
+ title?: string;
7
+ description?: string;
8
+ close?: string;
9
+ }
10
+ interface SlotProps {
11
+ children?: ChildValue;
12
+ className?: string;
13
+ /** @deprecated Use `className` instead. */
14
+ class?: string;
15
+ }
16
+ interface SheetContentProps extends SlotProps {
17
+ showClose?: boolean;
18
+ }
19
+ interface ComposedSheetProps {
20
+ children?: ChildValue;
21
+ classes?: SheetClasses;
22
+ side?: SheetSide;
23
+ onOpenChange?: (open: boolean) => void;
24
+ }
25
+ type SheetClassKey = keyof SheetClasses;
26
+ declare const ComposedSheet: ((props: ComposedSheetProps) => HTMLElement) & {
27
+ __classKeys?: SheetClassKey;
28
+ Trigger: (props: SlotProps) => HTMLElement;
29
+ Content: (props: SheetContentProps) => HTMLElement;
30
+ Title: (props: SlotProps) => HTMLElement;
31
+ Description: (props: SlotProps) => HTMLElement;
32
+ Close: (props: SlotProps) => HTMLElement;
33
+ };
34
+ export { SheetClasses, SheetClassKey, ComposedSheetProps, ComposedSheet };
@@ -0,0 +1,6 @@
1
+ import {
2
+ ComposedSheet
3
+ } from "../../shared/chunk-vkscwzpr.js";
4
+ export {
5
+ ComposedSheet
6
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Sheet
3
- } from "../../shared/chunk-3rp73gkd.js";
3
+ } from "../../shared/chunk-jqre4qtw.js";
4
4
  export {
5
5
  Sheet
6
6
  };
@@ -0,0 +1,65 @@
1
+ import { ChildValue } from "@vertz/ui";
2
+ /**
3
+ * A composed primitive is a callable function with phantom brands
4
+ * that define the valid class keys and element return type for that component.
5
+ */
6
+ interface ComposedPrimitive<
7
+ K extends string = string,
8
+ E extends Element = HTMLElement
9
+ > {
10
+ (props: {
11
+ children?: ChildValue;
12
+ classes?: Partial<Record<K, string>>;
13
+ [key: string]: unknown;
14
+ }): E;
15
+ __classKeys?: K;
16
+ __elementType?: E;
17
+ }
18
+ interface SkeletonClasses {
19
+ root?: string;
20
+ }
21
+ type SkeletonClassKey = keyof SkeletonClasses;
22
+ interface ComposedSkeletonProps {
23
+ classes?: SkeletonClasses;
24
+ className?: string;
25
+ /** @deprecated Use `className` instead. */
26
+ class?: string;
27
+ width?: string;
28
+ height?: string;
29
+ }
30
+ interface SkeletonTextClasses {
31
+ root?: string;
32
+ line?: string;
33
+ }
34
+ type SkeletonTextClassKey = keyof SkeletonTextClasses;
35
+ interface ComposedSkeletonTextProps {
36
+ classes?: SkeletonTextClasses;
37
+ className?: string;
38
+ /** @deprecated Use `className` instead. */
39
+ class?: string;
40
+ /** Number of lines to render. Default: 3 */
41
+ lines?: number;
42
+ /** Width of the last line. Default: '75%' */
43
+ lastLineWidth?: string;
44
+ /** Height of each line. Default: '1rem' */
45
+ height?: string;
46
+ /** Gap between lines. Overrides the CSS class gap when provided. */
47
+ gap?: string;
48
+ }
49
+ interface SkeletonCircleClasses {
50
+ root?: string;
51
+ }
52
+ type SkeletonCircleClassKey = keyof SkeletonCircleClasses;
53
+ interface ComposedSkeletonCircleProps {
54
+ classes?: SkeletonCircleClasses;
55
+ className?: string;
56
+ /** @deprecated Use `className` instead. */
57
+ class?: string;
58
+ /** Diameter. Default: '2.5rem' */
59
+ size?: string;
60
+ }
61
+ declare const ComposedSkeleton: ComposedPrimitive<SkeletonClassKey, HTMLElement> & {
62
+ Text: ComposedPrimitive<SkeletonTextClassKey, HTMLElement>;
63
+ Circle: ComposedPrimitive<SkeletonCircleClassKey, HTMLElement>;
64
+ };
65
+ export { SkeletonTextClasses, SkeletonTextClassKey, SkeletonClasses, SkeletonClassKey, SkeletonCircleClasses, SkeletonCircleClassKey, ComposedSkeletonTextProps, ComposedSkeletonProps, ComposedSkeletonCircleProps, ComposedSkeleton };
@@ -0,0 +1,6 @@
1
+ import {
2
+ ComposedSkeleton
3
+ } from "../../shared/chunk-czv0kqj4.js";
4
+ export {
5
+ ComposedSkeleton
6
+ };
@@ -0,0 +1,22 @@
1
+ import { ChildValue } from "@vertz/ui";
2
+ interface SliderClasses {
3
+ root?: string;
4
+ track?: string;
5
+ range?: string;
6
+ thumb?: string;
7
+ }
8
+ type SliderClassKey = keyof SliderClasses;
9
+ interface ComposedSliderProps {
10
+ children?: ChildValue;
11
+ classes?: SliderClasses;
12
+ defaultValue?: number;
13
+ min?: number;
14
+ max?: number;
15
+ step?: number;
16
+ disabled?: boolean;
17
+ onValueChange?: (value: number) => void;
18
+ }
19
+ declare const ComposedSlider: ((props: ComposedSliderProps) => HTMLElement) & {
20
+ __classKeys?: SliderClassKey;
21
+ };
22
+ export { SliderClasses, SliderClassKey, ComposedSliderProps, ComposedSlider };
@@ -0,0 +1,6 @@
1
+ import {
2
+ ComposedSlider
3
+ } from "../../shared/chunk-wtkxz2te.js";
4
+ export {
5
+ ComposedSlider
6
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Slider
3
- } from "../../shared/chunk-2k8gxzdf.js";
3
+ } from "../../shared/chunk-e3h0ddmx.js";
4
4
  export {
5
5
  Slider
6
6
  };
@@ -0,0 +1,17 @@
1
+ import { ChildValue } from "@vertz/ui";
2
+ interface SwitchClasses {
3
+ root?: string;
4
+ thumb?: string;
5
+ }
6
+ type SwitchClassKey = keyof SwitchClasses;
7
+ interface ComposedSwitchProps {
8
+ children?: ChildValue;
9
+ classes?: SwitchClasses;
10
+ defaultChecked?: boolean;
11
+ disabled?: boolean;
12
+ onCheckedChange?: (checked: boolean) => void;
13
+ }
14
+ declare const ComposedSwitch: ((props: ComposedSwitchProps) => HTMLElement) & {
15
+ __classKeys?: SwitchClassKey;
16
+ };
17
+ export { SwitchClasses, SwitchClassKey, ComposedSwitchProps, ComposedSwitch };
@@ -0,0 +1,6 @@
1
+ import {
2
+ ComposedSwitch
3
+ } from "../../shared/chunk-hxmxvp56.js";
4
+ export {
5
+ ComposedSwitch
6
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Switch
3
- } from "../../shared/chunk-zyfc6cx3.js";
3
+ } from "../../shared/chunk-99tk72t3.js";
4
4
  export {
5
5
  Switch
6
6
  };
@@ -0,0 +1,34 @@
1
+ import { ChildValue } from "@vertz/ui";
2
+ interface TableClasses {
3
+ root?: string;
4
+ header?: string;
5
+ body?: string;
6
+ row?: string;
7
+ head?: string;
8
+ cell?: string;
9
+ caption?: string;
10
+ footer?: string;
11
+ }
12
+ type TableClassKey = keyof TableClasses;
13
+ interface SlotProps {
14
+ children?: ChildValue;
15
+ className?: string;
16
+ class?: string;
17
+ }
18
+ interface ComposedTableProps {
19
+ children?: ChildValue;
20
+ classes?: TableClasses;
21
+ className?: string;
22
+ class?: string;
23
+ }
24
+ declare const ComposedTable: ((props: ComposedTableProps) => HTMLElement) & {
25
+ __classKeys?: TableClassKey;
26
+ Header: (props: SlotProps) => HTMLElement;
27
+ Body: (props: SlotProps) => HTMLElement;
28
+ Row: (props: SlotProps) => HTMLElement;
29
+ Head: (props: SlotProps) => HTMLElement;
30
+ Cell: (props: SlotProps) => HTMLElement;
31
+ Caption: (props: SlotProps) => HTMLElement;
32
+ Footer: (props: SlotProps) => HTMLElement;
33
+ };
34
+ export { TableClasses, TableClassKey, ComposedTableProps, ComposedTable };
@@ -0,0 +1,6 @@
1
+ import {
2
+ ComposedTable
3
+ } from "../../shared/chunk-d83ag07h.js";
4
+ export {
5
+ ComposedTable
6
+ };
@@ -0,0 +1,33 @@
1
+ import { ChildValue } from "@vertz/ui";
2
+ interface TabsClasses {
3
+ list?: string;
4
+ trigger?: string;
5
+ panel?: string;
6
+ }
7
+ interface SlotProps {
8
+ children?: ChildValue;
9
+ className?: string;
10
+ /** @deprecated Use `className` instead. */
11
+ class?: string;
12
+ }
13
+ interface TriggerProps extends SlotProps {
14
+ value: string;
15
+ }
16
+ interface ContentProps extends SlotProps {
17
+ value: string;
18
+ }
19
+ interface ComposedTabsProps {
20
+ children?: ChildValue;
21
+ classes?: TabsClasses;
22
+ defaultValue?: string;
23
+ onValueChange?: (value: string) => void;
24
+ orientation?: "horizontal" | "vertical";
25
+ }
26
+ type TabsClassKey = keyof TabsClasses;
27
+ declare const ComposedTabs: ((props: ComposedTabsProps) => HTMLElement) & {
28
+ __classKeys?: TabsClassKey;
29
+ List: (props: SlotProps) => HTMLElement;
30
+ Trigger: (props: TriggerProps) => HTMLElement;
31
+ Content: (props: ContentProps) => HTMLElement;
32
+ };
33
+ export { TabsClasses, TabsClassKey, ComposedTabsProps, ComposedTabs };
@@ -0,0 +1,6 @@
1
+ import {
2
+ ComposedTabs
3
+ } from "../../shared/chunk-v11kd39k.js";
4
+ export {
5
+ ComposedTabs
6
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Tabs
3
- } from "../../shared/chunk-j2tdpxgc.js";
3
+ } from "../../shared/chunk-9hv3vc72.js";
4
4
  export {
5
5
  Tabs
6
6
  };
@@ -0,0 +1,35 @@
1
+ import { ChildValue } from "@vertz/ui";
2
+ /**
3
+ * A composed primitive is a callable function with phantom brands
4
+ * that define the valid class keys and element return type for that component.
5
+ */
6
+ interface ComposedPrimitive<
7
+ K extends string = string,
8
+ E extends Element = HTMLElement
9
+ > {
10
+ (props: {
11
+ children?: ChildValue;
12
+ classes?: Partial<Record<K, string>>;
13
+ [key: string]: unknown;
14
+ }): E;
15
+ __classKeys?: K;
16
+ __elementType?: E;
17
+ }
18
+ interface TextareaClasses {
19
+ base?: string;
20
+ }
21
+ type TextareaClassKey = keyof TextareaClasses;
22
+ interface ComposedTextareaProps {
23
+ classes?: TextareaClasses;
24
+ className?: string;
25
+ /** @deprecated Use `className` instead. */
26
+ class?: string;
27
+ name?: string;
28
+ placeholder?: string;
29
+ disabled?: boolean;
30
+ value?: string;
31
+ rows?: number;
32
+ [key: string]: unknown;
33
+ }
34
+ declare const ComposedTextarea: ComposedPrimitive<TextareaClassKey, HTMLElement>;
35
+ export { TextareaClasses, TextareaClassKey, ComposedTextareaProps, ComposedTextarea };
@@ -0,0 +1,6 @@
1
+ import {
2
+ ComposedTextarea
3
+ } from "../../shared/chunk-s62e7jf4.js";
4
+ export {
5
+ ComposedTextarea
6
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Toast
3
- } from "../../shared/chunk-56reyd5r.js";
3
+ } from "../../shared/chunk-q1ff3xp3.js";
4
4
  export {
5
5
  Toast
6
6
  };
@@ -0,0 +1,16 @@
1
+ import { ChildValue } from "@vertz/ui";
2
+ interface ToggleClasses {
3
+ root?: string;
4
+ }
5
+ type ToggleClassKey = keyof ToggleClasses;
6
+ interface ComposedToggleProps {
7
+ children?: ChildValue;
8
+ classes?: ToggleClasses;
9
+ defaultPressed?: boolean;
10
+ disabled?: boolean;
11
+ onPressedChange?: (pressed: boolean) => void;
12
+ }
13
+ declare const ComposedToggle: ((props: ComposedToggleProps) => HTMLElement) & {
14
+ __classKeys?: ToggleClassKey;
15
+ };
16
+ export { ToggleClasses, ToggleClassKey, ComposedToggleProps, ComposedToggle };
@@ -0,0 +1,6 @@
1
+ import {
2
+ ComposedToggle
3
+ } from "../../shared/chunk-gqb1n1hj.js";
4
+ export {
5
+ ComposedToggle
6
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Toggle
3
- } from "../../shared/chunk-7bxsf80c.js";
3
+ } from "../../shared/chunk-vy874zxe.js";
4
4
  export {
5
5
  Toggle
6
6
  };
@@ -0,0 +1,24 @@
1
+ import { ChildValue } from "@vertz/ui";
2
+ interface ToggleGroupClasses {
3
+ root?: string;
4
+ item?: string;
5
+ }
6
+ type ToggleGroupClassKey = keyof ToggleGroupClasses;
7
+ interface ToggleGroupItemProps {
8
+ value: string;
9
+ children?: ChildValue;
10
+ }
11
+ interface ComposedToggleGroupProps {
12
+ children?: ChildValue;
13
+ classes?: ToggleGroupClasses;
14
+ type?: "single" | "multiple";
15
+ defaultValue?: string[];
16
+ orientation?: "horizontal" | "vertical";
17
+ disabled?: boolean;
18
+ onValueChange?: (value: string[]) => void;
19
+ }
20
+ declare const ComposedToggleGroup: ((props: ComposedToggleGroupProps) => HTMLElement) & {
21
+ __classKeys?: ToggleGroupClassKey;
22
+ Item: (props: ToggleGroupItemProps) => HTMLElement;
23
+ };
24
+ export { ToggleGroupClasses, ToggleGroupClassKey, ComposedToggleGroupProps, ComposedToggleGroup };
@@ -0,0 +1,6 @@
1
+ import {
2
+ ComposedToggleGroup
3
+ } from "../../shared/chunk-9eedsnnk.js";
4
+ export {
5
+ ComposedToggleGroup
6
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ToggleGroup
3
- } from "../../shared/chunk-fqa5bwn1.js";
3
+ } from "../../shared/chunk-de18ashk.js";
4
4
  export {
5
5
  ToggleGroup
6
6
  };
@@ -0,0 +1,36 @@
1
+ import { ChildValue } from "@vertz/ui";
2
+ import { Middleware, Placement, Strategy } from "@floating-ui/dom";
3
+ interface FloatingOptions {
4
+ placement?: Placement;
5
+ strategy?: Strategy;
6
+ offset?: number;
7
+ flip?: boolean;
8
+ shift?: boolean;
9
+ middleware?: Middleware[];
10
+ matchReferenceWidth?: boolean;
11
+ portal?: boolean;
12
+ /** Override the reference element used for positioning (e.g., a custom trigger wrapping the primitive trigger). */
13
+ referenceElement?: HTMLElement;
14
+ }
15
+ interface TooltipClasses {
16
+ content?: string;
17
+ }
18
+ interface SlotProps {
19
+ children?: ChildValue;
20
+ className?: string;
21
+ /** @deprecated Use `className` instead. */
22
+ class?: string;
23
+ }
24
+ interface ComposedTooltipProps {
25
+ children?: ChildValue;
26
+ classes?: TooltipClasses;
27
+ delay?: number;
28
+ positioning?: FloatingOptions;
29
+ }
30
+ type TooltipClassKey = keyof TooltipClasses;
31
+ declare const ComposedTooltip: ((props: ComposedTooltipProps) => HTMLElement) & {
32
+ __classKeys?: TooltipClassKey;
33
+ Trigger: (props: SlotProps) => HTMLElement;
34
+ Content: (props: SlotProps) => HTMLElement;
35
+ };
36
+ export { TooltipClasses, TooltipClassKey, ComposedTooltipProps, ComposedTooltip };
@@ -0,0 +1,6 @@
1
+ import {
2
+ ComposedTooltip
3
+ } from "../../shared/chunk-y1hpsqzy.js";
4
+ export {
5
+ ComposedTooltip
6
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Tooltip
3
- } from "../../shared/chunk-myq79qew.js";
3
+ } from "../../shared/chunk-jsa3byag.js";
4
4
  export {
5
5
  Tooltip
6
6
  };
package/dist/src/utils.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  createFloatingPosition,
13
13
  virtualElement
14
- } from "../shared/chunk-0mcr52hc.js";
14
+ } from "../shared/chunk-vef3sepw.js";
15
15
  import {
16
16
  Keys,
17
17
  handleActivation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertz/ui-primitives",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Headless UI primitives for Vertz — Accordion, Dialog, Select, and more",
@@ -36,11 +36,11 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@floating-ui/dom": "^1.7.5",
39
- "@vertz/ui": "^0.2.21"
39
+ "@vertz/ui": "^0.2.23"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@happy-dom/global-registrator": "^20.7.0",
43
- "@vertz/ui-compiler": "^0.2.21",
43
+ "@vertz/ui-compiler": "^0.2.23",
44
44
  "bunup": "^0.16.31",
45
45
  "happy-dom": "^20.7.0",
46
46
  "typescript": "^5.7.0"
@@ -1,165 +0,0 @@
1
- import {
2
- createFloatingPosition
3
- } from "./chunk-0mcr52hc.js";
4
- import {
5
- Keys,
6
- isKey
7
- } from "./chunk-7867pr13.js";
8
- import {
9
- setDataState,
10
- setExpanded,
11
- setHidden,
12
- setHiddenAnimated
13
- } from "./chunk-vevfhpc9.js";
14
- import {
15
- uniqueId
16
- } from "./chunk-8y1jf6xr.js";
17
- import {
18
- applyAttrs
19
- } from "./chunk-2db2dnp3.js";
20
-
21
- // src/hover-card/hover-card.tsx
22
- import { __element, __on } from "@vertz/ui/internals";
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 = (() => {
130
- const __el0 = __element("span");
131
- __el0.setAttribute("aria-haspopup", "dialog");
132
- __el0.setAttribute("aria-expanded", "false");
133
- __on(__el0, "mouseenter", show);
134
- __on(__el0, "mouseleave", hide);
135
- __on(__el0, "focus", showImmediate);
136
- __on(__el0, "blur", handleTriggerBlur);
137
- __on(__el0, "keydown", handleTriggerKeydown);
138
- return __el0;
139
- })();
140
- const content = (() => {
141
- const __el1 = __element("div");
142
- __el1.setAttribute("role", "dialog");
143
- {
144
- const __v = contentId;
145
- if (__v != null && __v !== false)
146
- __el1.setAttribute("id", __v === true ? "" : __v);
147
- }
148
- __el1.setAttribute("aria-hidden", "true");
149
- __el1.setAttribute("data-state", "closed");
150
- __el1.setAttribute("style", "display: none");
151
- __on(__el1, "mouseenter", cancelCloseTimer);
152
- __on(__el1, "mouseleave", hide);
153
- __on(__el1, "focusin", cancelCloseTimer);
154
- __on(__el1, "focusout", handleContentFocusout);
155
- __on(__el1, "keydown", handleContentKeydown);
156
- return __el1;
157
- })();
158
- applyAttrs(trigger, attrs);
159
- return { trigger, content, state };
160
- }
161
- var HoverCard = {
162
- Root: HoverCardRoot
163
- };
164
-
165
- export { HoverCard };