@constructive-io/ui 0.4.1 → 0.6.0

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 (343) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +17 -22
  3. package/dist/components/alert-dialog.cjs +333 -0
  4. package/dist/components/alert-dialog.cjs.map +1 -0
  5. package/dist/components/alert-dialog.d.cts +32 -0
  6. package/dist/components/alert-dialog.d.ts +16 -15
  7. package/dist/components/alert-dialog.js +89 -102
  8. package/dist/components/alert-dialog.js.map +1 -1
  9. package/dist/components/alert.cjs +119 -0
  10. package/dist/components/alert.cjs.map +1 -0
  11. package/dist/components/alert.d.cts +19 -0
  12. package/dist/components/alert.d.ts +10 -5
  13. package/dist/components/alert.js +62 -6
  14. package/dist/components/alert.js.map +1 -1
  15. package/dist/components/app-bar.cjs +367 -0
  16. package/dist/components/app-bar.cjs.map +1 -0
  17. package/dist/components/app-bar.d.cts +26 -0
  18. package/dist/components/app-bar.d.ts +26 -0
  19. package/dist/components/app-bar.js +344 -0
  20. package/dist/components/app-bar.js.map +1 -0
  21. package/dist/components/app-shell.cjs +1792 -0
  22. package/dist/components/app-shell.cjs.map +1 -0
  23. package/dist/components/app-shell.d.cts +106 -0
  24. package/dist/components/app-shell.d.ts +106 -0
  25. package/dist/components/app-shell.js +1771 -0
  26. package/dist/components/app-shell.js.map +1 -0
  27. package/dist/components/autocomplete.cjs +418 -0
  28. package/dist/components/autocomplete.cjs.map +1 -0
  29. package/dist/components/autocomplete.d.cts +28 -0
  30. package/dist/components/autocomplete.d.ts +15 -15
  31. package/dist/components/autocomplete.js +9 -30
  32. package/dist/components/autocomplete.js.map +1 -1
  33. package/dist/components/avatar.cjs +51 -0
  34. package/dist/components/avatar.cjs.map +1 -0
  35. package/dist/components/avatar.d.cts +12 -0
  36. package/dist/components/avatar.d.ts +3 -4
  37. package/dist/components/avatar.js +11 -1
  38. package/dist/components/avatar.js.map +1 -1
  39. package/dist/components/badge.cjs +66 -0
  40. package/dist/components/badge.cjs.map +1 -0
  41. package/dist/components/badge.d.cts +15 -0
  42. package/dist/components/badge.js +1 -1
  43. package/dist/components/badge.js.map +1 -1
  44. package/dist/components/breadcrumb.cjs +118 -0
  45. package/dist/components/breadcrumb.cjs.map +1 -0
  46. package/dist/components/breadcrumb.d.cts +14 -0
  47. package/dist/components/breadcrumb.d.ts +9 -9
  48. package/dist/components/breadcrumb.js +19 -83
  49. package/dist/components/breadcrumb.js.map +1 -1
  50. package/dist/components/button.cjs +169 -0
  51. package/dist/components/button.cjs.map +1 -0
  52. package/dist/components/button.d.cts +20 -0
  53. package/dist/components/button.d.ts +3 -0
  54. package/dist/components/button.js +105 -21
  55. package/dist/components/button.js.map +1 -1
  56. package/dist/components/calendar-rac.cjs +85 -0
  57. package/dist/components/calendar-rac.cjs.map +1 -0
  58. package/dist/components/calendar-rac.d.cts +13 -0
  59. package/dist/components/calendar-rac.d.ts +3 -3
  60. package/dist/components/card.cjs +99 -0
  61. package/dist/components/card.cjs.map +1 -0
  62. package/dist/components/card.d.cts +18 -0
  63. package/dist/components/card.d.ts +7 -8
  64. package/dist/components/card.js +23 -8
  65. package/dist/components/card.js.map +1 -1
  66. package/dist/components/checkbox-group.cjs +18 -0
  67. package/dist/components/checkbox-group.cjs.map +1 -0
  68. package/dist/components/checkbox-group.d.cts +7 -0
  69. package/dist/components/checkbox-group.d.ts +2 -2
  70. package/dist/components/checkbox.cjs +121 -0
  71. package/dist/components/checkbox.cjs.map +1 -0
  72. package/dist/components/checkbox.d.cts +8 -0
  73. package/dist/components/checkbox.d.ts +3 -3
  74. package/dist/components/checkbox.js +73 -41
  75. package/dist/components/checkbox.js.map +1 -1
  76. package/dist/components/collapsible.cjs +127 -0
  77. package/dist/components/collapsible.cjs.map +1 -0
  78. package/dist/components/collapsible.d.cts +44 -0
  79. package/dist/components/collapsible.d.ts +8 -18
  80. package/dist/components/collapsible.js +7 -27
  81. package/dist/components/collapsible.js.map +1 -1
  82. package/dist/components/combobox.cjs +551 -0
  83. package/dist/components/combobox.cjs.map +1 -0
  84. package/dist/components/combobox.d.cts +43 -0
  85. package/dist/components/combobox.d.ts +17 -18
  86. package/dist/components/combobox.js +37 -48
  87. package/dist/components/combobox.js.map +1 -1
  88. package/dist/components/command.cjs +236 -0
  89. package/dist/components/command.cjs.map +1 -0
  90. package/dist/components/command.d.cts +23 -0
  91. package/dist/components/command.d.ts +14 -15
  92. package/dist/components/command.js +5 -38
  93. package/dist/components/command.js.map +1 -1
  94. package/dist/components/dialog.cjs +431 -0
  95. package/dist/components/dialog.cjs.map +1 -0
  96. package/dist/components/dialog.d.cts +30 -0
  97. package/dist/components/dialog.d.ts +13 -18
  98. package/dist/components/dialog.js +75 -119
  99. package/dist/components/dialog.js.map +1 -1
  100. package/dist/components/dock.cjs +121 -0
  101. package/dist/components/dock.cjs.map +1 -0
  102. package/dist/components/dock.d.cts +30 -0
  103. package/dist/components/dock.d.ts +1 -2
  104. package/dist/components/dock.js +7 -5
  105. package/dist/components/dock.js.map +1 -1
  106. package/dist/components/drawer.cjs +149 -0
  107. package/dist/components/drawer.cjs.map +1 -0
  108. package/dist/components/drawer.d.cts +15 -0
  109. package/dist/components/drawer.d.ts +10 -11
  110. package/dist/components/drawer.js +11 -40
  111. package/dist/components/drawer.js.map +1 -1
  112. package/dist/components/dropdown-menu.cjs +292 -0
  113. package/dist/components/dropdown-menu.cjs.map +1 -0
  114. package/dist/components/dropdown-menu.d.cts +52 -0
  115. package/dist/components/dropdown-menu.d.ts +23 -21
  116. package/dist/components/dropdown-menu.js +67 -191
  117. package/dist/components/dropdown-menu.js.map +1 -1
  118. package/dist/components/empty.cjs +106 -0
  119. package/dist/components/empty.cjs.map +1 -0
  120. package/dist/components/empty.d.cts +15 -0
  121. package/dist/components/empty.d.ts +15 -0
  122. package/dist/components/empty.js +99 -0
  123. package/dist/components/empty.js.map +1 -0
  124. package/dist/components/field.cjs +295 -0
  125. package/dist/components/field.cjs.map +1 -0
  126. package/dist/components/field.d.cts +46 -0
  127. package/dist/components/field.d.ts +34 -39
  128. package/dist/components/field.js +220 -72
  129. package/dist/components/field.js.map +1 -1
  130. package/dist/components/flickering-grid.cjs +176 -0
  131. package/dist/components/flickering-grid.cjs.map +1 -0
  132. package/dist/components/flickering-grid.d.cts +15 -0
  133. package/dist/components/flickering-grid.js +25 -2
  134. package/dist/components/flickering-grid.js.map +1 -1
  135. package/dist/components/flow-zoom-panel.cjs +194 -0
  136. package/dist/components/flow-zoom-panel.cjs.map +1 -0
  137. package/dist/components/flow-zoom-panel.d.cts +12 -0
  138. package/dist/components/flow-zoom-panel.d.ts +12 -0
  139. package/dist/components/flow-zoom-panel.js +173 -0
  140. package/dist/components/flow-zoom-panel.js.map +1 -0
  141. package/dist/components/form-control.cjs +193 -0
  142. package/dist/components/form-control.cjs.map +1 -0
  143. package/dist/components/form-control.d.cts +14 -0
  144. package/dist/components/form-control.d.ts +1 -2
  145. package/dist/components/form-control.js +2 -4
  146. package/dist/components/form-control.js.map +1 -1
  147. package/dist/components/form.cjs +208 -0
  148. package/dist/components/form.cjs.map +1 -0
  149. package/dist/components/form.d.cts +36 -0
  150. package/dist/components/form.d.ts +7 -8
  151. package/dist/components/input-group.cjs +184 -0
  152. package/dist/components/input-group.cjs.map +1 -0
  153. package/dist/components/input-group.d.cts +17 -0
  154. package/dist/components/input-group.d.ts +6 -7
  155. package/dist/components/input-group.js +3 -2
  156. package/dist/components/input-group.js.map +1 -1
  157. package/dist/components/input.cjs +62 -0
  158. package/dist/components/input.cjs.map +1 -0
  159. package/dist/components/input.d.cts +10 -0
  160. package/dist/components/input.d.ts +1 -2
  161. package/dist/components/input.js +1 -1
  162. package/dist/components/input.js.map +1 -1
  163. package/dist/components/json-input.cjs +351 -0
  164. package/dist/components/json-input.cjs.map +1 -0
  165. package/dist/components/json-input.d.cts +25 -0
  166. package/dist/components/json-input.d.ts +3 -3
  167. package/dist/components/json-input.js +89 -112
  168. package/dist/components/json-input.js.map +1 -1
  169. package/dist/components/label.cjs +29 -0
  170. package/dist/components/label.cjs.map +1 -0
  171. package/dist/components/label.d.cts +10 -0
  172. package/dist/components/label.d.ts +1 -2
  173. package/dist/components/motion-grid.cjs +108 -0
  174. package/dist/components/motion-grid.cjs.map +1 -0
  175. package/dist/components/motion-grid.d.cts +19 -0
  176. package/dist/components/motion-grid.d.ts +1 -2
  177. package/dist/components/motion-grid.js +9 -4
  178. package/dist/components/motion-grid.js.map +1 -1
  179. package/dist/components/multi-select.cjs +796 -0
  180. package/dist/components/multi-select.cjs.map +1 -0
  181. package/dist/components/multi-select.d.cts +198 -0
  182. package/dist/components/multi-select.js +54 -162
  183. package/dist/components/multi-select.js.map +1 -1
  184. package/dist/components/page-header.cjs +19 -0
  185. package/dist/components/page-header.cjs.map +1 -0
  186. package/dist/components/page-header.d.cts +17 -0
  187. package/dist/components/page-header.d.ts +2 -2
  188. package/dist/components/pagination.cjs +295 -0
  189. package/dist/components/pagination.cjs.map +1 -0
  190. package/dist/components/pagination.d.cts +18 -0
  191. package/dist/components/pagination.d.ts +7 -8
  192. package/dist/components/pagination.js +152 -29
  193. package/dist/components/pagination.js.map +1 -1
  194. package/dist/components/popover.cjs +140 -0
  195. package/dist/components/popover.cjs.map +1 -0
  196. package/dist/components/popover.d.cts +39 -0
  197. package/dist/components/popover.d.ts +13 -9
  198. package/dist/components/popover.js +56 -132
  199. package/dist/components/popover.js.map +1 -1
  200. package/dist/components/portal.cjs +109 -0
  201. package/dist/components/portal.cjs.map +1 -0
  202. package/dist/components/portal.d.cts +117 -0
  203. package/dist/components/portal.d.ts +16 -7
  204. package/dist/components/portal.js +13 -8
  205. package/dist/components/portal.js.map +1 -1
  206. package/dist/components/progress.cjs +31 -0
  207. package/dist/components/progress.cjs.map +1 -0
  208. package/dist/components/progress.d.cts +9 -0
  209. package/dist/components/progress.d.ts +1 -2
  210. package/dist/components/progress.js +1 -2
  211. package/dist/components/progress.js.map +1 -1
  212. package/dist/components/progressive-blur-scroll-container.cjs +144 -0
  213. package/dist/components/progressive-blur-scroll-container.cjs.map +1 -0
  214. package/dist/components/progressive-blur-scroll-container.d.cts +25 -0
  215. package/dist/components/progressive-blur-scroll-container.d.ts +2 -2
  216. package/dist/components/progressive-blur.cjs +70 -0
  217. package/dist/components/progressive-blur.cjs.map +1 -0
  218. package/dist/components/progressive-blur.d.cts +16 -0
  219. package/dist/components/progressive-blur.d.ts +2 -2
  220. package/dist/components/radio-group.cjs +52 -0
  221. package/dist/components/radio-group.cjs.map +1 -0
  222. package/dist/components/radio-group.d.cts +10 -0
  223. package/dist/components/radio-group.d.ts +3 -3
  224. package/dist/components/radio-group.js +21 -10
  225. package/dist/components/radio-group.js.map +1 -1
  226. package/dist/components/record-picker.cjs +420 -0
  227. package/dist/components/record-picker.cjs.map +1 -0
  228. package/dist/components/record-picker.d.cts +16 -0
  229. package/dist/components/record-picker.d.ts +2 -2
  230. package/dist/components/record-picker.js +76 -43
  231. package/dist/components/record-picker.js.map +1 -1
  232. package/dist/components/resizable.cjs +76 -0
  233. package/dist/components/resizable.cjs.map +1 -0
  234. package/dist/components/resizable.d.cts +10 -0
  235. package/dist/components/resizable.d.ts +3 -4
  236. package/dist/components/responsive-diagram.cjs +67 -0
  237. package/dist/components/responsive-diagram.cjs.map +1 -0
  238. package/dist/components/responsive-diagram.d.cts +10 -0
  239. package/dist/components/responsive-diagram.d.ts +2 -2
  240. package/dist/components/scroll-area.cjs +92 -0
  241. package/dist/components/scroll-area.cjs.map +1 -0
  242. package/dist/components/scroll-area.d.cts +11 -0
  243. package/dist/components/scroll-area.d.ts +5 -6
  244. package/dist/components/select.cjs +329 -0
  245. package/dist/components/select.cjs.map +1 -0
  246. package/dist/components/select.d.cts +46 -0
  247. package/dist/components/select.d.ts +13 -14
  248. package/dist/components/select.js +76 -67
  249. package/dist/components/select.js.map +1 -1
  250. package/dist/components/separator.cjs +26 -0
  251. package/dist/components/separator.cjs.map +1 -0
  252. package/dist/components/separator.d.cts +10 -0
  253. package/dist/components/separator.d.ts +1 -2
  254. package/dist/components/sheet.cjs +489 -0
  255. package/dist/components/sheet.cjs.map +1 -0
  256. package/dist/components/sheet.d.cts +107 -0
  257. package/dist/components/sheet.d.ts +14 -19
  258. package/dist/components/sheet.js +119 -264
  259. package/dist/components/sheet.js.map +1 -1
  260. package/dist/components/sidebar.cjs +1300 -0
  261. package/dist/components/sidebar.cjs.map +1 -0
  262. package/dist/components/sidebar.d.cts +70 -0
  263. package/dist/components/sidebar.d.ts +32 -39
  264. package/dist/components/sidebar.js +401 -362
  265. package/dist/components/sidebar.js.map +1 -1
  266. package/dist/components/skeleton.cjs +36 -0
  267. package/dist/components/skeleton.cjs.map +1 -0
  268. package/dist/components/skeleton.d.cts +10 -0
  269. package/dist/components/skeleton.d.ts +5 -2
  270. package/dist/components/skeleton.js +19 -1
  271. package/dist/components/skeleton.js.map +1 -1
  272. package/dist/components/sonner.cjs +25 -0
  273. package/dist/components/sonner.cjs.map +1 -0
  274. package/dist/components/sonner.d.cts +10 -0
  275. package/dist/components/sonner.d.ts +2 -2
  276. package/dist/components/stack/index.cjs +1516 -0
  277. package/dist/components/stack/index.cjs.map +1 -0
  278. package/dist/components/stack/index.d.cts +672 -0
  279. package/dist/components/stack/index.d.ts +36 -38
  280. package/dist/components/stack/index.js +42 -31
  281. package/dist/components/stack/index.js.map +1 -1
  282. package/dist/components/stepper.cjs +314 -0
  283. package/dist/components/stepper.cjs.map +1 -0
  284. package/dist/components/stepper.d.cts +31 -0
  285. package/dist/components/stepper.d.ts +9 -8
  286. package/dist/components/stepper.js +22 -15
  287. package/dist/components/stepper.js.map +1 -1
  288. package/dist/components/switch.cjs +46 -0
  289. package/dist/components/switch.cjs.map +1 -0
  290. package/dist/components/switch.d.cts +7 -0
  291. package/dist/components/switch.d.ts +1 -2
  292. package/dist/components/switch.js +9 -5
  293. package/dist/components/switch.js.map +1 -1
  294. package/dist/components/table.cjs +133 -0
  295. package/dist/components/table.cjs.map +1 -0
  296. package/dist/components/table.d.cts +22 -0
  297. package/dist/components/table.d.ts +19 -12
  298. package/dist/components/table.js +72 -13
  299. package/dist/components/table.js.map +1 -1
  300. package/dist/components/tabs.cjs +53 -0
  301. package/dist/components/tabs.cjs.map +1 -0
  302. package/dist/components/tabs.d.cts +9 -0
  303. package/dist/components/tabs.d.ts +4 -5
  304. package/dist/components/tabs.js +2 -2
  305. package/dist/components/tabs.js.map +1 -1
  306. package/dist/components/tags.cjs +451 -0
  307. package/dist/components/tags.cjs.map +1 -0
  308. package/dist/components/tags.d.cts +40 -0
  309. package/dist/components/tags.d.ts +10 -10
  310. package/dist/components/tags.js +129 -154
  311. package/dist/components/tags.js.map +1 -1
  312. package/dist/components/textarea.cjs +56 -0
  313. package/dist/components/textarea.cjs.map +1 -0
  314. package/dist/components/textarea.d.cts +9 -0
  315. package/dist/components/textarea.d.ts +1 -2
  316. package/dist/components/toast/index.cjs +612 -0
  317. package/dist/components/toast/index.cjs.map +1 -0
  318. package/dist/components/toast/index.d.cts +52 -0
  319. package/dist/components/toast/index.js +90 -127
  320. package/dist/components/toast/index.js.map +1 -1
  321. package/dist/components/tooltip.cjs +92 -0
  322. package/dist/components/tooltip.cjs.map +1 -0
  323. package/dist/components/tooltip.d.cts +28 -0
  324. package/dist/components/tooltip.d.ts +5 -6
  325. package/dist/components/tooltip.js +23 -130
  326. package/dist/components/tooltip.js.map +1 -1
  327. package/dist/components/unlink-button.cjs +197 -0
  328. package/dist/components/unlink-button.cjs.map +1 -0
  329. package/dist/components/unlink-button.d.cts +14 -0
  330. package/dist/components/unlink-button.d.ts +2 -2
  331. package/dist/components/unlink-button.js +105 -21
  332. package/dist/components/unlink-button.js.map +1 -1
  333. package/dist/index.cjs +2074 -2723
  334. package/dist/index.cjs.map +1 -1
  335. package/dist/index.d.cts +492 -904
  336. package/dist/index.d.ts +492 -904
  337. package/dist/index.js +1897 -2569
  338. package/dist/index.js.map +1 -1
  339. package/package.json +286 -45
  340. package/src/styles/globals.css +155 -203
  341. package/dist/components/org-chart/index.d.ts +0 -54
  342. package/dist/components/org-chart/index.js +0 -861
  343. package/dist/components/org-chart/index.js.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Constructive
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -12,44 +12,39 @@ pnpm add @constructive-io/ui
12
12
 
13
13
  ### Peer Dependencies
14
14
 
15
+ The root barrel exports the complete component library, so its runtime peers are
16
+ required (modern npm and pnpm releases install them automatically). If your
17
+ package manager does not auto-install peers, add them explicitly:
18
+
15
19
  ```bash
16
- npm install @base-ui/react lucide-react react react-dom
20
+ pnpm add @base-ui/react @internationalized/date @remixicon/react \
21
+ @use-gesture/react @xyflow/react cmdk lucide-react match-sorter motion \
22
+ react react-aria-components react-dom react-hook-form \
23
+ react-resizable-panels sonner tailwindcss vaul
17
24
  ```
18
25
 
19
- Optional peer dependencies (required for specific components):
20
-
21
- | Package | Components |
22
- |---------|------------|
23
- | `motion` | Stack, animations |
24
- | `@use-gesture/react` | Stack gestures |
25
- | `sonner` | Toast |
26
- | `vaul` | Drawer |
27
- | `cmdk` | Command |
28
- | `react-hook-form` | Form |
29
- | `react-aria-components` | Calendar |
30
- | `react-resizable-panels` | Resizable |
26
+ `JsonInput` lazily loads the optional `react-ace` and `ace-builds` peers; install
27
+ those two only when using the JSON editor.
31
28
 
32
29
  ## Setup
33
30
 
34
- ### 1. Configure Tailwind CSS v4
31
+ ### 1. Import the Tailwind CSS theme
35
32
 
36
- Add the `@source` directive to scan the package for Tailwind classes:
33
+ Import the package stylesheet once from your application stylesheet. It includes
34
+ Tailwind v4 and scans the package's published component output automatically:
37
35
 
38
36
  ```css
39
37
  /* app.css or globals.css */
40
- @import "tailwindcss";
41
-
42
- /* Required: Tell Tailwind to scan the UI package */
43
- @source "../node_modules/@constructive-io";
38
+ @import "@constructive-io/ui/globals.css";
44
39
  ```
45
40
 
46
41
  ### 2. Add CSS Variables
47
42
 
48
- Add the design tokens to your CSS. You can import the full theme or define your own:
43
+ The imported stylesheet includes the default design tokens. Define the same
44
+ variables after the import when your application needs to override them:
49
45
 
50
46
  ```css
51
- @import "tailwindcss";
52
- @source "../node_modules/@constructive-io";
47
+ @import "@constructive-io/ui/globals.css";
53
48
 
54
49
  @custom-variant dark (&:is(.dark *));
55
50
 
@@ -0,0 +1,333 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var React = require('react');
5
+ var alertDialog = require('@base-ui/react/alert-dialog');
6
+ var portal = require('@constructive-io/ui/portal');
7
+ var clsx = require('clsx');
8
+ var tailwindMerge = require('tailwind-merge');
9
+ var classVarianceAuthority = require('class-variance-authority');
10
+ var jsxRuntime = require('react/jsx-runtime');
11
+
12
+ function _interopNamespace(e) {
13
+ if (e && e.__esModule) return e;
14
+ var n = Object.create(null);
15
+ if (e) {
16
+ Object.keys(e).forEach(function (k) {
17
+ if (k !== 'default') {
18
+ var d = Object.getOwnPropertyDescriptor(e, k);
19
+ Object.defineProperty(n, k, d.get ? d : {
20
+ enumerable: true,
21
+ get: function () { return e[k]; }
22
+ });
23
+ }
24
+ });
25
+ }
26
+ n.default = e;
27
+ return Object.freeze(n);
28
+ }
29
+
30
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
31
+
32
+ function cn(...inputs) {
33
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
34
+ }
35
+ function composeRefs(...refs) {
36
+ return (node) => {
37
+ refs.forEach((ref) => {
38
+ if (typeof ref === "function") {
39
+ ref(node);
40
+ } else if (ref != null) {
41
+ ref.current = node;
42
+ }
43
+ });
44
+ };
45
+ }
46
+ function mergeProps(slotProps, childProps) {
47
+ const overrideProps = { ...childProps };
48
+ for (const propName in childProps) {
49
+ if (propName === "ref") continue;
50
+ const slotPropValue = slotProps[propName];
51
+ const childPropValue = childProps[propName];
52
+ if (/^on[A-Z]/.test(propName) && typeof slotPropValue === "function" && typeof childPropValue === "function") {
53
+ overrideProps[propName] = (...args) => {
54
+ childPropValue(...args);
55
+ slotPropValue(...args);
56
+ };
57
+ } else if (propName === "className" && typeof slotPropValue === "string" && typeof childPropValue === "string") {
58
+ overrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();
59
+ } else if (propName === "style" && typeof slotPropValue === "object" && typeof childPropValue === "object") {
60
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
61
+ }
62
+ }
63
+ return { ...slotProps, ...overrideProps };
64
+ }
65
+ function isSlottable(child) {
66
+ return React__namespace.isValidElement(child);
67
+ }
68
+ var Slot = React__namespace.forwardRef((props, forwardedRef) => {
69
+ const { children, ...slotProps } = props;
70
+ if (isSlottable(children)) {
71
+ const childProps = children.props;
72
+ const childRef = childProps.ref;
73
+ return React__namespace.cloneElement(children, {
74
+ ...mergeProps(slotProps, childProps),
75
+ ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef
76
+ });
77
+ }
78
+ if (React__namespace.Children.count(children) > 1) {
79
+ const childrenArray = React__namespace.Children.toArray(children);
80
+ const slottableChild = childrenArray.find(
81
+ (child) => React__namespace.isValidElement(child) && child.type === Slottable
82
+ );
83
+ if (slottableChild) {
84
+ const newElement = slottableChild.props.children;
85
+ if (isSlottable(newElement)) {
86
+ const newElementProps = newElement.props;
87
+ const newChildren = childrenArray.map((child) => {
88
+ if (child === slottableChild) {
89
+ return React__namespace.Children.count(newElementProps.children) > 1 ? React__namespace.Children.only(null) : newElementProps.children;
90
+ }
91
+ return child;
92
+ });
93
+ const childRef = newElementProps.ref;
94
+ return React__namespace.cloneElement(newElement, {
95
+ ...mergeProps(slotProps, newElementProps),
96
+ ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,
97
+ children: newChildren
98
+ });
99
+ }
100
+ }
101
+ }
102
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
103
+ });
104
+ Slot.displayName = "Slot";
105
+ function Slottable({ children }) {
106
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
107
+ }
108
+ var buttonVariants = classVarianceAuthority.cva(
109
+ "[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-sm outline-none transition-[box-shadow,scale] duration-150 ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 motion-reduce:transition-shadow [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
110
+ {
111
+ defaultVariants: {
112
+ size: "default",
113
+ static: false,
114
+ variant: "default"
115
+ },
116
+ variants: {
117
+ static: {
118
+ false: "motion-safe:active:not-disabled:scale-[0.96]",
119
+ true: null
120
+ },
121
+ size: {
122
+ default: "h-10 min-w-10 px-[calc(--spacing(3)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11",
123
+ icon: "size-10 pointer-coarse:size-11",
124
+ "icon-lg": "size-11",
125
+ "icon-sm": "size-8 pointer-coarse:size-11",
126
+ "icon-xl": 'size-11 [&_svg:not([class*="size-"])]:size-5',
127
+ "icon-xs": 'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:size-11 not-in-data-[slot=input-group]:[&_svg:not([class*="size-"])]:size-4',
128
+ lg: "h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]",
129
+ sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11",
130
+ xl: 'h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*="size-"])]:size-5',
131
+ xs: 'h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11 [&_svg:not([class*="size-"])]:size-3.5'
132
+ },
133
+ variant: {
134
+ default: "not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none",
135
+ destructive: "not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none",
136
+ "destructive-outline": "border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8",
137
+ ghost: "border-transparent hover:bg-accent data-pressed:bg-accent",
138
+ link: "border-transparent underline-offset-4 hover:underline",
139
+ outline: "border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64",
140
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80"
141
+ }
142
+ }
143
+ }
144
+ );
145
+ var Button = React__namespace.forwardRef(
146
+ ({ className, variant, size, static: isStatic, asChild, children, type = "button", ...props }, ref) => {
147
+ const buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant }));
148
+ const Comp = asChild ? Slot : "button";
149
+ if (asChild) {
150
+ const SlottedComp = Comp;
151
+ return /* @__PURE__ */ jsxRuntime.jsx(
152
+ SlottedComp,
153
+ {
154
+ ref,
155
+ className: buttonClasses,
156
+ "data-slot": "button",
157
+ ...props,
158
+ children
159
+ }
160
+ );
161
+ }
162
+ return /* @__PURE__ */ jsxRuntime.jsx("button", { ref, type, className: buttonClasses, "data-slot": "button", ...props, children });
163
+ }
164
+ );
165
+ Button.displayName = "Button";
166
+ function AlertDialog({ ...props }) {
167
+ return /* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Root, { "data-slot": "alert-dialog", ...props });
168
+ }
169
+ function AlertDialogTrigger({ asChild, children, render, nativeButton, ...props }) {
170
+ const childRender = render === void 0 && asChild && React__namespace.isValidElement(children) ? children : void 0;
171
+ return /* @__PURE__ */ jsxRuntime.jsx(
172
+ alertDialog.AlertDialog.Trigger,
173
+ {
174
+ "data-slot": "alert-dialog-trigger",
175
+ nativeButton: nativeButton ?? (childRender ? true : void 0),
176
+ render: render ?? childRender,
177
+ ...props,
178
+ children: childRender ? void 0 : children
179
+ }
180
+ );
181
+ }
182
+ function AlertDialogPortal({
183
+ container: containerProp,
184
+ ...props
185
+ }) {
186
+ const rootContainer = portal.useRootPortalContainer();
187
+ const container = containerProp === void 0 ? rootContainer ?? void 0 : containerProp;
188
+ const style = {
189
+ ...props.style ?? {},
190
+ ["--z-layer-floating"]: "var(--z-layer-floating-elevated)"
191
+ };
192
+ return /* @__PURE__ */ jsxRuntime.jsx(
193
+ alertDialog.AlertDialog.Portal,
194
+ {
195
+ "data-slot": "alert-dialog-portal",
196
+ container,
197
+ ...props,
198
+ style
199
+ }
200
+ );
201
+ }
202
+ function AlertDialogOverlay({ className, ...props }) {
203
+ return /* @__PURE__ */ jsxRuntime.jsx(
204
+ alertDialog.AlertDialog.Backdrop,
205
+ {
206
+ "data-slot": "alert-dialog-overlay",
207
+ className: cn(
208
+ "fixed inset-0 z-[var(--z-layer-modal-backdrop)] bg-black/80 transition-opacity duration-200 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0",
209
+ className
210
+ ),
211
+ ...props
212
+ }
213
+ );
214
+ }
215
+ function AlertDialogContent({ className, children, ...props }) {
216
+ return /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
217
+ /* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
218
+ /* @__PURE__ */ jsxRuntime.jsx(
219
+ alertDialog.AlertDialog.Popup,
220
+ {
221
+ "data-slot": "alert-dialog-content",
222
+ className: cn(
223
+ `bg-background fixed top-1/2 left-1/2 z-[var(--z-layer-modal-content)] grid max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)]
224
+ -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl border p-6 shadow-lg
225
+ transition-[opacity,scale] duration-200 data-[ending-style]:scale-95 data-[starting-style]:scale-95
226
+ data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 sm:max-w-100`,
227
+ className
228
+ ),
229
+ ...props,
230
+ children: /* @__PURE__ */ jsxRuntime.jsx(portal.ModalPortalScope, { children })
231
+ }
232
+ )
233
+ ] });
234
+ }
235
+ function AlertDialogHeader({ className, ...props }) {
236
+ return /* @__PURE__ */ jsxRuntime.jsx(
237
+ "div",
238
+ {
239
+ "data-slot": "alert-dialog-header",
240
+ className: cn("flex flex-col gap-1 text-center sm:text-left", className),
241
+ ...props
242
+ }
243
+ );
244
+ }
245
+ function AlertDialogFooter({ className, ...props }) {
246
+ return /* @__PURE__ */ jsxRuntime.jsx(
247
+ "div",
248
+ {
249
+ "data-slot": "alert-dialog-footer",
250
+ className: cn("flex flex-col-reverse gap-3 sm:flex-row sm:justify-end", className),
251
+ ...props
252
+ }
253
+ );
254
+ }
255
+ function AlertDialogTitle({ className, ...props }) {
256
+ return /* @__PURE__ */ jsxRuntime.jsx(
257
+ alertDialog.AlertDialog.Title,
258
+ {
259
+ "data-slot": "alert-dialog-title",
260
+ className: cn("text-lg font-semibold", className),
261
+ ...props
262
+ }
263
+ );
264
+ }
265
+ function AlertDialogDescription({
266
+ className,
267
+ ...props
268
+ }) {
269
+ return /* @__PURE__ */ jsxRuntime.jsx(
270
+ alertDialog.AlertDialog.Description,
271
+ {
272
+ "data-slot": "alert-dialog-description",
273
+ className: cn("text-muted-foreground text-sm", className),
274
+ ...props
275
+ }
276
+ );
277
+ }
278
+ function AlertDialogAction({
279
+ asChild,
280
+ children,
281
+ render,
282
+ nativeButton,
283
+ className,
284
+ ...props
285
+ }) {
286
+ const childRender = render === void 0 && asChild && React__namespace.isValidElement(children) ? children : void 0;
287
+ return /* @__PURE__ */ jsxRuntime.jsx(
288
+ alertDialog.AlertDialog.Close,
289
+ {
290
+ "data-slot": "alert-dialog-action",
291
+ className: cn(buttonVariants(), className),
292
+ nativeButton: nativeButton ?? (childRender ? true : void 0),
293
+ render: render ?? childRender,
294
+ ...props,
295
+ children: childRender ? void 0 : children
296
+ }
297
+ );
298
+ }
299
+ function AlertDialogCancel({
300
+ asChild,
301
+ children,
302
+ render,
303
+ nativeButton,
304
+ className,
305
+ ...props
306
+ }) {
307
+ const childRender = render === void 0 && asChild && React__namespace.isValidElement(children) ? children : void 0;
308
+ return /* @__PURE__ */ jsxRuntime.jsx(
309
+ alertDialog.AlertDialog.Close,
310
+ {
311
+ "data-slot": "alert-dialog-cancel",
312
+ className: cn(buttonVariants({ variant: "outline" }), className),
313
+ nativeButton: nativeButton ?? (childRender ? true : void 0),
314
+ render: render ?? childRender,
315
+ ...props,
316
+ children: childRender ? void 0 : children
317
+ }
318
+ );
319
+ }
320
+
321
+ exports.AlertDialog = AlertDialog;
322
+ exports.AlertDialogAction = AlertDialogAction;
323
+ exports.AlertDialogCancel = AlertDialogCancel;
324
+ exports.AlertDialogContent = AlertDialogContent;
325
+ exports.AlertDialogDescription = AlertDialogDescription;
326
+ exports.AlertDialogFooter = AlertDialogFooter;
327
+ exports.AlertDialogHeader = AlertDialogHeader;
328
+ exports.AlertDialogOverlay = AlertDialogOverlay;
329
+ exports.AlertDialogPortal = AlertDialogPortal;
330
+ exports.AlertDialogTitle = AlertDialogTitle;
331
+ exports.AlertDialogTrigger = AlertDialogTrigger;
332
+ //# sourceMappingURL=alert-dialog.cjs.map
333
+ //# sourceMappingURL=alert-dialog.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/utils.ts","../../src/lib/slot.tsx","../../src/components/button.tsx","../../src/components/alert-dialog.tsx"],"names":["twMerge","clsx","React","cva","React2","jsx","AlertDialogPrimitive","React3","useRootPortalContainer","ModalPortalScope"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC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KAAA;AAAA,MAEH,wBAAc,MAAA,GAAY;AAAA;AAAA,GAC5B;AAEF;AAMA,SAAS,iBAAA,CAAkB;AAAA,EAC1B,OAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAA0B;AACzB,EAAA,MAAM,cAAc,MAAA,KAAW,MAAA,IAAa,WAAiBC,gBAAA,CAAA,cAAA,CAAe,QAAQ,IAAI,QAAA,GAAW,MAAA;AAEnG,EAAA,uBACCF,cAAAA;AAAA,IAACC,uBAAA,CAAqB,KAAA;AAAA,IAArB;AAAA,MACA,WAAA,EAAU,qBAAA;AAAA,MACV,SAAA,EAAW,GAAG,cAAA,CAAe,EAAE,SAAS,SAAA,EAAW,GAAG,SAAS,CAAA;AAAA,MAC/D,YAAA,EAAc,YAAA,KAAiB,WAAA,GAAc,IAAA,GAAO,MAAA,CAAA;AAAA,MACpD,QAAQ,MAAA,IAAU,WAAA;AAAA,MACjB,GAAG,KAAA;AAAA,MAEH,wBAAc,MAAA,GAAY;AAAA;AAAA,GAC5B;AAEF","file":"alert-dialog.cjs","sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single callback ref.\n * React 19 compatible - handles refs as regular props.\n */\nfunction composeRefs<T>(...refs: (React.Ref<T> | undefined)[]): React.RefCallback<T> {\n\treturn (node) => {\n\t\trefs.forEach((ref) => {\n\t\t\tif (typeof ref === 'function') {\n\t\t\t\tref(node);\n\t\t\t} else if (ref != null) {\n\t\t\t\t(ref as React.MutableRefObject<T | null>).current = node;\n\t\t\t}\n\t\t});\n\t};\n}\n\n/**\n * Merges props, handling special cases for className, style, and event handlers.\n * Excludes 'ref' from merging as it's handled separately.\n */\nfunction mergeProps(\n\tslotProps: Record<string, unknown>,\n\tchildProps: Record<string, unknown>,\n): Record<string, unknown> {\n\tconst overrideProps: Record<string, unknown> = { ...childProps };\n\n\tfor (const propName in childProps) {\n\t\t// Skip ref - handled separately for composition\n\t\tif (propName === 'ref') continue;\n\n\t\tconst slotPropValue = slotProps[propName];\n\t\tconst childPropValue = childProps[propName];\n\n\t\t// Compose event handlers\n\t\tif (/^on[A-Z]/.test(propName) && typeof slotPropValue === 'function' && typeof childPropValue === 'function') {\n\t\t\toverrideProps[propName] = (...args: unknown[]) => {\n\t\t\t\tchildPropValue(...args);\n\t\t\t\tslotPropValue(...args);\n\t\t\t};\n\t\t}\n\t\t// Merge className\n\t\telse if (propName === 'className' && typeof slotPropValue === 'string' && typeof childPropValue === 'string') {\n\t\t\toverrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();\n\t\t}\n\t\t// Merge style\n\t\telse if (propName === 'style' && typeof slotPropValue === 'object' && typeof childPropValue === 'object') {\n\t\t\toverrideProps[propName] = { ...slotPropValue, ...childPropValue };\n\t\t}\n\t}\n\n\treturn { ...slotProps, ...overrideProps };\n}\n\n/**\n * Merges props from a parent component with a child element's props,\n * including proper ref composition. Use this in render prop patterns\n * where the parent needs to merge its props with the child's.\n *\n * @param parentProps - Props from the parent component (e.g., triggerProps from Base UI)\n * @param childElement - The child React element whose props will be merged\n * @returns Merged props object ready to pass to React.cloneElement\n */\nfunction mergePropsWithRef<T = HTMLElement>(\n\tparentProps: Record<string, unknown>,\n\tchildElement: React.ReactElement,\n): Record<string, unknown> {\n\tconst childProps = childElement.props as Record<string, unknown>;\n\tconst parentRef = parentProps.ref as React.Ref<T> | undefined;\n\tconst childRef = childProps.ref as React.Ref<T> | undefined;\n\n\tconst mergedProps = mergeProps(parentProps, childProps);\n\n\t// Compose refs if either exists\n\tif (parentRef || childRef) {\n\t\tmergedProps.ref = composeRefs(parentRef, childRef);\n\t}\n\n\treturn mergedProps;\n}\n\n/**\n * Check if a value is a valid slottable child (single React element).\n */\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n\treturn React.isValidElement(child);\n}\n\nexport interface SlotProps extends React.HTMLAttributes<HTMLElement> {\n\tchildren?: React.ReactNode;\n}\n\n/**\n * Slot component - renders its child element with merged props.\n * Used for the `asChild` pattern where parent props are passed to child.\n * React 19 compatible - accesses ref from props instead of element.ref.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n\tconst { children, ...slotProps } = props;\n\n\t// Handle single child\n\tif (isSlottable(children)) {\n\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t// React 19: ref is now a regular prop, not element.ref\n\t\tconst childRef = childProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...mergeProps(slotProps, childProps),\n\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t} as React.Attributes);\n\t}\n\n\t// Handle multiple children - wrap Slottable content\n\tif (React.Children.count(children) > 1) {\n\t\tconst childrenArray = React.Children.toArray(children);\n\t\tconst slottableChild = childrenArray.find(\n\t\t\t(child) => React.isValidElement(child) && child.type === Slottable,\n\t\t) as React.ReactElement<{ children: React.ReactNode }> | undefined;\n\n\t\tif (slottableChild) {\n\t\t\tconst newElement = slottableChild.props.children;\n\t\t\tif (isSlottable(newElement)) {\n\t\t\t\tconst newElementProps = newElement.props as Record<string, unknown> & { children?: React.ReactNode };\n\t\t\t\tconst newChildren = childrenArray.map((child) => {\n\t\t\t\t\tif (child === slottableChild) {\n\t\t\t\t\t\treturn React.Children.count(newElementProps.children) > 1\n\t\t\t\t\t\t\t? React.Children.only(null)\n\t\t\t\t\t\t\t: newElementProps.children;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t});\n\n\t\t\t\t// React 19: ref is now a regular prop\n\t\t\t\tconst childRef = newElementProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\t\t\treturn React.cloneElement(newElement, {\n\t\t\t\t\t...mergeProps(slotProps, newElementProps),\n\t\t\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t\t\t\tchildren: newChildren,\n\t\t\t\t} as React.Attributes);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fallback: render children as-is (shouldn't normally happen with proper usage)\n\treturn <>{children}</>;\n});\n\nSlot.displayName = 'Slot';\n\n/**\n * Slottable component - marks content that should receive slot props.\n * Used when Slot has multiple children and you want to specify which one receives props.\n */\nfunction Slottable({ children }: { children: React.ReactNode }) {\n\treturn <>{children}</>;\n}\n\nexport { Slot, Slottable, composeRefs, mergeProps, mergePropsWithRef };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { Slot } from '../lib/slot';\nimport { cn } from '../lib/utils';\n\nconst buttonVariants = cva(\n\t\"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-sm outline-none transition-[box-shadow,scale] duration-150 ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 motion-reduce:transition-shadow [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: 'default',\n\t\t\tstatic: false,\n\t\t\tvariant: 'default',\n\t\t},\n\t\tvariants: {\n\t\t\tstatic: {\n\t\t\t\tfalse: 'motion-safe:active:not-disabled:scale-[0.96]',\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: 'h-10 min-w-10 px-[calc(--spacing(3)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\ticon: 'size-10 pointer-coarse:size-11',\n\t\t\t\t'icon-lg': 'size-11',\n\t\t\t\t'icon-sm': 'size-8 pointer-coarse:size-11',\n\t\t\t\t'icon-xl': 'size-11 [&_svg:not([class*=\"size-\"])]:size-5',\n\t\t\t\t'icon-xs':\n\t\t\t\t\t'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:size-11 not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-4',\n\t\t\t\tlg: 'h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]',\n\t\t\t\tsm:\n\t\t\t\t\t'h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\txl: 'h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*=\"size-\"])]:size-5',\n\t\t\t\txs:\n\t\t\t\t\t'h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11 [&_svg:not([class*=\"size-\"])]:size-3.5',\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\t'destructive-outline':\n\t\t\t\t\t'border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64',\n\t\t\t\tsecondary:\n\t\t\t\t\t'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80',\n\t\t\t},\n\t\t},\n\t},\n);\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tvariant?: VariantProps<typeof buttonVariants>['variant'];\n\tsize?: VariantProps<typeof buttonVariants>['size'];\n\t/** Disables tactile press scaling when motion would distract from the interaction. */\n\tstatic?: boolean;\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, static: isStatic, asChild, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant }));\n\t\tconst Comp = asChild ? Slot : 'button';\n\n\t\tif (asChild) {\n\t\t\tconst SlottedComp = Comp as typeof Slot;\n\t\t\treturn (\n\t\t\t\t<SlottedComp\n\t\t\t\t\tref={ref as React.Ref<HTMLElement>}\n\t\t\t\t\tclassName={buttonClasses}\n\t\t\t\t\tdata-slot=\"button\"\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</SlottedComp>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<button ref={ref} type={type} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t},\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n","'use client';\n\nimport * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { ModalPortalScope, useRootPortalContainer } from '@constructive-io/ui/portal';\nimport { cn } from '../lib/utils';\nimport { buttonVariants } from './button';\n\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n\treturn <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\ntype AlertDialogTriggerProps = React.ComponentProps<typeof AlertDialogPrimitive.Trigger> & {\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n};\n\nfunction AlertDialogTrigger({ asChild, children, render, nativeButton, ...props }: AlertDialogTriggerProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n\treturn (\n\t\t<AlertDialogPrimitive.Trigger\n\t\t\tdata-slot=\"alert-dialog-trigger\"\n\t\t\tnativeButton={nativeButton ?? (childRender ? true : undefined)}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</AlertDialogPrimitive.Trigger>\n\t);\n}\n\nfunction AlertDialogPortal({\n\tcontainer: containerProp,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n\tconst rootContainer = useRootPortalContainer();\n\tconst container = containerProp === undefined ? (rootContainer ?? undefined) : containerProp;\n\n\tconst style = {\n\t\t...(props.style ?? {}),\n\t\t['--z-layer-floating' as any]: 'var(--z-layer-floating-elevated)',\n\t} satisfies React.CSSProperties;\n\n\treturn (\n\t\t<AlertDialogPrimitive.Portal\n\t\t\tdata-slot=\"alert-dialog-portal\"\n\t\t\tcontainer={container}\n\t\t\t{...props}\n\t\t\tstyle={style}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Backdrop>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Backdrop\n\t\t\tdata-slot=\"alert-dialog-overlay\"\n\t\t\tclassName={cn(\n\t\t\t\t'fixed inset-0 z-[var(--z-layer-modal-backdrop)] bg-black/80 transition-opacity duration-200 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogContent({ className, children, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Popup>) {\n\treturn (\n\t\t<AlertDialogPortal>\n\t\t\t<AlertDialogOverlay />\n\t\t\t<AlertDialogPrimitive.Popup\n\t\t\t\tdata-slot=\"alert-dialog-content\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t`bg-background fixed top-1/2 left-1/2 z-[var(--z-layer-modal-content)] grid max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)]\n\t\t\t\t\t-translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl border p-6 shadow-lg\n\t\t\t\t\ttransition-[opacity,scale] duration-200 data-[ending-style]:scale-95 data-[starting-style]:scale-95\n\t\t\t\t\tdata-[ending-style]:opacity-0 data-[starting-style]:opacity-0 sm:max-w-100`,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{/* ModalPortalScope creates a scoped portal container for floating elements inside */}\n\t\t\t\t<ModalPortalScope>\n\t\t\t\t\t{children}\n\t\t\t\t</ModalPortalScope>\n\t\t\t</AlertDialogPrimitive.Popup>\n\t\t</AlertDialogPortal>\n\t);\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-header\"\n\t\t\tclassName={cn('flex flex-col gap-1 text-center sm:text-left', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-footer\"\n\t\t\tclassName={cn('flex flex-col-reverse gap-3 sm:flex-row sm:justify-end', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Title\n\t\t\tdata-slot=\"alert-dialog-title\"\n\t\t\tclassName={cn('text-lg font-semibold', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Description\n\t\t\tdata-slot=\"alert-dialog-description\"\n\t\t\tclassName={cn('text-muted-foreground text-sm', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * AlertDialogAction - A button that performs the primary action and closes the dialog.\n * Wraps AlertDialogPrimitive.Close with primary button styling.\n */\ntype AlertDialogCloseProps = React.ComponentProps<typeof AlertDialogPrimitive.Close> & {\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n};\n\nfunction AlertDialogAction({\n\tasChild,\n\tchildren,\n\trender,\n\tnativeButton,\n\tclassName,\n\t...props\n}: AlertDialogCloseProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n\treturn (\n\t\t<AlertDialogPrimitive.Close\n\t\t\tdata-slot=\"alert-dialog-action\"\n\t\t\tclassName={cn(buttonVariants(), className)}\n\t\t\tnativeButton={nativeButton ?? (childRender ? true : undefined)}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</AlertDialogPrimitive.Close>\n\t);\n}\n\n/**\n * AlertDialogCancel - A button that cancels the action and closes the dialog.\n * Wraps AlertDialogPrimitive.Close with outline button styling.\n */\nfunction AlertDialogCancel({\n\tasChild,\n\tchildren,\n\trender,\n\tnativeButton,\n\tclassName,\n\t...props\n}: AlertDialogCloseProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n\treturn (\n\t\t<AlertDialogPrimitive.Close\n\t\t\tdata-slot=\"alert-dialog-cancel\"\n\t\t\tclassName={cn(buttonVariants({ variant: 'outline' }), className)}\n\t\t\tnativeButton={nativeButton ?? (childRender ? true : undefined)}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</AlertDialogPrimitive.Close>\n\t);\n}\n\nexport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogOverlay,\n\tAlertDialogPortal,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n};\n"]}
@@ -0,0 +1,32 @@
1
+ import * as React from 'react';
2
+ import { AlertDialog as AlertDialog$1 } from '@base-ui/react/alert-dialog';
3
+
4
+ declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialog$1.Root>): React.JSX.Element;
5
+ type AlertDialogTriggerProps = React.ComponentProps<typeof AlertDialog$1.Trigger> & {
6
+ /** When true, merges props onto the child element instead of rendering a button */
7
+ asChild?: boolean;
8
+ };
9
+ declare function AlertDialogTrigger({ asChild, children, render, nativeButton, ...props }: AlertDialogTriggerProps): React.JSX.Element;
10
+ declare function AlertDialogPortal({ container: containerProp, ...props }: React.ComponentProps<typeof AlertDialog$1.Portal>): React.JSX.Element;
11
+ declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Backdrop>): React.JSX.Element;
12
+ declare function AlertDialogContent({ className, children, ...props }: React.ComponentProps<typeof AlertDialog$1.Popup>): React.JSX.Element;
13
+ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
14
+ declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
15
+ declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Title>): React.JSX.Element;
16
+ declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Description>): React.JSX.Element;
17
+ /**
18
+ * AlertDialogAction - A button that performs the primary action and closes the dialog.
19
+ * Wraps AlertDialogPrimitive.Close with primary button styling.
20
+ */
21
+ type AlertDialogCloseProps = React.ComponentProps<typeof AlertDialog$1.Close> & {
22
+ /** When true, merges props onto the child element instead of rendering a button */
23
+ asChild?: boolean;
24
+ };
25
+ declare function AlertDialogAction({ asChild, children, render, nativeButton, className, ...props }: AlertDialogCloseProps): React.JSX.Element;
26
+ /**
27
+ * AlertDialogCancel - A button that cancels the action and closes the dialog.
28
+ * Wraps AlertDialogPrimitive.Close with outline button styling.
29
+ */
30
+ declare function AlertDialogCancel({ asChild, children, render, nativeButton, className, ...props }: AlertDialogCloseProps): React.JSX.Element;
31
+
32
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
@@ -1,31 +1,32 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as React from 'react';
3
2
  import { AlertDialog as AlertDialog$1 } from '@base-ui/react/alert-dialog';
4
3
 
5
- declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialog$1.Root>): react_jsx_runtime.JSX.Element;
6
- type AlertDialogTriggerProps = Omit<React.ComponentProps<typeof AlertDialog$1.Trigger>, 'render' | 'nativeButton'> & {
4
+ declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialog$1.Root>): React.JSX.Element;
5
+ type AlertDialogTriggerProps = React.ComponentProps<typeof AlertDialog$1.Trigger> & {
7
6
  /** When true, merges props onto the child element instead of rendering a button */
8
7
  asChild?: boolean;
9
- /** Whether the child renders a native button. Defaults to true when asChild is used. */
10
- nativeButton?: boolean;
11
8
  };
12
- declare function AlertDialogTrigger({ asChild, nativeButton, children, ...props }: AlertDialogTriggerProps): react_jsx_runtime.JSX.Element;
13
- declare function AlertDialogPortal({ keepMounted, ...props }: React.ComponentProps<typeof AlertDialog$1.Portal>): react_jsx_runtime.JSX.Element;
14
- declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Backdrop>): react_jsx_runtime.JSX.Element;
15
- declare function AlertDialogContent({ className, children, ...props }: React.ComponentProps<typeof AlertDialog$1.Popup>): react_jsx_runtime.JSX.Element;
16
- declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
17
- declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
18
- declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Title>): react_jsx_runtime.JSX.Element;
19
- declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Description>): react_jsx_runtime.JSX.Element;
9
+ declare function AlertDialogTrigger({ asChild, children, render, nativeButton, ...props }: AlertDialogTriggerProps): React.JSX.Element;
10
+ declare function AlertDialogPortal({ container: containerProp, ...props }: React.ComponentProps<typeof AlertDialog$1.Portal>): React.JSX.Element;
11
+ declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Backdrop>): React.JSX.Element;
12
+ declare function AlertDialogContent({ className, children, ...props }: React.ComponentProps<typeof AlertDialog$1.Popup>): React.JSX.Element;
13
+ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
14
+ declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
15
+ declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Title>): React.JSX.Element;
16
+ declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Description>): React.JSX.Element;
20
17
  /**
21
18
  * AlertDialogAction - A button that performs the primary action and closes the dialog.
22
19
  * Wraps AlertDialogPrimitive.Close with primary button styling.
23
20
  */
24
- declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Close>): react_jsx_runtime.JSX.Element;
21
+ type AlertDialogCloseProps = React.ComponentProps<typeof AlertDialog$1.Close> & {
22
+ /** When true, merges props onto the child element instead of rendering a button */
23
+ asChild?: boolean;
24
+ };
25
+ declare function AlertDialogAction({ asChild, children, render, nativeButton, className, ...props }: AlertDialogCloseProps): React.JSX.Element;
25
26
  /**
26
27
  * AlertDialogCancel - A button that cancels the action and closes the dialog.
27
28
  * Wraps AlertDialogPrimitive.Close with outline button styling.
28
29
  */
29
- declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Close>): react_jsx_runtime.JSX.Element;
30
+ declare function AlertDialogCancel({ asChild, children, render, nativeButton, className, ...props }: AlertDialogCloseProps): React.JSX.Element;
30
31
 
31
32
  export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };